QGIS API Documentation
2.6.0-Brighton
|
A base dialog for options and properties dialogs that offers vertical tabs. More...
#include <qgsoptionsdialogbase.h>
Public Member Functions | |
QgsOptionsDialogBase (QString settingsKey, QWidget *parent=0, Qt::WindowFlags fl=0, QSettings *settings=0) | |
Constructor. | |
~QgsOptionsDialogBase () | |
void | initOptionsBase (bool restoreUi=true, QString title=QString()) |
Set up the base ui connections for vertical tabs. | |
void | setSettings (QSettings *settings) |
void | restoreOptionsBaseUi (QString title=QString()) |
Restore the base ui. | |
bool | iconOnly () |
determine if the options list is in icon only mode |
Protected Slots | |
void | updateOptionsListVerticalTabs () |
void | optionsStackedWidget_CurrentChanged (int indx) |
void | optionsStackedWidget_WidgetRemoved (int indx) |
void | warnAboutMissingObjects () |
Protected Member Functions | |
void | showEvent (QShowEvent *e) |
void | paintEvent (QPaintEvent *e) |
virtual void | updateWindowTitle () |
Protected Attributes | |
QString | mOptsKey |
bool | mInit |
QListWidget * | mOptListWidget |
QStackedWidget * | mOptStackedWidget |
QSplitter * | mOptSplitter |
QDialogButtonBox * | mOptButtonBox |
QString | mDialogTitle |
bool | mIconOnly |
QPointer< QSettings > | mSettings |
bool | mDelSettings |
A base dialog for options and properties dialogs that offers vertical tabs.
It handles saving/restoring of geometry, splitter and current tab states, switching vertical tabs between icon/text to icon-only modes (splitter collapsed to left), and connecting QDialogButtonBox's accepted/rejected signals to dialog's accept/reject slots
To use: 1) Start with copy of qgsoptionsdialog_template.ui and build options/properties dialog. 2) In source file for dialog, inherit this class instead of QDialog, then in constructor: ... setupUi( this ); // set up .ui file objects initOptionsBase( false ); // set up this class to use .ui objects, optionally restoring base ui ... restoreOptionsBaseUi(); // restore the base ui with initOptionsBase or use this later on
QgsOptionsDialogBase::QgsOptionsDialogBase | ( | QString | settingsKey, |
QWidget * | parent = 0 , |
||
Qt::WindowFlags | fl = 0 , |
||
QSettings * | settings = 0 |
||
) |
Constructor.
settingsKey | QSettings subgroup key for saving/restore ui states, e.g. "ProjectProperties". |
parent | parent object (owner) |
fl | widget flags |
settings | custom QSettings pointer |
QgsOptionsDialogBase::~QgsOptionsDialogBase | ( | ) |
|
inline |
determine if the options list is in icon only mode
void QgsOptionsDialogBase::initOptionsBase | ( | bool | restoreUi = true , |
QString | title = QString() |
||
) |
Set up the base ui connections for vertical tabs.
restoreUi | Whether to restore the base ui at this time. |
title | the window title |
|
protectedslot |
|
protectedslot |
|
protected |
void QgsOptionsDialogBase::restoreOptionsBaseUi | ( | QString | title = QString() | ) |
Restore the base ui.
Sometimes useful to do at end of subclass's constructor.
title | the window title (it does not need to be defined if previously given to initOptionsBase(); |
void QgsOptionsDialogBase::setSettings | ( | QSettings * | settings | ) |
|
protected |
|
protectedslot |
|
protectedvirtual |
|
protectedslot |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |