本文整理汇总了C++中qtTrId函数的典型用法代码示例。如果您正苦于以下问题:C++ qtTrId函数的具体用法?C++ qtTrId怎么用?C++ qtTrId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qtTrId函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: qtTrId
void LevelScene::initPauseMenu3()
{
m_pauseMenu_opened=false;
m_pauseMenuID=3;
m_pauseMenu.setParentScene(this);
m_pauseMenu.construct(
//% "Pause"
qtTrId("LVL_MENU_PAUSE_TTL"),
PGE_MenuBox::msg_info, PGE_Point(-1,-1),
ConfigManager::setup_menu_box.box_padding,
ConfigManager::setup_menu_box.sprite);
m_pauseMenu.clearMenu();
std::vector<std::string> items;
//% "Continue"
items.push_back(qtTrId("LVL_MENU_PAUSE_CONTINUE"));
//% "Replay level"
items.push_back(qtTrId("LVL_MENU_PAUSE_REPLAY"));
//% "Quit"
items.push_back(qtTrId("LVL_MENU_PAUSE_EXIT"));
m_pauseMenu.addMenuItems(items);
m_pauseMenu.setRejectSnd(obj_sound_role::MenuPause);
m_pauseMenu.setMaxMenuItems(3);
m_isPauseMenu=false;
m_isTimeStopped=false;
}
开发者ID:Wohlhabend-Networks,项目名称:PGE-Project,代码行数:27,代码来源:lvl_scene_pausemenu.cpp
示例2: MWidgetView
CallItemView::CallItemView(CallItem *controller)
: MWidgetView(controller),
//% "00:00:00"
m_duration(new MLabel(qtTrId("xx_default_duration"), controller)),
//% "..."
m_status(new MLabel(qtTrId("xx_default_status"), controller)),
m_updateTimer(this)
{
TRACE
m_controller = controller;
m_layout = new QGraphicsGridLayout;
m_layout->setContentsMargins(0,0,0,0);
m_layout->setSpacing(0);
m_controller->setLayout(m_layout);
m_status->setAlignment(Qt::AlignCenter);
if (peopleItem())
peopleItem()->setObjectName("callItemPeopleItem");
m_status->setObjectName("callItemStatusName");
initLayout();
connect(m_controller, SIGNAL(stateChanged()), SLOT(updateStatusLabel()));
}
开发者ID:dudochkin-victor,项目名称:handset-dialer,代码行数:26,代码来源:callitemview.cpp
示例3: realize
void ShutdownUI::showWindow(const QString &text1, const QString &text2, int timeout)
{
// If the widgets are not created create them now
realize();
if (!(text1.isEmpty() && text2.isEmpty())) {
// Set the labels to show the text strings that we got only if they exist
if (label1 != NULL) {
if (text1.startsWith("qtn")) {
label1->setText(qtTrId(text1.toLatin1().constData()));
} else {
label1->setText(text1);
}
}
if (label2 != NULL) {
if (text2.startsWith("qtn")) {
label2->setText(qtTrId(text2.toLatin1().constData()));
} else {
label2->setText(text2);
}
}
}
timer->stop();
show();
raise();
disableCompositorSwipeRect(this, rect());
feedback->play();
// Set the interval and start the timer to the next phase: hiding the labels and showing the logo
timer->start(timeout);
}
开发者ID:dudochkin-victor,项目名称:touch-systemui,代码行数:35,代码来源:shutdownui.cpp
示例4: showMassStorageWarning
void
ResetWidget::clearActivated ()
{
MDialog *dialog;
MLocale locale;
QString question;
if (m_ResetBusinessLogic->isUsbConnected ()) {
showMassStorageWarning ();
return;
}
//% "Clear all user data and restore original settings?"
question = qtTrId("qtn_rset_clear_query").arg(locale.formatNumber(15));
question.replace ("\\n", "<br>");
question.replace ("\n", "<br>");
//% "Clear all data?"
dialog = new MMessageBox (qtTrId ("qtn_rset_clear_query_title"),
question, M::YesButton | M::NoButton);
connect (dialog, SIGNAL (accepted ()), SLOT (clearConfirmed ()));
connect (dialog, SIGNAL (rejected ()), SLOT (operationCancelled ()));
dialog->appear (MApplication::instance ()->activeWindow (),
MSceneWindow::DestroyWhenDone);
}
开发者ID:deztructor,项目名称:meegotouch-controlpanelapplets,代码行数:26,代码来源:resetwidget.cpp
示例5: switch
void PlaylistModel::addHeader()
{
QString title;
PlaylistHeaderItem *header;
switch (m_playlist->type())
{
case QSpotifyPlaylist::Inbox:
//% "QTN_LIST_INBOX"
title = qtTrId("QTN_LIST_INBOX");
break;
case QSpotifyPlaylist::Starred:
//% "QTN_LIST_STARRED"
title = qtTrId("QTN_LIST_STARRED");
break;
case QSpotifyPlaylist::Playlist:
title = m_playlist->name();
break;
}
header = new PlaylistHeaderItem(title);
m_list.append(header);
}
开发者ID:Tronil,项目名称:CarSpot,代码行数:26,代码来源:PlaylistModel.cpp
示例6: if
void SwAcctEditPage::onFlickrClicked()
{
//We're logging out...
if (mService->isConfigured() && (mService->credsState() == SwClientService::CredsValid)) {
mServiceConfig->flickrDeleteLogin();
mFlickrClicked = false;
} else if (!mFlickrClicked) {
//We're pressing Login...
if (mServiceConfig->flickrOpenLogin())
//% "Continue"
mFlickrButton->setText(qtTrId("button_continue"));
else
qWarning("Couldn't open Flickr login!");
mFlickrClicked = true;
} else {
//We're pressing Continue
mServiceConfig->flickrContinueLogin();
mFlickrClicked = false;
//If we get success, it will switch to log out at soon as
//libsocialweb updates the DynCaps.
//If we get failure, we want it to say "Log in" to try again...
//% "Log in"
mFlickrButton->setText(qtTrId("button_login"));
}
}
开发者ID:dudochkin-victor,项目名称:touchcp-socialweb,代码行数:26,代码来源:swaccteditpage.cpp
示例7: spy
void
Ut_BatteryBusinessLogic::testPSMStateChanged ()
{
#ifdef HAVE_QMSYSTEM
QList<QVariant> arguments;
QSignalSpy spy (m_logic, SIGNAL (notificationSent (QString, QString, QString)));
/* Entering to power-save mode */
m_logic->devicePSMStateChanged (MeeGo::QmDeviceMode::PSMStateOn);
QTest::qWait (10);
QCOMPARE (spy.count (), 1);
arguments = spy.takeFirst ();
QVERIFY (arguments.at (0).toString () == "x-nokia.battery.enterpsm");
QVERIFY (arguments.at (1).toString () == qtTrId ("qtn_ener_ent_psnote"));
QVERIFY (arguments.at (2).toString () == "");
spy.clear ();
/* Exiting from power-save mode */
m_logic->devicePSMStateChanged (MeeGo::QmDeviceMode::PSMStateOff);
QTest::qWait (10);
QCOMPARE (spy.count (), 1);
arguments = spy.takeFirst ();
QVERIFY (arguments.at (0).toString () == "x-nokia.battery.exitpsm");
QVERIFY (arguments.at (1).toString () == qtTrId ("qtn_ener_exit_psnote"));
QVERIFY (arguments.at (2).toString () == "");
#endif
}
开发者ID:dudochkin-victor,项目名称:touch-systemui,代码行数:30,代码来源:ut_batterybusinesslogic.cpp
示例8: setTitle
void ApplicationMenuPage::retranslateUi()
{
//% "Application Menu"
setTitle(qtTrId("xx_applicationmenu_page_title"));
if (!isContentCreated())
return;
//% "Application Menu is a menu element available to any view. "
//% "<ul><li>It can be opened by tapping on the menu title area."
//% "</li><li>It contains commands and view settings for the view "
//% "in question and an optional area for style commands.</li>"
//% "<li>Each view of the application can have different menu "
//% "contents.</li></ul><b>Guidelines</b> for mandatory menu items: "
//% "<ul><li>Settings should be on the main View of the application, "
//% "unless the settings are specific to a sub-View</li>"
//% "<li>Help should be available in each View </li>"
//% "<li>Exit task should be present in all Views except for the "
//% "main View of the application.</li></ul>"
infoLabel->setText("<a></a>" + qtTrId("xx_applicationmenu_page_info"));
showText(m_textIndex);
//% "Italic"
actionItalic->setText(qtTrId("xx_appmenu_italic"));
//% "Normal"
actionNormal->setText(qtTrId("xx_appmenu_normal"));
}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:27,代码来源:applicationmenupage.cpp
示例9: MPopupList
void ConversationPage::openAttachmentOpenDialog()
{
MPopupList *popuplist = new MPopupList();
QStringListModel *model = new QStringListModel(this);
QDir homeDir = QDir::home();
// Hack: hardcoded the list of applications for the 1.1 release
QStringList apps = QStringList()
//% "Music player"
<< qtTrId("xx_music_player")
//% "Photo viewer"
<< qtTrId("xx_photo_viewer")
//% "Video player"
<< qtTrId("xx_video player");
model->setStringList(apps);
popuplist->setItemModel(model);
//% "Select an application"
popuplist->setTitle(qtTrId("xx_select_an_application"));
popuplist->appear();
connect(popuplist, SIGNAL(clicked(const QModelIndex&)), SLOT(applicationSelected(const QModelIndex &)));
}
开发者ID:dudochkin-victor,项目名称:handset-email,代码行数:25,代码来源:conversationpage.cpp
示例10: QString
QString FilterableFacebookRelatedDataFilterInterface::dataSection(const QVariantMap &data)
{
if (sectionField().isEmpty()) {
return QString();
}
QString section = data.value(sectionField()).toString();
if (sectionField() == "rsvp_status") {
QString trueSection;
if (section == "attending") {
//: A section header for people attending an event
//% "Attending"
trueSection = qtTrId("facebook_event_attending");
} else if (section == "unsure") {
//: A section header for people that are unsure about attending to an event
//% "Unsure"
trueSection = qtTrId("facebook_event_unsure");
} else if (section == "declined") {
//: A section header for people who declined an event
//% "Declined"
trueSection = qtTrId("facebook_event_declined");
} else if (section == "not_replied") {
//: A section header for people who did not replied yet
//% "Not replied"
trueSection = qtTrId("facebook_event_not_replied");
}
return trueSection;
}
return section.left(1);
}
开发者ID:Andrer757,项目名称:friends-sailfish,代码行数:35,代码来源:filterablefacebookrelateddatafilterinterface.cpp
示例11: switch
void ShutdownScreen::applySystemState(MeeGo::QmSystemState::StateIndication what)
{
switch (what) {
case MeeGo::QmSystemState::Shutdown:
// To avoid early quitting on shutdown
HomeApplication::instance()->restoreSignalHandlers();
setWindowVisible(true);
break;
case MeeGo::QmSystemState::ThermalStateFatal:
//% "Temperature too high. Device shutting down."
createAndPublishNotification("x-nemo.battery.temperature", qtTrId("qtn_shut_high_temp"));
break;
case MeeGo::QmSystemState::ShutdownDeniedUSB:
//% "USB cable plugged in. Unplug the USB cable to shutdown."
createAndPublishNotification("device.added", qtTrId("qtn_shut_unplug_usb"));
break;
case MeeGo::QmSystemState::BatteryStateEmpty:
//% "Battery empty. Device shutting down."
createAndPublishNotification("x-nemo.battery.shutdown", qtTrId("qtn_shut_batt_empty"));
break;
default:
break;
}
}
开发者ID:AOSC-Dev,项目名称:lipstick,代码行数:28,代码来源:shutdownscreen.cpp
示例12: qtTrId
/*
* gconftool-2 -t string -s /meegotouch/i18n/language hu_HU
*/
void
WarrantyWidget::retranslateUi ()
{
if (m_labelExpiration)
{
int expirationDays = m_WarrantyBusinessLogic->getExpirationDays ();
if (expirationDays > 0) {
//% "Product warranty will expire in <b>%Ln</b> day."
m_labelExpiration->setText (
qtTrId ("qtn_warr_expiration", expirationDays)
.arg (expirationDays));
} else if (expirationDays == 0) {
//% "Product warranty is expired."
m_labelExpiration->setText (qtTrId ("qtn_warr_expired"));
} else {
//% "Warranty timer error."
m_labelExpiration->setText (qtTrId ("qtn_warr_error_timer"));
}
}
/* This stuff is for eng.english generation */
#if 0
//% "(insert terms of warranty here)"
qtTrId ("qtn_warr_terms")
#endif
m_labelTerms->setText (m_warrantyText);
}
开发者ID:nemomobile-graveyard,项目名称:meegotouch-controlpanelapplets,代码行数:31,代码来源:warrantywidget.cpp
示例13: QString
void MRichTextEditDialogsManager::initTextStylingDialog()
{
selectedFontSize = -1;
selectedFontFamily = QString();
selectedFontColor = QColor();
if (dialogs.textStyles.first) {
return;
}
//% "Text styles"
dialogs.textStyles.first = new MDialog(qtTrId("qtn_comm_text_styles"),M::DoneButton);
dialogs.textStyles.second = false;
QGraphicsWidget *centralWidget = dialogs.textStyles.first->centralWidget();
MLayout *layout = new MLayout(centralWidget);
MLinearLayoutPolicy *policy = new MLinearLayoutPolicy(layout, Qt::Vertical);
// Initialize Font Family combo box
QFontDatabase fontDatabase;
QStringList fontFamilyValues = fontDatabase.families();
// NOTE: black listing some ill-behaving fonts temporarily
fontFamilyValues.removeAll("Webdings");
fontFamilyValues.removeAll("Wingdings");
fontFamilyCombo = new MComboBox(centralWidget);
//% "Font"
fontFamilyCombo->setTitle(qtTrId("qtn_comm_font"));
QStringListModel *fontModel = new QStringListModel(centralWidget);
fontModel->setStringList(fontFamilyValues);
fontFamilyCombo->setItemModel(fontModel);
policy->addItem(fontFamilyCombo);
connect(fontFamilyCombo, SIGNAL(activated(QString)),
this, SLOT(rememberFontFamily(QString)));
// Initialize Font Size combo box
fontSizeCombo = new MComboBox(centralWidget);
//% "Font size"
fontSizeCombo->setTitle(qtTrId("qtn_comm_font_size"));
QStringListModel *sizeModel = new QStringListModel(centralWidget);
fontSizeCombo->setItemModel(sizeModel);
policy->addItem(fontSizeCombo);
connect(fontSizeCombo, SIGNAL(activated(QString)),
this, SLOT(rememberFontSize()));
// Initialize Font Color item
fontColorCombo = new MColorComboBox(centralWidget);
//% "Font color"
fontColorCombo->setTitle(qtTrId("qtn_comm_font_color_combobox"));
policy->addItem(fontColorCombo);
connect(fontColorCombo, SIGNAL(colorPicked(QColor)),
this, SLOT(rememberFontColor(QColor)));
// Selections are applied at pressing button "Done"
connect(dialogs.textStyles.first, SIGNAL(accepted()),
this, SLOT(applySelection()));
}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:58,代码来源:mrichtexteditdialogsmanager.cpp
示例14: SYS_DEBUG
void
OfflineBrief::setToggle (
bool toggle)
{
SYS_DEBUG ("toggle = %s", SYS_BOOL (toggle));
/*
* Don't do anything if we already in the desired mode
*/
if (toggle && m_LastMode == QmDeviceMode::Flight)
return;
else if ((! toggle) && m_LastMode == QmDeviceMode::Normal)
return;
#ifdef HAVE_QMSYSTEM
if (! toggle)
{
MMessageBox* dialog =
//% "Exit offline mode?"
new MMessageBox (qtTrId ("qtn_offl_exiting_title"),
//% "Connections will be restored."
qtTrId ("qtn_offl_exiting"),
M::YesButton | M::NoButton);
/*
* This will set the 'Normal' mode if dialog accepted
*/
connect (dialog, SIGNAL (accepted ()),
SLOT (processDialogResult ()));
/*
* This will switch back the button for the proper state
*/
connect (dialog, SIGNAL (rejected ()),
this, SIGNAL (valuesChanged ()));
dialog->appear (MApplication::activeWindow (),
MSceneWindow::DestroyWhenDone);
}
else
{
bool success = m_DevMode->setMode (QmDeviceMode::Flight);
SYS_DEBUG ("m_DevMode->setMode (Flight) success: %s", SYS_BOOL (success));
if (success)
{
m_infoBanner = new MBanner;
m_infoBanner->setStyleName ("InformationBanner");
m_infoBanner->setObjectName ("InfoBanner");
//% "Closing all connections. Switching to offline mode."
m_infoBanner->setTitle (qtTrId ("qtn_offl_entering"));
m_infoBanner->appear (
MApplication::activeWindow (),
MSceneWindow::DestroyWhenDone);
// Set to NULL, as will destroy itself
m_infoBanner = 0;
}
}
#endif
}
开发者ID:deztructor,项目名称:meegotouch-controlpanelapplets,代码行数:56,代码来源:offlinebrief.cpp
示例15: QCOMPARE
void Ut_BatteryBusinessLogic::testBatteryStateChanged()
{
#ifdef HAVE_QMSYSTEM
QList<QVariant> arguments;
gQmBatteryStub->stubReset();
gQmLEDStub->stubReset();
/* StateFull */
m_logic->batteryStateChanged(MeeGo::QmBattery::StateFull);
QCOMPARE(mNotificationEventTypes.count(), 1);
QCOMPARE(mNotificationEventTypes.at(0), QString("x-nemo.battery.chargingcomplete"));
QCOMPARE(mNotificationBodies.at(0), qtTrId("qtn_ener_charcomp"));
QCOMPARE(mNotificationSummaries.at(0), QString());
QCOMPARE(mNotificationImages.at(0), QString());
QCOMPARE(gQmLEDStub->stubLastCallTo("activate").parameter<QString>(0), QString("PatternBatteryFull"));
/* StateOK */
m_logic->batteryStateChanged(MeeGo::QmBattery::StateOK);
/* no notifications should be published, just silently no-op */
QCOMPARE(mNotificationEventTypes.count(), 1);
/* StateEmpty */
m_logic->batteryStateChanged(MeeGo::QmBattery::StateEmpty);
QCOMPARE(mNotificationEventTypes.count(), 2);
QCOMPARE(mNotificationEventTypes.at(1), QString("x-nemo.battery.recharge"));
QCOMPARE(mNotificationBodies.at(1), qtTrId("qtn_ener_rebatt"));
QCOMPARE(mNotificationSummaries.at(1), QString());
QCOMPARE(mNotificationImages.at(1), QString());
/* StateError */
m_logic->batteryStateChanged(MeeGo::QmBattery::StateError);
/* no notifications should be published, just silently no-op */
QCOMPARE(mNotificationEventTypes.count(), 2);
/* StateLow and charging */
gQmBatteryStub->stubSetReturnValue<MeeGo::QmBattery::ChargingState>("getChargingState", MeeGo::QmBattery::StateCharging);
m_logic->batteryStateChanged(MeeGo::QmBattery::StateLow);
/* no notifications should be published, because battery is charging... */
QCOMPARE(mNotificationEventTypes.count(), 2);
/* StateLow and not charging */
gQmBatteryStub->stubSetReturnValue<MeeGo::QmBattery::ChargingState>("getChargingState", MeeGo::QmBattery::StateNotCharging);
m_logic->setTouchScreenLockActive(true);
m_logic->batteryStateChanged(MeeGo::QmBattery::StateLow);
QCOMPARE(gLowBatteryNotifierStub->stubCallCount("setTouchScreenLockActive"), 1);
QCOMPARE(gLowBatteryNotifierStub->stubLastCallTo("setTouchScreenLockActive").parameter<bool>(0), true);
QCOMPARE(gLowBatteryNotifierStub->stubCallCount("sendLowBatteryAlert"), 1);
#endif
}
开发者ID:jusa,项目名称:meegotouch-systemui,代码行数:56,代码来源:ut_batterybusinesslogic.cpp
示例16: qtTrId
void Ut_USBModeSelector::testUSBNotifications_data()
{
QTest::addColumn<MeeGo::QmUSBMode::Mode>("mode");
QTest::addColumn<QString>("category");
QTest::addColumn<QString>("body");
QTest::newRow("Disconnected") << MeeGo::QmUSBMode::Disconnected << "device.removed" << qtTrId("qtn_usb_disconnected");
QTest::newRow("Ovi Suite") << MeeGo::QmUSBMode::OviSuite << "device.added" << qtTrId("qtn_usb_sync_active");
QTest::newRow("Mass Storage") << MeeGo::QmUSBMode::MassStorage << "device.added" << qtTrId("qtn_usb_storage_active");
QTest::newRow("SDK") << MeeGo::QmUSBMode::SDK << "device.added" << qtTrId("qtn_usb_sdk_active");
}
开发者ID:kaltsi,项目名称:lipstick,代码行数:11,代码来源:ut_usbmodeselector.cpp
示例17: qtTrId
void CustomDirectIMWidget::keyPressEvent(QKeyEvent *event)
{
QString label;
//% "<i>Key press</i> key:"
label = qtTrId("xx_textentry_keypress");
label += QString("%1, ").arg(event->key(), 0, 16);
//% "text:"
label += qtTrId("xx_textentry_text");
label += event->text();
this->setText(label);
}
开发者ID:arcean,项目名称:libmeegotouch-framework,代码行数:11,代码来源:textentrypage.cpp
示例18: MLinearLayoutPolicy
void
ResetWidget::createContent ()
{
MLayout *layout;
MLinearLayoutPolicy *policy;
MButton *restoreButton;
MButton *clearButton;
MSeparator *spacer;
/*
*
*/
layout = new MLayout;
policy = new MLinearLayoutPolicy (layout, Qt::Vertical);
policy->setContentsMargins (0., 0., 0., 0.);
policy->setSpacing (0.);
/*
*
*/
spacer = new MSeparator;
// Using this one instead of "CommonSpacer", margins look even.
spacer->setStyleName ("CommonLargeSpacer");
policy->addItem (spacer);
/*
* The first button.
*/
//% "Restore original settings"
restoreButton = new MButton (qtTrId("qtn_rset_restore"));
restoreButton->setStyleName ("CommonSingleButtonInverted");
restoreButton->setObjectName ("ResetAppletRFSButton");
connect (restoreButton, SIGNAL(clicked()),
this, SLOT(restoreActivated()));
/*
* The second button.
*/
//% "Clear device"
clearButton = new MButton (qtTrId("qtn_rset_clear"));
clearButton->setStyleName ("CommonSingleButtonInverted");
clearButton->setObjectName ("ResetAppletCUDButton");
connect (clearButton, SIGNAL(clicked()),
this, SLOT(clearActivated()));
addButtonContainer (policy, restoreButton, clearButton);
policy->addStretch();
/*
*
*/
layout->setPolicy (policy);
setLayout (layout);
}
开发者ID:deztructor,项目名称:meegotouch-controlpanelapplets,代码行数:54,代码来源:resetwidget.cpp
示例19: desktopEntryStr
QString
DcpAppletMetadata::text1 () const
{
QString id = desktopEntryStr(KeyNameId);
if (qtTrId(qPrintable(id)) == id) {
QString name = desktopEntryStr(KeyName);
return "!! " + name;
} else {
return qtTrId(qPrintable(id));
}
}
开发者ID:dudochkin-victor,项目名称:touch-controlpanel,代码行数:11,代码来源:dcpappletmetadata.cpp
示例20: switch
void BatteryNotifier::sendNotification(BatteryNotifier::NotificationID id)
{
switch(id) {
case NotificationCharging:
sendNotification("x-nemo.battery",
//% "Charging"
qtTrId("qtn_ener_charging"));
break;
case NotificationChargingComplete:
sendNotification("x-nemo.battery.chargingcomplete",
//% "Charging complete"
qtTrId("qtn_ener_charcomp"));
break;
case NotificationRemoveCharger:
sendNotification("x-nemo.battery.removecharger",
//% "Disconnect charger from power supply to save energy"
qtTrId("qtn_ener_remcha"));
break;
case NotificationChargingNotStarted:
sendNotification("x-nemo.battery.chargingnotstarted",
//% "Charging not started. Replace charger."
qtTrId("qtn_ener_repcharger"));
break;
case NotificationRechargeBattery:
sendNotification("x-nemo.battery.recharge",
//% "Recharge battery"
qtTrId("qtn_ener_rebatt"));
break;
case NotificationEnteringPSM:
sendNotification("x-nemo.battery.enterpsm",
//% "Entering power save mode"
qtTrId("qtn_ener_ent_psnote"));
break;
case NotificationExitingPSM:
sendNotification("x-nemo.battery.exitpsm",
//% "Exiting power save mode"
qtTrId("qtn_ener_exit_psnote"));
break;
case NotificationLowBattery:
sendNotification("x-nemo.battery.lowbattery",
//% "Low battery"
qtTrId("qtn_ener_lowbatt"));
break;
case NotificationNoEnoughPower:
sendNotification("x-nemo.battery.notenoughpower",
//% "Not enough power to charge"
qtTrId("qtn_ener_nopowcharge"), "icon-m-energy-management-insufficient-power");
break;
}
}
开发者ID:Morpog,项目名称:lipstick,代码行数:58,代码来源:batterynotifier.cpp
注:本文中的qtTrId函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论