QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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
19#include "moc_qgsdetaileditemwidget.cpp"
21 : QWidget( parent )
22
23{
24 setupUi( this );
25}
26
28{
29 lblTitle->setText( data.title() );
30 lblDetail->setText( data.detail() );
31 lblCategory->setText( data.category() );
32 cbx->setVisible( data.isCheckable() );
33 cbx->setChecked( data.isChecked() );
34 lblIcon->setPixmap( data.icon() );
35}
36
38{
39 cbx->setChecked( flag );
40}
This class is the data only representation of a QgsDetailedItemWidget, designed to be used in custom ...
QString category() const
Returns the item's category.
bool isCheckable() const
Returns true if the item is checkable.
QString title() const
Returns the item's title.
QPixmap icon() const
Returns the item's icon.
QString detail() const
Returns the detailed description for the item.
bool isChecked() const
Returns true if the item is checked.
QgsDetailedItemWidget(QWidget *parent=nullptr)
Constructor for QgsDetailedItemWidget.
void setData(const QgsDetailedItemData &data)