QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
qgsdetaileditemdata.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdetaileditemdata.h - A data representation for a rich QItemData subclass
3 -------------------
4 begin : Sat May 17 2008
5 copyright : (C) 2008 Tim Sutton
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17#ifndef QGSDETAILEDITEMDATA_H
18#define QGSDETAILEDITEMDATA_H
19
20
21#include <QMetaType>
22#include <QString>
23#include <QPixmap>
24#include "qgis_gui.h"
25
31class GUI_EXPORT QgsDetailedItemData
32{
33 public:
34
36
41 void setTitle( const QString &title );
42
47 void setDetail( const QString &detail );
48
53 void setCategory( const QString &category );
54
59 void setIcon( const QPixmap &icon );
60
65 void setCheckable( bool flag );
66
71 void setChecked( bool flag );
72
77 void setEnabled( bool flag );
78
87 void setRenderAsWidget( bool flag );
88
93 QString title() const;
94
99 QString detail() const;
100
105 QString category() const;
106
111 QPixmap icon() const;
112
117 bool isCheckable() const;
118
123 bool isChecked() const;
124
129 bool isEnabled() const;
130
135 bool isRenderedAsWidget() const;
136
137 private:
138 QString mTitle;
139 QString mDetail;
140 QString mCategory;
141 QString mLibraryName;
142 QPixmap mPixmap;
143 bool mCheckableFlag = false;
144 bool mCheckedFlag = false;
145 bool mEnabledFlag = true;
146 bool mRenderAsWidgetFlag = false;
147};
148
149// Make QVariant aware of this data type (see qtdocs star
150// rating delegate example for more details)
152#endif //QGSDETAILEDITEMDATA_H
This class is the data only representation of a QgsDetailedItemWidget, designed to be used in custom ...
QgsDetailedItemData()=default
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)