Re: Maemo/Nokia n900

2010-06-08 Thread fluke box
Thanks Andre.
Sorry for cross posting. I wasn't sure where to ask this question.

Thanks,
flukebox


On Tue, Jun 8, 2010 at 9:08 PM, Andre Klapper wrote:

> Hi,
>
> Am Dienstag, den 08.06.2010, 20:50 +0530 schrieb fluke box:
> >Are N900 propriety libraries API available for developers ?
> >   If Yes, where can i find the documentation for the same ?
>
> Either http://library.maemodocs.nokia.com/fremantle/index.jsp or
> http://maemo.org/api_refs/5.0/5.0-final/
>
> andre
>
> (PS: Please don't cross-post if there is no need to.)
> --
> Andre Klapper (maemo.org bugmaster)
>
> ___
> maemo-users mailing list
> maemo-us...@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-users
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: How to get kinetic scrolling working using Qt creator

2010-06-08 Thread Sudheer K .

Daniil,

Yes, both horizontal and vertical scrolling are working with your code. Now how 
do we get this to work in my case? :)

In my case, I have a scrollAreaWidgetContents (QWidget) 798 x 476 added to 
scrollArea. I can not resize this object using Qt creator. Even if I try to 
change the ui header file directly outside Qt creator, scrolling is not 
enabled. The group boxes which are added to scrollAreaWidgetContents have a 
combined height of more than 500.

I have no clue why this doesn't work, unless groupboxes and/or form layouts 
does not support scrolling.

~Sudheer

> Date: Tue, 8 Jun 2010 17:02:55 +0300
> Subject: Re: How to get kinetic scrolling working using Qt creator
> From: daniil.iva...@gmail.com
> To: scifi@hotmail.com
> CC: maemo-developers@maemo.org
> 
> Hi Sudheer!
> 
> Can you try this sample application
> 
> #include 
> 
> int main (int argc, char **argv)
> {
> QApplication app(argc, argv);
> 
> QPixmap pixmap(1000, 1000);
> pixmap.fill(Qt::green);
> 
> QLabel *label = new QLabel;
> label->setPixmap(pixmap);
> 
> QScrollArea *scroll = new QScrollArea;
> scroll->setWidget(label);
> 
> QMainWindow win;
> win.setCentralWidget(scroll);
> win.show();
> 
> return app.exec();
> }
> 
> Thanks, Daniil.
> 
> On Tue, Jun 8, 2010 at 4:41 PM, Sudheer K.  wrote:
> >  I think my previous message was not posted because of attachments. So,
> > posting again with the link to the source code in garage page.
> >
> > https://garage.maemo.org/plugins/ggit/browse.php/?p=vicar;a=tree;f=src/vicar-config/uis;h=3e2e395c649bd1d5d92490fb2e959b734c77ab1a;hb=af05031713c05157ffb173c51beb8dfb29a6e2f8
> >
> >
> > Ram - I am using Qt creator to create .ui file. I have attached the ui file
> > and the header file generated by Qt creator. Any changes I make to the
> > header file will be overwritten. So I want to use Qt creator only. But the
> > code generated by Qt creator is similar to yours. I am using the QScrollArea
> > as well.
> >
> > Felipe - I am adding two groupboxes to the scroll area. The combined height
> > for these two boxes is more than 500 which should trigger scrolling. But it
> > doesn't :(
> >
> > Daniil - I am not using dpkg at this moment because I am not creating a deb.
> > I am using qmake and make to create the executable and running on device
> > using run-standalone.sh.
> >
> > Output from qmake -v
> > QMake version 2.01a
> > Using Qt version 4.6.2 in /usr/lib
> >
> > Can you look the ui file or header file in the link and tell me what could
> > be wrong here? I have only one field that is going off the screen.
> >
> > 
> > The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> > Get started.
> > ___
> > maemo-developers mailing list
> > maemo-developers@maemo.org
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >
> >
  
_
The New Busy think 9 to 5 is a cute idea. Combine multiple calendars with 
Hotmail. 
http://www.windowslive.com/campaign/thenewbusy?tile=multicalendar&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_5___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Maemo/Nokia n900

2010-06-08 Thread Andre Klapper
Hi,

Am Dienstag, den 08.06.2010, 20:50 +0530 schrieb fluke box:
>Are N900 propriety libraries API available for developers ?
>   If Yes, where can i find the documentation for the same ?

Either http://library.maemodocs.nokia.com/fremantle/index.jsp or
http://maemo.org/api_refs/5.0/5.0-final/

andre

(PS: Please don't cross-post if there is no need to.)
-- 
Andre Klapper (maemo.org bugmaster)

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Maemo/Nokia n900

2010-06-08 Thread fluke box
Hi All,
   Are N900 propriety libraries API available for developers ?
  If Yes, where can i find the documentation for the same ?

Thanks &Regards,
flukebox
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Daniil Ivanov
Hi Kimmo!

  You convinced me to report a bug ;)

