64 lines
1.9 KiB
C++
64 lines
1.9 KiB
C++
/*
|
|
* This file is part of the Flowee project
|
|
* Copyright (C) 2011-2015 The Bitcoin Core developers
|
|
*
|
|
* 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/>.
|
|
*/
|
|
|
|
#ifndef FLOWEE_QT_SPLASHSCREEN_H
|
|
#define FLOWEE_QT_SPLASHSCREEN_H
|
|
|
|
#include <QSplashScreen>
|
|
|
|
class NetworkStyle;
|
|
|
|
/** Class for the splashscreen with information of the running client.
|
|
*
|
|
* @note this is intentionally not a QSplashScreen. The hub initialization
|
|
* can take a long time, and in that case a progress window that cannot be
|
|
* moved around and minimized has turned out to be frustrating to the user.
|
|
*/
|
|
class SplashScreen : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SplashScreen(const NetworkStyle &networkStyle, Qt::WindowFlags flags = 0);
|
|
~SplashScreen();
|
|
|
|
protected:
|
|
void paintEvent(QPaintEvent *event);
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
public Q_SLOTS:
|
|
/** Slot to call finish() method as it's not defined as slot */
|
|
void slotFinish(QWidget *mainWin);
|
|
|
|
/** Show message and progress */
|
|
void showMessage(const QString &message, int alignment, const QColor &color);
|
|
|
|
private:
|
|
/** Connect core signals to splash screen */
|
|
void subscribeToCoreSignals();
|
|
/** Disconnect core signals to splash screen */
|
|
void unsubscribeFromCoreSignals();
|
|
|
|
QPixmap pixmap;
|
|
QString curMessage;
|
|
QColor curColor;
|
|
int curAlignment;
|
|
};
|
|
|
|
#endif
|