KDDockWidgets API Documentation  1.5
Separator_quick.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KDDockWidgets.
3 
4  SPDX-FileCopyrightText: 2020-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5  Author: SĂ©rgio Martins <sergio.martins@kdab.com>
6 
7  SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8 
9  Contact KDAB at <info@kdab.com> for commercial licensing options.
10 */
11 
12 #include "Separator_quick.h"
13 #include "Widget_quick.h"
14 #include "Logging_p.h"
15 #include "Item_p.h"
16 #include "Rubberband_quick.h"
17 
18 #include <QTimer>
19 
20 using namespace Layouting;
21 
23  : QQuickItem(qobject_cast<QQuickItem *>(parent->asQObject()))
24  , Separator(parent)
25  , Layouting::Widget_quick(this)
26 {
27  createQQuickItem(QStringLiteral(":/kddockwidgets/multisplitter/private/multisplitter/qml/Separator.qml"), this);
28 
29  // Only set on Separator::init(), so single-shot
31 }
32 
34 {
35  return Separator::isVertical();
36 }
37 
39 {
40  if (!parent) {
41  qWarning() << Q_FUNC_INFO << "Parent is required";
42  return nullptr;
43  }
44 
46 }
47 
49 {
50  return this;
51 }
52 
54 {
55  Separator::onMousePress();
56 }
57 
59 {
60  const QPointF pos = QQuickItem::mapToItem(parentItem(), localPos);
61  Separator::onMouseMove(pos.toPoint());
62 }
63 
65 {
66  Separator::onMouseReleased();
67 }
68 
70 {
71  Separator::onMouseDoubleClick();
72 }
Layouting::SeparatorQuick::onMouseDoubleClicked
Q_INVOKABLE void onMouseDoubleClicked()
Definition: Separator_quick.cpp:69
Separator_quick.h
QTimer::singleShot
singleShot
Layouting::RubberBand
Definition: Rubberband_quick.h:26
Layouting::SeparatorQuick::isVerticalChanged
void isVerticalChanged()
Separator
Layouting::SeparatorQuick::isVertical
bool isVertical
Definition: Separator_quick.h:29
QPointF
Layouting::SeparatorQuick::onMouseReleased
Q_INVOKABLE void onMouseReleased()
Definition: Separator_quick.cpp:64
Layouting::SeparatorQuick::onMousePressed
Q_INVOKABLE void onMousePressed()
Definition: Separator_quick.cpp:53
Layouting::Widget_quick::createQQuickItem
QQuickItem * createQQuickItem(const QString &filename, QQuickItem *parent) const
Definition: Widget_quick.cpp:127
Layouting::Widget
An abstraction/wrapper around QWidget, QtQuickItem or anything else.
Definition: Widget.h:79
Layouting::SeparatorQuick::asWidget
Widget * asWidget() override
Definition: Separator_quick.cpp:48
Widget_quick.h
A Layouting::Widget that's deals in QQuickItem.
Rubberband_quick.h
Layouting::SeparatorQuick::createRubberBand
Widget * createRubberBand(Widget *parent) override
Definition: Separator_quick.cpp:38
QPointF::toPoint
QPoint toPoint() const const
Layouting::Widget_quick
A Layouting::Widget that's deals in QQuickItem Allows to host a QQuickItem in the layout.
Definition: Widget_quick.h:30
Layouting::SeparatorQuick::onMouseMoved
Q_INVOKABLE void onMouseMoved(QPointF localPos)
Definition: Separator_quick.cpp:58
Layouting::SeparatorQuick::SeparatorQuick
SeparatorQuick(Layouting::Widget *parent=nullptr)
Definition: Separator_quick.cpp:22
Layouting
Definition: FrameworkWidgetFactory.h:32
Layouting::Widget::parent
QObject * parent() const
Definition: Widget.h:128

© 2019-2022 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated on Mon Mar 7 2022 02:01:21 for KDDockWidgets API Documentation by doxygen 1.8.20