示例#1
0
/*
 This plugin only works for n810
*/
N810GpsPlugin::N810GpsPlugin(QObject *parent)
    : QWhereaboutsPlugin(parent)
{
    qLog(Hardware) << __PRETTY_FUNCTION__;
    if ( ! enableGps())
        exit(1);
    QtopiaApplication::setPowerConstraint(QtopiaApplication::Disable);
}
示例#2
0
void
ConfigQml::setgps(bool c)
{
    /* if gps option changed */
    if (c == ConfigQml::Config::Gps())
        return;
    if (c)
        enableGps();
    else {
        if (_gps){
            delete _gps;
            _gps = NULL;
        }
        /* find exist gps station */
        int index = getGpsStation();
        if (index > -1){
            /* delete gps station */
            removeStation(index);
        }
    }
    ConfigQml::Config::Gps(c);
    saveConfig();
    refreshconfig();
}