QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
QgsOptionsDialogBase Class Reference

A base dialog for options and properties dialogs that offers vertical tabs. More...

#include <qgsoptionsdialogbase.h>

Inheritance diagram for QgsOptionsDialogBase:
Inheritance graph
[legend]

Public Member Functions

 QgsOptionsDialogBase (QString settingsKey, QWidget *parent=0, Qt::WindowFlags fl=0, QSettings *settings=0)
 Constructor. More...
 
 ~QgsOptionsDialogBase ()
 
bool iconOnly ()
 determine if the options list is in icon only mode More...
 
void initOptionsBase (bool restoreUi=true, QString title=QString())
 Set up the base ui connections for vertical tabs. More...
 
void restoreOptionsBaseUi (QString title=QString())
 Restore the base ui. More...
 
void setSettings (QSettings *settings)
 

Protected Slots

void optionsStackedWidget_CurrentChanged (int indx)
 
void optionsStackedWidget_WidgetRemoved (int indx)
 
void updateOptionsListVerticalTabs ()
 
void warnAboutMissingObjects ()
 

Protected Member Functions

void paintEvent (QPaintEvent *e)
 
void showEvent (QShowEvent *e)
 
virtual void updateWindowTitle ()
 

Protected Attributes

bool mDelSettings
 
QString mDialogTitle
 
bool mIconOnly
 
bool mInit
 
QDialogButtonBox * mOptButtonBox
 
QListWidget * mOptListWidget
 
QString mOptsKey
 
QSplitter * mOptSplitter
 
QStackedWidget * mOptStackedWidget
 
QPointer< QSettings > mSettings
 

Detailed Description

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 48 of file qgsoptionsdialogbase.h.

Constructor & Destructor Documentation

QgsOptionsDialogBase::QgsOptionsDialogBase ( QString  settingsKey,
QWidget *  parent = 0,
Qt::WindowFlags  fl = 0,
QSettings *  settings = 0 
)

Constructor.

Parameters
settingsKeyQSettings subgroup key for saving/restore ui states, e.g. "ProjectProperties".
parentparent object (owner)
flwidget flags
settingscustom QSettings pointer

Definition at line 30 of file qgsoptionsdialogbase.cpp.

QgsOptionsDialogBase::~QgsOptionsDialogBase ( )

Definition at line 39 of file qgsoptionsdialogbase.cpp.

Member Function Documentation

bool QgsOptionsDialogBase::iconOnly ( )
inline

determine if the options list is in icon only mode

Definition at line 79 of file qgsoptionsdialogbase.h.

void QgsOptionsDialogBase::initOptionsBase ( bool  restoreUi = true,
QString  title = QString() 
)

Set up the base ui connections for vertical tabs.

Parameters
restoreUiWhether to restore the base ui at this time.
titlethe window title

Definition at line 56 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::optionsStackedWidget_CurrentChanged ( int  indx)
protectedslot

Definition at line 265 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::optionsStackedWidget_WidgetRemoved ( int  indx)
protectedslot

Definition at line 274 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::paintEvent ( QPaintEvent *  e)
protected

Definition at line 208 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::restoreOptionsBaseUi ( QString  title = QString())

Restore the base ui.

Sometimes useful to do at end of subclass's constructor.

Parameters
titlethe window title (it does not need to be defined if previously given to initOptionsBase();

Definition at line 144 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::setSettings ( QSettings *  settings)

Definition at line 133 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::showEvent ( QShowEvent *  e)
protected

Definition at line 193 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::updateOptionsListVerticalTabs ( )
protectedslot

Definition at line 229 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::updateWindowTitle ( )
protectedvirtual

Definition at line 216 of file qgsoptionsdialogbase.cpp.

void QgsOptionsDialogBase::warnAboutMissingObjects ( )
protectedslot

Definition at line 280 of file qgsoptionsdialogbase.cpp.

Member Data Documentation

bool QgsOptionsDialogBase::mDelSettings
protected

Definition at line 104 of file qgsoptionsdialogbase.h.

QString QgsOptionsDialogBase::mDialogTitle
protected

Definition at line 99 of file qgsoptionsdialogbase.h.

bool QgsOptionsDialogBase::mIconOnly
protected

Definition at line 100 of file qgsoptionsdialogbase.h.

bool QgsOptionsDialogBase::mInit
protected

Definition at line 94 of file qgsoptionsdialogbase.h.

QDialogButtonBox* QgsOptionsDialogBase::mOptButtonBox
protected

Definition at line 98 of file qgsoptionsdialogbase.h.

QListWidget* QgsOptionsDialogBase::mOptListWidget
protected

Definition at line 95 of file qgsoptionsdialogbase.h.

QString QgsOptionsDialogBase::mOptsKey
protected

Definition at line 93 of file qgsoptionsdialogbase.h.

QSplitter* QgsOptionsDialogBase::mOptSplitter
protected

Definition at line 97 of file qgsoptionsdialogbase.h.

QStackedWidget* QgsOptionsDialogBase::mOptStackedWidget
protected

Definition at line 96 of file qgsoptionsdialogbase.h.

QPointer<QSettings> QgsOptionsDialogBase::mSettings
protected

Definition at line 103 of file qgsoptionsdialogbase.h.


The documentation for this class was generated from the following files: