| 1 | /* |
| 2 | SPDX-FileCopyrightText: 1997 Michael Roth <mroth@wirlweb.de> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.0-or-later |
| 5 | */ |
| 6 | |
| 7 | #ifndef KSEPARATOR_H |
| 8 | #define KSEPARATOR_H |
| 9 | |
| 10 | #include <QFrame> |
| 11 | #include <kwidgetsaddons_export.h> |
| 12 | #include <memory> |
| 13 | |
| 14 | /*! |
| 15 | * \class KSeparator |
| 16 | * \inmodule KWidgetsAddons |
| 17 | * |
| 18 | * \brief Standard horizontal or vertical separator. |
| 19 | * |
| 20 | * \image kseparator-horizontal.png "KSeparator Widget with horizontal orientation" |
| 21 | * \image kseparator-vertical.png "KSeparator Widget with vertical orientation" |
| 22 | */ |
| 23 | class KWIDGETSADDONS_EXPORT KSeparator : public QFrame |
| 24 | { |
| 25 | Q_OBJECT |
| 26 | |
| 27 | /*! |
| 28 | * \property KSeparator::orientation |
| 29 | */ |
| 30 | Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) |
| 31 | |
| 32 | public: |
| 33 | /*! |
| 34 | * Constructor. |
| 35 | * |
| 36 | * \a parent parent object. |
| 37 | * |
| 38 | * \a f extra QWidget flags. |
| 39 | */ |
| 40 | explicit KSeparator(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); |
| 41 | |
| 42 | /*! |
| 43 | * Constructor. |
| 44 | * |
| 45 | * \a orientation Set the orientation of the separator. |
| 46 | * Possible values are Horizontal or Vertical. |
| 47 | * |
| 48 | * \a parent parent object. |
| 49 | * |
| 50 | * \a f extra QWidget flags. |
| 51 | */ |
| 52 | explicit KSeparator(Qt::Orientation orientation, QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags()); |
| 53 | |
| 54 | ~KSeparator() override; |
| 55 | |
| 56 | /*! |
| 57 | * Returns the orientation of the separator. |
| 58 | */ |
| 59 | Qt::Orientation orientation() const; |
| 60 | |
| 61 | /*! |
| 62 | * Set the orientation of the separator to \a orientation |
| 63 | * |
| 64 | * \a orientation Possible values are Vertical and Horizontal. |
| 65 | */ |
| 66 | void setOrientation(Qt::Orientation orientation); |
| 67 | |
| 68 | private: |
| 69 | std::unique_ptr<class KSeparatorPrivate> const d; |
| 70 | }; |
| 71 | |
| 72 | #endif // KSEPARATOR_H |
| 73 | |