diff options
| author | 2021-03-28 14:03:03 +0200 | |
|---|---|---|
| committer | 2021-03-28 14:03:03 +0200 | |
| commit | ee2d8b89c41d32a0e341ca564fd8e6e09267a4a6 (patch) | |
| tree | 11a4d40d4b896b87f6b341acf9f88b9b2da28b99 /irc/botircdiceparser.h | |
| parent | de55ac4c76ef3f6dbdc6fd2d03e3484bcfccdb0e (diff) | |
| download | OneRoll-ee2d8b89c41d32a0e341ca564fd8e6e09267a4a6.tar.gz OneRoll-ee2d8b89c41d32a0e341ca564fd8e6e09267a4a6.zip | |
[irc] fix compilation
Diffstat (limited to 'irc/botircdiceparser.h')
| -rw-r--r-- | irc/botircdiceparser.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/irc/botircdiceparser.h b/irc/botircdiceparser.h index 848c200..4509646 100644 --- a/irc/botircdiceparser.h +++ b/irc/botircdiceparser.h @@ -26,9 +26,17 @@ #include <QTcpSocket> +struct ConnectionInfo { + QString m_host; + QString m_channel; + QString m_nickname; + int m_port; +}; + class BotIrcDiceParser : public QObject { Q_OBJECT + Q_PROPERTY(ConnectionInfo info READ info WRITE setInfo NOTIFY infoChanged) public: explicit BotIrcDiceParser(QObject* parent= 0); @@ -36,14 +44,13 @@ public: QString diceToText(QList<ExportedDiceResult>& dice, bool highlight, bool homogeneous); QString startDiceParsing(QString& cmd, bool highlight); + ConnectionInfo info() const; + public slots: void errorOccurs(QAbstractSocket::SocketError); void connectToServer(); + void setInfo(const ConnectionInfo & info); -private: - // Ui::BotIrcDiceParser *ui; - QTcpSocket* m_socket; - DiceParser* m_parser; private slots: void readData(); @@ -51,6 +58,15 @@ private slots: void authentificationProcess(); void joinChannel(); void setRegisterName(); + + +signals: + void infoChanged(); + +private: + QTcpSocket* m_socket; + DiceParser* m_parser; + ConnectionInfo m_info; }; #endif // MAINWINDOW_H |