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
qdesigner_command_p.h
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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef QDESIGNER_COMMAND_H
16#define QDESIGNER_COMMAND_H
17
18#include "layoutinfo_p.h"
22#include "shared_enums_p.h"
24
25#include <QtDesigner/layoutdecoration.h>
26
27#include <QtGui/qicon.h>
28
29#include <QtCore/qcompare.h>
30#include <QtCore/qhash.h>
31#include <QtCore/qlist.h>
32#include <QtCore/qmap.h>
33#include <QtCore/qobject.h>
34#include <QtCore/qpair.h>
35#include <QtCore/qpoint.h>
36#include <QtCore/qpointer.h>
37#include <QtCore/qrect.h>
38
40
43class QDesignerMenu;
44
45class QMenuBar;
46class QStatusBar;
47class QToolBar;
48class QToolBox;
49class QTabWidget;
50class QTableWidget;
51class QTableWidgetItem;
52class QTreeWidget;
53class QTreeWidgetItem;
54class QListWidget;
55class QListWidgetItem;
56class QComboBox;
57class QStackedWidget;
58class QDockWidget;
59class QMainWindow;
60class QFormLayout;
61
62namespace qdesigner_internal {
63
64class Layout;
65class LayoutHelper;
66class PropertySheetIconValue;
67class DesignerIconCache;
68struct LayoutProperties;
69
91
93{
94
95public:
97
98 void init(QWidget *widget);
99
100 void redo() override;
101 void undo() override;
102protected:
104 virtual void reorder(QWidget *widget) const = 0;
105
106private:
110};
111
124
137
157
158// Helper to correctly unmanage a widget and its children for delete operations
173
204
225
227{
228public:
230
232
234
235 void redo() override;
236 void undo() override;
237
238 // Return a mask of possible operations of that item
240
241private:
245
248};
249
251{
252
253public:
255
256 void init(QWidget *widget, int row, int column, int rowspan, int colspan);
257
258 void redo() override;
259 void undo() override;
260
261protected:
262 void changeItemPosition(const QRect &g);
263
264private:
268};
269
271{
272
273public:
275
276 void init(const QWidgetList &newTabOrder);
277
279 { return m_oldTabOrder; }
280
282 { return m_newTabOrder; }
283
284 void redo() override;
285 void undo() override;
286
287private:
291};
292
309
323
324// Mixin class for storing the selection state
327public:
329
330 void save(const QDesignerFormWindowInterface *formWindow);
331 void restore(QDesignerFormWindowInterface *formWindow) const;
332
333private:
335 WidgetPointerList m_selection;
336 QPointer<QWidget> m_current;
337};
338
339class QDESIGNER_SHARED_EXPORT LayoutCommand: public QDesignerFormWindowCommand
340{
341
342public:
343 explicit LayoutCommand(QDesignerFormWindowInterface *formWindow);
344 ~LayoutCommand() override;
345
346 inline QWidgetList widgets() const { return m_widgets; }
347
348 void init(QWidget *parentWidget, const QWidgetList &widgets, LayoutInfo::Type layoutType,
349 QWidget *layoutBase = nullptr,
350 // Reparent/Hide instances of QLayoutWidget.
351 bool reparentLayoutWidget = true);
352
353 void redo() override;
354 void undo() override;
355
356private:
357 QPointer<QWidget> m_parentWidget;
358 QWidgetList m_widgets;
359 QPointer<QWidget> m_layoutBase;
360 QPointer<Layout> m_layout;
361 CursorSelectionState m_cursorSelectionState;
362 bool m_setup;
363};
364
365class QDESIGNER_SHARED_EXPORT BreakLayoutCommand: public QDesignerFormWindowCommand
366{
367
368public:
369 explicit BreakLayoutCommand(QDesignerFormWindowInterface *formWindow);
370 ~BreakLayoutCommand() override;
371
372 inline QWidgetList widgets() const { return m_widgets; }
373
374 void init(const QWidgetList &widgets, QWidget *layoutBase,
375 // Reparent/Hide instances of QLayoutWidget.
376 bool reparentLayoutWidget = true);
377
378 void redo() override;
379 void undo() override;
380
381 // Access the properties of the layout, 0 in case of splitters.
382 const LayoutProperties *layoutProperties() const;
383 int propertyMask() const;
384
385private:
386 QWidgetList m_widgets;
387 QPointer<QWidget> m_layoutBase;
388 QPointer<Layout> m_layout;
389 LayoutHelper* m_layoutHelper;
390 LayoutProperties *m_properties;
391 int m_propertyMask;
392 CursorSelectionState m_cursorSelectionState;
393};
394
395class QDESIGNER_SHARED_EXPORT SimplifyLayoutCommand: public QDesignerFormWindowCommand
396{
397public:
398 explicit SimplifyLayoutCommand(QDesignerFormWindowInterface *formWindow);
399 ~SimplifyLayoutCommand() override;
400
401 bool init(QWidget *layoutBase);
402
403 // Quick check
404 static bool canSimplify(QDesignerFormEditorInterface *core, const QWidget *w, int *layoutType = nullptr);
405
406 void redo() override;
407 void undo() override;
408
409private:
410 const QRect m_area;
411 QWidget *m_layoutBase;
412 LayoutHelper* m_layoutHelper;
413 bool m_layoutSimplified;
414};
415
417{
418
419public:
420 explicit ToolBoxCommand(QDesignerFormWindowInterface *formWindow);
422
423 void init(QToolBox *toolBox);
424
425protected:
426 void removePage();
427 void addPage();
428
432 QString m_itemText;
434};
435
437{
438
439public:
440 explicit MoveToolBoxPageCommand(QDesignerFormWindowInterface *formWindow);
442
443 void init(QToolBox *toolBox, QWidget *page, int newIndex);
444
445 void redo() override;
446 void undo() override;
447
448private:
449 int m_newIndex;
450 int m_oldIndex;
451};
452
454{
455
456public:
457 explicit DeleteToolBoxPageCommand(QDesignerFormWindowInterface *formWindow);
459
460 void init(QToolBox *toolBox);
461
462 void redo() override;
463 void undo() override;
464};
465
467{
468
469public:
474 explicit AddToolBoxPageCommand(QDesignerFormWindowInterface *formWindow);
476
477 void init(QToolBox *toolBox);
478 void init(QToolBox *toolBox, InsertionMode mode);
479
480 void redo() override;
481 void undo() override;
482};
483
485{
486
487public:
488 explicit TabWidgetCommand(QDesignerFormWindowInterface *formWindow);
490
491 void init(QTabWidget *tabWidget);
492
493protected:
494 void removePage();
495 void addPage();
496
500 QString m_itemText;
502};
503
505{
506
507public:
508 explicit DeleteTabPageCommand(QDesignerFormWindowInterface *formWindow);
510
511 void init(QTabWidget *tabWidget);
512
513 void redo() override;
514 void undo() override;
515};
516
518{
519
520public:
525 explicit AddTabPageCommand(QDesignerFormWindowInterface *formWindow);
527
528 void init(QTabWidget *tabWidget);
529 void init(QTabWidget *tabWidget, InsertionMode mode);
530
531 void redo() override;
532 void undo() override;
533};
534
536{
537
538public:
539 explicit MoveTabPageCommand(QDesignerFormWindowInterface *formWindow);
541
542 void init(QTabWidget *tabWidget, QWidget *page,
543 const QIcon &icon, const QString &label,
544 int index, int newIndex);
545
546 void redo() override;
547 void undo() override;
548
549private:
550 int m_newIndex;
551 int m_oldIndex;
552 QPointer<QWidget> m_page;
553 QString m_label;
554 QIcon m_icon;
555};
556
558{
559
560public:
561 explicit StackedWidgetCommand(QDesignerFormWindowInterface *formWindow);
563
564 void init(QStackedWidget *stackedWidget);
565
566protected:
567 void removePage();
568 void addPage();
569
573};
574
576{
577
578public:
579 explicit MoveStackedWidgetCommand(QDesignerFormWindowInterface *formWindow);
581
582 void init(QStackedWidget *stackedWidget, QWidget *page, int newIndex);
583
584 void redo() override;
585 void undo() override;
586
587private:
588 int m_newIndex;
589 int m_oldIndex;
590};
591
593{
594
595public:
596 explicit DeleteStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
598
599 void init(QStackedWidget *stackedWidget);
600
601 void redo() override;
602 void undo() override;
603};
604
606{
607
608public:
613 explicit AddStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
615
616 void init(QStackedWidget *stackedWidget);
617 void init(QStackedWidget *stackedWidget, InsertionMode mode);
618
619 void redo() override;
620 void undo() override;
621};
622
624{
625
626public:
627 explicit CreateMenuBarCommand(QDesignerFormWindowInterface *formWindow);
628
629 void init(QMainWindow *mainWindow);
630
631 void undo() override;
632 void redo() override;
633
634private:
635 QPointer<QMainWindow> m_mainWindow;
636 QPointer<QMenuBar> m_menuBar;
637};
638
640{
641
642public:
643 explicit DeleteMenuBarCommand(QDesignerFormWindowInterface *formWindow);
644
645 void init(QMenuBar *menuBar);
646
647 void undo() override;
648 void redo() override;
649
650private:
651 QPointer<QMainWindow> m_mainWindow;
652 QPointer<QMenuBar> m_menuBar;
653};
654
656{
657
658public:
659 explicit CreateStatusBarCommand(QDesignerFormWindowInterface *formWindow);
660
661 void init(QMainWindow *mainWindow);
662
663 void undo() override;
664 void redo() override;
665
666private:
667 QPointer<QMainWindow> m_mainWindow;
668 QPointer<QStatusBar> m_statusBar;
669};
670
671class QDESIGNER_SHARED_EXPORT DeleteStatusBarCommand: public QDesignerFormWindowCommand
672{
673
674public:
675 explicit DeleteStatusBarCommand(QDesignerFormWindowInterface *formWindow);
676
677 void init(QStatusBar *statusBar);
678
679 void undo() override;
680 void redo() override;
681
682private:
683 QPointer<QMainWindow> m_mainWindow;
684 QPointer<QStatusBar> m_statusBar;
685};
686
688{
689
690public:
691 explicit AddToolBarCommand(QDesignerFormWindowInterface *formWindow);
692
693 void init(QMainWindow *mainWindow, Qt::ToolBarArea area);
694
695 void undo() override;
696 void redo() override;
697
698private:
699 QPointer<QMainWindow> m_mainWindow;
700 QPointer<QToolBar> m_toolBar;
701};
702
704{
705
706public:
707 explicit DeleteToolBarCommand(QDesignerFormWindowInterface *formWindow);
708
709 void init(QToolBar *toolBar);
710
711 void undo() override;
712 void redo() override;
713
714private:
715 QPointer<QMainWindow> m_mainWindow;
716 QPointer<QToolBar> m_toolBar;
717};
718
720{
721
722public:
723 explicit DockWidgetCommand(const QString &description, QDesignerFormWindowInterface *formWindow);
725
726 void init(QDockWidget *dockWidget);
727
728protected:
730};
731
732class QDESIGNER_SHARED_EXPORT AddDockWidgetCommand: public QDesignerFormWindowCommand
733{
734
735public:
736 explicit AddDockWidgetCommand(QDesignerFormWindowInterface *formWindow);
737
738 void init(QMainWindow *mainWindow, QDockWidget *dockWidget);
739 void init(QMainWindow *mainWindow);
740
741 void undo() override;
742 void redo() override;
743
744private:
745 QPointer<QMainWindow> m_mainWindow;
746 QPointer<QDockWidget> m_dockWidget;
747};
748
749class QDESIGNER_SHARED_EXPORT ContainerWidgetCommand: public QDesignerFormWindowCommand
750{
751
752public:
753 explicit ContainerWidgetCommand(QDesignerFormWindowInterface *formWindow);
754 ~ContainerWidgetCommand() override;
755
756 QDesignerContainerExtension *containerExtension() const;
757
758 void init(QWidget *containerWidget);
759
760protected:
761 void removePage();
762 void addPage();
763
764 QPointer<QWidget> m_containerWidget;
765 QPointer<QWidget> m_widget;
766 int m_index;
767};
768
770{
771
772public:
773 explicit DeleteContainerWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
774 ~DeleteContainerWidgetPageCommand() override;
775
776 void init(QWidget *containerWidget, ContainerType ct);
777
778 void redo() override;
779 void undo() override;
780};
781
782class QDESIGNER_SHARED_EXPORT AddContainerWidgetPageCommand: public ContainerWidgetCommand
783{
784
785public:
786 enum InsertionMode {
787 InsertBefore,
788 InsertAfter
789 };
790 explicit AddContainerWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
791 ~AddContainerWidgetPageCommand() override;
792
793 void init(QWidget *containerWidget, ContainerType ct, InsertionMode mode);
794
795 void redo() override;
796 void undo() override;
797};
798
799class QDESIGNER_SHARED_EXPORT ChangeCurrentPageCommand: public QDesignerFormWindowCommand
800{
801
802public:
803 explicit ChangeCurrentPageCommand(QDesignerFormWindowInterface *formWindow);
804 ~ChangeCurrentPageCommand() override;
805
806 QDesignerContainerExtension *containerExtension() const;
807
808 void init(QWidget *containerWidget, int newIndex);
809
810 void redo() override;
811 void undo() override;
812
813protected:
814 QPointer<QWidget> m_containerWidget;
815 QPointer<QWidget> m_widget;
816 int m_oldIndex;
817 int m_newIndex;
818};
819
821 ItemData() = default;
822
823 ItemData(const QListWidgetItem *item, bool editor);
824 ItemData(const QTableWidgetItem *item, bool editor);
825 ItemData(const QTreeWidgetItem *item, int column);
826 QListWidgetItem *createListItem(DesignerIconCache *iconCache, bool editor) const;
827 QTableWidgetItem *createTableItem(DesignerIconCache *iconCache, bool editor) const;
828 void fillTreeItemColumn(QTreeWidgetItem *item, int column, DesignerIconCache *iconCache) const;
829
830 bool isValid() const { return !m_properties.isEmpty(); }
831
832 QHash<int, QVariant> m_properties;
833
834 friend bool comparesEqual(const ItemData &lhs, const ItemData &rhs) noexcept
835 {
836 return lhs.m_properties == rhs.m_properties;
837 }
838 Q_DECLARE_EQUALITY_COMPARABLE(ItemData)
839};
840
842 ListContents() = default;
843
844 ListContents(const QTreeWidgetItem *item);
845 QTreeWidgetItem *createTreeItem(DesignerIconCache *iconCache) const;
846
847 void createFromListWidget(const QListWidget *listWidget, bool editor);
848 void applyToListWidget(QListWidget *listWidget, DesignerIconCache *iconCache,
849 bool editor,
850 Qt::Alignment alignmentDefault = Qt::AlignLeading | Qt::AlignVCenter) const;
851 void createFromComboBox(const QComboBox *listWidget);
852 void applyToComboBox(QComboBox *listWidget, DesignerIconCache *iconCache) const;
853
854 QList<ItemData> m_items;
855
856 friend bool comparesEqual(const ListContents &lhs, const ListContents &rhs) noexcept
857 {
858 return lhs.m_items == rhs.m_items;
859 }
860 Q_DECLARE_EQUALITY_COMPARABLE(ListContents)
861};
862
863// Data structure representing the contents of a QTableWidget with
864// methods to retrieve and apply for ChangeTableContentsCommand
866
867 using CellRowColumnAddress = std::pair<int, int>;
868
869 TableWidgetContents();
870 void clear();
871
872 void fromTableWidget(const QTableWidget *tableWidget, bool editor);
873 void applyToTableWidget(QTableWidget *tableWidget, DesignerIconCache *iconCache, bool editor) const;
874
875 static bool nonEmpty(const QTableWidgetItem *item, int headerColumn);
876 static QString defaultHeaderText(int i);
877 static void insertHeaderItem(const QTableWidgetItem *item, int i, ListContents *header, bool editor);
878
879 int m_columnCount = 0;
880 int m_rowCount = 0;
881 ListContents m_horizontalHeader;
882 ListContents m_verticalHeader;
883 QMap<CellRowColumnAddress, ItemData> m_items;
884
886 bool comparesEqual(const TableWidgetContents &lhs,
887 const TableWidgetContents &rhs) noexcept;
888 Q_DECLARE_EQUALITY_COMPARABLE(TableWidgetContents)
889};
890
891class QDESIGNER_SHARED_EXPORT ChangeTableContentsCommand: public QDesignerFormWindowCommand
892{
893public:
894 explicit ChangeTableContentsCommand(QDesignerFormWindowInterface *formWindow);
895
896 void init(QTableWidget *tableWidget, const TableWidgetContents &oldCont, const TableWidgetContents &newCont);
897 void redo() override;
898 void undo() override;
899
900private:
901 QPointer<QTableWidget> m_tableWidget;
902 TableWidgetContents m_oldContents;
903 TableWidgetContents m_newContents;
904 DesignerIconCache *m_iconCache;
905};
906
907// Data structure representing the contents of a QTreeWidget with
908// methods to retrieve and apply for ChangeTreeContentsCommand
910
911 struct ItemContents : public ListContents {
912 ItemContents() = default;
913 ItemContents(const QTreeWidgetItem *item, bool editor);
914 QTreeWidgetItem *createTreeItem(DesignerIconCache *iconCache, bool editor) const;
915
916 int m_itemFlags = -1;
917 //bool m_firstColumnSpanned:1;
918 //bool m_hidden:1;
919 //bool m_expanded:1;
920 QList<ItemContents> m_children;
921
923 bool comparesEqual(const ItemContents &lhs,
924 const ItemContents &rhs) noexcept;
925 Q_DECLARE_EQUALITY_COMPARABLE(ItemContents)
926 };
927
928 void clear();
929
930 void fromTreeWidget(const QTreeWidget *treeWidget, bool editor);
931 void applyToTreeWidget(QTreeWidget *treeWidget, DesignerIconCache *iconCache, bool editor) const;
932
933 ListContents m_headerItem;
934 QList<ItemContents> m_rootItems;
935
936 friend bool comparesEqual(const TreeWidgetContents &lhs,
937 const TreeWidgetContents &rhs) noexcept
938 {
939 return lhs.m_headerItem == rhs.m_headerItem && lhs.m_rootItems == rhs.m_rootItems;
940 }
941 Q_DECLARE_EQUALITY_COMPARABLE(TreeWidgetContents)
942};
943
944class QDESIGNER_SHARED_EXPORT ChangeTreeContentsCommand: public QDesignerFormWindowCommand
945{
946
947public:
948 explicit ChangeTreeContentsCommand(QDesignerFormWindowInterface *formWindow);
949
950 void init(QTreeWidget *treeWidget, const TreeWidgetContents &oldState, const TreeWidgetContents &newState);
951 void redo() override;
952 void undo() override;
953 enum ApplyIconStrategy {
954 SetIconStrategy,
955 ResetIconStrategy
956 };
957private:
958 QPointer<QTreeWidget> m_treeWidget;
959 TreeWidgetContents m_oldState;
960 TreeWidgetContents m_newState;
961 DesignerIconCache *m_iconCache;
962};
963
964class QDESIGNER_SHARED_EXPORT ChangeListContentsCommand: public QDesignerFormWindowCommand
965{
966
967public:
968 explicit ChangeListContentsCommand(QDesignerFormWindowInterface *formWindow);
969
970 void init(QListWidget *listWidget, const ListContents &oldItems, const ListContents &items);
971 void init(QComboBox *comboBox, const ListContents &oldItems, const ListContents &items);
972 void redo() override;
973 void undo() override;
974private:
975 QPointer<QListWidget> m_listWidget;
976 QPointer<QComboBox> m_comboBox;
977 ListContents m_oldItemsState;
978 ListContents m_newItemsState;
979 DesignerIconCache *m_iconCache;
980};
981
982class QDESIGNER_SHARED_EXPORT AddActionCommand : public QDesignerFormWindowCommand
983{
984
985public:
986 explicit AddActionCommand(QDesignerFormWindowInterface *formWindow);
987 void init(QAction *action);
988 void redo() override;
989 void undo() override;
990private:
991 QAction *m_action;
992};
993
994// Note: This command must be executed within a macro since it
995// makes the form emit objectRemoved() which might cause other components
996// to add commands (for example, removal of signals and slots
997class QDESIGNER_SHARED_EXPORT RemoveActionCommand : public QDesignerFormWindowCommand
998{
999
1000public:
1001 explicit RemoveActionCommand(QDesignerFormWindowInterface *formWindow);
1002 void init(QAction *action);
1003 void redo() override;
1004 void undo() override;
1005
1006 struct ActionDataItem {
1007 ActionDataItem(QAction *_before = nullptr, QWidget *_widget = nullptr)
1008 : before(_before), widget(_widget) {}
1009 QAction *before;
1010 QWidget *widget;
1011 };
1012 using ActionData = QList<ActionDataItem>;
1013
1014private:
1015 QAction *m_action;
1016
1017 ActionData m_actionData;
1018};
1019
1021{
1022
1023protected:
1024 ActionInsertionCommand(const QString &text, QDesignerFormWindowInterface *formWindow);
1025
1026public:
1027 void init(QWidget *parentWidget, QAction *action, QAction *beforeAction = nullptr, bool update = true);
1028
1029protected:
1030 void insertAction();
1031 void removeAction();
1032
1033private:
1034 QWidget *m_parentWidget;
1035 QAction *m_action;
1036 QAction *m_beforeAction;
1037 bool m_update;
1038};
1039
1041{
1042
1043public:
1044 explicit InsertActionIntoCommand(QDesignerFormWindowInterface *formWindow);
1045
1048};
1049
1051{
1052
1053public:
1054 explicit RemoveActionFromCommand(QDesignerFormWindowInterface *formWindow);
1055
1058};
1059
1061{
1062public:
1063 void init(QAction *action, QAction *actionBefore, QWidget *associatedWidget, QWidget *objectToSelect);
1064
1065protected:
1066 MenuActionCommand(const QString &text, QDesignerFormWindowInterface *formWindow);
1067 void insertMenu();
1068 void removeMenu();
1069
1070private:
1071 QAction *m_action;
1072 QAction *m_actionBefore;
1073 QWidget *m_menuParent;
1074 QWidget *m_associatedWidget;
1075 QWidget *m_objectToSelect;
1076};
1077
1079{
1080
1081public:
1082 explicit AddMenuActionCommand(QDesignerFormWindowInterface *formWindow);
1083
1086};
1087
1089{
1090
1091public:
1092 explicit RemoveMenuActionCommand(QDesignerFormWindowInterface *formWindow);
1093
1096};
1097
1099{
1100
1101public:
1102 explicit CreateSubmenuCommand(QDesignerFormWindowInterface *formWindow);
1103 void init(QDesignerMenu *menu, QAction *action, QObject *m_objectToSelect = nullptr);
1104 void redo() override;
1105 void undo() override;
1106private:
1107 QAction *m_action;
1108 QDesignerMenu *m_menu;
1109 QObject *m_objectToSelect;
1110};
1111
1112} // namespace qdesigner_internal
1113
1114QT_END_NAMESPACE
1115
1116#endif // QDESIGNER_COMMAND_H
static bool canBeBuddy(QWidget *w, QDesignerFormWindowInterface *form)
static QString buddy(QLabel *label, QDesignerFormEditorInterface *core)
static constexpr auto buddyPropertyC
#define QT_BUDDYEDITOR_EXPORT
The QDesignerMetaDataBaseItemInterface class provides an interface to individual items in \QD's meta ...
friend class QWidget
Definition qpainter.h:421
void init(QWidget *parentWidget, QAction *action, QAction *beforeAction=nullptr, bool update=true)
ActionInsertionCommand(const QString &text, QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
AddMenuActionCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
AddStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void init(QStackedWidget *stackedWidget, InsertionMode mode)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
void init(QTabWidget *tabWidget, InsertionMode mode)
AddTabPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
AddToolBarCommand(QDesignerFormWindowInterface *formWindow)
void init(QMainWindow *mainWindow, Qt::ToolBarArea area)
void undo() override
Reverts a change to the document.
AddToolBoxPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QToolBox *toolBox, InsertionMode mode)
void undo() override
Reverts a change to the document.
void setBackground(QWidget *background) override
QDesignerFormWindowInterface * formWindow() const
void endConnection(QWidget *target, const QPoint &pos) override
void widgetRemoved(QWidget *w) override
QWidget * widgetAt(const QPoint &pos) const override
Connection * createConnection(QWidget *source, QWidget *destination) override
void createContextMenu(QMenu &menu) override
CreateMenuBarCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
CreateStatusBarCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void init(QDesignerMenu *menu, QAction *action, QObject *m_objectToSelect=nullptr)
CreateSubmenuCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void restore(QDesignerFormWindowInterface *formWindow) const
void save(const QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
DeleteMenuBarCommand(QDesignerFormWindowInterface *formWindow)
DeleteStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
DeleteTabPageCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
DeleteToolBarCommand(QDesignerFormWindowInterface *formWindow)
DeleteToolBoxPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
DockWidgetCommand(const QString &description, QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
InsertActionIntoCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QAction *action, QAction *actionBefore, QWidget *associatedWidget, QWidget *objectToSelect)
MenuActionCommand(const QString &text, QDesignerFormWindowInterface *formWindow)
void init(QStackedWidget *stackedWidget, QWidget *page, int newIndex)
MoveStackedWidgetCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
void undo() override
Reverts a change to the document.
MoveTabPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QTabWidget *tabWidget, QWidget *page, const QIcon &icon, const QString &label, int index, int newIndex)
MoveToolBoxPageCommand(QDesignerFormWindowInterface *formWindow)
void redo() override
Applies a change to the document.
void init(QToolBox *toolBox, QWidget *page, int newIndex)
void undo() override
Reverts a change to the document.
RemoveActionFromCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
RemoveMenuActionCommand(QDesignerFormWindowInterface *formWindow)
void undo() override
Reverts a change to the document.
void redo() override
Applies a change to the document.
StackedWidgetCommand(QDesignerFormWindowInterface *formWindow)
void init(QStackedWidget *stackedWidget)
TabWidgetCommand(QDesignerFormWindowInterface *formWindow)
ToolBoxCommand(QDesignerFormWindowInterface *formWindow)
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
static QUndoCommand * createBuddyCommand(QDesignerFormWindowInterface *fw, QLabel *label, QWidget *buddy)
#define QDESIGNER_SHARED_EXPORT