prototype of kactivity-based most used modules entries
ClosedPublic

Authored by mart on Jun 1 2017, 3:59 PM.

Details

Summary

use kactivities to track the most used modules (kcmshell will need to as well)
and present them in the start page as 5 big icons

Test Plan

empty kactivities db, show default set, after some usage, the most used modules come
on top

Diff Detail

Repository
R124 System Settings
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.Jun 1 2017, 3:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJun 1 2017, 3:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
mart added a comment.Jun 1 2017, 4:00 PM

first page look as per vdg suggestion

mart added a reviewer: VDG.Jun 1 2017, 4:00 PM
abetts added a subscriber: abetts.Jun 1 2017, 4:11 PM
In D6061#113477, @mart wrote:

first page look as per vdg suggestion

I would like to suggest making the system settings icon 512 and the row of 5 icons 256. Can we also consider making the font for it 10 pt?

mart added a comment.Jun 1 2017, 4:31 PM
In D6061#113477, @mart wrote:

first page look as per vdg suggestion

I would like to suggest making the system settings icon 512 and the row of 5 icons 256. Can we also consider making the font for it 10 pt?

the font is whatever the configured system font is used, so i wouldn't change it, i can make "frequently used" an header component so it would be a bit bigger
the icon sizes we have named sizes only up to 128, wouldn't go much over than that, i can try tough

mart updated this revision to Diff 15056.Jun 1 2017, 4:43 PM
  • more icon spacing
mart added a comment.Jun 1 2017, 4:43 PM

more spacing, icons still small, wouldn't go much bigger than that

davidedmundson added inline comments.
core/ModuleView.cpp
349

not "kcm:/" ?

sidebar/SidebarMode.cpp
133

Can I propose an alternative:

At the moment you have

QSortFilterProxy -> (ResultModel or DefaultModel)

It might be neater to have

QSortFilterProxy -> KConcatanateRowsProxyModel (ResultModel and DefaultModel)

this means it'll start showing recently used as soon as you open 1 module and you don't need to have any logic code here.

163

just

desktopName = QSortFilterProxyModel::data(index).

175

don't you only need to do this when you create new MenuItem?

mart added inline comments.Jun 2 2017, 9:07 AM
core/ModuleView.cpp
349

i seen that kicker does application:desktopfile.desktop so i did the same, but is the same in the end

sidebar/SidebarMode.cpp
133

I can see a problem with this approach: if i open a module from the default list, i would then have a duplicate in the list, unless i scan the model of defaults and remove manually all the duplicates, which may become a bit complex.
also, i would need a way to ensure that the total number of items is always 5

163

I need to remove the kcm: part

mart updated this revision to Diff 15071.Jun 2 2017, 9:09 AM
  • don't create services when it's not needed
mart marked an inline comment as done.Jun 2 2017, 9:10 AM
This revision was automatically updated to reflect the committed changes.

Make sure you test with --reverse too

sidebar/SidebarMode.cpp
163

Right, but I meant don't call sourceModel()->data(mapToSource....) when you can just call the superclasses data method.

sidebar/package/contents/ui/IntroIcon.qml
32

You're making a custom button, it needs

http://doc.qt.io/qt-5/qml-qtquick-accessible.html

stuff

sidebar/package/contents/ui/introPage.qml
55

Math.round()

67

keyboard nav?

mart marked 2 inline comments as done.Jun 6 2017, 3:09 PM