GammaRay API Documentation
2.10.0
|
Interface for UI plugins to manage their states. More...
#include <uistatemanager.h>
Public Slots | |
void | reset () |
virtual void | restoreState () |
virtual void | saveState () |
Public Member Functions | |
UIStateManager (QWidget *widget) | |
UISizeVector | defaultSizes (QSplitter *splitter) const |
UISizeVector | defaultSizes (QHeaderView *header) const |
virtual QList< QHeaderView * > | headers () const |
bool | initialized () const |
void | setDefaultSizes (QSplitter *splitter, const UISizeVector &defaultSizes) |
void | setDefaultSizes (QHeaderView *header, const UISizeVector &defaultSizes) |
virtual void | setup () |
virtual QList< QSplitter * > | splitters () const |
QWidget * | widget () const |
Public Member Functions inherited from QObject | |
QObject (QObject *parent) | |
bool | blockSignals (bool block) |
const QObjectList & | children () const |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const |
bool | disconnect (const QObject *receiver, const char *method) const |
void | dumpObjectInfo () |
void | dumpObjectInfo () const |
void | dumpObjectTree () |
void | dumpObjectTree () const |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name, Qt::FindChildOptions options) const |
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const |
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const |
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const |
bool | inherits (const char *className) const |
void | installEventFilter (QObject *filterObj) |
bool | isWidgetType () const |
bool | isWindowType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
QString | objectName () const |
void | objectNameChanged (const QString &objectName) |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeEventFilter (QObject *obj) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType) |
int | startTimer (int interval, Qt::TimerType timerType) |
QThread * | thread () const |
Additional Inherited Members | |
Static Public Member Functions inherited from QObject | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
bool | disconnect (const QMetaObject::Connection &connection) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Properties inherited from QObject | |
objectName | |
Interface for UI plugins to manage their states.
The manager is able to track if changes appear and only persists them in this case. That mean any not moved splitter handle will not be persisted, and % based sizes will works correctly even on resize. Any QMainwindow is always restored/saved.
There is now the possibility to implements custom restore/save state per targets. Just create those 2 public Q_INVOKABLE in the UIStateManager widget:
Usually, button checked, QTabWidget indexes... Do not store size related things or native Qt save/restore states here, that's the role of UIStateManager itself.