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 
12 {
13  setLineWidth(1);
14  setMidLineWidth(0);
16 }
17 
19  : QFrame(parent, f)
20 {
21  setLineWidth(1);
22  setMidLineWidth(0);
23  setOrientation(orientation);
24 }
25 
26 KSeparator::~KSeparator() = default;
27 
29 {
30  if (orientation == Qt::Vertical) {
33  setMinimumSize(2, 0);
34  } else {
37  setMinimumSize(0, 2);
38  }
40 }
41 
43 {
44  return ((frameStyle() & VLine) == VLine) ? Qt::Vertical : Qt::Horizontal;
45 }
46 
void updateGeometry()
void setFrameShape(QFrame::Shape)
void setOrientation(Qt::Orientation orientation)
Set the orientation of the separator to orientation.
Definition: kseparator.cpp:28
void setLineWidth(int)
void setMinimumSize(const QSize &)
KSeparator(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Constructor.
Definition: kseparator.cpp:11
void setMidLineWidth(int)
int frameStyle() const const
void setFrameShadow(QFrame::Shadow)
Horizontal
QObject * parent() const const
typedef WindowFlags
Qt::Orientation orientation() const
Returns the orientation of the separator.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 22:49:46 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.