/*************************************************************************** * 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) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "mainwidget.h" #include "buffer.h" #include "chatwidget.h" MainWidget::MainWidget(QWidget *parent) : QWidget(parent) { ui.setupUi(this); ui.inputLine->hide(); ui.topicBar->hide(); connect(ui.inputLine, SIGNAL(returnPressed()), this, SLOT(enterPressed())); currentBuffer = 0; } MainWidget::~MainWidget() { } 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(buf->name()).arg(buf->networkName()).arg(buf->topic()); ui.topicBar->setContents(title); //ui.chatWidget->setStyleSheet("div { color: #777777; }"); //ui.chatWidget->setHtml("" // "