Diffstat (limited to 'noncore/multimedia/showimg/ImageFileSelector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/showimg/ImageFileSelector.cpp | 20 |
1 files changed, 11 insertions, 9 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,19 +1,21 @@ | |||
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 | 9 | #include <qlabel.h> | |
5 | #include <stdlib.h> | ||
6 | |||
7 | #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 ) |
18 | setMinimumSize(w,p.height()+24); | 20 | setMinimumSize(w,p.height()+24); |
19 | else | 21 | else |
@@ -150,17 +152,17 @@ void ImageFileSelector::updateSizes() | |||
150 | detailed->setColumnWidth(0,(int)w); | 152 | detailed->setColumnWidth(0,(int)w); |
151 | detailed->setColumnWidth(1,ww-(int)w); | 153 | detailed->setColumnWidth(1,ww-(int)w); |
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(); |
165 | DocLnkSet files; | 167 | DocLnkSet files; |
166 | Global::findDocuments(&files, "image/*"); | 168 | Global::findDocuments(&files, "image/*"); |
@@ -216,17 +218,17 @@ void ImageFileSelector::reread(bool) | |||
216 | } | 218 | } |
217 | 219 | ||
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 | ||
231 | 233 | ||
232 | 234 | ||