diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/widget/pixmapcollection.h | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/widget/pixmapcollection.h')
-rw-r--r-- | kexi/widget/pixmapcollection.h | 84 |
1 files changed, 44 insertions, 40 deletions
diff --git a/kexi/widget/pixmapcollection.h b/kexi/widget/pixmapcollection.h index a46a2043..53637e28 100644 --- a/kexi/widget/pixmapcollection.h +++ b/kexi/widget/pixmapcollection.h @@ -20,52 +20,53 @@ #ifndef KFORMDESIGNERPIXMAPCOLLECTION_H #define KFORMDESIGNERPIXMAPCOLLECTION_H -#include <qobject.h> -#include <qmap.h> -#include <qpair.h> -#include <qintdict.h> -#include <qtoolbutton.h> +#include <tqobject.h> +#include <tqmap.h> +#include <tqpair.h> +#include <tqintdict.h> +#include <tqtoolbutton.h> #include <kicontheme.h> #include <kdialogbase.h> #include <kiconview.h> #include <kurl.h> -class QPixmap; +class TQPixmap; class KIconView; class KIconButton; class KLineEdit; -class QDomNode; +class TQDomNode; -typedef QMap<QString, QPair<QString, int> > PixmapMap; +typedef TQMap<TQString, TQPair<TQString, int> > PixmapMap; //! A class that store pixmaps (by path or by name for KDE icons) -class KEXIEXTWIDGETS_EXPORT PixmapCollection : public QObject +class KEXIEXTWIDGETS_EXPORT PixmapCollection : public TQObject { Q_OBJECT + TQ_OBJECT public: - PixmapCollection(const QString &collectionName, QObject *parent = 0, const char *name = 0); + PixmapCollection(const TQString &collectionName, TQObject *tqparent = 0, const char *name = 0); ~PixmapCollection() {;} - QString addPixmapPath(const KURL &url); - QString addPixmapName(const QString &name, int size = KIcon::SizeMedium); - void removePixmap(const QString &name); + TQString addPixmapPath(const KURL &url); + TQString addPixmapName(const TQString &name, int size = KIcon::SizeMedium); + void removePixmap(const TQString &name); - bool contains(const QString &name); - QPixmap getPixmap(const QString &name); + bool tqcontains(const TQString &name); + TQPixmap getPixmap(const TQString &name); - void save(QDomNode parentNode); - void load(QDomNode node); + void save(TQDomNode tqparentNode); + void load(TQDomNode node); - QString collectionName() {return m_name; } + TQString collectionName() {return m_name; } signals: - void itemRenamed(const QString &oldName, const QString &newName); - void itemRemoved(const QString &name); + void itemRenamed(const TQString &oldName, const TQString &newName); + void itemRemoved(const TQString &name); protected: - QString m_name; + TQString m_name; PixmapMap m_pixmaps; friend class PixmapCollectionEditor; @@ -76,27 +77,28 @@ class KEXIEXTWIDGETS_EXPORT PixmapCollection : public QObject class KEXIEXTWIDGETS_EXPORT PixmapCollectionEditor : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PixmapCollectionEditor(PixmapCollection *collection, QWidget *parent = 0); + PixmapCollectionEditor(PixmapCollection *collection, TQWidget *tqparent = 0); ~PixmapCollectionEditor() {;} protected: - QPixmap getPixmap(const QString &name); - void createIconViewItem(const QString &name); + TQPixmap getPixmap(const TQString &name); + void createIconViewItem(const TQString &name); protected slots: void newItemByPath(); void newItemByName(); void removeItem(); void renameItem(); - void renameCollectionItem(QIconViewItem *item, const QString &name); - void displayMenu(QIconViewItem *item, const QPoint &p); + void renameCollectionItem(TQIconViewItem *item, const TQString &name); + void displayMenu(TQIconViewItem *item, const TQPoint &p); private: enum { BNewItemPath = 101, BNewItemName, BDelItem}; KIconView *m_iconView; - QIntDict<QToolButton> m_buttons; + TQIntDict<TQToolButton> m_buttons; PixmapCollection *m_collection; }; @@ -104,16 +106,17 @@ class KEXIEXTWIDGETS_EXPORT PixmapCollectionEditor : public KDialogBase class KEXIEXTWIDGETS_EXPORT PixmapCollectionChooser : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - PixmapCollectionChooser(PixmapCollection *collection, const QString &selectedItem, QWidget *parent = 0); + PixmapCollectionChooser(PixmapCollection *collection, const TQString &selectedItem, TQWidget *tqparent = 0); ~PixmapCollectionChooser() {;} - QPixmap pixmap(); - QString pixmapName(); + TQPixmap pixmap(); + TQString pixmapName(); protected: - QPixmap getPixmap(const QString &name); + TQPixmap getPixmap(const TQString &name); protected slots: virtual void slotUser1(); @@ -126,18 +129,19 @@ class KEXIEXTWIDGETS_EXPORT PixmapCollectionChooser : public KDialogBase class KEXIEXTWIDGETS_EXPORT LoadIconDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LoadIconDialog(QWidget *parent = 0); + LoadIconDialog(TQWidget *tqparent = 0); ~LoadIconDialog() {;} int iconSize(); - QString iconName(); + TQString iconName(); protected slots: void changeIconSize(int); - void updateIconName(QString); - void setIcon(const QString &); + void updateIconName(TQString); + void setIcon(const TQString &); private: KLineEdit *m_nameInput; @@ -148,15 +152,15 @@ class KEXIEXTWIDGETS_EXPORT LoadIconDialog : public KDialogBase class KEXIEXTWIDGETS_EXPORT PixmapIconViewItem : public KIconViewItem { public: - PixmapIconViewItem(KIconView *parent, const QString &text, const QPixmap &icon) - : KIconViewItem(parent, text, icon) { m_name = text; } + PixmapIconViewItem(KIconView *tqparent, const TQString &text, const TQPixmap &icon) + : KIconViewItem(tqparent, text, icon) { m_name = text; } ~PixmapIconViewItem() {;} - void setName(const QString &name) { m_name = name; } - QString name() { return m_name;} + void setName(const TQString &name) { m_name = name; } + TQString name() { return m_name;} private: - QString m_name; + TQString m_name; }; #endif |