このページでは

QDesignerFormWindowManagerInterface Class

QDesignerFormWindowManagerInterface クラスを使用すると、Qt Widgets Designer のフォームウィンドウのコレクションを操作したり、Qt Widgets Designer のフォーム編集アクションを制御したりできます。詳細...

ヘッダー #include <QDesignerFormWindowManagerInterface>
CMake: find_package(Qt6 REQUIRED COMPONENTS Designer)
target_link_libraries(mytarget PRIVATE Qt6::Designer)
qmake: QT += designer
継承: QObject

パブリックな型

enum Action { CutAction, CopyAction, PasteAction, DeleteAction, SelectAllAction, …, FormWindowSettingsDialogAction }
enum ActionGroup { StyledPreviewActionGroup }

パブリック関数

QDesignerFormWindowManagerInterface(QObject *parent = nullptr)
virtual ~QDesignerFormWindowManagerInterface() override
virtual QAction *action(QDesignerFormWindowManagerInterface::Action action) const = 0
virtual QActionGroup *actionGroup(QDesignerFormWindowManagerInterface::ActionGroup actionGroup) const = 0
virtual QDesignerFormWindowInterface *activeFormWindow() const = 0
virtual QDesignerFormEditorInterface *core() const = 0
virtual QDesignerFormWindowInterface *createFormWindow(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()) = 0
virtual QPixmap createPreviewPixmap() const = 0
virtual QDesignerFormWindowInterface *formWindow(int index) const = 0
virtual int formWindowCount() const = 0

パブリックスロット

virtual void addFormWindow(QDesignerFormWindowInterface *formWindow) = 0
virtual void closeAllPreviews() = 0
virtual void removeFormWindow(QDesignerFormWindowInterface *formWindow) = 0
virtual void setActiveFormWindow(QDesignerFormWindowInterface *formWindow) = 0
virtual void showPluginDialog() = 0
virtual void showPreview() = 0

シグナル

void activeFormWindowChanged(QDesignerFormWindowInterface *formWindow)
void formWindowAdded(QDesignerFormWindowInterface *formWindow)
void formWindowRemoved(QDesignerFormWindowInterface *formWindow)
void formWindowSettingsChanged(QDesignerFormWindowInterface *formWindow)

詳細説明

QDesignerFormWindowManagerInterfaceは、直接インスタンス化することを意図していません。Qt Widgets Designer 、フォーム・ウィンドウ・マネージャを使用して、ワークスペース内のさまざまなフォーム・ウィンドウを制御します。QDesignerFormEditorInterface::formWindowManager() 関数を使用すると、Qt Widgets Designer のフォーム・ウィンドウ・マネージャへのインタフェースを取得できます。例えば

        auto *manager = formEditor->formWindowManager();
        auto *formWindow = manager->formWindow(0);

        manager->setActiveFormWindow(formWindow);

カスタムウィジェット・プラグインを実装する場合、Qt Widgets Designer'の現在のQDesignerFormEditorInterface オブジェクト(上記の例ではformEditor )へのポインタは、QDesignerCustomWidgetInterface::initialize() 関数のパラメータで提供されます。プラグインをQt Widgets Designer に公開するには、QDesignerCustomWidgetInterface をサブクラス化する必要があります。

フォーム・ウィンドウ・マネージャ・インターフェースはcreateFormWindow() 関数を提供し、addFormWindow() スロットを使用して、マネージャが保持するフォーム・ウィンドウのコレクションに新しいフォーム・ウィンドウを追加することができます。また、formWindowCount()関数は現在マネージャが管理しているフォームウィンドウの数を返し、formWindow()関数は指定されたインデックスに関連付けられたフォームウィンドウを返し、activeFormWindow()関数は現在選択されているフォームウィンドウを返します。removeFormWindow ()スロットを使用すると、マネージャが維持しなければならないフォーム・ウィンドウの数を減らすことができ、setActiveFormWindow ()スロットを使用すると、Qt Widgets Designer'のワークスペースでフォーム・ウィンドウのフォーカスを変更することができます。

