author | zecke <zecke> | 2004-04-14 13:00:01 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-14 13:00:01 (UTC) |
commit | 842db6adb0116491d36d78607dfefa76a7e0eb5a (patch) (side-by-side diff) | |
tree | ae50fa626e984bdc81a9235745d74fe04e67a9f1 | |
parent | 4f78995cbb47f78e68eb40d9a86a6a0dcdc576eb (diff) | |
download | opie-842db6adb0116491d36d78607dfefa76a7e0eb5a.zip opie-842db6adb0116491d36d78607dfefa76a7e0eb5a.tar.gz opie-842db6adb0116491d36d78607dfefa76a7e0eb5a.tar.bz2 |
Alwin thank you for beeing nice (#ifdef 0 #endif ) next time completely revert
just to piss me off :)
Anyway now add the first version of the view button
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 9 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/viewmodebutton.cpp | 24 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/viewmodebutton.h | 23 |
3 files changed, 51 insertions, 5 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index f63b5a1..e5921d8 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -5,15 +5,14 @@ #include "mainwindow.h" #include "iconview.h" #include "filesystem.h" #include "imageinfoui.h" #include "imageview.h" -#if 0 #include "viewmodebutton.h" -#endif + #include <iface/ifaceinfo.h> #include <iface/dirview.h> #include <opie2/odebug.h> #include <opie2/owidgetstack.h> #include <opie2/oapplicationfactory.h> @@ -88,26 +87,26 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) btn = new QToolButton( bar ); btn->setIconSet( Resource::loadIconSet( "trash" ) ); connect( btn, SIGNAL(clicked() ), m_view, SLOT(slotTrash() ) ); -#if 0 + btn = new ViewModeButton( bar ); connect( btn, SIGNAL(changeMode(int)), m_view, SLOT(slotChangeMode(int))); -#endif + btn = new QToolButton( bar ); btn->setIconSet( Resource::loadIconSet( "SettingsIcon" ) ); connect( btn, SIGNAL(clicked() ), this, SLOT(slotConfig() ) ); rotateButton = new QToolButton(bar); rotateButton->setIconSet( Resource::loadIconSet( "rotate" ) ); rotateButton->setToggleButton(true); - + odebug << "Mode = " << m_stack->mode() << oendl; if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { rotateButton->setOn(true); autoRotate = true; } else { rotateButton->setOn(false); diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.cpp b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp new file mode 100644 index 0000000..fdf4e77 --- a/dev/null +++ b/noncore/graphics/opie-eye/gui/viewmodebutton.cpp @@ -0,0 +1,24 @@ +#include "viewmodebutton.h" + +#include <qtoolbar.h> +#include <qpopupmenu.h> + +ViewModeButton::ViewModeButton( QToolBar* bar ) + : QToolButton( bar ) +{ + setIconSet( Resource::loadIconSet( "toys" ) ); + 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 ); + connect(pop, SIGNAL(activated(int)), + this, SIGNAL(changeMode(int)) ); + + + setPopup( pop ); +} + +ViewModeButton::~ViewModeButton() { + +} diff --git a/noncore/graphics/opie-eye/gui/viewmodebutton.h b/noncore/graphics/opie-eye/gui/viewmodebutton.h new file mode 100644 index 0000000..44f2228 --- a/dev/null +++ b/noncore/graphics/opie-eye/gui/viewmodebutton.h @@ -0,0 +1,23 @@ +/* + * GPLv2 only + * zecke@handhelds.org + */ + +#ifndef PHUNK_VIEW_MODE_BUTTON_H +#define PHUNK_VIEW_MODE_BUTTON_H + +#include <qpe/resource.h> + +#include <qtoolbutton.h> + +class ViewModeButton : public QToolButton { + Q_OBJECT +public: + ViewModeButton( QToolBar* ); + ~ViewModeButton(); + +signals: + void changeMode( int ); +}; + +#endif |