22 #ifndef WINDOWSERVER_H
23 #define WINDOWSERVER_H
32 #include "CustomEvents.h"
38 #include <QGraphicsView>
39 #include <QGraphicsObject>
40 #include <QTouchEvent>
46 #ifdef DEBUG_RECORD_PAINT
47 #include <QTextStream>
54 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
59 struct WindowProperties;
64 class QDeclarativeEngine;
73 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget);
90 setHandlesChildEvents(
false);
91 setFlag(QGraphicsItem::ItemHasNoContents,
true);
99 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget) { }
141 bool m_twelveHourClock;
179 virtual void startDrag(
int x,
int y,
void* imgRef,
const std::string& lpid);
180 virtual void endDrag(
int x,
int y,
const std::string& lpid,
bool handled);
220 virtual bool okToResizeUi(
bool ignorePendingRequests=
false) {
return true; }
337 void slotResizePendingTimerTicked();
338 void slotRotationLockChanged(OrientationEvent::Orientation rotationLock);
339 void slotProgressAnimationCompleted();
340 void slotRotationAnimFinished();
341 void rotationValueChanged(
const QVariant& value);
342 void slotDeferredNewOrientation();
346 void showReticle(
const QPoint& pos);
347 void gestureEvent(QGestureEvent* event);
348 void paintBootupScreen();
349 void enableOverlay(
const QString& str);
350 void disableOverlay();
351 void takeAndSaveScreenShot();
352 QImage getScreenShotImage();
353 QImage getScreenShotImageFromFb();
354 OrientationEvent::Orientation getInitialDeviceOrientation();
356 bool m_screenShotImagesValid;
358 QPixmap *m_rotationImageBeforePtr, *m_rotationImageAfterPtr;
360 QTimer m_resizePendingTimer;
363 QTimer m_unaliasPaintEvent;
364 QTime m_timeSinceLastPaint;
365 QPixmap m_bootupScreen;
367 OrientationEvent::Orientation m_deferredNewOrientation;
368 QTimer m_deferredNewOrientationTimer;
370 #ifdef DEBUG_RECORD_PAINT
371 void tracePaint(qreal durationMs);
373 QTextStream *m_paintTrace;
374 QFile m_paintTraceFile;