Diffstat (limited to 'noncore/graphics/opie-eye/gui/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 15 |
1 files changed, 15 insertions, 0 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 @@ -4,16 +4,17 @@ */ #include "mainwindow.h" #include "imageview.h" #include "iconview.h" #include "filesystem.h" #include "imageinfoui.h" #include "viewmodebutton.h" +#include "basesetup.h" #include <iface/ifaceinfo.h> #include <iface/dirview.h> #include <opie2/odebug.h> #include <opie2/owidgetstack.h> #include <opie2/oapplicationfactory.h> #include <opie2/otabwidget.h> @@ -64,16 +65,17 @@ PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce); listviewMenu = 0; /* setup menu and toolbar */ setupActions(); setupToolbar(); setupMenu(); + m_aHideToolbar->setOn(m_cfg->readBoolEntry("base_showtoolbar",true)); } PMainWindow::~PMainWindow() { } void PMainWindow::slotToggleZoomer() { if (!m_disp) return; @@ -135,16 +137,20 @@ void PMainWindow::slotConfig() { * and one tab for the KeyConfigs */ QDialog dlg(this, 0, true); dlg.setCaption( tr("Phunk View - Config" ) ); QHBoxLayout *lay = new QHBoxLayout(&dlg); Opie::Ui::OTabWidget *wid = new Opie::Ui::OTabWidget(&dlg ); lay->addWidget( wid ); + + BaseSetup*bSetup = new BaseSetup(m_cfg,wid); + wid->addTab(bSetup,"SettingsIcon","Basics setup"); + ViewMap *vM = viewMap(); ViewMap::Iterator _it = vM->begin(); QMap<PDirView*, QWidget*> lst; for( ; _it != vM->end(); ++_it ) { PDirView *view = (_it.data())(*m_cfg); PInterfaceInfo *inf = view->interfaceInfo(); QWidget *_wid = inf->configWidget( *m_cfg ); @@ -191,16 +197,17 @@ void PMainWindow::slotConfig() { if ( act ) { m_view->resetView(); keyWid->save(); m_disp->manager()->save(); m_info->manager()->save(); m_view->manager()->save(); + bSetup->save_values(); } delete keyWid; } /* * create a new image info component * and detach the current one * we will make the other delete on exit @@ -263,18 +270,26 @@ void PMainWindow::slotFullScreenToggled(bool current) m_disp->setBackgroundColor(black); m_disp->reparent(0, WStyle_Customize | WStyle_NoBorder, QPoint(0,0)); m_disp->setVScrollBarMode(QScrollView::AlwaysOff); m_disp->setHScrollBarMode(QScrollView::AlwaysOff); m_disp->resize(qApp->desktop()->width(), qApp->desktop()->height()); } else { setUpdatesEnabled(false); odebug << "window" << oendl; + if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { + m_disp->setMinimumSize(QApplication::desktop()->size()/2); + } else { m_disp->setMinimumSize(10,10); + } + if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { + m_disp->reparent(0,QPoint(50,50)); + } else { m_disp->reparent(0,QPoint(0,0)); + } m_disp->setBackgroundColor(white); m_stack->addWidget(m_disp,ImageDisplay); m_disp->setVScrollBarMode(QScrollView::Auto); m_disp->setHScrollBarMode(QScrollView::Auto); m_stack->raiseWidget(m_disp); if (m_stack->mode() != Opie::Ui::OWidgetStack::SmallScreen) { m_disp->resize(m_disp->minimumSize()); } |