さらに、QDesignerFormWindowManagerInterfaceには、Qt Widgets Designer'のフォーム編集アクションに介入して制御できるようにする関数のコレクションが含まれています。これらの関数はすべて元のアクションを返すので、介入後に関数をさらに伝搬させることができます。

最後に、このインターフェースは、フォーム・ウィンドウが追加されたとき、現在選択されているフォーム・ウィンドウが変更されたとき、フォーム・ウィンドウが削除されたときにそれぞれ発せられる3つのシグナルを提供します。すべてのシグナルは、フォーム・ウィンドウをパラメータとして持っています。

QDesignerFormEditorInterface およびQDesignerFormWindowInterfaceも参照

メンバー型ドキュメント

enum QDesignerFormWindowManagerInterface::Action

Qt Widgets Designer の動作を指定する。

定数説明
QDesignerFormWindowManagerInterface::CutAction100クリップボードカット
QDesignerFormWindowManagerInterface::CopyAction101クリップボードコピー
QDesignerFormWindowManagerInterface::PasteAction102クリップボードの貼り付け
QDesignerFormWindowManagerInterface::DeleteAction103クリップボード削除
QDesignerFormWindowManagerInterface::SelectAllAction104すべて選択
QDesignerFormWindowManagerInterface::LowerAction200現在のウィジェットを下げる
QDesignerFormWindowManagerInterface::RaiseAction201現在のウィジェットを上げる
QDesignerFormWindowManagerInterface::UndoAction300元に戻す
QDesignerFormWindowManagerInterface::RedoAction301やり直し
QDesignerFormWindowManagerInterface::HorizontalLayoutAction400使用してレイアウトするQHBoxLayout
QDesignerFormWindowManagerInterface::VerticalLayoutAction401使用してレイアウトするQVBoxLayout
QDesignerFormWindowManagerInterface::SplitHorizontalAction402水平にレイアウトQSplitter
QDesignerFormWindowManagerInterface::SplitVerticalAction403縦にレイアウトするQSplitter
QDesignerFormWindowManagerInterface::GridLayoutAction404使用してレイアウトするQGridLayout
QDesignerFormWindowManagerInterface::FormLayoutAction405使用してレイアウトするQFormLayout
QDesignerFormWindowManagerInterface::BreakLayoutAction406既存のレイアウトを崩す
QDesignerFormWindowManagerInterface::AdjustSizeAction407サイズ調整
QDesignerFormWindowManagerInterface::SimplifyLayoutAction408QGridLayout 、またはQFormLayout
QDesignerFormWindowManagerInterface::DefaultPreviewAction500デフォルトスタイルでプレビューを作成する
QDesignerFormWindowManagerInterface::FormWindowSettingsDialogAction600フォーム設定のダイアログを表示する

action()も参照して ください。

enum QDesignerFormWindowManagerInterface::ActionGroup

Qt Widgets Designer のアクショングループを指定する。

定数説明
QDesignerFormWindowManagerInterface::StyledPreviewActionGroup100スタイル付きプレビューアクションを含むアクショングループ

actionGroup()も参照してください

メンバ関数ドキュメント

[explicit] QDesignerFormWindowManagerInterface::QDesignerFormWindowManagerInterface(QObject *parent = nullptr)

フォームウィンドウマネージャ用に、与えられたparent を持つインターフェースを構築します。

[override virtual noexcept] QDesignerFormWindowManagerInterface::~QDesignerFormWindowManagerInterface()

フォームウィンドウマネージャのインターフェースを破棄します。

[pure virtual] QAction *QDesignerFormWindowManagerInterface::action(QDesignerFormWindowManagerInterface::Action action) const

列挙値action で指定されたアクションを返します。

Qt 4.X のアクションアクセサを削除します。

[pure virtual] QActionGroup *QDesignerFormWindowManagerInterface::actionGroup(QDesignerFormWindowManagerInterface::ActionGroup actionGroup) const

列挙値actionGroup で指定されたアクショングループを返します。

[pure virtual] QDesignerFormWindowInterface *QDesignerFormWindowManagerInterface::activeFormWindow() const

Qt Widgets Designer のワークスペースで現在アクティブなフォーム・ウィンドウを返します。

setActiveFormWindow() およびremoveFormWindow()も参照 ください。

