summaryrefslogtreecommitdiff
path: root/noncore/multimedia/showimg/showimg.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/showimg/showimg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/showimg/showimg.cpp13
1 files changed, 0 insertions, 13 deletions
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp
index 02a1d91..82eac33 100644
--- a/noncore/multimedia/showimg/showimg.cpp
+++ b/noncore/multimedia/showimg/showimg.cpp
@@ -1,100 +1,87 @@
/**********************************************************************
** 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 "ImageFileSelector.h"
#include "settingsdialog.h"
#include <opie/ofiledialog.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/resource.h>
-#include <qpe/fileselector.h>
-#include <qpe/applnk.h>
-#include <qfileinfo.h>
#include <math.h>
#include <qmenubar.h>
-#include <qwidgetstack.h>
#include <qpe/qpetoolbar.h>
#include <qaction.h>
#include <qfiledialog.h>
-#include <qmessagebox.h>
-#include <qpopupmenu.h>
-#include <qscrollview.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qkeycode.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qtimer.h>
#include <qspinbox.h>
ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent)
: QDialog(parent,0,true)
{
setCaption(caption);
if ( parent ) {
setPalette(parent->palette());
}
b=brightness;
img=image;
setMinimumSize(140,80);
QGridLayout *gl= new QGridLayout(this,2,2,4,4);
pixmap =new ImageWidget(this);;
QPixmap pm;
pm.convertFromImage(img);
pixmap->setPixmap(pm);
pixmap->setMinimumSize(pm.width(),pm.height());
gl->addMultiCellWidget(pixmap,0,0,0,2,AlignCenter);
QLabel *l=new QLabel(tr("Brightness")+":",this);
gl->addWidget(l,1,0,AlignLeft);
spb=new QSpinBox(-100,100,2,this);
gl->addWidget(spb,1,1,AlignRight);
spb->setValue(0);
connect(spb,SIGNAL(valueChanged(int)),this, SLOT(bValueChanged(int)));
}
void ControlsDialog::bValueChanged(int value)
{
QImage nImage=img;
nImage.detach();
ImageViewer::intensity(nImage, (float)value/100);
QPixmap pm;
pm.convertFromImage(nImage);
pixmap->setPixmap(pm);
pixmap->repaint(false);