KDDockWidgets API Documentation 1.7
Loading...
Searching...
No Matches
Separator_quick.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2020-2023 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
20using 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}
A Layouting::Widget that's deals in QQuickItem.
Widget * asWidget() override
SeparatorQuick(Layouting::Widget *parent=nullptr)
Q_INVOKABLE void onMouseReleased()
Widget * createRubberBand(Widget *parent) override
Q_INVOKABLE void onMousePressed()
Q_INVOKABLE void onMouseMoved(QPointF localPos)
Q_INVOKABLE void onMouseDoubleClicked()
A Layouting::Widget that's deals in QQuickItem Allows to host a QQuickItem in the layout.
QQuickItem * createQQuickItem(const QString &filename, QQuickItem *parent) const
An abstraction/wrapper around QWidget, QtQuickItem or anything else.
Definition Widget.h:77
QObject * parent() const
Definition Widget.h:126
QPoint toPoint() const const

© 2019-2023 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 Wed Nov 1 2023 00:02:31 for KDDockWidgets API Documentation by doxygen 1.9.8