KDEUI
kbuttongroup.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the KDE Libraries 00003 00004 Copyright (C) 2006 Pino Toscano <toscano.pino@tiscali.it> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KBUTTONGROUP_H 00023 #define KBUTTONGROUP_H 00024 00025 #include <kdeui_export.h> 00026 #include <QtGui/QGroupBox> 00027 00028 class QAbstractButton; 00029 00041 class KDEUI_EXPORT KButtonGroup 00042 : public QGroupBox 00043 { 00044 Q_OBJECT 00045 00046 Q_PROPERTY(int current READ selected WRITE setSelected NOTIFY changed USER true) 00047 00048 public: 00052 explicit KButtonGroup( QWidget* parent = 0 ); 00056 ~KButtonGroup(); 00057 00063 int selected() const; 00064 00069 int id( QAbstractButton* button ) const; 00070 00071 public Q_SLOTS: 00075 void setSelected( int id ); 00076 00077 Q_SIGNALS: 00081 void clicked( int id ); 00085 void pressed( int id ); 00089 void released( int id ); 00095 void changed( int id ); 00096 00097 protected: 00101 virtual void childEvent( QChildEvent* event ); 00102 00103 private: 00104 Q_PRIVATE_SLOT(d, void slotClicked( int id )) 00105 00106 private: 00107 class Private; 00108 friend class Private; 00109 Private * const d; 00110 }; 00111 00112 #endif 00113
KDE 4.6 API Reference