* Enabled Statistics for ApplicationWindow

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1037 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2009-02-12 00:30:40 +00:00
parent bcfb410ba4
commit 516b1684f9
6 changed files with 775 additions and 551 deletions

View file

@ -53,6 +53,7 @@
#include "MsgFeed.h" #include "MsgFeed.h"
#include "ChannelFeed.h" #include "ChannelFeed.h"
#include "LibraryDialog.h" #include "LibraryDialog.h"
#include "StatisticDialog.h"
/* for smplayer */ /* for smplayer */
@ -63,7 +64,7 @@
/* Images for toolbar icons */ /* Images for toolbar icons */
#define IMAGE_NETWORK ":/images/network32.png" #define IMAGE_NETWORK ":/images/network32.png"
#define IMAGE_PEERS ":/images/groupchat.png" #define IMAGE_PEERS ":/images/groupchat.png"
#define IMAGE_SEARCH ":/images/filefind.png" #define IMAGE_SEARCH ":/images/filefind.png"
#define IMAGE_TRANSFERS ":/images/ktorrent.png" #define IMAGE_TRANSFERS ":/images/ktorrent.png"
#define IMAGE_FILES ":/images/folder_green.png" #define IMAGE_FILES ":/images/folder_green.png"
#define IMAGE_FORUMS ":/images/konversation.png" #define IMAGE_FORUMS ":/images/konversation.png"
@ -72,7 +73,7 @@
#define IMAGE_CHAT ":/images/chats_24x24.png" #define IMAGE_CHAT ":/images/chats_24x24.png"
#define IMAGE_RETROSHARE ":/images/RetroShare16.png" #define IMAGE_RETROSHARE ":/images/RetroShare16.png"
#define IMAGE_ABOUT ":/images/informations_24x24.png" #define IMAGE_ABOUT ":/images/informations_24x24.png"
#define IMAGE_STATISTIC ":/images/utilities-system-monitor.png" #define IMAGE_STATISTIC ":/images/ksysguard32.png"
#define IMAGE_GAMES ":/images/kgames.png" #define IMAGE_GAMES ":/images/kgames.png"
#define IMAGE_PHOTO ":/images/lphoto.png" #define IMAGE_PHOTO ":/images/lphoto.png"
#define IMAGE_BWGRAPH ":/images/ksysguard.png" #define IMAGE_BWGRAPH ":/images/ksysguard.png"
@ -126,9 +127,9 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
//ui.stackPages->add(newsFeed = new NewsFeed(ui.stackPages), //ui.stackPages->add(newsFeed = new NewsFeed(ui.stackPages),
// createPageAction(QIcon(IMAGE_NEWSFEED), tr("News Feed"), grp)); // createPageAction(QIcon(IMAGE_NEWSFEED), tr("News Feed"), grp));
//PluginsPage *pluginsPage = NULL; StatisticDialog *statisticDialog = NULL;
//ui.stackPages->add(pluginsPage = new PluginsPage(ui.stackPages), ui.stackPages->add(statisticDialog = new StatisticDialog(ui.stackPages),
// createPageAction(QIcon(IMAGE_PLUGINS), tr("Plugins"), grp)); createPageAction(QIcon(IMAGE_STATISTIC), tr("Statistics"), grp));
PeersFeed *peersFeed = NULL; PeersFeed *peersFeed = NULL;
ui.stackPages->add(peersFeed = new PeersFeed(ui.stackPages), ui.stackPages->add(peersFeed = new PeersFeed(ui.stackPages),

View file

@ -17,226 +17,224 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#include "rshare.h"
#include "StatisticDialog.h"
//#include <control/bandwidthevent.h>
/** Constructor */
StatisticDialog::StatisticDialog(QWidget *parent)
: MainPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create Bandwidth Graph related QObjects */
_settings = new RshareSettings();
/* Bind events to actions */
createActions();
/* Ask Tor to notify us about bandwidth updates */
// _torControl = Vidalia::torControl();
// _torControl->setEvent(TorEvents::Bandwidth, this, true);
/* Initialize Sent/Receive data counters */
reset();
/* Hide Bandwidth Graph Settings frame */
showSettingsFrame(false);
/* Turn off opacity group on unsupported platforms */
#if defined(Q_WS_WIN)
if(!(QSysInfo::WV_2000 <= QSysInfo::WindowsVersion <= QSysInfo::WV_2003)) {
ui.frmOpacity->setVisible(false);
}
#endif
#if defined(Q_WS_X11)
ui.frmOpacity->setVisible(false);
#endif
}
/** Default destructor */
StatisticDialog::~StatisticDialog() #include "rshare.h"
{ #include "StatisticDialog.h"
delete _settings; //#include <control/bandwidthevent.h>
#include "rsiface/rsiface.h"
/** Constructor */
StatisticDialog::StatisticDialog(QWidget *parent)
: MainPage(parent)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
/* Create Bandwidth Graph related QObjects */
_settings = new RshareSettings();
/* Bind events to actions */
createActions();
/* Initialize Sent/Receive data counters */
reset();
/* Hide Bandwidth Graph Settings frame */
showSettingsFrame(false);
/* Turn off opacity group on unsupported platforms */
#if defined(Q_WS_WIN)
if(!(QSysInfo::WV_2000 <= QSysInfo::WindowsVersion <= QSysInfo::WV_2003)) {
ui.frmOpacity->setVisible(false);
}
#endif
#if defined(Q_WS_X11)
ui.frmOpacity->setVisible(false);
#endif
QTimer *timer = new QTimer(this);
timer->connect(timer, SIGNAL(timeout()), this, SLOT(updategraph2status()));
timer->start(5113);
} }
/** /** Default destructor */
Custom event handler. Checks if the event is a bandwidth update event. If it StatisticDialog::~StatisticDialog()
is, it will add the data point to the history and updates the graph. {
delete _settings;
void }
StatisticDialog::customEvent(QEvent *event)
{ /**
if (event->type() == CustomEventType::BandwidthEvent) { Custom event handler. Checks if the event is a bandwidth update event. If it
BandwidthEvent *bw = (BandwidthEvent *)event; is, it will add the data point to the history and updates the graph.
updateGraph(bw->bytesRead(), bw->bytesWritten());
} void
}*/ StatisticDialog::customEvent(QEvent *event)
{
/** if (event->type() == CustomEventType::BandwidthEvent) {
Binds events to actions BandwidthEvent *bw = (BandwidthEvent *)event;
*/ updateGraph(bw->bytesRead(), bw->bytesWritten());
void }
StatisticDialog::createActions() }*/
{
connect(ui.btnToggleSettings, SIGNAL(toggled(bool)), /**
this, SLOT(showSettingsFrame(bool))); Binds events to actions
*/
connect(ui.btnReset, SIGNAL(clicked()), void
this, SLOT(reset())); StatisticDialog::createActions()
{
connect(ui.btnSaveSettings, SIGNAL(clicked()), connect(ui.btnToggleSettings, SIGNAL(toggled(bool)),
this, SLOT(saveChanges())); this, SLOT(showSettingsFrame(bool)));
connect(ui.btnCancelSettings, SIGNAL(clicked()), connect(ui.btnReset, SIGNAL(clicked()),
this, SLOT(cancelChanges())); this, SLOT(reset()));
connect(ui.sldrOpacity, SIGNAL(valueChanged(int)), connect(ui.btnSaveSettings, SIGNAL(clicked()),
this, SLOT(setOpacity(int))); this, SLOT(saveChanges()));
}
connect(ui.btnCancelSettings, SIGNAL(clicked()),
/** this, SLOT(cancelChanges()));
Adds new data to the graph
*/ connect(ui.sldrOpacity, SIGNAL(valueChanged(int)),
void this, SLOT(setOpacity(int)));
StatisticDialog::updateGraph(quint64 bytesRead, quint64 bytesWritten) }
{
/* Graph only cares about kilobytes */ /**
ui.frmGraph->addPoints(bytesRead/1024.0, bytesWritten/1024.0); Adds new data to the graph
} */
void
/** StatisticDialog::updateGraph(quint64 bytesRead, quint64 bytesWritten)
Loads the saved Bandwidth Graph settings {
*/ /* Graph only cares about kilobytes */
void ui.frmGraph->addPoints(bytesRead, bytesWritten);
StatisticDialog::loadSettings() }
{
/* Set window opacity slider widget */ void
ui.sldrOpacity->setValue(_settings->getBWGraphOpacity()); StatisticDialog::updategraph2status( )
{
/* set users/friends/network */
float downKb = 0;
/* Set the line filter checkboxes accordingly */ float upKb = 0;
uint filter = _settings->getBWGraphFilter(); rsicontrol -> ConfigGetDataRates(downKb, upKb);
ui.chkReceiveRate->setChecked(filter & BWGRAPH_REC);
ui.chkSendRate->setChecked(filter & BWGRAPH_SEND); updateGraph(downKb,upKb);
/* Set graph frame settings */ }
ui.frmGraph->setShowCounters(ui.chkReceiveRate->isChecked(),
ui.chkSendRate->isChecked()); /**
} Loads the saved Bandwidth Graph settings
*/
/** void
Resets the log start time StatisticDialog::loadSettings()
*/ {
void /* Set window opacity slider widget */
StatisticDialog::reset() ui.sldrOpacity->setValue(_settings->getBWGraphOpacity());
{
/* Set to current time */
// ui.statusbar->showMessage(tr("Since:") + " " +
// QDateTime::currentDateTime() /* Set the line filter checkboxes accordingly */
// .toString(DATETIME_FMT)); uint filter = _settings->getBWGraphFilter();
/* Reset the graph */ ui.chkReceiveRate->setChecked(filter & BWGRAPH_REC);
ui.frmGraph->resetGraph(); ui.chkSendRate->setChecked(filter & BWGRAPH_SEND);
}
/* Set graph frame settings */
/** ui.frmGraph->setShowCounters(ui.chkReceiveRate->isChecked(),
Saves the Bandwidth Graph settings and adjusts the graph if necessary ui.chkSendRate->isChecked());
*/ }
void
StatisticDialog::saveChanges() /**
{ Resets the log start time
/* Hide the settings frame and reset toggle button */ */
showSettingsFrame(false); void
StatisticDialog::reset()
/* Save the opacity */ {
_settings->setBWGraphOpacity(ui.sldrOpacity->value()); /* Set to current time */
// ui.statusbar->showMessage(tr("Since:") + " " +
// QDateTime::currentDateTime()
// .toString(DATETIME_FMT));
/* Save the line filter values */ /* Reset the graph */
_settings->setBWGraphFilter(BWGRAPH_REC, ui.chkReceiveRate->isChecked()); ui.frmGraph->resetGraph();
_settings->setBWGraphFilter(BWGRAPH_SEND, ui.chkSendRate->isChecked()); }
/* Update the graph frame settings */ /**
ui.frmGraph->setShowCounters(ui.chkReceiveRate->isChecked(), Saves the Bandwidth Graph settings and adjusts the graph if necessary
ui.chkSendRate->isChecked()); */
void
/* A change in window flags causes the window to disappear, so make sure StatisticDialog::saveChanges()
* it's still visible. */ {
showNormal(); /* Hide the settings frame and reset toggle button */
} showSettingsFrame(false);
/** /* Save the opacity */
Simply restores the previously saved settings _settings->setBWGraphOpacity(ui.sldrOpacity->value());
*/
void
StatisticDialog::cancelChanges()
{ /* Save the line filter values */
/* Hide the settings frame and reset toggle button */ _settings->setBWGraphFilter(BWGRAPH_REC, ui.chkReceiveRate->isChecked());
showSettingsFrame(false); _settings->setBWGraphFilter(BWGRAPH_SEND, ui.chkSendRate->isChecked());
/* Reload the settings */ /* Update the graph frame settings */
loadSettings(); ui.frmGraph->setShowCounters(ui.chkReceiveRate->isChecked(),
} ui.chkSendRate->isChecked());
/** /* A change in window flags causes the window to disappear, so make sure
Toggles the Settings pane on and off, changes toggle button text * it's still visible. */
*/ showNormal();
void }
StatisticDialog::showSettingsFrame(bool show)
{ /**
if (show) { Simply restores the previously saved settings
ui.frmSettings->setVisible(true); */
ui.btnToggleSettings->setChecked(true); void
ui.btnToggleSettings->setText(tr("Hide Settings")); StatisticDialog::cancelChanges()
} else { {
ui.frmSettings->setVisible(false); /* Hide the settings frame and reset toggle button */
ui.btnToggleSettings->setChecked(false); showSettingsFrame(false);
ui.btnToggleSettings->setText(tr("Show Settings"));
} /* Reload the settings */
} loadSettings();
}
/**
Sets the opacity of the Bandwidth Graph window /**
*/ Toggles the Settings pane on and off, changes toggle button text
void */
StatisticDialog::setOpacity(int value) void
{ StatisticDialog::showSettingsFrame(bool show)
qreal newValue = value / 100.0; {
if (show) {
/* Opacity only supported by Mac and Win32 */ ui.frmSettings->setVisible(true);
#if defined(Q_WS_MAC) ui.btnToggleSettings->setChecked(true);
this->setWindowOpacity(newValue); ui.btnToggleSettings->setText(tr("Hide Settings"));
#elif defined(Q_WS_WIN) } else {
if(QSysInfo::WV_2000 <= QSysInfo::WindowsVersion <= QSysInfo::WV_2003) { ui.frmSettings->setVisible(false);
this->setWindowOpacity(newValue); ui.btnToggleSettings->setChecked(false);
} ui.btnToggleSettings->setText(tr("Show Settings"));
#else }
Q_UNUSED(newValue); }
#endif
} /**
Sets the opacity of the Bandwidth Graph window
/** */
Overloads the default show() slot so we can set opacity void
StatisticDialog::setOpacity(int value)
void {
StatisticDialog::show() qreal newValue = value / 100.0;
{
loadSettings(); /* Opacity only supported by Mac and Win32 */
if(!this->isVisible()) { #if defined(Q_WS_MAC)
QMainWindow::show(); this->setWindowOpacity(newValue);
} else { #elif defined(Q_WS_WIN)
QMainWindow::activateWindow(); if(QSysInfo::WV_2000 <= QSysInfo::WindowsVersion <= QSysInfo::WV_2003) {
setWindowState(windowState() & ~Qt::WindowMinimized | Qt::WindowActive); this->setWindowOpacity(newValue);
QMainWindow::raise(); }
} #else
} Q_UNUSED(newValue);
*/ #endif
}

View file

@ -17,38 +17,40 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, * Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA. * Boston, MA 02110-1301, USA.
****************************************************************/ ****************************************************************/
#ifndef _STATISTICDIALOG_H #ifndef _STATISTICDIALOG_H
#define _STATISTICDIALOG_H #define _STATISTICDIALOG_H
#include <QFileDialog> #include <QFileDialog>
#include <QDateTime> #include <QDateTime>
//#include <QEvent> //#include <QEvent>
#include <QTimer>
#include <gui/Preferences/rsharesettings.h>
#include <gui/Preferences/rsharesettings.h>
#include "mainpage.h"
#include "mainpage.h"
#include "ui_StatisticDialog.h" #include "ui_StatisticDialog.h"
#include "linetypes.h" #include "linetypes.h"
/** Redraw graph every 1000ms **/ /** Redraw graph every 1000ms **/
#define REFRESH_RATE 1000 #define REFRESH_RATE 1000
class StatisticDialog : public MainPage class StatisticDialog : public MainPage
{ {
Q_OBJECT Q_OBJECT
public: public:
/** Default Constructor */ /** Default Constructor */
StatisticDialog(QWidget *parent = 0); StatisticDialog(QWidget *parent = 0);
/** Default Destructor */ /** Default Destructor */
~StatisticDialog(); ~StatisticDialog();
protected: protected:
/** Called to deliver a bandwidth update event from Tor. */ /** Called to deliver a bandwidth update event from Tor. */
// void customEvent(QEvent *event); // void customEvent(QEvent *event);
private slots: private slots:
/** Adds new data to the graph */ /** Adds new data to the graph */
void updateGraph(quint64 bytesRead, quint64 bytesWritten); void updateGraph(quint64 bytesRead, quint64 bytesWritten);
/** Called when settings button is toggled */ /** Called when settings button is toggled */
@ -60,9 +62,12 @@ private slots:
/** Called when the user cancels changes settings */ /** Called when the user cancels changes settings */
void cancelChanges(); void cancelChanges();
/** Called when the reset button is pressed */ /** Called when the reset button is pressed */
void reset(); void reset();
private: void updategraph2status();
private:
/** Create and bind actions to events **/ /** Create and bind actions to events **/
void createActions(); void createActions();
/** Loads the saved Bandwidth Graph settings */ /** Loads the saved Bandwidth Graph settings */
@ -72,10 +77,10 @@ private:
// TorControl* _torControl; // TorControl* _torControl;
/** A VidaliaSettings object that handles getting/saving settings */ /** A VidaliaSettings object that handles getting/saving settings */
RshareSettings* _settings; RshareSettings* _settings;
/** Qt Designer generated object */ /** Qt Designer generated object */
Ui::StatisticDialog ui; Ui::StatisticDialog ui;
}; };
#endif #endif

View file

@ -1,279 +1,480 @@
<ui version="4.0" > <ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>StatisticDialog</class> <class>StatisticDialog</class>
<widget class="QWidget" name="StatisticDialog" > <widget class="QWidget" name="StatisticDialog" >
<property name="geometry" > <property name="geometry" >
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>400</width> <width>701</width>
<height>300</height> <height>449</height>
</rect> </rect>
</property> </property>
<property name="palette" > <property name="palette" >
<palette> <palette>
<active> <active>
<color> <colorrole role="WindowText" >
<red>0</red> <brush brushstyle="SolidPattern" >
<green>0</green> <color alpha="255" >
<blue>0</blue> <red>0</red>
</color> <green>0</green>
<color> <blue>0</blue>
<red>208</red> </color>
<green>208</green> </brush>
<blue>208</blue> </colorrole>
</color> <colorrole role="Button" >
<color> <brush brushstyle="SolidPattern" >
<red>255</red> <color alpha="255" >
<green>255</green> <red>208</red>
<blue>255</blue> <green>208</green>
</color> <blue>208</blue>
<color> </color>
<red>247</red> </brush>
<green>247</green> </colorrole>
<blue>247</blue> <colorrole role="Light" >
</color> <brush brushstyle="SolidPattern" >
<color> <color alpha="255" >
<red>104</red> <red>255</red>
<green>104</green> <green>255</green>
<blue>104</blue> <blue>255</blue>
</color> </color>
<color> </brush>
<red>139</red> </colorrole>
<green>139</green> <colorrole role="Midlight" >
<blue>139</blue> <brush brushstyle="SolidPattern" >
</color> <color alpha="255" >
<color> <red>247</red>
<red>0</red> <green>247</green>
<green>0</green> <blue>247</blue>
<blue>0</blue> </color>
</color> </brush>
<color> </colorrole>
<red>255</red> <colorrole role="Dark" >
<green>255</green> <brush brushstyle="SolidPattern" >
<blue>255</blue> <color alpha="255" >
</color> <red>104</red>
<color> <green>104</green>
<red>0</red> <blue>104</blue>
<green>0</green> </color>
<blue>0</blue> </brush>
</color> </colorrole>
<color> <colorrole role="Mid" >
<red>255</red> <brush brushstyle="SolidPattern" >
<green>255</green> <color alpha="255" >
<blue>255</blue> <red>139</red>
</color> <green>139</green>
<color> <blue>139</blue>
<red>240</red> </color>
<green>240</green> </brush>
<blue>240</blue> </colorrole>
</color> <colorrole role="Text" >
<color> <brush brushstyle="SolidPattern" >
<red>0</red> <color alpha="255" >
<green>0</green> <red>0</red>
<blue>0</blue> <green>0</green>
</color> <blue>0</blue>
<color> </color>
<red>0</red> </brush>
<green>0</green> </colorrole>
<blue>128</blue> <colorrole role="BrightText" >
</color> <brush brushstyle="SolidPattern" >
<color> <color alpha="255" >
<red>255</red> <red>255</red>
<green>255</green> <green>255</green>
<blue>255</blue> <blue>255</blue>
</color> </color>
<color> </brush>
<red>0</red> </colorrole>
<green>0</green> <colorrole role="ButtonText" >
<blue>255</blue> <brush brushstyle="SolidPattern" >
</color> <color alpha="255" >
<color> <red>0</red>
<red>255</red> <green>0</green>
<green>0</green> <blue>0</blue>
<blue>255</blue> </color>
</color> </brush>
<color> </colorrole>
<red>231</red> <colorrole role="Base" >
<green>231</green> <brush brushstyle="SolidPattern" >
<blue>231</blue> <color alpha="255" >
</color> <red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</active> </active>
<inactive> <inactive>
<color> <colorrole role="WindowText" >
<red>0</red> <brush brushstyle="SolidPattern" >
<green>0</green> <color alpha="255" >
<blue>0</blue> <red>0</red>
</color> <green>0</green>
<color> <blue>0</blue>
<red>208</red> </color>
<green>208</green> </brush>
<blue>208</blue> </colorrole>
</color> <colorrole role="Button" >
<color> <brush brushstyle="SolidPattern" >
<red>255</red> <color alpha="255" >
<green>255</green> <red>208</red>
<blue>255</blue> <green>208</green>
</color> <blue>208</blue>
<color> </color>
<red>247</red> </brush>
<green>247</green> </colorrole>
<blue>247</blue> <colorrole role="Light" >
</color> <brush brushstyle="SolidPattern" >
<color> <color alpha="255" >
<red>104</red> <red>255</red>
<green>104</green> <green>255</green>
<blue>104</blue> <blue>255</blue>
</color> </color>
<color> </brush>
<red>139</red> </colorrole>
<green>139</green> <colorrole role="Midlight" >
<blue>139</blue> <brush brushstyle="SolidPattern" >
</color> <color alpha="255" >
<color> <red>247</red>
<red>0</red> <green>247</green>
<green>0</green> <blue>247</blue>
<blue>0</blue> </color>
</color> </brush>
<color> </colorrole>
<red>255</red> <colorrole role="Dark" >
<green>255</green> <brush brushstyle="SolidPattern" >
<blue>255</blue> <color alpha="255" >
</color> <red>104</red>
<color> <green>104</green>
<red>0</red> <blue>104</blue>
<green>0</green> </color>
<blue>0</blue> </brush>
</color> </colorrole>
<color> <colorrole role="Mid" >
<red>255</red> <brush brushstyle="SolidPattern" >
<green>255</green> <color alpha="255" >
<blue>255</blue> <red>139</red>
</color> <green>139</green>
<color> <blue>139</blue>
<red>240</red> </color>
<green>240</green> </brush>
<blue>240</blue> </colorrole>
</color> <colorrole role="Text" >
<color> <brush brushstyle="SolidPattern" >
<red>0</red> <color alpha="255" >
<green>0</green> <red>0</red>
<blue>0</blue> <green>0</green>
</color> <blue>0</blue>
<color> </color>
<red>192</red> </brush>
<green>192</green> </colorrole>
<blue>192</blue> <colorrole role="BrightText" >
</color> <brush brushstyle="SolidPattern" >
<color> <color alpha="255" >
<red>0</red> <red>255</red>
<green>0</green> <green>255</green>
<blue>0</blue> <blue>255</blue>
</color> </color>
<color> </brush>
<red>0</red> </colorrole>
<green>0</green> <colorrole role="ButtonText" >
<blue>255</blue> <brush brushstyle="SolidPattern" >
</color> <color alpha="255" >
<color> <red>0</red>
<red>255</red> <green>0</green>
<green>0</green> <blue>0</blue>
<blue>255</blue> </color>
</color> </brush>
<color> </colorrole>
<red>231</red> <colorrole role="Base" >
<green>231</green> <brush brushstyle="SolidPattern" >
<blue>231</blue> <color alpha="255" >
</color> <red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>192</red>
<green>192</green>
<blue>192</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</inactive> </inactive>
<disabled> <disabled>
<color> <colorrole role="WindowText" >
<red>104</red> <brush brushstyle="SolidPattern" >
<green>104</green> <color alpha="255" >
<blue>104</blue> <red>104</red>
</color> <green>104</green>
<color> <blue>104</blue>
<red>208</red> </color>
<green>208</green> </brush>
<blue>208</blue> </colorrole>
</color> <colorrole role="Button" >
<color> <brush brushstyle="SolidPattern" >
<red>255</red> <color alpha="255" >
<green>255</green> <red>208</red>
<blue>255</blue> <green>208</green>
</color> <blue>208</blue>
<color> </color>
<red>247</red> </brush>
<green>247</green> </colorrole>
<blue>247</blue> <colorrole role="Light" >
</color> <brush brushstyle="SolidPattern" >
<color> <color alpha="255" >
<red>104</red> <red>255</red>
<green>104</green> <green>255</green>
<blue>104</blue> <blue>255</blue>
</color> </color>
<color> </brush>
<red>139</red> </colorrole>
<green>139</green> <colorrole role="Midlight" >
<blue>139</blue> <brush brushstyle="SolidPattern" >
</color> <color alpha="255" >
<color> <red>247</red>
<red>104</red> <green>247</green>
<green>104</green> <blue>247</blue>
<blue>104</blue> </color>
</color> </brush>
<color> </colorrole>
<red>255</red> <colorrole role="Dark" >
<green>255</green> <brush brushstyle="SolidPattern" >
<blue>255</blue> <color alpha="255" >
</color> <red>104</red>
<color> <green>104</green>
<red>104</red> <blue>104</blue>
<green>104</green> </color>
<blue>104</blue> </brush>
</color> </colorrole>
<color> <colorrole role="Mid" >
<red>240</red> <brush brushstyle="SolidPattern" >
<green>240</green> <color alpha="255" >
<blue>240</blue> <red>139</red>
</color> <green>139</green>
<color> <blue>139</blue>
<red>240</red> </color>
<green>240</green> </brush>
<blue>240</blue> </colorrole>
</color> <colorrole role="Text" >
<color> <brush brushstyle="SolidPattern" >
<red>0</red> <color alpha="255" >
<green>0</green> <red>104</red>
<blue>0</blue> <green>104</green>
</color> <blue>104</blue>
<color> </color>
<red>0</red> </brush>
<green>0</green> </colorrole>
<blue>128</blue> <colorrole role="BrightText" >
</color> <brush brushstyle="SolidPattern" >
<color> <color alpha="255" >
<red>255</red> <red>255</red>
<green>255</green> <green>255</green>
<blue>255</blue> <blue>255</blue>
</color> </color>
<color> </brush>
<red>0</red> </colorrole>
<green>0</green> <colorrole role="ButtonText" >
<blue>255</blue> <brush brushstyle="SolidPattern" >
</color> <color alpha="255" >
<color> <red>104</red>
<red>255</red> <green>104</green>
<green>0</green> <blue>104</blue>
<blue>255</blue> </color>
</color> </brush>
<color> </colorrole>
<red>231</red> <colorrole role="Base" >
<green>231</green> <brush brushstyle="SolidPattern" >
<blue>231</blue> <color alpha="255" >
</color> <red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Window" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>240</red>
<green>240</green>
<blue>240</blue>
</color>
</brush>
</colorrole>
<colorrole role="Shadow" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
<colorrole role="Highlight" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>128</blue>
</color>
</brush>
</colorrole>
<colorrole role="HighlightedText" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>255</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="Link" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>0</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="LinkVisited" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>255</red>
<green>0</green>
<blue>255</blue>
</color>
</brush>
</colorrole>
<colorrole role="AlternateBase" >
<brush brushstyle="SolidPattern" >
<color alpha="255" >
<red>231</red>
<green>231</green>
<blue>231</blue>
</color>
</brush>
</colorrole>
</disabled> </disabled>
</palette> </palette>
</property> </property>
@ -292,18 +493,30 @@
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="margin" >
<number>9</number>
</property>
<item> <item>
<widget class="QSplitter" name="splitter" > <widget class="QSplitter" name="splitter" >
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<widget class="QTreeWidget" name="treeWidget" > <widget class="QTreeWidget" name="treeWidget" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeIncrement" >
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<column> <column>
<property name="text" > <property name="text" >
<string>Statistics</string> <string>Statistics</string>
@ -314,7 +527,8 @@
<string>Download</string> <string>Download</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" >:/images/downloads_24x24.png</iconset> <iconset>
<normaloff>:/images/downloads_24x24.png</normaloff>:/images/downloads_24x24.png</iconset>
</property> </property>
<item> <item>
<property name="text" > <property name="text" >
@ -357,7 +571,8 @@
<string>Upload</string> <string>Upload</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" >:/images/uploads_24x24.png</iconset> <iconset>
<normaloff>:/images/uploads_24x24.png</normaloff>:/images/uploads_24x24.png</iconset>
</property> </property>
<item> <item>
<property name="text" > <property name="text" >
@ -400,7 +615,8 @@
<string>Connections:</string> <string>Connections:</string>
</property> </property>
<property name="icon" > <property name="icon" >
<iconset resource="images.qrc" >:/images/connections_24x24.png</iconset> <iconset>
<normaloff>:/images/connections_24x24.png</normaloff>:/images/connections_24x24.png</iconset>
</property> </property>
<item> <item>
<property name="text" > <property name="text" >
@ -490,6 +706,12 @@
</item> </item>
</widget> </widget>
<widget class="QFrame" name="frame" > <widget class="QFrame" name="frame" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape" > <property name="frameShape" >
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
@ -497,14 +719,14 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="margin" >
<number>9</number>
</property>
<item> <item>
<widget class="GraphFrame" name="frmGraph" > <widget class="GraphFrame" native="1" name="frmGraph" >
<property name="minimumSize" > <property name="minimumSize" >
<size> <size>
<width>120</width> <width>120</width>
@ -529,12 +751,12 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="margin" >
<number>0</number>
</property>
<item> <item>
<widget class="QPushButton" name="btnToggleSettings" > <widget class="QPushButton" name="btnToggleSettings" >
<property name="text" > <property name="text" >
@ -550,7 +772,7 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0" >
<size> <size>
<width>21</width> <width>21</width>
<height>20</height> <height>20</height>
@ -570,9 +792,7 @@
<item> <item>
<widget class="QFrame" name="frmSettings" > <widget class="QFrame" name="frmSettings" >
<property name="sizePolicy" > <property name="sizePolicy" >
<sizepolicy> <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
<hsizetype>0</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch> <horstretch>0</horstretch>
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
@ -599,20 +819,20 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<property name="margin" >
<number>9</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="margin" >
<number>9</number>
</property>
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="margin" >
<number>3</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>6</number> <number>6</number>
</property> </property>
<property name="margin" >
<number>3</number>
</property>
<item> <item>
<widget class="QCheckBox" name="chkReceiveRate" > <widget class="QCheckBox" name="chkReceiveRate" >
<property name="font" > <property name="font" >
@ -702,7 +922,7 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0" >
<size> <size>
<width>20</width> <width>20</width>
<height>21</height> <height>21</height>
@ -724,18 +944,18 @@
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>3</number> <number>3</number>
</property> </property>
<property name="margin" >
<number>0</number>
</property>
<item> <item>
<layout class="QHBoxLayout" > <layout class="QHBoxLayout" >
<property name="margin" > <property name="spacing" >
<number>0</number> <number>0</number>
</property> </property>
<property name="spacing" > <property name="margin" >
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
@ -833,7 +1053,7 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0" >
<size> <size>
<width>20</width> <width>20</width>
<height>20</height> <height>20</height>
@ -849,7 +1069,7 @@
<property name="orientation" > <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" > <property name="sizeHint" stdset="0" >
<size> <size>
<width>21</width> <width>21</width>
<height>20</height> <height>20</height>
@ -859,12 +1079,12 @@
</item> </item>
<item> <item>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<property name="margin" >
<number>0</number>
</property>
<property name="spacing" > <property name="spacing" >
<number>1</number> <number>1</number>
</property> </property>
<property name="margin" >
<number>0</number>
</property>
<item> <item>
<widget class="QPushButton" name="btnSaveSettings" > <widget class="QPushButton" name="btnSaveSettings" >
<property name="text" > <property name="text" >
@ -890,14 +1110,12 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<pixmapfunction></pixmapfunction>
<customwidgets> <customwidgets>
<customwidget> <customwidget>
<class>GraphFrame</class> <class>GraphFrame</class>
<extends>QWidget</extends> <extends>QWidget</extends>
<header>gui/graphframe.h</header> <header>gui/graphframe.h</header>
<container>1</container> <container>1</container>
<pixmap></pixmap>
</customwidget> </customwidget>
</customwidgets> </customwidgets>
<resources> <resources>

View file

@ -183,6 +183,7 @@
<file>images/konversation.png</file> <file>images/konversation.png</file>
<file>images/konversation16.png</file> <file>images/konversation16.png</file>
<file>images/ksysguard.png</file> <file>images/ksysguard.png</file>
<file>images/ksysguard32.png</file>
<file>images/ktorrent.png</file> <file>images/ktorrent.png</file>
<file>images/ktorrent32.png</file> <file>images/ktorrent32.png</file>
<file>images/knewsticker24.png</file> <file>images/knewsticker24.png</file>
@ -209,6 +210,7 @@
<file>images/message-mail.png</file> <file>images/message-mail.png</file>
<file>images/message-mail-read.png</file> <file>images/message-mail-read.png</file>
<file>images/message-mail-imapdelete.png</file> <file>images/message-mail-imapdelete.png</file>
<file>images/message-mail-replied-read.png</file>
<file>images/message-news.png</file> <file>images/message-news.png</file>
<file>images/message.png</file> <file>images/message.png</file>
<file>images/messenger.png</file> <file>images/messenger.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB