Re: [Qt5-feedback] Global shortcut proposal

2011-10-21 Thread Robin Burchell
Hi Mark,

(note: now that http://qt-project.org is up and running, I'd suggest
you subscribe there and start directing questions to those MLs,
hopefully e.g. the development list will see some activity..)

On Tue, Oct 18, 2011 at 8:33 PM, Mark mark...@gmail.com wrote:
 I want to adjust QShortcut to use it for global shortcuts as well

Nice one!

 Now some questions pop up. It has been said that (global) shortcuts should
 probably be handled through the window manager. In Qt's case that means (?)
 through LightHouse right?

This is going to be platform-dependent, which will definitely involve
lighthouse.

 But how am i supposed to do that? Where is lighthouse even hidden?

You probably want to be looking at the qtbase repository,
specifically, qtbase/src/plugins/platforms/.

 And what happened to QtCore? Is that now QtBase?

Modules and repositories are not a 1:1 mapping, for various reasons
and I'm not the best person to talk about that. But basically, qtbase
is where an awful lot of stuff like qtcore and the platform plugins
live, so that's a good first bet fore 'core' functionality. Most of
the others are fairly self-explanatory, I think, perhaps with the
exception of 'qtpim' which appears to contain the Contacts, Organizer,
etc functionality formerly from Mobility.

 So where do i get started with this?

Assuming you have a working Qt5 build already: have at it. Hack away,
write autotests for your code as much as possible, test your
functionality by writing an example app(s) using it... whatever you
want.

If you don't, then take a look at the README in the Qt5 repo for help
on getting set up (note: you apparently also need to pass '-qpa' to
configure as of recently, I plan to submit a change adding some more
docs to all of that. If configure fails, try adding a '-v' parameter,
too, to see why.)

Pop onto #qt-labs on freenode if you aren't there already, too. Lots
of helpful folks around, just be a bit patient for answers,
particularly if you're asking outside of european office hours.. :)

BR,

Robin
___
Qt5-feedback mailing list
Qt5-feedback@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback


Re: [Qt5-feedback] Global shortcut proposal

2011-10-21 Thread Mark
On Fri, Oct 21, 2011 at 8:07 PM, Robin Burchell robin...@viroteck.netwrote:

 Hi Mark,

 (note: now that http://qt-project.org is up and running, I'd suggest
 you subscribe there and start directing questions to those MLs,
 hopefully e.g. the development list will see some activity..)


Another ml..


 On Tue, Oct 18, 2011 at 8:33 PM, Mark mark...@gmail.com wrote:
  I want to adjust QShortcut to use it for global shortcuts as well

 Nice one!

  Now some questions pop up. It has been said that (global) shortcuts
 should
  probably be handled through the window manager. In Qt's case that means
 (?)
  through LightHouse right?

 This is going to be platform-dependent, which will definitely involve
 lighthouse.


  But how am i supposed to do that? Where is lighthouse even hidden?

 You probably want to be looking at the qtbase repository,
 specifically, qtbase/src/plugins/platforms/.


oke, cool. Good to see that all key shortcuts are already in those platform
plugins. Now i guess i need to figure out where you guys have hidden the
QShortcut source ;) and just start hacking and trying.


  And what happened to QtCore? Is that now QtBase?

 Modules and repositories are not a 1:1 mapping, for various reasons
 and I'm not the best person to talk about that. But basically, qtbase
 is where an awful lot of stuff like qtcore and the platform plugins
 live, so that's a good first bet fore 'core' functionality. Most of
 the others are fairly self-explanatory, I think, perhaps with the
 exception of 'qtpim' which appears to contain the Contacts, Organizer,
 etc functionality formerly from Mobility.

 Thanx for explaining that.


  So where do i get started with this?

 Assuming you have a working Qt5 build already: have at it. Hack away,
 write autotests for your code as much as possible, test your
 functionality by writing an example app(s) using it... whatever you
 want.


Nope, not done a thing with it yet.


 If you don't, then take a look at the README in the Qt5 repo for help
 on getting set up (note: you apparently also need to pass '-qpa' to
 configure as of recently, I plan to submit a change adding some more
 docs to all of that. If configure fails, try adding a '-v' parameter,
 too, to see why.)