Thanks, Daniil.

2010/6/8 Kimmo Hämäläinen :
> On Tue, 2010-06-08 at 16:05 +0200, ext Daniil Ivanov wrote:
>> Hi Kimmo!
>>
>> 2010/6/8 Kimmo Hämäläinen :
>> > On Tue, 2010-06-08 at 15:43 +0200, ext Daniil Ivanov wrote:
>> >> Hi Kimmo!
>> >>
>> >> It sets in case Qt::WA_Maemo5PortraitOrientation true
>> >>  Qt::WA_Maemo5LandscapeOrientation false
>> >> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
>> >> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 1
>> >
>> > What about in the case that you have only
>> > Qt::WA_Maemo5LandscapeOrientation set?
>>
>> If it's set to true, then no properties and if to false it will be as above.
>
> Sounds like hildon-desktop bug then. No properties should mean "only
> landscape".
>
> -Kimmo
>
>>
>> ~Daniil
>>
>> >> I just wonder what will happen if to set
>> >> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
>> >> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 0
>> >> for rest of two cases?
>> >
>> > I think SUPPORT=1 & REQUEST=0 is the same as "rotate automatically"
>> > nowadays.
>> >
>> > -Kimmo
>> >
>> >>
>> >> Thanks, Daniil.
>> >>
>> >> 2010/6/8 Kimmo Hämäläinen :
>> >> > On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
>> >> >> Hi,
>> >> >>
>> >> >>
>> >> >> In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
>> >> >> the main.cpp. The auto orientation works fine. However, I have some
>> >> >> stacked windows that I want to display only in landscape. I've tried
>> >> >> using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
>> >> >> creating the window or in the window it self, but it doesn't seem to
>> >> >> have any effect. How can I force some of the windows to be only
>> >> >> landscape?
>> >> >
>> >> > Could you check what xprop (in x11-utils package) shows about the window
>> >> > after setting this Qt::WA_Maemo5LandscapeOrientation?
>> >> >
>> >> > -Kimmo
>> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> Cheers,
>> >> >>
>> >> >>
>> >> >> Sascha
>> >> >
>> >> > ___
>> >> > maemo-developers mailing list
>> >> > maemo-developers@maemo.org
>> >> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>> >> >
>> >
>> >
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Kimmo Hämäläinen
On Tue, 2010-06-08 at 16:05 +0200, ext Daniil Ivanov wrote:
> Hi Kimmo!
> 
> 2010/6/8 Kimmo Hämäläinen :
> > On Tue, 2010-06-08 at 15:43 +0200, ext Daniil Ivanov wrote:
> >> Hi Kimmo!
> >>
> >> It sets in case Qt::WA_Maemo5PortraitOrientation true
> >>  Qt::WA_Maemo5LandscapeOrientation false
> >> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
> >> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 1
> >
> > What about in the case that you have only
> > Qt::WA_Maemo5LandscapeOrientation set?
> 
> If it's set to true, then no properties and if to false it will be as above.

Sounds like hildon-desktop bug then. No properties should mean "only
landscape".

-Kimmo

> 
> ~Daniil
> 
> >> I just wonder what will happen if to set
> >> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
> >> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 0
> >> for rest of two cases?
> >
> > I think SUPPORT=1 & REQUEST=0 is the same as "rotate automatically"
> > nowadays.
> >
> > -Kimmo
> >
> >>
> >> Thanks, Daniil.
> >>
> >> 2010/6/8 Kimmo Hämäläinen :
> >> > On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
> >> >> Hi,
> >> >>
> >> >>
> >> >> In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
> >> >> the main.cpp. The auto orientation works fine. However, I have some
> >> >> stacked windows that I want to display only in landscape. I've tried
> >> >> using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
> >> >> creating the window or in the window it self, but it doesn't seem to
> >> >> have any effect. How can I force some of the windows to be only
> >> >> landscape?
> >> >
> >> > Could you check what xprop (in x11-utils package) shows about the window
> >> > after setting this Qt::WA_Maemo5LandscapeOrientation?
> >> >
> >> > -Kimmo
> >> >
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> Cheers,
> >> >>
> >> >>
> >> >> Sascha
> >> >
> >> > ___
> >> > maemo-developers mailing list
> >> > maemo-developers@maemo.org
> >> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >> >
> >
> >

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Daniil Ivanov
Hi Kimmo!

