-rw-r--r-- | noncore/multimedia/showimg/config.in | 2 | ||||
-rw-r--r-- | noncore/multimedia/showimg/main.cpp | 4 | ||||
-rw-r--r-- | noncore/multimedia/showimg/opie-showimg.control | 2 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.pro | 2 |
5 files changed, 11 insertions, 10 deletions
diff --git a/noncore/multimedia/showimg/config.in b/noncore/multimedia/showimg/config.in index 36e8cf0..808c841 100644 --- a/noncore/multimedia/showimg/config.in +++ b/noncore/multimedia/showimg/config.in | |||
@@ -1,4 +1,4 @@ | |||
1 | config SHOWIMG | 1 | config SHOWIMG |
2 | boolean "opie-showimg (image viewer)" | 2 | boolean "opie-showimg (image viewer)" |
3 | default "y" | 3 | default "y" |
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | 4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI |
diff --git a/noncore/multimedia/showimg/main.cpp b/noncore/multimedia/showimg/main.cpp index 1c864e9..b61cffb 100644 --- a/noncore/multimedia/showimg/main.cpp +++ b/noncore/multimedia/showimg/main.cpp | |||
@@ -8,19 +8,19 @@ | |||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "showimg.h" | 21 | #include "showimg.h" |
22 | 22 | ||
23 | 23 | ||
24 | #include <opie/oapplicationfactory.h> | 24 | #include <opie2/oapplicationfactory.h> |
25 | 25 | ||
26 | OPIE_EXPORT_APP( OApplicationFactory<ImageViewer> ) \ No newline at end of file | 26 | OPIE_EXPORT_APP( OApplicationFactory<ImageViewer> ) |
diff --git a/noncore/multimedia/showimg/opie-showimg.control b/noncore/multimedia/showimg/opie-showimg.control index 1e54383..2fbfabc 100644 --- a/noncore/multimedia/showimg/opie-showimg.control +++ b/noncore/multimedia/showimg/opie-showimg.control | |||
@@ -1,11 +1,11 @@ | |||
1 | Package: opie-showimg | 1 | Package: opie-showimg |
2 | Files: plugins/application/libshowimg.so* bin/showimg apps/Applications/showimg.desktop pics/imageviewer | 2 | Files: plugins/application/libshowimg.so* bin/showimg apps/Applications/showimg.desktop pics/imageviewer |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/applications | 4 | Section: opie/applications |
5 | Maintainer: Opie Team <opie@handhelds.org> | 5 | Maintainer: Opie Team <opie@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Depends: task-opie-minimal | 7 | Depends: task-opie-minimal,libopiecore2, libopieui2 |
8 | Description: Image Viewer | 8 | Description: Image Viewer |
9 | The image viewer for the Opie environment. Supports | 9 | The image viewer for the Opie environment. Supports |
10 | all graphics formats are compiled into Qt/Embedded (eg. PNG). | 10 | all graphics formats are compiled into Qt/Embedded (eg. PNG). |
11 | Version: $QPE_VERSION$EXTRAVERSION | 11 | Version: $QPE_VERSION$EXTRAVERSION |
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp index 82eac33..6c0c4db 100644 --- a/noncore/multimedia/showimg/showimg.cpp +++ b/noncore/multimedia/showimg/showimg.cpp | |||
@@ -14,44 +14,45 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | // | 21 | // |
22 | // Full-screen and rotation options contributed by Robert Wittams <robert@wittams.com> | 22 | // Full-screen and rotation options contributed by Robert Wittams <robert@wittams.com> |
23 | // | 23 | // |
24 | 24 | ||
25 | #include "showimg.h" | 25 | #include "showimg.h" |
26 | #include "ImageFileSelector.h" | 26 | #include "ImageFileSelector.h" |
27 | #include "settingsdialog.h" | 27 | #include "settingsdialog.h" |
28 | 28 | ||
29 | 29 | ||
30 | #include <opie/ofiledialog.h> | 30 | #include <opie2/ofiledialog.h> |
31 | 31 | ||
32 | #include <qpe/qpeapplication.h> | 32 | #include <qpe/qpeapplication.h> |
33 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
34 | #include <qpe/resource.h> | 34 | #include <qpe/resource.h> |
35 | #include <math.h> | ||
36 | #include <qmenubar.h> | ||
37 | #include <qpe/qpetoolbar.h> | 35 | #include <qpe/qpetoolbar.h> |
36 | |||
38 | #include <qaction.h> | 37 | #include <qaction.h> |
39 | #include <qfiledialog.h> | 38 | #include <qfiledialog.h> |
39 | #include <qmenubar.h> | ||
40 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | 41 | ||
42 | #include <math.h> | ||
42 | 43 | ||
43 | 44 | ||
44 | ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent) | 45 | ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent) |
45 | : QDialog(parent,0,true) | 46 | : QDialog(parent,0,true) |
46 | { | 47 | { |
47 | setCaption(caption); | 48 | setCaption(caption); |
48 | 49 | ||
49 | if ( parent ) { | 50 | if ( parent ) { |
50 | setPalette(parent->palette()); | 51 | setPalette(parent->palette()); |
51 | } | 52 | } |
52 | 53 | ||
53 | b=brightness; | 54 | b=brightness; |
54 | img=image; | 55 | img=image; |
55 | 56 | ||
56 | setMinimumSize(140,80); | 57 | setMinimumSize(140,80); |
57 | 58 | ||
@@ -185,33 +186,33 @@ void ImageWidget::paintEvent( QPaintEvent *e ) | |||
185 | painter.setClipRect(e->rect()); | 186 | painter.setClipRect(e->rect()); |
186 | painter.fillRect(0,0,width(),height(),QColor(0,0,0)); | 187 | painter.fillRect(0,0,width(),height(),QColor(0,0,0)); |
187 | 188 | ||
188 | if ( pixmap.size() != QSize( 0, 0 ) ) | 189 | if ( pixmap.size() != QSize( 0, 0 ) ) |
189 | { // is an image loaded? | 190 | { // is an image loaded? |
190 | painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap); | 191 | painter.drawPixmap((width() - pixmap.width()) / 2, (height() - pixmap.height()) / 2, pixmap); |
191 | } | 192 | } |
192 | } | 193 | } |
193 | 194 | ||
194 | void ImageWidget::mouseReleaseEvent(QMouseEvent *) | 195 | void ImageWidget::mouseReleaseEvent(QMouseEvent *) |
195 | { | 196 | { |
196 | emit clicked(); | 197 | emit clicked(); |
197 | } | 198 | } |
198 | 199 | ||
199 | //=========================================================================== | 200 | //=========================================================================== |
200 | 201 | ||
201 | ImageViewer::ImageViewer( QWidget *parent, const char *name, int wFlags ) | 202 | ImageViewer::ImageViewer( QWidget *parent, const char *name, int /*wFlags*/ ) |
202 | : QMainWindow( parent, name, WResizeNoErase ), filename( 0 ), bFromDocView( FALSE ) | 203 | : QMainWindow( parent, name, WResizeNoErase ), filename( 0 ), bFromDocView( FALSE ) |
203 | { | 204 | { |
204 | setCaption( tr("Image Viewer") ); | 205 | setCaption( tr("Image Viewer") ); |
205 | setIcon( Resource::loadPixmap( "ImageViewer" ) ); | 206 | setIcon( Resource::loadPixmap( "ImageViewer" ) ); |
206 | 207 | ||
207 | 208 | ||
208 | Config cfg("Image Viewer"); | 209 | Config cfg("Image Viewer"); |
209 | cfg.setGroup("Image Viewer"); | 210 | cfg.setGroup("Image Viewer"); |
210 | 211 | ||
211 | showThumbView=cfg.readBoolEntry("ShowThumbnails",false); | 212 | showThumbView=cfg.readBoolEntry("ShowThumbnails",false); |
212 | isSized=cfg.readBoolEntry("SizeToScreen",true); | 213 | isSized=cfg.readBoolEntry("SizeToScreen",true); |
213 | 214 | ||
214 | isFullScreen = FALSE; | 215 | isFullScreen = FALSE; |
215 | 216 | ||
216 | setToolBarsMovable( FALSE ); | 217 | setToolBarsMovable( FALSE ); |
217 | 218 | ||
@@ -509,33 +510,33 @@ void ImageViewer::show(const QString& fileref) | |||
509 | DocLnk link(fileref); | 510 | DocLnk link(fileref); |
510 | if ( link.isValid() ) { | 511 | if ( link.isValid() ) { |
511 | openFile(link); | 512 | openFile(link); |
512 | } else { | 513 | } else { |
513 | filename = fileref; | 514 | filename = fileref; |
514 | updateCaption( fileref ); | 515 | updateCaption( fileref ); |
515 | loadImage( fileref ); | 516 | loadImage( fileref ); |
516 | } | 517 | } |
517 | } | 518 | } |
518 | 519 | ||
519 | void ImageViewer::openFile() { | 520 | void ImageViewer::openFile() { |
520 | MimeTypes types; | 521 | MimeTypes types; |
521 | QStringList image; | 522 | QStringList image; |
522 | image << "image/*"; | 523 | image << "image/*"; |
523 | types.insert("Images", image); | 524 | types.insert("Images", image); |
524 | 525 | ||
525 | QString str = OFileDialog::getOpenFileName( 1,QPEApplication::documentDir(),"", types, 0 ); | 526 | QString str = Opie::OFileDialog::getOpenFileName( 1,QPEApplication::documentDir(),"", types, 0 ); |
526 | DocLnk link(str); | 527 | DocLnk link(str); |
527 | // if ( link.isValid() ) | 528 | // if ( link.isValid() ) |
528 | openFile(link); | 529 | openFile(link); |
529 | 530 | ||
530 | } | 531 | } |
531 | 532 | ||
532 | void ImageViewer::openFile( const DocLnk &link ) | 533 | void ImageViewer::openFile( const DocLnk &link ) |
533 | { | 534 | { |
534 | closeFileSelector(); | 535 | closeFileSelector(); |
535 | // DocLnk link(file); | 536 | // DocLnk link(file); |
536 | qDebug("open "+link.name()); | 537 | qDebug("open "+link.name()); |
537 | updateCaption( link.name() ); | 538 | updateCaption( link.name() ); |
538 | loadImage( link.file() ); | 539 | loadImage( link.file() ); |
539 | if (slideTimer->isActive()) { | 540 | if (slideTimer->isActive()) { |
540 | slideTimer->start(slideDelay * 1000, FALSE); | 541 | slideTimer->start(slideDelay * 1000, FALSE); |
541 | } | 542 | } |
diff --git a/noncore/multimedia/showimg/showimg.pro b/noncore/multimedia/showimg/showimg.pro index 76b020e..94fb162 100644 --- a/noncore/multimedia/showimg/showimg.pro +++ b/noncore/multimedia/showimg/showimg.pro | |||
@@ -1,9 +1,9 @@ | |||
1 | CONFIG += qt warn_on release quick-app | 1 | CONFIG += qt warn_on release quick-app |
2 | HEADERS = showimg.h ImageFileSelector.h settingsdialog.h settingsdialogbase.h | 2 | HEADERS = showimg.h ImageFileSelector.h settingsdialog.h settingsdialogbase.h |
3 | SOURCES = main.cpp showimg.cpp ImageFileSelector.cpp settingsdialog.cpp settingsdialogbase.cpp | 3 | SOURCES = main.cpp showimg.cpp ImageFileSelector.cpp settingsdialog.cpp settingsdialogbase.cpp |
4 | TARGET = showimg | 4 | TARGET = showimg |
5 | INCLUDEPATH += $(OPIEDIR)/include | 5 | INCLUDEPATH += $(OPIEDIR)/include |
6 | DEPENDPATH += $(OPIEDIR)/include | 6 | DEPENDPATH += $(OPIEDIR)/include |
7 | LIBS += -lqpe -lopie | 7 | LIBS += -lqpe -lopiecore2 -l opieui2 |
8 | 8 | ||
9 | include ( $(OPIEDIR)/include.pro ) | 9 | include ( $(OPIEDIR)/include.pro ) |