• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdefile
 

tdeio/tdefile

  • tdeio
  • tdefile
kicondialog.h
1/*
2 *
3 * This file is part of the KDE project, module tdefile.
4 * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
5 * (C) 2000 Kurt Granroth <granroth@kde.org>
6 * (C) 1997 Christoph Neerfeld <chris@kde.org>
7 * (C) 2002 Carsten Pfeiffer <pfeiffer@kde.org>
8 *
9 * This is free software; it comes under the GNU Library General
10 * Public License, version 2. See the file "COPYING.LIB" for the
11 * exact licensing terms.
12 */
13
14#ifndef __TDEIconDialog_h__
15#define __TDEIconDialog_h__
16
17#include <tqstring.h>
18#include <tqstringlist.h>
19#include <tqpushbutton.h>
20
21#include <kicontheme.h>
22#include <kdialogbase.h>
23#include <kiconview.h>
24
25class TQComboBox;
26class TQTimer;
27class TQKeyEvent;
28class TQRadioButton;
29class KProgress;
30class TDEIconLoader;
31
35class TDEIO_EXPORT TDEIconCanvas: public TDEIconView
36{
37 TQ_OBJECT
38
39public:
40 TDEIconCanvas(TQWidget *parent=0L, const char *name=0L);
41 ~TDEIconCanvas();
42
46 void loadFiles(const TQStringList& files);
47
51 TQString getCurrent() const;
52
53public slots:
54 void stopLoading();
55
56signals:
60 void nameChanged(TQString);
61 /* KDE 4: Make it const TQString & */
62
63 void startLoading(int);
64 void progress(int);
65 void finished();
66
67private slots:
68 void slotLoadFiles();
69 void slotCurrentChanged(TQIconViewItem *item);
70
71private:
72 TQStringList mFiles;
73 TQTimer *mpTimer;
74 TDEIconLoader *mpLoader; // unused
75
76protected:
77 virtual void virtual_hook( int id, void* data );
78
79private:
80 class TDEIconCanvasPrivate;
81 TDEIconCanvasPrivate *d;
82};
83
84
91class TDEIO_EXPORT TDEIconDialog: public KDialogBase
92{
93 TQ_OBJECT
94
95public:
99 TDEIconDialog(TQWidget *parent=0L, const char *name=0L);
103 TDEIconDialog(TDEIconLoader *loader, TQWidget *parent=0,
104 const char *name=0);
108 ~TDEIconDialog();
109
116 void setStrictIconSize(bool b);
120 bool strictIconSize() const;
125 void setCustomLocation( const TQString& location );
126
132 void setIconSize(int size);
133
138 int iconSize() const;
139
140#ifndef KDE_NO_COMPAT
144 TQString selectIcon(TDEIcon::Group group=TDEIcon::Desktop, TDEIcon::Context
145 context=TDEIcon::Application, bool user=false);
146#endif
147
152 void setup( TDEIcon::Group group,
153 TDEIcon::Context context = TDEIcon::Application,
154 bool strictIconSize = false, int iconSize = 0,
155 bool user = false );
156
166 void setup( TDEIcon::Group group, TDEIcon::Context context,
167 bool strictIconSize, int iconSize, bool user, bool lockUser,
168 bool lockCustomDir );
169
176 TQString openDialog();
177
182 void showDialog();
183
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);
208
209signals:
210 void newIconName(const TQString&);
211
212protected slots:
213 void slotOk();
214
215private slots:
216 void slotButtonClicked(int);
217 void slotContext(int);
218 void slotStartLoading(int);
219 void slotProgress(int);
220 void slotFinished();
221 void slotAcceptIcons();
222private:
223 void init();
224 void showIcons();
225 void setContext( TDEIcon::Context context );
226
227 int mGroupOrSize;
228 TDEIcon::Context mContext;
229 int mType;
230
231 TQStringList mFileList;
232 TQComboBox *mpCombo;
233 TQPushButton *mpBrowseBut;
234 TQRadioButton *mpRb1, *mpRb2;
235 KProgress *mpProgress;
236 TDEIconLoader *mpLoader;
237 TDEIconCanvas *mpCanvas;
238 int mNumContext;
239 TDEIcon::Context mContextMap[ 12 ]; // must match TDEIcon::Context size, code has assert
240
241protected:
242 virtual void virtual_hook( int id, void* data );
243private:
244 class TDEIconDialogPrivate;
245 TDEIconDialogPrivate *d;
246};
247
248
257class TDEIO_EXPORT TDEIconButton: public TQPushButton
258{
259 TQ_OBJECT
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 )
263
264public:
268 TDEIconButton(TQWidget *parent=0L, const char *name=0L);
269
273 TDEIconButton(TDEIconLoader *loader, TQWidget *parent, const char *name=0L);
277 ~TDEIconButton();
278
284 void setStrictIconSize(bool b);
288 bool strictIconSize() const;
289
294 void setIconType(TDEIcon::Group group, TDEIcon::Context context, bool user=false);
295
299 void setIcon(const TQString& icon);
300
304 void resetIcon();
305
309 TQString icon() const { return mIcon; }
310
316 void setIconSize( int size );
317
322 int iconSize() const;
323
324signals:
328 void iconChanged(TQString icon);
329 /* KDE 4: Make it const TQString & */
330
331private slots:
332 void slotChangeIcon();
333 void newIconName(const TQString& name);
334
335private:
336 void init( TDEIconLoader *loader );
337
338 bool mbUser;
339 TDEIcon::Group mGroup;
340 TDEIcon::Context mContext;
341
342 TQString mIcon;
343 TDEIconDialog *mpDialog;
344 TDEIconLoader *mpLoader;
345 class TDEIconButtonPrivate;
346 TDEIconButtonPrivate *d;
347};
348
349
350#endif // __TDEIconDialog_h__
TDEIconButton
A pushbutton for choosing an icon.
Definition: kicondialog.h:258
TDEIconButton::icon
TQString icon() const
Returns the name of the selected icon.
Definition: kicondialog.h:309
TDEIconButton::iconChanged
void iconChanged(TQString icon)
Emitted when the icon has changed.
TDEIconCanvas
Icon canvas for TDEIconDialog.
Definition: kicondialog.h:36
TDEIconCanvas::nameChanged
void nameChanged(TQString)
Emitted when the current icon has changed.
TDEIconDialog
Dialog for interactive selection of icons.
Definition: kicondialog.h:92

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

tdeio/tdefile

Skip menu "tdeio/tdefile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdefile by doxygen 1.9.4
This website is maintained by Timothy Pearson.