QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
qgssettingstreewidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgssettingstreewidget.h
3 --------------------------------------
4 Date : April 2023
5 Copyright : (C) 2023 by Denis Rouzaud
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSSETTINGSTREEWIDGET_H
17#define QGSSETTINGSTREEWIDGET_H
18
19#include "qgis_gui.h"
20
22
23
24class QTreeView;
25
27
35class GUI_EXPORT QgsSettingsTreeWidget : public QWidget, public QgsOptionsDialogHighlightWidget
36{
37 Q_OBJECT
38 public:
40 explicit QgsSettingsTreeWidget( QWidget *parent = nullptr );
41
42
44 void applyChanges() const;
45
46 private:
47 QgsSettingsTreeProxyModel *mTreeModel = nullptr;
48 QTreeView *mTreeView = nullptr;
49
50
51 // QgsOptionsDialogHighlightWidget interface
52 protected:
53 bool searchText( const QString &text ) override;
54 bool highlightText( const QString &text ) override;
55 void reset() override;
56};
57
58#endif // QGSSETTINGSTREEWIDGET_H
Container for a widget to be used to search text in the option dialog If the widget type is handled,...
virtual void reset()=0
reset the style of the widgets to its original state
virtual bool searchText(const QString &text)=0
Search for the text in the widget and return true if it was found.
virtual bool highlightText(const QString &text)=0
Highlight the text in the widget.
QgsSettingsTreeProxyModel allows filtering the settings tree.
QgsSettingsTreeWidget is a widget with the settings tree to visualize, search and edit settings.