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
290
307
321
322// Mixin class for storing the selection state
325public:
327
328 void save(const QDesignerFormWindowInterface *formWindow);
329 void restore(QDesignerFormWindowInterface *formWindow) const;
330
331private:
333 WidgetPointerList m_selection;
334 QPointer<QWidget> m_current;
335};
336
337class QDESIGNER_SHARED_EXPORT LayoutCommand: public QDesignerFormWindowCommand
338{
339
340public:
341 explicit LayoutCommand(QDesignerFormWindowInterface *formWindow);
342 ~LayoutCommand() override;
343
344 QWidgetList widgets() const { return m_widgets; }
345
346 void init(QWidget *parentWidget, const QWidgetList &widgets, LayoutInfo::Type layoutType,
347 QWidget *layoutBase = nullptr,
348 // Reparent/Hide instances of QLayoutWidget.
349 bool reparentLayoutWidget = true);
350
351 void redo() override;
352 void undo() override;
353
354private:
355 QPointer<QWidget> m_parentWidget;
356 QWidgetList m_widgets;
357 QPointer<QWidget> m_layoutBase;
358 QPointer<Layout> m_layout;
359 CursorSelectionState m_cursorSelectionState;
360 bool m_setup;
361};
362
363class QDESIGNER_SHARED_EXPORT BreakLayoutCommand: public QDesignerFormWindowCommand
364{
365
366public:
367 explicit BreakLayoutCommand(QDesignerFormWindowInterface *formWindow);
368 ~BreakLayoutCommand() override;
369
370 QWidgetList widgets() const { return m_widgets; }
371
372 void init(const QWidgetList &widgets, QWidget *layoutBase,
373 // Reparent/Hide instances of QLayoutWidget.
374 bool reparentLayoutWidget = true);
375
376 void redo() override;
377 void undo() override;
378
379 // Access the properties of the layout, 0 in case of splitters.
380 const LayoutProperties *layoutProperties() const;
381 int propertyMask() const;
382
383private:
384 QWidgetList m_widgets;
385 QPointer<QWidget> m_layoutBase;
386 QPointer<Layout> m_layout;
387 LayoutHelper* m_layoutHelper;
388 LayoutProperties *m_properties;
389 int m_propertyMask;
390 CursorSelectionState m_cursorSelectionState;
391};
392
393class QDESIGNER_SHARED_EXPORT SimplifyLayoutCommand: public QDesignerFormWindowCommand
394{
395public:
396 explicit SimplifyLayoutCommand(QDesignerFormWindowInterface *formWindow);
397 ~SimplifyLayoutCommand() override;
398
399 bool init(QWidget *layoutBase);
400
401 // Quick check
402 static bool canSimplify(QDesignerFormEditorInterface *core, const QWidget *w, int *layoutType = nullptr);
403
404 void redo() override;
405 void undo() override;
406
407private:
408 const QRect m_area;
409 QWidget *m_layoutBase;
410 LayoutHelper* m_layoutHelper;
411 bool m_layoutSimplified;
412};
413
415{
416
417public:
418 explicit ToolBoxCommand(QDesignerFormWindowInterface *formWindow);
420
421 void init(QToolBox *toolBox);
422
423protected:
424 void removePage();
425 void addPage();
426
430 QString m_itemText;
432};
433
435{
436
437public:
438 explicit MoveToolBoxPageCommand(QDesignerFormWindowInterface *formWindow);
440
441 void init(QToolBox *toolBox, QWidget *page, int newIndex);
442
443 void redo() override;
444 void undo() override;
445
446private:
447 int m_newIndex;
448 int m_oldIndex;
449};
450
452{
453
454public:
455 explicit DeleteToolBoxPageCommand(QDesignerFormWindowInterface *formWindow);
457
458 void init(QToolBox *toolBox);
459
460 void redo() override;
461 void undo() override;
462};
463
465{
466
467public:
472 explicit AddToolBoxPageCommand(QDesignerFormWindowInterface *formWindow);
474
475 void init(QToolBox *toolBox);
476 void init(QToolBox *toolBox, InsertionMode mode);
477
478 void redo() override;
479 void undo() override;
480};
481
483{
484
485public:
486 explicit TabWidgetCommand(QDesignerFormWindowInterface *formWindow);
488
489 void init(QTabWidget *tabWidget);
490
491protected:
492 void removePage();
493 void addPage();
494
498 QString m_itemText;
500};
501
503{
504
505public:
506 explicit DeleteTabPageCommand(QDesignerFormWindowInterface *formWindow);
508
509 void init(QTabWidget *tabWidget);
510
511 void redo() override;
512 void undo() override;
513};
514
516{
517
518public:
523 explicit AddTabPageCommand(QDesignerFormWindowInterface *formWindow);
525
526 void init(QTabWidget *tabWidget);
527 void init(QTabWidget *tabWidget, InsertionMode mode);
528
529 void redo() override;
530 void undo() override;
531};
532
534{
535
536public:
537 explicit MoveTabPageCommand(QDesignerFormWindowInterface *formWindow);
539
540 void init(QTabWidget *tabWidget, QWidget *page,
541 const QIcon &icon, const QString &label,
542 int index, int newIndex);
543
544 void redo() override;
545 void undo() override;
546
547private:
548 int m_newIndex;
549 int m_oldIndex;
550 QPointer<QWidget> m_page;
551 QString m_label;
552 QIcon m_icon;
553};
554
556{
557
558public:
559 explicit StackedWidgetCommand(QDesignerFormWindowInterface *formWindow);
561
562 void init(QStackedWidget *stackedWidget);
563
564protected:
565 void removePage();
566 void addPage();
567
571};
572
574{
575
576public:
577 explicit MoveStackedWidgetCommand(QDesignerFormWindowInterface *formWindow);
579
580 void init(QStackedWidget *stackedWidget, QWidget *page, int newIndex);
581
582 void redo() override;
583 void undo() override;
584
585private:
586 int m_newIndex;
587 int m_oldIndex;
588};
589
591{
592
593public:
594 explicit DeleteStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
596
597 void init(QStackedWidget *stackedWidget);
598
599 void redo() override;
600 void undo() override;
601};
602
604{
605
606public:
611 explicit AddStackedWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
613
614 void init(QStackedWidget *stackedWidget);
615 void init(QStackedWidget *stackedWidget, InsertionMode mode);
616
617 void redo() override;
618 void undo() override;
619};
620
622{
623
624public:
625 explicit CreateMenuBarCommand(QDesignerFormWindowInterface *formWindow);
626
627 void init(QMainWindow *mainWindow);
628
629 void undo() override;
630 void redo() override;
631
632private:
633 QPointer<QMainWindow> m_mainWindow;
634 QPointer<QMenuBar> m_menuBar;
635};
636
638{
639
640public:
641 explicit DeleteMenuBarCommand(QDesignerFormWindowInterface *formWindow);
642
643 void init(QMenuBar *menuBar);
644
645 void undo() override;
646 void redo() override;
647
648private:
649 QPointer<QMainWindow> m_mainWindow;
650 QPointer<QMenuBar> m_menuBar;
651};
652
654{
655
656public:
657 explicit CreateStatusBarCommand(QDesignerFormWindowInterface *formWindow);
658
659 void init(QMainWindow *mainWindow);
660
661 void undo() override;
662 void redo() override;
663
664private:
665 QPointer<QMainWindow> m_mainWindow;
666 QPointer<QStatusBar> m_statusBar;
667};
668
669class QDESIGNER_SHARED_EXPORT DeleteStatusBarCommand: public QDesignerFormWindowCommand
670{
671
672public:
673 explicit DeleteStatusBarCommand(QDesignerFormWindowInterface *formWindow);
674
675 void init(QStatusBar *statusBar);
676
677 void undo() override;
678 void redo() override;
679
680private:
681 QPointer<QMainWindow> m_mainWindow;
682 QPointer<QStatusBar> m_statusBar;
683};
684
686{
687
688public:
689 explicit AddToolBarCommand(QDesignerFormWindowInterface *formWindow);
690
691 void init(QMainWindow *mainWindow, Qt::ToolBarArea area);
692
693 void undo() override;
694 void redo() override;
695
696private:
697 QPointer<QMainWindow> m_mainWindow;
698 QPointer<QToolBar> m_toolBar;
699};
700
702{
703
704public:
705 explicit DeleteToolBarCommand(QDesignerFormWindowInterface *formWindow);
706
707 void init(QToolBar *toolBar);
708
709 void undo() override;
710 void redo() override;
711
712private:
713 QPointer<QMainWindow> m_mainWindow;
714 QPointer<QToolBar> m_toolBar;
715};
716
718{
719
720public:
721 explicit DockWidgetCommand(const QString &description, QDesignerFormWindowInterface *formWindow);
723
724 void init(QDockWidget *dockWidget);
725
726protected:
728};
729
730class QDESIGNER_SHARED_EXPORT AddDockWidgetCommand: public QDesignerFormWindowCommand
731{
732
733public:
734 explicit AddDockWidgetCommand(QDesignerFormWindowInterface *formWindow);
735
736 void init(QMainWindow *mainWindow, QDockWidget *dockWidget);
737 void init(QMainWindow *mainWindow);
738
739 void undo() override;
740 void redo() override;
741
742private:
743 QPointer<QMainWindow> m_mainWindow;
744 QPointer<QDockWidget> m_dockWidget;
745};
746
747class QDESIGNER_SHARED_EXPORT ContainerWidgetCommand: public QDesignerFormWindowCommand
748{
749
750public:
751 explicit ContainerWidgetCommand(QDesignerFormWindowInterface *formWindow);
752 ~ContainerWidgetCommand() override;
753
754 QDesignerContainerExtension *containerExtension() const;
755
756 void init(QWidget *containerWidget);
757
758protected:
759 void removePage();
760 void addPage();
761
762 QPointer<QWidget> m_containerWidget;
763 QPointer<QWidget> m_widget;
764 int m_index;
765};
766
768{
769
770public:
771 explicit DeleteContainerWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
772 ~DeleteContainerWidgetPageCommand() override;
773
774 void init(QWidget *containerWidget, ContainerType ct);
775
776 void redo() override;
777 void undo() override;
778};
779
780class QDESIGNER_SHARED_EXPORT AddContainerWidgetPageCommand: public ContainerWidgetCommand
781{
782
783public:
784 enum InsertionMode {
785 InsertBefore,
786 InsertAfter
787 };
788 explicit AddContainerWidgetPageCommand(QDesignerFormWindowInterface *formWindow);
789 ~AddContainerWidgetPageCommand() override;
790
791 void init(QWidget *containerWidget, ContainerType ct, InsertionMode mode);
792
793 void redo() override;
794 void undo() override;
795};
796
797class QDESIGNER_SHARED_EXPORT ChangeCurrentPageCommand: public QDesignerFormWindowCommand
798{
799
800public:
801 explicit ChangeCurrentPageCommand(QDesignerFormWindowInterface *formWindow);
802 ~ChangeCurrentPageCommand() override;
803
804 QDesignerContainerExtension *containerExtension() const;
805
806 void init(QWidget *containerWidget, int newIndex);
807
808 void redo() override;
809 void undo() override;
810
811protected:
812 QPointer<QWidget> m_containerWidget;
813 QPointer<QWidget> m_widget;
814 int m_oldIndex;
815 int m_newIndex;
816};
817
819 ItemData() = default;
820
821 ItemData(const QListWidgetItem *item, bool editor);
822 ItemData(const QTableWidgetItem *item, bool editor);
823 ItemData(const QTreeWidgetItem *item, int column);
824 QListWidgetItem *createListItem(DesignerIconCache *iconCache, bool editor) const;
825 QTableWidgetItem *createTableItem(DesignerIconCache *iconCache, bool editor) const;
826 void fillTreeItemColumn(QTreeWidgetItem *item, int column, DesignerIconCache *iconCache) const;
827
828 bool isValid() const { return !m_properties.isEmpty(); }
829
830 QHash<int, QVariant> m_properties;
831
832 friend bool comparesEqual(const ItemData &lhs, const ItemData &rhs) noexcept
833 {
834 return lhs.m_properties == rhs.m_properties;
835 }
836 Q_DECLARE_EQUALITY_COMPARABLE(ItemData)
837};
838
840 ListContents() = default;
841
842 ListContents(const QTreeWidgetItem *item);
843 QTreeWidgetItem *createTreeItem(DesignerIconCache *iconCache) const;
844
845 void createFromListWidget(const QListWidget *listWidget, bool editor);
846 void applyToListWidget(QListWidget *listWidget, DesignerIconCache *iconCache,
847 bool editor,
848 Qt::Alignment alignmentDefault = Qt::AlignLeading | Qt::AlignVCenter) const;
849 void createFromComboBox(const QComboBox *listWidget);
850 void applyToComboBox(QComboBox *listWidget, DesignerIconCache *iconCache) const;
851
852 QList<ItemData> m_items;
853
854 friend bool comparesEqual(const ListContents &lhs, const ListContents &rhs) noexcept
855 {
856 return lhs.m_items == rhs.m_items;
857 }
858 Q_DECLARE_EQUALITY_COMPARABLE(ListContents)
859};
860
861// Data structure representing the contents of a QTableWidget with
862// methods to retrieve and apply for ChangeTableContentsCommand
864
865 using CellRowColumnAddress = std::pair<int, int>;
866
867 TableWidgetContents();
868 void clear();
869
870 void fromTableWidget(const QTableWidget *tableWidget, bool editor);
871 void applyToTableWidget(QTableWidget *tableWidget, DesignerIconCache *iconCache, bool editor) const;
872
873 static bool nonEmpty(const QTableWidgetItem *item, int headerColumn);
874 static QString defaultHeaderText(int i);
875 static void insertHeaderItem(const QTableWidgetItem *item, int i, ListContents *header, bool editor);
876
877 int m_columnCount = 0;
878 int m_rowCount = 0;
879 ListContents m_horizontalHeader;
880 ListContents m_verticalHeader;
881 QMap<CellRowColumnAddress, ItemData> m_items;
882
884 bool comparesEqual(const TableWidgetContents &lhs,
885 const TableWidgetContents &rhs) noexcept;
886 Q_DECLARE_EQUALITY_COMPARABLE(TableWidgetContents)
887};
888
889class QDESIGNER_SHARED_EXPORT ChangeTableContentsCommand: public QDesignerFormWindowCommand
890{
891public:
892 explicit ChangeTableContentsCommand(QDesignerFormWindowInterface *formWindow);
893
894 void init(QTableWidget *tableWidget, const TableWidgetContents &oldCont, const TableWidgetContents &newCont);
895 void redo() override;
896 void undo() override;
897
898private:
899 QPointer<QTableWidget> m_tableWidget;
900 TableWidgetContents m_oldContents;
901 TableWidgetContents m_newContents;
902 DesignerIconCache *m_iconCache;
903};
904
905// Data structure representing the contents of a QTreeWidget with
906// methods to retrieve and apply for ChangeTreeContentsCommand
908
909 struct ItemContents : public ListContents {
910 ItemContents() = default;
911 ItemContents(const QTreeWidgetItem *item, bool editor);
912 QTreeWidgetItem *createTreeItem(DesignerIconCache *iconCache, bool editor) const;
913
914 int m_itemFlags = -1;
915 //bool m_firstColumnSpanned:1;
916 //bool m_hidden:1;
917 //bool m_expanded:1;
918 QList<ItemContents> m_children;
919
921 bool comparesEqual(const ItemContents &lhs,
922 const ItemContents &rhs) noexcept;
923 Q_DECLARE_EQUALITY_COMPARABLE(ItemContents)
924 };
925
926 void clear();
927
928 void fromTreeWidget(const QTreeWidget *treeWidget, bool editor);
929 void applyToTreeWidget(QTreeWidget *treeWidget, DesignerIconCache *iconCache, bool editor) const;
930
931 ListContents m_headerItem;
932 QList<ItemContents> m_rootItems;
933
934 friend bool comparesEqual(const TreeWidgetContents &lhs,
935 const TreeWidgetContents &rhs) noexcept
936 {
937 return lhs.m_headerItem == rhs.m_headerItem && lhs.m_rootItems == rhs.m_rootItems;
938 }
939 Q_DECLARE_EQUALITY_COMPARABLE(TreeWidgetContents)
940};
941
942class QDESIGNER_SHARED_EXPORT ChangeTreeContentsCommand: public QDesignerFormWindowCommand
943{
944
945public:
946 explicit ChangeTreeContentsCommand(QDesignerFormWindowInterface *formWindow);
947
948 void init(QTreeWidget *treeWidget, const TreeWidgetContents &oldState, const TreeWidgetContents &newState);
949 void redo() override;
950 void undo() override;
951 enum ApplyIconStrategy {
952 SetIconStrategy,
953 ResetIconStrategy
954 };
955private:
956 QPointer<QTreeWidget> m_treeWidget;
957 TreeWidgetContents m_oldState;
958 TreeWidgetContents m_newState;
959 DesignerIconCache *m_iconCache;
960};
961
962class QDESIGNER_SHARED_EXPORT ChangeListContentsCommand: public QDesignerFormWindowCommand
963{
964
965public:
966 explicit ChangeListContentsCommand(QDesignerFormWindowInterface *formWindow);
967
968 void init(QListWidget *listWidget, const ListContents &oldItems, const ListContents &items);
969 void init(QComboBox *comboBox, const ListContents &oldItems, const ListContents &items);
970 void redo() override;
971 void undo() override;
972private:
973 QPointer<QListWidget> m_listWidget;
974 QPointer<QComboBox> m_comboBox;
975 ListContents m_oldItemsState;
976 ListContents m_newItemsState;
977 DesignerIconCache *m_iconCache;
978};
979
980class QDESIGNER_SHARED_EXPORT AddActionCommand : public QDesignerFormWindowCommand
981{
982
983public:
984 explicit AddActionCommand(QDesignerFormWindowInterface *formWindow);
985 void init(QAction *action);
986 void redo() override;
987 void undo() override;
988private:
989 QAction *m_action = nullptr;
990};
991
992// Note: This command must be executed within a macro since it
993// makes the form emit objectRemoved() which might cause other components
994// to add commands (for example, removal of signals and slots
995class QDESIGNER_SHARED_EXPORT RemoveActionCommand : public QDesignerFormWindowCommand
996{
997
998public:
999 explicit RemoveActionCommand(QDesignerFormWindowInterface *formWindow);
1000 void init(QAction *action);
1001 void redo() override;
1002 void undo() override;
1003
1004 struct ActionDataItem {
1005 ActionDataItem(QAction *_before = nullptr, QWidget *_widget = nullptr)
1006 : before(_before), widget(_widget) {}
1007 QAction *before;
1008 QWidget *widget;
1009 };
1010 using ActionData = QList<ActionDataItem>;
1011
1012private:
1013 QAction *m_action = nullptr;
1014
1015 ActionData m_actionData;
1016};
1017
1019{
1020
1021protected:
1022 ActionInsertionCommand(const QString &text, QDesignerFormWindowInterface *formWindow);
1023
1024public:
1025 void init(QWidget *parentWidget, QAction *action, QAction *beforeAction = nullptr, bool update = true);
1026
1027protected:
1028 void insertAction();
1029 void removeAction();
1030
1031private:
1032 QWidget *m_parentWidget;
1033 QAction *m_action;
1034 QAction *m_beforeAction;
1035 bool m_update;
1036};
1037
1039{
1040
1041public:
1042 explicit InsertActionIntoCommand(QDesignerFormWindowInterface *formWindow);
1043
1046};
1047
1049{
1050
1051public:
1052 explicit RemoveActionFromCommand(QDesignerFormWindowInterface *formWindow);
1053
1056};
1057
1059{
1060public:
1061 void init(QAction *action, QAction *actionBefore, QWidget *associatedWidget, QWidget *objectToSelect);
1062
1063protected:
1064 MenuActionCommand(const QString &text, QDesignerFormWindowInterface *formWindow);
1065 void insertMenu();
1066 void removeMenu();
1067
1068private:
1069 QAction *m_action;
1070 QAction *m_actionBefore;
1071 QWidget *m_menuParent;
1072 QWidget *m_associatedWidget;
1073 QWidget *m_objectToSelect;
1074};
1075
1077{
1078
1079public:
1080 explicit AddMenuActionCommand(QDesignerFormWindowInterface *formWindow);
1081
1084};
1085
1087{
1088
1089public:
1090 explicit RemoveMenuActionCommand(QDesignerFormWindowInterface *formWindow);
1091
1094};
1095
1097{
1098
1099public:
1100 explicit CreateSubmenuCommand(QDesignerFormWindowInterface *formWindow);
1101 void init(QDesignerMenu *menu, QAction *action, QObject *m_objectToSelect = nullptr);
1102 void redo() override;
1103 void undo() override;
1104private:
1105 QAction *m_action;
1106 QDesignerMenu *m_menu;
1107 QObject *m_objectToSelect;
1108};
1109
1110} // namespace qdesigner_internal
1111
1112QT_END_NAMESPACE
1113
1114#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:431
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