Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
layouttaskmenu.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
5#include <formlayoutmenu_p.h>
6#include <morphmenu_p.h>
7
8#include <QtDesigner/abstractformwindow.h>
9
10#include <QtGui/qaction.h>
11
12#include <QtCore/qdebug.h>
13
15
16// ------------ LayoutWidgetTaskMenu
19 m_widget(lw),
20 m_morphMenu(new qdesigner_internal::MorphMenu(this)),
21 m_formLayoutMenu(new qdesigner_internal::FormLayoutMenu(this))
22{
23}
24
26{
27 return m_formLayoutMenu->preferredEditAction(m_widget, m_widget->formWindow());
28}
29
31{
32 QList<QAction*> rc;
33 QDesignerFormWindowInterface *fw = m_widget->formWindow();
34 m_morphMenu->populate(m_widget, fw, rc);
35 m_formLayoutMenu->populate(m_widget, fw, rc);
36 return rc;
37}
38
39// ------------- SpacerTaskMenu
40SpacerTaskMenu::SpacerTaskMenu(Spacer *, QObject *parent) :
41 QObject(parent)
42{
43}
44
46{
47 return nullptr;
48}
49
51{
52 return {};
53}
54
55QT_END_NAMESPACE
QAction * preferredEditAction() const override
QList< QAction * > taskActions() const override
QObject * parent
Definition qobject.h:73
QList< QAction * > taskActions() const override
QAction * preferredEditAction() const override
Combined button and popup list for selecting options.