GammaRay API Documentation  3.2.0
Public Slots | Public Member Functions | List of all members
GammaRay::UIStateManager Class Reference

Interface for UI plugins to manage their states. More...

#include <uistatemanager.h>

Inheritance diagram for GammaRay::UIStateManager:

Public Slots

void reset ()
 
virtual void restoreState ()
 
virtual void saveState ()
 

Public Member Functions

 UIStateManager (QWidget *widget)
 
UISizeVector defaultSizes (QHeaderView *header) const
 
UISizeVector defaultSizes (QSplitter *splitter) const
 
virtual QList< QHeaderView * > headers () const
 
bool initialized () const
 
void setDefaultSizes (QHeaderView *header, const UISizeVector &defaultSizes)
 
void setDefaultSizes (QSplitter *splitter, const UISizeVector &defaultSizes)
 
virtual void setup ()
 
virtual QList< QSplitter * > splitters () const
 
QWidget * widget () const
 

Detailed Description

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.


© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
GammaRay Qt-application inspection and manipulation tool
https://www.kdab.com/development-resources/qt-tools/gammaray/
Generated by doxygen 1.9.1