Global Class Reference
The Global class provides application-wide global functions. More...
#include <global.h>
Collaboration diagram for Global:

Static Public Member Functions | |
| const QDawg & | fixedDawg () |
| const QDawg & | addedDawg () |
| const QDawg & | dawg (const QString &name) |
| void | addWords (const QStringList &word) |
| void | addWords (const QString &dictname, const QStringList &word) |
| void | createDocDir () |
| void | findDocuments (DocLnkSet *folder, const QString &mimefilter=QString::null) |
| QString | applicationFileName (const QString &appname, const QString &filename) |
| void | setBuiltinCommands (Command *) |
| void | execute (const QString &exec, const QString &document=QString::null) |
| void | setDocument (QWidget *receiver, const QString &document) |
| bool | terminateBuiltin (const QString &) |
| void | terminate (const AppLnk *) |
| bool | isBuiltinCommand (const QString &name) |
| void | applyStyle () |
| void | statusMessage (const QString &) |
| QWidget * | shutdown (bool=FALSE) |
| QWidget * | restart (bool=FALSE) |
| void | hideInputMethod () |
| void | showInputMethod () |
| void | writeHWClock () |
| QString | shellQuote (const QString &s) |
| QString | stringQuote (const QString &s) |
Detailed Description
The Global class provides application-wide global functions.The Global functions are grouped as follows:
User Interface
The statusMessage() function provides short-duration messages to the user. The showInputMethod() function shows the current input method, and hideInputMethod() hides the input method.
Document related
The findDocuments() function creates a set of DocLnk objects in a particular folder.
Filesystem related
Global provides an applicationFileName() function that returns the full path of an application-specific file.
The execute() function runs an application.
Word list related
A list of words relevant to the current locale is maintained by the system. The list is held in a DAWG (implemented by the QDawg class). This list is used, for example, by the pickboard input method.
The global QDawg is returned by fixedDawg(); this cannot be updated. An updatable copy of the global QDawg is returned by addedDawg(). Applications may have their own word lists stored in {QDawg}s which are returned by dawg(). Use addWords() to add words to the updateable copy of the global QDawg or to named application {QDawg}s.
Quoting
The shellQuote() function quotes a string suitable for passing to a shell. The stringQuote() function backslash escapes '\' and '"' characters.
Hardware
The implementation of the writeHWClock() function depends on the AlarmServer implementation. If the AlarmServer is using atd the clock will be synced to hardware. If opie-alarm is used the hardware clock will be synced before suspending the device. opie-alarm is used by iPAQ and Zaurii implementation
Definition at line 31 of file global.h.
Member Function Documentation
|
|
Returns the unchangeable QDawg that contains general words for the current locale.
Definition at line 237 of file global.cpp. References QValueList::begin(), QFile::close(), QDawg::createFromWords(), QValueList::end(), QFile::exists(), QFile::open(), QDawg::readFile(), and QDawg::write(). |
|
|
Returns the changeable QDawg that contains general words for the current locale.
Definition at line 284 of file global.cpp. References dawg(). |
|
|
Returns the QDawg with the given name. This is an application-specific word list. name should not contain "/". Definition at line 295 of file global.cpp. References applicationFileName(), QFile::open(), and QDawg::readFile(). Referenced by addedDawg(), and addWords(). |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Adds wordlist to the addedDawg(). Note that the addition of words persists between program executions (they are saved in the dictionary files), so you should confirm the words with the user before adding them. Definition at line 320 of file global.cpp. |
|
||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Adds wordlist to the addedDawg(). Note that the addition of words persists between program executions (they are saved in the dictionary files), so you should confirm the words with the user before adding them. Definition at line 333 of file global.cpp. References QDawg::allWords(), applicationFileName(), QFile::close(), QDawg::createFromWords(), dawg(), QFile::open(), and QDawg::write(). |
|
||||||||||||
|
Finds all documents on the system's document directories which match the filter mimefilter, and appends the resulting DocLnk objects to folder. let's do intellegint way of searching these files a) the user don't want to check mediums global b) the user wants to check but use the global options for it c) the user wants to check it but not this medium d) the user wants to check and this medium as well In all cases we need to apply a different mimefilter to the medium. a) mimefilter.isEmpty() we need to apply the responding filter either the global or the one on the medium b) mimefilter is set to an application we need to find out if the mimetypes are included in the mime mask of the medium Definition at line 745 of file global.cpp. References DocLnkSet::appendFrom(), QListIterator::current(), and StorageInfo::fileSystems(). Referenced by FileSelector::reread(). |
|
||||||||||||
|
Returns the full path for the application called appname, with the given filename. Returns QString::null if there was a problem creating the directory tree for appname. If filename contains "/", it is the caller's responsibility to ensure that those directories exist. Definition at line 359 of file global.cpp. References QFile::exists(), and QDir::mkdir(). Referenced by addWords(), and dawg(). |
|
||||||||||||
|
Executes the application identfied by c, passing document if it isn't null. Note that a better approach might be to send a QCop message to the application's QPE/Application/{appname} channel. Definition at line 683 of file global.cpp. References QString::isNull(). Referenced by AppLnk::invoke(). |
|
|
Displays a status message to the user. This usually appears in the taskbar for a short amount of time, then disappears. Definition at line 391 of file global.cpp. |
|
|
Explicitly hide the current input method. The current input method is still indicated in the taskbar, but no longer takes up screen space, and can no longer be interacted with.
Definition at line 458 of file global.cpp. References QCopChannel::send(). |
|
|
Explicitly show the current input method. Input methods are indicated in the taskbar by a small icon. If the input method is activated (shown) then it takes up some proportion of the bottom of the screen, to allow the user to interact (input characters) with it.
Definition at line 443 of file global.cpp. References QCopChannel::send(). |
|
|
The implementation depends on the mode of AlarmServer. If the AlarmServer uses atd the current system time will be written to the hardware clock. If the AlarmServer relies on opie-alarm the time will be written once the device gets suspended. opie-alarm is used by the Zaurus, iPAQs and SIMpad Definition at line 502 of file alarmserver.cpp. |
|
|
Returns the string s with the characters '\', '"', and '$' quoted by a preceeding '\'.
Definition at line 704 of file global.cpp. |
|
|
Returns the string s with the characters '\' and '"' quoted by a preceeding '\'.
Definition at line 725 of file global.cpp. |
The documentation for this class was generated from the following files:
