first modifications to improve BW graph

This commit is contained in:
csoler 2021-01-30 00:03:10 +01:00
parent e0ed60ee6f
commit 60893e2344
7 changed files with 385 additions and 462 deletions

View File

@ -180,7 +180,8 @@ public:
void setFiltering(bool b) ; void setFiltering(bool b) ;
void setFlags(uint32_t flag) { _flags |= flag ; } uint32_t getFlags() const { return _flags ; }
void setFlags(uint32_t flag) { _flags |= flag ; }
void resetFlags(uint32_t flag) { _flags &= ~flag ; } void resetFlags(uint32_t flag) { _flags &= ~flag ; }
protected: protected:
/** Overloaded QWidget::paintEvent() */ /** Overloaded QWidget::paintEvent() */

View File

@ -181,6 +181,7 @@
<file>images/go-bottom.png</file> <file>images/go-bottom.png</file>
<file>images/graph-area.png</file> <file>images/graph-area.png</file>
<file>images/graph-line.png</file> <file>images/graph-line.png</file>
<file>images/graph-line-inverted.png</file>
<file>images/gpgp_key_generate.png</file> <file>images/gpgp_key_generate.png</file>
<file>images/hide_toolbox_frame.png</file> <file>images/hide_toolbox_frame.png</file>
<file>images/hide_frame.png</file> <file>images/hide_frame.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -48,7 +48,7 @@ public:
enum { SELECTOR_TYPE_FRIEND=0x00, SELECTOR_TYPE_SERVICE=0x01 }; enum { SELECTOR_TYPE_FRIEND=0x00, SELECTOR_TYPE_SERVICE=0x01 };
enum { GRAPH_TYPE_SINGLE=0x00, GRAPH_TYPE_ALL=0x01, GRAPH_TYPE_SUM=0x02 }; enum { GRAPH_TYPE_SINGLE=0x00, GRAPH_TYPE_ALL=0x01, GRAPH_TYPE_SUM=0x02 };
enum { UNIT_KILOBYTES=0x00, UNIT_COUNT=0x01 }; enum { UNIT_KILOBYTES=0x00, UNIT_COUNT=0x01 };
enum { DIRECTION_UP=0x00, DIRECTION_DOWN=0x01 }; enum { DIRECTION_UP=0x02, DIRECTION_DOWN=0x01 };
// re-derived from RSGraphSource // re-derived from RSGraphSource

View File

