| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- #ifndef MAIN_H
- #define MAIN_H
- #include <QApplication>
- #include <QGuiApplication>
- #include <QQmlApplicationEngine>
- #include <QQuickView>
- #include <QtQml>
- #include <QDebug>
- #include <QLocale>
- #include <QTranslator>
- #include <QString>
- //
- #include <QtCore>
- #include <QStandardPaths>
- #include <qjniobject.h>
- //SQL
- #include <QSqlDatabase>
- #include <QSqlError>
- #include <QSqlQuery>
- //JSON
- #include <QJsonDocument>
- #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE
- #include <spdlog/spdlog.h>
- #include <spdlog/logger.h>
- #include <spdlog/sinks/rotating_file_sink.h>
- #include <spdlog/sinks/stdout_color_sinks.h>
- //opencv
- #include <opencv2/opencv.hpp>
- #define LOG(...) SPDLOG_LOGGER_INFO(spdlog::get("console"), __VA_ARGS__);SPDLOG_LOGGER_INFO(spdlog::get("rotating_logger"), __VA_ARGS__)
- #define WARN(...) SPDLOG_LOGGER_WARN(spdlog::get("console"), __VA_ARGS__);SPDLOG_LOGGER_WARN(spdlog::get("rotating_logger"), __VA_ARGS__)
- #define SPD_ERROR(...) SPDLOG_LOGGER_ERROR(spdlog::get("console"), __VA_ARGS__);SPDLOG_LOGGER_ERROR(spdlog::get("rotating_logger"), __VA_ARGS__)
- #define DEBUG(...) SPDLOG_LOGGER_DEBUG(spdlog::get("console"), __VA_ARGS__);SPDLOG_LOGGER_DEBUG(spdlog::get("rotating_logger"), __VA_ARGS__)
- using namespace std;
- using namespace cv;
- //全局变量类继承自QObject,用于qml访问
- class param
- {
- public:
- //explicit param();
- //db表
- static QString table_mqtt;
- static QString table_mqtt_other;
- static QString table_ftp;
- static QString table_ftp_other;
- static QString table_location;
- static QString table_camera;
- static QString table_mqtt_historydata;
- //type
- static QString dtype;
- static QString imei;
- //mqtt
- static QString mqtt_main_ip;
- static QString mqtt_other_ip;
- static int mqtt_main_port;
- static int mqtt_other_port;
- static int mqtt_main_keepalive;
- static int mqtt_other_keepalive;
- static int mqtt_main_qos;
- static int mqtt_other_qos;
- static QString mqtt_main_clientid;
- static QString mqtt_other_clientid;
- static QString mqtt_main_uid;
- static QString mqtt_other_uid;
- static QString mqtt_main_pwd;
- static QString mqtt_other_pwd;
- static QString mqtt_main_sub;
- static QString mqtt_other_sub;
- static QString mqtt_main_pub;
- static QString mqtt_other_pub;
- static QString mqtt_main_offline;
- static QString mqtt_other_offline;
- //ftp
- static QString ftp_main_ip;
- static QString ftp_other_ip;
- static int ftp_main_port;
- static int ftp_other_port;
- static QString ftp_main_dir;
- static QString ftp_other_dir;
- static QString ftp_main_uid;
- static QString ftp_other_uid;
- static QString ftp_main_pwd;
- static QString ftp_other_pwd;
- static int ftp_main_mode; //主动模式? 被动模式
- static int ftp_other_mode; //主动模式? 被动模式
- //location
- static QString lbs_lat;
- static QString lbs_lng;
- static QString gps_lat;
- static QString gps_lng;
- static QString gps_elevation;
- //camera
- private:
- };
- #endif // MAIN_H
|