QGIS API Documentation
2.2.0-Valmiera
|
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::WFlags fl=0) | |
Constructor. | |
~QgsOptionsDialogBase () | |
void | initOptionsBase (bool restoreUi=true, QString title=QString()) |
Set up the base ui connections for vertical tabs. | |
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 |
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
Definition at line 47 of file qgsoptionsdialogbase.h.
QgsOptionsDialogBase::QgsOptionsDialogBase | ( | QString | settingsKey, |
QWidget * | parent = 0 , |
||
Qt::WFlags | fl = 0 |
||
) |
Constructor.
settingsKey | QSettings subgroup key for saving/restore ui states, e.g. "ProjectProperties". |
parent | parent object (owner) |
fl | widget flags |
Definition at line 31 of file qgsoptionsdialogbase.cpp.
QgsOptionsDialogBase::~QgsOptionsDialogBase | ( | ) |
Definition at line 39 of file qgsoptionsdialogbase.cpp.
References mInit, mOptsKey, mOptSplitter, and mOptStackedWidget.
|
inline |
determine if the options list is in icon only mode
Definition at line 74 of file qgsoptionsdialogbase.h.
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 |
Definition at line 50 of file qgsoptionsdialogbase.cpp.
References mDialogTitle, mInit, mOptButtonBox, mOptListWidget, mOptSplitter, mOptStackedWidget, optionsStackedWidget_CurrentChanged(), optionsStackedWidget_WidgetRemoved(), restoreOptionsBaseUi(), size, and updateOptionsListVerticalTabs().
|
protectedslot |
Definition at line 240 of file qgsoptionsdialogbase.cpp.
References mOptListWidget, and updateWindowTitle().
Referenced by initOptionsBase(), and showEvent().
|
protectedslot |
Definition at line 249 of file qgsoptionsdialogbase.cpp.
References mOptListWidget.
Referenced by initOptionsBase().
|
protected |
Definition at line 183 of file qgsoptionsdialogbase.cpp.
References mInit, and updateOptionsListVerticalTabs().
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(); |
Definition at line 118 of file qgsoptionsdialogbase.cpp.
References mDialogTitle, mInit, mOptListWidget, mOptsKey, mOptSplitter, mOptStackedWidget, and updateWindowTitle().
Referenced by initOptionsBase().
|
protected |
Definition at line 168 of file qgsoptionsdialogbase.cpp.
References mInit, mOptListWidget, optionsStackedWidget_CurrentChanged(), updateOptionsListVerticalTabs(), and warnAboutMissingObjects().
|
protectedslot |
Definition at line 204 of file qgsoptionsdialogbase.cpp.
References mIconOnly, mInit, mOptListWidget, and mOptSplitter.
Referenced by initOptionsBase(), paintEvent(), and showEvent().
|
protectedvirtual |
Definition at line 191 of file qgsoptionsdialogbase.cpp.
References mDialogTitle, and mOptListWidget.
Referenced by optionsStackedWidget_CurrentChanged(), and restoreOptionsBaseUi().
|
protectedslot |
|
protected |
Definition at line 94 of file qgsoptionsdialogbase.h.
Referenced by initOptionsBase(), restoreOptionsBaseUi(), and updateWindowTitle().
|
protected |
Definition at line 95 of file qgsoptionsdialogbase.h.
Referenced by updateOptionsListVerticalTabs().
|
protected |
Definition at line 89 of file qgsoptionsdialogbase.h.
Referenced by initOptionsBase(), paintEvent(), restoreOptionsBaseUi(), showEvent(), updateOptionsListVerticalTabs(), and ~QgsOptionsDialogBase().
|
protected |
Definition at line 93 of file qgsoptionsdialogbase.h.
Referenced by initOptionsBase().
|
protected |
Definition at line 90 of file qgsoptionsdialogbase.h.
Referenced by initOptionsBase(), optionsStackedWidget_CurrentChanged(), optionsStackedWidget_WidgetRemoved(), restoreOptionsBaseUi(), showEvent(), updateOptionsListVerticalTabs(), and updateWindowTitle().
|
protected |
Definition at line 88 of file qgsoptionsdialogbase.h.
Referenced by restoreOptionsBaseUi(), and ~QgsOptionsDialogBase().
|
protected |
Definition at line 92 of file qgsoptionsdialogbase.h.
Referenced by initOptionsBase(), restoreOptionsBaseUi(), updateOptionsListVerticalTabs(), and ~QgsOptionsDialogBase().
|
protected |
Definition at line 91 of file qgsoptionsdialogbase.h.
Referenced by initOptionsBase(), restoreOptionsBaseUi(), and ~QgsOptionsDialogBase().