Removing the new chatwidget and other cruft from trunk (which is now our 0.2 branch)
authorManuel Nickschas <sputnick@quassel-irc.org>
Thu, 10 Apr 2008 23:44:22 +0000 (23:44 +0000)
committerManuel Nickschas <sputnick@quassel-irc.org>
Thu, 10 Apr 2008 23:44:22 +0000 (23:44 +0000)
17 files changed:
src/common/global.cpp
src/common/global.h
src/common/main.cpp
src/core/networkconnection.cpp
src/qtopia/qtopiamainwin.cpp
src/qtui/bufferwidget.cpp
src/qtui/chatitem.cpp [deleted file]
src/qtui/chatitem.h [deleted file]
src/qtui/chatline.cpp [deleted file]
src/qtui/chatline.h [deleted file]
src/qtui/chatscene.cpp [deleted file]
src/qtui/chatscene.h [deleted file]
src/qtui/chatview.cpp [deleted file]
src/qtui/chatview.h [deleted file]
src/qtui/mainwin.cpp
src/qtui/qtui.pri
src/uisupport/bufferview.cpp

index 300d182..9f0e224 100644 (file)
@@ -112,4 +112,4 @@ QString Global::coreVersionNeeded;
 Global::RunMode Global::runMode;
 uint Global::defaultPort;
 
-bool Global::SPUTDEV;
+bool Global::DEBUG;
index d5fbdec..0759c27 100644 (file)
@@ -53,7 +53,7 @@ namespace Global {
   extern RunMode runMode;
   extern unsigned int defaultPort;
 
-  extern bool SPUTDEV; // FIXME This is for internal use only!
+  extern bool DEBUG;
 
   void registerMetaTypes();
 };
