blob: 662750b3383f7e24ed769b37737a9411e664adb4 (
plain) (
blame)
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
|
#pragma once
#include <QAction>
#include <QHBoxLayout>
#include <QWidget>
namespace mtx {
namespace requests {
struct CreateRoom;
}
}
class Menu;
class FlatButton;
class QResizeEvent;
class SideBarActions : public QWidget
{
Q_OBJECT
Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor)
public:
SideBarActions(QWidget *parent = nullptr);
QColor borderColor() const { return borderColor_; }
void setBorderColor(QColor &color) { borderColor_ = color; }
signals:
void showSettings();
void joinRoom(const QString &room);
void createRoom(const mtx::requests::CreateRoom &request);
protected:
void resizeEvent(QResizeEvent *event) override;
void paintEvent(QPaintEvent *event) override;
private:
QHBoxLayout *layout_;
Menu *addMenu_;
QAction *createRoomAction_;
QAction *joinRoomAction_;
FlatButton *settingsBtn_;
FlatButton *createRoomBtn_;
FlatButton *roomDirectory_;
QColor borderColor_;
};
|