このページでは

Core::Context Class

class Core::Context

Context クラスは、コンテキスト ID のリストを実装しています。詳細...

Header: #include <coreplugin/icontext.h>

パブリック型

パブリック関数

Context()
Context(Utils::Id c1)
Context(Utils::Id c1, Utils::Id c2)
Context(Utils::Id c1, Utils::Id c2, Utils::Id c3)
void add(Utils::Id c)
void add(const Core::Context &c)
Utils::Id at(int i) const
Core::Context::const_iterator begin() const
bool contains(Utils::Id c) const
Core::Context::const_iterator end() const
int indexOf(Utils::Id c) const
bool isEmpty() const
void prepend(Utils::Id c)
void removeAt(int i)
int size() const

詳細な説明

コンテキストは、Core::ActionManager へのアクションの登録や、アクションのコンテキストを提供する UI 要素の作成に使用されます。

コンテキストの使用方法の概要については、「アクションマネージャとコマンド」を参照してください。

「 Core::IContext 」、「Core::ActionManager 」、および「アクションマネージャーとコマンド」も参照してください 。

メンバ型のドキュメント

[alias] Context::const_iterator

Context::const_iterator は、Context 用の STL スタイルの const イテレータを提供します。

メンバ関数のドキュメント

[constexpr noexcept] Context::Context()

グローバルコンテキストを表すコンテキストリストを作成します。

[explicit] Context::Context(Utils::Id c1)

IDがc1 のコンテキストリストを作成します。

Context::Context(Utils::Id c1, Utils::Id c2)

IDがc1 およびc2 のコンテキストリストを作成します。

Context::Context(Utils::Id c1, Utils::Id c2, Utils::Id c3)

IDがc1 、c2 、c3 のコンテキストリストを作成します。

void Context::add(Utils::Id c)

コンテキストリストの末尾に ID「c 」を追加します。

void Context::add(const Core::Context &c)

このコンテキストリストの末尾に、コンテキストリスト「c 」を追加します。

Utils::Id Context::at(int i) const

コンテキストリストのインデックスi にあるIDを返します。

Core::Context::const_iterator Context::begin() const

コンテキストリストの最初の ID を指す STL スタイルのイテレータを返します。

bool Context::contains(Utils::Id c) const

このコンテキストリストに ID「c 」が含まれているかどうかを返します。

Core::Context::const_iterator Context::end() const

コンテキストリスト内の最後の ID の後に続く、架空の項目を指す STL 形式のイテレータを返します。

int Context::indexOf(Utils::Id c) const

コンテキストリスト内の ID「c 」のインデックス位置を返します。一致する項目がない場合は -1 を返します。

bool Context::isEmpty() const

このコンテキストリストが空であり、したがってデフォルトで構築されているかどうかを返します。

void Context::prepend(Utils::Id c)

ID「c 」をコンテキストリストの最初の項目として追加します。

void Context::removeAt(int i)

インデックスi にあるIDをコンテキストリストから削除します。

int Context::size() const

コンテキストリストに含まれるIDの数を返します。

Copyright © The Qt Company Ltd. and other contributors. 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.