From 0b83b10334da449fb9304c9b89a4175f3728d377 Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 14 Apr 2004 18:38:37 +0000 Subject: -comments on imagezoomer recalculateGrid Alwin please fill in the blank --- (limited to 'noncore/graphics/opie-eye/gui/viewmodebutton.cpp') 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 @@ -1,24 +1,45 @@ #include "viewmodebutton.h" +#include + #include #include ViewModeButton::ViewModeButton( QToolBar* bar ) : QToolButton( bar ) { - setIconSet( Resource::loadIconSet( "toys" ) ); + slotChange( 1 ); QPopupMenu *pop= new QPopupMenu( this ); pop->setCheckable( true ); - pop->insertItem( tr("Thumbnail and Imageinfo"), 0 ); - pop->insertItem( tr("Thumbnail and Name" ), 1 ); - pop->insertItem( tr("Name Only" ), 2 ); + pop->insertItem( tr("Thumbnail and Imageinfo"), 1 ); + pop->insertItem( tr("Thumbnail and Name" ), 2 ); + pop->insertItem( tr("Name Only" ), 3 ); connect(pop, SIGNAL(activated(int)), this, SIGNAL(changeMode(int)) ); + connect(pop, SIGNAL(activated(int)), + this, SLOT(slotChange(int)) ); setPopup( pop ); } ViewModeButton::~ViewModeButton() { +} + +void ViewModeButton::slotChange( int i ) { + QString name; + switch( i ) { + case 1: + name = "opie-eye/opie-eye-thumb"; + break; + case 2: + name = "opie-eye/opie-eye-thumbonly"; + break; + case 3: + name = "opie-eye/opie-eye-textview"; + break; + } + qWarning("foo %d" +name, i ); + setIconSet( Resource::loadIconSet( name ) ); } -- cgit v0.9.0.2