#include "util.h" // get rid of this (needed for isChannelName)
-// #define PHONDEV
/*****************************************
* Fancy Buffer Items
setFlags(flags);
}
-const BufferInfo &BufferItem::bufferInfo() const {
- return _bufferInfo;
-}
-
quint64 BufferItem::id() const {
return qHash(bufferInfo().bufferId());
}
-bool BufferItem::isStatusBuffer() const {
- return bufferType() == BufferInfo::StatusBuffer;
-}
-
-BufferInfo::Type BufferItem::bufferType() const {
- return bufferInfo().type();
-}
+// bool BufferItem::isStatusBuffer() const {
+// return bufferType() == BufferInfo::StatusBuffer;
+// }
bool BufferItem::isActive() const {
if(bufferType() == BufferInfo::ChannelBuffer)
_bufferName = name;
// as long as we need those bufferInfos, we have to update that one aswell.
// pretty ugly though :/
- _bufferInfo = BufferInfo(_bufferInfo.bufferId(), _bufferInfo.networkId(), _bufferInfo.type(), _bufferInfo.groupId(), _bufferInfo.bufferName());
+ _bufferInfo = BufferInfo(_bufferInfo.bufferId(), _bufferInfo.networkId(), _bufferInfo.type(), _bufferInfo.groupId(), name);
emit dataChanged(0);
}
this, SLOT(attachIrcChannel(QString)));
connect(network, SIGNAL(connectedSet(bool)),
this, SIGNAL(dataChanged()));
-
- // FIXME: connect this and that...
emit dataChanged();
}
QString IrcUserItem::toolTip(int column) const {
Q_UNUSED(column);
QStringList toolTip(QString("<b>%1</b>").arg(nickName()));
+ if(_ircUser->userModes() != "") toolTip[0].append(QString(" (%1)").arg(_ircUser->userModes()));
if(_ircUser->isAway()) toolTip[0].append(" is away");
if(!_ircUser->awayMessage().isEmpty()) toolTip[0].append(QString(" (%1)").arg(_ircUser->awayMessage()));
if(!_ircUser->realName().isEmpty()) toolTip.append(_ircUser->realName());
if(!_ircUser->ircOperator().isEmpty()) toolTip.append(_ircUser->ircOperator());
- toolTip.append(_ircUser->hostmask());
+ toolTip.append(_ircUser->hostmask().remove(0, _ircUser->hostmask().indexOf("!")+1));
if(_ircUser->idleTime().isValid()) {
QDateTime now = QDateTime::currentDateTime();
}
toolTip.append(tr("idling since %1").arg(idleString));
}
+ if(_ircUser->loginTime().isValid()) {
+ toolTip.append(tr("login time: %1").arg(_ircUser->loginTime().toString()));
+ }
if(!_ircUser->server().isEmpty()) toolTip.append(tr("server: %1").arg(_ircUser->server()));