QDesignerFormWindowManagerInterface Class

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

ヘッダー #include <QDesignerFormWindowManagerInterface>
CMake.QDesignerFormWindowManagerInterfaceクラス 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()
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 を持つインターフェースを構築します。

[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)

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

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)

指定されたformWindowQt Widgets Designer のワークスペースで現在アクティブなフォーム・ウィンドウに設定します。

activeFormWindow() およびactiveFormWindowChanged()も参照してください

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

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

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

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

closeAllPreviews()も参照

© 2025 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.