-
Notifications
You must be signed in to change notification settings - Fork 0
/
Defines.h
62 lines (52 loc) · 1.19 KB
/
Defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef DEFINES_H
#define DEFINES_H
#define _CRT_SECURE_NO_WARNINGS
#include <QMainWindow>
#include <QLabel>
#include <QFileDialog>
//#include <QMessageBox>
#include <QTimer>
#include <QPainter>
#include <QApplication>
//#include <QSharedMemory>
#include <QtNetwork>
#include <QDesktopWidget>
#include <QMouseEvent>
#include <QProcess>
//#include <QClipboard>
//#include <QThread>
//#include <QBitmap>
//#include "TCPServer.h"
#include <sys/timeb.h>
#if defined(WIN32)
# define TIMEB _timeb
# define ftime _ftime
//windows 的编码问题
#pragma execution_character_set("utf-8")
#else
#define TIMEB timeb
#endif
#include <iostream>
#include <cstdlib>
#include <string>
#include <ctime>
#include <cmath>
#include <fstream>
#include <vector>
#include <list>
#include <queue>
#include <map>
using namespace std;
QDir directoryOf(const QString &subdir);
QString GetFileDir(QString file);
string GetStdFileDir(string file);
bool IsLeapYear(int year);
int YearHaveDay(int year);
int MonthHaveDay(int month,bool leap);
struct Date{
int year,month,day;
int hour,minute,second;
};
Date GetDate(int offsetHour = 0);
int GetClock();
#endif