kalarm/lib
buttongroup.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "kalarm.h"
00021
00022 #include <qlayout.h>
00023 #include <qbutton.h>
00024 #include <kdialog.h>
00025
00026 #include "buttongroup.moc"
00027
00028
00029 ButtonGroup::ButtonGroup(QWidget* parent, const char* name)
00030 : QButtonGroup(parent, name)
00031 {
00032 connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
00033 }
00034
00035 ButtonGroup::ButtonGroup(const QString& title, QWidget* parent, const char* name)
00036 : QButtonGroup(title, parent, name)
00037 {
00038 connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
00039 }
00040
00041 ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, QWidget* parent, const char* name)
00042 : QButtonGroup(strips, orient, parent, name)
00043 {
00044 connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
00045 }
00046
00047 ButtonGroup::ButtonGroup(int strips, Qt::Orientation orient, const QString& title, QWidget* parent, const char* name)
00048 : QButtonGroup(strips, orient, title, parent, name)
00049 {
00050 connect(this, SIGNAL(clicked(int)), SIGNAL(buttonSet(int)));
00051 }
00052
00053
00054
00055
00056
00057 int ButtonGroup::insert(QButton* button, int id)
00058 {
00059 id = QButtonGroup::insert(button, id);
00060 connect(button, SIGNAL(toggled(bool)), SLOT(slotButtonToggled(bool)));
00061 return id;
00062 }
00063
00064
00065
00066
00067 void ButtonGroup::slotButtonToggled(bool)
00068 {
00069 emit buttonSet(selectedId());
00070 }
|