Changeset 846 for trunk/tools/qvfb/qvfb.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/qvfb/qvfb.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 399 399 QMenu* QVFb::createFileMenu() 400 400 { 401 QMenu *file = new QMenu( "File", this );402 file->addAction( "Configure...", this, SLOT(configure()), 0);401 QMenu *file = new QMenu( tr("&File"), this ); 402 file->addAction( tr("&Configure..."), this, SLOT(configure()), QKeySequence::Preferences ); 403 403 file->addSeparator(); 404 file->addAction( "&Save image...", this, SLOT(saveImage()), 0);405 file->addAction( "&Animation...", this, SLOT(toggleAnimation()), 0 );404 file->addAction( tr("&Save image..."), this, SLOT(saveImage()), QKeySequence::Save ); 405 file->addAction( tr("&Animation..."), this, SLOT(toggleAnimation()), 0 ); 406 406 file->addSeparator(); 407 file->addAction( "&Quit", qApp, SLOT(quit()));407 file->addAction( tr("&Quit"), qApp, SLOT(quit()), QKeySequence::Quit ); 408 408 return file; 409 409 } … … 411 411 QMenu* QVFb::createViewMenu() 412 412 { 413 viewMenu = new QMenu( "View", this );414 cursorAction = viewMenu->addAction( "Show &Cursor", this,413 viewMenu = new QMenu( tr("&View"), this ); 414 cursorAction = viewMenu->addAction( tr("Show &Cursor"), this, 415 415 SLOT(toggleCursor()) ); 416 416 cursorAction->setCheckable(true); 417 417 if ( view ) 418 418 enableCursor(true); 419 viewMenu->addAction( "&Refresh Rate...", this, SLOT(changeRate()) );419 viewMenu->addAction( tr("&Refresh Rate..."), this, SLOT(changeRate()) ); 420 420 viewMenu->addSeparator(); 421 viewMenu->addAction( "No rotation", this, SLOT(setRot0()) );422 viewMenu->addAction( "90\260 rotation", this, SLOT(setRot90()) );423 viewMenu->addAction( "180\260 rotation", this, SLOT(setRot180()) );424 viewMenu->addAction( "270\260 rotation", this, SLOT(setRot270()) );421 viewMenu->addAction( tr("&No rotation"), this, SLOT(setRot0()) ); 422 viewMenu->addAction( tr("&90\260 rotation"), this, SLOT(setRot90()) ); 423 viewMenu->addAction( tr("1&80\260 rotation"), this, SLOT(setRot180()) ); 424 viewMenu->addAction( tr("2&70\260 rotation"), this, SLOT(setRot270()) ); 425 425 viewMenu->addSeparator(); 426 viewMenu->addAction( "Zoom scale &0.5", this, SLOT(setZoomHalf()) );427 viewMenu->addAction( "Zoom scale 0.75", this, SLOT(setZoom075()) );428 viewMenu->addAction( "Zoom scale &1", this, SLOT(setZoom1()) );429 viewMenu->addAction( "Zoom scale &2", this, SLOT(setZoom2()) );430 viewMenu->addAction( "Zoom scale &3", this, SLOT(setZoom3()) );431 viewMenu->addAction( "Zoom scale &4", this, SLOT(setZoom4()) );426 viewMenu->addAction( tr("Zoom scale &0.5"), this, SLOT(setZoomHalf()) ); 427 viewMenu->addAction( tr("Zoom scale 0.7&5"), this, SLOT(setZoom075()) ); 428 viewMenu->addAction( tr("Zoom scale &1"), this, SLOT(setZoom1()) ); 429 viewMenu->addAction( tr("Zoom scale &2"), this, SLOT(setZoom2()) ); 430 viewMenu->addAction( tr("Zoom scale &3"), this, SLOT(setZoom3()) ); 431 viewMenu->addAction( tr("Zoom scale &4"), this, SLOT(setZoom4()) ); 432 432 viewMenu->addSeparator(); 433 viewMenu->addAction( "Zoom scale...", this, SLOT(setZoom()) );433 viewMenu->addAction( tr("Zoom &scale..."), this, SLOT(setZoom()) ); 434 434 return viewMenu; 435 435 } … … 438 438 QMenu* QVFb::createHelpMenu() 439 439 { 440 QMenu *help = new QMenu( "Help", this );441 help->addAction( "About...", this, SLOT(about()));440 QMenu *help = new QMenu( tr("&Help"), this ); 441 help->addAction(tr("&About..."), this, SLOT(about())); 442 442 return help; 443 443 } … … 526 526 { 527 527 QImage img = view->image(); 528 QString filename = QFileDialog::getSaveFileName(this, "Save Main Screen image", "snapshot.png", "Portable Network Graphics (*.png)");528 QString filename = QFileDialog::getSaveFileName(this, tr("Save Main Screen image"), tr("snapshot.png"), tr("Portable Network Graphics (*.png)")); 529 529 if (!filename.isEmpty()){ 530 530 if(!img.save(filename,"PNG")) 531 QMessageBox::critical(this, "Save Main Screen Image", "Save failed. Check that you have permission to write to the target directory.");531 QMessageBox::critical(this, tr("Save Main Screen Image"), tr("Save failed. Check that you have permission to write to the target directory.")); 532 532 } 533 533 if (secondaryView) { 534 534 QImage img = view->image(); 535 QString filename = QFileDialog::getSaveFileName(this, "Save Second Screen image", "snapshot.png", "Portable Network Graphics (*.png)");535 QString filename = QFileDialog::getSaveFileName(this, tr("Save Second Screen image"), tr("snapshot.png"), tr("Portable Network Graphics (*.png)")); 536 536 if (!filename.isEmpty()) { 537 537 if(!img.save(filename,"PNG")) 538 QMessageBox::critical(this, "Save Second Screen Image", "Save failed. Check that you have permission to write to the target directory.");538 QMessageBox::critical(this, tr("Save Second Screen Image"), tr("Save failed. Check that you have permission to write to the target directory.")); 539 539 } 540 540 } … … 578 578 void QVFb::about() 579 579 { 580 QMessageBox::about(this, "About QVFB",580 QMessageBox::about(this, tr("About QVFB"), tr( 581 581 "<h2>The Qt for Embedded Linux Virtual X11 Framebuffer</h2>" 582 582 "<p>This application runs under Qt for X11, emulating a simple framebuffer, " … … 587 587 "This means you can comfortably use your other development tools such " 588 588 "as GUI profilers and debuggers." 589 ) ;589 )); 590 590 } 591 591 … … 1039 1039 // ### can't use QProcess, not in Qt 2.3 1040 1040 // ### but it's certainly in Qt 4! use it? 1041 // Execute the ppmtompeg command as a sep erate process to do the encoding1041 // Execute the ppmtompeg command as a separate process to do the encoding 1042 1042 pid_t pid = ::fork(); 1043 1043 if ( !pid ) {
Note:
See TracChangeset
for help on using the changeset viewer.