polish
[kdegraphics.git] / gwenview / lib / expandbutton.h
blob9dad054e778c367440967d4b2b4928ff366c4651
1 /*
2 Gwenview: an image viewer
3 Copyright 2007 Aurélien Gâteau <aurelien.gateau@free.fr>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef EXPANDBUTTON_H
21 #define EXPANDBUTTON_H
23 #include <lib/gwenviewlib_export.h>
25 #include <QToolButton>
28 namespace Gwenview {
31 /**
32 * A button which looks flat and shows an expand indicator ([-] or [+]).
34 * To implement expandable frames, add a button like this above your frame,
35 * connect the toggled(bool) signal of the button to the setVisible(bool) slot
36 * of the frame.
37 * By default the button is not on, so be sure to hide the frame.
39 class GWENVIEWLIB_EXPORT ExpandButton : public QToolButton {
40 public:
41 ExpandButton(QWidget* parent);
42 virtual QSize sizeHint() const;
44 protected:
45 virtual void paintEvent(QPaintEvent* event);
49 } // namespace
52 #endif /* EXPANDBUTTON_H */