Core::SessionManager Class
class Core::SessionManagerКласс SessionManager отвечает за управление сессиями. Подробнее...
| Header: | #include <SessionManager> |
| Inherits: | QObject |
Статические общедоступные члены
| bool | confirmSessionDelete(const QStringList &sessions) |
| bool | createSession(const QString &session) |
| bool | deleteSession(const QString &session) |
| QString | lastSession() |
| void | setValue(const Utils::Key &name, const QVariant &value) |
| QString | startupSession() |
Подробное описание
TODO: интерфейс этого класса оставляет желать лучшего. Проблема реализации заключается в том, что все функции из публичного интерфейса просто обёртывают функции, выполняющие фактическую работу. Это можно улучшить.
Документация по функциям-членам
[static] bool SessionManager::confirmSessionDelete(const QStringList &sessions)
Отображает диалоговое окно с запросом у пользователя подтверждения удаления указанного файла sessions.
Возвращает значение, указывающее, подтвердил ли пользователь удаление.
[static] bool SessionManager::createSession(const QString &session)
Создаёт файл « session », но фактически не создаёт его.
Возвращает значение, указывающее, удалось ли создание.
[static] bool SessionManager::deleteSession(const QString &session)
Удаляет имя « session » из списка сеансов и файл с диска.
Возвращает значение, указывающее, удалось ли удаление.
[static] QString SessionManager::lastSession()
Возвращает последнюю сессию, открытую пользователем.
[static] void SessionManager::setValue(const Utils::Key &name, const QVariant &value)
Позволяет другим плагинам сохранять постоянные значения, указанные в файлах name и value, в файле сеанса.
[static] QString SessionManager::startupSession()
Возвращает сессию, которая была активна при последнем закрытии страницы Qt Creator, если такая имеется.
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.