PainterCheckBox.cpp
Go to the documentation of this file.
00001 /*******************************************************************************
00002  *  PainterCheckBox.cpp
00003  *
00004  *  (C) 2007 AG Aktives Sehen <agas@uni-koblenz.de>
00005  *           Universitaet Koblenz-Landau
00006  *
00007  *  Additional information:
00008  *  $Id: $
00009  *******************************************************************************/
00010 
00011 #include "PainterCheckBox.h"
00012 
00013 #include <QLabel>
00014 #include <QCheckBox>
00015 #include <QVBoxLayout>
00016 
00017 #define THIS PainterCheckBox
00018 
00019 THIS::THIS ( PainterPlugin* plugin, bool visible ) : QWidget( )
00020 {
00021   m_Plugin = plugin;
00022   m_CheckBox = new QCheckBox ( plugin->getName().c_str() );
00023 
00024   QVBoxLayout* layout = new QVBoxLayout ( this );
00025   layout->addWidget ( m_CheckBox );
00026   layout->setMargin ( 0 );
00027   layout->setSpacing ( 0 );
00028   setLayout ( layout );
00029 
00030   connect ( m_CheckBox , SIGNAL ( stateChanged ( int ) ), this, SLOT ( setVisible ( int ) ) );
00031   m_CheckBox->setChecked ( visible );
00032 }
00033 
00034 THIS::~THIS()
00035 {
00036 }
00037 
00038 void THIS::setVisible ( int state )
00039 {
00040   m_Plugin->setVisible ( state == Qt::Checked );
00041   emit changed();
00042 }
00043 
00044 #undef THIS


obj_rec_gui
Author(s): AGAS/agas@uni-koblenz.de
autogenerated on Mon Oct 6 2014 02:53:43