author | zecke <zecke> | 2004-04-14 13:00:01 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-14 13:00:01 (UTC) |
commit | 842db6adb0116491d36d78607dfefa76a7e0eb5a (patch) (unidiff) | |
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 | |||
@@ -1,29 +1,28 @@ | |||
1 | /* | 1 | /* |
2 | * GPLv2 zecke@handhelds.org | 2 | * GPLv2 zecke@handhelds.org |
3 | * No WArranty... | 3 | * No WArranty... |
4 | */ | 4 | */ |
5 | #include "mainwindow.h" | 5 | #include "mainwindow.h" |
6 | 6 | ||
7 | #include "iconview.h" | 7 | #include "iconview.h" |
8 | #include "filesystem.h" | 8 | #include "filesystem.h" |
9 | #include "imageinfoui.h" | 9 | #include "imageinfoui.h" |
10 | #include "imageview.h" | 10 | #include "imageview.h" |
11 | #if 0 | ||
12 | #include "viewmodebutton.h" | 11 | #include "viewmodebutton.h" |
13 | #endif | 12 | |
14 | #include <iface/ifaceinfo.h> | 13 | #include <iface/ifaceinfo.h> |
15 | #include <iface/dirview.h> | 14 | #include <iface/dirview.h> |
16 | 15 | ||
17 | #include <opie2/odebug.h> | 16 | #include <opie2/odebug.h> |
18 | #include <opie2/owidgetstack.h> | 17 | #include <opie2/owidgetstack.h> |
19 | #include <opie2/oapplicationfactory.h> | 18 | #include <opie2/oapplicationfactory.h> |
20 | #include <opie2/otabwidget.h> | 19 | #include <opie2/otabwidget.h> |
21 | #include <opie2/okeyconfigwidget.h> | 20 | #include <opie2/okeyconfigwidget.h> |
22 | 21 | ||
23 | #include <qpe/resource.h> | 22 | #include <qpe/resource.h> |
24 | #include <qpe/config.h> | 23 | #include <qpe/config.h> |
25 | #include <qpe/ir.h> | 24 | #include <qpe/ir.h> |
26 | #include <qpe/applnk.h> | 25 | #include <qpe/applnk.h> |
27 | 26 | ||
28 | #include <qtoolbar.h> | 27 | #include <qtoolbar.h> |
29 | #include <qtoolbutton.h> | 28 | #include <qtoolbutton.h> |
@@ -78,46 +77,46 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
78 | btn->setIconSet( Resource::loadIconSet( "edit" ) ); | 77 | btn->setIconSet( Resource::loadIconSet( "edit" ) ); |
79 | connect( btn, SIGNAL(clicked()), | 78 | connect( btn, SIGNAL(clicked()), |
80 | m_view, SLOT(slotRename()) ); | 79 | m_view, SLOT(slotRename()) ); |
81 | 80 | ||
82 | if ( Ir::supported() ) { | 81 | if ( Ir::supported() ) { |
83 | btn = new QToolButton( bar ); | 82 | btn = new QToolButton( bar ); |
84 | btn->setIconSet( Resource::loadIconSet( "beam" ) ); | 83 | btn->setIconSet( Resource::loadIconSet( "beam" ) ); |
85 | connect( btn, SIGNAL(clicked()), | 84 | connect( btn, SIGNAL(clicked()), |
86 | m_view, SLOT(slotBeam()) ); | 85 | m_view, SLOT(slotBeam()) ); |
87 | } | 86 | } |
88 | 87 | ||
89 | btn = new QToolButton( bar ); | 88 | btn = new QToolButton( bar ); |
90 | btn->setIconSet( Resource::loadIconSet( "trash" ) ); | 89 | btn->setIconSet( Resource::loadIconSet( "trash" ) ); |
91 | connect( btn, SIGNAL(clicked() ), | 90 | connect( btn, SIGNAL(clicked() ), |
92 | m_view, SLOT(slotTrash() ) ); | 91 | m_view, SLOT(slotTrash() ) ); |
93 | 92 | ||
94 | #if 0 | 93 | |
95 | btn = new ViewModeButton( bar ); | 94 | btn = new ViewModeButton( bar ); |
96 | connect( btn, SIGNAL(changeMode(int)), | 95 | connect( btn, SIGNAL(changeMode(int)), |
97 | m_view, SLOT(slotChangeMode(int))); | 96 | m_view, SLOT(slotChangeMode(int))); |
98 | #endif | 97 | |
99 | btn = new QToolButton( bar ); | 98 | btn = new QToolButton( bar ); |
100 | btn->setIconSet( Resource::loadIconSet( "SettingsIcon" ) ); | 99 | btn->setIconSet( Resource::loadIconSet( "SettingsIcon" ) ); |
101 | connect( btn, SIGNAL(clicked() ), | 100 | connect( btn, SIGNAL(clicked() ), |
102 | this, SLOT(slotConfig() ) ); | 101 | this, SLOT(slotConfig() ) ); |
103 | 102 | ||
104 | rotateButton = new QToolButton(bar); | 103 | rotateButton = new QToolButton(bar); |
105 | rotateButton->setIconSet( Resource::loadIconSet( "rotate" ) ); | 104 | rotateButton->setIconSet( Resource::loadIconSet( "rotate" ) ); |
106 | rotateButton->setToggleButton(true); | 105 | rotateButton->setToggleButton(true); |
107 | 106 | ||
108 | odebug << "Mode = " << m_stack->mode() << oendl; | 107 | odebug << "Mode = " << m_stack->mode() << oendl; |
109 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { | 108 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { |
110 | rotateButton->setOn(true); | 109 | rotateButton->setOn(true); |
111 | autoRotate = true; | 110 | autoRotate = true; |
112 | } else { | 111 | } else { |
113 | rotateButton->setOn(false); | 112 | rotateButton->setOn(false); |
114 | autoRotate = false; | 113 | autoRotate = false; |
115 | } | 114 | } |
116 | 115 | ||
117 | connect(rotateButton,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); | 116 | connect(rotateButton,SIGNAL(toggled(bool)),this,SLOT(slotRotateToggled(bool))); |
118 | 117 | ||
119 | btn = new QToolButton(bar); | 118 | btn = new QToolButton(bar); |
120 | btn->setIconSet( Resource::loadIconSet( "1to1" ) ); | 119 | btn->setIconSet( Resource::loadIconSet( "1to1" ) ); |
121 | btn->setToggleButton(true); | 120 | btn->setToggleButton(true); |
122 | btn->setOn(false); | 121 | btn->setOn(false); |
123 | connect(btn,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); | 122 | connect(btn,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); |
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 @@ | |||
1 | #include "viewmodebutton.h" | ||
2 | |||
3 | #include <qtoolbar.h> | ||
4 | #include <qpopupmenu.h> | ||
5 | |||
6 | ViewModeButton::ViewModeButton( QToolBar* bar ) | ||
7 | : QToolButton( bar ) | ||
8 | { | ||
9 | setIconSet( Resource::loadIconSet( "toys" ) ); | ||
10 | QPopupMenu *pop= new QPopupMenu( this ); | ||
11 | pop->setCheckable( true ); | ||
12 | pop->insertItem( tr("Thumbnail and Imageinfo"), 0 ); | ||
13 | pop->insertItem( tr("Thumbnail and Name" ), 1 ); | ||
14 | pop->insertItem( tr("Name Only" ), 2 ); | ||
15 | connect(pop, SIGNAL(activated(int)), | ||
16 | this, SIGNAL(changeMode(int)) ); | ||
17 | |||
18 | |||
19 | setPopup( pop ); | ||
20 | } | ||
21 | |||
22 | ViewModeButton::~ViewModeButton() { | ||
23 | |||
24 | } | ||
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 @@ | |||
1 | /* | ||
2 | * GPLv2 only | ||
3 | * zecke@handhelds.org | ||
4 | */ | ||
5 | |||
6 | #ifndef PHUNK_VIEW_MODE_BUTTON_H | ||
7 | #define PHUNK_VIEW_MODE_BUTTON_H | ||
8 | |||
9 | #include <qpe/resource.h> | ||
10 | |||
11 | #include <qtoolbutton.h> | ||
12 | |||
13 | class ViewModeButton : public QToolButton { | ||
14 | Q_OBJECT | ||
15 | public: | ||
16 | ViewModeButton( QToolBar* ); | ||
17 | ~ViewModeButton(); | ||
18 | |||
19 | signals: | ||
20 | void changeMode( int ); | ||
21 | }; | ||
22 | |||
23 | #endif | ||