summaryrefslogtreecommitdiff
path: root/library/global.h
Unidiff
Diffstat (limited to 'library/global.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/global.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/library/global.h b/library/global.h
index 1136b12..f32c498 100644
--- a/library/global.h
+++ b/library/global.h
@@ -1,90 +1,94 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** 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
7** 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
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** 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
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20#ifndef GLOBAL_H 20#ifndef GLOBAL_H
21#define GLOBAL_H 21#define GLOBAL_H
22 22
23#include <qstringlist.h> 23#include <qstringlist.h>
24#include <qguardedptr.h> 24#include <qguardedptr.h>
25class QDawg; 25class QDawg;
26class QLabel; 26class QLabel;
27class QWidget; 27class QWidget;
28class AppLnk; 28class AppLnk;
29class DocLnkSet; 29class DocLnkSet;
30 30class QFile;
31class Global 31class Global
32{ 32{
33public: 33public:
34 Global(); 34 Global();
35 35
36 // Dictionaries 36 // Dictionaries
37 static const QDawg& fixedDawg(); 37 static const QDawg& fixedDawg();
38 static const QDawg& addedDawg(); 38 static const QDawg& addedDawg();
39 static const QDawg& dawg(const QString& name); 39 static const QDawg& dawg(const QString& name);
40 40
41 static void addWords(const QStringList& word); 41 static void addWords(const QStringList& word);
42 static void addWords(const QString& dictname, const QStringList& word); 42 static void addWords(const QString& dictname, const QStringList& word);
43 // static void removeWords(const QStringList& word); -- if someone wants it 43 // static void removeWords(const QStringList& word); -- if someone wants it
44 44
45 static void createDocDir(); 45 static void createDocDir();
46 46
47 static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null); 47 static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null);
48 48
49 static QString applicationFileName(const QString& appname, const QString& filename); 49 static QString applicationFileName(const QString& appname, const QString& filename);
50 50
51 struct Command { 51 struct Command {
52 const char *file; 52 const char *file;
53 QWidget *(*func)( bool ); 53 QWidget *(*func)( bool );
54 bool maximized; 54 bool maximized;
55 bool documentary; 55 bool documentary;
56 }; 56 };
57 static void setBuiltinCommands( Command* ); 57 static void setBuiltinCommands( Command* );
58 58
59 static void execute( const QString &exec, const QString &document=QString::null ); 59 static void execute( const QString &exec, const QString &document=QString::null );
60 static void setDocument( QWidget* receiver, const QString& document ); 60 static void setDocument( QWidget* receiver, const QString& document );
61 static bool terminateBuiltin( const QString& ); 61 static bool terminateBuiltin( const QString& );
62 static void terminate( const AppLnk* ); 62 static void terminate( const AppLnk* );
63 63
64 static bool isBuiltinCommand( const QString &name ); 64 static bool isBuiltinCommand( const QString &name );
65 65
66 // system messaging 66 // system messaging
67 static void applyStyle(); 67 static void applyStyle();
68 static void statusMessage(const QString&); 68 static void statusMessage(const QString&);
69 static QWidget *shutdown( bool = FALSE ); 69 static QWidget *shutdown( bool = FALSE );
70 static QWidget *restart( bool = FALSE ); 70 static QWidget *restart( bool = FALSE );
71 static void hideInputMethod(); 71 static void hideInputMethod();
72 static void showInputMethod(); 72 static void showInputMethod();
73 73
74 static void writeHWClock(); 74 static void writeHWClock();
75 75
76 static QString shellQuote(const QString& s); 76 static QString shellQuote(const QString& s);
77 static QString stringQuote(const QString& s); 77 static QString stringQuote(const QString& s);
78 78
79#ifdef QTOPIA_INTERNAL_LANGLIST 79#ifdef QTOPIA_INTERNAL_LANGLIST
80 static QStringList languageList(); 80 static QStringList languageList();
81 static QStringList helpPath(); 81 static QStringList helpPath();
82#endif 82#endif
83//#ifdef QTOPIA_INTERNAL_FILEOPERATIONS
84 static bool truncateFile(QFile &f, int size);
85 static QString tempDir( );
86//#endif
83 87
84private: 88private:
85 static void invoke( const QString &exec); 89 static void invoke( const QString &exec);
86 static Command* builtin; 90 static Command* builtin;
87 static QGuardedPtr<QWidget> *running; 91 static QGuardedPtr<QWidget> *running;
88}; 92};
89 93
90#endif 94#endif