• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kio/kfile
 

kio/kfile

  • kio
  • kfile
kicondialog.h
1 /* vi: ts=8 sts=4 sw=4
2  *
3  * This file is part of the KDE project, module kfile.
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 __KIconDialog_h__
15 #define __KIconDialog_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 
25 class TQComboBox;
26 class TQTimer;
27 class TQKeyEvent;
28 class TQRadioButton;
29 class KProgress;
30 class KIconLoader;
31 
35 class KIO_EXPORT KIconCanvas: public KIconView
36 {
37  Q_OBJECT
38 
39 public:
40  KIconCanvas(TQWidget *parent=0L, const char *name=0L);
41  ~KIconCanvas();
42 
46  void loadFiles(const TQStringList& files);
47 
51  TQString getCurrent() const;
52 
53 public slots:
54  void stopLoading();
55 
56 signals:
60  void nameChanged(TQString);
61  /* KDE 4: Make it const TQString & */
62 
63  void startLoading(int);
64  void progress(int);
65  void finished();
66 
67 private slots:
68  void slotLoadFiles();
69  void slotCurrentChanged(TQIconViewItem *item);
70 
71 private:
72  TQStringList mFiles;
73  TQTimer *mpTimer;
74  KIconLoader *mpLoader; // unused
75 
76 protected:
77  virtual void virtual_hook( int id, void* data );
78 
79 private:
80  class KIconCanvasPrivate;
81  KIconCanvasPrivate *d;
82 };
83 
84 
91 class KIO_EXPORT KIconDialog: public KDialogBase
92 {
93  Q_OBJECT
94 
95 public:
99  KIconDialog(TQWidget *parent=0L, const char *name=0L);
103  KIconDialog(KIconLoader *loader, TQWidget *parent=0,
104  const char *name=0);
108  ~KIconDialog();
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
141 
144  TQString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context
145  context=KIcon::Application, bool user=false);
146 #endif
147 
152  void setup( KIcon::Group group,
153  KIcon::Context context = KIcon::Application,
154  bool strictIconSize = false, int iconSize = 0,
155  bool user = false );
156 
166  void setup( KIcon::Group group, KIcon::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(KIcon::Group group=KIcon::Desktop,
204  KIcon::Context context=KIcon::Application,
205  bool strictIconSize=false, int iconSize = 0,
206  bool user=false, TQWidget *parent=0,
207  const TQString &caption=TQString::null);
208 
209 signals:
210  void newIconName(const TQString&);
211 
212 protected slots:
213  void slotOk();
214 
215 private slots:
216  void slotButtonClicked(int);
217  void slotContext(int);
218  void slotStartLoading(int);
219  void slotProgress(int);
220  void slotFinished();
221  void slotAcceptIcons();
222 private:
223  void init();
224  void showIcons();
225  void setContext( KIcon::Context context );
226 
227  int mGroupOrSize;
228  KIcon::Context mContext;
229  int mType;
230 
231  TQStringList mFileList;
232  TQComboBox *mpCombo;
233  TQPushButton *mpBrowseBut;
234  TQRadioButton *mpRb1, *mpRb2;
235  KProgress *mpProgress;
236  KIconLoader *mpLoader;
237  KIconCanvas *mpCanvas;
238  int mNumContext;
239  KIcon::Context mContextMap[ 12 ]; // must match KIcon::Context size, code has assert
240 
241 protected:
242  virtual void virtual_hook( int id, void* data );
243 private:
244  class KIconDialogPrivate;
245  KIconDialogPrivate *d;
246 };
247 
248 
257 class KIO_EXPORT KIconButton: public TQPushButton
258 {
259  Q_OBJECT
260  Q_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon )
261  Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize)
262  Q_PROPERTY( bool strictIconSize READ strictIconSize WRITE setStrictIconSize )
263 
264 public:
268  KIconButton(TQWidget *parent=0L, const char *name=0L);
269 
273  KIconButton(KIconLoader *loader, TQWidget *parent, const char *name=0L);
277  ~KIconButton();
278 
284  void setStrictIconSize(bool b);
288  bool strictIconSize() const;
289 
294  void setIconType(KIcon::Group group, KIcon::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 
324 signals:
328  void iconChanged(TQString icon);
329  /* KDE 4: Make it const TQString & */
330 
331 private slots:
332  void slotChangeIcon();
333  void newIconName(const TQString& name);
334 
335 private:
336  void init( KIconLoader *loader );
337 
338  bool mbUser;
339  KIcon::Group mGroup;
340  KIcon::Context mContext;
341 
342  TQString mIcon;
343  KIconDialog *mpDialog;
344  KIconLoader *mpLoader;
345  class KIconButtonPrivate;
346  KIconButtonPrivate *d;
347 };
348 
349 
350 #endif // __KIconDialog_h__
KIconButton::icon
TQString icon() const
Returns the name of the selected icon.
Definition: kicondialog.h:309
KIconButton
A pushbutton for choosing an icon.
Definition: kicondialog.h:257
KIconDialog
Dialog for interactive selection of icons.
Definition: kicondialog.h:91
KIconCanvas
Icon canvas for KIconDialog.
Definition: kicondialog.h:35

kio/kfile

Skip menu "kio/kfile"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

kio/kfile

Skip menu "kio/kfile"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kio/kfile by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |