[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [PATCH] To make Plasma Applet System Monitor - Network to display
From: Shantanu Jha <jhahoneyk () gmail ! com>
Date: 2009-02-19 20:59:36
Message-ID: ec556b640902191247n3ebdf682r929979952de829fc () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
1. Please find the screenshot here
http://www.shantanutushar.com/screenshots/plasmoid_sm_net.jpg .
2. Though I think It looks good, but still, the user should be free to
decide on it.
3. I've uploaded the backtrace at
http://www.shantanutushar.com/plasmoidviewer.kcrash . I was running the
latest svn kdebase build when the backtrace was saved. Further, applets *other
than* System Monitor - CPU, System Monitor - Network, System Monitor -
Temperature were working fine.
Hope this helps :)
2009/2/20 Aaron J. Seigo <aseigo@kde.org>:
> On Thursday 19 February 2009, Shantanu Jha wrote:
>> The attached patch applies to the directory
>> kdebase/workspace/plasma/applets/system-monitor of trunk.
>
> can you provide a screenshot as well? for patches that touch visible UI,
we
> encourage providing a screenshot as well. it allows those who can't
compile
> the code to keep up with visual changes (e.g. our designers :)
>
>> This patch adds functionality to the Plasma Applet System Monitor -
>> Network so that It gives the user an option to display the interface
>> name and instantaneous traffic above the respective interface's graph.
>> This is useful as not having a title takes away meaning from any
>> graph. The user can enable or disable this feature using the Settings
>> Dialog.
>
> if it looks good, i don't see any reason to make it an option.
>
>> Please note that I've tested the build successfully against the latest
>> SVN trunk build of kdebase, with the exception of
>> kdebase/workspace/plasma/dataengines/systemmonitor/systemmonitor.cpp
>> which I used as of revision 926166 . Because after this revision,
>> systemmonitor.cpp is causing even the original applet to crash.
>
> can you provide a backtrace for this? thanks...
>
> --
> Aaron J. Seigo
> humru othro a kohnu se
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
>
> KDE core developer sponsored by Qt Software
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel@kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>
--
Shantanu Tushar
http://www.shantanutushar.com
[Attachment #5 (text/html)]
1. Please find the screenshot here <a \
href="http://www.shantanutushar.com/screenshots/plasmoid_sm_net.jpg">http://www.shantanutushar.com/screenshots/plasmoid_sm_net.jpg</a> \
.<br><br>2. Though I think It looks good, but still, the user should be free to \
decide on it.<br> <br>3. I've uploaded the backtrace at <a \
href="http://www.shantanutushar.com/plasmoidviewer.kcrash">http://www.shantanutushar.com/plasmoidviewer.kcrash</a> \
. I was running the latest svn kdebase build when the backtrace was saved. Further, \
applets <b>other than</b> System Monitor - CPU, System Monitor - Network, System \
Monitor - Temperature were working fine.<br> <br>Hope this helps \
:)<br><br><br>2009/2/20 Aaron J. Seigo <<a \
href="mailto:aseigo@kde.org">aseigo@kde.org</a>>:<br>> On Thursday 19 February \
2009, Shantanu Jha wrote:<br>>> The attached patch applies to the directory<br> \
>> kdebase/workspace/plasma/applets/system-monitor of trunk.<br>><br>> \
can you provide a screenshot as well? for patches that touch visible UI, we<br>> \
encourage providing a screenshot as well. it allows those who can't compile<br> \
> the code to keep up with visual changes (e.g. our designers \
:)<br>><br>>> This patch adds functionality to the Plasma Applet System \
Monitor -<br>>> Network so that It gives the user an option to display the \
interface<br> >> name and instantaneous traffic above the respective \
interface's graph.<br>>> This is useful as not having a title takes away \
meaning from any<br>>> graph. The user can enable or disable this feature using \
the Settings<br> >> Dialog.<br>><br>> if it looks good, i don't see \
any reason to make it an option.<br>><br>>> Please note that I've tested \
the build successfully against the latest<br>>> SVN trunk build of kdebase, \
with the exception of<br> >> \
kdebase/workspace/plasma/dataengines/systemmonitor/systemmonitor.cpp<br>>> \
which I used as of revision 926166 . Because after this revision,<br>>> \
systemmonitor.cpp is causing even the original applet to crash.<br> ><br>> can \
you provide a backtrace for this? thanks...<br>><br>> --<br>> Aaron J. \
Seigo<br>> humru othro a kohnu se<br>> GPG Fingerprint: 8B8B 2209 0C6F 7C47 \
B1EA EE75 D6B7 2EB1 A7F1 DB43<br>><br> > KDE core developer sponsored by \
Qt Software<br>><br>><br>> \
_______________________________________________<br>> Plasma-devel mailing \
list<br>> <a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br> > \
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>><br>><br><br><br><br>-- \
<br>Shantanu Tushar<br><a \
href="http://www.shantanutushar.com">http://www.shantanutushar.com</a><br> <br>
--00504502c3d275104e04634ba5b9--
["system-monitor-network.diff" (text/x-diff)]
Index: net-config.ui
===================================================================
--- net-config.ui (revision 928407)
+++ net-config.ui (working copy)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>config</class>
- <widget class="QWidget" name="config" >
- <property name="geometry" >
+ <widget class="QWidget" name="config">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,54 +10,61 @@
<height>263</height>
</rect>
</property>
- <property name="styleSheet" >
- <string notr="true" />
+ <property name="styleSheet">
+ <string notr="true"/>
</property>
- <layout class="QVBoxLayout" >
- <property name="margin" >
+ <layout class="QVBoxLayout">
+ <property name="margin">
<number>0</number>
</property>
<item>
- <widget class="QLabel" name="label" >
- <property name="text" >
+ <widget class="QLabel" name="label">
+ <property name="text">
<string>&Network Interfaces:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>treeView</cstring>
</property>
</widget>
</item>
<item>
- <widget class="QTreeView" name="treeView" >
- <property name="rootIsDecorated" >
+ <widget class="QTreeView" name="treeView">
+ <property name="rootIsDecorated">
<bool>false</bool>
</property>
- <property name="uniformRowHeights" >
+ <property name="uniformRowHeights">
<bool>true</bool>
</property>
- <property name="sortingEnabled" >
+ <property name="sortingEnabled">
<bool>true</bool>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
+ <widget class="QCheckBox" name="showTopBarCheckBox">
+ <property name="text">
+ <string>Show Interface Name Above The Graph</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout">
<item>
- <widget class="QLabel" name="label_2" >
- <property name="text" >
+ <widget class="QLabel" name="label_2">
+ <property name="text">
<string>Update &interval:</string>
</property>
- <property name="buddy" >
+ <property name="buddy">
<cstring>intervalSpinBox</cstring>
</property>
</widget>
</item>
<item>
<spacer>
- <property name="orientation" >
+ <property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <property name="sizeHint" stdset="0" >
+ <property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
@@ -65,14 +73,14 @@
</spacer>
</item>
<item>
- <widget class="QSpinBox" name="intervalSpinBox" >
- <property name="minimum" >
+ <widget class="QSpinBox" name="intervalSpinBox">
+ <property name="minimum">
<number>1</number>
</property>
- <property name="maximum" >
+ <property name="maximum">
<number>525600</number>
</property>
- <property name="value" >
+ <property name="value">
<number>2</number>
</property>
</widget>
Index: net.cpp
===================================================================
--- net.cpp (revision 928407)
+++ net.cpp (working copy)
@@ -41,6 +41,7 @@
KConfigGroup cg = config();
setEngine(dataEngine("systemmonitor"));
setInterval(cg.readEntry("interval", 2) * 1000);
+ setShowTopBar(cg.readEntry("showTopBar", false));
setTitle(i18n("Network"));
if (engine()->sources().count() == 0) {
connect(engine(), SIGNAL(sourceAdded(QString)), this, SLOT(initLater(const QString)));
@@ -90,7 +91,7 @@
plotter->setUseAutoRange(true);
plotter->setThinFrame(false);
plotter->setShowLabels(false);
- plotter->setShowTopBar(false);
+ plotter->setShowTopBar(m_showTopBar);
plotter->setShowVerticalLines(false);
plotter->setShowHorizontalLines(false);
plotter->setStackPlots(true);
@@ -167,6 +168,7 @@
ui.treeView->resizeColumnToContents(0);
ui.intervalSpinBox->setValue(interval() / 1000);
updateSpinBoxSuffix(interval() / 1000);
+ ui.showTopBarCheckBox->setChecked( m_showTopBar );
parent->addPage(widget, i18n("Interfaces"), "network-workgroup");
connect(ui.intervalSpinBox, SIGNAL(valueChanged(int)), this, SLOT(updateSpinBoxSuffix(int)));
@@ -199,6 +201,11 @@
cg.writeEntry("interval", interval);
interval *= 1000;
setInterval(interval);
+ bool showTopBar = ui.showTopBarCheckBox->isChecked();
+
+ cg.writeEntry("showTopBar", showTopBar);
+ setShowTopBar( showTopBar );
+
emit configNeedsSaving();
connectToEngine();
}
Index: net.h
===================================================================
--- net.h (revision 928407)
+++ net.h (working copy)
@@ -39,6 +39,7 @@
virtual bool addMeter(const QString&);
virtual void createConfigurationInterface(KConfigDialog *parent);
virtual void setDetail(Detail detail);
+ void setShowTopBar( bool value ) { m_showTopBar = value; }
public slots:
void configAccepted();
@@ -51,6 +52,7 @@
QStandardItemModel m_model;
QStringList m_interfaces;
QMap<QString, QList<double> > m_data;
+ bool m_showTopBar;
private slots:
void parseSources();
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic