diff options
Diffstat (limited to 'src/modules/window')
-rw-r--r-- | src/modules/window/libkviwindow.cpp | 94 | ||||
-rw-r--r-- | src/modules/window/userwindow.cpp | 12 | ||||
-rw-r--r-- | src/modules/window/userwindow.h | 7 |
3 files changed, 57 insertions, 56 deletions
diff --git a/src/modules/window/libkviwindow.cpp b/src/modules/window/libkviwindow.cpp index abef0dd9..1b46d366 100644 --- a/src/modules/window/libkviwindow.cpp +++ b/src/modules/window/libkviwindow.cpp @@ -42,7 +42,7 @@ #include "userwindow.h" #include "kvi_pointerhashtable.h" -#include <qtimer.h> +#include <tqtimer.h> #ifdef COMPILE_CRYPT_SUPPORT @@ -62,7 +62,7 @@ KviPointerList<KviUserWindow> * g_pUserWindowList = 0; #define GET_KVS_WINDOW_ID \ - QString szWnd; \ + TQString szWnd; \ KviWindow * pWnd; \ KVSM_PARAMETERS_BEGIN(c) \ KVSM_PARAMETER("window_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWnd) \ @@ -81,7 +81,7 @@ KviPointerList<KviUserWindow> * g_pUserWindowList = 0; } #define GET_KVS_FNC_WINDOW_ID \ - QString szWnd; \ + TQString szWnd; \ KviWindow * pWnd; \ KVSM_PARAMETERS_BEGIN(c) \ KVSM_PARAMETER("window_id",KVS_PT_STRING,KVS_PF_OPTIONAL,szWnd) \ @@ -597,7 +597,7 @@ static bool window_kvs_fnc_console(KviKvsModuleFunctionCall * c) GET_KVS_FNC_WINDOW_ID if(pWnd) { - c->returnValue()->setInteger(pWnd->console() ? QString(pWnd->console()->id()).toInt() : 0); + c->returnValue()->setInteger(pWnd->console() ? TQString(pWnd->console()->id()).toInt() : 0); } return true; } @@ -836,8 +836,8 @@ static bool window_kvs_cmd_listtypes(KviKvsModuleCommandCall * c) static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { - QString szType; - QString szContext; + TQString szType; + TQString szContext; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("type",KVS_PT_STRING,0,szType) @@ -854,10 +854,10 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) int id=0; - if(KviQString::equalCI(szContext,"all")) + if(KviTQString::equalCI(szContext,"all")) { // all contexts but no "no_context" windows - bool bAllWindows = KviQString::equalCI(szType,"all"); + bool bAllWindows = KviTQString::equalCI(szType,"all"); KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -866,43 +866,43 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } } ++it; } - } else if(KviQString::equalCI(szContext,"any")) + } else if(KviTQString::equalCI(szContext,"any")) { // all contexts and also "no_context" windows - bool bAllWindows = KviQString::equalCI(szType.lower(),"all"); + bool bAllWindows = KviTQString::equalCI(szType.lower(),"all"); KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } ++it; } - } else if(KviQString::equalCI(szContext,"none")) + } else if(KviTQString::equalCI(szContext,"none")) { // only "no_context" windows - bool bAllWindows = KviQString::equalCI(szType.lower(),"all"); + bool bAllWindows = KviTQString::equalCI(szType.lower(),"all"); KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -911,12 +911,12 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } @@ -947,7 +947,7 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) uId = c->window()->console()->ircContextId(); } - bool bAllWindows = KviQString::equalCI(szType.lower(),"all"); + bool bAllWindows = KviTQString::equalCI(szType.lower(),"all"); KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict); while(KviWindow * wnd = it.current()) @@ -958,12 +958,12 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) { if(bAllWindows) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } else { if(szType.lower()==wnd->typeString()) { - pArray->set(id, new KviKvsVariant(QString(wnd->id()))); + pArray->set(id, new KviKvsVariant(TQString(wnd->id()))); id++; } } @@ -1020,8 +1020,8 @@ static bool window_kvs_fnc_list(KviKvsModuleFunctionCall * c) static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) { - QString szFlags; - QString szCaption; + TQString szFlags; + TQString szCaption; kvs_uint_t uCtx; kvs_int_t iIcon; @@ -1034,13 +1034,13 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) iIcon = iIcon % KVI_NUM_SMALL_ICONS; int iFlags = 0; - if(szFlags.contains('i'))iFlags |= KviUserWindow::HasInput; + if(szFlags.tqcontains('i'))iFlags |= KviUserWindow::HasInput; KviConsole * pConsole = 0; if(c->parameterList()->count() >= 3) { pConsole = g_pApp->findConsole(uCtx); - if(!pConsole && !szFlags.contains('q')) + if(!pConsole && !szFlags.tqcontains('q')) { c->warning(__tr2qs("The specified IRC context is not valid: creating a context free window")); } @@ -1053,10 +1053,10 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) pConsole, iFlags); - c->window()->frame()->addWindow(wnd,!szFlags.contains('m')); - if(szFlags.contains('m'))wnd->minimize(); + c->window()->frame()->addWindow(wnd,!szFlags.tqcontains('m')); + if(szFlags.tqcontains('m'))wnd->minimize(); - c->returnValue()->setInteger(QString(wnd->id()).toUInt()); + c->returnValue()->setInteger(TQString(wnd->id()).toUInt()); return true; } @@ -1092,10 +1092,10 @@ static bool window_kvs_fnc_open(KviKvsModuleFunctionCall * c) static bool window_kvs_cmd_setCaption(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szPlain; - QString szInactive; - QString szActive; + TQString szWnd; + TQString szPlain; + TQString szInactive; + TQString szActive; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1142,8 +1142,8 @@ static bool window_kvs_cmd_setCaption(KviKvsModuleCommandCall * c) static bool window_kvs_cmd_setInputText(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szText; + TQString szWnd; + TQString szText; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1187,8 +1187,8 @@ static bool window_kvs_cmd_setInputText(KviKvsModuleCommandCall * c) static bool window_kvs_cmd_insertInInputText(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szText; + TQString szWnd; + TQString szText; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1260,8 +1260,8 @@ static bool window_kvs_fnc_inputText(KviKvsModuleFunctionCall * c) static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szBackground; + TQString szWnd; + TQString szBackground; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1277,7 +1277,7 @@ static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) } /* - QPixmap *pix=0; + TQPixmap *pix=0; pix = g_pIconManager->getImage(szBackground); if (!pix){ KviScriptObject * ob = g_pScriptObjectController->lookupObject(szBackground); @@ -1289,7 +1289,7 @@ static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) c->warning(__tr("Pixmap objects required !")); return true; } - QVariant pix1= ob->property("pixmap"); + TQVariant pix1= ob->property("pixmap"); if (!pix1.asPixmap().isNull()){ c->warning(__tr("Pixmap is null")); return true; @@ -1347,7 +1347,7 @@ static bool window_kvs_cmd_setBackground(KviKvsModuleCommandCall * c) #ifdef COMPILE_CRYPT_SUPPORT -static bool initializeCryptEngine(KviCryptEngine * eng,KviStr &szEncryptKey,KviStr &szDecryptKey,QString &szError) +static bool initializeCryptEngine(KviCryptEngine * eng,KviStr &szEncryptKey,KviStr &szDecryptKey,TQString &szError) { char * encKey = 0; int encKeyLen = 0; @@ -1388,10 +1388,10 @@ static bool initializeCryptEngine(KviCryptEngine * eng,KviStr &szEncryptKey,KviS static bool window_kvs_cmd_setCryptEngine(KviKvsModuleCommandCall * c) { - QString szWnd; - QString szEngine; - QString szEncryptKey; - QString szDecryptKey; + TQString szWnd; + TQString szEngine; + TQString szEncryptKey; + TQString szDecryptKey; KviWindow * pWnd; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("window_id",KVS_PT_STRING,0,szWnd) @@ -1432,7 +1432,7 @@ static bool window_kvs_cmd_setCryptEngine(KviKvsModuleCommandCall * c) { KviStr enc = KviStr(szEncryptKey.utf8().data()); KviStr dec = KviStr(szDecryptKey.utf8().data()); - QString szError; + TQString szError; if(initializeCryptEngine(e,enc,dec,szError)) { KviCryptSessionInfo * inf = KviCryptController::allocateCryptSessionInfo(); @@ -1499,7 +1499,7 @@ static bool window_module_init(KviModule *m) // saveOutput (view()->saveBuffer()) /* - m->registerFunction("geometry",window_module_fnc_geometry); + m->registerFunction("geometry",window_module_fnc_tqgeometry); m->registerCommand("setGeometry",window_module_cmd_setGeometry); m->registerFunction("isActive",window_module_fnc_isActive); diff --git a/src/modules/window/userwindow.cpp b/src/modules/window/userwindow.cpp index 08a7405b..e0a77c29 100644 --- a/src/modules/window/userwindow.cpp +++ b/src/modules/window/userwindow.cpp @@ -47,13 +47,13 @@ KviUserWindow::KviUserWindow(KviFrame * pFrm,const char * name,int iIcon,KviCons // Register ourselves //connection()->registerChannel(this); // Central splitter -// m_pSplitter = new QSplitter(QSplitter::Horizontal,this,"main_splitter"); +// m_pSplitter = new TQSplitter(TQSplitter::Horizontal,this,"main_splitter"); // Spitted vertially on the left -// m_pVertSplitter = new QSplitter(QSplitter::Vertical,m_pSplitter, +// m_pVertSplitter = new TQSplitter(TQSplitter::Vertical,m_pSplitter, // "vertical_splitter"); // With the IRC view over m_pIrcView = new KviIrcView(this,pFrm,this); - // connect(m_pIrcView,SIGNAL(rightClicked()),this,SLOT(textViewRightClicked())); + // connect(m_pIrcView,TQT_SIGNAL(rightClicked()),this,TQT_SLOT(textViewRightClicked())); // The userlist on the right // m_pUserListView = new KviUserListView(m_pSplitter,connection()->userDataBase(),this, // AVERAGE_CHANNEL_USERS,__tr2qs("User List"),"user_list_view"); @@ -73,12 +73,12 @@ KviUserWindow::~KviUserWindow() g_pUserWindowList->removeRef(this); } -QPixmap * KviUserWindow::myIconPtr() +TQPixmap * KviUserWindow::myIconPtr() { return g_pIconManager->getSmallIcon(m_iIcon); } -void KviUserWindow::resizeEvent(QResizeEvent *e) +void KviUserWindow::resizeEvent(TQResizeEvent *e) { if(m_pInput) { @@ -95,7 +95,7 @@ void KviUserWindow::fillCaptionBuffers() // nothing here } -void KviUserWindow::setCaptionStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive) +void KviUserWindow::setCaptionStrings(const TQString &szPlainText,const TQString &szHtmlInactive,const TQString &szHtmlActive) { m_szPlainTextCaption = szPlainText; m_szHtmlActiveCaption = szHtmlActive; diff --git a/src/modules/window/userwindow.h b/src/modules/window/userwindow.h index 333b7edb..e120410e 100644 --- a/src/modules/window/userwindow.h +++ b/src/modules/window/userwindow.h @@ -30,6 +30,7 @@ class KviUserWindow : public KviWindow { Q_OBJECT + TQ_OBJECT public: enum CreationFlags { HasInput = 1 }; public: @@ -38,11 +39,11 @@ public: protected: int m_iIcon; protected: - virtual void resizeEvent(QResizeEvent *e); - virtual QPixmap * myIconPtr(); + virtual void resizeEvent(TQResizeEvent *e); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); public: - void setCaptionStrings(const QString &szPlainText,const QString &szHtmlInactive,const QString &szHtmlActive); + void setCaptionStrings(const TQString &szPlainText,const TQString &szHtmlInactive,const TQString &szHtmlActive); }; #endif //!_USERWINDOW_H_ |