1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:27:43 +00:00

Add a clock widget.

This commit is contained in:
Andreas Kling 2018-10-12 12:18:59 +02:00
parent 6637dec958
commit 73895ce043
12 changed files with 143 additions and 15 deletions

View file

@ -3,6 +3,7 @@
#include <AK/Vector.h>
class Event;
class TimerEvent;
class Object {
public:
@ -18,11 +19,19 @@ public:
Object* parent() { return m_parent; }
const Object* parent() const { return m_parent; }
void startTimer(int ms);
void stopTimer();
bool hasTimer() const { return m_timerID; }
private:
virtual void onTimer(TimerEvent&);
void addChild(Object&);
void removeChild(Object&);
Object* m_parent { nullptr };
int m_timerID { 0 };
Vector<Object*> m_children;
};