22 #include <tqiconview.h>
24 #include <tdelibs_export.h>
47 TQ_PROPERTY(
Mode mode READ mode WRITE setMode )
50 TDEIconView( TQWidget *parent = 0,
const char *name = 0, WFlags f = 0 );
62 enum Mode { Execute, Select };
73 void setMode( Mode m );
83 virtual void setFont(
const TQFont & );
92 void setIconTextHeight(
int n );
98 int iconTextHeight()
const;
103 virtual void takeItem( TQIconViewItem * item );
128 void executed( TQIconViewItem *item,
const TQPoint &pos );
138 void held( TQIconViewItem *item );
156 void slotOnItem( TQIconViewItem *item );
157 void slotOnViewport();
158 void slotSettingsChanged(
int);
163 void slotAutoSelect();
166 void emitExecute( TQIconViewItem *item,
const TQPoint &pos );
167 void updateDragHoldItem( TQDropEvent *e );
169 virtual void focusOutEvent( TQFocusEvent *fe );
170 virtual void leaveEvent( TQEvent *e );
171 virtual void contentsMousePressEvent( TQMouseEvent *e );
172 virtual void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
173 virtual void contentsMouseReleaseEvent( TQMouseEvent *e );
174 virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
175 virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
176 virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
177 virtual void contentsDropEvent( TQDropEvent* e );
178 virtual void wheelEvent( TQWheelEvent *e );
186 void cancelPendingHeldSignal();
189 void slotMouseButtonClicked(
int btn, TQIconViewItem *item,
const TQPoint &pos );
190 void slotDragHoldTimeout();
196 TQFontMetrics *itemFontMetrics()
const;
200 TQPixmap selectedIconPixmap( TQPixmap *pix,
const TQColor &col )
const;
203 bool m_bChangeCursorOverItem;
205 TQIconViewItem* m_pCurrentItem;
207 TQTimer* m_pAutoSelect;
208 int m_autoSelectDelay;
211 virtual void virtual_hook(
int id,
void* data );
213 class TDEIconViewPrivate;
214 TDEIconViewPrivate *d;
231 : TQIconViewItem( parent ) { init(); }
233 : TQIconViewItem( parent, after ) { init(); }
235 : TQIconViewItem( parent, text ) { init(); }
236 TDEIconViewItem( TQIconView *parent, TQIconViewItem *after,
const TQString &text )
237 : TQIconViewItem( parent, after, text ) { init(); }
238 TDEIconViewItem( TQIconView *parent,
const TQString &text,
const TQPixmap &icon )
239 : TQIconViewItem( parent, text, icon ) { init(); }
240 TDEIconViewItem( TQIconView *parent, TQIconViewItem *after,
const TQString &text,
const TQPixmap &icon )
241 : TQIconViewItem( parent, after, text, icon ) { init(); }
242 TDEIconViewItem( TQIconView *parent,
const TQString &text,
const TQPicture &picture )
243 : TQIconViewItem( parent, text, picture ) { init(); }
244 TDEIconViewItem( TQIconView *parent, TQIconViewItem *after,
const TQString &text,
const TQPicture &picture )
245 : TQIconViewItem( parent, after, text, picture ) { init(); }
259 void setPixmapSize(
const TQSize& size );
265 TQSize pixmapSize()
const;
269 virtual void calcRect(
const TQString& text_ = TQString::null );
270 virtual void paintItem( TQPainter *p,
const TQColorGroup &c );
272 void paintPixmap( TQPainter *p,
const TQColorGroup &c );
273 void paintText( TQPainter *p,
const TQColorGroup &c );
277 struct TDEIconViewItemPrivate;
278 TDEIconViewItemPrivate *d;
Word-wrap algorithm that takes into account beautifulness ;)
A variant of TQIconViewItem that wraps words better.
A variant of TQIconView that honors KDE's system-wide settings.
void held(TQIconViewItem *item)
This signal is emitted whenever the user hold something on an iconview during a drag'n'drop.
void executed(TQIconViewItem *item)
This signal is emitted whenever the user executes an iconview item.
void doubleClicked(TQIconViewItem *item, const TQPoint &pos)
This signal gets emitted whenever the user double clicks into the iconview.
void executed(TQIconViewItem *item, const TQPoint &pos)
This signal is emitted whenever the user executes an iconview item.
Mode
TDEIconView has two different operating modes.