index d958e7a..5fb3029 100644 (file)
@@ -103,7 +103,7 @@ int main(int argc, char **argv) {
 
   // Check if a non-standard core port is requested
   QStringList args = QCoreApplication::arguments();  // TODO Build a CLI parser
-  Global::SPUTDEV = args.contains("--sputdev"); // This enables various debug features for Sput. Do not touch.
+  Global::DEBUG = args.contains("--debug"); // This enables (maybe) various debug features.
 
   Global::defaultPort = 4242;
   int idx;
index 35d44ad..be2787a 100644 (file)
@@ -382,7 +382,6 @@ void NetworkConnection::userInput(BufferInfo buf, QString msg) {
 void NetworkConnection::putRawLine(QByteArray s) {
   s += "\r\n";
   socket.write(s);
-  if(Global::SPUTDEV) qDebug() << "SENT:" << s;
 }
 
 void NetworkConnection::putCmd(const QString &cmd, const QVariantList &params, const QByteArray &prefix) {
index 30e6ecf..69b054a 100644 (file)
@@ -47,7 +47,6 @@ QtopiaMainWin::QtopiaMainWin(QWidget *parent, Qt::WFlags flags) : QMainWindow(pa
 
   Global::runMode = Global::ClientOnly;
   Global::defaultPort = 4242;
-  Global::SPUTDEV = true;
 
   Network::setDefaultCodecForServer("ISO-8859-1");
   Network::setDefaultCodecForEncoding("UTF-8");
index 4158311..d534b3d 100644 (file)
@@ -19,9 +19,7 @@
  ***************************************************************************/
 
 #include "bufferwidget.h"
-#include "chatline.h"
 #include "chatline-old.h"
-#include "chatview.h"
 #include "chatwidget.h"
 #include "settings.h"
 #include "client.h"
@@ -37,12 +35,7 @@ BufferWidget::~BufferWidget() {
 }
 
 AbstractChatView *BufferWidget::createChatView(BufferId id) {
-  QWidget *chatView;
-  if(Global::SPUTDEV) {
-    chatView = new ChatView(Client::buffer(id), this);
-  } else {
-    chatView = new ChatWidget(id, this);
-  }
+  QWidget *chatView = new ChatWidget(id, this);
   _chatViews[id] = chatView;
   ui.stackedWidget->addWidget(chatView);
   chatView->setFocusProxy(this);
diff --git a/src/qtui/chatitem.cpp b/src/qtui/chatitem.cpp
deleted file mode 100644 (file)
index e6f602e..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-/***************************************************************************
- *   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 <QFontMetrics>
-#include <QGraphicsSceneMouseEvent>
-#include <QTextCursor>
-#include <QTextDocument>
-
-#include <QtGui>
-
-#include "chatitem.h"
-
-ChatItem::ChatItem(QGraphicsItem *parent) : QGraphicsItem(parent) {
-  _width = 0;
-  //if(_wrapMode == WordWrap) {
-  //  setFlags(QGraphicsItem::ItemClipsToShape, true);
-  //}
-}
-
-ChatItem::~ChatItem() {
-
-}
-
-void ChatItem::setWidth(int w) {
-  _width = w;
-  layout();
-}
-
-void ChatItem::setTextOption(const QTextOption &option) {
-  _textOption = option;
-  layout();
-}
-
-QTextOption ChatItem::textOption() const {
-  return _textOption;
-}
-
-QString ChatItem::text() const {
-  return _layout.text();
-}
-
-void ChatItem::setText(const UiStyle::StyledText &text) {
-  _layout.setText(text.text);
-  _layout.setAdditionalFormats(text.formats);
-  layout();
-}
-
-void ChatItem::layout() {
-  if(!_layout.additionalFormats().count()) return; // no text set
-  if(_width <= 0) return;
-  prepareGeometryChange();
-  QFontMetrics metrics(_layout.additionalFormats()[0].format.font());
-  int leading = metrics.leading();
-  int height = 0;
-  _layout.setTextOption(textOption());
-  _layout.beginLayout();
-  while(1) {
-    QTextLine line = _layout.createLine();
-    if(!line.isValid()) break;
-    line.setLineWidth(_width);
-    if(textOption().wrapMode() != QTextOption::NoWrap && line.naturalTextWidth() > _width) {
-      // word did not fit, we need to wrap it in the middle
-      // this is a workaround for Qt failing to handle WrapAtWordBoundaryOrAnywhere correctly
-      QTextOption::WrapMode mode = textOption().wrapMode();
-      textOption().setWrapMode(QTextOption::WrapAnywhere);
-      _layout.setTextOption(textOption());
-      line.setLineWidth(_width);
-      textOption().setWrapMode(mode);
-      _layout.setTextOption(textOption());
-    }
-    height += leading;
-    line.setPosition(QPoint(0, height));
-    height += line.height();
-  }
-  _layout.endLayout();
-  update();
-}    QDateTime _timestamp;
-    MsgId _msgId;
-
-
-QRectF ChatItem::boundingRect() const {
-  return _layout.boundingRect();
-}
-
-void ChatItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
-  Q_UNUSED(option); Q_UNUSED(widget);
-  _layout.draw(painter, QPointF(0, 0));
-
-}
-
-/*
-void ChatItem::mouseMoveEvent ( QGraphicsSceneMouseEvent * event ) {
-  qDebug() << (void*)this << "moving" << event->pos();
-  if(event->pos().y() < 0) {
-    QTextCursor cursor(document());
-    //cursor.insertText("foo");
-    //cursor.select(QTextCursor::Document);
-    event->ignore();
-  } else QGraphicsTextItem::mouseMoveEvent(event);
-}
-*/
-
-
-
diff --git a/src/qtui/chatitem.h b/src/qtui/chatitem.h
deleted file mode 100644 (file)
index 2cd2f3b..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/***************************************************************************
- *   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.             *
- ***************************************************************************/
-
-#ifndef _CHATITEM_H_
-#define _CHATITEM_H_
-
-#include <QGraphicsItem>
-#include <QTextLayout>
-#include <QTextOption>
-
-#include "uistyle.h"
-
-class QGraphicsSceneMouseEvent;
-
-class ChatItem : public QGraphicsItem {
-
-  public:
-    ChatItem(QGraphicsItem *parent = 0);
-    virtual ~ChatItem();
-
-    virtual QRectF boundingRect() const;
-    virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
-
-    QString text() const;
-    void setText(const UiStyle::StyledText &text);
-
-    QTextOption textOption() const;
-    void setTextOption(const QTextOption &option);
-
-    void setWidth(int width);
-    virtual void layout();
-
-  protected:
-    //void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
-
-  private:
-    int _width;
-    QTextLayout _layout;
-    QTextOption _textOption;
-};
-
-#endif
diff --git a/src/qtui/chatline.cpp b/src/qtui/chatline.cpp
deleted file mode 100644 (file)
index 2e659d1..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/***************************************************************************
- *   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 <QDateTime>
-#include <QString>
-#include <QtGui>
-
-#include "bufferinfo.h"
-#include "chatitem.h"
-#include "chatline.h"
-#include "qtui.h"
-
-ChatLine::ChatLine(Message msg) : QGraphicsItem(), AbstractUiMsg() {
-  _styledTimestamp = QtUi::style()->styleString(msg.formattedTimestamp());
-  _styledSender = QtUi::style()->styleString(msg.formattedSender());
-  _styledText = QtUi::style()->styleString(msg.formattedText());
-  _msgId = msg.msgId();
-  _timestamp = msg.timestamp();
-
-  _tsColWidth = _senderColWidth = _textColWidth = 0;
-  QTextOption option;
-  option.setWrapMode(QTextOption::NoWrap);
-  _tsItem = new ChatItem(this);
-  _tsItem->setTextOption(option);
-  _tsItem->setText(_styledTimestamp);
-
-  option.setAlignment(Qt::AlignRight);
-  _senderItem = new ChatItem(this);
-  _senderItem->setTextOption(option);
-  _senderItem->setText(_styledSender);
-
-  option.setAlignment(Qt::AlignLeft);
-  option.setWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);
-  _textItem = new ChatItem(this);
-  _textItem->setTextOption(option);
-  _textItem->setText(_styledText);
-
-}
-
-ChatLine::~ChatLine() {
-  
-}
-
-QString ChatLine::sender() const {
-  return QString();
-}
-
-QString ChatLine::text() const {
-  return QString();
-}
-
-MsgId ChatLine::msgId() const {
-  return 0;
-}
-
-BufferInfo ChatLine::bufferInfo() const {
-  Q_ASSERT(false); // do we actually need this function???
-  return BufferInfo();
-}
-
-QDateTime ChatLine::timestamp() const {
-  return QDateTime();
-}
-
-QRectF ChatLine::boundingRect () const {
-  return childrenBoundingRect();
-}
-
-void ChatLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) {
-
-}
-
-void ChatLine::setColumnWidths(int tsColWidth, int senderColWidth, int textColWidth) {
-  if(tsColWidth >= 0) {
-    _tsColWidth = tsColWidth;
-    _tsItem->setWidth(tsColWidth);
-  }
-  if(senderColWidth >= 0) {
-    _senderColWidth = senderColWidth;
-    _senderItem->setWidth(senderColWidth);
-  }
-  if(textColWidth >= 0) {
-    _textColWidth = textColWidth;
-    _textItem->setWidth(textColWidth);
-  }
-  layout();
-}
-
-void ChatLine::layout() {
-  prepareGeometryChange();
-  _tsItem->setPos(QPointF(0, 0));
-  _senderItem->setPos(QPointF(_tsColWidth + QtUi::style()->sepTsSender(), 0));
-  _textItem->setPos(QPointF(_tsColWidth + QtUi::style()->sepTsSender() + _senderColWidth + QtUi::style()->sepSenderText(), 0));
-}
-
-
-bool ChatLine::sceneEvent ( QEvent * event ) {
-  qDebug() <<(void*)this<< "receiving event";
-  event->ignore();
-  return false;
-}
-
-
diff --git a/src/qtui/chatline.h b/src/qtui/chatline.h
deleted file mode 100644 (file)
index fca296f..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/***************************************************************************
- *   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.             *
- ***************************************************************************/
-
-#ifndef _CHATLINE_H_
-#define _CHATLINE_H_
-
-#include <QGraphicsItem>
-
-#include "message.h"
-#include "quasselui.h"
-#include "uistyle.h"
-
-class ChatItem;
-class ChatLineData;
-
-/* Concept Ideas
-* Probably makes sense to have ChatLineData be the AbstractUiMsg instead, if it turns out that creating ChatLineData
-is the expensive part... In that case, we could have a QHash<MsgId, ChatLineData*> in the Client, and ChatLine just
-gets a data pointer. This would allow us to share most data between AbstractUiMsgs, and ChatLines themselves could
-be pretty cheap - that'd be a clean solution for having a monitor buffer, highlight buffer etcpp.
-
-* ItemLayoutData
-
-*/
-
-class ChatLine : public QGraphicsItem, public AbstractUiMsg {
-
-  public:
-    ChatLine(Message);
-    virtual ~ChatLine();
-    virtual QString sender() const;
-    virtual QString text() const;
-    virtual MsgId msgId() const;
-    virtual BufferInfo bufferInfo() const;
-    virtual QDateTime timestamp() const;
-
-    virtual QRectF boundingRect () const;
-    virtual void paint (QPainter * painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
-    void layout();
-
-    void setColumnWidths(int tsColWidth, int senderColWidth, int textColWidth);
-
-    void myMousePressEvent ( QGraphicsSceneMouseEvent * event ) { qDebug() << "press"; mousePressEvent(event); }
-
-  protected:
-    bool sceneEvent ( QEvent * event );
-
-  private:
-    UiStyle::StyledText _styledTimestamp, _styledText, _styledSender;
-
-    QDateTime _timestamp;
-    MsgId _msgId;
-
-    ChatItem *_tsItem, *_senderItem, *_textItem;
-    int _tsColWidth, _senderColWidth, _textColWidth;
-};
-
-//! This contains the data of a ChatLine, i.e. mainly the styled message contents.
-/** By separating ChatLine and ChatLineData, ChatLine itself is very small and we can reuse the
- *  same contents in several ChatLine objects without duplicating data.
- */
-class ChatLineData {
-
-  public:
-    ChatLineData(const Message &msg);
-
-    inline UiStyle::StyledText styledSender() const { return _styledSender; }
-    inline UiStyle::StyledText styledTimestamp() const { return _styledTimestamp; }
-    inline UiStyle::StyledText styledText() const { return _styledText; }
-
-    inline QString sender() const { return _styledSender.text; }
-    inline QString text() const { return _styledText.text; }
-    inline QDateTime timestamp() const { return _timestamp; }
-    inline MsgId msgId() const { return _msgId; }
-
-  private:
-    UiStyle::StyledText _styledSender, _styledText, _styledTimestamp;
-    QDateTime _timestamp;
-    MsgId _msgId;
-
-};
-
-
-#endif
diff --git a/src/qtui/chatscene.cpp b/src/qtui/chatscene.cpp
deleted file mode 100644 (file)
index 1d00876..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/***************************************************************************
- *   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 <QGraphicsSceneMouseEvent>
-
-#include "buffer.h"
-#include "chatitem.h"
-#include "chatline.h"
-#include "chatscene.h"
-#include "quasselui.h"
-
-ChatScene::ChatScene(Buffer *buf, QObject *parent) : QGraphicsScene(parent) {
-  _buffer = buf;
-
-  foreach(AbstractUiMsg *msg, buf->contents()) {
-    appendMsg(msg);
-  }
-  connect(buf, SIGNAL(msgAppended(AbstractUiMsg *)), this, SLOT(appendMsg(AbstractUiMsg *)));
-  connect(buf, SIGNAL(msgPrepended(AbstractUiMsg *)), this, SLOT(prependMsg(AbstractUiMsg *)));
-}
-
-ChatScene::~ChatScene() {
-
-
-}
-
-void ChatScene::appendMsg(AbstractUiMsg * msg) {
-  ChatLine *line = dynamic_cast<ChatLine*>(msg);
-  Q_ASSERT(line);
-  _lines.append(line);
-  addItem(line);
-  line->setPos(0, _lines.count() * 30);
-  line->setColumnWidths(80, 80, 400);
-}
-
-void ChatScene::prependMsg(AbstractUiMsg * msg) {
-  ChatLine *line = dynamic_cast<ChatLine*>(msg);
-  Q_ASSERT(line); qDebug() << "prepending";
-  _lines.prepend(line);
-  addItem(line);
-  line->setPos(0, _lines.count() * 30);
-}
-
-void ChatScene::mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent ) {
-  qDebug() << "recv" << mouseEvent->scenePos();
-  ChatLine *line = static_cast<ChatLine*>(itemAt(mouseEvent->scenePos()));
-  ChatItem *item = static_cast<ChatItem*>(itemAt(mouseEvent->scenePos()));
-  qDebug() << (void*)line << (void*)item;
-  if(line) {
-    line->myMousePressEvent(mouseEvent);
-  } else  QGraphicsScene::mousePressEvent(mouseEvent);
-}
diff --git a/src/qtui/chatscene.h b/src/qtui/chatscene.h
deleted file mode 100644 (file)
index 4dc415b..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/***************************************************************************
- *   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.             *
- ***************************************************************************/
-
-#ifndef _CHATSCENE_H_
-#define _CHATSCENE_H_
-
-#include <QGraphicsScene>
-
-class AbstractUiMsg;
-class Buffer;
-class ChatLine;
-class QGraphicsSceneMouseEvent;
-
-class ChatScene : public QGraphicsScene {
-  Q_OBJECT
-
-  public:
-    ChatScene(Buffer *buffer, QObject *parent);
-    virtual ~ChatScene();
-
-    Buffer *buffer() const;
-
-  public slots:
-
-  protected slots:
-    void appendMsg(AbstractUiMsg *msg);
-    void prependMsg(AbstractUiMsg *msg);
-
-    void mousePressEvent ( QGraphicsSceneMouseEvent * mouseEvent );
-
-  private:
-    Buffer *_buffer;
-    QList<ChatLine*> _lines;
-
-};
-
-#endif
diff --git a/src/qtui/chatview.cpp b/src/qtui/chatview.cpp
deleted file mode 100644 (file)
index 54ca6f9..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/***************************************************************************
- *   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 <QGraphicsTextItem>
-
-#include "buffer.h"
-#include "chatline.h"
-#include "chatscene.h"
-#include "chatview.h"
-#include "quasselui.h"
-
-ChatView::ChatView(Buffer *buf, QWidget *parent) : QGraphicsView(parent), AbstractChatView() {
-  _scene = new ChatScene(buf, this);
-  setScene(_scene);
-
-  QGraphicsTextItem *item = scene()->addText(buf->bufferInfo().bufferName());
-
-}
-
-
-ChatView::~ChatView() {
-
-}
-
-
-ChatScene *ChatView::scene() const {
-  return _scene;
-}
-
-
-void ChatView::clear()
-{
-}
-
-void ChatView::prependMsg(AbstractUiMsg *msg) {
-  ChatLine *line = dynamic_cast<ChatLine*>(msg);
-  Q_ASSERT(line);
-  prependChatLine(line);
-}
-
-void ChatView::prependChatLine(ChatLine *line) {
-  //qDebug() << "prepending";
-}
-
-void ChatView::prependChatLines(QList<ChatLine *> clist) {
-
-}
-
-void ChatView::appendMsg(AbstractUiMsg *msg) {
-  ChatLine *line = dynamic_cast<ChatLine*>(msg);
-  Q_ASSERT(line);
-  appendChatLine(line);
-}
-
-void ChatView::appendChatLine(ChatLine *line) {
-  //qDebug() << "appending";
-}
-
-
-void ChatView::appendChatLines(QList<ChatLine *> list) {
-  foreach(ChatLine *line, list) {
-    
-  }
-}
-
-void ChatView::setContents(const QList<AbstractUiMsg *> &list) {
-  qDebug() << "setting" << list.count();
-  //appendChatLines(list);
-}
-
diff --git a/src/qtui/chatview.h b/src/qtui/chatview.h
deleted file mode 100644 (file)
index cc627c7..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/***************************************************************************
- *   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.             *
- ***************************************************************************/
-
-#ifndef _CHATVIEW_H_
-#define _CHATVIEW_H_
-
-#include <QGraphicsView>
-
-#include "abstractbuffercontainer.h"
-
-class AbstractUiMsg;
-class Buffer;
-class ChatLine;
-class ChatScene;
-
-class ChatView : public QGraphicsView, public AbstractChatView {
-  Q_OBJECT
-
-  public:
-    ChatView(Buffer *, QWidget *parent = 0);
-    ~ChatView();
-
-    ChatScene *scene() const;
-
-  public slots:
-
-    void clear();
-
-    void prependMsg(AbstractUiMsg *);
-    void appendMsg(AbstractUiMsg *);
-
-    void prependChatLine(ChatLine *);
-    void appendChatLine(ChatLine *);
-    void prependChatLines(QList<ChatLine *>);
-    void appendChatLines(QList<ChatLine *>);
-
-    void setContents(const QList<AbstractUiMsg *> &);
-
-  private:
-    ChatScene *_scene;
-};
-
-#endif
index b87d31c..2e7ce46 100644 (file)
@@ -22,7 +22,6 @@
 #include "aboutdlg.h"
 #include "chatwidget.h"
 #include "bufferview.h"
-#include "chatline.h"
 #include "chatline-old.h"
 #include "client.h"
 #include "clientbacklogmanager.h"
@@ -136,13 +135,6 @@ void MainWin::init() {
   ui.bufferWidget->setModel(Client::bufferModel());
   ui.bufferWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel());
 
-  if(Global::SPUTDEV) {
-    //showSettingsDlg();
-    //showAboutDlg();
-    //showNetworkDlg();
-    //exit(1);
-  }
-
 }
 
 MainWin::~MainWin() {
@@ -397,7 +389,6 @@ void MainWin::disconnectedFromCore() {
 }
 
 AbstractUiMsg *MainWin::layoutMsg(const Message &msg) {
-  if(Global::SPUTDEV) return new ChatLine(msg);
   return new ChatLineOld(msg);
 }
 
index abd785e..089c788 100644 (file)
@@ -1,12 +1,12 @@
 DEPMOD = client common uisupport
 QT_MOD = core gui network
 
-SRCS += aboutdlg.cpp bufferwidget.cpp chatitem.cpp chatline.cpp chatline-old.cpp chatscene.cpp chatview.cpp chatwidget.cpp \
+SRCS += aboutdlg.cpp bufferwidget.cpp chatline-old.cpp chatwidget.cpp \
         coreconfigwizard.cpp coreconnectdlg.cpp configwizard.cpp debugconsole.cpp inputwidget.cpp \
         mainwin.cpp nicklistwidget.cpp qtui.cpp qtuisettings.cpp qtuistyle.cpp settingsdlg.cpp settingspagedlg.cpp \
         topicbutton.cpp topicwidget.cpp verticaldock.cpp jumpkeyhandler.cpp
 
-HDRS += aboutdlg.h bufferwidget.h chatitem.h chatline.h chatline-old.h chatscene.h chatview.h chatwidget.h \
+HDRS += aboutdlg.h bufferwidget.h chatline-old.h chatwidget.h \
         coreconfigwizard.h configwizard.h debugconsole.h inputwidget.h \
         coreconnectdlg.h mainwin.h nicklistwidget.h qtui.h qtuisettings.h qtuistyle.h settingsdlg.h settingspagedlg.h \
         topicbutton.h topicwidget.h verticaldock.h jumpkeyhandler.h
index e922559..8ed210f 100644 (file)
@@ -124,7 +124,7 @@ void BufferView::keyPressEvent(QKeyEvent *event) {
 void BufferView::rowsInserted(const QModelIndex & parent, int start, int end) {
   QTreeView::rowsInserted(parent, start, end);
   if(model()->rowCount(parent) == 1 && parent.data(NetworkModel::ItemTypeRole) == NetworkModel::NetworkItemType
-     && (Global::SPUTDEV || parent.data(NetworkModel::ItemActiveRole) == true)) {
+     && parent.data(NetworkModel::ItemActiveRole) == true) {
     // without updating the parent the expand will have no effect... Qt Bug?
     update(parent);
     expand(parent);
@@ -145,12 +145,7 @@ void BufferView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bott
       continue;
 
     bool isActive = networkIdx.data(NetworkModel::ItemActiveRole).toBool();
-    if(Global::SPUTDEV) {
-      if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, true);
-    } else {
-      if(isExpanded(networkIdx) != isActive)
-        setExpanded(networkIdx, isActive);
-    }
+    if(isExpanded(networkIdx) != isActive) setExpanded(networkIdx, isActive);
   }
 }