- return _bufferInfo;
-}
-
-void Buffer::updateBufferInfo(BufferInfo bufferid) {
- _bufferInfo = bufferid;
-}
-
-uint Buffer::uid() const {
- return bufferInfo().uid();
-}
-
-uint Buffer::networkId() const {
- return bufferInfo().networkId();
-}
-
-QString Buffer::networkName() const {
- return bufferInfo().network();
-}
-
-QString Buffer::name() const {
- if(bufferType() == StatusType)
- return tr("Status Buffer");
- else
- return bufferInfo().buffer();
-}
-
-QList<AbstractUiMsg *> Buffer::contents() const {
- return layoutedMsgs;
-}
-
-QVariantMap Buffer::nickList() const {
- // FIXME should return a Map or List of IrcUsers in the future
- return QVariantMap();
-}
-
-QString Buffer::topic() const {
- // FIXME check if we got a networkInfo() object
- return QString();
-}
-
-QString Buffer::ownNick() const {
- // FIXME check if we got a networkInfo() object
- return QString();
-}
-
-bool Buffer::isStatusBuffer() const {
- return bufferType() == StatusType;
-}
-
-void Buffer::setActive(bool a) {
-// if(a != active) {
-// active = a;
-// emit bufferUpdated(this);
-// }
-}
-
-void Buffer::appendMsg(const Message &msg) {
- AbstractUiMsg *m = Client::layoutMsg(msg);
- layoutedMsgs.append(m);
- emit msgAppended(m);
-}
-
-void Buffer::prependMsg(const Message &msg) {
- layoutQueue.append(msg);
-}
-
-bool Buffer::layoutMsg() {
- if(layoutQueue.count()) {
- AbstractUiMsg *m = Client::layoutMsg(layoutQueue.takeFirst());
- layoutedMsgs.prepend(m);
- emit msgPrepended(m);
- }
- 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);
-}
-
-NickModel *Buffer::nickModel() const {
- return _nickModel;
-}
-
-IrcChannel *Buffer::ircChannel() const {
- return _ircChannel;
-}
-
-void Buffer::setIrcChannel(IrcChannel *ircchan) {
- if(_ircChannel) {
- disconnect(_ircChannel, 0, this, 0);
- }
- _ircChannel = ircchan;
- if(_ircChannel) {
- connect(_ircChannel, SIGNAL(destroyed()), this, SLOT(setIrcChannel()));
- }
- _nickModel->setIrcChannel(ircChannel());