Engauge Digitizer 2
|
Abstract base class for all Settings dialogs. More...
#include <DlgSettingsAbstractBase.h>
Public Member Functions | |
DlgSettingsAbstractBase (const QString &title, const QString &dialogName, MainWindow &mainWindow) | |
Single constructor. | |
virtual | ~DlgSettingsAbstractBase () |
Protected Member Functions | |
CmdMediator & | cmdMediator () |
Provide access to Document information wrapped inside CmdMediator. | |
void | addPixmap (QGraphicsScene &scene, const QPixmap &pixmap) |
Adds pixmap to the scene. | |
void | createWhatsThis (QGridLayout *layout, ButtonWhatsThis *button, int row, int column) |
Create a WhatsThis button in a grid layout. | |
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. | |
void | enableOk (bool enable) |
Let leaf subclass control the Ok button. | |
void | finishPanel (QWidget *subPanel, int minimumWidth=MINIMUM_DIALOG_WIDTH, int minimumHeightOrZero=0) |
Add Ok and Cancel buttons to subpanel to get the whole dialog. | |
virtual void | handleOk ()=0 |
Process slotOk. | |
virtual void | load (CmdMediator &cmdMediator)=0 |
Load settings from Document. | |
MainWindow & | mainWindow () |
Get method for MainWindow. | |
const MainWindow & | mainWindow () const |
Const get method for MainWindow. | |
void | populateColorComboWithoutTransparent (QComboBox &combo) |
Add colors in color palette to combobox, without transparent entry at end. | |
void | populateColorComboWithTransparent (QComboBox &combo) |
Add colors in color palette to combobox, with transparent entry at end. | |
void | setCmdMediator (CmdMediator &cmdMediator) |
Store CmdMediator for easy access by the leaf class. | |
void | setDisableOkAtStartup (bool disableOkAtStartup) |
Override the default Ok button behavior applied in showEvent. | |
virtual void | setSmallDialogs (bool smallDialogs)=0 |
If false then dialogs have a minimum size so all controls are visible. |
Static Protected Attributes | |
static int | MINIMUM_DIALOG_WIDTH = 380 |
Dialog layout constant that guarantees every widget has sufficient room. Can be increased by finishPanel. | |
static int | MINIMUM_PREVIEW_HEIGHT = 100 |
Dialog layout constant that guarantees preview has sufficent room. |
Abstract base class for all Settings dialogs.
Definition at line 24 of file DlgSettingsAbstractBase.h.
DlgSettingsAbstractBase::DlgSettingsAbstractBase | ( | const QString & | title, |
const QString & | dialogName, | ||
MainWindow & | mainWindow ) |
Single constructor.
Definition at line 27 of file DlgSettingsAbstractBase.cpp.
|
virtual |
Definition at line 51 of file DlgSettingsAbstractBase.cpp.
|
protected |
Adds pixmap to the scene.
The scene is resized so when a larger image is followed by a smaller image, none of the old image appears around the smaller new image
Definition at line 57 of file DlgSettingsAbstractBase.cpp.
|
protected |
Provide access to Document information wrapped inside CmdMediator.
Definition at line 67 of file DlgSettingsAbstractBase.cpp.
|
protectedpure virtual |
Let subclass define an optional Save As Default button.
Implemented in DlgImportAdvanced, DlgSettingsAxesChecker, DlgSettingsColorFilter, DlgSettingsCoords, DlgSettingsCurveList, DlgSettingsCurveProperties, DlgSettingsDigitizeCurve, DlgSettingsExportFormat, DlgSettingsGeneral, DlgSettingsGridDisplay, DlgSettingsGridRemoval, DlgSettingsGuideline, DlgSettingsMainWindow, DlgSettingsPointMatch, and DlgSettingsSegments.
|
protectedpure virtual |
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Implemented in DlgImportAdvanced, DlgSettingsAxesChecker, DlgSettingsColorFilter, DlgSettingsCoords, DlgSettingsCurveList, DlgSettingsCurveProperties, DlgSettingsDigitizeCurve, DlgSettingsExportFormat, DlgSettingsGeneral, DlgSettingsGridDisplay, DlgSettingsGridRemoval, DlgSettingsGuideline, DlgSettingsMainWindow, DlgSettingsPointMatch, and DlgSettingsSegments.
|
protected |
Create a WhatsThis button in a grid layout.
Definition at line 74 of file DlgSettingsAbstractBase.cpp.
|
protected |
Let leaf subclass control the Ok button.
This method is separate from the subclasses' updateControls, rather than part of that method since updateControls is not aware of when it is called at startup - at which point the ok button should ALWAYS be disabled since there are not yet any changes. In other words, we call this method at startup to override the ok button state that was just set by updateControls
Note - if this method is called with a constant value of true from updateControls, one of two cases applies: 1) There are no constraints to worry about (like a required text field cannot be empty) 2) There are constraints, but they are already handled by validators and/or other constraint logic
Definition at line 87 of file DlgSettingsAbstractBase.cpp.
|
protected |
Add Ok and Cancel buttons to subpanel to get the whole dialog.
Definition at line 92 of file DlgSettingsAbstractBase.cpp.
|
protectedpure virtual |
Process slotOk.
Implemented in DlgImportAdvanced, DlgSettingsAxesChecker, DlgSettingsColorFilter, DlgSettingsCoords, DlgSettingsCurveList, DlgSettingsCurveProperties, DlgSettingsDigitizeCurve, DlgSettingsExportFormat, DlgSettingsGeneral, DlgSettingsGridDisplay, DlgSettingsGridRemoval, DlgSettingsGuideline, DlgSettingsMainWindow, DlgSettingsPointMatch, and DlgSettingsSegments.
|
protectedpure virtual |
Load settings from Document.
Implemented in DlgImportAdvanced, DlgSettingsAxesChecker, DlgSettingsColorFilter, DlgSettingsCoords, DlgSettingsCurveList, DlgSettingsCurveProperties, DlgSettingsDigitizeCurve, DlgSettingsExportFormat, DlgSettingsGeneral, DlgSettingsGridDisplay, DlgSettingsGridRemoval, DlgSettingsGuideline, DlgSettingsMainWindow, DlgSettingsPointMatch, and DlgSettingsSegments.
|
protected |
Get method for MainWindow.
Definition at line 157 of file DlgSettingsAbstractBase.cpp.
|
protected |
Const get method for MainWindow.
Definition at line 162 of file DlgSettingsAbstractBase.cpp.
|
protected |
Add colors in color palette to combobox, without transparent entry at end.
Definition at line 167 of file DlgSettingsAbstractBase.cpp.
|
protected |
Add colors in color palette to combobox, with transparent entry at end.
Definition at line 187 of file DlgSettingsAbstractBase.cpp.
|
protected |
Store CmdMediator for easy access by the leaf class.
Definition at line 200 of file DlgSettingsAbstractBase.cpp.
|
protected |
Override the default Ok button behavior applied in showEvent.
Definition at line 205 of file DlgSettingsAbstractBase.cpp.
|
protectedpure virtual |
If false then dialogs have a minimum size so all controls are visible.
Implemented in DlgImportAdvanced, DlgSettingsAxesChecker, DlgSettingsColorFilter, DlgSettingsCoords, DlgSettingsCurveList, DlgSettingsCurveProperties, DlgSettingsDigitizeCurve, DlgSettingsExportFormat, DlgSettingsGeneral, DlgSettingsGridDisplay, DlgSettingsGridRemoval, DlgSettingsGuideline, DlgSettingsMainWindow, DlgSettingsPointMatch, and DlgSettingsSegments.
|
staticprotected |
Dialog layout constant that guarantees every widget has sufficient room. Can be increased by finishPanel.
Definition at line 78 of file DlgSettingsAbstractBase.h.
|
staticprotected |
Dialog layout constant that guarantees preview has sufficent room.
Definition at line 81 of file DlgSettingsAbstractBase.h.