Changeset 846 for trunk/tools/qvfb


Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
1 deleted
29 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/qvfb/config.ui

    r651 r846  
    33 <comment>*********************************************************************
    44**
    5 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     5** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    66** All rights reserved.
    77** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/gammaview.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/main.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    4444#include <QApplication>
    4545#include <QRegExp>
     46#include <QLibraryInfo>
     47#include <QLocale>
     48#include <QTranslator>
    4649#include <stdlib.h>
    4750#include <stdio.h>
     
    7376
    7477    QApplication app( argc, argv );
     78
     79    QTranslator translator;
     80    QTranslator qtTranslator;
     81    QString sysLocale = QLocale::system().name();
     82    QString resourceDir = QLibraryInfo::location(QLibraryInfo::TranslationsPath);
     83    if (translator.load(QLatin1String("qvfb_") + sysLocale, resourceDir)
     84        && qtTranslator.load(QLatin1String("qt_") + sysLocale, resourceDir)) {
     85        app.installTranslator(&translator);
     86        app.installTranslator(&qtTranslator);
     87    }
    7588
    7689    int width = 0;
  • trunk/tools/qvfb/qanimationwriter.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qanimationwriter.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qlock.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qlock_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qtopiakeysym.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfb.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    399399QMenu* QVFb::createFileMenu()
    400400{
    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 );
    403403    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 );
    406406    file->addSeparator();
    407     file->addAction( "&Quit", qApp, SLOT(quit()) );
     407    file->addAction( tr("&Quit"), qApp, SLOT(quit()), QKeySequence::Quit );
    408408    return file;
    409409}
     
    411411QMenu* QVFb::createViewMenu()
    412412{
    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,
    415415                                        SLOT(toggleCursor()) );
    416416    cursorAction->setCheckable(true);
    417417    if ( view )
    418418        enableCursor(true);
    419     viewMenu->addAction( "&Refresh Rate...", this, SLOT(changeRate()) );
     419    viewMenu->addAction( tr("&Refresh Rate..."), this, SLOT(changeRate()) );
    420420    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()) );
    425425    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()) );
    432432    viewMenu->addSeparator();
    433     viewMenu->addAction( "Zoom scale...", this, SLOT(setZoom()) );
     433    viewMenu->addAction( tr("Zoom &scale..."), this, SLOT(setZoom()) );
    434434    return viewMenu;
    435435}
     
    438438QMenu* QVFb::createHelpMenu()
    439439{
    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()));
    442442    return help;
    443443}
     
    526526{
    527527    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)"));
    529529    if (!filename.isEmpty()){
    530530        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."));
    532532    }
    533533    if (secondaryView) {
    534534        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)"));
    536536        if (!filename.isEmpty()) {
    537537            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."));
    539539        }
    540540    }
     
    578578void QVFb::about()
    579579{
    580     QMessageBox::about(this, "About QVFB",
     580    QMessageBox::about(this, tr("About QVFB"), tr(
    581581        "<h2>The Qt for Embedded Linux Virtual X11 Framebuffer</h2>"
    582582        "<p>This application runs under Qt for X11, emulating a simple framebuffer, "
     
    587587        "This means you can comfortably use your other development tools such "
    588588        "as GUI profilers and debuggers."
    589     );
     589    ));
    590590}
    591591
     
    10391039    // ### can't use QProcess, not in Qt 2.3
    10401040    // ### but it's certainly in Qt 4! use it?
    1041     // Execute the ppmtompeg command as a seperate process to do the encoding
     1041    // Execute the ppmtompeg command as a separate process to do the encoding
    10421042    pid_t pid = ::fork();
    10431043    if ( !pid ) {
  • trunk/tools/qvfb/qvfb.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfb.pro

    r561 r846  
    3636                  ../../src/gui/embedded/qwssignalhandler.cpp
    3737
    38 include($$QT_SOURCE_TREE/tools/shared/deviceskin/deviceskin.pri)
     38include(../shared/deviceskin/deviceskin.pri)
    3939
    4040contains(QT_CONFIG, opengl) {
  • trunk/tools/qvfb/qvfbhdr.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbmmap.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbmmap.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbprotocol.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbprotocol.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbratedlg.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    5656    tl->setMargin(5);
    5757
    58     QLabel *label = new QLabel("Target frame rate:", this);
     58    QLabel *label = new QLabel(tr("Target frame rate:"), this);
    5959    tl->addWidget(label);
    6060
     
    6868    hl->addWidget(rateSlider);
    6969    connect(rateSlider, SIGNAL(valueChanged(int)), this, SLOT(rateChanged(int)));
    70     rateLabel = new QLabel(QString("%1fps").arg(rate), this);
     70    rateLabel = new QLabel(tr("%1fps").arg(rate), this);
    7171    hl->addWidget(rateLabel);
    7272
    7373    hl = new QHBoxLayout();
    7474    tl->addItem(hl);
    75     QPushButton *pb = new QPushButton("OK", this);
     75    QPushButton *pb = new QPushButton(tr("OK"), this);
    7676    connect(pb, SIGNAL(clicked()), this, SLOT(ok()));
    7777    hl->addWidget(pb);
    78     pb = new QPushButton("Cancel", this);
     78    pb = new QPushButton(tr("Cancel"), this);
    7979    connect(pb, SIGNAL(clicked()), this, SLOT(cancel()));
    8080    hl->addWidget(pb);
     
    8585    if (rateSlider->value() != r)
    8686        rateSlider->setValue(r);
    87     rateLabel->setText(QString("%1fps").arg(r));
     87    rateLabel->setText(tr("%1fps").arg(r));
    8888    emit updateRate(r);
    8989}
  • trunk/tools/qvfb/qvfbratedlg.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbshmem.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbshmem.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbview.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbview.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbx11view.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qvfbx11view.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qwssignalhandler.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/qwssignalhandler_p.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/x11keyfaker.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
  • trunk/tools/qvfb/x11keyfaker.h

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
Note: See TracChangeset for help on using the changeset viewer.