1 | /* |
2 | * Copyright (C) 1997 Michael Roth <mroth@wirlweb.de> |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU Library General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. |
8 | * |
9 | * This program 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 |
12 | * GNU Library General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Library General Public License |
15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * |
18 | */ |
19 | |
20 | #ifndef KSEPARATOR_H |
21 | #define KSEPARATOR_H |
22 | |
23 | #include <kdeui_export.h> |
24 | #include <QtGui/QFrame> |
25 | |
26 | /** |
27 | * Standard horizontal or vertical separator. |
28 | * |
29 | * \image html kseparator-horizontal.png "KDE Separator with horizontal orientation" |
30 | * \image html kseparator-vertical.png "KDE Separator with vertical orientation" |
31 | * |
32 | * @author Michael Roth <mroth@wirlweb.de> |
33 | */ |
34 | class KDEUI_EXPORT KSeparator : public QFrame |
35 | { |
36 | Q_OBJECT |
37 | Q_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation ) |
38 | |
39 | public: |
40 | /** |
41 | * Constructor. |
42 | * @param parent parent object. |
43 | * @param f extra QWidget flags. |
44 | **/ |
45 | explicit KSeparator(QWidget* parent=0, Qt::WindowFlags f=0); |
46 | |
47 | /** |
48 | * Constructor. |
49 | * @param orientation Set the orientation of the separator. |
50 | * Possible values are Horizontal or Vertical. |
51 | * @param parent parent object. |
52 | * @param f extra QWidget flags. |
53 | **/ |
54 | explicit KSeparator(Qt::Orientation orientation, QWidget* parent=0, Qt::WindowFlags f=0); |
55 | |
56 | /** |
57 | * Returns the orientation of the separator. |
58 | * @return int Possible values Horizontal or Vertical. |
59 | **/ |
60 | Qt::Orientation orientation() const; |
61 | |
62 | /** |
63 | * Set the orientation of the separator to @p orientation |
64 | * |
65 | * @param orientation Possible values are Vertical and Horizontal. |
66 | */ |
67 | void setOrientation(Qt::Orientation orientation); |
68 | |
69 | private: |
70 | class KSeparatorPrivate* d; |
71 | }; |
72 | |
73 | |
74 | #endif // KSEPARATOR_H |
75 | |