matrixion/include/SideBarActions.h

49 lines
1 KiB
C
Raw Permalink Normal View History

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>
#include <QResizeEvent>
2017-10-28 15:46:39 +03:00
#include <QWidget>
2017-10-15 22:08:51 +03:00
2017-10-28 15:46:39 +03:00
#include "FlatButton.h"
2017-12-10 16:22:01 +03:00
#include "Menu.h"
2017-12-12 00:00:37 +03:00
#include "dialogs/CreateRoom.h"
2017-12-10 16:22:01 +03:00
#include "dialogs/JoinRoom.h"
class OverlayModal;
2017-10-15 22:08:51 +03:00
class SideBarActions : public QWidget
{
Q_OBJECT
public:
SideBarActions(QWidget *parent = nullptr);
~SideBarActions();
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;
private:
QHBoxLayout *layout_;
2017-12-10 16:22:01 +03:00
Menu *addMenu_;
QAction *createRoomAction_;
QAction *joinRoomAction_;
QSharedPointer<OverlayModal> joinRoomModal_;
QSharedPointer<dialogs::JoinRoom> joinRoomDialog_;
2017-12-12 00:00:37 +03:00
QSharedPointer<OverlayModal> createRoomModal_;
QSharedPointer<dialogs::CreateRoom> createRoomDialog_;
2017-10-15 22:08:51 +03:00
FlatButton *settingsBtn_;
FlatButton *createRoomBtn_;
FlatButton *joinRoomBtn_;
};