PythonQtWrapper_QUndoStack.h
58 lines
| 2.1 KiB
| text/x-c
|
CLexer
florianlink
|
r13 | #ifndef PYTHONQTWRAPPER_QUNDOSTACK_H | ||
#define PYTHONQTWRAPPER_QUNDOSTACK_H | ||||
#include <qundostack.h> | ||||
#include <QObject> | ||||
florianlink
|
r24 | #include <PythonQt.h> | ||
florianlink
|
r13 | #include <QVariant> | ||
#include <qaction.h> | ||||
#include <qbytearray.h> | ||||
#include <qcoreevent.h> | ||||
#include <qlist.h> | ||||
#include <qobject.h> | ||||
#include <qundostack.h> | ||||
florianlink
|
r24 | class PythonQtShell_QUndoStack : public QUndoStack | ||
{ | ||||
public: | ||||
PythonQtShell_QUndoStack(QObject* parent = 0):QUndoStack(parent),_wrapper(NULL) {}; | ||||
virtual void childEvent(QChildEvent* arg__1); | ||||
virtual void customEvent(QEvent* arg__1); | ||||
virtual bool event(QEvent* arg__1); | ||||
virtual bool eventFilter(QObject* arg__1, QEvent* arg__2); | ||||
virtual void timerEvent(QTimerEvent* arg__1); | ||||
PythonQtInstanceWrapper* _wrapper; | ||||
}; | ||||
florianlink
|
r13 | class PythonQtWrapper_QUndoStack : public QObject | ||
{ Q_OBJECT | ||||
public: | ||||
public slots: | ||||
QUndoStack* new_QUndoStack(QObject* parent = 0); | ||||
void delete_QUndoStack(QUndoStack* obj) { delete obj; } | ||||
florianlink
|
r73 | const QUndoCommand* command(QUndoStack* theWrappedObject, int index) const; | ||
florianlink
|
r28 | QAction* createUndoAction(QUndoStack* theWrappedObject, QObject* parent, const QString& prefix = QString()) const; | ||
florianlink
|
r24 | bool isActive(QUndoStack* theWrappedObject) const; | ||
bool canRedo(QUndoStack* theWrappedObject) const; | ||||
florianlink
|
r73 | int index(QUndoStack* theWrappedObject) const; | ||
florianlink
|
r28 | void push(QUndoStack* theWrappedObject, QUndoCommand* cmd); | ||
florianlink
|
r24 | int count(QUndoStack* theWrappedObject) const; | ||
florianlink
|
r73 | QString redoText(QUndoStack* theWrappedObject) const; | ||
florianlink
|
r28 | int cleanIndex(QUndoStack* theWrappedObject) const; | ||
void clear(QUndoStack* theWrappedObject); | ||||
florianlink
|
r73 | QAction* createRedoAction(QUndoStack* theWrappedObject, QObject* parent, const QString& prefix = QString()) const; | ||
florianlink
|
r28 | int undoLimit(QUndoStack* theWrappedObject) const; | ||
bool isClean(QUndoStack* theWrappedObject) const; | ||||
void setUndoLimit(QUndoStack* theWrappedObject, int limit); | ||||
florianlink
|
r73 | bool canUndo(QUndoStack* theWrappedObject) const; | ||
void beginMacro(QUndoStack* theWrappedObject, const QString& text); | ||||
void endMacro(QUndoStack* theWrappedObject); | ||||
QString undoText(QUndoStack* theWrappedObject) const; | ||||
QString text(QUndoStack* theWrappedObject, int idx) const; | ||||
florianlink
|
r13 | }; | ||
#endif // PYTHONQTWRAPPER_QUNDOSTACK_H | ||||