#ifndef MAIN_H #define MAIN_H #include #include #include #include #include #include #include #include #include // #include #include #include //SQL #include #include #include //JSON #include #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE #include #include #include #include //opencv #include #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