-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaintTogetherDialog.h
More file actions
35 lines (27 loc) · 893 Bytes
/
PaintTogetherDialog.h
File metadata and controls
35 lines (27 loc) · 893 Bytes
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
#ifndef PAINTTOGETHERDIALOG_H
#define PAINTTOGETHERDIALOG_H
#include <QDialog>
#include <QLineEdit>
#include "NetworkManager.h"
class PaintTogetherDialog : public QDialog
{
Q_OBJECT
public:
explicit PaintTogetherDialog(QWidget *parent = nullptr, NetworkManager *networkManager = nullptr);
~PaintTogetherDialog();
// Method to set the session code
void setSessionCode(const QString &sessionCode);
private:
QLineEdit *sessionCodeField; // Non-editable text field for session code
QPushButton *hostButton;
QPushButton *joinButton;
NetworkManager *networkManager;
private slots:
void onHostClicked();
void onJoinClicked();
signals:
// Signals to notify the main window of session creation or joining
void sessionCreated(const QString &sessionCode);
void sessionJoined(const QString &sessionCode);
};
#endif // PAINTTOGETHERDIALOG_H