On Sonntag, 28. Oktober 2012 19:01:40 CEST, Jan Kundrát wrote:

> Thomas, do you know about some semi-reasonable Qt library which 
> would manage the GUI for configuring keyboard shortcuts for me? 

You mean *like* kactioncollection? No :-(

> (Short of the whole of KDE, if possible -- that's a dependency 
> which is too big to require unconditionally.) If no such thing 
> is available, would you find something like this to be 
> reasonable:
>
> - don't create QActions directly, call out to some factory class for that
> - the factory class is driven by an enum of some kind to know 
> what action to return
> - the enum is used as an index to a big table of metadata for 
> actions, each of them having configurable shortcut through 
> QSettings
> - a GUI can be added which would just enumerate the given enum 
> range and allow the user to override the shortcuts
> - thinking about it a bit, the cleaner way would be to hove 
> some macro-assisted classes so that adding a new action is a 
> one-liner


I guess it would be sufficient to have a list of all QAction* and use it as 
backend for a model or even to just build a QTreeWidget for editing (we'll talk 
about < 50 items here...)

To track actions in trojita, one could either
- use a macro/helper for creation
- require enlisting them by hand or 
- install an eventfilter on the applications to intercept ActionAdded/Removed 
events on all objects/widgets.

As for mapping, one could simply use a data() field of the QAction to store the 
"ActionRole" (ie. the config key, text() is obviously a lame idea)

> Let's track this at [1].
I'll first have to figure whether i actually registered to the bugtracker and 
under what acount =)

>> I also tend to want to have a larger chunk of index data 
>> available than I can get with the preview pane (even in wide 
>> mode, too much width is taken up.
>
> I'm lost here -- could you please rephrase this?

I thik this just rephrased:
"I want to get rid of the preview pane as it also steals screen estate (next to 
loading evil spam mail)"


Cheers,
Thomas

Reply via email to