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.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp
index 6c0c4db..696a57b 100644
--- a/noncore/multimedia/showimg/showimg.cpp
+++ b/noncore/multimedia/showimg/showimg.cpp
@@ -11,58 +11,59 @@
** 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 <opie2/ofiledialog.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qpe/resource.h>
-#include <qpe/qpetoolbar.h>
+#include <qtoolbar.h>
#include <qaction.h>
#include <qfiledialog.h>
#include <qmenubar.h>
#include <qspinbox.h>
#include <math.h>
+using namespace Opie::Ui;
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);
@@ -502,49 +503,49 @@ void ImageViewer::show()
QMainWindow::show();
}
void ImageViewer::show(const QString& fileref)
{
// qDebug("Show "+fileref);
bFromDocView = TRUE;
closeFileSelector();
DocLnk link(fileref);
if ( link.isValid() ) {
openFile(link);
} else {
filename = fileref;
updateCaption( fileref );
loadImage( fileref );
}
}
void ImageViewer::openFile() {
MimeTypes types;
QStringList image;
image << "image/*";
types.insert("Images", image);
- QString str = Opie::OFileDialog::getOpenFileName( 1,QPEApplication::documentDir(),"", types, 0 );
+ QString str = OFileDialog::getOpenFileName( 1,QPEApplication::documentDir(),"", types, 0 );
DocLnk link(str);
// if ( link.isValid() )
openFile(link);
}
void ImageViewer::openFile( const DocLnk &link )
{
closeFileSelector();
// DocLnk link(file);
qDebug("open "+link.name());
updateCaption( link.name() );
loadImage( link.file() );
if (slideTimer->isActive()) {
slideTimer->start(slideDelay * 1000, FALSE);
}
}
void ImageViewer::open()
{
switchToFileSelector();
}