-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddItemDialog.h
45 lines (37 loc) · 889 Bytes
/
AddItemDialog.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
#pragma once
#include "book.h"
#include "Picture.h"
#include "ui_AddItemDialog.h"
#include "utils.h"
#include "VideoCD.h"
#include <QDialog>
#include <QStringList>
QT_BEGIN_NAMESPACE
namespace Ui { class AddItemDialogClass; };
QT_END_NAMESPACE
class AddItemDialog : public QDialog
{
Q_OBJECT
public:
AddItemDialog(QWidget* parent = nullptr);
~AddItemDialog();
void setMotiflyItem(Utils& utils);
void setMediaIndex(int index);
Book_1 getBook();
VideoCD_2 getCD();
Picture_2 getPic();
private:
Ui::AddItemDialogClass* ui;
Book_1 book;
VideoCD_2 cd;
Picture_2 pic;
int lastIndex = 0;
QStringList inValidList;
void saveItem(int index, bool isTemplate);
void setItem(int index);
private slots:
void on_mediaTypeBox_currentIndexChanged(int index);
void on_exitButton_clicked();
void on_idLine_textChanged(QString text);
void on_isbnLine_textChanged(QString text);
};