X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtopia%2Fmainwidget.cpp;h=4fde19b7f57b34db7fb512e612d34607868a59c6;hb=2ef12747a748a78311ee51b4bf833e1664347d47;hp=9ab5b620ff7db981b9986203462824731cb46b63;hpb=4e9a619ab2a22ce3c933fbb36122632debfd415a;p=quassel.git diff --git a/src/qtopia/mainwidget.cpp b/src/qtopia/mainwidget.cpp index 9ab5b620..4fde19b7 100644 --- a/src/qtopia/mainwidget.cpp +++ b/src/qtopia/mainwidget.cpp @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel IRC Development Team * + * Copyright (C) 2005-08 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -21,16 +21,13 @@ #include "mainwidget.h" #include "buffer.h" +#include "chatwidget.h" MainWidget::MainWidget(QWidget *parent) : QWidget(parent) { ui.setupUi(this); - -// ui.bufferLeft->setIcon(QIcon(":icon/left")); -// ui.bufferRight->setIcon(QIcon(":icon/right")); - //ui.bufferLeft->setIconSize(QSize(10, 10)); - //ui.bufferRight->setIconSize(QSize(10, 10)); - //ui.bufferLeft->setMaximumSize(QSize(10,10)); - //ui.bufferRight->setMaximumSize(QSize(10,10)); + ui.inputLine->hide(); ui.topicBar->hide(); + connect(ui.inputLine, SIGNAL(returnPressed()), this, SLOT(enterPressed())); + currentBuffer = 0; } MainWidget::~MainWidget() { @@ -39,9 +36,59 @@ MainWidget::~MainWidget() { } -void MainWidget::setBuffer(Buffer *b) { +void MainWidget::setBuffer(Buffer *buf) { + if(!buf) { + ui.stack->setCurrentIndex(0); + currentBuffer = 0; + return; + } // TODO update topic if changed; handle status buffer display - QString title = QString("%1 (%2): \"%3\"").arg(b->displayName()).arg(b->networkName()).arg(b->topic()); + QString title = QString("%1 (%2): \"%3\"").arg(buf->name()).arg(buf->networkName()).arg(buf->topic()); ui.topicBar->setContents(title); + //ui.chatWidget->setStyleSheet("div { color: #777777; }"); + //ui.chatWidget->setHtml("" + // "