-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp index 7c43e11..24218e6 100644 --- a/noncore/multimedia/showimg/showimg.cpp +++ b/noncore/multimedia/showimg/showimg.cpp @@ -88,98 +88,98 @@ void ImagePane::hideStatus() //=========================================================================== /* Draws the portion of the scaled pixmap that needs to be updated */ void ImageWidget::paintEvent( QPaintEvent *e ) { QPainter painter(this); painter.setClipRect(e->rect()); painter.setBrush( black ); painter.drawRect( 0, 0, width(), height() ); if ( pixmap.size() != QSize( 0, 0 ) ) { // is an image loaded? painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap); } } void ImageWidget::mouseReleaseEvent(QMouseEvent *) { emit clicked(); } //=========================================================================== ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags ) : QMainWindow( parent, name, wFlags ), filename( 0 ), pickx( -1 ), picky( -1 ), clickx( -1 ), clicky( -1 ), bFromDocView( FALSE ) { setCaption( tr("Image Viewer") ); setIcon( Resource::loadPixmap( "ImageViewer" ) ); isFullScreen = FALSE; setToolBarsMovable( FALSE ); toolBar = new QPEToolBar( this ); toolBar->setHorizontalStretchable( TRUE ); menubar = new QPEMenuBar( toolBar ); QStrList fmt = QImage::outputFormats(); QPopupMenu *edit = new QPopupMenu( menubar ); QPopupMenu *view = new QPopupMenu( menubar ); - menubar->insertItem( "Edit", edit ); - menubar->insertItem( "View", view ); + menubar->insertItem(tr("Edit"), edit ); + menubar->insertItem(tr("View"), view ); edit->insertItem(tr("Horizontal flip"), this, SLOT(hFlip()), 0); edit->insertItem(tr("Vertical flip"), this, SLOT(vFlip()), 0); stack = new QWidgetStack( this ); stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); setCentralWidget( stack ); imagePanel = new ImagePane( stack ); connect(imagePanel, SIGNAL(clicked()), this, SLOT(normalView())); fileSelector = new FileSelector("image/*", stack, "fs"); fileSelector->setNewVisible(FALSE); fileSelector->setCloseVisible(FALSE); connect( fileSelector, SIGNAL( closeMe() ), this, SLOT( closeFileSelector() ) ); connect( fileSelector, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( openFile( const DocLnk & ) ) ); toolBar = new QPEToolBar( this ); QAction *a; a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( open() ) ); a->addTo( toolBar ); a = new QAction( tr( "Rotate 180" ), Resource::loadPixmap( "repeat" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( rot180() ) ); a->addTo( toolBar ); a->addTo( edit ); a = new QAction( tr( "Rotate 90"), Resource::loadPixmap( "rotate90" ), QString::null, 0, this, 0); connect( a, SIGNAL( activated() ), this, SLOT( rot90() ) ); a->addTo( toolBar ); a->addTo( edit ); a = new QAction( tr( "Fullscreen" ), Resource::loadPixmap( "fullscreen" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( fullScreen() ) ); a->addTo( toolBar ); a->addTo( view); stack->raiseWidget( fileSelector ); setMouseTracking( TRUE ); } ImageViewer::~ImageViewer() { delete imagePanel; // in case it is fullscreen |