2023-05-19 15:32:52 +02:00
|
|
|
#ifndef UTILS_H_INCLUDED
|
|
|
|
#define UTILS_H_INCLUDED
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
2023-08-11 11:03:21 +02:00
|
|
|
#include <QStringList>
|
2023-05-19 15:32:52 +02:00
|
|
|
#include <QFile>
|
2023-08-11 11:03:21 +02:00
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QDateTime>
|
2023-08-22 12:29:52 +02:00
|
|
|
#include <QDir>
|
2023-10-22 19:44:45 +02:00
|
|
|
#include <QDebug>
|
2023-05-19 15:32:52 +02:00
|
|
|
|
2023-08-02 15:45:20 +02:00
|
|
|
namespace Utils {
|
|
|
|
int read1stLineOfFile(QString fileName);
|
|
|
|
QString zoneName(quint8 i);
|
2023-10-22 19:44:45 +02:00
|
|
|
void printCriticalErrorMsg(QString const &errorMsg, bool upper=false, bool lower=false);
|
2023-10-18 16:20:49 +02:00
|
|
|
void printCriticalErrorMsg(QStringList const &errorMsg);
|
2023-10-22 19:44:45 +02:00
|
|
|
void printInfoMsg(QString const &infoMsg, bool upper=false, bool lower=false);
|
2023-10-18 16:20:49 +02:00
|
|
|
void printInfoMsg(QStringList const &infoMsg);
|
2023-10-22 19:44:45 +02:00
|
|
|
void printUpdateStatusMsg(QDebug &debug, QStringList const &updateMsg);
|
2023-10-18 16:20:49 +02:00
|
|
|
void printUpdateStatusMsg(QStringList const &updateMsg);
|
2023-10-22 19:44:45 +02:00
|
|
|
void printUpdateStatusMsg(QString const &updateMsg, bool upper=false, bool lower=false);
|
2023-10-23 16:16:11 +02:00
|
|
|
void printUpdateStatusMsg(QDebug &debug, QString const &updateMsg, bool upper=false, bool lower=false);
|
2023-08-11 11:03:21 +02:00
|
|
|
void printLineEditInfo(QStringList const &lines);
|
|
|
|
QString getTariffLoadTime(QString fileName);
|
2023-08-18 11:41:16 +02:00
|
|
|
QString rstrip(QString const &str);
|
2023-08-22 12:29:52 +02:00
|
|
|
bool sameFilesInDirs(QDir const &dir1, QDir const &dir2,
|
|
|
|
QStringList const &nameFilters = {"*.json"});
|
2023-09-04 11:42:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
QString getParentName();
|
2023-09-09 14:33:13 +02:00
|
|
|
bool isATBQTRunning();
|
2023-08-02 15:45:20 +02:00
|
|
|
}
|
2023-05-19 15:32:52 +02:00
|
|
|
|
|
|
|
#endif // UTILS_H_INCLUDED
|