Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef SAVEDWORDS_H
#define SAVEDWORDS_H
#include <QWidget>
#include <QFile>
#include <QTextStream>
#include <string>
#include <iostream>
#include <fstream>
using namespace std;
namespace Ui {
class savedwords;
}
class savedwords : public QWidget
{
Q_OBJECT
public:
explicit savedwords(QWidget *parent = nullptr);
~savedwords();
QString words;
void checkwords() {
QFile words_list(".config/06-words/config");
words_list.open(QIODevice::ReadWrite);
QTextStream in (&words_list);
words = in.readAll();
words_list.close();
}
void save_word_init(string word) {
QFile words(".config/06-words/config");
words.open(QIODevice::ReadWrite);
QTextStream in (&words);
QString words_list = in.readAll();
string words_list_str = words_list.toStdString();
words.close();
ofstream fhandler;
fhandler.open(".config/06-words/config");
fhandler << "";
fhandler.close();
}
private slots:
void on_backBtn_clicked();
void on_clearBtn_clicked();
private:
Ui::savedwords *ui;
};
#endif // SAVEDWORDS_H