KWidgetsAddons

kseparator.h
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 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 <mroth@wirlweb.de>
23 */
24class KWIDGETSADDONS_EXPORT KSeparator : public QFrame
25{
26 Q_OBJECT
27 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
28
29public:
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
61private:
62 std::unique_ptr<class KSeparatorPrivate> const d;
63};
64
65#endif // KSEPARATOR_H
Standard horizontal or vertical separator.
Definition kseparator.h:25
Q_PROPERTY(...)
Orientation
typedef WindowFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:51:03 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.