author | llornkcor <llornkcor> | 2002-11-03 17:59:00 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-11-03 17:59:00 (UTC) |
commit | 16e8fad81f7ee6045990f48edc84542638bf07d7 (patch) (side-by-side diff) | |
tree | 96d836f914e0d1104d7c84830acac08a43ee4ac2 /noncore/multimedia/showimg/ImageFileSelector.cpp | |
parent | 2981b8f55f4a33860452f4571ef9f04781267489 (diff) | |
download | opie-16e8fad81f7ee6045990f48edc84542638bf07d7.zip opie-16e8fad81f7ee6045990f48edc84542638bf07d7.tar.gz opie-16e8fad81f7ee6045990f48edc84542638bf07d7.tar.bz2 |
added preferences dialog, and added slidshow
Diffstat (limited to 'noncore/multimedia/showimg/ImageFileSelector.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/showimg/ImageFileSelector.cpp | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/noncore/multimedia/showimg/ImageFileSelector.cpp b/noncore/multimedia/showimg/ImageFileSelector.cpp index 347300f..7872c09 100644 --- a/noncore/multimedia/showimg/ImageFileSelector.cpp +++ b/noncore/multimedia/showimg/ImageFileSelector.cpp @@ -23,6 +23,4 @@ - - - -ThumbWidget::ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent,int w) : QWidget( parent ),fl(f) +ThumbWidget::ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent,int w) + : QWidget( parent ),fl(f) { @@ -40,3 +38,3 @@ ThumbWidget::ThumbWidget(QPixmap p,QString text,const DocLnk& f,QWidget *parent, -void ThumbWidget::resizeEvent(QResizeEvent *e) +void ThumbWidget::resizeEvent(QResizeEvent *) { @@ -55,3 +53,3 @@ void ThumbWidget::paintEvent( QPaintEvent *e ) -void ThumbWidget::mouseReleaseEvent(QMouseEvent* event) +void ThumbWidget::mouseReleaseEvent(QMouseEvent* ) { @@ -62,4 +60,4 @@ void ThumbWidget::mouseReleaseEvent(QMouseEvent* event) - -ImageFileSelectorItem::ImageFileSelectorItem( QListView *parent, const DocLnk &f): QListViewItem( parent ), fl( f ) +ImageFileSelectorItem::ImageFileSelectorItem( QListView *parent, const DocLnk &f) + : QListViewItem( parent ), fl( f ) { @@ -80,3 +78,4 @@ ImageFileSelectorItem::~ImageFileSelectorItem() -ImageFileSelector::ImageFileSelector( CURRENT_VIEW scv,QWidget *parent,const char *name ):QWidgetStack(parent) +ImageFileSelector::ImageFileSelector( CURRENT_VIEW scv,QWidget *parent,const char * ) + : QWidgetStack(parent) { @@ -167,4 +166,5 @@ void ImageFileSelector::updateSizes() -void ImageFileSelector::reread(bool purgeCache) +void ImageFileSelector::reread(bool) { +// qDebug("reread"); ImageFileSelectorItem *item = (ImageFileSelectorItem *)detailed->selectedItem(); @@ -179,5 +179,5 @@ void ImageFileSelector::reread(bool purgeCache) QListIterator<DocLnk> dit( files.children() ); - int y=0; - int x=4; - int totalHeight=4; +// int y=0; +// int x=4; +// int totalHeight=4; ThumbWidget *l=0; @@ -185,11 +185,8 @@ void ImageFileSelector::reread(bool purgeCache) gl->expand(dit.count()/2,2); - int i,j; - i=j=0; - detailed->setUpdatesEnabled(false); thumb->setUpdatesEnabled(false); - for ( ; dit.current(); ++dit ) - { + + for ( ; dit.current(); ++dit ) { item = new ImageFileSelectorItem( detailed, **dit ); @@ -202,6 +199,6 @@ void ImageFileSelector::reread(bool purgeCache) // iterate through all items of the listview - for ( ; it.current(); ++it ) - { + for ( ; it.current(); ++it ) { ii=(ImageFileSelectorItem *)it.current(); QImage img(ii->file().file()); + if( !img.isNull()) { img=img.smoothScale(64,64); @@ -213,4 +210,3 @@ void ImageFileSelector::reread(bool purgeCache) i++; - if ( i==2 ) - { + if ( i==2 ) { i=0; @@ -220,6 +216,4 @@ void ImageFileSelector::reread(bool purgeCache) connect(l,SIGNAL(clicked(const DocLnk &)),this,SLOT(thumbClicked(const DocLnk &))); - } - - + } @@ -232,3 +226,2 @@ void ImageFileSelector::reread(bool purgeCache) thumb->update(); - } @@ -241,2 +234,3 @@ const DocLnk * ImageFileSelector::selected() { + qDebug("image selected"); ImageFileSelectorItem *item = (ImageFileSelectorItem *) detailed->selectedItem(); |