2010/6/8 Kimmo Hämäläinen :
> On Tue, 2010-06-08 at 15:43 +0200, ext Daniil Ivanov wrote:
>> Hi Kimmo!
>>
>> It sets in case Qt::WA_Maemo5PortraitOrientation true
>>  Qt::WA_Maemo5LandscapeOrientation false
>> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
>> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 1
>
> What about in the case that you have only
> Qt::WA_Maemo5LandscapeOrientation set?

If it's set to true, then no properties and if to false it will be as above.

~Daniil

>> I just wonder what will happen if to set
>> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
>> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 0
>> for rest of two cases?
>
> I think SUPPORT=1 & REQUEST=0 is the same as "rotate automatically"
> nowadays.
>
> -Kimmo
>
>>
>> Thanks, Daniil.
>>
>> 2010/6/8 Kimmo Hämäläinen :
>> > On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
>> >> Hi,
>> >>
>> >>
>> >> In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
>> >> the main.cpp. The auto orientation works fine. However, I have some
>> >> stacked windows that I want to display only in landscape. I've tried
>> >> using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
>> >> creating the window or in the window it self, but it doesn't seem to
>> >> have any effect. How can I force some of the windows to be only
>> >> landscape?
>> >
>> > Could you check what xprop (in x11-utils package) shows about the window
>> > after setting this Qt::WA_Maemo5LandscapeOrientation?
>> >
>> > -Kimmo
>> >
>> >>
>> >>
>> >>
>> >>
>> >> Cheers,
>> >>
>> >>
>> >> Sascha
>> >
>> > ___
>> > maemo-developers mailing list
>> > maemo-developers@maemo.org
>> > https://lists.maemo.org/mailman/listinfo/maemo-developers
>> >
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to get kinetic scrolling working using Qt creator

2010-06-08 Thread Daniil Ivanov
Hi Sudheer!

Can you try this sample application

#include 

int main (int argc, char **argv)
{
QApplication app(argc, argv);

QPixmap pixmap(1000, 1000);
pixmap.fill(Qt::green);

QLabel *label = new QLabel;
label->setPixmap(pixmap);

QScrollArea *scroll = new QScrollArea;
scroll->setWidget(label);

QMainWindow win;
win.setCentralWidget(scroll);
win.show();

return app.exec();
}

Thanks, Daniil.

On Tue, Jun 8, 2010 at 4:41 PM, Sudheer K.  wrote:
>  I think my previous message was not posted because of attachments. So,
> posting again with the link to the source code in garage page.
>
> https://garage.maemo.org/plugins/ggit/browse.php/?p=vicar;a=tree;f=src/vicar-config/uis;h=3e2e395c649bd1d5d92490fb2e959b734c77ab1a;hb=af05031713c05157ffb173c51beb8dfb29a6e2f8
>
>
> Ram - I am using Qt creator to create .ui file. I have attached the ui file
> and the header file generated by Qt creator. Any changes I make to the
> header file will be overwritten. So I want to use Qt creator only. But the
> code generated by Qt creator is similar to yours. I am using the QScrollArea
> as well.
>
> Felipe - I am adding two groupboxes to the scroll area. The combined height
> for these two boxes is more than 500 which should trigger scrolling. But it
> doesn't :(
>
> Daniil - I am not using dpkg at this moment because I am not creating a deb.
> I am using qmake and make to create the executable and running on device
> using run-standalone.sh.
>
> Output from qmake -v
> QMake version 2.01a
> Using Qt version 4.6.2 in /usr/lib
>
> Can you look the ui file or header file in the link and tell me what could
> be wrong here? I have only one field that is going off the screen.
>
> 
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> Get started.
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Kimmo Hämäläinen
On Tue, 2010-06-08 at 15:43 +0200, ext Daniil Ivanov wrote:
> Hi Kimmo!
> 
> It sets in case Qt::WA_Maemo5PortraitOrientation true
>  Qt::WA_Maemo5LandscapeOrientation false
> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 1

What about in the case that you have only
Qt::WA_Maemo5LandscapeOrientation set?

> I just wonder what will happen if to set
> _HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
> _HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 0
> for rest of two cases?

I think SUPPORT=1 & REQUEST=0 is the same as "rotate automatically"
nowadays.

-Kimmo

> 
> Thanks, Daniil.
> 
> 2010/6/8 Kimmo Hämäläinen :
> > On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
> >> Hi,
> >>
> >>
> >> In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
> >> the main.cpp. The auto orientation works fine. However, I have some
> >> stacked windows that I want to display only in landscape. I've tried
> >> using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
> >> creating the window or in the window it self, but it doesn't seem to
> >> have any effect. How can I force some of the windows to be only
> >> landscape?
> >
> > Could you check what xprop (in x11-utils package) shows about the window
> > after setting this Qt::WA_Maemo5LandscapeOrientation?
> >
> > -Kimmo
> >
> >>
> >>
> >>
> >>
> >> Cheers,
> >>
> >>
> >> Sascha
> >
> > ___
> > maemo-developers mailing list
> > maemo-developers@maemo.org
> > https://lists.maemo.org/mailman/listinfo/maemo-developers
> >

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Daniil Ivanov
Hi Kimmo!

