KDDockWidgets API Documentation 2.1
Loading...
Searching...
No Matches
core/Action.h
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#pragma once
13
14#include "kddockwidgets/docks_export.h"
15#include "kddockwidgets/QtCompat_p.h"
16
18
19namespace KDDockWidgets {
20
21namespace Core {
22class DockWidget;
23
24class DOCKS_EXPORT Action
25{
26public:
27 explicit Action(Core::DockWidget *, const char *debugName = "");
28 virtual ~Action();
29
30 virtual void setIcon(const KDDockWidgets::Icon &) = 0;
31 virtual KDDockWidgets::Icon icon() const = 0;
32
33 virtual void setText(const QString &text) = 0;
34
35 virtual void setToolTip(const QString &text) = 0;
36 virtual QString toolTip() const = 0;
37
38 virtual void setEnabled(bool enabled) = 0;
39 virtual bool isEnabled() const = 0;
40
41 virtual bool isChecked() const = 0;
42 virtual void setChecked(bool checked) = 0;
43
44 virtual bool blockSignals(bool) = 0;
45
46#ifdef DOCKS_DEVELOPER_MODE
47 // Only used by QtWidget tests
48 virtual void trigger()
49 {
50 }
51#endif
52
53 bool enabled() const;
54 void toggle();
55
56 class Private;
57 Private *const d;
58
59 Action(const Action &) = delete;
60 Action &operator=(const Action &) = delete;
61};
62
63}
64
65}
virtual void setToolTip(const QString &text)=0
virtual bool isEnabled() const =0
virtual void setText(const QString &text)=0
virtual QString toolTip() const =0
Action(const Action &)=delete
virtual void setEnabled(bool enabled)=0
virtual bool isChecked() const =0
virtual bool blockSignals(bool)=0
virtual void setChecked(bool checked)=0
virtual void setIcon(const KDDockWidgets::Icon &)=0
Action & operator=(const Action &)=delete
virtual KDDockWidgets::Icon icon() const =0
The DockWidget base-class. DockWidget and Core::DockWidget are only split in two so we can share some...
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