summaryrefslogtreecommitdiff
path: root/noncore/multimedia/showimg
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/showimg') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/showimg/ImageFileSelector.cpp11
-rw-r--r--noncore/multimedia/showimg/main.cpp1
-rw-r--r--noncore/multimedia/showimg/settingsdialog.cpp2
-rw-r--r--noncore/multimedia/showimg/settingsdialogbase.cpp4
-rw-r--r--noncore/multimedia/showimg/showimg.cpp13
5 files changed, 0 insertions, 31 deletions
diff --git a/noncore/multimedia/showimg/ImageFileSelector.cpp b/noncore/multimedia/showimg/ImageFileSelector.cpp
index d2b65a9..79ee925 100644
--- a/noncore/multimedia/showimg/ImageFileSelector.cpp
+++ b/noncore/multimedia/showimg/ImageFileSelector.cpp
@@ -1,67 +1,56 @@
-#include "qpe/global.h"
-#include "qpe/applnk.h"
-#include "qpe/lnkproperties.h"
-#include "qpe/applnk.h"
#include "qpe/qpeapplication.h"
#include <stdlib.h>
-#include <qdir.h>
-#include <qwidget.h>
-#include <qheader.h>
-#include <qimage.h>
-#include <qpixmap.h>
#include <qlabel.h>
#include <qfileinfo.h>
-#include <qpainter.h>
-#include <qscrollview.h>
#include "ImageFileSelector.h"
ThumbWidget::ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent,int w)
: QWidget( parent ),fl(f)
{
setBackgroundMode(NoBackground);
if ( w!=-1 )
setMinimumSize(w,p.height()+24);
else
setMinimumSize(p.width(),p.height()+24);
description=new QLabel(text,this);
description->setBackgroundColor(colorGroup().base());
description->setAlignment(AlignCenter);
description->setGeometry(0,height()-24,width(),24);
pixmap=p;
}
void ThumbWidget::resizeEvent(QResizeEvent *)
{
description->setGeometry(0,height()-24,width(),24);
}
void ThumbWidget::paintEvent( QPaintEvent *e )
{
QPainter painter(this);
painter.setClipRect(e->rect());
painter.fillRect(0,0,width(),height(),QColor(255,255,255));
painter.drawPixmap((width() - pixmap.width()) / 2,0, pixmap);
}
void ThumbWidget::mouseReleaseEvent(QMouseEvent* )
{
emit clicked(fl);
}
ImageFileSelectorItem::ImageFileSelectorItem( QListView *parent, const DocLnk &f)
: QListViewItem( parent ), fl( f )
{
setText( 0, f.name() );
QFileInfo fi(f.file());
setText( 1, (fi.extension()).upper() );
setPixmap( 0, f.pixmap() );
diff --git a/noncore/multimedia/showimg/main.cpp b/noncore/multimedia/showimg/main.cpp
index efb1c68..1c864e9 100644
--- a/noncore/multimedia/showimg/main.cpp
+++ b/noncore/multimedia/showimg/main.cpp
@@ -1,27 +1,26 @@
/**********************************************************************
** 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.
**
**********************************************************************/
#include "showimg.h"
-#include <qpe/qpeapplication.h>
#include <opie/oapplicationfactory.h>
OPIE_EXPORT_APP( OApplicationFactory<ImageViewer> ) \ No newline at end of file
diff --git a/noncore/multimedia/showimg/settingsdialog.cpp b/noncore/multimedia/showimg/settingsdialog.cpp
index 55d555a..202bd0c 100644
--- a/noncore/multimedia/showimg/settingsdialog.cpp
+++ b/noncore/multimedia/showimg/settingsdialog.cpp
@@ -1,74 +1,72 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
** This file is part of the 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.
**
**********************************************************************/
#include "settingsdialog.h"
#include <qslider.h>
#include <qlabel.h>
#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
SettingsDialog::SettingsDialog( QWidget *parent, const char *name, bool modal, WFlags f )
: SettingsDialogBase( parent, name, modal, f )
{
connect( delaySlider, SIGNAL(valueChanged(int)), this, SLOT(delayChanged(int)) );
}
void SettingsDialog::setDelay( int d )
{
delaySlider->setValue( d );
delayChanged( d );
}
int SettingsDialog::delay() const
{
return delaySlider->value();
}
void SettingsDialog::setRepeat( bool r )
{
repeatCheck->setChecked( r );
}
bool SettingsDialog::repeat() const
{
return repeatCheck->isChecked();
}
void SettingsDialog::delayChanged( int d )
{
delayText->setText( QString::number( d ) + " s" );
}
void SettingsDialog::setReverse(bool r)
{
reverseCheck->setChecked(r);
}
bool SettingsDialog::reverse() const
{
return reverseCheck->isChecked();
}
void SettingsDialog::setRotate(bool r)
{
rotateCheck->setChecked(r);
}
diff --git a/noncore/multimedia/showimg/settingsdialogbase.cpp b/noncore/multimedia/showimg/settingsdialogbase.cpp
index e0c5bb0..7a64e89 100644
--- a/noncore/multimedia/showimg/settingsdialogbase.cpp
+++ b/noncore/multimedia/showimg/settingsdialogbase.cpp
@@ -1,67 +1,63 @@
/****************************************************************************
** Form implementation generated from reading ui file 'settingsdialogbase.ui'
**
** Created: Sun Nov 3 07:29:03 2002
** by: The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "settingsdialogbase.h"
#include <qcheckbox.h>
#include <qgroupbox.h>
#include <qlabel.h>
-#include <qpushbutton.h>
#include <qslider.h>
#include <qlayout.h>
-#include <qvariant.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
/*
* Constructs a SettingsDialogBase which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
SettingsDialogBase::SettingsDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl )
{
if ( !name )
setName( "SettingsDialogBase" );
resize( 246, 201 );
setCaption( tr( "Preferences" ) );
SettingsDialogBaseLayout = new QVBoxLayout( this );
SettingsDialogBaseLayout->setSpacing( 6 );
SettingsDialogBaseLayout->setMargin( 6 );
GroupBox1 = new QGroupBox( this, "GroupBox1" );
GroupBox1->setTitle( tr( "Slide Show" ) );
GroupBox1->setColumnLayout(0, Qt::Vertical );
GroupBox1->layout()->setSpacing( 0 );
GroupBox1->layout()->setMargin( 0 );
GroupBox1Layout = new QVBoxLayout( GroupBox1->layout() );
GroupBox1Layout->setAlignment( Qt::AlignTop );
GroupBox1Layout->setSpacing( 6 );
GroupBox1Layout->setMargin( 11 );
Layout3 = new QGridLayout;
Layout3->setSpacing( 6 );
Layout3->setMargin( 0 );
TextLabel1 = new QLabel( GroupBox1, "TextLabel1" );
TextLabel1->setText( tr( "Delay between pictures" ) );
Layout3->addMultiCellWidget( TextLabel1, 0, 0, 0, 1 );
delaySlider = new QSlider( GroupBox1, "delaySlider" );
delaySlider->setMinValue( 2 );
delaySlider->setMaxValue( 60 );
delaySlider->setLineStep( 2 );
delaySlider->setOrientation( QSlider::Horizontal );
delaySlider->setTickmarks( QSlider::Right );
delaySlider->setTickInterval( 10);
Layout3->addWidget( delaySlider, 1, 0 );
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);