virtual void process(QList<Message> &msgs) = 0;
signals:
+ void progressUpdated(int value, int maximum);
protected:
void postProcess(Message &msg);
inputwidget.cpp
jumpkeyhandler.cpp
mainwin.cpp
+ msgprocessorstatuswidget.cpp
nicklistwidget.cpp
qtui.cpp
qtuimessageprocessor.cpp
inputwidget.h
jumpkeyhandler.h
mainwin.h
+ msgprocessorstatuswidget.h
nicklistwidget.h
qtui.h
qtuimessageprocessor.h
debugconsole.ui
inputwidget.ui
mainwin.ui
+ msgprocessorstatuswidget.ui
nicklistwidget.ui
settingsdlg.ui
settingspagedlg.ui
#include "clientbacklogmanager.h"
#include "coreinfodlg.h"
#include "coreconnectdlg.h"
+#include "msgprocessorstatuswidget.h"
+#include "qtuimessageprocessor.h"
#include "networkmodel.h"
#include "buffermodel.h"
#include "nicklistwidget.h"
gui(_gui),
coreLagLabel(new QLabel()),
sslLabel(new QLabel()),
+ msgProcessorStatusWidget(new MsgProcessorStatusWidget()),
_titleSetter(this),
systray(new QSystemTrayIcon(this)),
activeTrayIcon(":/icons/quassel-icon-active.png"),
}
void MainWin::setupStatusBar() {
+ // MessageProcessor progress
+ statusBar()->addPermanentWidget(msgProcessorStatusWidget);
+ connect(Client::messageProcessor(), SIGNAL(progressUpdated(int, int)), msgProcessorStatusWidget, SLOT(setProgress(int, int)));
+
// Core Lag:
updateLagIndicator(0);
statusBar()->addPermanentWidget(coreLagLabel);
class CoreConnectDlg;
class Buffer;
class BufferViewConfig;
+class MsgProcessorStatusWidget;
class SettingsDlg;
class QtUi;
class Message;
QMenu *systrayMenu;
QLabel *coreLagLabel;
QLabel *sslLabel;
+ MsgProcessorStatusWidget *msgProcessorStatusWidget;
TitleSetter _titleSetter;
--- /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 "msgprocessorstatuswidget.h"
+
+MsgProcessorStatusWidget::MsgProcessorStatusWidget(QWidget *parent) : QWidget(parent) {
+ ui.setupUi(this);
+
+ hide();
+}
+
+void MsgProcessorStatusWidget::setProgress(int value, int max) {
+ if(max <= 0) {
+ hide();
+ } else {
+ if(isHidden()) show();
+ ui.progressBar->setMaximum(max);
+ ui.progressBar->setValue(value);
+ }
+}
--- /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 MSGPROCESSORSTATUSWIDGET_H_
+#define MSGPROCESSORSTATUSWIDGET_H_
+
+#include "ui_msgprocessorstatuswidget.h"
+
+class MsgProcessorStatusWidget : public QWidget {
+ Q_OBJECT
+
+ public:
+ MsgProcessorStatusWidget(QWidget *parent = 0);
+
+ public slots:
+ void setProgress(int value, int max);
+
+ private:
+ Ui::MsgProcessorStatusWidget ui;
+
+};
+
+#endif
--- /dev/null
+<ui version="4.0" >
+ <class>MsgProcessorStatusWidget</class>
+ <widget class="QWidget" name="MsgProcessorStatusWidget" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>229</width>
+ <height>26</height>
+ </rect>
+ </property>
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Maximum" hsizetype="Maximum" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="windowTitle" >
+ <string>Form</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <property name="leftMargin" >
+ <number>4</number>
+ </property>
+ <property name="topMargin" >
+ <number>0</number>
+ </property>
+ <property name="bottomMargin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Processing Messages</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QProgressBar" name="progressBar" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Maximum" hsizetype="Expanding" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="value" >
+ <number>24</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>