-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdsplitedwindow.h
50 lines (37 loc) · 1.2 KB
/
dsplitedwindow.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
#ifndef DSPLITEDWINDOW_H
#define DSPLITEDWINDOW_H
#include <DBlurEffectWidget>
DWIDGET_BEGIN_NAMESPACE
class DSplitedBar;
/**
* @brief Class that provides modern Ui with splited (left/right) window.
*/
class DSplitedWindow : public QWidget
{
Q_OBJECT
public:
explicit DSplitedWindow(QWidget *parent = nullptr, bool leftBlurEnabled = true, DBlurEffectWidget::BlendMode blendMode = DBlurEffectWidget::BlendMode::BehindWindowBlend);
QWidget *leftWidget() const;
QWidget *rightWidget() const;
QWidget *bottomWidget() const;
DSplitedBar *splitedbar() const;
void setLeftBlur(bool leftBlur);
void setLeftBlurMode(DBlurEffectWidget::BlurMode);
void setLeftBlendMode(DBlurEffectWidget::BlendMode);
void setLeftBlurColor(QColor color);
void setRightWidget(QWidget *w);
void setBottomWidget(QWidget *w);
void setLeftAreaWidth(int width);
int leftAreaWidth();
protected:
void resizeEvent(QResizeEvent *e) override;
private:
DSplitedBar *m_bar;
DBlurEffectWidget *m_leftw = nullptr;
QWidget *m_bottomw = nullptr;
QWidget *m_rightw = nullptr;
bool isOriginal = true;
int m_leftwidth = 250;
};
DWIDGET_END_NAMESPACE
#endif // DSPLITEDWINDOW_H