[signal] void QDesignerFormWindowManagerInterface::activeFormWindowChanged(QDesignerFormWindowInterface *formWindow)

このシグナルは、Qt Widgets Designer'のワークスペースで現在アクティブなフォーム・ウィンドウの内容が変更されたときに発せられる。現在アクティブなformWindow へのポインタが引数として渡される。

activeFormWindow()も参照

[pure virtual slot] void QDesignerFormWindowManagerInterface::addFormWindow(QDesignerFormWindowInterface *formWindow)

指定されたformWindowQt Widgets Designer のフォームウィンドウマネージャが保持するウィンドウのコレクションに追加します。

formWindowAdded()も参照してください

[pure virtual slot] void QDesignerFormWindowManagerInterface::closeAllPreviews()

現在開いているすべてのプレビューを閉じる。

showPreview()も参照

[pure virtual] QDesignerFormEditorInterface *QDesignerFormWindowManagerInterface::core() const

Qt Widgets Designer'の現在のQDesignerFormEditorInterface オブジェクトへのポインタを返します。

[pure virtual] QDesignerFormWindowInterface *QDesignerFormWindowManagerInterface::createFormWindow(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags())

与えられたparent と与えられたウィンドウflags を持つフォームウィンドウを作成します。

addFormWindow()も参照してください

[pure virtual] QPixmap QDesignerFormWindowManagerInterface::createPreviewPixmap() const

現在アクティブなフォームのプレビューを表す pixmap を作成します。

[pure virtual] QDesignerFormWindowInterface *QDesignerFormWindowManagerInterface::formWindow(int index) const

与えられたindex のフォームウィンドウを返す。

setActiveFormWindow() およびremoveFormWindow()も参照

[signal] void QDesignerFormWindowManagerInterface::formWindowAdded(QDesignerFormWindowInterface *formWindow)

このシグナルは、Qt Widgets Designer'のフォーム・ウィンドウ・マネージャが保持するウィンドウ・コレクションに新しいフォーム・ウィンドウが追加されたときに発行される。新しいformWindow へのポインタが引数として渡される。

addFormWindow() およびsetActiveFormWindow()も参照

[pure virtual] int QDesignerFormWindowManagerInterface::formWindowCount() const

Qt Widgets Designer のフォームウィンドウマネージャが保持しているフォームウィンドウの数を返します。

[signal] void QDesignerFormWindowManagerInterface::formWindowRemoved(QDesignerFormWindowInterface *formWindow)

このシグナルは、Qt Widgets Designer'のフォーム・ウィンドウ・マネージャが保持するウィンドウ・コレクションからフォーム・ウィンドウが削除されたときに発行される。削除されたformWindow へのポインタが引数として渡される。

removeFormWindow()も参照

[signal] void QDesignerFormWindowManagerInterface::formWindowSettingsChanged(QDesignerFormWindowInterface *formWindow)

このシグナルはフォームウィンドウの設定が変更されたときに発せられる。ウィンドウのタイトルなどを適宜更新するために使用できる。引数としてformWindow へのポインタが渡される。

FormWindowSettingsDialogActionも参照して ください。

[pure virtual slot] void QDesignerFormWindowManagerInterface::removeFormWindow(QDesignerFormWindowInterface *formWindow)

Qt Widgets Designer のフォームウィンドウマネージャが保持するウィンドウのコレクションから、 指定されたformWindow を削除します。

formWindow() およびformWindowRemoved()も参照

[pure virtual slot] void QDesignerFormWindowManagerInterface::setActiveFormWindow(QDesignerFormWindowInterface *formWindow)

与えられたformWindow を、Qt Widgets Designer のワークスペースで現在アクティブなフォーム・ウィンドウに設定します。

activeFormWindow() およびactiveFormWindowChanged()も参照

[pure virtual slot] void QDesignerFormWindowManagerInterface::showPluginDialog()

Qt Widgets Designer で読み込まれたプラグインと、そのプラグインの読み込み失敗を表示するダイアログを開きます。

[pure virtual slot] void QDesignerFormWindowManagerInterface::showPreview()

デフォルトのパラメータを使って、現在のフォームのプレビューを表示する。

closeAllPreviews()も参照

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.