There are also some new files related to the nicklist, which don't do much yet though.
src/common/message.h
src/common/networkinfo.cpp
src/common/networkinfo.h
+src/common/nickmodel.cpp
+src/common/nickmodel.h
src/common/settings.cpp
src/common/settings.h
src/common/signalproxy.cpp
src/common/signalproxy.h
src/common/synchronizer.cpp
src/common/synchronizer.h
+src/common/types.h
src/common/util.cpp
src/common/util.h
src/core
src/qtopia/main.cpp
src/qtopia/mainwidget.cpp
src/qtopia/mainwidget.h
+src/qtopia/nicklistwidget.cpp
+src/qtopia/nicklistwidget.h
src/qtopia/qtopia.pri
src/qtopia/qtopiamainwin.cpp
src/qtopia/qtopiamainwin.h
src/qtopia/qtopiauistyle.h
src/qtopia/topicbar.cpp
src/qtopia/topicbar.h
+src/qtopia/types.h
src/qtopia/ui
src/qtopia/ui/bufferview.ui
src/qtopia/ui/bufferviewwidget.ui
#include "client.h"
-#include "networkinfo.h"
-#include "ircuser.h"
-#include "ircchannel.h"
-
-#include "message.h"
-
#include "bufferinfo.h"
#include "buffertreemodel.h"
+#include "global.h"
+#include "ircchannel.h"
+#include "ircuser.h"
+#include "message.h"
+#include "networkinfo.h"
#include "quasselui.h"
#include "signalproxy.h"
#include "util.h"
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include "global.h"
#include "treemodel.h"
/*****************************************
DEPMOD =
QT_MOD = network
-SRCS += global.cpp logger.cpp message.cpp settings.cpp signalproxy.cpp util.cpp networkinfo.cpp ircuser.cpp ircchannel.cpp bufferinfo.cpp
-HDRS += global.h logger.h message.h settings.h signalproxy.h util.h networkinfo.h ircuser.h ircchannel.h bufferinfo.h
+SRCS += bufferinfo.cpp global.cpp logger.cpp message.cpp nickmodel.cpp settings.cpp signalproxy.cpp util.cpp networkinfo.cpp ircuser.cpp ircchannel.cpp
+HDRS += bufferinfo.h global.h logger.h message.h nickmodel.h settings.h signalproxy.h util.h networkinfo.h ircuser.h ircchannel.h types.h
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <QObject>
-#include <QStringList>
#include "global.h"
#include "logger.h"
-#include "message.h"
-#include "util.h"
extern void messageHandler(QtMsgType type, const char *msg);
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+// This file needs probably to go away at some point. Not much left anymore.
+
#ifndef _GLOBAL_H_
#define _GLOBAL_H_
/** The protocol version we use fo the communication between core and GUI */
#define GUI_PROTOCOL 3
-#define BACKLOG_FORMAT 2
-#define BACKLOG_STRING "QuasselIRC Backlog File"
-
#define DEFAULT_PORT 4242
-#include <QHash>
-#include <QMutex>
-#include <QString>
-#include <QVariant>
-
/* Some global stuff */
-typedef uint UserId;
-typedef uint MsgId;
-typedef uint BufferId;
-typedef uint NetworkId;
-
namespace Global {
enum RunMode { Monolithic, ClientOnly, CoreOnly };
extern RunMode runMode;
}
-struct Exception {
- Exception(QString msg = "Unknown Exception") : _msg(msg) {};
- virtual ~Exception() {}; // make gcc happy
- virtual inline QString msg() { return _msg; }
-
- protected:
- QString _msg;
-
-};
-
#endif
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+#include "global.h"
#include "settings.h"
#include <QString>
#include <QTranslator>
#ifndef _MESSAGE_H_
#define _MESSAGE_H_
-#include <QCoreApplication>
#include <QString>
#include <QDateTime>
#include "bufferinfo.h"
-#include "global.h"
+#include "types.h"
class Message {
Q_DECLARE_TR_FUNCTIONS(Message);
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-07 by the Quassel IRC 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. *
+ ***************************************************************************/
+
+#include "nickmodel.h"
+
+
+NickModel::NickModel(QObject *parent) : QAbstractListModel(parent) {
+ //QStringList list; list << "test1" << "test2";
+ //setStringList(list);
+
+}
+
+NickModel::~NickModel() {
+
+
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-07 by the Quassel IRC 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. *
+ ***************************************************************************/
+
+#ifndef _NICKMODEL_H_
+#define _NICKMODEL_H_
+
+#include <QAbstractListModel>
+
+class NickModel : public QAbstractListModel {
+ Q_OBJECT
+
+ public:
+ NickModel(QObject *parent = 0);
+ ~NickModel();
+
+ private:
+
+};
+
+#endif
#include <QTcpSocket>
#include "global.h"
+#include "types.h"
class CoreSession;
class Storage;
#ifndef CORESETTINGS_H_
#define CORESETTINGS_H_
-#include "settings.h"
#include "global.h"
+#include "settings.h"
class CoreSettings : public Settings {
Q_OBJECT
QString SqliteStorage::backlogFile(bool createPath) {
// kinda ugly, but I currently see no other way to do that
-#ifdef _WINDOWS
+#ifdef Q_OS_WIN32
QString quasselDir = QDir::homePath() + qgetenv("APPDATA") + "\\quassel\\";
#else
QString quasselDir = QDir::homePath() + "/.quassel/";
ChatWidget::ChatWidget(QWidget *parent) : QTextEdit(parent) {
setStyleSheet("background-color: rgba(255, 255, 255, 60%)");
+ setTextInteractionFlags(Qt::TextBrowserInteraction);
}
void ChatWidget::setContents(QList<ChatLine *> lines) {
#include <QSoftMenuBar>
#include "coreconnectdlg.h"
-#include "global.h"
#include "client.h"
#include "clientsettings.h"
+#include "global.h"
CoreConnectDlg::CoreConnectDlg(QWidget *parent, bool /*doAutoConnect*/) : QDialog(parent) {
ui.setupUi(this);
#include "ui_coreconnectdlg.h"
#include "ui_coreconnectprogressdlg.h"
#include "ui_editcoreacctdlg.h"
-#include "global.h"
class CoreConnectProgressDlg;
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-07 by the Quassel IRC 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. *
+ ***************************************************************************/
+
+#include "nicklistwidget.h"
+#include "nickmodel.h"
+
+NickListWidget::NickListWidget(QWidget *parent) : QDialog(parent) {
+ ui.setupUi(this);
+
+
+
+}
+
+NickListWidget::~NickListWidget() {
+
+
+
+}
+
+void NickListWidget::setNickModel(NickModel *model) {
+ ui.nickView->setModel(model);
+
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-07 by the Quassel IRC 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. *
+ ***************************************************************************/
+
+#ifndef _NICKLISTWIDGET_H_
+#define _NICKLISTWIDGET_H_
+
+#include <QDialog>
+
+#include "ui_nicklistwidget.h"
+
+class NickModel;
+
+class NickListWidget : public QDialog {
+ Q_OBJECT
+
+ public:
+ NickListWidget(QWidget *parent = 0);
+ ~NickListWidget();
+
+ public slots:
+ void setNickModel(NickModel *model);
+
+ private:
+ Ui::NickListWidget ui;
+
+};
+
+#endif
DEPMOD = uisupport common client
QT_MOD = core gui network
-HDRS += bufferviewwidget.h chatline.h chatwidget.h coreconnectdlg.h mainwidget.h qtopiaui.h qtopiamainwin.h qtopiauistyle.h topicbar.h
-SRCS += bufferviewwidget.cpp chatline.cpp chatwidget.cpp coreconnectdlg.cpp main.cpp mainwidget.cpp qtopiaui.cpp qtopiamainwin.cpp qtopiauistyle.cpp topicbar.cpp
-FRMS += ui/bufferviewwidget.ui ui/coreconnectdlg.ui ui/coreconnectprogressdlg.ui ui/editcoreacctdlg.ui ui/mainwidget.ui
+HDRS += bufferviewwidget.h chatline.h chatwidget.h coreconnectdlg.h mainwidget.h nicklistwidget.h \
+ qtopiaui.h qtopiamainwin.h qtopiauistyle.h topicbar.h
+SRCS += bufferviewwidget.cpp chatline.cpp chatwidget.cpp coreconnectdlg.cpp main.cpp mainwidget.cpp nicklistwidget.cpp \
+ qtopiaui.cpp qtopiamainwin.cpp qtopiauistyle.cpp topicbar.cpp
+FRMS += ui/bufferviewwidget.ui ui/coreconnectdlg.ui ui/coreconnectprogressdlg.ui ui/editcoreacctdlg.ui ui/mainwidget.ui ui/nicklistwidget.ui
#include "buffertreemodel.h"
#include "bufferviewwidget.h"
+#include "nicklistwidget.h"
#include "chatline.h"
#include "coreconnectdlg.h"
#include "global.h"
addToolBar(toolBar);
bufferViewWidget = new BufferViewWidget(this);
+ nickListWidget = new NickListWidget(this);
setupActions();
void QtopiaMainWin::setupActions() {
showBuffersAction = toolBar->addAction(QIcon(":icon/options-hide"), "Show Buffers", this, SLOT(showBufferView())); // FIXME provide real icon
-
+ showNicksAction = toolBar->addAction(QIcon(":icon/list"), "Show Nicks", this, SLOT(showNickList()));
}
void QtopiaMainWin::showBuffer(Buffer *b) {
mainWidget->setBuffer(b);
+ //nickListWidget->
}
}
+void QtopiaMainWin::showNickList() {
+ nickListWidget->showMaximized();
+}
+
#include <QtGui>
#include "client.h"
-#include "global.h"
class BufferViewWidget;
class MainWidget;
+class NickListWidget;
class QtopiaMainWin : public QMainWindow {
Q_OBJECT
private slots:
void showBuffer(Buffer *);
void showBufferView();
+ void showNickList();
private:
void init();
MainWidget *mainWidget;
QToolBar *toolBar;
- QAction *showBuffersAction;
+ QAction *showBuffersAction, *showNicksAction;
BufferViewWidget *bufferViewWidget;
+ NickListWidget *nickListWidget;
friend class QtopiaUi;
};
--- /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>286</height>
+ </rect>
+ </property>
+ <property name="windowTitle" >
+ <string>Nicks in Channel</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <property name="leftMargin" >
+ <number>1</number>
+ </property>
+ <property name="topMargin" >
+ <number>1</number>
+ </property>
+ <property name="rightMargin" >
+ <number>1</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>1</number>
+ </property>
+ <item>
+ <widget class="QListView" name="nickView" />
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
#include "ui_bufferwidget.h"
#include "chatview.h"
-#include "global.h"
+#include "types.h"
class Buffer;
class ChatView;
#include <QtGui>
#include "coreconnectdlg.h"
-#include "global.h"
#include "client.h"
#include "clientsettings.h"
#include "configwizard.h"
+#include "global.h"
CoreConnectDlg::CoreConnectDlg(QWidget *parent, bool /*doAutoConnect*/) : QDialog(parent) {
ui.setupUi(this); //qDebug() << "new dlg";
#define _CORECONNECTDLG_H
#include "ui_coreconnectdlg.h"
-#include "global.h"
class CoreConnectDlg: public QDialog {
Q_OBJECT
#include <QtGui>
#include <QtCore>
-#include "global.h"
#include "ui_identitiesdlg.h"
#include "ui_identitieseditdlg.h"
#include "ui_nickeditdlg.h"
#include <QMap>
#include <QList>
#include <QVariant>
-#include "global.h"
#include "ui_serverlistdlg.h"
#include "ui_networkeditdlg.h"