5#ifndef BUTTON_TASKMENU_H
6#define BUTTON_TASKMENU_H
8#include <QtWidgets/qabstractbutton.h>
9#include <QtWidgets/qcommandlinkbutton.h>
10#include <QtWidgets/qbuttongroup.h>
12#include <qdesigner_taskmenu_p.h>
13#include <extensionfactory_p.h>
19class QDesignerFormWindowCursorInterface;
32 void initialize(QDesignerFormWindowInterface *formWindow,
33 QButtonGroup *buttonGroup =
nullptr,
35 QAbstractButton *currentButton =
nullptr);
45 QAction *m_selectGroupAction;
46 QAction *m_breakGroupAction;
48 QDesignerFormWindowInterface *m_formWindow =
nullptr;
49 QButtonGroup *m_buttonGroup =
nullptr;
50 QAbstractButton *m_currentButton =
nullptr;
66 QButtonGroup *m_buttonGroup;
67 QList<QAction*> m_taskActions;
90 void addToGroup(QAction *a);
91 void removeFromGroup();
96 UngroupedButtonSelection,
97 GroupedButtonSelection
100 SelectionType selectionType(
const QDesignerFormWindowCursorInterface *cursor, QButtonGroup ** ptrToGroup =
nullptr)
const;
101 bool refreshAssignMenu(
const QDesignerFormWindowInterface *fw,
int buttonCount, SelectionType st, QButtonGroup *currentGroup);
102 QMenu *createGroupSelectionMenu(
const QDesignerFormWindowInterface *fw);
104 QList<QAction*> m_taskActions;
106 QMenu *m_assignGroupSubMenu;
107 QActionGroup *m_assignActionGroup;
108 QAction *m_assignToGroupSubMenuAction;
109 QMenu *m_currentGroupSubMenu;
110 QAction *m_currentGroupSubMenuAction;
112 QAction *m_createGroupAction;
113 QAction *m_preferredEditAction;
114 QAction *m_removeFromGroupAction;
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static ButtonList buttonList(const QDesignerFormWindowCursorInterface *cursor)
static QUndoCommand * createRemoveButtonsCommand(QDesignerFormWindowInterface *fw, const ButtonList &bl)