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/tdeui/kstdguiitem.sip

351 lines
6.5 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 tdeui 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 KStdGuiItem
{
%TypeHeaderCode
#include <kstdguiitem.h>
%End
public:
enum BidiMode
{
UseRTL,
IgnoreRTL
};
%If ( KDE_3_5_0 - )
enum StdItem
{
Ok,
Cancel,
Yes,
No,
Discard,
Save,
DontSave,
SaveAs,
Apply,
Clear,
Help,
Defaults,
Close,
Back,
Forward,
Print,
Continue,
Open,
Quit,
AdminMode,
Reset,
Delete,
Insert,
Configure,
Find,
Stop,
Add,
Remove,
Test,
Properties,
Overwrite
};
%End
static KGuiItem guiItem (KStdGuiItem::StdItem);
static TQString stdItem (KStdGuiItem::StdItem);
static KGuiItem ok ();
static KGuiItem cancel ();
static KGuiItem yes ();
static KGuiItem no ();
%If ( KDE_3_3_0 - )
static KGuiItem insert ();
%End
static KGuiItem discard ();
static KGuiItem save ();
static KGuiItem help ();
static KGuiItem dontSave ();
static KGuiItem saveAs ();
static KGuiItem apply ();
static KGuiItem clear ();
static KGuiItem defaults ();
static KGuiItem close ();
static KGuiItem print () /PyName=print_/;
%If ( KDE_3_4_0 - )
static KGuiItem properties ();
%End
%If ( KDE_3_3_0 - )
static KGuiItem reset ();
%If ( KDE_3_5_0 - )
static KGuiItem overwrite ();
%End
static KGuiItem adminMode ();
%End
static KGuiItem cont ();
%If ( KDE_3_3_0 - )
static KGuiItem del ();
%End
%If ( KDE_3_2_0 - )
static KGuiItem open ();
%End
static KGuiItem back (KStdGuiItem::BidiMode = IgnoreRTL );
static KGuiItem forward (KStdGuiItem::BidiMode = IgnoreRTL );
%If ( KDE_3_4_0 - )
static KGuiItem configure ();
%End
static TQPair<KGuiItem,KGuiItem> backAndForward ();
%If ( KDE_3_2_0 - )
static KGuiItem quit ();
%If ( KDE_3_4_0 - )
static KGuiItem find ();
static KGuiItem stop ();
static KGuiItem add ();
static KGuiItem remove ();
static KGuiItem test ();
%End
%End
public:
%If ( KDE_3_4_0 - KDE_3_5_0 )
enum StdItem
{
Ok,
Cancel,
Yes,
No,
Discard,
Save,
DontSave,
SaveAs,
Apply,
Clear,
Help,
Defaults,
Close,
Back,
Forward,
Print,
Continue,
Open,
Quit,
AdminMode,
Reset,
Delete,
Insert,
Configure,
Find,
Stop,
Add,
Remove,
Test,
Properties
};
%End
public:
%If ( KDE_3_3_0 - KDE_3_4_0 )
enum StdItem
{
Ok,
Cancel,
Yes,
No,
Discard,
Save,
DontSave,
SaveAs,
Apply,
Clear,
Help,
Defaults,
Close,
Back,
Forward,
Print,
Continue,
Open,
Quit,
AdminMode,
Reset,
Delete,
Insert
};
%End
public:
%If ( KDE_3_2_0 - KDE_3_3_0 )
enum StdItem
{
Ok,
Cancel,
Yes,
No,
Discard,
Save,
DontSave,
SaveAs,
Apply,
Clear,
Help,
Defaults,
Close,
Back,
Forward,
Print,
Continue,
Open,
Quit
};
%End
public:
%If ( - KDE_3_2_0 )
enum StdItem
{
Ok,
Cancel,
Yes,
No,
Discard,
Save,
DontSave,
SaveAs,
Apply,
Clear,
Help,
Defaults,
Close,
Back,
Forward,
Print,
Continue
};
%End
}; // class KStdGuiItem
%MappedType TQPair<KGuiItem,KGuiItem>
//converts a Python tuple (KGuiItem,KGuiItem)
{
%TypeHeaderCode
#include <kguiitem.h>
%End
%ConvertFromTypeCode
if (!sipCpp)
return PyTuple_New(0);
// Create the tuple
PyObject *pytuple;
if ((pytuple = PyTuple_New(0)) == NULL)
return NULL;
TQPair<KGuiItem,KGuiItem> *cpp = (TQPair<KGuiItem,KGuiItem> *)sipCpp;
PyObject *inst = NULL;
// Get it.
KGuiItem g1 = (*cpp).first;
KGuiItem g2 = (*cpp).second;
PyObject *pyg1 = sipConvertFromNewType(new KGuiItem(g1), sipType_KGuiItem, NULL);
PyObject *pyg2 = sipConvertFromNewType(new KGuiItem(g2), sipType_KGuiItem, NULL);
if ((pyg1 == NULL) || (pyg2 == NULL) || ((inst = Py_BuildValue ("NN", pyg1, pyg2)) == NULL))
{
Py_XDECREF (inst);
Py_XDECREF (pyg1);
Py_XDECREF (pyg2);
return NULL;
}
return inst;
%End
%ConvertToTypeCode
if (sipIsErr == NULL)
return PyTuple_Check(sipPy);
KGuiItem *g1, *g2;
int iserr = 0;
PyObject *pyg1 = PyTuple_GET_ITEM (sipPy, 0);
PyObject *pyg2 = PyTuple_GET_ITEM (sipPy, 1);
g1 = (KGuiItem *)sipForceConvertToType(pyg1, sipType_KGuiItem, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
g2 = (KGuiItem *)sipForceConvertToType(pyg2, sipType_KGuiItem, sipTransferObj, SIP_NOT_NONE|SIP_NO_CONVERTORS, NULL, &iserr);
if (iserr)
{
*sipIsErr = 1;
return 0;
}
*sipCppPtr = new TQPair<KGuiItem, KGuiItem> (*g1, *g2);
return 1;
%End
};