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.
232 lines
5.2 KiB
232 lines
5.2 KiB
13 years ago
|
// This is the SIP interface definition for TQDragObject, TQImageDrag,
|
||
|
// TQStoredDrag, TQTextDrag, TQUriDrag, TQUrlDrag, TQColorDrag.
|
||
13 years ago
|
//
|
||
|
// Copyright (c) 2007
|
||
|
// Riverbank Computing Limited <info@riverbankcomputing.co.uk>
|
||
|
//
|
||
13 years ago
|
// This file is part of PyTQt.
|
||
13 years ago
|
//
|
||
13 years ago
|
// This copy of PyTQt is free software; you can redistribute it and/or modify it
|
||
13 years ago
|
// 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.
|
||
|
//
|
||
13 years ago
|
// PyTQt is supplied in the hope that it will be useful, but WITHOUT ANY
|
||
13 years ago
|
// 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
|
||
13 years ago
|
// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation,
|
||
13 years ago
|
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||
|
|
||
3 years ago
|
%DefaultEncoding "UTF-8"
|
||
13 years ago
|
|
||
|
%ExportedDoc
|
||
13 years ago
|
<Sect2><Title>TQColorDrag (TQt v2.1+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQColorDrag</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQDragObject</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQDragObject</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQImageDrag</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQImageDrag</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQStoredDrag</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQStoredDrag</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQTextDrag</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQTextDrag</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQUriDrag (TQt v2+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQUriDrag</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQUrlDrag (TQt v1.x)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQUrlDrag</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
class TQDragObject : TQObject, TQMimeSource
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqdragobject.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQDragObject(TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
%If (TQt_DRAGANDDROP)
|
||
13 years ago
|
bool drag();
|
||
|
bool dragMove();
|
||
|
void dragCopy();
|
||
|
void dragLink();
|
||
|
|
||
13 years ago
|
virtual void setPixmap(TQPixmap);
|
||
|
virtual void setPixmap(TQPixmap,const TQPoint &);
|
||
|
TQPixmap pixmap() const;
|
||
|
TQPoint pixmapHotSpot() const;
|
||
13 years ago
|
%End
|
||
|
|
||
13 years ago
|
TQWidget *source();
|
||
|
static TQWidget *target();
|
||
13 years ago
|
|
||
13 years ago
|
static void setTarget(TQWidget *);
|
||
13 years ago
|
|
||
13 years ago
|
%If (TQt_DRAGANDDROP)
|
||
13 years ago
|
enum DragMode {
|
||
|
DragDefault,
|
||
|
DragCopy,
|
||
|
DragMove,
|
||
|
DragLink,
|
||
|
DragCopyOrMove
|
||
|
};
|
||
|
%End
|
||
|
|
||
|
protected:
|
||
13 years ago
|
%If (TQt_DRAGANDDROP)
|
||
13 years ago
|
virtual bool drag(DragMode);
|
||
|
%End
|
||
|
|
||
|
private:
|
||
13 years ago
|
TQDragObject(const TQDragObject &);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQStoredDrag : TQDragObject
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqdragobject.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQStoredDrag(const char *,TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
virtual void setEncodedData(const TQByteArray&);
|
||
13 years ago
|
|
||
|
const char *format(int) const;
|
||
13 years ago
|
virtual TQByteArray encodedData(const char *) const;
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
TQStoredDrag(const TQStoredDrag &);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQTextDrag : TQDragObject
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqdragobject.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQTextDrag(const TQString &,TQWidget * /TransferThis/ = 0,
|
||
13 years ago
|
const char * = 0);
|
||
13 years ago
|
TQTextDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
virtual void setText(const TQString &);
|
||
|
virtual void setSubtype(const TQCString &);
|
||
13 years ago
|
|
||
|
const char *format(int) const;
|
||
13 years ago
|
virtual TQByteArray encodedData(const char *) const;
|
||
13 years ago
|
|
||
13 years ago
|
static bool canDecode(const TQMimeSource *);
|
||
|
static bool decode(const TQMimeSource *,TQString &);
|
||
|
static bool decode(const TQMimeSource *,TQString &,TQCString &);
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
TQTextDrag(const TQTextDrag &);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQImageDrag : TQDragObject
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqdragobject.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQImageDrag(TQImage,TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
|
TQImageDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
virtual void setImage(TQImage);
|
||
13 years ago
|
|
||
|
const char *format(int) const;
|
||
13 years ago
|
virtual TQByteArray encodedData(const char *) const;
|
||
13 years ago
|
|
||
13 years ago
|
static bool canDecode(const TQMimeSource *);
|
||
|
static bool decode(const TQMimeSource *,TQImage &);
|
||
|
static bool decode(const TQMimeSource *,TQPixmap &);
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
TQImageDrag(const TQImageDrag &);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQUriDrag : TQStoredDrag
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqdragobject.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQUriDrag(TQStrList,TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
|
TQUriDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
void setFileNames(const TQStringList &);
|
||
|
void setUnicodeUris(const TQStringList &);
|
||
|
virtual void setUris(TQStrList);
|
||
13 years ago
|
|
||
13 years ago
|
static TQString uriToLocalFile(const char *);
|
||
|
static TQCString localFileToUri(const TQString &);
|
||
|
static TQString uriToUnicodeUri(const char *);
|
||
|
static TQCString unicodeUriToUri(const TQString &);
|
||
|
static bool canDecode(const TQMimeSource *);
|
||
|
static bool decode(const TQMimeSource *,TQStrList &);
|
||
|
static bool decodeToUnicodeUris(const TQMimeSource *,TQStringList &);
|
||
|
static bool decodeLocalFiles(const TQMimeSource *,TQStringList &);
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
TQUriDrag(const TQUriDrag &);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQColorDrag : TQStoredDrag
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqdragobject.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQColorDrag(const TQColor &,TQWidget * /TransferThis/ = 0,
|
||
13 years ago
|
const char * = 0);
|
||
13 years ago
|
TQColorDrag(TQWidget * /TransferThis/ = 0,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
void setColor(const TQColor &);
|
||
13 years ago
|
|
||
13 years ago
|
static bool canDecode(TQMimeSource *);
|
||
|
static bool decode(TQMimeSource *,TQColor &);
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
TQColorDrag(const TQColorDrag &);
|
||
13 years ago
|
};
|