7 #ifndef DLG_SETTINGS_CURVE_ADD_REMOVE_H 8 #define DLG_SETTINGS_CURVE_ADD_REMOVE_H 10 #include "DlgSettingsAbstractBase.h" 11 #include <QItemSelection> 12 #include <QModelIndex> 19 class QStandardItemModel;
43 void slotDataChanged (
const QModelIndex &topLeft,
44 const QModelIndex &bottomRight,
45 const QVector<int> &roles);
48 void slotResetDefault();
49 void slotSaveDefault();
56 void appendCurveName (
const QString &curveNameNew,
57 const QString &curveNameOriginal,
59 void createButtons (QGridLayout *layout,
int &row);
60 void createListCurves (QGridLayout *layout,
int &row);
61 bool endsWithNumber (
const QString &str)
const;
62 void insertCurveName (
int row,
63 const QString &curveNameNew,
64 const QString &curveNameOriginal,
66 int newRowFromSelection ()
const;
67 QString nextCurveName ()
const;
68 int numberAtEnd (
const QString &str)
const;
69 unsigned int numPointsForSelectedCurves ()
const;
70 void printStream (QTextStream &str)
const;
71 void removeSelectedCurves();
72 void selectCurveName (
const QString &curveWanted);
73 void updateControls ();
77 QListView *m_listCurves;
79 QPushButton *m_btnAdd;
80 QPushButton *m_btnRemove;
81 QPushButton *m_btnRename;
83 QPushButton *m_btnResetDefault;
84 QPushButton *m_btnSaveDefault;
88 #endif // DLG_SETTINGS_CURVE_ADD_REMOVE_H 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 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.
virtual QWidget * createSubPanel()
Create dialog-specific panel to which base class will add Ok and Cancel buttons.
Dialog for editing curve names settings.
void load(CmdMediator &cmdMediator)
Load settings from Document.
Abstract base class for all Settings dialogs.
Model for DlgSettingsCurveAddRemove and CmdSettingsCurveAddRemove.
MainWindow & mainWindow()
Get method for MainWindow.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
DlgSettingsCurveAddRemove(MainWindow &mainWindow)
Single constructor.
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
virtual void handleOk()
Process slotOk.