This is a QDialog subclass that is aware of the undo-redo sub-system. More...
#include <pqDialog.h>
Signals | |
void | beginUndo (const QString &) |
Fired when dialog begins undo-able changes. More... | |
void | endUndo () |
Fired when dialog is done with undo-able changes. More... | |
Public Member Functions | |
pqDialog (QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags{}) | |
~pqDialog () override | |
void | setUndoLabel (const QString &label) |
Set the label used for undo command. More... | |
void | accept () override |
void | done (int r) override |
Protected Member Functions | |
virtual void | acceptInternal () |
Subclassess should override this instead of accept();. More... | |
virtual void | doneInternal (int) |
Subclassess should override this instead of done(). More... | |
Protected Attributes | |
QString | UndoLabel |
This is a QDialog subclass that is aware of the undo-redo sub-system.
Many dialogs show information about server manager objects. The user can change the information and then when he/she hits "Accept" or "Apply", we change the underlying server manager object(s). For this change to be undoable, it is essential that the undo set generation is commenced before doing any changes to the server manager. This manages the start/end of building the undo stack for us. For any such dialogs, instead of using a QDialog, one should simply use this. One can use the accepted(), finished() signals safely to perform any changes to the server manager. However, is should not override the accept() or done() methods, instead one should override acceptInternal() or doneInternal().
Definition at line 25 of file pqDialog.h.
pqDialog::pqDialog | ( | QWidget * | parent = nullptr , |
Qt::WindowFlags | f = Qt::WindowFlags{} |
||
) |
|
override |
|
inline |
Set the label used for undo command.
Definition at line 37 of file pqDialog.h.
|
signal |
Fired when dialog begins undo-able changes.
Should be connected to undo-redo stack builder.
|
signal |
Fired when dialog is done with undo-able changes.
Should be connected to the undo-redo stack builder.
|
override |
|
override |
|
inlineprotectedvirtual |
Subclassess should override this instead of accept();.
Definition at line 60 of file pqDialog.h.
|
inlineprotectedvirtual |
Subclassess should override this instead of done().
Definition at line 65 of file pqDialog.h.
|
protected |
Definition at line 67 of file pqDialog.h.