You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pytde/sip/tdeprint/kprintdialog.sip

170 lines
4.3 KiB

//
// Copyright 2006 Jim Bublitz <jbublitz@nwinternet.com>
// Earlier copyrights 1998 - 2005 Jim Bublitz and/or Phil Thompson
// may also apply
// Generated by preSip
// module tdeprint 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.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
class KPrintDialog : KDialog, KPReloadObject
{
%TypeHeaderCode
#include <kprintdialog.h>
%End
public:
KPrintDialog (TQWidget* /TransferThis/ = 0, const char* = 0);
void setFlags (int);
void setDialogPages (TQPtrList<KPrintDialogPage>*);
%If ( KDE_3_1_0 - )
void enableDialogPage (int, bool = 1);
%End
KPrinter* printer () const;
static KPrintDialog* printerDialog (KPrinter*, TQWidget*, const TQString& = TQString ::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 TQString&);
void slotUpdatePossible (bool);
void slotOpenFileDialog ();
%End
protected:
bool checkOutputFile ();
void enableSpecial (bool);
void enableOutputFile (bool);
void setOutputFileExtension (const TQString&);
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 TQPtrList<KPrintDialogPage>
//converts a Python list of KPrintDialogPage
{
%TypeHeaderCode
#include <qptrlist.h>
#include <kprintdialogpage.h>
%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.
TQPtrList<KPrintDialogPage> *kpList = (TQPtrList<KPrintDialogPage> *)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 TQPtrList<KPrintDialogPage> on the heap.
if (sipIsErr == NULL)
return PyList_Check(sipPy);
TQPtrList<KPrintDialogPage> *kpList = new TQPtrList<KPrintDialogPage>;
PyObject *elem;
KPrintDialogPage *p;
int iserr = 0;
for (int i = 0; i < PyList_Size (sipPy); i++)
{
elem = PyList_GET_ITEM (sipPy, i);
p = (KPrintDialogPage *)sipForceConvertToType(elem, sipType_KPrintDialogPage, sipTransferObj, SIP_NO_CONVERTORS, NULL, &iserr);
if (iserr)
{
*sipIsErr = 1;
delete kpList;
return 0;
}
kpList->append (p);
}
*sipCppPtr = kpList;
return 1;
%End
};