Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index e714e84..570ee45 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp | |||
@@ -6,12 +6,13 @@ | |||
6 | #include "imageview.h" | 6 | #include "imageview.h" |
7 | 7 | ||
8 | #include "iconview.h" | 8 | #include "iconview.h" |
9 | #include "filesystem.h" | 9 | #include "filesystem.h" |
10 | #include "imageinfoui.h" | 10 | #include "imageinfoui.h" |
11 | #include "viewmodebutton.h" | 11 | #include "viewmodebutton.h" |
12 | #include "basesetup.h" | ||
12 | 13 | ||
13 | #include <iface/ifaceinfo.h> | 14 | #include <iface/ifaceinfo.h> |
14 | #include <iface/dirview.h> | 15 | #include <iface/dirview.h> |
15 | 16 | ||
16 | #include <opie2/odebug.h> | 17 | #include <opie2/odebug.h> |
17 | #include <opie2/owidgetstack.h> | 18 | #include <opie2/owidgetstack.h> |
@@ -66,12 +67,13 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) | |||
66 | 67 | ||
67 | listviewMenu = 0; | 68 | listviewMenu = 0; |
68 | /* setup menu and toolbar */ | 69 | /* setup menu and toolbar */ |
69 | setupActions(); | 70 | setupActions(); |
70 | setupToolbar(); | 71 | setupToolbar(); |
71 | setupMenu(); | 72 | setupMenu(); |
73 | m_aHideToolbar->setOn(m_cfg->readBoolEntry("base_showtoolbar",true)); | ||
72 | } | 74 | } |
73 | 75 | ||
74 | PMainWindow::~PMainWindow() { | 76 | PMainWindow::~PMainWindow() { |
75 | } | 77 | } |
76 | 78 | ||
77 | void PMainWindow::slotToggleZoomer() | 79 | void PMainWindow::slotToggleZoomer() |
@@ -137,12 +139,16 @@ void PMainWindow::slotConfig() { | |||
137 | QDialog dlg(this, 0, true); | 139 | QDialog dlg(this, 0, true); |
138 | dlg.setCaption( tr("Phunk View - Config" ) ); | 140 | dlg.setCaption( tr("Phunk View - Config" ) ); |
139 | 141 | ||
140 | QHBoxLayout *lay = new QHBoxLayout(&dlg); | 142 | QHBoxLayout *lay = new QHBoxLayout(&dlg); |
141 | Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg ); | 143 | Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg ); |
142 | lay->addWidget( wid ); | 144 | lay->addWidget( wid ); |
145 | |||
146 | BaseSetup*bSetup = new BaseSetup(m_cfg,wid); | ||
147 | wid->addTab(bSetup,"SettingsIcon","Basics setup"); | ||
148 | |||
143 | ViewMap *vM = viewMap(); | 149 | ViewMap *vM = viewMap(); |
144 | ViewMap::Iterator _it = vM->begin(); | 150 | ViewMap::Iterator _it = vM->begin(); |
145 | QMap<PDirView*, QWidget*> lst; | 151 | QMap<PDirView*, QWidget*> lst; |
146 | 152 | ||
147 | for( ; _it != vM->end(); ++_it ) { | 153 | for( ; _it != vM->end(); ++_it ) { |
148 | PDirView *view = (_it.data())(*m_cfg); | 154 | PDirView *view = (_it.data())(*m_cfg); |
@@ -193,12 +199,13 @@ void PMainWindow::slotConfig() { | |||
193 | if ( act ) { | 199 | if ( act ) { |
194 | m_view->resetView(); | 200 | m_view->resetView(); |
195 | keyWid->save(); | 201 | keyWid->save(); |
196 | m_disp->manager()->save(); | 202 | m_disp->manager()->save(); |
197 | m_info->manager()->save(); | 203 | m_info->manager()->save(); |
198 | m_view->manager()->save(); | 204 | m_view->manager()->save(); |
205 | bSetup->save_values(); | ||
199 | } | 206 | } |
200 | delete keyWid; | 207 | delete keyWid; |
201 | } | 208 | } |
202 | 209 | ||
203 | /* | 210 | /* |
204 | * create a new image info component | 211 | * create a new image info component |
@@ -265,14 +272,22 @@ void PMainWindow::slotFullScreenToggled(bool current) | |||
265 | m_disp->setVScrollBarMode(QScrollView::AlwaysOff); | 272 | m_disp->setVScrollBarMode(QScrollView::AlwaysOff); |
266 | m_disp->setHScrollBarMode(QScrollView::AlwaysOff); | 273 | m_disp->setHScrollBarMode(QScrollView::AlwaysOff); |
267 | m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); | 274 | m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); |
268 | } else { | 275 | } else { |
269 | setUpdatesEnabled(false); | 276 | setUpdatesEnabled(false); |
270 | odebug << "window" << oendl; | 277 | odebug << "window" << oendl; |
271 | m_disp->setMinimumSize(10,10); | 278 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { |
272 | m_disp->reparent(0,QPoint(0,0)); | 279 | m_disp->setMinimumSize(QApplication::desktop()->size()/2); |
280 | } else { | ||
281 | m_disp->setMinimumSize(10,10); | ||
282 | } | ||
283 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { | ||
284 | m_disp->reparent(0,QPoint(50,50)); | ||
285 | } else { | ||
286 | m_disp->reparent(0,QPoint(0,0)); | ||
287 | } | ||
273 | m_disp->setBackgroundColor(white); | 288 | m_disp->setBackgroundColor(white); |
274 | m_stack->addWidget(m_disp,ImageDisplay); | 289 | m_stack->addWidget(m_disp,ImageDisplay); |
275 | m_disp->setVScrollBarMode(QScrollView::Auto); | 290 | m_disp->setVScrollBarMode(QScrollView::Auto); |
276 | m_disp->setHScrollBarMode(QScrollView::Auto); | 291 | m_disp->setHScrollBarMode(QScrollView::Auto); |
277 | m_stack->raiseWidget(m_disp); | 292 | m_stack->raiseWidget(m_disp); |
278 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { | 293 | if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { |