Na tej stronie

Core::ModeManager Class

class Core::ModeManager

Klasa ModeManager zarządza aktywacją trybów oraz działaniami dostępnymi na pasku narzędzi selektora trybów. Więcej...

Header: #include <coreplugin/modemanager.h>
Inherits: QObject

Sygnały

void currentModeChanged(Utils::Id mode, Utils::Id oldMode = {})

Statyczne elementy publiczne

void activateMode(Utils::Id id)
void addAction(QAction *action, int priority)
Core::IMode *currentMode()
Utils::Id currentModeId()
Core::ModeManager *instance()

Szczegółowy opis

Tryby są implementowane za pomocą klasy ` IMode `. Użyj klasy `ModeManager`, aby wymusić aktywację trybu lub otrzymać powiadomienie o zmianie aktywnego trybu.

ModeManager zarządza również akcjami widocznymi na pasku narzędzi selektora trybów. Akcje należy dodawać do paska narzędzi bardzo oszczędnie.

Dokumentacja funkcji składowych

[static] void ModeManager::activateMode(Utils::Id id)

Ustawia tryb o identyfikatorze id jako tryb bieżący.

Zobacz także: currentMode(), currentModeId(), currentModeAboutToChange() oraz currentModeChanged().

[static] void ModeManager::addAction(QAction *action, int priority)

Dodaje opcję „ action ” do paska narzędzi selektora trybu. Działania są posortowane według „ priority ” w porządku malejącym. Z tej funkcji należy korzystać bardzo oszczędnie.

[static] Core::IMode *ModeManager::currentMode()

Zwraca wskaźnik do bieżącego trybu.

Zobacz także funkcje activateMode() oraz currentModeId().

[signal] void ModeManager::currentModeChanged(Utils::Id mode, Utils::Id oldMode = {})

Sygnał wygenerowany po zmianie trybu prądowego z „ oldMode ” na „ mode ”.

[static] Utils::Id ModeManager::currentModeId()

Zwraca identyfikator bieżącego trybu.

Zobacz także funkcje activateMode() oraz currentMode().

[static] Core::ModeManager *ModeManager::instance()

Zwraca wskaźnik do instancji. Należy używać wyłącznie do podłączania się do sygnałów.

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.