QGIS API Documentation  2.14.0-Essen
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& theTitle )
29 {
30  mTitle = theTitle;
31 }
32 
33 void QgsDetailedItemData::setDetail( const QString& theDetail )
34 {
35  mDetail = theDetail;
36 }
37 
38 void QgsDetailedItemData::setCategory( const QString& theCategory )
39 {
40  mCategory = theCategory;
41 }
42 
43 void QgsDetailedItemData::setIcon( const QPixmap& theIcon )
44 {
45  mPixmap = theIcon;
46 }
47 
48 void QgsDetailedItemData::setCheckable( const bool theFlag )
49 {
50  mCheckableFlag = theFlag;
51 }
52 
53 void QgsDetailedItemData::setChecked( const bool theFlag )
54 {
55  mCheckedFlag = theFlag;
56 }
57 
58 void QgsDetailedItemData::setRenderAsWidget( const bool theFlag )
59 {
60  mRenderAsWidgetFlag = theFlag;
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 
98 void QgsDetailedItemData::setEnabled( bool theFlag )
99 {
100  mEnabledFlag = theFlag;
101 }
102 
104 {
105  return mEnabledFlag;
106 }
void setCategory(const QString &theCategory)
void setIcon(const QPixmap &theIcon)
QString category() const
void setDetail(const QString &theDetail)
void setRenderAsWidget(bool theFlag)
This is a hint to the delegate to render using a widget rather than manually painting every part of t...
bool isRenderedAsWidget() const
void setCheckable(const bool theFlag)
void setTitle(const QString &theTitle)
void setChecked(const bool theFlag)
void setEnabled(bool theFlag)