diff options
Diffstat (limited to 'src/modules/aliaseditor/aliaseditor.h')
-rw-r--r-- | src/modules/aliaseditor/aliaseditor.h | 116 |
1 files changed, 59 insertions, 57 deletions
diff --git a/src/modules/aliaseditor/aliaseditor.h b/src/modules/aliaseditor/aliaseditor.h index fa49fc96..570fe943 100644 --- a/src/modules/aliaseditor/aliaseditor.h +++ b/src/modules/aliaseditor/aliaseditor.h @@ -29,13 +29,13 @@ #include "kvi_pointerlist.h" -#include <qwidget.h> +#include <tqwidget.h> #include "kvi_tal_listview.h" -#include <qlineedit.h> +#include <tqlineedit.h> #include "kvi_tal_popupmenu.h" -#include <qstringlist.h> -#include <qpushbutton.h> -#include <qlabel.h> +#include <tqstringlist.h> +#include <tqpushbutton.h> +#include <tqlabel.h> class KviScriptEditor; class KviAliasNamespaceListViewItem; @@ -46,22 +46,22 @@ class KviAliasEditorListViewItem : public KviTalListViewItem public: enum Type { Alias, Namespace }; public: - KviAliasEditorListViewItem(KviTalListView * pListView,Type eType,const QString &szName); - KviAliasEditorListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,Type eType,const QString &szName); + KviAliasEditorListViewItem(KviTalListView * pListView,Type eType,const TQString &szName); + KviAliasEditorListViewItem(KviAliasNamespaceListViewItem * pParentNamespaceItem,Type eType,const TQString &szName); ~KviAliasEditorListViewItem(){}; protected: Type m_eType; KviAliasNamespaceListViewItem * m_pParentNamespaceItem; - QString m_szName; + TQString m_szName; public: - const QString & name(){ return m_szName; }; - void setName(const QString &szName); + const TQString & name(){ return m_szName; }; + void setName(const TQString &szName); Type type(){ return m_eType; }; bool isAlias(){ return m_eType == Alias; }; bool isNamespace(){ return m_eType == Namespace; }; void setParentNamespaceItem(KviAliasNamespaceListViewItem* it){ m_pParentNamespaceItem=it; }; - KviAliasNamespaceListViewItem * parentNamespaceItem(){ return m_pParentNamespaceItem; }; - virtual QString key(int column,bool bAsc) const; + KviAliasNamespaceListViewItem * tqparentNamespaceItem(){ return m_pParentNamespaceItem; }; + virtual TQString key(int column,bool bAsc) const; }; class KviAliasListViewItem; @@ -69,54 +69,55 @@ class KviAliasListViewItem; class KviAliasNamespaceListViewItem : public KviAliasEditorListViewItem { public: - KviAliasNamespaceListViewItem(KviTalListView * pListView,const QString &szName); - KviAliasNamespaceListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const QString &szName); + KviAliasNamespaceListViewItem(KviTalListView * pListView,const TQString &szName); + KviAliasNamespaceListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const TQString &szName); ~KviAliasNamespaceListViewItem(){}; public: - KviAliasNamespaceListViewItem * findNamespaceItem(const QString &szName); - KviAliasNamespaceListViewItem * getNamespaceItem(const QString &szName); - KviAliasListViewItem * findAliasItem(const QString &szName); - KviAliasListViewItem * getAliasItem(const QString &szName); - KviAliasListViewItem * createFullAliasItem(const QString &szFullName); - KviAliasNamespaceListViewItem * createFullNamespaceItem(const QString &szFullName); + KviAliasNamespaceListViewItem * findNamespaceItem(const TQString &szName); + KviAliasNamespaceListViewItem * getNamespaceItem(const TQString &szName); + KviAliasListViewItem * findAliasItem(const TQString &szName); + KviAliasListViewItem * getAliasItem(const TQString &szName); + KviAliasListViewItem * createFullAliasItem(const TQString &szFullName); + KviAliasNamespaceListViewItem * createFullNamespaceItem(const TQString &szFullName); }; class KviAliasListViewItem : public KviAliasEditorListViewItem { public: - KviAliasListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const QString &szName); - KviAliasListViewItem(KviTalListView *pListView,const QString &szName); + KviAliasListViewItem(KviAliasNamespaceListViewItem * pParentNamespace,const TQString &szName); + KviAliasListViewItem(KviTalListView *pListView,const TQString &szName); ~KviAliasListViewItem(){}; public: - QString m_szBuffer; - QPoint m_cPos; + TQString m_szBuffer; + TQPoint m_cPos; public: - const QString & buffer(){ return m_szBuffer; }; - const QPoint & cursorPosition(){ return m_cPos; }; - void setBuffer(const QString &szBuffer){ m_szBuffer = szBuffer; }; - void setCursorPosition(const QPoint &cPos){ m_cPos = cPos; }; + const TQString & buffer(){ return m_szBuffer; }; + const TQPoint & cursorPosition(){ return m_cPos; }; + void setBuffer(const TQString &szBuffer){ m_szBuffer = szBuffer; }; + void setCursorPosition(const TQPoint &cPos){ m_cPos = cPos; }; }; -class QSplitter; +class TQSplitter; -class KviAliasEditor : public QWidget +class KviAliasEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KviAliasEditor(QWidget * par); + KviAliasEditor(TQWidget * par); ~KviAliasEditor(); public: KviScriptEditor * m_pEditor; KviTalListView * m_pListView; - QLabel * m_pNameLabel; - QPushButton * m_pRenameButton; + TQLabel * m_pNameLabel; + TQPushButton * m_pRenameButton; KviAliasEditorListViewItem * m_pLastEditedItem; KviAliasEditorListViewItem * m_pLastClickedItem; //KviAliasListViewItem * m_pLastEditedItem; KviTalPopupMenu * m_pContextPopup; - QSplitter * m_pSplitter; - QString m_szDir; + TQSplitter * m_pSplitter; + TQString m_szDir; public: //bool modified(){ return m_bModified; }; void commit(); @@ -125,7 +126,7 @@ public: void saveProperties(KviConfig *); void loadProperties(KviConfig *); - static void splitFullAliasOrNamespaceName(const QString &szFullName,QStringList &lNamespaces,QString &szName); + static void splitFullAliasOrNamespaceName(const TQString &szFullName,TQStringList &lNamespaces,TQString &szName); protected slots: void currentItemChanged(KviTalListViewItem *it); void newAlias(); @@ -134,57 +135,58 @@ protected slots: void exportSelectedSepFiles(); void exportSelected(); void removeSelectedItems(); - void itemPressed(KviTalListViewItem *it,const QPoint &pnt,int col); + void itemPressed(KviTalListViewItem *it,const TQPoint &pnt,int col); void renameItem(); void slotFind(); void slotCollapseNamespaces(); - void slotFindWord(const QString &); - void slotReplaceAll(const QString &before,const QString &after); + void slotFindWord(const TQString &); + void slotReplaceAll(const TQString &before,const TQString &after); protected: -// QString const & findWord(const QString &txt,bool); +// TQString const & findWord(const TQString &txt,bool); void recursiveCollapseNamespaces(KviAliasEditorListViewItem * it); - void recursiveSearchReplace(const QString &szSearch,KviAliasEditorListViewItem * it,bool bReplace=false,const QString &szReplace="n"); + void recursiveSearchReplace(const TQString &szSearch,KviAliasEditorListViewItem * it,bool bReplace=false,const TQString &szReplace="n"); void recursiveCommit(KviAliasEditorListViewItem * it); - void getExportAliasBuffer(QString &buffer,KviAliasListViewItem * it); + void getExportAliasBuffer(TQString &buffer,KviAliasListViewItem * it); void oneTimeSetup(); void selectOneItem(KviTalListViewItem * it,KviTalListViewItem *pStartFrom); void saveLastEditedItem(); - void getUniqueItemName(KviAliasEditorListViewItem *item,QString &buffer,KviAliasEditorListViewItem::Type eType); + void getUniqueItemName(KviAliasEditorListViewItem *item,TQString &buffer,KviAliasEditorListViewItem::Type eType); void appendSelectedItems(KviPointerList<KviAliasEditorListViewItem> * l,KviAliasEditorListViewItem * pStartFrom,bool bIncludeChildrenOfSelected = false); void appendAliasItems(KviPointerList<KviAliasListViewItem> * l,KviAliasEditorListViewItem * pStartFrom,bool bSelectedOnly); void appendNamespaceItems(KviPointerList<KviAliasListViewItem> * l,KviAliasEditorListViewItem * pStartFrom,bool bSelectedOnly); bool removeItem(KviAliasEditorListViewItem *it,bool * pbYesToAll,bool bDeleteEmptyTree); void openParentItems(KviTalListViewItem * it); void activateItem(KviTalListViewItem * it); - QString askForAliasName(const QString &szAction,const QString &szText,const QString &szInitialText); - QString askForNamespaceName(const QString &szAction,const QString &szText,const QString &szInitialText); + TQString askForAliasName(const TQString &szAction,const TQString &szText,const TQString &szInitialText); + TQString askForNamespaceName(const TQString &szAction,const TQString &szText,const TQString &szInitialText); bool itemExists(KviTalListViewItem *pSearchFor,KviTalListViewItem * pSearchAt); - bool namespaceExists(QString &szFullItemName); - bool aliasExists(QString &szFullItemName); + bool namespaceExists(TQString &szFullItemName); + bool aliasExists(TQString &szFullItemName); bool hasSelectedItems(KviTalListViewItem * it); - KviAliasNamespaceListViewItem * findNamespaceItem(const QString &szName); - KviAliasNamespaceListViewItem * getNamespaceItem(const QString &szName); - KviAliasListViewItem * findAliasItem(const QString &szName); - KviAliasListViewItem * getAliasItem(const QString &szName); - KviAliasListViewItem * createFullAliasItem(const QString &szFullName); - KviAliasNamespaceListViewItem * createFullNamespaceItem(const QString &szFullName); - QString buildFullItemName(KviAliasEditorListViewItem * it); + KviAliasNamespaceListViewItem * findNamespaceItem(const TQString &szName); + KviAliasNamespaceListViewItem * getNamespaceItem(const TQString &szName); + KviAliasListViewItem * findAliasItem(const TQString &szName); + KviAliasListViewItem * getAliasItem(const TQString &szName); + KviAliasListViewItem * createFullAliasItem(const TQString &szFullName); + KviAliasNamespaceListViewItem * createFullNamespaceItem(const TQString &szFullName); + TQString buildFullItemName(KviAliasEditorListViewItem * it); }; class KviAliasEditorWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: KviAliasEditorWindow(KviFrame * lpFrm); ~KviAliasEditorWindow(); protected: KviAliasEditor * m_pEditor; - QWidget * m_pBase; + TQWidget * m_pBase; protected: - virtual QPixmap * myIconPtr(); - virtual void resizeEvent(QResizeEvent *e); + virtual TQPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); virtual void getConfigGroupName(KviStr &szName); virtual void saveProperties(KviConfig *); virtual void loadProperties(KviConfig *); |