KWidgetsAddons

kseparator.cpp
1 /*
2  SPDX-FileCopyrightText: 1997 Michael Roth <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #include "kseparator.h"
8 
9 class KSeparatorPrivate
10 {
11 };
12 
14  : QFrame(parent, f)
15 {
16  setLineWidth(1);
17  setMidLineWidth(0);
19 }
20 
22  : QFrame(parent, f)
23 {
24  setLineWidth(1);
25  setMidLineWidth(0);
26  setOrientation(orientation);
27 }
28 
29 KSeparator::~KSeparator() = default;
30 
32 {
33  if (orientation == Qt::Vertical) {
36  setMinimumSize(2, 0);
37  } else {
40  setMinimumSize(0, 2);
41  }
43 }
44 
45 Qt::Orientation KSeparator::orientation() const
46 {
47  return ((frameStyle() & VLine) == VLine) ? Qt::Vertical : Qt::Horizontal;
48 }
void setFrameShadow(QFrame::Shadow)
void setFrameShape(QFrame::Shape)
void setMinimumSize(const QSize &)
int frameStyle() const const
typedef WindowFlags
void setLineWidth(int)
Horizontal
void setOrientation(Qt::Orientation orientation)
Set the orientation of the separator to orientation.
Definition: kseparator.cpp:31
void updateGeometry()
void setMidLineWidth(int)
KSeparator(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Constructor.
Definition: kseparator.cpp:13
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Mar 27 2023 04:15:16 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.