QGIS API Documentation 3.99.0-Master (752b475928d)
Loading...
Searching...
No Matches
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"
21
22class QTreeView;
23
25
33class GUI_EXPORT QgsSettingsTreeWidget : public QWidget, public QgsOptionsDialogHighlightWidget
34{
35 Q_OBJECT
36 public:
38 explicit QgsSettingsTreeWidget( QWidget *parent = nullptr );
39
40
42 void applyChanges() const;
43
44 private:
45 QgsSettingsTreeProxyModel *mTreeModel = nullptr;
46 QTreeView *mTreeView = nullptr;
47
48
49 // QgsOptionsDialogHighlightWidget interface
50 protected:
51 bool searchText( const QString &text ) override;
52 bool highlightText( const QString &text ) override;
53 void reset() override;
54};
55
56#endif // QGSSETTINGSTREEWIDGET_H
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.
QgsOptionsDialogHighlightWidget(QWidget *widget=nullptr)
Constructor.
A proxy model which allows filtering the settings tree.
void applyChanges() const
Apply changes to settings value.
QgsSettingsTreeWidget(QWidget *parent=nullptr)
Constructor.