@ -19,11 +19,13 @@
* * * *
*******************************************************************************/ *******************************************************************************/
#include <rshare.h> #include "rshare.h"
#include <control/bandwidthevent.h> #include "control/bandwidthevent.h"
#include <gui/statistics/BandwidthGraphWindow.h> #include "gui/statistics/BandwidthGraphWindow.h"
#include <retroshare-gui/RsAutoUpdatePage.h> #include "gui/common/FilesDefs.h"
#include <retroshare/rsconfig.h> #include "util/misc.h"
#include "retroshare-gui/RsAutoUpdatePage.h"
#include "retroshare/rsconfig.h"
#include <iomanip> #include <iomanip>
#include <unistd.h> #include <unistd.h>
@ -51,6 +53,12 @@
/* Images used in the graph style drop-down */ /* Images used in the graph style drop-down */
#define IMG_AREA_GRAPH ":/images/16x16/graph-area.png" #define IMG_AREA_GRAPH ":/images/16x16/graph-area.png"
#define IMG_LINE_GRAPH ":/images/16x16/graph-line.png" #define IMG_LINE_GRAPH ":/images/16x16/graph-line.png"
#define IMG_SETTINGS ":/icons/system_128.png"
#define IMG_CLEANUP ":/images/global_switch_off.png"
#define IMG_SEND ":/images/go-up.png"
#define IMG_RECEIVE ":/images/go-down.png"
#define IMG_GRAPH_DARK ":/images/graph-line.png"
#define IMG_GRAPH_LIGHT ":/images/graph-line-inverted.png"
/** Default constructor */ /** Default constructor */
@ -65,9 +73,6 @@ BandwidthGraph::BandwidthGraph(QWidget *parent, Qt::WindowFlags flags)
setShortcut("Ctrl+W", SLOT(close())); setShortcut("Ctrl+W", SLOT(close()));
#endif #endif
/* Bind events to actions */
createActions();
/* Ask RetroShare core to notify us about bandwidth updates */ /* Ask RetroShare core to notify us about bandwidth updates */
//_rsControl = RetroShare::rsControl(); //_rsControl = RetroShare::rsControl();
//_rsControl->setEvent(REvents::Bandwidth, this, true); //_rsControl->setEvent(REvents::Bandwidth, this, true);
@ -77,7 +82,6 @@ BandwidthGraph::BandwidthGraph(QWidget *parent, Qt::WindowFlags flags)
/* Hide Bandwidth Graph Settings frame */ /* Hide Bandwidth Graph Settings frame */
showSettingsFrame(false); showSettingsFrame(false);
/* Load the previously saved settings */ /* Load the previously saved settings */
loadSettings();
/* Turn off opacity group on unsupported platforms */ /* Turn off opacity group on unsupported platforms */
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)
@ -88,18 +92,63 @@ BandwidthGraph::BandwidthGraph(QWidget *parent, Qt::WindowFlags flags)
#if defined(Q_OS_LINUX) #if defined(Q_OS_LINUX)
ui.frmOpacity->setVisible(false); ui.frmOpacity->setVisible(false);
ui.chkAlwaysOnTop->setVisible(false);
ui.btnToggleSettings->setVisible(false); // this is only windows settings anyway
#endif #endif
ui.btnToggleSettings->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_SETTINGS));
ui.btnToggleSettings->setText("");
ui.btnReset->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_CLEANUP));
ui.btnReset->setText("");
ui.chkSendRate->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_SEND));
ui.chkSendRate->setText("");
ui.chkReceiveRate->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_RECEIVE));
ui.chkReceiveRate->setText("");
ui.frmGraph->setToolTip("Use Ctrl+mouse wheel to change line width, Shift+wheel to time-filter the curve.");
loadSettings();
connect(ui.btnToggleSettings,SIGNAL(toggled(bool)),this,SLOT(showSettingsFrame(bool)));
connect(ui.btnReset, SIGNAL(clicked()), this, SLOT(reset()));
connect(ui.sldrOpacity, SIGNAL(valueChanged(int)), this, SLOT(setOpacity(int)));
connect(ui.btnGraphColor, SIGNAL(clicked()), this, SLOT(switchGraphColor()));
connect(ui.chkSendRate, SIGNAL(toggled(bool)), this, SLOT(toggleSendRate(bool)));
connect(ui.chkReceiveRate, SIGNAL(toggled(bool)), this, SLOT(toggleReceiveRate(bool)));
} }
/** Binds events to actions. */ void BandwidthGraph::toggleSendRate(bool b)
void
BandwidthGraph::createActions()
{ {
connect(ui.btnToggleSettings, SIGNAL(toggled(bool)), this, SLOT(showSettingsFrame(bool))); whileBlocking(ui.chkReceiveRate)->setChecked(!b);
connect(ui.btnReset, SIGNAL(clicked()), this, SLOT(reset()));
connect(ui.btnSaveSettings, SIGNAL(clicked()), this, SLOT(saveChanges())); if(b)
connect(ui.btnCancelSettings, SIGNAL(clicked()), this, SLOT(cancelChanges())); ui.frmGraph->setDirection(BWGraphSource::DIRECTION_UP) ;
connect(ui.sldrOpacity, SIGNAL(valueChanged(int)), this, SLOT(setOpacity(int))); else
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_DOWN) ;
}
void BandwidthGraph::toggleReceiveRate(bool b)
{
whileBlocking(ui.chkSendRate)->setChecked(!b);
if(b)
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_DOWN) ;
else
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_UP) ;
}
void BandwidthGraph::switchGraphColor()
{
if(ui.frmGraph->getFlags() & RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE)
{
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
ui.btnGraphColor->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_GRAPH_LIGHT));
}
else
{
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
ui.btnGraphColor->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_GRAPH_DARK));
}
} }
/** Loads the saved Bandwidth Graph settings. */ /** Loads the saved Bandwidth Graph settings. */
@ -110,15 +159,6 @@ BandwidthGraph::loadSettings()
ui.sldrOpacity->setValue(getSetting(SETTING_OPACITY, DEFAULT_OPACITY).toInt()); ui.sldrOpacity->setValue(getSetting(SETTING_OPACITY, DEFAULT_OPACITY).toInt());
setOpacity(ui.sldrOpacity->value()); setOpacity(ui.sldrOpacity->value());
/* Set whether the window appears on top. */
ui.chkAlwaysOnTop->setChecked(getSetting(SETTING_ALWAYS_ON_TOP, DEFAULT_ALWAYS_ON_TOP).toBool());
if (ui.chkAlwaysOnTop->isChecked()) {
setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
} else {
setWindowFlags(windowFlags() & ~Qt::WindowStaysOnTopHint);
}
/* Set the line filter checkboxes accordingly */ /* Set the line filter checkboxes accordingly */
uint filter = getSetting(SETTING_FILTER, DEFAULT_FILTER).toUInt(); uint filter = getSetting(SETTING_FILTER, DEFAULT_FILTER).toUInt();
ui.chkReceiveRate->setChecked(filter & BWGRAPH_LINE_RECV); ui.chkReceiveRate->setChecked(filter & BWGRAPH_LINE_RECV);
@ -127,10 +167,10 @@ BandwidthGraph::loadSettings()
/* Set whether we are plotting bandwidth as area graphs or not */ /* Set whether we are plotting bandwidth as area graphs or not */
int graphStyle = getSetting(SETTING_STYLE, DEFAULT_STYLE).toInt(); int graphStyle = getSetting(SETTING_STYLE, DEFAULT_STYLE).toInt();
if (graphStyle < 0 || graphStyle >= ui.cmbGraphStyle->count()) { // if (graphStyle < 0 || graphStyle >= ui.cmbGraphStyle->count()) {
graphStyle = DEFAULT_STYLE; // graphStyle = DEFAULT_STYLE;
} // }
ui.cmbGraphStyle->setCurrentIndex(graphStyle); // ui.cmbGraphStyle->setCurrentIndex(graphStyle);
if(graphStyle==0) if(graphStyle==0)
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN); ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN);
@ -140,28 +180,37 @@ BandwidthGraph::loadSettings()
/* Set whether we are plotting bandwidth as area graphs or not */ /* Set whether we are plotting bandwidth as area graphs or not */
int graphColor = getSetting(SETTING_GRAPHCOLOR, DEFAULT_GRAPHCOLOR).toInt(); int graphColor = getSetting(SETTING_GRAPHCOLOR, DEFAULT_GRAPHCOLOR).toInt();
if (graphColor < 0 || graphColor >= ui.cmbGraphColor->count()) { if(graphColor>0)
graphColor = DEFAULT_GRAPHCOLOR; {
}
ui.cmbGraphColor->setCurrentIndex(graphColor);
if(graphColor==0)
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE); ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
ui.btnGraphColor->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_GRAPH_DARK));
}
else else
{
ui.btnGraphColor->setIcon(FilesDefs::getIconFromQtResourcePath(IMG_GRAPH_LIGHT));
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE); ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
}
/* Download & Upload */ /* Download & Upload */
int defaultdirection = getSetting(SETTING_DIRECTION, DEFAULT_DIRECTION).toInt(); int defaultdirection = getSetting(SETTING_DIRECTION, DEFAULT_DIRECTION).toInt();
// if (defaultdirection < 0 || defaultdirection >= ui.cmbDownUp->count()) {
// defaultdirection = DEFAULT_DIRECTION;
// }
// ui.cmbDownUp->setCurrentIndex(graphColor);
if (defaultdirection < 0 || defaultdirection >= ui.cmbDownUp->count()) { if(defaultdirection>0)
defaultdirection = DEFAULT_DIRECTION; {
}
ui.cmbDownUp->setCurrentIndex(graphColor);
if(defaultdirection==0)
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_UP) ;
else
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_DOWN) ; ui.frmGraph->setDirection(BWGraphSource::DIRECTION_DOWN) ;
whileBlocking(ui.chkSendRate)->setChecked(false);
whileBlocking(ui.chkReceiveRate)->setChecked(true);
}
else
{
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_UP) ;
whileBlocking(ui.chkSendRate)->setChecked(true);
whileBlocking(ui.chkReceiveRate)->setChecked(false);
}
/* Default Settings for the Graph */ /* Default Settings for the Graph */
ui.frmGraph->setSelector(BWGraphSource::SELECTOR_TYPE_FRIEND,BWGraphSource::GRAPH_TYPE_SUM) ; ui.frmGraph->setSelector(BWGraphSource::SELECTOR_TYPE_FRIEND,BWGraphSource::GRAPH_TYPE_SUM) ;
@ -172,13 +221,11 @@ BandwidthGraph::loadSettings()
ui.frmGraph->setShowEntry(1,ui.chkSendRate->isChecked()) ; ui.frmGraph->setShowEntry(1,ui.chkSendRate->isChecked()) ;
} }
/** Resets the log start time. */ /** Resets the log start time. */
void BandwidthGraph::reset() void BandwidthGraph::reset()
{ {
/* Set to current time */ /* Set to current time */
ui.statusbar->showMessage(tr("Since:") + " " + QDateTime::currentDateTime() .toString(DATETIME_FMT)); ui.displayTime_LB->setText(tr("Since:") + " " + QDateTime::currentDateTime() .toString(DATETIME_FMT));
/* Reset the graph */ /* Reset the graph */
ui.frmGraph->resetGraph(); ui.frmGraph->resetGraph();
} }
@ -191,8 +238,8 @@ void BandwidthGraph::saveChanges()
/* Save the opacity and graph style */ /* Save the opacity and graph style */
saveSetting(SETTING_OPACITY, ui.sldrOpacity->value()); saveSetting(SETTING_OPACITY, ui.sldrOpacity->value());
saveSetting(SETTING_STYLE, ui.cmbGraphStyle->currentIndex()); // saveSetting(SETTING_STYLE, ui.cmbGraphStyle->currentIndex());
saveSetting(SETTING_GRAPHCOLOR, ui.cmbGraphColor->currentIndex()); saveSetting(SETTING_GRAPHCOLOR, ui.btnGraphColor->isChecked());
/* Save the Always On Top setting */ /* Save the Always On Top setting */
saveSetting(SETTING_ALWAYS_ON_TOP, ui.chkAlwaysOnTop->isChecked()); saveSetting(SETTING_ALWAYS_ON_TOP, ui.chkAlwaysOnTop->isChecked());
@ -213,21 +260,22 @@ void BandwidthGraph::saveChanges()
/* Update the graph frame settings */ /* Update the graph frame settings */
ui.frmGraph->setShowEntry(0,ui.chkReceiveRate->isChecked()) ; ui.frmGraph->setShowEntry(0,ui.chkReceiveRate->isChecked()) ;
ui.frmGraph->setShowEntry(1,ui.chkSendRate->isChecked()) ; ui.frmGraph->setShowEntry(1,ui.chkSendRate->isChecked()) ;
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN);
if(ui.cmbGraphStyle->currentIndex()==0) // if(ui.cmbGraphStyle->currentIndex()==0)
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN); // ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN);
else // else
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN); // ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN);
if(ui.cmbGraphColor->currentIndex()==0) if(ui.btnGraphColor->isChecked()==0)
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE); ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
else else
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE); ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
if(ui.cmbDownUp->currentIndex()==0) // if(ui.cmbDownUp->currentIndex()==0)
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_UP) ; // ui.frmGraph->setDirection(BWGraphSource::DIRECTION_UP) ;
else // else
ui.frmGraph->setDirection(BWGraphSource::DIRECTION_DOWN) ; // ui.frmGraph->setDirection(BWGraphSource::DIRECTION_DOWN) ;
/* A change in window flags causes the window to disappear, so make sure /* A change in window flags causes the window to disappear, so make sure
* it's still visible. */ * it's still visible. */
@ -255,16 +303,16 @@ BandwidthGraph::showSettingsFrame(bool show)
if (show) { if (show) {
/* Extend the bottom of the bandwidth graph and show the settings */ /* Extend the bottom of the bandwidth graph and show the settings */
ui.frmSettings->setVisible(true); ui.frmSettings->setVisible(true);
ui.btnToggleSettings->setChecked(true); // ui.btnToggleSettings->setChecked(true);
ui.btnToggleSettings->setText(tr("Hide Settings")); // ui.btnToggleSettings->setText(tr("Hide Settings"));
/* 6 = vertical spacing between the settings frame and graph frame */ /* 6 = vertical spacing between the settings frame and graph frame */
newSize.setHeight(newSize.height() + ui.frmSettings->height() + 6); newSize.setHeight(newSize.height() + ui.frmSettings->height() + 6);
} else { } else {
/* Shrink the height of the bandwidth graph and hide the settings */ /* Shrink the height of the bandwidth graph and hide the settings */
ui.frmSettings->setVisible(false); ui.frmSettings->setVisible(false);
ui.btnToggleSettings->setChecked(false); // ui.btnToggleSettings->setChecked(false);
ui.btnToggleSettings->setText(tr("Show Settings")); // ui.btnToggleSettings->setText(tr("Show Settings"));
/* 6 = vertical spacing between the settings frame and graph frame */ /* 6 = vertical spacing between the settings frame and graph frame */
newSize.setHeight(newSize.height() - ui.frmSettings->height() - 6); newSize.setHeight(newSize.height() - ui.frmSettings->height() - 6);

View File

@ -51,6 +51,10 @@ public slots:
void showWindow(); void showWindow();
private slots: private slots:
void switchGraphColor();
void toggleReceiveRate(bool b);
void toggleSendRate(bool b);
/** Called when settings button is toggled */ /** Called when settings button is toggled */
void showSettingsFrame(bool show); void showSettingsFrame(bool show);
/** Called when the settings button is toggled */ /** Called when the settings button is toggled */

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>418</width> <width>620</width>
<height>305</height> <height>432</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -18,8 +18,27 @@
<normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset> <normaloff>:/images/logo/logo_16.png</normaloff>:/images/logo/logo_16.png</iconset>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QVBoxLayout" name="verticalLayout">
<item row="1" column="0"> <item>
<widget class="BWGraph" name="frmGraph" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>120</width>
<height>80</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="_8"> <layout class="QHBoxLayout" name="_8">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>6</number>
@ -36,6 +55,70 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>0</number> <number>0</number>
</property> </property>
<item>
<widget class="QToolButton" name="btnGraphColor">
<property name="text">
<string>PushButton</string>
</property>
<property name="checkable">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="chkSendRate">
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip">
<string/>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Up</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="chkReceiveRate">
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip">
<string/>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Down</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnReset">
<property name="toolTip">
<string>Clears the graph</string>
</property>
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
<item> <item>
<widget class="QPushButton" name="btnToggleSettings"> <widget class="QPushButton" name="btnToggleSettings">
<property name="text"> <property name="text">
@ -60,15 +143,15 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QPushButton" name="btnReset"> <widget class="QLabel" name="displayTime_LB">
<property name="text"> <property name="text">
<string>Reset</string> <string>TextLabel</string>
</property> </property>
</widget> </widget>
</item> </item>
</layout> </layout>
</item> </item>
<item row="2" column="0"> <item>
<widget class="QFrame" name="frmSettings"> <widget class="QFrame" name="frmSettings">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
@ -97,166 +180,56 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <widget class="QWidget" name="">
<property name="leftMargin"> <layout class="QVBoxLayout" name="_3">
<number>9</number> <property name="spacing">
</property> <number>1</number>
<property name="topMargin"> </property>
<number>9</number> <property name="leftMargin">
</property> <number>0</number>
<property name="rightMargin"> </property>
<number>9</number> <property name="topMargin">
</property> <number>0</number>
<property name="bottomMargin"> </property>
<number>9</number> <property name="rightMargin">
</property> <number>0</number>
<item row="0" column="0" rowspan="2"> </property>
<layout class="QVBoxLayout" name="_2"> <property name="bottomMargin">
<property name="spacing"> <number>0</number>
<number>6</number> </property>
</property> <item>
<property name="leftMargin"> <layout class="QHBoxLayout" name="_4">
<number>3</number> <property name="spacing">
</property> <number>6</number>
<property name="topMargin"> </property>
<number>3</number> <property name="leftMargin">
</property> <number>0</number>
<property name="rightMargin"> </property>
<number>3</number> <property name="topMargin">
</property> <number>0</number>
<property name="bottomMargin"> </property>
<number>3</number> <property name="rightMargin">
</property> <number>0</number>
<item> </property>
<widget class="QCheckBox" name="chkReceiveRate"> <property name="bottomMargin">
<property name="contextMenuPolicy"> <number>0</number>
<enum>Qt::NoContextMenu</enum> </property>
</property> </layout>
<property name="toolTip"> </item>
<string/> <item>
</property> <widget class="QFrame" name="frmOpacity">
<property name="layoutDirection"> <property name="contextMenuPolicy">
<enum>Qt::RightToLeft</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<property name="text"> <property name="frameShape">
<string>Receive Rate</string> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="checked"> <property name="frameShadow">
<bool>false</bool> <enum>QFrame::Plain</enum>
</property> </property>
</widget> <layout class="QVBoxLayout" name="_5">
</item>
<item>
<widget class="QCheckBox" name="chkSendRate">
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip">
<string/>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Send Rate</string>
</property>
<property name="checked">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="chkAlwaysOnTop">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Always on Top</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="4" rowspan="2">
<layout class="QVBoxLayout" name="_7">
<property name="spacing">
<number>1</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="QPushButton" name="btnSaveSettings">
<property name="text">
<string>Save</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btnCancelSettings">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="0" column="3">
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" rowspan="2" colspan="2">
<layout class="QVBoxLayout" name="_3">
<property name="spacing">
<number>1</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>
<layout class="QHBoxLayout" name="_4">
<property name="spacing"> <property name="spacing">
<number>6</number> <number>3</number>
</property> </property>
<property name="leftMargin"> <property name="leftMargin">
<number>0</number> <number>0</number>
@ -271,10 +244,47 @@
<number>0</number> <number>0</number>
</property> </property>
<item> <item>
<spacer> <widget class="QSlider" name="sldrOpacity">
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip">
<string>Changes the transparency of the Bandwidth Graph</string>
</property>
<property name="minimum">
<number>30</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>100</number>
</property>
<property name="sliderPosition">
<number>100</number>
</property>
<property name="tracking">
<bool>false</bool>
</property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::NoTicks</enum>
</property>
<property name="tickInterval">
<number>10</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>20</width> <width>20</width>
@ -284,252 +294,111 @@
</spacer> </spacer>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_2"> <layout class="QHBoxLayout" name="_6">
<property name="text"> <property name="spacing">
<string>Style</string> <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> </property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cmbGraphStyle">
<item> <item>
<property name="text"> <spacer>
<string/> <property name="orientation">
</property> <enum>Qt::Horizontal</enum>
<property name="icon"> </property>
<iconset resource="../images.qrc"> <property name="sizeHint" stdset="0">
<normaloff>:/images/graph-line.png</normaloff>:/images/graph-line.png</iconset> <size>
</property> <width>21</width>
<height>0</height>
</size>
</property>
</spacer>
</item> </item>
<item> <item>
<property name="text"> <widget class="QLabel" name="lblPercentOpacity">
<string/> <property name="minimumSize">
</property> <size>
<property name="icon"> <width>25</width>
<iconset resource="../images.qrc"> <height>0</height>
<normaloff>:/images/graph-area.png</normaloff>:/images/graph-area.png</iconset> </size>
</property> </property>
</item> <property name="contextMenuPolicy">
</widget> <enum>Qt::NoContextMenu</enum>
</item> </property>
<item> <property name="layoutDirection">
<widget class="QComboBox" name="cmbGraphColor"> <enum>Qt::RightToLeft</enum>
<item> </property>
<property name="text"> <property name="text">
<string>Default</string> <string>100</string>
</property> </property>
</widget>
</item> </item>
<item> <item>
<property name="text"> <widget class="QLabel" name="label">
<string>Dark</string> <property name="contextMenuPolicy">
</property> <enum>Qt::NoContextMenu</enum>
</item> </property>
</widget> <property name="text">
</item> <string>% Opaque</string>
<item> </property>
<widget class="QComboBox" name="cmbDownUp"> </widget>
<item>
<property name="text">
<string>Upload</string>
</property>
</item> </item>
<item> <item>
<property name="text"> <spacer>
<string>Download</string> <property name="orientation">
</property> <enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>0</height>
</size>
</property>
</spacer>
</item> </item>
</widget> <item>
<widget class="QCheckBox" name="chkAlwaysOnTop">
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Always on Top</string>
</property>
</widget>
</item>
</layout>
</item> </item>
</layout> </layout>
</item> </widget>
<item> </item>
<widget class="QFrame" name="frmOpacity"> <item>
<property name="contextMenuPolicy"> <spacer>
<enum>Qt::NoContextMenu</enum> <property name="orientation">
</property> <enum>Qt::Vertical</enum>
<property name="frameShape"> </property>
<enum>QFrame::NoFrame</enum> <property name="sizeHint" stdset="0">
</property> <size>
<property name="frameShadow"> <width>21</width>
<enum>QFrame::Plain</enum> <height>20</height>
</property> </size>
<layout class="QVBoxLayout" name="_5"> </property>
<property name="spacing"> </spacer>
<number>3</number> </item>
</property> </layout>
<property name="leftMargin"> </widget>
<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="QSlider" name="sldrOpacity">
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="toolTip">
<string>Changes the transparency of the Bandwidth Graph</string>
</property>
<property name="minimum">
<number>30</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>100</number>
</property>
<property name="sliderPosition">
<number>100</number>
</property>
<property name="tracking">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="invertedAppearance">
<bool>false</bool>
</property>
<property name="tickPosition">
<enum>QSlider::NoTicks</enum>
</property>
<property name="tickInterval">
<number>10</number>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="_6">
<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>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblPercentOpacity">
<property name="minimumSize">
<size>
<width>25</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>100</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
<property name="text">
<string>% Opaque</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item row="0" column="0">
<widget class="BWGraph" name="frmGraph" native="true">
<property name="minimumSize">
<size>
<width>120</width>
<height>80</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QStatusBar" name="statusbar"/>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>