Esempio n. 1
0
KIPCClient::KIPCClient(QObject *parent, QLocalSocket *socket) : QObject(parent), _socket(socket), _ipcIndex(0)
{
    if (!_socket) {
        _socket = new QLocalSocket(this);
        connect(&_updateTimer, SIGNAL(timeout()), this, SLOT(onUpdateConnection()));
    }
    connect(_socket, SIGNAL(readyRead()), this, SLOT(onReadyRead()));
}
Esempio n. 2
0
int Session::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = IrcSession::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: outputString((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
        case 1: newNamesList((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QStringList(*)>(_a[2]))); break;
        case 2: newChannelList((*reinterpret_cast< QStringList(*)>(_a[1]))); break;
        case 3: onConnected(); break;
        case 4: onMessageReceived((*reinterpret_cast< IrcMessage*(*)>(_a[1]))); break;
        case 5: onInputReceived((*reinterpret_cast< QString(*)>(_a[1])),(*reinterpret_cast< QString(*)>(_a[2]))); break;
        case 6: onRefreshNames((*reinterpret_cast< QString(*)>(_a[1]))); break;
        case 7: onUpdateConnection((*reinterpret_cast< Connection*(*)>(_a[1]))); break;
        case 8: onPassword((*reinterpret_cast< QString*(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 9;
    }
    return _id;
}
Esempio n. 3
0
void KIPCClient::connectToServer()
{   
    _updateTimer.start(2000);
    onUpdateConnection();
}