Re: RFC: Application wide shortcuts in QML

2012-12-13 Thread Aaron J. Seigo
On Tuesday, December 11, 2012 15:24:01 Mark wrote:
 Could you post a link to that Qt 5.1 api when you find it again? I did
 a bit of searching, but nothing thus far.

nothing has been published thus far. discussions will be ongoing on the qt 
devel list.

 As for limiting it's usage. In my case that would not work. I need F5
 as well in my app so i'm guessing other app developers could have
 the same requirement.

F5 for reload? sounds like a good use case for introducing standard shortcuts 
to QML as we have in the rest of Qt/KDE (also discussed @ devdays, btw).

beyond that, this sounds like it probably needs some design thinking (as 
opposed to drive hard and fast to the nearest implementation) to consider 
how to make keyboard triggable actions available in a way that works in a 
componentized environment (QWidgets also fails here, btw :)

 Perhaps it's better to just use this component as a desktop component
 only? Is there any way to enforce that?

currently, no.

-- 
Aaron J. Seigo

signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: RFC: Application wide shortcuts in QML

2012-12-11 Thread Aaron J. Seigo
On Friday, December 7, 2012 22:39:09 Mark wrote:
 Hi,
 
 I just made this blog post [1] and would like to see if i can include
 this - quite handy - QML component in the KDE imports. I think it fits
 quite nicely in the qtextracomponents import.
 
 The syntax is as follows (in QML):
 Shortcut {
 key: Ctrl+C
 onActivated: {
 console.log(JS:  + key +  pressed.)
 }
 }

From discussions had recently with qt devs, this will likely be coming in Qt 
5.1. I forget the exact API decided on (or if it has been decided on), but I'd 
be Ok with it only if the API of this component was the same as the Qt5 API 
will be so we don't have to maintain this API forever.

I'm also very hestitant to encourage plasmoids to implement app-wide key 
shortcuts. Might be nice(r) to automatically require ctrl (so it would be 
just: key: C) or some other modifier or even just disabled when in a shared-
space formfactor (vertical, horizontal, planar..); these need to be able to be 
kept manageable so plasmoids don't capture the same shortcuts (easy when you 
can have more than one instance of the plasmoid :)

-- 
Aaron J. Seigo

signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: RFC: Application wide shortcuts in QML

2012-12-11 Thread Mark
On Tue, Dec 11, 2012 at 3:02 PM, Aaron J. Seigo ase...@kde.org wrote:
 On Friday, December 7, 2012 22:39:09 Mark wrote:
 Hi,

 I just made this blog post [1] and would like to see if i can include
 this - quite handy - QML component in the KDE imports. I think it fits
 quite nicely in the qtextracomponents import.

 The syntax is as follows (in QML):
 Shortcut {
 key: Ctrl+C
 onActivated: {
 console.log(JS:  + key +  pressed.)
 }
 }

 From discussions had recently with qt devs, this will likely be coming in Qt
 5.1. I forget the exact API decided on (or if it has been decided on), but I'd
 be Ok with it only if the API of this component was the same as the Qt5 API
 will be so we don't have to maintain this API forever.

 I'm also very hestitant to encourage plasmoids to implement app-wide key
 shortcuts. Might be nice(r) to automatically require ctrl (so it would be
 just: key: C) or some other modifier or even just disabled when in a shared-
 space formfactor (vertical, horizontal, planar..); these need to be able to be
 kept manageable so plasmoids don't capture the same shortcuts (easy when you
 can have more than one instance of the plasmoid :)

 --
 Aaron J. Seigo
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel


Could you post a link to that Qt 5.1 api when you find it again? I did
a bit of searching, but nothing thus far.
As for limiting it's usage. In my case that would not work. I need F5
as well in my app so i'm guessing other app developers could have
the same requirement.

Perhaps it's better to just use this component as a desktop component
only? Is there any way to enforce that?
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel