mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-29 01:16:20 -05:00
Added Dark theme for the graphframe
* Added Dark theme for the graphframe * Added Combobox for switch * Added for other graphs the settings * Added fix by phenom for get stored the configs for the statistics pages * Removed uneeded line from the toolbar * New icon for Identities stats page
This commit is contained in:
parent
f904de68c3
commit
17f32db687
@ -378,6 +378,7 @@ MainWindow::~MainWindow()
|
|||||||
delete trayIcon;
|
delete trayIcon;
|
||||||
delete notifyMenu;//notifyMenu belongs to trayMenu
|
delete notifyMenu;//notifyMenu belongs to trayMenu
|
||||||
delete trayMenu;
|
delete trayMenu;
|
||||||
|
StatisticsWindow::releaseInstance();
|
||||||
#ifdef MESSENGER_WINDOW
|
#ifdef MESSENGER_WINDOW
|
||||||
MessengerWindow::releaseInstance();
|
MessengerWindow::releaseInstance();
|
||||||
#endif
|
#endif
|
||||||
|
@ -345,7 +345,11 @@ void RSGraphWidget::paintEvent(QPaintEvent *)
|
|||||||
_painter->setRenderHint(QPainter::TextAntialiasing);
|
_painter->setRenderHint(QPainter::TextAntialiasing);
|
||||||
|
|
||||||
/* Fill in the background */
|
/* Fill in the background */
|
||||||
_painter->fillRect(_rec, QBrush(BACK_COLOR));
|
if (_flags & RSGRAPH_FLAGS_DARK_STYLE){
|
||||||
|
_painter->fillRect(_rec, QBrush(BACK_COLOR_DARK));
|
||||||
|
}else {
|
||||||
|
_painter->fillRect(_rec, QBrush(BACK_COLOR));
|
||||||
|
}
|
||||||
_painter->drawRect(_rec);
|
_painter->drawRect(_rec);
|
||||||
|
|
||||||
/* Paint the scale */
|
/* Paint the scale */
|
||||||
@ -649,10 +653,17 @@ void RSGraphWidget::paintScale1()
|
|||||||
|
|
||||||
QString text = _source->displayValue(scale) ;
|
QString text = _source->displayValue(scale) ;
|
||||||
|
|
||||||
_painter->setPen(SCALE_COLOR);
|
if (_flags & RSGRAPH_FLAGS_DARK_STYLE){
|
||||||
_painter->drawText(QPointF(SCALE_WIDTH*fact - QFontMetricsF(font()).width(text) - 4*fact, pos+0.4*FS), text);
|
_painter->setPen(SCALE_COLOR_DARK);
|
||||||
_painter->setPen(GRID_COLOR);
|
_painter->drawText(QPointF(SCALE_WIDTH*fact - QFontMetricsF(font()).width(text) - 4*fact, pos+0.4*FS), text);
|
||||||
_painter->drawLine(QPointF(SCALE_WIDTH*fact, pos), QPointF(_rec.width(), pos));
|
_painter->setPen(GRID_COLOR_DARK);
|
||||||
|
_painter->drawLine(QPointF(SCALE_WIDTH*fact, pos), QPointF(_rec.width(), pos));
|
||||||
|
}else{
|
||||||
|
_painter->setPen(SCALE_COLOR);
|
||||||
|
_painter->drawText(QPointF(SCALE_WIDTH*fact - QFontMetricsF(font()).width(text) - 4*fact, pos+0.4*FS), text);
|
||||||
|
_painter->setPen(GRID_COLOR);
|
||||||
|
_painter->drawLine(QPointF(SCALE_WIDTH*fact, pos), QPointF(_rec.width(), pos));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw vertical separator */
|
/* Draw vertical separator */
|
||||||
@ -675,8 +686,10 @@ void RSGraphWidget::paintScale2()
|
|||||||
|
|
||||||
int seconds = (_rec.width()-i)/_time_scale ; // pixels / (pixels per second) => seconds
|
int seconds = (_rec.width()-i)/_time_scale ; // pixels / (pixels per second) => seconds
|
||||||
QString text = QString::number(seconds)+ " secs";
|
QString text = QString::number(seconds)+ " secs";
|
||||||
|
if (_flags & RSGRAPH_FLAGS_DARK_STYLE)
|
||||||
_painter->setPen(SCALE_COLOR);
|
_painter->setPen(SCALE_COLOR_DARK);
|
||||||
|
else
|
||||||
|
_painter->setPen(SCALE_COLOR);
|
||||||
_painter->drawText(QPointF(i, _rec.height()-0.5*FS), text);
|
_painter->drawText(QPointF(i, _rec.height()-0.5*FS), text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -743,8 +756,10 @@ void RSGraphWidget::paintLegend()
|
|||||||
_painter->setPen(pen);
|
_painter->setPen(pen);
|
||||||
_painter->drawLine(QPointF(SCALE_WIDTH*fact+10.0*fact, pos+FS/3), QPointF(SCALE_WIDTH*fact+30.0*fact, pos+FS/3));
|
_painter->drawLine(QPointF(SCALE_WIDTH*fact+10.0*fact, pos+FS/3), QPointF(SCALE_WIDTH*fact+30.0*fact, pos+FS/3));
|
||||||
_painter->setPen(oldPen);
|
_painter->setPen(oldPen);
|
||||||
|
if (_flags & RSGRAPH_FLAGS_DARK_STYLE)
|
||||||
_painter->setPen(SCALE_COLOR);
|
_painter->setPen(SCALE_COLOR_DARK);
|
||||||
|
else
|
||||||
|
_painter->setPen(SCALE_COLOR);
|
||||||
_painter->drawText(QPointF(SCALE_WIDTH *fact+ 40*fact,pos + 0.5*FS), text) ;
|
_painter->drawText(QPointF(SCALE_WIDTH *fact+ 40*fact,pos + 0.5*FS), text) ;
|
||||||
|
|
||||||
++j ;
|
++j ;
|
||||||
|
@ -36,11 +36,14 @@
|
|||||||
#define MINUSER_SCALE 2000 /** 2000 users is the minimum scale */
|
#define MINUSER_SCALE 2000 /** 2000 users is the minimum scale */
|
||||||
#define SCROLL_STEP 4 /** Horizontal change on graph update */
|
#define SCROLL_STEP 4 /** Horizontal change on graph update */
|
||||||
|
|
||||||
#define BACK_COLOR Qt::white
|
#define BACK_COLOR Qt::white
|
||||||
#define SCALE_COLOR Qt::black
|
#define SCALE_COLOR Qt::black
|
||||||
#define GRID_COLOR Qt::lightGray
|
#define GRID_COLOR Qt::lightGray
|
||||||
#define RSDHT_COLOR Qt::magenta
|
#define BACK_COLOR_DARK Qt::black
|
||||||
#define ALLDHT_COLOR Qt::yellow
|
#define SCALE_COLOR_DARK Qt::green
|
||||||
|
#define GRID_COLOR_DARK Qt::darkGreen
|
||||||
|
#define RSDHT_COLOR Qt::magenta
|
||||||
|
#define ALLDHT_COLOR Qt::yellow
|
||||||
|
|
||||||
struct ZeroInitFloat
|
struct ZeroInitFloat
|
||||||
{
|
{
|
||||||
@ -145,6 +148,7 @@ public:
|
|||||||
static const uint32_t RSGRAPH_FLAGS_LEGEND_CUMULATED = 0x0040 ;// show the total in the legend rather than current values
|
static const uint32_t RSGRAPH_FLAGS_LEGEND_CUMULATED = 0x0040 ;// show the total in the legend rather than current values
|
||||||
static const uint32_t RSGRAPH_FLAGS_PAINT_STYLE_DOTS = 0x0080 ;// use dots
|
static const uint32_t RSGRAPH_FLAGS_PAINT_STYLE_DOTS = 0x0080 ;// use dots
|
||||||
static const uint32_t RSGRAPH_FLAGS_LEGEND_INTEGER = 0x0100 ;// use integer number in the legend, and move the lines to match integers
|
static const uint32_t RSGRAPH_FLAGS_LEGEND_INTEGER = 0x0100 ;// use integer number in the legend, and move the lines to match integers
|
||||||
|
static const uint32_t RSGRAPH_FLAGS_DARK_STYLE = 0x0200 ;// darkstyle graph
|
||||||
|
|
||||||
/** Bandwidth graph style. */
|
/** Bandwidth graph style. */
|
||||||
enum GraphStyle
|
enum GraphStyle
|
||||||
|
@ -53,6 +53,7 @@
|
|||||||
<file>icons/gmail.png</file>
|
<file>icons/gmail.png</file>
|
||||||
<file>icons/help_128.png</file>
|
<file>icons/help_128.png</file>
|
||||||
<file>icons/help_64.png</file>
|
<file>icons/help_64.png</file>
|
||||||
|
<file>icons/identities.png</file>
|
||||||
<file>icons/information_128.png</file>
|
<file>icons/information_128.png</file>
|
||||||
<file>icons/internet_128.png</file>
|
<file>icons/internet_128.png</file>
|
||||||
<file>icons/invite64.png</file>
|
<file>icons/invite64.png</file>
|
||||||
|
BIN
retroshare-gui/src/gui/icons/identities.png
Normal file
BIN
retroshare-gui/src/gui/icons/identities.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@ -602,6 +602,6 @@ BWGraph::BWGraph(QWidget *parent) : RSGraphWidget(parent)
|
|||||||
|
|
||||||
BWGraph::~BWGraph()
|
BWGraph::~BWGraph()
|
||||||
{
|
{
|
||||||
delete _local_source ;
|
//delete _local_source ;//Will be deleted by RSGraphWidget destructor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,10 +34,12 @@
|
|||||||
#define SETTING_OPACITY "Opacity"
|
#define SETTING_OPACITY "Opacity"
|
||||||
#define SETTING_ALWAYS_ON_TOP "AlwaysOnTop"
|
#define SETTING_ALWAYS_ON_TOP "AlwaysOnTop"
|
||||||
#define SETTING_STYLE "GraphStyle"
|
#define SETTING_STYLE "GraphStyle"
|
||||||
|
#define SETTING_GRAPHCOLOR "GraphColor"
|
||||||
#define DEFAULT_FILTER (BWGRAPH_LINE_SEND|BWGRAPH_LINE_RECV)
|
#define DEFAULT_FILTER (BWGRAPH_LINE_SEND|BWGRAPH_LINE_RECV)
|
||||||
#define DEFAULT_ALWAYS_ON_TOP false
|
#define DEFAULT_ALWAYS_ON_TOP false
|
||||||
#define DEFAULT_OPACITY 100
|
#define DEFAULT_OPACITY 100
|
||||||
#define DEFAULT_STYLE LineGraph
|
#define DEFAULT_STYLE LineGraph
|
||||||
|
#define DEFAULT_GRAPHCOLOR DefaultColor
|
||||||
|
|
||||||
#define ADD_TO_FILTER(f,v,b) (f = ((b) ? ((f) | (v)) : ((f) & ~(v))))
|
#define ADD_TO_FILTER(f,v,b) (f = ((b) ? ((f) | (v)) : ((f) & ~(v))))
|
||||||
|
|
||||||
@ -133,6 +135,19 @@ BandwidthGraph::loadSettings()
|
|||||||
else
|
else
|
||||||
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN);
|
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_PAINT_STYLE_PLAIN);
|
||||||
|
|
||||||
|
/* Set whether we are plotting bandwidth as area graphs or not */
|
||||||
|
int graphColor = getSetting(SETTING_GRAPHCOLOR, DEFAULT_GRAPHCOLOR).toInt();
|
||||||
|
|
||||||
|
if (graphColor < 0 || graphColor >= ui.cmbGraphColor->count()) {
|
||||||
|
graphColor = DEFAULT_GRAPHCOLOR;
|
||||||
|
}
|
||||||
|
ui.cmbGraphColor->setCurrentIndex(graphColor);
|
||||||
|
|
||||||
|
if(graphColor==0)
|
||||||
|
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
|
||||||
/* Set graph frame settings */
|
/* Set 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()) ;
|
||||||
@ -158,6 +173,7 @@ 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());
|
||||||
|
|
||||||
/* 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());
|
||||||
@ -184,6 +200,11 @@ void BandwidthGraph::saveChanges()
|
|||||||
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)
|
||||||
|
ui.frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
ui.frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
|
||||||
/* 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. */
|
||||||
showNormal();
|
showNormal();
|
||||||
|
@ -40,6 +40,7 @@ class BandwidthGraph : public RWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
enum { AreaGraph=0,LineGraph=1 } ;
|
enum { AreaGraph=0,LineGraph=1 } ;
|
||||||
|
enum { DefaultColor=0,DarkColor=1 } ;
|
||||||
|
|
||||||
/** Default constructor */
|
/** Default constructor */
|
||||||
BandwidthGraph(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
BandwidthGraph(QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>414</width>
|
<width>418</width>
|
||||||
<height>305</height>
|
<height>305</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -24,7 +24,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -69,13 +78,13 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>355</width>
|
<width>400</width>
|
||||||
<height>82</height>
|
<height>82</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>355</width>
|
<width>400</width>
|
||||||
<height>82</height>
|
<height>82</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -88,19 +97,34 @@
|
|||||||
<property name="frameShadow">
|
<property name="frameShadow">
|
||||||
<enum>QFrame::Raised</enum>
|
<enum>QFrame::Raised</enum>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="spacing">
|
<property name="leftMargin">
|
||||||
<number>6</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0" rowspan="2">
|
||||||
<layout class="QVBoxLayout" name="_2">
|
<layout class="QVBoxLayout" name="_2">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -166,12 +190,21 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1" rowspan="2">
|
||||||
<layout class="QVBoxLayout" name="_3">
|
<layout class="QVBoxLayout" name="_3">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -179,7 +212,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -224,6 +266,20 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="cmbGraphColor">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Dark</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -241,7 +297,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>3</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -299,7 +364,16 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -377,25 +451,21 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="4" rowspan="2">
|
||||||
<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>
|
|
||||||
<layout class="QVBoxLayout" name="_7">
|
<layout class="QVBoxLayout" name="_7">
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
@ -414,6 +484,19 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</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>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include "retroshare/rspeers.h"
|
#include "retroshare/rspeers.h"
|
||||||
#include "retroshare/rsservicecontrol.h"
|
#include "retroshare/rsservicecontrol.h"
|
||||||
#include "retroshare-gui/RsAutoUpdatePage.h"
|
#include "retroshare-gui/RsAutoUpdatePage.h"
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
#include "BandwidthStatsWidget.h"
|
#include "BandwidthStatsWidget.h"
|
||||||
|
|
||||||
BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
||||||
@ -31,6 +32,8 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||||||
{
|
{
|
||||||
ui.setupUi(this) ;
|
ui.setupUi(this) ;
|
||||||
|
|
||||||
|
m_bProcessSettings = false;
|
||||||
|
|
||||||
// now add one button per service
|
// now add one button per service
|
||||||
|
|
||||||
ui.friend_CB->addItem(tr("Sum")) ;
|
ui.friend_CB->addItem(tr("Sum")) ;
|
||||||
@ -51,6 +54,8 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||||||
updateUnitSelection(0);
|
updateUnitSelection(0);
|
||||||
toggleLogScale(ui.logScale_CB->checkState() == Qt::Checked);//Update bwgraph_BW with default logScale_CB state defined in ui file.
|
toggleLogScale(ui.logScale_CB->checkState() == Qt::Checked);//Update bwgraph_BW with default logScale_CB state defined in ui file.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Setup connections
|
// Setup connections
|
||||||
|
|
||||||
QObject::connect(ui.friend_CB ,SIGNAL(currentIndexChanged(int )),this, SLOT( updateFriendSelection(int ))) ;
|
QObject::connect(ui.friend_CB ,SIGNAL(currentIndexChanged(int )),this, SLOT( updateFriendSelection(int ))) ;
|
||||||
@ -59,6 +64,7 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||||||
QObject::connect(ui.service_CB ,SIGNAL(currentIndexChanged(int )),this, SLOT(updateServiceSelection(int ))) ;
|
QObject::connect(ui.service_CB ,SIGNAL(currentIndexChanged(int )),this, SLOT(updateServiceSelection(int ))) ;
|
||||||
QObject::connect(ui.legend_CB ,SIGNAL(currentIndexChanged(int )),this, SLOT( updateLegendType(int ))) ;
|
QObject::connect(ui.legend_CB ,SIGNAL(currentIndexChanged(int )),this, SLOT( updateLegendType(int ))) ;
|
||||||
QObject::connect(ui.logScale_CB,SIGNAL( toggled(bool)),this, SLOT( toggleLogScale(bool))) ;
|
QObject::connect(ui.logScale_CB,SIGNAL( toggled(bool)),this, SLOT( toggleLogScale(bool))) ;
|
||||||
|
QObject::connect(ui.cmbGraphColor,SIGNAL(currentIndexChanged(int )),this, SLOT( updateGraphSelection(int))) ;
|
||||||
|
|
||||||
// setup one timer for auto-update
|
// setup one timer for auto-update
|
||||||
|
|
||||||
@ -66,6 +72,45 @@ BandwidthStatsWidget::BandwidthStatsWidget(QWidget *parent)
|
|||||||
connect(mTimer, SIGNAL(timeout()), this, SLOT(updateComboBoxes())) ;
|
connect(mTimer, SIGNAL(timeout()), this, SLOT(updateComboBoxes())) ;
|
||||||
mTimer->setSingleShot(false) ;
|
mTimer->setSingleShot(false) ;
|
||||||
mTimer->start(2000) ;
|
mTimer->start(2000) ;
|
||||||
|
|
||||||
|
// load settings
|
||||||
|
processSettings(true);
|
||||||
|
|
||||||
|
int graphColor = ui.cmbGraphColor->currentIndex();
|
||||||
|
|
||||||
|
if(graphColor==0)
|
||||||
|
ui.bwgraph_BW->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
ui.bwgraph_BW->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
BandwidthStatsWidget::~BandwidthStatsWidget ()
|
||||||
|
{
|
||||||
|
// save settings
|
||||||
|
processSettings(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void BandwidthStatsWidget::processSettings(bool bLoad)
|
||||||
|
{
|
||||||
|
m_bProcessSettings = true;
|
||||||
|
|
||||||
|
Settings->beginGroup(QString("BandwidthStatsWidget"));
|
||||||
|
|
||||||
|
if (bLoad) {
|
||||||
|
// load settings
|
||||||
|
|
||||||
|
// state of Graph Color combobox
|
||||||
|
int index = Settings->value("cmbGraphColor", 0).toInt();
|
||||||
|
ui.cmbGraphColor->setCurrentIndex(index);
|
||||||
|
} else {
|
||||||
|
// save settings
|
||||||
|
|
||||||
|
// state of Graph Color combobox
|
||||||
|
Settings->setValue("cmbGraphColor", ui.cmbGraphColor->currentIndex());
|
||||||
|
}
|
||||||
|
|
||||||
|
Settings->endGroup();
|
||||||
|
m_bProcessSettings = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BandwidthStatsWidget::toggleLogScale(bool b)
|
void BandwidthStatsWidget::toggleLogScale(bool b)
|
||||||
@ -75,6 +120,7 @@ void BandwidthStatsWidget::toggleLogScale(bool b)
|
|||||||
else
|
else
|
||||||
ui.bwgraph_BW->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
ui.bwgraph_BW->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BandwidthStatsWidget::updateComboBoxes()
|
void BandwidthStatsWidget::updateComboBoxes()
|
||||||
{
|
{
|
||||||
if(!isVisible())
|
if(!isVisible())
|
||||||
@ -234,3 +280,11 @@ void BandwidthStatsWidget::updateUnitSelection(int n)
|
|||||||
ui.legend_CB->setItemText(1,tr("Total"));
|
ui.legend_CB->setItemText(1,tr("Total"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BandwidthStatsWidget::updateGraphSelection(int n)
|
||||||
|
{
|
||||||
|
if(n==0)
|
||||||
|
ui.bwgraph_BW->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
ui.bwgraph_BW->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
}
|
||||||
|
@ -26,7 +26,10 @@ class BandwidthStatsWidget: public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
/** Default Constructor */
|
||||||
BandwidthStatsWidget(QWidget *parent) ;
|
BandwidthStatsWidget(QWidget *parent) ;
|
||||||
|
/** Default Destructor */
|
||||||
|
~BandwidthStatsWidget ();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void updateFriendSelection(int n);
|
void updateFriendSelection(int n);
|
||||||
@ -36,8 +39,12 @@ protected slots:
|
|||||||
void updateUnitSelection(int n);
|
void updateUnitSelection(int n);
|
||||||
void toggleLogScale(bool b);
|
void toggleLogScale(bool b);
|
||||||
void updateLegendType(int n);
|
void updateLegendType(int n);
|
||||||
|
void updateGraphSelection(int n);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void processSettings(bool bLoad);
|
||||||
|
bool m_bProcessSettings;
|
||||||
|
|
||||||
Ui::BwStatsWidget ui;
|
Ui::BwStatsWidget ui;
|
||||||
|
|
||||||
QTimer *mTimer ;
|
QTimer *mTimer ;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1148</width>
|
<width>800</width>
|
||||||
<height>385</height>
|
<height>385</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -140,6 +140,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="cmbGraphColor">
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Default</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Dark</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>760</width>
|
<width>760</width>
|
||||||
<height>603</height>
|
<height>500</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -84,6 +84,9 @@ GlobalRouterStatistics::GlobalRouterStatistics(QWidget *parent)
|
|||||||
|
|
||||||
connect(treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CustomPopupMenu(QPoint)));
|
connect(treeWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(CustomPopupMenu(QPoint)));
|
||||||
|
|
||||||
|
/* Set initial size the splitter */
|
||||||
|
splitter->setStretchFactor(1, 1);
|
||||||
|
splitter->setStretchFactor(0, 0);
|
||||||
|
|
||||||
// load settings
|
// load settings
|
||||||
processSettings(true);
|
processSettings(true);
|
||||||
@ -106,12 +109,12 @@ void GlobalRouterStatistics::processSettings(bool bLoad)
|
|||||||
// load settings
|
// load settings
|
||||||
|
|
||||||
// state of splitter
|
// state of splitter
|
||||||
//splitter->restoreState(Settings->value("Splitter").toByteArray());
|
splitter->restoreState(Settings->value("Splitter").toByteArray());
|
||||||
} else {
|
} else {
|
||||||
// save settings
|
// save settings
|
||||||
|
|
||||||
// state of splitter
|
// state of splitter
|
||||||
//Settings->setValue("Splitter", splitter->saveState());
|
Settings->setValue("Splitter", splitter->saveState());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,19 +6,96 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1468</width>
|
<width>800</width>
|
||||||
<height>659</height>
|
<height>429</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Router Statistics</string>
|
<string>Router Statistics</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QSplitter" name="splitter">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>GroupBox</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QTreeWidget" name="treeWidget">
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sortingEnabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>ID</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Identity Name</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Destinaton</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Data status</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Tunnel status</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Stored data size</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Data hash</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Receive time</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sending time</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Branching factor</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Receive time (secs ago)</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string>Sending time (secs ago)</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
<widget class="QScrollArea" name="_router_F">
|
<widget class="QScrollArea" name="_router_F">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
<enum>QFrame::NoFrame</enum>
|
<enum>QFrame::NoFrame</enum>
|
||||||
@ -34,93 +111,14 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1450</width>
|
<width>782</width>
|
||||||
<height>317</height>
|
<height>69</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox">
|
|
||||||
<property name="title">
|
|
||||||
<string>GroupBox</string>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QTreeWidget" name="treeWidget">
|
|
||||||
<property name="contextMenuPolicy">
|
|
||||||
<enum>Qt::CustomContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sortingEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>ID</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Identity Name</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Destinaton</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Data status</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Tunnel status</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Stored data size</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Data hash</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Receive time</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Sending time</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Branching factor</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Receive time (secs ago)</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
<column>
|
|
||||||
<property name="text">
|
|
||||||
<string>Sending time (secs ago)</string>
|
|
||||||
</property>
|
|
||||||
</column>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1468</width>
|
<width>800</width>
|
||||||
<height>779</height>
|
<height>500</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -131,4 +131,11 @@ RttStatisticsGraph::RttStatisticsGraph(QWidget *parent)
|
|||||||
resetFlags(RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
resetFlags(RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
||||||
resetFlags(RSGRAPH_FLAGS_PAINT_STYLE_PLAIN) ;
|
resetFlags(RSGRAPH_FLAGS_PAINT_STYLE_PLAIN) ;
|
||||||
setFlags(RSGRAPH_FLAGS_SHOW_LEGEND) ;
|
setFlags(RSGRAPH_FLAGS_SHOW_LEGEND) ;
|
||||||
|
|
||||||
|
int graphColor = Settings->valueFromGroup("BandwidthStatsWidget", "cmbGraphColor", 0).toInt();
|
||||||
|
|
||||||
|
if(graphColor==0)
|
||||||
|
resetFlags(RSGraphWidget::RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
setFlags(RSGraphWidget::RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
#define IMAGE_DHT ":/icons/DHT128.png"
|
#define IMAGE_DHT ":/icons/DHT128.png"
|
||||||
#define IMAGE_TURTLE ":/icons/turtle128.png"
|
#define IMAGE_TURTLE ":/icons/turtle128.png"
|
||||||
#define IMAGE_IDENTITIES ":/icons/avatar_128.png"
|
#define IMAGE_IDENTITIES ":/icons/identities.png"
|
||||||
#define IMAGE_BWGRAPH ":/icons/bandwidth128.png"
|
#define IMAGE_BWGRAPH ":/icons/bandwidth128.png"
|
||||||
#define IMAGE_GLOBALROUTER ":/icons/GRouter128.png"
|
#define IMAGE_GLOBALROUTER ":/icons/GRouter128.png"
|
||||||
#define IMAGE_GXSTRANSPORT ":/icons/transport128.png"
|
#define IMAGE_GXSTRANSPORT ":/icons/transport128.png"
|
||||||
|
@ -15,7 +15,16 @@
|
|||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="margin">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
@ -45,7 +54,6 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<addaction name="separator"/>
|
|
||||||
</widget>
|
</widget>
|
||||||
<action name="actionAdd_Friend">
|
<action name="actionAdd_Friend">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
@ -61,7 +69,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionAdd_Share">
|
<action name="actionAdd_Share">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset>
|
||||||
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
<normaloff>:/images/add-share24.png</normaloff>:/images/add-share24.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -79,7 +87,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionMessenger">
|
<action name="actionMessenger">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset>
|
||||||
<normaloff>:/images/messenger.png</normaloff>:/images/messenger.png</iconset>
|
<normaloff>:/images/messenger.png</normaloff>:/images/messenger.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -105,7 +113,7 @@
|
|||||||
</action>
|
</action>
|
||||||
<action name="actionQuit">
|
<action name="actionQuit">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="../images.qrc">
|
<iconset>
|
||||||
<normaloff>:/images/exit_24x24.png</normaloff>:/images/exit_24x24.png</iconset>
|
<normaloff>:/images/exit_24x24.png</normaloff>:/images/exit_24x24.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -203,6 +203,13 @@ TurtleRouterStatistics::TurtleRouterStatistics(QWidget *parent)
|
|||||||
|
|
||||||
frmGraph->setMinimumHeight(200*fact);
|
frmGraph->setMinimumHeight(200*fact);
|
||||||
|
|
||||||
|
int graphColor = Settings->valueFromGroup("BandwidthStatsWidget", "cmbGraphColor", 0).toInt();
|
||||||
|
|
||||||
|
if(graphColor==0)
|
||||||
|
frmGraph->resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
frmGraph->setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
|
||||||
// load settings
|
// load settings
|
||||||
processSettings(true);
|
processSettings(true);
|
||||||
}
|
}
|
||||||
@ -224,12 +231,12 @@ void TurtleRouterStatistics::processSettings(bool bLoad)
|
|||||||
// load settings
|
// load settings
|
||||||
|
|
||||||
// state of splitter
|
// state of splitter
|
||||||
//splitter->restoreState(Settings->value("Splitter").toByteArray());
|
splitter->restoreState(Settings->value("Splitter").toByteArray());
|
||||||
} else {
|
} else {
|
||||||
// save settings
|
// save settings
|
||||||
|
|
||||||
// state of splitter
|
// state of splitter
|
||||||
//Settings->setValue("Splitter", splitter->saveState());
|
Settings->setValue("Splitter", splitter->saveState());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>680</width>
|
<width>680</width>
|
||||||
<height>523</height>
|
<height>500</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -29,15 +29,15 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Vertical</enum>
|
<enum>Qt::Vertical</enum>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="handleWidth">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
<widget class="QScrollArea" name="_tunnel_statistics_F">
|
<widget class="QScrollArea" name="_tunnel_statistics_F">
|
||||||
<property name="styleSheet">
|
<property name="minimumSize">
|
||||||
<string notr="true"/>
|
<size>
|
||||||
</property>
|
<width>0</width>
|
||||||
<property name="frameShape">
|
<height>200</height>
|
||||||
<enum>QFrame::NoFrame</enum>
|
</size>
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@ -47,28 +47,23 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>640</width>
|
<width>636</width>
|
||||||
<height>248</height>
|
<height>198</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
<widget class="TurtleGraph" name="frmGraph" native="true">
|
||||||
</item>
|
<property name="minimumSize">
|
||||||
<item row="1" column="0">
|
<size>
|
||||||
<widget class="TurtleGraph" name="frmGraph" native="true">
|
<width>120</width>
|
||||||
<property name="minimumSize">
|
<height>200</height>
|
||||||
<size>
|
</size>
|
||||||
<width>120</width>
|
</property>
|
||||||
<height>200</height>
|
<property name="contextMenuPolicy">
|
||||||
</size>
|
<enum>Qt::NoContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy">
|
</widget>
|
||||||
<enum>Qt::NoContextMenu</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <gui/common/RSGraphWidget.h>
|
#include <gui/common/RSGraphWidget.h>
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
|
|
||||||
#include <retroshare/rsdht.h>
|
#include <retroshare/rsdht.h>
|
||||||
#include <retroshare/rsconfig.h>
|
#include <retroshare/rsconfig.h>
|
||||||
@ -74,5 +75,12 @@ class DhtGraph : public RSGraphWidget
|
|||||||
|
|
||||||
resetFlags(RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
resetFlags(RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
||||||
setFlags(RSGRAPH_FLAGS_PAINT_STYLE_PLAIN) ;
|
setFlags(RSGRAPH_FLAGS_PAINT_STYLE_PLAIN) ;
|
||||||
|
|
||||||
|
int graphColor = Settings->valueFromGroup("BandwidthStatsWidget", "cmbGraphColor", 0).toInt();
|
||||||
|
|
||||||
|
if(graphColor==0)
|
||||||
|
resetFlags(RSGraphWidget::RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
setFlags(RSGraphWidget::RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "gui/settings/rsharesettings.h"
|
||||||
|
|
||||||
#include "retroshare/rsturtle.h"
|
#include "retroshare/rsturtle.h"
|
||||||
#include <gui/common/RSGraphWidget.h>
|
#include <gui/common/RSGraphWidget.h>
|
||||||
|
|
||||||
@ -68,7 +70,14 @@ class TurtleGraph: public RSGraphWidget
|
|||||||
|
|
||||||
resetFlags(RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
resetFlags(RSGRAPH_FLAGS_LOG_SCALE_Y) ;
|
||||||
resetFlags(RSGRAPH_FLAGS_PAINT_STYLE_PLAIN) ;
|
resetFlags(RSGRAPH_FLAGS_PAINT_STYLE_PLAIN) ;
|
||||||
setFlags(RSGRAPH_FLAGS_SHOW_LEGEND) ;
|
setFlags(RSGRAPH_FLAGS_SHOW_LEGEND) ;
|
||||||
|
|
||||||
|
int graphColor = Settings->valueFromGroup("BandwidthStatsWidget", "cmbGraphColor", 0).toInt();
|
||||||
|
|
||||||
|
if(graphColor==0)
|
||||||
|
resetFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
|
else
|
||||||
|
setFlags(RSGraphWidget::RSGRAPH_FLAGS_DARK_STYLE);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user