It sets in case Qt::WA_Maemo5PortraitOrientation true
 Qt::WA_Maemo5LandscapeOrientation false
_HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
_HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 1

I just wonder what will happen if to set
_HILDON_PORTRAIT_MODE_SUPPORT(CARDINAL) = 1
_HILDON_PORTRAIT_MODE_REQUEST(CARDINAL) = 0
for rest of two cases?

Thanks, Daniil.

2010/6/8 Kimmo Hämäläinen :
> On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
>> Hi,
>>
>>
>> In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
>> the main.cpp. The auto orientation works fine. However, I have some
>> stacked windows that I want to display only in landscape. I've tried
>> using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
>> creating the window or in the window it self, but it doesn't seem to
>> have any effect. How can I force some of the windows to be only
>> landscape?
>
> Could you check what xprop (in x11-utils package) shows about the window
> after setting this Qt::WA_Maemo5LandscapeOrientation?
>
> -Kimmo
>
>>
>>
>>
>>
>> Cheers,
>>
>>
>> Sascha
>
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: How to get kinetic scrolling working using Qt creator

2010-06-08 Thread Sudheer K .






 I think my previous message was not posted because of attachments. So, posting 
again with the link to the source code in garage page.

https://garage.maemo.org/plugins/ggit/browse.php/?p=vicar;a=tree;f=src/vicar-config/uis;h=3e2e395c649bd1d5d92490fb2e959b734c77ab1a;hb=af05031713c05157ffb173c51beb8dfb29a6e2f8



Ram - I am using Qt creator to create .ui file. I have attached the ui 
file and the header file generated by Qt creator. Any changes I make to 
the header file will be overwritten. So I want to use Qt creator only. 
But the code generated by Qt creator is similar to yours. I am using the
 QScrollArea as well. 

Felipe - I am adding two groupboxes to the
 scroll area. The combined height for these two boxes is more than 500 
which should trigger scrolling. But it doesn't :(

Daniil - I am 
not using dpkg at this moment because I am not creating a deb. I am 
using qmake and make to create the executable and running on device 
using run-standalone.sh. 

Output from qmake -v 
QMake 
version 2.01a
Using Qt version 4.6.2 in /usr/lib

Can you look 
the ui file or header file in the link and tell me what could be wrong 
here? I have only one field that is going off the screen.
  
_
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Help with dependencies needed

2010-06-08 Thread Chris Walker

On 08/06/10 08:15, daniel wilms wrote:

ext Chris Walker wrote:

On 02/06/10 13:27, daniel wilms wrote:

That has 2 lines of output :-

GNU nano 1.2.4 and 5.0update5 Fremantle


There is one newer update, but this should contain all the Qt libraries.


Can you clarify your first line please? Do you mean that the version
I'm running should contain all the Qt libraries or that the update
should contain them?

The version you are running contains the qt-libraries [1]. There is one
newer version (update 6) but the changes are minor. How did you install
the SDK?


I used the Debian 32 bit portion of an earlier version of this document 
- 
http://wiki.maemo.org/Documentation/Maemo5_Final_Installation#Installing_Maemo_5_SDK_on_x86-32_Debian_based_distribution


When I did the install, it was the beta version of the SDK but I *think* 
I've applied all the necessary updates.


I see that there is a GUI now to help with the install. Is it worthwhile 
my downloading and installing that, or is it unlikely to help with this 
problem?


Also available is is this - 
http://www.forum.nokia.com/Technology_Topics/Development_Platforms/Qt/?cp=1109A&entry=Qtdevelopmentarticle3


As my problem appears to be with the Qt libraries, is it worthwhile me 
grabbing that?


--
 __ __| |_ __ __  .---.
