QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsdetaileditemwidget.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgsdetailedlistwidget.cpp - A rich QItemWidget 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
18
#include "
qgsdetaileditemwidget.h
"
19
20
#include "moc_qgsdetaileditemwidget.cpp"
21
22
QgsDetailedItemWidget::QgsDetailedItemWidget
( QWidget *parent )
23
: QWidget( parent )
24
25
{
26
setupUi(
this
);
27
}
28
29
void
QgsDetailedItemWidget::setData
(
const
QgsDetailedItemData
&data )
30
{
31
lblTitle->setText( data.
title
() );
32
lblDetail->setText( data.
detail
() );
33
lblCategory->setText( data.
category
() );
34
cbx->setVisible( data.
isCheckable
() );
35
cbx->setChecked( data.
isChecked
() );
36
lblIcon->setPixmap( data.
icon
() );
37
}
38
39
void
QgsDetailedItemWidget::setChecked
(
bool
flag )
40
{
41
cbx->setChecked( flag );
42
}
QgsDetailedItemData
The data only representation of a QgsDetailedItemWidget, designed to be used in custom views.
Definition
qgsdetaileditemdata.h:33
QgsDetailedItemData::category
QString category() const
Returns the item's category.
Definition
qgsdetaileditemdata.cpp:65
QgsDetailedItemData::isCheckable
bool isCheckable() const
Returns true if the item is checkable.
Definition
qgsdetaileditemdata.cpp:75
QgsDetailedItemData::title
QString title() const
Returns the item's title.
Definition
qgsdetaileditemdata.cpp:55
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::isChecked
bool isChecked() const
Returns true if the item is checked.
Definition
qgsdetaileditemdata.cpp:80
QgsDetailedItemWidget::QgsDetailedItemWidget
QgsDetailedItemWidget(QWidget *parent=nullptr)
Constructor for QgsDetailedItemWidget.
Definition
qgsdetaileditemwidget.cpp:22
QgsDetailedItemWidget::setData
void setData(const QgsDetailedItemData &data)
Definition
qgsdetaileditemwidget.cpp:29
QgsDetailedItemWidget::setChecked
void setChecked(bool flag)
Definition
qgsdetaileditemwidget.cpp:39
qgsdetaileditemwidget.h
Generated on
for QGIS API Documentation by
1.17.0