Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals  

/cygdrive/d/Eigene Dateien/!DProcs/code_gen/src/QRadioButtonGroup.cpp

Go to the documentation of this file.
00001 // Class QRadioButtonGroup 
00002 // Radio Button Group
00003 // Filename QRadioButtonGroup.cpp
00004 // FaPra 2003-2004, A5,  Alexander Kramer
00005 
00006 
00007 #include "QRadioButtonGroup.h"
00008 
00009 
00010 #include <iostream>
00011 using namespace std;
00012 
00013 
00014 // implementation of QRadioButtonGroup
00015 
00016 //! adds a button to this group
00017 void QRadioButtonGroup::add( QRadioButton*  button )
00018 {
00019   if (button != 0) Items.push_front(button);
00020 
00021 } // end of add()
00022 
00023 //! removes a button from this group
00024 void QRadioButtonGroup::remove( QRadioButton*  button )
00025 {
00026   Items.remove(button);
00027 } // end of remove()
00028 
00029 //! sets given radio button as selected
00030 void QRadioButtonGroup::setAsSelected( QRadioButton*  button )
00031 {
00032 
00033   list<QRadioButton*>::const_iterator iter;
00034   // Iterate through list
00035   for (iter=Items.begin(); iter != Items.end(); iter++)
00036   {
00037     if ((*iter) != button)
00038     {
00039       (*iter)->setState(cbUnchecked);
00040     }
00041     else
00042     {
00043       (*iter)->setState(cbChecked);
00044     }  
00045   }
00046 } // end of setAsSelected()
00047 
00048 // WARNING : The implementation of this method will be automatically generated with code generator.
00049 // To prevent this add '//KEEP' at the first line of the implementation.(first line after '{')
00050 //! prints itself to the cout
00051 void QRadioButtonGroup::print()
00052 {
00053 //KEEP
00054 cout << "Class : QRadioButtonGroup" << endl;
00055 cout << "Items.size() = " << Items.size() << endl;
00056 } // end of print()
00057 
00058 // WARNING : The implementation of this method will be automatically generated with code generator.
00059 // To prevent this add '//KEEP' at the first line of the implementation.(first line after '{')
00060 //! Constructor
00061  QRadioButtonGroup::QRadioButtonGroup(  )
00062 {
00063 } // end of QRadioButtonGroup()
00064 
00065 // WARNING : The implementation of this method will be automatically generated with code generator.
00066 // To prevent this add '//KEEP' at the first line of the implementation.(first line after '{')
00067 //! Destructor
00068  QRadioButtonGroup::~QRadioButtonGroup()
00069 {
00070 } // end of ~QRadioButtonGroup()
00071 
00072 // end of implementation of QRadioButtonGroup
00073 
00074 

Generated on Thu Mar 18 18:33:48 2004 for miniQT by doxygen1.2.18