QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsoptionsdialogbase.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsoptionsdialogbase.h - base vertical tabs option dialog
3 
4  ---------------------
5  begin : March 24, 2013
6  copyright : (C) 2013 by Larry Shaffer
7  email : larrys at dakcarto dot com
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef QGSOPTIONSDIALOGBASE_H
18 #define QGSOPTIONSDIALOGBASE_H
19 
20 #include "qgisgui.h"
21 
22 #include <QDialog>
23 
24 class QDialogButtonBox;
25 class QListWidget;
26 class QStackedWidget;
27 class QSplitter;
28 
47 class GUI_EXPORT QgsOptionsDialogBase : public QDialog
48 {
49  Q_OBJECT
50 
51  public:
57  QgsOptionsDialogBase( QString settingsKey, QWidget* parent = 0, Qt::WFlags fl = 0 );
59 
64  void initOptionsBase( bool restoreUi = true, QString title = QString() );
65 
70  void restoreOptionsBaseUi( QString title = QString() );
71 
74  bool iconOnly() {return mIconOnly;}
75 
76  protected slots:
77  void updateOptionsListVerticalTabs();
78  void optionsStackedWidget_CurrentChanged( int indx );
79  void optionsStackedWidget_WidgetRemoved( int indx );
80  void warnAboutMissingObjects();
81 
82  protected:
83  void showEvent( QShowEvent* e );
84  void paintEvent( QPaintEvent* e );
85 
86  virtual void updateWindowTitle();
87 
88  QString mOptsKey;
89  bool mInit;
90  QListWidget* mOptListWidget;
91  QStackedWidget* mOptStackedWidget;
92  QSplitter* mOptSplitter;
93  QDialogButtonBox* mOptButtonBox;
94  QString mDialogTitle;
95  bool mIconOnly;
96 };
97 
98 #endif // QGSOPTIONSDIALOGBASE_H