2013-01-19 20:12:40 +00:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
2013-06-22 18:37:18 +00:00
|
|
|
#include <QtWidgets/QMainWindow>
|
|
|
|
#include <QtWidgets/QListWidget>
|
2013-01-19 20:12:40 +00:00
|
|
|
#include <QTextStream>
|
|
|
|
#include <QTimer>
|
|
|
|
|
|
|
|
|
|
|
|
#include "Animation.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
void SetAnimation(TAnimation* animation);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void SelectFrame(int i);
|
|
|
|
void LoadFrame(const std::string& text);
|
|
|
|
void ItemClicked();
|
|
|
|
|
|
|
|
void ShiftXChanged(int val);
|
|
|
|
void ShiftYChanged(int val);
|
|
|
|
void TimeFrameChanged(const QString& str);
|
|
|
|
|
|
|
|
void GenerateTimeFrameBy12Fps();
|
|
|
|
void GenerateSheet();
|
|
|
|
|
|
|
|
void SaveSheet();
|
|
|
|
void SaveAnimationParams();
|
|
|
|
|
|
|
|
void AnimateCheckBoxStateChanged(int state);
|
|
|
|
void TimerTimeout();
|
|
|
|
|
2013-06-18 20:52:07 +00:00
|
|
|
void Clear();
|
|
|
|
|
2013-01-19 20:12:40 +00:00
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
|
|
|
|
|
|
|
TAnimation* Animation;
|
|
|
|
|
|
|
|
int frameImageDefaultPosX;
|
|
|
|
int frameImageDefaultPosY;
|
|
|
|
|
|
|
|
boost::shared_ptr<QPixmap> SheetPixmap;
|
|
|
|
QString AnimationParamsText;
|
|
|
|
|
|
|
|
QTimer AnimTimer;
|
|
|
|
int currentFrameOnTimer;
|
|
|
|
|
|
|
|
int GetSelectedFrame();
|
|
|
|
|
|
|
|
//void SetTimerToNextFrame();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|