1 #include "CmdMediator.h"
2 #include "CmdSettingsGridRemoval.h"
3 #include "DlgSettingsGridRemoval.h"
4 #include "EngaugeAssert.h"
6 #include "MainWindow.h"
9 #include <QDoubleValidator>
10 #include <QGraphicsScene>
11 #include <QGridLayout>
13 #include <QHBoxLayout>
16 #include "ViewPreview.h"
18 const double CLOSE_DISTANCE_MAX = 64;
19 const double CLOSE_DISTANCE_MIN = 0;
20 const int CLOSE_DECIMALS = 1;
21 const int COUNT_MIN = 1;
22 const int COUNT_MAX = 100;
23 const int COUNT_DECIMALS = 0;
27 "DlgSettingsGridRemoval",
31 m_modelGridRemovalBefore (0),
32 m_modelGridRemovalAfter (0)
34 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::DlgSettingsGridRemoval";
40 DlgSettingsGridRemoval::~DlgSettingsGridRemoval()
42 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::~DlgSettingsGridRemoval";
45 void DlgSettingsGridRemoval::createPreview (QGridLayout *layout,
int &row)
47 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::createPreview";
49 QLabel *labelPreview =
new QLabel (
"Preview");
50 layout->addWidget (labelPreview, row++, 0, 1, 5);
52 m_scenePreview =
new QGraphicsScene (
this);
53 m_viewPreview =
new ViewPreview (m_scenePreview,
this);
54 m_viewPreview->setWhatsThis (tr (
"Preview window that shows how current settings affect grid removal"));
55 m_viewPreview->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
56 m_viewPreview->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
58 layout->addWidget (m_viewPreview, row++, 0, 1, 5);
61 void DlgSettingsGridRemoval::createRemoveGridLines (QGridLayout *layout,
int &row)
63 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::createRemoveGridLines";
65 m_chkRemoveGridLines =
new QCheckBox (
"Remove pixels close to defined grid lines");
66 m_chkRemoveGridLines->setWhatsThis (
"Check this box to have pixels close to regularly spaced gridlines removed.\n\n"
67 "This option is only available when the axis points have all been defined.");
68 connect (m_chkRemoveGridLines, SIGNAL (stateChanged (
int)),
this, SLOT (slotRemoveGridLines (
int)));
69 layout->addWidget (m_chkRemoveGridLines, row++, 1, 1, 3);
71 QLabel *labelCloseDistance =
new QLabel (
"Close distance (pixels):");
72 layout->addWidget (labelCloseDistance, row, 2);
74 m_editCloseDistance =
new QLineEdit;
75 m_editCloseDistance->setWhatsThis (
"Set closeness distance in pixels.\n\n"
76 "Pixels that are closer to the regularly spaced gridlines, than this distance, "
77 "will be removed.\n\n"
78 "This value cannot be negative. A zero value disables this feature. Decimal values are allowed");
79 m_validatorCloseDistance =
new QDoubleValidator (CLOSE_DISTANCE_MIN, CLOSE_DISTANCE_MAX, CLOSE_DECIMALS);
80 m_editCloseDistance->setValidator (m_validatorCloseDistance);
81 connect (m_editCloseDistance, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotCloseDistance (
const QString &)));
82 layout->addWidget (m_editCloseDistance, row++, 3);
84 createRemoveGridLinesX (layout, row);
85 createRemoveGridLinesY (layout, row);
88 void DlgSettingsGridRemoval::createRemoveGridLinesX (QGridLayout *layout,
int &row)
90 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::createRemoveGridLinesX";
92 QString titleX =
"X Grid Lines";
94 titleX = QString (QChar (0x98, 0x03)) + QString (
" Grid Lines");
96 QGroupBox *groupX =
new QGroupBox (titleX);
97 layout->addWidget (groupX, row, 2);
99 QGridLayout *layoutGroup =
new QGridLayout;
100 groupX->setLayout (layoutGroup);
102 QLabel *labelDisable =
new QLabel (
"Disable:");
103 layoutGroup->addWidget (labelDisable, 0, 0);
105 m_cmbDisableX =
new QComboBox;
106 m_cmbDisableX->setWhatsThis (
"Disabled value.\n\n"
107 "The X grid lines are specified using only three values at a time. For flexibility, four values "
108 "are offered so you must chose which value is disabled. Once disabled, that value is simply "
109 "updated as the other values change");
110 m_cmbDisableX->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_COUNT),
111 QVariant (GRID_COORD_DISABLE_COUNT));
112 m_cmbDisableX->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_START),
113 QVariant (GRID_COORD_DISABLE_START));
114 m_cmbDisableX->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_STEP),
115 QVariant (GRID_COORD_DISABLE_STEP));
116 m_cmbDisableX->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_STOP),
117 QVariant (GRID_COORD_DISABLE_STOP));
118 connect (m_cmbDisableX, SIGNAL (activated (
const QString &)),
this, SLOT (slotDisableX (
const QString &)));
119 layoutGroup->addWidget (m_cmbDisableX, 0, 1);
121 QLabel *labelCount =
new QLabel (
"Count:");
122 layoutGroup->addWidget (labelCount, 1, 0);
124 m_editCountX =
new QLineEdit;
125 m_editCountX->setWhatsThis (
"Number of X grid lines.\n\n"
126 "The number of X grid lines must be entered as an integer greater than zero");
127 m_validatorCountX =
new QDoubleValidator (COUNT_MIN, COUNT_MAX, COUNT_DECIMALS);
128 m_editCountX->setValidator (m_validatorCountX);
129 connect (m_editCountX, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotCountX (
const QString &)));
130 layoutGroup->addWidget (m_editCountX, 1, 1);
132 QLabel *labelStart =
new QLabel (
"Start:");
133 layoutGroup->addWidget (labelStart, 2, 0);
135 m_editStartX =
new QLineEdit;
136 m_editStartX->setWhatsThis (
"Value of the first X grid line.\n\n"
137 "The start value cannot be greater than the stop value");
138 m_validatorStartX =
new QDoubleValidator;
139 m_editStartX->setValidator (m_validatorStartX);
140 connect (m_editStartX, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotStartX (
const QString &)));
141 layoutGroup->addWidget (m_editStartX, 2, 1);
143 QLabel *labelStep =
new QLabel (
"Step:");
144 layoutGroup->addWidget (labelStep, 3, 0);
146 m_editStepX =
new QLineEdit;
147 m_editStepX->setWhatsThis (
"Difference in value between two successive X grid lines.\n\n"
148 "The step value must be greater than zero");
149 m_validatorStepX =
new QDoubleValidator;
150 m_editStepX->setValidator (m_validatorStepX);
151 connect (m_editStepX, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotStepX (
const QString &)));
152 layoutGroup->addWidget (m_editStepX, 3, 1);
154 QLabel *labelStop =
new QLabel (
"Stop:");
155 layoutGroup->addWidget (labelStop, 4, 0);
157 m_editStopX =
new QLineEdit;
158 m_editStopX->setWhatsThis (
"Value of the last X grid line.\n\n"
159 "The stop value cannot be less than the start value");
160 m_validatorStopX =
new QDoubleValidator;
161 m_editStopX->setValidator (m_validatorStopX);
162 connect (m_editStopX, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotStopX (
const QString &)));
163 layoutGroup->addWidget (m_editStopX, 4, 1);
166 void DlgSettingsGridRemoval::createRemoveGridLinesY (QGridLayout *layout,
int &row)
168 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::createRemoveGridLinesY";
170 QString titleY =
"Y Grid Lines";
172 titleY = QString (
"R Grid Lines");
174 QGroupBox *groupY =
new QGroupBox (titleY);
175 layout->addWidget (groupY, row++, 3);
177 QGridLayout *layoutGroup =
new QGridLayout;
178 groupY->setLayout (layoutGroup);
180 QLabel *labelDisable =
new QLabel (
"Disable:");
181 layoutGroup->addWidget (labelDisable, 0, 0);
183 m_cmbDisableY =
new QComboBox;
184 m_cmbDisableY->setWhatsThis (
"Disabled value.\n\n"
185 "The Y grid lines are specified using only three values at a time. For flexibility, four values "
186 "are offered so you must chose which value is disabled. Once disabled, that value is simply "
187 "updated as the other values change");
188 m_cmbDisableY->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_COUNT),
189 QVariant (GRID_COORD_DISABLE_COUNT));
190 m_cmbDisableY->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_START),
191 QVariant (GRID_COORD_DISABLE_START));
192 m_cmbDisableY->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_STEP),
193 QVariant (GRID_COORD_DISABLE_STEP));
194 m_cmbDisableY->addItem(gridCoordDisableToString (GRID_COORD_DISABLE_STOP),
195 QVariant (GRID_COORD_DISABLE_STOP));
196 connect (m_cmbDisableY, SIGNAL (activated (
const QString &)),
this, SLOT (slotDisableY (
const QString &)));
197 layoutGroup->addWidget (m_cmbDisableY, 0, 1);
199 QLabel *labelCount =
new QLabel (
"Count:");
200 layoutGroup->addWidget (labelCount, 1, 0);
202 m_editCountY =
new QLineEdit;
203 m_editCountY->setWhatsThis (
"Number of Y grid lines.\n\n"
204 "The number of Y grid lines must be entered as an integer greater than zero");
205 m_validatorCountY =
new QDoubleValidator (COUNT_MIN, COUNT_MAX, COUNT_DECIMALS);
206 m_editCountY->setValidator (m_validatorCountY);
207 connect (m_editCountY, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotCountY (
const QString &)));
208 layoutGroup->addWidget (m_editCountY, 1, 1);
210 QLabel *labelStart =
new QLabel (
"Start:");
211 layoutGroup->addWidget (labelStart, 2, 0);
213 m_editStartY =
new QLineEdit;
214 m_editStartY->setWhatsThis (
"Value of the first Y grid line.\n\n"
215 "The start value cannot be greater than the stop value");
216 m_validatorStartY =
new QDoubleValidator;
217 m_editStartY->setValidator (m_validatorStartY);
218 connect (m_editStartY, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotStartY (
const QString &)));
219 layoutGroup->addWidget (m_editStartY, 2, 1);
221 QLabel *labelStep =
new QLabel (
"Step:");
222 layoutGroup->addWidget (labelStep, 3, 0);
224 m_editStepY =
new QLineEdit;
225 m_editStepY->setWhatsThis (
"Difference in value between two successive Y grid lines.\n\n"
226 "The step value must be greater than zero");
227 m_validatorStepY =
new QDoubleValidator;
228 m_editStepY->setValidator (m_validatorStepY);
229 connect (m_editStepY, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotStepY (
const QString &)));
230 layoutGroup->addWidget (m_editStepY, 3, 1);
232 QLabel *labelStop =
new QLabel (
"Stop:");
233 layoutGroup->addWidget (labelStop, 4, 0);
235 m_editStopY =
new QLineEdit;
236 m_editStopY->setWhatsThis (
"Value of the last Y grid line.\n\n"
237 "The stop value cannot be less than the start value");
238 m_validatorStopY =
new QDoubleValidator;
239 m_editStopY->setValidator (m_validatorStopY);
240 connect (m_editStopY, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotStopY (
const QString &)));
241 layoutGroup->addWidget (m_editStopY, 4, 1);
244 void DlgSettingsGridRemoval::createRemoveParallel (QGridLayout *layout,
int &row)
246 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::createRemoveParallel";
248 m_chkRemoveParallel =
new QCheckBox (
"Remove thin lines parallel to the axes");
249 m_chkRemoveParallel->setWhatsThis (
"Check this box to remove thin lines that are parallel to the axes.\n\n"
250 "This option is only available when the axis points have all been defined.\n\n"
251 "This option works especially well if the gridlines in the original image are thinner "
252 "than the curve lines");
253 connect (m_chkRemoveParallel, SIGNAL (stateChanged (
int)),
this, SLOT (slotRemoveParallel (
int)));
254 layout->addWidget (m_chkRemoveParallel, row++, 1, 1, 3);
259 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::createSubPanel";
261 const int COLUMN_CHECKBOX_WIDTH = 60;
263 QWidget *subPanel =
new QWidget ();
264 QGridLayout *layout =
new QGridLayout (subPanel);
265 subPanel->setLayout (layout);
267 layout->setColumnStretch(0, 1);
268 layout->setColumnStretch(1, 0);
269 layout->setColumnMinimumWidth(1, COLUMN_CHECKBOX_WIDTH);
270 layout->setColumnStretch(2, 0);
271 layout->setColumnStretch(3, 0);
272 layout->setColumnStretch(4, 1);
275 createRemoveGridLines (layout, row);
276 createRemoveParallel (layout, row);
277 createPreview (layout, row);
284 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::handleOk";
291 *m_modelGridRemovalBefore,
292 *m_modelGridRemovalAfter);
300 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::load";
305 if (m_modelGridRemovalBefore != 0) {
306 delete m_modelGridRemovalBefore;
308 if (m_modelGridRemovalAfter != 0) {
309 delete m_modelGridRemovalAfter;
317 ENGAUGE_ASSERT (CLOSE_DISTANCE_MIN <= m_modelGridRemovalAfter->closeDistance());
318 ENGAUGE_ASSERT (CLOSE_DISTANCE_MAX >= m_modelGridRemovalAfter->
closeDistance());
323 m_editCloseDistance->setText (QString::number (m_modelGridRemovalAfter->
closeDistance()));
325 int indexDisableX = m_cmbDisableX->findData (QVariant (m_modelGridRemovalAfter->
gridCoordDisableX()));
326 m_cmbDisableX->setCurrentIndex (indexDisableX);
328 m_editCountX->setText(QString::number(m_modelGridRemovalAfter->
countX()));
329 m_editStartX->setText(QString::number(m_modelGridRemovalAfter->
startX()));
330 m_editStepX->setText(QString::number(m_modelGridRemovalAfter->
stepX()));
331 m_editStopX->setText(QString::number(m_modelGridRemovalAfter->
stopX()));
333 int indexDisableY = m_cmbDisableX->findData (QVariant (m_modelGridRemovalAfter->
gridCoordDisableY()));
334 m_cmbDisableY->setCurrentIndex (indexDisableY);
336 m_editCountY->setText(QString::number(m_modelGridRemovalAfter->
countY()));
337 m_editStartY->setText(QString::number(m_modelGridRemovalAfter->
startY()));
338 m_editStepY->setText(QString::number(m_modelGridRemovalAfter->
stepY()));
339 m_editStopY->setText(QString::number(m_modelGridRemovalAfter->
stopY()));
343 m_scenePreview->clear();
351 void DlgSettingsGridRemoval::slotCloseDistance(
const QString &)
353 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotCloseDistance";
355 m_modelGridRemovalAfter->
setCloseDistance(m_editCloseDistance->text().toDouble());
360 void DlgSettingsGridRemoval::slotCountX(
const QString &count)
362 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotCountX";
364 m_modelGridRemovalAfter->
setCountX(count.toInt());
369 void DlgSettingsGridRemoval::slotCountY(
const QString &count)
371 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotCountY";
373 m_modelGridRemovalAfter->
setCountY(count.toInt());
378 void DlgSettingsGridRemoval::slotDisableX(
const QString &)
380 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotDisableX";
382 GridCoordDisable gridCoordDisable = (GridCoordDisable) m_cmbDisableX->currentData().toInt();
388 void DlgSettingsGridRemoval::slotDisableY(
const QString &)
390 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotDisableY";
392 GridCoordDisable gridCoordDisable = (GridCoordDisable) m_cmbDisableY->currentData().toInt();
398 void DlgSettingsGridRemoval::slotRemoveGridLines (
int state)
400 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotRemoveGridLines";
407 void DlgSettingsGridRemoval::slotRemoveParallel (
int state)
409 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotRemoveParallel";
416 void DlgSettingsGridRemoval::slotStartX(
const QString &startX)
418 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotStartX";
420 m_modelGridRemovalAfter->
setStartX(startX.toDouble());
425 void DlgSettingsGridRemoval::slotStartY(
const QString &startY)
427 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotStartY";
429 m_modelGridRemovalAfter->
setStartY(startY.toDouble());
434 void DlgSettingsGridRemoval::slotStepX(
const QString &stepX)
436 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotStepX";
438 m_modelGridRemovalAfter->
setStepX(stepX.toDouble());
443 void DlgSettingsGridRemoval::slotStepY(
const QString &stepY)
445 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotStepY";
447 m_modelGridRemovalAfter->
setStepY(stepY.toDouble());
452 void DlgSettingsGridRemoval::slotStopX(
const QString &stopX)
454 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotStopX";
456 m_modelGridRemovalAfter->
setStopX(stopX.toDouble());
461 void DlgSettingsGridRemoval::slotStopY(
const QString &stopY)
463 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsGridRemoval::slotStopY";
465 m_modelGridRemovalAfter->
setStopY(stopY.toDouble());
470 void DlgSettingsGridRemoval::updateControls ()
472 m_editCloseDistance->setEnabled (m_chkRemoveGridLines->isChecked ());
474 m_cmbDisableX->setEnabled (m_chkRemoveGridLines->isChecked ());
476 GridCoordDisable disableX = (GridCoordDisable) m_cmbDisableX->currentData().toInt();
477 m_editCountX->setEnabled (m_chkRemoveGridLines->isChecked () && (disableX != GRID_COORD_DISABLE_COUNT));
478 m_editStartX->setEnabled (m_chkRemoveGridLines->isChecked () && (disableX != GRID_COORD_DISABLE_START));
479 m_editStepX->setEnabled (m_chkRemoveGridLines->isChecked () && (disableX != GRID_COORD_DISABLE_STEP));
480 m_editStopX->setEnabled (m_chkRemoveGridLines->isChecked () && (disableX != GRID_COORD_DISABLE_STOP));
482 m_cmbDisableY->setEnabled (m_chkRemoveGridLines->isChecked ());
484 GridCoordDisable disableY = (GridCoordDisable) m_cmbDisableY->currentData().toInt();
485 m_editCountY->setEnabled (m_chkRemoveGridLines->isChecked () && (disableY != GRID_COORD_DISABLE_COUNT));
486 m_editStartY->setEnabled (m_chkRemoveGridLines->isChecked () && (disableY != GRID_COORD_DISABLE_START));
487 m_editStepY->setEnabled (m_chkRemoveGridLines->isChecked () && (disableY != GRID_COORD_DISABLE_STEP));
488 m_editStopY->setEnabled (m_chkRemoveGridLines->isChecked () && (disableY != GRID_COORD_DISABLE_STOP));
490 QString textCloseDistance = m_editCloseDistance->text();
491 QString textCountX = m_editCountX->text();
492 QString textStartX = m_editStartX->text();
493 QString textStepX = m_editStepX->text();
494 QString textStopX = m_editStopX->text();
495 QString textCountY = m_editCountY->text();
496 QString textStartY = m_editStartY->text();
497 QString textStepY = m_editStepY->text();
498 QString textStopY = m_editStopY->text();
501 bool isOk = (m_validatorCloseDistance->validate (textCloseDistance, pos) == QValidator::Acceptable) &&
502 (m_validatorCountX->validate (textCountX, pos) == QValidator::Acceptable) &&
503 (m_validatorStartX->validate (textStartX, pos) == QValidator::Acceptable) &&
504 (m_validatorStepX->validate (textStepX, pos) == QValidator::Acceptable) &&
505 (m_validatorStopX->validate (textStopX, pos) == QValidator::Acceptable) &&
506 (m_validatorCountY->validate (textCountY, pos) == QValidator::Acceptable) &&
507 (m_validatorStartY->validate (textStartY, pos) == QValidator::Acceptable) &&
508 (m_validatorStepY->validate (textStepY, pos) == QValidator::Acceptable) &&
509 (m_validatorStopY->validate (textStopY, pos) == QValidator::Acceptable);
513 void DlgSettingsGridRemoval::updatePreview ()
double closeDistance() const
Get method for close distance.
bool removeDefinedGridLines() const
Get method for removing defined grid lines.
void setCloseDistance(double closeDistance)
Set method for close distance.
double startY() const
Get method for y start.
void setCountX(int countX)
Set method for x count.
void setStopY(double stopY)
Set method for y stop.
void setCmdMediator(CmdMediator &cmdMediator)
Store CmdMediator for easy access by the leaf class.
void setRemoveParallelToAxes(bool removeParallelToAxes)
Set method for removing lines parallel to axes.
virtual void load(CmdMediator &cmdMediator)
Load settings from Document.
void setStartY(double startY)
Set method for y start.
GridCoordDisable gridCoordDisableX() const
Get method for x coord parameter to disable.
void setStepY(double stepY)
Set method for y step.
QPixmap pixmap() const
Return the image that is being digitized.
double stepY() const
Get method for y step.
GridCoordDisable gridCoordDisableY() const
Get method for y coord parameter to disable.
void setStartX(double startX)
Set method for x start.
virtual void handleOk()
Process slotOk.
void setCountY(int countY)
Set method for y count.
DlgSettingsGridRemoval(MainWindow &mainWindow)
Single constructor.
Class that modifies QGraphicsView to automatically expand/shrink the view to fit the window...
void setStepX(double stepX)
Set method for x step.
double stopX() const
Get method for x stop.
void setRemoveDefinedGridLines(bool removeDefinedGridLines)
Set method for removing defined grid lines.
double startX() const
Get method for x start.
double stopY() const
Get method for y stop.
void setGridCoordDisableY(GridCoordDisable gridCoordDisable)
Set method for y coord parameter to disable.
Command for DlgSettingsGridRemoval.
void setGridCoordDisableX(GridCoordDisable gridCoordDisable)
Set method for x coord parameter to disable.
void finishPanel(QWidget *subPanel)
Add Ok and Cancel buttons to subpanel to get the whole dialog.
int countX() const
Get method for x count.
int countY() const
Get method for y count.
static int MINIMUM_PREVIEW_HEIGHT
Dialog layout constant that guarantees preview has sufficent room.
double stepX() const
Get method for x step.
void setStable()
Set the stable flag to true. This public version has no argument since it cannot be undone...
void enableOk(bool enable)
Let leaf subclass control the Ok button.
bool removeParallelToAxes() const
Get method for removing lines parallel to axes.
Abstract base class for all Settings dialogs.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
MainWindow & mainWindow()
Get method for MainWindow.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
void setStopX(double stopX)
Set method for x stop.