Add byte display option in Network Monitor plasmoid
ClosedPublic

Authored by gvgeo on Dec 20 2019, 5:04 PM.

Details

Summary

Add the option to select between byte and bit display in Network Monitor plasmoid.
Bug: 383019

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 20110
Build 20128: arc lint + arc unit
gvgeo created this revision.Dec 20 2019, 5:04 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 20 2019, 5:04 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
gvgeo requested review of this revision.Dec 20 2019, 5:04 PM
gvgeo edited the summary of this revision. (Show Details)Dec 20 2019, 5:05 PM
gvgeo added a reviewer: VDG.
gvgeo added a comment.EditedDec 20 2019, 5:10 PM

I can't find a way to add the new option in the same Interfaces group.
If I add Kirigami.FormLayout stops reading the values, even if the layout works.
Tried something like this:

Kirigami.FormLayout {  //<----Adding only this line alone, is a problem.

    ConfigGeneral {
    // old part, netConfg.qml 
    }  

   Kirigami.FormLayout {
   // new part, displayConfig.qml
   }
}
ngraham accepted this revision as: VDG.Dec 20 2019, 5:13 PM
ngraham added a reviewer: Plasma.
ngraham added a subscriber: ngraham.

Nice clean QML and a reasonable UI.

gvgeo updated this revision to Diff 71921.EditedDec 20 2019, 9:09 PM

Add xml display entry, to save the option. Default is bit.
Added in the common main.xml. Now the rest 4 system monitor applets
will have an extra entry that will not use.

Even nicer. :)

applets/systemmonitor/common/contents/config/main.xml
22

an inline comment documenting what the ints map to would be nice

applets/systemmonitor/net/contents/ui/displayConfig.qml
3

Your copyright

gvgeo updated this revision to Diff 71926.Dec 21 2019, 8:03 AM

Correct label of displayUnits in xml.
Add values to displayUints options.
Correct copyright message.

gvgeo marked 2 inline comments as done.Dec 21 2019, 8:04 AM
ngraham accepted this revision.Dec 21 2019, 5:12 PM
This revision is now accepted and ready to land.Dec 21 2019, 5:12 PM

Lovely contribution, thanks very much!

This revision was automatically updated to reflect the committed changes.