Ahh, black magic ;) Will do.


 Pop onto #qt-labs on freenode if you aren't there already, too. Lots
 of helpful folks around, just be a bit patient for answers,
 particularly if you're asking outside of european office hours.. :)


Will do as well. Haven't been there in a while.

BR,

 Robin


Thank you for your reply.
___
Qt5-feedback mailing list
Qt5-feedback@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback


Re: [Qt5-feedback] Global shortcut proposal

2011-10-21 Thread Olivier Goffart
On Friday 21 October 2011 19:50:33 Mark wrote:
 On Tue, Oct 18, 2011 at 8:33 PM, Mark mark...@gmail.com wrote:
  Hi,
  
  I want to adjust QShortcut to use it for global shortcuts as well and
  would like to lay out my idea on how i intend to do that. Any feedback
  on it would be more then welcome.
  
  The first thing to do is add an enum value to Qt::ShortcutContext
  http://doc.qt.nokia.com/latest/qt.html#ShortcutContext-enum:
  Qt::SystemShortcut (that becomes value 5) with the description: The
  shortcut is active in a system wide context when the application is
  running.
  
  Next up is probably (being optimistic here) tweaking the eventFilter of
  the QShortcut class to act on global shortcuts for Windows, Linux and
  MAC when the Qt::SystemShortcut enum is set.

This was discussed before, and the problem is that one would want a framework 
to register the global shortcut into a central place on the system that handle 
conflicts in shortcut and proper configuration.
KDE has such a thing, i don't know about the other systems.

  
  Now some questions pop up. It has been said that (global) shortcuts
  should probably be handled through the window manager. In Qt's case
  that means (?) through LightHouse right?

Not really.
Qt application need to work on all the platform and window manager.

  But how am i supposed to do that? Where is lighthouse even hidden?
  And what happened to QtCore? Is that now QtBase?

Lighthouse is the codename for QPA. That is, the windowing system abstraction 
layer and its plugins.
The abstraction layer is in QtGui (all the files with _qpa), the plugins are 
in src/plugins/platforms

Considering global shortcut is part of that, i guess you need to add some 
interface in the abstraction layer, and then a specific implementation for 
each platform in the plugins.
Note that this would only be the client code.


The server side framework to handle the registration or the conflicts is 
outside of the scope of Qt. 


  So where do i get started with this?

Checkout the code, open the editor :-)

  And I've never build Qt 5 yet nor did i ever contribute actual code to
  it.. so that's gonna be interesting.

Everything has a begining :-)


But you should definitively look at previous implemntations (such as the one 
in qxt). And in particular how the kde infrastructure works, because it would 
be nice if it was integrated into it.

That said, being perfect the first time is not possible.

___
Qt5-feedback mailing list
Qt5-feedback@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback


[Qt5-feedback] Global shortcut proposal

2011-10-18 Thread Mark
Hi,

I want to adjust QShortcut to use it for global shortcuts as well and would
like to lay out my idea on how i intend to do that. Any feedback on it would
be more then welcome.

The first thing to do is add an enum value to Qt::ShortcutContext
http://doc.qt.nokia.com/latest/qt.html#ShortcutContext-enum:
Qt::SystemShortcut (that becomes value 5) with the description: The
shortcut is active in a system wide context when the application is
running.

Next up is probably (being optimistic here) tweaking the eventFilter of the
QShortcut class to act on global shortcuts for Windows, Linux and MAC when
the Qt::SystemShortcut enum is set.

Now some questions pop up. It has been said that (global) shortcuts should
probably be handled through the window manager. In Qt's case that means (?)
through LightHouse right?
But how am i supposed to do that? Where is lighthouse even hidden?
And what happened to QtCore? Is that now QtBase?

So where do i get started with this?
And I've never build Qt 5 yet nor did i ever contribute actual code to it..
so that's gonna be interesting.

A lot of questions ;)

Thanx in favor,
Mark
___
Qt5-feedback mailing list
Qt5-feedback@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback