Na tej strani

Core::Context Class

class Core::Context

Razred Context vsebuje seznam identifikatorjev konteksta. Več...

Header: #include <coreplugin/icontext.h>

Javni tipi

Javne funkcije

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

Podroben opis

Konteksti se uporabljajo za registracijo akcij pri upravitelju akcij ( Core::ActionManager) ter pri ustvarjanju elementov uporabniškega vmesnika, ki zagotavljajo kontekst za akcije.

Za pregled uporabe kontekstov glejte Upravitelj dejanj in ukazi.

Glejte tudi Core::IContext, Core::ActionManager ter Upravitelj akcij in ukazi.

Dokumentacija o tipu člana

[alias] Context::const_iterator

Context::const_iterator zagotavlja konstanten iterator v slogu STL za Context.

Dokumentacija o funkcijah članic

[constexpr noexcept] Context::Context()

Ustvari seznam kontekstov, ki predstavlja globalni kontekst.

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

Ustvari seznam kontekstov z enim samim ID-jem c1.

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

Ustvari seznam kontekstov z identifikatorjema c1 in c2.

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

Ustvari seznam kontekstov z ID-ji c1, c2 in c3.

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

Na konec seznama kontekstov doda ID c.

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

Na konec tega seznama kontekstov doda seznam kontekstov c.

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

Vrne identifikator na indeksu i v seznamu konteksta.

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

Vrne iterator v slogu STL, ki kaže na prvi ID na seznamu konteksta.

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

Vrne, ali ta seznam kontekstov vsebuje ID c.

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

Vrne iterator v slogu STL, ki kaže na navidezni element za zadnjim ID-jem na seznamu konteksta.

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

Vrne indeksno pozicijo ID-ja c na seznamu konteksta. Vrne -1, če ni bilo najdenega ujemajočega elementa.

bool Context::isEmpty() const

Vrne, ali je ta seznam kontekstov prazen in je bil zato ustvarjen s privzetimi vrednostmi.

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

Na seznam konteksta doda ID c kot prvo postavko.

void Context::removeAt(int i)

Iz seznama kontekstov odstrani ID na indeksu i.

int Context::size() const

Vrne število identifikatorjev na seznamu konteksta.

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.