* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef _GUI_H_
-#define _GUI_H_
+#ifndef _CLIENT_H_
+#define _CLIENT_H_
#include <QtCore>
-#include <QtGui>
#include <QtNetwork>
-#include "global.h"
+#include "quasselui.h"
#include "buffer.h"
#include "message.h"
-#include "guiproxy.h"
-#include "bufferviewwidget.h"
+#include "proxy_common.h"
-class MainWin;
class ClientProxy;
-//class BufferTreeModel;
+class BufferTreeModel;
class Client : public QObject {
Q_OBJECT
public:
static Client *instance();
+ static void init(AbstractUi *);
static void destroy();
static Buffer *buffer(BufferId);
static BufferTreeModel *bufferModel();
+ static AbstractUiMsg *layoutMsg(const Message &);
+
signals:
void sendInput(BufferId, QString message);
void showBuffer(Buffer *);
void networkConnected(QString);
void networkDisconnected(QString);
void recvNetworkState(QString, QVariant);
- void recvMessage(Message message);
+ void recvMessage(const Message &message);
void recvStatusMsg(QString network, QString message);
void setTopic(QString net, QString buf, QString);
void addNick(QString net, QString nick, VarMap props);
void renameNick(QString net, QString oldnick, QString newnick);
void updateNick(QString net, QString nick, VarMap props);
void setOwnNick(QString net, QString nick);
- void recvBacklogData(BufferId, QList<QVariant>, bool);
+ void recvBacklogData(BufferId, const QList<QVariant> &, bool);
void updateBufferId(BufferId);
void layoutMsg();
enum ClientMode { LocalCore, RemoteCore };
static ClientMode clientMode;
- MainWin *mainWin;
+ AbstractUi *mainUi;
ClientProxy *clientProxy;
BufferTreeModel *_bufferModel;
static QList<BufferId> coreBuffers;
QTimer *layoutTimer;
- QList<Message> layoutQueue;
+ QList<Buffer *> layoutQueue;
};
#endif