summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/config.cpp12
-rw-r--r--library/config.h5
-rw-r--r--library/datebookmonth.cpp12
-rw-r--r--library/datebookmonth.h15
-rw-r--r--library/qpemenubar.cpp9
-rw-r--r--library/qpemenubar.h7
6 files changed, 59 insertions, 1 deletions
diff --git a/library/config.cpp b/library/config.cpp
index 1121cd4..b47c620 100644
--- a/library/config.cpp
+++ b/library/config.cpp
@@ -99,12 +99,24 @@ Config::Config( const QString &name, Domain domain )
99 read(); 99 read();
100 QStringList l = Global::languageList(); 100 QStringList l = Global::languageList();
101 lang = l[0]; 101 lang = l[0];
102 glang = l[1]; 102 glang = l[1];
103} 103}
104 104
105
106// Sharp ROM compatibility
107Config::Config ( const QString &name, bool what )
108 : filename( configFilename(name,what ? User : File) )
109{
110 git = groups.end();
111 read();
112 QStringList l = Global::languageList();
113 lang = l[0];
114 glang = l[1];
115}
116
105/*! 117/*!
106 Writes any changes to disk and destroys the in-memory object. 118 Writes any changes to disk and destroys the in-memory object.
107*/ 119*/
108Config::~Config() 120Config::~Config()
109{ 121{
110 if ( changed ) 122 if ( changed )
diff --git a/library/config.h b/library/config.h
index 1dc32fa..0bab7ca 100644
--- a/library/config.h
+++ b/library/config.h
@@ -32,13 +32,13 @@ class Config
32public: 32public:
33 typedef QMap< QString, QString > ConfigGroup; 33 typedef QMap< QString, QString > ConfigGroup;
34 34
35 enum Domain { File, User }; 35 enum Domain { File, User };
36 Config( const QString &name, Domain domain=User ); 36 Config( const QString &name, Domain domain=User );
37 ~Config(); 37 ~Config();
38 38
39 bool operator == ( const Config & other ) const { return (filename == other.filename); } 39 bool operator == ( const Config & other ) const { return (filename == other.filename); }
40 bool operator != ( const Config & other ) const { return (filename != other.filename); } 40 bool operator != ( const Config & other ) const { return (filename != other.filename); }
41 41
42 bool isValid() const; 42 bool isValid() const;
43 bool hasKey( const QString &key ) const; 43 bool hasKey( const QString &key ) const;
44 44
@@ -81,12 +81,15 @@ protected:
81 QString filename; 81 QString filename;
82 QString lang; 82 QString lang;
83 QString glang; 83 QString glang;
84 bool changed; 84 bool changed;
85 ConfigPrivate *d; 85 ConfigPrivate *d;
86 static QString configFilename(const QString& name, Domain); 86 static QString configFilename(const QString& name, Domain);
87
88private: // Sharp ROM compatibility
89 Config( const QString &name, bool what );
87}; 90};
88 91
89inline QString Config::readEntry( const QString &key, const QString &deflt ) const 92inline QString Config::readEntry( const QString &key, const QString &deflt ) const
90{ return ((Config*)this)->readEntry(key,deflt); } 93{ return ((Config*)this)->readEntry(key,deflt); }
91inline QString Config::readEntryCrypt( const QString &key, const QString &deflt ) const 94inline QString Config::readEntryCrypt( const QString &key, const QString &deflt ) const
92{ return ((Config*)this)->readEntryCrypt(key,deflt); } 95{ return ((Config*)this)->readEntryCrypt(key,deflt); }
diff --git a/library/datebookmonth.cpp b/library/datebookmonth.cpp
index 4a9dcbd..e8be313 100644
--- a/library/datebookmonth.cpp
+++ b/library/datebookmonth.cpp
@@ -745,6 +745,18 @@ void DateButton::setDateFormat( DateFormat f )
745 745
746bool DateButton::customWhatsThis() const 746bool DateButton::customWhatsThis() const
747{ 747{
748 return TRUE; 748 return TRUE;
749} 749}
750 750
751
752// this class is only here for Sharp ROM compatibility
753// I have reverse engineered this class and it seems to
754// work (only qtmail seems to use it) - sandman
755// DO NOT USE IT IN NEW CODE !!
756
757DateBookMonthPopup::DateBookMonthPopup ( QWidget *w )
758 : QPopupMenu ( w )
759{
760 m_dbm = new DateBookMonth( this, 0, TRUE );
761 insertItem( m_dbm );
762}
diff --git a/library/datebookmonth.h b/library/datebookmonth.h
index 3c57c19..cb436a8 100644
--- a/library/datebookmonth.h
+++ b/library/datebookmonth.h
@@ -25,12 +25,13 @@
25#include <qvbox.h> 25#include <qvbox.h>
26#include <qhbox.h> 26#include <qhbox.h>
27#include <qdatetime.h> 27#include <qdatetime.h>
28#include <qvaluelist.h> 28#include <qvaluelist.h>
29#include <qtable.h> 29#include <qtable.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31#include <qpopupmenu.h>
31 32
32#include "calendar.h" 33#include "calendar.h"
33#include "timestring.h" 34#include "timestring.h"
34 35
35class QToolButton; 36class QToolButton;
36class QComboBox; 37class QComboBox;
@@ -206,8 +207,22 @@ private:
206 bool longFormat; 207 bool longFormat;
207 bool weekStartsMonday; 208 bool weekStartsMonday;
208 QDate currDate; 209 QDate currDate;
209 DateFormat df; 210 DateFormat df;
210}; 211};
211 212
213// this class is only here for Sharp ROM compatibility
214// I have reverse engineered this class and it seems to
215// work (only qtmail seems to use it) - sandman
216// DO NOT USE IT IN NEW CODE !!
217
218class DateBookMonthPopup : public QPopupMenu
219{
220 Q_OBJECT
221public:
222 DateBookMonthPopup ( QWidget *w );
223
224private:
225 DateBookMonth *m_dbm;
226};
212 227
213#endif 228#endif
diff --git a/library/qpemenubar.cpp b/library/qpemenubar.cpp
index c658d10..4aa0bf3 100644
--- a/library/qpemenubar.cpp
+++ b/library/qpemenubar.cpp
@@ -41,12 +41,21 @@ public:
41 } 41 }
42 } 42 }
43 } 43 }
44}; 44};
45 45
46 46
47// Sharp ROM compatibility
48void QPEMenuToolFocusManager::setMenukeyEnabled ( bool )
49{
50}
51int QPEMenuBar::getOldFocus ( )
52{
53 return 0;
54}
55
47QPEMenuToolFocusManager *QPEMenuToolFocusManager::me = 0; 56QPEMenuToolFocusManager *QPEMenuToolFocusManager::me = 0;
48 57
49QPEMenuToolFocusManager::QPEMenuToolFocusManager() : QObject() 58QPEMenuToolFocusManager::QPEMenuToolFocusManager() : QObject()
50{ 59{
51 qApp->installEventFilter( this ); 60 qApp->installEventFilter( this );
52} 61}
diff --git a/library/qpemenubar.h b/library/qpemenubar.h
index 05abc4e..66d0c85 100644
--- a/library/qpemenubar.h
+++ b/library/qpemenubar.h
@@ -50,12 +50,15 @@ private slots:
50private: 50private:
51 typedef QGuardedPtr<QWidget> GuardedWidget; 51 typedef QGuardedPtr<QWidget> GuardedWidget;
52 QValueList<GuardedWidget> list; 52 QValueList<GuardedWidget> list;
53 GuardedWidget inFocus; 53 GuardedWidget inFocus;
54 GuardedWidget oldFocus; 54 GuardedWidget oldFocus;
55 static QPEMenuToolFocusManager *me; 55 static QPEMenuToolFocusManager *me;
56
57private: // Sharp ROM compatibility
58 void setMenukeyEnabled ( bool b );
56}; 59};
57 60
58 61
59class QPEMenuBar : public QMenuBar 62class QPEMenuBar : public QMenuBar
60{ 63{
61 Q_OBJECT 64 Q_OBJECT
@@ -69,10 +72,14 @@ protected:
69 /* Patch from Mickey 72 /* Patch from Mickey
70 * Sharp Qtopia1.5 seems to have these functions 73 * Sharp Qtopia1.5 seems to have these functions
71 * TO BE RESOLVED - zecke 74 * TO BE RESOLVED - zecke
72 */ 75 */
73 void activateItem( int index ); 76 void activateItem( int index );
74 void goodbye(); 77 void goodbye();
78
79 // This is a special "lineo" add-on for the Sharp ROM
80 // nobody knows, what it does, though ...
81 int getOldFocus ( );
75}; 82};
76 83
77#endif 84#endif
78 85