author | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-04-04 13:54:40 (UTC) |
commit | 16cf79e90b5217f8d4bfce2a0fa817ae4b73db36 (patch) (unidiff) | |
tree | 0701eae15aa606a0211a2fccfde0eafdac69357c /noncore/multimedia/showimg | |
parent | 8d2d2664e5f544b8292806e617deb7a0e4170dc0 (diff) | |
download | opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.zip opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.gz opie-16cf79e90b5217f8d4bfce2a0fa817ae4b73db36.tar.bz2 |
convert to Opie Debugging Framework
-rw-r--r-- | noncore/multimedia/showimg/ImageFileSelector.cpp | 18 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.cpp | 20 | ||||
-rw-r--r-- | noncore/multimedia/showimg/showimg.pro | 0 |
3 files changed, 21 insertions, 17 deletions
diff --git a/noncore/multimedia/showimg/ImageFileSelector.cpp b/noncore/multimedia/showimg/ImageFileSelector.cpp index 79ee925..53cc883 100644 --- a/noncore/multimedia/showimg/ImageFileSelector.cpp +++ b/noncore/multimedia/showimg/ImageFileSelector.cpp | |||
@@ -1,17 +1,19 @@ | |||
1 | #include "ImageFileSelector.h" | ||
1 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | #include <qpe/qpeapplication.h> | ||
6 | using namespace Opie::Core; | ||
2 | 7 | ||
3 | #include "qpe/qpeapplication.h" | 8 | /* QT */ |
4 | |||
5 | #include <stdlib.h> | ||
6 | |||
7 | #include <qlabel.h> | 9 | #include <qlabel.h> |
8 | #include <qfileinfo.h> | 10 | #include <qfileinfo.h> |
9 | 11 | ||
10 | #include "ImageFileSelector.h" | 12 | /* STD */ |
11 | 13 | #include <stdlib.h> | |
12 | 14 | ||
13 | ThumbWidget::ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent,int w) | 15 | ThumbWidget::ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent,int w) |
14 | : QWidget( parent ),fl(f) | 16 | : QWidget( parent ),fl(f) |
15 | { | 17 | { |
16 | setBackgroundMode(NoBackground); | 18 | setBackgroundMode(NoBackground); |
17 | if ( w!=-1 ) | 19 | if ( w!=-1 ) |
@@ -152,13 +154,13 @@ void ImageFileSelector::updateSizes() | |||
152 | background->setMinimumWidth(thumb->visibleWidth()); | 154 | background->setMinimumWidth(thumb->visibleWidth()); |
153 | thumb->updateScrollBars(); | 155 | thumb->updateScrollBars(); |
154 | } | 156 | } |
155 | 157 | ||
156 | void ImageFileSelector::reread(bool) | 158 | void ImageFileSelector::reread(bool) |
157 | { | 159 | { |
158 | // qDebug("reread"); | 160 | // odebug << "reread" << oendl; |
159 | ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->selectedItem(); | 161 | ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->selectedItem(); |
160 | QString oldFile; | 162 | QString oldFile; |
161 | if ( item ) | 163 | if ( item ) |
162 | oldFile = item->file().file(); | 164 | oldFile = item->file().file(); |
163 | detailed->clear(); | 165 | detailed->clear(); |
164 | tList.clear(); | 166 | tList.clear(); |
@@ -218,13 +220,13 @@ void ImageFileSelector::reread(bool) | |||
218 | int ImageFileSelector::fileCount() | 220 | int ImageFileSelector::fileCount() |
219 | { | 221 | { |
220 | return count; | 222 | return count; |
221 | } | 223 | } |
222 | const DocLnk * ImageFileSelector::selected() | 224 | const DocLnk * ImageFileSelector::selected() |
223 | { | 225 | { |
224 | qDebug("image selected"); | 226 | odebug << "image selected" << oendl; |
225 | ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem(); | 227 | ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem(); |
226 | if ( item ) | 228 | if ( item ) |
227 | return new DocLnk( item->file() ); | 229 | return new DocLnk( item->file() ); |
228 | return 0; | 230 | return 0; |
229 | } | 231 | } |
230 | 232 | ||
diff --git a/noncore/multimedia/showimg/showimg.cpp b/noncore/multimedia/showimg/showimg.cpp index 696a57b..24377ed 100644 --- a/noncore/multimedia/showimg/showimg.cpp +++ b/noncore/multimedia/showimg/showimg.cpp | |||
@@ -23,29 +23,31 @@ | |||
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 | /* OPIE */ | |
30 | #include <opie2/odebug.h> | ||
30 | #include <opie2/ofiledialog.h> | 31 | #include <opie2/ofiledialog.h> |
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 <qtoolbar.h> | 35 | using namespace Opie::Core; |
36 | using namespace Opie::Ui; | ||
36 | 37 | ||
38 | /* QT */ | ||
39 | #include <qtoolbar.h> | ||
37 | #include <qaction.h> | 40 | #include <qaction.h> |
38 | #include <qfiledialog.h> | 41 | #include <qfiledialog.h> |
39 | #include <qmenubar.h> | 42 | #include <qmenubar.h> |
40 | #include <qspinbox.h> | 43 | #include <qspinbox.h> |
41 | 44 | ||
45 | /* STD */ | ||
42 | #include <math.h> | 46 | #include <math.h> |
43 | 47 | ||
44 | |||
45 | using namespace Opie::Ui; | ||
46 | ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent) | 48 | ControlsDialog::ControlsDialog(const QString &caption,QImage image,int *brightness,QWidget *parent) |
47 | : QDialog(parent,0,true) | 49 | : QDialog(parent,0,true) |
48 | { | 50 | { |
49 | setCaption(caption); | 51 | setCaption(caption); |
50 | 52 | ||
51 | if ( parent ) { | 53 | if ( parent ) { |
@@ -283,13 +285,13 @@ ImageViewer::ImageViewer( QWidget *parent, const char *name, int /*wFlags*/ ) | |||
283 | ImageFileSelector::CURRENT_VIEW cv; | 285 | ImageFileSelector::CURRENT_VIEW cv; |
284 | if(showThumbView) | 286 | if(showThumbView) |
285 | cv=ImageFileSelector::THUMBNAIL; | 287 | cv=ImageFileSelector::THUMBNAIL; |
286 | else | 288 | else |
287 | cv=ImageFileSelector::DETAILED; | 289 | cv=ImageFileSelector::DETAILED; |
288 | 290 | ||
289 | qDebug("cv = %d",cv); | 291 | odebug << "cv = " << cv << "" << oendl; |
290 | 292 | ||
291 | fileSelector = new ImageFileSelector( cv,stack, "fs"); | 293 | fileSelector = new ImageFileSelector( cv,stack, "fs"); |
292 | 294 | ||
293 | //switchThumbView(); | 295 | //switchThumbView(); |
294 | 296 | ||
295 | 297 | ||
@@ -410,13 +412,13 @@ void ImageViewer::settings() | |||
410 | dlg.setRepeat( slideRepeat ); | 412 | dlg.setRepeat( slideRepeat ); |
411 | dlg.setReverse( slideReverse ); | 413 | dlg.setReverse( slideReverse ); |
412 | dlg.setRotate(rotateOnLoad); | 414 | dlg.setRotate(rotateOnLoad); |
413 | dlg.setFastLoad(fastLoad); | 415 | dlg.setFastLoad(fastLoad); |
414 | 416 | ||
415 | if ( QPEApplication::execDialog(&dlg) == QDialog::Accepted ) { | 417 | if ( QPEApplication::execDialog(&dlg) == QDialog::Accepted ) { |
416 | qDebug("<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>"); | 418 | odebug << "<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>" << oendl; |
417 | slideDelay = dlg.delay(); | 419 | slideDelay = dlg.delay(); |
418 | slideRepeat = dlg.repeat(); | 420 | slideRepeat = dlg.repeat(); |
419 | slideReverse = dlg.reverse(); | 421 | slideReverse = dlg.reverse(); |
420 | rotateOnLoad = dlg.rotate(); | 422 | rotateOnLoad = dlg.rotate(); |
421 | fastLoad = dlg.fastLoad(); | 423 | fastLoad = dlg.fastLoad(); |
422 | 424 | ||
@@ -502,13 +504,13 @@ void ImageViewer::show() | |||
502 | normalView(); | 504 | normalView(); |
503 | QMainWindow::show(); | 505 | QMainWindow::show(); |
504 | } | 506 | } |
505 | 507 | ||
506 | void ImageViewer::show(const QString& fileref) | 508 | void ImageViewer::show(const QString& fileref) |
507 | { | 509 | { |
508 | // qDebug("Show "+fileref); | 510 | // odebug << "Show "+fileref << oendl; |
509 | bFromDocView = TRUE; | 511 | bFromDocView = TRUE; |
510 | closeFileSelector(); | 512 | closeFileSelector(); |
511 | DocLnk link(fileref); | 513 | DocLnk link(fileref); |
512 | if ( link.isValid() ) { | 514 | if ( link.isValid() ) { |
513 | openFile(link); | 515 | openFile(link); |
514 | } else { | 516 | } else { |
@@ -532,13 +534,13 @@ void ImageViewer::openFile() { | |||
532 | } | 534 | } |
533 | 535 | ||
534 | void ImageViewer::openFile( const DocLnk &link ) | 536 | void ImageViewer::openFile( const DocLnk &link ) |
535 | { | 537 | { |
536 | closeFileSelector(); | 538 | closeFileSelector(); |
537 | // DocLnk link(file); | 539 | // DocLnk link(file); |
538 | qDebug("open "+link.name()); | 540 | odebug << "open "+link.name() << oendl; |
539 | updateCaption( link.name() ); | 541 | updateCaption( link.name() ); |
540 | loadImage( link.file() ); | 542 | loadImage( link.file() ); |
541 | if (slideTimer->isActive()) { | 543 | if (slideTimer->isActive()) { |
542 | slideTimer->start(slideDelay * 1000, FALSE); | 544 | slideTimer->start(slideDelay * 1000, FALSE); |
543 | } | 545 | } |
544 | 546 | ||
diff --git a/noncore/multimedia/showimg/showimg.pro b/noncore/multimedia/showimg/showimg.pro index 6fd019e..c905da8 100644 --- a/noncore/multimedia/showimg/showimg.pro +++ b/noncore/multimedia/showimg/showimg.pro | |||