Core::ModeManager Class
class Core::ModeManagerKlassen ModeManager hanterar aktiveringen av lägen och åtgärderna i lägesväljarens verktygsfält. Mer...
| Header: | #include <coreplugin/modemanager.h> |
| Inherits: | QObject |
Signaler
| void | currentModeChanged(Utils::Id mode, Utils::Id oldMode = {}) |
Statiska offentliga medlemmar
| void | activateMode(Utils::Id id) |
| void | addAction(QAction *action, int priority) |
| Core::IMode * | currentMode() |
| Utils::Id | currentModeId() |
| Core::ModeManager * | instance() |
Detaljerad beskrivning
Lägen implementeras med klassen IMode. Använd ModeManager för att tvinga fram aktivering av ett läge eller för att få ett meddelande när det aktiva läget ändras.
ModeManager hanterar även de åtgärder som syns i lägesväljarens verktygsfält. Åtgärder bör läggas till i verktygsfältet endast i begränsad utsträckning.
Dokumentation för medlemsfunktioner
[static] void ModeManager::activateMode(Utils::Id id)
Ställer in läget med ID:t id som det aktuella läget.
Se även currentMode(), currentModeId(), currentModeAboutToChange() och currentModeChanged().
[static] void ModeManager::addAction(QAction *action, int priority)
Lägger till funktionen ” action ” i lägesväljarens verktygsfält. Åtgärderna sorteras efter ” priority ” i fallande ordning. Använd denna funktion med stor försiktighet.
[static] Core::IMode *ModeManager::currentMode()
Returnerar en pekare till det aktuella läget.
Se även activateMode() och currentModeId().
[signal] void ModeManager::currentModeChanged(Utils::Id mode, Utils::Id oldMode = {})
Meddelandet skickades efter att strömläget ändrades från oldMode till mode.
[static] Utils::Id ModeManager::currentModeId()
Returnerar id:t för det aktuella läget.
Se även activateMode() och currentMode().
[static] Core::ModeManager *ModeManager::instance()
Returnerar pekaren till instansen. Använd endast för att koppla till signaler.
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.