Mercurial > hg > syntilista
comparison src/main.h @ 157:325e7590f93e
Move most of the printing related code to printing.cpp
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 12 Sep 2017 15:56:40 +0300 |
parents | 0a7aff5dce3b |
children | 1c2f9d09e87b |
comparison
equal
deleted
inserted
replaced
156:afadc1380fb1 | 157:325e7590f93e |
---|---|
42 // Supported database backup modes | 42 // Supported database backup modes |
43 #define BACKUP_NONE 0 // No backup | 43 #define BACKUP_NONE 0 // No backup |
44 #define BACKUP_HTTP 1 // HTTP(s) POST to a PHP script | 44 #define BACKUP_HTTP 1 // HTTP(s) POST to a PHP script |
45 | 45 |
46 | 46 |
47 // | 47 |
48 // Custom SQL models | 48 // |
49 // Person information record | |
49 // | 50 // |
50 class PersonInfo : public QObject | 51 class PersonInfo : public QObject |
51 { | 52 { |
52 Q_OBJECT | 53 Q_OBJECT |
53 | 54 |
72 double balance; | 73 double balance; |
73 QDateTime added, updated; | 74 QDateTime added, updated; |
74 }; | 75 }; |
75 | 76 |
76 | 77 |
77 | 78 // |
79 // Global functions | |
80 // | |
81 double slMoneyStrToValue(const QString &str); | |
82 QString slMoneyValueToStr(double val); | |
83 QString slCleanupStr(const QString &str); | |
84 const QDateTime slDateTimeToLocal(const QDateTime &val); | |
85 const QString slDateTimeToStr(const QDateTime &val); | |
86 | |
87 void slLog(const QString &mtype, const QString &msg); | |
88 int slErrorMsg(QString title, QString msg); | |
89 bool slCheckAndReportSQLError(const QString where, const QSqlError &err, bool report = false); | |
90 | |
91 void slGetPersonInfoRec(QSqlQuery &query, PersonInfo &info); | |
92 | |
93 | |
94 // | |
95 // Custom SQL models | |
96 // | |
78 class PersonSQLModel : public QSqlQueryModel | 97 class PersonSQLModel : public QSqlQueryModel |
79 { | 98 { |
80 Q_OBJECT | 99 Q_OBJECT |
81 | 100 |
82 private: | 101 private: |