-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathaddbookwizard.h
More file actions
executable file
·110 lines (94 loc) · 2.71 KB
/
addbookwizard.h
File metadata and controls
executable file
·110 lines (94 loc) · 2.71 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* Copyright © Abouzakaria
* (c)GPL2 (c)GPL3
*
* This file is part of booksorg.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License version 2 or at your option version 3 as published
* by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef ADDBOOKWIZARD_H
#define ADDBOOKWIZARD_H
#include <QWizard>
#include <QLabel>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QToolButton>
#include <QTextEdit>
#include <QComboBox>
class OutputFilesPage;
class AddBookWizard : public QWizard
{
Q_OBJECT
public:
explicit AddBookWizard(const QStringList &groups,const QStringList &autors,
const QString &file=QString(),QWidget *parent = 0);
void setPixmapName(QString name){mPixName=name;}
void accept();
QMap<QString,QString> getNewBook(){return mMap;}
QStringList mGroups;
QStringList mAuthors;
signals:
public slots:
private:
QString mPixName;
QString mDir;
OutputFilesPage *mOutputFilesPage;
QMap<QString,QString>mMap;
};
class ClassInfoPage : public QWizardPage
{
Q_OBJECT
public:
ClassInfoPage(QWidget *parent = 0);
private:
QHBoxLayout *horizontalLayout;
QLabel *label;
QLabel *label2;
QLineEdit *lineEdit;
QToolButton *toolButton;
private slots:
void openFile();
};
class OutputFilesPage : public QWizardPage
{
Q_OBJECT
public:
OutputFilesPage(AddBookWizard *p,const QString &file=QString() ,QWidget *parent = 0);
QString getAuthor(){return comboBoxAuthors->currentText();}
QString getGroup(){return comboBoxGroups->currentText();}
QString getInfo(){return textEditProperties->toPlainText().remove("'");}
QString getFilePath(){return mFile;}
protected:
void initializePage();
// QAction *mActDelete;
// QAction *mActMove;
private:
QGridLayout *gridLayout;
QLabel *label_2;
QLineEdit *lineEditTitle;
QLabel *toolButtonImage;
QLabel *label_3;
QLineEdit *lineEditComment;
QLabel *label_4;
QLabel *label_5;
QLabel *label_6;
QTextEdit *textEditProperties;
QLineEdit *lineEditAuthor;
QComboBox *comboBoxAuthors;
QComboBox *comboBoxGroups;
AddBookWizard *mparent;
QString mFile;
};
#endif // ADDBOOKWIZARD_H