/ _/ _` \ V  V /  |  mailto:cdw_li...@the-walker-household.co.uk  |
\__\__,_|\_/\_/   |___|
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Kimmo Hämäläinen
On Tue, 2010-06-08 at 10:37 +0200, ext Sascha Mäkelä wrote:
> Hi,
> 
> 
> In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in
> the main.cpp. The auto orientation works fine. However, I have some
> stacked windows that I want to display only in landscape. I've tried
> using setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when
> creating the window or in the window it self, but it doesn't seem to
> have any effect. How can I force some of the windows to be only
> landscape?

Could you check what xprop (in x11-utils package) shows about the window
after setting this Qt::WA_Maemo5LandscapeOrientation?

-Kimmo

> 
> 
> 
> 
> Cheers,
> 
> 
> Sascha

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Strange problem with Maemo5ShowProgressIndicator

2010-06-08 Thread Robin Burchell
On Tue, Jun 8, 2010 at 1:35 PM, Daniil Ivanov  wrote:
> Hi Robin!
>
>   The question was how to make indicator to appear, not how to avoid
> blocking of UI
>   during long synchronous operation. Sleeping was used just as
> simulation of long blocking
>   operation.

Yes, I know what the question was. And my point is that really, if you
are performing blocking operations in the UI thread, you're probably
doing it wrong - and this is one of the symptoms you'll get as a
result. Others can include but are not limited to nothing responding
at all to presses, visual updates performing slowly (or not at all)
for e.g. progress bars..

It's possible to work around it, but that's compounding more wrong on
top of it. Users don't normally tend to like unresponsive UIs, long
operations that they can't cancel, etc.

In short, I'm pointing out that there is probably a better way to
solve this: by using an asynchronous operation, and cancelling the
progress indicator when the callback returns, or performing the slow
operation on a thread, and letting the GUI thread do what the GUI
thread does best: update the GUI.

An example of the former (asynchronous operation) can be seen at
http://gitorious.org/~w00t/qfacebookconnect/facebrick/blobs/master/src/newsfeedpostview_addcomment.cpp
- I'm also happy to explain this (both the concept and the example
code) in more detail to anyone who wants on IRC or mail.

Robin Burchell
mob: +447702671419
msn: m...@viroteck.net
irc: w00t @ irc.freenode.net
twr: http://twitter.com/w00teh
lac: http://identi.ca/w00t
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Strange problem with Maemo5ShowProgressIndicator

2010-06-08 Thread Daniil Ivanov
Hi Robin!

   The question was how to make indicator to appear, not how to avoid
blocking of UI
   during long synchronous operation. Sleeping was used just as
simulation of long blocking
   operation.

Thanks, Daniil.

On Tue, Jun 8, 2010 at 3:26 PM, Robin Burchell  wrote:
> On Tue, Jun 8, 2010 at 1:18 PM, Felipe Crochik  wrote:
>> Daniil: Thank you (again) for the clarification.
>> Sascha Mäkelä: this is a simpler way than the QTimer::singleshot. :)
>
> I should add that both sleeping and using a QTimer aren't really ideal
> solutions, as the UI will be unresponsive while processing is going
> on.
>
> Generally speaking, you should *try* to not perform
> blocking/synchronous operations unless you do them on a separate
> thread (see QRunnable, QThread, QtConcurrent). The other alternative
> is to use asynchronous equivilents to achieve what you're trying to
> do, for example, using QNetworkAccessManager to download content is
> asynchronous, and won't block the UI as a result. It's a little more
> difficult to write, but the benefits are quite nice. :-)
>
>> Felipe
>
>
> Robin Burchell
> mob: +447702671419
> msn: m...@viroteck.net
> irc: w00t @ irc.freenode.net
> twr: http://twitter.com/w00teh
> lac: http://identi.ca/w00t
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Strange problem with Maemo5ShowProgressIndicator

2010-06-08 Thread Robin Burchell
On Tue, Jun 8, 2010 at 1:18 PM, Felipe Crochik  wrote:
> Daniil: Thank you (again) for the clarification.
> Sascha Mäkelä: this is a simpler way than the QTimer::singleshot. :)

I should add that both sleeping and using a QTimer aren't really ideal
solutions, as the UI will be unresponsive while processing is going
on.

Generally speaking, you should *try* to not perform
blocking/synchronous operations unless you do them on a separate
thread (see QRunnable, QThread, QtConcurrent). The other alternative
is to use asynchronous equivilents to achieve what you're trying to
do, for example, using QNetworkAccessManager to download content is
asynchronous, and won't block the UI as a result. It's a little more
difficult to write, but the benefits are quite nice. :-)

> Felipe


Robin Burchell
mob: +447702671419
msn: m...@viroteck.net
irc: w00t @ irc.freenode.net
twr: http://twitter.com/w00teh
lac: http://identi.ca/w00t
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


RE: Strange problem with Maemo5ShowProgressIndicator

2010-06-08 Thread Felipe Crochik
Daniil: Thank you (again) for the clarification. 
Sascha Mäkelä: this is a simpler way than the QTimer::singleshot. :)

Felipe


-Original Message-
From: Daniil Ivanov [mailto:daniil.iva...@gmail.com] 
Sent: Tuesday, June 08, 2010 4:55 AM
To: Felipe Crochik
Cc: Sascha Mäkelä; maemo-developers
Subject: Re: Strange problem with Maemo5ShowProgressIndicator

Hi Felipe!

  This is not related to window manager as it's a separate process.
Simply changing
  attributes is done through event mechanism.

  Consider this application:

  #include 

int main (int argc, char **argv)
{
QApplication app(argc, argv);

QMainWindow win;
win.show();

QMessageBox::StandardButton reply;
reply = QMessageBox::warning(&win,
 QObject::tr("Title"),
QObject::tr("Message"),
 QMessageBox::Yes | QMessageBox::No);
if (reply == QMessageBox::Yes) {
win.setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
app.processEvents();
sleep(5);
win.setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
}

return app.exec();
}


Thanks, Daniil.

On Tue, Jun 8, 2010 at 12:37 AM, Felipe Crochik  wrote:
> The window manager has to get a chance to process the message queue in
order
> to show the Progress Indicator. It works not because is outside the if but
> because it is before you show the dialog window.
>
> One possible approach is to set the progress indicator but start the
> "processing" using a QTimer::singleShot... this will give the window
manager
> time to process the queue and show the progress indicator.
>
> To double check you can just remove the "
> QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);" from
your
> first example and you will notice that after the processing is done you
will
> see the progress indicator.
>
>
> -Original Message-
> From: maemo-developers-boun...@maemo.org
> [mailto:maemo-developers-boun...@maemo.org] On Behalf Of Sascha Mäkelä
> Sent: Monday, June 07, 2010 5:25 PM
> To: maemo-developers
> Subject: Strange problem with Maemo5ShowProgressIndicator
>
> Hi,
> I'm having a strange problem with Maemo5ShowProgressIndicator. My code
> looks like this:
>
>    QMessageBox::StandardButton reply;
>    reply = QMessageBox::warning(this, tr("Warning!"),
>                                 QMessageBox::Yes | QMessageBox::No);
>    if (reply == QMessageBox::Yes) {
>        QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
>        // do something...
>        QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
>    }
>
> I get no progress indicator with the previous code. However, when I
> take it out from the IF statement, it does work. Looking like this:
>
>    QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
>     QMessageBox::StandardButton reply;
>    reply = QMessageBox::warning(this, tr("Warning!"),
>                                 QMessageBox::Yes | QMessageBox::No);
>    if (reply == QMessageBox::Yes) {
>        // do something...
>        QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
>    }
>
> But of course this way the indicator starts too early or shouldn't
> start at all. Am I doing something wrong?
>
> Cheers,
>
> Sascha
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Ram Kurvakat
also I think you need to setAttribute(Qt::WA_Maemo5AutoOrientation, true) on a 
QMainWindow to set that to landscape afterwards.

Haven't checked if its a widget/application attribute also.

-krk969


- Original Message -
From: Ram Kurvakat
Sent: 06/08/10 12:10 PM
To: Sascha Mäkelä, maemo-developers
Subject: Re: How to force landscape mode in Qt 4.6.2?

sorry my browser acts funny sometimes so my previous message was incomplete...

one way would be to disable the accelerometer, saves battery as well if its not 
needed.

QDBusConnection::systemBus().call(QDBusMessage::createMethodCall(MCE_SERVICE, 
MCE_REQUEST_PATH,
 MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ));


-krk969



- Original Message -
From: Sascha Mäkelä
Sent: 06/08/10 09:37 AM
To: maemo-developers
Subject: How to force landscape mode in Qt 4.6.2?

Hi,

In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in the 
main.cpp. The auto orientation works fine. However, I have some stacked windows 
that I want to display only in landscape. I've tried using 
setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when creating the window 
or in the window it self, but it doesn't seem to have any effect. How can I 
force some of the windows to be only landscape?

Cheers,

Sascha
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Ram Kurvakat
sorry my browser acts funny sometimes so my previous message was incomplete...

one way would be to disable the accelerometer, saves battery as well if its not 
needed.

QDBusConnection::systemBus().call(QDBusMessage::createMethodCall(MCE_SERVICE, 
MCE_REQUEST_PATH,
 MCE_REQUEST_IF, MCE_ACCELEROMETER_DISABLE_REQ));


-krk969



- Original Message -
From: Sascha Mäkelä
Sent: 06/08/10 09:37 AM
To: maemo-developers
Subject: How to force landscape mode in Qt 4.6.2?

Hi,

In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in the 
main.cpp. The auto orientation works fine. However, I have some stacked windows 
that I want to display only in landscape. I've tried using 
setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when creating the window 
or in the window it self, but it doesn't seem to have any effect. How can I 
force some of the windows to be only landscape?

Cheers,

Sascha
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Ram Kurvakat
one way would be to disable the accelerometer, saves battery as well if its not 
needed.



- Original Message -
From: Sascha Mäkelä
Sent: 06/08/10 09:37 AM
To: maemo-developers
Subject: How to force landscape mode in Qt 4.6.2?

Hi,

In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in the 
main.cpp. The auto orientation works fine. However, I have some stacked windows 
that I want to display only in landscape. I've tried using 
setAttribute(Qt::WA_Maemo5LandscapeOrientation, true) when creating the window 
or in the window it self, but it doesn't seem to have any effect. How can I 
force some of the windows to be only landscape?

Cheers,

Sascha
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Strange problem with Maemo5ShowProgressIndicator

2010-06-08 Thread Daniil Ivanov
Hi Felipe!

  This is not related to window manager as it's a separate process.
Simply changing
  attributes is done through event mechanism.

  Consider this application:

  #include 

int main (int argc, char **argv)
{
QApplication app(argc, argv);

QMainWindow win;
win.show();

QMessageBox::StandardButton reply;
reply = QMessageBox::warning(&win,
 QObject::tr("Title"), QObject::tr("Message"),
 QMessageBox::Yes | QMessageBox::No);
if (reply == QMessageBox::Yes) {
win.setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
app.processEvents();
sleep(5);
win.setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
}

return app.exec();
}


Thanks, Daniil.

On Tue, Jun 8, 2010 at 12:37 AM, Felipe Crochik  wrote:
> The window manager has to get a chance to process the message queue in order
> to show the Progress Indicator. It works not because is outside the if but
> because it is before you show the dialog window.
>
> One possible approach is to set the progress indicator but start the
> "processing" using a QTimer::singleShot... this will give the window manager
> time to process the queue and show the progress indicator.
>
> To double check you can just remove the "
> QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);" from your
> first example and you will notice that after the processing is done you will
> see the progress indicator.
>
>
> -Original Message-
> From: maemo-developers-boun...@maemo.org
> [mailto:maemo-developers-boun...@maemo.org] On Behalf Of Sascha Mäkelä
> Sent: Monday, June 07, 2010 5:25 PM
> To: maemo-developers
> Subject: Strange problem with Maemo5ShowProgressIndicator
>
> Hi,
> I'm having a strange problem with Maemo5ShowProgressIndicator. My code
> looks like this:
>
>    QMessageBox::StandardButton reply;
>    reply = QMessageBox::warning(this, tr("Warning!"),
>                                 QMessageBox::Yes | QMessageBox::No);
>    if (reply == QMessageBox::Yes) {
>        QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
>        // do something...
>        QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
>    }
>
> I get no progress indicator with the previous code. However, when I
> take it out from the IF statement, it does work. Looking like this:
>
>    QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, true);
>     QMessageBox::StandardButton reply;
>    reply = QMessageBox::warning(this, tr("Warning!"),
>                                 QMessageBox::Yes | QMessageBox::No);
>    if (reply == QMessageBox::Yes) {
>        // do something...
>        QWidget::setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
>    }
>
> But of course this way the indicator starts too early or shouldn't
> start at all. Am I doing something wrong?
>
> Cheers,
>
> Sascha
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers
>
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


How to force landscape mode in Qt 4.6.2?

2010-06-08 Thread Sascha Mäkelä
Hi,

In my app I have setAttribute(Qt::WA_Maemo5AutoOrientation, true) in the
main.cpp. The auto orientation works fine. However, I have some stacked
windows that I want to display only in landscape. I've tried using
setAttribute(Qt::WA_Maemo5LandscapeOrientation,
true) when creating the window or in the window it self, but it doesn't seem
to have any effect. How can I force some of the windows to be only
landscape?


Cheers,

Sascha
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Something quite amazing (and simple): QtContacts 1.0 on qt Nokia SDK beta

2010-06-08 Thread daniel wilms

Hi,

ext Felipe Crochik wrote:

I don't know if this was just a happy accident but I just compiled my
application using Qt Contacts 1.0 mobility library on qt sdk beta and was
able to have it deployed to my phone automatically.

As most using qt sdk probably knows the mobility packages included with the
sdk are not release 1.0. 


After asking around and looking for a solution I decided to just mess around
and try... maybe there is a better way but I failed to find it.

  


the newest MADDE update (0.6.72) has the 1.0 Qt Mobility libraries. You 
can configure your QtCreator to use that one [1].


1. http://wiki.maemo.org/MADDE

Daniel


IMPORTANT: I don't recommend...if you can...just wait for the official
release :)

In case anybody is feeling adventurous the steps were quite simple:

1. Copy the headers for the contacts module from scratchbox to 
C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1014-slim\usr\inclu

de

(in order to find out which ones I needed I compiled just the contacts
module from qt mobility on scratchbox and installed it to a blank folder - I
can provide the list of files)

2. Copy the "library" (libqtContacts.so*) from your scratchbox (or device)
to 
C:\NokiaQtSDK\Maemo\4.6.2\sysroots\fremantle-arm-sysroot-1014-slim\usr\lib


Not sure if this applies to any other environment (than windows) and/or will
work for any other mobility package but for now it seems to have worked for
the contacts module at least on windows.

It does make life MUCH easier... too bad it took me all this time to try it.

Please be aware that I don't have any reason to believe (and neither should
you) that this will not cause some unexpected problems ... All that I know
is that apparently worked just for one application I tested. 


Felipe

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers
  


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: Help with dependencies needed

2010-06-08 Thread daniel wilms

ext Chris Walker wrote:

On 02/06/10 13:27, daniel wilms wrote:
  

That has 2 lines of output :-

GNU nano 1.2.4 and 5.0update5 Fremantle

  

There is one newer update, but this should contain all the Qt libraries.



Can you clarify your first line please? Do you mean that the version I'm 
running should contain all the Qt libraries or that the update should 
contain them? 
The version you are running contains the qt-libraries [1]. There is one 
newer version (update 6) but the changes are minor. How did you install 
the SDK?



1. 
http://repository.maemo.org/stable/fremantle/maemo5.0_update5_vs_maemo5.0_update6_content_comparison.html


Daniel

If so, how can I load that update because when I issue the 
'apt-get update' instruction, it tells me it's up-to-date.


 > Are you starting the program and the Fremantle application framework
 > (af-sb-init.sh start) from the X86 target?

Yep. The prompt from where I launch the dpkg -i instruction is
'sbox-FREMANTLE_X86' and I've issued the 'sb-conf se FREMANTLE_X86' 
instruction to arrive there.


  


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: osso_initialize: how to make it work?

2010-06-08 Thread Kimmo Hämäläinen
On Mon, 2010-06-07 at 22:26 +0200, ext maemo.me...@spamgourmet.com
wrote:
> OK, it's the run-standalone.sh thing.  I remember now, that was a 
> constant irritation when I was trying to fix bugs in Modest.  I never 
> fully understood it.  Is that thing documented anywhere, is there any 
> in-depth discussion of why it's necessary and how to use it?  It really 
> makes every step in the development process very painful.

libosso connects to both D-Bus daemons: the system and session bus.
run-standalone.sh just defines the environment variable so that it knows
how to connect to the D-Bus session bus (there could be many of them).
You don't need that script when you develop in the device (environment
is defined there at login time).  Just ask if you have questions, I
happen to know something about the horrible libosso :)

-Kimmo

> 
> By the way, osso_initialize seems to work just fine without either 
> gtk_init or hildon_init.  But no doubt failing to initialise one of 
> those will cause various kinds of hell later on.  Is this dependency 
> documented anywhere?
> 
> On 07/06/10 21:05, Faheem Pervez - tripp...@gmail.com wrote:
> > OSSO == Open Source Software Operations (which is funny and now
> > defunct, but I won't go into it here).
> >
> > If you're running on the device, make sure you're running as user and
> > not root (or at least using run-standalone.sh).
> >
> > If you're running in Scratchbox, make sure to "af-sb-init.sh start"
> > and run the program using run-standalone.sh
> >
> > Oh, note that some aspects of libosso will require a GLib mainloop,
> > whilst others require GTK+ to be initialized, as in Mr. Ivanov's reply
> > (osso_cp_plugin_execute () springs to mind).
> > On 6/7/10, maemo.me...@spamgourmet.com  wrote:
> >> I've been scouring the documentation on maemo.org and getting pretty
> >> frustrated.  Almost none of it is up to date, and almost none of it is
> >> relevant to a beginning developer.  So:
> >>
> >> Here is my code:
> >>
> >> #include
> >> #include
> >>
> >> int main(int argc, char* argv[])
> >> {
> >>   osso_context_t* osso;
> >>
> >>   osso = osso_initialize("name.exon.mapcacher", "20100529", TRUE,  
> >> NULL);
> >>   if (!osso)
> >>   {
> >>   printf("Failed to initialise osso\n");
> >>   return 1;
> >>   }
> >>
> >>   return 0;
> >> }
> >>
> >> Here is the output:
> >>
> >> Failed to initialise osso
> >>
> >> Why?
> >>
> >> Also, what does "osso" mean?  Years of using Maemo, I've never figured
> >> that out.
> >>
> >> Is there any genuine getting started tutorial showing how to write a
> >> program that actually works in Maemo?  Is there a hello world
> >> application that's less than a hundred lines, with an explanation of
> >> what all those lines are for?
> >>
> >> ___
> >> maemo-developers mailing list
> >> maemo-developers@maemo.org
> >> https://lists.maemo.org/mailman/listinfo/maemo-developers
> >>
> >
> 
> 
> ___
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers