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:
parent
6637dec958
commit
73895ce043
12 changed files with 143 additions and 15 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue