Bug 311925

Summary: [PATCH] ksysguard - Add rowspan/colspan support for displays
Product: [Applications] ksysguard Reporter: Arnav Singh <arnavion>
Component: ksysguardAssignee: KSysGuard Developers <ksysguard-bugs>
Status: RESOLVED FIXED    
Severity: wishlist CC: arnavion, johnflux
Priority: NOR    
Version: 4.9.4   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 4.11.0
Attachments: Patch

Description Arnav Singh 2012-12-19 08:23:08 UTC
Created attachment 75921 [details]
Patch

I've added support for sensor displays in KSysGuard to have row spans
and column spans. The patch is attached.

Apart from adding rowSpan and columnSpan arguments to the method
signatures, I've also removed the internal list
(WorkSheet::mDisplayList) used to contain all the sensor displays.
This list used to be used to derived the row and column of the
displays based on their index in the list. Since I now need to
maintain rowSpan and columnSpan information as well, I just removed
the list entirely and get all my data from mGridLayout. As a result,
another change in the method signatures is the replacement of the
"index" parameter with "row" and "column" parameters.

An extra advantage of doing it this way is that widgets don't shift
around when resizing the grid. Another advantage is that blank spaces
between the widgets are now possible. Not to mention, not maintaining
the layout information outside of the actual layout component
(mGridLayout) seems a clearer design to me.

I have made the patch on top of kdebase4-workspace-4.9.4-1.1 which is
the version in the KDE OBS repository for openSUSE 12.2. I did this
because it was easier to do a zypper source-install + rpmbuild than to
set up my build environment manually. (Also because I'm unable to
clone any of the KDE git repositories without the server terminating
it partway.)

Affected files:
ksysguard/gui/WorkSheet.cpp
ksysguard/gui/WorkSheet.h
Comment 1 John Tapsell 2013-01-04 20:12:19 UTC
Patch looks good - thank you very much for your work.

And very sorry for not replying sooner.
Comment 2 Jekyll Wu 2013-01-06 16:31:32 UTC
Git commit d21088dbd106940b515ebc736cd9ad286ff7f5fd by Jekyll Wu, on behalf of Arnav Singh.
Committed on 06/01/2013 at 17:23.
Pushed by jekyllwu into branch 'master'.

Add rowspan/colspan support for sensor displays in ksysguard
REVIEW: 107970
FIXED-IN: 4.11.0

M  +162  -115  ksysguard/gui/WorkSheet.cpp
M  +5    -12   ksysguard/gui/WorkSheet.h

http://commits.kde.org/kde-workspace/d21088dbd106940b515ebc736cd9ad286ff7f5fd