author | simon <simon> | 2002-04-30 14:24:50 (UTC) |
---|---|---|
committer | simon <simon> | 2002-04-30 14:24:50 (UTC) |
commit | 3c1b87ffa621f872c72228733a078511e56d2daf (patch) (side-by-side diff) | |
tree | 7f31bf8b03abbb30765d764c1271902a1f3ac584 | |
parent | e4a316c10ee1a6a1514db1e3883d1e97d80ed356 (diff) | |
download | opie-3c1b87ffa621f872c72228733a078511e56d2daf.zip opie-3c1b87ffa621f872c72228733a078511e56d2daf.tar.gz opie-3c1b87ffa621f872c72228733a078511e56d2daf.tar.bz2 |
- no default args in method impl
-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp index c56994d..7c43e11 100644 --- a/noncore/multimedia/showimg/showimg.cpp +++ b/noncore/multimedia/showimg/showimg.cpp @@ -1,142 +1,142 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ // // Full-screen and rotation options contributed by Robert Wittams <robert@wittams.com> // #include "showimg.h" #include <qpe/resource.h> #include <qpe/fileselector.h> #include <qpe/applnk.h> #include <qpe/qpemenubar.h> #include <qwidgetstack.h> #include <qpe/qpetoolbar.h> #include <qaction.h> #include <qfiledialog.h> #include <qmessagebox.h> #include <qpopupmenu.h> #include <qlabel.h> #include <qpainter.h> #include <qkeycode.h> #include <qapplication.h> #include <qclipboard.h> #include <qtimer.h> -ImagePane::ImagePane( QWidget *parent=0 ) : QWidget( parent ) +ImagePane::ImagePane( QWidget *parent ) : QWidget( parent ) { vb = new QVBoxLayout( this ); image = new ImageWidget( this ); connect(image, SIGNAL( clicked() ), this, SLOT( imageClicked() )); vb->addWidget( image ); status = new QLabel( this ); status->setFixedHeight( fontMetrics().height() + 4 ); vb->addWidget( status ); } void ImagePane::setPixmap( const QPixmap &pm ) { image->setPixmap( pm ); image->repaint( false ); } void ImagePane::imageClicked() { emit clicked(); } void ImagePane::showStatus() { delete vb; vb = new QVBoxLayout( this ); vb->addWidget( image ); status->show(); vb->addWidget( status ); } void ImagePane::hideStatus() { delete vb; vb = new QVBoxLayout( this ); vb->addWidget( image ); status->hide(); } //=========================================================================== /* 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 ); edit->insertItem(tr("Horizontal flip"), this, SLOT(hFlip()), 0); edit->insertItem(tr("Vertical flip"), this, SLOT(vFlip()), 0); stack = new QWidgetStack( this ); |