62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
#ifndef TESTPLUGIN_H
|
|
#define TESTPLUGIN_H
|
|
|
|
|
|
#include <../../src/interface.h>
|
|
#include "client.h"
|
|
#include "hostmask.h"
|
|
#include <QtWidgets>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
class QDialogButtonBox;
|
|
class QFile;
|
|
class QFtp;
|
|
class QLabel;
|
|
class QLineEdit;
|
|
class QTreeWidget;
|
|
class QTreeWidgetItem;
|
|
class QPushButton;
|
|
class QUrlInfo;
|
|
class QNetworkSession;
|
|
QT_END_NAMESPACE
|
|
|
|
class IrcClientPlugin : public QObject, public Interface
|
|
{
|
|
Q_OBJECT
|
|
Q_PLUGIN_METADATA(IID "org.SOM.Interface" FILE "IrcClientPlugin.json")
|
|
Q_INTERFACES(Interface)
|
|
|
|
public:
|
|
QString pname() override;
|
|
QString pdesc() override;
|
|
QWidget *pcontent() override;
|
|
void connectToHost(QObject* host) override;
|
|
|
|
|
|
private:
|
|
void append(const QString& line);
|
|
QWidget *test;
|
|
QPushButton *sendButton;
|
|
QPushButton *connectButton;
|
|
QPushButton *joinButton;
|
|
QLineEdit *smallEditor;
|
|
QLineEdit *topic;
|
|
QTextBrowser *msgs;
|
|
QTextEdit *nicks;
|
|
|
|
Client *_client;
|
|
|
|
private slots:
|
|
void connectToServer();
|
|
void changePixmap();
|
|
void joinRoom();
|
|
void sendMsg();
|
|
void onPrivmsgReceived(const Hostmask& hostmask, const QString& target, const QString& text);
|
|
void onNamesListReceived(const QString& text);
|
|
void onJoinMsgReceived(const Hostmask& hostmask, const QString& target, const QString& text);
|
|
void onQuitMsgReceived(const Hostmask& hostmask, const QString& target, const QString& text);
|
|
void onTopicReceived(const Hostmask& hostmask, const QString& target, const QString& text);
|
|
|
|
};
|
|
#endif
|