コード例 #1
0
static void test_systeminfo(void)
{
  QSystemInfo info;

  X(info.currentLanguage());
  X(info.availableLanguages());
  X(info.currentCountryCode());

  X(info.version(QSystemInfo::Os));
  X(info.version(QSystemInfo::QtCore));
  X(info.version(QSystemInfo::Firmware));
  X(info.version(QSystemInfo::QtMobility));

  X(info.hasFeatureSupported(QSystemInfo::BluetoothFeature));
  X(info.hasFeatureSupported(QSystemInfo::CameraFeature));
  X(info.hasFeatureSupported(QSystemInfo::FmradioFeature));
  X(info.hasFeatureSupported(QSystemInfo::IrFeature));
  X(info.hasFeatureSupported(QSystemInfo::LedFeature));
  X(info.hasFeatureSupported(QSystemInfo::MemcardFeature));
  X(info.hasFeatureSupported(QSystemInfo::UsbFeature));
  X(info.hasFeatureSupported(QSystemInfo::VibFeature));
  X(info.hasFeatureSupported(QSystemInfo::WlanFeature));
  X(info.hasFeatureSupported(QSystemInfo::SimFeature));
  X(info.hasFeatureSupported(QSystemInfo::LocationFeature));
  X(info.hasFeatureSupported(QSystemInfo::VideoOutFeature));
  X(info.hasFeatureSupported(QSystemInfo::HapticsFeature));
  X(info.hasFeatureSupported(QSystemInfo::FmTransmitterFeature));
}
コード例 #2
0
ファイル: main.cpp プロジェクト: Esclapion/qt-mobility
QTM_USE_NAMESPACE //(2)

int main(int argc, char *argv[])
{
    QApplication app(argc, argv);
    QSystemInfo s;
    QLabel *label = new QLabel(QObject::tr("hello ").append(s.currentCountryCode()));
    label->show();
    label->resize(100,30);
    return app.exec();
}
コード例 #3
0
ファイル: jssupporter.cpp プロジェクト: mvatmc/cinamon-qt
QString JSSupporter::get_locale()
{
#ifdef USE_SYSTEMINFO
    QSystemInfo i;
    QString c = i.currentCountryCode();
#else
    QString c = "et";
#endif

    qDebug() << "JSSupporter::get_locale() " << c;

    return c;
}