Add gui option for joining rooms (#25)
This commit is contained in:
parent
bba3bba55a
commit
19bae2a2e6
9 changed files with 98 additions and 13 deletions
|
|
@ -1,10 +1,16 @@
|
|||
#pragma once
|
||||
|
||||
#include <QAction>
|
||||
#include <QHBoxLayout>
|
||||
#include <QResizeEvent>
|
||||
#include <QWidget>
|
||||
|
||||
#include "FlatButton.h"
|
||||
#include "Menu.h"
|
||||
|
||||
#include "dialogs/JoinRoom.h"
|
||||
|
||||
class OverlayModal;
|
||||
|
||||
class SideBarActions : public QWidget
|
||||
{
|
||||
|
|
@ -16,6 +22,7 @@ public:
|
|||
|
||||
signals:
|
||||
void showSettings();
|
||||
void joinRoom(const QString &room);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
|
@ -23,6 +30,13 @@ protected:
|
|||
private:
|
||||
QHBoxLayout *layout_;
|
||||
|
||||
Menu *addMenu_;
|
||||
QAction *createRoomAction_;
|
||||
QAction *joinRoomAction_;
|
||||
|
||||
QSharedPointer<OverlayModal> joinRoomModal_;
|
||||
QSharedPointer<dialogs::JoinRoom> joinRoomDialog_;
|
||||
|
||||
FlatButton *settingsBtn_;
|
||||
FlatButton *createRoomBtn_;
|
||||
FlatButton *joinRoomBtn_;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#include <QFrame>
|
||||
#include <QLineEdit>
|
||||
|
||||
class FlatButton;
|
||||
class TextField;
|
||||
|
||||
namespace dialogs {
|
||||
|
||||
|
|
@ -14,13 +14,16 @@ public:
|
|||
JoinRoom(QWidget *parent = nullptr);
|
||||
|
||||
signals:
|
||||
void closing(bool isJoining, QString roomAlias);
|
||||
void closing(bool isJoining, const QString &room);
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
private:
|
||||
FlatButton *confirmBtn_;
|
||||
FlatButton *cancelBtn_;
|
||||
|
||||
QLineEdit *roomAliasEdit_;
|
||||
TextField *roomInput_;
|
||||
};
|
||||
|
||||
} // dialogs
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class TextField : public QLineEdit
|
|||
|
||||
Q_PROPERTY(QColor textColor WRITE setTextColor READ textColor)
|
||||
Q_PROPERTY(QColor inkColor WRITE setInkColor READ inkColor)
|
||||
Q_PROPERTY(QColor labelColor WRITE setLabelColor READ labelColor)
|
||||
Q_PROPERTY(QColor underlineColor WRITE setUnderlineColor READ underlineColor)
|
||||
Q_PROPERTY(QColor backgroundColor WRITE setBackgroundColor READ backgroundColor)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue