-
Notifications
You must be signed in to change notification settings - Fork 0
/
BookInput.h
64 lines (61 loc) · 1.37 KB
/
BookInput.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
64
#ifndef BOOKINPUT_H
#define BOOKINPUT_H
#include "Book.h"
#include "bookwriter.h"
#include <QMainWindow>
#include <QPushButton>
#include <QMenuBar>
#include <QMenu>
#include <QAction>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QDateEdit>
#include <QLabel>
#include <QTextEdit>
#include <QTextDocument>
#include <QFileDialog>
#include <QFile>
#include <QTextCursor>
#include <QStringList>
#include <QList>
class BookInput : public QMainWindow {
Q_OBJECT
public:
BookInput(QWidget *parent = 0);
~BookInput();
public slots:
void openClicked();
void saveClicked();
void closeClicked();
void consoleClicked();
private:
void read(QTextEdit *e);
QString write();
void refreshBook();
void refreshUi();
QMenuBar menuBar;
QMenu file;
QAction openAct;
QAction saveAct;
QAction closeAct;
QAction consoleAct;
QVBoxLayout mainLayout;
QHBoxLayout lineEditLayout;
QHBoxLayout editorLayout;
QWidget centralWidget;
QLabel titleLable;
QLabel authorLable;
QLabel isbnLable;
QLabel dateLable;
QLineEdit titleIn;
QLineEdit authorIn;
QLineEdit isbnIn;
QDateEdit dateIn;
QTextEdit *editor = new QTextEdit;
QTextEdit *tempEditor = new QTextEdit;
QTextDocument document;
Book *book = new Book;
BookWriter *writer = new BookWriter;
};
#endif // BOOKINPUT_H