Engauge Digitizer 2
Loading...
Searching...
No Matches
DlgSettingsCurveList.cpp
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#include "CmdMediator.h"
9#include "CurveNameList.h"
11#include "EngaugeAssert.h"
12#include "Logger.h"
13#include "MainWindow.h"
14#include <QCheckBox>
15#include <QDebug>
16#include <QGridLayout>
17#include <QLabel>
18#include <QListView>
19#include <QMessageBox>
20#include <QPushButton>
21#include <QSettings>
22#include <QSpacerItem>
23#include <QTableView>
24#include <QTextStream>
25#include "QtToString.h"
26#include "Settings.h"
27#include "SettingsForGraph.h"
28
29const int MINIMUM_HEIGHT = 500;
30
32 DlgSettingsAbstractBase (tr ("Curve List"),
33 "DlgSettingsCurveList",
34 mainWindow),
35 m_curveNameList (nullptr)
36{
37 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::DlgSettingsCurveList";
38
39 QWidget *subPanel = createSubPanel ();
40 finishPanel (subPanel);
41}
42
44{
45 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::~DlgSettingsCurveList";
46}
47
48void DlgSettingsCurveList::appendCurveName (const QString &curveNameNew,
49 const QString &curveNameOriginal,
50 int numPoints)
51{
52 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::appendCurveName"
53 << " curve=" << curveNameNew.toLatin1().data();
54
55 ENGAUGE_CHECK_PTR (m_curveNameList);
56
57 int row = m_curveNameList->rowCount ();
58 insertCurveName (row,
59 curveNameNew,
60 curveNameOriginal,
61 numPoints);
62}
63
64void DlgSettingsCurveList::createButtons (QGridLayout *layout,
65 int &row)
66{
67 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::createButtons";
68
69 m_btnAdd = new QPushButton (tr ("Add..."));
70 m_btnAdd->setWhatsThis (tr ("Adds a new curve to the curve list. The curve name can be edited in the curve name list.\n\n"
71 "Every curve name must be unique"));
72 m_btnAdd->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
73 connect (m_btnAdd, SIGNAL (released ()), this, SLOT (slotNew()));
74 layout->addWidget (m_btnAdd, row, 1, 1, 1, Qt::AlignLeft);
75
76 m_btnRemove = new QPushButton (tr ("Remove"));
77 m_btnRemove->setWhatsThis (tr ("Removes the currently selected curve from the curve list.\n\n"
78 "There must always be at least one curve"));
79 m_btnRemove->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
80 connect (m_btnRemove, SIGNAL (released ()), this, SLOT (slotRemove()));
81 layout->addWidget (m_btnRemove, row++, 2, 1, 1, Qt::AlignRight);
82}
83
84void DlgSettingsCurveList::createListCurves (QGridLayout *layout,
85 int &row)
86{
87 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::createListCurves";
88
89 QLabel *label = new QLabel (QString ("%1:").arg (tr ("Curve Names")));
90 layout->addWidget (label, row++, 1);
91
92 // There is no Qt::ItemIsEditable flag for QListView, so instead we set that flag for the QListViewItems
93 m_listCurves = new QListView;
94 m_listCurves->setWhatsThis (tr ("List of the curves belonging to this document.\n\n"
95 "Click on a curve name to edit it. Each curve name must be unique.\n\n"
96 "Reorder curves by dragging them around."));
97 m_listCurves->setMinimumHeight (200);
98 m_listCurves->setSelectionBehavior (QAbstractItemView::SelectItems);
99 m_listCurves->setDragDropOverwriteMode (false);
100 m_listCurves->setSelectionMode (QAbstractItemView::SingleSelection);
101 m_listCurves->setDefaultDropAction (Qt::MoveAction);
102 m_listCurves->setDragDropOverwriteMode (false);
103 m_listCurves->setDragEnabled (true);
104 m_listCurves->setDropIndicatorShown (true); // Visible confirmation that each row can be dragged and dropped to move
105 m_listCurves->setDragDropMode (QAbstractItemView::InternalMove);
106 layout->addWidget (m_listCurves, row++, 1, 1, 2);
107
108 m_curveNameList = new CurveNameList;
109 connect (m_curveNameList, SIGNAL (rowsAboutToBeRemoved (const QModelIndex &, int, int)),
110 this, SLOT (slotRowsAboutToBeRemoved (const QModelIndex &, int, int)));
111 connect (m_curveNameList, SIGNAL (dataChanged (const QModelIndex &, const QModelIndex &, const QVector<int> &)),
112 this, SLOT (slotDataChanged (const QModelIndex &, const QModelIndex &, const QVector<int> &)));
113
114 m_listCurves->setModel (m_curveNameList);
115}
116
118{
119 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::createOptionalSaveDefault";
120
121 m_btnSaveDefault = new QPushButton (tr ("Save As Default"));
122 m_btnSaveDefault->setWhatsThis (tr ("Save the curve names for use as defaults for future graph curves."));
123 connect (m_btnSaveDefault, SIGNAL (released ()), this, SLOT (slotSaveDefault ()));
124 layout->addWidget (m_btnSaveDefault, 0, Qt::AlignLeft);
125
126 m_btnResetDefault = new QPushButton (tr ("Reset Default"));
127 m_btnResetDefault->setWhatsThis (tr ("Reset the defaults for future graph curves to the original settings."));
128 connect (m_btnResetDefault, SIGNAL (released ()), this, SLOT (slotResetDefault()));
129 layout->addWidget (m_btnResetDefault, 0, Qt::AlignRight);
130
131 QSpacerItem *spacer = new QSpacerItem (40, 2);
132 layout->addItem (spacer);
133}
134
136{
137 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::createSubPanel";
138
139 const int EMPTY_COLUMN_WIDTH = 30;
140
141 QWidget *subPanel = new QWidget ();
142 QGridLayout *layout = new QGridLayout (subPanel);
143 subPanel->setLayout (layout);
144
145 int row = 1;
146 createListCurves (layout, row);
147 createButtons (layout, row);
148
149 layout->setColumnStretch (0, 0); // Empty first column
150 layout->setColumnMinimumWidth (0, EMPTY_COLUMN_WIDTH);
151 layout->setColumnStretch (1, 1); // New
152 layout->setColumnStretch (2, 1); // Remove
153 layout->setColumnStretch (3, 0); // Empty last column
154 layout->setColumnMinimumWidth (3, EMPTY_COLUMN_WIDTH);
155
156 return subPanel;
157}
158
159bool DlgSettingsCurveList::endsWithNumber (const QString &str) const
160{
161 bool success = false;
162
163 if (!str.isEmpty ()) {
164
165 success = (str.right (1).at (0).digitValue() >= 0);
166 }
167
168 return success;
169}
170
172{
173 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::handleOk";
174
176 cmdMediator ().document(),
177 *m_curveNameList);
178 cmdMediator ().push (cmd);
179
180 hide ();
181}
182
183void DlgSettingsCurveList::insertCurveName (int row,
184 const QString &curveNameNew,
185 const QString &curveNameOriginal,
186 int numPoints)
187{
188 // Track all entries
189 m_curveNameList->insertRow (row,
190 curveNameNew,
191 curveNameOriginal,
192 unsigned (numPoints));
193}
194
196{
197 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::load";
198
200
201 // Perform comprehensive clearing
202 m_listCurves->reset ();
203 m_curveNameList->reset ();
204
205 QStringList curveNames = cmdMediator.curvesGraphsNames ();
206 QStringList::const_iterator itr;
207 for (itr = curveNames.begin (); itr != curveNames.end (); itr++) {
208 QString curveName = *itr;
209 appendCurveName (curveName,
210 curveName,
212 }
213
214 selectCurveName (curveNames.first());
215
216 updateControls (); // Make especially sure Remove is disabled if there is just one curve, or none are selected
217 enableOk (false); // Disable Ok button since there not yet any changes
218}
219
220int DlgSettingsCurveList::newRowFromSelection () const
221{
222 int numSelectedItems = m_listCurves->selectionModel ()->selectedIndexes ().count ();
223 int numItems = m_listCurves->model ()->rowCount ();
224
225 // Determine index where new entry will be inserted
226 int newRow = -1;
227 if ((numSelectedItems == 0) &&
228 (numItems > 0)) {
229
230 // Append after list which has at least one entry
231 newRow = numItems;
232
233 } else if (numSelectedItems == 1) {
234
235 // Insert after the selected index
236 newRow = 1 + m_listCurves->selectionModel ()->selectedIndexes ().at (0).row ();
237
238 }
239
240 return newRow;
241}
242
243QString DlgSettingsCurveList::nextCurveName () const
244{
245 const QString DASH_ONE ("-1"); // Nice value to start a new range at a lower level than the current level
246
247 ENGAUGE_CHECK_PTR (m_listCurves);
248
249 int newRow = newRowFromSelection ();
250 int numItems = m_listCurves->model ()->rowCount ();
251
252 // Curves names of existing before/after curves
253 QString curveNameBefore, curveNameAfter;
254 if (newRow > 0) {
255
256 QModelIndex index = m_curveNameList->index (newRow - 1, 0);
257 curveNameBefore = m_curveNameList->data (index).toString ();
258
259 }
260
261 if ((0 <= newRow) && (newRow < numItems)) {
262
263 QModelIndex index = m_curveNameList->index (newRow, 0);
264 curveNameAfter = m_curveNameList->data (index).toString ();
265
266 }
267
268 // New curve name computed from previous curve name
269 QString curveNameNext;
270 if (curveNameBefore.isEmpty () && !curveNameAfter.isEmpty () && endsWithNumber (curveNameAfter)) {
271
272 // Pick a name before curveNameAfter
273 int numberAfter = numberAtEnd (curveNameAfter);
274 int numberNew = numberAfter - 1;
275 int pos = curveNameAfter.lastIndexOf (QString::number (numberAfter));
276 if (pos >= 0) {
277
278 curveNameNext = QString ("%1%2")
279 .arg (curveNameAfter.left (pos))
280 .arg (numberNew);
281
282 } else {
283
284 curveNameNext = curveNameAfter; // Better than nothing
285
286 }
287
288 } else if (curveNameBefore.isEmpty ()) {
289
290 curveNameNext = DEFAULT_GRAPH_CURVE_NAME; // If necessary, this will be deconflicted below
291
292 } else {
293
294 curveNameNext = curveNameBefore; // This will be deconflicted below
295
296 if (endsWithNumber (curveNameBefore)) {
297
298 // Curve name ends with a number. Pick a name after curveNameBefore, being sure to not match curveNameAfter
299 int numberBefore = numberAtEnd (curveNameBefore);
300 int numberNew = numberBefore + 1;
301 int pos = curveNameBefore.lastIndexOf (QString::number (numberBefore));
302 if (pos >= 0) {
303
304 curveNameNext = QString ("%1%2")
305 .arg (curveNameBefore.left (pos))
306 .arg (numberNew);
307 if (curveNameNext == curveNameAfter) {
308
309 // The difference between before and after is exactly one so we go to a lower level
310 curveNameNext = QString ("%1%2")
311 .arg (curveNameBefore)
312 .arg (DASH_ONE);
313 }
314 }
315 }
316 }
317
318 // Curve name from settings takes precedence
319 SettingsForGraph settingsForGraph;
320 int indexOneBasedNext = numItems + 1;
321 curveNameNext = settingsForGraph.defaultCurveName (indexOneBasedNext,
322 curveNameNext);
323
324 // At this point we have curveNameNext which does not conflict with curveNameBefore or
325 // curveNameAfter, but it may in rare cases conflict with some other curve name. We keep
326 // adding to the name until there is no conflict
327 while (m_curveNameList->containsCurveNameCurrent (curveNameNext)) {
328 curveNameNext += DASH_ONE;
329 }
330
331 return curveNameNext;
332}
333
334int DlgSettingsCurveList::numberAtEnd (const QString &str) const
335{
336 ENGAUGE_ASSERT (endsWithNumber (str));
337
338 // Go backward until the first nondigit
339 int sign = +1;
340 int ch = str.size () - 1;
341 while (str.at (ch).digitValue() >= 0) {
342 --ch;
343
344 if (ch < 0) {
345 break;
346 }
347 }
348 ++ch;
349
350 return sign * str.mid (ch).toInt ();
351}
352
353unsigned int DlgSettingsCurveList::numPointsForSelectedCurves () const
354{
355 QList<unsigned int > rowsSelected;
356
357 // Create a list of curves that are currently selected
358 for (int i = 0; i < m_listCurves->selectionModel()->selectedIndexes ().count (); i++) {
359
360 int row = m_listCurves->selectionModel()->selectedIndexes ().at (i).row ();
361 rowsSelected << unsigned (row);
362 }
363
364 return m_curveNameList->numPointsForSelectedCurves (rowsSelected);
365}
366
367void DlgSettingsCurveList::printStream(QTextStream &str) const
368{
369 str << m_curveNameList->currentCurvesAsString();
370}
371
372void DlgSettingsCurveList::removeSelectedCurves ()
373{
374 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::removeSelectedCurves";
375
376 ENGAUGE_ASSERT (m_listCurves->selectionModel ()->selectedIndexes ().count () > 0); // Also guarantees number of indexes > 0
377
378 // Identify the first index after the last selected index
379 QString firstCurveAfter; // Empty case means there was no index afer the last selected index
380 for (int row = m_listCurves->model()->rowCount() - 1; row >= 0; row--) {
381
382 QModelIndex indexCurrent = m_listCurves->model()->index(row, CURVE_NAME_LIST_COLUMN_CURRENT);
383 if (indexCurrent == m_listCurves->selectionModel()->selectedIndexes().last()) {
384
385 // This is the last selected index, which will be removed below. Exit immediately with firstCurveAfter set
386 break;
387 }
388
389 firstCurveAfter = indexCurrent.data().toString();
390 }
391
392 // Delete the selected indexes from last to first
393 for (int i = m_listCurves->selectionModel ()->selectedIndexes ().count () - 1; i >= 0; i--) {
394
395 int row = m_listCurves->selectionModel ()->selectedIndexes ().at (i).row ();
396
397 m_curveNameList->removeRow (row);
398 }
399
400 if (firstCurveAfter.isEmpty ()) {
401
402 // Select the last remaining curve. These steps seem more complicated than necessary
403 int numItems = m_listCurves->model()->rowCount();
404 QModelIndex indexLast = m_listCurves->model()->index (numItems - 1, CURVE_NAME_LIST_COLUMN_CURRENT);
405 firstCurveAfter = m_listCurves->model()->data (indexLast).toString();
406
407 }
408
409 // Select an item
410 selectCurveName(firstCurveAfter);
411}
412
413void DlgSettingsCurveList::selectCurveName (const QString &curveWanted)
414{
415 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::selectCurveName"
416 << " curve=" << curveWanted.toLatin1().data();
417
418 for (int row = 0; row < m_listCurves->model()->rowCount(); row++) {
419
420 QModelIndex index = m_listCurves->model()->index (row, CURVE_NAME_LIST_COLUMN_CURRENT);
421 QString curveGot = index.data ().toString ();
422
423 if (curveWanted == curveGot) {
424
425 // Found the curve we want to select
426 m_listCurves->setCurrentIndex (index);
427 break;
428
429 }
430 }
431}
432
434{
435 if (!smallDialogs) {
436 setMinimumHeight (MINIMUM_HEIGHT);
437 }
438}
439
440void DlgSettingsCurveList::slotDataChanged (const QModelIndex &topLeft,
441 const QModelIndex &bottomRight,
442 const QVector<int> &roles)
443{
444 // LOG4CPP_INFO_S is below
445
446 // Since list just changed we dump all of it, including the visible and hidden data
447 QString curveEntries;
448 QTextStream str (&curveEntries);
449 printStream (str);
450
451 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::slotDataChanged"
452 << " topLeft=(" << topLeft.row () << "," << topLeft.column () << ")"
453 << " bottomRight=(" << bottomRight.row () << "," << bottomRight.column () << ")"
454 << " roles=" << rolesAsString (roles).toLatin1 ().data ()
455 << " defaultDragOption=" << (m_listCurves->defaultDropAction() == Qt::MoveAction ? "MoveAction" : "CopyAction")
456 << " curveEntries=(" << curveEntries.toLatin1().data() << ")";
457
458 updateControls ();
459}
460
462 int rowFirst,
463 int rowLast)
464{
465 LOG4CPP_DEBUG_S ((*mainCat)) << "DlgSettingsCurveList::slotRowsAboutToBeRemoved"
466 << " parentValid=" << (parent.isValid() ? "yes" : "no")
467 << " rowFirst=" << rowFirst
468 << " rowLast=" << rowLast;
469
470 updateControls ();
471}
472
473void DlgSettingsCurveList::slotNew ()
474{
475 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::slotNew";
476
477 const QString NO_ORIGINAL_CURVE_NAME;
478 const int NO_POINTS = 0;
479
480 QString curveNameSuggestion = nextCurveName ();
481
482 int row = newRowFromSelection();
483
484 insertCurveName (row,
485 curveNameSuggestion,
486 NO_ORIGINAL_CURVE_NAME,
487 NO_POINTS);
488
489 selectCurveName (curveNameSuggestion);
490
491 updateControls();
492}
493
494void DlgSettingsCurveList::slotRemove ()
495{
496 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::slotRemove";
497
498 // Count the number of curve points to be deleted
499 int numPoints = signed (numPointsForSelectedCurves ());
500
501 int rtn = QMessageBox::Ok;
502 if (numPoints > 0) {
503
504 QString msg;
505 if (m_listCurves->selectionModel ()->selectedIndexes ().count () == 1) {
506 msg = QString ("%1 %2 %3")
507 .arg (tr ("Removing this curve will also remove"))
508 .arg (numPoints)
509 .arg (tr ("points. Continue?"));
510 } else {
511 msg = QString ("%1 %2 %3")
512 .arg (tr ("Removing these curves will also remove"))
513 .arg (numPoints)
514 .arg (tr ("points. Continue?"));
515 }
516
517 rtn = QMessageBox::warning (nullptr,
518 tr ("Curves With Points"),
519 msg,
520 QMessageBox::Ok,
521 QMessageBox::Cancel);
522 }
523
524 if (rtn == QMessageBox::Ok) {
525 removeSelectedCurves ();
526 }
527
528 updateControls();
529}
530
531void DlgSettingsCurveList::slotResetDefault()
532{
533 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::slotResetDefault";
534
535 const QString REMOVE_ALL_SETTINGS_IN_GROUP; // Empty string
536
537 QSettings settings (SETTINGS_ENGAUGE, SETTINGS_DIGITIZER);
538
539 int indexOneBased = 1;
540
541 SettingsForGraph settingsForGraph;
542 QString groupName = settingsForGraph.groupNameForNthCurve (indexOneBased);
543 while (settings.childGroups().contains (groupName)) {
544
545 settings.beginGroup (groupName);
546 settings.remove (REMOVE_ALL_SETTINGS_IN_GROUP); // Remove this group by removing its settings
547 settings.endGroup ();
548
549 ++indexOneBased;
550 groupName = settingsForGraph.groupNameForNthCurve (indexOneBased);
551 }
552}
553
554void DlgSettingsCurveList::slotSaveDefault()
555{
556 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::slotSaveDefault";
557
558 QSettings settings (SETTINGS_ENGAUGE, SETTINGS_DIGITIZER);
559
560 for (int row = 0; row < m_curveNameList->rowCount (); row++) {
561
562 QModelIndex idxCurrent = m_curveNameList->index (row, 0);
563
564 QString curveNameCurrent = m_curveNameList->data (idxCurrent).toString ();
565
566 int indexOneBased = row + 1;
567
568 SettingsForGraph settingsForGraph;
569 QString groupName = settingsForGraph.groupNameForNthCurve (indexOneBased);
570
571 settings.beginGroup (groupName);
572 settings.setValue (SETTINGS_CURVE_NAME,
573 curveNameCurrent);
574 settings.endGroup ();
575 }
576}
577
578void DlgSettingsCurveList::updateControls ()
579{
580 LOG4CPP_INFO_S ((*mainCat)) << "DlgSettingsCurveList::updateControls";
581
582 enableOk (true);
583
584 ENGAUGE_CHECK_PTR (m_listCurves);
585
586 int numSelectedItems = m_listCurves->selectionModel ()->selectedIndexes ().count ();
587 int numItems = m_curveNameList->rowCount ();
588
589 // Leave at least one curve
590 m_btnRemove->setEnabled ((numSelectedItems > 0) && (numSelectedItems < numItems));
591}
@ CURVE_NAME_LIST_COLUMN_CURRENT
const QString DEFAULT_GRAPH_CURVE_NAME
const int MINIMUM_HEIGHT
const int MINIMUM_HEIGHT
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
#define ENGAUGE_CHECK_PTR(ptr)
#endif
log4cpp::Category * mainCat
Definition Logger.cpp:14
QString rolesAsString(const QVector< int > &roles)
const QString SETTINGS_ENGAUGE
const QString SETTINGS_DIGITIZER
const QString SETTINGS_CURVE_NAME
Command queue stack.
Definition CmdMediator.h:24
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
Command for DlgSettingsCurveList.
Model for DlgSettingsCurveList and CmdSettingsCurveList.
void reset()
Clear all information.
bool containsCurveNameCurrent(const QString &curveName) const
Return true if specified curve name is already in the list.
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
One row per curve name.
QString currentCurvesAsString() const
For debugging we dump the curve names.
unsigned int numPointsForSelectedCurves(const QList< unsigned int > &rowsSelected) const
Return the number of points associated with the selected curves, as specified by their row numbers.
void insertRow(int row, const QString &curveCurrent, const QString &curveOriginal, unsigned int pointCount)
Create a new entry at the specified row.
Abstract base class for all Settings dialogs.
void setCmdMediator(CmdMediator &cmdMediator)
Store CmdMediator for easy access by the leaf class.
void finishPanel(QWidget *subPanel, int minimumWidth=MINIMUM_DIALOG_WIDTH, int minimumHeightOrZero=0)
Add Ok and Cancel buttons to subpanel to get the whole dialog.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
void enableOk(bool enable)
Let leaf subclass control the Ok button.
MainWindow & mainWindow()
Get method for MainWindow.
DlgSettingsCurveList(MainWindow &mainWindow)
Single constructor.
void slotRowsAboutToBeRemoved(const QModelIndex &parent, int rowFirst, int rowLast)
Cleanup after rows have been removed in the model. We remove the corresponding rows in the QListView.
virtual void handleOk()
Process slotOk.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
void load(CmdMediator &cmdMediator)
Load settings from Document.
virtual void setSmallDialogs(bool smallDialogs)
If false then dialogs have a minimum size so all controls are visible.
virtual void createOptionalSaveDefault(QHBoxLayout *layout)
Let subclass define an optional Save As Default button.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:92
Manage storage and retrieval of the settings for the curves.
QString groupNameForNthCurve(int indexOneBased) const
Return the group name, that appears in the settings file/registry, for the specified curve index.
QString defaultCurveName(int indexOneBased, const QString &defaultName) const
Default graph name for the specified curve index.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18
#define LOG4CPP_DEBUG_S(logger)
Definition convenience.h:20