summaryrefslogtreecommitdiff
path: root/library/global.h
authorkergoth <kergoth>2002-01-25 22:14:26 (UTC)
committer kergoth <kergoth>2002-01-25 22:14:26 (UTC)
commit15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff)
treec2fa0399a2c47fda8e2cd0092c73a809d17f68eb /library/global.h
downloadopie-15318cad33835e4e2dc620d033e43cd930676cdd.zip
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz
opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2
Initial revision
Diffstat (limited to 'library/global.h') (more/less context) (ignore whitespace changes)
-rw-r--r--library/global.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/library/global.h b/library/global.h
new file mode 100644
index 0000000..d9ff8f8
--- a/dev/null
+++ b/library/global.h
@@ -0,0 +1,85 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef GLOBAL_H
21#define GLOBAL_H
22
23#include <qstringlist.h>
24#include <qguardedptr.h>
25class QDawg;
26class QLabel;
27class QWidget;
28class AppLnk;
29class DocLnkSet;
30
31class Global
32{
33public:
34 Global();
35
36 // Dictionaries
37 static const QDawg& fixedDawg();
38 static const QDawg& addedDawg();
39 static const QDawg& dawg(const QString& name);
40
41 static void addWords(const QStringList& word);
42 static void addWords(const QString& dictname, const QStringList& word);
43 // static void removeWords(const QStringList& word); -- if someone wants it
44
45 static void createDocDir();
46
47 static void findDocuments(DocLnkSet* folder, const QString &mimefilter=QString::null);
48
49 static QString applicationFileName(const QString& appname, const QString& filename);
50
51 struct Command {
52 const char *file;
53 QWidget *(*func)( bool );
54 bool maximized;
55 bool documentary;
56 };
57 static void setBuiltinCommands( Command* );
58
59 static void invoke( const QString &exec);
60 static void execute( const QString &exec, const QString &document=QString::null );
61 static void setDocument( QWidget* receiver, const QString& document );
62 static bool terminateBuiltin( const QString& );
63 static void terminate( const AppLnk* );
64
65 static bool isBuiltinCommand( const QString &name );
66
67 // system messaging
68 static void applyStyle();
69 static void statusMessage(const QString&);
70 static QWidget *shutdown( bool = FALSE );
71 static QWidget *restart( bool = FALSE );
72 static void hideInputMethod();
73 static void showInputMethod();
74
75 static void writeHWClock();
76
77 static QString shellQuote(const QString& s);
78 static QString stringQuote(const QString& s);
79
80private:
81 static Command* builtin;
82 static QGuardedPtr<QWidget> *running;
83};
84
85#endif