Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

How to switch an app to portrait mode (Qt)? Xrandr?

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


vivainio at gmail

Oct 16, 2009, 4:44 AM

Post #1 of 6 (814 views)
Permalink
How to switch an app to portrait mode (Qt)? Xrandr?

I have a QTextBrowser that I want to show in portrait mode. How can I
do that? Is there a solution that works with both Diablo and
Fremantle? Should I use xrandr, or is there a "better supported"
(higher level) way?

--
Ville M. Vainio
http://tinyurl.com/vainio
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


martin.grimme at gmail

Oct 16, 2009, 4:58 AM

Post #2 of 6 (793 views)
Permalink
Re: How to switch an app to portrait mode (Qt)? Xrandr? [In reply to]

Hi,

the correct way (if the toolkit doesn't support hildon rotation) is to
use the X-Atoms

_HILDON_PORTRAIT_MODE_SUPPORT

and

_HILDON_PORTRAIT_MODE_REQUEST

(CARDINAL, 32bit, value either "1" or "0")

The SUPPORT atom is always needed on a window that allows portrait
mode. The device immediately switches back to landscape mode once it
opens a window without the SUPPORT atom.
The REQUEST atom requests portrait mode. The device remains in
portrait mode as long as the requesting window is visible and no
dialog windows above it lack the SUPPORT atom.


Martin

2009/10/16, Ville M. Vainio <vivainio [at] gmail>:
> I have a QTextBrowser that I want to show in portrait mode. How can I
> do that? Is there a solution that works with both Diablo and
> Fremantle? Should I use xrandr, or is there a "better supported"
> (higher level) way?
>
> --
> Ville M. Vainio
> http://tinyurl.com/vainio
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


martin.grimme at gmail

Oct 16, 2009, 4:59 AM

Post #3 of 6 (798 views)
Permalink
Re: How to switch an app to portrait mode (Qt)? Xrandr? [In reply to]

For Diablo you should use xrandr, though.
The hildon X atoms are not supported there, as there is no official
rotation support.


Martin

2009/10/16, Martin Grimme <martin.grimme [at] gmail>:
> Hi,
>
> the correct way (if the toolkit doesn't support hildon rotation) is to
> use the X-Atoms
>
> _HILDON_PORTRAIT_MODE_SUPPORT
>
> and
>
> _HILDON_PORTRAIT_MODE_REQUEST
>
> (CARDINAL, 32bit, value either "1" or "0")
>
> The SUPPORT atom is always needed on a window that allows portrait
> mode. The device immediately switches back to landscape mode once it
> opens a window without the SUPPORT atom.
> The REQUEST atom requests portrait mode. The device remains in
> portrait mode as long as the requesting window is visible and no
> dialog windows above it lack the SUPPORT atom.
>
>
> Martin
>
> 2009/10/16, Ville M. Vainio <vivainio [at] gmail>:
>> I have a QTextBrowser that I want to show in portrait mode. How can I
>> do that? Is there a solution that works with both Diablo and
>> Fremantle? Should I use xrandr, or is there a "better supported"
>> (higher level) way?
>>
>> --
>> Ville M. Vainio
>> http://tinyurl.com/vainio
>> _______________________________________________
>> maemo-developers mailing list
>> maemo-developers [at] maemo
>> https://lists.maemo.org/mailman/listinfo/maemo-developers
>>
>
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


vivainio at gmail

Oct 16, 2009, 5:11 AM

Post #4 of 6 (786 views)
Permalink
Re: How to switch an app to portrait mode (Qt)? Xrandr? [In reply to]

On Fri, Oct 16, 2009 at 3:02 PM, Antonio Aloisio
<antonio.aloisio [at] gmail> wrote:

> in Diablo there are no supported mode. maybe you can embed QTextBrowser in a
> graphic widget. In Fremantle you can use some atoms. We have an API in our

Thanks, embedding it in graphics view sounds like just the ticket
(event if it bloats the originally-simple scheme a little bit). I'll
try it out.

--
Ville M. Vainio
http://tinyurl.com/vainio
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


jesus.palencia at openbossa

Oct 16, 2009, 6:01 AM

Post #5 of 6 (785 views)
Permalink
Re: How to switch an app to portrait mode (Qt)? Xrandr? [In reply to]

Please let us know if it worked!

I've tried that last week but had no success at all.


cheers,
jesus

2009/10/16 Ville M. Vainio <vivainio [at] gmail>

> On Fri, Oct 16, 2009 at 3:02 PM, Antonio Aloisio
> <antonio.aloisio [at] gmail> wrote:
>
> > in Diablo there are no supported mode. maybe you can embed QTextBrowser
> in a
> > graphic widget. In Fremantle you can use some atoms. We have an API in
> our
>
> Thanks, embedding it in graphics view sounds like just the ticket
> (event if it bloats the originally-simple scheme a little bit). I'll
> try it out.
>
> --
> Ville M. Vainio
> http://tinyurl.com/vainio
> _______________________________________________
> maemo-developers mailing list
> maemo-developers [at] maemo
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>


vivainio at gmail

Oct 20, 2009, 5:43 AM

Post #6 of 6 (726 views)
Permalink
Re: How to switch an app to portrait mode (Qt)? Xrandr? [In reply to]

On Fri, Oct 16, 2009 at 4:01 PM, Jesus Sanchez-Palencia
<jesus.palencia [at] openbossa> wrote:

> Please let us know if it worked!
>
> I've tried that last week but had no success at all.

I sort of lost the ambition after seeing how well this works:

http://wiki.maemo.org/Rotation

--
Ville M. Vainio
http://tinyurl.com/vainio
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.