Active Topics

 



Notices


Reply
Thread Tools
Posts: 22 | Thanked: 54 times | Joined on Apr 2007 @ Guernsey
#361
I managed to eventually find the problem with the app I posted about earlier. It had some language definitions in the .jad file and one of these had a tab instead of a space which phoneme didn't seem to like, although it worked like that on the N8. I don't know whether that is something that is technically against spec but is permitted in some implementations.

The only slight issues I have now is that the menus in the app are a little small to be touch friendly, and I would prefer if the keyboard automatically appeared when the field was selected or was permanently shown.
 
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#362
Originally Posted by DavyP View Post
Thanks for the help. I found this on another website,

http://www.mynokian900.com/2011/03/p...r-maemo-5-cssu

but I don't have these options, only:
-Clock & Alarms
-Profile
-Internet connection
-Bluetooth
-USB connected

I guess I need to install a package called status-area-orientationlock-applet to enable this feature

Davy
OK, I got it working now, but only with the option forcerotation=1.
I actually think during my previous attempts I rotated the device in
the wrong direction (causing it to stay in landscape mode).

Davy
 

The Following User Says Thank You to DavyP For This Useful Post:
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#363
Originally Posted by pepitoe View Post
I managed to eventually find the problem with the app I posted about earlier. It had some language definitions in the .jad file and one of these had a tab instead of a space which phoneme didn't seem to like, although it worked like that on the N8. I don't know whether that is something that is technically against spec but is permitted in some implementations.

The only slight issues I have now is that the menus in the app are a little small to be touch friendly, and I would prefer if the keyboard automatically appeared when the field was selected or was permanently shown.
Nice catch. Not sure what the spec says, but I used the manifest
parser to read the contents of jad files. Also, some lines seem
to be longer than 72 characters. Normally these lines would be
wrapped.

I have been looking into hooking up the native virtual keyboard,
but I have not been able to get it properly working yet.

Davy
 

The Following User Says Thank You to DavyP For This Useful Post:
Posts: 136 | Thanked: 19 times | Joined on Nov 2011 @ Hungary
#364
I tried the latest build on N9. It's great, it didn't overwrite Opera Mini, so all settings remain. It works properly in portrait mode too.
One thing is missing: usage of accelerometer. If you want to change between portrait and landscape mode you have to do it in the settings.

Thanks for your work.
 
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#365
Originally Posted by Arthuro_Adam View Post
I tried the latest build on N9. It's great, it didn't overwrite Opera Mini, so all settings remain. It works properly in portrait mode too.
One thing is missing: usage of accelerometer. If you want to change between portrait and landscape mode you have to do it in the settings.

Thanks for your work.
Thanks for testing

Yes, I agree. On the N900, the auto-rotation happens out of the
box with the latest software upgrades and if you force allow
rotation for all devices. If you rotate your device, the Qt4 window
gets a window resize event which I then interpret to force
re-render the midlet in the new display size.

I have no idea whether auto-rotation works out of the box for all
other applications on the N9, and whether you need to modify
your application to support this. However, while it is technically
possible to monitor the accelerometer, I do think that auto-rotation
is a feature that MeeGo should handle (through passing events to
the applications), and not every application on its own.

Cheers,
Davy
 

The Following 2 Users Say Thank You to DavyP For This Useful Post:
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#366
I did some investigation, and it seems that Qt4 applications based on
QWidget() don't auto-rate on MeeGo. Unfortunately, that is what I use.

So, for auto-rotation to work on the N9, the UI front-end needs to be
rewritten using the MeeGo Touch APIs.

Davy
 
Posts: 136 | Thanked: 19 times | Joined on Nov 2011 @ Hungary
#367
Thanks, so for autorotation, we have to find somebody, who can rewrite the UI front-end?
 
Posts: 3,074 | Thanked: 12,964 times | Joined on Mar 2010 @ Sofia,Bulgaria
#368
Originally Posted by DavyP View Post
I did some investigation, and it seems that Qt4 applications based on
QWidget() don't auto-rate on MeeGo. Unfortunately, that is what I use.

So, for auto-rotation to work on the N9, the UI front-end needs to be
rewritten using the MeeGo Touch APIs.

Davy
Well, no idea how it is on Harmattan, but judging from my experience with Qt on Maemo5, one should listen to QDesktopWidget::resized signal and decide on current orientation. You have CSSU with forced rotation enabled, so h-d rotates applications no matter if they want to be rotated. Don't rely on that. The correct way is:

in you MainWindow::MainWindow() you should:

Code:
    setAttribute(Qt::WA_Maemo5AutoOrientation, true);
    connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
and in orientationChanged() slot

Code:
    QRect screenGeometry = QApplication::desktop()->screenGeometry();
    setUpdatesEnabled(false);

    if (screenGeometry.width() > screenGeometry.height())
    {
        /* Do landscape stuff */
    }
    else
    {
        /* Do portrait stuff */
    }
    setUpdatesEnabled(true);
 

The Following 3 Users Say Thank You to freemangordon For This Useful Post:
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#369
Originally Posted by freemangordon View Post
Well, no idea how it is on Harmattan, but judging from my experience with Qt on Maemo5, one should listen to QDesktopWidget::resized signal and decide on current orientation. You have CSSU with forced rotation enabled, so h-d rotates applications no matter if they want to be rotated. Don't rely on that. The correct way is:

in you MainWindow::MainWindow() you should:

Code:
    setAttribute(Qt::WA_Maemo5AutoOrientation, true);
    connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
and in orientationChanged() slot

Code:
    QRect screenGeometry = QApplication::desktop()->screenGeometry();
    setUpdatesEnabled(false);

    if (screenGeometry.width() > screenGeometry.height())
    {
        /* Do landscape stuff */
    }
    else
    {
        /* Do portrait stuff */
    }
    setUpdatesEnabled(true);
I do it a bit differently. I actually don't care if I am in landscape or
portrait mode. If I just get informed after rotation, that the window
width and height has changed, that is all I need.

Based on what I have read, it is a limitation of pure Qt4 on MeeGo.
The MeeGo SDK has APIs that are somewhat similar to Qt4. I
might have a go at implement it myself, but have no way to test
auto-rotation with the emulator so you guys could give me a hand
with that.

Davy
 

The Following 2 Users Say Thank You to DavyP For This Useful Post:
Posts: 3,074 | Thanked: 12,964 times | Joined on Mar 2010 @ Sofia,Bulgaria
#370
Originally Posted by DavyP View Post
I do it a bit differently. I actually don't care if I am in landscape or
portrait mode. If I just get informed after rotation, that the window
width and height has changed, that is all I need.

Based on what I have read, it is a limitation of pure Qt4 on MeeGo.
The MeeGo SDK has APIs that are somewhat similar to Qt4. I
might have a go at implement it myself, but have no way to test
auto-rotation with the emulator so you guys could give me a hand
with that.

Davy
And my code is an example for how to get this information in the correct way on Maemo5, relying on hildon-desktop force-rotation option is a hack. Would you mind to share how exactly you are doing it now?
 

The Following 2 Users Say Thank You to freemangordon For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 17:35.