QGIS API Documentation  2.99.0-Master (d55fa22)
qgsdetaileditemdata.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdetailedlistdata.cpp - A data represenation for a rich QItemData subclass
3  -------------------
4  begin : Sat May 17 2008
5  copyright : (C) 2008 Tim Sutton
6  email : [email protected]
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 
18 #include "qgsdetaileditemdata.h"
20  : mCheckableFlag( false )
21  , mCheckedFlag( false )
22  , mEnabledFlag( true )
23  , mRenderAsWidgetFlag( false )
24 {
25 
26 }
27 
28 void QgsDetailedItemData::setTitle( const QString &title )
29 {
30  mTitle = title;
31 }
32 
33 void QgsDetailedItemData::setDetail( const QString &detail )
34 {
35  mDetail = detail;
36 }
37 
39 {
40  mCategory = category;
41 }
42 
43 void QgsDetailedItemData::setIcon( const QPixmap &icon )
44 {
45  mPixmap = icon;
46 }
47 
48 void QgsDetailedItemData::setCheckable( const bool flag )
49 {
50  mCheckableFlag = flag;
51 }
52 
53 void QgsDetailedItemData::setChecked( const bool flag )
54 {
55  mCheckedFlag = flag;
56 }
57 
59 {
60  mRenderAsWidgetFlag = flag;
61 }
62 
64 {
65  return mTitle;
66 }
67 
69 {
70  return mDetail;
71 }
72 
74 {
75  return mCategory;
76 }
77 
79 {
80  return mPixmap;
81 }
82 
84 {
85  return mCheckableFlag;
86 }
87 
89 {
90  return mCheckedFlag;
91 }
92 
94 {
95  return mRenderAsWidgetFlag;
96 }
97 
99 {
100  mEnabledFlag = flag;
101 }
102 
104 {
105  return mEnabledFlag;
106 }
void setCheckable(const bool flag)
void setDetail(const QString &detail)
void setChecked(const bool flag)
void setEnabled(bool flag)
void setTitle(const QString &title)
void setIcon(const QPixmap &icon)
void setCategory(const QString &category)
void setRenderAsWidget(bool flag)
This is a hint to the delegate to render using a widget rather than manually painting every part of t...