theshell/startsession/startmonitor.cpp
2019-01-01 21:52:05 +11:00

58 lines
1.6 KiB
C++

/****************************************
*
* theShell - Desktop Environment
* Copyright (C) 2019 Victor Tran
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* *************************************/
#include "startmonitor.h"
StartMonitor::StartMonitor(QObject *parent) : QObject(parent)
{
splash = new LoginSplash();
splash->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::SubWindow);
connect(splash, SIGNAL(response(QString)), this, SIGNAL(questionResponse(QString)));
}
bool StartMonitor::started() {
return s;
}
void StartMonitor::MarkStarted() {
s = true;
splash->hide();
}
void StartMonitor::MarkNotStarted() {
s = false;
}
void StartMonitor::ShowSplash() {
splash->show();
}
void StartMonitor::HideSplash() {
splash->hide();
}
void StartMonitor::SplashQuestion(QString title, QString msg) {
splash->question(title, msg);
}
void StartMonitor::SplashPrompt(QString title, QString msg) {
splash->prompt(title, msg);
}