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.
382 lines
9.9 KiB
382 lines
9.9 KiB
13 years ago
|
// This is the SIP interface definition for TQIconView, TQIconViewItem, TQIconDrag
|
||
|
// and TQIconDragItem.
|
||
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.
|
||
|
|
||
|
|
||
|
%ExportedDoc
|
||
13 years ago
|
<Sect2><Title>TQIconView (TQt v2.1+)</Title>
|
||
13 years ago
|
<FuncSynopsis>
|
||
13 years ago
|
<FuncDef>TQIconViewItem *<Function>makeRowLayout</Function></FuncDef>
|
||
|
<ParamDef>TQIconViewItem *<Parameter>begin</Parameter></ParamDef>
|
||
13 years ago
|
<ParamDef>int &<Parameter>y</Parameter></ParamDef>
|
||
|
</FuncSynopsis>
|
||
|
<Para>
|
||
|
Not yet implemented.
|
||
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQIconViewItem (TQt v2.1+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQIconViewItem</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQIconDrag (TQt v2.1+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQIconDrag</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
|
||
13 years ago
|
<Sect2><Title>TQIconDragItem (TQt v2.1+)</Title>
|
||
13 years ago
|
<Para>
|
||
13 years ago
|
<Literal>TQIconDragItem</Literal> is fully implemented.
|
||
13 years ago
|
</Para>
|
||
|
</Sect2>
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
%If (TQt_ICONVIEW)
|
||
13 years ago
|
|
||
13 years ago
|
%If (TQt_DRAGANDDROP)
|
||
13 years ago
|
|
||
13 years ago
|
class TQIconDragItem
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqiconview.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQIconDragItem();
|
||
13 years ago
|
|
||
13 years ago
|
virtual TQByteArray data() const;
|
||
|
virtual void setData(const TQByteArray &);
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQIconDrag : TQDragObject
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqiconview.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQIconDrag(TQWidget * /TransferThis/,const char * = 0);
|
||
13 years ago
|
|
||
13 years ago
|
void append(const TQIconDragItem &,const TQRect &,const TQRect &);
|
||
13 years ago
|
|
||
|
virtual const char* format(int) const;
|
||
13 years ago
|
static bool canDecode(TQMimeSource *);
|
||
|
virtual TQByteArray encodedData(const char *) const;
|
||
13 years ago
|
|
||
|
private:
|
||
13 years ago
|
TQIconDrag(const TQIconDrag &);
|
||
13 years ago
|
};
|
||
|
|
||
|
%End
|
||
|
|
||
|
|
||
13 years ago
|
class TQIconViewItem : TQt
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqiconview.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
13 years ago
|
TQIconViewItem(TQIconView * /TransferThis/);
|
||
|
TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *);
|
||
|
TQIconViewItem(TQIconView * /TransferThis/,const TQString &);
|
||
|
TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
|
||
|
const TQString &);
|
||
|
TQIconViewItem(TQIconView * /TransferThis/,const TQString &,
|
||
|
const TQPixmap &);
|
||
|
TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
|
||
|
const TQString &,const TQPixmap &);
|
||
|
TQIconViewItem(TQIconView * /TransferThis/,const TQString &,
|
||
|
const TQPicture &);
|
||
|
TQIconViewItem(TQIconView * /TransferThis/,TQIconViewItem *,
|
||
|
const TQString &,const TQPicture &);
|
||
13 years ago
|
|
||
|
virtual void setRenameEnabled(bool);
|
||
|
virtual void setDragEnabled(bool);
|
||
|
virtual void setDropEnabled(bool);
|
||
|
|
||
13 years ago
|
virtual TQString text() const;
|
||
|
virtual TQPixmap *pixmap() const;
|
||
|
virtual TQPicture *picture() const;
|
||
|
virtual TQString key() const;
|
||
13 years ago
|
|
||
|
bool renameEnabled() const;
|
||
|
bool dragEnabled() const;
|
||
|
bool dropEnabled() const;
|
||
|
|
||
13 years ago
|
TQIconView *iconView() const;
|
||
|
TQIconViewItem *prevItem() const;
|
||
|
TQIconViewItem *nextItem() const;
|
||
13 years ago
|
|
||
|
int index() const;
|
||
|
|
||
|
virtual void setSelected(bool,bool);
|
||
|
virtual void setSelected(bool);
|
||
|
virtual void setSelectable(bool);
|
||
|
|
||
|
bool isSelected() const;
|
||
|
bool isSelectable() const;
|
||
|
|
||
|
virtual void repaint();
|
||
|
|
||
|
virtual bool move(int,int);
|
||
|
virtual void moveBy(int,int);
|
||
13 years ago
|
virtual bool move(const TQPoint &);
|
||
|
virtual void moveBy(const TQPoint &);
|
||
13 years ago
|
|
||
13 years ago
|
TQRect rect() const;
|
||
13 years ago
|
int x() const;
|
||
|
int y() const;
|
||
|
int width() const;
|
||
|
int height() const;
|
||
13 years ago
|
TQSize size() const;
|
||
|
TQPoint pos() const;
|
||
|
TQRect textRect(bool = 1) const;
|
||
|
TQRect pixmapRect(bool = 1) const;
|
||
|
bool contains(const TQPoint &) const;
|
||
|
bool intersects(const TQRect &) const;
|
||
13 years ago
|
|
||
13 years ago
|
virtual bool acceptDrop(const TQMimeSource *) const;
|
||
13 years ago
|
|
||
|
void rename();
|
||
|
|
||
13 years ago
|
virtual int compare(TQIconViewItem *) const;
|
||
13 years ago
|
|
||
13 years ago
|
virtual void setText(const TQString &);
|
||
|
virtual void setPixmap(const TQPixmap &);
|
||
|
virtual void setPicture(const TQPicture &);
|
||
|
virtual void setText(const TQString &,bool,bool = 1);
|
||
|
virtual void setPixmap(const TQPixmap &,bool,bool = 1);
|
||
|
virtual void setKey(const TQString &);
|
||
13 years ago
|
|
||
|
virtual int rtti() const;
|
||
|
|
||
|
protected:
|
||
|
virtual void removeRenameBox();
|
||
13 years ago
|
virtual void calcRect(const TQString & = TQString::null);
|
||
|
virtual void paintItem(TQPainter *,const TQColorGroup &);
|
||
|
virtual void paintFocus(TQPainter *,const TQColorGroup &);
|
||
|
%If (TQt_DRAGANDDROP)
|
||
|
virtual void dropped(TQDropEvent *,const TQValueList<TQIconDragItem> &);
|
||
13 years ago
|
%End
|
||
|
virtual void dragEntered();
|
||
|
virtual void dragLeft();
|
||
13 years ago
|
void setItemRect(const TQRect &);
|
||
|
void setTextRect(const TQRect &);
|
||
|
void setPixmapRect(const TQRect &);
|
||
13 years ago
|
void calcTmpText();
|
||
13 years ago
|
TQString tempText() const;
|
||
13 years ago
|
};
|
||
|
|
||
|
|
||
13 years ago
|
class TQIconView : TQScrollView
|
||
13 years ago
|
{
|
||
|
%TypeHeaderCode
|
||
13 years ago
|
#include <tqiconview.h>
|
||
13 years ago
|
%End
|
||
|
|
||
|
public:
|
||
|
enum SelectionMode {
|
||
|
Single,
|
||
|
Multi,
|
||
|
Extended,
|
||
|
NoSelection
|
||
|
};
|
||
|
|
||
|
enum Arrangement {
|
||
|
LeftToRight,
|
||
|
TopToBottom
|
||
|
};
|
||
|
|
||
|
enum ResizeMode {
|
||
|
Fixed,
|
||
|
Adjust
|
||
|
};
|
||
|
|
||
|
enum ItemTextPos {
|
||
|
Bottom,
|
||
|
Right
|
||
|
};
|
||
|
|
||
13 years ago
|
TQIconView(TQWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
|
||
13 years ago
|
|
||
13 years ago
|
virtual void insertItem(TQIconViewItem *,TQIconViewItem * = 0);
|
||
|
virtual void takeItem(TQIconViewItem *);
|
||
13 years ago
|
|
||
13 years ago
|
int index(const TQIconViewItem *) const;
|
||
13 years ago
|
|
||
13 years ago
|
TQIconViewItem *firstItem() const;
|
||
|
TQIconViewItem *lastItem() const;
|
||
|
TQIconViewItem *currentItem() const;
|
||
|
virtual void setCurrentItem(TQIconViewItem *);
|
||
|
virtual void setSelected(TQIconViewItem *,bool,bool = 0);
|
||
13 years ago
|
|
||
|
uint count() const;
|
||
|
|
||
13 years ago
|
virtual void showEvent(TQShowEvent *);
|
||
13 years ago
|
|
||
|
virtual void setSelectionMode(SelectionMode);
|
||
|
SelectionMode selectionMode() const;
|
||
|
|
||
13 years ago
|
TQIconViewItem *findItem(const TQPoint &) const;
|
||
|
TQIconViewItem *findItem(const TQString &,
|
||
13 years ago
|
ComparisonFlags = BeginsWith) const;
|
||
|
virtual void selectAll(bool);
|
||
|
virtual void clearSelection();
|
||
|
virtual void invertSelection();
|
||
|
|
||
13 years ago
|
virtual void repaintItem(TQIconViewItem *);
|
||
13 years ago
|
void repaintSelectedItems();
|
||
|
|
||
13 years ago
|
void ensureItemVisible(TQIconViewItem *);
|
||
|
TQIconViewItem* findFirstVisibleItem(const TQRect &) const;
|
||
|
TQIconViewItem* findLastVisibleItem(const TQRect &) const;
|
||
13 years ago
|
|
||
|
virtual void clear();
|
||
|
|
||
|
virtual void setGridX(int);
|
||
|
virtual void setGridY(int);
|
||
|
int gridX() const;
|
||
|
int gridY() const;
|
||
|
virtual void setSpacing(int);
|
||
|
int spacing() const;
|
||
|
virtual void setItemTextPos(ItemTextPos);
|
||
|
ItemTextPos itemTextPos() const;
|
||
13 years ago
|
virtual void setItemTextBackground(const TQBrush &);
|
||
|
TQBrush itemTextBackground() const;
|
||
13 years ago
|
virtual void setArrangement(Arrangement);
|
||
|
Arrangement arrangement() const;
|
||
|
virtual void setResizeMode(ResizeMode);
|
||
|
ResizeMode resizeMode() const;
|
||
|
virtual void setMaxItemWidth(int);
|
||
|
int maxItemWidth() const;
|
||
|
virtual void setMaxItemTextLength(int);
|
||
|
int maxItemTextLength() const;
|
||
|
virtual void setAutoArrange(bool);
|
||
|
bool autoArrange() const;
|
||
|
virtual void setShowToolTips(bool);
|
||
|
bool showToolTips() const;
|
||
|
|
||
|
void setSorting(bool,bool = 1);
|
||
|
bool sorting() const;
|
||
|
bool sortDirection() const;
|
||
|
|
||
|
virtual void setItemsMovable(bool);
|
||
|
bool itemsMovable() const;
|
||
|
virtual void setWordWrapIconText(bool);
|
||
|
bool wordWrapIconText() const;
|
||
|
|
||
13 years ago
|
bool eventFilter(TQObject *,TQEvent *);
|
||
13 years ago
|
|
||
13 years ago
|
TQSize minimumSizeHint() const;
|
||
|
TQSize sizeHint() const;
|
||
13 years ago
|
|
||
|
virtual void sort(bool = 1);
|
||
|
|
||
13 years ago
|
virtual void setFont(const TQFont &);
|
||
|
virtual void setPalette(const TQPalette &);
|
||
13 years ago
|
|
||
|
bool isRenaming() const;
|
||
|
|
||
|
public slots:
|
||
13 years ago
|
virtual void arrangeItemsInGrid(const TQSize &,bool = 1);
|
||
13 years ago
|
virtual void arrangeItemsInGrid(bool = 1);
|
||
|
virtual void setContentsPos(int,int);
|
||
|
virtual void updateContents();
|
||
|
|
||
|
signals:
|
||
|
void selectionChanged();
|
||
13 years ago
|
void selectionChanged(TQIconViewItem *);
|
||
|
void currentChanged(TQIconViewItem *);
|
||
|
void clicked(TQIconViewItem *);
|
||
|
void clicked(TQIconViewItem *,const TQPoint &);
|
||
|
void pressed(TQIconViewItem *);
|
||
|
void pressed(TQIconViewItem *,const TQPoint &);
|
||
|
|
||
|
void doubleClicked(TQIconViewItem *);
|
||
|
void returnPressed(TQIconViewItem *);
|
||
|
void rightButtonClicked(TQIconViewItem *,const TQPoint &);
|
||
|
void rightButtonPressed(TQIconViewItem *,const TQPoint &);
|
||
|
void mouseButtonPressed(int,TQIconViewItem *,const TQPoint &);
|
||
|
void mouseButtonClicked(int,TQIconViewItem *,const TQPoint &);
|
||
|
void contextMenuRequested(TQIconViewItem *,const TQPoint &);
|
||
|
%If (TQt_DRAGANDDROP)
|
||
|
void dropped(TQDropEvent *,const TQValueList<TQIconDragItem> &);
|
||
13 years ago
|
%End
|
||
|
void moved();
|
||
13 years ago
|
void onItem(TQIconViewItem *);
|
||
13 years ago
|
void onViewport();
|
||
13 years ago
|
void itemRenamed(TQIconViewItem *,const TQString &);
|
||
|
void itemRenamed(TQIconViewItem *);
|
||
13 years ago
|
|
||
|
protected slots:
|
||
|
virtual void doAutoScroll();
|
||
|
virtual void adjustItems();
|
||
|
virtual void slotUpdate();
|
||
|
|
||
|
protected:
|
||
13 years ago
|
void drawContents(TQPainter *,int,int,int,int);
|
||
|
void contentsMousePressEvent(TQMouseEvent *);
|
||
|
void contentsMouseReleaseEvent(TQMouseEvent *);
|
||
|
void contentsMouseMoveEvent(TQMouseEvent *);
|
||
|
void contentsMouseDoubleClickEvent(TQMouseEvent *);
|
||
|
void contentsContextMenuEvent(TQContextMenuEvent *);
|
||
|
|
||
|
%If (TQt_DRAGANDDROP)
|
||
|
void contentsDragEnterEvent(TQDragEnterEvent *);
|
||
|
void contentsDragMoveEvent(TQDragMoveEvent *);
|
||
|
void contentsDragLeaveEvent(TQDragLeaveEvent *);
|
||
|
void contentsDropEvent(TQDropEvent *);
|
||
|
%End
|
||
|
|
||
|
void resizeEvent(TQResizeEvent *);
|
||
|
void keyPressEvent(TQKeyEvent *);
|
||
|
void focusInEvent(TQFocusEvent *);
|
||
|
void focusOutEvent(TQFocusEvent *);
|
||
|
void enterEvent(TQEvent *);
|
||
|
|
||
|
virtual void drawRubber(TQPainter *);
|
||
|
%If (TQt_DRAGANDDROP)
|
||
|
virtual TQDragObject *dragObject();
|
||
13 years ago
|
virtual void startDrag();
|
||
|
%End
|
||
13 years ago
|
virtual void insertInGrid(TQIconViewItem *);
|
||
|
virtual void drawBackground(TQPainter *,const TQRect &);
|
||
13 years ago
|
|
||
13 years ago
|
void emitSelectionChanged(TQIconViewItem * = 0);
|
||
|
void emitRenamed(TQIconViewItem *);
|
||
13 years ago
|
|
||
13 years ago
|
// TQIconViewItem *makeRowLayout(TQIconViewItem *,int &,bool &);
|
||
13 years ago
|
|
||
13 years ago
|
void styleChange(TQStyle &);
|
||
13 years ago
|
void windowActivationChange(bool);
|
||
|
|
||
|
private:
|
||
13 years ago
|
TQIconView(const TQIconView &);
|
||
13 years ago
|
};
|
||
|
|
||
|
%End
|