qt/AnimationBuilder/mainwindow.h
2013-01-19 20:12:40 +00:00

67 lines
1.2 KiB
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QListWidget>
#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();
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