Core::Context Class
class Core::ContextDie Klasse „Context“ implementiert eine Liste von Kontext-IDs. Mehr...
| Header: | #include <coreplugin/icontext.h> |
Öffentliche Typen
Öffentliche Funktionen
| 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 |
Ausführliche Beschreibung
Kontexte werden zum Registrieren von Aktionen bei „ Core::ActionManager “ sowie beim Erstellen von UI-Elementen verwendet, die einen Kontext für Aktionen bereitstellen.
Einen Überblick über die Verwendung von Kontexten finden Sie unter „Der Aktionsmanager und Befehle “.
Siehe auch „ Core::IContext “, „ Core::ActionManager “ sowie „Der Aktionsmanager und Befehle“.
Dokumentation zum Mitgliedstyp
[alias] Context::const_iterator
Context::const_iterator stellt einen const-Iterator im STL-Stil für Context bereit.
Dokumentation der Mitgliedsfunktionen
[constexpr noexcept] Context::Context()
Erstellt eine Kontextliste, die den globalen Kontext darstellt.
[explicit] Context::Context(Utils::Id c1)
Erstellt eine Kontextliste mit einer einzigen ID: c1.
Context::Context(Utils::Id c1, Utils::Id c2)
Erstellt eine Kontextliste mit den IDs „ c1 “ und „ c2 “.
Context::Context(Utils::Id c1, Utils::Id c2, Utils::Id c3)
Erstellt eine Kontextliste mit den IDs c1, c2 und c3.
void Context::add(Utils::Id c)
Fügt die ID „ c “ am Ende der Kontextliste hinzu.
void Context::add(const Core::Context &c)
Fügt die Kontextliste „ c “ am Ende dieser Kontextliste hinzu.
Utils::Id Context::at(int i) const
Gibt die ID am Index „ i “ in der Kontextliste zurück.
Core::Context::const_iterator Context::begin() const
Gibt einen Iterator im STL-Stil zurück, der auf die erste ID in der Kontextliste verweist.
bool Context::contains(Utils::Id c) const
Gibt zurück, ob diese Kontextliste die ID „ c “ enthält.
Core::Context::const_iterator Context::end() const
Gibt einen Iterator im STL-Stil zurück, der auf das imaginäre Element nach der letzten ID in der Kontextliste zeigt.
int Context::indexOf(Utils::Id c) const
Gibt die Indexposition des ID- c s in der Kontextliste zurück. Gibt -1 zurück, wenn kein Eintrag gefunden wurde.
bool Context::isEmpty() const
Gibt zurück, ob diese Kontextliste leer ist und somit standardmäßig erstellt wurde.
void Context::prepend(Utils::Id c)
Fügt die ID „ c “ als ersten Eintrag zur Kontextliste hinzu.
void Context::removeAt(int i)
Entfernt die ID am Index i aus der Kontextliste.
int Context::size() const
Gibt die Anzahl der IDs in der Kontextliste zurück.
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.