QGIS API Documentation  3.14.0-Pi (9f7028fd23)
qgsoptionsdialogbase.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsoptionsdialogbase.cpp - 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 #include "qgsoptionsdialogbase.h"
18 
19 #include <QDialog>
20 #include <QDialogButtonBox>
21 #include <QLayout>
22 #include <QListWidget>
23 #include <QListWidgetItem>
24 #include <QMessageBox>
25 #include <QPainter>
26 #include <QScrollBar>
27 #include <QSplitter>
28 #include <QStackedWidget>
29 #include <QTimer>
30 
31 #include "qgsfilterlineedit.h"
32 #include "qgsmessagebaritem.h"
33 #include "qgslogger.h"
36 #include "qgsguiutils.h"
37 
38 QgsOptionsDialogBase::QgsOptionsDialogBase( const QString &settingsKey, QWidget *parent, Qt::WindowFlags fl, QgsSettings *settings )
39  : QDialog( parent, fl )
40  , mOptsKey( settingsKey )
41  , mInit( false )
42  , mIconOnly( false )
43  , mSettings( settings )
44  , mDelSettings( false )
45 {
46 }
47 
49 {
50  if ( mInit )
51  {
52  mSettings->setValue( QStringLiteral( "/Windows/%1/geometry" ).arg( mOptsKey ), saveGeometry() );
53  mSettings->setValue( QStringLiteral( "/Windows/%1/splitState" ).arg( mOptsKey ), mOptSplitter->saveState() );
54  mSettings->setValue( QStringLiteral( "/Windows/%1/tab" ).arg( mOptsKey ), mOptStackedWidget->currentIndex() );
55  }
56 
57  if ( mDelSettings ) // local settings obj to delete
58  {
59  delete mSettings;
60  }
61 
62  mSettings = nullptr; // null the pointer (in case of outside settings obj)
63 }
64 
65 void QgsOptionsDialogBase::initOptionsBase( bool restoreUi, const QString &title )
66 {
67  // use pointer to app QgsSettings if no custom QgsSettings specified
68  // custom QgsSettings object may be from Python plugin
69  mDelSettings = false;
70 
71  if ( !mSettings )
72  {
73  mSettings = new QgsSettings();
74  mDelSettings = true; // only delete obj created by class
75  }
76 
77  // save dialog title so it can be used to be concatenated
78  // with category title in icon-only mode
79  if ( title.isEmpty() )
80  mDialogTitle = windowTitle();
81  else
82  mDialogTitle = title;
83 
84  // don't add to dialog margins
85  // redefine now, or those in inherited .ui file will be added
86  if ( layout() )
87  {
88  layout()->setContentsMargins( 0, 0, 0, 0 ); // Qt default spacing
89  }
90 
91  // start with copy of qgsoptionsdialog_template.ui to ensure existence of these objects
92  mOptListWidget = findChild<QListWidget *>( QStringLiteral( "mOptionsListWidget" ) );
93  QFrame *optionsFrame = findChild<QFrame *>( QStringLiteral( "mOptionsFrame" ) );
94  mOptStackedWidget = findChild<QStackedWidget *>( QStringLiteral( "mOptionsStackedWidget" ) );
95  mOptSplitter = findChild<QSplitter *>( QStringLiteral( "mOptionsSplitter" ) );
96  mOptButtonBox = findChild<QDialogButtonBox *>( QStringLiteral( "buttonBox" ) );
97  QFrame *buttonBoxFrame = findChild<QFrame *>( QStringLiteral( "mButtonBoxFrame" ) );
98  mSearchLineEdit = findChild<QgsFilterLineEdit *>( QStringLiteral( "mSearchLineEdit" ) );
99 
100  if ( !mOptListWidget || !mOptStackedWidget || !mOptSplitter || !optionsFrame )
101  {
102  return;
103  }
104 
105  int size = QgsGuiUtils::scaleIconSize( mSettings->value( QStringLiteral( "/IconSize" ), 24 ).toInt() );
106  // buffer size to match displayed icon size in toolbars, and expected geometry restore
107  // newWidth (above) may need adjusted if you adjust iconBuffer here
108  const int iconBuffer = QgsGuiUtils::scaleIconSize( 4 );
109  mOptListWidget->setIconSize( QSize( size + iconBuffer, size + iconBuffer ) );
110  mOptListWidget->setFrameStyle( QFrame::NoFrame );
111 
112  const int frameMargin = QgsGuiUtils::scaleIconSize( 3 );
113  optionsFrame->layout()->setContentsMargins( 0, frameMargin, frameMargin, frameMargin );
114  QVBoxLayout *layout = static_cast<QVBoxLayout *>( optionsFrame->layout() );
115 
116  if ( buttonBoxFrame )
117  {
118  buttonBoxFrame->layout()->setContentsMargins( 0, 0, 0, 0 );
119  layout->insertWidget( layout->count() + 1, buttonBoxFrame );
120  }
121  else if ( mOptButtonBox )
122  {
123  layout->insertWidget( layout->count() + 1, mOptButtonBox );
124  }
125 
126  if ( mOptButtonBox )
127  {
128  // enforce only one connection per signal, in case added in Qt Designer
129  disconnect( mOptButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
130  connect( mOptButtonBox, &QDialogButtonBox::accepted, this, &QDialog::accept );
131  disconnect( mOptButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
132  connect( mOptButtonBox, &QDialogButtonBox::rejected, this, &QDialog::reject );
133  }
134  connect( mOptSplitter, &QSplitter::splitterMoved, this, &QgsOptionsDialogBase::updateOptionsListVerticalTabs );
135  connect( mOptStackedWidget, &QStackedWidget::currentChanged, this, &QgsOptionsDialogBase::optionsStackedWidget_CurrentChanged );
136  connect( mOptStackedWidget, &QStackedWidget::widgetRemoved, this, &QgsOptionsDialogBase::optionsStackedWidget_WidgetRemoved );
137 
138  if ( mSearchLineEdit )
139  {
141  connect( mSearchLineEdit, &QgsFilterLineEdit::textChanged, this, &QgsOptionsDialogBase::searchText );
142  }
143 
144  mInit = true;
145 
146  if ( restoreUi )
148 }
149 
151 {
152  if ( mDelSettings ) // local settings obj to delete
153  {
154  delete mSettings;
155  }
156 
157  mSettings = settings;
158  mDelSettings = false; // don't delete outside obj
159 }
160 
161 void QgsOptionsDialogBase::restoreOptionsBaseUi( const QString &title )
162 {
163  if ( !mInit )
164  {
165  return;
166  }
167 
168  if ( !title.isEmpty() )
169  {
170  mDialogTitle = title;
171  }
172  else
173  {
174  // re-save original dialog title in case it was changed after dialog initialization
175  mDialogTitle = windowTitle();
176  }
178 
179  restoreGeometry( mSettings->value( QStringLiteral( "/Windows/%1/geometry" ).arg( mOptsKey ) ).toByteArray() );
180  // mOptListWidget width is fixed to take up less space in QtDesigner
181  // revert it now unless the splitter's state hasn't been saved yet
182  mOptListWidget->setMaximumWidth(
183  mSettings->value( QStringLiteral( "/Windows/%1/splitState" ).arg( mOptsKey ) ).isNull() ? 150 : 16777215 );
184  mOptSplitter->restoreState( mSettings->value( QStringLiteral( "/Windows/%1/splitState" ).arg( mOptsKey ) ).toByteArray() );
185 
186  restoreLastPage();
187 
188  // get rid of annoying outer focus rect on Mac
189  mOptListWidget->setAttribute( Qt::WA_MacShowFocusRect, false );
190 }
191 
193 {
194  int curIndx = mSettings->value( QStringLiteral( "/Windows/%1/tab" ).arg( mOptsKey ), 0 ).toInt();
195 
196  // if the last used tab is out of range or not enabled display the first enabled one
197  if ( mOptStackedWidget->count() < curIndx + 1
198  || !mOptStackedWidget->widget( curIndx )->isEnabled() )
199  {
200  curIndx = 0;
201  for ( int i = 0; i < mOptStackedWidget->count(); i++ )
202  {
203  if ( mOptStackedWidget->widget( i )->isEnabled() )
204  {
205  curIndx = i;
206  break;
207  }
208  }
209  }
210 
211  if ( mOptStackedWidget->count() != 0 && mOptListWidget->count() != 0 )
212  {
213  mOptStackedWidget->setCurrentIndex( curIndx );
214  mOptListWidget->setCurrentRow( curIndx );
215  }
216 }
217 
219 {
220  // Adjust size (GH issue #31449 and #32615)
221  // make the stacked widget size to the current page only
222  for ( int i = 0; i < mOptStackedWidget->count(); ++i )
223  {
224  // Set the size policy
225  QSizePolicy::Policy policy = QSizePolicy::Ignored;
226  if ( i == index )
227  {
228  policy = QSizePolicy::MinimumExpanding;
229  }
230 
231  // update the size policy
232  mOptStackedWidget->widget( i )->setSizePolicy( policy, policy );
233 
234  if ( i == index )
235  {
236  mOptStackedWidget->layout()->update();
237  }
238  }
239  mOptStackedWidget->adjustSize();
240 }
241 
242 void QgsOptionsDialogBase::setCurrentPage( const QString &page )
243 {
244  //find the page with a matching widget name
245  for ( int idx = 0; idx < mOptStackedWidget->count(); ++idx )
246  {
247  QWidget *currentPage = mOptStackedWidget->widget( idx );
248  if ( currentPage->objectName() == page )
249  {
250  //found the page, set it as current
251  mOptStackedWidget->setCurrentIndex( idx );
252  return;
253  }
254  }
255 }
256 
257 void QgsOptionsDialogBase::addPage( const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget )
258 {
259  QListWidgetItem *item = new QListWidgetItem();
260  item->setIcon( icon );
261  item->setText( title );
262  item->setToolTip( tooltip );
263 
264  mOptListWidget->addItem( item );
265  mOptStackedWidget->addWidget( widget );
266 }
267 
268 void QgsOptionsDialogBase::insertPage( const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QString &before )
269 {
270  //find the page with a matching widget name
271  for ( int idx = 0; idx < mOptStackedWidget->count(); ++idx )
272  {
273  QWidget *currentPage = mOptStackedWidget->widget( idx );
274  if ( currentPage->objectName() == before )
275  {
276  //found the "before" page
277 
278  QListWidgetItem *item = new QListWidgetItem();
279  item->setIcon( icon );
280  item->setText( title );
281  item->setToolTip( tooltip );
282 
283  mOptListWidget->insertItem( idx, item );
284  mOptStackedWidget->insertWidget( idx, widget );
285  return;
286  }
287  }
288 
289  // no matching pages, so just add the page
290  addPage( title, tooltip, icon, widget );
291 }
292 
293 void QgsOptionsDialogBase::searchText( const QString &text )
294 {
295  const int minimumTextLength = 3;
296 
297  mSearchLineEdit->setMinimumWidth( text.isEmpty() ? 0 : 70 );
298 
299  if ( !mOptStackedWidget )
300  return;
301 
302  if ( mOptStackedWidget->isHidden() )
303  mOptStackedWidget->show();
304  if ( mOptButtonBox && mOptButtonBox->isHidden() )
305  mOptButtonBox->show();
306  // hide all page if text has to be search, show them all otherwise
307  for ( int r = 0; r < mOptListWidget->count(); ++r )
308  {
309  mOptListWidget->setRowHidden( r, text.length() >= minimumTextLength );
310  }
311 
312  for ( const QPair< QgsOptionsDialogHighlightWidget *, int > &rsw : qgis::as_const( mRegisteredSearchWidgets ) )
313  {
314  if ( rsw.first->searchHighlight( text.length() >= minimumTextLength ? text : QString() ) )
315  {
316  mOptListWidget->setRowHidden( rsw.second, false );
317  }
318  }
319 
320  if ( mOptListWidget->isRowHidden( mOptStackedWidget->currentIndex() ) )
321  {
322  for ( int r = 0; r < mOptListWidget->count(); ++r )
323  {
324  if ( !mOptListWidget->isRowHidden( r ) )
325  {
326  mOptListWidget->setCurrentRow( r );
327  return;
328  }
329  }
330 
331  // if no page can be shown, hide stack widget
332  mOptStackedWidget->hide();
333  if ( mOptButtonBox )
334  mOptButtonBox->hide();
335  }
336 }
337 
339 {
340  mRegisteredSearchWidgets.clear();
341 
342  for ( int i = 0; i < mOptStackedWidget->count(); i++ )
343  {
344  const auto constWidget = mOptStackedWidget->widget( i )->findChildren<QWidget *>();
345  for ( QWidget *w : constWidget )
346  {
347 
348  // get custom highlight widget in user added pages
349  QHash<QWidget *, QgsOptionsDialogHighlightWidget *> customHighlightWidgets;
350  QgsOptionsPageWidget *opw = qobject_cast<QgsOptionsPageWidget *>( mOptStackedWidget->widget( i ) );
351  if ( opw )
352  {
353  customHighlightWidgets = opw->registeredHighlightWidgets();
354  }
355  QgsOptionsDialogHighlightWidget *shw = nullptr;
356  // take custom if exists
357  if ( customHighlightWidgets.contains( w ) )
358  {
359  shw = customHighlightWidgets.value( w );
360  }
361  // try to construct one otherwise
362  if ( !shw || !shw->isValid() )
363  {
365  }
366  if ( shw && shw->isValid() )
367  {
368  QgsDebugMsgLevel( QStringLiteral( "Registering: %1" ).arg( w->objectName() ), 4 );
369  mRegisteredSearchWidgets.append( qMakePair( shw, i ) );
370  }
371  else
372  {
373  delete shw;
374  }
375  }
376  }
377 }
378 
379 void QgsOptionsDialogBase::showEvent( QShowEvent *e )
380 {
381  if ( mInit )
382  {
385  }
386  else
387  {
388  QTimer::singleShot( 0, this, SLOT( warnAboutMissingObjects() ) );
389  }
390 
391  if ( mSearchLineEdit )
392  {
394  }
395 
396  QDialog::showEvent( e );
397 }
398 
399 void QgsOptionsDialogBase::paintEvent( QPaintEvent *e )
400 {
401  if ( mInit )
402  QTimer::singleShot( 0, this, SLOT( updateOptionsListVerticalTabs() ) );
403 
404  QDialog::paintEvent( e );
405 }
406 
408 {
409  QListWidgetItem *curitem = mOptListWidget->currentItem();
410  if ( curitem )
411  {
412  setWindowTitle( QStringLiteral( "%1 %2 %3" )
413  .arg( mDialogTitle )
414  .arg( QChar( 0x2014 ) ) // em-dash unicode
415  .arg( curitem->text() ) );
416  }
417  else
418  {
419  setWindowTitle( mDialogTitle );
420  }
421 }
422 
424 {
425  if ( !mInit )
426  return;
427 
428  if ( mOptListWidget->maximumWidth() != 16777215 )
429  mOptListWidget->setMaximumWidth( 16777215 );
430  // auto-resize splitter for vert scrollbar without covering icons in icon-only mode
431  // TODO: mOptListWidget has fixed 32px wide icons for now, allow user-defined
432  // Note: called on splitter resize and dialog paint event, so only update when necessary
433  int iconWidth = mOptListWidget->iconSize().width();
434  int snapToIconWidth = iconWidth + 32;
435 
436  QList<int> splitSizes = mOptSplitter->sizes();
437  mIconOnly = ( splitSizes.at( 0 ) <= snapToIconWidth );
438 
439  // iconBuffer (above) may need adjusted if you adjust iconWidth here
440  int newWidth = mOptListWidget->verticalScrollBar()->isVisible() ? iconWidth + 22 : iconWidth + 9;
441  bool diffWidth = mOptListWidget->minimumWidth() != newWidth;
442 
443  if ( diffWidth )
444  mOptListWidget->setMinimumWidth( newWidth );
445 
446  if ( mIconOnly && ( diffWidth || mOptListWidget->width() != newWidth ) )
447  {
448  splitSizes[1] = splitSizes.at( 1 ) - ( splitSizes.at( 0 ) - newWidth );
449  splitSizes[0] = newWidth;
450  mOptSplitter->setSizes( splitSizes );
451  }
452 
453  if ( mOptListWidget->wordWrap() && mIconOnly )
454  mOptListWidget->setWordWrap( false );
455  if ( !mOptListWidget->wordWrap() && !mIconOnly )
456  mOptListWidget->setWordWrap( true );
457 }
458 
460 {
461  mOptListWidget->blockSignals( true );
462  mOptListWidget->setCurrentRow( index );
463  mOptListWidget->blockSignals( false );
464 
466 }
467 
469 {
470  // will need to take item first, if widgets are set for item in future
471  delete mOptListWidget->item( index );
472 
473  QList<QPair< QgsOptionsDialogHighlightWidget *, int > >::iterator it = mRegisteredSearchWidgets.begin();
474  while ( it != mRegisteredSearchWidgets.end() )
475  {
476  if ( ( *it ).second == index )
477  it = mRegisteredSearchWidgets.erase( it );
478  else
479  ++it;
480  }
481 }
482 
484 {
485  QMessageBox::warning( nullptr, tr( "Missing Objects" ),
486  tr( "Base options dialog could not be initialized.\n\n"
487  "Missing some of the .ui template objects:\n" )
488  + " mOptionsListWidget,\n mOptionsStackedWidget,\n mOptionsSplitter,\n mOptionsListFrame",
489  QMessageBox::Ok,
490  QMessageBox::Ok );
491 }
492 
qgsmessagebaritem.h
QgsDebugMsgLevel
#define QgsDebugMsgLevel(str, level)
Definition: qgslogger.h:39
QgsOptionsDialogHighlightWidget
Definition: qgsoptionsdialoghighlightwidget.h:35
QgsOptionsDialogBase::paintEvent
void paintEvent(QPaintEvent *e) override
Definition: qgsoptionsdialogbase.cpp:399
qgsfilterlineedit.h
QgsOptionsDialogHighlightWidget::createWidget
static QgsOptionsDialogHighlightWidget * createWidget(QWidget *widget)
create a highlight widget implementation for the proper widget type.
Definition: qgsoptionsdialoghighlightwidget.cpp:38
QgsOptionsDialogBase::registerTextSearchWidgets
void registerTextSearchWidgets()
register widgets in the dialog to search for text in it it is automatically called if a line edit has...
Definition: qgsoptionsdialogbase.cpp:338
QgsSettings
Definition: qgssettings.h:61
QgsGuiUtils::saveGeometry
void saveGeometry(QWidget *widget, const QString &keyName)
Save the wigget geometry into settings.
Definition: qgsguiutils.cpp:224
QgsGuiUtils::restoreGeometry
bool restoreGeometry(QWidget *widget, const QString &keyName)
Restore the wigget geometry from settings.
Definition: qgsguiutils.cpp:231
QgsOptionsDialogBase::setCurrentPage
void setCurrentPage(const QString &page)
Sets the dialog page (by object name) to show.
Definition: qgsoptionsdialogbase.cpp:242
QgsOptionsDialogBase::setSettings
void setSettings(QgsSettings *settings)
Definition: qgsoptionsdialogbase.cpp:150
QgsOptionsDialogBase::updateWindowTitle
virtual void updateWindowTitle()
Definition: qgsoptionsdialogbase.cpp:407
QgsOptionsPageWidget::registeredHighlightWidgets
QHash< QWidget *, QgsOptionsDialogHighlightWidget * > registeredHighlightWidgets()
Returns the registered highlight widgets used to search and highlight text in options dialogs.
Definition: qgsoptionswidgetfactory.h:60
qgsoptionsdialogbase.h
QgsOptionsDialogBase::mDelSettings
bool mDelSettings
Definition: qgsoptionsdialogbase.h:194
QgsOptionsDialogBase::QgsOptionsDialogBase
QgsOptionsDialogBase(const QString &settingsKey, QWidget *parent=nullptr, Qt::WindowFlags fl=nullptr, QgsSettings *settings=nullptr)
Constructor.
Definition: qgsoptionsdialogbase.cpp:38
QgsFilterLineEdit::setShowSearchIcon
void setShowSearchIcon(bool visible)
Define if a search icon shall be shown on the left of the image when no text is entered.
Definition: qgsfilterlineedit.cpp:49
QgsOptionsDialogBase::mSearchLineEdit
QgsFilterLineEdit * mSearchLineEdit
Definition: qgsoptionsdialogbase.h:188
QgsOptionsDialogBase::mIconOnly
bool mIconOnly
Definition: qgsoptionsdialogbase.h:190
QgsOptionsDialogBase::mSettings
QPointer< QgsSettings > mSettings
Definition: qgsoptionsdialogbase.h:193
QgsOptionsDialogBase::warnAboutMissingObjects
void warnAboutMissingObjects()
Definition: qgsoptionsdialogbase.cpp:483
QgsOptionsDialogBase::restoreLastPage
void restoreLastPage()
Refocus the active tab from the last time the dialog was shown.
Definition: qgsoptionsdialogbase.cpp:192
QgsOptionsDialogBase::initOptionsBase
void initOptionsBase(bool restoreUi=true, const QString &title=QString())
Set up the base ui connections for vertical tabs.
Definition: qgsoptionsdialogbase.cpp:65
qgsoptionswidgetfactory.h
qgsoptionsdialoghighlightwidget.h
QgsOptionsDialogBase::mDialogTitle
QString mDialogTitle
Definition: qgsoptionsdialogbase.h:189
QgsOptionsDialogBase::resizeAlltabs
void resizeAlltabs(int index)
Resizes all tabs when the dialog is resized.
Definition: qgsoptionsdialogbase.cpp:218
QgsOptionsDialogBase::mOptListWidget
QListWidget * mOptListWidget
Definition: qgsoptionsdialogbase.h:184
QgsOptionsDialogBase::optionsStackedWidget_CurrentChanged
virtual void optionsStackedWidget_CurrentChanged(int index)
Select relevant tab on current page change.
Definition: qgsoptionsdialogbase.cpp:459
QgsOptionsDialogBase::mOptsKey
QString mOptsKey
Definition: qgsoptionsdialogbase.h:182
QgsOptionsDialogBase::insertPage
void insertPage(const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget, const QString &before)
Inserts a new page into the dialog pages.
Definition: qgsoptionsdialogbase.cpp:268
QgsOptionsDialogBase::showEvent
void showEvent(QShowEvent *e) override
Definition: qgsoptionsdialogbase.cpp:379
QgsOptionsDialogBase::mOptSplitter
QSplitter * mOptSplitter
Definition: qgsoptionsdialogbase.h:186
QgsOptionsDialogBase::optionsStackedWidget_WidgetRemoved
virtual void optionsStackedWidget_WidgetRemoved(int index)
Remove tab and unregister widgets on page remove.
Definition: qgsoptionsdialogbase.cpp:468
QgsOptionsDialogBase::mInit
bool mInit
Definition: qgsoptionsdialogbase.h:183
QgsOptionsDialogBase::mOptStackedWidget
QStackedWidget * mOptStackedWidget
Definition: qgsoptionsdialogbase.h:185
QgsOptionsDialogBase::mOptButtonBox
QDialogButtonBox * mOptButtonBox
Definition: qgsoptionsdialogbase.h:187
QgsOptionsDialogBase::mRegisteredSearchWidgets
QList< QPair< QgsOptionsDialogHighlightWidget *, int > > mRegisteredSearchWidgets
Definition: qgsoptionsdialogbase.h:180
qgslogger.h
QgsOptionsDialogHighlightWidget::isValid
bool isValid()
Returns if it valid: if the widget type is handled and if the widget is not still available.
Definition: qgsoptionsdialoghighlightwidget.h:52
QgsOptionsDialogBase::~QgsOptionsDialogBase
~QgsOptionsDialogBase() override
Definition: qgsoptionsdialogbase.cpp:48
qgsguiutils.h
QgsGuiUtils::scaleIconSize
int scaleIconSize(int standardSize)
Scales an icon size to compensate for display pixel density, making the icon size hi-dpi friendly,...
Definition: qgsguiutils.cpp:257
QgsOptionsDialogBase::addPage
void addPage(const QString &title, const QString &tooltip, const QIcon &icon, QWidget *widget)
Adds a new page to the dialog pages.
Definition: qgsoptionsdialogbase.cpp:257
QgsOptionsPageWidget
Definition: qgsoptionswidgetfactory.h:30
QgsOptionsDialogBase::restoreOptionsBaseUi
void restoreOptionsBaseUi(const QString &title=QString())
Restore the base ui.
Definition: qgsoptionsdialogbase.cpp:161
QgsOptionsDialogBase::searchText
void searchText(const QString &text)
searchText searches for a text in all the pages of the stacked widget and highlight the results
Definition: qgsoptionsdialogbase.cpp:293
QgsOptionsDialogBase::updateOptionsListVerticalTabs
virtual void updateOptionsListVerticalTabs()
Update tabs on the splitter move.
Definition: qgsoptionsdialogbase.cpp:423