forked from LadybirdBrowser/ancient-history
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTimerQt.h
42 lines (29 loc) · 893 Bytes
/
TimerQt.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
* Copyright (c) 2022, Andreas Kling <[email protected]>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Platform/Timer.h>
class QTimer;
namespace Ladybird {
class TimerQt final : public Web::Platform::Timer {
public:
static NonnullRefPtr<TimerQt> create();
virtual ~TimerQt();
virtual void start() override;
virtual void start(int interval_ms) override;
virtual void restart() override;
virtual void restart(int interval_ms) override;
virtual void stop() override;
virtual void set_active(bool) override;
virtual bool is_active() const override;
virtual int interval() const override;
virtual void set_interval(int interval_ms) override;
virtual bool is_single_shot() const override;
virtual void set_single_shot(bool) override;
private:
TimerQt();
QTimer* m_timer { nullptr };
};
}