KWidgetsAddons

kseparator.h
1 /*
2  SPDX-FileCopyrightText: 1997 Michael Roth <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KSEPARATOR_H
8 #define KSEPARATOR_H
9 
10 #include <kwidgetsaddons_export.h>
11 #include <QFrame>
12 #include <memory>
13 
14 /**
15  * @class KSeparator kseparator.h KSeparator
16  *
17  * Standard horizontal or vertical separator.
18  *
19  * \image html kseparator-horizontal.png "KSeparator Widget with horizontal orientation"
20  * \image html kseparator-vertical.png "KSeparator Widget with vertical orientation"
21  *
22  * @author Michael Roth <[email protected]>
23  */
24 class KWIDGETSADDONS_EXPORT KSeparator : public QFrame
25 {
26  Q_OBJECT
27  Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
28 
29 public:
30  /**
31  * Constructor.
32  * @param parent parent object.
33  * @param f extra QWidget flags.
34  */
35  explicit KSeparator(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
36 
37  /**
38  * Constructor.
39  * @param orientation Set the orientation of the separator.
40  * Possible values are Horizontal or Vertical.
41  * @param parent parent object.
42  * @param f extra QWidget flags.
43  */
44  explicit KSeparator(Qt::Orientation orientation, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
45 
46  ~KSeparator() override;
47 
48  /**
49  * Returns the orientation of the separator.
50  * @return int Possible values Horizontal or Vertical.
51  */
52  Qt::Orientation orientation() const;
53 
54  /**
55  * Set the orientation of the separator to @p orientation
56  *
57  * @param orientation Possible values are Vertical and Horizontal.
58  */
59  void setOrientation(Qt::Orientation orientation);
60 
61 private:
62  std::unique_ptr<class KSeparatorPrivate> const d;
63 };
64 
65 #endif // KSEPARATOR_H
Standard horizontal or vertical separator.
Definition: kseparator.h:24
Q_PROPERTY(...)
Orientation
typedef WindowFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Mar 7 2021 22:44:00 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.