-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwidget.h
82 lines (62 loc) · 1.51 KB
/
mainwidget.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#ifndef MAINWIDGET_H
#define MAINWIDGET_H
#include <QWidget>
#include <QAction>
#include <QPoint>
#include <QMouseEvent>
#include <QSize>
#include <QProcess>
#include <QPainter>
#include <QColor>
#include <QFont>
#include <QRect>
#include "btnmodel.h"
#include "buttonlabel.h"
#include "msgwidget.h"
#include "getmsg.h"
#include "httpmsg.h"
#include "readconf.h"
namespace Ui {
class mainWidget;
}
class mainWidget : public QWidget
{
Q_OBJECT
public:
explicit mainWidget(QPoint pos, QWidget *parent = 0);
~mainWidget();
/// 获取本对象的位置
QPoint widgetPos ();
protected:
void paintEvent(QPaintEvent*);
private slots:
/// 搜索
void setCmdSearch (bool);
/// 全部
void setCmdAll (bool);
/// OA系统
void setCmdA (bool);
/// 待办系统
void setCmdB (bool);
/// 监控系统
void setCmdC (bool);
/// 仅看未读
void setCmdNoRead (int state);
/// 开始搜索
void setStartSearch ();
void hideWidget ();
private:
void mousePressEvent(QMouseEvent* event);
void mouseMoveEvent (QMouseEvent* event);
void initUI (void);
void initConn (void);
void getAllMsgList ();
int getMsgCnt ();
private:
Ui::mainWidget *ui;
QPoint m_dPos;
QPoint m_widgetPos; /// 记忆界面的位置
QAction* m_searchAction;
MsgWidget* m_msgWidget; /// 消息界面
};
#endif // MAINWIDGET_H