KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
flutter/Action.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2020 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 "Action.h"
13#include "core/Action_p.h"
14#include "core/Logging_p.h"
15#include "core/DockWidget.h"
16
17using namespace KDDockWidgets::Flutter;
18
19Action::Action(Core::DockWidget *dw, const char *debugName)
20 : KDDockWidgets::Core::Action(dw, debugName)
21{
22}
23
24Action::~Action() = default;
25
26void Action::setIcon(const KDDockWidgets::Icon &)
27{
28 KDDW_ERROR("Not implemented for Flutter");
29}
30
31KDDockWidgets::Icon Action::icon() const
32{
33 KDDW_ERROR("Not implemented for Flutter");
34 return {};
35}
36
38{
39 const bool old = m_signalsBlocked;
40 m_signalsBlocked = b;
41 return old;
42}
43
44void Action::setChecked(bool checked)
45{
46 if (m_checked == checked)
47 return;
48
49 m_checked = checked;
50
51 if (!m_signalsBlocked) {
52 KDDW_TRACE("Emitting Action::toggled({})", checked);
53 d->toggled.emit(checked);
54 }
55}
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
KDDockWidgets::Icon icon() const override
void setChecked(bool checked) override
void setIcon(const KDDockWidgets::Icon &) override
Action(Core::DockWidget *, const char *debugName="")
The DockWidget controller that's shared between QtWidgets and QtQuick frontends.
Class to abstract QAction, so code still works with QtQuick and Flutter.

© 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 by doxygen 1.9.8