From 50e7ae72ec0c6d4c190342c7884bd383a2d310c7 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Sun, 15 Mar 2009 13:58:05 +0100 Subject: [PATCH] Remove old Qtopia code from dev-notes/obsolete - we have version control --- dev-notes/obsolete/INSTALL.Qtopia | 23 -- dev-notes/obsolete/README.Qtopia | 42 -- dev-notes/obsolete/builtin_cmds.obsolete.cpp | 112 ------ dev-notes/obsolete/paulk-mainwindow.ui | 310 -------------- .../obsolete/qtopia/bufferviewwidget.cpp | 61 --- dev-notes/obsolete/qtopia/bufferviewwidget.h | 44 -- dev-notes/obsolete/qtopia/chatline.cpp | 70 ---- dev-notes/obsolete/qtopia/chatline.h | 51 --- dev-notes/obsolete/qtopia/chatwidget.cpp | 97 ----- dev-notes/obsolete/qtopia/chatwidget.h | 53 --- dev-notes/obsolete/qtopia/coreconnectdlg.cpp | 378 ------------------ dev-notes/obsolete/qtopia/coreconnectdlg.h | 122 ------ dev-notes/obsolete/qtopia/main.cpp | 26 -- dev-notes/obsolete/qtopia/mainwidget.cpp | 123 ------ dev-notes/obsolete/qtopia/mainwidget.h | 60 --- dev-notes/obsolete/qtopia/nicklistwidget.cpp | 84 ---- dev-notes/obsolete/qtopia/nicklistwidget.h | 52 --- dev-notes/obsolete/qtopia/qtopiamainwin.cpp | 176 -------- dev-notes/obsolete/qtopia/qtopiamainwin.h | 72 ---- dev-notes/obsolete/qtopia/qtopiaui.cpp | 59 --- dev-notes/obsolete/qtopia/qtopiaui.h | 51 --- dev-notes/obsolete/qtopia/qtopiauistyle.cpp | 115 ------ dev-notes/obsolete/qtopia/qtopiauistyle.h | 34 -- .../obsolete/qtopia/quasseltopia.desktop | 10 - dev-notes/obsolete/qtopia/topicbar.cpp | 129 ------ dev-notes/obsolete/qtopia/topicbar.h | 72 ---- dev-notes/obsolete/qtopia/ui/aboutdlg.ui | 46 --- .../obsolete/qtopia/ui/bufferviewwidget.ui | 39 -- .../obsolete/qtopia/ui/coreaccounteditdlg.ui | 120 ------ .../obsolete/qtopia/ui/coreconnectdlg.ui | 149 ------- .../qtopia/ui/coreconnectprogressdlg.ui | 121 ------ .../obsolete/qtopia/ui/editcoreacctdlg.ui | 120 ------ dev-notes/obsolete/qtopia/ui/mainwidget.ui | 104 ----- .../obsolete/qtopia/ui/nicklistwidget.ui | 28 -- 34 files changed, 3153 deletions(-) delete mode 100644 dev-notes/obsolete/INSTALL.Qtopia delete mode 100644 dev-notes/obsolete/README.Qtopia delete mode 100644 dev-notes/obsolete/builtin_cmds.obsolete.cpp delete mode 100644 dev-notes/obsolete/paulk-mainwindow.ui delete mode 100644 dev-notes/obsolete/qtopia/bufferviewwidget.cpp delete mode 100644 dev-notes/obsolete/qtopia/bufferviewwidget.h delete mode 100644 dev-notes/obsolete/qtopia/chatline.cpp delete mode 100644 dev-notes/obsolete/qtopia/chatline.h delete mode 100644 dev-notes/obsolete/qtopia/chatwidget.cpp delete mode 100644 dev-notes/obsolete/qtopia/chatwidget.h delete mode 100644 dev-notes/obsolete/qtopia/coreconnectdlg.cpp delete mode 100644 dev-notes/obsolete/qtopia/coreconnectdlg.h delete mode 100644 dev-notes/obsolete/qtopia/main.cpp delete mode 100644 dev-notes/obsolete/qtopia/mainwidget.cpp delete mode 100644 dev-notes/obsolete/qtopia/mainwidget.h delete mode 100644 dev-notes/obsolete/qtopia/nicklistwidget.cpp delete mode 100644 dev-notes/obsolete/qtopia/nicklistwidget.h delete mode 100644 dev-notes/obsolete/qtopia/qtopiamainwin.cpp delete mode 100644 dev-notes/obsolete/qtopia/qtopiamainwin.h delete mode 100644 dev-notes/obsolete/qtopia/qtopiaui.cpp delete mode 100644 dev-notes/obsolete/qtopia/qtopiaui.h delete mode 100644 dev-notes/obsolete/qtopia/qtopiauistyle.cpp delete mode 100644 dev-notes/obsolete/qtopia/qtopiauistyle.h delete mode 100644 dev-notes/obsolete/qtopia/quasseltopia.desktop delete mode 100644 dev-notes/obsolete/qtopia/topicbar.cpp delete mode 100644 dev-notes/obsolete/qtopia/topicbar.h delete mode 100644 dev-notes/obsolete/qtopia/ui/aboutdlg.ui delete mode 100644 dev-notes/obsolete/qtopia/ui/bufferviewwidget.ui delete mode 100644 dev-notes/obsolete/qtopia/ui/coreaccounteditdlg.ui delete mode 100644 dev-notes/obsolete/qtopia/ui/coreconnectdlg.ui delete mode 100644 dev-notes/obsolete/qtopia/ui/coreconnectprogressdlg.ui delete mode 100644 dev-notes/obsolete/qtopia/ui/editcoreacctdlg.ui delete mode 100644 dev-notes/obsolete/qtopia/ui/mainwidget.ui delete mode 100644 dev-notes/obsolete/qtopia/ui/nicklistwidget.ui diff --git a/dev-notes/obsolete/INSTALL.Qtopia b/dev-notes/obsolete/INSTALL.Qtopia deleted file mode 100644 index f00e4537..00000000 --- a/dev-notes/obsolete/INSTALL.Qtopia +++ /dev/null @@ -1,23 +0,0 @@ -Quassel IRC Mobile Edition - Installation Notes -=============================================== - -NOTE: QuasselTopia is currently broken. You will not be able to compile it. - -We assume that you are familiar with application development on the -Greenphone (or other Qtopia devices), so we won't go into detail here. - -The project file and related resources for QuasselTopia are to be found -in qtopia-build/. Set up your development environment as usual (i.e. have -the appropriate tools in $PATH and so on), and then: - -cd qtopia-build -qtopiamake -make - -This will build the binary called 'quasseltopia' in the build -directory. Then use the gph script to build and deploy the package: - -gph -p -gph -i - -This should create a package and start installation on the Greenphone. diff --git a/dev-notes/obsolete/README.Qtopia b/dev-notes/obsolete/README.Qtopia deleted file mode 100644 index 1ec1e8ea..00000000 --- a/dev-notes/obsolete/README.Qtopia +++ /dev/null @@ -1,42 +0,0 @@ -Quassel IRC for Qtopia - Release Notes -====================================== - -NOTE: QuasselTopia is currently mostly broken even if it happens to build! - -We provide a Quassel IRC client that can be run on mobile devices running -Trolltech's Qtopia. The name of this client version has not yet been -determined; we like QuasselTopia, Quassel IRC Mobile Edition or maybe -something else. We'll call it QuasselTopia here. - -QuasselTopia has only been tested with the Trolltech Greenphone. We sort of -rely on its features being available, and we assume a screensize of 240x320. -Of course, QuasselTopia might well run on other Qtopia-enabled devices as -well; it's just not tested yet. We will eventually support general Qtopia -devices as well. - -Note that QuasselTopia is just the client; it can't do IRC by -itself. You'll need a Quassel core running on some server or PC for -the phone to connect to. - -In its current state, QuasselTopia cannot do much except for -connecting to a core and displaying the buffers you are in. Oh, and -chatting of course. But you cannot change any settings, create/edit -identities or networks, you can't even connect to a network from the -Greenphone. So in order to test QuasselTopia, it's a good idea to have -a desktop Quassel client connected at the same time, so that you can -do these things from your PC. - -QuasselTopia thus is in a very early state, merely a proof of concept -rather than something for day-to-day use. It shows already though that -a mobile Quassel version is feasible and usable, and QuasselTopia will -evolve together with the desktop version. - -We still hope you have fun! - -Please refer to INSTALL.Qtopia for installation information. - -Thanks, -~ The Quassel IRC Team - - (Manuel Nickschas, Marcus Eggenberger, Marco Genise) - \ No newline at end of file diff --git a/dev-notes/obsolete/builtin_cmds.obsolete.cpp b/dev-notes/obsolete/builtin_cmds.obsolete.cpp deleted file mode 100644 index 5a9acf68..00000000 --- a/dev-notes/obsolete/builtin_cmds.obsolete.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005/06 by The Quassel Team * - * 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. * - * * - * 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. * - ***************************************************************************/ - -#error THIS CODE IS OBSOLETE! - -/* We are keeping this for further reference only. - * This method of defining server commands sucked, but at least we have a quite complete list - * of commands here. - */ - -/** This macro marks strings as translateable for Qt's linguist tools */ -#define _(str) QT_TR_NOOP(str) - - -/** Defines the message codes according to RFCs 1495/281x. - * Named commands have a negative enum value. - */ - -BuiltinCmd builtins[] = { - { CMD_ADMIN, "admin", _("Get information about the administrator of a server."), - _("[server]"), _("server: Server"), 0, 0 }, - { CMD_AME, "ame", "", "", "", 0, 0 }, - { CMD_AMSG, "amsg", _("Send message to all channels of all connected servers."), - _("message"), _("message: Message to send"), 0, 0 }, - { CMD_AWAY, "away", _("Toggle away status."), - _("[-all] [message]"), _(" -all: Toggle status on all connected servers\n" - "message: Away message (away status is removed if no message is given)"), 0, 0 }, - { CMD_BAN, "ban", _("Ban a nickname or hostmask."), - _("[channel] [nick [nick ...]]"), _("channel: Channel for ban (current of empty)\n" - " nick: Nickname or hostmask. If no nicknames are given, /ban displays the current banlist."), 0, 0 }, - { CMD_CTCP, "ctcp", _("Send a CTCP message (Client-To-Client Protocol)"), - _("target type [args]"), _("target: Nick or channel to send CTCP to\n" - " type: CTCP Type (e.g. VERSION, PING, CHAT...)\n" - " args: Arguments for CTCP"), 0, 0 }, - { CMD_CYCLE, "cycle", "", "", "", 0, 0 }, - { CMD_DEHALFOP, "dehalfop", "", "", "", 0, 0 }, - { CMD_DEOP, "deop", "", "", "", 0, 0 }, - { CMD_DEVOICE, "devoice", "", "", "", 0, 0 }, - { CMD_DIE, "die", "", "", "", 0, 0 }, - { CMD_ERROR, "error", "", "", "", 0, 0 }, - { CMD_HALFOP, "halfop", "", "", "", 0, 0 }, - { CMD_INFO, "info", "", "", "", 0, 0 }, - { CMD_INVITE, "invite", "", "", "", 0, 0 }, - { CMD_ISON, "ison", "", "", "", 0, 0 }, - { CMD_JOIN, "join", "", "", "", 0, 0 }, - { CMD_KICK, "kick", "", "", "", 0, 0 }, - { CMD_KICKBAN, "kickban", "", "", "", 0, 0 }, - { CMD_KILL, "kill", "", "", "", 0, 0 }, - { CMD_LINKS, "links", "", "", "", 0, 0 }, - { CMD_LIST, "list", "", "", "", 0, 0 }, - { CMD_LUSERS, "lusers", "", "", "", 0, 0 }, - { CMD_ME, "me", "", "", "", 0, 0 }, - { CMD_MODE, "mode", "", "", "", 0, 0 }, - { CMD_MOTD, "motd", "", "", "", 0, 0 }, - { CMD_MSG, "msg", "", "", "", 0, 0 }, - { CMD_NAMES, "names", "", "", "", 0, 0 }, - { CMD_NICK, "nick", "", "", "", 0, 0 }, - { CMD_NOTICE, "notice", _("Send notice message to user."), - _("nick message"), _(" nick: user to send notice to\n" - "message: text to send"), 0, 0 }, - { CMD_OP, "op", "", "", "", 0, 0 }, - { CMD_OPER, "oper", "", "", "", 0, 0 }, - { CMD_PART, "part", "", "", "", 0, 0 }, - { CMD_PING, "ping", _("Ping a server."), - _("server1 [server2]"), _("server1: Server to ping\nserver2: Forward ping to this server"), 0, 0 }, - { CMD_PONG, "pong", "", "", "", 0, 0 }, - { CMD_PRIVMSG, "privmsg", "", "", "", 0, 0 }, - { CMD_QUERY, "query", "", "", "", 0, 0 }, - { CMD_QUIT, "quit", "", "", "", 0, 0 }, - { CMD_QUOTE, "quote", "", "", "", 0, 0 }, - { CMD_REHASH, "rehash", "", "", "", 0, 0 }, - { CMD_RESTART, "restart", "", "", "", 0, 0 }, - { CMD_SERVICE, "service", "", "", "", 0, 0 }, - { CMD_SERVLIST, "servlist", "", "", "", 0, 0 }, - { CMD_SQUERY, "squery", "", "", "", 0, 0 }, - { CMD_SQUIT, "squit", "", "", "", 0, 0 }, - { CMD_STATS, "stats", "", "", "", 0, 0 }, - { CMD_SUMMON, "summon", "", "", "", 0, 0 }, - { CMD_TIME, "time", "", "", "", 0, 0 }, - { CMD_TOPIC, "topic", "", "", "", 0, 0 }, - { CMD_TRACE, "trace", "", "", "", 0, 0 }, - { CMD_UNBAN, "unban", "", "", "", 0, 0 }, - { CMD_USERHOST, "userhost", "", "", "", 0, 0 }, - { CMD_USERS, "users", "", "", "", 0, 0 }, - { CMD_VERSION, "version", "", "", "", 0, 0 }, - { CMD_VOICE, "voice", "", "", "", 0, 0 }, - { CMD_WALLOPS, "wallops", "", "", "", 0, 0 }, - { CMD_WHO, "who", "", "", "", 0, 0 }, - { CMD_WHOIS, "whois", "", "", "", 0, 0 }, - { CMD_WHOWAS, "whowas", "", "", "", 0, 0 }, - - { 0, 0, 0, 0, 0, 0, 0 } -}; - - diff --git a/dev-notes/obsolete/paulk-mainwindow.ui b/dev-notes/obsolete/paulk-mainwindow.ui deleted file mode 100644 index 81022bff..00000000 --- a/dev-notes/obsolete/paulk-mainwindow.ui +++ /dev/null @@ -1,310 +0,0 @@ - - MainWindow - - - - 0 - 0 - 644 - 566 - - - - MainWindow - - - - - - 60 - 80 - 112 - 329 - - - - - 5 - 5 - 0 - 0 - - - - All Nets - - - - - 9 - - - 6 - - - - - - All Nets - - - - - QuakeNet - - - - Status - - - - - Channels - - - - #quassel - - - - - #quadaver - - - - - #lolage - - - - - - Queries - - - - - DCC - - - - - - IrcNet - - - - Status - - - - - - - - - - - - - 0 - 0 - 644 - 28 - - - - - Extensions - - - - - About - - - - - Views - - - - - - Settings - - - - - Connection - - - - - - - - - - - - - QuakeNet - - - 1 - - - - - 9 - - - 6 - - - - - - QuakeNet - - - - - Status - - - - - Channels - - - - #quassel - - - - - #quadaver - - - - - #faecherstadt ohne AE.. doh - - - - - - - - - - - Qt::DefaultContextMenu - - - Qt::LeftToRight - - - false - - - Qt::Vertical - - - Qt::ToolButtonTextUnderIcon - - - 2 - - - - - - - - 5 - 5 - 0 - 0 - - - - IrcNet - - - 1 - - - - - 9 - - - 6 - - - - - - IrcNet - - - - - Status - - - - - Channels - - - - #quassel - - - - - #quadaver - - - - - #faecherstadt ohne AE.. doh - - - - - - - - - - - ../../../../screenshot.png - - - kickUser - - - - - setAway - - - - - All Nets - - - - - Nets - - - - - - diff --git a/dev-notes/obsolete/qtopia/bufferviewwidget.cpp b/dev-notes/obsolete/qtopia/bufferviewwidget.cpp deleted file mode 100644 index 4ee2c989..00000000 --- a/dev-notes/obsolete/qtopia/bufferviewwidget.cpp +++ /dev/null @@ -1,61 +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 "bufferviewwidget.h" -#include "client.h" -#include "buffermodel.h" - - -BufferViewWidget::BufferViewWidget(QWidget *parent) : QDialog(parent) { - ui.setupUi(this); - setModal(true); - //setStyleSheet("background-color: rgb(220, 220, 255, 70%); color: rgb(0, 0, 0); font-size: 5pt;"); - //ui.tabWidget->tabBar()->setStyleSheet("font-size: 5pt;"); - - // get rid of the default tab page designer forces upon us :( - QWidget *w = ui.tabWidget->widget(0); - ui.tabWidget->removeTab(0); - delete w; - - addPage(tr("All"), BufferViewFilter::AllNets, QList()); - addPage(tr("Chans"), BufferViewFilter::AllNets|BufferViewFilter::NoQueries|BufferViewFilter::NoServers, QList()); - addPage(tr("Queries"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoServers, QList()); - addPage(tr("Nets"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoQueries, QList()); - - // this sometimes deadlocks, so we have to hide the dialog from the outside: - //connect(Client::bufferModel()->standardSelectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), this, SLOT(accept())); -} - -BufferViewWidget::~BufferViewWidget() { - - -} - -void BufferViewWidget::addPage(const QString &title, const BufferViewFilter::Modes &mode, const QList &nets) { - BufferView *view = new BufferView(ui.tabWidget); - view->setStyleSheet("background-color: rgb(220, 220, 255, 70%); color: rgb(0, 0, 0); font-size: 5pt;"); - view->setFilteredModel(Client::bufferModel(), mode, nets); - Client::bufferModel()->synchronizeView(view); - ui.tabWidget->addTab(view, title); -} - -void BufferViewWidget::accept() { - QDialog::accept(); -} diff --git a/dev-notes/obsolete/qtopia/bufferviewwidget.h b/dev-notes/obsolete/qtopia/bufferviewwidget.h deleted file mode 100644 index 4aa0adf7..00000000 --- a/dev-notes/obsolete/qtopia/bufferviewwidget.h +++ /dev/null @@ -1,44 +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 _BUFFERVIEWWIDGET_H_ -#define _BUFFERVIEWWIDGET_H_ - -#include "ui_bufferviewwidget.h" - -#include "bufferview.h" - -class BufferViewWidget : public QDialog { - Q_OBJECT - - - public: - BufferViewWidget(QWidget *parent = 0); - virtual ~BufferViewWidget(); - - virtual void accept(); - - private: - void addPage(const QString &title, const BufferViewFilter::Modes &mode, const QList &nets); - Ui::BufferViewWidget ui; - -}; - -#endif diff --git a/dev-notes/obsolete/qtopia/chatline.cpp b/dev-notes/obsolete/qtopia/chatline.cpp deleted file mode 100644 index 0a709c03..00000000 --- a/dev-notes/obsolete/qtopia/chatline.cpp +++ /dev/null @@ -1,70 +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 - -#include "chatline.h" -#include "qtopiaui.h" -#include "qtopiauistyle.h" - -ChatLine::ChatLine(Message msg) { - _styledSender = QtopiaUi::style()->styleString(msg.formattedSender()); - _styledContents = QtopiaUi::style()->styleString(msg.formattedText()); - _timestamp = msg.timestamp(); - _msgId = msg.msgId(); - _bufferInfo = msg.bufferInfo(); - - -} - -QString ChatLine::sender() const { - return _sender; -} - -QString ChatLine::text() const { - return _text; -} - -MsgId ChatLine::msgId() const { - return _msgId; -} - -BufferInfo ChatLine::bufferInfo() const { - return _bufferInfo; -} - -QDateTime ChatLine::timestamp() const { - return _timestamp; -} - -UiStyle::StyledText ChatLine::styledSender() const { - return _styledSender; -} - -UiStyle::StyledText ChatLine::styledContents() const { - return _styledContents; -} - - - -QString ChatLine::formattedToHtml(const QString &f) { - - return f; -} diff --git a/dev-notes/obsolete/qtopia/chatline.h b/dev-notes/obsolete/qtopia/chatline.h deleted file mode 100644 index bdaf7d41..00000000 --- a/dev-notes/obsolete/qtopia/chatline.h +++ /dev/null @@ -1,51 +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 "quasselui.h" -#include "uistyle.h" - -class ChatLine : public AbstractUiMsg { - - public: - ChatLine(Message msg); - QString sender() const; - QString text() const; - MsgId msgId() const; - BufferInfo bufferInfo() const; - QDateTime timestamp() const; - - UiStyle::StyledText styledSender() const; - UiStyle::StyledText styledContents() const; - - private: - QString _sender, _text, _htmlSender, _htmlText, _htmlTimestamp; - UiStyle::StyledText _styledSender, _styledContents; - MsgId _msgId; - BufferInfo _bufferInfo; - QDateTime _timestamp; - - QString formattedToHtml(const QString &); - -}; - -#endif diff --git a/dev-notes/obsolete/qtopia/chatwidget.cpp b/dev-notes/obsolete/qtopia/chatwidget.cpp deleted file mode 100644 index b6950c64..00000000 --- a/dev-notes/obsolete/qtopia/chatwidget.cpp +++ /dev/null @@ -1,97 +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 -#include -#include "chatwidget.h" - -ChatWidget::ChatWidget(QWidget *parent) : QTextEdit(parent), AbstractChatView() { - setStyleSheet("background-color: rgba(255, 255, 255, 60%)"); - setTextInteractionFlags(Qt::TextBrowserInteraction); -} - -void ChatWidget::setContents(const QList &lines) { - clear(); - QList list; - foreach(AbstractUiMsg *msg, lines) list << static_cast(msg); - appendChatLines(list); - -} - -void ChatWidget::prependMsg(AbstractUiMsg *msg) { - ChatLine *line = static_cast(msg); - Q_ASSERT(line); - prependChatLine(line); -} - -void ChatWidget::appendMsg(AbstractUiMsg *msg) { - ChatLine *line = static_cast(msg); - Q_ASSERT(line); - appendChatLine(line); -} - -void ChatWidget::appendChatLine(ChatLine *line) { - QTextCursor cursor = textCursor(); - moveCursor(QTextCursor::End); - if(!document()->isEmpty()) insertPlainText("\n"); - insertStyledText(line->styledSender()); - insertPlainText(" "); - insertStyledText(line->styledContents()); - setTextCursor(cursor); -} - -void ChatWidget::appendChatLines(QList list) { - foreach(ChatLine *line, list) { - appendChatLine(line); - } -} - -void ChatWidget::prependChatLine(ChatLine *line) { - QTextCursor cursor = textCursor(); - moveCursor(QTextCursor::Start); - bool flg = document()->isEmpty(); - insertStyledText(line->styledSender()); - insertPlainText(" "); - insertStyledText(line->styledContents()); - if(!flg) insertPlainText("\n"); - setTextCursor(cursor); -} - -void ChatWidget::prependChatLines(QList list) { - foreach(ChatLine *line, list) { - prependChatLine(line); - } -} - -void ChatWidget::insertChatLine(ChatLine *line) { - if(!document()->isEmpty()) insertPlainText("\n"); - insertStyledText(line->styledSender()); - insertPlainText(" "); - insertStyledText(line->styledContents()); -} - -void ChatWidget::insertStyledText(const QtopiaUiStyle::StyledText &stext) { - QTextCursor cursor = textCursor(); - foreach(QTextLayout::FormatRange format, stext.formatList) { - cursor.setCharFormat(format.format); - setTextCursor(cursor); - insertPlainText(stext.plainText.mid(format.start, format.length)); - } -} diff --git a/dev-notes/obsolete/qtopia/chatwidget.h b/dev-notes/obsolete/qtopia/chatwidget.h deleted file mode 100644 index 3e1b37ab..00000000 --- a/dev-notes/obsolete/qtopia/chatwidget.h +++ /dev/null @@ -1,53 +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 CHATWIDGET_H_ -#define CHATWIDGET_H_ - -#include - -#include "abstractbuffercontainer.h" -#include "chatline.h" -#include "qtopiauistyle.h" -#include "quasselui.h" - -class ChatWidget : public QTextEdit, public AbstractChatView { - Q_OBJECT - - public: - ChatWidget(QWidget *parent = 0); - - public slots: - void setContents(const QList &); - void appendMsg(AbstractUiMsg *); - void prependMsg(AbstractUiMsg *); - - void prependChatLine(ChatLine *); - void appendChatLine(ChatLine *); - void prependChatLines(QList); - void appendChatLines(QList); - - private: - void insertChatLine(ChatLine *); - void insertStyledText(const QtopiaUiStyle::StyledText &); - -}; - -#endif diff --git a/dev-notes/obsolete/qtopia/coreconnectdlg.cpp b/dev-notes/obsolete/qtopia/coreconnectdlg.cpp deleted file mode 100644 index 9f09d918..00000000 --- a/dev-notes/obsolete/qtopia/coreconnectdlg.cpp +++ /dev/null @@ -1,378 +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. * - ***************************************************************************/ -#define DEVELMODE -#include -#include - -#include "coreconnectdlg.h" -#include "client.h" -#include "clientsettings.h" -#include "clientsyncer.h" -#include "global.h" - -CoreConnectDlg::CoreConnectDlg(QWidget *parent, bool /*doAutoConnect*/) : QDialog(parent) { - ui.setupUi(this); - - setAttribute(Qt::WA_DeleteOnClose); - setModal(true); - - clientSyncer = new ClientSyncer(this); - connect(clientSyncer, SIGNAL(socketStateChanged(QAbstractSocket::SocketState)),this, SLOT(initPhaseSocketState(QAbstractSocket::SocketState))); - connect(clientSyncer, SIGNAL(connectionError(const QString &)), this, SLOT(initPhaseError(const QString &))); - connect(clientSyncer, SIGNAL(connectionMsg(const QString &)), this, SLOT(initPhaseMsg(const QString &))); - connect(clientSyncer, SIGNAL(startLogin()), this, SLOT(startLogin())); - connect(clientSyncer, SIGNAL(loginFailed(const QString &)), this, SLOT(loginFailed(const QString &))); - connect(clientSyncer, SIGNAL(loginSuccess()), this, SLOT(startSync())); - //connect(clientSyncer, SIGNAL(startCoreSetup(const QVariantList &)), this, SLOT(startCoreConfig(const QVariantList &))); - - QMenu *menu = new QMenu(this); - newAccAction = new QAction(QIcon(":icon/new"), tr("New"), this); - delAccAction = new QAction(QIcon(":icon/trash"), tr("Delete"), this); - editAccAction = new QAction(QIcon(":icon/settings"), tr("Properties..."), this); - menu->addAction(newAccAction); - menu->addAction(delAccAction); - menu->addAction(editAccAction); - QSoftMenuBar::addMenuTo(this, menu); - QSoftMenuBar::setCancelEnabled(this, true); - ui.newAccount->setDefaultAction(newAccAction); - ui.delAccount->setDefaultAction(delAccAction); - ui.editAccount->setDefaultAction(editAccAction); - connect(newAccAction, SIGNAL(triggered()), this, SLOT(createAccount())); - connect(delAccAction, SIGNAL(triggered()), this, SLOT(removeAccount())); - connect(editAccAction, SIGNAL(triggered()), this, SLOT(editAccount())); - connect(ui.accountList, SIGNAL(itemSelectionChanged()), this, SLOT(setWidgetStates())); - connect(ui.doConnect, SIGNAL(clicked()), this, SLOT(doConnect())); - - ui.accountList->setSelectionMode(QAbstractItemView::SingleSelection); - ui.accountList->setSortingEnabled(true); - - CoreAccountSettings s; - AccountId lastacc = s.lastAccount(); - autoConnectAccount = s.autoConnectAccount(); - QListWidgetItem *currentItem = 0; - foreach(AccountId id, s.knownAccounts()) { - if(!id.isValid()) continue; - QVariantMap data = s.retrieveAccountData(id); - accounts[id] = data; - QListWidgetItem *item = new QListWidgetItem(data["AccountName"].toString(), ui.accountList); - item->setData(Qt::UserRole, QVariant::fromValue(id)); - if(id == lastacc) currentItem = item; - } - if(currentItem) ui.accountList->setCurrentItem(currentItem); - else ui.accountList->setCurrentRow(0); - setWidgetStates(); -#ifdef DEVELMODE - doConnect(); // shortcut for development -#endif -} - -CoreConnectDlg::~CoreConnectDlg() { - //qDebug() << "destroy"; -} - -void CoreConnectDlg::setWidgetStates() { - editAccAction->setEnabled(ui.accountList->selectedItems().count()); - delAccAction->setEnabled(ui.accountList->selectedItems().count()); - ui.doConnect->setEnabled(ui.accountList->selectedItems().count()); -} - -void CoreConnectDlg::createAccount() { - QStringList existing; - for(int i = 0; i < ui.accountList->count(); i++) existing << ui.accountList->item(i)->text(); - CoreAccountEditDlg dlg(0, QVariantMap(), existing, this); - if(dlg.exec() == QDialog::Accepted) { - // find free ID - AccountId id = accounts.count() + 1; - for(AccountId i = 1; i <= accounts.count(); i++) { - if(!accounts.keys().contains(i)) { - id = i; - break; - } - } - QVariantMap data = dlg.accountData(); - data["AccountId"] = QVariant::fromValue(id); - accounts[id] = data; - CoreAccountSettings s; - s.storeAccountData(id, data); - QListWidgetItem *item = new QListWidgetItem(data["AccountName"].toString(), ui.accountList); - item->setData(Qt::UserRole, QVariant::fromValue(id)); - ui.accountList->setCurrentItem(item); - } -} - -void CoreConnectDlg::editAccount() { - QStringList existing; - for(int i = 0; i < ui.accountList->count(); i++) existing << ui.accountList->item(i)->text(); - AccountId id = ui.accountList->currentItem()->data(Qt::UserRole).value(); - QVariantMap acct = accounts[id]; - CoreAccountEditDlg dlg(id, acct, existing, this); - if(dlg.exec() == QDialog::Accepted) { - QVariantMap data = dlg.accountData(); - ui.accountList->currentItem()->setText(data["AccountName"].toString()); - accounts[id] = data; - CoreAccountSettings s; - s.storeAccountData(id, data); - } -} - -void CoreConnectDlg::removeAccount() { - AccountId id = ui.accountList->currentItem()->data(Qt::UserRole).value(); - int ret = QMessageBox::question(this, tr("Remove Account Settings"), - tr("Do you really want to remove your local settings for this Quassel Core account?
" - "Note: This will not remove or change any data on the Core itself!"), - QMessageBox::Yes|QMessageBox::No, QMessageBox::No); - if(ret == QMessageBox::Yes) { - int idx = ui.accountList->currentRow(); - delete ui.accountList->takeItem(idx); - ui.accountList->setCurrentRow(qMin(idx, ui.accountList->count()-1)); - CoreAccountSettings s; - s.removeAccount(id); - setWidgetStates(); - } -} - -void CoreConnectDlg::doConnect() { - // save accounts - CoreAccountSettings s; - foreach(QVariantMap acct, accounts.values()) { - AccountId id = acct["AccountId"].value(); - if(acct.contains("Delete")) { - s.removeAccount(id); - } else { - s.storeAccountData(id, acct); - } - } - s.setAutoConnectAccount(autoConnectAccount); - - //ui.stackedWidget->setCurrentWidget(ui.loginPage); - account = ui.accountList->currentItem()->data(Qt::UserRole).value(); - accountData = accounts[account]; - s.setLastAccount(account); - - clientSyncer->connectToCore(accountData); -// qDebug() << "logging in " << accountData["User"].toString() << accountData["Password"].toString(); -// clientSyncer->loginToCore(accountData["User"].toString(), accountData["Password"].toString()); -// qDebug() << "logged in"; - //connectToCore(); - //if(!ui.accountList->selectedItems().count()) return; -// AccountSettings s; -// QVariantMap connInfo; // = s.value(acc, "AccountData").toMap(); - //connInfo["AccountName"] = acc; - - progressDlg = new CoreConnectProgressDlg(clientSyncer, this); - connect(progressDlg, SIGNAL(accepted()), this, SLOT(connectionSuccess())); - connect(progressDlg, SIGNAL(rejected()), this, SLOT(connectionFailure())); - progressDlg->showMaximized(); - // progressDlg->connectToCore(connInfo); -} - -void CoreConnectDlg::initPhaseError(const QString &error) { - qDebug() << "connection error:" << error; -} - -void CoreConnectDlg::initPhaseMsg(const QString &msg) { - -} - -void CoreConnectDlg::initPhaseSocketState(QAbstractSocket::SocketState state) { - /* - QString s; - QString host = accountData["Host"].toString(); - switch(state) { - case QAbstractSocket::UnconnectedState: s = tr("Not connected to %1.").arg(host); break; - case QAbstractSocket::HostLookupState: s = tr("Looking up %1...").arg(host); break; - case QAbstractSocket::ConnectingState: s = tr("Connecting to %1...").arg(host); break; - case QAbstractSocket::ConnectedState: s = tr("Connected to %1").arg(host); break; - default: s = tr("Unknown connection state to %1"); break; - } - ui.connectLabel->setText(s); - */ -} - -void CoreConnectDlg::restartPhaseNull() { - clientSyncer->disconnectFromCore(); -} - -/********************************************************* - * Phase Two: Login - *********************************************************/ - -void CoreConnectDlg::startLogin() { - clientSyncer->loginToCore(accountData["User"].toString(), accountData["Password"].toString()); -} - - -void CoreConnectDlg::loginFailed(const QString &error) { - -} - -void CoreConnectDlg::startSync() { - - -} - - -void CoreConnectDlg::connectionSuccess() { - /* - if(progressDlg->isConnected()) { - progressDlg->deleteLater(); - accept(); - } else { - connectionFailure(); - } - */ - accept(); -} - -void CoreConnectDlg::connectionFailure() { - progressDlg->deleteLater(); - Client::instance()->disconnectFromCore(); -} - -QVariant CoreConnectDlg::getCoreState() { -// return coreState; -} - - -/****************************************************************************************************/ - -CoreAccountEditDlg::CoreAccountEditDlg(AccountId id, const QVariantMap &acct, const QStringList &_existing, QWidget *parent) : QDialog(parent), account(acct) { - ui.setupUi(this); - setModal(true); - showMaximized(); - - existing = _existing; - account = acct; - if(id.isValid()) { - existing.removeAll(acct["AccountName"].toString()); - ui.hostEdit->setText(acct["Host"].toString()); - ui.port->setValue(acct["Port"].toUInt()); - ui.accountEdit->setText(acct["AccountName"].toString()); - ui.userEdit->setText(acct["User"].toString()); - ui.passwdEdit->setText(acct["Password"].toString()); - ui.hostEdit->setFocus(); - } else { - ui.port->setValue(Global::defaultPort); - ui.accountEdit->setFocus(); - setWindowTitle(tr("Add Core Account")); - } -} - -QVariantMap CoreAccountEditDlg::accountData() { - account["AccountName"] = ui.accountEdit->text().trimmed(); - account["Host"] = ui.hostEdit->text().trimmed(); - account["Port"] = ui.port->value(); - account["User"] = ui.userEdit->text(); - account["Password"] = ui.passwdEdit->text(); - return account; -} - -void CoreAccountEditDlg::accept() { - if(ui.userEdit->text().isEmpty() || ui.hostEdit->text().isEmpty() || ui.accountEdit->text().isEmpty()) { - int res = QMessageBox::warning(this, tr("Missing information"), - tr("Please enter all required information or discard changes to return to account selection."), - QMessageBox::Discard|QMessageBox::Retry); - if(res != QMessageBox::Retry) reject(); - return; - } - - if(existing.contains(ui.accountEdit->text())) { - int res = QMessageBox::warning(this, tr("Non-unique account name"), - tr("Account names need to be unique. Please enter a different name or discard all changes to " - "return to account selection."), - QMessageBox::Discard|QMessageBox::Retry); - if(res != QMessageBox::Retry) reject(); - ui.accountEdit->setSelection(0, ui.accountEdit->text().length()); - ui.accountEdit->setFocus(); - return; - } - QDialog::accept(); -} - -/********************************************************************************************/ - -CoreConnectProgressDlg::CoreConnectProgressDlg(ClientSyncer *clientSyncer, QDialog *parent) : QDialog(parent) { - ui.setupUi(this); - - setModal(true); - - connect(clientSyncer, SIGNAL(sessionProgress(quint32, quint32)), this, SLOT(coreSessionProgress(quint32, quint32))); - connect(clientSyncer, SIGNAL(networksProgress(quint32, quint32)), this, SLOT(coreNetworksProgress(quint32, quint32))); - connect(clientSyncer, SIGNAL(channelsProgress(quint32, quint32)), this, SLOT(coreChannelsProgress(quint32, quint32))); - connect(clientSyncer, SIGNAL(ircUsersProgress(quint32, quint32)), this, SLOT(coreIrcUsersProgress(quint32, quint32))); - connect(clientSyncer, SIGNAL(syncFinished()), this, SLOT(syncFinished())); - - ui.sessionProgress->setRange(0, 1); - ui.sessionProgress->setValue(0); - ui.networksProgress->setRange(0, 1); - ui.networksProgress->setValue(0); - ui.channelsProgress->setRange(0, 1); - ui.channelsProgress->setValue(0); - ui.ircUsersProgress->setRange(0, 1); - ui.ircUsersProgress->setValue(0); -} - -void CoreConnectProgressDlg::coreSessionProgress(quint32 val, quint32 max) { - ui.sessionProgress->setRange(0, max); - ui.sessionProgress->setValue(val); - -} - -void CoreConnectProgressDlg::coreNetworksProgress(quint32 val, quint32 max) { - if(max == 0) { - ui.networksProgress->setFormat("0/0"); - ui.networksProgress->setRange(0, 1); - ui.networksProgress->setValue(1); - } else { - ui.networksProgress->setFormat("%v/%m"); - ui.networksProgress->setRange(0, max); - ui.networksProgress->setValue(val); - } -} - -void CoreConnectProgressDlg::coreChannelsProgress(quint32 val, quint32 max) { - if(max == 0) { - ui.channelsProgress->setFormat("0/0"); - ui.channelsProgress->setRange(0, 1); - ui.channelsProgress->setValue(1); - } else { - ui.channelsProgress->setFormat("%v/%m"); - ui.channelsProgress->setRange(0, max); - ui.channelsProgress->setValue(val); - } -} - -void CoreConnectProgressDlg::coreIrcUsersProgress(quint32 val, quint32 max) { - if(max == 0) { - ui.ircUsersProgress->setFormat("0/0"); - ui.ircUsersProgress->setRange(0, 1); - ui.ircUsersProgress->setValue(1); - } else { - if(val % 100) return; - ui.ircUsersProgress->setFormat("%v/%m"); - ui.ircUsersProgress->setRange(0, max); - ui.ircUsersProgress->setValue(val); - } -} - -void CoreConnectProgressDlg::syncFinished() { - accept(); -} - diff --git a/dev-notes/obsolete/qtopia/coreconnectdlg.h b/dev-notes/obsolete/qtopia/coreconnectdlg.h deleted file mode 100644 index 36ce26f1..00000000 --- a/dev-notes/obsolete/qtopia/coreconnectdlg.h +++ /dev/null @@ -1,122 +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 _CORECONNECTDLG_H -#define _CORECONNECTDLG_H - -#include - -#include "types.h" - -#include "ui_coreconnectdlg.h" -#include "ui_coreconnectprogressdlg.h" -#include "ui_coreaccounteditdlg.h" - -class ClientSyncer; -class CoreConnectProgressDlg; - -class CoreConnectDlg : public QDialog { - Q_OBJECT - - public: - CoreConnectDlg(QWidget *parent = 0, bool doAutoConnect = false); - ~CoreConnectDlg(); - QVariant getCoreState(); - - private slots: - void createAccount(); - void removeAccount(); - void editAccount(); - void setWidgetStates(); - void doConnect(); - void connectionSuccess(); - void connectionFailure(); - - /*** Phase One: Connection ***/ - - void restartPhaseNull(); - void initPhaseError(const QString &error); - void initPhaseMsg(const QString &msg); - void initPhaseSocketState(QAbstractSocket::SocketState); - - /*** Phase Two: Login ***/ - void startLogin(); - void loginFailed(const QString &); - - /*** Phase Three: Sync ***/ - void startSync(); - - private: - Ui::CoreConnectDlg ui; - ClientSyncer *clientSyncer; - - AccountId autoConnectAccount; - QHash accounts; - QVariantMap accountData; - AccountId account; - - void editAccount(QString); - - QAction *newAccAction, *editAccAction, *delAccAction; - - CoreConnectProgressDlg *progressDlg; -}; - -class CoreAccountEditDlg : public QDialog { - Q_OBJECT - - public: - CoreAccountEditDlg(AccountId id, const QVariantMap &data, const QStringList &existing = QStringList(), QWidget *parent = 0); - QVariantMap accountData(); - - public slots: - void accept(); - - private slots: - - - private: - Ui::CoreAccountEditDlg ui; - QVariantMap account; - QStringList existing; - -}; - -class CoreConnectProgressDlg : public QDialog { - Q_OBJECT - - public: - CoreConnectProgressDlg(ClientSyncer *, QDialog *parent = 0); - - private slots: - - void syncFinished(); - - void coreSessionProgress(quint32, quint32); - void coreNetworksProgress(quint32, quint32); - void coreChannelsProgress(quint32, quint32); - void coreIrcUsersProgress(quint32, quint32); - - private: - Ui::CoreConnectProgressDlg ui; - -}; - -#endif diff --git a/dev-notes/obsolete/qtopia/main.cpp b/dev-notes/obsolete/qtopia/main.cpp deleted file mode 100644 index 03c33c29..00000000 --- a/dev-notes/obsolete/qtopia/main.cpp +++ /dev/null @@ -1,26 +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 "qtopiamainwin.h" -#include - -QTOPIA_ADD_APPLICATION("Quassel IRC", QtopiaMainWin) -QTOPIA_MAIN - diff --git a/dev-notes/obsolete/qtopia/mainwidget.cpp b/dev-notes/obsolete/qtopia/mainwidget.cpp deleted file mode 100644 index 45231956..00000000 --- a/dev-notes/obsolete/qtopia/mainwidget.cpp +++ /dev/null @@ -1,123 +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 "mainwidget.h" - -#include "buffer.h" -#include "chatwidget.h" -#include "client.h" - -MainWidget::MainWidget(QWidget *parent) : AbstractBufferContainer(parent) { - ui.setupUi(this); - ui.inputLine->hide(); ui.topicBar->hide(); - connect(ui.inputLine, SIGNAL(sendText(const QString &)), this, SLOT(userInput(const QString &))); - connect(this, SIGNAL(userInput(BufferInfo, QString)), Client::instance(), SIGNAL(sendInput(BufferInfo, QString))); -} - -MainWidget::~MainWidget() { - - - -} - -AbstractChatView *MainWidget::createChatView(BufferId id) { - Q_UNUSED(id) - ChatWidget *widget = new ChatWidget(this); - AbstractChatView *chatView = static_cast(widget); // can't use dynamic_cast on some Qtopia devices - Q_ASSERT(chatView); - _chatViews[id] = widget; - ui.stack->addWidget(widget); - widget->setFocusProxy(this); - return chatView; -} - -void MainWidget::removeChatView(BufferId id) { - ChatWidget *view = _chatViews.value(id, 0); - if(!view) return; - ui.stack->removeWidget(view); - view->deleteLater(); -} - -void MainWidget::showChatView(BufferId id) { - if(id.isValid()) currentBufferInfo = Client::buffer(id)->bufferInfo(); - else currentBufferInfo = BufferInfo(); - ChatWidget *widget = _chatViews.value(id, 0); - if(!widget) ui.stack->setCurrentIndex(0); - else { - ui.stack->setCurrentWidget(widget); - ui.inputLine->show(); ui.topicBar->show(); - ui.inputLine->setFocus(); - } -} - - -/* -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->bufferInfo().bufferName()).arg(buf->bufferInfo().networkName()).arg(buf->topic()); - QString title = "foobar"; - ui.topicBar->setContents(title); - - //ui.chatWidget->setStyleSheet("div { color: #777777; }"); - //ui.chatWidget->setHtml("" - // "
foo
bar
baz"); - //ui.chatWidget->moveCursor(QTextCursor::End); - //ui.chatWidget->insertHtml("
brumm
"); - - ChatWidget *chatWidget; - if(!chatWidgets.contains(buf)) { - chatWidget = new ChatWidget(this); - QList lines; - QList msgs = buf->contents(); - foreach(AbstractUiMsg *msg, msgs) { - lines.append((ChatLine *)(msg)); - } - chatWidget->setContents(lines); - connect(buf, SIGNAL(msgAppended(AbstractUiMsg *)), chatWidget, SLOT(appendMsg(AbstractUiMsg *))); - connect(buf, SIGNAL(msgPrepended(AbstractUiMsg *)), chatWidget, SLOT(prependMsg(AbstractUiMsg *))); - connect(buf, SIGNAL(topicSet(QString)), this, SLOT(setTopic(QString))); - //connect(buf, SIGNAL(ownNickSet(QString)), this, SLOT(setOwnNick(QString))); - ui.stack->addWidget(chatWidget); - chatWidgets.insert(buf, chatWidget); - chatWidget->setFocusProxy(ui.inputLine); - } else chatWidget = chatWidgets[buf]; - ui.inputLine->show(); ui.topicBar->show(); - ui.stack->setCurrentWidget(chatWidget); - ui.inputLine->setFocus(); - currentBuffer = buf; - -} -*/ - -void MainWidget::userInput(const QString &input) { - if(!currentBufferInfo.isValid()) return; - QStringList lines = input.split('\n', QString::SkipEmptyParts); - foreach(QString msg, lines) { - if(msg.isEmpty()) continue; - emit userInput(currentBufferInfo, msg); - } - ui.inputLine->clear(); -} diff --git a/dev-notes/obsolete/qtopia/mainwidget.h b/dev-notes/obsolete/qtopia/mainwidget.h deleted file mode 100644 index 0c83ea0e..00000000 --- a/dev-notes/obsolete/qtopia/mainwidget.h +++ /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 _MAINWIDGET_H_ -#define _MAINWIDGET_H_ - -#include "ui_mainwidget.h" - -#include "abstractbuffercontainer.h" -#include "bufferinfo.h" - -class Buffer; -class ChatWidget; - -class MainWidget : public AbstractBufferContainer { - Q_OBJECT - - public: - MainWidget(QWidget *parent); - ~MainWidget(); - - signals: - void userInput(const BufferInfo &, const QString &); - - protected: - virtual AbstractChatView *createChatView(BufferId); - virtual void removeChatView(BufferId); - - protected slots: - virtual void showChatView(BufferId); - - private slots: - void userInput(const QString &); - - private: - Ui::MainWidget ui; - QHash _chatViews; - BufferInfo currentBufferInfo; - -}; - - -#endif diff --git a/dev-notes/obsolete/qtopia/nicklistwidget.cpp b/dev-notes/obsolete/qtopia/nicklistwidget.cpp deleted file mode 100644 index 5aa5c2dc..00000000 --- a/dev-notes/obsolete/qtopia/nicklistwidget.cpp +++ /dev/null @@ -1,84 +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 "nicklistwidget.h" - -#include "buffer.h" -#include "nickview.h" - -// FIXME bring back nicks! - -NickListWidget::NickListWidget(QWidget *parent) : QDialog(parent) { - ui.setupUi(this); - setModal(true); - //setStyleSheet("background-color: rgba(220, 220, 255, 40%); color: rgb(0, 0, 0); font-size: 5pt;"); - - -} - -NickListWidget::~NickListWidget() { - - - -} - -void NickListWidget::setBuffer(BufferId id) { - if(!id.isValid()) { - ui.stackedWidget->setCurrentWidget(ui.emptyPage); - return; - } - /* - if(buf->bufferType() != Buffer::ChannelType) { - ui.stackedWidget->setCurrentWidget(ui.emptyPage); - } else { - if(nickViews.contains(buf)) { - ui.stackedWidget->setCurrentWidget(nickViews.value(buf)); - } else { - NickView *view = new NickView(this); - view->setModel(buf->nickModel()); - nickViews[buf] = view; - ui.stackedWidget->addWidget(view); - ui.stackedWidget->setCurrentWidget(view); - connect(buf, SIGNAL(destroyed(QObject *)), this, SLOT(bufferDestroyed(QObject *))); - } - } - */ -} - -void NickListWidget::reset() { - /* - foreach(NickView *view, nickViews.values()) { - ui.stackedWidget->removeWidget(view); - view->deleteLater(); - } - nickViews.clear(); - */ -} - -void NickListWidget::bufferDestroyed(QObject *buf) { - /* - if(nickViews.contains((Buffer *)buf)) { - NickView *view = nickViews.take((Buffer *)buf); - ui.stackedWidget->removeWidget(view); - view->deleteLater(); - } - */ -} - diff --git a/dev-notes/obsolete/qtopia/nicklistwidget.h b/dev-notes/obsolete/qtopia/nicklistwidget.h deleted file mode 100644 index 02ec4cbb..00000000 --- a/dev-notes/obsolete/qtopia/nicklistwidget.h +++ /dev/null @@ -1,52 +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 _NICKLISTWIDGET_H_ -#define _NICKLISTWIDGET_H_ - -#include - -#include "ui_nicklistwidget.h" - -class Buffer; -class BufferId; -class NickView; - -class NickListWidget : public QDialog { - Q_OBJECT - - public: - NickListWidget(QWidget *parent = 0); - ~NickListWidget(); - - public slots: - void setBuffer(BufferId); - void reset(); - - private slots: - void bufferDestroyed(QObject *); - - private: - Ui::NickListWidget ui; - QHash nickViews; - -}; - -#endif diff --git a/dev-notes/obsolete/qtopia/qtopiamainwin.cpp b/dev-notes/obsolete/qtopia/qtopiamainwin.cpp deleted file mode 100644 index b927e72f..00000000 --- a/dev-notes/obsolete/qtopia/qtopiamainwin.cpp +++ /dev/null @@ -1,176 +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 "qtopiamainwin.h" - -#include "networkmodel.h" -#include "bufferviewwidget.h" -#include "nicklistwidget.h" -#include "chatline.h" -#include "clientbacklogmanager.h" -#include "coreconnectdlg.h" -#include "global.h" -#include "mainwidget.h" -#include "message.h" -#include "network.h" -#include "qtopiaui.h" -#include "signalproxy.h" - -#include "ui_aboutdlg.h" - -#include -#include - -// This constructor is the first thing to be called for a Qtopia app, so we do the init stuff -// here (rather than in a main.cpp). -QtopiaMainWin::QtopiaMainWin(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) { - Global::registerMetaTypes(); - -#include "../../version.inc" - - Global::runMode = Global::ClientOnly; - Global::defaultPort = 4242; - Global::DEBUG = true; - - Network::setDefaultCodecForServer("ISO-8859-1"); - Network::setDefaultCodecForEncoding("UTF-8"); - Network::setDefaultCodecForDecoding("ISO-8859-15"); - - QCoreApplication::setOrganizationDomain("quassel-irc.org"); - QCoreApplication::setApplicationName("Quassel IRC"); - QCoreApplication::setOrganizationName("Quassel Project"); - - QtopiaUi *gui = new QtopiaUi(this); - Client::init(gui); - - setWindowTitle("Quassel IRC"); - setWindowIcon(QIcon(":icons/quassel-icon.png")); - setWindowIconText("Quassel IRC"); - - mainWidget = new MainWidget(this); - mainWidget->setModel(Client::bufferModel()); - mainWidget->setSelectionModel(Client::bufferModel()->standardSelectionModel()); - setCentralWidget(mainWidget); - - toolBar = new QToolBar(this); - toolBar->setIconSize(QSize(16, 16)); - toolBar->setWindowTitle(tr("Show Toolbar")); - addToolBar(toolBar); - - //bufferViewWidget = new BufferViewWidget(this); - bufferViewWidget = 0; // delayed creation to avoid QPainter warnings - nickListWidget = new NickListWidget(this); - - connect(mainWidget, SIGNAL(currentChanged(BufferId)), this, SLOT(showBuffer(BufferId))); - - setupActions(); - - init(); - //gui->init(); - -} - -// at this point, client is fully initialized -void QtopiaMainWin::init() { - showMaximized(); - CoreConnectDlg *dlg = new CoreConnectDlg(this); - //setCentralWidget(dlg); - dlg->showMaximized(); - dlg->exec(); -} - -QtopiaMainWin::~QtopiaMainWin() { - - -} - -void QtopiaMainWin::closeEvent(QCloseEvent *event) { -#ifndef DEVELMODE - QMessageBox *box = new QMessageBox(QMessageBox::Question, tr("Quit Quassel IRC?"), tr("Do you really want to quit Quassel IRC?"), - QMessageBox::Cancel, this); - QAbstractButton *quit = box->addButton(tr("Quit"), QMessageBox::AcceptRole); - box->exec(); - if(box->clickedButton() == quit) event->accept(); - else event->ignore(); - box->deleteLater(); -#else - event->accept(); -#endif -} - -void QtopiaMainWin::setupActions() { - showBuffersAction = toolBar->addAction(QIcon(":icon/options-hide"), tr("Show Buffers"), this, SLOT(showBufferView())); // FIXME provide real icon - showNicksAction = toolBar->addAction(QIcon(":icon/list"), tr("Show Nicks"), this, SLOT(showNickList())); - showNicksAction->setEnabled(false); - - QMenu *menu = new QMenu(this); - menu->addAction(showBuffersAction); - menu->addAction(showNicksAction); - menu->addSeparator(); - menu->addAction(toolBar->toggleViewAction()); - menu->addSeparator(); - menu->addAction(tr("About..."), this, SLOT(showAboutDlg())); - - QSoftMenuBar::addMenuTo(this, menu); -} - -void QtopiaMainWin::connectedToCore() { - foreach(BufferInfo id, Client::allBufferInfos()) { - Client::backlogManager()->requestBacklog(id.bufferId(), 500, -1); - } -} - -void QtopiaMainWin::disconnectedFromCore() { - - -} - -AbstractUiMsg *QtopiaMainWin::layoutMsg(const Message &msg) { - return new ChatLine(msg); - //return 0; -} - -void QtopiaMainWin::showBuffer(BufferId id) { - nickListWidget->setBuffer(id); - Buffer *b = Client::buffer(id); - //showNicksAction->setEnabled(b && b->bufferInfo().type() == BufferInfo::ChannelBuffer); FIXME enable again when we have a nicklist! - -} - -void QtopiaMainWin::showBufferView() { - if(!bufferViewWidget) { - bufferViewWidget = new BufferViewWidget(this); - connect(mainWidget, SIGNAL(currentChanged(BufferId)), bufferViewWidget, SLOT(accept())); - } - bufferViewWidget->showMaximized(); -} - -void QtopiaMainWin::showNickList() { - nickListWidget->showMaximized(); -} - -void QtopiaMainWin::showAboutDlg() { - QDialog *dlg = new QDialog(this); - dlg->setAttribute(Qt::WA_DeleteOnClose); - Ui::AboutDlg ui; - ui.setupUi(dlg); - dlg->showMaximized(); -} - diff --git a/dev-notes/obsolete/qtopia/qtopiamainwin.h b/dev-notes/obsolete/qtopia/qtopiamainwin.h deleted file mode 100644 index 1a59a584..00000000 --- a/dev-notes/obsolete/qtopia/qtopiamainwin.h +++ /dev/null @@ -1,72 +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 _QTOPIAMAINWIN_H_ -#define _QTOPIAMAINWIN_H_ - -#include - -#include "client.h" - -class BufferViewWidget; -class MainWidget; -class NickListWidget; - -class QtopiaMainWin : public QMainWindow { - Q_OBJECT - - public: - QtopiaMainWin(QWidget *parent = 0, Qt::WFlags f = 0); - ~QtopiaMainWin(); - - AbstractUiMsg *layoutMsg(const Message &); - - protected slots: - void connectedToCore(); - void disconnectedFromCore(); - - signals: - void connectToCore(const QVariantMap &connInfo); - void disconnectFromCore(); - void requestBacklog(BufferInfo, QVariant, QVariant); - - private slots: - void showBuffer(BufferId); - void showBufferView(); - void showNickList(); - void showAboutDlg(); - - protected: - void closeEvent(QCloseEvent *); - - private: - void init(); - void setupActions(); - - MainWidget *mainWidget; - QToolBar *toolBar; - QAction *showBuffersAction, *showNicksAction; - BufferViewWidget *bufferViewWidget; - NickListWidget *nickListWidget; - - friend class QtopiaUi; -}; - -#endif diff --git a/dev-notes/obsolete/qtopia/qtopiaui.cpp b/dev-notes/obsolete/qtopia/qtopiaui.cpp deleted file mode 100644 index fa856b49..00000000 --- a/dev-notes/obsolete/qtopia/qtopiaui.cpp +++ /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. * - ***************************************************************************/ - -#include "qtopiaui.h" -#include "qtopiamainwin.h" -#include "qtopiauistyle.h" - -QtopiaUiStyle *QtopiaUi::_style; - -QtopiaUi::QtopiaUi(QtopiaMainWin *mw) : AbstractUi(), mainWin(mw) { - _style = new QtopiaUiStyle(); - connect(mainWin, SIGNAL(connectToCore(const QVariantMap &)), this, SIGNAL(connectToCore(const QVariantMap &))); - connect(mainWin, SIGNAL(disconnectFromCore()), this, SIGNAL(disconnectFromCore())); - - -} - -QtopiaUi::~QtopiaUi() { - delete _style; - delete mainWin; - -} - -void QtopiaUi::init() { - -} - -QtopiaUiStyle *QtopiaUi::style() { - return _style; -} - -AbstractUiMsg *QtopiaUi::layoutMsg(const Message &msg) { - return mainWin->layoutMsg(msg); -} - -void QtopiaUi::connectedToCore() { - mainWin->connectedToCore(); -} - -void QtopiaUi::disconnectedFromCore() { - mainWin->disconnectedFromCore(); -} diff --git a/dev-notes/obsolete/qtopia/qtopiaui.h b/dev-notes/obsolete/qtopia/qtopiaui.h deleted file mode 100644 index f1629fdb..00000000 --- a/dev-notes/obsolete/qtopia/qtopiaui.h +++ /dev/null @@ -1,51 +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 _QTOPIAGUI_H_ -#define _QTOPIAGUI_H_ - -#include "quasselui.h" - -class QtopiaMainWin; -class QtopiaUiStyle; - -//! This class encapsulates Quassel's GUI for Qtopia. -class QtopiaUi : public AbstractUi { - Q_OBJECT - - public: - QtopiaUi(QtopiaMainWin *mainWin); - ~QtopiaUi(); - void init(); - AbstractUiMsg *layoutMsg(const Message &); - - static QtopiaUiStyle *style(); - - protected slots: - void connectedToCore(); - void disconnectedFromCore(); - - private: - QtopiaMainWin *mainWin; - static QtopiaUiStyle *_style; -}; - - -#endif diff --git a/dev-notes/obsolete/qtopia/qtopiauistyle.cpp b/dev-notes/obsolete/qtopia/qtopiauistyle.cpp deleted file mode 100644 index ba433dd8..00000000 --- a/dev-notes/obsolete/qtopia/qtopiauistyle.cpp +++ /dev/null @@ -1,115 +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 "qtopiauistyle.h" -#include "settings.h" - -QtopiaUiStyle::QtopiaUiStyle() : UiStyle("QtopiaUiStyle") { - - QTextCharFormat def; - def.setForeground(QBrush("#000000")); - def.setFont(QFont("Verdana",5)); - setFormat(None, def, Settings::Default); - - // We need to just set our internal formats; everything else is done by the base class... - - // Internal message formats - - QTextCharFormat plainMsg; - plainMsg.setForeground(QBrush("#000000")); - setFormat(PlainMsg, plainMsg, Settings::Default); - - QTextCharFormat notice; - notice.setForeground(QBrush("#000080")); - setFormat(NoticeMsg, notice, Settings::Default); - - QTextCharFormat server; - server.setForeground(QBrush("#000080")); - setFormat(ServerMsg, server, Settings::Default); - - QTextCharFormat error; - error.setForeground(QBrush("#ff0000")); - setFormat(ErrorMsg, error, Settings::Default); - - QTextCharFormat join; - join.setForeground(QBrush("#008000")); - setFormat(JoinMsg, join, Settings::Default); - - QTextCharFormat part; - part.setForeground(QBrush("#ff0000")); - setFormat(PartMsg, part, Settings::Default); - - QTextCharFormat quit; - quit.setForeground(QBrush("#ff0000")); - setFormat(QuitMsg, quit, Settings::Default); - - QTextCharFormat kick; - kick.setForeground(QBrush("#ff0000")); - setFormat(KickMsg, kick, Settings::Default); - - QTextCharFormat nren; - nren.setForeground(QBrush("#6a5acd")); - setFormat(RenameMsg, nren, Settings::Default); - - QTextCharFormat mode; - mode.setForeground(QBrush("#4682b4")); - setFormat(ModeMsg, mode, Settings::Default); - - QTextCharFormat action; - action.setFontItalic(true); - action.setForeground(QBrush("#8b008b")); - setFormat(ActionMsg, action, Settings::Default); - - // Internal message element formats - QTextCharFormat ts; - ts.setForeground(QBrush("#808080")); - setFormat(Timestamp, ts, Settings::Default); - - QTextCharFormat sender; - sender.setAnchor(true); - sender.setForeground(QBrush("#000080")); - setFormat(Sender, sender, Settings::Default); - - QTextCharFormat nick; - nick.setAnchor(true); - nick.setFontWeight(QFont::Bold); - setFormat(Nick, nick, Settings::Default); - - QTextCharFormat hostmask; - hostmask.setFontItalic(true); - setFormat(Hostmask, hostmask, Settings::Default); - - QTextCharFormat channel; - channel.setAnchor(true); - channel.setFontWeight(QFont::Bold); - setFormat(ChannelName, channel, Settings::Default); - - QTextCharFormat flags; - flags.setFontWeight(QFont::Bold); - setFormat(ModeFlags, flags, Settings::Default); - - QTextCharFormat url; - url.setFontUnderline(true); - url.setAnchor(true); - setFormat(Url, url, Settings::Default); - -} - -QtopiaUiStyle::~QtopiaUiStyle() {} diff --git a/dev-notes/obsolete/qtopia/qtopiauistyle.h b/dev-notes/obsolete/qtopia/qtopiauistyle.h deleted file mode 100644 index 238937fc..00000000 --- a/dev-notes/obsolete/qtopia/qtopiauistyle.h +++ /dev/null @@ -1,34 +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 _QTOPIASTYLE_H_ -#define _QTOPIASTYLE_H_ - -#include "uistyle.h" - -class QtopiaUiStyle : public UiStyle { - - public: - QtopiaUiStyle(); - virtual ~QtopiaUiStyle(); - -}; - -#endif diff --git a/dev-notes/obsolete/qtopia/quasseltopia.desktop b/dev-notes/obsolete/qtopia/quasseltopia.desktop deleted file mode 100644 index e1ca46d4..00000000 --- a/dev-notes/obsolete/qtopia/quasseltopia.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Translation] -#File=example-nct -#Context=QuasselIRC - -[Desktop Entry] -Comment[]=A Next-Gen IRC Client -Exec=quasseltopia -Icon=/pics/quasselirc/qirc-icon.png -Type=Application -Name[]=QuasselTopia diff --git a/dev-notes/obsolete/qtopia/topicbar.cpp b/dev-notes/obsolete/qtopia/topicbar.cpp deleted file mode 100644 index 724817fa..00000000 --- a/dev-notes/obsolete/qtopia/topicbar.cpp +++ /dev/null @@ -1,129 +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 - -#include "topicbar.h" -#include "client.h" - - -TopicBar::TopicBar(QWidget *parent) : QPushButton(parent) { - setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred); - - // Define the font and calculate the metrics for it - topicFont = font(); - topicFont.setPointSize(5); - - // frameWidth = style()->pixelMetric(QStyle::PM_ButtonMargin); // Nice idea, but Qtopia's buttons are just too large... - frameWidth = 3; // so we hardcode a more reasonable framewidth than 7 - setFixedHeight(QFontMetrics(topicFont).height() + 2*frameWidth); - - textWidth = 0; - fillText = " *** "; - oneshot = true; - timer = new QTimer(this); - timer->setInterval(25); - connect(timer, SIGNAL(timeout()), this, SLOT(updateOffset())); - connect(this, SIGNAL(clicked()), this, SLOT(startScrolling())); - - _model = Client::bufferModel(); - connect(_model, SIGNAL(dataChanged(QModelIndex, QModelIndex)), - this, SLOT(dataChanged(QModelIndex, QModelIndex))); - - _selectionModel = Client::bufferModel()->standardSelectionModel(); - connect(_selectionModel, SIGNAL(currentChanged(QModelIndex, QModelIndex)), - this, SLOT(currentChanged(QModelIndex, QModelIndex))); -} - -TopicBar::~TopicBar() { - - -} - -void TopicBar::currentChanged(const QModelIndex ¤t, const QModelIndex &previous) { - Q_UNUSED(previous); - setContents(current.sibling(current.row(), 1).data().toString()); -} - -void TopicBar::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) { - QItemSelectionRange changedArea(topLeft, bottomRight); - QModelIndex currentTopicIndex = _selectionModel->currentIndex().sibling(_selectionModel->currentIndex().row(), 1); - if(changedArea.contains(currentTopicIndex)) - setContents(currentTopicIndex.data().toString()); -}; - -void TopicBar::resizeEvent(QResizeEvent *event) { - QPushButton::resizeEvent(event); - calcTextMetrics(); -} - -void TopicBar::calcTextMetrics() { - int w = width() - 2*frameWidth; - QRect boundingRect = QFontMetrics(topicFont).boundingRect(text); - textWidth = boundingRect.width(); - if(textWidth <= w) { - offset = 0; fillTextStart = -1; secondTextStart = -1; - displayText = text; - timer->stop(); - } else { - fillTextStart = textWidth; - boundingRect = QFontMetrics(topicFont).boundingRect(fillText); - secondTextStart = fillTextStart + boundingRect.width(); - displayText = QString("%1%2%1").arg(text).arg(fillText); - offset = 0; - //timer->start(); // uncomment this to get autoscroll rather than on-demand - } -} - -// TODO catch resizeEvent for scroll settings -void TopicBar::setContents(QString t, bool _oneshot) { - text = t; oneshot = _oneshot; - calcTextMetrics(); -} - -void TopicBar::paintEvent(QPaintEvent *event) { - QPushButton::paintEvent(event); - - QPainter painter(this); - painter.setFont(topicFont); - painter.setClipRect(frameWidth, frameWidth, rect().width() - 2*frameWidth, rect().height() - 2*frameWidth); - painter.drawText(QPoint(-offset + frameWidth, QFontMetrics(topicFont).ascent() + frameWidth), displayText); - -} - -void TopicBar::updateOffset() { - offset+=1; - if(offset >= secondTextStart) { - offset = 0; - if(oneshot) timer->stop(); // only scroll once! - } - update(); -} - -void TopicBar::startScrolling() { - if(displayText.length() > text.length()) { - //oneshot = false; - timer->start(); - } -} - -void TopicBar::stopScrolling() { - oneshot = true; -} diff --git a/dev-notes/obsolete/qtopia/topicbar.h b/dev-notes/obsolete/qtopia/topicbar.h deleted file mode 100644 index 9f00f53b..00000000 --- a/dev-notes/obsolete/qtopia/topicbar.h +++ /dev/null @@ -1,72 +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 TOPICBAR_H_ -#define TOPICBAR_H_ - -#include -#include - -#include "buffermodel.h" - -class QPixmap; -class QTimer; - -class TopicBar : public QPushButton { - Q_OBJECT - - public: - TopicBar(QWidget *parent = 0); - ~TopicBar(); - - public slots: - void setContents(QString text, bool oneshot = true); - void startScrolling(); - void stopScrolling(); - - protected: - virtual void paintEvent(QPaintEvent *event); - virtual void resizeEvent (QResizeEvent *event); - - - private slots: - void updateOffset(); - void dataChanged(const QModelIndex &, const QModelIndex &); - void currentChanged(const QModelIndex &, const QModelIndex &); - - private: - void calcTextMetrics(); - - BufferModel *_model; - QItemSelectionModel *_selectionModel; - - QTimer *timer; - int offset; - int fillTextStart, secondTextStart; - QString text, displayText; - QString fillText; - QFont topicFont; - int frameWidth; - int textWidth; - bool oneshot; -}; - - -#endif diff --git a/dev-notes/obsolete/qtopia/ui/aboutdlg.ui b/dev-notes/obsolete/qtopia/ui/aboutdlg.ui deleted file mode 100644 index 7caac93b..00000000 --- a/dev-notes/obsolete/qtopia/ui/aboutdlg.ui +++ /dev/null @@ -1,46 +0,0 @@ - - AboutDlg - - - - 0 - 0 - 240 - 271 - - - - About - - - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Trebuchet MS'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Quassel IRC</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt; font-weight:600;"><span style=" font-size:8pt; font-weight:400;">mobile edition</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:5pt;"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt;">(C) 2005-2007 by</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt; font-weight:600;">The Quassel IRC Team</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt;">Manuel Nickschas</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt;">Marcus Eggenberger</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt;">Marco Genise</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt;"><span style=" font-size:4pt;"> </span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt;">&lt;http://quassel-irc.org&gt;</p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:5pt;">&lt;devel@quassel-irc.org&gt;</p></body></html> - - - Qt::AlignCenter - - - true - - - - - - - - diff --git a/dev-notes/obsolete/qtopia/ui/bufferviewwidget.ui b/dev-notes/obsolete/qtopia/ui/bufferviewwidget.ui deleted file mode 100644 index c387cb09..00000000 --- a/dev-notes/obsolete/qtopia/ui/bufferviewwidget.ui +++ /dev/null @@ -1,39 +0,0 @@ - - BufferViewWidget - - - - 0 - 0 - 240 - 286 - - - - Select Buffer - - - - - - QTabWidget::South - - - QTabWidget::Rounded - - - 0 - - - - Tab 1 - - - - - - - - - - diff --git a/dev-notes/obsolete/qtopia/ui/coreaccounteditdlg.ui b/dev-notes/obsolete/qtopia/ui/coreaccounteditdlg.ui deleted file mode 100644 index edd642ee..00000000 --- a/dev-notes/obsolete/qtopia/ui/coreaccounteditdlg.ui +++ /dev/null @@ -1,120 +0,0 @@ - - CoreAccountEditDlg - - - - 0 - 0 - 193 - 241 - - - - Edit Core Account - - - - 6 - - - 9 - - - - - 0 - - - 6 - - - - - Port: - - - - - - - Host: - - - - - - - Password: - - - - - - - - - - - - - - - - Account: - - - - - - - QLineEdit::Password - - - - - - - 1024 - - - 65535 - - - 4242 - - - - - - - User: - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - accountEdit - hostEdit - port - userEdit - passwdEdit - - - - diff --git a/dev-notes/obsolete/qtopia/ui/coreconnectdlg.ui b/dev-notes/obsolete/qtopia/ui/coreconnectdlg.ui deleted file mode 100644 index 330ad558..00000000 --- a/dev-notes/obsolete/qtopia/ui/coreconnectdlg.ui +++ /dev/null @@ -1,149 +0,0 @@ - - CoreConnectDlg - - - - 0 - 0 - 188 - 283 - - - - - 0 - 0 - 0 - 0 - - - - Select Core Account - - - - - - false - - - - 9 - - - 6 - - - - - Available Quassel Core accounts: - - - Qt::PlainText - - - true - - - - - - - 0 - - - 6 - - - - - - - - 0 - - - 6 - - - - - ... - - - - - - - ... - - - :/default/edit_remove.png - - - - - - - ... - - - :/default/edit.png - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Connect - - - - - - - accountList - doConnect - newAccount - delAccount - editAccount - delAccount - editAccount - accountList - newAccount - - - - - - diff --git a/dev-notes/obsolete/qtopia/ui/coreconnectprogressdlg.ui b/dev-notes/obsolete/qtopia/ui/coreconnectprogressdlg.ui deleted file mode 100644 index 909f8227..00000000 --- a/dev-notes/obsolete/qtopia/ui/coreconnectprogressdlg.ui +++ /dev/null @@ -1,121 +0,0 @@ - - CoreConnectProgressDlg - - - - 0 - 0 - 168 - 212 - - - - Connection Progress - - - - - - Connecting to core... - - - Qt::AlignCenter - - - true - - - - - - - - - Session - - - - - - - 0 - - - Qt::Horizontal - - - %p% - - - - - - - Networks - - - - - - - 24 - - - %p% - - - - - - - Channels - - - - - - - 24 - - - %p% - - - - - - - Users - - - - - - - 24 - - - %p% - - - - - - - - - Qt::Vertical - - - - 138 - 51 - - - - - - - - - diff --git a/dev-notes/obsolete/qtopia/ui/editcoreacctdlg.ui b/dev-notes/obsolete/qtopia/ui/editcoreacctdlg.ui deleted file mode 100644 index 92207ea1..00000000 --- a/dev-notes/obsolete/qtopia/ui/editcoreacctdlg.ui +++ /dev/null @@ -1,120 +0,0 @@ - - EditCoreAcctDlg - - - - 0 - 0 - 193 - 241 - - - - Edit Core Account - - - - 9 - - - 6 - - - - - 0 - - - 6 - - - - - Port: - - - - - - - Host: - - - - - - - Password: - - - - - - - - - - - - - - - - Account: - - - - - - - QLineEdit::Password - - - - - - - 65535 - - - 1024 - - - 4242 - - - - - - - User: - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - accountEdit - hostEdit - port - userEdit - passwdEdit - - - - diff --git a/dev-notes/obsolete/qtopia/ui/mainwidget.ui b/dev-notes/obsolete/qtopia/ui/mainwidget.ui deleted file mode 100644 index a4c192a7..00000000 --- a/dev-notes/obsolete/qtopia/ui/mainwidget.ui +++ /dev/null @@ -1,104 +0,0 @@ - - MainWidget - - - - 0 - 0 - 240 - 320 - - - - Form - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 15 - - - - - - - - - - - 0 - - - - background-color: rgba(220, 220, 255, 40%) - - - - - - <html><head><meta name="qrichtext" content="1" /><style type="text/css"> -p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Trebuchet MS'; font-size:10pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:29pt; color:#00008b;">Quassel IRC</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:29pt; color:#7fff00;"><span style=" font-size:10pt; color:#00008b;">mobile edition</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:29pt; color:#483d8b;"><span style=" font-size:6pt; color:#000000;">Chat comfortably. Anywhere.</span></p></body></html> - - - true - - - Qt::AlignCenter - - - - - - - - - - - - - - - TopicBar - QPushButton -
topicbar.h
-
- - InputLine - QLineEdit -
inputline.h
-
-
- - inputLine - topicBar - - - -
diff --git a/dev-notes/obsolete/qtopia/ui/nicklistwidget.ui b/dev-notes/obsolete/qtopia/ui/nicklistwidget.ui deleted file mode 100644 index 2287049d..00000000 --- a/dev-notes/obsolete/qtopia/ui/nicklistwidget.ui +++ /dev/null @@ -1,28 +0,0 @@ - - NickListWidget - - - - 0 - 0 - 240 - 285 - - - - Nicks in Channel - - - - - - 0 - - - - - - - - - -- 2.20.1