-
Notifications
You must be signed in to change notification settings - Fork 1
/
adminx.h
63 lines (47 loc) · 1.35 KB
/
adminx.h
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
56
57
58
59
60
61
62
63
#ifndef ADMINX_H
#define ADMINX_H
#include"user.h"
#include"newsmodel.h"
#include <QDialog>
namespace Ui {
class Adminx;
}
class Adminx : public QDialog
{
Q_OBJECT
public:
static string NewCat;
int newsSize;
explicit Adminx(QWidget *parent = nullptr);
static vector<User>users;
static vector<NewsModel> news;
static vector<bool>checkedAdmin;
static vector<bool>backbuttons;
void WriteInFiles();
void ReadFromFiles();
~Adminx();
private slots:
void on_pushButton_addNew_clicked();
void on_pushButton_newCategory_clicked();
void on_pushButton_2_clicked();
void on_pushButton_currentCategory_clicked();
void on_pushButton_OkNewCategory_clicked();
void on_pushButton_OkCurrentCategory_clicked();
void on_pushButton_updateNew_clicked();
void on_pushButton_Ok_clicked();
void on_pushButton_removeNew_clicked();
void on_pushButton_DisplayAvgRate_clicked();
private:
Ui::Adminx *ui;
void WriteUserDataInFiles();
void WriteNewsDataInFiles();
void WriteFavNewInFiles();
void WriteNewsNumInFiles();
void WriteRateInFiles();
void ReadFavNewFromFiles();
void ReadUserDataFromFiles();
void ReadNewsDataFromFiles();
void ReadNewsNumFromFiles();
void ReadRateFromFiles();
};
#endif // ADMINX_H