14 #ifndef __TDEIconDialog_h__
15 #define __TDEIconDialog_h__
18 #include <tqstringlist.h>
19 #include <tqpushbutton.h>
21 #include <kicontheme.h>
22 #include <kdialogbase.h>
23 #include <kiconview.h>
46 void loadFiles(
const TQStringList& files);
51 TQString getCurrent()
const;
63 void startLoading(
int);
69 void slotCurrentChanged(TQIconViewItem *item);
74 TDEIconLoader *mpLoader;
77 virtual void virtual_hook(
int id,
void* data );
80 class TDEIconCanvasPrivate;
81 TDEIconCanvasPrivate *d;
116 void setStrictIconSize(
bool b);
120 bool strictIconSize()
const;
125 void setCustomLocation(
const TQString& location );
132 void setIconSize(
int size);
138 int iconSize()
const;
140 #ifndef KDE_NO_COMPAT
144 TQString selectIcon(TDEIcon::Group group=TDEIcon::Desktop, TDEIcon::Context
145 context=TDEIcon::Application,
bool user=
false);
152 void setup( TDEIcon::Group group,
153 TDEIcon::Context context = TDEIcon::Application,
154 bool strictIconSize =
false,
int iconSize = 0,
166 void setup( TDEIcon::Group group, TDEIcon::Context context,
167 bool strictIconSize,
int iconSize,
bool user,
bool lockUser,
168 bool lockCustomDir );
176 TQString openDialog();
203 static TQString getIcon(TDEIcon::Group group=TDEIcon::Desktop,
204 TDEIcon::Context context=TDEIcon::Application,
205 bool strictIconSize=
false,
int iconSize = 0,
206 bool user=
false, TQWidget *parent=0,
207 const TQString &caption=TQString::null);
210 void newIconName(
const TQString&);
216 void slotButtonClicked(
int);
217 void slotContext(
int);
218 void slotStartLoading(
int);
219 void slotProgress(
int);
221 void slotAcceptIcons();
225 void setContext( TDEIcon::Context context );
228 TDEIcon::Context mContext;
231 TQStringList mFileList;
233 TQPushButton *mpBrowseBut;
234 TQRadioButton *mpRb1, *mpRb2;
235 KProgress *mpProgress;
236 TDEIconLoader *mpLoader;
239 TDEIcon::Context mContextMap[ 12 ];
242 virtual void virtual_hook(
int id,
void* data );
244 class TDEIconDialogPrivate;
245 TDEIconDialogPrivate *d;
260 TQ_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon )
261 TQ_PROPERTY(
int iconSize READ iconSize WRITE setIconSize)
262 TQ_PROPERTY(
bool strictIconSize READ strictIconSize WRITE setStrictIconSize )
273 TDEIconButton(TDEIconLoader *loader, TQWidget *parent,
const char *name=0L);
284 void setStrictIconSize(
bool b);
288 bool strictIconSize()
const;
294 void setIconType(TDEIcon::Group group, TDEIcon::Context context,
bool user=
false);
299 void setIcon(
const TQString& icon);
309 TQString
icon()
const {
return mIcon; }
316 void setIconSize(
int size );
322 int iconSize()
const;
332 void slotChangeIcon();
333 void newIconName(
const TQString& name);
336 void init( TDEIconLoader *loader );
339 TDEIcon::Group mGroup;
340 TDEIcon::Context mContext;
344 TDEIconLoader *mpLoader;
345 class TDEIconButtonPrivate;
346 TDEIconButtonPrivate *d;
Icon canvas for TDEIconDialog.
void nameChanged(TQString)
Emitted when the current icon has changed.
Dialog for interactive selection of icons.