+++ /dev/null
-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.
+++ /dev/null
-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
+++ /dev/null
-/***************************************************************************
- * 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 }
-};
-
-
+++ /dev/null
-<ui version="4.0" >
- <class>MainWindow</class>
- <widget class="QMainWindow" name="MainWindow" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>644</width>
- <height>566</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>MainWindow</string>
- </property>
- <widget class="QWidget" name="centralwidget" >
- <widget class="QDockWidget" name="dockWidget_3" >
- <property name="geometry" >
- <rect>
- <x>60</x>
- <y>80</y>
- <width>112</width>
- <height>329</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle" >
- <string>All Nets</string>
- </property>
- <widget class="QWidget" name="dockWidgetContents_3" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QTreeWidget" name="treeWidget_4" >
- <column>
- <property name="text" >
- <string>All Nets</string>
- </property>
- </column>
- <item>
- <property name="text" >
- <string>QuakeNet</string>
- </property>
- <item>
- <property name="text" >
- <string>Status</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Channels</string>
- </property>
- <item>
- <property name="text" >
- <string>#quassel</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>#quadaver</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>#lolage</string>
- </property>
- </item>
- </item>
- <item>
- <property name="text" >
- <string>Queries</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>DCC</string>
- </property>
- </item>
- </item>
- <item>
- <property name="text" >
- <string>IrcNet</string>
- </property>
- <item>
- <property name="text" >
- <string>Status</string>
- </property>
- </item>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </widget>
- <widget class="QMenuBar" name="menubar" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>644</width>
- <height>28</height>
- </rect>
- </property>
- <widget class="QMenu" name="menuExtensions" >
- <property name="title" >
- <string>Extensions</string>
- </property>
- </widget>
- <widget class="QMenu" name="menuAbout" >
- <property name="title" >
- <string>About</string>
- </property>
- </widget>
- <widget class="QMenu" name="menuViews" >
- <property name="title" >
- <string>Views</string>
- </property>
- <addaction name="actionAll_Nets" />
- </widget>
- <widget class="QMenu" name="menuOptions" >
- <property name="title" >
- <string>Settings</string>
- </property>
- </widget>
- <widget class="QMenu" name="menuFile" >
- <property name="title" >
- <string>Connection</string>
- </property>
- <addaction name="actionNets" />
- </widget>
- <addaction name="menuFile" />
- <addaction name="menuOptions" />
- <addaction name="menuViews" />
- <addaction name="menuExtensions" />
- <addaction name="menuAbout" />
- </widget>
- <widget class="QStatusBar" name="statusbar" />
- <widget class="QDockWidget" name="dockWidget" >
- <property name="windowTitle" >
- <string>QuakeNet</string>
- </property>
- <attribute name="dockWidgetArea" >
- <number>1</number>
- </attribute>
- <widget class="QWidget" name="dockWidgetContents" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QTreeWidget" name="treeWidget_2" >
- <column>
- <property name="text" >
- <string>QuakeNet</string>
- </property>
- </column>
- <item>
- <property name="text" >
- <string>Status</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Channels</string>
- </property>
- <item>
- <property name="text" >
- <string>#quassel</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>#quadaver</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>#faecherstadt ohne AE.. doh</string>
- </property>
- </item>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <widget class="QToolBar" name="toolBar" >
- <property name="contextMenuPolicy" >
- <enum>Qt::DefaultContextMenu</enum>
- </property>
- <property name="layoutDirection" >
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground" >
- <bool>false</bool>
- </property>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonTextUnderIcon</enum>
- </property>
- <attribute name="toolBarArea" >
- <number>2</number>
- </attribute>
- <addaction name="actionKickUser" />
- <addaction name="actionSetAway" />
- </widget>
- <widget class="QDockWidget" name="dockWidget_2" >
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle" >
- <string>IrcNet</string>
- </property>
- <attribute name="dockWidgetArea" >
- <number>1</number>
- </attribute>
- <widget class="QWidget" name="dockWidgetContents_2" >
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="0" column="0" >
- <widget class="QTreeWidget" name="treeWidget_3" >
- <column>
- <property name="text" >
- <string>IrcNet</string>
- </property>
- </column>
- <item>
- <property name="text" >
- <string>Status</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>Channels</string>
- </property>
- <item>
- <property name="text" >
- <string>#quassel</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>#quadaver</string>
- </property>
- </item>
- <item>
- <property name="text" >
- <string>#faecherstadt ohne AE.. doh</string>
- </property>
- </item>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <action name="actionKickUser" >
- <property name="icon" >
- <iconset>../../../../screenshot.png</iconset>
- </property>
- <property name="text" >
- <string>kickUser</string>
- </property>
- </action>
- <action name="actionSetAway" >
- <property name="text" >
- <string>setAway</string>
- </property>
- </action>
- <action name="actionAll_Nets" >
- <property name="text" >
- <string>All Nets</string>
- </property>
- </action>
- <action name="actionNets" >
- <property name="text" >
- <string>Nets</string>
- </property>
- </action>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-/***************************************************************************
- * 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<NetworkId>());
- addPage(tr("Chans"), BufferViewFilter::AllNets|BufferViewFilter::NoQueries|BufferViewFilter::NoServers, QList<NetworkId>());
- addPage(tr("Queries"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoServers, QList<NetworkId>());
- addPage(tr("Nets"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoQueries, QList<NetworkId>());
-
- // 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<NetworkId> &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();
-}
+++ /dev/null
-/***************************************************************************
- * 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<NetworkId> &nets);
- Ui::BufferViewWidget ui;
-
-};
-
-#endif
+++ /dev/null
-/***************************************************************************
- * 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 <QtCore>
-
-#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;
-}
+++ /dev/null
-/***************************************************************************
- * 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
+++ /dev/null
-/***************************************************************************
- * 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 <QDebug>
-#include <QtGui>
-#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<AbstractUiMsg *> &lines) {
- clear();
- QList<ChatLine *> list;
- foreach(AbstractUiMsg *msg, lines) list << static_cast<ChatLine*>(msg);
- appendChatLines(list);
-
-}
-
-void ChatWidget::prependMsg(AbstractUiMsg *msg) {
- ChatLine *line = static_cast<ChatLine*>(msg);
- Q_ASSERT(line);
- prependChatLine(line);
-}
-
-void ChatWidget::appendMsg(AbstractUiMsg *msg) {
- ChatLine *line = static_cast<ChatLine*>(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<ChatLine *> 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<ChatLine *> 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));
- }
-}
+++ /dev/null
-/***************************************************************************
- * 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 <QTextEdit>
-
-#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<AbstractUiMsg *> &);
- void appendMsg(AbstractUiMsg *);
- void prependMsg(AbstractUiMsg *);
-
- void prependChatLine(ChatLine *);
- void appendChatLine(ChatLine *);
- void prependChatLines(QList<ChatLine *>);
- void appendChatLines(QList<ChatLine *>);
-
- private:
- void insertChatLine(ChatLine *);
- void insertStyledText(const QtopiaUiStyle::StyledText &);
-
-};
-
-#endif
+++ /dev/null
-/***************************************************************************
- * 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 <QtGui>
-#include <QSoftMenuBar>
-
-#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<AccountId>(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<AccountId>(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<AccountId>(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<AccountId>();
- 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<AccountId>();
- int ret = QMessageBox::question(this, tr("Remove Account Settings"),
- tr("Do you really want to remove your local settings for this Quassel Core account?<br>"
- "Note: This will <em>not</em> 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<AccountId>();
- 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<AccountId>();
- 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();
-}
-
+++ /dev/null
-/***************************************************************************
- * 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 <QAbstractSocket>
-
-#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<AccountId, QVariantMap> 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
+++ /dev/null
-/***************************************************************************
- * 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/qtopiaapplication.h>
-
-QTOPIA_ADD_APPLICATION("Quassel IRC", QtopiaMainWin)
-QTOPIA_MAIN
-
+++ /dev/null
-/***************************************************************************
- * 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<AbstractChatView *>(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("<style type=\"text/css\">.foo { color: #777777; } .bar { font-style: italic }</style>"
- // "<div class=\"foo\">foo</div> <div class=\"bar\">bar</div> baz");
- //ui.chatWidget->moveCursor(QTextCursor::End);
- //ui.chatWidget->insertHtml("<div class=\"foo\"> brumm</div>");
-
- ChatWidget *chatWidget;
- if(!chatWidgets.contains(buf)) {
- chatWidget = new ChatWidget(this);
- QList<ChatLine *> lines;
- QList<AbstractUiMsg *> 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();
-}
+++ /dev/null
-/***************************************************************************
- * 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<BufferId, ChatWidget *> _chatViews;
- BufferInfo currentBufferInfo;
-
-};
-
-
-#endif
+++ /dev/null
-/***************************************************************************
- * 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();
- }
- */
-}
-
+++ /dev/null
-/***************************************************************************
- * 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 <QDialog>
-
-#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<Buffer *, NickView *> nickViews;
-
-};
-
-#endif
+++ /dev/null
-/***************************************************************************
- * 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 <Qtopia>
-#include <QSoftMenuBar>
-
-// 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();
-}
-
+++ /dev/null
-/***************************************************************************
- * 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 <QtGui>
-
-#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
+++ /dev/null
-/***************************************************************************
- * 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();
-}
+++ /dev/null
-/***************************************************************************
- * 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
+++ /dev/null
-/***************************************************************************
- * 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() {}
+++ /dev/null
-/***************************************************************************
- * 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
+++ /dev/null
-[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
+++ /dev/null
-/***************************************************************************
- * 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 <QtGui>
-
-#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;
-}
+++ /dev/null
-/***************************************************************************
- * 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 <QPushButton>
-#include <QTimeLine>
-
-#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
+++ /dev/null
-<ui version="4.0" >
- <class>AboutDlg</class>
- <widget class="QDialog" name="AboutDlg" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>240</width>
- <height>271</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>About</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string><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></string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-<ui version="4.0" >
- <class>BufferViewWidget</class>
- <widget class="QDialog" name="BufferViewWidget" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>240</width>
- <height>286</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Select Buffer</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="tabPosition" >
- <enum>QTabWidget::South</enum>
- </property>
- <property name="tabShape" >
- <enum>QTabWidget::Rounded</enum>
- </property>
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="tab" >
- <attribute name="title" >
- <string>Tab 1</string>
- </attribute>
- <layout class="QVBoxLayout" />
- </widget>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-<ui version="4.0" >
- <class>CoreAccountEditDlg</class>
- <widget class="QDialog" name="CoreAccountEditDlg" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>193</width>
- <height>241</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Edit Core Account</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>6</number>
- </property>
- <property name="margin" >
- <number>9</number>
- </property>
- <item>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="2" column="0" >
- <widget class="QLabel" name="portLabel" >
- <property name="text" >
- <string>Port:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="hostLabel" >
- <property name="text" >
- <string>Host:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="passwdLabel" >
- <property name="text" >
- <string>Password:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="hostEdit" />
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="accountEdit" />
- </item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="userEdit" />
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="accountLabel" >
- <property name="text" >
- <string>Account:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1" >
- <widget class="QLineEdit" name="passwdEdit" >
- <property name="echoMode" >
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QSpinBox" name="port" >
- <property name="minimum" >
- <number>1024</number>
- </property>
- <property name="maximum" >
- <number>65535</number>
- </property>
- <property name="value" >
- <number>4242</number>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QLabel" name="userLabel" >
- <property name="text" >
- <string>User:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <tabstops>
- <tabstop>accountEdit</tabstop>
- <tabstop>hostEdit</tabstop>
- <tabstop>port</tabstop>
- <tabstop>userEdit</tabstop>
- <tabstop>passwdEdit</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-<ui version="4.0" >
- <class>CoreConnectDlg</class>
- <widget class="QDialog" name="CoreConnectDlg" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>188</width>
- <height>283</height>
- </rect>
- </property>
- <property name="sizePolicy" >
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="windowTitle" >
- <string>Select Core Account</string>
- </property>
- <property name="windowIcon" >
- <iconset/>
- </property>
- <property name="modal" >
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QLabel" name="label_6" >
- <property name="text" >
- <string>Available Quassel Core accounts:</string>
- </property>
- <property name="textFormat" >
- <enum>Qt::PlainText</enum>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QListWidget" name="accountList" />
- </item>
- <item>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <widget class="QToolButton" name="newAccount" >
- <property name="text" >
- <string>...</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="delAccount" >
- <property name="text" >
- <string>...</string>
- </property>
- <property name="icon" >
- <iconset resource="../../images/icons.qrc" >:/default/edit_remove.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="editAccount" >
- <property name="text" >
- <string>...</string>
- </property>
- <property name="icon" >
- <iconset resource="../../images/icons.qrc" >:/default/edit.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="doConnect" >
- <property name="text" >
- <string>Connect</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <tabstops>
- <tabstop>accountList</tabstop>
- <tabstop>doConnect</tabstop>
- <tabstop>newAccount</tabstop>
- <tabstop>delAccount</tabstop>
- <tabstop>editAccount</tabstop>
- <tabstop>delAccount</tabstop>
- <tabstop>editAccount</tabstop>
- <tabstop>accountList</tabstop>
- <tabstop>newAccount</tabstop>
- </tabstops>
- <resources>
- <include location="../../images/icons.qrc" />
- </resources>
- <connections/>
-</ui>
+++ /dev/null
-<ui version="4.0" >
- <class>CoreConnectProgressDlg</class>
- <widget class="QDialog" name="CoreConnectProgressDlg" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>168</width>
- <height>212</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Connection Progress</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout" >
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Connecting to core...</string>
- </property>
- <property name="alignment" >
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap" >
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QGridLayout" name="gridLayout" >
- <item row="0" column="0" >
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Session</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QProgressBar" name="sessionProgress" >
- <property name="value" >
- <number>0</number>
- </property>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="format" >
- <string>%p%</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Networks</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QProgressBar" name="networksProgress" >
- <property name="value" >
- <number>24</number>
- </property>
- <property name="format" >
- <string>%p%</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Channels</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QProgressBar" name="channelsProgress" >
- <property name="value" >
- <number>24</number>
- </property>
- <property name="format" >
- <string>%p%</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
- <string>Users</string>
- </property>
- </widget>
- </item>
- <item row="3" column="1" >
- <widget class="QProgressBar" name="ircUsersProgress" >
- <property name="value" >
- <number>24</number>
- </property>
- <property name="format" >
- <string>%p%</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>138</width>
- <height>51</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-<ui version="4.0" >
- <class>EditCoreAcctDlg</class>
- <widget class="QDialog" name="EditCoreAcctDlg" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>193</width>
- <height>241</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Edit Core Account</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
- <number>9</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item>
- <layout class="QGridLayout" >
- <property name="margin" >
- <number>0</number>
- </property>
- <property name="spacing" >
- <number>6</number>
- </property>
- <item row="2" column="0" >
- <widget class="QLabel" name="portLabel" >
- <property name="text" >
- <string>Port:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QLabel" name="hostLabel" >
- <property name="text" >
- <string>Host:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" >
- <widget class="QLabel" name="passwdLabel" >
- <property name="text" >
- <string>Password:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="hostEdit" />
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="accountEdit" />
- </item>
- <item row="3" column="1" >
- <widget class="QLineEdit" name="userEdit" />
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="accountLabel" >
- <property name="text" >
- <string>Account:</string>
- </property>
- </widget>
- </item>
- <item row="4" column="1" >
- <widget class="QLineEdit" name="passwdEdit" >
- <property name="echoMode" >
- <enum>QLineEdit::Password</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QSpinBox" name="port" >
- <property name="maximum" >
- <number>65535</number>
- </property>
- <property name="minimum" >
- <number>1024</number>
- </property>
- <property name="value" >
- <number>4242</number>
- </property>
- </widget>
- </item>
- <item row="3" column="0" >
- <widget class="QLabel" name="userLabel" >
- <property name="text" >
- <string>User:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <tabstops>
- <tabstop>accountEdit</tabstop>
- <tabstop>hostEdit</tabstop>
- <tabstop>port</tabstop>
- <tabstop>userEdit</tabstop>
- <tabstop>passwdEdit</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-<ui version="4.0" >
- <class>MainWidget</class>
- <widget class="QWidget" name="MainWidget" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>240</width>
- <height>320</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Form</string>
- </property>
- <layout class="QVBoxLayout" >
- <property name="spacing" >
- <number>0</number>
- </property>
- <property name="leftMargin" >
- <number>0</number>
- </property>
- <property name="topMargin" >
- <number>0</number>
- </property>
- <property name="rightMargin" >
- <number>0</number>
- </property>
- <property name="bottomMargin" >
- <number>0</number>
- </property>
- <item>
- <widget class="TopicBar" name="topicBar" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Preferred" hsizetype="MinimumExpanding" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font" >
- <font>
- <pointsize>15</pointsize>
- </font>
- </property>
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QStackedWidget" name="stack" >
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="page" >
- <property name="styleSheet" >
- <string>background-color: rgba(220, 220, 255, 40%)</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string><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></string>
- </property>
- <property name="scaledContents" >
- <bool>true</bool>
- </property>
- <property name="alignment" >
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="InputLine" name="inputLine" />
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>TopicBar</class>
- <extends>QPushButton</extends>
- <header>topicbar.h</header>
- </customwidget>
- <customwidget>
- <class>InputLine</class>
- <extends>QLineEdit</extends>
- <header>inputline.h</header>
- </customwidget>
- </customwidgets>
- <tabstops>
- <tabstop>inputLine</tabstop>
- <tabstop>topicBar</tabstop>
- </tabstops>
- <resources/>
- <connections/>
-</ui>
+++ /dev/null
-<ui version="4.0" >
- <class>NickListWidget</class>
- <widget class="QDialog" name="NickListWidget" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>240</width>
- <height>285</height>
- </rect>
- </property>
- <property name="windowTitle" >
- <string>Nicks in Channel</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <widget class="QStackedWidget" name="stackedWidget" >
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="emptyPage" />
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>