QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
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
6
email : tim@linfiniti.com
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 "qgis_gui.h"
22
23
#include <QMetaType>
24
#include <QPixmap>
25
#include <QString>
26
32
class
GUI_EXPORT
QgsDetailedItemData
33
{
34
public
:
35
QgsDetailedItemData
() =
default
;
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)
151
Q_DECLARE_METATYPE
(
QgsDetailedItemData
)
152
#endif
//QGSDETAILEDITEMDATA_H
QgsDetailedItemData
The data only representation of a QgsDetailedItemWidget, designed to be used in custom views.
Definition
qgsdetaileditemdata.h:33
QgsDetailedItemData::QgsDetailedItemData
QgsDetailedItemData()=default
QgsDetailedItemData::category
QString category() const
Returns the item's category.
Definition
qgsdetaileditemdata.cpp:65
QgsDetailedItemData::setCheckable
void setCheckable(bool flag)
Sets whether the item is checkable.
Definition
qgsdetaileditemdata.cpp:40
QgsDetailedItemData::setDetail
void setDetail(const QString &detail)
Sets the detailed description for the item.
Definition
qgsdetaileditemdata.cpp:25
QgsDetailedItemData::setEnabled
void setEnabled(bool flag)
Sets whether the item is enabled.
Definition
qgsdetaileditemdata.cpp:90
QgsDetailedItemData::setTitle
void setTitle(const QString &title)
Sets the title for the item.
Definition
qgsdetaileditemdata.cpp:20
QgsDetailedItemData::setChecked
void setChecked(bool flag)
Sets whether the item is checked.
Definition
qgsdetaileditemdata.cpp:45
QgsDetailedItemData::isCheckable
bool isCheckable() const
Returns true if the item is checkable.
Definition
qgsdetaileditemdata.cpp:75
QgsDetailedItemData::isEnabled
bool isEnabled() const
Returns true if the item is enabled.
Definition
qgsdetaileditemdata.cpp:95
QgsDetailedItemData::title
QString title() const
Returns the item's title.
Definition
qgsdetaileditemdata.cpp:55
QgsDetailedItemData::isRenderedAsWidget
bool isRenderedAsWidget() const
Returns true if the item will be rendered using a widget.
Definition
qgsdetaileditemdata.cpp:85
QgsDetailedItemData::icon
QPixmap icon() const
Returns the item's icon.
Definition
qgsdetaileditemdata.cpp:70
QgsDetailedItemData::detail
QString detail() const
Returns the detailed description for the item.
Definition
qgsdetaileditemdata.cpp:60
QgsDetailedItemData::setIcon
void setIcon(const QPixmap &icon)
Sets the item's icon.
Definition
qgsdetaileditemdata.cpp:35
QgsDetailedItemData::setCategory
void setCategory(const QString &category)
Sets the item's category.
Definition
qgsdetaileditemdata.cpp:30
QgsDetailedItemData::setRenderAsWidget
void setRenderAsWidget(bool flag)
This is a hint to the delegate to render using a widget rather than manually painting every part of t...
Definition
qgsdetaileditemdata.cpp:50
QgsDetailedItemData::isChecked
bool isChecked() const
Returns true if the item is checked.
Definition
qgsdetaileditemdata.cpp:80
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(QgsDatabaseQueryLogEntry)
Generated on
for QGIS API Documentation by
1.17.0