summaryrefslogtreecommitdiff
authorzecke <zecke>2004-04-14 18:38:37 (UTC)
committer zecke <zecke>2004-04-14 18:38:37 (UTC)
commit0b83b10334da449fb9304c9b89a4175f3728d377 (patch) (unidiff)
tree465cdb61d1fa032de425761ef0074ee58bad7cd2
parentb671d282c25e86429727b6b52a674d1d8cd3f1a7 (diff)
downloadopie-0b83b10334da449fb9304c9b89a4175f3728d377.zip
opie-0b83b10334da449fb9304c9b89a4175f3728d377.tar.gz
opie-0b83b10334da449fb9304c9b89a4175f3728d377.tar.bz2
-comments on imagezoomer
recalculateGrid Alwin please fill in the blank
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.cpp20
-rw-r--r--noncore/graphics/opie-eye/gui/iconview.h4
-rw-r--r--noncore/graphics/opie-eye/gui/viewmodebutton.cpp29
-rw-r--r--noncore/graphics/opie-eye/gui/viewmodebutton.h2
-rw-r--r--noncore/graphics/opie-eye/lib/oimagezoomer.cpp9
5 files changed, 56 insertions, 8 deletions
diff --git a/noncore/graphics/opie-eye/gui/iconview.cpp b/noncore/graphics/opie-eye/gui/iconview.cpp
index a06844a..e61f9d9 100644
--- a/noncore/graphics/opie-eye/gui/iconview.cpp
+++ b/noncore/graphics/opie-eye/gui/iconview.cpp
@@ -473,3 +473,3 @@ void PIconView::slotImageInfo( const QString& name) {
473void PIconView::slotChangeMode( int mode ) { 473void PIconView::slotChangeMode( int mode ) {
474 if ( mode >= 0 && mode <= 3 ) 474 if ( mode >= 1 && mode <= 3 )
475 m_mode = mode; 475 m_mode = mode;
@@ -478,7 +478,7 @@ void PIconView::slotChangeMode( int mode ) {
478 switch( m_mode ) { 478 switch( m_mode ) {
479 case 1: 479 case 2:
480 pos = QIconView::Bottom; 480 pos = QIconView::Bottom;
481 break; 481 break;
482 case 2: 482 case 3:
483 case 0: 483 case 1:
484 default: 484 default:
@@ -489,3 +489,15 @@ void PIconView::slotChangeMode( int mode ) {
489 489
490 calculateGrid();
490 slotReloadDir(); 491 slotReloadDir();
491} 492}
493
494
495void PIconView::resizeEvent( QResizeEvent* re ) {
496 QVBox::resizeEvent( re );
497 calculateGrid();
498}
499
500
501void PIconView::calculateGrid() {
502
503}
diff --git a/noncore/graphics/opie-eye/gui/iconview.h b/noncore/graphics/opie-eye/gui/iconview.h
index af41aef..903c4fd 100644
--- a/noncore/graphics/opie-eye/gui/iconview.h
+++ b/noncore/graphics/opie-eye/gui/iconview.h
@@ -41,2 +41,5 @@ signals:
41 41
42protected:
43 void resizeEvent( QResizeEvent* );
44
42private: 45private:
@@ -45,2 +48,3 @@ private:
45 void loadViews(); 48 void loadViews();
49 void calculateGrid();
46 50
diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp
index fdf4e77..0e4a7cb 100644
--- a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp
+++ b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp
@@ -2,2 +2,4 @@
2 2
3#include <opie2/odebug.h>
4
3#include <qtoolbar.h> 5#include <qtoolbar.h>
@@ -8,10 +10,12 @@ ViewModeButton::ViewModeButton( QToolBar* bar )
8{ 10{
9 setIconSet( Resource::loadIconSet( "toys" ) ); 11 slotChange( 1 );
10 QPopupMenu *pop= new QPopupMenu( this ); 12 QPopupMenu *pop= new QPopupMenu( this );
11 pop->setCheckable( true ); 13 pop->setCheckable( true );
12 pop->insertItem( tr("Thumbnail and Imageinfo"), 0 ); 14 pop->insertItem( tr("Thumbnail and Imageinfo"), 1 );
13 pop->insertItem( tr("Thumbnail and Name" ), 1 ); 15 pop->insertItem( tr("Thumbnail and Name" ), 2 );
14 pop->insertItem( tr("Name Only" ), 2 ); 16 pop->insertItem( tr("Name Only" ), 3 );
15 connect(pop, SIGNAL(activated(int)), 17 connect(pop, SIGNAL(activated(int)),
16 this, SIGNAL(changeMode(int)) ); 18 this, SIGNAL(changeMode(int)) );
19 connect(pop, SIGNAL(activated(int)),
20 this, SLOT(slotChange(int)) );
17 21
@@ -22,3 +26,20 @@ ViewModeButton::ViewModeButton( QToolBar* bar )
22ViewModeButton::~ViewModeButton() { 26ViewModeButton::~ViewModeButton() {
27}
28
29void ViewModeButton::slotChange( int i ) {
30 QString name;
31 switch( i ) {
32 case 1:
33 name = "opie-eye/opie-eye-thumb";
34 break;
35 case 2:
36 name = "opie-eye/opie-eye-thumbonly";
37 break;
38 case 3:
39 name = "opie-eye/opie-eye-textview";
40 break;
41 }
23 42
43 qWarning("foo %d" +name, i );
44 setIconSet( Resource::loadIconSet( name ) );
24} 45}
diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.h b/noncore/graphics/opie-eye/gui/viewmodebutton.h
index 44f2228..3247114 100644
--- a/noncore/graphics/opie-eye/gui/viewmodebutton.h
+++ b/noncore/graphics/opie-eye/gui/viewmodebutton.h
@@ -20,2 +20,4 @@ signals:
20 void changeMode( int ); 20 void changeMode( int );
21private slots:
22 void slotChange( int i );
21}; 23};
diff --git a/noncore/graphics/opie-eye/lib/oimagezoomer.cpp b/noncore/graphics/opie-eye/lib/oimagezoomer.cpp
index 4df5dcc..00b93e2 100644
--- a/noncore/graphics/opie-eye/lib/oimagezoomer.cpp
+++ b/noncore/graphics/opie-eye/lib/oimagezoomer.cpp
@@ -175,2 +175,11 @@ void OImageZoomer::drawContents( QPainter* p ) {
175 175
176 /*
177 * the contentRect is set equal to the size of the image
178 * Rect/Original = NewRectORWidth/OriginalVisibleStuff and then simply we
179 * need to add the c.y/x due usage of QFrame
180 * For x and y we use the visiblePoint
181 * For height and width we use the size of the viewport
182 * if width/height would be bigger than our widget we use this width/height
183 *
184 */
176 int len = m_imgSize.width(); 185 int len = m_imgSize.width();