-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
54 lines (44 loc) · 1.09 KB
/
mainwindow.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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
// DEPRECATED:
// #include "projectfile.h"
#include "config.h"
#include "animationframe.h"
#include <QMainWindow>
#include <QToolBar>
#include <QTableWidgetItem>
#include <QDir>
#include <painter.h>
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QString where, QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_strokeWidth_valueChanged(int arg1);
void on_actionPen_triggered();
void on_actionEraser_triggered();
void on_frameTable_cellClicked(int, int frameIndex);
void on_actionNextFrame_triggered();
void on_actionSave_triggered();
void on_actionExport_triggered();
private:
Ui::MainWindow *ui;
QToolBar *toolBar;
Painter *painter;
QDir where;
int imageWidth = 640;
int imageHeight = 480;
Config proj;
QDir frameDir;
QList<AnimationFrame> frames;
int selectedFrame = 0;
void saveFrames();
int selectFrame(int which);
void drawFrames();
};
#endif // MAINWINDOW_H