Go to the documentation of this file.
7 #ifndef DLG_SETTINGS_ABSTRACT_BASE_H
8 #define DLG_SETTINGS_ABSTRACT_BASE_H
27 const QString &dialogName,
54 int minimumHeightOrZero = 0);
100 void saveGeometryToSettings ();
103 virtual void hideEvent (QHideEvent *event);
106 virtual void showEvent (QShowEvent *event);
108 QScrollArea *m_scroll;
111 QPushButton *m_btnCancel;
112 QPushButton *m_btnOk;
114 const QString m_dialogName;
115 bool m_disableOkAtStartup;
118 #endif // DLG_SETTINGS_ABSTRACT_BASE_H
static int MINIMUM_DIALOG_WIDTH
Dialog layout constant that guarantees every widget has sufficient room. Can be increased by finishPa...
void setDisableOkAtStartup(bool disableOkAtStartup)
Override the default Ok button behavior applied in showEvent.
Abstract base class for all Settings dialogs.
virtual ~DlgSettingsAbstractBase()
virtual void setSmallDialogs(bool smallDialogs)=0
If false then dialogs have a minimum size so all controls are visible.
void finishPanel(QWidget *subPanel, int minimumWidth=MINIMUM_DIALOG_WIDTH, int minimumHeightOrZero=0)
Add Ok and Cancel buttons to subpanel to get the whole dialog.
void setCmdMediator(CmdMediator &cmdMediator)
Store CmdMediator for easy access by the leaf class.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)=0
Let subclass define an optional Save As Default button.
virtual QWidget * createSubPanel()=0
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
void populateColorComboWithoutTransparent(QComboBox &combo)
Add colors in color palette to combobox, without transparent entry at end.
MainWindow & mainWindow()
Get method for MainWindow.
static int MINIMUM_PREVIEW_HEIGHT
Dialog layout constant that guarantees preview has sufficent room.
void enableOk(bool enable)
Let leaf subclass control the Ok button.
virtual void load(CmdMediator &cmdMediator)=0
Load settings from Document.
void populateColorComboWithTransparent(QComboBox &combo)
Add colors in color palette to combobox, with transparent entry at end.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
virtual void handleOk()=0
Process slotOk.