-
Notifications
You must be signed in to change notification settings - Fork 0
/
settingwindow.h
52 lines (36 loc) · 1.17 KB
/
settingwindow.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
#ifndef SETTINGWINDOW_H
#define SETTINGWINDOW_H
#include "mainwindow.h"
#include <QMainWindow>
//Îļþ´¦Àí
#include <QBitArray>
#include <QDataStream>
#include <QFile>
namespace Ui {
class SettingWindow;
}
class SettingWindow : public QMainWindow {
Q_OBJECT
friend class MainWindow;
public:
explicit SettingWindow( MainWindow *parentMain, QWidget *parent = nullptr );
~SettingWindow();
private slots:
void saveAll();
void on_applyButton_clicked();
void on_cancelButton_clicked();
void on_okButton_clicked();
private:
Ui::SettingWindow *ui;
MainWindow * mainWindowPtr;
static constexpr qint64 MAX_SETTING_INDEX = 1; // indexÄ¿Ç°×î´óÖµ
static void rewriteSettingFile( QFile & );
static void writeSettingItem( const qint64, QVariant, QDataStream & );
static QVariant readSettingItem( const qint64, QDataStream & );
static QVariant passOne( const qint64, QDataStream &, MainWindow * );
void updateOne( const qint64, QDataStream & );
void updateWindow( QDataStream & );
void updateWindow();
static void passAll( MainWindow * );
};
#endif // SETTINGWINDOW_H