20#ifndef KFORMDESIGNERPIXMAPCOLLECTION_H
21#define KFORMDESIGNERPIXMAPCOLLECTION_H
27#include <tqtoolbutton.h>
29#include <kicontheme.h>
30#include <kdialogbase.h>
40typedef TQMap<TQString, TQPair<TQString, int> > PixmapMap;
49 PixmapCollection( const TQString &collectionName, TQObject *parent = 0, const char *name = 0);
52 TQString addPixmapPath( const KURL &url);
53 TQString addPixmapName( const TQString &name, int size = TDEIcon::SizeMedium);
54 void removePixmap( const TQString &name);
56 bool contains( const TQString &name);
57 TQPixmap getPixmap( const TQString &name);
59 void save(TQDomNode parentNode);
60 void load(TQDomNode node);
62 TQString collectionName() { return m_name; }
65 void itemRenamed( const TQString &oldName, const TQString &newName);
66 void itemRemoved( const TQString &name);
72 friend class PixmapCollectionEditor;
73 friend class PixmapCollectionChooser;
87 TQPixmap getPixmap( const TQString &name);
88 void createIconViewItem( const TQString &name);
95 void renameCollectionItem(TQIconViewItem *item, const TQString &name);
96 void displayMenu(TQIconViewItem *item, const TQPoint &p);
99 enum { BNewItemPath = 101, BNewItemName, BDelItem};
100 TDEIconView *m_iconView;
101 TQIntDict<TQToolButton> m_buttons;
106class KEXIEXTWIDGETS_EXPORT PixmapCollectionChooser : public KDialogBase
112 PixmapCollectionChooser( PixmapCollection *collection, const TQString &selectedItem, TQWidget *parent = 0);
113 ~PixmapCollectionChooser() {;}
116 TQString pixmapName();
119 TQPixmap getPixmap( const TQString &name);
121 virtual void slotUser1();
125 TDEIconView *m_iconView;
129class KEXIEXTWIDGETS_EXPORT LoadIconDialog : public KDialogBase
135 LoadIconDialog(TQWidget *parent = 0);
136 ~LoadIconDialog() {;}
142 void changeIconSize( int);
143 void updateIconName(TQString);
144 void setIcon( const TQString &);
147 KLineEdit *m_nameInput;
148 TDEIconButton *m_button;
152class KEXIEXTWIDGETS_EXPORT PixmapIconViewItem : public TDEIconViewItem
155 PixmapIconViewItem(TDEIconView *parent, const TQString &text, const TQPixmap &icon)
156 : TDEIconViewItem(parent, text, icon) { m_name = text; }
157 ~PixmapIconViewItem() {;}
159 void setName( const TQString &name) { m_name = name; }
160 TQString name() { return m_name;}
PixmapCollectionEditor(PixmapCollection *collection, TQWidget *parent=0) Pixmap Collection Editor Dialog.
A class that store pixmaps (by path or by name for KDE icons).
PixmapCollection(const TQString &collectionName, TQObject *parent=0, const char *name=0) Pixmap Collection.
|