diff options
Diffstat (limited to 'lib/kofficeui/KoTemplateChooseDia.h')
-rw-r--r-- | lib/kofficeui/KoTemplateChooseDia.h | 103 |
1 files changed, 53 insertions, 50 deletions
diff --git a/lib/kofficeui/KoTemplateChooseDia.h b/lib/kofficeui/KoTemplateChooseDia.h index 41389b20..98188ad1 100644 --- a/lib/kofficeui/KoTemplateChooseDia.h +++ b/lib/kofficeui/KoTemplateChooseDia.h @@ -34,7 +34,7 @@ class KoTCDIconViewItem; class KoTemplateTree; class KoTemplateGroup; -class QGridLayout; +class TQGridLayout; /** * Our reimplementation of KIconCanvas used within the template-chooser dialog. @@ -43,15 +43,16 @@ class QGridLayout; class KoTCDIconCanvas : public KIconCanvas { Q_OBJECT + TQ_OBJECT public: - KoTCDIconCanvas( QWidget *parent = 0, const char *name = 0L ) - : KIconCanvas( parent, name ) {} + KoTCDIconCanvas( TQWidget *tqparent = 0, const char *name = 0L ) + : KIconCanvas( tqparent, name ) {} bool isCurrentValid() { return currentItem(); } - QIconViewItem * load(KoTemplateGroup *group, const QString& name, KInstance* instance); + TQIconViewItem * load(KoTemplateGroup *group, const TQString& name, KInstance* instance); protected: - virtual void keyPressEvent( QKeyEvent *e ) { + virtual void keyPressEvent( TQKeyEvent *e ) { if ( e->key() == Key_Return || e->key() == Key_Enter ) e->ignore(); else @@ -63,29 +64,29 @@ class KoTCDIconCanvas : public KIconCanvas class KoTCDIconViewItem : public KIconViewItem { public: - KoTCDIconViewItem(QIconView *parent=0) - : KIconViewItem ( parent ) + KoTCDIconViewItem(TQIconView *tqparent=0) + : KIconViewItem ( tqparent ) {} - KoTCDIconViewItem(QIconView *parent=0, const QString &text=0, const QPixmap &icon=0, - const QString &descr=0, const QString &fullname=0) - : KIconViewItem(parent, text, icon) + KoTCDIconViewItem(TQIconView *tqparent=0, const TQString &text=0, const TQPixmap &icon=0, + const TQString &descr=0, const TQString &fullname=0) + : KIconViewItem(tqparent, text, icon) { m_descr = descr; m_full = fullname; } - QString getDescr() const { return m_descr; } - QString getFName() const { return m_full; } + TQString getDescr() const { return m_descr; } + TQString getFName() const { return m_full; } private : - QString m_descr; - QString m_full; + TQString m_descr; + TQString m_full; }; #include <kfileiconview.h> -#include <qlabel.h> +#include <tqlabel.h> /** * Our reimplementation of KFileIconView used as the "recent files" view * within the template-chooser dialog. @@ -93,27 +94,28 @@ class KoTCDIconViewItem : public KIconViewItem */ class KoTCDRecentFilesIconView : public KFileIconView { Q_OBJECT + TQ_OBJECT public: - KoTCDRecentFilesIconView( QWidget* parent, const char* name ) : - KFileIconView( parent, name ), toolTip(0) + KoTCDRecentFilesIconView( TQWidget* tqparent, const char* name ) : + KFileIconView( tqparent, name ), toolTip(0) { - connect( this, SIGNAL( onItem( QIconViewItem * ) ), - SLOT( showToolTip( QIconViewItem * ) ) ); - connect( this, SIGNAL( onViewport() ), - SLOT( removeToolTip() ) ); + connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ), + TQT_SLOT( showToolTip( TQIconViewItem * ) ) ); + connect( this, TQT_SIGNAL( onViewport() ), + TQT_SLOT( removeToolTip() ) ); } virtual ~KoTCDRecentFilesIconView(); protected: /** * Reimplemented to remove an eventual tooltip */ - virtual void hideEvent( QHideEvent * ); + virtual void hideEvent( TQHideEvent * ); private slots: - void showToolTip( QIconViewItem* ); + void showToolTip( TQIconViewItem* ); void removeToolTip(); private: - QLabel* toolTip; + TQLabel* toolTip; }; class KInstance; @@ -131,6 +133,7 @@ class KoTemplateChooseDiaPrivate; class KOFFICEUI_EXPORT KoTemplateChooseDia : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** @@ -165,33 +168,33 @@ public: * @param dialogType the type of the dialog * @param templateType the template type of your application (see kword or * kpresenter for details) - * @param parent pointer to parent widget + * @param tqparent pointer to tqparent widget * @return The return type (see above) */ - static ReturnType choose(KInstance* instance, QString &file, + static ReturnType choose(KInstance* instance, TQString &file, const DialogType &dialogType, - const QCString& templateType, - QWidget* parent); + const TQCString& templateType, + TQWidget* tqparent); private: /// Ditto, with extraNativeMimeTypes added - static ReturnType choose(KInstance* instance, QString &file, - const QCString &format, - const QString &nativeName, - const QStringList& extraNativeMimeTypes, + static ReturnType choose(KInstance* instance, TQString &file, + const TQCString &format, + const TQString &nativeName, + const TQStringList& extraNativeMimeTypes, const DialogType &dialogType=Everything, - const QCString& templateType="", - QWidget* parent = 0); + const TQCString& templateType="", + TQWidget* tqparent = 0); public: /** * Method to get the current template */ - QString getTemplate() const; + TQString getTemplate() const; /** * Method to get the "full" template (path+template) */ - QString getFullTemplate() const; + TQString getFullTemplate() const; /** * The ReturnType (call this one after exec()) */ @@ -210,8 +213,8 @@ protected slots: private: /** * - * @param parent parent the parent of the dialog - * @param name the Qt internal name + * @param tqparent tqparent the tqparent of the dialog + * @param name the TQt internal name * @param instance the KInstance of your app * @param format is the mimetype of the app (e.g. application/x-kspread) * @param nativeName is the name of your app (e.g KSpread) @@ -221,29 +224,29 @@ private: * * @return The return type (see above) */ - KoTemplateChooseDia(QWidget *parent, const char *name, KInstance* instance, - const QCString &format, - const QString &nativeName, - const QStringList &extraNativeMimeTypes, + KoTemplateChooseDia(TQWidget *tqparent, const char *name, KInstance* instance, + const TQCString &format, + const TQString &nativeName, + const TQStringList &extraNativeMimeTypes, const DialogType &dialogType=Everything, - const QCString& templateType=""); + const TQCString& templateType=""); private: KoTemplateChooseDiaPrivate *d; - QString descriptionText(const QString &name, const QString &description); + TQString descriptionText(const TQString &name, const TQString &description); void setupDialog(); - void setupTemplateDialog(QWidget * widgetbase, QGridLayout * layout); - void setupFileDialog(QWidget * widgetbase, QGridLayout * layout); - void setupRecentDialog(QWidget * widgetbase, QGridLayout * layout); + void setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); + void setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); + void setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); bool collectInfo(); bool noStartupDlg() const; private slots: - void chosen(QIconViewItem *); - void currentChanged( QIconViewItem * ); - void recentSelected( QIconViewItem * ); + void chosen(TQIconViewItem *); + void currentChanged( TQIconViewItem * ); + void recentSelected( TQIconViewItem * ); }; #endif |