From 90825e2392b2d70e43c7a25b8a3752299a933894 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- python/pykde/sip/kdeprint/driver.sip | 338 +++++++++++++++++++++++++ python/pykde/sip/kdeprint/kdeprint-kde310.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde311.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde312.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde313.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde314.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde315.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde320.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde321.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde322.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde323.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde330.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde331.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde332.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde340.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde341.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde342.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde343.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde350.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde351.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde352.diff | 2 + python/pykde/sip/kdeprint/kdeprint-kde353.diff | 2 + python/pykde/sip/kdeprint/kdeprintmod.sip | 48 ++++ python/pykde/sip/kdeprint/kdeprintmod.sip.in | 47 ++++ python/pykde/sip/kdeprint/kmjob.sip | 113 +++++++++ python/pykde/sip/kdeprint/kmjobmanager.sip | 198 +++++++++++++++ python/pykde/sip/kdeprint/kmmanager.sip | 221 ++++++++++++++++ python/pykde/sip/kdeprint/kmobject.sip | 42 +++ python/pykde/sip/kdeprint/kmprinter.sip | 178 +++++++++++++ python/pykde/sip/kdeprint/kpreloadobject.sip | 43 ++++ python/pykde/sip/kdeprint/kprintaction.sip | 61 +++++ python/pykde/sip/kdeprint/kprintdialog.sip | 170 +++++++++++++ python/pykde/sip/kdeprint/kprintdialogpage.sip | 52 ++++ python/pykde/sip/kdeprint/kprinter.sip | 258 +++++++++++++++++++ 34 files changed, 1811 insertions(+) create mode 100644 python/pykde/sip/kdeprint/driver.sip create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde310.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde311.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde312.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde313.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde314.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde315.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde320.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde321.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde322.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde323.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde330.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde331.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde332.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde340.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde341.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde342.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde343.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde350.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde351.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde352.diff create mode 100644 python/pykde/sip/kdeprint/kdeprint-kde353.diff create mode 100644 python/pykde/sip/kdeprint/kdeprintmod.sip create mode 100644 python/pykde/sip/kdeprint/kdeprintmod.sip.in create mode 100644 python/pykde/sip/kdeprint/kmjob.sip create mode 100644 python/pykde/sip/kdeprint/kmjobmanager.sip create mode 100644 python/pykde/sip/kdeprint/kmmanager.sip create mode 100644 python/pykde/sip/kdeprint/kmobject.sip create mode 100644 python/pykde/sip/kdeprint/kmprinter.sip create mode 100644 python/pykde/sip/kdeprint/kpreloadobject.sip create mode 100644 python/pykde/sip/kdeprint/kprintaction.sip create mode 100644 python/pykde/sip/kdeprint/kprintdialog.sip create mode 100644 python/pykde/sip/kdeprint/kprintdialogpage.sip create mode 100644 python/pykde/sip/kdeprint/kprinter.sip (limited to 'python/pykde/sip/kdeprint') diff --git a/python/pykde/sip/kdeprint/driver.sip b/python/pykde/sip/kdeprint/driver.sip new file mode 100644 index 00000000..bbfa0fbf --- /dev/null +++ b/python/pykde/sip/kdeprint/driver.sip @@ -0,0 +1,338 @@ +// +// Copyright 2005 Jim Bublitz +// Earlier copyrights 1998 - 2004 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE_3_4_0 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +%If ( KDE_3_1_0 - ) + +class DrBase +{ +%TypeHeaderCode +#include +%End + + +public: + + enum Type + { + Base, + Main, + ChoiceGroup, + Group, + String, + Integer, + Float, + List, + Boolean + }; + + DrBase (); + DrBase::Type type () const; + bool isOption () const; + const QString& get (const QString&) const; + void set (const QString&, const QString&); + bool has (const QString&) const; + const QString& name () const; + void setName (const QString&); + bool conflict () const; + void setConflict (bool); + virtual QString valueText (); + virtual QString prettyText (); + virtual void setValueText (const QString&); +//ig virtual DriverItem* createItem (DriverItem* /Transfer/, DriverItem* = 0); + virtual void setOptions (const QMap&); + virtual void getOptions (QMap&, bool = 0); + virtual DrBase* clone (); + +protected: + +}; // class DrBase + +%End + + +%If ( KDE_3_1_0 - ) + +class DrGroup : DrBase +{ +%TypeHeaderCode +#include +%End + + +public: + DrGroup (); + void addOption (DrBase*); + void addGroup (DrGroup*); + void addObject (DrBase*); + void clearConflict (); + void removeOption (const QString&); + void removeGroup (DrGroup*); + bool isEmpty (); +//ig virtual DriverItem* createItem (DriverItem* /Transfer/, DriverItem* = 0); +//ig DrBase* findOption (const QString&, DrGroup** = 0); +//ig DrGroup* findGroup (DrGroup*, DrGroup** = 0); + void setOptions (const QMap&); + void getOptions (QMap&, bool = 0); + DrBase* clone (); +//ig const QPtrList& groups (); +//ig const QPtrList& options (); + +%If ( KDE_3_2_0 - ) + static QString groupForOption (const QString&); +%End + + +protected: +//ig void createTree (DriverItem* /Transfer/); +//ig void flattenGroup (QMap&, int&); + +protected: + +}; // class DrGroup + +%End + + +%If ( KDE_3_1_0 - ) + +class DrMain : DrGroup +{ +%TypeHeaderCode +#include +%End + + +public: + DrMain (); +//ig DriverItem* createTreeView (QListView* /Transfer/); + void addConstraint (DrConstraint*); + int checkConstraints (); + DrPageSize* findPageSize (const QString&); + void addPageSize (DrPageSize*); + void removeOptionGlobally (const QString&); + void removeGroupGlobally (DrGroup*); +//ig QMap flatten (); + DrMain* cloneDriver (); + +protected: + +}; // class DrMain + +%End + + +%If ( KDE_3_1_0 - ) + +class DrChoiceGroup : DrGroup +{ +%TypeHeaderCode +#include +%End + + +public: + DrChoiceGroup (); +//ig DriverItem* createItem (DriverItem* /Transfer/, DriverItem* = 0); + +}; // class DrChoiceGroup + +%End + + +%If ( KDE_3_1_0 - ) + +class DrStringOption : DrBase +{ +%TypeHeaderCode +#include +%End + + +public: + DrStringOption (); + virtual QString valueText (); + virtual void setValueText (const QString&); + +protected: + +}; // class DrStringOption + +%End + + +%If ( KDE_3_1_0 - ) + +class DrIntegerOption : DrBase +{ +%TypeHeaderCode +#include +%End + + +public: + DrIntegerOption (); + virtual QString valueText (); + virtual void setValueText (const QString&); + QString fixedVal (); + +protected: + +}; // class DrIntegerOption + +%End + + +%If ( KDE_3_1_0 - ) + +class DrFloatOption : DrBase +{ +%TypeHeaderCode +#include +%End + + +public: + DrFloatOption (); + virtual QString valueText (); + virtual void setValueText (const QString&); + QString fixedVal (); + +protected: + +}; // class DrFloatOption + +%End + + +%If ( KDE_3_1_0 - ) + +class DrListOption : DrBase +{ +%TypeHeaderCode +#include +%End + + +public: + DrListOption (); + void addChoice (DrBase*); +//ig QPtrList* choices (); + DrBase* currentChoice () const; + DrBase* findChoice (const QString&); + void setChoice (int); + virtual QString valueText (); + virtual QString prettyText (); + virtual void setValueText (const QString&); + void setOptions (const QMap&); + void getOptions (QMap&, bool = 0); +//ig DriverItem* createItem (DriverItem* /Transfer/, DriverItem* = 0); + DrBase* clone (); + +protected: + +}; // class DrListOption + +%End + + +%If ( KDE_3_1_0 - ) + +class DrBooleanOption : DrListOption +{ +%TypeHeaderCode +#include +%End + + +public: + DrBooleanOption (); + +}; // class DrBooleanOption + +%End + + +%If ( KDE_3_1_0 - ) + +class DrConstraint +{ +%TypeHeaderCode +#include +%End + + +public: + DrConstraint (const QString&, const QString&, const QString& = QString ::null , const QString& = QString ::null ); + DrConstraint (const DrConstraint&); + bool check (DrMain*); + +protected: + +}; // class DrConstraint + +%End + + +%If ( KDE_3_1_0 - ) + +class DrPageSize +{ +%TypeHeaderCode +#include +%End + + +public: + DrPageSize (const QString&, int, int, int, int, int, int); + DrPageSize (const DrPageSize&); + +%If ( KDE_3_2_0 - ) + float pageWidth () const; + float pageHeight () const; + float leftMargin () const; + float rightMargin () const; + float topMargin () const; + float bottomMargin () const; + QString pageName () const; +%End + + QSize pageSize () const; + QRect pageRect () const; + QSize margins () const; + +protected: + +public: + +%If ( - KDE_3_2_0 ) + QString name () const; +%End + + +}; // class DrPageSize + +%End + diff --git a/python/pykde/sip/kdeprint/kdeprint-kde310.diff b/python/pykde/sip/kdeprint/kdeprint-kde310.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde310.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde311.diff b/python/pykde/sip/kdeprint/kdeprint-kde311.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde311.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde312.diff b/python/pykde/sip/kdeprint/kdeprint-kde312.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde312.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde313.diff b/python/pykde/sip/kdeprint/kdeprint-kde313.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde313.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde314.diff b/python/pykde/sip/kdeprint/kdeprint-kde314.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde314.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde315.diff b/python/pykde/sip/kdeprint/kdeprint-kde315.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde315.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde320.diff b/python/pykde/sip/kdeprint/kdeprint-kde320.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde320.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde321.diff b/python/pykde/sip/kdeprint/kdeprint-kde321.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde321.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde322.diff b/python/pykde/sip/kdeprint/kdeprint-kde322.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde322.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde323.diff b/python/pykde/sip/kdeprint/kdeprint-kde323.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde323.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde330.diff b/python/pykde/sip/kdeprint/kdeprint-kde330.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde330.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde331.diff b/python/pykde/sip/kdeprint/kdeprint-kde331.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde331.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde332.diff b/python/pykde/sip/kdeprint/kdeprint-kde332.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde332.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde340.diff b/python/pykde/sip/kdeprint/kdeprint-kde340.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde340.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde341.diff b/python/pykde/sip/kdeprint/kdeprint-kde341.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde341.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde342.diff b/python/pykde/sip/kdeprint/kdeprint-kde342.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde342.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde343.diff b/python/pykde/sip/kdeprint/kdeprint-kde343.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde343.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde350.diff b/python/pykde/sip/kdeprint/kdeprint-kde350.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde350.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde351.diff b/python/pykde/sip/kdeprint/kdeprint-kde351.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde351.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde352.diff b/python/pykde/sip/kdeprint/kdeprint-kde352.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde352.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprint-kde353.diff b/python/pykde/sip/kdeprint/kdeprint-kde353.diff new file mode 100644 index 00000000..705efd49 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprint-kde353.diff @@ -0,0 +1,2 @@ ++ %Include kmjob.sip ++ %Include kmjobmanager.sip diff --git a/python/pykde/sip/kdeprint/kdeprintmod.sip b/python/pykde/sip/kdeprint/kdeprintmod.sip new file mode 100644 index 00000000..435e04a2 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprintmod.sip @@ -0,0 +1,48 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE_3_5_2 + +%Copying + + This software 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 of + the License, or (at your option) any later version. + + This software is distributed 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 this library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +%End + +%Module kdeprint + +%Import qt/qtmod.sip +%Import qtxml/qtxmlmod.sip +%Import dcopmod.sip +%Import kdecoremod.sip +%Import kdefxmod.sip +%Import kdeuimod.sip + +%Include kmmanager.sip +%Include kmobject.sip +%Include kmprinter.sip +%Include kpreloadobject.sip +%Include kprintaction.sip +%Include kprintdialog.sip +%Include kprintdialogpage.sip +%Include kprinter.sip +%Include kmjob.sip +%Include kmjobmanager.sip + diff --git a/python/pykde/sip/kdeprint/kdeprintmod.sip.in b/python/pykde/sip/kdeprint/kdeprintmod.sip.in new file mode 100644 index 00000000..2997ca75 --- /dev/null +++ b/python/pykde/sip/kdeprint/kdeprintmod.sip.in @@ -0,0 +1,47 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE_3_5_2 + +%Copying + + This software 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 of + the License, or (at your option) any later version. + + This software is distributed 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 this library; see the file COPYING. + If not, write to the Free Software Foundation, Inc., + 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +%End + +%Module kdeprint + +%Import qt/qtmod.sip +%Import qtxml/qtxmlmod.sip +%Import dcopmod.sip +%Import kdecoremod.sip +%Import kdefxmod.sip +%Import kdeuimod.sip + +%Include kmmanager.sip +%Include kmobject.sip +%Include kmprinter.sip +%Include kpreloadobject.sip +%Include kprintaction.sip +%Include kprintdialog.sip +%Include kprintdialogpage.sip +%Include kprinter.sip +@mark@ + diff --git a/python/pykde/sip/kdeprint/kmjob.sip b/python/pykde/sip/kdeprint/kmjob.sip new file mode 100644 index 00000000..8a65cac6 --- /dev/null +++ b/python/pykde/sip/kdeprint/kmjob.sip @@ -0,0 +1,113 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +%If ( KDE_3_1_0 - ) + +class KMJob : KMObject +{ +%TypeHeaderCode +#include +%End + + +public: + + enum JobAction + { + Remove, + Move, + Hold, + Resume, + Restart, + ShowCompleted, + All + }; + + + enum JobState + { + Printing, + Queued, + Held, + Error, + Cancelled, + Aborted, + Completed, + Unknown + }; + + + enum JobType + { + System, + Threaded + }; + + KMJob (); + KMJob (const KMJob&); + void copy (const KMJob&); + QString pixmap (); + QString stateString (); + bool isCompleted () const; + bool isActive () const; + int id () const; + void setId (int); + const QString& name () const; + void setName (const QString&); + const QString& printer () const; + void setPrinter (const QString&); + const QString& owner () const; + void setOwner (const QString&); + int state () const; + void setState (int); + int size () const; + void setSize (int); + const QString& uri () const; + void setUri (const QString&); + int type () const; + void setType (int); + int pages () const; + void setPages (int); + int processedPages () const; + void setProcessedPages (int); + int processedSize () const; + void setProcessedSize (int); + bool isRemote () const; + void setRemote (bool); + QString attribute (int) const; + void setAttribute (int, const QString&); + int attributeCount () const; + void setAttributeCount (int); + +protected: + void init (); + +protected: + +}; // class KMJob + +%End + diff --git a/python/pykde/sip/kdeprint/kmjobmanager.sip b/python/pykde/sip/kdeprint/kmjobmanager.sip new file mode 100644 index 00000000..39b4100e --- /dev/null +++ b/python/pykde/sip/kdeprint/kmjobmanager.sip @@ -0,0 +1,198 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +%If ( KDE_3_1_0 - ) + +class KMJobManager : QObject +{ +%TypeHeaderCode +#include +%End + + +public: + + enum JobType + { + ActiveJobs, + CompletedJobs + }; + + + class JobFilter + { + + public: + JobFilter (); +//ig int m_type[2]; + +%If ( KDE_3_2_2 - ) + bool m_isspecial; +%End + + + }; // class JobFilter + + +public: + KMJobManager (QObject* /TransferThis/ = 0, const char* = 0); + static KMJobManager* self (); + +%If ( KDE_3_2_2 - ) + void addPrinter (const QString&, KMJobManager::JobType = ActiveJobs , bool = 0); +%End + + void removePrinter (const QString&, KMJobManager::JobType = ActiveJobs ); + void clearFilter (); +//ig QDict* filter (); + int limit (); + void setLimit (int); + KMJob* findJob (const QString&); + bool sendCommand (const QString&, int, const QString& = QString ::null ); + bool sendCommand (const QPtrList&, int, const QString& = QString ::null ); + const QPtrList& jobList (bool = 1); + void addJob (KMJob*); +//ig KMThreadJob* threadJob (); + virtual int actions (); + virtual QValueList createPluginActions (KActionCollection*); + virtual void validatePluginActions (KActionCollection*, const QPtrList&); + virtual bool doPluginAction (int, const QPtrList&); + +protected: + void discardAllJobs (); + void removeDiscardedJobs (); + +protected: + virtual bool listJobs (const QString&, KMJobManager::JobType, int = 0); + virtual bool sendCommandSystemJob (const QPtrList&, int, const QString& = QString ::null ); + bool sendCommandThreadJob (const QPtrList&, int, const QString& = QString ::null ); + +protected: + +public: + +%If ( - KDE_3_2_2 ) + void addPrinter (const QString&, KMJobManager::JobType = ActiveJobs ); + +//force +%ConvertToSubClassCode + // The table of Python class objects indexed by their names. The table + // must be sorted by name. + + static sipStringTypeClassMap map[] = { + {sipName_KMJobManager, &sipClass_KMJobManager}, + {sipName_KMManager, &sipClass_KMManager}, + {sipName_KPrintAction, &sipClass_KPrintAction}, + {sipName_KPrintDialogPage, &sipClass_KPrintDialogPage}, + }; + + sipClass = sipMapStringToClass(sipCpp -> className(),map,sizeof (map)/sizeof (map[0])); +%End +//end +%End + + +}; // class KMJobManager + +%End + + + +%If (KDE_3_1_0 - ) +%MappedType QPtrList +//converts a Python list of KMJob +{ +%TypeHeaderCode +#include +#include +#include +typedef QPtrList KMJobList; +%End + +%ConvertFromTypeCode + if (!sipCpp) + return PyList_New (0); + + PyObject *pylist; + + // Create the list + + if ((pylist = PyList_New(0)) == NULL) + return NULL; + + // Get it. + + QPtrList *cpplist = (QPtrList *)sipCpp; + KMJob *cpp; + PyObject *inst; + + // the loop depends on the type of iterator the tmeplate makes available + for(cpp = cpplist->first (); cpp != 0; cpp = cpplist->next () ) + { + if (((inst = sipConvertFromInstance (cpp, sipClass_KMJob, sipTransferObj)) == NULL) + || PyList_Append (pylist, inst) < 0) + { + Py_DECREF (pylist); + return NULL; + } + } + + return pylist; +%End + +%ConvertToTypeCode + if (sipIsErr == NULL) + return PyList_Check(sipPy); + + QPtrList *cpplist = new QPtrList; + + PyObject *elem; + KMJob *cpp; + int iserr = 0; + + for (int i = 0; i < PyList_Size (sipPy); i++) + { + elem = PyList_GET_ITEM (sipPy, i); + cpp = (KMJob *)sipForceConvertTo_KMJob (elem, &iserr); + + if (iserr) + { + *sipIsErr = 1; + delete cpplist; + return 0; + } + + cpplist->append (cpp); + } + + *sipCppPtr = cpplist; + + return 1; +%End +}; +%End + + diff --git a/python/pykde/sip/kdeprint/kmmanager.sip b/python/pykde/sip/kdeprint/kmmanager.sip new file mode 100644 index 00000000..15a7733a --- /dev/null +++ b/python/pykde/sip/kdeprint/kmmanager.sip @@ -0,0 +1,221 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KMManager : QObject +{ +%TypeHeaderCode +#include +%End + + +public: + + enum PrinterOperations + { + PrinterEnabling, + PrinterCreation, + PrinterDefault, + PrinterTesting, + PrinterConfigure, + PrinterRemoval, + PrinterAll + }; + + + enum ServerOperations + { + ServerRestarting, + ServerConfigure, + ServerAll + }; + + KMManager (QObject* /TransferThis/ = 0, const char* = 0); + static KMManager* self (); + QString errorMsg () const; + void setErrorMsg (const QString&); + bool hasManagement () const; + virtual bool createPrinter (KMPrinter*); + virtual bool removePrinter (KMPrinter*); + virtual bool enablePrinter (KMPrinter*, bool); + virtual bool startPrinter (KMPrinter*, bool); + virtual bool completePrinter (KMPrinter*); + virtual bool completePrinterShort (KMPrinter*); + virtual bool setDefaultPrinter (KMPrinter*); + virtual bool testPrinter (KMPrinter*); + bool upPrinter (KMPrinter*, bool); + bool modifyPrinter (KMPrinter*, KMPrinter*); + bool removePrinter (const QString&); + bool enablePrinter (const QString&, bool); + bool startPrinter (const QString&, bool); + bool completePrinter (const QString&); + bool setDefaultPrinter (const QString&); + int printerOperationMask () const; + int addPrinterWizard (QWidget* /Transfer/ = 0); + bool createSpecialPrinter (KMPrinter*); + bool removeSpecialPrinter (KMPrinter*); + KMPrinter* findPrinter (const QString&); + QPtrList* printerList (bool = 1); + QPtrList* printerListComplete (bool = 1); + KMPrinter* defaultPrinter (); + void enableFilter (bool); + bool isFilterEnabled () const; + virtual QString driverDbCreationProgram (); + virtual QString driverDirectory (); +//ig virtual DrMain* loadPrinterDriver (KMPrinter*, bool = 0); +//ig virtual DrMain* loadDbDriver (KMDBEntry*); +//ig virtual DrMain* loadFileDriver (const QString&); +//ig DrMain* loadDriver (KMPrinter*, bool = 0); +//ig virtual bool savePrinterDriver (KMPrinter*, DrMain*); +//ig virtual bool validateDbDriver (KMDBEntry*); + bool invokeOptionsDialog (QWidget* /Transfer/ = 0); + +%If ( KDE_3_1_0 - ) + virtual QString stateInformation (); +%End + + int serverOperationMask () const; + virtual bool restartServer (); + virtual bool configureServer (QWidget* /Transfer/ = 0); + virtual QStringList detectLocalPrinters (); + virtual void createPluginActions (KActionCollection*); + virtual void validatePluginActions (KActionCollection*, KMPrinter*); + +%If ( KDE_3_1_0 - ) + void checkUpdatePossible (); +%End + + +signals: + +%If ( KDE_3_1_0 - ) + void updatePossible (bool); +%End + + +protected: + virtual void listPrinters (); + void addPrinter (KMPrinter*); + void setHardDefault (KMPrinter*); + void setSoftDefault (KMPrinter*); + KMPrinter* softDefault () const; + KMPrinter* hardDefault () const; + bool uncompressFile (const QString&, QString&); + bool notImplemented (); + void setHasManagement (bool); + void setPrinterOperationMask (int); + void setServerOperationMask (int); + QString testPage (); + void discardAllPrinters (bool); + +%If ( KDE_3_1_0 - ) + void setUpdatePossible (bool); + virtual void checkUpdatePossibleInternal (); +%End + + +protected: + +}; // class KMManager + + + +%MappedType QPtrList +//converts a Python list of KMPrinter +{ +%TypeHeaderCode +#include +#include +#include +#include +%End + +%ConvertFromTypeCode + // Convert to a Python list of KMPrinter + + if (!sipCpp) + return PyList_New (0); + + PyObject *plist; + + // Create the list + + if ((plist = PyList_New(0)) == NULL) + return NULL; + + // Get it. + + QPtrList *kpList = (QPtrList *)sipCpp; + PyObject *inst; + KMPrinter *p; + + for(p = kpList->first (); p; p = kpList->next ()) + { + inst = sipConvertFromInstance (p, sipClass_KMPrinter, sipTransferObj); + if ((inst == NULL) || (PyList_Append (plist, inst) < 0)) + { + Py_XDECREF (inst); + Py_DECREF (plist); + return NULL; + } + } + + return plist; +%End + +%ConvertToTypeCode + // Convert a Python list to QPtrList on the heap. + + if (sipIsErr == NULL) + return PyList_Check(sipPy); + + QPtrList *kpList = new QPtrList; + + PyObject *elem; + KMPrinter *p; + int iserr = 0; + + for (int i = 0; i < PyList_Size (sipPy); i++) + { + elem = PyList_GET_ITEM (sipPy, i); + p = (KMPrinter *)sipForceConvertTo_KMPrinter(elem, &iserr); + + if (iserr) + { + *sipIsErr = 1; + delete kpList; + return 0; + } + + kpList->append (p); + } + + *sipCppPtr = kpList; + + return 1; +%End +}; + + diff --git a/python/pykde/sip/kdeprint/kmobject.sip b/python/pykde/sip/kdeprint/kmobject.sip new file mode 100644 index 00000000..8d6ff330 --- /dev/null +++ b/python/pykde/sip/kdeprint/kmobject.sip @@ -0,0 +1,42 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KMObject +{ +%TypeHeaderCode +#include +%End + + +public: + KMObject (); + bool isDiscarded () const; + void setDiscarded (bool = 1); + +protected: + +}; // class KMObject + diff --git a/python/pykde/sip/kdeprint/kmprinter.sip b/python/pykde/sip/kdeprint/kmprinter.sip new file mode 100644 index 00000000..61f54554 --- /dev/null +++ b/python/pykde/sip/kdeprint/kmprinter.sip @@ -0,0 +1,178 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KMPrinter : KMObject +{ +%TypeHeaderCode +#include +%End + + +public: + + enum PrinterType + { + Printer, + Class, + Implicit, + Virtual, + Remote, + Invalid, + Special + }; + + + enum PrinterState + { + Idle, + Stopped, + Processing, + Unknown, + Rejecting, + StateMask + }; + + +%If ( KDE_3_2_0 - ) + + enum PrinterCap + { + CapBW, + CapColor, + CapDuplex, + CapStaple, + CapCopies, + CapCollate, + CapPunch, + CapCover, + CapBind, + CapSort, + CapSmall, + CapMedium, + CapLarge, + CapVariable + }; + +%End + + KMPrinter (); + KMPrinter (const KMPrinter&); + void copy (const KMPrinter&); + const QString& name () const; + void setName (const QString&); + const QString& printerName () const; + void setPrinterName (const QString&); + const QString& instanceName () const; + void setInstanceName (const QString&); + int type () const; + void setType (int); + void addType (int); + KMPrinter::PrinterState state (bool = 0) const; + QString stateString () const; + void setState (KMPrinter::PrinterState); + bool acceptJobs () const; + void setAcceptJobs (bool); + +%If ( KDE_3_2_0 - ) + const QString& device () const; + QString deviceProtocol () const; + void setDevice (const QString&); +%End + + const QStringList& members () const; + void setMembers (const QStringList&); + void addMember (const QString&); + const QString& description () const; + void setDescription (const QString&); + const QString& location () const; + void setLocation (const QString&); + const KURL& uri () const; + void setUri (const KURL&); + const QString& manufacturer () const; + void setManufacturer (const QString&); + const QString& model () const; + void setModel (const QString&); + const QString& driverInfo () const; + void setDriverInfo (const QString&); + +%If ( KDE_3_2_0 - ) + int printerCap () const; + void setPrinterCap (int); + void addPrinterCap (int); +%End + + bool isClass (bool = 1) const; + bool isImplicit () const; + bool isPrinter () const; + bool isRemote () const; + bool isLocal () const; + bool isVirtual () const; + bool isValid () const; + bool isSpecial () const; +//ig KMDBEntry* dbEntry () const; +//ig void setDbEntry (KMDBEntry*); + QString pixmap (); + void setPixmap (const QString&); + bool isHardDefault () const; + void setHardDefault (bool); + bool isSoftDefault () const; + void setSoftDefault (bool); + bool ownSoftDefault () const; + void setOwnSoftDefault (bool); + static int compare (KMPrinter*, KMPrinter*); + const QString& option (const QString&) const; + bool hasOption (const QString&) const; + void setOption (const QString&, const QString&); + void removeOption (const QString&); + QMap options () const; + void setOptions (const QMap&); +//ig DrMain* driver () const; +//ig void setDriver (DrMain*); +//ig DrMain* takeDriver (); + bool autoConfigure (KPrinter*, QWidget* /Transfer/ = 0); + const QString& defaultOption (const QString&) const; + void setDefaultOption (const QString&, const QString&); + QMap defaultOptions () const; + void setDefaultOptions (const QMap&); + const QString& editedOption (const QString&) const; + void setEditedOption (const QString&, const QString&); + QMap editedOptions () const; + void setEditedOptions (const QMap&); + bool isEdited () const; + void setEdited (bool); + +protected: + +public: + +%If ( - KDE_3_2_0 ) + const KURL& device () const; + void setDevice (const KURL&); +%End + + +}; // class KMPrinter + diff --git a/python/pykde/sip/kdeprint/kpreloadobject.sip b/python/pykde/sip/kdeprint/kpreloadobject.sip new file mode 100644 index 00000000..daefa2e6 --- /dev/null +++ b/python/pykde/sip/kdeprint/kpreloadobject.sip @@ -0,0 +1,43 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KPReloadObject +{ +%TypeHeaderCode +#include +%End + + +public: + KPReloadObject (bool = 0); + +protected: + virtual void reload () = 0; + virtual void aboutToReload (); + virtual void configChanged (); + +}; // class KPReloadObject + diff --git a/python/pykde/sip/kdeprint/kprintaction.sip b/python/pykde/sip/kdeprint/kprintaction.sip new file mode 100644 index 00000000..7c185549 --- /dev/null +++ b/python/pykde/sip/kdeprint/kprintaction.sip @@ -0,0 +1,61 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KPrintAction : KActionMenu +{ +%TypeHeaderCode +#include +%End + + +public: + + enum PrinterType + { + All, + Regular, + Specials + }; + + KPrintAction (const QString&, KPrintAction::PrinterType = All , QWidget* = 0, QObject* /TransferThis/ = 0, const char* = 0); + KPrintAction (const QString&, const QIconSet&, KPrintAction::PrinterType = All , QWidget* = 0, QObject* /TransferThis/ = 0, const char* = 0); + KPrintAction (const QString&, const QString&, KPrintAction::PrinterType = All , QWidget* = 0, QObject* /TransferThis/ = 0, const char* = 0); + static KPrintAction* exportAll (QWidget* = 0, QObject* /Transfer/ = 0, const char* = 0); + static KPrintAction* exportRegular (QWidget* = 0, QObject* /Transfer/ = 0, const char* = 0); + static KPrintAction* exportSpecial (QWidget* = 0, QObject* /Transfer/ = 0, const char* = 0); + +signals: + void print (KPrinter*) /PyName=print_/; + +protected slots: + void slotAboutToShow (); + void slotActivated (int); + +protected: + void initialize (KPrintAction::PrinterType, QWidget*); + +}; // class KPrintAction + diff --git a/python/pykde/sip/kdeprint/kprintdialog.sip b/python/pykde/sip/kdeprint/kprintdialog.sip new file mode 100644 index 00000000..874f1ee4 --- /dev/null +++ b/python/pykde/sip/kdeprint/kprintdialog.sip @@ -0,0 +1,170 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KPrintDialog : KDialog, KPReloadObject +{ +%TypeHeaderCode +#include +%End + + +public: + KPrintDialog (QWidget* /TransferThis/ = 0, const char* = 0); + void setFlags (int); + void setDialogPages (QPtrList*); + +%If ( KDE_3_1_0 - ) + void enableDialogPage (int, bool = 1); +%End + + KPrinter* printer () const; + static KPrintDialog* printerDialog (KPrinter*, QWidget*, const QString& = QString ::null , bool = 0); + +signals: + void printRequested (KPrinter*); + +protected slots: + void slotPrinterSelected (int); + void slotProperties (); + void slotSetDefault (); + void slotOptions (); + virtual void done (int); + void slotWizard (); + void slotExtensionClicked (); + void slotToggleFilter (bool); + +%If ( KDE_3_1_0 - ) + void slotHelp (); + void slotOutputFileSelected (const QString&); + void slotUpdatePossible (bool); + void slotOpenFileDialog (); +%End + + +protected: + bool checkOutputFile (); + void enableSpecial (bool); + void enableOutputFile (bool); + void setOutputFileExtension (const QString&); + void reload (); + void configChanged (); + void expandDialog (bool = 1); + +%If ( KDE_3_1_0 - ) + void initialize (KPrinter*); + void init (); +%End + + +protected: + +public: + +%If ( - KDE_3_1_0 ) + void initialize (KPrinter*); +%End + + +}; // class KPrintDialog + + + +%MappedType QPtrList +//converts a Python list of KPrintDialogPage +{ +%TypeHeaderCode +#include +#include +#include +%End + +%ConvertFromTypeCode + // Convert to a Python list of KPrintDialogPage + + if (!sipCpp) + return PyList_New (0); + + PyObject *plist; + + // Create the list + + if ((plist = PyList_New(0)) == NULL) + return NULL; + + // Get it. + + QPtrList *kpList = (QPtrList *)sipCpp; + PyObject *inst; + KPrintDialogPage *p; + + for(p = kpList->first (); p; p = kpList->next ()) + { + inst = sipConvertFromInstance (p, sipClass_KPrintDialogPage, sipTransferObj); + if ((inst == NULL) || (PyList_Append (plist, inst) < 0)) + { + Py_XDECREF (inst); + Py_DECREF (plist); + return NULL; + } + } + + return plist; +%End + +%ConvertToTypeCode + // Convert a Python list to QPtrList on the heap. + + if (sipIsErr == NULL) + return PyList_Check(sipPy); + + QPtrList *kpList = new QPtrList; + + PyObject *elem; + KPrintDialogPage *p; + int iserr = 0; + + for (int i = 0; i < PyList_Size (sipPy); i++) + { + elem = PyList_GET_ITEM (sipPy, i); + p = (KPrintDialogPage *)sipForceConvertTo_KPrintDialogPage(elem, &iserr); + + if (iserr) + { + *sipIsErr = 1; + delete kpList; + return 0; + } + + kpList->append (p); + } + + *sipCppPtr = kpList; + + return 1; +%End +}; + + diff --git a/python/pykde/sip/kdeprint/kprintdialogpage.sip b/python/pykde/sip/kdeprint/kprintdialogpage.sip new file mode 100644 index 00000000..b91ce950 --- /dev/null +++ b/python/pykde/sip/kdeprint/kprintdialogpage.sip @@ -0,0 +1,52 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KPrintDialogPage : QWidget +{ +%TypeHeaderCode +#include +%End + + +public: + KPrintDialogPage (QWidget* /TransferThis/ = 0, const char* = 0); +//ig KPrintDialogPage (KMPrinter*, DrMain* = 0, QWidget* /TransferThis/ = 0, const char* = 0); + virtual void getOptions (QMap&, bool = 0); + virtual void setOptions (const QMap&); + virtual bool isValid (QString&); + int id () const; + void setId (int); + QString title () const; + void setTitle (const QString&); + bool onlyRealPrinters () const; + void setOnlyRealPrinters (bool = 1); +//ig DrMain* driver (); +//ig KMPrinter* printer (); + +protected: + +}; // class KPrintDialogPage + diff --git a/python/pykde/sip/kdeprint/kprinter.sip b/python/pykde/sip/kdeprint/kprinter.sip new file mode 100644 index 00000000..7ff47b69 --- /dev/null +++ b/python/pykde/sip/kdeprint/kprinter.sip @@ -0,0 +1,258 @@ +// +// Copyright 2006 Jim Bublitz +// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson +// may also apply + + +// Generated by preSip +// module kdeprint version KDE 3.5.3 + + +// This software 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 of +// the License, or (at your option) any later version. +// +// This software is distributed 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 this library; see the file COPYING. +// If not, write to the Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + +class KPrinter : QPaintDevice, KPReloadObject +{ +%TypeHeaderCode +#include +%End + + +public: + + enum StandardPageType + { + CopiesPage, + FilesPage, + Custom + }; + + + enum PageSelectionType + { + ApplicationSide, + SystemSide + }; + + + enum ApplicationType + { + Dialog, + StandAlone, + StandAlonePersistent + }; + + + enum PageSetType + { + AllPages, + OddPages, + EvenPages + }; + + + enum CollateType + { + Collate, + Uncollate + }; + + + enum ColorMode + { + GrayScale, + Color + }; + + + enum Orientation + { + Portrait, + Landscape + }; + + + enum PageOrder + { + FirstPageFirst, + LastPageFirst + }; + + + enum PageSize + { + A4, + B5, + Letter, + Legal, + Executive, + A0, + A1, + A2, + A3, + A5, + A6, + A7, + A8, + A9, + B0, + B1, + B10, + B2, + B3, + B4, + B6, + B7, + B8, + B9, + C5E, + Comm10E, + DLE, + Folio, + Ledger, + Tabloid, + NPageSize + }; + + KPrinter (bool = 1, QPrinter::PrinterMode = QPrinter ::ScreenResolution ); + bool newPage (); + bool abort (); + bool aborted () const; + bool outputToFile () const; + void setOutputToFile (bool); + QString outputFileName () const; + void setOutputFileName (const QString&); + QString docName () const; + void setDocName (const QString&); + QString creator () const; + void setCreator (const QString&); + bool fullPage () const; + void setFullPage (bool); + KPrinter::ColorMode colorMode () const; + void setColorMode (KPrinter::ColorMode); + int numCopies () const; + void setNumCopies (int); + KPrinter::Orientation orientation () const; + void setOrientation (KPrinter::Orientation); + KPrinter::PageOrder pageOrder () const; + void setPageOrder (KPrinter::PageOrder); + KPrinter::CollateType collate () const; + void setCollate (KPrinter::CollateType); + int minPage () const; + int maxPage () const; + void setMinMax (int, int); + int fromPage () const; + int toPage () const; + void setFromTo (int, int); + KPrinter::PageSize pageSize () const; + void setPageSize (KPrinter::PageSize); + QString printerName () const; + void setPrinterName (const QString&); + QString printProgram () const; + void setPrintProgram (const QString&); + QString printerSelectionOption () const; + void setPrinterSelectionOption (const QString&); + int currentPage () const; + void setCurrentPage (int = 0); + KPrinter::PageSetType pageSet () const; + bool setup (QWidget* /Transfer/ = 0, const QString& = QString ::null , bool = 0); + QSize margins () const; + void setMargins (QSize); + QSize realPageSize () const; + void setRealPageSize (QSize); + +%If ( KDE_3_1_0 - ) + void setRealDrawableArea (const QRect&); + QRect realDrawableArea () const; + void margins (uint*, uint*, uint*, uint*) const /PyName=marginsAsInts/; + +%If ( KDE_3_2_0 - ) + void setMargins (uint, uint, uint, uint); +%End + +%End + + QValueList pageList () const; + void setPreviewOnly (bool); + bool previewOnly () const; + +%If ( KDE_3_1_0 - ) + void setResolution (int); + int resolution () const; + +%If ( KDE_3_2_0 - ) + void setUsePrinterResolution (bool); +%End + +%End + +//ig KPrinterImpl* implementation () const; + bool printFiles (const QStringList&, bool = 0, bool = 1); + static void addDialogPage (KPrintDialogPage*); + static void setPageSelection (KPrinter::PageSelectionType); + static KPrinter::PageSelectionType pageSelection (); + static void setApplicationType (KPrinter::ApplicationType); + static KPrinter::ApplicationType applicationType (); + static void addStandardPage (int); + static void removeStandardPage (int); + const QString& option (const QString&) const; + void setOption (const QString&, const QString&); + const QMap& options () const; + void setOptions (const QMap&); + void initOptions (const QMap&); + QString searchName () const; + void setSearchName (const QString&); + QString errorMessage () const; + void setErrorMessage (const QString&); + bool autoConfigure (const QString& = QString ::null , QWidget* /Transfer/ = 0); + void setDocFileName (const QString&); + QString docFileName () const; + +%If ( KDE_3_1_0 - ) + void setDocDirectory (const QString&); + QString docDirectory () const; +%End + + +protected: +//ig virtual bool cmd (int, QPainter*, QPDevCmdParam*); + virtual int metric (int) const; + void translateQtOptions (); + void loadSettings (); + void saveSettings (); + void preparePrinting (); + void finishPrinting (); + void reload (); + void init (bool = 1, QPrinter::PrinterMode = QPrinter ::ScreenResolution ); + +%If ( KDE_3_1_0 - ) + bool doPreview (const QString&); + +%If ( KDE_3_2_0 - ) +//ig void setRealPageSize (DrPageSize*); + void setOption (const QString&, const QString&, bool); +%End + +%End + + +protected: + +}; // class KPrinter + +KPrinter::PageSize pageNameToPageSize (const QString&); +const char* pageSizeToPageName (KPrinter::PageSize); +//ig QSize rangeToSize (const QString&); -- cgit v1.2.1