summaryrefslogtreecommitdiff
authorzecke <zecke>2005-03-06 14:07:46 (UTC)
committer zecke <zecke>2005-03-06 14:07:46 (UTC)
commita81251b503cba26ad326ac6c68a80a2930bef896 (patch) (unidiff)
tree07b028d708fe8add7b9766213f32d77e48c3f7be
parent125fa91f604cf9b7f3272798e72b6725fca9e23f (diff)
downloadopie-a81251b503cba26ad326ac6c68a80a2930bef896.zip
opie-a81251b503cba26ad326ac6c68a80a2930bef896.tar.gz
opie-a81251b503cba26ad326ac6c68a80a2930bef896.tar.bz2
-NoForce is the default mode of the OWidgetStack. There is no need
to set it here.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/opie-eye/gui/mainwindow.cpp2
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
@@ -22,98 +22,96 @@
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24#include <qpe/config.h> 24#include <qpe/config.h>
25#include <qpe/ir.h> 25#include <qpe/ir.h>
26#include <qpe/storage.h> 26#include <qpe/storage.h>
27#include <qpe/applnk.h> 27#include <qpe/applnk.h>
28 28
29#include <qtoolbar.h> 29#include <qtoolbar.h>
30#include <qtoolbutton.h> 30#include <qtoolbutton.h>
31#include <qlayout.h> 31#include <qlayout.h>
32#include <qdialog.h> 32#include <qdialog.h>
33#include <qmap.h> 33#include <qmap.h>
34#include <qtimer.h> 34#include <qtimer.h>
35#include <qframe.h> 35#include <qframe.h>
36#include <qmenubar.h> 36#include <qmenubar.h>
37#include <qaction.h> 37#include <qaction.h>
38 38
39//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" ) 39//OPIE_EXPORT_APP_V2( Opie::Core::OApplicationFactory<PMainWindow>,"Opie Eye" )
40OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>) 40OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<PMainWindow>)
41 41
42PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style) 42PMainWindow::PMainWindow(QWidget* wid, const char* name, WFlags style)
43 : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 ) 43 : QMainWindow( wid, name, style ), m_info( 0 ), m_disp( 0 )
44{ 44{
45 setCaption( QObject::tr("Opie Eye" ) ); 45 setCaption( QObject::tr("Opie Eye" ) );
46 m_cfg = new Opie::Core::OConfig("opie-eye"); 46 m_cfg = new Opie::Core::OConfig("opie-eye");
47 m_cfg->setGroup("main" ); 47 m_cfg->setGroup("main" );
48 readConfig(); 48 readConfig();
49 m_setDocCalled = false; 49 m_setDocCalled = false;
50 m_polishDone = false; 50 m_polishDone = false;
51 m_SmallWindow = QApplication::desktop()->size().width()<330; 51 m_SmallWindow = QApplication::desktop()->size().width()<330;
52 52
53 m_storage = new StorageInfo(); 53 m_storage = new StorageInfo();
54 connect(m_storage, SIGNAL(disksChanged() ), 54 connect(m_storage, SIGNAL(disksChanged() ),
55 this, SLOT( dirChanged() ) ); 55 this, SLOT( dirChanged() ) );
56 56
57 m_stack = new Opie::Ui::OWidgetStack( this ); 57 m_stack = new Opie::Ui::OWidgetStack( this );
58 setCentralWidget( m_stack ); 58 setCentralWidget( m_stack );
59 59
60 m_view = new PIconView( m_stack, m_cfg ); 60 m_view = new PIconView( m_stack, m_cfg );
61 m_stack->addWidget( m_view, IconView ); 61 m_stack->addWidget( m_view, IconView );
62 m_stack->raiseWidget( IconView ); 62 m_stack->raiseWidget( IconView );
63 63
64 connect(m_view, SIGNAL(sig_display(const QString&)), 64 connect(m_view, SIGNAL(sig_display(const QString&)),
65 this, SLOT(slotDisplay(const QString&))); 65 this, SLOT(slotDisplay(const QString&)));
66 connect(m_view, SIGNAL(sig_showInfo(const QString&)), 66 connect(m_view, SIGNAL(sig_showInfo(const QString&)),
67 this, SLOT(slotShowInfo(const QString&)) ); 67 this, SLOT(slotShowInfo(const QString&)) );
68 connect(this,SIGNAL(changeListMode(int)),m_view,SLOT(slotChangeMode(int))); 68 connect(this,SIGNAL(changeListMode(int)),m_view,SLOT(slotChangeMode(int)));
69 69
70 m_stack->forceMode(Opie::Ui::OWidgetStack::NoForce);
71
72 listviewMenu = 0; 70 listviewMenu = 0;
73 /* setup menu and toolbar */ 71 /* setup menu and toolbar */
74 setupActions(); 72 setupActions();
75 setupToolbar(); 73 setupToolbar();
76 setupMenu(); 74 setupMenu();
77 m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true)); 75 m_aHideToolbar->setOn(m_cfg->readBoolEntry("showtoolbar",true));
78 m_aAutoRotate->setEnabled(!m_aUnscaled->isOn()); 76 m_aAutoRotate->setEnabled(!m_aUnscaled->isOn());
79 if (m_aForceSmall) { 77 if (m_aForceSmall) {
80 m_aForceSmall->setOn(m_cfg->readBoolEntry("dontshowseperate",true)); 78 m_aForceSmall->setOn(m_cfg->readBoolEntry("dontshowseperate",true));
81 } 79 }
82 odebug << "mainwindow constructor done" << oendl; 80 odebug << "mainwindow constructor done" << oendl;
83} 81}
84 82
85PMainWindow::~PMainWindow() { 83PMainWindow::~PMainWindow() {
86} 84}
87 85
88void PMainWindow::slotToggleZoomer() 86void PMainWindow::slotToggleZoomer()
89{ 87{
90 m_aZoomer->setOn(!m_aZoomer->isOn()); 88 m_aZoomer->setOn(!m_aZoomer->isOn());
91} 89}
92 90
93void PMainWindow::slotZoomerToggled(bool how) 91void PMainWindow::slotZoomerToggled(bool how)
94{ 92{
95 if (m_disp) { 93 if (m_disp) {
96 m_disp->setShowZoomer(how); 94 m_disp->setShowZoomer(how);
97 } 95 }
98 if (autoSave) { 96 if (autoSave) {
99 m_cfg->writeEntry("zoomeron",how); 97 m_cfg->writeEntry("zoomeron",how);
100 } 98 }
101} 99}
102 100
103void PMainWindow::slotToggleAutorotate() 101void PMainWindow::slotToggleAutorotate()
104{ 102{
105 if (!m_aAutoRotate->isEnabled()) return; 103 if (!m_aAutoRotate->isEnabled()) return;
106 m_aAutoRotate->setOn(!m_aAutoRotate->isOn()); 104 m_aAutoRotate->setOn(!m_aAutoRotate->isOn());
107} 105}
108 106
109void PMainWindow::slotToggleAutoscale() 107void PMainWindow::slotToggleAutoscale()
110{ 108{
111 m_aUnscaled->setOn(!m_aUnscaled->isOn()); 109 m_aUnscaled->setOn(!m_aUnscaled->isOn());
112} 110}
113 111
114void PMainWindow::slotRotateToggled(bool how) 112void PMainWindow::slotRotateToggled(bool how)
115{ 113{
116 if (autoSave) { 114 if (autoSave) {
117 m_cfg->writeEntry("autorotate",how); 115 m_cfg->writeEntry("autorotate",how);
118 } 116 }
119 if (m_disp) { 117 if (m_disp) {