summaryrefslogtreecommitdiff
path: root/noncore/multimedia/showimg/showimg.h
Unidiff
Diffstat (limited to 'noncore/multimedia/showimg/showimg.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/showimg/showimg.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/multimedia/showimg/showimg.h b/noncore/multimedia/showimg/showimg.h
index abbd976..da4c0b6 100644
--- a/noncore/multimedia/showimg/showimg.h
+++ b/noncore/multimedia/showimg/showimg.h
@@ -1,86 +1,86 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
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#ifndef SHOWIMG_H 21#ifndef SHOWIMG_H
22#define SHOWIMG_H 22#define SHOWIMG_H
23 23
24#include <qwidget.h> 24#include <qwidget.h>
25#include <qmainwindow.h> 25#include <qmainwindow.h>
26#include <qimage.h> 26#include <qimage.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qscrollview.h> 29#include <qscrollview.h>
30#include <qdialog.h> 30#include <qdialog.h>
31#include <qstringlist.h> 31#include <qstringlist.h>
32#include <qvaluelist.h> 32#include <qvaluelist.h>
33#include <qwmatrix.h> 33#include <qwmatrix.h>
34 34
35 35
36class QAction; 36class QAction;
37class QPEToolBar; 37class QPEToolBar;
38class QPEMenuBar; 38class QMenuBar;
39class QPopupMenu; 39class QPopupMenu;
40class QWidgetStack; 40class QWidgetStack;
41class FileSelector; 41class FileSelector;
42class DocLnk; 42class DocLnk;
43class QLabel; 43class QLabel;
44class QAction; 44class QAction;
45class QSpinBox; 45class QSpinBox;
46class ImageFileSelector; 46class ImageFileSelector;
47class QTimer; 47class QTimer;
48 48
49 49
50class ImageWidget : public QWidget 50class ImageWidget : public QWidget
51{ 51{
52 Q_OBJECT 52 Q_OBJECT
53 public: 53 public:
54 ImageWidget( QWidget *parent=0 ) 54 ImageWidget( QWidget *parent=0 )
55 : QWidget( parent ) { 55 : QWidget( parent ) {
56 setBackgroundMode(NoBackground); 56 setBackgroundMode(NoBackground);
57 } 57 }
58 ~ImageWidget() { } 58 ~ImageWidget() { }
59 59
60 void setPixmap( const QPixmap &pm ) { 60 void setPixmap( const QPixmap &pm ) {
61 pixmap = pm; 61 pixmap = pm;
62 show(); 62 show();
63 } 63 }
64 64
65signals: 65signals:
66 void clicked(); 66 void clicked();
67 67
68protected: 68protected:
69 void paintEvent( QPaintEvent * ); 69 void paintEvent( QPaintEvent * );
70 void mouseReleaseEvent(QMouseEvent* event); 70 void mouseReleaseEvent(QMouseEvent* event);
71 71
72private: 72private:
73 QPixmap pixmap; 73 QPixmap pixmap;
74}; 74};
75 75
76class InfoDialog:public QDialog 76class InfoDialog:public QDialog
77{ 77{
78 Q_OBJECT 78 Q_OBJECT
79 79
80public: 80public:
81 81
82 static void displayInfo(const QString &caption, const QStringList text, QWidget *parent); 82 static void displayInfo(const QString &caption, const QStringList text, QWidget *parent);
83 83
84private: 84private:
85 85
86 InfoDialog(const QString &caption,const QStringList text, QWidget *parent); 86 InfoDialog(const QString &caption,const QStringList text, QWidget *parent);
@@ -205,85 +205,85 @@ private:
205 void switchToImageView(); 205 void switchToImageView();
206 206
207 void updateImage(); 207 void updateImage();
208 208
209private slots: 209private slots:
210 210
211 void slideShow( bool on ); 211 void slideShow( bool on );
212 void help(); 212 void help();
213 void slideUpdate(); 213 void slideUpdate();
214 bool nextImage(); 214 bool nextImage();
215 bool prevImage(); 215 bool prevImage();
216 void settings(); 216 void settings();
217 217
218 void switchThumbView(); 218 void switchThumbView();
219 void switchSizeToScreen(); 219 void switchSizeToScreen();
220 void setDocument(const QString& fileref); 220 void setDocument(const QString& fileref);
221 void doDelayedLoad(); 221 void doDelayedLoad();
222 void openFile( const DocLnk &file ); 222 void openFile( const DocLnk &file );
223 void openFile(); 223 void openFile();
224 void open(); 224 void open();
225 void closeFileSelector(); 225 void closeFileSelector();
226 void hFlip(); 226 void hFlip();
227 void vFlip(); 227 void vFlip();
228 void rot180(); 228 void rot180();
229 void rot90(); 229 void rot90();
230 void rot270(); 230 void rot270();
231 void normalView(); 231 void normalView();
232 void fullScreen(); 232 void fullScreen();
233 void stopSlideShow(); 233 void stopSlideShow();
234 void blackAndWhite(); 234 void blackAndWhite();
235 void displayInfoDialog(); 235 void displayInfoDialog();
236 void displayControlsDialog(); 236 void displayControlsDialog();
237private: 237private:
238 QWMatrix matrix; 238 QWMatrix matrix;
239 bool rotated90; 239 bool rotated90;
240 enum MENU_ITEMS { 240 enum MENU_ITEMS {
241 SHOW_THUMBNAILS, 241 SHOW_THUMBNAILS,
242 SIZE_TO_SCREEN, 242 SIZE_TO_SCREEN,
243 BLACKANDWHITE 243 BLACKANDWHITE
244 }; 244 };
245 245
246 QString filename; 246 QString filename;
247 QString delayLoad; 247 QString delayLoad;
248 QImage image; // the loaded image 248 QImage image; // the loaded image
249 QPixmap pm; // the converted pixmap 249 QPixmap pm; // the converted pixmap
250 QPixmap pmScaled; // the scaled pixmap 250 QPixmap pmScaled; // the scaled pixmap
251 QPEToolBar *toolBar; 251 QPEToolBar *toolBar;
252 QPEToolBar *iconToolBar; 252 QPEToolBar *iconToolBar;
253 QPEMenuBar *menuBar; 253 QMenuBar *menuBar;
254 QPEMenuBar *current; 254 QMenuBar *current;
255 255
256 256
257 QPopupMenu *fileMenuFile; 257 QPopupMenu *fileMenuFile;
258 QPopupMenu *viewMenuFile; 258 QPopupMenu *viewMenuFile;
259 QPopupMenu *optionsMenuFile; 259 QPopupMenu *optionsMenuFile;
260 QPopupMenu *fileMenuView; 260 QPopupMenu *fileMenuView;
261 QPopupMenu *viewMenuView; 261 QPopupMenu *viewMenuView;
262 262
263 QAction *sss; // scale to screen size 263 QAction *sss; // scale to screen size
264 264
265 QLabel *lab; 265 QLabel *lab;
266 ImagePane *imagePanel; 266 ImagePane *imagePanel;
267 QWidgetStack *stack; 267 QWidgetStack *stack;
268 //FileSelector *fileSelector; 268 //FileSelector *fileSelector;
269 ImageFileSelector *fileSelector; 269 ImageFileSelector *fileSelector;
270 bool isFullScreen; 270 bool isFullScreen;
271 bool isSized; // true if image is to be resized to fit the window size 271 bool isSized; // true if image is to be resized to fit the window size
272 bool bFromDocView; // a flag to indicate whether or not we were 272 bool bFromDocView; // a flag to indicate whether or not we were
273 // launched from the document view... 273 // launched from the document view...
274 274
275 int slideDelay; 275 int slideDelay;
276 bool slideRepeat; 276 bool slideRepeat;
277 bool slideReverse; // show slideshow in reverse order 277 bool slideReverse; // show slideshow in reverse order
278 bool rotateOnLoad; // rotate by 90 degrees on loading 278 bool rotateOnLoad; // rotate by 90 degrees on loading
279 bool fastLoad; 279 bool fastLoad;
280 QTimer *slideTimer; 280 QTimer *slideTimer;
281 QValueList<DocLnk> imageList; 281 QValueList<DocLnk> imageList;
282 QAction *slideAction; 282 QAction *slideAction;
283 283
284 284
285 QString imageInfo[LAST]; 285 QString imageInfo[LAST];
286}; 286};
287 287
288 288
289#endif // SHOWIMG_H 289#endif // SHOWIMG_H