22 #ifndef BOOTUPANIMATION_H
23 #define BOOTUPANIMATION_H
33 #include <QGraphicsObject>
34 #include <QPropertyAnimation>
35 #include <QParallelAnimationGroup>
36 #include <QTextLayout>
37 #include <QSocketNotifier>
40 #define BOOT_ANIM_MESSAGE_LENGHT (int)(sizeof(char) + 2 * sizeof(int))
41 #define BOOT_ANIM_MESSAGE_END_ANIMATION 0x01
42 #define BOOT_ANIM_MESSAGE_START_PROGRESS 0x02
43 #define BOOT_ANIM_MESSAGE_END_PROGRESS 0x03
44 #define BOOT_ANIM_MESSAGE_PROGRESS_UPDATE 0x04
52 class PGFallbackFonts;
77 void paint(QPainter* painter);
80 void pipeDataAvailable(
int pipe);
87 void generateUtf16AndGlyphOffsets();
88 std::vector<gunichar2> convertToUtf16(
const std::string& s)
const;
89 std::vector<int> getGlyphOffsets(
const std::vector<gunichar2>& s,
int height)
const;
91 void updateScreen(PGSurface* surf);
92 void updateScreen(PGSurface* surf,
int dx,
int dy,
int dr,
int db);
94 int spinnerProgress() {
return m_activitySpinner; }
95 void setSpinnerProgress(
int progress) { m_activitySpinner = progress; }
102 void setActivityProgress(
int val,
int total);
104 void renderInStateLogo();
105 void renderInStateActivity();
107 static gpointer renderThread(gpointer arg);
118 GThread* m_renderThread;
123 PGFallbackFonts* m_fallbackFonts;
124 PGSurface* m_logoSurf;
125 PGSurface* m_logoBrightSurf;
126 PGSurface* m_activityStaticSurf;
127 PGSurface* m_activityProgressSurf;
128 PGSurface* m_activitySpinnerSurf;
131 QSocketNotifier m_readNotifier;
142 int m_activityProgress;
143 int m_activitySpinner;
146 std::vector<gunichar2> m_textLine1;
147 std::vector<gunichar2> m_textLine2;
148 std::vector<int> m_glyphOffsetsLine1;
149 std::vector<int> m_glyphOffsetsLine2;
172 virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget);
175 void fadeAnimationFinished();
184 QPixmap* m_screenPixmap;
187 QPointer<QPropertyAnimation> m_opacityAnimationPtr;
188 QPointer<QPropertyAnimation> m_scaleAnimationPtr;
189 QPointer<QParallelAnimationGroup> m_fadeAnimationGroupPtr;