Timesheets-Server
Timesheets server
Načítám...
Vyhledávám...
Nebylo nic nalezeno
timesheetserver.h
Zobrazit dokumentaci tohoto souboru.
1
6#ifndef _TimesheetServer_H_
7#define _TimesheetServer_H_
8
9#include <QObject>
10#include <QDateTime>
11#include <QThread>
12
13
17class TimesheetServer : public QObject {
18 Q_OBJECT
19
20 public:
24 static TimesheetServer *instance();
25
27
28 const QDateTime& startTime() const { return m_startTime; }
29
30 public slots:
31
35 void restart();
36
37
38 private slots:
39
45 void init();
46
47
51 void destroy();
52
53
57 void quit();
58
59
60 private:
61
66
67
72
73 static QDateTime m_startTime;
74
75};
76
77#endif
Hlavní třída - startovaná z main, inicializuje aplikaci a startuje potřebné objekty.
void restart()
Restartuje (nebo ukončí) server.
void init()
Funkce volaná přes timer po startu aplikace.
static QDateTime m_startTime
Čas startu.
static TimesheetServer * instance()
Vrací ukazatel na singleton instanci třídy.
void quit()
Ukončí aplikaci natrvrdo, quit.
void destroy()
Ukončí aplikaci.
static TimesheetServer * m_timesheetServer
Singleton instance třídy.
TimesheetServer()
Konstruktor, přes timer volá funkci init()