2 This file is part of the KDE libraries
3 Copyright (C) 2005 Daniel Molkentin <molkentin@kde.org>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
21 * file copied from playground/libs/ui/collabsiblewidget
23 #ifndef COLLAPSIBLEWIDGET_H
24 #define COLLAPSIBLEWIDGET_H
26 #include <QScrollArea>
29 #include <QAbstractButton>
30 #include <kopete_export.h>
34 class ClickableLabel
: public QLabel
38 ClickableLabel( QWidget
* parent
= 0 );
41 void mouseReleaseEvent( QMouseEvent
*e
);
47 class ArrowButton
: public QAbstractButton
50 ArrowButton(QWidget
*parent
= 0);
53 QSize
sizeHint() const { return QSize(16, 16); }
56 void paintEvent( QPaintEvent
* );
62 @short A widget that has a caption and a collapsible widget
63 @author Daniel Molkentin <molkentin@kde.org>
65 class KOPETE_EXPORT CollapsibleWidget
: public QWidget
69 CollapsibleWidget(QWidget
*parent
= 0);
70 explicit CollapsibleWidget(const QString
& caption
, QWidget
*parent
= 0);
73 QString
caption() const;
74 bool isExpanded() const;
76 QWidget
* innerWidget() const;
77 void setInnerWidget( QWidget
*w
);
80 void setExpanded(bool collapsed
);
81 void setCaption(const QString
& caption
);
88 void animateCollapse(qreal
);
91 Q_DISABLE_COPY( CollapsibleWidget
)
100 @short A scrollable container that contains groups of settings,
101 usually in the form of CollapsibleWidgets.
102 @author Daniel Molkentin <molkentin@kde.org>
104 class KOPETE_EXPORT SettingsContainer
: public QScrollArea
106 Q_ENUMS( CollapseState
)
109 enum CollapseState
{ Collapsed
, Uncollapsed
};
110 SettingsContainer( QWidget
*parent
= 0 );
111 ~SettingsContainer();
113 CollapsibleWidget
* insertWidget( QWidget
* w
, const QString
& name
);
116 Q_DISABLE_COPY( SettingsContainer
)
123 #endif // COLLAPSIBLEWIDGET_H