00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef BACKGROUNDANIMATIONDIALOGIMPL_H
00019 #define BACKGROUNDANIMATIONDIALOGIMPL_H
00020
00021 #include <QDialog>
00022 #include <QGraphicsScene>
00023 #include <QPixmap>
00024 #include "../../ui_backgroundAnimationDialogdialog.h"
00025
00026 #define ANIMATION_AMMOUNT 3
00027 class AnimationEngineAPI;
00028
00029 class backgroundAnimationDialogImpl : public QDialog, public Ui::backgroundAnimationDialog
00030 {
00031 Q_OBJECT
00032 public:
00033 backgroundAnimationDialogImpl( QWidget * parent = 0, Qt::WFlags f = 0 );
00034 virtual ~backgroundAnimationDialogImpl();
00035 void ConstructList();
00036 void startCurrentlySelectedAnimation(QGraphicsScene *targetScene);
00037 void setDiaryGraphicsScene(QGraphicsScene *bgScene);
00038 void stopAnimation();
00039 void setCurrentlySelectedAnimation(int animationIndex);
00040 void setAnimationSceneSize(qint64 width, qint64 height);
00041 void HandleUiLanguageChange();
00042 protected:
00043 void closeEvent(QCloseEvent* event);
00044 private:
00045 AnimationEngineAPI *iAnimations[ANIMATION_AMMOUNT];
00046 QGraphicsScene iPreviewGraphicsScene;
00047 QGraphicsScene *iDiaryGraphicsScene;
00048 QPixmap *iFocusPixmap;
00049 QPixmap *iAnimationBgPixmap;
00050 QGraphicsPixmapItem *iFocusPixmapItem;
00051 int iCurrentlySelectedItem;
00052 int iLastPlayedAnimation;
00053 bool iUpdatePreview;
00054 qint64 iDiarySceneWidth;
00055 qint64 iDiarySceneHeight;
00056 public slots:
00057 void okPushButtonClicked(bool checked);
00058 void closePushButtonClicked(bool checked);
00059 void animationSelectionChanged();
00060 void UseAnimationBgPicturecheckBoxToggled(bool checked);
00061 void mouseMovement(int x, int y);
00062 };
00063 #endif
00064
00065
00066
00067