Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 194
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA
Accepted Solution

AxesOrientationMode has not been declared?

I have a c++ cascades project that is using QCompass.  I include the <QCompass> at the top of the hpp file.  I have a class level compass named m_compass.

 

In the pro file I added the CONFIG += mobility, and MOBILITY += sensors

 

In the cpp file, I have this:

// at the top
using namespace QtMobility;
//...
// in the constructor
m_compass->setAxesOrientationMode(AxesOrientationMode::FixedOrientation);

 

 

It's giving me the error:

'AxesOrientationMode' has not been declared

But it looks like its part of the compass file.  I'm guessing I'm missing an include, but can't find which one.

Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: AxesOrientationMode has not been declared?

Didn't used this API but seems the enum is declared in QCompass class itself. Try:

m_compass->setAxesOrientationMode(QCompass::FixedOrientation);

Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 194
Registered: ‎11-24-2012
My Device: Dev Alpha B, Bold 9700
My Carrier: NA

Re: AxesOrientationMode has not been declared?

I was following the tutorial here:
https://developer.blackberry.com/cascades/documentation/device_comm/sensors/index.html

Its incorrect there.

Thanks Zmey