QGIS API Documentation 3.41.0-Master (cea29feecf2)
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:
35
40 void setTitle( const QString &title );
41
46 void setDetail( const QString &detail );
47
52 void setCategory( const QString &category );
53
58 void setIcon( const QPixmap &icon );
59
64 void setCheckable( bool flag );
65
70 void setChecked( bool flag );
71
76 void setEnabled( bool flag );
77
86 void setRenderAsWidget( bool flag );
87
92 QString title() const;
93
98 QString detail() const;
99
104 QString category() const;
105
110 QPixmap icon() const;
111
116 bool isCheckable() const;
117
122 bool isChecked() const;
123
128 bool isEnabled() const;
129
134 bool isRenderedAsWidget() const;
135
136 private:
137 QString mTitle;
138 QString mDetail;
139 QString mCategory;
140 QString mLibraryName;
141 QPixmap mPixmap;
142 bool mCheckableFlag = false;
143 bool mCheckedFlag = false;
144 bool mEnabledFlag = true;
145 bool mRenderAsWidgetFlag = false;
146};
147
148// Make QVariant aware of this data type (see qtdocs star
149// rating delegate example for more details)
151#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)