kalarm/lib

buttongroup.h
1/*
2 * buttongroup.h - TQButtonGroup with an extra signal and TQt 2 compatibility
3 * Program: kalarm
4 * Copyright © 2002,2004,2006 by David Jarvie <software@astrojar.org.uk>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20#ifndef BUTTONGROUP_H
21#define BUTTONGROUP_H
22
23#include <tqbuttongroup.h>
24
25
38class ButtonGroup : public TQButtonGroup
39{
40 TQ_OBJECT
41
42 public:
47 explicit ButtonGroup(TQWidget* parent, const char* name = 0);
53 ButtonGroup(const TQString& title, TQWidget* parent, const char* name = 0);
60 ButtonGroup(int strips, TQt::Orientation orient, TQWidget* parent, const char* name = 0);
68 ButtonGroup(int strips, TQt::Orientation orient, const TQString& title, TQWidget* parent, const char* name = 0);
75 int insert(TQButton* button, int id = -1);
80 virtual void setButton(int id) { TQButtonGroup::setButton(id); emit buttonSet(id); }
81 private slots:
82 void slotButtonToggled(bool);
83 signals:
88 void buttonSet(int id);
89};
90
91#endif // BUTTONGROUP_H
A TQButtonGroup with signal on new selection, plus TQt 2 compatibility.
Definition: buttongroup.h:39
void buttonSet(int id)
Signal emitted whenever whenever any button in the group changes state, for whatever reason.
int insert(TQButton *button, int id=-1)
Inserts a button in the group.
Definition: buttongroup.cpp:57
ButtonGroup(TQWidget *parent, const char *name=0)
Constructor.
Definition: buttongroup.cpp:29
virtual void setButton(int id)
Sets the button with the specified identifier to be on.
Definition: buttongroup.h:80