⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ydefine.h

📁 世界时间转换程序
💻 H
字号:
/****************************************************************************** ydefine.h ** defined all predefine** Created: Sat Oct 15 22:09:22 2005**      by: Wya**** WARNING!****************************************************************************/#ifndef YDEFINE_H#define YDEFINE_H#include <QString>#include <QtDebug>#include <QDir>//////////////////////////////////////////type define#ifndef bytetypedef unsigned char byte;typedef unsigned short int word;typedef unsigned int dword;#endif#define MAKEFILE_INFOS ("YMAKEFILE")#ifdef YNOTDEBUG#define yDebug  #else//not add qDebug we need add new function#define yDebug#endif#ifdef TIME_EVENT#define timerDebug yDebug#else#define timerDebug#endif#define CASE(x,y) case ENIPWarnCode_kPPP_ ## x: return y#ifdef check#endif////////////////////////////////////////////////////////////////// we will define the file name of configuratin in win or linux#ifdef LINUX_CONFIGURATION  //if on Linux saved in home dirconst char linux_path='/';#define PATH_SYMBOL linux_path#define FILENAME ("/traceview.cnf") //attention!! add "/"#define SAVEDIR  (QDir::homePath()) //return same as "/home/myhomedir"#define CONFIGURATIONFILENAME  SAVEDIR+FILENAME  //#define COMMAND_XTERM         ("/usr/bin/xterm")#define SAVEFUN              ("/mapinfo.def")#define FILE_SAVE_FUN         SAVEDIR+SAVEFUNconst QString TMP_DIR=QDir::tempPath () ;const QString CONFIGURATION_DIR= QDir::homePath(); //#ifdef TA_ONLY#define MAPSEARCHFILE         ("/doc/swd/Tools/INT/cross_referencing/mapsearch")#else#define MAPSEARCHFILE         ("mapsearch")#endif#define EXECUTEDIR           (QDir::currentDirPath())#define MAPSEARCH           EXECUTEDIR+MAPSEARCHFILE#endif#ifdef WIN_CONFIGURATION   //if on windows saved in the install dirconst char windows_path='\\';#define SAVEDIR  (QDir::homePath()) //return same as "\home\myhomedir"#define PATH_SYMBOL windows_path#define FILENAME ("\\traceview.cnf") //attention!! add "\"#define CONFIGURATIONFILENAME  SAVEDIR+FILENAME #define COMMAND_XTERM   ("cmd")#define FILE_SAVE_FUN   ("mapinfo.def")#define MAPSEARCHFILE         ("\\mapsearch")#define EXECUTEDIR           (QDir::current())#define MAPSEARCH           EXECUTEDIR+MAPSEARCHFILEconst QString TMP_DIR=QDir::homePath () ;  //because some windows not have temps dir const QString CONFIGURATION_DIR= QDir::homePath(); // #endif /////////////////////////////////////////////////////// // for parameter of initializ traceview#define GREP_COMMAND ("grep")#define MAP_FILE ("/vobs/m5_integration/dr4/tst/m5.map")#ifdef TA_ONLY #define GID ("/doc/swd/Tools/INT/cross_referencing/bin/gid")#else #define GID ("gid") #endif#define LID ("lid") //need use command <lid -R grep == gid>#define LID_PARAMETER ("lid -R grep")/*** ** for QDict size:  use  prime number **  ............17    19    23    29**  31    37    41    43    47    53    59    61    67    71**  73    79    83    89    97   101   103   107   109   113**  ...   9973** This makes the hash distribution better ** which will lead to faster lookup***/#define MAXFILE 59///////////////////////////////////////////////////////////////this fun to get current time same as 2005-12-18 17:25QString getCurrentTime();//get only file name no dirQString trFileName(const QString &f);//get only dir not fileQString trDirName(const QString &f);QString trPathName(const QString &f);QString stripFirstWhiteSpaces(const QString &f);QString stripLastWhiteSpaces(const QString &f);int indexOfStr(const QString &str,const QString & s, Qt::CaseSensitivity cs = Qt::CaseInsensitive);extern FILE * g_stream;bool openFileStream();bool closeFileStream();//overloadvoid debugInfos(const char * name , int value);void debugInfos(const char *name);QString strToHex(const QString &str);#endif // ydefine

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -