Reply
Thread Tools
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#1
Hello is there any way how get a default screen resolution and ID of device? Thx for your replies.
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#2
Hi,

for the resolution you can use:

Code:
#include <QDesktopWidget>
 ...
QApplication::desktop()->screenGeometry();
Which ID do you mean?

Daniel
 

The Following 4 Users Say Thank You to danielwilms For This Useful Post:
Posts: 270 | Thanked: 239 times | Joined on Dec 2009 @ Czech Republic
#3
Thanks. I need some identificator for device. For example getDevice() return N900 or N810 etc.
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#4
Hi,

there is QSysInfo, but unfortunately Maemo is not supported there. If you are using QtMobility, there is QSystemInfo, which provides the information for you.

If you need that for now and just for different maemo/linux versions, you can use the system command

Code:
uname -n
Daniel
 

The Following User Says Thank You to danielwilms For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#5
Originally Posted by Figa View Post
Thanks. I need some identificator for device. For example getDevice() return N900 or N810 etc.
you could use cat /sys/class/ieee80211/phy0/macaddress to get the mac address

dbus-send --system --print-reply --type=method_call --dest=com.nokia.phone.SIM /com/nokia/phone/SIM/security Phone.Sim.Security.get_imei to get the imei

both of which are unique per device so could be used for device identification.

As daniel says above, Qt mobility will provide api's once this is released.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”
 

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


 
Forum Jump


All times are GMT. The time now is 22:38.