Timesheets-Server
Timesheets server
Načítám...
Vyhledávám...
Nebylo nic nalezeno
Dokumentace třídy TimesheetServer

Hlavní třída - startovaná z main, inicializuje aplikaci a startuje potřebné objekty. ...

#include <timesheetserver.h>

Diagram dědičnosti pro třídu TimesheetServer:

Veřejné sloty

void restart ()
 Restartuje (nebo ukončí) server.
 

Veřejné metody

const QDateTime & startTime () const
 

Statické veřejné metody

static TimesheetServerinstance ()
 Vrací ukazatel na singleton instanci třídy.
 

Privátní sloty

void init ()
 Funkce volaná přes timer po startu aplikace.
 
void destroy ()
 Ukončí aplikaci.
 
void quit ()
 Ukončí aplikaci natrvrdo, quit.
 

Privátní metody

 TimesheetServer ()
 Konstruktor, přes timer volá funkci init()
 

Statické privátní atributy

static TimesheetServerm_timesheetServer = NULL
 Singleton instance třídy.
 
static QDateTime m_startTime
 Čas startu.
 

Detailní popis

Hlavní třída - startovaná z main, inicializuje aplikaci a startuje potřebné objekty.

Definice je uvedena na řádku 17 v souboru timesheetserver.h.

Dokumentace konstruktoru a destruktoru

◆ ~TimesheetServer()

TimesheetServer::~TimesheetServer ( )

Definice je uvedena na řádku 53 v souboru timesheetserver.cpp.

53 {
54 PDEBUG;
55 QCoreApplication::quit();
56}

◆ TimesheetServer()

TimesheetServer::TimesheetServer ( )
private

Konstruktor, přes timer volá funkci init()

Definice je uvedena na řádku 37 v souboru timesheetserver.cpp.

37 {
38 m_timesheetServer = this;
40 QTimer::singleShot(1, this, SLOT(init()));
41 m_startTime = QDateTime::currentDateTime();
42}
static MSettings * instance(QObject *parent=NULL)
Vytváří signleton instanci třídy, vyhledá konfigurační soubor.
Definition msettings.cpp:48
void init()
Funkce volaná přes timer po startu aplikace.
static QDateTime m_startTime
Čas startu.
static TimesheetServer * m_timesheetServer
Singleton instance třídy.

Dokumentace členských funkcí

◆ destroy

void TimesheetServer::destroy ( )
privateslot

Ukončí aplikaci.

Definice je uvedena na řádku 71 v souboru timesheetserver.cpp.

71 {
72 PDEBUG;
73 deleteLater();
74}

◆ init

void TimesheetServer::init ( )
privateslot

Funkce volaná přes timer po startu aplikace.

Vytváří potřebné objekty: Databaze, FrontaHovoru, SeznamJednotek, MedibusServer, SipServer

Definice je uvedena na řádku 77 v souboru timesheetserver.cpp.

77 {
78 PDEBUG;
79 Logger::instance(this);
80 PDEBUG << "Starting server";
81
82 // tady start jednotlivych komponent
83 Db::Database::instance(this);
84
85 /*
86 MyThread::takeObject(this, "threadDataGroups", Data::DataGroups::dataGroups(this));
87 MyThread::takeObject(this, "threadDataSystems", Data::DataSystems::dataSystems(this));
88 MyThread::takeObject(this, "threadDataInvertors", Data::DataInvertors::dataInvertors(this));
89 MyThread::takeObject(this, "threadDataSensors", Data::DataSensors::dataSensors(this));
90 MyThread::takeObject(this, "threadAggregatorToday", Data::AggregatorToday::aggregatorToday(this));
91 MyThread::takeObject(this, "threadAggregatorPast", Data::AggregatorPast::aggregatorPast(this));
92 Importers::ImportersList::importersList(this);
93 */
94
96 MyThread::takeObject(this, "threadHttpServer", Httpd::Httpd::httpd(this));
97
98 /*
99 QTimer::singleShot(0, Data::DataGroups::dataGroups(), SLOT(init()));
100 QTimer::singleShot(0, Data::DataSystems::dataSystems(), SLOT(init()));
101 QTimer::singleShot(0, Data::DataInvertors::dataInvertors(), SLOT(init()));
102 QTimer::singleShot(0, Data::DataSensors::dataSensors(), SLOT(init()));
103 QTimer::singleShot(10000, Data::AggregatorToday::aggregatorToday(), SLOT(aggregate()));
104 QTimer::singleShot(15000, Data::AggregatorPast::aggregatorPast(), SLOT(aggregate()));
105 */
106
107 PDEBUG << "Started";
108}
static Httpd * httpd(QObject *parent=NULL)
Vrací ukazatal na singleton instanci třídy.
Definition httpd.cpp:33
static Guard * guard(QObject *parent=NULL)
Vrací ukazatel na singleton instanci třídy.
Definition guard.cpp:13

◆ instance()

TimesheetServer * TimesheetServer::instance ( )
static

Vrací ukazatel na singleton instanci třídy.

Definice je uvedena na řádku 45 v souboru timesheetserver.cpp.

45 {
46 if (m_timesheetServer == NULL) {
47 new TimesheetServer();
48 }
49 return m_timesheetServer;
50}
TimesheetServer()
Konstruktor, přes timer volá funkci init()

◆ quit

void TimesheetServer::quit ( )
privateslot

Ukončí aplikaci natrvrdo, quit.

Definice je uvedena na řádku 65 v souboru timesheetserver.cpp.

65 {
66 PDEBUG;
67 QCoreApplication::quit();
68}

◆ restart

void TimesheetServer::restart ( )
slot

Restartuje (nebo ukončí) server.

Definice je uvedena na řádku 59 v souboru timesheetserver.cpp.

59 {
60 QTimer::singleShot(1000, this, SLOT(destroy()));
61 QTimer::singleShot(5000, this, SLOT(quit()));
62}
void quit()
Ukončí aplikaci natrvrdo, quit.
void destroy()
Ukončí aplikaci.

◆ startTime()

const QDateTime & TimesheetServer::startTime ( ) const
inline

Definice je uvedena na řádku 28 v souboru timesheetserver.h.

28{ return m_startTime; }

Dokumentace datových členů

◆ m_startTime

QDateTime TimesheetServer::m_startTime
staticprivate

Čas startu.

Definice je uvedena na řádku 73 v souboru timesheetserver.h.

◆ m_timesheetServer

TimesheetServer * TimesheetServer::m_timesheetServer = NULL
staticprivate

Singleton instance třídy.

Definice je uvedena na řádku 71 v souboru timesheetserver.h.


Dokumentace pro tuto třídu byla vygenerována z následujících souborů: