45 lines
1.0 KiB
Plaintext
45 lines
1.0 KiB
Plaintext
/*
|
|
* Public.h
|
|
*
|
|
* Created on: Jul 16, 2013
|
|
* Author: yiyu
|
|
* QQ:1036184468
|
|
* Descriptoin:
|
|
|
|
*/
|
|
|
|
#ifndef PUBLIC_H_
|
|
#define PUBLIC_H_
|
|
|
|
#include <Qt>
|
|
#include <QString>
|
|
#include <stdlib.h>
|
|
#include <QFont>
|
|
|
|
extern void MySleep(unsigned int msec);
|
|
|
|
class Public{
|
|
public:
|
|
Public();
|
|
~Public();
|
|
static int getMinFontPixelSize();
|
|
static QString getFontFamily(int pixelSize);
|
|
static QString getFontFamily(int pixelSize, int vartype);// 20160812
|
|
static int derivePixelSizeFromHeight(int value);
|
|
static int derivePixelSizeFromHeightNx(int value);
|
|
static int getAdjustedPixelSize(int value);
|
|
static void resetPara();
|
|
static void backupPara();
|
|
static QString readLanguageType();
|
|
static QString ReadLanguageName();
|
|
static int getNumberHeight(QFont font);
|
|
static time_t getDateFromMacro(const char *time);
|
|
static QString DateToString(const char *time);
|
|
|
|
static int getType(int vartype); // 将变量类型进行转换,以处理横向字体
|
|
|
|
};
|
|
|
|
|
|
#endif /* PUBLIC_H_ */
|