上下文类
类 Core::ContextThe Context 类实现了一系列上下文 ID。 更多...
头文件 | #include <coreplugin/icontext.h> |
公共类型
公共函数
上下文() | |
Context(Utils::Id c1) | |
Context(Utils::Id c1, Utils::Id c2) | |
Context(Utils::Id c1, Utils::Id c2, Utils::Id c3) | |
void | add(const Core::Context &c) |
void | add(Utils::Id 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::IContext, Core::ActionManager,以及 动作管理器和命令。
成员函数文档
[constexpr noexcept]
Context::Context()
创建一个代表全局上下文的上下文列表。
[explicit]
Context::Context(Utils::Id c1)
创建一个只有一个 ID 加工 的上下文列表。
Context::Context(Utils::Id c1, Utils::Id c2)
创建一个包含 ID 加工 和 加工 的上下文列表。
上下文::Context(Utils::Id c1, Utils::Id c2, Utils::Id c3)
创建一个包含ID c1、c2 和 c3 的上下文列表。
void Context::add(const Core::Context &c)
将上下文列表 c 添加到该上下文列表的末尾。
void Context::add(Utils::Id c)
将ID 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的数量。
©2024 Qt公司 Ltd. 本文档的贡献者是各自所有权的著作权人。提供的文档是根据自由软件基金会发布的GNU自由文档许可协议版本1.3的条款许可的。Qt及其标志是芬兰以及全球其他国家的Qt公司的商标。所有其他商标均为其各自所有者的财产。