-rw-r--r-- | library/global.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/library/global.h b/library/global.h index fdf8754..1136b12 100644 --- a/library/global.h +++ b/library/global.h | |||
@@ -1,93 +1,90 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Holger 'zecke' Freyther <freyther@kde.org> | 2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. |
3 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
4 | ** | 3 | ** |
5 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of the Qtopia Environment. |
6 | ** | 5 | ** |
7 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
8 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
9 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
10 | ** packaging of this file. | 9 | ** packaging of this file. |
11 | ** | 10 | ** |
12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
14 | ** | 13 | ** |
15 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
16 | ** | 15 | ** |
17 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
18 | ** not clear to you. | 17 | ** not clear to you. |
19 | ** | 18 | ** |
20 | **********************************************************************/ | 19 | **********************************************************************/ |
21 | #ifndef GLOBAL_H | 20 | #ifndef GLOBAL_H |
22 | #define GLOBAL_H | 21 | #define GLOBAL_H |
23 | 22 | ||
24 | #include <qstringlist.h> | 23 | #include <qstringlist.h> |
25 | #include <qguardedptr.h> | 24 | #include <qguardedptr.h> |
26 | class QDawg; | 25 | class QDawg; |
27 | class QLabel; | 26 | class QLabel; |
28 | class QWidget; | 27 | class QWidget; |
29 | class AppLnk; | 28 | class AppLnk; |
30 | class DocLnkSet; | 29 | class DocLnkSet; |
31 | 30 | ||
32 | class Global | 31 | class Global |
33 | { | 32 | { |
34 | public: | 33 | public: |
35 | Global(); | 34 | Global(); |
36 | 35 | ||
37 | // Dictionaries | 36 | // Dictionaries |
38 | static const QDawg& fixedDawg(); | 37 | static const QDawg& fixedDawg(); |
39 | static const QDawg& addedDawg(); | 38 | static const QDawg& addedDawg(); |
40 | static const QDawg& dawg(const QString& name); | 39 | static const QDawg& dawg(const QString& name); |
41 | 40 | ||
42 | static void addWords(const QStringList& word); | 41 | static void addWords(const QStringList& word); |
43 | static void addWords(const QString& dictname, const QStringList& word); | 42 | static void addWords(const QString& dictname, const QStringList& word); |
44 | // static void removeWords(const QStringList& word); -- if someone wants it | 43 | // static void removeWords(const QStringList& word); -- if someone wants it |
45 | 44 | ||
46 | static void createDocDir(); | 45 | static void createDocDir(); |
47 | 46 | ||
48 | static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null); | 47 | static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null); |
49 | // we don't need a mimefilter. Same as above but this is fast as light speed or not ;) | ||
50 | //static void findNewDocuments( DocLnkSet* folder ); | ||
51 | 48 | ||
52 | static QString applicationFileName(const QString& appname, const QString& filename); | 49 | static QString applicationFileName(const QString& appname, const QString& filename); |
53 | 50 | ||
54 | struct Command { | 51 | struct Command { |
55 | const char *file; | 52 | const char *file; |
56 | QWidget *(*func)( bool ); | 53 | QWidget *(*func)( bool ); |
57 | bool maximized; | 54 | bool maximized; |
58 | bool documentary; | 55 | bool documentary; |
59 | }; | 56 | }; |
60 | static void setBuiltinCommands( Command* ); | 57 | static void setBuiltinCommands( Command* ); |
61 | 58 | ||
62 | static void invoke( const QString &exec); | ||
63 | static void execute( const QString &exec, const QString &document=QString::null ); | 59 | static void execute( const QString &exec, const QString &document=QString::null ); |
64 | static void setDocument( QWidget* receiver, const QString& document ); | 60 | static void setDocument( QWidget* receiver, const QString& document ); |
65 | static bool terminateBuiltin( const QString& ); | 61 | static bool terminateBuiltin( const QString& ); |
66 | static void terminate( const AppLnk* ); | 62 | static void terminate( const AppLnk* ); |
67 | 63 | ||
68 | static bool isBuiltinCommand( const QString &name ); | 64 | static bool isBuiltinCommand( const QString &name ); |
69 | 65 | ||
70 | // system messaging | 66 | // system messaging |
71 | static void applyStyle(); | 67 | static void applyStyle(); |
72 | static void statusMessage(const QString&); | 68 | static void statusMessage(const QString&); |
73 | static QWidget *shutdown( bool = FALSE ); | 69 | static QWidget *shutdown( bool = FALSE ); |
74 | static QWidget *restart( bool = FALSE ); | 70 | static QWidget *restart( bool = FALSE ); |
75 | static void hideInputMethod(); | 71 | static void hideInputMethod(); |
76 | static void showInputMethod(); | 72 | static void showInputMethod(); |
77 | 73 | ||
78 | static void writeHWClock(); | 74 | static void writeHWClock(); |
79 | 75 | ||
80 | static QString shellQuote(const QString& s); | 76 | static QString shellQuote(const QString& s); |
81 | static QString stringQuote(const QString& s); | 77 | static QString stringQuote(const QString& s); |
82 | 78 | ||
83 | #ifdef QTOPIA_INTERNAL_LANGLIST | 79 | #ifdef QTOPIA_INTERNAL_LANGLIST |
84 | static QStringList languageList(); | 80 | static QStringList languageList(); |
85 | static QStringList helpPath(); | 81 | static QStringList helpPath(); |
86 | #endif | 82 | #endif |
87 | 83 | ||
88 | private: | 84 | private: |
85 | static void invoke( const QString &exec); | ||
89 | static Command* builtin; | 86 | static Command* builtin; |
90 | static QGuardedPtr<QWidget> *running; | 87 | static QGuardedPtr<QWidget> *running; |
91 | }; | 88 | }; |
92 | 89 | ||
93 | #endif | 90 | #endif |