ATBUpdateTool/utils.h
Gerhard Hoffmann e6f6d43bf2 Adden helpers:
QString getLocation(QString fileName);
    QString getTariffVersion(QString fileName);
    QString getTariffInfo(QString fileName);
2024-01-17 15:17:16 +01:00

39 lines
1.4 KiB
C++

#ifndef UTILS_H_INCLUDED
#define UTILS_H_INCLUDED
#include <QObject>
#include <QString>
#include <QStringList>
#include <QFile>
#include <QFileInfo>
#include <QDateTime>
#include <QDir>
#include <QDebug>
namespace Utils {
int read1stLineOfFile(QString fileName);
QString getLocation(QString fileName);
QString getTariffVersion(QString fileName);
QString getTariffInfo(QString fileName);
QString zoneName(quint8 i);
void printCriticalErrorMsg(QString const &errorMsg, bool upper=false, bool lower=false);
void printCriticalErrorMsg(QStringList const &errorMsg);
void printInfoMsg(QString const &infoMsg, bool upper=false, bool lower=false);
void printInfoMsg(QStringList const &infoMsg);
void printUpdateStatusMsg(QDebug debug, QStringList const &updateMsg);
void printUpdateStatusMsg(QStringList const &updateMsg);
void printUpdateStatusMsg(QString const &updateMsg, bool upper=false, bool lower=false);
void printUpdateStatusMsg(QDebug debug, QString const &updateMsg, bool upper=false, bool lower=false);
void printLineEditInfo(QStringList const &lines);
QString getTariffLoadTime(QString fileName);
QString rstrip(QString const &str);
bool sameFilesInDirs(QDir const &dir1, QDir const &dir2,
QStringList const &nameFilters = {"*.json"});
QString getParentName();
bool isATBQTRunning();
}
#endif // UTILS_H_INCLUDED