-
Notifications
You must be signed in to change notification settings - Fork 17
/
titlebar.h
39 lines (31 loc) · 918 Bytes
/
titlebar.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
#ifndef TITLEBAR_H
#define TITLEBAR_H
#include <QWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QMouseEvent>
#include <QPainter>
#include <QAction>
class TitleBar : public QWidget
{
Q_OBJECT
public:
explicit TitleBar(QWidget *parent = nullptr);
QPushButton *pushButton_login, *pushButton_register, *pushButton_lastPage, *pushButton_nextPage, *pushButton_minimize, *pushButton_maximize, *pushButton_close;
QLineEdit *lineEdit_search, *lineEdit_page;
QAction *action_search, *action_set;
protected:
bool eventFilter(QObject *obj, QEvent *event);
private:
bool MLBD;
QPoint relativePos;
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void paintEvent(QPaintEvent *event);
signals:
void moveMainWindow(QPoint);
private slots:
void about();
};
#endif // TITLEBAR_H