summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp9
-rw-r--r--noncore/graphics/opie-eye/gui/viewmodebutton.cpp24
-rw-r--r--noncore/graphics/opie-eye/gui/viewmodebutton.h23
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
@@ -10,5 +10,4 @@
#include "imageview.h"
-#if 0
#include "viewmodebutton.h"
-#endif
+
#include <iface/ifaceinfo.h>
@@ -93,3 +92,3 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
-#if 0
+
btn = new ViewModeButton( bar );
@@ -97,3 +96,3 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
m_view, SLOT(slotChangeMode(int)));
-#endif
+
btn = new QToolButton( bar );
@@ -106,3 +105,3 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
rotateButton->setToggleButton(true);
-
+
odebug << "Mode = " << m_stack->mode() << oendl;
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