17 #ifndef QGSOPTIONSDIALOGBASE_H
18 #define QGSOPTIONSDIALOGBASE_H
28 #include <QStyledItemDelegate>
29 #include <QSortFilterProxyModel>
31 class QDialogButtonBox;
37 class QStyleOptionViewItem;
41 class QStandardItemModel;
48 class GUI_EXPORT QgsOptionsProxyModel :
public QSortFilterProxyModel
53 QgsOptionsProxyModel( QObject *parent );
55 void setPageHidden(
int page,
bool hidden );
56 QModelIndex pageNumberToSourceIndex(
int page )
const;
57 int sourceIndexToPageNumber(
const QModelIndex &index )
const;
58 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
61 QMap< int, bool > mHiddenPages;
107 void initOptionsBase(
bool restoreUi =
true,
const QString &title = QString() );
117 void restoreOptionsBaseUi(
const QString &title = QString() );
124 void restoreLastPage();
131 void resizeAlltabs(
int index );
143 void setCurrentPage(
const QString &page );
158 void addPage(
const QString &title,
const QString &tooltip,
const QIcon &icon, QWidget *widget
SIP_TRANSFER,
const QStringList &path = QStringList() );
176 void insertPage(
const QString &title,
const QString &tooltip,
const QIcon &icon, QWidget *widget
SIP_TRANSFER,
const QString &before,
const QStringList &path = QStringList() );
185 void searchText(
const QString &text );
189 virtual void updateOptionsListVerticalTabs();
191 virtual void optionsStackedWidget_CurrentChanged(
int index );
193 virtual void optionsStackedWidget_WidgetRemoved(
int index );
195 void warnAboutMissingObjects();
198 void showEvent( QShowEvent *e )
override;
199 void paintEvent( QPaintEvent *e )
override;
201 virtual void updateWindowTitle();
208 void registerTextSearchWidgets();
215 QStandardItem *createItem(
const QString &name,
const QString &tooltip,
const QString &icon )
SIP_SKIP;
221 QListWidget *mOptListWidget =
nullptr;
222 QTreeView *mOptTreeView =
nullptr;
223 QStandardItemModel *mOptTreeModel =
nullptr;
224 QgsOptionsProxyModel *mTreeProxyModel =
nullptr;
226 QStackedWidget *mOptStackedWidget =
nullptr;
227 QSplitter *mOptSplitter =
nullptr;
228 QDialogButtonBox *mOptButtonBox =
nullptr;
231 bool mIconOnly =
false;
235 bool mDelSettings =
false;
239 void setListToItemAtIndex(
int index );
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
A base dialog for options and properties dialogs that offers vertical tabs.
QPointer< QgsSettings > mSettings
QList< QPair< QgsOptionsDialogHighlightWidget *, int > > mRegisteredSearchWidgets
bool iconOnly()
Determine if the options list is in icon only mode.
This class is a composition of two QSettings instances: