Ai
81 Star 380 Fork 168

LibQQt应用程序开发组织/LibQQt

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
qqtframe.h 4.05 KB
一键复制 编辑 原始数据 按行查看 历史
tianduanrui 提交于 2020-03-15 14:19 +08:00 . add p3line to qqtframe.h
#ifndef QQTFRAMEDEFINE_H
#define QQTFRAMEDEFINE_H
#include <QWidget>
#include <QUuid>
#include <QApplication>
#include <QMessageBox>
#include <QFile>
#include <QMutex>
#include <QDateTime>
#include <QTextStream>
#include <QElapsedTimer>
#include <QDesktopWidget>
#include <QDebug>
#include <QSqlDatabase>
#include <QSqlError>
#include <QDir>
#include <qqtcore.h>
#include <qqtsql.h>
#include <qqt-local.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
enum
{
Login_Request,
Login_Success,
};
enum
{
Event_TypeId,
Event_TypeName,
};
enum
{
Language_English,
Language_Chinese,
};
enum
{
FILE_NAME,
FILE_SIZE,
FILE_TYPE,
FILE_DATE,
FILE_ID,
FILE_PATH,
FILE_FILEPATH,
FILE_MAX,
};
enum
{
DIR_NAME,
DIR_CODE,
DIR_PATH,
DIR_MAX,
};
#define CONFIG_ROOT QCoreApplication::applicationDirPath()
#define CONFIG_PATH QString("conf")
#define LOG_PATH QString("log")
#define AV_PATH QString("res")
#define SKIN_PATH QString("skin")
#define FONT_PATH QString("font")
#define DB_PATH QString("db")
#define LANG_PATH QString("lang")
#define CACHE_PATH QString("cache")
#if defined (__ANDROIDX86__)
#define conf_root(file) QString("assets:/%1%2").arg("").arg(file)
#define conf_res(file) QString("assets:/%1/%2").arg("res").arg(file)
#define conf_skin(file) QString("assets:/%1/%2").arg("skin").arg(file)
#define conf_font(file) QString("assets:/%1/%2").arg("font").arg(file)
#define conf_db(file) QString("assets:/%1/%2").arg("db").arg(file)
#define conf_lang(file) QString("assets:/%1/%2").arg("lang").arg(file)
#define conf_conf(file) QString("assets:/%1/%2").arg("conf").arg(file)
#define conf_log(file) QString("assets:/%1/%2").arg("log").arg(file)
#define conf_cache(file) QString("assets:/%1/%2").arg("cache").arg(file)
#elif defined (__ANDROID__)
#define conf_root(file) QString("://%1%2").arg("").arg(file)
#define conf_res(file) QString("://%1/%2").arg("res").arg(file)
#define conf_skin(file) QString("://%1/%2").arg("skin").arg(file)
#define conf_font(file) QString("://%1/%2").arg("font").arg(file)
#define conf_db(file) QString("://%1/%2").arg("db").arg(file)
#define conf_lang(file) QString("://%1/%2").arg("lang").arg(file)
#define conf_conf(file) QString("://%1/%2").arg("conf").arg(file)
#define conf_log(file) QString("://%1/%2").arg("log").arg(file)
#define conf_cache(file) QString("://%1/%2").arg("cache").arg(file)
#else
#define conf_root(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1%2").arg("").arg(file))
#define conf_res(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(AV_PATH).arg(file))
#define conf_skin(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(SKIN_PATH).arg(file))
#define conf_font(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(FONT_PATH).arg(file))
#define conf_db(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(DB_PATH).arg(file))
#define conf_lang(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(LANG_PATH).arg(file))
#define conf_conf(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(CONFIG_PATH).arg(file))
#define conf_log(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(LOG_PATH).arg(file))
#define conf_cache(file) QDir(CONFIG_ROOT).absoluteFilePath(QString("%1/%2").arg(CACHE_PATH).arg(file))
#endif
#define p3time() pline() << qPrintable(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss zzz"))
#define p3line() qDebug() << qPrintable(QString(__FILE__).split('/').last()) << qPrintable(QString("%1").arg(__LINE__, 3, 10)) << __func__
extern QString gUserName;
extern QString gPassword;
extern int gAuthority;
#ifdef __cplusplus
}
#endif /* __cplusplus */
void QQt4FrameMsgHandler ( QtMsgType type, const char* msg );
#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
void QQt5FrameMsgHandler ( QtMsgType type, const QMessageLogContext& context, const QString& content );
#endif
/*当前登陆用户 是否具有 函数要求的权限*/
bool hasAuthority ( int authId = Auth_Admin );
#endif // QQTFRAMEDEFINE_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/drabel/LibQQt.git
git@gitee.com:drabel/LibQQt.git
drabel
LibQQt
LibQQt
master

搜索帮助