From db877ba121ff87a4e029daf8555d85dfef45993a Mon Sep 17 00:00:00 2001 From: Petr Mrázek Date: Mon, 9 Feb 2015 01:51:14 +0100 Subject: NOISSUE move everything. --- gui/widgets/LineSeparator.cpp | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 gui/widgets/LineSeparator.cpp (limited to 'gui/widgets/LineSeparator.cpp') diff --git a/gui/widgets/LineSeparator.cpp b/gui/widgets/LineSeparator.cpp deleted file mode 100644 index f4ee173d..00000000 --- a/gui/widgets/LineSeparator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "LineSeparator.h" - -#include -#include -#include -#include - -void LineSeparator::initStyleOption(QStyleOption *option) const -{ - option->initFrom(this); - // in a horizontal layout, the line is vertical (and vice versa) - if (m_orientation == Qt::Vertical) - option->state |= QStyle::State_Horizontal; -} - -LineSeparator::LineSeparator(QWidget *parent, Qt::Orientation orientation) - : QWidget(parent), m_orientation(orientation) -{ - setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); -} - -QSize LineSeparator::sizeHint() const -{ - QStyleOption opt; - initStyleOption(&opt); - const int extent = - style()->pixelMetric(QStyle::PM_ToolBarSeparatorExtent, &opt, parentWidget()); - return QSize(extent, extent); -} - -void LineSeparator::paintEvent(QPaintEvent *) -{ - QPainter p(this); - QStyleOption opt; - initStyleOption(&opt); - style()->drawPrimitive(QStyle::PE_IndicatorToolBarSeparator, &opt, &p, parentWidget()); -} -- cgit