-rw-r--r-- | noncore/graphics/opie-eye/gui/mainwindow.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/graphics/opie-eye/gui/mainwindow.cpp b/noncore/graphics/opie-eye/gui/mainwindow.cpp index a96bfbd..e532867 100644 --- a/noncore/graphics/opie-eye/gui/mainwindow.cpp +++ b/noncore/graphics/opie-eye/gui/mainwindow.cpp @@ -6,130 +6,128 @@ #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> #include <opie2/okeyconfigwidget.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/ir.h> #include <qpe/storage.h> #include <qpe/applnk.h> #include <qtoolbar.h> #include <qtoolbutton.h> #include <qlayout.h> #include <qdialog.h> #include <qmap.h> #include <qtimer.h> #include <qframe.h> #include <qmenubar.h> #include <qaction.h> //OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" ) OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 ) { setCaption( QObject::tr("Opie Eye" ) ); m_cfg = new Opie::Core::OConfig("opie-eye"); m_cfg->setGroup("main" ); readConfig(); m_setDocCalled = false; m_polishDone = false; m_SmallWindow = QApplication::desktop()->size().width()<330; m_storage = new StorageInfo(); connect(m_storage, SIGNAL(disksChanged() ), this, SLOT( dirChanged() ) ); m_stack = new Opie::Ui::OWidgetStack( this ); setCentralWidget( m_stack ); m_view = new PIconView( m_stack, m_cfg ); m_stack->addWidget( m_view, IconView ); m_stack->raiseWidget( IconView ); connect(m_view, SIGNAL(sig_display(const QString&)), this, SLOT(slotDisplay(const QString&))); connect(m_view, SIGNAL(sig_showInfo(const QString&)), this, SLOT(slotShowInfo(const QString&)) ); connect(this,SIGNAL(changeListMode(int)),m_view,SLOT(slotChangeMode(int))); - m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce); - listviewMenu = 0; /* setup menu and toolbar */ setupActions(); setupToolbar(); setupMenu(); m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true)); m_aAutoRotate->setEnabled(!m_aUnscaled->isOn()); if (m_aForceSmall) { m_aForceSmall->setOn(m_cfg->readBoolEntry("dontshowseperate",true)); } odebug << "mainwindow constructor done" << oendl; } PMainWindow::~PMainWindow() { } void PMainWindow::slotToggleZoomer() { m_aZoomer->setOn(!m_aZoomer->isOn()); } void PMainWindow::slotZoomerToggled(bool how) { if (m_disp) { m_disp->setShowZoomer(how); } if (autoSave) { m_cfg->writeEntry("zoomeron",how); } } void PMainWindow::slotToggleAutorotate() { if (!m_aAutoRotate->isEnabled()) return; m_aAutoRotate->setOn(!m_aAutoRotate->isOn()); } void PMainWindow::slotToggleAutoscale() { m_aUnscaled->setOn(!m_aUnscaled->isOn()); } void PMainWindow::slotRotateToggled(bool how) { if (autoSave) { m_cfg->writeEntry("autorotate",how); } if (m_disp) { m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),how); } } void PMainWindow::slotScaleToggled(bool how) { if (autoSave) { m_cfg->writeEntry("unscaled",how); } odebug << "Unscaled: " << m_aUnscaled->isOn() << oendl; odebug << "How: " << how << oendl; if (how) { m_aAutoRotate->setOn(false); } if (m_disp) { m_disp->setAutoScaleRotate(!m_aUnscaled->isOn(),m_aAutoRotate->isOn()); |