if you need sig/slot usage: connect your SIGNAL directly to Client::instance(), SIGNAL(sendInput(BufferInfo, QString))
}
BufferInfo Buffer::bufferInfo() const {
- // still needed to process user input... *sigh*
- // ... and for the gui *sigh* to request the backlogs *sigh*
+ // still needed by the gui *sigh* to request the backlogs *sigh*
return _bufferInfo;
}
return layoutQueue.count();
}
-void Buffer::processUserInput(QString msg) {
- // TODO User Input processing (plugins) -> well, this goes through MainWin into Core for processing... so...
- emit userInput(_bufferInfo, msg);
-}
-
QList<AbstractUiMsg *> contents() const;
signals:
- void userInput(const BufferInfo &, QString);
-
void msgAppended(AbstractUiMsg *);
void msgPrepended(AbstractUiMsg *);
void layoutQueueEmpty();
void prependMsg(const Message &);
bool layoutMsg();
- void processUserInput(QString);
-
private:
BufferInfo _bufferInfo;
if(!buff) {
Client *client = Client::instance();
buff = new Buffer(id, client);
-
- connect(buff, SIGNAL(userInput(BufferInfo, QString)),
- client, SLOT(userInput(BufferInfo, QString)));
connect(buff, SIGNAL(destroyed()),
client, SLOT(bufferDestroyed()));
client->_buffers[id.uid()] = buff;
}
/*** ***/
-
-void Client::fakeInput(BufferId bufferUid, QString message) {
- Buffer *buff = buffer(bufferUid);
- if(!buff)
- qWarning() << "No Buffer with uid" << bufferUid << "can't send Input" << message;
- else
- instance()->userInput(buff->bufferInfo(), message);
+void Client::userInput(BufferInfo bufferInfo, QString message) {
+ emit instance()->sendInput(bufferInfo, message);
}
/*** core connection stuff ***/
return instance()->mainUi->layoutMsg(msg);
}
-void Client::userInput(BufferInfo id, QString msg) {
- emit sendInput(id, msg);
-}
-
static bool isConnected();
static bool isSynced();
- static void fakeInput(BufferId bufferUid, QString message);
+ static void userInput(BufferInfo bufferInfo, QString message);
static void storeSessionData(const QString &key, const QVariant &data);
static QVariant retrieveSessionData(const QString &key, const QVariant &def = QVariant());
void setCoreConfiguration(const QVariantMap &settings);
- void userInput(BufferInfo, QString);
-
private slots:
void recvSessionData(const QString &key, const QVariant &data);
***************************************************************************/
#include "client.h"
-//#include "buffer.h"
#include "bufferview.h"
#include "networkmodel.h"
}
void BufferView::joinChannel(const QModelIndex &index) {
- BufferItem::Type bufferType = (BufferItem::Type)index.data(NetworkModel::BufferTypeRole).toInt();
+ BufferItem::Type bufferType = (BufferItem::Type)index.data(NetworkModel::BufferTypeRole).value<int>();
if(bufferType != BufferItem::ChannelType)
return;
+
+ BufferInfo bufferInfo = index.data(NetworkModel::BufferInfoRole).value<BufferInfo>();
- Client::fakeInput(index.data(NetworkModel::BufferIdRole).value<BufferId>(), QString("/JOIN %1").arg(index.sibling(index.row(), 0).data().toString()));
+ Client::userInput(bufferInfo, QString("/JOIN %1").arg(bufferInfo.buffer()));
+ // Client::fakeInput(index.data(NetworkModel::BufferIdRole).value<BufferId>(), QString("/JOIN %1").arg(index.sibling(index.row(), 0).data().toString()));
}
void BufferView::keyPressEvent(QKeyEvent *event) {
QAction *result = nickContextMenu.exec(QCursor::pos());
if (result == whoisAction ) {
- Client::instance()->userInput(bufferInfo, "/WHOIS "+username);
+ Client::userInput(bufferInfo, "/WHOIS "+username);
}
}
quasselVersion = "0.2.0-pre";
quasselDate = "2008-01-28";
- quasselBuild = 393;
+ quasselBuild = 395;
//! Minimum client build number the core needs
clientBuildNeeded = 358;