-rw-r--r-- | noncore/graphics/opie-eye/gui/basesetup.cpp | 18 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/basesetup.h | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/imageview.cpp | 6 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 128 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.h | 7 | ||||
-rw-r--r-- | noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | 12 |
6 files changed, 115 insertions, 62 deletions
diff --git a/noncore/graphics/opie-eye/gui/basesetup.cpp b/noncore/graphics/opie-eye/gui/basesetup.cpp index 1a354a5..20dda5a 100644 --- a/noncore/graphics/opie-eye/gui/basesetup.cpp +++ b/noncore/graphics/opie-eye/gui/basesetup.cpp | |||
@@ -8,4 +8,5 @@ | |||
8 | BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * name, WFlags f) | 8 | BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * name, WFlags f) |
9 | :QWidget(parent,name,f) | 9 | :QFrame(parent,name,f) |
10 | { | 10 | { |
11 | setFrameStyle(Box|Raised); | ||
11 | m_cfg = a_cfg; | 12 | m_cfg = a_cfg; |
@@ -19,3 +20,3 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
19 | m_SlideShowTime->setMaxValue( 60 ); | 20 | m_SlideShowTime->setMaxValue( 60 ); |
20 | m_SlideShowTime->setMinValue(1); | 21 | m_SlideShowTime->setMinValue(0); |
21 | m_SlideShowTime->setValue( 2 ); | 22 | m_SlideShowTime->setValue( 2 ); |
@@ -30,2 +31,3 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
30 | 31 | ||
32 | #if 0 | ||
31 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); | 33 | m_ShowToolBar = new QCheckBox( this, "m_ShowToolBar" ); |
@@ -33,2 +35,6 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
33 | m_MainLayout->addWidget( m_ShowToolBar ); | 35 | m_MainLayout->addWidget( m_ShowToolBar ); |
36 | #endif | ||
37 | m_SaveStateAuto = new QCheckBox( this, "m_SaveStateAuto" ); | ||
38 | m_SaveStateAuto->setText(tr("Save status of fullscreen/autorotate")); | ||
39 | m_MainLayout->addWidget( m_SaveStateAuto ); | ||
34 | 40 | ||
@@ -38,8 +44,6 @@ BaseSetup::BaseSetup(Opie::Core::OConfig *a_cfg,QWidget * parent, const char * n | |||
38 | int stime = m_cfg->readNumEntry("base_slideshowtimeout",2); | 44 | int stime = m_cfg->readNumEntry("base_slideshowtimeout",2); |
39 | if (stime<1) stime=2; | 45 | if (stime<0) stime=2; |
40 | if (stime>60) stime=60; | 46 | if (stime>60) stime=60; |
41 | m_SlideShowTime->setValue(stime); | 47 | m_SlideShowTime->setValue(stime); |
42 | 48 | m_SaveStateAuto->setChecked(m_cfg->readBoolEntry("base_savestatus",false)); | |
43 | bool stoolbar = m_cfg->readBoolEntry("base_showtoolbar",true); | ||
44 | m_ShowToolBar->setChecked(stoolbar); | ||
45 | } | 49 | } |
@@ -54,3 +58,3 @@ void BaseSetup::save_values() | |||
54 | m_cfg->writeEntry("base_slideshowtimeout",m_SlideShowTime->value()); | 58 | m_cfg->writeEntry("base_slideshowtimeout",m_SlideShowTime->value()); |
55 | m_cfg->writeEntry("base_showtoolbar",m_ShowToolBar->isChecked()); | 59 | m_cfg->writeEntry("base_savestatus",m_SaveStateAuto->isChecked()); |
56 | } | 60 | } |
diff --git a/noncore/graphics/opie-eye/gui/basesetup.h b/noncore/graphics/opie-eye/gui/basesetup.h index c13e2af..c343f88 100644 --- a/noncore/graphics/opie-eye/gui/basesetup.h +++ b/noncore/graphics/opie-eye/gui/basesetup.h | |||
@@ -5,3 +5,3 @@ | |||
5 | 5 | ||
6 | #include <qwidget.h> | 6 | #include <qframe.h> |
7 | 7 | ||
@@ -14,3 +14,3 @@ class QSpacerItem; | |||
14 | 14 | ||
15 | class BaseSetup:public QWidget | 15 | class BaseSetup:public QFrame |
16 | { | 16 | { |
@@ -30,3 +30,3 @@ protected: | |||
30 | QLabel * m_SlidetimeLabel; | 30 | QLabel * m_SlidetimeLabel; |
31 | QCheckBox *m_ShowToolBar; | 31 | QCheckBox *m_SaveStateAuto; |
32 | QSpacerItem *spacer1; | 32 | QSpacerItem *spacer1; |
diff --git a/noncore/graphics/opie-eye/gui/imageview.cpp b/noncore/graphics/opie-eye/gui/imageview.cpp index 86db732..be58c72 100644 --- a/noncore/graphics/opie-eye/gui/imageview.cpp +++ b/noncore/graphics/opie-eye/gui/imageview.cpp | |||
@@ -40,3 +40,2 @@ ImageView::~ImageView() | |||
40 | { | 40 | { |
41 | odebug << "Delete Imageview" << oendl; | ||
42 | delete m_viewManager; | 41 | delete m_viewManager; |
@@ -59,3 +58,6 @@ void ImageView::startSlide(int value) | |||
59 | connect(m_slideTimer,SIGNAL(timeout()),SLOT(nextSlide())); | 58 | connect(m_slideTimer,SIGNAL(timeout()),SLOT(nextSlide())); |
60 | m_slideTimer->start(m_slideValue*1000,true); | 59 | /* this "+1" is one millisecond. with that we can setup a slideshowvalue |
60 | of 0. eg "as fast as possible". | ||
61 | */ | ||
62 | m_slideTimer->start(m_slideValue*1000+1,true); | ||
61 | } | 63 | } |
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index ece51a1..5eb065f 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp | |||
@@ -47,2 +47,3 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
47 | m_cfg->setGroup("main" ); | 47 | m_cfg->setGroup("main" ); |
48 | readConfig(); | ||
48 | 49 | ||
@@ -72,3 +73,4 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
72 | setupMenu(); | 73 | setupMenu(); |
73 | m_aHideToolbar->setOn(m_cfg->readBoolEntry("base_showtoolbar",true)); | 74 | m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true)); |
75 | m_aAutoRotate->setEnabled(!m_aUnscaled->isOn()); | ||
74 | } | 76 | } |
@@ -80,5 +82,3 @@ void PMainWindow::slotToggleZoomer() | |||
80 | { | 82 | { |
81 | if (!m_disp) return; | 83 | m_aZoomer->setOn(!m_aZoomer->isOn()); |
82 | bool cur = m_aZoomer->isOn(); | ||
83 | m_aZoomer->setOn(!cur); | ||
84 | } | 84 | } |
@@ -87,5 +87,7 @@ void PMainWindow::slotZoomerToggled(bool how) | |||
87 | { | 87 | { |
88 | zoomerOn = how; | ||
89 | if (m_disp) { | 88 | if (m_disp) { |
90 | m_disp->setShowZoomer(zoomerOn); | 89 | m_disp->setShowZoomer(how); |
90 | } | ||
91 | if (autoSave) { | ||
92 | m_cfg->writeEntry("zoomeron",how); | ||
91 | } | 93 | } |
@@ -95,6 +97,4 @@ void PMainWindow::slotToggleAutorotate() | |||
95 | { | 97 | { |
96 | if (!m_disp) return; | ||
97 | if (!m_aAutoRotate->isEnabled()) return; | 98 | if (!m_aAutoRotate->isEnabled()) return; |
98 | bool cur = m_aAutoRotate->isOn(); | 99 | m_aAutoRotate->setOn(!m_aAutoRotate->isOn()); |
99 | m_aAutoRotate->setOn(!cur); | ||
100 | } | 100 | } |
@@ -103,5 +103,3 @@ void PMainWindow::slotToggleAutoscale() | |||
103 | { | 103 | { |
104 | if (!m_disp) return; | 104 | m_aUnscaled->setOn(!m_aUnscaled->isOn()); |
105 | bool cur = m_aAutoScale->isOn(); | ||
106 | m_aAutoScale->setOn(!cur); | ||
107 | } | 105 | } |
@@ -110,5 +108,7 @@ void PMainWindow::slotRotateToggled(bool how) | |||
110 | { | 108 | { |
111 | autoRotate = how; | 109 | if (autoSave) { |
110 | m_cfg->writeEntry("autorotate",how); | ||
111 | } | ||
112 | if (m_disp) { | 112 | if (m_disp) { |
113 | m_disp->setAutoScaleRotate(!m_aAutoScale->isOn(),m_aAutoRotate->isOn()); | 113 | m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),how); |
114 | } | 114 | } |
@@ -118,7 +118,8 @@ void PMainWindow::slotScaleToggled(bool how) | |||
118 | { | 118 | { |
119 | autoScale = !how; | 119 | if (autoSave) { |
120 | if (!how) { | 120 | m_cfg->writeEntry("unscaled",how); |
121 | autoRotate = how; | ||
122 | } | 121 | } |
123 | if (!autoScale) { | 122 | odebug << "Unscaled: " << m_aUnscaled->isOn() << oendl; |
123 | odebug << "How: " << how << oendl; | ||
124 | if (how) { | ||
124 | m_aAutoRotate->setOn(false); | 125 | m_aAutoRotate->setOn(false); |
@@ -126,5 +127,6 @@ void PMainWindow::slotScaleToggled(bool how) | |||
126 | if (m_disp) { | 127 | if (m_disp) { |
127 | m_disp->setAutoScaleRotate(!m_aAutoScale->isOn(),m_aAutoRotate->isOn()); | 128 | m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),m_aAutoRotate->isOn()); |
128 | } | 129 | } |
129 | m_aAutoRotate->setEnabled(!how); | 130 | m_aAutoRotate->setEnabled(!how); |
131 | odebug << "Autorotate: " << m_aAutoRotate->isOn() << oendl; | ||
130 | } | 132 | } |
@@ -138,3 +140,3 @@ void PMainWindow::slotConfig() { | |||
138 | QDialog dlg(this, 0, true); | 140 | QDialog dlg(this, 0, true); |
139 | dlg.setCaption( tr("Phunk View - Config" ) ); | 141 | dlg.setCaption( tr("Opie Eye - Config" ) ); |
140 | 142 | ||
@@ -167,4 +169,7 @@ void PMainWindow::slotConfig() { | |||
167 | keyWid->insert( tr("Browser Keyboard Actions"), m_view->manager() ); | 169 | keyWid->insert( tr("Browser Keyboard Actions"), m_view->manager() ); |
170 | QWidget*w = m_stack->visibleWidget(); | ||
168 | 171 | ||
172 | bool reminfo = false; | ||
169 | if ( !m_info ) { | 173 | if ( !m_info ) { |
174 | reminfo = true; | ||
170 | initInfo(); | 175 | initInfo(); |
@@ -173,3 +178,5 @@ void PMainWindow::slotConfig() { | |||
173 | 178 | ||
179 | bool remdisp = false; | ||
174 | if ( !m_disp ) { | 180 | if ( !m_disp ) { |
181 | remdisp = true; | ||
175 | initDisp(); | 182 | initDisp(); |
@@ -180,4 +187,3 @@ void PMainWindow::slotConfig() { | |||
180 | wid->addTab( keyWid, QString::fromLatin1("AppsIcon" ), tr("Keyboard Configuration") ); | 187 | wid->addTab( keyWid, QString::fromLatin1("AppsIcon" ), tr("Keyboard Configuration") ); |
181 | 188 | wid->setCurrentTab(0); | |
182 | |||
183 | bool act = ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ); | 189 | bool act = ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ); |
@@ -204,4 +210,19 @@ void PMainWindow::slotConfig() { | |||
204 | bSetup->save_values(); | 210 | bSetup->save_values(); |
211 | readConfig(); | ||
205 | } | 212 | } |
206 | delete keyWid; | 213 | delete keyWid; |
214 | |||
215 | m_stack->raiseWidget(w); | ||
216 | if (remdisp) { | ||
217 | m_disp->disconnect(this, SLOT(slotReturn())); | ||
218 | m_disp->setDestructiveClose(); | ||
219 | m_stack->removeWidget(m_disp); | ||
220 | m_disp = 0; | ||
221 | } | ||
222 | if (reminfo) { | ||
223 | m_info->disconnect(this, SLOT(slotReturn())); | ||
224 | m_info->setDestructiveClose(); | ||
225 | m_stack->removeWidget(m_info); | ||
226 | m_info = 0; | ||
227 | } | ||
207 | } | 228 | } |
@@ -240,3 +261,3 @@ void PMainWindow::initDisp() { | |||
240 | m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); | 261 | m_disp->setMenuActions(m_hGroup,m_gPrevNext,m_gDisplayType); |
241 | m_disp->setAutoScale(!m_aAutoScale->isOn()); | 262 | m_disp->setAutoScale(!m_aUnscaled->isOn()); |
242 | m_disp->setAutoRotate(m_aAutoRotate->isOn()); | 263 | m_disp->setAutoRotate(m_aAutoRotate->isOn()); |
@@ -265,15 +286,13 @@ void PMainWindow::slotFullScreenButton(bool current) | |||
265 | { | 286 | { |
266 | if (m_disp) odebug << "Disp fenster ist hidden: "<<m_disp->isHidden()<<oendl; | 287 | if (autoSave) { |
288 | m_cfg->writeEntry("fullscreen",current); | ||
289 | } | ||
267 | if (!m_disp) return; | 290 | if (!m_disp) return; |
268 | 291 | ||
269 | /* I can not solve this effects here - it seems that we require some | 292 | if (m_disp->isHidden()) { |
270 | status variable, too. so we will live with some interesting effects | 293 | /* it must get some setups for switch we can just do if the window is visible. |
271 | meanwhile */ | 294 | so we must delete the imageview window and re-create it when displaying new |
272 | #if 0 | 295 | image */ |
273 | bool th = m_disp->isHidden(); | 296 | return; |
274 | setupViewWindow(current, false); | 297 | } |
275 | /* realy - after setting up the fullscreenmode while the window is hidden | ||
276 | it is unvisibile not hidden!!!!! Hell. */ | ||
277 | if (th) m_disp->hide(); | ||
278 | #endif | ||
279 | setupViewWindow(current, true); | 298 | setupViewWindow(current, true); |
@@ -459,2 +478,5 @@ void PMainWindow::showToolbar(bool how) | |||
459 | else toolBar->show(); | 478 | else toolBar->show(); |
479 | if (autoSave) { | ||
480 | m_cfg->writeEntry("showtoolbar",how); | ||
481 | } | ||
460 | } | 482 | } |
@@ -538,3 +560,7 @@ void PMainWindow::setupActions() | |||
538 | m_aFullScreen->setToggleAction(true); | 560 | m_aFullScreen->setToggleAction(true); |
539 | m_aFullScreen->setOn(false); | 561 | if (autoSave) { |
562 | m_aFullScreen->setOn(m_cfg->readBoolEntry("fullscreen",false)); | ||
563 | } else { | ||
564 | m_aFullScreen->setOn(false); | ||
565 | } | ||
540 | connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool))); | 566 | connect(m_aFullScreen,SIGNAL(toggled(bool)),this,SLOT(slotFullScreenButton(bool))); |
@@ -544,8 +570,10 @@ void PMainWindow::setupActions() | |||
544 | m_aAutoRotate->setToggleAction(true); | 570 | m_aAutoRotate->setToggleAction(true); |
571 | |||
545 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { | 572 | if (m_stack->mode() == Opie::Ui::OWidgetStack::SmallScreen) { |
546 | m_aAutoRotate->setOn(true); | 573 | m_aAutoRotate->setOn(true); |
547 | autoRotate = true; | ||
548 | } else { | 574 | } else { |
549 | m_aAutoRotate->setOn(false); | 575 | m_aAutoRotate->setOn(false); |
550 | autoRotate = false; | 576 | } |
577 | if (autoSave) { | ||
578 | m_aAutoRotate->setOn(m_cfg->readBoolEntry("autorotate",m_aAutoRotate->isOn())); | ||
551 | } | 579 | } |
@@ -553,6 +581,10 @@ void PMainWindow::setupActions() | |||
553 | 581 | ||
554 | m_aAutoScale = new QAction( tr( "Show images unscaled" ), Resource::loadIconSet( "1to1" ), 0, 0, this, 0, true ); | 582 | m_aUnscaled = new QAction( tr( "Show images unscaled" ), Resource::loadIconSet( "1to1" ), 0, 0, this, 0, true ); |
555 | m_aAutoScale->setToggleAction(true); | 583 | m_aUnscaled->setToggleAction(true); |
556 | m_aAutoScale->setOn (false); | 584 | connect(m_aUnscaled,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); |
557 | connect(m_aAutoScale,SIGNAL(toggled(bool)),this,SLOT(slotScaleToggled(bool))); | 585 | if (autoSave) { |
586 | m_aUnscaled->setOn(m_cfg->readBoolEntry("unscaled",false)); | ||
587 | } else { | ||
588 | m_aUnscaled->setOn(false); | ||
589 | } | ||
558 | 590 | ||
@@ -560,7 +592,10 @@ void PMainWindow::setupActions() | |||
560 | m_aZoomer->setToggleAction(true); | 592 | m_aZoomer->setToggleAction(true); |
561 | m_aZoomer->setOn (true); | 593 | if (autoSave) { |
562 | zoomerOn = true; | 594 | m_aZoomer->setOn(m_cfg->readBoolEntry("zoomeron",true)); |
595 | } else { | ||
596 | m_aZoomer->setOn (true); | ||
597 | } | ||
563 | connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool))); | 598 | connect(m_aZoomer,SIGNAL(toggled(bool)),this,SLOT(slotZoomerToggled(bool))); |
564 | m_gDisplayType->insert(m_aAutoRotate); | 599 | m_gDisplayType->insert(m_aAutoRotate); |
565 | m_gDisplayType->insert(m_aAutoScale); | 600 | m_gDisplayType->insert(m_aUnscaled); |
566 | m_gDisplayType->insert(m_aZoomer); | 601 | m_gDisplayType->insert(m_aZoomer); |
@@ -660 +695,6 @@ void PMainWindow::listviewselected(QAction*which) | |||
660 | } | 695 | } |
696 | |||
697 | void PMainWindow::readConfig() | ||
698 | { | ||
699 | autoSave =m_cfg->readBoolEntry("base_savestatus",true); | ||
700 | } | ||
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.h b/noncore/graphics/opie-eye/gui/mainwindow.h index 703965b..5707568 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.h +++ b/noncore/graphics/opie-eye/gui/mainwindow.h | |||
@@ -80,5 +80,3 @@ private: | |||
80 | ImageView *m_disp; | 80 | ImageView *m_disp; |
81 | bool autoRotate; | 81 | bool autoSave; |
82 | bool autoScale; | ||
83 | bool zoomerOn; | ||
84 | QToolButton*fsButton; | 82 | QToolButton*fsButton; |
@@ -90,5 +88,6 @@ private: | |||
90 | QAction *m_aNext,*m_aPrevious,*m_aFullScreen; | 88 | QAction *m_aNext,*m_aPrevious,*m_aFullScreen; |
91 | QAction *m_aAutoRotate,*m_aAutoScale,*m_aZoomer; | 89 | QAction *m_aAutoRotate,*m_aUnscaled,*m_aZoomer; |
92 | 90 | ||
93 | /* init funs */ | 91 | /* init funs */ |
92 | void readConfig(); | ||
94 | void setupActions(); | 93 | void setupActions(); |
diff --git a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp index f4a6a87..9c69ce5 100644 --- a/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp +++ b/noncore/graphics/opie-eye/impl/dir/dir_ifaceinfo.cpp | |||
@@ -14,10 +14,18 @@ | |||
14 | #include <qcheckbox.h> | 14 | #include <qcheckbox.h> |
15 | #include <qframe.h> | ||
15 | #include <qhbox.h> | 16 | #include <qhbox.h> |
16 | #include <qlabel.h> | 17 | #include <qlabel.h> |
18 | #include <qlayout.h> | ||
17 | 19 | ||
18 | namespace { | 20 | namespace { |
19 | class DirImageWidget : public QHBox { | 21 | class DirImageWidget : public QFrame { |
20 | public: | 22 | public: |
21 | DirImageWidget() { | 23 | DirImageWidget(): QFrame() { |
24 | setFrameStyle(Box|Raised); | ||
25 | QVBoxLayout *m_MainLayout = new QVBoxLayout( this, 6, 2, "m_MainLayout"); | ||
22 | chkbox = new QCheckBox( QObject::tr("Show all files"), this ); | 26 | chkbox = new QCheckBox( QObject::tr("Show all files"), this ); |
27 | m_MainLayout->addWidget(chkbox); | ||
28 | QSpacerItem *spacer1 = new QSpacerItem( 20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding ); | ||
29 | m_MainLayout->addItem( spacer1 ); | ||
30 | |||
23 | } | 31 | } |