Raven Core  3.0.0
P2P Digital Currency
intro.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_QT_INTRO_H
7 #define RAVEN_QT_INTRO_H
8 
9 #include <QDialog>
10 #include <QMutex>
11 #include <QThread>
12 
13 static const bool DEFAULT_CHOOSE_DATADIR = false;
14 
15 class FreespaceChecker;
16 
17 namespace Ui {
18  class Intro;
19 }
20 
25 class Intro : public QDialog
26 {
27  Q_OBJECT
28 
29 public:
30  explicit Intro(QWidget *parent = 0);
31  ~Intro();
32 
33  QString getDataDirectory();
34  void setDataDirectory(const QString &dataDir);
35 
45  static bool pickDataDirectory();
46 
50  static QString getDefaultDataDirectory();
51 
52 Q_SIGNALS:
53  void requestCheck();
54  void stopThread();
55 
56 public Q_SLOTS:
57  void setStatus(int status, const QString &message, quint64 bytesAvailable);
58 
59 private Q_SLOTS:
60  void on_dataDirectory_textChanged(const QString &arg1);
61  void on_ellipsisButton_clicked();
62  void on_dataDirDefault_clicked();
63  void on_dataDirCustom_clicked();
64 
65 private:
66  Ui::Intro *ui;
67  QThread *thread;
68  QMutex mutex;
69  bool signalled;
70  QString pathToCheck;
71 
72  void startThread();
73  void checkPath(const QString &dataDir);
74  QString getPathToCheck();
75 
76  friend class FreespaceChecker;
77 };
78 
79 #endif // RAVEN_QT_INTRO_H
bool signalled
Definition: intro.h:69
Ui::Intro * ui
Definition: intro.h:66
QMutex mutex
Definition: intro.h:68
QThread * thread
Definition: intro.h:67
QString pathToCheck
Definition: intro.h:70
Introduction screen (pre-GUI startup).
Definition: intro.h:25