34 #include <QGraphicsObject>
35 #include <QPropertyAnimation>
36 #include <QDeclarativeComponent>
62 LockWindow(uint32_t maxWidth, uint32_t maxHeight);
69 bool isLocked()
const {
return m_state != StateUnlocked; }
70 bool isDockMode()
const {
return m_state == StateDockMode; }
77 void resize(
int width,
int height);
94 void slotDisplayStateChanged(
int event);
95 void slotLockStateChanged(
int event,
int displayEvent);
97 void slotAlertActivated();
98 void slotAlertDeactivated();
99 void slotTransientAlertActivated();
100 void slotTransientAlertDeactivated();
101 void slotBannerActivated();
102 void slotBannerDeactivated();
103 void slotDeviceUnlocked();
104 void slotCancelPasswordEntry();
105 void slotPasswordSubmitted(QString password,
bool isPIN);
106 void slotPinPanelFocusRequest(
bool focusRequest);
107 void slotBannerAboutToUpdate(QRect& target);
108 void slotBootFinished();
109 void slotWindowUpdated(
Window* win);
110 void slotPolicyChanged(
const EASPolicy *
const policy);
111 void slotSetLockTimeout(uint32_t timeout);
112 void slotDialogButton1Pressed();
113 void slotDialogButton2Pressed();
114 void slotDialogButton3Pressed();
116 void slotWindowFadeAnimationFinished();
117 void slotVisibilityChanged();
121 void slotPositiveSpaceAboutToChange(
const QRect& r,
bool fullscreen,
bool resizing);
122 void slotPositiveSpaceChanged(
const QRect& r);
123 void slotPositiveSpaceChangeFinished(
const QRect& r);
125 void slotUiRotationCompleted();
140 QRectF boundingRect()
const;
143 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget);
145 void handlePowerOn();
146 void handlePowerOff();
148 void activatePopUpAlert();
149 void activateBannerAlert();
150 void registerBannerView();
151 void unregisterBannerView();
153 void changeState(State newState);
155 bool handleMouseEvent(QMouseEvent *event);
156 #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
157 bool handleTouchEvent(QTouchEvent *event);
159 void handlePenDownEvent(Event* event);
160 void handlePenMoveEvent(Event* event);
161 void handlePenUpEvent(Event* event);
162 void handlePenFlickEvent(Event* event);
163 void handlePenCancelEvent(Event* event);
165 bool handleKeyDownEvent(Event* event);
166 bool handleKeyUpEvent(Event* event);
168 void handlePenDownStateNormal(Event* event);
169 void handlePenMoveStateNormal(Event* event);
170 void handlePenUpStateNormal(Event* event);
171 void handlePenCancelStateNormal(Event* event);
173 void mapCoordToWindow(
Window* win,
int& x,
int& y)
const;
177 bool requiresPasscode()
const;
180 Timer<LockWindow> m_paintTimer;
183 Timer<LockWindow> m_hideHelpTimer;
184 void startHideHelpTimer();
185 bool hideHelpTimeout();
187 void hideHelp(
bool animate =
true);
190 void hidePinPanel(
bool animate =
true);
193 void hideDialog(
bool animate =
true);
205 uint32_t m_lastLocked;
206 uint32_t m_lockTimeout;
207 bool setLockTimeout(uint32_t timeout);
214 bool m_elementsShown;
216 bool m_delayDockModeLocking;
218 int m_lockButtonX, m_lockButtonY;
220 QPropertyAnimation m_windowFadeAnimation;
239 void positionCornerWindows(
const QRect& r);
241 bool bannerViewRegistered;
244 QDeclarativeComponent* m_qmlUnlockPanel;
245 QDeclarativeComponent* m_qmlUnlockDialog;
250 QString m_newPasscode;
252 bool m_setupNewPassword;
254 QRect m_targetPositiveSpace;