src/plugins
src/plugins/plugin.h
src/qtopia
+src/qtopia/bufferviewwidget.cpp
+src/qtopia/bufferviewwidget.h
src/qtopia/chatline.cpp
src/qtopia/chatline.h
src/qtopia/chatwidget.cpp
src/qtopia/topicbar.h
src/qtopia/ui
src/qtopia/ui/bufferview.ui
+src/qtopia/ui/bufferviewwidget.ui
src/qtopia/ui/coreconnectdlg.ui
src/qtopia/ui/coreconnectprogressdlg.ui
src/qtopia/ui/editcoreacctdlg.ui
--- /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 "bufferviewwidget.h"
+#include "client.h"
+
+
+BufferViewWidget::BufferViewWidget(QWidget *parent) : QDialog(parent) {
+ ui.setupUi(this);
+ setModal(true);
+ setStyleSheet("background-color: rgba(255, 255, 255, 40%); 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("Bufs"), BufferViewFilter::AllNets, QList<uint>());
+ addPage(tr("Chans"), BufferViewFilter::AllNets|BufferViewFilter::NoQueries|BufferViewFilter::NoServers, QList<uint>());
+ addPage(tr("Queries"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoServers, QList<uint>());
+ addPage(tr("Nets"), BufferViewFilter::AllNets|BufferViewFilter::NoChannels|BufferViewFilter::NoQueries, QList<uint>());
+
+ connect(Client::bufferModel(), SIGNAL(bufferSelected(Buffer *)), this, SLOT(accept()));
+
+}
+
+BufferViewWidget::~BufferViewWidget() {
+
+
+}
+
+void BufferViewWidget::addPage(const QString &title, const BufferViewFilter::Modes &mode, const QList<uint> &nets) {
+ BufferView *view = new BufferView(ui.tabWidget);
+ view->setFilteredModel(Client::bufferModel(), mode, nets);
+ Client::bufferModel()->synchronizeView(view);
+ ui.tabWidget->addTab(view, title);
+}
--- /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 _BUFFERVIEWWIDGET_H_
+#define _BUFFERVIEWWIDGET_H_
+
+#include "ui_bufferviewwidget.h"
+
+#include "bufferview.h"
+
+class BufferViewWidget : public QDialog {
+ Q_OBJECT
+
+
+ public:
+ BufferViewWidget(QWidget *parent = 0);
+ ~BufferViewWidget();
+
+
+ private:
+ void addPage(const QString &title, const BufferViewFilter::Modes &mode, const QList<uint> &nets);
+ Ui::BufferViewWidget ui;
+
+};
+
+#endif
DEPMOD = uisupport common client
QT_MOD = core gui network
-HDRS += chatline.h chatwidget.h coreconnectdlg.h mainwidget.h qtopiaui.h qtopiamainwin.h qtopiauistyle.h topicbar.h
-SRCS += chatline.cpp chatwidget.cpp coreconnectdlg.cpp main.cpp mainwidget.cpp qtopiaui.cpp qtopiamainwin.cpp qtopiauistyle.cpp topicbar.cpp
-FRMS += ui/coreconnectdlg.ui ui/coreconnectprogressdlg.ui ui/editcoreacctdlg.ui ui/mainwidget.ui
+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
#include "qtopiamainwin.h"
#include "buffertreemodel.h"
+#include "bufferviewwidget.h"
#include "chatline.h"
#include "coreconnectdlg.h"
#include "global.h"
mainWidget = new MainWidget(this);
setCentralWidget(mainWidget);
- QToolBar *toolBar = new QToolBar(this);
+ BufferTreeModel *model = Client::bufferModel();
+ connect(model, SIGNAL(bufferSelected(Buffer *)), this, SLOT(showBuffer(Buffer *)));
+
+ toolBar = new QToolBar(this);
toolBar->setIconSize(QSize(16, 16));
- toolBar->addAction(QIcon(":icon/trash"), "Trash");
addToolBar(toolBar);
+ bufferViewWidget = new BufferViewWidget(this);
+
+ setupActions();
+
init();
//gui->init();
QtopiaMainWin::~QtopiaMainWin() {
+}
+
+void QtopiaMainWin::setupActions() {
+ showBuffersAction = toolBar->addAction(QIcon(":icon/options-hide"), "Show Buffers", this, SLOT(showBufferView())); // FIXME provide real icon
+
+
}
void QtopiaMainWin::connectedToCore() {
mainWidget->setBuffer(b);
}
+
+void QtopiaMainWin::showBufferView() {
+ bufferViewWidget->showMaximized();
+
+}
+
+
#include "client.h"
#include "global.h"
+class BufferViewWidget;
class MainWidget;
class QtopiaMainWin : public QMainWindow {
private slots:
void showBuffer(Buffer *);
+ void showBufferView();
private:
void init();
+ void setupActions();
MainWidget *mainWidget;
+ QToolBar *toolBar;
+ QAction *showBuffersAction;
+ BufferViewWidget *bufferViewWidget;
friend class QtopiaUi;
};
--- /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::Triangular</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>