]> Git Repo - VerusCoin.git/blob - src/qt/intro.h
Merge pull request #2849 from petertodd/if-else-else
[VerusCoin.git] / src / qt / intro.h
1 #ifndef INTRO_H
2 #define INTRO_H
3
4 #include <QDialog>
5 #include <QThread>
6 #include <QMutex>
7
8 namespace Ui {
9 class Intro;
10 }
11 class FreespaceChecker;
12
13 /** Introduction screen (pre-GUI startup).
14   Allows the user to choose a data directory,
15   in which the wallet and block chain will be stored.
16  */
17 class Intro : public QDialog
18 {
19     Q_OBJECT
20
21 public:
22     explicit Intro(QWidget *parent = 0);
23     ~Intro();
24
25     QString getDataDirectory();
26     void setDataDirectory(const QString &dataDir);
27
28     /**
29      * Determine data directory. Let the user choose if the current one doesn't exist.
30      *
31      * @note do NOT call global GetDataDir() before calling this function, this
32      * will cause the wrong path to be cached.
33      */
34     static void pickDataDirectory();
35
36     /**
37      * Determine default data directory for operating system.
38      */
39     static QString getDefaultDataDirectory();
40
41 signals:
42     void requestCheck();
43     void stopThread();
44
45 public slots:
46     void setStatus(int status, const QString &message, quint64 bytesAvailable);
47
48 private slots:
49     void on_dataDirectory_textChanged(const QString &arg1);
50     void on_ellipsisButton_clicked();
51     void on_dataDirDefault_clicked();
52     void on_dataDirCustom_clicked();
53
54 private:
55     Ui::Intro *ui;
56     QThread *thread;
57     QMutex mutex;
58     bool signalled;
59     QString pathToCheck;
60
61     void startThread();
62     void checkPath(const QString &dataDir);
63     QString getPathToCheck();
64
65     friend class FreespaceChecker;
66 };
67
68 #endif // INTRO_H
This page took 0.026962 seconds and 4 git commands to generate.