2017-10-28 15:46:39 +03:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-10 16:22:01 +03:00
|
|
|
#include <QAction>
|
2017-10-15 22:08:51 +03:00
|
|
|
#include <QHBoxLayout>
|
2017-10-28 15:46:39 +03:00
|
|
|
#include <QWidget>
|
2017-10-15 22:08:51 +03:00
|
|
|
|
2018-03-04 14:40:30 +03:00
|
|
|
namespace mtx {
|
|
|
|
namespace requests {
|
|
|
|
struct CreateRoom;
|
|
|
|
}
|
|
|
|
}
|
2017-10-15 22:08:51 +03:00
|
|
|
|
2018-07-17 16:37:25 +03:00
|
|
|
class Menu;
|
|
|
|
class FlatButton;
|
2020-01-31 08:12:02 +03:00
|
|
|
class QResizeEvent;
|
2018-07-17 16:37:25 +03:00
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
class SideBarActions : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2018-03-18 18:38:57 +03:00
|
|
|
Q_PROPERTY(QColor borderColor READ borderColor WRITE setBorderColor)
|
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
public:
|
|
|
|
SideBarActions(QWidget *parent = nullptr);
|
|
|
|
|
2018-03-18 18:38:57 +03:00
|
|
|
QColor borderColor() const { return borderColor_; }
|
|
|
|
void setBorderColor(QColor &color) { borderColor_ = color; }
|
|
|
|
|
2017-11-02 01:41:13 +03:00
|
|
|
signals:
|
|
|
|
void showSettings();
|
2017-12-10 16:22:01 +03:00
|
|
|
void joinRoom(const QString &room);
|
2017-12-12 00:00:37 +03:00
|
|
|
void createRoom(const mtx::requests::CreateRoom &request);
|
2017-11-02 01:41:13 +03:00
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event) override;
|
2018-01-15 22:04:49 +03:00
|
|
|
void paintEvent(QPaintEvent *event) override;
|
2017-10-15 22:08:51 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
QHBoxLayout *layout_;
|
|
|
|
|
2017-12-10 16:22:01 +03:00
|
|
|
Menu *addMenu_;
|
|
|
|
QAction *createRoomAction_;
|
|
|
|
QAction *joinRoomAction_;
|
|
|
|
|
2017-10-15 22:08:51 +03:00
|
|
|
FlatButton *settingsBtn_;
|
|
|
|
FlatButton *createRoomBtn_;
|
2018-07-25 23:28:37 +03:00
|
|
|
FlatButton *roomDirectory_;
|
2018-03-18 18:38:57 +03:00
|
|
|
|
|
|
|
QColor borderColor_;
|
2017-10-15 22:08:51 +03:00
|
|
|
};
|