In questa pagina

Core::Context Class

class Core::Context

La classe Context implementa un elenco di ID di contesto. Per saperne di più...

Header: #include <coreplugin/icontext.h>

Tipi pubblici

Funzioni pubbliche

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

Descrizione dettagliata

I contesti vengono utilizzati per registrare le azioni presso Core::ActionManager e per creare elementi dell'interfaccia utente che forniscono un contesto per le azioni.

Per una panoramica su come vengono utilizzati i contesti, consultare La gestione delle azioni e i comandi.

Vedi anche " Core::IContext", " Core::ActionManager" e " The Action Manager and Commands".

Documentazione sui tipi di membro

[alias] Context::const_iterator

Context::const_iterator fornisce un iteratore const in stile STL per Context.

Documentazione delle funzioni membro

[constexpr noexcept] Context::Context()

Crea un elenco di contesti che rappresenta il contesto globale.

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

Crea un elenco di contesti con un unico ID c1.

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

Crea un elenco di contesti con gli ID c1 e c2.

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

Crea un elenco di contesti con gli ID c1, c2 e c3.

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

Aggiunge l'ID c alla fine dell'elenco dei contesti.

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

Aggiunge l'elenco di contesti c alla fine di questo elenco di contesti.

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

Restituisce l'ID all'indice i nell'elenco del contesto.

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

Restituisce un iteratore in stile STL che punta al primo ID nell'elenco di contesto.

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

Restituisce se questo elenco di contesti contiene l'ID c.

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

Restituisce un iteratore in stile STL che punta all'elemento immaginario successivo all'ultimo ID nell'elenco di contesto.

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

Restituisce la posizione nell'elenco contestuale dell'ID c. Restituisce -1 se non viene trovato alcun elemento corrispondente.

bool Context::isEmpty() const

Restituisce se questo elenco di contesti è vuoto e, di conseguenza, è stato creato con i valori predefiniti.

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

Aggiunge l'ID c come primo elemento dell'elenco di contesto.

void Context::removeAt(int i)

Rimuove l'ID all'indice i dall'elenco di contesto.

int Context::size() const

Restituisce il numero di ID presenti nell'elenco di contesto.

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.