Core::Context Class
class Core::ContextKlassen Context implementerar en lista med kontext-ID:n. Mer...
| Header: | #include <coreplugin/icontext.h> |
Offentliga typer
Offentliga funktioner
| 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 |
Detaljerad beskrivning
Kontexter används för att registrera åtgärder med Core::ActionManager och vid skapandet av användargränssnittselement som tillhandahåller en kontext för åtgärder.
Se Action Manager och kommandon för en översikt över hur kontexter används.
Se även Core::IContext, Core::ActionManager samt Action Manager och kommandon.
Dokumentation om medlemstyper
[alias] Context::const_iterator
Context::const_iterator tillhandahåller en konst-iterator i STL-stil för Context.
Dokumentation för medlemsfunktioner
[constexpr noexcept] Context::Context()
Skapar en kontextlista som representerar den globala kontexten.
[explicit] Context::Context(Utils::Id c1)
Skapar en kontextlista med ett enda ID: c1.
Context::Context(Utils::Id c1, Utils::Id c2)
Skapar en kontextlista med ID:n c1 och c2.
Context::Context(Utils::Id c1, Utils::Id c2, Utils::Id c3)
Skapar en kontextlista med ID:n c1, c2 och c3.
void Context::add(Utils::Id c)
Lägger till ID:t c i slutet av kontextlistan.
void Context::add(const Core::Context &c)
Lägger till kontextlistan c i slutet av denna kontextlista.
Utils::Id Context::at(int i) const
Returnerar ID:t vid index i i kontextlistan.
Core::Context::const_iterator Context::begin() const
Returnerar en iterator i STL-stil som pekar på det första ID:t i kontextlistan.
bool Context::contains(Utils::Id c) const
Returnerar om denna kontextlista innehåller ID:t c.
Core::Context::const_iterator Context::end() const
Returnerar en iterator i STL-stil som pekar på det imaginära objektet efter det sista ID:t i kontextlistan.
int Context::indexOf(Utils::Id c) const
Returnerar indexpositionen för ID:t c i kontextlistan. Returnerar -1 om inget objekt matchade.
bool Context::isEmpty() const
Returnerar om denna kontextlista är tom och därmed har skapats med standardvärden.
void Context::prepend(Utils::Id c)
Lägger till ID:t c som första post i kontextlistan.
void Context::removeAt(int i)
Tar bort ID:t med index i från kontextlistan.
int Context::size() const
Returnerar antalet ID:n i kontextlistan.
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.