You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
920 B
40 lines
920 B
#pragma once |
|
|
|
#include <QDialog> |
|
#include <QLineEdit> |
|
#include <QLabel> |
|
#include <QPushButton> |
|
#include <QTimer> |
|
#include <cstdint> |
|
|
|
class UtunNode; |
|
class DbManager; |
|
|
|
class JoinDialog : public QDialog { |
|
Q_OBJECT |
|
public: |
|
explicit JoinDialog(UtunNode* node, DbManager* db, QWidget* parent = nullptr); |
|
~JoinDialog() override; |
|
|
|
signals: |
|
void joined(const QString& channelId); |
|
|
|
private slots: |
|
void onConnectClicked(); |
|
void onLinkTextChanged(); |
|
|
|
private: |
|
void setStatus(const QString& text, bool isError = false); |
|
void onConnectResult(uint64_t nodeId, uint64_t channelId, int result); |
|
|
|
UtunNode* m_node; |
|
DbManager* m_db; |
|
QLineEdit* m_linkEdit; |
|
QLabel* m_statusLabel; |
|
QPushButton* m_connectBtn; |
|
QPushButton* m_cancelBtn; |
|
QTimer* m_decodeTimer; |
|
bool m_connecting = false; |
|
uint64_t m_pendingNodeId = 0; |
|
uint64_t m_pendingChannelId = 0; |
|
};
|
|
|