Quantum GIS API Documentation
1.7.4
|
00001 /*************************************************************************** 00002 qgsdetailedlistwidget.cpp - A rich QItemWidget subclass 00003 ------------------- 00004 begin : Sat May 17 2008 00005 copyright : (C) 2008 Tim Sutton 00006 email : tim@linfiniti.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 /* $Id:$ */ 00018 00019 #include "qgsdetaileditemwidget.h" 00020 QgsDetailedItemWidget::QgsDetailedItemWidget( QWidget * parent ) : 00021 QWidget( parent ) 00022 00023 { 00024 setupUi( this ); 00025 } 00026 00027 QgsDetailedItemWidget::~QgsDetailedItemWidget() 00028 { 00029 } 00030 00031 void QgsDetailedItemWidget::setData( QgsDetailedItemData theData ) 00032 { 00033 lblTitle->setText( theData.title() ); 00034 lblDetail->setText( theData.detail() ); 00035 cbx->setVisible( theData.isCheckable() ); 00036 cbx->setChecked( theData.isChecked() ); 00037 lblIcon->setPixmap( theData.icon() ); 00038 } 00039 00040 void QgsDetailedItemWidget::setChecked( bool theFlag ) 00041 { 00042 cbx->setChecked( theFlag ); 00043 }