Context Class

(Core::Context)

The Context class implements a list of context IDs. More...

Header: #include <coreplugin/icontext.h>

Public Types

typedef const_iterator

Public Functions

Context()
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
bool operator==(const Core::Context &c) const

Detailed Description

The Context class implements a list of context IDs.

Contexts are used for registering actions with Core::ActionManager, and when creating UI elements that provide a context for actions.

See The Action Manager and Commands for an overview of how contexts are used.

See also Core::IContext, Core::ActionManager, and The Action Manager and Commands.

Member Type Documentation

typedef Context::const_iterator

The Context::const_iterator provides an STL-style const interator for Context.

Member Function Documentation

Context::Context()

Default constructs an instance of Context.

Context::Context(Utils::Id c1)

Default constructs an instance of Context.

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

Default constructs an instance of Context.

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

Default constructs an instance of Context.

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

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

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

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

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

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

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

bool Context::isEmpty() const

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

void Context::removeAt(int i)

int Context::size() const

bool Context::operator==(const Core::Context &c) const