diff options
Diffstat (limited to 'sip/tqtpe')
-rw-r--r-- | sip/tqtpe/copying.sip | 51 | ||||
-rw-r--r-- | sip/tqtpe/tqpeapplication.sip | 223 | ||||
-rw-r--r-- | sip/tqtpe/tqpeapplnk.sip | 157 | ||||
-rw-r--r-- | sip/tqtpe/tqpeconfig.sip | 78 | ||||
-rw-r--r-- | sip/tqtpe/tqpefilemanager.sip | 53 | ||||
-rw-r--r-- | sip/tqtpe/tqpefileselector.sip | 69 | ||||
-rw-r--r-- | sip/tqtpe/tqpefontdatabase.sip | 67 | ||||
-rw-r--r-- | sip/tqtpe/tqpeglobal.sip | 83 | ||||
-rw-r--r-- | sip/tqtpe/tqpemenubar.sip | 42 | ||||
-rw-r--r-- | sip/tqtpe/tqpemenubutton.sip | 61 | ||||
-rw-r--r-- | sip/tqtpe/tqpeqcopenvelope.sip | 39 | ||||
-rw-r--r-- | sip/tqtpe/tqpeqdawg.sip | 65 | ||||
-rw-r--r-- | sip/tqtpe/tqperesource.sip | 50 | ||||
-rw-r--r-- | sip/tqtpe/tqpetimestring.sip | 71 | ||||
-rw-r--r-- | sip/tqtpe/tqpetoolbar.sip | 42 | ||||
-rw-r--r-- | sip/tqtpe/tqtpemod.sip | 94 |
16 files changed, 1245 insertions, 0 deletions
diff --git a/sip/tqtpe/copying.sip b/sip/tqtpe/copying.sip new file mode 100644 index 0000000..49b4531 --- /dev/null +++ b/sip/tqtpe/copying.sip @@ -0,0 +1,51 @@ +// This is the SIP file defining the PyTQt license. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +%Copying +Copyright (c) 2007 + Riverbank Computing Limited <info@riverbankcomputing.co.uk> + +This file is part of PyTQt. + +This copy of PyTQt is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +%End + + +%OptionalInclude pytqt-internal.sip +%OptionalInclude pytqt-gpl.sip +%OptionalInclude pytqt-commercial.sip +%OptionalInclude pytqt-edu.sip +%OptionalInclude pytqt-eval.sip +%OptionalInclude pytqt-nc.sip +%OptionalInclude pytqt-tkc.sip diff --git a/sip/tqtpe/tqpeapplication.sip b/sip/tqtpe/tqpeapplication.sip new file mode 100644 index 0000000..9e6b99b --- /dev/null +++ b/sip/tqtpe/tqpeapplication.sip @@ -0,0 +1,223 @@ +// This is the SIP interface definition for TQPEApplication. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class TQPEApplication : TQApplication +{ +%TypeHeaderCode +#include <tqpe/qpeapplication.h> +#include <tqwidgetlist.h> +%End + +public: + TQPEApplication(SIP_PYLIST,Type=GuiClient) [(int &,char **,Type=GuiClient)]; +%MethodCode + // The Python interface is a list of argument strings that is + // modified. + + int argc; + char **argv; + + // Convert the list. + if ((argv = pyArgvToC(a0,&argc)) == NULL) + sipIsErr = 1; + else + { + // Create it now the arguments are right. + int nargc = argc; + + Py_BEGIN_ALLOW_THREADS + sipCpp = new sipTQPEApplication(nargc,argv,(TQApplication::Type)a1); + Py_END_ALLOW_THREADS + + // Now modify the original list. + updatePyArgv(a0,argc,argv); + } +%End + + ~TQPEApplication(); +%MethodCode + // See the comments in ~TQApplication() to understand what's + // being done here. + + TQWidgetList *tlw = TQApplication::topLevelWidgets(); + TQWidgetListIt it(*tlw); + TQWidget *w; + + while ((w = it.current()) != 0) + { + PyObject *sw; + + if ((sw = sipGetWrapper(w,sipClass_TQWidget)) != NULL) + sipTransferTo(sw,NULL); + + ++it; + } + + delete tlw; +%End + +%ConvertToSubClassCode + // The table of Python class objects indexed by their names. The table + // must be sorted by name. + + static sipStringTypeClassMap map[] = { + {sipName_FileSelector, &sipClass_FileSelector}, + {sipName_MenuButton, &sipClass_MenuButton}, + {sipName_TQPEApplication, &sipClass_TQPEApplication}, + {sipName_TQPEMenuBar, &sipClass_TQPEMenuBar}, + {sipName_TQPEToolBar, &sipClass_TQPEToolBar}, + }; + + sipClass = sipMapStringToClass(sipCpp -> className(),map, + sizeof (map)/sizeof (map[0])); +%End + + static TQString qpeDir(); + static TQString documentDir(); + void applyStyle(); + static int defaultRotation(); + static void setDefaultRotation(int); + static void grabKeyboard(); + static void ungrabKeyboard(); + + enum StylusMode { + LeftOnly, + RightOnHold + }; + + static void setStylusOperation(TQWidget *,StylusMode); + static StylusMode stylusOperation(TQWidget *); + + enum InputMethodHint { + Normal, + AlwaysOff, + AlwaysOn + }; + + enum screenSaverHint { + Disable, + DisableLightOff, + DisableSuspend, + Enable + }; + + static void setInputMethodHint(TQWidget *,InputMethodHint); + static InputMethodHint inputMethodHint(TQWidget *); + + void showMainWidget(TQWidget *,bool = 0); + void showMainDocumentWidget(TQWidget *,bool = 0); + + static void setKeepRunning(); + bool keepRunning() const; + + int exec() /PyName=exec_loop, ReleaseGIL, + PreHook=__pyTQtPreEventLoopHook__, + PostHook=__pyTQtPostEventLoopHook__/; + +signals: + void clientMoused(); + void timeChanged(); + void clockChanged(bool); + void volumeChanged(bool); + void appMessage(const TQCString &,const TQByteArray &); + void weekChanged(bool); + void dateFormatChanged(DateFormat); + void flush(); + void reload(); + +protected: +// bool qwsEventFilter(TQWSEvent *); +// void internalSetStyle(const TQString &); + void prepareForTermination(bool); + virtual void restart(); + virtual void shutdown(); + bool eventFilter(TQObject *,TQEvent *); + void timerEvent(TQTimerEvent *); + bool keyboardGrabbed() const; + bool raiseAppropriateWindow(); + virtual void tryQuit(); + + +%TypeCode +#include <string.h> + + +// Convert a Python argv list to a conventional C argc count and argv array. +static char **pyArgvToC(PyObject *argvlist,int *argcp) +{ + int argc; + char **argv; + + argc = PyList_Size(argvlist); + + // Allocate space for two copies of the argument pointers, plus the + // terminating NULL. + if ((argv = (char **)sipMalloc(2 * (argc + 1) * sizeof (char *))) == NULL) + return NULL; + + // Convert the list. + for (int a = 0; a < argc; ++a) + { + char *arg; + + // Get the argument and allocate memory for it. + if ((arg = (char *)sipBytes_AsString(PyList_GetItem(argvlist,a))) == NULL || + (argv[a] = (char *)sipMalloc(strlen(arg) + 1)) == NULL) + return NULL; + + // Copy the argument and save a pointer to it. + strcpy(argv[a],arg); + argv[a + argc + 1] = argv[a]; + } + + argv[argc + argc + 1] = argv[argc] = NULL; + + *argcp = argc; + + return argv; +} + + +// Remove arguments from the Python argv list that have been removed from the +// C argv array. +static void updatePyArgv(PyObject *argvlist,int argc,char **argv) +{ + for (int a = 0, na = 0; a < argc; ++a) + { + // See if it was removed. + if (argv[na] == argv[a + argc + 1]) + ++na; + else + PyList_SetSlice(argvlist,na,na + 1,NULL); + } +} +%End + +}; + +%End diff --git a/sip/tqtpe/tqpeapplnk.sip b/sip/tqtpe/tqpeapplnk.sip new file mode 100644 index 0000000..0216bdd --- /dev/null +++ b/sip/tqtpe/tqpeapplnk.sip @@ -0,0 +1,157 @@ +// This is the SIP interface definition for AppLnk, AppLnkSet, DocLnk and +// DocLnkSet. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class AppLnk +{ +%TypeHeaderCode +#include <tqpe/applnk.h> +%End + +public: + AppLnk(); + AppLnk(const TQString &); + AppLnk(const AppLnk &); + + bool isValid() const; + + static void setSmallIconSize(int); + static void setBigIconSize(int); + static int smallIconSize(); + static int bigIconSize(); + + TQString name() const; + const TQPixmap& pixmap() const; + const TQPixmap& bigPixmap() const; + virtual TQString exec() const /PyName=exec_property/; + TQString type() const; + TQString rotation() const; + TQString comment() const; + TQString file() const; + TQString linkFile() const; + TQStringList mimeTypes() const; + TQStringList mimeTypeIcons() const; + const TQArray<int> &categories() const; + int id() const; + + bool fileKnown() const; + bool linkFileKnown() const; + + void execute() const /ReleaseGIL/; + void execute(const TQStringList &) const /ReleaseGIL/; + void removeFiles(); + void removeLinkFile(); + + void setName(const TQString &); + void setExec(const TQString &); + void setFile(const TQString &); + void setLinkFile(const TQString &); + void setComment(const TQString &); + void setType(const TQString &); + void setIcon(const TQString &); + void setCategories(const TQArray<int> &); + bool writeLink() const; + + void setProperty(const TQString &,const TQString &); + TQString property(const TQString &) const; + +protected: + virtual void invoke(const TQStringList &) const; + bool ensureLinkExists() const; +// Undocumented and missing on the Zaurus. +// void storeLink() const; +}; + + +class DocLnk : AppLnk +{ +%TypeHeaderCode +#include <tqpe/applnk.h> +%End + +public: + DocLnk(); + DocLnk(const DocLnk &); + DocLnk(const TQString &); + DocLnk(const TQString &,bool); + + TQString exec() const /PyName=exec_property/; + +protected: + void invoke(const TQStringList &) const; +}; + + +class AppLnkSet +{ +%TypeHeaderCode +#include <tqpe/applnk.h> +%End + +public: + AppLnkSet(); + AppLnkSet(const TQString &); + + const AppLnk *find(int) const; + const AppLnk *findExec(const TQString &) const; + + TQStringList types() const; + TQString typeName(const TQString &) const; + TQPixmap typePixmap(const TQString &) const; + TQPixmap typeBigPixmap(const TQString &) const; + + void add(AppLnk *); + bool remove(AppLnk *); + + const TQPtrList<AppLnk> &children() const; + void detachChildren(); + +private: + AppLnkSet(const AppLnkSet &); +}; + + +class DocLnkSet : AppLnkSet +{ +%TypeHeaderCode +#include <tqpe/applnk.h> +%End + +public: + DocLnkSet(); + DocLnkSet(const TQString &,const TQString & = TQString::null); + + const TQPtrList<DocLnk> &children() const; + + void appendFrom(DocLnkSet &); + +private: + DocLnkSet(const DocLnkSet &); +}; + +%End diff --git a/sip/tqtpe/tqpeconfig.sip b/sip/tqtpe/tqpeconfig.sip new file mode 100644 index 0000000..39c788f --- /dev/null +++ b/sip/tqtpe/tqpeconfig.sip @@ -0,0 +1,78 @@ +// This is the SIP interface definition for Config. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class Config +{ +%TypeHeaderCode +#include <tqpe/config.h> +%End + +public: + typedef TQMap<TQString,TQString> ConfigGroup; + + enum Domain { + File, + User + }; + + Config(const TQString &,Domain = User); + + bool isValid() const; + bool hasKey(const TQString &) const; + + void setGroup(const TQString &); +// void writeEntry(const TQString &,const char *); + void writeEntry(const TQString &,const TQString &); + void writeEntryCrypt(const TQString &,const TQString &); + void writeEntry(const TQString &,int); +// void writeEntry(const TQString &,bool); + void writeEntry(const TQString &,const TQStringList &,const TQChar &); + void removeEntry(const TQString &); + + TQString readEntry(const TQString &, + const TQString & = TQString::null) const; + TQString readEntryCrypt(const TQString &, + const TQString & = TQString::null) const; + TQString readEntryDirect(const TQString &, + const TQString & = TQString::null) const; + int readNumEntry(const TQString &,int = -1) const; + bool readBoolEntry(const TQString &,bool = 0) const; + TQStringList readListEntry(const TQString &,const TQChar &) const; + + void clearGroup(); + + void write(const TQString & = TQString::null); + +protected: +// void read(); +// bool parse(const TQString &); + +// static TQString configFilename(const TQString &,Domain); +}; + +%End diff --git a/sip/tqtpe/tqpefilemanager.sip b/sip/tqtpe/tqpefilemanager.sip new file mode 100644 index 0000000..bc7d76e --- /dev/null +++ b/sip/tqtpe/tqpefilemanager.sip @@ -0,0 +1,53 @@ +// This is the SIP interface definition for FileManager. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class FileManager +{ +%TypeHeaderCode +#include <tqpe/filemanager.h> +%End + +public: + FileManager(); + + bool saveFile(const DocLnk &,const TQByteArray &); + bool saveFile(const DocLnk &,const TQString &); + bool loadFile(const DocLnk &,TQByteArray &); + bool loadFile(const DocLnk &,TQString &); + bool copyFile(const AppLnk &,const AppLnk &); + + TQIODevice *openFile(const DocLnk &) /ReleaseGIL/; + TQIODevice *saveFile(const DocLnk &) /ReleaseGIL/; + + bool exists(const DocLnk &); + +protected: + bool ensurePathExists(const TQString &); +}; + +%End diff --git a/sip/tqtpe/tqpefileselector.sip b/sip/tqtpe/tqpefileselector.sip new file mode 100644 index 0000000..a7d3d01 --- /dev/null +++ b/sip/tqtpe/tqpefileselector.sip @@ -0,0 +1,69 @@ +// This is the SIP interface definition for FileSelector and FileSelectorItem. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class FileSelectorItem : TQListViewItem +{ +%TypeHeaderCode +#include <tqpe/fileselector.h> +%End + +public: + FileSelectorItem(TQListView * /TransferThis/,const DocLnk &); + + DocLnk file() const; +}; + + +class FileSelector : TQVBox +{ +%TypeHeaderCode +#include <tqpe/fileselector.h> +%End + +public: + FileSelector(const TQString &,TQWidget * /TransferThis/,const char *, + bool = 1,bool = 1); + + void setNewVisible(bool); + void setCloseVisible(bool); + void reread(); + int fileCount(); +%If (- TQtPE_1_6_0) + const DocLnk *selected(); +%End +%If (TQtPE_1_6_0 -) + DocLnk selectedDocument(); +%End + +signals: + void fileSelected(const DocLnk &); + void newSelected(const DocLnk &); + void closeMe(); +}; + +%End diff --git a/sip/tqtpe/tqpefontdatabase.sip b/sip/tqtpe/tqpefontdatabase.sip new file mode 100644 index 0000000..1b250ed --- /dev/null +++ b/sip/tqtpe/tqpefontdatabase.sip @@ -0,0 +1,67 @@ +// This is the SIP interface definition for FontDatabase. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +%If (TQt_FONTDATABASE) + +class FontDatabase : TQFontDatabase +{ +%TypeHeaderCode +#include <tqpe/fontdatabase.h> +%End + +public: + FontDatabase(); + + TQStringList families() const; + + static void loadRenderers(); +}; + +%End + + +%If (!TQt_FONTDATABASE) + +class FontDatabase +{ +%TypeHeaderCode +#include <tqpe/fontdatabase.h> +%End + +public: + FontDatabase(); + + TQStringList families() const; + static TQValueList<int> standardSizes(); + + static void loadRenderers(); +}; + +%End + +%End diff --git a/sip/tqtpe/tqpeglobal.sip b/sip/tqtpe/tqpeglobal.sip new file mode 100644 index 0000000..0810f65 --- /dev/null +++ b/sip/tqtpe/tqpeglobal.sip @@ -0,0 +1,83 @@ +// This is the SIP interface definition for Global. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class Global +{ +%TypeHeaderCode +#include <tqpe/global.h> +%End + +public: + Global(); + + static const TQDawg &fixedDawg(); + static const TQDawg &addedDawg(); + static const TQDawg &dawg(const TQString &); + + static void addWords(const TQStringList &); + static void addWords(const TQString &,const TQStringList &); + + static void createDocDir(); + + static void findDocuments(DocLnkSet *,const TQString & = TQString::null); + + static TQString applicationFileName(const TQString &,const TQString &); + +// struct Command { +// const char *file; +// TQWidget *(*func)(bool); +// bool maximized; +// bool documentary; +// }; + +// static void setBuiltinCommands(Command *); + +%If (- TQtPE_1_6_0) + static void invoke(const TQString &); +%End + static void execute(const TQString &,const TQString & = TQString::null) /ReleaseGIL/; + static void setDocument(TQWidget *,const TQString &); + static bool terminateBuiltin(const TQString &); + static void terminate(const AppLnk *); + + static bool isBuiltinCommand(const TQString &); + + static void applyStyle(); + static void statusMessage(const TQString &); + static TQWidget *shutdown(bool = 0); + static TQWidget *restart(bool = 0); + static void hideInputMethod(); + static void showInputMethod(); + + static void writeHWClock(); + + static TQString shellQuote(const TQString &); + static TQString stringQuote(const TQString &); +}; + +%End diff --git a/sip/tqtpe/tqpemenubar.sip b/sip/tqtpe/tqpemenubar.sip new file mode 100644 index 0000000..d572cef --- /dev/null +++ b/sip/tqtpe/tqpemenubar.sip @@ -0,0 +1,42 @@ +// This is the SIP interface definition for TQPEMenuBar. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class TQPEMenuBar : TQMenuBar +{ +%TypeHeaderCode +#include <tqpe/qpemenubar.h> +%End + +public: + TQPEMenuBar(TQWidget * /TransferThis/ = 0,const char * = 0); + +protected: + virtual void keyPressEvent(TQKeyEvent *); +}; + +%End diff --git a/sip/tqtpe/tqpemenubutton.sip b/sip/tqtpe/tqpemenubutton.sip new file mode 100644 index 0000000..7d5da05 --- /dev/null +++ b/sip/tqtpe/tqpemenubutton.sip @@ -0,0 +1,61 @@ +// This is the SIP interface definition for MenuButton. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class MenuButton : TQPushButton +{ +%TypeHeaderCode +#include <tqpe/menubutton.h> +%End + +public: + MenuButton(TQWidget * /TransferThis/,const char * = 0); + MenuButton(const TQStringList &,TQWidget * /TransferThis/, + const char * = 0); + + void clear(); + + int currentItem() const; + TQString currentText() const; + + void insertItems(const TQStringList &); + void insertItem(const TQIconSet &,const TQString & = TQString::null); + void insertItem(const TQString &); + void insertSeparator(); + + void setLabel(const TQString &); + +signals: + void selected(int); + void selected(const TQString &); + +public slots: + void select(int); + void select(const TQString &); +}; + +%End diff --git a/sip/tqtpe/tqpeqcopenvelope.sip b/sip/tqtpe/tqpeqcopenvelope.sip new file mode 100644 index 0000000..f066d4d --- /dev/null +++ b/sip/tqtpe/tqpeqcopenvelope.sip @@ -0,0 +1,39 @@ +// This is the SIP interface definition for TQCopEnvelope. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class TQCopEnvelope : TQDataStream +{ +%TypeHeaderCode +#include <tqpe/tqcopenvelope_qws.h> +%End + +public: + TQCopEnvelope(const TQCString &,const TQCString &); +}; + +%End diff --git a/sip/tqtpe/tqpeqdawg.sip b/sip/tqtpe/tqpeqdawg.sip new file mode 100644 index 0000000..fa24f47 --- /dev/null +++ b/sip/tqtpe/tqpeqdawg.sip @@ -0,0 +1,65 @@ +// This is the SIP interface definition for TQDawg. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class TQDawg +{ +%TypeHeaderCode +#include <tqpe/qdawg.h> +%End + +public: + TQDawg(); + + bool readFile(const TQString &) /ReleaseGIL/; + bool read(TQIODevice *) /ReleaseGIL/; + bool write(TQIODevice *) const /ReleaseGIL/; + bool createFromWords(TQIODevice *); + void createFromWords(const TQStringList &); + TQStringList allWords() const; + + bool contains(const TQString &) const; + int countWords() const; + + class Node { + public: + TQChar letter() const; + bool isWord() const; + bool isLast() const; + const TQDawg::Node *next() const; + const TQDawg::Node *jump() const; + + private: + Node(); + }; + + const TQDawg::Node *root() const; + + void dump() const; +}; + +%End diff --git a/sip/tqtpe/tqperesource.sip b/sip/tqtpe/tqperesource.sip new file mode 100644 index 0000000..5a25680 --- /dev/null +++ b/sip/tqtpe/tqperesource.sip @@ -0,0 +1,50 @@ +// This is the SIP interface definition for Resource. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class Resource +{ +%TypeHeaderCode +#include <tqpe/resource.h> +%End + +public: + Resource(); + + static TQImage loadImage(const TQString &); + + static TQPixmap loadPixmap(const TQString &); + static TQBitmap loadBitmap(const TQString &); + static TQString findPixmap(const TQString &); + + static TQIconSet loadIconSet(const TQString &); + + static TQString findSound(const TQString &); + static TQStringList allSounds(); +}; + +%End diff --git a/sip/tqtpe/tqpetimestring.sip b/sip/tqtpe/tqpetimestring.sip new file mode 100644 index 0000000..47dda55 --- /dev/null +++ b/sip/tqtpe/tqpetimestring.sip @@ -0,0 +1,71 @@ +// This is the SIP interface definition for DateFormat. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class DateFormat +{ +%TypeHeaderCode +#include <tqpe/timestring.h> +%End + +public: + enum Order { + DayMonthYear, + MonthDayYear, + YearMonthDay + }; + + DateFormat(TQChar = '/',Order = MonthDayYear); + DateFormat(TQChar,Order,Order); + DateFormat(const DateFormat &); + + enum Verbosity { + shortNumber, + longNumber, + padNumber, + shortWord, + longWord, + showWeekDay + }; + + TQString toNumberString() const; + TQString toWordString() const; + + TQString numberDate(const TQDate &,int = 0) const; + TQString wordDate(const TQDate &,int = 0) const; + +%If (TQt_DATASTREAM) + void load(TQDataStream &); + void save(TQDataStream &) const; +%End + + TQChar separator() const; + Order shortOrder() const; + Order longOrder() const; +}; + +%End diff --git a/sip/tqtpe/tqpetoolbar.sip b/sip/tqtpe/tqpetoolbar.sip new file mode 100644 index 0000000..10fd387 --- /dev/null +++ b/sip/tqtpe/tqpetoolbar.sip @@ -0,0 +1,42 @@ +// This is the SIP interface definition for TQPEToolBar. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +// The documentation is in the main documentation file because SIP isn't clever +// enough to handle the resulting %Timeline complexity. + + +%If (WS_QWS) + +class TQPEToolBar : TQToolBar +{ +%TypeHeaderCode +#include <tqpe/qpetoolbar.h> +%End + +public: + TQPEToolBar(TQMainWindow * /TransferThis/ = 0,const char * = 0); + +protected: + virtual void childEvent(TQChildEvent *); +}; + +%End diff --git a/sip/tqtpe/tqtpemod.sip b/sip/tqtpe/tqtpemod.sip new file mode 100644 index 0000000..f0dad71 --- /dev/null +++ b/sip/tqtpe/tqtpemod.sip @@ -0,0 +1,94 @@ +// This is the SIP interface definition for the tqtpe module of PyTQt. +// +// Copyright (c) 2007 +// Riverbank Computing Limited <info@riverbankcomputing.co.uk> +// +// This file is part of PyTQt. +// +// This copy of PyTQt is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by the Free +// Software Foundation; either version 2, or (at your option) any later +// version. +// +// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +// FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +// details. +// +// You should have received a copy of the GNU General Public License along with +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +%Module PyTQt.tqtpe 1 + +%Import tqt/tqtmod.sip + +%Include copying.sip + + +// TQPE has it's own version numbering. +%Timeline {TQtPE_1_5_0 TQtPE_1_6_0} + + +%ModuleHeaderCode +#include <tqpe/version.h> +%End + +const char *TQPE_VERSION; + + +%Include tqpeapplication.sip +%Include tqpeapplnk.sip +%Include tqpeconfig.sip +%Include tqpefilemanager.sip +%Include tqpefileselector.sip +%Include tqpefontdatabase.sip +%Include tqpeglobal.sip +%Include tqpemenubar.sip +%Include tqpemenubutton.sip +%Include tqpeqcopenvelope.sip +%Include tqpeqdawg.sip +%Include tqperesource.sip +%Include tqpetimestring.sip +%Include tqpetoolbar.sip + + +// The build file template. + +%Makefile tqtpe.pro.in +# The project file for the tqtpe module. +# +# Copyright (c) 2007 +# Riverbank Computing Limited <info@riverbankcomputing.co.uk> +# +# This file is part of PyTQt. +# +# This copy of PyTQt is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2, or (at your option) any later +# version. +# +# PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +TEMPLATE = lib +TARGET = @BLX_TARGET_LIB@ +DESTDIR = @PYTQT_MODDIR@ +CONFIG += @BLX_CONFIG_LIB@ @PYTQT_WARN@ +INCLUDEPATH = @BLX_INCLUDEPATH@ +DEFINES = @BLX_DEFINES@ +LIBS += @PYTQT_TQT_MODULE@ @BLX_LIBS@ -lqpe +macx:QMAKE_LFLAGS += -framework Python + +SOURCES = $B + +HEADERS = $H +%End |