-
Notifications
You must be signed in to change notification settings - Fork 0
/
FramelessHelper.h
43 lines (32 loc) · 965 Bytes
/
FramelessHelper.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
//
// Created by weiwu on 21-5-2.
//
#ifndef RIBBONFU_FRAMELESSHELPER_H
#define RIBBONFU_FRAMELESSHELPER_H
#include <QtCore/QObject>
class FramelessHelperPrivate;
class FramelessHelper : public QObject{
Q_OBJECT
public:
explicit FramelessHelper(QObject *parent);
~FramelessHelper();
void activateOn(QWidget *topLevelWidget);
void removeFrom(QWidget *topLevelWidget);
void setWidgetMovable(bool movable);
void setWidgetResizable(bool resizable);
void setRubberBandOnMove(bool movable);
void setRubberBandOnResize(bool resizable);
void setBorderWidth(uint width);
void setTitleHeight(uint height);
bool widgetResizable();
bool widgetMovable();
bool rubberBandOnMove();
bool rubberBandOnResisze();
uint borderWidth();
uint titleHeight();
protected:
virtual bool eventFilter(QObject *obj, QEvent *event);
private:
FramelessHelperPrivate *m_d;
};
#endif //RIBBONFU_FRAMELESSHELPER_H