-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmdichild.h
71 lines (56 loc) · 1.81 KB
/
mdichild.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
65
66
67
68
69
70
71
// This is the main file used to build the routine
#ifndef MDICHILD_H
#define MDICHILD_H
#include "mytreewidget.h"
#include "mylistwidget.h"
#include <QGraphicsItem>
#include <QPushButton>
#include "musclemap.h"
class QVBoxLayout;
class MdiChild : public QWidget {
Q_OBJECT
public:
MdiChild();
void newFile();
bool loadFile(const QString &fileName);
bool save();
bool saveAs();
bool saveFile(const QString &fileName);
QString userFriendlyCurrentFile();
QString currentFile() { return curFile; }
QPushButton *buttonPrintRoutine;
QPushButton *buttonAnalyzeRoutine;
QPushButton *buttonAddExercise;
QPushButton *buttonRemoveExercise;
protected:
void closeEvent(QCloseEvent *event) override;
private slots:
void documentWasModified();
void exerciseSelectedItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
void muscleSelectionChanged(int bits);
void buttonPrintRoutineClicked();
void buttonAnalyzeRoutineClicked();
void buttonAddExerciseClicked();
void buttonRemoveExerciseClicked();
private:
bool maybeSave();
void setCurrentFile(const QString &fileName);
QString strippedName(const QString &fullFileName);
void loadImages();
QString curFile;
bool isUntitled;
void arrowKeysPressed(QKeyEvent *event);
void routineListSelectionChanged();
QMap<QString, QPixmap> equipPix;
QVBoxLayout *equipPixLayout;
MyTreeWidget *exerciseTreeWidget;
QVBoxLayout *routineLayout;
MyListWidget *routineListWidget;
MuscleMap *muscleMapWidget;
// Constant values that will be used in setting the data on the muscles being worked
enum Numbering{
PRIMARY = Qt::UserRole,
SECONDARY = Qt::UserRole + 1
};
};
#endif