This repository has been archived by the owner on May 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Title.h
71 lines (58 loc) · 1.5 KB
/
Title.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
#pragma once
#include <QWidget>
#include <QPainter>
#include "CloseButton.h"
#include "MaxiumButton.h"
#include "FloatButton.h"
#include "MiniumButton.h"
#include <QApplication>
#include <QScreen>
#include <QMouseEvent>
#include <QPoint>
#include <QMainWindow>
#include <QPixmap>
#include "Infinity_global.h"
#include <QMessageBox>
#include "MainMenuBar.h"
#include "StyleContainer.h"
#include "Infinity_Events.h"
#include "RefreshableWidget.h"
#include <QFontMetrics>
class Title : public RefreshableWidget
{
Q_OBJECT
public:
Title(QWidget* parent = Q_NULLPTR);
~Title();
void setWindowMaxium(bool windowMaxium);
void setSizeMini(QSize size);
private:
CloseButton* closeB = nullptr;
MaxiumButton* maxiumB = nullptr;
FloatButton* floatB = nullptr;
MiniumButton* miniumB = nullptr;
MainMenuBar* menuBar = nullptr;
bool mousePressed = false;
QPoint mouseStartPoint;
QPoint windowTopLeftPoint;
QSize wSizeN;
void RAII_alloc();
void RAII_free();
QString titleHead = "Infinity Studio";
protected:
void resizeAll()override;
void paintEvent(QPaintEvent* event)override;
void mousePressEvent(QMouseEvent* event)override;
void mouseMoveEvent(QMouseEvent* event)override;
void mouseReleaseEvent(QMouseEvent* event)override;
void leaveEvent(QEvent* event)override;
void mouseDoubleClickEvent(QMouseEvent* event)override;
private slots:
void on_resourceRefresh();
signals:
void closeB_clicked();
void maxiumB_clicked();
void floatB_clicked();
void miniumB_clicked();
void windowMove(QPoint pos);
};