- Softwrap mode:
- Toggle
Blob of src/sif/private/buttonarea.h
(raw blob data)
| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2008 by David Cuadrado * |
| 3 | * krawek@gmail.com * |
| 4 | * * |
| 5 | * This program is free software; you can redistribute it and/or modify * |
| 6 | * it under the terms of the GNU General Public License as published by * |
| 7 | * the Free Software Foundation; either version 2 of the License, or * |
| 8 | * (at your option) any later version. * |
| 9 | * * |
| 10 | * This program is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 | * GNU General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU General Public License * |
| 16 | * along with this program; if not, write to the * |
| 17 | * Free Software Foundation, Inc., * |
| 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 19 | ***************************************************************************/ |
| 20 | #ifndef SIFPRIVATEBUTTONAREA_H |
| 21 | #define SIFPRIVATEBUTTONAREA_H |
| 22 | |
| 23 | #include <QWidget> |
| 24 | #include <QIcon> |
| 25 | #include <QButtonGroup> |
| 26 | |
| 27 | class QHBoxLayout; |
| 28 | |
| 29 | namespace SIF { |
| 30 | class AeroButton; |
| 31 | } |
| 32 | |
| 33 | namespace SIFPrivate { |
| 34 | |
| 35 | /** |
| 36 | @author David Cuadrado <krawek@gmail.com> |
| 37 | */ |
| 38 | class ButtonArea : public QWidget |
| 39 | { |
| 40 | Q_OBJECT; |
| 41 | public: |
| 42 | ButtonArea(QWidget *parent = 0); |
| 43 | ~ButtonArea(); |
| 44 | |
| 45 | void setExclusive(bool e); |
| 46 | bool exclusive() const; |
| 47 | |
| 48 | SIF::AeroButton *addButton(const QString &title, const QIcon &icon = QIcon()); |
| 49 | |
| 50 | private: |
| 51 | QHBoxLayout *m_layout; |
| 52 | QButtonGroup m_buttons; |
| 53 | }; |
| 54 | |
| 55 | } |
| 56 | |
| 57 | #endif |
