summaryrefslogtreecommitdiffstats
path: root/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvirc/kernel/kvi_customtoolbardescriptor.cpp')
-rw-r--r--src/kvirc/kernel/kvi_customtoolbardescriptor.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp b/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp
index d8c246b9..2e3b8faf 100644
--- a/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp
+++ b/src/kvirc/kernel/kvi_customtoolbardescriptor.cpp
@@ -34,11 +34,11 @@
#include "kvi_kvs_script.h"
#include "kvi_window.h"
-KviCustomToolBarDescriptor::KviCustomToolBarDescriptor(const QString &szId,const QString &szLabelCode)
+KviCustomToolBarDescriptor::KviCustomToolBarDescriptor(const TQString &szId,const TQString &szLabelCode)
{
m_iInternalId = g_pApp->getGloballyUniqueId();
m_szId = szId;
- m_pActions = new KviPointerList<QString>;
+ m_pActions = new KviPointerList<TQString>;
m_pActions->setAutoDelete(true);
m_pToolBar = 0;
m_bVisibleAtStartup = false;
@@ -52,31 +52,31 @@ KviCustomToolBarDescriptor::~KviCustomToolBarDescriptor()
delete m_pLabelScript;
}
-void KviCustomToolBarDescriptor::createLabelScript(const QString &szLabelCode)
+void KviCustomToolBarDescriptor::createLabelScript(const TQString &szLabelCode)
{
- QString szTmp = "toolbar::";
+ TQString szTmp = "toolbar::";
szTmp += m_szId;
szTmp += "::label";
m_pLabelScript = new KviKvsScript(szTmp,szLabelCode,KviKvsScript::Parameter);
}
-const QString & KviCustomToolBarDescriptor::label()
+const TQString & KviCustomToolBarDescriptor::label()
{
if(!m_pLabelScript->run(g_pActiveWindow,0,m_szParsedLabel))m_szParsedLabel = m_pLabelScript->code();
return m_szParsedLabel;
}
-const QString & KviCustomToolBarDescriptor::labelCode()
+const TQString & KviCustomToolBarDescriptor::labelCode()
{
return m_pLabelScript->code();
}
-bool KviCustomToolBarDescriptor::addAction(const QString &szAction)
+bool KviCustomToolBarDescriptor::addAction(const TQString &szAction)
{
KviAction *a = KviActionManager::instance()->getAction(szAction);
if(a)
{
- m_pActions->append(new QString(szAction));
+ m_pActions->append(new TQString(szAction));
if(m_pToolBar)a->addToCustomToolBar(m_pToolBar);
return true;
}
@@ -96,9 +96,9 @@ bool KviCustomToolBarDescriptor::removeAction(unsigned int iAction)
return true;
}
-bool KviCustomToolBarDescriptor::removeAction(const QString &szAction)
+bool KviCustomToolBarDescriptor::removeAction(const TQString &szAction)
{
- for(QString *s = m_pActions->first();s;s = m_pActions->next())
+ for(TQString *s = m_pActions->first();s;s = m_pActions->next())
{
if(*s == szAction)
{
@@ -127,18 +127,18 @@ void KviCustomToolBarDescriptor::fillToolBar()
{
if(m_pActions->count() == 0)
{
- // force layout of the toolbar
- QApplication::postEvent(m_pToolBar,new QEvent(QEvent::LayoutHint));
+ // force tqlayout of the toolbar
+ TQApplication::postEvent(m_pToolBar,new TQEvent(TQEvent::LayoutHint));
} else {
- KviPointerList<QString> dying;
+ KviPointerList<TQString> dying;
dying.setAutoDelete(false);
- for(QString *p = m_pActions->first();p;p = m_pActions->next())
+ for(TQString *p = m_pActions->first();p;p = m_pActions->next())
{
KviAction *a = KviActionManager::instance()->getAction(*p);
if(a)a->addToCustomToolBar(m_pToolBar);
else dying.append(p);
}
- for(QString *d = dying.first();d;d = dying.next())
+ for(TQString *d = dying.first();d;d = dying.next())
m_pActions->removeRef(d);
}
}
@@ -147,7 +147,7 @@ KviCustomToolBar * KviCustomToolBarDescriptor::createToolBar()
{
if(!m_pToolBar)
{
- m_pToolBar = new KviCustomToolBar(this,label(),QT_DOCK_TOP,false,id().utf8().data());
+ m_pToolBar = new KviCustomToolBar(this,label(),TQT_DOCK_TOP,false,id().utf8().data());
fillToolBar();
}
return m_pToolBar;
@@ -163,7 +163,7 @@ void KviCustomToolBarDescriptor::unregisterToolBar(KviCustomToolBar * t)
m_pToolBar = 0;
}
-void KviCustomToolBarDescriptor::rename(const QString &szNewLabelCode)
+void KviCustomToolBarDescriptor::rename(const TQString &szNewLabelCode)
{
delete m_pLabelScript;
createLabelScript(szNewLabelCode);
@@ -190,9 +190,9 @@ bool KviCustomToolBarDescriptor::loadScripttoolbarCompat(const char * szPrefix,K
m_pActions->clear();
KviStr tmp;
tmp.sprintf("%s_Name",szPrefix);
- m_szId = cfg->readQStringEntry(tmp.ptr(),"");
+ m_szId = cfg->readTQStringEntry(tmp.ptr(),"");
tmp.sprintf("%s_Label",szPrefix);
- QString szLabelCode = cfg->readQStringEntry(tmp.ptr(),"");
+ TQString szLabelCode = cfg->readTQStringEntry(tmp.ptr(),"");
if(szLabelCode.isEmpty())szLabelCode = "$tr(Unnamed)";
delete m_pLabelScript;
createLabelScript(szLabelCode);
@@ -210,13 +210,13 @@ bool KviCustomToolBarDescriptor::loadScripttoolbarCompat(const char * szPrefix,K
if(kvi_strEqualCI(tmp2.ptr(),"button"))
{
tmp2.sprintf("%s_Name",tmp.ptr());
- QString szName = cfg->readQStringEntry(tmp2.ptr(),"");
+ TQString szName = cfg->readTQStringEntry(tmp2.ptr(),"");
tmp2.sprintf("%s_Code",tmp.ptr());
- QString szCode = cfg->readQStringEntry(tmp2.ptr(),"");
+ TQString szCode = cfg->readTQStringEntry(tmp2.ptr(),"");
tmp2.sprintf("%s_Icon",tmp.ptr());
- QString szIcon = cfg->readQStringEntry(tmp2.ptr(),"");
+ TQString szIcon = cfg->readTQStringEntry(tmp2.ptr(),"");
tmp2.sprintf("%s_Text",tmp.ptr());
- QString szText = cfg->readQStringEntry(tmp2.ptr(),"");
+ TQString szText = cfg->readTQStringEntry(tmp2.ptr(),"");
//tmp2.sprintf("%s_Enabled",tmp.ptr());
//bool bEnabled = cfg->readBoolEntry(tmp2.ptr(),true);
@@ -230,9 +230,9 @@ bool KviCustomToolBarDescriptor::loadScripttoolbarCompat(const char * szPrefix,K
__tr2qs("Backward compatibility action for toolbar.define"),
"generic",szIcon,szIcon,0);
KviActionManager::instance()->registerAction(a);
- m_pActions->append(new QString(szName));
+ m_pActions->append(new TQString(szName));
} else {
- m_pActions->append(new QString("separator"));
+ m_pActions->append(new TQString("separator"));
}
}
return true;
@@ -243,17 +243,17 @@ bool KviCustomToolBarDescriptor::load(KviConfig * cfg)
{
m_pActions->clear();
m_szId = cfg->group();
- QString szLabelCode = cfg->readQStringEntry("Label");
+ TQString szLabelCode = cfg->readTQStringEntry("Label");
if(szLabelCode.isEmpty())szLabelCode = "$tr(Unnamed)";
delete m_pLabelScript;
createLabelScript(szLabelCode);
- m_szIconId = cfg->readQStringEntry("IconId","");
+ m_szIconId = cfg->readTQStringEntry("IconId","");
unsigned int n = cfg->readUIntEntry("Count",0);
- QString tmp;
+ TQString tmp;
for(unsigned int i=0;i<n;i++)
{
tmp.setNum(i);
- QString * p = new QString(cfg->readQStringEntry(tmp));
+ TQString * p = new TQString(cfg->readTQStringEntry(tmp));
if(p->isEmpty())delete p;
else m_pActions->append(p);
}
@@ -267,8 +267,8 @@ void KviCustomToolBarDescriptor::save(KviConfig * cfg)
cfg->writeEntry("Count",m_pActions->count());
if(!m_szIconId.isEmpty())cfg->writeEntry("IconId",m_szIconId);
int i = 0;
- QString tmp;
- for(QString * p = m_pActions->first();p;p = m_pActions->next())
+ TQString tmp;
+ for(TQString * p = m_pActions->first();p;p = m_pActions->next())
{
tmp.setNum(i);
cfg->writeEntry(tmp,*p);