Added a undo view and react to change of the cleanness of the undo stack.
This commit is contained in:
11
mainwindow.h
11
mainwindow.h
@ -10,6 +10,8 @@ class TableModel;
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QUndoStack;
|
||||
|
||||
class QUndoView;
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
@ -46,13 +48,17 @@ class MainWindow : public QMainWindow {
|
||||
void openNewItemDialog();
|
||||
void deleteSelectedtItems();
|
||||
|
||||
void onCleanStateChanged(bool clean);
|
||||
void onShowUndoViewToggled(bool checked);
|
||||
|
||||
private:
|
||||
Ui::MainWindow* ui;
|
||||
|
||||
// GenericCore* m_core;
|
||||
unique_ptr<GenericCore> m_core;
|
||||
shared_ptr<TableModel> m_tableModel;
|
||||
shared_ptr<QUndoStack> m_modelUndoStack;
|
||||
QUndoStack* m_modelUndoStack;
|
||||
unique_ptr<QUndoView> m_modelUndoView;
|
||||
|
||||
/// File actions
|
||||
unique_ptr<QAction> m_newFileAct;
|
||||
@ -72,6 +78,8 @@ class MainWindow : public QMainWindow {
|
||||
unique_ptr<QAction> m_openEditItemDialogAct;
|
||||
unique_ptr<QAction> m_deleteItemAct;
|
||||
unique_ptr<QAction> m_findItemAct;
|
||||
/// View actions
|
||||
unique_ptr<QAction> m_showModelUndoViewAct;
|
||||
|
||||
/// Dialogs
|
||||
unique_ptr<NewItemDialog> m_newItemDialog;
|
||||
@ -79,6 +87,7 @@ class MainWindow : public QMainWindow {
|
||||
/// Setup functions
|
||||
void createActions();
|
||||
void createFileActions();
|
||||
void createUndoActions();
|
||||
void createEditActions();
|
||||
void createHelpMenu();
|
||||
void createGuiDialogs();
|
||||
|
||||
Reference in New Issue
Block a user