-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflashcardview.h
38 lines (32 loc) · 882 Bytes
/
flashcardview.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
#ifndef FLASHCARDVIEW_H
#define FLASHCARDVIEW_H
#include <QWidget>
#include <QtWidgets>
#include "imagewidget.h"
#include "textwidget.h"
#include "flashcard.h"
class FlashCardView : public QTabWidget
{
Q_OBJECT
public:
explicit FlashCardView(int width = 800, int height = 900, QWidget *parent = nullptr);
bool loadFlashCard(QString root, QString filename);
FlashCard getFlashCard();
void scale(qreal k);
QString getRoot() { return flashcard.getRoot(); }
QString getName() { return flashcard.getName(); }
void reset();
public slots:
void reloadFlashCard();
protected:
void loadFaceWidget(int face);
private:
QWidget *frontWidget;
QWidget *backWidget;
QList<ImageWidget *> imageList;
QList<TextWidget *> textList;
qreal totalScale = 1;
FlashCard flashcard;
//double margin = 1.05;
};
#endif // FLASHCARDVIEW_H