Revert "Rename a number of old tq methods that are no longer tq specific"

This reverts commit 805c2821ce.
pull/1/head
Timothy Pearson 13 years ago
parent 805c2821ce
commit c6611272c2

@ -163,7 +163,7 @@ iccolor1=0,0,0
mirccolor12=15,15,255 mirccolor12=15,15,255
mirccolor5=150,0,0 mirccolor5=150,0,0
msgtypeChanAdmin=242,3,100,1,1 msgtypeChanAdmin=242,3,100,1,1
msgtypeGenericStatus=133,14,100,1,1 msgtypeGenerictqStatus=133,14,100,1,1
msgtypeHalfOp=174,3,100,1,1 msgtypeHalfOp=174,3,100,1,1
msgtypeDevoice=63,3,100,1,1 msgtypeDevoice=63,3,100,1,1
msgtypeJoin=39,14,100,1,2 msgtypeJoin=39,14,100,1,2

@ -23,7 +23,7 @@ Category: Informational
[/td][/tr] [/td][/tr]
[tr][td] [tr][td]
[b]Status of this Memo[/b] [b]tqStatus of this Memo[/b]
[/td][/tr] [/td][/tr]
[tr][td] [tr][td]

@ -132,7 +132,7 @@
/* define this if you are on a big endian machine */ /* define this if you are on a big endian machine */
/* #undef BIG_ENDIAN_MACHINE_BYTE_ORDER */ /* #undef BIG_ENDIAN_MACHINE_BYTE_ORDER */
/* define this if you want to use the unicode-local 8bit charset translation */ /* define this if you want to use the tqunicode-local 8bit charset translation */
/* #undef COMPILE_USE_LOCAL_8BIT */ /* #undef COMPILE_USE_LOCAL_8BIT */
/* define this if you want to disable the inter-process communication support */ /* define this if you want to disable the inter-process communication support */

@ -236,18 +236,18 @@ inline unsigned int kvi_hash_hash(const TQString &szKey,bool bCaseSensitive)
if(!p)return 0; if(!p)return 0;
if(bCaseSensitive) if(bCaseSensitive)
{ {
while(p->unicode()) while(p->tqunicode())
{ {
uResult += p->unicode(); uResult += p->tqunicode();
p++; p++;
} }
} else { } else {
while(p->unicode()) while(p->tqunicode())
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
uResult += p->toLower().unicode(); uResult += p->toLower().tqunicode();
#else #else
uResult += p->lower().unicode(); uResult += p->lower().tqunicode();
#endif #endif
p++; p++;
} }

@ -54,8 +54,8 @@ namespace KviTQString
bool equalCSN(const TQString &sz1,const TQString &sz2,unsigned int len) bool equalCSN(const TQString &sz1,const TQString &sz2,unsigned int len)
{ {
if(len == 0)return true; // assume equal if(len == 0)return true; // assume equal
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c2 = sz2.unicode(); const TQChar * c2 = sz2.tqunicode();
unsigned int lmin = MY_MIN(sz1.length(),sz2.length()); unsigned int lmin = MY_MIN(sz1.length(),sz2.length());
if(lmin < len)return false; if(lmin < len)return false;
const TQChar * c1e = c1 + len; const TQChar * c1e = c1 + len;
@ -64,7 +64,7 @@ namespace KviTQString
while(c1 < c1e) while(c1 < c1e)
{ {
if(c1->unicode() != c2->unicode())return false; if(c1->tqunicode() != c2->tqunicode())return false;
c1++; c1++;
c2++; c2++;
} }
@ -74,8 +74,8 @@ namespace KviTQString
bool equalCIN(const TQString &sz1,const TQString &sz2,unsigned int len) bool equalCIN(const TQString &sz1,const TQString &sz2,unsigned int len)
{ {
if(len == 0)return true; // assume equal if(len == 0)return true; // assume equal
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c2 = sz2.unicode(); const TQChar * c2 = sz2.tqunicode();
unsigned int lmin = MY_MIN(sz1.length(),sz2.length()); unsigned int lmin = MY_MIN(sz1.length(),sz2.length());
if(lmin < len)return false; if(lmin < len)return false;
const TQChar * c1e = c1 + len; const TQChar * c1e = c1 + len;
@ -85,9 +85,9 @@ namespace KviTQString
while(c1 < c1e) while(c1 < c1e)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c1->toLower().unicode() != c2->toLower().unicode())return false; if(c1->toLower().tqunicode() != c2->toLower().tqunicode())return false;
#else #else
if(c1->lower().unicode() != c2->lower().unicode())return false; if(c1->lower().tqunicode() != c2->lower().tqunicode())return false;
#endif #endif
c1++; c1++;
c2++; c2++;
@ -98,7 +98,7 @@ namespace KviTQString
bool equalCSN(const TQString &sz1,const char * sz2,unsigned int len) bool equalCSN(const TQString &sz1,const char * sz2,unsigned int len)
{ {
if(len == 0)return true; // assume equal if(len == 0)return true; // assume equal
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
if(sz1.length() < len)return false; if(sz1.length() < len)return false;
const TQChar * c1e = c1 + len; const TQChar * c1e = c1 + len;
@ -107,7 +107,7 @@ namespace KviTQString
while((c1 < c1e) && (*sz2)) while((c1 < c1e) && (*sz2))
{ {
if(c1->unicode() != *sz2)return false; if(c1->tqunicode() != *sz2)return false;
c1++; c1++;
sz2++; sz2++;
} }
@ -117,7 +117,7 @@ namespace KviTQString
bool equalCIN(const TQString &sz1,const char * sz2,unsigned int len) bool equalCIN(const TQString &sz1,const char * sz2,unsigned int len)
{ {
if(len == 0)return true; // assume equal if(len == 0)return true; // assume equal
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
if(sz1.length() < len)return false; if(sz1.length() < len)return false;
const TQChar * c1e = c1 + len; const TQChar * c1e = c1 + len;
@ -127,9 +127,9 @@ namespace KviTQString
while((c1 < c1e) && (*sz2)) while((c1 < c1e) && (*sz2))
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c1->toLower().unicode() != tolower(*sz2))return false; if(c1->toLower().tqunicode() != tolower(*sz2))return false;
#else #else
if(c1->lower().unicode() != tolower(*sz2))return false; if(c1->lower().tqunicode() != tolower(*sz2))return false;
#endif #endif
c1++; c1++;
sz2++; sz2++;
@ -141,19 +141,19 @@ namespace KviTQString
bool equalCIN(const TQString &sz1,const TQChar *sz2,unsigned int len) bool equalCIN(const TQString &sz1,const TQChar *sz2,unsigned int len)
{ {
if(len == 0)return true; // assume equal if(len == 0)return true; // assume equal
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
if(sz1.length() < len)return false; if(sz1.length() < len)return false;
const TQChar * c1e = c1 + len; const TQChar * c1e = c1 + len;
if(!sz2)return !c1; if(!sz2)return !c1;
if(!c1)return !(sz2->unicode()); if(!c1)return !(sz2->tqunicode());
while((c1 < c1e) && (sz2->unicode())) while((c1 < c1e) && (sz2->tqunicode()))
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c1->toLower().unicode() != sz2->toLower().unicode())return false; if(c1->toLower().tqunicode() != sz2->toLower().tqunicode())return false;
#else #else
if(c1->lower().unicode() != sz2->lower().unicode())return false; if(c1->lower().tqunicode() != sz2->lower().tqunicode())return false;
#endif #endif
c1++; c1++;
sz2++; sz2++;
@ -165,39 +165,39 @@ namespace KviTQString
{ {
double size = bytes; double size = bytes;
if(size<900) if(size<900)
return TQString(__tr2qs("%1 bytes")).arg(size,0,'f',3); return TQString(__tr2qs("%1 bytes")).tqarg(size,0,'f',3);
size/=1024; size/=1024;
if(size<900) if(size<900)
return TQString(__tr2qs("%1 KB")).arg(size,0,'f',3); return TQString(__tr2qs("%1 KB")).tqarg(size,0,'f',3);
size/=1024; size/=1024;
if(size<900) if(size<900)
return TQString(__tr2qs("%1 MB")).arg(size,0,'f',3); return TQString(__tr2qs("%1 MB")).tqarg(size,0,'f',3);
//Pirated DVD?;) //Pirated DVD?;)
size/=1024; size/=1024;
if(size<900) if(size<900)
return TQString(__tr2qs("%1 GB")).arg(size,0,'f',3); return TQString(__tr2qs("%1 GB")).tqarg(size,0,'f',3);
//Uhm.. We are downloading a whole internet:))) //Uhm.. We are downloading a whole internet:)))
size/=1024; size/=1024;
return TQString(__tr2qs("%1 TB")).arg(size,0,'f',3); return TQString(__tr2qs("%1 TB")).tqarg(size,0,'f',3);
} }
bool equalCS(const TQString &sz1,const TQString &sz2) bool equalCS(const TQString &sz1,const TQString &sz2)
{ {
if(sz1.length() != sz2.length())return false; if(sz1.length() != sz2.length())return false;
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c2 = sz2.unicode(); const TQChar * c2 = sz2.tqunicode();
const TQChar * c1e = c1 + sz1.length(); const TQChar * c1e = c1 + sz1.length();
if(!c1 || !c2)return (c1 == c2); if(!c1 || !c2)return (c1 == c2);
while(c1 < c1e) while(c1 < c1e)
{ {
if(c1->unicode() != c2->unicode())return false; if(c1->tqunicode() != c2->tqunicode())return false;
c1++; c1++;
c2++; c2++;
} }
@ -208,8 +208,8 @@ namespace KviTQString
{ {
if(sz1.length() != sz2.length())return false; if(sz1.length() != sz2.length())return false;
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c2 = sz2.unicode(); const TQChar * c2 = sz2.tqunicode();
const TQChar * c1e = c1 + sz1.length(); const TQChar * c1e = c1 + sz1.length();
if(!c1 || !c2)return (c1 == c2); if(!c1 || !c2)return (c1 == c2);
@ -217,9 +217,9 @@ namespace KviTQString
while(c1 < c1e) while(c1 < c1e)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c1->toLower().unicode() != c2->toLower().unicode())return false; if(c1->toLower().tqunicode() != c2->toLower().tqunicode())return false;
#else #else
if(c1->lower().unicode() != c2->lower().unicode())return false; if(c1->lower().tqunicode() != c2->lower().tqunicode())return false;
#endif #endif
c1++; c1++;
c2++; c2++;
@ -230,35 +230,35 @@ namespace KviTQString
// sz2 is assumed to be null terminated, sz1 is not! // sz2 is assumed to be null terminated, sz1 is not!
bool equalCI(const TQString &sz1,const TQChar *sz2) bool equalCI(const TQString &sz1,const TQChar *sz2)
{ {
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c1e = c1 + sz1.length(); const TQChar * c1e = c1 + sz1.length();
if(!c1 || !sz2)return (c1 == sz2); if(!c1 || !sz2)return (c1 == sz2);
while(c1 < c1e) while(c1 < c1e)
{ {
if(!sz2->unicode())return false; // sz1 has at least another character if(!sz2->tqunicode())return false; // sz1 has at least another character
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c1->toLower().unicode() != sz2->toLower().unicode())return false; if(c1->toLower().tqunicode() != sz2->toLower().tqunicode())return false;
#else #else
if(c1->lower().unicode() != sz2->lower().unicode())return false; if(c1->lower().tqunicode() != sz2->lower().tqunicode())return false;
#endif #endif
c1++; c1++;
sz2++; sz2++;
} }
return (c1 == c1e) && (!sz2->unicode()); return (c1 == c1e) && (!sz2->tqunicode());
} }
bool equalCS(const TQString &sz1,const char * sz2) bool equalCS(const TQString &sz1,const char * sz2)
{ {
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c1e = c1 + sz1.length(); const TQChar * c1e = c1 + sz1.length();
if(!c1)return !sz2; if(!c1)return !sz2;
while((c1 < c1e) && (*sz2)) while((c1 < c1e) && (*sz2))
{ {
if(c1->unicode() != *sz2)return false; if(c1->tqunicode() != *sz2)return false;
c1++; c1++;
sz2++; sz2++;
} }
@ -267,7 +267,7 @@ namespace KviTQString
bool equalCI(const TQString &sz1,const char * sz2) bool equalCI(const TQString &sz1,const char * sz2)
{ {
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c1e = c1 + sz1.length(); const TQChar * c1e = c1 + sz1.length();
if(!c1)return !sz2; if(!c1)return !sz2;
@ -275,9 +275,9 @@ namespace KviTQString
while((c1 < c1e) && (*sz2)) while((c1 < c1e) && (*sz2))
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c1->toLower().unicode() != tolower(*sz2))return false; if(c1->toLower().tqunicode() != tolower(*sz2))return false;
#else #else
if(c1->lower().unicode() != tolower(*sz2))return false; if(c1->lower().tqunicode() != tolower(*sz2))return false;
#endif #endif
c1++; c1++;
sz2++; sz2++;
@ -287,8 +287,8 @@ namespace KviTQString
int cmpCS(const TQString &sz1,const TQString &sz2) int cmpCS(const TQString &sz1,const TQString &sz2)
{ {
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c2 = sz2.unicode(); const TQChar * c2 = sz2.tqunicode();
const TQChar * c1e = c1 + sz1.length(); const TQChar * c1e = c1 + sz1.length();
const TQChar * c2e = c2 + sz2.length(); const TQChar * c2e = c2 + sz2.length();
@ -304,12 +304,12 @@ namespace KviTQString
{ {
if(c1 >= c1e) if(c1 >= c1e)
{ {
if(c2 < c2e)return /* 0 */ - (c2->unicode()); if(c2 < c2e)return /* 0 */ - (c2->tqunicode());
return 0; return 0;
} }
if(c2 >= c2e)return c1->unicode() /* - 0 */; if(c2 >= c2e)return c1->tqunicode() /* - 0 */;
int diff = c1->unicode() - c2->unicode(); int diff = c1->tqunicode() - c2->tqunicode();
if(diff)return diff; if(diff)return diff;
c1++; c1++;
@ -321,8 +321,8 @@ namespace KviTQString
int cmpCI(const TQString &sz1,const TQString &sz2) int cmpCI(const TQString &sz1,const TQString &sz2)
{ {
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c2 = sz2.unicode(); const TQChar * c2 = sz2.tqunicode();
const TQChar * c1e = c1 + sz1.length(); const TQChar * c1e = c1 + sz1.length();
const TQChar * c2e = c2 + sz2.length(); const TQChar * c2e = c2 + sz2.length();
@ -338,22 +338,22 @@ namespace KviTQString
if(c1 >= c1e) if(c1 >= c1e)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c2 < c2e)return /* 0 */ - (c2->toLower().unicode()); if(c2 < c2e)return /* 0 */ - (c2->toLower().tqunicode());
#else #else
if(c2 < c2e)return /* 0 */ - (c2->lower().unicode()); if(c2 < c2e)return /* 0 */ - (c2->lower().tqunicode());
#endif #endif
return 0; return 0;
} }
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(c2 >= c2e)return c1->toLower().unicode() /* - 0 */; if(c2 >= c2e)return c1->toLower().tqunicode() /* - 0 */;
#else #else
if(c2 >= c2e)return c1->lower().unicode() /* - 0 */; if(c2 >= c2e)return c1->lower().tqunicode() /* - 0 */;
#endif #endif
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
int diff = c1->toLower().unicode() - c2->toLower().unicode(); int diff = c1->toLower().tqunicode() - c2->toLower().tqunicode();
#else #else
int diff = c1->lower().unicode() - c2->lower().unicode(); int diff = c1->lower().tqunicode() - c2->lower().tqunicode();
#endif #endif
if(diff)return diff; if(diff)return diff;
@ -370,8 +370,8 @@ namespace KviTQString
unsigned int l1 = MY_MIN(len,sz1.length()); unsigned int l1 = MY_MIN(len,sz1.length());
unsigned int l = MY_MIN(l1,sz2.length()); // FIXME: THIS IS NOT OK unsigned int l = MY_MIN(l1,sz2.length()); // FIXME: THIS IS NOT OK
const TQChar * c1 = sz1.unicode(); const TQChar * c1 = sz1.tqunicode();
const TQChar * c2 = sz2.unicode(); const TQChar * c2 = sz2.tqunicode();
const TQChar * c1e = c1 + l; const TQChar * c1e = c1 + l;
if(!c1) if(!c1)
@ -384,9 +384,9 @@ namespace KviTQString
int diff = 0; int diff = 0;
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
while((c1 < c1e) && !(diff = (c1->toLower().unicode() - c2->toLower().unicode()))) while((c1 < c1e) && !(diff = (c1->toLower().tqunicode() - c2->toLower().tqunicode())))
#else #else
while((c1 < c1e) && !(diff = (c1->lower().unicode() - c2->lower().unicode()))) while((c1 < c1e) && !(diff = (c1->lower().tqunicode() - c2->lower().tqunicode())))
#endif #endif
{ {
c1++; c1++;
@ -533,7 +533,7 @@ namespace KviTQString
} }
TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * allocsize); TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * allocsize);
//TQChar * p = (TQChar *)s.unicode(); //TQChar * p = (TQChar *)s.tqunicode();
char *argString; char *argString;
long argValue; long argValue;
@ -561,12 +561,12 @@ namespace KviTQString
} }
for(; fmt->unicode() ; ++fmt) for(; fmt->tqunicode() ; ++fmt)
{ {
if(reallen == allocsize)INCREMENT_MEM if(reallen == allocsize)INCREMENT_MEM
//copy up to a '%' //copy up to a '%'
if(fmt->unicode() != '%') if(fmt->tqunicode() != '%')
{ {
*p++ = *fmt; *p++ = *fmt;
reallen++; reallen++;
@ -574,7 +574,7 @@ namespace KviTQString
} }
++fmt; //skip this '%' ++fmt; //skip this '%'
switch(fmt->unicode()) switch(fmt->tqunicode())
{ {
case 's': // char * string case 's': // char * string
{ {
@ -583,7 +583,7 @@ namespace KviTQString
TQString str(argString); TQString str(argString);
if(str.isEmpty())continue; if(str.isEmpty())continue;
int len = str.length(); int len = str.length();
const TQChar * ch = str.unicode(); const TQChar * ch = str.tqunicode();
if(!ch)continue; if(!ch)continue;
if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) if((allocsize - reallen) < len)INCREMENT_MEM_BY(len)
while(len--)*p++ = *ch++; while(len--)*p++ = *ch++;
@ -606,7 +606,7 @@ namespace KviTQString
if(!str)continue; if(!str)continue;
if(str->isEmpty())continue; if(str->isEmpty())continue;
int len = str->length(); int len = str->length();
const TQChar * ch = str->unicode(); const TQChar * ch = str->tqunicode();
if(!ch)continue; if(!ch)continue;
if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) if((allocsize - reallen) < len)INCREMENT_MEM_BY(len)
while(len--)*p++ = *ch++; while(len--)*p++ = *ch++;
@ -721,7 +721,7 @@ namespace KviTQString
{ {
*p++ = '%'; //write it *p++ = '%'; //write it
reallen++; reallen++;
if(fmt->unicode()) if(fmt->tqunicode())
{ {
if(reallen == allocsize)INCREMENT_MEM if(reallen == allocsize)INCREMENT_MEM
*p++ = *fmt; *p++ = *fmt;
@ -789,21 +789,21 @@ namespace KviTQString
const TQChar * m2 = (const TQChar *)szM2.ucs2(); const TQChar * m2 = (const TQChar *)szM2.ucs2();
#endif #endif
if(!(m1 && m2 && (m1->unicode())))return false; if(!(m1 && m2 && (m1->tqunicode())))return false;
const TQChar * savePos1 = 0; const TQChar * savePos1 = 0;
const TQChar * savePos2 = m2; const TQChar * savePos2 = m2;
while(m1->unicode()) while(m1->tqunicode())
{ {
//loop managed by m1 (initially first mask) //loop managed by m1 (initially first mask)
if(m1->unicode()=='*') if(m1->tqunicode()=='*')
{ {
//Found a wildcard in m1 //Found a wildcard in m1
savePos1 = ++m1; //move to the next char and save the position...this is our jolly savePos1 = ++m1; //move to the next char and save the position...this is our jolly
if(!savePos1->unicode())return true; //last was a wildcard , matches everything ahead... if(!savePos1->tqunicode())return true; //last was a wildcard , matches everything ahead...
savePos2 = m2+1; //next return state for the second string savePos2 = m2+1; //next return state for the second string
continue; //and return continue; //and return
} }
if(!m2->unicode())return false; //m2 finished and we had something to match here! if(!m2->tqunicode())return false; //m2 finished and we had something to match here!
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(m1->toLower()==m2->toLower()) if(m1->toLower()==m2->toLower())
#else #else
@ -813,7 +813,7 @@ namespace KviTQString
//chars matched //chars matched
m1++; //Go ahead in the two strings m1++; //Go ahead in the two strings
m2++; // m2++; //
if((!(m1->unicode())) && m2->unicode() && savePos1) if((!(m1->tqunicode())) && m2->tqunicode() && savePos1)
{ {
//m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)...
//retry matching the string following the * from the savePos2 (one char ahead last time) //retry matching the string following the * from the savePos2 (one char ahead last time)
@ -822,7 +822,7 @@ namespace KviTQString
savePos2++; //next savePos2 will be next char savePos2++; //next savePos2 will be next char
} }
} else { } else {
if(m2->unicode() == '*') if(m2->tqunicode() == '*')
{ {
//A wlidcard in the second string //A wlidcard in the second string
//Invert the game : mask1 <-> mask2 //Invert the game : mask1 <-> mask2
@ -835,11 +835,11 @@ namespace KviTQString
continue; //...and again continue; //...and again
} }
// m1 != m2 , m1 != * , m2 != * // m1 != m2 , m1 != * , m2 != *
if((m1->unicode() == '?') || (m2->unicode() == '?')) if((m1->tqunicode() == '?') || (m2->tqunicode() == '?'))
{ {
m1++; m1++;
m2++; m2++;
if((!(m1->unicode())) && m2->unicode() && savePos1) if((!(m1->tqunicode())) && m2->tqunicode() && savePos1)
{ {
//m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)... //m1 finished , but m2 not yet and we have a savePosition for m1 (there was a wildcard)...
//retry matching the string following the * from the savePos2 (one char ahead last time) //retry matching the string following the * from the savePos2 (one char ahead last time)
@ -858,7 +858,7 @@ namespace KviTQString
} }
} }
} }
return (!(m2->unicode())); //m1 surely finished , so for the match , m2 must be finished too return (!(m2->tqunicode())); //m1 surely finished , so for the match , m2 must be finished too
} }
bool matchStringCI(const TQString &szExp,const TQString &szStr,bool bIsRegExp,bool bExact) bool matchStringCI(const TQString &szExp,const TQString &szStr,bool bIsRegExp,bool bExact)
@ -870,9 +870,9 @@ namespace KviTQString
TQChar* ptr=(TQChar*)szExp.ucs2(); TQChar* ptr=(TQChar*)szExp.ucs2();
#endif #endif
if(!ptr) return 0; if(!ptr) return 0;
while(ptr->unicode()) while(ptr->tqunicode())
{ {
if((ptr->unicode()=='[') || (ptr->unicode()==']')) if((ptr->tqunicode()=='[') || (ptr->tqunicode()==']'))
{ {
szWildcard.append("["); szWildcard.append("[");
szWildcard.append(*ptr); szWildcard.append(*ptr);
@ -904,9 +904,9 @@ namespace KviTQString
TQChar* ptr=(TQChar*)szExp.ucs2(); TQChar* ptr=(TQChar*)szExp.ucs2();
#endif #endif
if(!ptr) return 0; if(!ptr) return 0;
while(ptr->unicode()) while(ptr->tqunicode())
{ {
if((ptr->unicode()=='[')) // <-- hum ? if((ptr->tqunicode()=='[')) // <-- hum ?
{ {
szWildcard.append("["); szWildcard.append("[");
szWildcard.append(*ptr); szWildcard.append(*ptr);
@ -1043,7 +1043,7 @@ namespace KviTQString
} }
TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length()); TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length());
TQChar * b = buffer; TQChar * b = buffer;
unsigned short us = c->unicode(); unsigned short us = c->tqunicode();
while(us) while(us)
{ {
if(us < 256) if(us < 256)
@ -1052,7 +1052,7 @@ namespace KviTQString
*b = *c; *b = *c;
c++; c++;
b++; b++;
us = c->unicode(); us = c->tqunicode();
} }
TQString ret(buffer,szSrc.length()); TQString ret(buffer,szSrc.length());
kvi_free(buffer); kvi_free(buffer);
@ -1069,7 +1069,7 @@ namespace KviTQString
} }
TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length()); TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * szSrc.length());
TQChar * b = buffer; TQChar * b = buffer;
unsigned short us = c->unicode(); unsigned short us = c->tqunicode();
while(us) while(us)
{ {
if(us < 256) if(us < 256)
@ -1079,7 +1079,7 @@ namespace KviTQString
*b = *c; *b = *c;
c++; c++;
b++; b++;
us = c->unicode(); us = c->tqunicode();
} }
TQString ret(buffer,szSrc.length()); TQString ret(buffer,szSrc.length());
kvi_free(buffer); kvi_free(buffer);

@ -109,7 +109,7 @@ kvi_wslen_t kvi_wstrlen(const kvi_wchar_t * str)
if(pString->length() > 0) \ if(pString->length() > 0) \
{ \ { \
if(len <= ((int)(pString->length())))return (-1); \ if(len <= ((int)(pString->length())))return (-1); \
_WSTRING_WMEMCPY(p,pString->unicode(),pString->length()); \ _WSTRING_WMEMCPY(p,pString->tqunicode(),pString->length()); \
p += pString->length(); \ p += pString->length(); \
len -= pString->length(); \ len -= pString->length(); \
} \ } \
@ -192,8 +192,8 @@ int kvi_wvsnprintf(kvi_wchar_t *buffer,kvi_wslen_t len,const kvi_wchar_t *fmt,kv
bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2) bool kvi_qstringEqualCI(const TQString &s1,const TQString &s2)
{ {
const TQChar * p1 = s1.unicode(); const TQChar * p1 = s1.tqunicode();
const TQChar * p2 = s2.unicode(); const TQChar * p2 = s2.tqunicode();
int l = s1.length() < s2.length() ? s1.length() : s2.length(); int l = s1.length() < s2.length() ? s1.length() : s2.length();
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
while(l-- && (p1->toLower() == p2->toLower()))p1++,p2++; while(l-- && (p1->toLower() == p2->toLower()))p1++,p2++;
@ -1141,23 +1141,23 @@ KviStr::KviStr(char c,int fillLen)
} }
KviStr::KviStr(const kvi_wchar_t * unicode) KviStr::KviStr(const kvi_wchar_t * tqunicode)
{ {
if(!unicode) if(!tqunicode)
{ {
m_len = 0; m_len = 0;
m_ptr = (char *)kvi_malloc(1); m_ptr = (char *)kvi_malloc(1);
*m_ptr = 0; *m_ptr = 0;
} else { } else {
m_len = kvi_wstrlen(unicode); m_len = kvi_wstrlen(tqunicode);
m_ptr = (char *)kvi_malloc(m_len + 1); m_ptr = (char *)kvi_malloc(m_len + 1);
register char * p = m_ptr; register char * p = m_ptr;
while(*unicode)*p++ = *unicode++; while(*tqunicode)*p++ = *tqunicode++;
*p = 0; *p = 0;
} }
} }
KviStr::KviStr(const kvi_wchar_t * unicode,int len) KviStr::KviStr(const kvi_wchar_t * tqunicode,int len)
{ {
m_len = len; m_len = len;
m_ptr = (char *)kvi_malloc(m_len + 1); m_ptr = (char *)kvi_malloc(m_len + 1);
@ -1165,7 +1165,7 @@ KviStr::KviStr(const kvi_wchar_t * unicode,int len)
char * end = p + len; char * end = p + len;
while(p != end) while(p != end)
{ {
*p++ = *unicode++; *p++ = *tqunicode++;
} }
*p = 0; *p = 0;
} }

@ -155,9 +155,9 @@ public:
// Creates a string long fillLen characters filled with character c.<br> // Creates a string long fillLen characters filled with character c.<br>
KviStr(char c,int fillLen = 1); KviStr(char c,int fillLen = 1);
KviStr(const kvi_wchar_t * unicode); KviStr(const kvi_wchar_t * tqunicode);
KviStr(const kvi_wchar_t * unicode,int len); KviStr(const kvi_wchar_t * tqunicode,int len);
// just free(m_ptr) // just free(m_ptr)
~KviStr(); ~KviStr();

@ -350,17 +350,17 @@ static TQString queryWinInfo( QueryInfo info)
TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009"), TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Hotfix\\Q246009"),
0, KEY_TQUERY_VALUE, &hKey ); 0, KEY_TQUERY_VALUE, &hKey );
if( lRet == ERROR_SUCCESS ) if( lRet == ERROR_SUCCESS )
szVersion+= TQString("Service Pack 6a (Build %1)").arg( osvi.dwBuildNumber & 0xFFFF ); szVersion+= TQString("Service Pack 6a (Build %1)").tqarg( osvi.dwBuildNumber & 0xFFFF );
else // Windows NT 4.0 prior to SP6a else // Windows NT 4.0 prior to SP6a
{ {
szVersion+= TQString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF);
} }
RegCloseKey( hKey ); RegCloseKey( hKey );
} }
else // not Windows NT 4.0 else // not Windows NT 4.0
{ {
szVersion+= TQString( "%1 (Build %2)").arg( osvi.szCSDVersion).arg( osvi.dwBuildNumber & 0xFFFF); szVersion+= TQString( "%1 (Build %2)").tqarg( osvi.szCSDVersion).tqarg( osvi.dwBuildNumber & 0xFFFF);
} }
break; break;

@ -234,17 +234,17 @@ namespace KviStringConversion
bool fromString(const TQString & szValue,TQFont &buffer) bool fromString(const TQString & szValue,TQFont &buffer)
{ {
KviStr str = szValue; KviStr str = szValue;
KviStr family,pointSize,styleHint,weight,options; KviStr family,pointSize,tqstyleHint,weight,options;
str.getToken(family,','); str.getToken(family,',');
str.getToken(pointSize,','); str.getToken(pointSize,',');
str.getToken(styleHint,','); str.getToken(tqstyleHint,',');
str.getToken(weight,','); str.getToken(weight,',');
if(!family.isEmpty())buffer.setFamily(family.ptr()); if(!family.isEmpty())buffer.setFamily(family.ptr());
int i; int i;
bool bOk; bool bOk;
i = pointSize.toInt(&bOk); i = pointSize.toInt(&bOk);
if(bOk && (i > 0))buffer.setPointSize(i); if(bOk && (i > 0))buffer.setPointSize(i);
i = styleHint.toInt(&bOk); i = tqstyleHint.toInt(&bOk);
if(bOk && (i >= 0))buffer.setStyleHint((TQFont::StyleHint)i); if(bOk && (i >= 0))buffer.setStyleHint((TQFont::StyleHint)i);
i = weight.toInt(&bOk); i = weight.toInt(&bOk);
if(bOk && (i >= 0))buffer.setWeight(i); if(bOk && (i >= 0))buffer.setWeight(i);

@ -34,8 +34,8 @@
#include <tqdir.h> #include <tqdir.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include <tqglobal.h> #include <tqglobal.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <textstream.h> #include <tqtextstream.h>
namespace KviFileUtils namespace KviFileUtils
@ -60,7 +60,7 @@ namespace KviFileUtils
if(tmp_buf[255] == '\r')cur_len--; //Ignore CR... if(tmp_buf[255] == '\r')cur_len--; //Ignore CR...
int lastlen = szBuffer.length(); int lastlen = szBuffer.length();
szBuffer.setLength(lastlen + cur_len); szBuffer.setLength(lastlen + cur_len);
TQChar *p1 = szBuffer.unicode() + lastlen; TQChar *p1 = szBuffer.tqunicode() + lastlen;
char * p2 = tmp_buf; char * p2 = tmp_buf;
for(int i=0;i<cur_len;i++)*p1++ = *p2++; for(int i=0;i<cur_len;i++)*p1++ = *p2++;
cur_len = 0; cur_len = 0;
@ -76,7 +76,7 @@ namespace KviFileUtils
if(tmp_buf[cur_len - 1] == '\r')cur_len--; //Ignore CR... if(tmp_buf[cur_len - 1] == '\r')cur_len--; //Ignore CR...
int lastlen = szBuffer.length(); int lastlen = szBuffer.length();
szBuffer.setLength(lastlen + cur_len); szBuffer.setLength(lastlen + cur_len);
TQChar *p1 = szBuffer.unicode() + lastlen; TQChar *p1 = szBuffer.tqunicode() + lastlen;
char * p2 = tmp_buf; char * p2 = tmp_buf;
for(int i=0;i<cur_len;i++)*p1++ = *p2++; for(int i=0;i<cur_len;i++)*p1++ = *p2++;
} }

@ -232,8 +232,8 @@ KviIrcMask::KviIrcMask(const TQString &szMask)
if(b) if(b)
{ {
const TQChar * p = b; const TQChar * p = b;
while(p->unicode() && (p->unicode() != '!'))p++; while(p->tqunicode() && (p->tqunicode() != '!'))p++;
if(p->unicode()) if(p->tqunicode())
{ {
if(p != b) if(p != b)
{ {
@ -250,8 +250,8 @@ KviIrcMask::KviIrcMask(const TQString &szMask)
} }
p++; p++;
b = p; b = p;
while(p->unicode() && (p->unicode() != '@'))p++; while(p->tqunicode() && (p->tqunicode() != '@'))p++;
if(p->unicode()) if(p->tqunicode())
{ {
if(p != b) if(p != b)
{ {
@ -267,7 +267,7 @@ KviIrcMask::KviIrcMask(const TQString &szMask)
} }
p++; p++;
b=p; b=p;
while(p->unicode())p++; while(p->tqunicode())p++;
if(p != b) if(p != b)
{ {
m_szHost.setUnicode(b,p-b); m_szHost.setUnicode(b,p-b);
@ -291,7 +291,7 @@ bool KviIrcMask::hasNumericHost() const
int nPoints = 0; int nPoints = 0;
int nDoublePoints = 0; int nDoublePoints = 0;
unsigned short uc; unsigned short uc;
while((uc = p->unicode())) while((uc = p->tqunicode()))
{ {
if(uc == '.')nPoints++; // ipv6 masks can contain dots too! if(uc == '.')nPoints++; // ipv6 masks can contain dots too!
else { else {
@ -300,9 +300,9 @@ bool KviIrcMask::hasNumericHost() const
if((uc < '0') || (uc > '9')) if((uc < '0') || (uc > '9'))
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
uc = p->toUpper().unicode(); uc = p->toUpper().tqunicode();
#else #else
uc = p->upper().unicode(); uc = p->upper().tqunicode();
#endif #endif
if((uc < 'A') || (uc > 'F'))return false; if((uc < 'A') || (uc > 'F'))return false;
} }
@ -408,13 +408,13 @@ void KviIrcMask::mask(TQString &szMask,MaskType eMaskType) const
break; break;
default: default:
if (m_szUser.length() > 0) { if (m_szUser.length() > 0) {
if(m_szUser[0].unicode() != '*') if(m_szUser[0].tqunicode() != '*')
szMask.append(m_szWild); szMask.append(m_szWild);
if ((m_szUser[0].unicode() == '~') || if ((m_szUser[0].tqunicode() == '~') ||
(m_szUser[0].unicode() == '^') || (m_szUser[0].tqunicode() == '^') ||
(m_szUser[0].unicode() == '+') || (m_szUser[0].tqunicode() == '+') ||
(m_szUser[0].unicode() == '-') || (m_szUser[0].tqunicode() == '-') ||
(m_szUser[0].unicode() == '='))szMask.append(m_szUser.right(m_szUser.length() - 1)); (m_szUser[0].tqunicode() == '='))szMask.append(m_szUser.right(m_szUser.length() - 1));
else else
szMask.append(m_szUser); szMask.append(m_szUser);
} }
@ -614,13 +614,13 @@ bool KviIrcMask::matchesFixed(const TQString &nick,const TQString &user,const TQ
int KviIrcMask::getIpDomainMaskLen() const int KviIrcMask::getIpDomainMaskLen() const
{ {
int len = m_szHost.length(); int len = m_szHost.length();
const TQChar *p = m_szHost.unicode(); const TQChar *p = m_szHost.tqunicode();
const TQChar *b = p; const TQChar *b = p;
p += len; p += len;
if(b < p) if(b < p)
{ {
p--; p--;
while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--;
} }
// 000.000.000.000 // 000.000.000.000
// p // p
@ -632,17 +632,17 @@ int KviIrcMask::getIpDomainMaskLen() const
int KviIrcMask::getLargeIpDomainMaskLen() const int KviIrcMask::getLargeIpDomainMaskLen() const
{ {
int len = m_szHost.length(); int len = m_szHost.length();
const TQChar *p = m_szHost.unicode(); const TQChar *p = m_szHost.tqunicode();
const TQChar *b = p; const TQChar *b = p;
p += len; p += len;
if(b < p) if(b < p)
{ {
p--; p--;
while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--;
if(b < p) if(b < p)
{ {
p--; p--;
while((b < p) && (p->unicode() != '.') && (p->unicode() != ':'))p--; while((b < p) && (p->tqunicode() != '.') && (p->tqunicode() != ':'))p--;
} }
} }
// 000.000.000.000 // 000.000.000.000
@ -657,7 +657,7 @@ TQString KviIrcMask::getHostDomainMask() const
const TQChar *p=KviTQString::nullTerminatedArray(m_szHost); const TQChar *p=KviTQString::nullTerminatedArray(m_szHost);
if(!p)return TQString(); if(!p)return TQString();
const TQChar *b = p; const TQChar *b = p;
while(p->unicode() && p->unicode() != '.')p++; while(p->tqunicode() && p->tqunicode() != '.')p++;
TQString ret(p,len - (p - b)); TQString ret(p,len - (p - b));
return ret; return ret;
} }
@ -666,18 +666,18 @@ TQString KviIrcMask::getHostDomainMask() const
TQString KviIrcMask::getLargeHostDomainMask() const TQString KviIrcMask::getLargeHostDomainMask() const
{ {
int len = m_szHost.length(); int len = m_szHost.length();
const TQChar *p = m_szHost.unicode(); const TQChar *p = m_szHost.tqunicode();
const TQChar *b = p; const TQChar *b = p;
p += len; p += len;
if(b < p) if(b < p)
{ {
p--; p--;
while((b < p) && (p->unicode() != '.'))p--; while((b < p) && (p->tqunicode() != '.'))p--;
if(b < p) if(b < p)
{ {
p--; p--;
while((b < p) && (p->unicode() != '.'))p--; while((b < p) && (p->tqunicode() != '.'))p--;
} }
} }
@ -692,14 +692,14 @@ TQString KviIrcMask::getLargeHostDomainMask() const
bool KviIrcMask::hasMaskedIp() const bool KviIrcMask::hasMaskedIp() const
{ {
int len = m_szHost.length(); int len = m_szHost.length();
const TQChar *p = m_szHost.unicode(); const TQChar *p = m_szHost.tqunicode();
const TQChar *b = p; const TQChar *b = p;
if(len == 0)return false; if(len == 0)return false;
//run to the end //run to the end
p += len; p += len;
const TQChar *e = p; const TQChar *e = p;
p--; p--;
while((b < p) && (p->unicode() != '.'))p--; while((b < p) && (p->tqunicode() != '.'))p--;
return ((e - p) > 4); // at the moment 4 should be enough : the largest top part is "name" return ((e - p) > 4); // at the moment 4 should be enough : the largest top part is "name"
} }
@ -721,7 +721,7 @@ bool KviIrcMask::hasWildNick()
const TQChar * aux = KviTQString::nullTerminatedArray(m_szNick); const TQChar * aux = KviTQString::nullTerminatedArray(m_szNick);
if(!aux)return false; if(!aux)return false;
unsigned short uc; unsigned short uc;
while((uc = aux->unicode())) while((uc = aux->tqunicode()))
{ {
if((uc == '*') || (uc == '?'))return true; if((uc == '*') || (uc == '?'))return true;
aux++; aux++;
@ -736,14 +736,14 @@ int KviIrcMask::nonWildChars()
if(!aux)return 0; if(!aux)return 0;
unsigned short uc; unsigned short uc;
while((uc = aux->unicode())) while((uc = aux->tqunicode()))
{ {
if((uc != '*') && (uc != '?'))iCnt++; if((uc != '*') && (uc != '?'))iCnt++;
aux++; aux++;
} }
aux = KviTQString::nullTerminatedArray(m_szUser); aux = KviTQString::nullTerminatedArray(m_szUser);
while((uc = aux->unicode())) while((uc = aux->tqunicode()))
{ {
if((uc != '*') && (uc != '?'))iCnt++; if((uc != '*') && (uc != '?'))iCnt++;
aux++; aux++;
@ -751,7 +751,7 @@ int KviIrcMask::nonWildChars()
aux = KviTQString::nullTerminatedArray(m_szHost); aux = KviTQString::nullTerminatedArray(m_szHost);
while((uc = aux->unicode())) while((uc = aux->tqunicode()))
{ {
if((uc != '*') && (uc != '?'))iCnt++; if((uc != '*') && (uc != '?'))iCnt++;
aux++; aux++;

@ -26,7 +26,7 @@
#include <tqapplication.h> #include <tqapplication.h>
#include <layout.h> #include <tqlayout.h>
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>

@ -54,9 +54,9 @@ void KviIrcUserEntry::setRealName(const TQString &rn)
m_szRealName = KviTQString::trimmed(m_szRealName); m_szRealName = KviTQString::trimmed(m_szRealName);
if(m_szRealName.length()>=3) if(m_szRealName.length()>=3)
{ {
if( (m_szRealName[0].unicode()==KVI_TEXT_COLOR) && (m_szRealName[2].unicode()==KVI_TEXT_RESET) ) if( (m_szRealName[0].tqunicode()==KVI_TEXT_COLOR) && (m_szRealName[2].tqunicode()==KVI_TEXT_RESET) )
{ {
switch(m_szRealName[1].unicode()) switch(m_szRealName[1].tqunicode())
{ {
case '1': // hum.. encoded as hidden color code eh ? publish is somewhere, so others might implement this... case '1': // hum.. encoded as hidden color code eh ? publish is somewhere, so others might implement this...
setGender(Male); setGender(Male);

@ -169,7 +169,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int
return charIdx; return charIdx;
} }
unsigned short c = szData[(int)charIdx].unicode(); unsigned short c = szData[(int)charIdx].tqunicode();
//First we can have a digit or a coma //First we can have a digit or a coma
if(((c < '0') || (c > '9'))) if(((c < '0') || (c > '9')))
@ -189,7 +189,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int
return charIdx; return charIdx;
} }
c = szData[(int)charIdx].unicode(); c = szData[(int)charIdx].tqunicode();
if(((c < '0') || (c > '9')) && (c != ',')) if(((c < '0') || (c > '9')) && (c != ','))
{ {
@ -207,7 +207,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int
(*byte_2)=KVI_NOCHANGE; (*byte_2)=KVI_NOCHANGE;
return charIdx; return charIdx;
} }
c = szData[(int)charIdx].unicode(); c = szData[(int)charIdx].tqunicode();
} }
if(c == ',') if(c == ',')
@ -218,7 +218,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int
(*byte_2)=KVI_NOCHANGE; (*byte_2)=KVI_NOCHANGE;
return charIdx; return charIdx;
} }
c = szData[(int)charIdx].unicode(); c = szData[(int)charIdx].tqunicode();
} else { } else {
(*byte_2)=KVI_NOCHANGE; (*byte_2)=KVI_NOCHANGE;
return charIdx; return charIdx;
@ -227,7 +227,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int
if((c < '0') || (c > '9')) if((c < '0') || (c > '9'))
{ {
(*byte_2)=KVI_NOCHANGE; (*byte_2)=KVI_NOCHANGE;
if(szData[(int)(charIdx-1)].unicode()==',') if(szData[(int)(charIdx-1)].tqunicode()==',')
return charIdx-1; return charIdx-1;
else else
return charIdx; return charIdx;
@ -237,7 +237,7 @@ KVILIB_API unsigned int getUnicodeColorBytes(const TQString &szData,unsigned int
(*byte_2)=c-'0'; (*byte_2)=c-'0';
charIdx++; charIdx++;
if(charIdx >= szData.length())return charIdx; if(charIdx >= szData.length())return charIdx;
c = szData[(int)charIdx].unicode(); c = szData[(int)charIdx].tqunicode();
if((c >= '0') && (c <='9')) if((c >= '0') && (c <='9'))
{ {
@ -262,7 +262,7 @@ namespace KviMircCntrl
unsigned char b2; unsigned char b2;
while(i < l) while(i < l)
{ {
switch(szData[i].unicode()) switch(szData[i].tqunicode())
{ {
case KVI_TEXT_UNDERLINE: case KVI_TEXT_UNDERLINE:
case KVI_TEXT_BOLD: case KVI_TEXT_BOLD:
@ -288,7 +288,7 @@ namespace KviMircCntrl
i++; i++;
while(i < l) while(i < l)
{ {
if(szData[i].unicode() == ' ')break; if(szData[i].tqunicode() == ' ')break;
else i++; else i++;
} }
begin = i; begin = i;

@ -55,24 +55,24 @@ KviHttpRequest::KviHttpRequest()
m_bHeaderProcessed = false; m_bHeaderProcessed = false;
m_pBuffer = new KviDataBuffer(); m_pBuffer = new KviDataBuffer();
resetStatus(); resettqStatus();
resetData(); resetData();
} }
KviHttpRequest::~KviHttpRequest() KviHttpRequest::~KviHttpRequest()
{ {
resetInternalStatus(); resetInternaltqStatus();
delete m_pBuffer; delete m_pBuffer;
} }
void KviHttpRequest::abort() void KviHttpRequest::abort()
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Aborted"); m_szLastError = __tr2qs("Aborted");
emit terminated(false); emit terminated(false);
} }
void KviHttpRequest::resetInternalStatus() void KviHttpRequest::resetInternaltqStatus()
{ {
if(m_pThread)delete m_pThread; if(m_pThread)delete m_pThread;
if(m_pDns)delete m_pDns; if(m_pDns)delete m_pDns;
@ -91,7 +91,7 @@ void KviHttpRequest::resetInternalStatus()
KviThreadManager::killPendingEvents(this); KviThreadManager::killPendingEvents(this);
} }
void KviHttpRequest::resetStatus() void KviHttpRequest::resettqStatus()
{ {
m_szLastError = __tr2qs("No request"); m_szLastError = __tr2qs("No request");
m_uTotalSize = 0; m_uTotalSize = 0;
@ -114,9 +114,9 @@ void KviHttpRequest::resetData()
void KviHttpRequest::reset() void KviHttpRequest::reset()
{ {
resetStatus(); resettqStatus();
resetData(); resetData();
resetInternalStatus(); resetInternaltqStatus();
} }
bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFileName) bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFileName)
@ -131,8 +131,8 @@ bool KviHttpRequest::get(const KviUrl &u,ProcessingType p,const TQString &szFile
bool KviHttpRequest::start() bool KviHttpRequest::start()
{ {
// ensure that the file is closed // ensure that the file is closed
resetInternalStatus(); resetInternaltqStatus();
resetStatus(); resettqStatus();
if(m_eProcessingType == StoreToFile) if(m_eProcessingType == StoreToFile)
{ {
@ -156,15 +156,15 @@ bool KviHttpRequest::start()
if(m_url.host().isEmpty()) if(m_url.host().isEmpty())
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Invalid URL: Missing hostname"); m_szLastError = __tr2qs("Invalid URL: Missing hostname");
return false; return false;
} }
if((!kvi_strEqualCI(m_url.protocol().ptr(),"http")) && (!kvi_strEqualCI(m_url.protocol().ptr(),"https"))) if((!kvi_strEqualCI(m_url.protocol().ptr(),"http")) && (!kvi_strEqualCI(m_url.protocol().ptr(),"https")))
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError=__tr2qs("Unsupported protocol %1").arg(m_url.protocol().ptr()); m_szLastError=__tr2qs("Unsupported protocol %1").tqarg(m_url.protocol().ptr());
return false; return false;
} }
@ -185,7 +185,7 @@ bool KviHttpRequest::startDnsLookup()
if(!m_pDns->lookup(m_url.host().ptr(),KviDns::IpV4)) if(!m_pDns->lookup(m_url.host().ptr(),KviDns::IpV4))
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Unable to start the DNS lookup"); m_szLastError = __tr2qs("Unable to start the DNS lookup");
return false; return false;
} }
@ -212,7 +212,7 @@ void KviHttpRequest::dnsLookupDone(KviDns *d)
haveServerIp(); haveServerIp();
} else { } else {
int iErr = d->error(); int iErr = d->error();
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = KviError::getDescription(iErr); m_szLastError = KviError::getDescription(iErr);
emit terminated(false); emit terminated(false);
} }
@ -242,7 +242,7 @@ void KviHttpRequest::haveServerIp()
if(!m_pThread->start()) if(!m_pThread->start())
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Unable to start the request slave thread"); m_szLastError = __tr2qs("Unable to start the request slave thread");
emit terminated(false); emit terminated(false);
return; return;
@ -318,7 +318,7 @@ bool KviHttpRequest::event(TQEvent *e)
// nothing... just make gcc happy // nothing... just make gcc happy
break; break;
} }
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Success"); m_szLastError = __tr2qs("Success");
emit terminated(true); emit terminated(true);
return true; return true;
@ -328,7 +328,7 @@ bool KviHttpRequest::event(TQEvent *e)
KviStr * err = ((KviThreadDataEvent<KviStr> *)e)->getData(); KviStr * err = ((KviThreadDataEvent<KviStr> *)e)->getData();
m_szLastError = __tr2qs_no_xgettext(err->ptr()); m_szLastError = __tr2qs_no_xgettext(err->ptr());
delete err; delete err;
resetInternalStatus(); resetInternaltqStatus();
emit terminated(false); emit terminated(false);
return true; return true;
} }
@ -409,7 +409,7 @@ bool KviHttpRequest::openFile()
TQString tmp = m_szFileName; TQString tmp = m_szFileName;
do { do {
i++; i++;
m_szFileName = tmp + TQString(".kvirnm-%1").arg(i); m_szFileName = tmp + TQString(".kvirnm-%1").tqarg(i);
} while(KviFile::exists(m_szFileName)); } while(KviFile::exists(m_szFileName));
} }
break; break;
@ -419,13 +419,13 @@ bool KviHttpRequest::openFile()
TQString tmp; TQString tmp;
do { do {
i++; i++;
tmp = m_szFileName + TQString(".kvirnm-%1").arg(i); tmp = m_szFileName + TQString(".kvirnm-%1").tqarg(i);
} while(KviFile::exists(tmp)); } while(KviFile::exists(tmp));
TQDir d; TQDir d;
if(!d.rename(m_szFileName,tmp)) if(!d.rename(m_szFileName,tmp))
{ {
// fail :( // fail :(
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Failed to rename the existing file, please rename manually and retry"); m_szLastError = __tr2qs("Failed to rename the existing file, please rename manually and retry");
emit terminated(false); emit terminated(false);
return false; return false;
@ -443,7 +443,7 @@ bool KviHttpRequest::openFile()
if(!m_pFile->openForWriting(bAppend)) if(!m_pFile->openForWriting(bAppend))
{ {
resetInternalStatus(); resetInternaltqStatus();
KviTQString::sprintf(m_szLastError,__tr2qs("Can't open file \"%Q\" for writing"),&m_szFileName); KviTQString::sprintf(m_szLastError,__tr2qs("Can't open file \"%Q\" for writing"),&m_szFileName);
emit terminated(false); emit terminated(false);
return false; return false;
@ -473,7 +473,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader)
bool bValid = false; bool bValid = false;
unsigned int uStatus = 0; unsigned int utqStatus = 0;
// check the response value // check the response value
if(kvi_strEqualCSN(szResponse.ptr(),"HTTP",4)) if(kvi_strEqualCSN(szResponse.ptr(),"HTTP",4))
@ -486,15 +486,15 @@ bool KviHttpRequest::processHeader(KviStr &szHeader)
if(idx != -1)szNumber = szR.left(idx); if(idx != -1)szNumber = szR.left(idx);
else szNumber = szR; else szNumber = szR;
bool bOk; bool bOk;
uStatus = szNumber.toUInt(&bOk); utqStatus = szNumber.toUInt(&bOk);
if(bOk)bValid = true; if(bOk)bValid = true;
} }
if(!bValid) if(!bValid)
{ {
// the response is invalid ? // the response is invalid ?
resetInternalStatus(); resetInternaltqStatus();
m_szLastError=__tr2qs("Invalid HTTP response: %s").arg(szResponse.ptr()); m_szLastError=__tr2qs("Invalid HTTP response: %s").tqarg(szResponse.ptr());
emit terminated(false); emit terminated(false);
return false; return false;
} }
@ -608,14 +608,14 @@ bool KviHttpRequest::processHeader(KviStr &szHeader)
// case 504: // Gateway timeout // case 504: // Gateway timeout
// case 505: // HTTP Version not supported // case 505: // HTTP Version not supported
if((uStatus != 200) && (uStatus != 206)) if((utqStatus != 200) && (utqStatus != 206))
{ {
// this is not "OK" and not "Partial content" // this is not "OK" and not "Partial content"
// Error , redirect or something confusing // Error , redirect or something confusing
if(m_eProcessingType != HeadersOnly) if(m_eProcessingType != HeadersOnly)
{ {
// this is an error then // this is an error then
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = szResponse.ptr(); m_szLastError = szResponse.ptr();
emit terminated(false); emit terminated(false);
return false; return false;
@ -624,7 +624,7 @@ bool KviHttpRequest::processHeader(KviStr &szHeader)
if((m_uMaxContentLength > 0) && (m_uTotalSize > ((unsigned int)m_uMaxContentLength))) if((m_uMaxContentLength > 0) && (m_uTotalSize > ((unsigned int)m_uMaxContentLength)))
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError=__tr2qs("Stream exceeding maximum length"); m_szLastError=__tr2qs("Stream exceeding maximum length");
emit terminated(false); emit terminated(false);
return false; return false;
@ -657,7 +657,7 @@ void KviHttpRequest::processData(KviDataBuffer * data)
// header not complete // header not complete
if(m_pBuffer->size() > 4096) if(m_pBuffer->size() > 4096)
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Header too long: exceeded 4096 bytes"); m_szLastError = __tr2qs("Header too long: exceeded 4096 bytes");
emit terminated(false); emit terminated(false);
} }
@ -706,7 +706,7 @@ void KviHttpRequest::processData(KviDataBuffer * data)
if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength)))
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError=__tr2qs("Stream exceeded expected length"); m_szLastError=__tr2qs("Stream exceeded expected length");
emit terminated(false); emit terminated(false);
} }
@ -794,7 +794,7 @@ void KviHttpRequest::processData(KviDataBuffer * data)
m_uRemainingChunkSize = szHexHeader.toLong(&bOk,16); m_uRemainingChunkSize = szHexHeader.toLong(&bOk,16);
if(!bOk) if(!bOk)
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Protocol error: invalid chunk size"); m_szLastError = __tr2qs("Protocol error: invalid chunk size");
emit terminated(false); emit terminated(false);
return; return;
@ -814,7 +814,7 @@ void KviHttpRequest::processData(KviDataBuffer * data)
// chunk header not complete // chunk header not complete
if(m_pBuffer->size() > 4096) if(m_pBuffer->size() > 4096)
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError = __tr2qs("Chunk header too long: exceeded 4096 bytes"); m_szLastError = __tr2qs("Chunk header too long: exceeded 4096 bytes");
emit terminated(false); emit terminated(false);
return; return;
@ -848,7 +848,7 @@ check_stream_length:
if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength))) if(((m_uTotalSize > 0) && (m_uReceivedSize > m_uTotalSize)) || ((m_uMaxContentLength > 0) && (m_uReceivedSize > m_uMaxContentLength)))
{ {
resetInternalStatus(); resetInternaltqStatus();
m_szLastError=__tr2qs("Stream exceeded expected length"); m_szLastError=__tr2qs("Stream exceeded expected length");
emit terminated(false); emit terminated(false);
} }

@ -104,9 +104,9 @@ protected:
bool openFile(); bool openFile();
void emitLines(KviDataBuffer * pDataBuffer); void emitLines(KviDataBuffer * pDataBuffer);
void resetStatus(); void resettqStatus();
void resetData(); void resetData();
void resetInternalStatus(); void resetInternaltqStatus();
protected slots: protected slots:
void dnsLookupDone(KviDns *d); void dnsLookupDone(KviDns *d);
void haveServerIp(); void haveServerIp();

@ -34,7 +34,7 @@
#include "kvi_locale.h" #include "kvi_locale.h"
#include <tqglobal.h> //for debug() #include <tqglobal.h> //for debug()
#include <textcodec.h> #include <tqtextcodec.h>
#include <tqdir.h> #include <tqdir.h>
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
@ -957,9 +957,9 @@ namespace KviLocale
// first of all try to find out the current locale // first of all try to find out the current locale
g_szLang=""; g_szLang="";
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homePath()); TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homePath());
#else #else
TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homeDirPath()); TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath());
#endif #endif
if(KviFileUtils::fileExists(szLangFile)) if(KviFileUtils::fileExists(szLangFile))
{ {

@ -324,7 +324,7 @@
&& d->exclusive && d->exclusive->d && d->exclusive && d->exclusive->d
&& d->exclusive->d->exclusive == this) && d->exclusive->d->exclusive == this)
d->exclusive->turnOffChild(); d->exclusive->turnOffChild();
d->exclusive = 0; // so the children won't try to access us. d->exclusive = 0; // so the tqchildren won't try to access us.
delete d; delete d;
d = 0; d = 0;
} }
@ -403,7 +403,7 @@
updateController(update, store); updateController(update, store);
} else { } else {
// if there are no children we simply set the CheckBoxController and update its parent // if there are no tqchildren we simply set the CheckBoxController and update its parent
setCurrentState(s); setCurrentState(s);
stateChange(state()); stateChange(state());
if (parent() && parent()->rtti() == 1 if (parent() && parent()->rtti() == 1
@ -430,7 +430,7 @@
} }
stateChange(state()); stateChange(state());
} }
repaint(); tqrepaint();
} }
void KviTalCheckListItem::setCurrentState(ToggleState s) void KviTalCheckListItem::setCurrentState(ToggleState s)
@ -479,7 +479,7 @@
return; return;
TQPoint pos; TQPoint pos;
int boxsize = lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv);
if (activatedPos(pos)) { if (activatedPos(pos)) {
bool parentControl = false; bool parentControl = false;
if (parent() && parent()->rtti() == 1 && if (parent() && parent()->rtti() == 1 &&
@ -551,13 +551,13 @@
case CheckBox: case CheckBox:
setCurrentState(storedState(key)); setCurrentState(storedState(key));
stateChange(state()); stateChange(state());
repaint(); tqrepaint();
break; break;
case CheckBoxController: { case CheckBoxController: {
KviTalListViewItem *item = firstChild(); KviTalListViewItem *item = firstChild();
int childCount = 0; int childCount = 0;
while (item) { while (item) {
// recursively calling restoreState for children of type CheckBox and CheckBoxController // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController
if (item->rtti() == 1 && if (item->rtti() == 1 &&
(((KviTalCheckListItem*)item)->type() == CheckBox || (((KviTalCheckListItem*)item)->type() == CheckBox ||
((KviTalCheckListItem*)item)->type() == CheckBoxController)) { ((KviTalCheckListItem*)item)->type() == CheckBoxController)) {
@ -572,7 +572,7 @@
else else
updateController(false); updateController(false);
} else { } else {
// if there are no children we retrieve the CheckBoxController state directly. // if there are no tqchildren we retrieve the CheckBoxController state directly.
setState(storedState(key), true, false); setState(storedState(key), true, false);
} }
} }
@ -622,7 +622,7 @@
if (update && controller) { if (update && controller) {
controller->updateController(update, store); controller->updateController(update, store);
} }
repaint(); tqrepaint();
} }
} }
@ -642,7 +642,7 @@
} }
item = item->nextSibling(); item = item->nextSibling();
} }
// this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren.
setStoredState(internalState() , key); setStoredState(internalState() , key);
} }
@ -652,7 +652,7 @@
int h = height(); int h = height();
KviTalListView *lv = listView(); KviTalListView *lv = listView();
if (lv) if (lv)
h = qMax(lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv), h = qMax(lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv),
h); h);
h = qMax(h, TQApplication::globalStrut().height()); h = qMax(h, TQApplication::globalStrut().height());
setHeight(h); setHeight(h);
@ -666,7 +666,7 @@
if (myType == RadioButtonController && pixmap(0)) { if (myType == RadioButtonController && pixmap(0)) {
// r += 0; // r += 0;
} else { } else {
r += lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4; r += lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv) + 4;
} }
} }
return qMax(r, TQApplication::globalStrut().width()); return qMax(r, TQApplication::globalStrut().width());
@ -700,7 +700,7 @@
parentControl = true; parentControl = true;
TQFontMetrics fm(lv->fontMetrics()); TQFontMetrics fm(lv->fontMetrics());
int boxsize = lv->tqstyle()->pixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : int boxsize = lv->tqstyle()->tqpixelMetric(myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize :
TQStyle::PM_CheckListButtonSize, 0, lv); TQStyle::PM_CheckListButtonSize, 0, lv);
int marg = lv->itemMargin(); int marg = lv->itemMargin();
int r = marg; int r = marg;
@ -782,7 +782,7 @@
(lv->rootIsDecorated() || myType == RadioButton || (lv->rootIsDecorated() || myType == RadioButton ||
(myType == CheckBox && parentControl))) { (myType == CheckBox && parentControl))) {
TQRect rect; TQRect rect;
int boxsize = lv->tqstyle()->pixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv); int boxsize = lv->tqstyle()->tqpixelMetric(TQStyle::PM_CheckListButtonSize, 0, lv);
if (lv->columnAlignment(0) == TQt::AlignCenter) { if (lv->columnAlignment(0) == TQt::AlignCenter) {
TQFontMetrics fm(lv->font()); TQFontMetrics fm(lv->font());
int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize;
@ -1056,7 +1056,7 @@
&& d->exclusive && d->exclusive->d && d->exclusive && d->exclusive->d
&& d->exclusive->d->exclusive == this ) && d->exclusive->d->exclusive == this )
d->exclusive->turnOffChild(); d->exclusive->turnOffChild();
d->exclusive = 0; // so the children won't try to access us. d->exclusive = 0; // so the tqchildren won't try to access us.
if ( d->statesDict ) if ( d->statesDict )
delete d->statesDict; delete d->statesDict;
delete d; delete d;
@ -1137,7 +1137,7 @@
updateController( update, store ); updateController( update, store );
} else { } else {
// if there are no children we simply set the CheckBoxController and update its parent // if there are no tqchildren we simply set the CheckBoxController and update its parent
setCurrentState( s ); setCurrentState( s );
stateChange( state() ); stateChange( state() );
if ( parent() && parent()->rtti() == 1 if ( parent() && parent()->rtti() == 1
@ -1164,7 +1164,7 @@
} }
stateChange( state() ); stateChange( state() );
} }
repaint(); tqrepaint();
} }
void KviTalCheckListItem::setCurrentState( ToggleState s ) void KviTalCheckListItem::setCurrentState( ToggleState s )
@ -1216,7 +1216,7 @@
return; return;
TQPoint pos; TQPoint pos;
int boxsize = lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv);
if ( activatedPos( pos ) ) { if ( activatedPos( pos ) ) {
bool parentControl = FALSE; bool parentControl = FALSE;
if ( parent() && parent()->rtti() == 1 && if ( parent() && parent()->rtti() == 1 &&
@ -1287,13 +1287,13 @@
case CheckBox: case CheckBox:
setCurrentState( storedState( key ) ); setCurrentState( storedState( key ) );
stateChange( state() ); stateChange( state() );
repaint(); tqrepaint();
break; break;
case CheckBoxController: { case CheckBoxController: {
KviTalListViewItem *item = firstChild(); KviTalListViewItem *item = firstChild();
int childCount = 0; int childCount = 0;
while ( item ) { while ( item ) {
// recursively calling restoreState for children of type CheckBox and CheckBoxController // recursively calling restoreState for tqchildren of type CheckBox and CheckBoxController
if ( item->rtti() == 1 && if ( item->rtti() == 1 &&
( ((KviTalCheckListItem*)item)->type() == CheckBox || ( ((KviTalCheckListItem*)item)->type() == CheckBox ||
((KviTalCheckListItem*)item)->type() == CheckBoxController ) ) { ((KviTalCheckListItem*)item)->type() == CheckBoxController ) ) {
@ -1308,7 +1308,7 @@
else else
updateController( FALSE ); updateController( FALSE );
} else { } else {
// if there are no children we retrieve the CheckBoxController state directly. // if there are no tqchildren we retrieve the CheckBoxController state directly.
setState( storedState( key ), TRUE, FALSE ); setState( storedState( key ), TRUE, FALSE );
} }
} }
@ -1358,7 +1358,7 @@
if ( update && controller ) { if ( update && controller ) {
controller->updateController( update, store ); controller->updateController( update, store );
} }
repaint(); tqrepaint();
} }
} }
@ -1378,7 +1378,7 @@
} }
item = item->nextSibling(); item = item->nextSibling();
} }
// this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController children. // this state is only needed if the CheckBoxController has no CheckBox / CheckBoxController tqchildren.
setStoredState( internalState() , key ); setStoredState( internalState() , key );
} }
@ -1388,7 +1388,7 @@
int h = height(); int h = height();
KviTalListView *lv = listView(); KviTalListView *lv = listView();
if ( lv ) if ( lv )
h = TQMAX( lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv), h = TQMAX( lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv),
h ); h );
h = TQMAX( h, TQApplication::globalStrut().height() ); h = TQMAX( h, TQApplication::globalStrut().height() );
setHeight( h ); setHeight( h );
@ -1402,7 +1402,7 @@
if ( myType == RadioButtonController && pixmap( 0 ) ) { if ( myType == RadioButtonController && pixmap( 0 ) ) {
// r += 0; // r += 0;
} else { } else {
r += lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; r += lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4;
} }
} }
return TQMAX( r, TQApplication::globalStrut().width() ); return TQMAX( r, TQApplication::globalStrut().width() );
@ -1420,7 +1420,7 @@
const BackgroundMode bgmode = lv->viewport()->backgroundMode(); const BackgroundMode bgmode = lv->viewport()->backgroundMode();
const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode );
if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) ) if ( cg.brush( crole ) != lv->tqcolorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), cg.brush( crole ) ); p->fillRect( 0, 0, width, height(), cg.brush( crole ) );
else else
lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) ); lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
@ -1437,7 +1437,7 @@
parentControl = TRUE; parentControl = TRUE;
TQFontMetrics fm( lv->fontMetrics() ); TQFontMetrics fm( lv->fontMetrics() );
int boxsize = lv->tqstyle().pixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize : int boxsize = lv->tqstyle().tqpixelMetric( myType == RadioButtonController ? TQStyle::PM_CheckListControllerSize :
TQStyle::PM_CheckListButtonSize, lv); TQStyle::PM_CheckListButtonSize, lv);
int marg = lv->itemMargin(); int marg = lv->itemMargin();
int r = marg; int r = marg;
@ -1519,7 +1519,7 @@
(lv->rootIsDecorated() || myType == RadioButton || (lv->rootIsDecorated() || myType == RadioButton ||
(myType == CheckBox && parentControl) ) ) { (myType == CheckBox && parentControl) ) ) {
TQRect rect; TQRect rect;
int boxsize = lv->tqstyle().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv);
if ( lv->columnAlignment(0) == AlignCenter ) { if ( lv->columnAlignment(0) == AlignCenter ) {
TQFontMetrics fm( lv->font() ); TQFontMetrics fm( lv->font() );
int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize; int bx = (lv->columnWidth(0) - (boxsize + fm.width(text())))/2 + boxsize;

@ -143,7 +143,7 @@ public:
KviTalCheckListItem( KviTalListView *parent, const TQString &text,const TQPixmap & ); KviTalCheckListItem( KviTalListView *parent, const TQString &text,const TQPixmap & );
~KviTalCheckListItem(); ~KviTalCheckListItem();
void paintCell( TQPainter *,const TQColorGroup & cg,int column, int width, int alignment ); void paintCell( TQPainter *,const TQColorGroup & cg,int column, int width, int tqalignment );
virtual void paintFocus( TQPainter *, const TQColorGroup & cg, virtual void paintFocus( TQPainter *, const TQColorGroup & cg,
const TQRect & r ); const TQRect & r );
int width( const TQFontMetrics&, const KviTalListView*, int column) const; int width( const TQFontMetrics&, const KviTalListView*, int column) const;

@ -152,7 +152,7 @@ public:
~KviTalCheckListItem(); ~KviTalCheckListItem();
void paintCell(TQPainter *, const TQColorGroup & cg, void paintCell(TQPainter *, const TQColorGroup & cg,
int column, int width, int alignment); int column, int width, int tqalignment);
virtual void paintFocus(TQPainter *, const TQColorGroup &cg, virtual void paintFocus(TQPainter *, const TQColorGroup &cg,
const TQRect & r); const TQRect & r);
int width(const TQFontMetrics&, const KviTalListView*, int column) const; int width(const TQFontMetrics&, const KviTalListView*, int column) const;

@ -25,7 +25,7 @@
// //
//============================================================================= //=============================================================================
#include <textedit.h> #include <tqtextedit.h>
class KVILIB_API KviTalTextEdit : public TQTextEdit class KVILIB_API KviTalTextEdit : public TQTextEdit
{ {

@ -49,7 +49,7 @@
{ {
//setFrameStyle(TQFrame::NoFrame); //setFrameStyle(TQFrame::NoFrame);
setObjectName(nam); setObjectName(nam);
if(!layout()) if(!tqlayout())
this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight));
w->addToolBar(dock,this); w->addToolBar(dock,this);
} }
@ -58,14 +58,14 @@
{ {
//setFrameStyle(TQFrame::NoFrame); //setFrameStyle(TQFrame::NoFrame);
setObjectName(name); setObjectName(name);
if(!layout()) if(!tqlayout())
this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight)); this->setLayout(new TQBoxLayout(TQBoxLayout::LeftToRight));
w->addToolBar(this); w->addToolBar(this);
} }
TQBoxLayout * KviTalToolBar::boxLayout() TQBoxLayout * KviTalToolBar::boxLayout()
{ {
return (TQBoxLayout*)this->layout(); return (TQBoxLayout*)this->tqlayout();
} }
void KviTalToolBar::setBoxLayout(TQBoxLayout * l) void KviTalToolBar::setBoxLayout(TQBoxLayout * l)

@ -39,11 +39,11 @@
#else #else
#include <tqlabel.h> #include <tqlabel.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <layout.h> #include <tqlayout.h>
#include <tqevent.h> #include <tqevent.h>
#include <tqframe.h> #include <tqframe.h>
#include <tqwidgetstack.h> #include <tqwidgetstack.h>
#include <palette.h> #include <tqpalette.h>
#endif #endif
@ -184,7 +184,7 @@ KviTalWizard::KviTalWizard(TQWidget * pParent)
#endif #endif
m_p->pStepsLabel = new TQLabel(this); m_p->pStepsLabel = new TQLabel(this);
m_p->pStepsLabel->setMinimumWidth(80); m_p->pStepsLabel->setMinimumWidth(80);
m_p->pStepsLabel->setAlignment(TQt::AlignRight); m_p->pStepsLabel->tqsetAlignment(TQt::AlignRight);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3); m_p->pLayout->addWidget(m_p->pStepsLabel,0,4,1,3);
#else #else
@ -413,7 +413,7 @@ void KviTalWizard::setCurrentPage(KviTalWizardPageData * pData)
szSteps = "<nobr><font color=\""; szSteps = "<nobr><font color=\"";
szSteps += clrMid.name(); szSteps += clrMid.name();
szSteps += "\"><b>["; szSteps += "\"><b>[";
szSteps += TQString("Step %1 of %2").arg(pData->iVisibleIndex).arg(m_p->iEnabledPageCount); szSteps += TQString("Step %1 of %2").tqarg(pData->iVisibleIndex).tqarg(m_p->iEnabledPageCount);
szSteps += "]</b></font></nobr>"; szSteps += "]</b></font></nobr>";
} }

@ -94,9 +94,9 @@
#include <tq3mimefactory.h> #include <tq3mimefactory.h>
#endif #endif
#include "kvi_tal_listbox.h" #include "kvi_tal_listbox.h"
#include <clipboard.h> #include <tqclipboard.h>
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <tqmetaobject.h> #include <tqmetaobject.h>
#ifdef COMPILE_SSL_SUPPORT #ifdef COMPILE_SSL_SUPPORT
@ -112,7 +112,7 @@
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <TQTextDocument> #include <TQTextDocument>
#else #else
#include <stylesheet.h> #include <tqstylesheet.h>
#endif #endif
KVIRC_API KviApp * g_pApp = 0; // global application pointer KVIRC_API KviApp * g_pApp = 0; // global application pointer
@ -228,7 +228,7 @@ void KviApp::setup()
//need to load image plugins:( //need to load image plugins:(
TQString szPluginsDir; TQString szPluginsDir;
getGlobalKvircDirectory(szPluginsDir,None,"qt-plugins/"); getGlobalKvircDirectory(szPluginsDir,None,"qt-plugins/");
setLibraryPaths(TQStringList(szPluginsDir)); tqsetLibraryPaths(TQStringList(szPluginsDir));
//KviMessageBox::information(libraryPaths().join(";")); //KviMessageBox::information(libraryPaths().join(";"));
//debug("%1",loader.isLoaded()); //debug("%1",loader.isLoaded());
#endif #endif
@ -696,11 +696,11 @@ void KviApp::contextSensitiveHelp()
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4
// the F1 Key has been pressed // the F1 Key has been pressed
// try to pass it to the active widget or one of its parents // try to pass it to the active widget or one of its parents
TQWidget * w = g_pApp->focusWidget(); TQWidget * w = g_pApp->tqfocusWidget();
while(w) while(w)
{ {
//TQVariant v = w->property("contextSensitiveHelp"); <-- this prints a lot of warnings: this is a QT BUG //TQVariant v = w->property("contextSensitiveHelp"); <-- this prints a lot of warnings: this is a QT BUG
TQMetaObject * o = w->metaObject(); TQMetaObject * o = w->tqmetaObject();
if(o) if(o)
{ {
int i = o->findProperty("contextSensitiveHelp",true); int i = o->findProperty("contextSensitiveHelp",true);
@ -916,8 +916,8 @@ TQString KviApp::getClipboardText()
return buffer; return buffer;
*/ */
TQString buffer = clipboard()->text(TQClipboard::Clipboard); TQString buffer = tqclipboard()->text(TQClipboard::Clipboard);
if(buffer.isEmpty())return clipboard()->text(TQClipboard::Selection); if(buffer.isEmpty())return tqclipboard()->text(TQClipboard::Selection);
return buffer; return buffer;
} }
@ -945,8 +945,8 @@ void KviApp::setClipboardText(const TQString &str)
#if [[[TQT_VERSION IS DEPRECATED]]] >= 300 #if [[[TQT_VERSION IS DEPRECATED]]] >= 300
} }
#endif*/ #endif*/
clipboard()->setText(str,TQClipboard::Clipboard); tqclipboard()->setText(str,TQClipboard::Clipboard);
clipboard()->setText(str,TQClipboard::Selection); tqclipboard()->setText(str,TQClipboard::Selection);
} }
void KviApp::setClipboardText(const KviStr &str) void KviApp::setClipboardText(const KviStr &str)
@ -1038,7 +1038,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const TQString &szRemoteUrl,co
if(szNick.isEmpty()) if(szNick.isEmpty())
szMsg = __tr2qs("File download failed"); szMsg = __tr2qs("File download failed");
else else
szMsg = __tr2qs("File download from %1 failed").arg(szNick); szMsg = __tr2qs("File download from %1 failed").tqarg(szNick);
szMsg += ": "; szMsg += ": ";
szMsg += szError; szMsg += szError;
szMsg += " ("; szMsg += " (";
@ -1049,7 +1049,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const TQString &szRemoteUrl,co
if(szNick.isEmpty()) if(szNick.isEmpty())
szMsg = __tr2qs("File download successfully complete"); szMsg = __tr2qs("File download successfully complete");
else else
szMsg = __tr2qs("File download from %1 successfully complete").arg(szNick); szMsg = __tr2qs("File download from %1 successfully complete").tqarg(szNick);
szMsg += " ("; szMsg += " (";
szMsg += szLocalFileName; szMsg += szLocalFileName;
szMsg += ")"; szMsg += ")";
@ -1117,7 +1117,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const TQString &szRemoteUrl,co
#endif #endif
rinfo.activate(); rinfo.activate();
TQString name = TQString("DESKTOP%1").arg(rinfo.currentDesktop()); TQString name = TQString("DESKTOP%1").tqarg(rinfo.currentDesktop());
g_pKdeDesktopBackground = new KSharedPixmap(); g_pKdeDesktopBackground = new KSharedPixmap();
connect(g_pKdeDesktopBackground,TQT_SIGNAL(done(bool)),this,TQT_SLOT(kdeRootPixmapDownloadComplete(bool))); connect(g_pKdeDesktopBackground,TQT_SIGNAL(done(bool)),this,TQT_SLOT(kdeRootPixmapDownloadComplete(bool)));
@ -1141,7 +1141,7 @@ void KviApp::fileDownloadTerminated(bool bSuccess,const TQString &szRemoteUrl,co
return; return;
} }
if(!g_pKdeDesktopBackground->loadFromShared(TQString("DESKTOP%1").arg(rinfo.currentDesktop()))) if(!g_pKdeDesktopBackground->loadFromShared(TQString("DESKTOP%1").tqarg(rinfo.currentDesktop())))
{ {
debug("Can't load the KDE root background image..."); debug("Can't load the KDE root background image...");
delete g_pKdeDesktopBackground; delete g_pKdeDesktopBackground;
@ -1368,7 +1368,7 @@ void KviApp::updateApplicationFont()
if(KVI_OPTION_BOOL(KviOption_boolUseGlobalApplicationFont)) if(KVI_OPTION_BOOL(KviOption_boolUseGlobalApplicationFont))
{ {
if(font() != KVI_OPTION_FONT(KviOption_fontApplication)) if(font() != KVI_OPTION_FONT(KviOption_fontApplication))
setFont(KVI_OPTION_FONT(KviOption_fontApplication),true); tqsetFont(KVI_OPTION_FONT(KviOption_fontApplication),true);
} }
// FIXME: #warning "And what if this option is turned off ?...a reboot only" // FIXME: #warning "And what if this option is turned off ?...a reboot only"
} }

@ -228,7 +228,7 @@ bool KviApp::trashFile(const char *filename)
KviStr lastPart = filename; KviStr lastPart = filename;
lastPart.cutToLast(KVI_PATH_SEPARATOR_CHAR); // need only the filename lastPart.cutToLast(KVI_PATH_SEPARATOR_CHAR); // need only the filename
lastPart.append(".bak_"); lastPart.append(".bak_");
TQDateTime tm(TQDateTime::currentDateTime()); TQDateTime tm(TQDateTime::tqcurrentDateTime());
lastPart.append(tm.toString()); lastPart.append(tm.toString());
lastPart.replaceAll(' ',"_"); lastPart.replaceAll(' ',"_");
// Ok...have lastPart.bak_Dec_11_31_1999 // Ok...have lastPart.bak_Dec_11_31_1999

@ -27,7 +27,7 @@
//#define _KVI_DEBUG_CHECK_RANGE_ //#define _KVI_DEBUG_CHECK_RANGE_
//#include "kvi_debug.h" //#include "kvi_debug.h"
#include <textcodec.h> #include <tqtextcodec.h>
#include "kvi_settings.h" #include "kvi_settings.h"
#include "kvi_defaults.h" #include "kvi_defaults.h"
@ -63,7 +63,7 @@
#endif //COMPILE_ON_WINDOWS #endif //COMPILE_ON_WINDOWS
#include <tqfile.h> #include <tqfile.h>
#include <textstream.h> #include <tqtextstream.h>
#include <tqdir.h> #include <tqdir.h>

@ -958,7 +958,7 @@ void KviChangeUserModeAction::popupAboutToShow()
{ {
TQChar ccc = szModes[0]; TQChar ccc = szModes[0];
szModes.remove(0,1); szModes.remove(0,1);
id = m_pPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MODE)),TQString("+%1 Mode").arg(ccc)); id = m_pPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_MODE)),TQString("+%1 Mode").tqarg(ccc));
m_pPopup->setItemChecked(id,c->connection()->userInfo()->hasUserMode(ccc.latin1())); m_pPopup->setItemChecked(id,c->connection()->userInfo()->hasUserMode(ccc.latin1()));
} }
} }

@ -127,7 +127,7 @@ void KviCustomToolBarDescriptor::fillToolBar()
{ {
if(m_pActions->count() == 0) if(m_pActions->count() == 0)
{ {
// force layout of the toolbar // force tqlayout of the toolbar
TQApplication::postEvent(m_pToolBar,new TQEvent(TQEvent::LayoutHint)); TQApplication::postEvent(m_pToolBar,new TQEvent(TQEvent::LayoutHint));
} else { } else {
KviPointerList<TQString> dying; KviPointerList<TQString> dying;

@ -186,5 +186,5 @@ int KviFileTransfer::displayHeight(int iLineSpacing)
void KviFileTransfer::displayUpdate() void KviFileTransfer::displayUpdate()
{ {
if(m_pDisplayItem)m_pDisplayItem->repaint(); if(m_pDisplayItem)m_pDisplayItem->tqrepaint();
} }

@ -36,7 +36,7 @@
#include "kvi_fileutils.h" #include "kvi_fileutils.h"
#include "kvi_options.h" #include "kvi_options.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4

@ -108,21 +108,21 @@
} }
Window root,parent; Window root,parent;
Window * children; Window * tqchildren;
unsigned int nChildren; unsigned int nChildren;
if(!XQueryTree(kvi_ipc_get_xdisplay(),win,&root,&parent,&children,&nChildren)) if(!XQueryTree(kvi_ipc_get_xdisplay(),win,&root,&parent,&tqchildren,&nChildren))
{ {
if(children)XFree((char *)children); if(tqchildren)XFree((char *)tqchildren);
return 0; return 0;
} }
Window found = 0; Window found = 0;
for(int i=nChildren-1;(!found) && (i >= 0);i--) for(int i=nChildren-1;(!found) && (i >= 0);i--)
found = kvi_x11_findIpcSentinel(children[i]); found = kvi_x11_findIpcSentinel(tqchildren[i]);
if(children)XFree((char *)children); if(tqchildren)XFree((char *)tqchildren);
return found; return found;
} }

@ -67,7 +67,7 @@
#include "kvi_useridentity.h" #include "kvi_useridentity.h"
#include <tqtimer.h> #include <tqtimer.h>
#include <textcodec.h> #include <tqtextcodec.h>
extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase; extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase;
extern KVIRC_API KviProxyDataBase * g_pProxyDataBase; extern KVIRC_API KviProxyDataBase * g_pProxyDataBase;
@ -981,10 +981,10 @@ void KviIrcConnection::loginToIrcServer()
if(KVI_OPTION_BOOL(KviOption_boolPrependGenderInfoToRealname) && !KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).isEmpty()) if(KVI_OPTION_BOOL(KviOption_boolPrependGenderInfoToRealname) && !KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).isEmpty())
{ {
szGenderTag.append(KVI_TEXT_COLOR); szGenderTag.append(KVI_TEXT_COLOR);
if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("m",false)) if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("m",false))
{ {
szGenderTag.append("1"); szGenderTag.append("1");
} else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("f",false)) } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("f",false))
{ {
szGenderTag.append("2"); szGenderTag.append("2");
} }
@ -1017,9 +1017,9 @@ void KviIrcConnection::loginToIrcServer()
} }
} // else buuug } // else buuug
if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("m",false)){ if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("m",false)){
e->setGender(KviIrcUserEntry::Male); e->setGender(KviIrcUserEntry::Male);
} else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("f",false)){ } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("f",false)){
e->setGender(KviIrcUserEntry::Female); e->setGender(KviIrcUserEntry::Female);
} }

@ -67,7 +67,7 @@ void KviIrcConnectionServerInfo::setSupportedChannelModes(const TQString &szSupp
m_bSupportsModesIe = (szSupportedChannelModes.contains('e') && szSupportedChannelModes.contains('I')); m_bSupportsModesIe = (szSupportedChannelModes.contains('e') && szSupportedChannelModes.contains('I'));
TQChar* aux=(TQChar*)szSupportedChannelModes.ucs2(); TQChar* aux=(TQChar*)szSupportedChannelModes.ucs2();
while(aux->unicode()) while(aux->tqunicode())
{ {
if(!m_szSupportedChannelModes.contains(*aux)) if(!m_szSupportedChannelModes.contains(*aux))
m_szSupportedChannelModes.append(*aux); m_szSupportedChannelModes.append(*aux);
@ -98,7 +98,7 @@ void KviIrcConnectionServerInfo::buildModePrefixTable()
// Alexey: FIXED: rethinked:) // Alexey: FIXED: rethinked:)
// Pragma: LOL :DDDD // Pragma: LOL :DDDD
int i=0; int i=0;
while( (uPrefix = cPrefix->unicode()) && (uFlag = cFlag->unicode()) && i<m_uPrefixes*3) while( (uPrefix = cPrefix->tqunicode()) && (uFlag = cFlag->tqunicode()) && i<m_uPrefixes*3)
{ {
m_pModePrefixTable[i]=uPrefix; m_pModePrefixTable[i]=uPrefix;
m_pModePrefixTable[i+1]=uFlag; m_pModePrefixTable[i+1]=uFlag;
@ -131,7 +131,7 @@ bool KviIrcConnectionServerInfo::isSupportedModePrefix(TQChar c)
if(!m_pModePrefixTable) return false; if(!m_pModePrefixTable) return false;
for(int i=0;i<m_uPrefixes;i++) for(int i=0;i<m_uPrefixes;i++)
{ {
if(m_pModePrefixTable[i*3]==c.unicode()) return true; if(m_pModePrefixTable[i*3]==c.tqunicode()) return true;
} }
return false; return false;
} }
@ -141,7 +141,7 @@ bool KviIrcConnectionServerInfo::isSupportedModeFlag(TQChar c)
if(!m_pModePrefixTable) return false; if(!m_pModePrefixTable) return false;
for(int i=0;i<m_uPrefixes;i++) for(int i=0;i<m_uPrefixes;i++)
{ {
if(m_pModePrefixTable[(i*3)+1]==c.unicode()) return true; if(m_pModePrefixTable[(i*3)+1]==c.tqunicode()) return true;
} }
return false; return false;
} }
@ -171,7 +171,7 @@ kvi_u32_t KviIrcConnectionServerInfo::modeFlagFromPrefixChar(TQChar c)
if(!m_pModePrefixTable) return 0; if(!m_pModePrefixTable) return 0;
for(int i=0;i<m_uPrefixes;i++) for(int i=0;i<m_uPrefixes;i++)
{ {
if(m_pModePrefixTable[i*3]==c.unicode()) return m_pModePrefixTable[i*3+2]; if(m_pModePrefixTable[i*3]==c.tqunicode()) return m_pModePrefixTable[i*3+2];
} }
return 0; return 0;
} }
@ -181,7 +181,7 @@ kvi_u32_t KviIrcConnectionServerInfo::modeFlagFromModeChar(TQChar c)
if(!m_pModePrefixTable) return 0; if(!m_pModePrefixTable) return 0;
for(int i=0;i<m_uPrefixes;i++) for(int i=0;i<m_uPrefixes;i++)
{ {
if(m_pModePrefixTable[i*3+1]==c.unicode()) return m_pModePrefixTable[i*3+2]; if(m_pModePrefixTable[i*3+1]==c.tqunicode()) return m_pModePrefixTable[i*3+2];
} }
return 0; return 0;
} }
@ -225,7 +225,7 @@ const TQString & KviBasicIrcServerInfo::getUserModeDescription(TQChar mode)
const TQString & KviBasicIrcServerInfo::getBasicChannelModeDescription(TQChar mode) const TQString & KviBasicIrcServerInfo::getBasicChannelModeDescription(TQChar mode)
{ {
switch(mode.unicode()) switch(mode.tqunicode())
{ {
case 'o': return __tr2qs("Channel operators"); break; case 'o': return __tr2qs("Channel operators"); break;
case 'v': return __tr2qs("Voiced users"); break; case 'v': return __tr2qs("Voiced users"); break;
@ -265,7 +265,7 @@ const TQString & KviBasicIrcServerInfo::getBasicChannelModeDescription(TQChar mo
const TQString & KviBasicIrcServerInfo::getBasicUserModeDescription(TQChar mode) const TQString & KviBasicIrcServerInfo::getBasicUserModeDescription(TQChar mode)
{ {
switch(mode.unicode()) switch(mode.tqunicode())
{ {
case 'o': return __tr2qs("o: IRC operator (OPER)"); break; case 'o': return __tr2qs("o: IRC operator (OPER)"); break;
case 'O': return __tr2qs("O: Local IRC operator (LOCOP)"); break; case 'O': return __tr2qs("O: Local IRC operator (LOCOP)"); break;

@ -70,7 +70,7 @@ KviIrcConnectionTargetResolver::KviIrcConnectionTargetResolver(KviIrcConnection
m_pServerDns = 0; m_pServerDns = 0;
m_eState = Idle; m_eState = Idle;
m_eStatus = Success; m_etqStatus = Success;
m_iLastError = KviError_success; m_iLastError = KviError_success;
} }
@ -544,12 +544,12 @@ void KviIrcConnectionTargetResolver::haveServerIp()
terminate(Success,KviError_success); terminate(Success,KviError_success);
} }
void KviIrcConnectionTargetResolver::terminate(Status s,int iLastError) void KviIrcConnectionTargetResolver::terminate(tqStatus s,int iLastError)
{ {
__ASSERT(m_eState != Terminated); __ASSERT(m_eState != Terminated);
cleanup(); // do a cleanup anyway cleanup(); // do a cleanup anyway
m_eState = Terminated; m_eState = Terminated;
m_eStatus = s; m_etqStatus = s;
m_iLastError = iLastError; m_iLastError = iLastError;
emit terminated(); emit terminated();
} }

@ -44,13 +44,13 @@ protected:
KviIrcConnectionTargetResolver(KviIrcConnection * pConnection); KviIrcConnectionTargetResolver(KviIrcConnection * pConnection);
~KviIrcConnectionTargetResolver(); ~KviIrcConnectionTargetResolver();
public: public:
enum Status { Success, Error }; enum tqStatus { Success, Error };
enum State { Idle, Running, Terminated }; enum State { Idle, Running, Terminated };
private: private:
KviIrcConnection * m_pConnection; // shallow, never null KviIrcConnection * m_pConnection; // shallow, never null
KviIrcConnectionTarget * m_pTarget; // shallow, never null KviIrcConnectionTarget * m_pTarget; // shallow, never null
KviConsole * m_pConsole; // shallow, never null KviConsole * m_pConsole; // shallow, never null
Status m_eStatus; tqStatus m_etqStatus;
State m_eState; State m_eState;
// Auxiliary stuff // Auxiliary stuff
@ -66,7 +66,7 @@ private:
public: public:
void start(KviIrcConnectionTarget * t); void start(KviIrcConnectionTarget * t);
// valid only after the terminated() signal // valid only after the terminated() signal
Status status(){ return m_eStatus; }; tqStatus status(){ return m_etqStatus; };
int lastError(){ return m_iLastError; }; int lastError(){ return m_iLastError; };
// causes the resolver to terminate with iLastError == KviError_operationAborted // causes the resolver to terminate with iLastError == KviError_operationAborted
// the terminated() signal is emitted. // the terminated() signal is emitted.
@ -81,7 +81,7 @@ private:
void lookupServerHostname(); void lookupServerHostname();
void haveServerIp(); void haveServerIp();
bool validateLocalAddress(const TQString &szAddress,TQString &szBuffer); bool validateLocalAddress(const TQString &szAddress,TQString &szBuffer);
void terminate(Status s,int iLastError); void terminate(tqStatus s,int iLastError);
signals: signals:
void terminated(); void terminated();
}; };

@ -222,7 +222,7 @@ void KviIrcUrl::join(TQString &uri, KviIrcServer* server)
uri.append("://"); uri.append("://");
uri.append(server->hostName()); uri.append(server->hostName());
if(server->port()!=6667) uri.append(TQString(":%1").arg(server->port())); if(server->port()!=6667) uri.append(TQString(":%1").tqarg(server->port()));
uri.append("/"); uri.append("/");
} }
} }
@ -310,7 +310,7 @@ int KviIrcUrl::run(const TQString& text,int contextSpec,KviConsole* pConsole)
szCommand.append(szJoinCommand); szCommand.append(szJoinCommand);
szCommand.append("\" "); szCommand.append("\" ");
} }
szCommand.append(TQString("%1 %2 ").arg(parts.szHost).arg(parts.iPort)); szCommand.append(TQString("%1 %2 ").tqarg(parts.szHost).tqarg(parts.iPort));
if(pConsole->connection()) { if(pConsole->connection()) {
KviIrcServer* server = pConsole->connection()->target()->server(); KviIrcServer* server = pConsole->connection()->target()->server();

@ -367,7 +367,7 @@ int main(int argc,char ** argv)
bool bLocked = false; bool bLocked = false;
if(inf.exists()) if(inf.exists())
{ {
iLocked = inf.lastModified().secsTo(TQDateTime::currentDateTime()); iLocked = inf.lastModified().secsTo(TQDateTime::tqcurrentDateTime());
} }
*/ */

@ -51,7 +51,7 @@
//!xml parser //!xml parser
#include <zlib.h> #include <zlib.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include "kvi_fileutils.h" #include "kvi_fileutils.h"

@ -44,17 +44,17 @@ namespace KviUserInput
if(!c)return true; // empty if(!c)return true; // empty
while(c->isSpace())c++; while(c->isSpace())c++;
if(!c->unicode())return true; // empty if(!c->tqunicode())return true; // empty
if(c->unicode() == '\\') if(c->tqunicode() == '\\')
{ {
c++; c++;
if(c->unicode() != '/')c--; if(c->tqunicode() != '/')c--;
} else { } else {
if(c->unicode() == '/') if(c->tqunicode() == '/')
{ {
c++; c++;
if(c->unicode() != '/') if(c->tqunicode() != '/')
{ {
szData.remove(0,c-b); szData.remove(0,c-b);
return parseCommand(szData,pWindow,szContext,bUserFriendlyCommandline); return parseCommand(szData,pWindow,szContext,bUserFriendlyCommandline);
@ -103,11 +103,11 @@ namespace KviUserInput
const TQChar * beg = aux; const TQChar * beg = aux;
if(!beg)return; // empty if(!beg)return; // empty
while(aux->unicode()) while(aux->tqunicode())
{ {
while(aux->unicode() && (aux->unicode() != '\n'))aux++; while(aux->tqunicode() && (aux->tqunicode() != '\n'))aux++;
TQString buf(beg,aux-beg); TQString buf(beg,aux-beg);
if(aux->unicode() == '\n')aux++; if(aux->tqunicode() == '\n')aux++;
beg = aux; beg = aux;
if(buf.isEmpty())buf = " "; // avoid "No text to send" (d3vah) if(buf.isEmpty())buf = " "; // avoid "No text to send" (d3vah)

@ -55,7 +55,7 @@ KviKvsCallbackObject::~KviKvsCallbackObject()
delete m_pMagicParams; delete m_pMagicParams;
} }
KviKvsCallbackObject::CallbackStatus KviKvsCallbackObject::execute(KviKvsVariantList * pParams,KviKvsVariant * pRetVal) KviKvsCallbackObject::CallbacktqStatus KviKvsCallbackObject::execute(KviKvsVariantList * pParams,KviKvsVariant * pRetVal)
{ {
// first of all check the window // first of all check the window
if(!m_pTargetWindow) if(!m_pTargetWindow)

@ -49,7 +49,7 @@ public:
// the callback is executed in another window (the associated console, if possible, otherwise the first available console) // the callback is executed in another window (the associated console, if possible, otherwise the first available console)
OnlyIfWindowExists = 1 OnlyIfWindowExists = 1
}; };
enum CallbackStatus { enum CallbacktqStatus {
// succesfull execution // succesfull execution
Success, Success,
// error in command // error in command
@ -76,7 +76,7 @@ protected:
unsigned int m_uFlags; unsigned int m_uFlags;
protected: protected:
// the parameter list is always shallow! // the parameter list is always shallow!
CallbackStatus execute(KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0); CallbacktqStatus execute(KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0);
}; };

@ -47,7 +47,7 @@ namespace KviKvsCoreFunctions
// a_f // a_f
_REGFNC("active",active) _REGFNC("active",active)
_REGFNC("array",array) _REGFNC("array",array)
_REGFNC("ascii",unicode) _REGFNC("ascii",tqunicode)
_REGFNC("asciiToHex",asciiToHex) _REGFNC("asciiToHex",asciiToHex)
_REGFNC("asciiToBase64",asciiToBase64) _REGFNC("asciiToBase64",asciiToBase64)
_REGFNC("away",away) _REGFNC("away",away)
@ -121,7 +121,7 @@ namespace KviKvsCoreFunctions
_REGFNC("true",trueCKEYWORDWORKAROUND) _REGFNC("true",trueCKEYWORDWORKAROUND)
_REGFNC("typeof",typeofCKEYWORDWORKAROUND) _REGFNC("typeof",typeofCKEYWORDWORKAROUND)
_REGFNC("u",u) _REGFNC("u",u)
_REGFNC("unicode",unicode) _REGFNC("tqunicode",tqunicode)
_REGFNC("unixtime",unixtime) _REGFNC("unixtime",unixtime)
_REGFNC("unserialize",unserialize) _REGFNC("unserialize",unserialize)
_REGFNC("username",username) _REGFNC("username",username)

@ -131,7 +131,7 @@ namespace KviKvsCoreFunctions
KVSCF(trueCKEYWORDWORKAROUND); KVSCF(trueCKEYWORDWORKAROUND);
KVSCF(typeofCKEYWORDWORKAROUND); KVSCF(typeofCKEYWORDWORKAROUND);
KVSCF(u); KVSCF(u);
KVSCF(unicode); KVSCF(tqunicode);
KVSCF(unixtime); KVSCF(unixtime);
KVSCF(unserialize); KVSCF(unserialize);
KVSCF(username); KVSCF(username);

@ -108,7 +108,7 @@ namespace KviKvsCoreFunctions
@syntax: @syntax:
<variant> $ascii(<char:string>) <variant> $ascii(<char:string>)
@description: @description:
This function has been renamed to $unicode and is present This function has been renamed to $tqunicode and is present
only for backward compatibility. only for backward compatibility.
@seealso: @seealso:
[fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$char[/fnc] [fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$char[/fnc]
@ -489,24 +489,24 @@ namespace KviKvsCoreFunctions
@title: @title:
$char $char
@short: @short:
Returns a character specified by unicode Returns a character specified by tqunicode
@syntax: @syntax:
<string> $char(<unicode_value:integer>) <string> $char(<tqunicode_value:integer>)
@description: @description:
Returns a character corresponding to the UNICODE code <unicode_value>.[br] Returns a character corresponding to the UNICODE code <tqunicode_value>.[br]
This function can not return NUL character (UNICODE 0). Basically This function can not return NUL character (UNICODE 0). Basically
you should never need it: if you do, drop me a mail.[br] you should never need it: if you do, drop me a mail.[br]
If the <unicode_code> is not a valid UNICODE code (or is 0), this function returns If the <tqunicode_code> is not a valid UNICODE code (or is 0), this function returns
an empty string.[br] an empty string.[br]
@seealso: @seealso:
[fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$unicode[/fnc] [fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$tqunicode[/fnc]
*/ */
KVSCF(charCKEYWORDWORKAROUND) KVSCF(charCKEYWORDWORKAROUND)
{ {
kvs_uint_t ac; kvs_uint_t ac;
KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETERS_BEGIN
KVSCF_PARAMETER("unicode_value",KVS_PT_UINT,0,ac) KVSCF_PARAMETER("tqunicode_value",KVS_PT_UINT,0,ac)
KVSCF_PARAMETERS_END KVSCF_PARAMETERS_END
if(ac != 0 && ac < 65536) if(ac != 0 && ac < 65536)
@ -780,15 +780,15 @@ namespace KviKvsCoreFunctions
const TQChar * c = KviTQString::nullTerminatedArray(szFormat); const TQChar * c = KviTQString::nullTerminatedArray(szFormat);
if(c) if(c)
{ {
while(c->unicode()) while(c->tqunicode())
{ {
//Check for right Characters //Check for right Characters
#ifdef COMPILE_ON_WINDOWS #ifdef COMPILE_ON_WINDOWS
if (szAllowedCharacters.find((char)(c->unicode()),0,true) >= 0) tmpFormat += '%'; if (szAllowedCharacters.find((char)(c->tqunicode()),0,true) >= 0) tmpFormat += '%';
#else #else
if (c->isLetter()) tmpFormat += '%'; if (c->isLetter()) tmpFormat += '%';
#endif #endif
tmpFormat += (char)(c->unicode()); tmpFormat += (char)(c->tqunicode());
c++; c++;
} }
} }

@ -401,12 +401,12 @@ namespace KviKvsCoreFunctions
if(szLongSwitch.isEmpty()) if(szLongSwitch.isEmpty())
v = sl->find(szSwitch); v = sl->find(szSwitch);
else else
v = sl->find(szSwitch[0].unicode(),szLongSwitch); v = sl->find(szSwitch[0].tqunicode(),szLongSwitch);
}else { }else {
if(szLongSwitch.isEmpty()) if(szLongSwitch.isEmpty())
v = sl->find(szSwitch[0]); v = sl->find(szSwitch[0]);
else else
v = sl->find(szSwitch[0].unicode(),szLongSwitch); v = sl->find(szSwitch[0].tqunicode(),szLongSwitch);
} }
if(v)KVSCF_pRetBuffer->copyFrom(*v); if(v)KVSCF_pRetBuffer->copyFrom(*v);
@ -842,15 +842,15 @@ namespace KviKvsCoreFunctions
///////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////
/* /*
@doc: unicode @doc: tqunicode
@type: @type:
function function
@title: @title:
$unicode $tqunicode
@short: @short:
Returns the UNICODE code of a sets of characters Returns the UNICODE code of a sets of characters
@syntax: @syntax:
<variant> $unicode(<char:string>) <variant> $tqunicode(<char:string>)
@description: @description:
If <char> is composed only of a single character If <char> is composed only of a single character
then returns its UNICODE code point as an integer. then returns its UNICODE code point as an integer.
@ -860,7 +860,7 @@ namespace KviKvsCoreFunctions
[fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$char[/fnc] [fnc]$cr[/fnc], [fnc]$lf[/fnc], [fnc]$char[/fnc]
*/ */
KVSCF(unicode) KVSCF(tqunicode)
{ {
TQString sz; TQString sz;
KVSCF_PARAMETERS_BEGIN KVSCF_PARAMETERS_BEGIN
@ -871,10 +871,10 @@ namespace KviKvsCoreFunctions
{ {
KviKvsArray * a = new KviKvsArray(); KviKvsArray * a = new KviKvsArray();
for(kvs_int_t i=0;i<sz.length();i++) for(kvs_int_t i=0;i<sz.length();i++)
a->set(i,new KviKvsVariant((kvs_int_t)(sz[(int)i].unicode()))); a->set(i,new KviKvsVariant((kvs_int_t)(sz[(int)i].tqunicode())));
KVSCF_pRetBuffer->setArray(a); KVSCF_pRetBuffer->setArray(a);
} else { } else {
KVSCF_pRetBuffer->setInteger((kvs_int_t)(sz[0].unicode())); KVSCF_pRetBuffer->setInteger((kvs_int_t)(sz[0].tqunicode()));
} }
return true; return true;
} }

@ -427,7 +427,7 @@ namespace KviKvsCoreSimpleCommands
// TQChar o = tbOp.length() > 0 ? tbOp[0] : TQChar('x'); // TQChar o = tbOp.length() > 0 ? tbOp[0] : TQChar('x');
switch(o.unicode()) switch(o.tqunicode())
{ {
case 't': case 't':
KviTalToolTip::remove(pButton); KviTalToolTip::remove(pButton);
@ -853,7 +853,7 @@ namespace KviKvsCoreSimpleCommands
{ {
TQString szWnd; TQString szWnd;
v->asString(szWnd); v->asString(szWnd);
//#warning "FIXME: the window database is not unicode! (we even could keep integer window id's at this point!)" //#warning "FIXME: the window database is not tqunicode! (we even could keep integer window id's at this point!)"
pWnd = g_pApp->findWindow(szWnd.utf8().data()); pWnd = g_pApp->findWindow(szWnd.utf8().data());
if(!pWnd) if(!pWnd)
{ {

@ -673,7 +673,7 @@ namespace KviKvsCoreSimpleCommands
to load catalogues that reside in different directories.[br] to load catalogues that reside in different directories.[br]
[b]NOTE[/b][br] [b]NOTE[/b][br]
This feature is currently work in progress: the scripting engine This feature is currently work in progress: the scripting engine
is not yet fully unicode and thus some more exotic translations may still suffer... is not yet fully tqunicode and thus some more exotic translations may still suffer...
@seealso: @seealso:
[fnc]$tr[/fnc], [cmd]trunload[/cmd] [fnc]$tr[/fnc], [cmd]trunload[/cmd]
*/ */

@ -254,7 +254,7 @@ KviKvsEvent KviKvsEventManager::m_appEventTable[KVI_NUM_SCRIPT_EVENTS]=
@description: @description:
This event is triggered in the first console of a new frame window. This event is triggered in the first console of a new frame window.
A frame window is the toplevel window that contains the consoles A frame window is the toplevel window that contains the consoles
and the other MDI children windows. and the other MDI tqchildren windows.
@seealso: @seealso:
[event:onframewindowdestroyed]OnFrameWindowDestroyed[/event] [event:onframewindowdestroyed]OnFrameWindowDestroyed[/event]
*/ */

@ -69,11 +69,11 @@
[big]Basic concepts[/big] [big]Basic concepts[/big]
Objects are arranged in tree structures. Objects are arranged in tree structures.
Each object that you create is either toplevel object or a children Each object that you create is either toplevel object or a tqchildren
of another object. A toplevel object is a parentless one. of another object. A toplevel object is a parentless one.
Obviously all objects can have children objects.[br][br] Obviously all objects can have tqchildren objects.[br][br]
When an object is destroyed , all its children are also destroyed. When an object is destroyed , all its tqchildren are also destroyed.
The toplevel objects are automatically destroyed when KVIrc quits. The toplevel objects are automatically destroyed when KVIrc quits.
The objects are global to the entire application (this is different The objects are global to the entire application (this is different
from previous KVIrc releases where the objects were local from previous KVIrc releases where the objects were local
@ -121,7 +121,7 @@
[example] [example]
[cmd]delete[/cmd] %myobject [cmd]delete[/cmd] %myobject
[/example] [/example]
If the destroyed object has children objects , these are destroyed too.[br][br] If the destroyed object has tqchildren objects , these are destroyed too.[br][br]
[big]Fields : objects as pseudo-structures[/big] [big]Fields : objects as pseudo-structures[/big]
@ -196,15 +196,15 @@
[cmd]delete[/cmd] %tmp [cmd]delete[/cmd] %tmp
[/example] [/example]
Another cool function exported by the [class:object]object[/class] class is the Another cool function exported by the [class:object]object[/class] class is the
[classfnc:object]$children[/classfnc]() function. [classfnc:object]$tqchildren[/classfnc]() function.
It returns a comma separated list of children identifiers.[br] It returns a comma separated list of tqchildren identifiers.[br]
[example] [example]
%tmp = [fnc]$new[/fnc]([class]object[/class],0,myobject) %tmp = [fnc]$new[/fnc]([class]object[/class],0,myobject)
%tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child1) %tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child1)
%tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child2) %tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child2)
%tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child3) %tmpchild = [fnc]$new[/fnc]([class]object[/class],%tmp,child3)
[cmd]echo[/cmd] The object's children list is : %tmp->[classfnc:object]$children[/classfnc]() [cmd]echo[/cmd] The object's tqchildren list is : %tmp->[classfnc:object]$tqchildren[/classfnc]()
# Destroy the object and the children # Destroy the object and the tqchildren
[cmd]delete[/cmd] %tmp [cmd]delete[/cmd] %tmp
[/example] [/example]
There are two special functions for each objects: the "constructor" and the "destructor". There are two special functions for each objects: the "constructor" and the "destructor".
@ -230,25 +230,25 @@
[cmd]privateimpl[/cmd](%tmp,destructor) [cmd]privateimpl[/cmd](%tmp,destructor)
{ {
%count = 0; %count = 0;
[cmd]foreach[/cmd](%t,[fnc]$this[/fnc]-&gt;[classfnc:object]$children[/classfnc]()) [cmd]foreach[/cmd](%t,[fnc]$this[/fnc]-&gt;[classfnc:object]$tqchildren[/classfnc]())
{ {
[cmd]echo[/cmd] Children : %t-&gt;[classfnc:object]$name[/classfnc]() with class %t-&gt;[classfnc:object]$class[/classfnc]() [cmd]echo[/cmd] Children : %t-&gt;[classfnc:object]$name[/classfnc]() with class %t-&gt;[classfnc:object]$class[/classfnc]()
%count++ %count++
} }
[cmd]echo[/cmd] Just before destroying my %count children. [cmd]echo[/cmd] Just before destroying my %count tqchildren.
} }
# Destroy the object and the children # Destroy the object and the tqchildren
[cmd]delete[/cmd] %tmp [cmd]delete[/cmd] %tmp
[/example] [/example]
In the example above four objects have been created. In the example above four objects have been created.
A "parent" object named "myobject" , and three children objects. A "parent" object named "myobject" , and three tqchildren objects.
The destructor has been reimplemented for each child object, The destructor has been reimplemented for each child object,
to make it "say" its name (Please note the usage of [fnc]$this[/fnc]). to make it "say" its name (Please note the usage of [fnc]$this[/fnc]).
In the parent destructor the children have been counted and listed.[br] In the parent destructor the tqchildren have been counted and listed.[br]
Then the parent object is destroyed causing to:[br] Then the parent object is destroyed causing to:[br]
- trigger the parent destructor.[br] - trigger the parent destructor.[br]
- destroy all the children (and conseguently trigger all the "individual" destructors).[br][br] - destroy all the tqchildren (and conseguently trigger all the "individual" destructors).[br][br]
Not all the object functions must return a value: Not all the object functions must return a value:
If a function does not return a meaningful value , or you just want to ignore it , you can call it in the following way:[br] If a function does not return a meaningful value , or you just want to ignore it , you can call it in the following way:[br]
@ -339,7 +339,7 @@
The above class is named "helloworld". It inherits the [class]object[/class] class. The above class is named "helloworld". It inherits the [class]object[/class] class.
This means that it acquires all the [class]object[/class] fuunctions: [classfnc:object]$name[/classfnc]() , This means that it acquires all the [class]object[/class] fuunctions: [classfnc:object]$name[/classfnc]() ,
[classfnc:object]$class[/class]() , [classfnc:object]$children[/classfnc]()... [classfnc:object]$class[/class]() , [classfnc:object]$tqchildren[/classfnc]()...
Additionally , it has the $sayhello() function, that "echoes Hello world" to the console. Additionally , it has the $sayhello() function, that "echoes Hello world" to the console.
Now you can create an instance of this class: Now you can create an instance of this class:
[example] [example]
@ -486,7 +486,7 @@
@description: @description:
This is the base class for all the builtin KVirc object classes. This is the base class for all the builtin KVirc object classes.
It exports the functions to retrieve the object name, to iterate It exports the functions to retrieve the object name, to iterate
through children objects and to lookup a child object by name or class. through tqchildren objects and to lookup a child object by name or class.
Additionally , this class provides the builtin timer functionality. Additionally , this class provides the builtin timer functionality.
The [classfnc]$constructor[/classfnc] and [classfnc]$destructor[/classfnc] The [classfnc]$constructor[/classfnc] and [classfnc]$destructor[/classfnc]
functions are empty implementations that all the other classes inherit. functions are empty implementations that all the other classes inherit.
@ -521,15 +521,15 @@
Returns the first child that matches <class> and <name>. Returns the first child that matches <class> and <name>.
If <class> is an empty string, any class matches, If <class> is an empty string, any class matches,
if <name> is an empty string, any name matches. if <name> is an empty string, any name matches.
This function traverses the entire tree of children This function traverses the entire tree of tqchildren
but is NOT recursive. but is NOT recursive.
!fn: $childCount() !fn: $childCount()
Returns the number of children objects Returns the number of tqchildren objects
!fn: $emit(<signal_name>[,parameters]) !fn: $emit(<signal_name>[,parameters])
Emits the signal <signal_name> passing the optional [parameters]. Emits the signal <signal_name> passing the optional [parameters].
See the [doc:objects]objects documentation[/doc] for an overview of signals and slots. See the [doc:objects]objects documentation[/doc] for an overview of signals and slots.
!fn: $children() !fn: $tqchildren()
Returns an array of children object identifiers. Returns an array of tqchildren object identifiers.
!fn: $signalSender() !fn: $signalSender()
Returns the current signal sender when in a slot connected to a signal. Returns the current signal sender when in a slot connected to a signal.
In other contexts this function returns an empty string. In other contexts this function returns an empty string.
@ -955,7 +955,7 @@ bool KviKvsObject::function_destructor(KviKvsObjectFunctionCall * c)
return true; return true;
} }
bool KviKvsObject::function_children(KviKvsObjectFunctionCall * c) bool KviKvsObject::function_tqchildren(KviKvsObjectFunctionCall * c)
{ {
KviKvsArray * a = new KviKvsArray(); KviKvsArray * a = new KviKvsArray();
int id=0; int id=0;
@ -1042,7 +1042,7 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c)
kvs_int_t cnt = 0; kvs_int_t cnt = 0;
if(m_pObject) if(m_pObject)
{ {
const TQMetaObject *o = m_pObject->metaObject(); const TQMetaObject *o = m_pObject->tqmetaObject();
if(!bArray) if(!bArray)
w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Properties for TQt class %s"),o->className()); w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Properties for TQt class %s"),o->className());
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4
@ -1120,7 +1120,7 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c)
cnt++; cnt++;
} }
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4
o = o->superClass(); o = o->tqsuperClass();
} }
#endif #endif
@ -1154,9 +1154,9 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c)
} }
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
int idx = m_pObject->metaObject()->indexOfProperty(szName); int idx = m_pObject->tqmetaObject()->indexOfProperty(szName);
#else #else
int idx = m_pObject->metaObject()->findProperty(szName,true); int idx = m_pObject->tqmetaObject()->findProperty(szName,true);
#endif #endif
if(idx < 0) if(idx < 0)
{ {
@ -1164,10 +1164,10 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c)
return true; return true;
} }
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQMetaProperty prop = m_pObject->metaObject()->property(idx); TQMetaProperty prop = m_pObject->tqmetaObject()->property(idx);
const TQMetaProperty * p = &prop; const TQMetaProperty * p = &prop;
#else #else
const TQMetaProperty * p = m_pObject->metaObject()->property(idx,true); const TQMetaProperty * p = m_pObject->tqmetaObject()->property(idx,true);
#endif #endif
if(!p) if(!p)
{ {
@ -1385,9 +1385,9 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c)
} }
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
int idx = m_pObject->metaObject()->indexOfProperty(szName); int idx = m_pObject->tqmetaObject()->indexOfProperty(szName);
#else #else
int idx = m_pObject->metaObject()->findProperty(szName,true); int idx = m_pObject->tqmetaObject()->findProperty(szName,true);
#endif #endif
if(idx < 0) if(idx < 0)
{ {
@ -1400,10 +1400,10 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c)
return true; return true;
} }
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQMetaProperty prop = m_pObject->metaObject()->property(idx); TQMetaProperty prop = m_pObject->tqmetaObject()->property(idx);
const TQMetaProperty * p = &prop; const TQMetaProperty * p = &prop;
#else #else
const TQMetaProperty * p = m_pObject->metaObject()->property(idx,true); const TQMetaProperty * p = m_pObject->tqmetaObject()->property(idx,true);
#endif #endif
if(!p) if(!p)
{ {

@ -164,7 +164,7 @@ protected:
bool function_findChild(KviKvsObjectFunctionCall *c); bool function_findChild(KviKvsObjectFunctionCall *c);
bool function_childCount(KviKvsObjectFunctionCall *c); bool function_childCount(KviKvsObjectFunctionCall *c);
bool function_emit(KviKvsObjectFunctionCall *c); bool function_emit(KviKvsObjectFunctionCall *c);
bool function_children(KviKvsObjectFunctionCall *c); bool function_tqchildren(KviKvsObjectFunctionCall *c);
bool function_signalSender(KviKvsObjectFunctionCall *c); bool function_signalSender(KviKvsObjectFunctionCall *c);
bool function_signalName(KviKvsObjectFunctionCall *c); bool function_signalName(KviKvsObjectFunctionCall *c);
bool function_destructor(KviKvsObjectFunctionCall *c); bool function_destructor(KviKvsObjectFunctionCall *c);

@ -73,7 +73,7 @@ void KviKvsObjectController::init()
m_pObjectClass->registerFunctionHandler("findChild",KVI_PTR2MEMBER(KviKvsObject::function_findChild)); m_pObjectClass->registerFunctionHandler("findChild",KVI_PTR2MEMBER(KviKvsObject::function_findChild));
m_pObjectClass->registerFunctionHandler("childCount",KVI_PTR2MEMBER(KviKvsObject::function_childCount)); m_pObjectClass->registerFunctionHandler("childCount",KVI_PTR2MEMBER(KviKvsObject::function_childCount));
m_pObjectClass->registerFunctionHandler("emit",KVI_PTR2MEMBER(KviKvsObject::function_emit)); m_pObjectClass->registerFunctionHandler("emit",KVI_PTR2MEMBER(KviKvsObject::function_emit));
m_pObjectClass->registerFunctionHandler("children",KVI_PTR2MEMBER(KviKvsObject::function_children)); m_pObjectClass->registerFunctionHandler("tqchildren",KVI_PTR2MEMBER(KviKvsObject::function_tqchildren));
m_pObjectClass->registerFunctionHandler("signalSender",KVI_PTR2MEMBER(KviKvsObject::function_signalSender)); m_pObjectClass->registerFunctionHandler("signalSender",KVI_PTR2MEMBER(KviKvsObject::function_signalSender));
m_pObjectClass->registerFunctionHandler("signalName",KVI_PTR2MEMBER(KviKvsObject::function_signalName)); m_pObjectClass->registerFunctionHandler("signalName",KVI_PTR2MEMBER(KviKvsObject::function_signalName));
m_pObjectClass->registerFunctionHandler("destructor",KVI_PTR2MEMBER(KviKvsObject::function_destructor)); m_pObjectClass->registerFunctionHandler("destructor",KVI_PTR2MEMBER(KviKvsObject::function_destructor));

@ -117,9 +117,9 @@ void KviKvsParser::report(bool bError,const TQChar * pLocation,const TQString &s
void KviKvsParser::errorBadChar(const TQChar * pLocation,char cExpected,const char * szCommandName) void KviKvsParser::errorBadChar(const TQChar * pLocation,char cExpected,const char * szCommandName)
{ {
if(pLocation->unicode()) if(pLocation->tqunicode())
error(pLocation,__tr2qs("Found character '%q' (unicode 0x%x) where '%c' was expected: see \"/help %s\" for the command syntax"), error(pLocation,__tr2qs("Found character '%q' (tqunicode 0x%x) where '%c' was expected: see \"/help %s\" for the command syntax"),
pLocation,pLocation->unicode(),cExpected,szCommandName); pLocation,pLocation->tqunicode(),cExpected,szCommandName);
else else
error(pLocation,__tr2qs("Found end of input where character '%c' was expected: see \"/help %s\" for the command syntax"), error(pLocation,__tr2qs("Found end of input where character '%c' was expected: see \"/help %s\" for the command syntax"),
cExpected,szCommandName); cExpected,szCommandName);
@ -1349,7 +1349,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const TQChar * pBuffe
so the callback code is empty, but if you continue reading we will soon fill it. so the callback code is empty, but if you continue reading we will soon fill it.
[/p] [/p]
[big]A typical addon layout[/big] [big]A typical addon tqlayout[/big]
[p] [p]
As stated above, the addons are usually shipped in a compressed archive. As stated above, the addons are usually shipped in a compressed archive.
Once uncompressed, the archive will expand into a small directory tree Once uncompressed, the archive will expand into a small directory tree
@ -1400,7 +1400,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const TQChar * pBuffe
[/p] [/p]
[p] [p]
The entries in [b]bold[/b] are directories while the other are files. The entries in [b]bold[/b] are directories while the other are files.
Please note that this is a general layout for a huge and rather complex Please note that this is a general tqlayout for a huge and rather complex
addon: you might not need all of these directories. Remember: the minimal addon: you might not need all of these directories. Remember: the minimal
addon has only an install.kvs file. Anyway, a really cool addon addon has only an install.kvs file. Anyway, a really cool addon
will probably have all of them and maybe some more. will probably have all of them and maybe some more.
@ -1496,7 +1496,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseAsParameter(const TQChar * pBuffe
[p] [p]
It is a good idea to start on the KVIrc web site. There are surely It is a good idea to start on the KVIrc web site. There are surely
several addons to look at. Pick one that seems simple and analyze its several addons to look at. Pick one that seems simple and analyze its
layout and code (wow... the free software!). It will be easier to do than it was to explain it :D tqlayout and code (wow... the free software!). It will be easier to do than it was to explain it :D
[/p] [/p]
[p] [p]
Have fun! :) Have fun! :)
@ -2724,7 +2724,7 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseInstruction()
return parseCommand(); return parseCommand();
} else { } else {
// what the heck is this ? // what the heck is this ?
error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where an instruction was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where an instruction was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
} }
break; break;
@ -2839,7 +2839,7 @@ KviKvsTreeNodeSwitchList * KviKvsParser::parseCommandSwitchList()
if(KVSP_curCharUnicode == 0) if(KVSP_curCharUnicode == 0)
{ {
error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) after a switch dash"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) after a switch dash"),KVSP_curCharPointer,KVSP_curCharUnicode);
} else { } else {
error(KVSP_curCharPointer,__tr2qs("Unexpected end of script after a switch dash")); error(KVSP_curCharPointer,__tr2qs("Unexpected end of script after a switch dash"));
} }
@ -2880,12 +2880,12 @@ KviKvsTreeNodeSwitchList * KviKvsParser::parseCommandSwitchList()
if(bLong) if(bLong)
sw->addLong(TQString(pSw,pSwEnd - pSw),p); sw->addLong(TQString(pSw,pSwEnd - pSw),p);
else else
sw->addShort(pSw->lower().unicode(),p); sw->addShort(pSw->lower().tqunicode(),p);
} else { } else {
if(bLong) if(bLong)
sw->addLong(TQString(pSw,pSwEnd - pSw),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param sw->addLong(TQString(pSw,pSwEnd - pSw),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param
else else
sw->addShort(pSw->lower().unicode(),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param sw->addShort(pSw->lower().tqunicode(),new KviKvsTreeNodeConstantData(KVSP_curCharPointer,new KviKvsVariant(true))); // empty param
} }
} }
@ -3300,7 +3300,7 @@ KviKvsTreeNodeData * KviKvsParser::parseArrayIndex()
error(KVSP_curCharPointer,__tr2qs("Unexpected end of line in array index (missing ']' character or unescaped newline)")); error(KVSP_curCharPointer,__tr2qs("Unexpected end of line in array index (missing ']' character or unescaped newline)"));
break; break;
default: default:
error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) in array index: it should be already terminated"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) in array index: it should be already terminated"),KVSP_curCharPointer,KVSP_curCharUnicode);
break; break;
} }
return 0; return 0;

@ -139,7 +139,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseCommand()
// perl.begin has a *really* half special parsing routine // perl.begin has a *really* half special parsing routine
if(iIdentifierLen == 4) if(iIdentifierLen == 4)
{ {
if(pIdentifier->lower().unicode() == 'p') if(pIdentifier->lower().tqunicode() == 'p')
{ {
if(KviTQString::equalCI(szIdentifier,"perl")) if(KviTQString::equalCI(szIdentifier,"perl"))
{ {

@ -85,7 +85,7 @@ KviKvsTreeNode * KviKvsParser::parseComment()
} }
break; break;
default: default:
error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) after a slash (it is a typo or a malformed comment begin ?)"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) after a slash (it is a typo or a malformed comment begin ?)"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
break; break;
} }

@ -50,7 +50,7 @@ KviKvsTreeNodeData * KviKvsParser::parseDollar(bool bInObjScope)
if(!KVSP_curCharIsFunctionStart) if(!KVSP_curCharIsFunctionStart)
{ {
if(KVSP_curCharUnicode == 0)warning(KVSP_curCharPointer,__tr2qs("Unexpected end of script after '$' function call prefix")); if(KVSP_curCharUnicode == 0)warning(KVSP_curCharPointer,__tr2qs("Unexpected end of script after '$' function call prefix"));
else warning(KVSP_curCharPointer,__tr2qs("Unexpected character %q (unicode %x) after '$' function call prefix"),KVSP_curCharPointer,KVSP_curCharUnicode); else warning(KVSP_curCharPointer,__tr2qs("Unexpected character %q (tqunicode %x) after '$' function call prefix"),KVSP_curCharPointer,KVSP_curCharUnicode);
error(KVSP_curCharPointer,__tr2qs("Syntax error after '$' function call prefix. If you want to use a plain '$' in the code you need to escape it")); error(KVSP_curCharPointer,__tr2qs("Syntax error after '$' function call prefix. If you want to use a plain '$' in the code you need to escape it"));
return 0; return 0;
} }

@ -420,7 +420,7 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperandCore(char termina
pDataList->append(new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(iVal))); pDataList->append(new KviKvsTreeNodeConstantData(pBegin,new KviKvsVariant(iVal)));
} else { } else {
// bOk is false // bOk is false
if(pBegin->unicode() == '0') if(pBegin->tqunicode() == '0')
{ {
if(tmp.length() > 2) if(tmp.length() > 2)
{ {
@ -448,7 +448,7 @@ KviKvsTreeNodeExpression * KviKvsParser::parseExpressionOperandCore(char termina
} }
} }
} else { } else {
error(KVSP_curCharPointer,__tr2qs("Unexpected character %q (unicode %h) in expression. If it meant to be a string use the quotes."),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Unexpected character %q (tqunicode %h) in expression. If it meant to be a string use the quotes."),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pDataList; delete pDataList;
return 0; return 0;
} }

@ -828,7 +828,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation()
if(KVSP_curCharUnicode != '/') if(KVSP_curCharUnicode != '/')
{ {
error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
} }
@ -846,7 +846,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation()
if(KVSP_curCharUnicode != '/') if(KVSP_curCharUnicode != '/')
{ {
error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pFirst; delete pFirst;
return 0; return 0;
} }
@ -869,7 +869,7 @@ KviKvsTreeNodeOperation * KviKvsParser::parseBindingOperation()
if(KVSP_curCharUnicode != '/') if(KVSP_curCharUnicode != '/')
{ {
error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where a slash '/' was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pFirst; delete pFirst;
return 0; return 0;
} }
@ -1173,10 +1173,10 @@ KviKvsTreeNodeInstruction * KviKvsParser::parseVoidFunctionCallOrOperation()
// must be followed by the end of a command // must be followed by the end of a command
if(r->isFunctionCall()) if(r->isFunctionCall())
{ {
error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (unicode %x) after a void function call: end of instruction expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Unexpected character '%q' (tqunicode %x) after a void function call: end of instruction expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
} else { } else {
warning(pBegin,__tr2qs("Unexpected (and senseless) read-only data evaluation")); warning(pBegin,__tr2qs("Unexpected (and senseless) read-only data evaluation"));
warning(pBegin,__tr2qs("Unexpected character '%q' (unicode %x)"),KVSP_curCharPointer,KVSP_curCharUnicode); warning(pBegin,__tr2qs("Unexpected character '%q' (tqunicode %x)"),KVSP_curCharPointer,KVSP_curCharUnicode);
error(KVSP_curCharPointer,__tr2qs("Syntax error: confused by earlier errors: bailing out")); error(KVSP_curCharPointer,__tr2qs("Syntax error: confused by earlier errors: bailing out"));
} }
delete r; delete r;

@ -29,15 +29,15 @@
#define KVSP_backChar m_ptr-- #define KVSP_backChar m_ptr--
#define KVSP_backNChars(n) m_ptr -= n #define KVSP_backNChars(n) m_ptr -= n
#define KVSP_curCharUnicode (m_ptr->unicode()) #define KVSP_curCharUnicode (m_ptr->tqunicode())
#define KVSP_curCharPointer m_ptr #define KVSP_curCharPointer m_ptr
#define KVSP_curCharIsLetter (m_ptr->isLetter()) #define KVSP_curCharIsLetter (m_ptr->isLetter())
#define KVSP_curCharIsNumber (m_ptr->isNumber()) #define KVSP_curCharIsNumber (m_ptr->isNumber())
#define KVSP_curCharIsLetterOrNumber (m_ptr->isLetterOrNumber()) #define KVSP_curCharIsLetterOrNumber (m_ptr->isLetterOrNumber())
#define KVSP_curCharIsFunctionStart (m_ptr->isLetterOrNumber() || (m_ptr->unicode() == '(') || (m_ptr->unicode() == '{') || (m_ptr->unicode() == '$')) #define KVSP_curCharIsFunctionStart (m_ptr->isLetterOrNumber() || (m_ptr->tqunicode() == '(') || (m_ptr->tqunicode() == '{') || (m_ptr->tqunicode() == '$'))
#define KVSP_curCharIsEndOfCommand ((m_ptr->unicode() == ';') || (m_ptr->unicode() == 0) || (m_ptr->unicode() == '\n') || (m_ptr->unicode() == '\r')) #define KVSP_curCharIsEndOfCommand ((m_ptr->tqunicode() == ';') || (m_ptr->tqunicode() == 0) || (m_ptr->tqunicode() == '\n') || (m_ptr->tqunicode() == '\r'))
#define KVSP_curCharIsEndOfBuffer (m_ptr->unicode() == 0) #define KVSP_curCharIsEndOfBuffer (m_ptr->tqunicode() == 0)
#define KVSP_setCurCharPointer(_ptr) m_ptr = _ptr #define KVSP_setCurCharPointer(_ptr) m_ptr = _ptr

@ -207,7 +207,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandUnset()
if(!KVSP_curCharIsEndOfCommand) if(!KVSP_curCharIsEndOfCommand)
{ {
warning(KVSP_curCharPointer,__tr2qs("The 'unset' command needs a variable list")); warning(KVSP_curCharPointer,__tr2qs("The 'unset' command needs a variable list"));
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
} }
@ -277,7 +277,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandGlobal()
if(!KVSP_curCharIsEndOfCommand) if(!KVSP_curCharIsEndOfCommand)
{ {
warning(KVSP_curCharPointer,__tr2qs("The 'global' command needs a variable list")); warning(KVSP_curCharPointer,__tr2qs("The 'global' command needs a variable list"));
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a variable was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
} }
@ -376,7 +376,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass()
if(KVSP_curCharUnicode != '(') if(KVSP_curCharUnicode != '(')
{ {
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where an open parenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where an open parenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
} }
@ -443,7 +443,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass()
if(KVSP_curCharPointer == pLabelBegin) if(KVSP_curCharPointer == pLabelBegin)
{ {
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pClass; delete pClass;
return 0; return 0;
} }
@ -471,7 +471,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass()
if(KVSP_curCharPointer == pLabelBegin) if(KVSP_curCharPointer == pLabelBegin)
{ {
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pClass; delete pClass;
return 0; return 0;
} }
@ -498,7 +498,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandClass()
if(KVSP_curCharPointer == pLabelBegin) if(KVSP_curCharPointer == pLabelBegin)
{ {
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a function name was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pClass; delete pClass;
return 0; return 0;
} }
@ -628,7 +628,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandWhile()
if(KVSP_curCharUnicode != '(') if(KVSP_curCharUnicode != '(')
{ {
warning(KVSP_curCharPointer,__tr2qs("The while command needs an expression enclosed in parenthesis")); warning(KVSP_curCharPointer,__tr2qs("The while command needs an expression enclosed in parenthesis"));
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where an open parenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where an open parenthesis was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
} }
@ -740,7 +740,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandDo()
if(KVSP_curCharIsEndOfBuffer) if(KVSP_curCharIsEndOfBuffer)
error(KVSP_curCharPointer,__tr2qs("Unexpected end of command after the 'do' command block: expected 'while' keyword")); error(KVSP_curCharPointer,__tr2qs("Unexpected end of command after the 'do' command block: expected 'while' keyword"));
else else
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a 'while' keyword was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a 'while' keyword was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
if(i)delete i; if(i)delete i;
return 0; return 0;
} }
@ -1089,7 +1089,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandFor()
if(KVSP_curCharUnicode != ')') if(KVSP_curCharUnicode != ')')
{ {
error(KVSP_curCharPointer,__tr2qs("Found char %q (unicode %x) while looking for the terminating ')' in 'for' command"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found char %q (tqunicode %x) while looking for the terminating ')' in 'for' command"),KVSP_curCharPointer,KVSP_curCharUnicode);
if(i1)delete i1; if(i1)delete i1;
if(e)delete e; if(e)delete e;
if(i2)delete i2; if(i2)delete i2;
@ -1193,7 +1193,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandForeach()
if((KVSP_curCharUnicode != '%') && (KVSP_curCharUnicode != '$') && (KVSP_curCharUnicode != '@')) if((KVSP_curCharUnicode != '%') && (KVSP_curCharUnicode != '$') && (KVSP_curCharUnicode != '@'))
{ {
warning(KVSP_curCharPointer,__tr2qs("The 'foreach' command expects a writeable iteration variable as first parameter")); warning(KVSP_curCharPointer,__tr2qs("The 'foreach' command expects a writeable iteration variable as first parameter"));
error(KVSP_curCharPointer,__tr2qs("Found character '%q' (unicode %x) where '%' or '$' was expected: see /help foreach for the command syntax"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character '%q' (tqunicode %x) where '%' or '$' was expected: see /help foreach for the command syntax"),KVSP_curCharPointer,KVSP_curCharUnicode);
return 0; return 0;
} }
@ -1419,7 +1419,7 @@ KviKvsTreeNodeCommand * KviKvsParser::parseSpecialCommandSwitch()
if(KVSP_curCharPointer == pLabelBegin) if(KVSP_curCharPointer == pLabelBegin)
{ {
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a 'case','match','regexp','default' or 'break' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a 'case','match','regexp','default' or 'break' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pSwitch; delete pSwitch;
return 0; return 0;
} }
@ -1566,7 +1566,7 @@ KviKvsTreeNodeSpecialCommandDefpopupLabelPopup * KviKvsParser::parseSpecialComma
if(KVSP_curCharPointer == pLabelBegin) if(KVSP_curCharPointer == pLabelBegin)
{ {
error(KVSP_curCharPointer,__tr2qs("Found character %q (unicode %x) where a 'prologue','separator','label','popup','item','extpopup' or 'epilogue' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode); error(KVSP_curCharPointer,__tr2qs("Found character %q (tqunicode %x) where a 'prologue','separator','label','popup','item','extpopup' or 'epilogue' label was expected"),KVSP_curCharPointer,KVSP_curCharUnicode);
delete pPopup; delete pPopup;
return 0; return 0;
} }

@ -73,7 +73,7 @@ bool KviKvsProcessAsyncOperation::start()
if(szShell.isEmpty()) if(szShell.isEmpty())
{ {
#ifdef COMPILE_ON_WINDOWS #ifdef COMPILE_ON_WINDOWS
// [01:26:00] <PragmaOff> btw, what is qt_winunicode ? // [01:26:00] <PragmaOff> btw, what is qt_wintqunicode ?
// [01:26:12] <kode54> TQt export specific to win32 // [01:26:12] <kode54> TQt export specific to win32
// [01:26:27] <kode54> bool which indicates whether system is Unicode (NT) or not // [01:26:27] <kode54> bool which indicates whether system is Unicode (NT) or not
// [01:26:58] <kode54> not sure if that's documented, but it is a public export // [01:26:58] <kode54> not sure if that's documented, but it is a public export
@ -330,7 +330,7 @@ void KviKvsProcessAsyncOperation::processExited()
if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED) if(m_pData->iFlags & KVI_KVS_PROCESSDESCRIPTOR_TRIGGERTERMINATED)
{ {
TQString szRetVal; TQString szRetVal;
szRetVal.setNum(m_pProcess->exiStatus()); szRetVal.setNum(m_pProcess->exitqStatus());
trigger(EventTerminated,szRetVal); trigger(EventTerminated,szRetVal);
} }

@ -60,7 +60,7 @@ void KviKvsReport::findLineAndCol(const TQChar * pBegin,const TQChar * pPoint,in
const TQChar * pPrevLine = 0; const TQChar * pPrevLine = 0;
const TQChar * pLineBegin = pBegin; const TQChar * pLineBegin = pBegin;
unsigned short us = pBegin->unicode(); unsigned short us = pBegin->tqunicode();
while(us && (pBegin < pPoint)) while(us && (pBegin < pPoint))
{ {
@ -73,7 +73,7 @@ void KviKvsReport::findLineAndCol(const TQChar * pBegin,const TQChar * pPoint,in
} else { } else {
pBegin++; pBegin++;
} }
us = pBegin->unicode(); us = pBegin->tqunicode();
} }
iCol = (pBegin - pLineBegin) + 1; iCol = (pBegin - pLineBegin) + 1;
@ -92,7 +92,7 @@ void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pP
const TQChar * pPrevLine = 0; const TQChar * pPrevLine = 0;
const TQChar * pLineBegin = pBegin; const TQChar * pLineBegin = pBegin;
unsigned short us = pBegin->unicode(); unsigned short us = pBegin->tqunicode();
while(us && (pBegin < pPoint)) while(us && (pBegin < pPoint))
{ {
@ -105,7 +105,7 @@ void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pP
} else { } else {
pBegin++; pBegin++;
} }
us = pBegin->unicode(); us = pBegin->tqunicode();
} }
iCol = (pBegin - pLineBegin) + 1; iCol = (pBegin - pLineBegin) + 1;
@ -131,11 +131,11 @@ void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pP
// current line // current line
pBegin = pLineBegin; pBegin = pLineBegin;
us = pBegin->unicode(); us = pBegin->tqunicode();
while(us && (us != '\n')) while(us && (us != '\n'))
{ {
pBegin++; pBegin++;
us = pBegin->unicode(); us = pBegin->tqunicode();
} }
if(us)pBegin++; if(us)pBegin++;
@ -152,11 +152,11 @@ void KviKvsReport::findLineColAndListing(const TQChar * pBegin,const TQChar * pP
// next line // next line
pLineBegin = pBegin; pLineBegin = pBegin;
us = pBegin->unicode(); us = pBegin->tqunicode();
while(us && (us != '\n')) while(us && (us != '\n'))
{ {
pBegin++; pBegin++;
us = pBegin->unicode(); us = pBegin->tqunicode();
} }
if(us)pBegin++; if(us)pBegin++;

@ -293,22 +293,22 @@ int KviKvsScript::executeInternal(KviKvsRunTimeContext * pContext)
// lock this script // lock this script
m_pData->m_uLock++; m_pData->m_uLock++;
int iRunStatus = Success; int iRuntqStatus = Success;
if(!m_pData->m_pTree->execute(pContext)) if(!m_pData->m_pTree->execute(pContext))
{ {
if(pContext->error())iRunStatus = Error; if(pContext->error())iRuntqStatus = Error;
else { else {
// else just a halt, return or sth like that // else just a halt, return or sth like that
if(pContext->haltCalled()) if(pContext->haltCalled())
iRunStatus |= HaltEncountered; iRuntqStatus |= HaltEncountered;
} }
} }
// we can't block any longer: unlock // we can't block any longer: unlock
m_pData->m_uLock--; m_pData->m_uLock--;
return iRunStatus; return iRuntqStatus;
} }
int KviKvsScript::execute(KviWindow * pWnd,KviKvsVariantList * pParams,KviKvsVariant * pRetVal,int iRunFlags,KviKvsExtendedRunTimeData * pExtData) int KviKvsScript::execute(KviWindow * pWnd,KviKvsVariantList * pParams,KviKvsVariant * pRetVal,int iRunFlags,KviKvsExtendedRunTimeData * pExtData)
@ -343,13 +343,13 @@ int KviKvsScript::execute(KviWindow * pWnd,KviKvsVariantList * pParams,KviKvsVar
if(iRunFlags & Quiet) if(iRunFlags & Quiet)
ctx.disableReporting(); ctx.disableReporting();
int iRunStatus = executeInternal(&ctx); int iRuntqStatus = executeInternal(&ctx);
// don't forget to delete the params // don't forget to delete the params
if(bDeleteParams)delete pParams; if(bDeleteParams)delete pParams;
if(bDeleteRetVal)delete pRetVal; if(bDeleteRetVal)delete pRetVal;
pParams = 0; pRetVal = 0; pParams = 0; pRetVal = 0;
return iRunStatus; return iRuntqStatus;
} }

@ -52,7 +52,7 @@ class KVIRC_API KviKvsScript : public KviHeapObject
friend class KviKvsParser; friend class KviKvsParser;
friend class KviKvsRunTimeContext; friend class KviKvsRunTimeContext;
public: public:
enum RunStatus { enum RuntqStatus {
// the script returned an error // the script returned an error
Error = 0, Error = 0,
// the script ran succesfully // the script ran succesfully
@ -97,7 +97,7 @@ public:
Quiet = 8 Quiet = 8
}; };
// returns 0 (KviKvsScript::RunFailure) on error // returns 0 (KviKvsScript::RunFailure) on error
// returns a nonzero combination of RunStatus flags on success // returns a nonzero combination of RuntqStatus flags on success
int run(KviWindow * pWnd, // window that the command has to be bound to int run(KviWindow * pWnd, // window that the command has to be bound to
KviKvsVariantList * pParams = 0, // parameter list (0 if you don't pass params) ownership transferred if PreserverParams is not used KviKvsVariantList * pParams = 0, // parameter list (0 if you don't pass params) ownership transferred if PreserverParams is not used
KviKvsVariant * pRetVal = 0, // return value buffer (0 if you ignore it) KviKvsVariant * pRetVal = 0, // return value buffer (0 if you ignore it)
@ -105,7 +105,7 @@ public:
KviKvsExtendedRunTimeData * pExtData = 0); // extended data (usually 0) (if you need to pass extended scope variables or alias switch lists...) KviKvsExtendedRunTimeData * pExtData = 0); // extended data (usually 0) (if you need to pass extended scope variables or alias switch lists...)
// returns 0 (KviKvsScript::RunFailure) on error // returns 0 (KviKvsScript::RunFailure) on error
// returns a nonzero combination of RunStatus flags on success // returns a nonzero combination of RuntqStatus flags on success
// this is probably used only in /eval // this is probably used only in /eval
int run(KviKvsRunTimeContext * pContext,int iRunFlags = 0); int run(KviKvsRunTimeContext * pContext,int iRunFlags = 0);
@ -118,12 +118,12 @@ public:
KviKvsExtendedRunTimeData * pExtData = 0); KviKvsExtendedRunTimeData * pExtData = 0);
// static helpers for quick running // static helpers for quick running
// returns a combination of RunStatus flags (nonzero on no error) // returns a combination of RuntqStatus flags (nonzero on no error)
// does NOT take params ownership // does NOT take params ownership
static int run(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0); static int run(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams = 0,KviKvsVariant * pRetVal = 0);
// static helper for quick evaluating parameters // static helper for quick evaluating parameters
// returns a combination of RunStatus flags (nonzero on no error) // returns a combination of RuntqStatus flags (nonzero on no error)
// does NOT take params ownership // does NOT take params ownership
// pRetVal CAN'T be zero here since we're evaluating stuff here // pRetVal CAN'T be zero here since we're evaluating stuff here
static int evaluate(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal); static int evaluate(const TQString &szCode,KviWindow * pWindow,KviKvsVariantList * pParams,KviKvsVariant * pRetVal);
@ -137,14 +137,14 @@ protected:
bool parse(KviWindow * pOutput = 0, bool parse(KviWindow * pOutput = 0,
int iRunFlags = 0); int iRunFlags = 0);
// returns 0 (KviKvsScript::RunFailure) on error // returns 0 (KviKvsScript::RunFailure) on error
// returns a nonzero combination of RunStatus flags on success // returns a nonzero combination of RuntqStatus flags on success
int execute(KviWindow * pWnd, int execute(KviWindow * pWnd,
KviKvsVariantList * pParams = 0, KviKvsVariantList * pParams = 0,
KviKvsVariant * pRetVal = 0, KviKvsVariant * pRetVal = 0,
int iRunFlags = 0, int iRunFlags = 0,
KviKvsExtendedRunTimeData * pExtData = 0); KviKvsExtendedRunTimeData * pExtData = 0);
// returns 0 (KviKvsScript::RunFailure) on error // returns 0 (KviKvsScript::RunFailure) on error
// returns a nonzero combination of RunStatus flags on success // returns a nonzero combination of RuntqStatus flags on success
int executeInternal(KviKvsRunTimeContext * pContext); int executeInternal(KviKvsRunTimeContext * pContext);
const TQChar * buffer() const; const TQChar * buffer() const;
// detaches this script from any other shallow copies // detaches this script from any other shallow copies

@ -48,7 +48,7 @@ public:
KviKvsVariant * find(const TQChar &c) KviKvsVariant * find(const TQChar &c)
{ {
return m_pShortSwitchDict ? m_pShortSwitchDict->find(c.unicode()) : 0; return m_pShortSwitchDict ? m_pShortSwitchDict->find(c.tqunicode()) : 0;
}; };
KviKvsVariant * find(unsigned short uShortKey) KviKvsVariant * find(unsigned short uShortKey)

@ -34,7 +34,7 @@ KviKvsTreeNodeCompositeData::KviKvsTreeNodeCompositeData(const TQChar * pLocatio
: KviKvsTreeNodeData(pLocation) : KviKvsTreeNodeData(pLocation)
{ {
#ifdef DEBUGME #ifdef DEBUGME
if(pSubData->count() < 2)debug("KviKvsTreeNodeCompositeData constructor called with less than two children!"); if(pSubData->count() < 2)debug("KviKvsTreeNodeCompositeData constructor called with less than two tqchildren!");
#endif #endif
m_pSubData = pSubData; m_pSubData = pSubData;
m_pSubData->setAutoDelete(true); m_pSubData->setAutoDelete(true);

@ -1467,18 +1467,18 @@ bool KviKvsTreeNodeOperationStringSubstitution::execute(KviKvsRunTimeContext * c
TQString szReplaced; TQString szReplaced;
const TQChar * p2 = KviTQString::nullTerminatedArray(szR); const TQChar * p2 = KviTQString::nullTerminatedArray(szR);
const TQChar * begin = p2; const TQChar * begin = p2;
while(p2->unicode()) while(p2->tqunicode())
{ {
if(p2->unicode() == '\\') if(p2->tqunicode() == '\\')
{ {
p2++; p2++;
if(p2->unicode() >= '0' && p2->unicode() <= '9') if(p2->tqunicode() >= '0' && p2->tqunicode() <= '9')
{ {
szReplaced.append(TQString(begin,(p2 - begin) - 1)); szReplaced.append(TQString(begin,(p2 - begin) - 1));
szReplaced.append(re.cap(p2->unicode() - '0')); szReplaced.append(re.cap(p2->tqunicode() - '0'));
p2++; p2++;
begin = p2; begin = p2;
} else if(p2->unicode())p2++; } else if(p2->tqunicode())p2++;
} else p2++; } else p2++;
} }
if(begin != p2)szReplaced.append(TQString(begin,p2 - begin)); if(begin != p2)szReplaced.append(TQString(begin,p2 - begin));

@ -1010,7 +1010,7 @@ KviKvsVariant* KviKvsVariant::unserializeNull(const TQChar** aux)
KviKvsVariant* KviKvsVariant::unserializeRealOrInteger(const TQChar** aux) KviKvsVariant* KviKvsVariant::unserializeRealOrInteger(const TQChar** aux)
{ {
TQString data; TQString data;
if((*aux)->unicode() == '-') if((*aux)->tqunicode() == '-')
{ {
data.append('-'); data.append('-');
(*aux)++; (*aux)++;
@ -1024,7 +1024,7 @@ KviKvsVariant* KviKvsVariant::unserializeRealOrInteger(const TQChar** aux)
data.append(**aux); data.append(**aux);
(*aux)++; (*aux)++;
} }
if((*aux)->unicode()=='.') if((*aux)->tqunicode()=='.')
{ {
return unserializeReal(aux,data); return unserializeReal(aux,data);
} }
@ -1042,15 +1042,15 @@ KviKvsVariant* KviKvsVariant::unserializeReal(const TQChar** aux,TQString& data)
(*aux)++; (*aux)++;
} }
if((*aux)->unicode() == 'e' || (*aux)->unicode() == 'E') if((*aux)->tqunicode() == 'e' || (*aux)->tqunicode() == 'E')
{ {
(*aux)++; (*aux)++;
if((*aux)->unicode() == '-') if((*aux)->tqunicode() == '-')
{ {
exponent.append('-'); exponent.append('-');
(*aux)++; (*aux)++;
} else { } else {
if((*aux)->unicode() == '+') if((*aux)->tqunicode() == '+')
{ {
exponent.append('+'); exponent.append('+');
(*aux)++; (*aux)++;
@ -1079,15 +1079,15 @@ KviKvsVariant* KviKvsVariant::unserializeInteger(const TQChar** aux,TQString& da
TQString exponent; TQString exponent;
if((*aux)->unicode() == 'e' || (*aux)->unicode() == 'E') if((*aux)->tqunicode() == 'e' || (*aux)->tqunicode() == 'E')
{ {
(*aux)++; (*aux)++;
if((*aux)->unicode() == '-') if((*aux)->tqunicode() == '-')
{ {
exponent.append('-'); exponent.append('-');
(*aux)++; (*aux)++;
} else { } else {
if((*aux)->unicode() == '+') if((*aux)->tqunicode() == '+')
{ {
exponent.append('+'); exponent.append('+');
(*aux)++; (*aux)++;
@ -1122,9 +1122,9 @@ void KviKvsVariant::unserializeString(const TQChar** aux,TQString& data)
TQString hex; //temp var TQString hex; //temp var
//skip leading " //skip leading "
(*aux)++; (*aux)++;
while((*aux)->unicode()) while((*aux)->tqunicode())
{ {
switch((*aux)->unicode()) switch((*aux)->tqunicode())
{ {
case '"': case '"':
//EOF //EOF
@ -1134,7 +1134,7 @@ void KviKvsVariant::unserializeString(const TQChar** aux,TQString& data)
case '\\': case '\\':
//Special //Special
(*aux)++; (*aux)++;
switch((*aux)->unicode()) switch((*aux)->tqunicode())
{ {
case 't': case 't':
data.append('\t'); data.append('\t');
@ -1159,11 +1159,11 @@ void KviKvsVariant::unserializeString(const TQChar** aux,TQString& data)
//4 hexadecmical digits pending... //4 hexadecmical digits pending...
hex=""; hex="";
(*aux)++; (*aux)++;
for(int k=0;k<4 && (*aux)->unicode(); k++) for(int k=0;k<4 && (*aux)->tqunicode(); k++)
{ {
if((*aux)->isDigit() || if((*aux)->isDigit() ||
((*aux)->unicode() >='A' && (*aux)->unicode() <='F')|| //ABCDEF ((*aux)->tqunicode() >='A' && (*aux)->tqunicode() <='F')|| //ABCDEF
((*aux)->unicode() >='a' && (*aux)->unicode() <='f')) //abcdef ((*aux)->tqunicode() >='a' && (*aux)->tqunicode() <='f')) //abcdef
{ {
hex.append(**aux); hex.append(**aux);
(*aux)++; (*aux)++;
@ -1203,7 +1203,7 @@ KviKvsVariant* KviKvsVariant::unserializeHash(const TQChar** aux)
while((*aux)->isSpace()) while((*aux)->isSpace())
(*aux)++; (*aux)++;
//waiting for starting of string //waiting for starting of string
if((*aux)->unicode()!='\"') if((*aux)->tqunicode()!='\"')
{ {
//strange characters //strange characters
delete pHash; delete pHash;
@ -1221,7 +1221,7 @@ KviKvsVariant* KviKvsVariant::unserializeHash(const TQChar** aux)
while((*aux)->isSpace()) while((*aux)->isSpace())
(*aux)++; (*aux)++;
//waiting for name-value delimeter //waiting for name-value delimeter
if((*aux)->unicode()!=':') if((*aux)->tqunicode()!=':')
{ {
//strange characters //strange characters
delete pHash; delete pHash;
@ -1238,7 +1238,7 @@ KviKvsVariant* KviKvsVariant::unserializeHash(const TQChar** aux)
i++; i++;
while((*aux)->isSpace()) while((*aux)->isSpace())
(*aux)++; (*aux)++;
switch((*aux)->unicode()) switch((*aux)->tqunicode())
{ {
case ',': case ',':
//goto next //goto next
@ -1278,7 +1278,7 @@ KviKvsVariant* KviKvsVariant::unserializeArray(const TQChar** aux)
i++; i++;
while((*aux)->isSpace()) while((*aux)->isSpace())
(*aux)++; (*aux)++;
switch((*aux)->unicode()) switch((*aux)->tqunicode())
{ {
case ',': case ',':
//goto next //goto next
@ -1310,7 +1310,7 @@ KviKvsVariant* KviKvsVariant::unserialize(const TQChar** aux)
while((*aux)->isSpace()) while((*aux)->isSpace())
(*aux)++; (*aux)++;
switch((*aux)->unicode()) switch((*aux)->tqunicode())
{ {
case 't': case 't':
//true //true
@ -1373,7 +1373,7 @@ KviKvsVariant* KviKvsVariant::unserialize(const TQString& data)
pResult = unserialize(&aux); pResult = unserialize(&aux);
if(aux->unicode()) if(aux->tqunicode())
{ {
//strange extra characters? //strange extra characters?
if(pResult) delete pResult; if(pResult) delete pResult;

@ -63,7 +63,7 @@
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <TQTextDocument> #include <TQTextDocument>
#else #else
#include <stylesheet.h> #include <tqstylesheet.h>
#endif #endif
@ -1156,12 +1156,12 @@ void KviServerParser::parseCtcpRequestVersion(KviCtcpMessage *msg)
#ifdef COMPILE_ON_WINDOWS #ifdef COMPILE_ON_WINDOWS
szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build " KVI_BUILD_DATE; szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build " KVI_BUILD_DATE;
szVersion.append(TQString(" - %1").arg(KviOsInfo::version())); szVersion.append(TQString(" - %1").tqarg(KviOsInfo::version()));
#else #else
szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build " KVI_BUILD_DATE " - " KVI_BUILD_FLAGS; szVersion = "KVIrc " KVI_VERSION QT4_TAG " '" KVI_RELEASE_NAME "' " KVI_SOURCES_DATE " - build " KVI_BUILD_DATE " - " KVI_BUILD_FLAGS;
szVersion.append(TQString(" - %1 (%2)").arg(KviOsInfo::name()).arg(KviOsInfo::release())); szVersion.append(TQString(" - %1 (%2)").tqarg(KviOsInfo::name()).tqarg(KviOsInfo::release()));
#endif #endif
//szVersion.append(TQString(" - QT Version: %1 - %2").arg(qVersion()).arg(__tr2qs("http://www.kvirc.net/"))); //szVersion.append(TQString(" - QT Version: %1 - %2").tqarg(qVersion()).tqarg(__tr2qs("http://www.kvirc.net/")));
if(!KVI_OPTION_STRING(KviOption_stringCtcpVersionPostfix).isEmpty()) if(!KVI_OPTION_STRING(KviOption_stringCtcpVersionPostfix).isEmpty())
{ {
TQString sz = KVI_OPTION_STRING(KviOption_stringCtcpVersionPostfix); TQString sz = KVI_OPTION_STRING(KviOption_stringCtcpVersionPostfix);
@ -1331,7 +1331,7 @@ void KviServerParser::parseCtcpRequestTime(KviCtcpMessage *msg)
{ {
if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpTime)) if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpTime))
{ {
replyCtcp(msg,TQDateTime::currentDateTime().toString()); replyCtcp(msg,TQDateTime::tqcurrentDateTime().toString());
} else msg->bIgnored = true; } else msg->bIgnored = true;
} }
@ -1460,7 +1460,7 @@ void KviServerParser::parseCtcpRequestAction(KviCtcpMessage *msg)
if(bTargetFound) if(bTargetFound)
{ {
TQString szMsg = TQString("\r!n\r%1\r ").arg(msg->pSource->nick()); TQString szMsg = TQString("\r!n\r%1\r ").tqarg(msg->pSource->nick());
szMsg += szData; szMsg += szData;
if(bIsChannel) if(bIsChannel)
{ {
@ -1491,9 +1491,9 @@ void KviServerParser::parseCtcpRequestAvatar(KviCtcpMessage *msg)
if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpAvatar)) if(!KVI_OPTION_BOOL(KviOption_boolIgnoreCtcpAvatar))
{ {
TQString szGenderTag=" "; TQString szGenderTag=" ";
if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("m",false)){ if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("m",false)){
szGenderTag.append("M"); szGenderTag.append("M");
} else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).startsWith("f",false)){ } else if(KVI_OPTION_STRING(KviOption_stringCtcpUserInfoGender).tqstartsWith("f",false)){
szGenderTag.append("F"); szGenderTag.append("F");
} else { } else {
szGenderTag.append("?"); szGenderTag.append("?");
@ -1531,7 +1531,7 @@ void KviServerParser::parseCtcpRequestAvatar(KviCtcpMessage *msg)
KVI_OPTION_UINT(KviOption_uintAvatarOfferTimeoutInSecs),&(a->name()),&(a->localPath()),&szUserMask); KVI_OPTION_UINT(KviOption_uintAvatarOfferTimeoutInSecs),&(a->name()),&(a->localPath()),&szUserMask);
} }
} }
//if(o)szReply.append(TQString(" %1").arg(o->fileSize())); //if(o)szReply.append(TQString(" %1").tqarg(o->fileSize()));
} }
szReply.append(szGenderTag); szReply.append(szGenderTag);
@ -1808,7 +1808,7 @@ void KviServerParser::parseCtcpReplyUserinfo(KviCtcpMessage *msg)
if(pos>=0) if(pos>=0)
{ {
TQChar c = decoded[pos+7]; TQChar c = decoded[pos+7];
switch(c.unicode()) switch(c.tqunicode())
{ {
case 'F': case 'F':
case 'f': case 'f':

@ -75,7 +75,7 @@
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <TQTextDocument> #include <TQTextDocument>
#else #else
#include <stylesheet.h> #include <tqstylesheet.h>
#endif #endif
extern KviNickServRuleSet * g_pNickServRuleSet; extern KviNickServRuleSet * g_pNickServRuleSet;
@ -186,13 +186,13 @@ void KviServerParser::parseLiteralJoin(KviIrcMessage *msg)
// nick!user@host JOIN :#channel\x07[o|v] // nick!user@host JOIN :#channel\x07[o|v]
const TQChar * pExt = KviTQString::nullTerminatedArray(channel); const TQChar * pExt = KviTQString::nullTerminatedArray(channel);
char chExtMode = 0; char chExtMode = 0;
while(pExt->unicode() && (pExt->unicode() != 0x07))pExt++; while(pExt->tqunicode() && (pExt->tqunicode() != 0x07))pExt++;
if(pExt->unicode()) if(pExt->tqunicode())
{ {
++pExt; ++pExt;
if(pExt->unicode()) if(pExt->tqunicode())
{ {
chExtMode = (char)pExt->unicode(); chExtMode = (char)pExt->tqunicode();
channel.remove(channel.length() - 2,2); // assuming that we're at the end (we should be) channel.remove(channel.length() - 2,2); // assuming that we're at the end (we should be)
} // else { senseless 0x07 in channel name ? } // else { senseless 0x07 in channel name ?
} }
@ -993,7 +993,7 @@ void KviServerParser::parseLiteralPrivmsg(KviIrcMessage *msg)
if(!chan) if(!chan)
{ {
// check if the channel has some leading mode prefixes // check if the channel has some leading mode prefixes
while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].unicode())) while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].tqunicode()))
{ {
szPrefixes += szTarget[0]; szPrefixes += szTarget[0];
szTarget.remove(0,1); szTarget.remove(0,1);
@ -1328,7 +1328,7 @@ void KviServerParser::parseLiteralNotice(KviIrcMessage *msg)
if(!chan) if(!chan)
{ {
// check if the channel has some leading mode prefixes // check if the channel has some leading mode prefixes
while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].unicode())) while((szTarget.length() > 0) && console->connection()->serverInfo()->isSupportedModePrefix(szTarget[0].tqunicode()))
{ {
szPrefixes += szTarget[0]; szPrefixes += szTarget[0];
szTarget.remove(0,1); szTarget.remove(0,1);
@ -1402,7 +1402,7 @@ void KviServerParser::parseLiteralTopic(KviIrcMessage *msg)
chan->topicWidget()->setTopic(szTopic); chan->topicWidget()->setTopic(szTopic);
chan->topicWidget()->setTopicSetBy(szNick); chan->topicWidget()->setTopicSetBy(szNick);
TQString tmp = TQDateTime::currentDateTime().toString(); TQString tmp = TQDateTime::tqcurrentDateTime().toString();
chan->topicWidget()->setTopicSetAt(tmp); chan->topicWidget()->setTopicSetAt(tmp);
chan->userAction(szNick,szUser,szHost,KVI_USERACTION_TOPIC); chan->userAction(szNick,szUser,szHost,KVI_USERACTION_TOPIC);
@ -1800,7 +1800,7 @@ void KviServerParser::parseChannelMode(const TQString &szNick,const TQString &sz
#define CHANNEL_MODE(__modefl,__evmeset,__evmeunset,__evset,__evunset,__icomeset,__icomeunset,__icoset,__icounset) \ #define CHANNEL_MODE(__modefl,__evmeset,__evmeunset,__evset,__evunset,__icomeset,__icomeunset,__icoset,__icounset) \
case __modefl: \ case __modefl: \
aParam = msg->connection()->decodeText(msg->safeParam(curParam++)); \ aParam = msg->connection()->decodeText(msg->safeParam(curParam++)); \
chan->setMask(*aux,aParam,bSet,msg->connection()->decodeText(msg->safePrefix()),TQDateTime::currentDateTime().toTime_t()); \ chan->setMask(*aux,aParam,bSet,msg->connection()->decodeText(msg->safePrefix()),TQDateTime::tqcurrentDateTime().toTime_t()); \
auxMask = new KviIrcMask(aParam); \ auxMask = new KviIrcMask(aParam); \
bIsMe = auxMask->matchesFixed( \ bIsMe = auxMask->matchesFixed( \
msg->connection()->userInfo()->nickName(), \ msg->connection()->userInfo()->nickName(), \

@ -53,7 +53,7 @@
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <tqregexp.h> #include <tqregexp.h>
#include "kvi_kvs_eventtriggers.h" #include "kvi_kvs_eventtriggers.h"

@ -30,7 +30,7 @@
#include "kvi_iconmanager.h" #include "kvi_iconmanager.h"
#include "kvi_locale.h" #include "kvi_locale.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
//#include <tqscrollview.h> //#include <tqscrollview.h>
#include <tqpainter.h> #include <tqpainter.h>

@ -74,7 +74,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqevent.h> #include <tqevent.h>
#include <palette.h> #include <tqpalette.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include "kvi_pointerhashtable.h" #include "kvi_pointerhashtable.h"
#include <tqmessagebox.h> #include <tqmessagebox.h>
@ -112,7 +112,7 @@ KviChannel::KviChannel(KviFrame * lpFrm,KviConsole * lpConsole,const char * name
// Register ourselves // Register ourselves
connection()->registerChannel(this); connection()->registerChannel(this);
// And create the widgets layout // And create the widgets tqlayout
// Button box // Button box
m_pButtonBox = new KviTalHBox(this); m_pButtonBox = new KviTalHBox(this);
@ -220,7 +220,7 @@ KviChannel::KviChannel(KviFrame * lpFrm,KviConsole * lpConsole,const char * name
if(KVI_OPTION_BOOL(KviOption_boolAutoLogChannels))m_pIrcView->startLogging(); if(KVI_OPTION_BOOL(KviOption_boolAutoLogChannels))m_pIrcView->startLogging();
applyOptions(); applyOptions();
m_joinTime = TQDateTime::currentDateTime(); m_joinTime = TQDateTime::tqcurrentDateTime();
m_tLastReceivedWhoReply = (kvi_time_t)m_joinTime.toTime_t(); m_tLastReceivedWhoReply = (kvi_time_t)m_joinTime.toTime_t();
@ -287,7 +287,7 @@ void KviChannel::applyOptions()
m_pModeWidget->applyOptions(); m_pModeWidget->applyOptions();
// this applies options for IrcView and Input and forces the window to relayout // this applies options for IrcView and Input and forces the window to retqlayout
KviWindow::applyOptions(); KviWindow::applyOptions();
} }
@ -547,23 +547,23 @@ void KviChannel::resizeEvent(TQResizeEvent *e)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
int hght = m_pInput->heightHint(); int hght = m_pInput->heightHint();
int hght2 = m_pTopicWidget->sizeHint().height(); int hght2 = m_pTopicWidget->tqsizeHint().height();
m_pButtonBox->setGeometry(0,0,width(),hght2); m_pButtonBox->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2));
m_pInput->setGeometry(0,height() - hght,width(),hght); m_pInput->setGeometry(0,height() - hght,width(),hght);
#else #else
int hght = m_pInput->heightHint(); int hght = m_pInput->heightHint();
int hght2 = m_pButtonBox->sizeHint().height(); int hght2 = m_pButtonBox->tqsizeHint().height();
m_pButtonBox->setGeometry(0,0,width(),hght2); m_pButtonBox->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2));
m_pInput->setGeometry(0,height() - hght,width(),hght); m_pInput->setGeometry(0,height() - hght,width(),hght);
#endif #endif
} }
TQSize KviChannel::sizeHint() const TQSize KviChannel::tqsizeHint() const
{ {
TQSize ret(m_pSplitter->sizeHint().width(), TQSize ret(m_pSplitter->tqsizeHint().width(),
m_pIrcView->sizeHint().height() + m_pInput->heightHint() + m_pButtonBox->sizeHint().height()); m_pIrcView->tqsizeHint().height() + m_pInput->heightHint() + m_pButtonBox->tqsizeHint().height());
return ret; return ret;
} }
@ -655,7 +655,7 @@ void KviChannel::setAliveChan()
m_iStateFlags = 0; m_iStateFlags = 0;
setType(KVI_WINDOW_TYPE_CHANNEL); setType(KVI_WINDOW_TYPE_CHANNEL);
m_pUserListView->setUserDataBase(connection()->userDataBase()); m_pUserListView->setUserDataBase(connection()->userDataBase());
m_joinTime = TQDateTime::currentDateTime(); m_joinTime = TQDateTime::tqcurrentDateTime();
context()->unregisterDeadChannel(this); context()->unregisterDeadChannel(this);
connection()->registerChannel(this); connection()->registerChannel(this);
// Update log file name // Update log file name
@ -704,7 +704,7 @@ void KviChannel::getTalkingUsersStats(TQString &buffer,TQStringList &l,bool bPas
} else { } else {
// (l.count() - 1) is > 1 // (l.count() - 1) is > 1
buffer += "</b> "; buffer += "</b> ";
buffer += __tr2qs("and other %1 users").arg(l.count() - 1); buffer += __tr2qs("and other %1 users").tqarg(l.count() - 1);
} }
buffer += " "; buffer += " ";
buffer += bPast ? __tr2qs("were talking recently") : __tr2qs("are talking"); buffer += bPast ? __tr2qs("were talking recently") : __tr2qs("are talking");
@ -1170,7 +1170,7 @@ bool KviChannel::activityMeter(unsigned int * puActivityValue,unsigned int * puA
if(m_pActionHistory->count() < KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT) if(m_pActionHistory->count() < KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT)
{ {
if(m_joinTime.secsTo(TQDateTime::currentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN) if(m_joinTime.secsTo(TQDateTime::tqcurrentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN)
{ {
// we can't exactly estimate // we can't exactly estimate
if(dSpan < 60.0)dSpan = 60.0; if(dSpan < 60.0)dSpan = 60.0;
@ -1281,7 +1281,7 @@ void KviChannel::getChannelActivityStats(KviChannelActivityStats * s)
if(s->uActionCount < KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT) if(s->uActionCount < KVI_CHANNEL_ACTION_HISTORY_MAX_COUNT)
{ {
if(m_joinTime.secsTo(TQDateTime::currentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN) if(m_joinTime.secsTo(TQDateTime::tqcurrentDateTime()) < KVI_CHANNEL_ACTION_HISTORY_MAX_TIMESPAN)
{ {
// we can't exactly estimate // we can't exactly estimate
s->bStatsInaccurate = true; s->bStatsInaccurate = true;
@ -1607,14 +1607,14 @@ void KviChannel::preprocessMessage(TQString & szMessage)
for ( TQStringList::Iterator it = strings.begin(); it != strings.end(); ++it ) { for ( TQStringList::Iterator it = strings.begin(); it != strings.end(); ++it ) {
if((*it).contains('\r')) continue; if((*it).contains('\r')) continue;
TQString tmp = KviMircCntrl::stripControlBytes(*it); TQString tmp = KviMircCntrl::stripControlBytes(*it);
if( findEntry(*it) ) *it=TQString("\r!n\r%1\r").arg(*it); if( findEntry(*it) ) *it=TQString("\r!n\r%1\r").tqarg(*it);
if(m_pConsole) if(m_pConsole)
if(m_pConsole->connection()) if(m_pConsole->connection())
if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().contains(tmp[0])) if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().contains(tmp[0]))
if((*it)==tmp) if((*it)==tmp)
*it=TQString("\r!c\r%1\r").arg(*it); *it=TQString("\r!c\r%1\r").tqarg(*it);
else else
*it=TQString("\r!c%1\r%2\r").arg(tmp).arg(*it); *it=TQString("\r!c%1\r%2\r").tqarg(tmp).tqarg(*it);
} }
szMessage=strings.join(" "); szMessage=strings.join(" ");
} }

@ -233,7 +233,7 @@ public:
void prependUserFlag(const TQString &nick,TQString &buffer){ m_pUserListView->prependUserFlag(nick,buffer); }; void prependUserFlag(const TQString &nick,TQString &buffer){ m_pUserListView->prependUserFlag(nick,buffer); };
char getUserFlag(const TQString &nick){ return m_pUserListView->getUserFlag(nick); }; char getUserFlag(const TQString &nick){ return m_pUserListView->getUserFlag(nick); };
bool isDeadChan(){ return (m_iStateFlags & KVI_CHANNEL_STATE_DEADCHAN); }; bool isDeadChan(){ return (m_iStateFlags & KVI_CHANNEL_STATE_DEADCHAN); };
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
void enableUserListUpdates(bool bEnable){ m_pUserListView->enableUpdates(bEnable); }; void enableUserListUpdates(bool bEnable){ m_pUserListView->enableUpdates(bEnable); };
KviUserListEntry * join(const TQString &nick,const TQString &user = TQString(),const TQString &host = TQString(),int iFlags = 0) KviUserListEntry * join(const TQString &nick,const TQString &user = TQString(),const TQString &host = TQString(),int iFlags = 0)
{ return m_pUserListView->join(nick,user,host,iFlags); }; { return m_pUserListView->join(nick,user,host,iFlags); };

@ -100,7 +100,7 @@
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <TQTextDocument> #include <TQTextDocument>
#else #else
#include <stylesheet.h> #include <tqstylesheet.h>
#endif #endif
extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase; extern KVIRC_API KviIrcServerDataBase * g_pIrcServerDataBase;
@ -353,7 +353,7 @@ void KviConsole::getUserTipText(const TQString &nick,KviIrcUserEntry *e,TQString
#else #else
TQMimeSourceFactory::defaultFactory()->setPixmap("ulv_avatar",*(e->avatar()->pixmap())); TQMimeSourceFactory::defaultFactory()->setPixmap("ulv_avatar",*(e->avatar()->pixmap()));
#endif #endif
buffer += TQString("<tr><td><center><img src=\"ulv_avatar\" width=\"%1\"></center></td></tr>").arg(e->avatar()->pixmap()->width()); buffer += TQString("<tr><td><center><img src=\"ulv_avatar\" width=\"%1\"></center></td></tr>").tqarg(e->avatar()->pixmap()->width());
} }
if(e->hasRealName()) if(e->hasRealName())
@ -404,12 +404,12 @@ void KviConsole::getUserTipText(const TQString &nick,KviIrcUserEntry *e,TQString
if(e->hasServer()) if(e->hasServer())
{ {
buffer += "<tr><td bgcolor=\"#F0F0F0\"><nobr>"; buffer += "<tr><td bgcolor=\"#F0F0F0\"><nobr>";
buffer += __tr2qs("Using server <b>%1</b>").arg(e->server()); buffer += __tr2qs("Using server <b>%1</b>").tqarg(e->server());
if(e->hasHops()) if(e->hasHops())
{ {
buffer += " ("; buffer += " (";
buffer += __tr2qs("%1 hops").arg(e->hops()); buffer += __tr2qs("%1 hops").tqarg(e->hops());
buffer += ")</nobr></td></tr>"; buffer += ")</nobr></td></tr>";
} else { } else {
buffer += "</nobr></td></tr></table>"; buffer += "</nobr></td></tr></table>";
@ -445,7 +445,7 @@ void KviConsole::saveProperties(KviConfig *cfg)
void KviConsole::getBaseLogFileName(TQString &buffer) void KviConsole::getBaseLogFileName(TQString &buffer)
{ {
buffer=TQString("CONSOLE%1").arg(ircContextId()); buffer=TQString("CONSOLE%1").tqarg(ircContextId());
} }
void KviConsole::showNotifyList(bool bShow) void KviConsole::showNotifyList(bool bShow)
@ -634,7 +634,7 @@ int KviConsole::applyHighlighting(KviWindow *wnd,int type,const TQString &nick,c
TQChar* aux=(TQChar*)(szStripMsg.ucs2()); TQChar* aux=(TQChar*)(szStripMsg.ucs2());
if(aux) if(aux)
{ {
while(aux->unicode()) while(aux->tqunicode())
{ {
if( KVI_OPTION_STRING(KviOption_stringWordSplitters).find(*aux) > -1 ) if( KVI_OPTION_STRING(KviOption_stringWordSplitters).find(*aux) > -1 )
szSource.append(' '); szSource.append(' ');
@ -649,7 +649,7 @@ int KviConsole::applyHighlighting(KviWindow *wnd,int type,const TQString &nick,c
szSource.prepend(' '); szSource.prepend(' ');
if(KVI_OPTION_BOOL(KviOption_boolAlwaysHighlightNick) && connection()) if(KVI_OPTION_BOOL(KviOption_boolAlwaysHighlightNick) && connection())
{ {
if(szSource.find(TQString(" %1 ").arg(connection()->userInfo()->nickName()),0,false) > -1) if(szSource.find(TQString(" %1 ").tqarg(connection()->userInfo()->nickName()),0,false) > -1)
return triggerOnHighlight(wnd,type,nick,user,host,szMsg,connection()->userInfo()->nickName()); return triggerOnHighlight(wnd,type,nick,user,host,szMsg,connection()->userInfo()->nickName());
} }
@ -661,7 +661,7 @@ int KviConsole::applyHighlighting(KviWindow *wnd,int type,const TQString &nick,c
if((*it).isEmpty()) if((*it).isEmpty())
continue; continue;
// FIXME : This is SLOOOOOOOOW (TQString -> ascii translation!!) !!!! // FIXME : This is SLOOOOOOOOW (TQString -> ascii translation!!) !!!!
if(szSource.find(TQString(" %1 ").arg(*it),0,false) > -1) if(szSource.find(TQString(" %1 ").tqarg(*it),0,false) > -1)
{ {
return triggerOnHighlight(wnd,type,nick,user,host,szMsg,*it); return triggerOnHighlight(wnd,type,nick,user,host,szMsg,*it);
} }
@ -794,11 +794,11 @@ void KviConsole::outputPrivmsg(KviWindow *wnd,
{ {
int sum = 0; int sum = 0;
int i = nick.length(); int i = nick.length();
const TQChar * aux = nick.unicode(); const TQChar * aux = nick.tqunicode();
// FIXME: Shouldn't this be case insensitive ? // FIXME: Shouldn't this be case insensitive ?
while(i > 0) while(i > 0)
{ {
sum += aux->unicode(); sum += aux->tqunicode();
aux++; aux++;
i--; i--;
} }
@ -815,11 +815,11 @@ void KviConsole::outputPrivmsg(KviWindow *wnd,
{ {
int sum = 0; int sum = 0;
int i = nick.length(); int i = nick.length();
const TQChar * aux = nick.unicode(); const TQChar * aux = nick.tqunicode();
// FIXME: Shouldn't this be case insensitive ? // FIXME: Shouldn't this be case insensitive ?
while(i > 0) while(i > 0)
{ {
sum += aux->unicode(); sum += aux->tqunicode();
aux++; aux++;
i--; i--;
} }
@ -835,7 +835,7 @@ void KviConsole::outputPrivmsg(KviWindow *wnd,
KVI_COLOR_EXT_USER_HALFOP : ((e->flags() & KVI_USERFLAG_VOICE) ? \ KVI_COLOR_EXT_USER_HALFOP : ((e->flags() & KVI_USERFLAG_VOICE) ? \
KVI_COLOR_EXT_USER_VOICE : KVI_COLOR_EXT_USER_USEROP)))); KVI_COLOR_EXT_USER_VOICE : KVI_COLOR_EXT_USER_USEROP))));
} }
szNick.prepend(TQString("%1").arg(color)); szNick.prepend(TQString("%1").tqarg(color));
szNick.prepend(KVI_TEXT_COLOR); szNick.prepend(KVI_TEXT_COLOR);
szNick.append(KVI_TEXT_COLOR); szNick.append(KVI_TEXT_COLOR);
} }
@ -1087,15 +1087,15 @@ void KviConsole::applyOptions()
void KviConsole::resizeEvent(TQResizeEvent *e) void KviConsole::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pInput->heightHint(); int hght = m_pInput->heightHint();
int hght2 = m_pButtonBox->sizeHint().height(); int hght2 = m_pButtonBox->tqsizeHint().height();
m_pButtonBox->setGeometry(0,0,width(),hght2); m_pButtonBox->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2));
m_pInput->setGeometry(0,height() - hght,width(),hght); m_pInput->setGeometry(0,height() - hght,width(),hght);
} }
TQSize KviConsole::sizeHint() const TQSize KviConsole::tqsizeHint() const
{ {
TQSize ret(m_pIrcView->sizeHint().height(),m_pIrcView->sizeHint().height() + m_pInput->heightHint()); TQSize ret(m_pIrcView->tqsizeHint().height(),m_pIrcView->tqsizeHint().height() + m_pInput->heightHint());
return ret; return ret;
} }

@ -101,7 +101,7 @@ protected:
virtual void getBaseLogFileName(TQString &buffer); virtual void getBaseLogFileName(TQString &buffer);
virtual void getTaskBarTipText(TQString &buffer); virtual void getTaskBarTipText(TQString &buffer);
virtual void fillContextPopup(KviTalPopupMenu * p); virtual void fillContextPopup(KviTalPopupMenu * p);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual void applyOptions(); virtual void applyOptions();
virtual void triggerCreationEvents(); virtual void triggerCreationEvents();
void fillStatusString(); void fillStatusString();
@ -181,7 +181,7 @@ public:
void terminateConnectionRequest(bool bForce = false,const char * quitMsg = 0); void terminateConnectionRequest(bool bForce = false,const char * quitMsg = 0);
// Status string (usermode + nick) (connection related too) // tqStatus string (usermode + nick) (connection related too)
const TQString & statusString(){ return m_szStatusString; }; const TQString & statusString(){ return m_szStatusString; };
// forwarders from KviIrcConnection // forwarders from KviIrcConnection

@ -40,7 +40,7 @@
#include "kvi_memmove.h" #include "kvi_memmove.h"
#include "kvi_toolwindows_container.h" #include "kvi_toolwindows_container.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_pointerhashtable.h" #include "kvi_pointerhashtable.h"
// kvi_app.cpp // kvi_app.cpp
@ -107,9 +107,9 @@
m_pDescriptionLabel = new TQLabel(this); m_pDescriptionLabel = new TQLabel(this);
m_pDescriptionLabel->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); m_pDescriptionLabel->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_pDescriptionLabel->setAlignment(TQt::AlignTop | TQt::AlignLeft); m_pDescriptionLabel->tqsetAlignment(TQt::AlignTop | TQt::AlignLeft);
#else #else
m_pDescriptionLabel->setAlignment(TQt::AlignTop | TQt::AlignLeft); m_pDescriptionLabel->tqsetAlignment(TQt::AlignTop | TQt::AlignLeft);
#endif #endif
g->addMultiCellWidget(m_pDescriptionLabel,3,3,1,3); g->addMultiCellWidget(m_pDescriptionLabel,3,3,1,3);

@ -30,7 +30,7 @@
#include "kvi_iconmanager.h" #include "kvi_iconmanager.h"
#include <tqdatetime.h> #include <tqdatetime.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqpixmap.h> #include <tqpixmap.h>
@ -103,7 +103,7 @@ void KviCtcpPageDialog::addPage(const TQString &szNick,const TQString &szUser,co
TQLabel * l = new TQLabel(this); TQLabel * l = new TQLabel(this);
l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel);
//l->setMaximumWidth(600); //l->setMaximumWidth(600);
TQString date = TQDateTime::currentDateTime().toString(); TQString date = TQDateTime::tqcurrentDateTime().toString();
TQString tmp = "<center>"; TQString tmp = "<center>";
tmp += __tr2qs("You have been paged by"); tmp += __tr2qs("You have been paged by");

@ -33,7 +33,7 @@
#include <tqcursor.h> #include <tqcursor.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqcursor.h> #include <tqcursor.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
@ -62,17 +62,17 @@ KviCustomToolBarSeparator::KviCustomToolBarSeparator(KviCustomToolBar *pParent,c
m_pToolBar = pParent; m_pToolBar = pParent;
setBackgroundMode(pParent->backgroundMode()); setBackgroundMode(pParent->backgroundMode());
setBackgroundOrigin(ParentOrigin); setBackgroundOrigin(ParentOrigin);
setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Minimum)); tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Minimum));
} }
TQSize KviCustomToolBarSeparator::sizeHint() const TQSize KviCustomToolBarSeparator::tqsizeHint() const
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQStyleOption opt; TQStyleOption opt;
opt.initFrom(this); opt.initFrom(this);
int extent = tqstyle()->pixelMetric(TQStyle::PM_ToolBarSeparatorExtent,&opt,this); int extent = tqstyle()->tqpixelMetric(TQStyle::PM_ToolBarSeparatorExtent,&opt,this);
#else #else
int extent = tqstyle().pixelMetric(TQStyle::PM_DockWindowSeparatorExtent,this); int extent = tqstyle().tqpixelMetric(TQStyle::PM_DockWindowSeparatorExtent,this);
#endif #endif
if(m_pToolBar->orientation() == Qt::Horizontal)return TQSize(extent,0); if(m_pToolBar->orientation() == Qt::Horizontal)return TQSize(extent,0);
else return TQSize(0,extent); else return TQSize(0,extent);
@ -88,7 +88,7 @@ void KviCustomToolBarSeparator::paintEvent(TQPaintEvent *)
#else #else
TQStyle::SFlags flags = TQStyle::Style_Default; TQStyle::SFlags flags = TQStyle::Style_Default;
if(m_pToolBar->orientation() == Qt::Horizontal)flags |= TQStyle::Style_Horizontal; if(m_pToolBar->orientation() == Qt::Horizontal)flags |= TQStyle::Style_Horizontal;
tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator,&p,rect(),colorGroup(),flags); tqstyle().tqdrawPrimitive(TQStyle::PE_DockWindowSeparator,&p,rect(),tqcolorGroup(),flags);
#endif #endif
} }
@ -169,9 +169,9 @@ void KviCustomToolBar::beginCustomize()
if(m_pFilteredChildren)delete m_pFilteredChildren; if(m_pFilteredChildren)delete m_pFilteredChildren;
m_pFilteredChildren = new KviPointerHashTable<void *,bool>; m_pFilteredChildren = new KviPointerHashTable<void *,bool>;
m_pFilteredChildren->setAutoDelete(true); m_pFilteredChildren->setAutoDelete(true);
// filter the events for all the children // filter the events for all the tqchildren
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQList<TQObject*> l = children(); TQList<TQObject*> l = tqchildren();
for(TQList<TQObject*>::Iterator it = l.begin();it != l.end();++it) for(TQList<TQObject*>::Iterator it = l.begin();it != l.end();++it)
{ {
if((*it)->isWidgetType()) if((*it)->isWidgetType())
@ -193,7 +193,7 @@ void KviCustomToolBar::endCustomize()
{ {
// stop filtering events // stop filtering events
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQList<TQObject*> l = children(); TQList<TQObject*> l = tqchildren();
for(TQList<TQObject*>::Iterator it = l.begin();it != l.end();++it) for(TQList<TQObject*>::Iterator it = l.begin();it != l.end();++it)
{ {
if((*it)->isWidgetType()) if((*it)->isWidgetType())
@ -209,7 +209,7 @@ void KviCustomToolBar::endCustomize()
++it; ++it;
} }
#endif #endif
// FIXME: We SHOULD MAKE SURE that the children are re-enabled... // FIXME: We SHOULD MAKE SURE that the tqchildren are re-enabled...
// this could be done by calling setEnabled(isEnabled()) on each action ? // this could be done by calling setEnabled(isEnabled()) on each action ?
if(m_pFilteredChildren) if(m_pFilteredChildren)
{ {
@ -238,7 +238,7 @@ void KviCustomToolBar::childEvent(TQChildEvent *e)
{ {
if(KviActionManager::customizingToolBars()) if(KviActionManager::customizingToolBars())
{ {
// this is useful for droppped and dragged-out children // this is useful for droppped and dragged-out tqchildren
if(e->type() == TQEvent::ChildInserted) if(e->type() == TQEvent::ChildInserted)
{ {
if(e->child()->isWidgetType()) if(e->child()->isWidgetType())
@ -293,7 +293,7 @@ void KviCustomToolBar::dragEnterEvent(TQDragEnterEvent *e)
boxLayout()->insertWidget(idx,m_pDraggedChild); boxLayout()->insertWidget(idx,m_pDraggedChild);
#ifdef COMPILE_KDE_SUPPORT #ifdef COMPILE_KDE_SUPPORT
// bleah :///// // bleah ://///
insertWidget(-1,m_pDraggedChild->sizeHint().width(),m_pDraggedChild,idx); insertWidget(-1,m_pDraggedChild->tqsizeHint().width(),m_pDraggedChild,idx);
#endif #endif
#endif #endif
TQEvent ev(TQEvent::LayoutHint); TQEvent ev(TQEvent::LayoutHint);
@ -334,7 +334,7 @@ int KviCustomToolBar::dropIndexAt(const TQPoint &pnt,TQWidget * exclude,int * ex
// treating exclude as if it was going to be removed // treating exclude as if it was going to be removed
// find also the exclude index if needed // find also the exclude index if needed
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQLayout * l = layout(); TQLayout * l = tqlayout();
#else #else
TQBoxLayout * l = boxLayout(); TQBoxLayout * l = boxLayout();
#endif #endif
@ -345,7 +345,7 @@ int KviCustomToolBar::dropIndexAt(const TQPoint &pnt,TQWidget * exclude,int * ex
if(!l)return 0; if(!l)return 0;
TQLayoutIterator it = l->iterator(); TQLayoutIterator it = l->iterator();
// find the children with minimum distance // find the tqchildren with minimum distance
int iMinDistIdx = -1; int iMinDistIdx = -1;
TQWidget * pMinDistW = 0; TQWidget * pMinDistW = 0;
unsigned int uMinDist = 0xffffffff; unsigned int uMinDist = 0xffffffff;
@ -453,7 +453,7 @@ int KviCustomToolBar::dropIndexAt(const TQPoint &pnt,TQWidget * exclude,int * ex
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQWidget * KviCustomToolBar::widgetAt(int index) TQWidget * KviCustomToolBar::widgetAt(int index)
{ {
TQLayout * l = layout(); TQLayout * l = tqlayout();
if(!l) if(!l)
return NULL; return NULL;
TQLayoutItem * it = l->itemAt(index); TQLayoutItem * it = l->itemAt(index);
@ -527,11 +527,11 @@ bool KviCustomToolBar::eventFilter(TQObject *o,TQEvent *e)
if(!KviActionManager::customizingToolBars())goto unhandled; // anything here is done when customizing only if(!KviActionManager::customizingToolBars())goto unhandled; // anything here is done when customizing only
if(e->type() == TQEvent::Enter) if(e->type() == TQEvent::Enter)
{ {
if(m_pMovedChild)return true; // kill it while moving other children if(m_pMovedChild)return true; // kill it while moving other tqchildren
} }
if(e->type() == TQEvent::Leave) if(e->type() == TQEvent::Leave)
{ {
if(m_pMovedChild)return true; // kill it while moving other children if(m_pMovedChild)return true; // kill it while moving other tqchildren
} }
if(e->type() == TQEvent::MouseButtonPress) if(e->type() == TQEvent::MouseButtonPress)
{ {
@ -550,7 +550,7 @@ bool KviCustomToolBar::eventFilter(TQObject *o,TQEvent *e)
)) ))
{ {
m_pMovedChild = (TQWidget *)o; m_pMovedChild = (TQWidget *)o;
// allow resizing of children // allow resizing of tqchildren
// FIXME: do it only if the child is really resizable // FIXME: do it only if the child is really resizable
if(m_pMovedChild->width() > 20) // might be an applet if(m_pMovedChild->width() > 20) // might be an applet
{ {

@ -41,7 +41,7 @@ class KviCustomToolBarSeparator : public TQWidget
TQ_OBJECT TQ_OBJECT
public: public:
KviCustomToolBarSeparator(KviCustomToolBar *pParent,const char * name); KviCustomToolBarSeparator(KviCustomToolBar *pParent,const char * name);
TQSize sizeHint() const; TQSize tqsizeHint() const;
protected: protected:
KviCustomToolBar * m_pToolBar; KviCustomToolBar * m_pToolBar;
protected: protected:

@ -124,9 +124,9 @@ void KviDebugWindow::resizeEvent(TQResizeEvent *e)
m_pInput->setGeometry(0,height() - hght,width(),hght); m_pInput->setGeometry(0,height() - hght,width(),hght);
} }
TQSize KviDebugWindow::sizeHint() const TQSize KviDebugWindow::tqsizeHint() const
{ {
TQSize ret(m_pSplitter->sizeHint().width(),m_pIrcView->sizeHint().height() + m_pInput->heightHint()); TQSize ret(m_pSplitter->tqsizeHint().width(),m_pIrcView->tqsizeHint().height() + m_pInput->heightHint());
return ret; return ret;
} }

@ -49,7 +49,7 @@ protected:
virtual void loadProperties(KviConfig * cfg); virtual void loadProperties(KviConfig * cfg);
virtual void saveProperties(KviConfig * cfg); virtual void saveProperties(KviConfig * cfg);
virtual void getBaseLogFileName(TQString &buffer); virtual void getBaseLogFileName(TQString &buffer);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
}; };
#endif //_KVI_DEBUGWINDOW_H_ #endif //_KVI_DEBUGWINDOW_H_

@ -67,10 +67,10 @@
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <layout.h> #include <tqlayout.h>
#include <tqfile.h> #include <tqfile.h>
#include <textstream.h> #include <tqtextstream.h>
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <tq3dockarea.h> #include <tq3dockarea.h>
#define TQDockArea Q3DockArea #define TQDockArea Q3DockArea
@ -173,7 +173,7 @@ KviFrame::KviFrame()
installAccelerators(this); installAccelerators(this);
layout()->setResizeMode(TQLayout::FreeResize); tqlayout()->setResizeMode(TQLayout::FreeResize);
} }
KviFrame::~KviFrame() KviFrame::~KviFrame()
@ -879,7 +879,7 @@ void KviFrame::childWindowActivated(KviWindow *wnd)
if(wnd->isMaximized() && wnd->mdiParent())updateCaption(); if(wnd->isMaximized() && wnd->mdiParent())updateCaption();
m_pTaskBar->setActiveItem(wnd->taskBarItem()); m_pTaskBar->setActiveItem(wnd->taskBarItem());
//wnd->gainedActiveWindowStatus(); // <-- atm unused //wnd->gainedActiveWindowtqStatus(); // <-- atm unused
if(g_pActiveWindow->view()) if(g_pActiveWindow->view())
g_pActiveWindow->view()->clearUnreaded(); g_pActiveWindow->view()->clearUnreaded();
@ -1085,7 +1085,7 @@ void KviFrame::fillToolBarsPopup(KviTalPopupMenu * p)
{ {
for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next()) for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next())
{ {
TQString label = __tr2qs("Show %1").arg(d->visibleName()); TQString label = __tr2qs("Show %1").tqarg(d->visibleName());
if(d->icon())id = p->insertItem(*(d->icon()),label); if(d->icon())id = p->insertItem(*(d->icon()),label);
else id = p->insertItem(label); else id = p->insertItem(label);
p->setItemChecked(id,moduleExtensionToolBar(d->id())); p->setItemChecked(id,moduleExtensionToolBar(d->id()));
@ -1101,7 +1101,7 @@ void KviFrame::fillToolBarsPopup(KviTalPopupMenu * p)
if(cnt > 0)p->insertSeparator(); if(cnt > 0)p->insertSeparator();
while(KviCustomToolBarDescriptor * d = it2.current()) while(KviCustomToolBarDescriptor * d = it2.current())
{ {
TQString label = __tr2qs("Show %1").arg(d->label()); TQString label = __tr2qs("Show %1").tqarg(d->label());
TQString ico = d->iconId(); TQString ico = d->iconId();
// use the icon only if there is no check // use the icon only if there is no check
if(d->toolBar()) if(d->toolBar())
@ -1165,7 +1165,7 @@ void KviFrame::toolbarsPopupSelected(int id)
bool KviFrame::focusNextPrevChild(bool next) bool KviFrame::focusNextPrevChild(bool next)
{ {
//debug("FOCUS NEXT PREV CHILD"); //debug("FOCUS NEXT PREV CHILD");
TQWidget * w = focusWidget(); TQWidget * w = tqfocusWidget();
if(w) if(w)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4

@ -110,7 +110,7 @@ protected:
KviDockExtension * m_pDockExtension; // the frame's dock extension: this should be prolly moved ? KviDockExtension * m_pDockExtension; // the frame's dock extension: this should be prolly moved ?
KviAccel * m_pAccel; // the global accelelrator KviAccel * m_pAccel; // the global accelelrator
public: public:
// the mdi manager: handles mdi children // the mdi manager: handles mdi tqchildren
KviMdiManager * mdiManager(){ return m_pMdi; }; KviMdiManager * mdiManager(){ return m_pMdi; };
// the splitter is the central widget for this frame // the splitter is the central widget for this frame
TQSplitter * splitter(){ return m_pSplitter; }; TQSplitter * splitter(){ return m_pSplitter; };

@ -29,8 +29,8 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <layout.h> #include <tqlayout.h>
#include <textbrowser.h> #include <tqtextbrowser.h>
KviHtmlDialog::KviHtmlDialog(TQWidget * pParent,KviHtmlDialogData * pData) KviHtmlDialog::KviHtmlDialog(TQWidget * pParent,KviHtmlDialogData * pData)
: TQDialog(pParent) : TQDialog(pParent)

@ -25,7 +25,7 @@
#include "kvi_locale.h" #include "kvi_locale.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqimage.h> #include <tqimage.h>
@ -67,7 +67,7 @@ void KviImageDialogItem::paint(TQPainter * p)
p->drawRect(3,3,pm->width() + 4,pm->height() + 4); p->drawRect(3,3,pm->width() + 4,pm->height() + 4);
} }
TQRect daRect(listBox()->itemRect(this)); TQRect daRect(listBox()->tqitemRect(this));
p->setPen(TQt::black); p->setPen(TQt::black);
p->drawRect(1,1,daRect.width() - 2,daRect.height() - 2); p->drawRect(1,1,daRect.width() - 2,daRect.height() - 2);
@ -361,7 +361,7 @@ void KviImageDialog::tipRequest(KviDynamicToolTip *,const TQPoint &pnt)
{ {
KviTalListBoxItem * it = (KviTalListBoxItem *)m_pListBox->itemAt(pnt); KviTalListBoxItem * it = (KviTalListBoxItem *)m_pListBox->itemAt(pnt);
if(!it)return; if(!it)return;
TQRect r = m_pListBox->itemRect(it); TQRect r = m_pListBox->tqitemRect(it);
KviImageDialogItem * i = (KviImageDialogItem *)it; KviImageDialogItem * i = (KviImageDialogItem *)it;
m_pTip->tip(r,i->tipText()); m_pTip->tip(r,i->tipText());
} }

@ -61,14 +61,14 @@
#include <tqfiledialog.h> #include <tqfiledialog.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <tqpainter.h> #include <tqpainter.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include "kvi_pointerlist.h" #include "kvi_pointerlist.h"
#include <tqapplication.h> #include <tqapplication.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include "kvi_tal_hbox.h" #include "kvi_tal_hbox.h"
#include <layout.h> #include <tqlayout.h>
#include <tqstyle.h> #include <tqstyle.h>
#include <tqevent.h> #include <tqevent.h>
@ -299,10 +299,10 @@ void KviInputEditor::dropEvent(TQDropEvent *e)
int KviInputEditor::heightHint() const int KviInputEditor::heightHint() const
{ {
return sizeHint().height(); return tqsizeHint().height();
} }
TQSize KviInputEditor::sizeHint() const TQSize KviInputEditor::tqsizeHint() const
{ {
//grabbed from qlineedit.cpp //grabbed from qlineedit.cpp
constPolish(); constPolish();
@ -454,7 +454,7 @@ void KviInputEditor::drawContents(TQPainter *p)
{ {
pa.setPen(KVI_OPTION_COLOR(KviOption_colorInputControl)); pa.setPen(KVI_OPTION_COLOR(KviOption_colorInputControl));
TQString s = getSubstituteChar(m_szTextBuffer[charIdx].unicode()); TQString s = getSubstituteChar(m_szTextBuffer[charIdx].tqunicode());
// the block width is 4 pixels more than the actual character // the block width is 4 pixels more than the actual character
@ -523,9 +523,9 @@ void KviInputEditor::drawContents(TQPainter *p)
{ {
TQChar c = m_szTextBuffer.at(m_iBlockLen); TQChar c = m_szTextBuffer.at(m_iBlockLen);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_iLastCursorXPosition+= c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c); m_iLastCursorXPosition+= c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);
#else #else
m_iLastCursorXPosition+= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); m_iLastCursorXPosition+= (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c);
#endif #endif
m_iBlockLen++; m_iBlockLen++;
} }
@ -626,7 +626,7 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int
TQChar c = m_szTextBuffer[idx]; TQChar c = m_szTextBuffer[idx];
if((c.unicode() > 32) || if((c.tqunicode() > 32) ||
((c != TQChar(KVI_TEXT_COLOR)) && ((c != TQChar(KVI_TEXT_COLOR)) &&
(c != TQChar(KVI_TEXT_BOLD)) && (c != TQChar(KVI_TEXT_UNDERLINE)) && (c != TQChar(KVI_TEXT_BOLD)) && (c != TQChar(KVI_TEXT_UNDERLINE)) &&
(c != TQChar(KVI_TEXT_RESET)) && (c != TQChar(KVI_TEXT_REVERSE)) && (c != TQChar(KVI_TEXT_RESET)) && (c != TQChar(KVI_TEXT_REVERSE)) &&
@ -637,7 +637,7 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int
while((idx < ((int)(m_szTextBuffer.length()))) && (curXPos < maxXPos)) while((idx < ((int)(m_szTextBuffer.length()))) && (curXPos < maxXPos))
{ {
c = m_szTextBuffer[idx]; c = m_szTextBuffer[idx];
if((c.unicode() > 32) || if((c.tqunicode() > 32) ||
((c != TQChar(KVI_TEXT_COLOR)) && (c != TQChar(KVI_TEXT_BOLD)) && ((c != TQChar(KVI_TEXT_COLOR)) && (c != TQChar(KVI_TEXT_BOLD)) &&
(c != TQChar(KVI_TEXT_UNDERLINE)) && (c != TQChar(KVI_TEXT_RESET)) && (c != TQChar(KVI_TEXT_UNDERLINE)) && (c != TQChar(KVI_TEXT_RESET)) &&
(c != TQChar(KVI_TEXT_REVERSE)) && (c != TQChar(KVI_TEXT_CRYPTESCAPE)) && (c != TQChar(KVI_TEXT_REVERSE)) && (c != TQChar(KVI_TEXT_CRYPTESCAPE)) &&
@ -645,9 +645,9 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int
{ {
m_iBlockLen++; m_iBlockLen++;
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
int xxx = c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; int xxx = c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);;
#else #else
int xxx = (c.unicode() < 256 ? g_iInputFontCharWidth[c.unicode()] : fm.width(c)); int xxx = (c.tqunicode() < 256 ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c));
#endif #endif
m_iBlockWidth +=xxx; m_iBlockWidth +=xxx;
curXPos +=xxx; curXPos +=xxx;
@ -658,9 +658,9 @@ void KviInputEditor::extractNextBlock(int idx,TQFontMetrics & fm,int curXPos,int
} else { } else {
m_bControlBlock = true; m_bControlBlock = true;
m_iBlockLen = 1; m_iBlockLen = 1;
m_iBlockWidth = g_iInputFontCharWidth[c.unicode()]; m_iBlockWidth = g_iInputFontCharWidth[c.tqunicode()];
//Control code //Control code
switch(c.unicode()) switch(c.tqunicode())
{ {
case KVI_TEXT_BOLD: case KVI_TEXT_BOLD:
m_bCurBold = ! m_bCurBold; m_bCurBold = ! m_bCurBold;
@ -716,7 +716,7 @@ void KviInputEditor::runUpToTheFirstVisibleChar()
register int idx = 0; register int idx = 0;
while(idx < m_iFirstVisibleChar) while(idx < m_iFirstVisibleChar)
{ {
unsigned short c = m_szTextBuffer[idx].unicode(); unsigned short c = m_szTextBuffer[idx].tqunicode();
if(c < 32) if(c < 32)
{ {
switch(c) switch(c)
@ -789,7 +789,7 @@ void KviInputEditor::mousePressEvent(TQMouseEvent *e)
TQString szClip; TQString szClip;
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(c) if(c)
{ {
szClip = c->text(TQClipboard::Clipboard); szClip = c->text(TQClipboard::Clipboard);
@ -918,7 +918,7 @@ bool KviInputEditor::hasSelection()
void KviInputEditor::copyToClipboard() void KviInputEditor::copyToClipboard()
{ {
if(!hasSelection())return; if(!hasSelection())return;
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(!c)return; if(!c)return;
TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1);
c->setText(szTxt,TQClipboard::Clipboard); c->setText(szTxt,TQClipboard::Clipboard);
@ -928,7 +928,7 @@ void KviInputEditor::copyToClipboard()
void KviInputEditor::copyToSelection(bool bDonNotCopyToClipboard) void KviInputEditor::copyToSelection(bool bDonNotCopyToClipboard)
{ {
if(!hasSelection())return; if(!hasSelection())return;
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(!c)return; if(!c)return;
TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); TQString szTxt = m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1);
if(c->supportsSelection()) if(c->supportsSelection())
@ -969,7 +969,7 @@ void KviInputEditor::removeSelected()
void KviInputEditor::cut() void KviInputEditor::cut()
{ {
if(!hasSelection())return; if(!hasSelection())return;
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(!c)return; if(!c)return;
c->setText(m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1),TQClipboard::Clipboard); c->setText(m_szTextBuffer.mid(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1),TQClipboard::Clipboard);
m_szTextBuffer.remove(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1); m_szTextBuffer.remove(m_iSelectionBegin,(m_iSelectionEnd-m_iSelectionBegin)+1);
@ -1042,7 +1042,7 @@ int KviInputEditor::replaceSegment(int start, int length, const TQString &text)
void KviInputEditor::pasteClipboardWithConfirmation() void KviInputEditor::pasteClipboardWithConfirmation()
{ {
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(!c)return; if(!c)return;
TQString szText = c->text(TQClipboard::Clipboard); TQString szText = c->text(TQClipboard::Clipboard);
@ -1057,7 +1057,7 @@ void KviInputEditor::pasteClipboardWithConfirmation()
void KviInputEditor::pasteSelectionWithConfirmation() void KviInputEditor::pasteSelectionWithConfirmation()
{ {
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(!c)return; if(!c)return;
TQString szText = c->text(c->supportsSelection() ? TQClipboard::Selection : TQClipboard::Clipboard); TQString szText = c->text(c->supportsSelection() ? TQClipboard::Selection : TQClipboard::Clipboard);
@ -1325,7 +1325,7 @@ void KviInputEditor::imComposeEvent(TQIMEvent *e)
#endif #endif
// repaint // tqrepaint
m_bUpdatesEnabled = true; m_bUpdatesEnabled = true;
repaintWithCursorOn(); repaintWithCursorOn();
e->accept(); e->accept();
@ -1347,7 +1347,7 @@ void KviInputEditor::imEndEvent(TQIMEvent *e)
// move cursor to after the IM result text // move cursor to after the IM result text
moveCursorTo(m_iIMStart + m_iIMLength); moveCursorTo(m_iIMStart + m_iIMLength);
// repaint // tqrepaint
m_bUpdatesEnabled = true; m_bUpdatesEnabled = true;
repaintWithCursorOn(); repaintWithCursorOn();
@ -1819,7 +1819,7 @@ void KviInputEditor::completion(bool bShift)
bool bIsDir = false; bool bIsDir = false;
bool bIsNick = false; bool bIsNick = false;
unsigned short uc = word[0].unicode(); unsigned short uc = word[0].tqunicode();
if(uc == '/') if(uc == '/')
{ {
@ -1845,7 +1845,7 @@ void KviInputEditor::completion(bool bShift)
{ {
if(m_pKviWindow) if(m_pKviWindow)
{ {
if( (word.length()==1) && (m_pKviWindow->windowName()[0].unicode()==uc)) if( (word.length()==1) && (m_pKviWindow->windowName()[0].tqunicode()==uc))
{ {
match=m_pKviWindow->windowName(); match=m_pKviWindow->windowName();
match.append(" "); match.append(" ");
@ -1911,8 +1911,8 @@ void KviInputEditor::completion(bool bShift)
const TQChar * b2 = KviTQString::nullTerminatedArray(match) + wLen; const TQChar * b2 = KviTQString::nullTerminatedArray(match) + wLen;
const TQChar * c1 = b1; const TQChar * c1 = b1;
const TQChar * c2 = b2; const TQChar * c2 = b2;
if(bIsDir)while(c1->unicode() && (c1->unicode() == c2->unicode()))c1++,c2++; if(bIsDir)while(c1->tqunicode() && (c1->tqunicode() == c2->tqunicode()))c1++,c2++;
else while(c1->unicode() && (c1->lower().unicode() == c2->lower().unicode()))c1++,c2++; else while(c1->tqunicode() && (c1->lower().tqunicode() == c2->lower().tqunicode()))c1++,c2++;
int len = wLen + (c1 - b1); int len = wLen + (c1 - b1);
if(len < ((int)(match.length())))match.remove(len,match.length() - len); if(len < ((int)(match.length())))match.remove(len,match.length() - len);
if(!all.isEmpty())all.append(", "); if(!all.isEmpty())all.append(", ");
@ -2084,17 +2084,17 @@ void KviInputEditor::moveRightFirstVisibleCharToShowCursor()
TQChar c = m_szTextBuffer.at(m_iCursorPosition); TQChar c = m_szTextBuffer.at(m_iCursorPosition);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_iLastCursorXPosition += c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; m_iLastCursorXPosition += c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);;
#else #else
m_iLastCursorXPosition += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); m_iLastCursorXPosition += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c);
#endif #endif
while(m_iLastCursorXPosition >= contentsRect().width()-2*KVI_INPUT_MARGIN) while(m_iLastCursorXPosition >= contentsRect().width()-2*KVI_INPUT_MARGIN)
{ {
c = m_szTextBuffer.at(m_iFirstVisibleChar); c = m_szTextBuffer.at(m_iFirstVisibleChar);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_iLastCursorXPosition -= c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; m_iLastCursorXPosition -= c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);;
#else #else
m_iLastCursorXPosition -= (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); m_iLastCursorXPosition -= (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c);
#endif #endif
m_iFirstVisibleChar++; m_iFirstVisibleChar++;
} }
@ -2127,9 +2127,9 @@ int KviInputEditor::charIndexFromXPosition(int xPos)
{ {
TQChar c = m_szTextBuffer.at(curChar); TQChar c = m_szTextBuffer.at(curChar);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
int widthCh = c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; int widthCh = c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);;
#else #else
int widthCh = (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); int widthCh = (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c);
#endif #endif
if(xPos < (curXPos+(widthCh/2)))return curChar; if(xPos < (curXPos+(widthCh/2)))return curChar;
else if(xPos < (curXPos+widthCh))return (curChar+1); else if(xPos < (curXPos+widthCh))return (curChar+1);
@ -2150,9 +2150,9 @@ int KviInputEditor::xPositionFromCharIndex(TQFontMetrics& fm,int chIdx,bool bCo
{ {
TQChar c = m_szTextBuffer.at(curChar); TQChar c = m_szTextBuffer.at(curChar);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
curXPos += c.unicode() < 32 ? fm.width(getSubstituteChar(c.unicode())) + 3 : fm.width(c);; curXPos += c.tqunicode() < 32 ? fm.width(getSubstituteChar(c.tqunicode())) + 3 : fm.width(c);;
#else #else
curXPos += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : fm.width(c); curXPos += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : fm.width(c);
#endif #endif
curChar++; curChar++;
} }
@ -2170,9 +2170,9 @@ int KviInputEditor::xPositionFromCharIndex(int chIdx,bool bContentsCoords)
{ {
TQChar c = m_szTextBuffer.at(curChar); TQChar c = m_szTextBuffer.at(curChar);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
curXPos += c.unicode() < 32 ? g_pLastFontMetrics->width(getSubstituteChar(c.unicode())) + 3 : g_pLastFontMetrics->width(c); curXPos += c.tqunicode() < 32 ? g_pLastFontMetrics->width(getSubstituteChar(c.tqunicode())) + 3 : g_pLastFontMetrics->width(c);
#else #else
curXPos += (c.unicode() < 256) ? g_iInputFontCharWidth[c.unicode()] : g_pLastFontMetrics->width(c); curXPos += (c.tqunicode() < 256) ? g_iInputFontCharWidth[c.tqunicode()] : g_pLastFontMetrics->width(c);
#endif #endif
curChar++; curChar++;
} }
@ -2335,9 +2335,9 @@ KviInput::KviInput(KviWindow *par,KviUserListView * view)
m_pButtonContainer->setSpacing(0); m_pButtonContainer->setSpacing(0);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_pButtonContainer->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred)); m_pButtonContainer->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred));
// if(m_pButtonContainer->layout()) // if(m_pButtonContainer->tqlayout())
// m_pButtonContainer->layout()->setSizeConstraint(TQLayout::SetMinimumSize); // m_pButtonContainer->tqlayout()->setSizeConstraint(TQLayout::SetMinimumSize);
#endif #endif
m_pHistoryButton = new KviStyledToolButton(m_pButtonContainer,"historybutton"); m_pHistoryButton = new KviStyledToolButton(m_pButtonContainer,"historybutton");
@ -2396,9 +2396,9 @@ KviInput::KviInput(KviWindow *par,KviUserListView * view)
m_pInputEditor = new KviInputEditor(this,par,view); m_pInputEditor = new KviInputEditor(this,par,view);
connect(m_pInputEditor,TQT_SIGNAL(enterPressed()),this,TQT_SLOT(inputEditorEnterPressed())); connect(m_pInputEditor,TQT_SIGNAL(enterPressed()),this,TQT_SLOT(inputEditorEnterPressed()));
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_pInputEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Ignored)); m_pInputEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Ignored));
#else #else
m_pInputEditor->setSizePolicy(TQSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored)); m_pInputEditor->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored));
#endif #endif
@ -2497,7 +2497,7 @@ void KviInput::keyPressEvent(TQKeyEvent *e)
"here to prevent you from accidentally sending<br>" \ "here to prevent you from accidentally sending<br>" \
"a really large message just because you didn't edit it<br>" \ "a really large message just because you didn't edit it<br>" \
"properly after pasting text from the clipboard.<br><br>" \ "properly after pasting text from the clipboard.<br><br>" \
"Do you want the message to be sent?").arg(nLines), "Do you want the message to be sent?").tqarg(nLines),
__tr2qs("Yes, always"), __tr2qs("Yes, always"),
__tr2qs("Yes"), __tr2qs("Yes"),
__tr2qs("No"), __tr2qs("No"),
@ -2543,7 +2543,7 @@ void KviInput::multilineEditorButtonToggled(bool bOn)
KviScriptEditor::destroyInstance(m_pMultiLineEditor); KviScriptEditor::destroyInstance(m_pMultiLineEditor);
m_pMultiLineEditor = 0; m_pMultiLineEditor = 0;
m_pInputEditor->show(); m_pInputEditor->show();
m_pWindow->childrenTreeChanged(0); m_pWindow->tqchildrenTreeChanged(0);
m_pInputEditor->setFocus(); m_pInputEditor->setFocus();
m_pMultiEditorButton->setOn(false); m_pMultiEditorButton->setOn(false);
} else { } else {
@ -2556,7 +2556,7 @@ void KviInput::multilineEditorButtonToggled(bool bOn)
m_pMultiLineEditor->setFindLineeditReadOnly(true); m_pMultiLineEditor->setFindLineeditReadOnly(true);
m_pInputEditor->hide(); m_pInputEditor->hide();
m_pMultiLineEditor->show(); m_pMultiLineEditor->show();
m_pWindow->childrenTreeChanged(m_pMultiLineEditor); m_pWindow->tqchildrenTreeChanged(m_pMultiLineEditor);
m_pMultiLineEditor->setFocus(); m_pMultiLineEditor->setFocus();
m_pMultiEditorButton->setOn(true); m_pMultiEditorButton->setOn(true);
} }
@ -2596,14 +2596,14 @@ void KviInput::historyButtonClicked()
void KviInput::setFocus() void KviInput::setFocus()
{ {
// redirect setFocus() to the right children // redirect setFocus() to the right tqchildren
if(m_pMultiLineEditor)m_pMultiLineEditor->setFocus(); if(m_pMultiLineEditor)m_pMultiLineEditor->setFocus();
else m_pInputEditor->setFocus(); else m_pInputEditor->setFocus();
} }
void KviInput::focusInEvent(TQFocusEvent * e) void KviInput::focusInEvent(TQFocusEvent * e)
{ {
// if we get a focus in event , redirect the focus to the children // if we get a focus in event , redirect the focus to the tqchildren
if(m_pMultiLineEditor)m_pMultiLineEditor->setFocus(); if(m_pMultiLineEditor)m_pMultiLineEditor->setFocus();
else m_pInputEditor->setFocus(); else m_pInputEditor->setFocus();
} }

@ -144,7 +144,7 @@ protected:
bool m_bReadOnly; bool m_bReadOnly;
public: public:
int heightHint() const; int heightHint() const;
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
void setText(const TQString text); void setText(const TQString text);
TQString text() { return m_szTextBuffer; }; TQString text() { return m_szTextBuffer; };
void insertChar(TQChar c); void insertChar(TQChar c);

@ -208,7 +208,7 @@ void KviIpEditor::recreateChildren()
m_pEdit[i] = new TQLineEdit(this); m_pEdit[i] = new TQLineEdit(this);
m_pEdit[i]->installEventFilter(this); m_pEdit[i]->installEventFilter(this);
m_pEdit[i]->setFrame(false); m_pEdit[i]->setFrame(false);
m_pEdit[i]->setAlignment(TQt::AlignCenter); m_pEdit[i]->tqsetAlignment(TQt::AlignCenter);
} }
//m_pEdit[i]->setMinimumWidth(minWidth); //m_pEdit[i]->setMinimumWidth(minWidth);
m_pEdit[i]->setMaxLength(bIpV4 ? 3 : 4); m_pEdit[i]->setMaxLength(bIpV4 ? 3 : 4);
@ -243,8 +243,8 @@ void KviIpEditor::recreateChildren()
} }
} }
} }
//setMinimumWidth(4 + (max * minWidth) + ((max - 1) * m_pLabel[0]->sizeHint().width())); //setMinimumWidth(4 + (max * minWidth) + ((max - 1) * m_pLabel[0]->tqsizeHint().width()));
setMinimumHeight(m_pLabel[0]->sizeHint().height() + 4); setMinimumHeight(m_pLabel[0]->tqsizeHint().height() + 4);
resizeEvent(0); resizeEvent(0);
} }
@ -395,7 +395,7 @@ void KviIpEditor::resizeEvent(TQResizeEvent *e)
if(m_pEdit[0]) if(m_pEdit[0])
{ {
int maxW = (m_addrType == IpV4) ? 4 : 8; int maxW = (m_addrType == IpV4) ? 4 : 8;
int labHint = m_pLabel[0]->sizeHint().width(); int labHint = m_pLabel[0]->tqsizeHint().width();
int hghHint = height() - 4; int hghHint = height() - 4;
int ediWdth = ((width() - 4) - ((maxW - 1) * labHint)) / maxW; int ediWdth = ((width() - 4) - ((maxW - 1) * labHint)) / maxW;
int curX = 2; int curX = 2;
@ -413,16 +413,16 @@ void KviIpEditor::resizeEvent(TQResizeEvent *e)
if(e)TQFrame::resizeEvent(e); if(e)TQFrame::resizeEvent(e);
} }
TQSize KviIpEditor::sizeHint() TQSize KviIpEditor::tqsizeHint()
{ {
if(m_pEdit[0]) if(m_pEdit[0])
{ {
int labHint = m_pLabel[0]->sizeHint().width(); int labHint = m_pLabel[0]->tqsizeHint().width();
int hghHint = m_pEdit[0]->sizeHint().height(); int hghHint = m_pEdit[0]->tqsizeHint().height();
int ediHint = m_pEdit[0]->sizeHint().width(); int ediHint = m_pEdit[0]->tqsizeHint().width();
if(m_addrType == IpV4)return TQSize((labHint * 3) + (ediHint * 4) + 4,hghHint + 4); if(m_addrType == IpV4)return TQSize((labHint * 3) + (ediHint * 4) + 4,hghHint + 4);
else return TQSize((labHint * 7) + (ediHint * 8) + 4,hghHint + 4); else return TQSize((labHint * 7) + (ediHint * 8) + 4,hghHint + 4);
} else return TQFrame::sizeHint(); } else return TQFrame::tqsizeHint();
} }

@ -55,7 +55,7 @@ public:
protected: protected:
virtual bool eventFilter(TQObject * o,TQEvent *e); virtual bool eventFilter(TQObject * o,TQEvent *e);
virtual void resizeEvent(TQResizeEvent *e); virtual void resizeEvent(TQResizeEvent *e);
virtual TQSize sizeHint(); virtual TQSize tqsizeHint();
private: private:
void recreateChildren(); void recreateChildren();
}; };

@ -44,7 +44,7 @@
#include <tqstyle.h> #include <tqstyle.h>
#include <tqpainter.h> #include <tqpainter.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <layout.h> #include <tqlayout.h>
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <tqevent.h> #include <tqevent.h>
@ -77,7 +77,7 @@ KviToolBarGraphicalApplet::KviToolBarGraphicalApplet(TQWidget * par,const char *
setMouseTracking(true); setMouseTracking(true);
m_bResizeMode = false; m_bResizeMode = false;
m_sizeHint = TQSize(180,32); m_tqsizeHint = TQSize(180,32);
m_bSizeLoaded = false; m_bSizeLoaded = false;
} }
@ -95,16 +95,16 @@ void KviToolBarGraphicalApplet::saveAppletWidth(unsigned int uWidth)
void KviToolBarGraphicalApplet::setupSizeHint() void KviToolBarGraphicalApplet::setupSizeHint()
{ {
m_sizeHint = TQSize(loadAppletWidth(),22); m_tqsizeHint = TQSize(loadAppletWidth(),22);
m_bSizeLoaded = true; m_bSizeLoaded = true;
} }
TQSize KviToolBarGraphicalApplet::sizeHint() const TQSize KviToolBarGraphicalApplet::tqsizeHint() const
{ {
// forget constness :( // forget constness :(
KviToolBarGraphicalApplet * that = (KviToolBarGraphicalApplet *)this; KviToolBarGraphicalApplet * that = (KviToolBarGraphicalApplet *)this;
if(!m_bSizeLoaded)that->setupSizeHint(); if(!m_bSizeLoaded)that->setupSizeHint();
return m_sizeHint; return m_tqsizeHint;
} }
/* /*
@ -127,7 +127,7 @@ void KviToolBarGraphicalApplet::mouseMoveEvent(TQMouseEvent * e)
int w = e->pos().x(); int w = e->pos().x();
if(w < 32)w = 32; if(w < 32)w = 32;
if(w > 480)w = 480; if(w > 480)w = 480;
m_sizeHint = TQSize(w,22); m_tqsizeHint = TQSize(w,22);
resize(w,height()); resize(w,height());
g_pApp->postEvent(parentWidget(),new TQEvent(TQEvent::LayoutHint)); g_pApp->postEvent(parentWidget(),new TQEvent(TQEvent::LayoutHint));
} }
@ -155,7 +155,7 @@ void KviToolBarGraphicalApplet::mouseReleaseEvent(TQMouseEvent * e)
KviToolBarGraphicalApplet::~KviToolBarGraphicalApplet() KviToolBarGraphicalApplet::~KviToolBarGraphicalApplet()
{ {
saveAppletWidth(m_sizeHint.width()); saveAppletWidth(m_tqsizeHint.width());
g_pToolBarGraphicalAppletList->removeRef(this); g_pToolBarGraphicalAppletList->removeRef(this);
if(g_pToolBarGraphicalAppletList->isEmpty()) if(g_pToolBarGraphicalAppletList->isEmpty())
{ {
@ -208,10 +208,10 @@ void KviToolBarGraphicalApplet::paintEvent(TQPaintEvent *e)
drawContents(&pa); drawContents(&pa);
//Need to draw the sunken rect around the view now... //Need to draw the sunken rect around the view now...
pa.setPen(colorGroup().dark()); pa.setPen(tqcolorGroup().dark());
pa.drawLine(0,0,width(),0); pa.drawLine(0,0,width(),0);
pa.drawLine(0,0,0,width()); pa.drawLine(0,0,0,width());
pa.setPen(colorGroup().light()); pa.setPen(tqcolorGroup().light());
pa.drawLine(1,height() - 1,width() - 1,height() - 1); pa.drawLine(1,height() - 1,width() - 1,height() - 1);
pa.drawLine(width() - 1,1,width() - 1,height()); pa.drawLine(width() - 1,1,width() - 1,height());
@ -332,7 +332,7 @@ void KviIrcContextDisplay::tipRequest(KviDynamicToolTip * tip,const TQPoint &)
/* /*
TQSize KviIrcContextDisplay::sizeHint() const TQSize KviIrcContextDisplay::tqsizeHint() const
{ {
return TQSize(160,22); return TQSize(160,22);
} }
@ -416,7 +416,7 @@ void KviIrcContextDisplay::drawContents(TQPainter * p)
p->setClipping(false); p->setClipping(false);
TQColor base = colorGroup().background(); TQColor base = tqcolorGroup().background();
TQColor cntx = KVI_OPTION_ICCOLOR(c->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); TQColor cntx = KVI_OPTION_ICCOLOR(c->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS);
base.setRgb((base.red() + cntx.red()) >> 1,(base.green() + cntx.green()) >> 1, base.setRgb((base.red() + cntx.red()) >> 1,(base.green() + cntx.green()) >> 1,
(base.blue() + cntx.blue()) >> 1); (base.blue() + cntx.blue()) >> 1);

@ -55,7 +55,7 @@ public:
private: private:
bool m_bResizeMode; bool m_bResizeMode;
bool m_bSizeLoaded; bool m_bSizeLoaded;
TQSize m_sizeHint; TQSize m_tqsizeHint;
private: private:
void resizeMemBuffer(); void resizeMemBuffer();
protected: protected:
@ -63,7 +63,7 @@ protected:
virtual unsigned int loadAppletWidth(); virtual unsigned int loadAppletWidth();
virtual void saveAppletWidth(unsigned int uWidth); virtual void saveAppletWidth(unsigned int uWidth);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual void mouseMoveEvent(TQMouseEvent *e); virtual void mouseMoveEvent(TQMouseEvent *e);
virtual void mousePressEvent(TQMouseEvent *e); virtual void mousePressEvent(TQMouseEvent *e);
virtual void mouseReleaseEvent(TQMouseEvent *e); virtual void mouseReleaseEvent(TQMouseEvent *e);

@ -117,7 +117,7 @@
#include <tqapplication.h> #include <tqapplication.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqevent.h> #include <tqevent.h>
@ -134,7 +134,7 @@
#include <tqcursor.h> #include <tqcursor.h>
#endif #endif
#include <clipboard.h> #include <tqclipboard.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <tqscrollbar.h> #include <tqscrollbar.h>
@ -165,7 +165,7 @@
#define KVI_DEF_BACK 200 #define KVI_DEF_BACK 200
// FIXME: #warning "The scrollbar should NOT have a fixed size : the KDE styles can configure the size (sizeHint() ?)" // FIXME: #warning "The scrollbar should NOT have a fixed size : the KDE styles can configure the size (tqsizeHint() ?)"
// //
// FIXME: PgUp and PgDn scrolls a fixed number of lines! // FIXME: PgUp and PgDn scrolls a fixed number of lines!
@ -243,12 +243,12 @@ void kvi_appendWCharToTQStringWithLength(TQString * qstrptr,const kvi_wchar_t *
kvi_wslen_t oldLen = qstrptr->length(); kvi_wslen_t oldLen = qstrptr->length();
qstrptr->setLength(oldLen + len); qstrptr->setLength(oldLen + len);
#ifdef WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR #ifdef WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR
_WSTRING_WMEMCPY(qstrptr->unicode() + oldLen,ptr,len); _WSTRING_WMEMCPY(qstrptr->tqunicode() + oldLen,ptr,len);
#else // !WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR #else // !WSTRINGCONFIG_SAFE_TO_MEMCPY_TQCHAR
TQChar * c = (qstrptr->unicode() + oldLen); TQChar * c = (qstrptr->tqunicode() + oldLen);
while(*ptr) while(*ptr)
{ {
c->unicode() = *ptr; c->tqunicode() = *ptr;
ptr++; ptr++;
c++; c++;
} }
@ -290,7 +290,7 @@ KviIrcView::KviIrcView(TQWidget *parent,KviFrame *pFrm,KviWindow *pWnd)
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
setAttribute(TQt::WA_NoSystemBackground); // This disables automatic qt double buffering setAttribute(TQt::WA_NoSystemBackground); // This disables automatic qt double buffering
setAttribute(TQt::WA_OpaquePaintEvent); setAttribute(TQt::WA_OpaquePaintEvent);
//setAttribute(TQt::WA_PaintOnScreen); // disable qt backing store (that would force us to trigger repaint() instead of the 10 times faster paintEvent(0)) //setAttribute(TQt::WA_PaintOnScreen); // disable qt backing store (that would force us to trigger tqrepaint() instead of the 10 times faster paintEvent(0))
#endif #endif
m_iFlushTimer = 0; m_iFlushTimer = 0;
@ -346,7 +346,7 @@ KviIrcView::KviIrcView(TQWidget *parent,KviFrame *pFrm,KviWindow *pWnd)
m_pMessagesStoppedWhileSelecting = new KviPointerList<KviIrcViewLine>; m_pMessagesStoppedWhileSelecting = new KviPointerList<KviIrcViewLine>;
m_pMessagesStoppedWhileSelecting->setAutoDelete(false); m_pMessagesStoppedWhileSelecting->setAutoDelete(false);
// say qt to avoid erasing on repaint // say qt to avoid erasing on tqrepaint
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
setAutoFillBackground(false); setAutoFillBackground(false);
#else #else
@ -532,7 +532,7 @@ void KviIrcView::stopLogging()
if(m_pLogFile) if(m_pLogFile)
{ {
TQString szLogEnd; TQString szLogEnd;
szLogEnd.sprintf(__tr2qs("### Log session terminated at %s ###"),TQDateTime::currentDateTime().toString().utf8().data()); szLogEnd.sprintf(__tr2qs("### Log session terminated at %s ###"),TQDateTime::tqcurrentDateTime().toString().utf8().data());
add2Log(szLogEnd); add2Log(szLogEnd);
m_pLogFile->close(); m_pLogFile->close();
@ -706,7 +706,7 @@ bool KviIrcView::startLogging(const TQString& fname,bool bPrependCurBuffer)
} }
TQString szLogStart; TQString szLogStart;
szLogStart.sprintf(__tr2qs("### Log session started at %s ###"),TQDateTime::currentDateTime().toString().utf8().data()); szLogStart.sprintf(__tr2qs("### Log session started at %s ###"),TQDateTime::tqcurrentDateTime().toString().utf8().data());
add2Log(szLogStart); add2Log(szLogStart);
if(bPrependCurBuffer) if(bPrependCurBuffer)
{ {
@ -723,7 +723,7 @@ bool KviIrcView::startLogging(const TQString& fname,bool bPrependCurBuffer)
void KviIrcView::add2Log(const TQString &szBuffer,int iMsgType) void KviIrcView::add2Log(const TQString &szBuffer,int iMsgType)
{ {
TQString szToWrite=TQString("%1 %2\n").arg(iMsgType).arg(szBuffer); TQString szToWrite=TQString("%1 %2\n").tqarg(iMsgType).tqarg(szBuffer);
KviTQCString szTmp = KviTQString::toUtf8(szToWrite); KviTQCString szTmp = KviTQString::toUtf8(szToWrite);
if(m_pLogFile->writeBlock(szTmp.data(),szTmp.length())==-1) debug("WARNING : Can not write to the log file."); if(m_pLogFile->writeBlock(szTmp.data(),szTmp.length())==-1) debug("WARNING : Can not write to the log file.");
} }
@ -803,7 +803,7 @@ void KviIrcView::clearLineMark(bool bRepaint)
void KviIrcView::checkLogDate() void KviIrcView::checkLogDate()
{ {
TQDate::currentDate(); TQDate::tqcurrentDate();
} }
void KviIrcView::clearUnreaded() void KviIrcView::clearUnreaded()
@ -900,7 +900,7 @@ void KviIrcView::scrollBarPositionChanged(int newValue)
} }
} }
if(!m_bSkipScrollBarRepaint) if(!m_bSkipScrollBarRepaint)
repaint(); tqrepaint();
//update(); //update();
// if(!m_bSkipScrollBarRepaint)postUpdateEvent(); // if(!m_bSkipScrollBarRepaint)postUpdateEvent();
} }
@ -911,7 +911,7 @@ bool KviIrcView::event(TQEvent *e)
{ {
__range_valid(m_bPostedPaintEventPending); __range_valid(m_bPostedPaintEventPending);
if(m_iUnprocessedPaintEventRequests) if(m_iUnprocessedPaintEventRequests)
repaint(); tqrepaint();
// else we just had a pointEvent that did the job // else we just had a pointEvent that did the job
m_bPostedPaintEventPending = false; m_bPostedPaintEventPending = false;
return true; return true;
@ -935,12 +935,12 @@ void KviIrcView::wheelEvent(TQWheelEvent *e)
void KviIrcView::postUpdateEvent() void KviIrcView::postUpdateEvent()
{ {
// This will post a TQEvent with a full repaint request // This will post a TQEvent with a full tqrepaint request
if(!m_bPostedPaintEventPending) if(!m_bPostedPaintEventPending)
{ {
m_bPostedPaintEventPending = true; m_bPostedPaintEventPending = true;
TQEvent *e = new TQEvent(TQEvent::User); TQEvent *e = new TQEvent(TQEvent::User);
g_pApp->postEvent(this,e); // queue a repaint g_pApp->postEvent(this,e); // queue a tqrepaint
} }
m_iUnprocessedPaintEventRequests++; // paintEvent() will set it to 0 m_iUnprocessedPaintEventRequests++; // paintEvent() will set it to 0
@ -956,7 +956,7 @@ void KviIrcView::postUpdateEvent()
fastScroll(3); fastScroll(3);
#endif #endif
else else
repaint(); tqrepaint();
} }
} }
@ -1093,7 +1093,7 @@ void KviIrcView::removeHeadLine(bool bRepaint)
m_pLastLine = 0; m_pLastLine = 0;
} }
if(bRepaint) if(bRepaint)
repaint(); tqrepaint();
} }
void KviIrcView::splitMessagesTo(KviIrcView *v) void KviIrcView::splitMessagesTo(KviIrcView *v)
@ -1150,12 +1150,12 @@ void KviIrcView::splitMessagesTo(KviIrcView *v)
m_pScrollBar->setRange(0,m_iNumLines); m_pScrollBar->setRange(0,m_iNumLines);
m_pScrollBar->setValue(m_iNumLines); m_pScrollBar->setValue(m_iNumLines);
repaint(); tqrepaint();
v->m_iLastScrollBarValue = v->m_iNumLines; v->m_iLastScrollBarValue = v->m_iNumLines;
v->m_pScrollBar->setRange(0,v->m_iNumLines); v->m_pScrollBar->setRange(0,v->m_iNumLines);
v->m_pScrollBar->setValue(v->m_iNumLines); v->m_pScrollBar->setValue(v->m_iNumLines);
v->repaint(); v->tqrepaint();
} }
@ -1183,7 +1183,7 @@ void KviIrcView::appendMessagesFrom(KviIrcView *v)
m_pScrollBar->setRange(0,m_iNumLines); m_pScrollBar->setRange(0,m_iNumLines);
m_pScrollBar->setValue(m_iNumLines); m_pScrollBar->setValue(m_iNumLines);
repaint(); tqrepaint();
} }
void KviIrcView::joinMessagesFrom(KviIrcView *v) void KviIrcView::joinMessagesFrom(KviIrcView *v)
@ -1243,7 +1243,7 @@ void KviIrcView::joinMessagesFrom(KviIrcView *v)
m_pScrollBar->setRange(0,m_iNumLines); m_pScrollBar->setRange(0,m_iNumLines);
m_pScrollBar->setValue(m_iNumLines); m_pScrollBar->setValue(m_iNumLines);
repaint(); tqrepaint();
} }
void KviIrcView::appendText(int iMsgType,const kvi_wchar_t *data_ptr,int iFlags) void KviIrcView::appendText(int iMsgType,const kvi_wchar_t *data_ptr,int iFlags)
@ -1264,7 +1264,7 @@ void KviIrcView::appendText(int iMsgType,const kvi_wchar_t *data_ptr,int iFlags)
{ {
TQString szBuffer; TQString szBuffer;
kvi_appendWCharToTQStringWithLength(&szBuffer,data_ptr,kvi_wstrlen(data_ptr)); kvi_appendWCharToTQStringWithLength(&szBuffer,data_ptr,kvi_wstrlen(data_ptr));
szBuffer.prepend(TQDateTime::currentDateTime().toString("[h:mm:ss] ")); szBuffer.prepend(TQDateTime::tqcurrentDateTime().toString("[h:mm:ss] "));
if(m_pLogFile && KVI_OPTION_MSGTYPE(iMsgType).logEnabled()) if(m_pLogFile && KVI_OPTION_MSGTYPE(iMsgType).logEnabled())
{ {
add2Log(szBuffer,iMsgType); add2Log(szBuffer,iMsgType);
@ -1923,7 +1923,7 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType,
if(bEnableTimeStamp && KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp)) if(bEnableTimeStamp && KVI_OPTION_BOOL(KviOption_boolIrcViewTimestamp))
{ {
TQString szTimestamp; TQString szTimestamp;
szTimestamp=TQDateTime::currentDateTime ( szTimestamp=TQDateTime::tqcurrentDateTime (
KVI_OPTION_BOOL(KviOption_boolIrcViewTimestampUTC) ? Qt::UTC : Qt::LocalTime ).toString( KVI_OPTION_BOOL(KviOption_boolIrcViewTimestampUTC) ? Qt::UTC : Qt::LocalTime ).toString(
KVI_OPTION_STRING(KviOption_stringIrcViewTimestampFormat) ); KVI_OPTION_STRING(KviOption_stringIrcViewTimestampFormat) );
szTimestamp.append(' '); szTimestamp.append(' ');
@ -1964,8 +1964,8 @@ const kvi_wchar_t * KviIrcView::getTextLine(int iMsgType,
iTextIdx = iTimeStampLength; // the rest of the string will begin 11 chars later iTextIdx = iTimeStampLength; // the rest of the string will begin 11 chars later
// throw away const: we WANT to set the chars :D // throw away const: we WANT to set the chars :D
register TQChar * data_ptr_aux = (TQChar *)line_ptr->szText.unicode(); register TQChar * data_ptr_aux = (TQChar *)line_ptr->szText.tqunicode();
register TQChar * stamp_ptr_aux = (TQChar *)szTimestamp.unicode(); register TQChar * stamp_ptr_aux = (TQChar *)szTimestamp.tqunicode();
for(int i=0;i<iTimeStampLength;i++) for(int i=0;i<iTimeStampLength;i++)
*data_ptr_aux++ = *stamp_ptr_aux++; *data_ptr_aux++ = *stamp_ptr_aux++;
@ -2713,8 +2713,8 @@ void KviIrcView::fastScroll(int lines)
if(!m_pFm) if(!m_pFm)
{ {
// We must get the metrics from a real paint event :/ // We must get the metrics from a real paint event :/
// must do a full repaint to get them... // must do a full tqrepaint to get them...
repaint(); tqrepaint();
return; return;
} }
@ -2788,7 +2788,7 @@ void KviIrcView::paintEvent(TQPaintEvent *p)
int widgetWidth = width() - scrollbarWidth; int widgetWidth = width() - scrollbarWidth;
if(!isVisible() || (widgetWidth < 20)) if(!isVisible() || (widgetWidth < 20))
{ {
m_iUnprocessedPaintEventRequests = 0; // assume a full repaint when this widget is shown... m_iUnprocessedPaintEventRequests = 0; // assume a full tqrepaint when this widget is shown...
return; //can't show stuff here return; //can't show stuff here
} }
@ -2800,7 +2800,7 @@ void KviIrcView::paintEvent(TQPaintEvent *p)
(m_pKviWindow->mdiParent() != g_pFrame->mdiManager()->topChild()) && (m_pKviWindow->mdiParent() != g_pFrame->mdiManager()->topChild()) &&
(m_pKviWindow->mdiParent())) (m_pKviWindow->mdiParent()))
{ {
m_iUnprocessedPaintEventRequests = 0; // assume a full repaint when this widget is shown... m_iUnprocessedPaintEventRequests = 0; // assume a full tqrepaint when this widget is shown...
return; // totally hidden behind other windows return; // totally hidden behind other windows
} }
@ -3428,10 +3428,10 @@ no_selection_paint:
} }
//Need to draw the sunken rect around the view now... //Need to draw the sunken rect around the view now...
pa.setPen(colorGroup().dark()); pa.setPen(tqcolorGroup().dark());
pa.drawLine(0,0,widgetWidth,0); pa.drawLine(0,0,widgetWidth,0);
pa.drawLine(0,0,0,widgetHeight); pa.drawLine(0,0,0,widgetHeight);
pa.setPen(colorGroup().light()); pa.setPen(tqcolorGroup().light());
widgetWidth--; widgetWidth--;
pa.drawLine(1,widgetHeight-1,widgetWidth,widgetHeight-1); pa.drawLine(1,widgetHeight-1,widgetWidth,widgetHeight-1);
pa.drawLine(widgetWidth,1,widgetWidth,widgetHeight); pa.drawLine(widgetWidth,1,widgetWidth,widgetHeight);
@ -3449,7 +3449,7 @@ no_selection_paint:
// //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define IRCVIEW_WCHARWIDTH(__c) (((__c).unicode() < 0xff) ? m_iFontCharacterWidth[(__c).unicode()] : m_pFm->width(__c)) #define IRCVIEW_WCHARWIDTH(__c) (((__c).tqunicode() < 0xff) ? m_iFontCharacterWidth[(__c).tqunicode()] : m_pFm->width(__c))
void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth) void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth)
{ {
@ -3476,12 +3476,12 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth)
int maxBlockLen = ptr->pChunks->iTextLen; // ptr->pChunks[0].iTextLen int maxBlockLen = ptr->pChunks->iTextLen; // ptr->pChunks[0].iTextLen
const TQChar * unicode = ptr->szText.unicode(); const TQChar * tqunicode = ptr->szText.tqunicode();
for(;;) for(;;)
{ {
//Calculate the block_width //Calculate the block_width
register const TQChar * p = unicode + ptr->pBlocks[ptr->iBlockCount].block_start; register const TQChar * p = tqunicode + ptr->pBlocks[ptr->iBlockCount].block_start;
int curBlockLen = 0; int curBlockLen = 0;
int curBlockWidth = 0; int curBlockWidth = 0;
@ -3546,7 +3546,7 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth)
ptr->pBlocks[ptr->iBlockCount].block_width = 0; ptr->pBlocks[ptr->iBlockCount].block_width = 0;
ptr->iBlockCount++; ptr->iBlockCount++;
ptr->pBlocks = (KviIrcViewWrappedBlock *)kvi_realloc(ptr->pBlocks,(ptr->iBlockCount + 1) * sizeof(KviIrcViewWrappedBlock)); ptr->pBlocks = (KviIrcViewWrappedBlock *)kvi_realloc(ptr->pBlocks,(ptr->iBlockCount + 1) * sizeof(KviIrcViewWrappedBlock));
ptr->pBlocks[ptr->iBlockCount].block_start = p - unicode; ptr->pBlocks[ptr->iBlockCount].block_start = p - tqunicode;
ptr->pBlocks[ptr->iBlockCount].block_len = 0; ptr->pBlocks[ptr->iBlockCount].block_len = 0;
ptr->pBlocks[ptr->iBlockCount].block_width = 0; ptr->pBlocks[ptr->iBlockCount].block_width = 0;
ptr->pBlocks[ptr->iBlockCount].pChunk = &(ptr->pChunks[curAttrBlock]); ptr->pBlocks[ptr->iBlockCount].pChunk = &(ptr->pChunks[curAttrBlock]);
@ -3579,7 +3579,7 @@ void KviIrcView::calculateLineWraps(KviIrcViewLine *ptr,int maxWidth)
maxBlockLen-=curBlockLen; maxBlockLen-=curBlockLen;
ptr->iBlockCount++; ptr->iBlockCount++;
ptr->pBlocks = (KviIrcViewWrappedBlock *)kvi_realloc(ptr->pBlocks,(ptr->iBlockCount + 1) * sizeof(KviIrcViewWrappedBlock)); ptr->pBlocks = (KviIrcViewWrappedBlock *)kvi_realloc(ptr->pBlocks,(ptr->iBlockCount + 1) * sizeof(KviIrcViewWrappedBlock));
ptr->pBlocks[ptr->iBlockCount].block_start = p - unicode; ptr->pBlocks[ptr->iBlockCount].block_start = p - tqunicode;
ptr->pBlocks[ptr->iBlockCount].block_len = 0; ptr->pBlocks[ptr->iBlockCount].block_len = 0;
ptr->pBlocks[ptr->iBlockCount].block_width = 0; ptr->pBlocks[ptr->iBlockCount].block_width = 0;
ptr->pBlocks[ptr->iBlockCount].pChunk = 0; ptr->pBlocks[ptr->iBlockCount].pChunk = 0;
@ -3632,8 +3632,8 @@ bool KviIrcView::checkSelectionBlock(KviIrcViewLine * line,int left,int bottom,i
// //
// Yahoo!!!! // Yahoo!!!!
// //
const TQChar * unicode = line->szText.unicode(); const TQChar * tqunicode = line->szText.tqunicode();
register const TQChar * p = unicode + line->pBlocks[bufIndex].block_start; register const TQChar * p = tqunicode + line->pBlocks[bufIndex].block_start;
int top = bottom-m_iFontLineSpacing; int top = bottom-m_iFontLineSpacing;
int right = ((line->pBlocks[bufIndex].block_width >= 0) ? \ int right = ((line->pBlocks[bufIndex].block_width >= 0) ? \
@ -3858,7 +3858,7 @@ void KviIrcView::recalcFontVariables(const TQFontMetrics &fm,const TQFontInfo &f
void KviIrcView::resizeEvent(TQResizeEvent *) void KviIrcView::resizeEvent(TQResizeEvent *)
{ {
int iScr = m_pScrollBar->sizeHint().width(); int iScr = m_pScrollBar->tqsizeHint().width();
int iLeft = width()-iScr; int iLeft = width()-iScr;
m_pToolsButton->setGeometry(iLeft,0,iScr,iScr); m_pToolsButton->setGeometry(iLeft,0,iScr,iScr);
m_pScrollBar->setGeometry(iLeft,iScr,iScr,height() - iScr); m_pScrollBar->setGeometry(iLeft,iScr,iScr,height() - iScr);
@ -3873,7 +3873,7 @@ void KviIrcView::resizeEvent(TQResizeEvent *)
} }
} }
TQSize KviIrcView::sizeHint() const TQSize KviIrcView::tqsizeHint() const
{ {
TQSize ret(KVI_IRCVIEW_SIZEHINT_WIDTH,KVI_IRCVIEW_SIZEHINT_HEIGHT); TQSize ret(KVI_IRCVIEW_SIZEHINT_WIDTH,KVI_IRCVIEW_SIZEHINT_HEIGHT);
return ret; return ret;
@ -3900,7 +3900,7 @@ void KviIrcView::showToolsPopup()
m_pToolsPopup->insertSeparator(); m_pToolsPopup->insertSeparator();
m_pToolsPopup->insertItem(__tr2qs("Clear Buffer"),this,TQT_SLOT(clearBuffer())); m_pToolsPopup->insertItem(__tr2qs("Clear Buffer"),this,TQT_SLOT(clearBuffer()));
TQSize s = m_pToolsPopup->sizeHint(); TQSize s = m_pToolsPopup->tqsizeHint();
m_pToolsPopup->popup(m_pToolsButton->mapToGlobal(TQPoint(m_pToolsButton->width() - s.width(),m_pToolsButton->height()))); m_pToolsPopup->popup(m_pToolsButton->mapToGlobal(TQPoint(m_pToolsButton->width() - s.width(),m_pToolsButton->height())));
} }
@ -3955,11 +3955,11 @@ void KviIrcView::toggleToolWidget()
delete m_pToolWidget; delete m_pToolWidget;
m_pToolWidget = 0; m_pToolWidget = 0;
m_pCursorLine = 0; m_pCursorLine = 0;
repaint(); tqrepaint();
} else { } else {
m_pToolWidget = new KviIrcViewToolWidget(this); m_pToolWidget = new KviIrcViewToolWidget(this);
int w = m_pToolWidget->sizeHint().width(); int w = m_pToolWidget->tqsizeHint().width();
m_pToolWidget->move(width() - (w + 40),10); m_pToolWidget->move(width() - (w + 40),10);
m_pToolWidget->show(); m_pToolWidget->show();
} }
@ -3979,7 +3979,7 @@ void KviIrcView::setCursorLine(KviIrcViewLine * l)
if(m_pCursorLine == m_pCurLine) if(m_pCursorLine == m_pCurLine)
{ {
repaint(); tqrepaint();
return; return;
} }
@ -4000,7 +4000,7 @@ void KviIrcView::setCursorLine(KviIrcViewLine * l)
m_iLastScrollBarValue = sc; m_iLastScrollBarValue = sc;
m_pScrollBar->setValue(sc); m_pScrollBar->setValue(sc);
} else { } else {
repaint(); tqrepaint();
} }
} else { } else {
// The cursor line is over the current line // The cursor line is over the current line
@ -4034,7 +4034,7 @@ void KviIrcView::setCursorLine(KviIrcViewLine * l)
m_iLastScrollBarValue = sc; m_iLastScrollBarValue = sc;
m_pScrollBar->setValue(sc); m_pScrollBar->setValue(sc);
} else { } else {
repaint(); tqrepaint();
} }
} }
} }
@ -4086,7 +4086,7 @@ do_pNext:
} while(l != start); } while(l != start);
} }
m_pCursorLine = 0; m_pCursorLine = 0;
repaint(); tqrepaint();
if(m_pToolWidget)m_pToolWidget->setFindResult(__tr2qs("Not found")); if(m_pToolWidget)m_pToolWidget->setFindResult(__tr2qs("Not found"));
} }
@ -4140,7 +4140,7 @@ do_pPrev:
} }
m_pCursorLine = 0; m_pCursorLine = 0;
repaint(); tqrepaint();
if(m_pToolWidget)m_pToolWidget->setFindResult(__tr2qs("Not found")); if(m_pToolWidget)m_pToolWidget->setFindResult(__tr2qs("Not found"));
} }
@ -4302,12 +4302,12 @@ KviIrcViewWrappedBlock * KviIrcView::getLinkUnderMouse(int xPos,int yPos,TQRect
szLink.append(TQChar(KVI_TEXT_COLOR)); szLink.append(TQChar(KVI_TEXT_COLOR));
if(l->pBlocks[iEndOfLInk].pChunk->colors.fore != KVI_NOCHANGE) if(l->pBlocks[iEndOfLInk].pChunk->colors.fore != KVI_NOCHANGE)
{ {
szLink.append(TQString("%1").arg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.fore))); szLink.append(TQString("%1").tqarg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.fore)));
} }
if(l->pBlocks[iEndOfLInk].pChunk->colors.back != KVI_NOCHANGE) if(l->pBlocks[iEndOfLInk].pChunk->colors.back != KVI_NOCHANGE)
{ {
szLink.append(TQChar(',')); szLink.append(TQChar(','));
szLink.append(TQString("%1").arg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.back))); szLink.append(TQString("%1").tqarg((int)(l->pBlocks[iEndOfLInk].pChunk->colors.back)));
} }
break; break;
} }
@ -4479,7 +4479,7 @@ void KviIrcView::mouseDoubleClickEvent(TQMouseEvent *e)
pParams->append(szCmd); pParams->append(szCmd);
switch(linkCmd[0].unicode()) switch(linkCmd[0].tqunicode())
{ {
case 'n': case 'n':
{ {
@ -4517,7 +4517,7 @@ void KviIrcView::mouseDoubleClickEvent(TQMouseEvent *e)
if(((KviChannel *)m_pKviWindow)->isMeOp()) if(((KviChannel *)m_pKviWindow)->isMeOp())
{ {
TQChar plmn = linkCmd[1]; TQChar plmn = linkCmd[1];
if((plmn.unicode() == '+') || (plmn.unicode() == '-')) if((plmn.tqunicode() == '+') || (plmn.tqunicode() == '-'))
{ {
TQString target(m_pKviWindow->windowName()); TQString target(m_pKviWindow->windowName());
target.replace("\\","\\\\"); target.replace("\\","\\\\");
@ -4526,7 +4526,7 @@ void KviIrcView::mouseDoubleClickEvent(TQMouseEvent *e)
target.replace("$","\\$"); target.replace("$","\\$");
target.replace("%","\\%"); target.replace("%","\\%");
TQChar flag = linkCmd[2]; TQChar flag = linkCmd[2];
switch(flag.unicode()) switch(flag.tqunicode())
{ {
case 'o': case 'o':
case 'v': case 'v':
@ -4581,7 +4581,7 @@ void KviIrcView::mouseDoubleClickEvent(TQMouseEvent *e)
c->raise(); c->raise();
c->setFocus(); c->setFocus();
} else { } else {
cmd = TQString("join %1").arg(szChan); cmd = TQString("join %1").tqarg(szChan);
} }
} }
} }
@ -4619,7 +4619,7 @@ void KviIrcView::mousePressEvent(TQMouseEvent *e)
if(m_pToolWidget) if(m_pToolWidget)
{ {
m_pCursorLine = getVisibleLineAt(e->pos().x(),e->pos().y()); m_pCursorLine = getVisibleLineAt(e->pos().x(),e->pos().y());
repaint(); tqrepaint();
} }
m_mousePressPos = e->pos(); m_mousePressPos = e->pos();
@ -4669,7 +4669,7 @@ void KviIrcView::mouseRealPressEvent(TQMouseEvent *e)
{ {
if(!linkCmd.isEmpty()) if(!linkCmd.isEmpty())
{ {
switch(linkCmd[0].unicode()) switch(linkCmd[0].tqunicode())
{ {
case 'n': case 'n':
{ {
@ -4782,7 +4782,7 @@ void KviIrcView::mouseReleaseEvent(TQMouseEvent *)
{ {
killTimer(m_iSelectTimer); killTimer(m_iSelectTimer);
m_iSelectTimer = 0; m_iSelectTimer = 0;
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(c) if(c)
{ {
// copy to both! // copy to both!
@ -4802,7 +4802,7 @@ void KviIrcView::mouseReleaseEvent(TQMouseEvent *)
m_pMessagesStoppedWhileSelecting->removeFirst(); m_pMessagesStoppedWhileSelecting->removeFirst();
appendLine(l,false); appendLine(l,false);
} }
repaint(); tqrepaint();
} }
} }
@ -4858,11 +4858,11 @@ void KviIrcView::mouseMoveEvent(TQMouseEvent *e)
int lastBottom = m_iLastLinkRectTop + m_iLastLinkRectHeight; int lastBottom = m_iLastLinkRectTop + m_iLastLinkRectHeight;
int thisBottom = rectTop + rectHeight; int thisBottom = rectTop + rectHeight;
TQRect r(0,top,width(),((lastBottom > thisBottom) ? lastBottom : thisBottom) - top); TQRect r(0,top,width(),((lastBottom > thisBottom) ? lastBottom : thisBottom) - top);
repaint(r); tqrepaint(r);
} else { } else {
// no prev link // no prev link
TQRect r(0,rectTop,width(),rectHeight); TQRect r(0,rectTop,width(),rectHeight);
repaint(r); tqrepaint(r);
} }
m_iLastLinkRectTop = rectTop; m_iLastLinkRectTop = rectTop;
m_iLastLinkRectHeight = rectHeight; m_iLastLinkRectHeight = rectHeight;
@ -4872,7 +4872,7 @@ void KviIrcView::mouseMoveEvent(TQMouseEvent *e)
{ {
// There was a previous bottom rect // There was a previous bottom rect
TQRect r(0,m_iLastLinkRectTop,width(),m_iLastLinkRectHeight); TQRect r(0,m_iLastLinkRectTop,width(),m_iLastLinkRectHeight);
repaint(r); tqrepaint(r);
m_iLastLinkRectTop = -1; m_iLastLinkRectTop = -1;
m_iLastLinkRectHeight = -1; m_iLastLinkRectHeight = -1;
} }
@ -4896,7 +4896,7 @@ void KviIrcView::doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &lin
TQString tip; TQString tip;
switch(linkCmd[0].unicode()) switch(linkCmd[0].tqunicode())
{ {
case 'u': // url link case 'u': // url link
{ {
@ -4972,11 +4972,11 @@ void KviIrcView::doLinkToolTip(const TQRect &rct,TQString &linkCmd,TQString &lin
if(((KviChannel *)m_pKviWindow)->isMeOp()) if(((KviChannel *)m_pKviWindow)->isMeOp())
{ {
TQChar plmn = linkCmd[1]; TQChar plmn = linkCmd[1];
if((plmn.unicode() == '+') || (plmn.unicode() == '-')) if((plmn.tqunicode() == '+') || (plmn.tqunicode() == '-'))
{ {
tip = __tr2qs("Double-click to set<br>"); tip = __tr2qs("Double-click to set<br>");
TQChar flag = linkCmd[2]; TQChar flag = linkCmd[2];
switch(flag.unicode()) switch(flag.tqunicode())
{ {
case 'o': case 'o':
case 'v': case 'v':
@ -5100,7 +5100,7 @@ void KviIrcView::timerEvent(TQTimerEvent *e)
if(e->timerId() == m_iSelectTimer) if(e->timerId() == m_iSelectTimer)
{ {
calculateSelectionBounds(); calculateSelectionBounds();
repaint(); tqrepaint();
} }
if(e->timerId() == m_iMouseTimer) if(e->timerId() == m_iMouseTimer)
{ {

@ -197,7 +197,7 @@ public:
void nextLine(); void nextLine();
void nextPage(); void nextPage();
void prevPage(); void prevPage();
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
const TQString & lastLineOfText(); const TQString & lastLineOfText();
const TQString & lastMessageText(); const TQString & lastMessageText();
virtual void setFont(const TQFont &f); virtual void setFont(const TQFont &f);

@ -148,7 +148,7 @@ typedef struct _KviIrcViewWrappedBlockSelectionInfoTag
#endif //!COMPILE_ON_WINDOWS #endif //!COMPILE_ON_WINDOWS
//========================================================================================================= //=========================================================================================================
// Screen layout // Screen tqlayout
//========================================================================================================= //=========================================================================================================
//FIRST LINE (prev_line = 0) <---m_pFirstLine //FIRST LINE (prev_line = 0) <---m_pFirstLine

@ -38,7 +38,7 @@
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include <tqtabwidget.h> #include <tqtabwidget.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
@ -278,7 +278,7 @@ void KviIrcViewToolWidget::filterSave()
void KviIrcViewToolWidget::forceRepaint() void KviIrcViewToolWidget::forceRepaint()
{ {
#if defined(COMPILE_USE_QT4) && defined(COMPILE_ON_WINDOWS) #if defined(COMPILE_USE_QT4) && defined(COMPILE_ON_WINDOWS)
m_pIrcView->repaint(); m_pIrcView->tqrepaint();
#else #else
m_pIrcView->paintEvent(0); m_pIrcView->paintEvent(0);
#endif #endif

@ -190,7 +190,7 @@ void KviListView::resizeEvent(TQResizeEvent * e)
{ {
KviTalListView::resizeEvent(e); KviTalListView::resizeEvent(e);
if(m_pBackgroundOverlayPixmap) if(m_pBackgroundOverlayPixmap)
repaintContents(); // force a full repaint (otherwise qt does not honor static background here) repaintContents(); // force a full tqrepaint (otherwise qt does not honor static background here)
} }
#ifdef COMPILE_ON_WINDOWS #ifdef COMPILE_ON_WINDOWS

@ -32,7 +32,7 @@
#include "kvi_toolwindows_container.h" #include "kvi_toolwindows_container.h"
#include "kvi_channel.h" #include "kvi_channel.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqvalidator.h> #include <tqvalidator.h>

@ -81,11 +81,11 @@ void KviMdiCaptionButton::drawButton(TQPainter *p)
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQBrush b(parentWidget()->palette().window()); TQBrush b(parentWidget()->palette().window());
#else #else
TQBrush b(parentWidget()->colorGroup().background()); TQBrush b(parentWidget()->tqcolorGroup().background());
#endif #endif
if(isDown()) if(isDown())
qDrawShadePanel(p,0,0,width(),height(),colorGroup(),true,1,&b); qDrawShadePanel(p,0,0,width(),height(),tqcolorGroup(),true,1,&b);
else else
p->fillRect(0,0,width(),height(),b); p->fillRect(0,0,width(),height(),b);
@ -229,7 +229,7 @@ void KviMdiCaption::paintEvent(TQPaintEvent * e)
TQPainter p(this); TQPainter p(this);
p.fillRect(r,m_bActive ? KVI_OPTION_COLOR(KviOption_colorMdiCaptionActive) : KVI_OPTION_COLOR(KviOption_colorMdiCaptionInactive)); p.fillRect(r,m_bActive ? KVI_OPTION_COLOR(KviOption_colorMdiCaptionActive) : KVI_OPTION_COLOR(KviOption_colorMdiCaptionInactive));
TQSimpleRichText rt(m_bActive ? ((KviMdiChild *)parent())->xmlActiveCaption() : ((KviMdiChild *)parent())->xmlInactiveCaption(),font()); TQSimpleRichText rt(m_bActive ? ((KviMdiChild *)parent())->xmlActiveCaption() : ((KviMdiChild *)parent())->xmlInactiveCaption(),font());
rt.draw(&p,height() + 2,-1,rect(),colorGroup()); rt.draw(&p,height() + 2,-1,rect(),tqcolorGroup());
} }
void KviMdiCaption::mouseReleaseEvent(TQMouseEvent *) void KviMdiCaption::mouseReleaseEvent(TQMouseEvent *)
@ -278,7 +278,7 @@ KviMenuBarToolButton::~KviMenuBarToolButton()
{ {
} }
TQSize KviMenuBarToolButton::sizeHint() const TQSize KviMenuBarToolButton::tqsizeHint() const
{ {
return TQSize(20,20); return TQSize(20,20);
} }

@ -57,7 +57,7 @@ public:
KviMenuBarToolButton(TQWidget * par,const TQPixmap &img, const char * name); KviMenuBarToolButton(TQWidget * par,const TQPixmap &img, const char * name);
~KviMenuBarToolButton(); ~KviMenuBarToolButton();
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
}; };

@ -112,7 +112,7 @@ TQRect KviMdiChild::restoredGeometry()
{ {
if(m_state == Maximized)return m_restoredGeometry; if(m_state == Maximized)return m_restoredGeometry;
else return TQRect(x(),y(),width(),height()); else return TQRect(x(),y(),width(),height());
// else return geometry(); // else return tqgeometry();
} }
@ -172,7 +172,7 @@ void KviMdiChild::setCaption(const TQString & plain,const TQString & xmlActive,c
void KviMdiChild::maximize() void KviMdiChild::maximize()
{ {
if(m_state == Minimized)restore(); // restore first if(m_state == Minimized)restore(); // restore first
if(m_state == Normal)m_restoredGeometry = geometry(); if(m_state == Normal)m_restoredGeometry = tqgeometry();
m_state = Maximized; m_state = Maximized;
manager()->maximizeChild(this); manager()->maximizeChild(this);
} }
@ -225,7 +225,7 @@ void KviMdiChild::minimize()
m_pManager->childMinimized(this,true); m_pManager->childMinimized(this,true);
break; break;
case Normal: case Normal:
m_restoredGeometry = geometry(); m_restoredGeometry = tqgeometry();
hide(); hide();
m_state = Minimized; m_state = Minimized;
m_pManager->childMinimized(this,false); m_pManager->childMinimized(this,false);
@ -442,8 +442,8 @@ void KviMdiChild::calculateResizeRect(int resizeCorner,TQPoint mousePos,TQRect &
void KviMdiChild::calculateMinimumSize(int &minWidth,int &minHeight) void KviMdiChild::calculateMinimumSize(int &minWidth,int &minHeight)
{ {
if(m_pClient){ if(m_pClient){
minWidth = m_pClient->minimumSize().width() + (KVI_MDICHILD_BORDER << 1); minWidth = m_pClient->tqminimumSize().width() + (KVI_MDICHILD_BORDER << 1);
minHeight = m_pClient->minimumSize().height()+ (KVI_MDICHILD_BORDER << 1)+ minHeight = m_pClient->tqminimumSize().height()+ (KVI_MDICHILD_BORDER << 1)+
m_pCaption->heightHint() + KVI_MDICHILD_SPACING; m_pCaption->heightHint() + KVI_MDICHILD_SPACING;
} }
if(minWidth<KVI_MDICHILD_MIN_WIDTH)minWidth=KVI_MDICHILD_MIN_WIDTH; if(minWidth<KVI_MDICHILD_MIN_WIDTH)minWidth=KVI_MDICHILD_MIN_WIDTH;
@ -508,10 +508,10 @@ void KviMdiChild::setClient(TQWidget *w)
*/ */
//linkChildren(w); //linkChildren(w);
if(m_pClient->minimumSize().width() > KVI_MDICHILD_MIN_WIDTH && if(m_pClient->tqminimumSize().width() > KVI_MDICHILD_MIN_WIDTH &&
m_pClient->minimumSize().height() > KVI_MDICHILD_MIN_HEIGHT){ m_pClient->tqminimumSize().height() > KVI_MDICHILD_MIN_HEIGHT){
setMinimumWidth(m_pClient->minimumSize().width() + (KVI_MDICHILD_BORDER << 1)); setMinimumWidth(m_pClient->tqminimumSize().width() + (KVI_MDICHILD_BORDER << 1));
setMinimumHeight(m_pClient->minimumSize().height()+ (KVI_MDICHILD_BORDER << 1) + setMinimumHeight(m_pClient->tqminimumSize().height()+ (KVI_MDICHILD_BORDER << 1) +
m_pCaption->heightHint() + KVI_MDICHILD_SPACING); m_pCaption->heightHint() + KVI_MDICHILD_SPACING);
} }
@ -561,16 +561,16 @@ void KviMdiChild::focusInEvent(TQFocusEvent *)
#endif #endif
} }
TQSize KviMdiChild::sizeHint() TQSize KviMdiChild::tqsizeHint()
{ {
if(m_pClient) if(m_pClient)
{ {
TQSize s = m_pClient->sizeHint(); TQSize s = m_pClient->tqsizeHint();
TQSize ret(s.width() + (KVI_MDICHILD_BORDER << 1), TQSize ret(s.width() + (KVI_MDICHILD_BORDER << 1),
s.height() + (KVI_MDICHILD_BORDER << 1) + KVI_MDICHILD_SPACING + m_pCaption->heightHint()); s.height() + (KVI_MDICHILD_BORDER << 1) + KVI_MDICHILD_SPACING + m_pCaption->heightHint());
return ret; return ret;
} }
return TQFrame::sizeHint(); return TQFrame::tqsizeHint();
} }

@ -77,7 +77,7 @@ public:
const TQString & xmlActiveCaption(){ return m_szXmlActiveCaption; }; const TQString & xmlActiveCaption(){ return m_szXmlActiveCaption; };
const TQString & xmlInactiveCaption(){ return m_szXmlInactiveCaption; }; const TQString & xmlInactiveCaption(){ return m_szXmlInactiveCaption; };
void setCaption(const TQString & plain,const TQString & xmlActive,const TQString & xmlInactive); void setCaption(const TQString & plain,const TQString & xmlActive,const TQString & xmlInactive);
virtual TQSize sizeHint(); virtual TQSize tqsizeHint();
void setIcon(const TQPixmap &pix); void setIcon(const TQPixmap &pix);
const TQPixmap * icon(); const TQPixmap * icon();
void enableClose(bool bEnable); void enableClose(bool bEnable);

@ -38,7 +38,7 @@
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <tqmenubar.h> #include <tqmenubar.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <math.h> #include <math.h>
#include <tqcursor.h> #include <tqcursor.h>
@ -199,7 +199,7 @@ void KviMdiManager::setTopChild(KviMdiChild *lpC,bool bSetFocus)
return; // no such child ? return; // no such child ?
} }
// disable the labels of all the other children // disable the labels of all the other tqchildren
//for(KviMdiChild *pC=m_pZ->first();pC;pC=m_pZ->next()) //for(KviMdiChild *pC=m_pZ->first();pC;pC=m_pZ->next())
//{ //{
// pC->captionLabel()->setActive(false); // pC->captionLabel()->setActive(false);
@ -225,7 +225,7 @@ void KviMdiManager::setTopChild(KviMdiChild *lpC,bool bSetFocus)
{ {
lpC->setFocus(); lpC->setFocus();
/* /*
if(topLevelWidget()->isActiveWindow()) if(tqtopLevelWidget()->isActiveWindow())
{ {
} }
@ -284,8 +284,8 @@ TQPoint KviMdiManager::getCascadePoint(int indexOfWindow)
if(indexOfWindow==0)return pnt; if(indexOfWindow==0)return pnt;
KviMdiChild *lpC=m_pZ->first(); KviMdiChild *lpC=m_pZ->first();
int step=(lpC ? (lpC->captionLabel()->heightHint()+KVI_MDICHILD_BORDER) : 20); int step=(lpC ? (lpC->captionLabel()->heightHint()+KVI_MDICHILD_BORDER) : 20);
int availableHeight=viewport()->height()-(lpC ? lpC->minimumSize().height() : KVI_MDICHILD_MIN_HEIGHT); int availableHeight=viewport()->height()-(lpC ? lpC->tqminimumSize().height() : KVI_MDICHILD_MIN_HEIGHT);
int availableWidth=viewport()->width()-(lpC ? lpC->minimumSize().width() : KVI_MDICHILD_MIN_WIDTH); int availableWidth=viewport()->width()-(lpC ? lpC->tqminimumSize().width() : KVI_MDICHILD_MIN_WIDTH);
int ax=0; int ax=0;
int ay=0; int ay=0;
for(int i=0;i<indexOfWindow;i++) for(int i=0;i<indexOfWindow;i++)
@ -313,7 +313,7 @@ void KviMdiManager::childMoved(KviMdiChild *)
void KviMdiManager::maximizeChild(KviMdiChild * lpC) void KviMdiManager::maximizeChild(KviMdiChild * lpC)
{ {
// the children must be moved once by the means of TQScrollView::moveChild() // the tqchildren must be moved once by the means of TQScrollView::moveChild()
// so the TQScrollView internal structures get updated with the negative // so the TQScrollView internal structures get updated with the negative
// position of the widget, otherwise, when restoring with moveChild() // position of the widget, otherwise, when restoring with moveChild()
// it will refuse to move it back to the original position // it will refuse to move it back to the original position
@ -338,14 +338,14 @@ void KviMdiManager::maximizeChild(KviMdiChild * lpC)
lpC->setFocus(); lpC->setFocus();
} }
// fixme: we could hide all the other children now! // fixme: we could hide all the other tqchildren now!
} }
void KviMdiManager::resizeEvent(TQResizeEvent *e) void KviMdiManager::resizeEvent(TQResizeEvent *e)
{ {
//If we have a maximized children at the top , adjust its size //If we have a maximized tqchildren at the top , adjust its size
KviTalScrollView::resizeEvent(e); KviTalScrollView::resizeEvent(e);
KviMdiChild *lpC=m_pZ->last(); KviMdiChild *lpC=m_pZ->last();
if(lpC) if(lpC)
@ -431,7 +431,7 @@ void KviMdiManager::focusTopChild()
if(!lpC->isVisible())return; if(!lpC->isVisible())return;
// if(lpC->state()==KviMdiChild::Minimized)return; // if(lpC->state()==KviMdiChild::Minimized)return;
// debug("Focusing top child %s",lpC->name()); // debug("Focusing top child %s",lpC->name());
//disable the labels of all the other children //disable the labels of all the other tqchildren
for(KviMdiChild *pC=m_pZ->first();pC;pC=m_pZ->next()) for(KviMdiChild *pC=m_pZ->first();pC;pC=m_pZ->next())
{ {
if(pC != lpC) if(pC != lpC)
@ -591,7 +591,7 @@ void KviMdiManager::enterSDIMode(KviMdiChild *lpC)
// This is an obscure, undocumented and internal function in QT4 TQMenuBar // This is an obscure, undocumented and internal function in QT4 TQMenuBar
// I won't be surprised if this disappears.... // I won't be surprised if this disappears....
b->setCornerWidget(m_pSdiControls,TQt::TopRightCorner); b->setCornerWidget(m_pSdiControls,TQt::TopRightCorner);
// The show below SHOULD force a re-layout of the menubar.. // The show below SHOULD force a re-tqlayout of the menubar..
// but it doesn't work when the KviFrame is still hidden (at startup) // but it doesn't work when the KviFrame is still hidden (at startup)
// We handle this BUG in showEvent() // We handle this BUG in showEvent()
m_pSdiControls->show(); m_pSdiControls->show();
@ -611,7 +611,7 @@ void KviMdiManager::enterSDIMode(KviMdiChild *lpC)
void KviMdiManager::relayoutMenuButtons() void KviMdiManager::relayoutMenuButtons()
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
// force a re-layout of the menubar in TQt4 (see the note in enterSDIMode()) // force a re-tqlayout of the menubar in TQt4 (see the note in enterSDIMode())
// by resetting the corner widget // by resetting the corner widget
if(m_pSdiControls) if(m_pSdiControls)
{ {
@ -662,7 +662,7 @@ void KviMdiManager::leaveSDIMode()
} }
if(m_pSdiIconButton) if(m_pSdiIconButton)
{ {
m_pSdiIconButton->hide(); // this will force a TQMenuBar relayout m_pSdiIconButton->hide(); // this will force a TQMenuBar retqlayout
delete m_pSdiIconButton; delete m_pSdiIconButton;
m_pSdiIconButton = 0; m_pSdiIconButton = 0;
} }
@ -814,7 +814,7 @@ void KviMdiManager::cascadeWindows()
{ {
TQPoint p = getCascadePoint(idx); TQPoint p = getCascadePoint(idx);
moveChild(lpC,p.x(),p.y()); moveChild(lpC,p.x(),p.y());
lpC->resize(lpC->sizeHint()); lpC->resize(lpC->tqsizeHint());
idx++; idx++;
} }
list.removeFirst(); list.removeFirst();
@ -844,8 +844,8 @@ void KviMdiManager::cascadeMaximized()
TQPoint pnt(getCascadePoint(idx)); TQPoint pnt(getCascadePoint(idx));
moveChild(lpC,pnt.x(),pnt.y()); moveChild(lpC,pnt.x(),pnt.y());
TQSize curSize(viewport()->width() - pnt.x(),viewport()->height() - pnt.y()); TQSize curSize(viewport()->width() - pnt.x(),viewport()->height() - pnt.y());
if((lpC->minimumSize().width() > curSize.width()) || if((lpC->tqminimumSize().width() > curSize.width()) ||
(lpC->minimumSize().height() > curSize.height()))lpC->resize(lpC->minimumSize()); (lpC->tqminimumSize().height() > curSize.height()))lpC->resize(lpC->tqminimumSize());
else lpC->resize(curSize); else lpC->resize(curSize);
idx++; idx++;
} }
@ -1007,13 +1007,13 @@ void KviMdiManager::tileAllInternal(int maxWnds,bool bHorizontal)
int numToHandle=((numVisible > maxWnds) ? maxWnds : numVisible); int numToHandle=((numVisible > maxWnds) ? maxWnds : numVisible);
int xQuantum=viewport()->width()/pColstable[numToHandle-1]; int xQuantum=viewport()->width()/pColstable[numToHandle-1];
if(xQuantum < ((lpTop->minimumSize().width() > KVI_MDICHILD_MIN_WIDTH) ? lpTop->minimumSize().width() : KVI_MDICHILD_MIN_WIDTH)){ if(xQuantum < ((lpTop->tqminimumSize().width() > KVI_MDICHILD_MIN_WIDTH) ? lpTop->tqminimumSize().width() : KVI_MDICHILD_MIN_WIDTH)){
if(pColrecall[numToHandle-1]==0)debug("Tile : Not enouh space"); if(pColrecall[numToHandle-1]==0)debug("Tile : Not enouh space");
else tileAllInternal(pColrecall[numToHandle-1],bHorizontal); else tileAllInternal(pColrecall[numToHandle-1],bHorizontal);
return; return;
} }
int yQuantum=viewport()->height()/pRowstable[numToHandle-1]; int yQuantum=viewport()->height()/pRowstable[numToHandle-1];
if(yQuantum < ((lpTop->minimumSize().height() > KVI_MDICHILD_MIN_HEIGHT) ? lpTop->minimumSize().height() : KVI_MDICHILD_MIN_HEIGHT)){ if(yQuantum < ((lpTop->tqminimumSize().height() > KVI_MDICHILD_MIN_HEIGHT) ? lpTop->tqminimumSize().height() : KVI_MDICHILD_MIN_HEIGHT)){
if(pRowrecall[numToHandle-1]==0)debug("Tile : Not enough space"); if(pRowrecall[numToHandle-1]==0)debug("Tile : Not enough space");
else tileAllInternal(pRowrecall[numToHandle-1],bHorizontal); else tileAllInternal(pRowrecall[numToHandle-1],bHorizontal);
return; return;
@ -1073,7 +1073,7 @@ void KviMdiManager::tileAnodine()
int numVisible=getVisibleChildCount(); // count visible windows int numVisible=getVisibleChildCount(); // count visible windows
if(numVisible<1)return; if(numVisible<1)return;
int numCols=int(sqrt((double)numVisible)); // set columns to square root of visible count int numCols=int(sqrt((double)numVisible)); // set columns to square root of visible count
// create an array to form grid layout // create an array to form grid tqlayout
int *numRows=new int[numCols]; int *numRows=new int[numCols];
int numCurCol=0; int numCurCol=0;
while(numCurCol<numCols) while(numCurCol<numCols)

@ -97,7 +97,7 @@ void KviMenuBar::showEvent(TQShowEvent *e)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
debug("menubar show"); debug("menubar show");
// force a re-layout of the menubar in TQt4 (see the note in enterSDIMode()) // force a re-tqlayout of the menubar in TQt4 (see the note in enterSDIMode())
// by resetting the corner widget // by resetting the corner widget
m_pFrm->mdiManager()->relayoutMenuButtons(); m_pFrm->mdiManager()->relayoutMenuButtons();
#endif #endif

@ -33,7 +33,7 @@
#include "kvi_toolwindows_container.h" #include "kvi_toolwindows_container.h"
#include "kvi_tal_scrollview.h" #include "kvi_tal_scrollview.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
@ -121,11 +121,11 @@ KviModeEditor::KviModeEditor(TQWidget * par,KviWindowToolPageButton* button,cons
TQChar ccc = szModes[0]; TQChar ccc = szModes[0];
szModes.remove(0,1); szModes.remove(0,1);
KviTQString::sprintf(tmp,"%c: %Q",ccc.unicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc))); KviTQString::sprintf(tmp,"%c: %Q",ccc.tqunicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc)));
KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground); KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground);
cb->setEnabled(isEnabled); cb->setEnabled(isEnabled);
m_pCheckBoxes->append(cb); m_pCheckBoxes->append(cb);
cb->setChecked(m_szMode.contains((char)ccc.unicode())); cb->setChecked(m_szMode.contains((char)ccc.tqunicode()));
i++; i++;
g->addMultiCellWidget(cb,i,i,0,2); g->addMultiCellWidget(cb,i,i,0,2);
} }
@ -193,11 +193,11 @@ KviModeEditor::KviModeEditor(TQWidget * par,KviWindowToolPageButton* button,cons
TQChar ccc = szModes[0]; TQChar ccc = szModes[0];
szModes.remove(0,1); szModes.remove(0,1);
KviTQString::sprintf(tmp,"%c: %Q",(char)ccc.unicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc))); KviTQString::sprintf(tmp,"%c: %Q",(char)ccc.tqunicode(),&(c->connection()->serverInfo()->getChannelModeDescription(ccc)));
KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground); KviStyledCheckBox * cb = new KviStyledCheckBox(tmp,pBackground);
cb->setEnabled(isEnabled); cb->setEnabled(isEnabled);
m_pCheckBoxes->append(cb); m_pCheckBoxes->append(cb);
cb->setChecked(m_szMode.contains((char)ccc.unicode())); cb->setChecked(m_szMode.contains((char)ccc.tqunicode()));
i++; i++;
g->addMultiCellWidget(cb,i,i,0,2); g->addMultiCellWidget(cb,i,i,0,2);
} }
@ -317,9 +317,9 @@ void KviModeEditor::commit()
TQChar ccc = sz[0]; TQChar ccc = sz[0];
if(cb->isChecked()) if(cb->isChecked())
{ {
if(!m_szMode.contains((char)ccc.unicode()))szPlusModes.append((char)ccc.unicode()); if(!m_szMode.contains((char)ccc.tqunicode()))szPlusModes.append((char)ccc.tqunicode());
} else { } else {
if(m_szMode.contains((char)ccc.unicode()))szMinusModes.append((char)ccc.unicode()); if(m_szMode.contains((char)ccc.tqunicode()))szMinusModes.append((char)ccc.tqunicode());
} }
} }
} }

@ -75,9 +75,9 @@ void KviModeWidget::refreshModes()
{ {
TQString szMode=m_pChannel->channelMode(); TQString szMode=m_pChannel->channelMode();
if(!m_pChannel->channelKey().isEmpty()) if(!m_pChannel->channelKey().isEmpty())
szMode+=TQString(" k:%1").arg(m_pChannel->channelKey()); szMode+=TQString(" k:%1").tqarg(m_pChannel->channelKey());
if(!m_pChannel->channelLimit().isEmpty()) if(!m_pChannel->channelLimit().isEmpty())
szMode+=TQString(" l:%1").arg(m_pChannel->channelLimit().ptr()); szMode+=TQString(" l:%1").tqarg(m_pChannel->channelLimit().ptr());
if(m_pLabel) if(m_pLabel)
m_pLabel->setText(szMode); m_pLabel->setText(szMode);
} }

@ -98,16 +98,16 @@ void KviOptionsWidget::createLayout(int rows,int cols)
void KviOptionsWidget::createTabbedPage() void KviOptionsWidget::createTabbedPage()
{ {
createLayout(1,1); createLayout(1,1);
layout()->setMargin(0); tqlayout()->setMargin(0);
layout()->setSpacing(0); tqlayout()->setSpacing(0);
m_pTabWidget = new TQTabWidget(this); m_pTabWidget = new TQTabWidget(this);
addWidgetToLayout(m_pTabWidget,0,0,0,0); addWidgetToLayout(m_pTabWidget,0,0,0,0);
} }
void KviOptionsWidget::addOptionsWidget(const TQString &szText,const TQIconSet &iconSet,KviOptionsWidget * pWidget) void KviOptionsWidget::addOptionsWidget(const TQString &szText,const TQIconSet &iconSet,KviOptionsWidget * pWidget)
{ {
if(pWidget->layout()) if(pWidget->tqlayout())
pWidget->layout()->setMargin(10); pWidget->tqlayout()->setMargin(10);
m_pTabWidget->addTab(pWidget,iconSet,szText); m_pTabWidget->addTab(pWidget,iconSet,szText);
m_pSelectorInterfaceList->append(pWidget); m_pSelectorInterfaceList->append(pWidget);
} }
@ -115,8 +115,8 @@ void KviOptionsWidget::addOptionsWidget(const TQString &szText,const TQIconSet &
void KviOptionsWidget::addWidgetToLayout(TQWidget * w,int x1,int y1,int x2,int y2) void KviOptionsWidget::addWidgetToLayout(TQWidget * w,int x1,int y1,int x2,int y2)
{ {
if((x1 == x2) && (y1 == y2))layout()->addWidget(w,y1,x1); if((x1 == x2) && (y1 == y2))tqlayout()->addWidget(w,y1,x1);
else layout()->addMultiCellWidget(w,y1,y2,x1,x2); else tqlayout()->addMultiCellWidget(w,y1,y2,x1,x2);
} }
/////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////
@ -622,7 +622,7 @@ void KviOptionsWidget::addRowSpacer(int x1,int y1,int x2,int y2)
{ {
TQWidget * w = new TQWidget(this); TQWidget * w = new TQWidget(this);
addWidgetToLayout(w,x1,y1,x2,y2); addWidgetToLayout(w,x1,y1,x2,y2);
layout()->setRowStretch(y1,1); tqlayout()->setRowStretch(y1,1);
} }
TQLabel * KviOptionsWidget::addLabel(int x1,int y1,int x2,int y2,const TQString & text,bool bEnabled) TQLabel * KviOptionsWidget::addLabel(int x1,int y1,int x2,int y2,const TQString & text,bool bEnabled)
@ -676,7 +676,7 @@ KviTalGroupBox * KviOptionsWidget::addGroupBox(int x1,int y1,int x2,int y2,int n
void KviOptionsWidget::addAdvancedButton(int x1,int y1,int x2,int y2) void KviOptionsWidget::addAdvancedButton(int x1,int y1,int x2,int y2)
{ {
TQWidget * w = topLevelWidget(); TQWidget * w = tqtopLevelWidget();
if(!w)return; if(!w)return;
if(!w->inherits("KviGeneralOptionsDialog"))return; if(!w->inherits("KviGeneralOptionsDialog"))return;

@ -28,7 +28,7 @@
#include "kvi_settings.h" #include "kvi_settings.h"
#include <tqframe.h> #include <tqframe.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_pointerlist.h" #include "kvi_pointerlist.h"
#include <tqlineedit.h> #include <tqlineedit.h>
#include <kvi_tal_groupbox.h> #include <kvi_tal_groupbox.h>
@ -54,7 +54,7 @@ private:
public: public:
void mergeResetFlag(int flag){ m_iResetFlags |= flag; }; void mergeResetFlag(int flag){ m_iResetFlags |= flag; };
void createLayout(int rows,int columns); void createLayout(int rows,int columns);
TQGridLayout * layout(){ return m_pLayout; }; TQGridLayout * tqlayout(){ return m_pLayout; };
protected: protected:
void commitSelectors(); void commitSelectors();
void commitOptionsReset(); void commitOptionsReset();

@ -167,9 +167,9 @@ TQString KviQuery::getInfoLabelTipText()
txt += "<tr><td>"; txt += "<tr><td>";
if(e->hasRealName()) if(e->hasRealName())
tmp=__tr2qs("%1 is %2 (%3)").arg(m_szName).arg(szMask).arg(KviMircCntrl::stripControlBytes(e->realName())); tmp=__tr2qs("%1 is %2 (%3)").tqarg(m_szName).tqarg(szMask).tqarg(KviMircCntrl::stripControlBytes(e->realName()));
else else
tmp=__tr2qs("%1 is %2").arg(m_szName).arg(szMask); tmp=__tr2qs("%1 is %2").tqarg(m_szName).tqarg(szMask);
tmp.replace('&',"&amp;"); tmp.replace('&',"&amp;");
tmp.replace('<',"&lt;"); tmp.replace('<',"&lt;");
@ -183,21 +183,21 @@ TQString KviQuery::getInfoLabelTipText()
{ {
txt+="<tr><td>"; txt+="<tr><td>";
if(e->hasHops()) if(e->hasHops())
txt+=__tr2qs("%1 is using irc server: %2 (%3 hops)").arg(m_szName).arg(e->server()).arg(e->hops()); txt+=__tr2qs("%1 is using irc server: %2 (%3 hops)").tqarg(m_szName).tqarg(e->server()).tqarg(e->hops());
else else
txt+=__tr2qs("%1 is using irc server: %2").arg(m_szName).arg(e->server()); txt+=__tr2qs("%1 is using irc server: %2").tqarg(m_szName).tqarg(e->server());
txt+="</td></tr>"; txt+="</td></tr>";
} }
if(e->isAway()) if(e->isAway())
{ {
txt+="<tr><td>"; txt+="<tr><td>";
txt+=__tr2qs("%1 is probably away").arg(m_szName); txt+=__tr2qs("%1 is probably away").tqarg(m_szName);
txt+="</td></tr>"; txt+="</td></tr>";
} }
txt+="<tr><td>"; txt+="<tr><td>";
tmp=__tr2qs("Common channels with %1: %2").arg(m_szName).arg(szChans); tmp=__tr2qs("Common channels with %1: %2").tqarg(m_szName).tqarg(szChans);
tmp.replace('&',"&amp;"); tmp.replace('&',"&amp;");
tmp.replace('<',"&lt;"); tmp.replace('<',"&lt;");
@ -237,19 +237,19 @@ TQString KviQuery::getInfoLabelText()
else else
szMask+="*"; szMask+="*";
if(e->hasRealName()) if(e->hasRealName())
tmp=__tr2qs("Query with %1!%2 (%3)").arg(m_szName).arg(szMask).arg(KviMircCntrl::stripControlBytes(e->realName())); tmp=__tr2qs("Query with %1!%2 (%3)").tqarg(m_szName).tqarg(szMask).tqarg(KviMircCntrl::stripControlBytes(e->realName()));
else else
tmp=__tr2qs("Query with %1!%2").arg(m_szName).arg(szMask); tmp=__tr2qs("Query with %1!%2").tqarg(m_szName).tqarg(szMask);
if(e->hasServer()) if(e->hasServer())
tmp+=__tr2qs(", using server %1").arg(e->server()); tmp+=__tr2qs(", using server %1").tqarg(e->server());
if(e->hasHops()) if(e->hasHops())
tmp+=__tr2qs(" (%1 hops)").arg(e->hops()); tmp+=__tr2qs(" (%1 hops)").tqarg(e->hops());
if(e->isAway()) if(e->isAway())
tmp+=__tr2qs(", probably away"); tmp+=__tr2qs(", probably away");
tmp+="\n"; tmp+="\n";
TQString szChans; TQString szChans;
connection()->getCommonChannels(m_szName,szChans,0); connection()->getCommonChannels(m_szName,szChans,0);
tmp+=__tr2qs("Common channels: %2").arg(szChans); tmp+=__tr2qs("Common channels: %2").tqarg(szChans);
} else { } else {
tmp=__tr2qs("[Dead Query]"); tmp=__tr2qs("[Dead Query]");
} }
@ -547,7 +547,7 @@ void KviQuery::applyOptions()
{ {
m_pUserListView->applyOptions(); m_pUserListView->applyOptions();
updateLabelText(); updateLabelText();
// this applies options for IrcView and Input and forces the window to relayout // this applies options for IrcView and Input and forces the window to retqlayout
KviWindow::applyOptions(); KviWindow::applyOptions();
} }
@ -559,15 +559,15 @@ TQPixmap * KviQuery::myIconPtr()
void KviQuery::resizeEvent(TQResizeEvent *e) void KviQuery::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pInput->heightHint(); int hght = m_pInput->heightHint();
int hght2 = m_pButtonBox->sizeHint().height(); int hght2 = m_pButtonBox->tqsizeHint().height();
m_pButtonBox->setGeometry(0,0,width(),hght2); m_pButtonBox->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2));
m_pInput->setGeometry(0,height() - hght,width(),hght); m_pInput->setGeometry(0,height() - hght,width(),hght);
} }
TQSize KviQuery::sizeHint() const TQSize KviQuery::tqsizeHint() const
{ {
TQSize ret(m_pSplitter->sizeHint().width(),m_pIrcView->sizeHint().height() + m_pInput->heightHint()); TQSize ret(m_pSplitter->tqsizeHint().width(),m_pIrcView->tqsizeHint().height() + m_pInput->heightHint());
return ret; return ret;
} }

@ -66,7 +66,7 @@ public:
void setDeadQuery(); void setDeadQuery();
void setAliveQuery(); void setAliveQuery();
bool isDeadQuery(){ return m_iFlags & KVI_TQUERY_FLAG_DEAD; }; bool isDeadQuery(){ return m_iFlags & KVI_TQUERY_FLAG_DEAD; };
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual const TQString & target(){ return windowName(); }; virtual const TQString & target(){ return windowName(); };
virtual void applyOptions(); virtual void applyOptions();
KviUserListEntry * setTarget(const TQString &nick,const TQString &user,const TQString &host); KviUserListEntry * setTarget(const TQString &nick,const TQString &user,const TQString &host);

@ -35,9 +35,9 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <layout.h> #include <tqlayout.h>
#include <tqcolordialog.h> #include <tqcolordialog.h>
#include <palette.h> #include <tqpalette.h>
#include <tqfontdialog.h> #include <tqfontdialog.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
@ -513,7 +513,7 @@ KviColorSelector::KviColorSelector(TQWidget * par,const TQString & txt,TQColor *
void KviColorSelector::setButtonPalette(TQColor * pOption) void KviColorSelector::setButtonPalette(TQColor * pOption)
{ {
TQPalette pal(*pOption,colorGroup().background()); TQPalette pal(*pOption,tqcolorGroup().background());
m_memColor = *pOption; m_memColor = *pOption;
m_pButton->setPalette(pal); m_pButton->setPalette(pal);

@ -37,7 +37,7 @@
#include <tqpixmap.h> #include <tqpixmap.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <layout.h> #include <tqlayout.h>
#include <stdio.h> #include <stdio.h>
@ -160,7 +160,7 @@ void KviSplashScreen::setProgress(int progress)
painter.end(); painter.end();
#endif #endif
//raise(); //raise();
repaint(); tqrepaint();
g_pApp->processEvents(); //damn... g_pApp->processEvents(); //damn...
} }

@ -43,7 +43,7 @@
#include <tqpainter.h> #include <tqpainter.h>
#include <tqstyle.h> #include <tqstyle.h>
#include <layout.h> #include <tqlayout.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqcursor.h> #include <tqcursor.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
@ -106,9 +106,9 @@ KviStatusBar::KviStatusBar(KviFrame * pFrame)
m_pMessageLabel = new TQLabel("<b>[x]</b> x",this,"msgstatuslabel"); m_pMessageLabel = new TQLabel("<b>[x]</b> x",this,"msgstatuslabel");
m_pMessageLabel->setMargin(1); m_pMessageLabel->setMargin(1);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_pMessageLabel->setAlignment(TQt::AlignVCenter | TQt::AlignLeft); m_pMessageLabel->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft);
#else #else
m_pMessageLabel->setAlignment(SingleLine | TQt::AlignVCenter | TQt::AlignLeft); m_pMessageLabel->tqsetAlignment(SingleLine | TQt::AlignVCenter | TQt::AlignLeft);
#endif #endif
m_pMessageLabel->setMinimumWidth(350); m_pMessageLabel->setMinimumWidth(350);
@ -210,7 +210,7 @@ void KviStatusBar::layoutChildren()
int h = height() - (VMARGIN * 2); int h = height() - (VMARGIN * 2);
for(KviStatusBarApplet * a = m_pAppletList->last();a;a = m_pAppletList->prev()) for(KviStatusBarApplet * a = m_pAppletList->last();a;a = m_pAppletList->prev())
{ {
int w = a->sizeHint().width(); int w = a->tqsizeHint().width();
x -= w; x -= w;
a->setGeometry(x,VMARGIN,w,h); a->setGeometry(x,VMARGIN,w,h);
x -= SPACING; x -= SPACING;
@ -237,11 +237,11 @@ bool KviStatusBar::event(TQEvent * e)
void KviStatusBar::recalcMinimumHeight() void KviStatusBar::recalcMinimumHeight()
{ {
int s = 18; int s = 18;
int h = m_pMessageLabel->sizeHint().height(); int h = m_pMessageLabel->tqsizeHint().height();
if(h > s)s = h; if(h > s)s = h;
for(KviStatusBarApplet * a = m_pAppletList->last();a;a = m_pAppletList->prev()) for(KviStatusBarApplet * a = m_pAppletList->last();a;a = m_pAppletList->prev())
{ {
h = a->sizeHint().height(); h = a->tqsizeHint().height();
if(h > s)s = h; if(h > s)s = h;
} }
s += (VMARGIN * 2) + RICHTEXTLABELTRICK; s += (VMARGIN * 2) + RICHTEXTLABELTRICK;
@ -249,7 +249,7 @@ void KviStatusBar::recalcMinimumHeight()
{ {
m_iLastMinimumHeight = s; m_iLastMinimumHeight = s;
setMinimumHeight(s); setMinimumHeight(s);
TQLayout * l = layout(); TQLayout * l = tqlayout();
if(l) if(l)
if(l->inherits(TQBOXLAYOUT_OBJECT_NAME_STRING)) if(l->inherits(TQBOXLAYOUT_OBJECT_NAME_STRING))
((TQBoxLayout *)l)->addStrut(s); ((TQBoxLayout *)l)->addStrut(s);
@ -467,9 +467,9 @@ void KviStatusBar::paintEvent(TQPaintEvent * e)
{ {
// avoid the ugly rectangle around the widgets painted by TQStatusBar // avoid the ugly rectangle around the widgets painted by TQStatusBar
// TQPainter p(this); // TQPainter p(this);
// style().drawPrimitive(TQStyle::PE_Panel,&p,rect(),colorGroup(),TQStyle::Style_Raised,TQStyleOption(1,1)); // style().drawPrimitive(TQStyle::PE_Panel,&p,rect(),tqcolorGroup(),TQStyle::Style_Raised,TQStyleOption(1,1));
//TQStatusBar::paintEvent(e); //TQStatusBar::paintEvent(e);
//qDrawWinPanel(&p,0,0,width(),height(),colorGroup(),false,0); //qDrawWinPanel(&p,0,0,width(),height(),tqcolorGroup(),false,0);
} }
void KviStatusBar::mousePressEvent(TQMouseEvent * e) void KviStatusBar::mousePressEvent(TQMouseEvent * e)

@ -42,7 +42,7 @@
#include <tqpainter.h> #include <tqpainter.h>
#include <tqstyle.h> #include <tqstyle.h>
#include <layout.h> #include <tqlayout.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <tqcursor.h> #include <tqcursor.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"

@ -84,7 +84,7 @@ void KviStyledControlInternal::paintTimerShot ()
m_pControl->m_pTimer->stop(); m_pControl->m_pTimer->stop();
} }
} }
m_pControl->m_pWidget->repaint( false ); m_pControl->m_pWidget->tqrepaint( false );
} }
KviStyledControl::KviStyledControl(TQWidget* w) KviStyledControl::KviStyledControl(TQWidget* w)
@ -118,7 +118,7 @@ void KviStyledControl::enterEvent ( TQEvent * )
} }
m_bMouseEnter=1; m_bMouseEnter=1;
m_iStepNumber++; m_iStepNumber++;
m_pWidget->repaint( false ); m_pWidget->tqrepaint( false );
} }
} }
@ -137,7 +137,7 @@ void KviStyledControl::leaveEvent ( TQEvent * )
} }
m_bMouseEnter=0; m_bMouseEnter=0;
m_iStepNumber--; m_iStepNumber--;
m_pWidget->repaint( false ); m_pWidget->tqrepaint( false );
} }
} }
@ -279,7 +279,7 @@ void KviStyledToolButton::paintEvent ( TQPaintEvent * event)
pDoubleBufferPixmap->fill( pDoubleBufferPixmap->fill(
bActive ? TQColor(206,215,223) : bActive ? TQColor(206,215,223) :
colorGroup().background() tqcolorGroup().background()
); );

@ -290,7 +290,7 @@ void KviTaskBarButton::drawButtonLabel(TQPainter * painter)
if(KVI_OPTION_BOOL(KviOption_boolUseTaskBarIrcContextIndicator)) if(KVI_OPTION_BOOL(KviOption_boolUseTaskBarIrcContextIndicator))
{ {
iHeight -= KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT; iHeight -= KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT;
TQColor base = colorGroup().background(); TQColor base = tqcolorGroup().background();
if(m_pWindow->console()) if(m_pWindow->console())
{ {
TQColor cntx = KVI_OPTION_ICCOLOR(m_pWindow->console()->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS); TQColor cntx = KVI_OPTION_ICCOLOR(m_pWindow->console()->ircContextId() % KVI_NUM_ICCOLOR_OPTIONS);
@ -298,7 +298,7 @@ void KviTaskBarButton::drawButtonLabel(TQPainter * painter)
(base.blue() + cntx.blue()) >> 1); (base.blue() + cntx.blue()) >> 1);
pPainter->fillRect(2,iHeight,iWidth - 4,KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT - 2,base); pPainter->fillRect(2,iHeight,iWidth - 4,KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT - 2,base);
} else { } else {
pPainter->fillRect(2,iHeight,iWidth - 4,KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT - 2,colorGroup().brush(TQColorGroup::Background)); pPainter->fillRect(2,iHeight,iWidth - 4,KVI_TASKBARBUTTON_CONTEXTINDICATORHEIGHT - 2,tqcolorGroup().brush(TQColorGroup::Background));
} }
} }
@ -394,7 +394,7 @@ void KviTaskBarButton::drawButtonLabel(TQPainter * painter)
{ {
pPainter->setClipRect(cRect.right(),cRect.y(),10,cRect.height()); pPainter->setClipRect(cRect.right(),cRect.y(),10,cRect.height());
TQColor base = pPainter->pen().color(); TQColor base = pPainter->pen().color();
TQColor bg = colorGroup().color(TQColorGroup::Background); TQColor bg = tqcolorGroup().color(TQColorGroup::Background);
base.setRgb((base.red() + bg.red()) / 2,(base.green() + bg.green()) / 2,(base.blue() + bg.blue()) / 2); base.setRgb((base.red() + bg.red()) / 2,(base.green() + bg.green()) / 2,(base.blue() + bg.blue()) / 2);
pPainter->setPen(base); pPainter->setPen(base);
cRect.setWidth(cRect.width() + 10); cRect.setWidth(cRect.width() + 10);
@ -421,7 +421,7 @@ void KviTaskBarButton::setProgress(int progress)
{ {
if(progress == m_iProgress)return; if(progress == m_iProgress)return;
m_iProgress = progress; m_iProgress = progress;
update(); // repaint(false) ? update(); // tqrepaint(false) ?
} }
void KviTaskBarButton::unhighlight() void KviTaskBarButton::unhighlight()
@ -439,7 +439,7 @@ void KviTaskBarButton::highlight(int iLevel)
m_iHighlightLevel = iLevel; m_iHighlightLevel = iLevel;
if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh(); if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh();
if(m_bActive)return; if(m_bActive)return;
update(); // repaint(false) ? update(); // tqrepaint(false) ?
} }
@ -833,7 +833,7 @@ void KviTreeTaskBarItem::applyOptions()
void KviTreeTaskBarItem::captionChanged() void KviTreeTaskBarItem::captionChanged()
{ {
// FIXME: can we do better ? // FIXME: can we do better ?
repaint(); tqrepaint();
} }
void KviTreeTaskBarItem::unhighlight() void KviTreeTaskBarItem::unhighlight()
@ -841,7 +841,7 @@ void KviTreeTaskBarItem::unhighlight()
if(m_iHighlightLevel < 1)return; if(m_iHighlightLevel < 1)return;
m_iHighlightLevel = 0; m_iHighlightLevel = 0;
if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh(); if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh();
repaint(); tqrepaint();
} }
void KviTreeTaskBarItem::highlight(int iLevel) void KviTreeTaskBarItem::highlight(int iLevel)
@ -851,14 +851,14 @@ void KviTreeTaskBarItem::highlight(int iLevel)
m_iHighlightLevel = iLevel; m_iHighlightLevel = iLevel;
if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh(); if(g_pFrame->dockExtension())g_pFrame->dockExtension()->refresh();
if(isSelected())return; if(isSelected())return;
repaint(); // repaint(false) ? tqrepaint(); // tqrepaint(false) ?
} }
void KviTreeTaskBarItem::setProgress(int progress) void KviTreeTaskBarItem::setProgress(int progress)
{ {
if(progress == m_iProgress)return; if(progress == m_iProgress)return;
m_iProgress = progress; m_iProgress = progress;
repaint(); // repaint(false) ? tqrepaint(); // tqrepaint(false) ?
} }
void KviTreeTaskBarItem::setActive(bool bActive) void KviTreeTaskBarItem::setActive(bool bActive)
@ -868,7 +868,7 @@ void KviTreeTaskBarItem::setActive(bool bActive)
// m_bHighlighted = false; // m_bHighlighted = false;
// m_bAltColor = false; // m_bAltColor = false;
m_iHighlightLevel = 0; m_iHighlightLevel = 0;
// was not selected: the listView will repaint it // was not selected: the listView will tqrepaint it
} else { } else {
if(isSelected()) if(isSelected())
{ {
@ -876,7 +876,7 @@ void KviTreeTaskBarItem::setActive(bool bActive)
// m_bHighlighted = false; // m_bHighlighted = false;
// m_bAltColor = false; // m_bAltColor = false;
m_iHighlightLevel = 0; m_iHighlightLevel = 0;
// was selected: the list view will repaint it // was selected: the list view will tqrepaint it
} }
} }
} }
@ -907,7 +907,7 @@ void KviTreeTaskBarItem::paintCell(TQPainter *painter,const TQColorGroup &cg,int
#ifdef COMPILE_PSEUDO_TRANSPARENCY #ifdef COMPILE_PSEUDO_TRANSPARENCY
if(g_pShadedChildGlobalDesktopBackground) if(g_pShadedChildGlobalDesktopBackground)
{ {
TQPoint pnt = listView()->viewport()->mapToGlobal(TQPoint(int(painter->worldMatrix().dx()),int(painter->worldMatrix().dy()))); TQPoint pnt = listView()->viewport()->mapToGlobal(TQPoint(int(painter->tqworldMatrix().dx()),int(painter->tqworldMatrix().dy())));
p.drawTiledPixmap(0,0,width,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); p.drawTiledPixmap(0,0,width,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y());
} else { } else {
#endif #endif
@ -918,7 +918,7 @@ void KviTreeTaskBarItem::paintCell(TQPainter *painter,const TQColorGroup &cg,int
TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap(); TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap();
if(pix) if(pix)
{ {
TQPoint pnt = listView()->viewportToContents(TQPoint(int(painter->worldMatrix().dx()),int(painter->worldMatrix().dy()))); TQPoint pnt = listView()->viewportToContents(TQPoint(int(painter->tqworldMatrix().dx()),int(painter->tqworldMatrix().dy())));
//p.drawTiledPixmap(0,0,width,height(),*pix,pnt.x(),pnt.y()); //p.drawTiledPixmap(0,0,width,height(),*pix,pnt.x(),pnt.y());
// debug("%i %i",pnt.x(),pnt.y()); // debug("%i %i",pnt.x(),pnt.y());
p.translate(-pnt.x(),-pnt.y()); p.translate(-pnt.x(),-pnt.y());
@ -1081,7 +1081,7 @@ void KviTreeTaskBarItem::timerShot()
m_pAnimTimer->stop(); m_pAnimTimer->stop();
m_iStepNumber=0; //make shure, that we cannot get out of range m_iStepNumber=0; //make shure, that we cannot get out of range
} }
repaint(); tqrepaint();
} }
void KviTreeTaskBarItem::mouseEnter() void KviTreeTaskBarItem::mouseEnter()
@ -1192,7 +1192,7 @@ void KviTreeTaskBarListView::paintEmptyArea(TQPainter * p,const TQRect &rct)
#ifdef COMPILE_PSEUDO_TRANSPARENCY #ifdef COMPILE_PSEUDO_TRANSPARENCY
if(g_pShadedChildGlobalDesktopBackground) if(g_pShadedChildGlobalDesktopBackground)
{ {
TQPoint pnt = viewport()->mapToGlobal(TQPoint(rct.x() + int(p->worldMatrix().dx()),rct.y() + int(p->worldMatrix().dy()))); TQPoint pnt = viewport()->mapToGlobal(TQPoint(rct.x() + int(p->tqworldMatrix().dx()),rct.y() + int(p->tqworldMatrix().dy())));
p->drawTiledPixmap(rct.x(),rct.y(),rct.width(),rct.height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); p->drawTiledPixmap(rct.x(),rct.y(),rct.width(),rct.height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y());
} else { } else {
#endif #endif
@ -1204,7 +1204,7 @@ void KviTreeTaskBarListView::paintEmptyArea(TQPainter * p,const TQRect &rct)
TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap(); TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapTreeTaskBarBackground).pixmap();
if(pix) if(pix)
{ {
TQPoint pnt = viewportToContents(TQPoint(rct.x() + int(p->worldMatrix().dx()),rct.y() + int(p->worldMatrix().dy()))); TQPoint pnt = viewportToContents(TQPoint(rct.x() + int(p->tqworldMatrix().dx()),rct.y() + int(p->tqworldMatrix().dy())));
//p->drawTiledPixmap(rct.x(),rct.y(),rct.width(),rct.height(),*pix,pnt.x(),pnt.y()); //p->drawTiledPixmap(rct.x(),rct.y(),rct.width(),rct.height(),*pix,pnt.x(),pnt.y());
KviPixmapUtils::drawPixmapWithPainter(p,pix,KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign),rct,viewport()->width(),viewport()->height(),pnt.x(),pnt.y()); KviPixmapUtils::drawPixmapWithPainter(p,pix,KVI_OPTION_UINT(KviOption_uintTreeTaskBarPixmapAlign),rct,viewport()->width(),viewport()->height(),pnt.x(),pnt.y());
} }
@ -1235,7 +1235,7 @@ KviTreeTaskBar::KviTreeTaskBar()
// FIXME: this code is useless ? // FIXME: this code is useless ?
if(KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth) < 48) if(KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth) < 48)
KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth) = 48; KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth) = 48;
int iMin = m_pListView->minimumSize().width() + 4; int iMin = m_pListView->tqminimumSize().width() + 4;
if(((unsigned int)iMin) < KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth)) if(((unsigned int)iMin) < KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth))
iMin = KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth); iMin = KVI_OPTION_UINT(KviOption_uintTreeTaskBarMinimumWidth);
setMinimumWidth(iMin); setMinimumWidth(iMin);
@ -1305,7 +1305,7 @@ void KviTreeTaskBar::tipRequest(KviDynamicToolTip *,const TQPoint &pnt)
{ {
TQString szText; TQString szText;
((KviTreeTaskBarItem *)it)->m_pWindow->getTaskBarTipText(szText); ((KviTreeTaskBarItem *)it)->m_pWindow->getTaskBarTipText(szText);
m_pToolTip->tip(m_pListView->itemRect(it),szText); m_pToolTip->tip(m_pListView->tqitemRect(it),szText);
} }
} }
} }
@ -1405,7 +1405,7 @@ KviTaskBarItem * KviTreeTaskBar::nextItem()
{ {
m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->firstChild(); m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->firstChild();
} else { } else {
// this item has no children: try the next sibling // this item has no tqchildren: try the next sibling
if(m_pCurrentItem->nextSibling()) if(m_pCurrentItem->nextSibling())
{ {
m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->nextSibling(); m_pCurrentItem = (KviTreeTaskBarItem *)m_pCurrentItem->nextSibling();

@ -226,7 +226,7 @@ protected:
int m_iBlueDiff; int m_iBlueDiff;
public: public:
virtual TQString key(int column,bool) const; virtual TQString key(int column,bool) const;
virtual void paintCell(TQPainter *p,const TQColorGroup &cg,int column,int width,int alignment); virtual void paintCell(TQPainter *p,const TQColorGroup &cg,int column,int width,int tqalignment);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
virtual void paintBranches(TQPainter *p,const TQColorGroup &cg,int w,int y,int h); virtual void paintBranches(TQPainter *p,const TQColorGroup &cg,int w,int y,int h);
#else #else

@ -44,9 +44,9 @@ KviThemedLabel::~KviThemedLabel()
{ {
} }
/*TQSize KviThemedLabel::sizeHint() /*TQSize KviThemedLabel::tqsizeHint()
{ {
TQSize size=TQFrame::sizeHint(); TQSize size=TQFrame::tqsizeHint();
int iHeight=fontMetrics().height()*TQStringList::split('\n',m_szText).count()+4; int iHeight=fontMetrics().height()*TQStringList::split('\n',m_szText).count()+4;
size.setHeight(iHeight); size.setHeight(iHeight);
return size; return size;

@ -55,7 +55,7 @@ public:
void setAutoHeight(bool value) { m_bAutoHeight=value; }; void setAutoHeight(bool value) { m_bAutoHeight=value; };
void applyOptions(); void applyOptions();
// TQSize sizeHint(); // TQSize tqsizeHint();
signals: signals:
void doubleClicked(); void doubleClicked();
}; };

@ -1,7 +1,7 @@
#define __KVIRC__ #define __KVIRC__
#include <layout.h> #include <tqlayout.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include <tqobjectcleanuphandler.h> #include <tqobjectcleanuphandler.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
@ -94,7 +94,7 @@ KviWindowToolPageButton::KviWindowToolPageButton ( int pixon,int pixoff, const T
setToggleButton(true); setToggleButton(true);
setOn(bOn); setOn(bOn);
// setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Ignored)); // tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Ignored));
} }
KviWindowToolPageButton::~KviWindowToolPageButton() KviWindowToolPageButton::~KviWindowToolPageButton()
@ -106,9 +106,9 @@ KviWindowToolPageButton::~KviWindowToolPageButton()
{ {
TQPixmap pixmap( height(), width() ); TQPixmap pixmap( height(), width() );
if(isOn()) if(isOn())
pixmap.fill(colorGroup().mid()); pixmap.fill(tqcolorGroup().mid());
else else
pixmap.fill(colorGroup().button()); pixmap.fill(tqcolorGroup().button());
TQPainter painter( &pixmap ); TQPainter painter( &pixmap );
TQPixmap icon; TQPixmap icon;
@ -118,7 +118,7 @@ KviWindowToolPageButton::~KviWindowToolPageButton()
icon=iconSet()->pixmap(TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off); icon=iconSet()->pixmap(TQIconSet::Small,TQIconSet::Normal,TQIconSet::Off);
// Draw the frame // Draw the frame
//painter.setPen( colorGroup().mid() ); //painter.setPen( tqcolorGroup().mid() );
//if ( m_id != NUM_TABS - 1 ) painter.drawLine( 0, 0, 0, pixmap.height() - 1 ); //if ( m_id != NUM_TABS - 1 ) painter.drawLine( 0, 0, 0, pixmap.height() - 1 );
//painter.drawLine( 0, pixmap.height() - 1, pixmap.width() - 1, pixmap.height() - 1 ); //painter.drawLine( 0, pixmap.height() - 1, pixmap.width() - 1, pixmap.height() - 1 );
@ -127,7 +127,7 @@ KviWindowToolPageButton::~KviWindowToolPageButton()
TQString str = text(); TQString str = text();
str.remove("&"); str.remove("&");
const int textX = pixmap.width() / 2 - TQFontMetrics( font ).width( str ) / 2; const int textX = pixmap.width() / 2 - TQFontMetrics( font ).width( str ) / 2;
painter.setPen( colorGroup().buttonText() ); painter.setPen( tqcolorGroup().buttonText() );
const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() ); const TQRect rect( textX + icon.width() / 2 + 2, 0, pixmap.width(), pixmap.height() );
painter.drawText( rect, TQt::AlignLeft | TQt::AlignVCenter, str ); painter.drawText( rect, TQt::AlignLeft | TQt::AlignVCenter, str );

@ -52,7 +52,7 @@ static int g_iInputFontCharWidth[256];
#include <tqlineedit.h> #include <tqlineedit.h>
#include "kvi_tal_listbox.h" #include "kvi_tal_listbox.h"
#include <tqregexp.h> #include <tqregexp.h>
#include <clipboard.h> #include <tqclipboard.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <tqevent.h> #include <tqevent.h>
@ -74,7 +74,7 @@ int KviListBoxTopicItem::width ( const KviTalListBox * lb ) const
void KviListBoxTopicItem::paint ( TQPainter * p ) void KviListBoxTopicItem::paint ( TQPainter * p )
{ {
KviTopicWidget::paintColoredText(p,text(),listBox()->colorGroup(),height(listBox())); KviTopicWidget::paintColoredText(p,text(),listBox()->tqcolorGroup(),height(listBox()));
} }
@ -153,7 +153,7 @@ TQString convertToHtml(const TQString &text)
while(idx < text.length()) while(idx < text.length())
{ {
unsigned short c = text[(int)idx].unicode(); unsigned short c = text[(int)idx].tqunicode();
unsigned int start = idx; unsigned int start = idx;
@ -168,7 +168,7 @@ TQString convertToHtml(const TQString &text)
{ {
idx++; idx++;
if(idx >= text.length())break; if(idx >= text.length())break;
else c = text[(int)idx].unicode(); else c = text[(int)idx].tqunicode();
} }
int len = idx - start; int len = idx - start;
@ -251,7 +251,7 @@ TQString convertToHtml(const TQString &text)
++idx; ++idx;
unsigned int icoStart = idx; unsigned int icoStart = idx;
while((idx < text.length()) && (text[(int)idx].unicode() > 32))idx++; while((idx < text.length()) && (text[(int)idx].tqunicode() > 32))idx++;
KviStr lookupString = text.mid(icoStart,idx - icoStart); KviStr lookupString = text.mid(icoStart,idx - icoStart);
@ -291,7 +291,7 @@ void KviTopicWidget::paintColoredText(TQPainter *p, TQString text,const TQColorG
while((idx < text.length()) && (curX < width)) while((idx < text.length()) && (curX < width))
{ {
unsigned short c = text[(int)idx].unicode(); unsigned short c = text[(int)idx].tqunicode();
unsigned int start = idx; unsigned int start = idx;
@ -305,7 +305,7 @@ void KviTopicWidget::paintColoredText(TQPainter *p, TQString text,const TQColorG
) )
{ {
idx++; idx++;
c = text[(int)idx].unicode(); c = text[(int)idx].tqunicode();
} }
int len = idx - start; int len = idx - start;
@ -392,7 +392,7 @@ void KviTopicWidget::paintColoredText(TQPainter *p, TQString text,const TQColorG
++idx; ++idx;
unsigned int icoStart = idx; unsigned int icoStart = idx;
while((idx < text.length()) && (text[(int)idx].unicode() > 32))idx++; while((idx < text.length()) && (text[(int)idx].tqunicode() > 32))idx++;
KviStr lookupString = text.mid(icoStart,idx - icoStart); KviStr lookupString = text.mid(icoStart,idx - icoStart);
@ -438,11 +438,11 @@ void KviTopicWidget::drawContents(TQPainter *p)
#ifdef COMPILE_PSEUDO_TRANSPARENCY #ifdef COMPILE_PSEUDO_TRANSPARENCY
} }
#endif #endif
TQColorGroup colorGroup; TQColorGroup tqcolorGroup;
//colorGroup() //tqcolorGroup()
colorGroup.setColor(TQColorGroup::Text,KVI_OPTION_COLOR(KviOption_colorLabelForeground)); tqcolorGroup.setColor(TQColorGroup::Text,KVI_OPTION_COLOR(KviOption_colorLabelForeground));
colorGroup.setColor(TQColorGroup::Background,KVI_OPTION_COLOR(KviOption_colorLabelBackground)); tqcolorGroup.setColor(TQColorGroup::Background,KVI_OPTION_COLOR(KviOption_colorLabelBackground));
paintColoredText(p,m_szTopic,colorGroup); paintColoredText(p,m_szTopic,tqcolorGroup);
} }
void KviTopicWidget::setTopic(const TQString & topic) void KviTopicWidget::setTopic(const TQString & topic)
@ -541,7 +541,7 @@ void KviTopicWidget::updateToolTip()
KviTalToolTip::add(this,txt); KviTalToolTip::add(this,txt);
} }
TQSize KviTopicWidget::sizeHint() const TQSize KviTopicWidget::tqsizeHint() const
{ {
TQFontMetrics fm(font()); TQFontMetrics fm(font());
int hght = fm.lineSpacing() + (frameWidth() << 1) + 4; int hght = fm.lineSpacing() + (frameWidth() << 1) + 4;
@ -629,7 +629,7 @@ void KviTopicWidget::contextPopupAboutToShow()
void KviTopicWidget::copy() void KviTopicWidget::copy()
{ {
TQClipboard * c = TQApplication::clipboard(); TQClipboard * c = TQApplication::tqclipboard();
if(!c)return; if(!c)return;
if(c->supportsSelection())c->setText(m_szTopic,TQClipboard::Selection); if(c->supportsSelection())c->setText(m_szTopic,TQClipboard::Selection);
c->setText(m_szTopic,TQClipboard::Clipboard); c->setText(m_szTopic,TQClipboard::Clipboard);

@ -102,7 +102,7 @@ public:
const TQString & topic(){ return m_szTopic; }; const TQString & topic(){ return m_szTopic; };
const TQString & topicSetBy(){ return m_szSetBy; }; const TQString & topicSetBy(){ return m_szSetBy; };
const TQString & topicSetAt(){ return m_szSetAt; }; const TQString & topicSetAt(){ return m_szSetAt; };
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
void applyOptions(); void applyOptions();
static void paintColoredText(TQPainter *p, TQString text,const TQColorGroup& cg, int h=-1, int w=-1); static void paintColoredText(TQPainter *p, TQString text,const TQColorGroup& cg, int h=-1, int w=-1);

@ -305,7 +305,7 @@ void KviUserListView::applyOptions()
m_pUsersLabel->setFont(KVI_OPTION_FONT(KviOption_fontUserListView)); m_pUsersLabel->setFont(KVI_OPTION_FONT(KviOption_fontUserListView));
setMinimumWidth(100); setMinimumWidth(100);
resizeEvent(0); // this will call update() too resizeEvent(0); // this will call update() too
repaint(); tqrepaint();
} }
void KviUserListView::updateArea() void KviUserListView::updateArea()
{ {
@ -838,7 +838,7 @@ int KviUserListView::getUserModeLevel(const TQString &szNick)
char KviUserListView::getUserFlag(KviUserListEntry * e) char KviUserListView::getUserFlag(KviUserListEntry * e)
{ {
if(!e)return 0; if(!e)return 0;
return (char)m_pKviWindow->connection()->serverInfo()->modePrefixChar(e->m_iFlags).unicode(); return (char)m_pKviWindow->connection()->serverInfo()->modePrefixChar(e->m_iFlags).tqunicode();
} }
void KviUserListView::prependUserFlag(const TQString &nick,TQString &buffer) void KviUserListView::prependUserFlag(const TQString &nick,TQString &buffer)
@ -1141,7 +1141,7 @@ void KviUserListView::resizeEvent(TQResizeEvent *)
int hght; int hght;
if(!KVI_OPTION_BOOL(KviOption_boolDisableUserListLabel))//G&N 2005 if(!KVI_OPTION_BOOL(KviOption_boolDisableUserListLabel))//G&N 2005
{ {
hght = m_pUsersLabel->sizeHint().height(); hght = m_pUsersLabel->tqsizeHint().height();
if(hght < 16)hght = 16; // at least if(hght < 16)hght = 16; // at least
m_pUsersLabel->setGeometry(0,0,width(),hght); m_pUsersLabel->setGeometry(0,0,width(),hght);
} }
@ -1281,7 +1281,7 @@ void KviUserListView::maybeTip(KviUserListToolTip * tip,const TQPoint &pnt)
TQDateTime dt; TQDateTime dt;
dt.setTime_t(it->m_joinTime); dt.setTime_t(it->m_joinTime);
buffer += "<tr><td bgcolor=\"#F0F0F0\"><nobr>"; buffer += "<tr><td bgcolor=\"#F0F0F0\"><nobr>";
buffer += __tr2qs("Joined on <b>%1</b>").arg(dt.toString()); buffer += __tr2qs("Joined on <b>%1</b>").tqarg(dt.toString());
buffer += "</nobr></td></tr>"; buffer += "</nobr></td></tr>";
} }
@ -1293,7 +1293,7 @@ void KviUserListView::maybeTip(KviUserListToolTip * tip,const TQPoint &pnt)
int hors = mins / 60; int hors = mins / 60;
mins = mins % 60; mins = mins % 60;
buffer += "<tr><td bgcolor=\"#F0F0F0\"><nobr>"; buffer += "<tr><td bgcolor=\"#F0F0F0\"><nobr>";
buffer += __tr2qs("Quiet for <b>%1h %2m %3s</b>").arg(hors).arg(mins).arg(secs); buffer += __tr2qs("Quiet for <b>%1h %2m %3s</b>").tqarg(hors).tqarg(mins).tqarg(secs);
buffer += "</nobr></td></tr>"; buffer += "</nobr></td></tr>";
} }
buffer += "</table>"; buffer += "</table>";
@ -1531,9 +1531,9 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
p.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorUserListViewGrid),0 /*,TQPen::DotLine*/)); p.setPen(TQPen(KVI_OPTION_COLOR(KviOption_colorUserListViewGrid),0 /*,TQPen::DotLine*/));
if((bShowState || bShowIcons) && (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_3DGRID)) if((bShowState || bShowIcons) && (KVI_OPTION_UINT(KviOption_uintUserListViewGridType) == KVI_USERLISTVIEW_GRIDTYPE_3DGRID))
p.drawLine(iAvatarAndTextX,bottom - 1,iAvatarAndTextX,theY); p.drawLine(iAvatarAndTextX,bottom - 1,iAvatarAndTextX,theY);
p.setPen(colorGroup().shadow()); p.setPen(tqcolorGroup().shadow());
p.drawLine(0,bottom - 1,wdth,bottom - 1); p.drawLine(0,bottom - 1,wdth,bottom - 1);
p.setPen(colorGroup().light()); p.setPen(tqcolorGroup().light());
p.drawLine(0,theY,wdth,theY); p.drawLine(0,theY,wdth,theY);
theY--; theY--;
} }
@ -1725,10 +1725,10 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
//we really do not need any self-draw borders. //we really do not need any self-draw borders.
//if we will need it, we will draw a better one with system style //if we will need it, we will draw a better one with system style
//p.setPen(colorGroup().dark()); //p.setPen(tqcolorGroup().dark());
//p.drawLine(0,0,wdth,0); //p.drawLine(0,0,wdth,0);
//p.drawLine(0,0,0,height()); //p.drawLine(0,0,0,height());
//p.setPen(colorGroup().light()); //p.setPen(tqcolorGroup().light());
//p.drawLine(1,height()-1,wdth,height()-1); //p.drawLine(1,height()-1,wdth,height()-1);
//p.drawLine(wdth - 1,1,wdth - 1,height()); //p.drawLine(wdth - 1,1,wdth - 1,height());
@ -1742,7 +1742,7 @@ void KviUserListViewArea::paintEvent(TQPaintEvent *ev)
void KviUserListViewArea::resizeEvent(TQResizeEvent *) void KviUserListViewArea::resizeEvent(TQResizeEvent *)
{ {
int iScr = m_pScrollBar->sizeHint().width(); int iScr = m_pScrollBar->tqsizeHint().width();
m_pScrollBar->setGeometry(width() - iScr,0,iScr,height()); m_pScrollBar->setGeometry(width() - iScr,0,iScr,height());
m_pScrollBar->setPageStep(height()); m_pScrollBar->setPageStep(height());
m_pScrollBar->setLineStep(m_pListView->m_iFontHeight - 1); m_pScrollBar->setLineStep(m_pListView->m_iFontHeight - 1);

@ -60,7 +60,7 @@
#include <tqsplitter.h> #include <tqsplitter.h>
#include <tqmetaobject.h> #include <tqmetaobject.h>
#include <tqdatetime.h> #include <tqdatetime.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <tqevent.h> #include <tqevent.h>
// it looks they can't decide :D // it looks they can't decide :D
@ -285,7 +285,7 @@ void KviWindow::demandAttention()
bool KviWindow::focusNextPrevChild(bool next) bool KviWindow::focusNextPrevChild(bool next)
{ {
TQWidget * w = focusWidget(); TQWidget * w = tqfocusWidget();
if(w) if(w)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
@ -299,9 +299,9 @@ bool KviWindow::focusNextPrevChild(bool next)
if(w->parent()) if(w->parent())
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
if(w->parent()->metaObject()->indexOfProperty("KviProperty_ChildFocusOwner") == -1) if(w->parent()->tqmetaObject()->indexOfProperty("KviProperty_ChildFocusOwner") == -1)
#else #else
if(w->parent()->metaObject()->findProperty("KviProperty_ChildFocusOwner") == -1) if(w->parent()->tqmetaObject()->findProperty("KviProperty_ChildFocusOwner") == -1)
#endif #endif
return false; // Do NOT change the focus widget! return false; // Do NOT change the focus widget!
} }
@ -586,7 +586,7 @@ void KviWindow::getDefaultLogFileName(TQString &buffer)
{ {
// FIXME: #warning "Make it configurable ?" // FIXME: #warning "Make it configurable ?"
TQString date; TQString date;
TQDate dt(TQDate::currentDate()); TQDate dt(TQDate::tqcurrentDate());
date=dt.toString("yyyy.MM.dd"); date=dt.toString("yyyy.MM.dd");
TQString base; TQString base;
getBaseLogFileName(base); getBaseLogFileName(base);
@ -1006,7 +1006,7 @@ void KviWindow::focusInEvent(TQFocusEvent *)
if(m_pIrcView)m_pFocusHandler = m_pIrcView; if(m_pIrcView)m_pFocusHandler = m_pIrcView;
else { else {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQList<TQObject *> list = children(); TQList<TQObject *> list = tqchildren();
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it) for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{ {
TQObject * c = *it; TQObject * c = *it;
@ -1042,7 +1042,7 @@ void KviWindow::focusInEvent(TQFocusEvent *)
} }
// Setting the focus to the focus handler usually // Setting the focus to the focus handler usually
// triggers our filter for the children's focusInEvent. // triggers our filter for the tqchildren's focusInEvent.
// This should call activateSelf() and thus // This should call activateSelf() and thus
// we should be already the active window at this point. // we should be already the active window at this point.
// If we're not, then run activateSelf() to fix this. // If we're not, then run activateSelf() to fix this.
@ -1124,7 +1124,7 @@ void KviWindow::childInserted(TQWidget * o)
} }
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQList<TQObject *> list = o->children(); TQList<TQObject *> list = o->tqchildren();
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it) for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{ {
TQObject * c = *it; TQObject * c = *it;
@ -1162,7 +1162,7 @@ void KviWindow::childRemoved(TQWidget * o)
m_pLastFocusedChild = 0; m_pLastFocusedChild = 0;
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQList<TQObject *> list = o->children(); TQList<TQObject *> list = o->tqchildren();
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it) for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{ {
TQObject * c = *it; TQObject * c = *it;
@ -1180,7 +1180,7 @@ void KviWindow::childRemoved(TQWidget * o)
if(c->isWidgetType()) if(c->isWidgetType())
childRemoved((TQWidget *)c); childRemoved((TQWidget *)c);
} }
} //else debug("The removed object has no children"); } //else debug("The removed object has no tqchildren");
#endif #endif
} }
@ -1202,7 +1202,7 @@ void KviWindow::wheelEvent(TQWheelEvent *e)
} }
void KviWindow::childrenTreeChanged(TQWidget * widgetAdded) void KviWindow::tqchildrenTreeChanged(TQWidget * widgetAdded)
{ {
// if(widgetAdded && m_pFocusHandler)setFocusHandler(m_pFocusHandler,widgetAdded); // if(widgetAdded && m_pFocusHandler)setFocusHandler(m_pFocusHandler,widgetAdded);
// FIXME: This might be useless // FIXME: This might be useless
@ -1217,14 +1217,14 @@ void KviWindow::updateBackgrounds(TQObject * obj)
if(!obj) if(!obj)
obj = TQT_TQOBJECT(this); obj = TQT_TQOBJECT(this);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQList<TQObject *> list = obj->children(); TQList<TQObject *> list = obj->tqchildren();
if (list.count()) if (list.count())
{ {
for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it) for(TQList<TQObject *>::Iterator it = list.begin();it != list.end();++it)
{ {
TQObject * child = *it; TQObject * child = *it;
if(child->metaObject()->indexOfProperty("TransparencyCapable") != -1){ if(child->tqmetaObject()->indexOfProperty("TransparencyCapable") != -1){
// if (child->isWidgetType()) // if (child->isWidgetType())
((TQWidget *)child)->update(); ((TQWidget *)child)->update();
} }
@ -1239,7 +1239,7 @@ void KviWindow::updateBackgrounds(TQObject * obj)
{ {
TQObject * child = list.at(i); TQObject * child = list.at(i);
// FIXME: check if this code can work with qt < 3.0.0 too // FIXME: check if this code can work with qt < 3.0.0 too
if(child->metaObject()->findProperty("TransparencyCapable",true) != -1) if(child->tqmetaObject()->findProperty("TransparencyCapable",true) != -1)
((TQWidget *)child)->update(); ((TQWidget *)child)->update();
updateBackgrounds(child); updateBackgrounds(child);
@ -1317,7 +1317,7 @@ TQRect KviWindow::externalGeometry()
#ifndef Q_OS_MACX #ifndef Q_OS_MACX
return mdiParent() ? mdiParent()->restoredGeometry() : frameGeometry(); return mdiParent() ? mdiParent()->restoredGeometry() : frameGeometry();
#else #else
return mdiParent() ? mdiParent()->restoredGeometry() : geometry(); return mdiParent() ? mdiParent()->restoredGeometry() : tqgeometry();
#endif #endif
} }
@ -1327,7 +1327,7 @@ void KviWindow::applyOptions()
if(m_pIrcView)m_pIrcView->applyOptions(); if(m_pIrcView)m_pIrcView->applyOptions();
if(m_pInput)m_pInput->applyOptions(); if(m_pInput)m_pInput->applyOptions();
// trick: relayout // trick: retqlayout
resize(width() - 1,height() - 1); resize(width() - 1,height() - 1);
resize(width() + 1,height() + 1); resize(width() + 1,height() + 1);
} }
@ -1490,10 +1490,10 @@ void KviWindow::preprocessMessage(TQString & szMessage)
if(m_pConsole->connection()) if(m_pConsole->connection())
if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().contains(tmp[0])) if(m_pConsole->connection()->serverInfo()->supportedChannelTypes().contains(tmp[0]))
if((*it)==tmp) if((*it)==tmp)
*it=TQString("\r!c\r%1\r").arg(*it); *it=TQString("\r!c\r%1\r").tqarg(*it);
else else
{ {
*it=TQString("\r!c%1\r%2\r").arg(tmp).arg(*it); *it=TQString("\r!c%1\r%2\r").tqarg(tmp).tqarg(*it);
} }
} }
szMessage=strings.join(" "); szMessage=strings.join(" ");

@ -181,7 +181,7 @@ protected: // almost private: don't touch :D
// KviToolWindowsContainer * m_pEditorsContainer; // KviToolWindowsContainer * m_pEditorsContainer;
public: public:
// The global ID of this window: unique in the application // The global ID of this window: unique in the application
TQString id(){ return TQString("%1").arg(m_uId); }; TQString id(){ return TQString("%1").tqarg(m_uId); };
unsigned long int numericId(){ return m_uId; }; unsigned long int numericId(){ return m_uId; };
public: public:
// THIS is the function that should be used // THIS is the function that should be used
@ -262,7 +262,7 @@ public:
bool isMaximized(); bool isMaximized();
// Retrieves the default log file name: this is pre-build // Retrieves the default log file name: this is pre-build
void getDefaultLogFileName(TQString &buffer); void getDefaultLogFileName(TQString &buffer);
// Well...the external geometry :) // Well...the external tqgeometry :)
TQRect externalGeometry(); TQRect externalGeometry();
void delayedClose(); // close that jumps out of the current event loop void delayedClose(); // close that jumps out of the current event loop
@ -374,7 +374,7 @@ protected:
BUTTON_CLASS * createToolButton(TQWidget * par,const char * nam,int pixon,int pixoff,const TQString & tooltip,bool bOn); BUTTON_CLASS * createToolButton(TQWidget * par,const char * nam,int pixon,int pixoff,const TQString & tooltip,bool bOn);
// This is called by KviInput: actually it links the widgetAdded // This is called by KviInput: actually it links the widgetAdded
virtual void childrenTreeChanged(TQWidget * widgetAdded); virtual void tqchildrenTreeChanged(TQWidget * widgetAdded);
virtual bool focusNextPrevChild(bool bNext); virtual bool focusNextPrevChild(bool bNext);

@ -32,7 +32,7 @@
#include "kvi_sourcesdate.h" #include "kvi_sourcesdate.h"
#include <tqwidget.h> #include <tqwidget.h>
#include <layout.h> #include <tqlayout.h>
#include <kvi_tal_textedit.h> #include <kvi_tal_textedit.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqpixmap.h> #include <tqpixmap.h>
@ -86,7 +86,7 @@ KviAboutDialog::KviAboutDialog()
TQLabel * l = new TQLabel(w); TQLabel * l = new TQLabel(w);
l->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); l->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
l->setBackgroundColor(TQt::black); l->setBackgroundColor(TQt::black);
l->setAlignment(TQt::AlignCenter); l->tqsetAlignment(TQt::AlignCenter);
l->setPixmap(pix); l->setPixmap(pix);
g->addWidget(l,0,0); g->addWidget(l,0,0);
@ -99,7 +99,7 @@ KviAboutDialog::KviAboutDialog()
aboutString += KVI_SOURCES_DATE; aboutString += KVI_SOURCES_DATE;
l = new TQLabel(aboutString,w); l = new TQLabel(aboutString,w);
l->setAlignment(TQt::AlignCenter); l->tqsetAlignment(TQt::AlignCenter);
g->addWidget(l,1,0); g->addWidget(l,1,0);
addTab(w,__tr2qs_ctx("About","about")); addTab(w,__tr2qs_ctx("About","about"));

@ -109,10 +109,10 @@ static bool action_kvs_cmd_trigger(KviKvsModuleCommandCall * c)
a->activate(); a->activate();
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The action \"%1\" is disabled").arg(szName)); c->warning(__tr2qs("The action \"%1\" is disabled").tqarg(szName));
} }
} else { } else {
c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -158,7 +158,7 @@ static bool action_kvs_cmd_enable(KviKvsModuleCommandCall * c)
if(!a->isEnabled())a->setEnabled(true); if(!a->isEnabled())a->setEnabled(true);
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -206,7 +206,7 @@ static bool action_kvs_cmd_disable(KviKvsModuleCommandCall * c)
if(a->isEnabled())a->setEnabled(false); if(a->isEnabled())a->setEnabled(false);
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -252,11 +252,11 @@ static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c)
a->suicide(); a->suicide();
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The action \"%1\" is a core action and cannot be destroyed").arg(szName)); c->warning(__tr2qs("The action \"%1\" is a core action and cannot be destroyed").tqarg(szName));
} }
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The action \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The action \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -417,7 +417,7 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c)
if(old->isKviUserActionNeverOverrideThis()) if(old->isKviUserActionNeverOverrideThis())
old->suicide(); old->suicide();
else { else {
c->warning(__tr2qs("The action \"%1\" is already defined as core action and cannot be overridden").arg(szName)); c->warning(__tr2qs("The action \"%1\" is already defined as core action and cannot be overridden").tqarg(szName));
return false; return false;
} }
} }

@ -42,7 +42,7 @@
#include "kvi_customtoolbarmanager.h" #include "kvi_customtoolbarmanager.h"
#include <tqsplitter.h> #include <tqsplitter.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_vbox.h" #include "kvi_tal_vbox.h"
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
@ -980,7 +980,7 @@ TQPixmap * KviActionEditorWindow::myIconPtr()
void KviActionEditorWindow::resizeEvent(TQResizeEvent *e) void KviActionEditorWindow::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pBase->sizeHint().height(); int hght = m_pBase->tqsizeHint().height();
m_pEditor->setGeometry(0,0,width(),height()- hght); m_pEditor->setGeometry(0,0,width(),height()- hght);
m_pBase->setGeometry(0,height() - hght,width(),hght); m_pBase->setGeometry(0,height() - hght,width(),hght);
} }

@ -195,7 +195,7 @@ static bool addon_kvs_cmd_uninstall(KviKvsModuleCommandCall * c)
KviKvsScriptAddonManager::instance()->unregisterAddon(szName,c->window(),!c->switches()->find('n',"no-callback")); KviKvsScriptAddonManager::instance()->unregisterAddon(szName,c->window(),!c->switches()->find('n',"no-callback"));
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -235,13 +235,13 @@ static bool addon_kvs_cmd_configure(KviKvsModuleCommandCall * c)
if(ss.isEmpty()) if(ss.isEmpty())
{ {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The addon \"%1\" has no configure callback set").arg(szName)); c->warning(__tr2qs("The addon \"%1\" has no configure callback set").tqarg(szName));
} else { } else {
a->executeConfigureCallback(c->window()); a->executeConfigureCallback(c->window());
} }
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -282,13 +282,13 @@ static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c)
if(ss.isEmpty()) if(ss.isEmpty())
{ {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The addon \"%1\" has no help callback set").arg(szName)); c->warning(__tr2qs("The addon \"%1\" has no help callback set").tqarg(szName));
} else { } else {
a->executeHelpCallback(c->window()); a->executeHelpCallback(c->window());
} }
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -334,7 +334,7 @@ static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall *
a->setConfigureCallback(c->callback()->code()); a->setConfigureCallback(c->callback()->code());
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName));
} }
return true; return true;
@ -381,7 +381,7 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c)
a->setHelpCallback(c->callback()->code()); a->setHelpCallback(c->callback()->code());
} else { } else {
if(!c->switches()->find('q',"quiet")) if(!c->switches()->find('q',"quiet"))
c->warning(__tr2qs("The addon \"%1\" does not exist").arg(szName)); c->warning(__tr2qs("The addon \"%1\" does not exist").tqarg(szName));
} }
return true; return true;

@ -37,7 +37,7 @@
#include "kvi_sourcesdate.h" #include "kvi_sourcesdate.h"
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <layout.h> #include <tqlayout.h>
#include <tqapplication.h> #include <tqapplication.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqlineedit.h> #include <tqlineedit.h>
@ -213,7 +213,7 @@ KviScriptManagementDialog::KviScriptManagementDialog(TQWidget * p)
lb->setFixedWidth(pix->width()); lb->setFixedWidth(pix->width());
} }
lb->setBackgroundColor(TQt::black); lb->setBackgroundColor(TQt::black);
lb->setAlignment(TQt::AlignBottom | TQt::AlignRight); lb->tqsetAlignment(TQt::AlignBottom | TQt::AlignRight);
*/ */
m_pListView = new KviScriptAddonListView(this); m_pListView = new KviScriptAddonListView(this);
g->addMultiCellWidget(m_pListView,0,10,1,1); g->addMultiCellWidget(m_pListView,0,10,1,1);
@ -330,7 +330,7 @@ void KviScriptManagementDialog::uninstallScript()
if(!it)return; if(!it)return;
TQString txt = "<p>"; TQString txt = "<p>";
txt += __tr2qs("Do you really want to uninstall the addon \"%1\" ?").arg(it->addon()->visibleName()); txt += __tr2qs("Do you really want to uninstall the addon \"%1\" ?").tqarg(it->addon()->visibleName());
txt += "</p>"; txt += "</p>";
if(TQMessageBox::question(this, if(TQMessageBox::question(this,

@ -42,7 +42,7 @@
#include "kvi_valuelist.h" #include "kvi_valuelist.h"
#include <tqsplitter.h> #include <tqsplitter.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_vbox.h" #include "kvi_tal_vbox.h"
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
@ -794,7 +794,7 @@ bool KviAliasEditor::removeItem(KviAliasEditorListViewItem *it,bool * pbYesToAll
else { else {
KviTQString::sprintf(szMsg,__tr2qs("Do you really want to remove the namespace \"%Q\" ?"),&szName); KviTQString::sprintf(szMsg,__tr2qs("Do you really want to remove the namespace \"%Q\" ?"),&szName);
szMsg += "<br>"; szMsg += "<br>";
szMsg += __tr2qs("Please note that all the children items will be deleted too."); szMsg += __tr2qs("Please note that all the tqchildren items will be deleted too.");
} }
g_pAliasEditorModule->lock(); g_pAliasEditorModule->lock();
@ -1383,7 +1383,7 @@ TQPixmap * KviAliasEditorWindow::myIconPtr()
void KviAliasEditorWindow::resizeEvent(TQResizeEvent *e) void KviAliasEditorWindow::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pBase->sizeHint().height(); int hght = m_pBase->tqsizeHint().height();
m_pEditor->setGeometry(0,0,width(),height()- hght); m_pEditor->setGeometry(0,0,width(),height()- hght);
m_pBase->setGeometry(0,height() - hght,width(),hght); m_pBase->setGeometry(0,height() - hght,width(),hght);
} }

@ -52,7 +52,7 @@
#include <tqtimer.h> #include <tqtimer.h>
#include <tqlabel.h> #include <tqlabel.h>
#include "kvi_tal_hbox.h" #include "kvi_tal_hbox.h"
#include <layout.h> #include <tqlayout.h>
static KviPointerList<KviAsyncAvatarSelectionDialog> * g_pAvatarSelectionDialogList = 0; static KviPointerList<KviAsyncAvatarSelectionDialog> * g_pAvatarSelectionDialogList = 0;
extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager;
@ -119,7 +119,7 @@ void KviAsyncAvatarSelectionDialog::okClicked()
{ {
TQString tmp = m_szAvatarName; TQString tmp = m_szAvatarName;
tmp.replace("\\","\\\\"); tmp.replace("\\","\\\\");
TQString szBuffer=TQString("avatar.set \"%1\"").arg(tmp); TQString szBuffer=TQString("avatar.set \"%1\"").tqarg(tmp);
KviKvsScript::run(szBuffer,m_pConnection->console()); KviKvsScript::run(szBuffer,m_pConnection->console());
} }

@ -39,7 +39,7 @@
#include <tqlineedit.h> #include <tqlineedit.h>
#include "kvi_tal_listview.h" #include "kvi_tal_listview.h"
#include <kvi_tal_groupbox.h> #include <kvi_tal_groupbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4

@ -169,7 +169,7 @@ void KviClockDisplay::drawContents(TQPainter *p)
} }
TQSize KviClockDisplay::sizeHint() const TQSize KviClockDisplay::tqsizeHint() const
{ {
return TQSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT); return TQSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT);
} }

@ -38,7 +38,7 @@ protected:
unsigned char m_uDigit[6]; unsigned char m_uDigit[6];
protected: protected:
virtual void drawContents(TQPainter * p); virtual void drawContents(TQPainter * p);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual void timerEvent(TQTimerEvent *e); virtual void timerEvent(TQTimerEvent *e);
}; };

@ -36,7 +36,7 @@
#include "kvi_kvs_variantlist.h" #include "kvi_kvs_variantlist.h"
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"

@ -124,7 +124,7 @@ static bool config_kvs_fnc_open(KviKvsModuleFunctionCall * c)
KviConfig * cfg = new KviConfig(szAbsFile,fileMode); KviConfig * cfg = new KviConfig(szAbsFile,fileMode);
g_iNextConfigId++; g_iNextConfigId++;
TQString tmp = TQString("%1").arg(g_iNextConfigId); TQString tmp = TQString("%1").tqarg(g_iNextConfigId);
g_pConfigDict->insert(tmp,cfg); g_pConfigDict->insert(tmp,cfg);
c->returnValue()->setString(tmp); c->returnValue()->setString(tmp);
return true; return true;

@ -81,7 +81,7 @@ KviDccZeroPortTag * KviDccBroker::addZeroPortTag()
static unsigned int g_uNextZeroPortTag = 0; static unsigned int g_uNextZeroPortTag = 0;
g_uNextZeroPortTag++; g_uNextZeroPortTag++;
KviDccZeroPortTag * t = new KviDccZeroPortTag; KviDccZeroPortTag * t = new KviDccZeroPortTag;
t->m_tTimestamp = TQDateTime::currentDateTime(); t->m_tTimestamp = TQDateTime::tqcurrentDateTime();
t->m_szTag.setNum(g_uNextZeroPortTag); t->m_szTag.setNum(g_uNextZeroPortTag);
//t->m_szTag.prepend("mIrc-zero-port-"); //t->m_szTag.prepend("mIrc-zero-port-");
t->m_uResumePosition = 0; t->m_uResumePosition = 0;
@ -94,7 +94,7 @@ KviDccZeroPortTag * KviDccBroker::findZeroPortTag(const TQString &szTag)
{ {
KviDccZeroPortTag * t = m_pZeroPortTags->find(szTag); KviDccZeroPortTag * t = m_pZeroPortTags->find(szTag);
if(!t)return 0; if(!t)return 0;
if(t->m_tTimestamp.secsTo(TQDateTime::currentDateTime()) > 180) if(t->m_tTimestamp.secsTo(TQDateTime::tqcurrentDateTime()) > 180)
{ {
// too late man... // too late man...
m_pZeroPortTags->remove(szTag); m_pZeroPortTags->remove(szTag);
@ -268,7 +268,7 @@ void KviDccBroker::handleChatRequest(KviDccDescriptor * dcc)
TQString tmp = __tr2qs_ctx( \ TQString tmp = __tr2qs_ctx( \
"<b>%1 [%2@%3]</b> requests a " \ "<b>%1 [%2@%3]</b> requests a " \
"<b>Direct Client Connection</b> in <b>%4</b> mode.<br>", \ "<b>Direct Client Connection</b> in <b>%4</b> mode.<br>", \
"dcc").arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg(dcc->szType); "dcc").tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(dcc->szType);
#ifdef COMPILE_SSL_SUPPORT #ifdef COMPILE_SSL_SUPPORT
if(dcc->bIsSSL)tmp += __tr2qs_ctx("The connection will be secured using SSL.<br>","dcc"); if(dcc->bIsSSL)tmp += __tr2qs_ctx("The connection will be secured using SSL.<br>","dcc");
@ -282,11 +282,11 @@ void KviDccBroker::handleChatRequest(KviDccDescriptor * dcc)
} else { } else {
tmp += __tr2qs_ctx( \ tmp += __tr2qs_ctx( \
"The connection target will be host <b>%1</b> on port <b>%2</b><br>" \ "The connection target will be host <b>%1</b> on port <b>%2</b><br>" \
,"dcc").arg(dcc->szIp).arg(dcc->szPort); ,"dcc").tqarg(dcc->szIp).tqarg(dcc->szPort);
} }
TQString caption = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").arg(dcc->szType); TQString caption = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").tqarg(dcc->szType);
KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,caption); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,caption);
@ -315,7 +315,7 @@ void KviDccBroker::executeChat(KviDccBox *box,KviDccDescriptor * dcc)
KviStr szSubProto = dcc->szType; KviStr szSubProto = dcc->szType;
szSubProto.toLower(); szSubProto.toLower();
TQString tmp = TQString("dcc: %1 %2@%3:%4").arg(szSubProto.ptr()).arg(dcc->szNick).arg(dcc->szIp).arg(dcc->szPort); TQString tmp = TQString("dcc: %1 %2@%3:%4").tqarg(szSubProto.ptr()).tqarg(dcc->szNick).tqarg(dcc->szIp).tqarg(dcc->szPort);
KviDccChat * chat = new KviDccChat(dcc->console()->frame(),dcc,tmp.utf8().data()); KviDccChat * chat = new KviDccChat(dcc->console()->frame(),dcc,tmp.utf8().data());
bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : \ bool bMinimized = dcc->bOverrideMinimize ? dcc->bShowMinimized : \
@ -341,7 +341,7 @@ void KviDccBroker::activeVoiceManage(KviDccDescriptor * dcc)
"<b>Direct Client Connection</b> in <b>VOICE</b> mode.<br>" \ "<b>Direct Client Connection</b> in <b>VOICE</b> mode.<br>" \
"The connection target will be host <b>%4</b> on port <b>%5</b><br>" \ "The connection target will be host <b>%4</b> on port <b>%5</b><br>" \
,"dcc" \ ,"dcc" \
).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg(dcc->szIp).arg(dcc->szPort); ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(dcc->szIp).tqarg(dcc->szPort);
KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,__tr2qs_ctx("DCC VOICE request","dcc")); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,__tr2qs_ctx("DCC VOICE request","dcc"));
m_pBoxList->append(box); m_pBoxList->append(box);
@ -412,7 +412,7 @@ void KviDccBroker::activeCanvasManage(KviDccDescriptor * dcc)
"<b>Direct Client Connection</b> in <b>CANVAS</b> mode.<br>" \ "<b>Direct Client Connection</b> in <b>CANVAS</b> mode.<br>" \
"The connection target will be host <b>%4</b> on port <b>%5</b><br>" \ "The connection target will be host <b>%4</b> on port <b>%5</b><br>" \
,"dcc" \ ,"dcc" \
).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg(dcc->szIp).arg(dcc->szPort); ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(dcc->szIp).tqarg(dcc->szPort);
KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,__tr2qs_ctx("DCC CANVAS request","dcc")); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,__tr2qs_ctx("DCC CANVAS request","dcc"));
m_pBoxList->append(box); m_pBoxList->append(box);
@ -505,9 +505,9 @@ void KviDccBroker::recvFileManage(KviDccDescriptor * dcc)
"<b>%5</b> large.<br>" \ "<b>%5</b> large.<br>" \
"The connection target will be host <b>%6</b> on port <b>%7</b><br>" \ "The connection target will be host <b>%6</b> on port <b>%7</b><br>" \
,"dcc" \ ,"dcc" \
).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg( ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(
dcc->szFileName).arg(KviTQString::makeSizeReadable(dcc->szFileSize.toInt())).arg( dcc->szFileName).tqarg(KviTQString::makeSizeReadable(dcc->szFileSize.toInt())).tqarg(
dcc->szIp).arg(dcc->szPort); dcc->szIp).tqarg(dcc->szPort);
} else { } else {
// passive: we will be listening! // passive: we will be listening!
@ -518,8 +518,8 @@ void KviDccBroker::recvFileManage(KviDccDescriptor * dcc)
"<b>%5</b> large.<br>" \ "<b>%5</b> large.<br>" \
"You will be the passive side of the connection.<br>" \ "You will be the passive side of the connection.<br>" \
,"dcc" \ ,"dcc" \
).arg(dcc->szNick).arg(dcc->szUser).arg(dcc->szHost).arg( ).tqarg(dcc->szNick).tqarg(dcc->szUser).tqarg(dcc->szHost).tqarg(
dcc->szFileName).arg(KviTQString::makeSizeReadable(dcc->szFileSize.toInt())); dcc->szFileName).tqarg(KviTQString::makeSizeReadable(dcc->szFileSize.toInt()));
} }
if(dcc->bIsIncomingAvatar) if(dcc->bIsIncomingAvatar)
@ -540,7 +540,7 @@ void KviDccBroker::recvFileManage(KviDccDescriptor * dcc)
//#warning "Maybe remove the pending avatar if rejected ?" //#warning "Maybe remove the pending avatar if rejected ?"
TQString title = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").arg(dcc->szType); TQString title = __tr2qs_ctx("DCC %1 Request - KVIrc","dcc").tqarg(dcc->szType);
KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,title); KviDccAcceptBox * box = new KviDccAcceptBox(this,dcc,tmp,title);
m_pBoxList->append(box); m_pBoxList->append(box);
@ -669,7 +669,7 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc)
"<b>auto-rename</b> the new file, or<br>" \ "<b>auto-rename</b> the new file, or<br>" \
"<b>resume</b> an incomplete download?" \ "<b>resume</b> an incomplete download?" \
,"dcc" \ ,"dcc" \
).arg(dcc->szLocalFileName).arg(KviTQString::makeSizeReadable(fi.size())); ).tqarg(dcc->szLocalFileName).tqarg(KviTQString::makeSizeReadable(fi.size()));
} else { } else {
bDisableResume = true; bDisableResume = true;
// the file on disk is larger or equal to the remote one // the file on disk is larger or equal to the remote one
@ -680,7 +680,7 @@ void KviDccBroker::renameOverwriteResume(KviDccBox *box,KviDccDescriptor * dcc)
"<b>overwrite</b> the existing file, or<br> " \ "<b>overwrite</b> the existing file, or<br> " \
"<b>auto-rename</b> the new file ?" \ "<b>auto-rename</b> the new file ?" \
,"dcc" \ ,"dcc" \
).arg(dcc->szLocalFileName); ).tqarg(dcc->szLocalFileName);
} }
KviDccRenameBox * box = new KviDccRenameBox(this,dcc,tmp,bDisableResume); KviDccRenameBox * box = new KviDccRenameBox(this,dcc,tmp,bDisableResume);

@ -258,16 +258,16 @@ bool KviDccCanvas::event(TQEvent *e)
void KviDccCanvas::resizeEvent(TQResizeEvent *e) void KviDccCanvas::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pInput->heightHint(); int hght = m_pInput->heightHint();
// int hght2 = m_pTopSplitter->sizeHint().height(); // int hght2 = m_pTopSplitter->tqsizeHint().height();
// m_pTopSplitter->setGeometry(0,0,width(),hght2); // m_pTopSplitter->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,0,width(),height() - hght); m_pSplitter->setGeometry(0,0,width(),height() - hght);
m_pInput->setGeometry(0,height() - hght,width(),hght); m_pInput->setGeometry(0,height() - hght,width(),hght);
} }
TQSize KviDccCanvas::sizeHint() const TQSize KviDccCanvas::tqsizeHint() const
{ {
TQSize ret(m_pIrcView->sizeHint().width(), TQSize ret(m_pIrcView->tqsizeHint().width(),
m_pIrcView->sizeHint().height() + m_pInput->heightHint()); m_pIrcView->tqsizeHint().height() + m_pInput->heightHint());
return ret; return ret;
} }

@ -61,7 +61,7 @@ protected:
virtual void getBaseLogFileName(KviStr &buffer); virtual void getBaseLogFileName(KviStr &buffer);
virtual TQPixmap * myIconPtr(); virtual TQPixmap * myIconPtr();
virtual void resizeEvent(TQResizeEvent *e); virtual void resizeEvent(TQResizeEvent *e);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual bool event(TQEvent *e); virtual bool event(TQEvent *e);
virtual void ownMessage(const char *text); virtual void ownMessage(const char *text);
virtual void ownAction(const char *text); virtual void ownAction(const char *text);

@ -1509,14 +1509,14 @@ KviCanvasWidget::KviCanvasWidget(TQWidget * par)
connect(m_pPropertiesWidget,TQT_SIGNAL(propertyChanged(const TQString &,const TQVariant &)),m_pCanvasView,TQT_SLOT(propertyChanged(const TQString &,const TQVariant &))); connect(m_pPropertiesWidget,TQT_SIGNAL(propertyChanged(const TQString &,const TQVariant &)),m_pCanvasView,TQT_SLOT(propertyChanged(const TQString &,const TQVariant &)));
KviTalPopupMenu * add = new KviTalPopupMenu(m_pMenuBar); KviTalPopupMenu * add = new KviTalPopupMenu(m_pMenuBar);
KviTalPopupMenu * shapes = new KviTalPopupMenu(add); KviTalPopupMenu * tqshapes = new KviTalPopupMenu(add);
KviTalPopupMenu * polygons = new KviTalPopupMenu(add); KviTalPopupMenu * polygons = new KviTalPopupMenu(add);
KviTalPopupMenu * items = new KviTalPopupMenu(add); KviTalPopupMenu * items = new KviTalPopupMenu(add);
shapes->insertItem(__tr2qs_ctx("&Line","dcc"),m_pCanvasView,TQT_SLOT(insertLine())); tqshapes->insertItem(__tr2qs_ctx("&Line","dcc"),m_pCanvasView,TQT_SLOT(insertLine()));
shapes->insertItem(__tr2qs_ctx("&Rectangle","dcc"),m_pCanvasView,TQT_SLOT(insertRectangle())); tqshapes->insertItem(__tr2qs_ctx("&Rectangle","dcc"),m_pCanvasView,TQT_SLOT(insertRectangle()));
shapes->insertItem(__tr2qs_ctx("&Ellipse","dcc"),m_pCanvasView,TQT_SLOT(insertEllipse())); tqshapes->insertItem(__tr2qs_ctx("&Ellipse","dcc"),m_pCanvasView,TQT_SLOT(insertEllipse()));
shapes->insertItem(__tr2qs_ctx("&Pie","dcc"),m_pCanvasView,TQT_SLOT(insertPie())); tqshapes->insertItem(__tr2qs_ctx("&Pie","dcc"),m_pCanvasView,TQT_SLOT(insertPie()));
shapes->insertItem(__tr2qs_ctx("&Chord","dcc"),m_pCanvasView,TQT_SLOT(insertChord())); tqshapes->insertItem(__tr2qs_ctx("&Chord","dcc"),m_pCanvasView,TQT_SLOT(insertChord()));
items->insertItem(__tr2qs_ctx("&Rich text (html)","dcc"),m_pCanvasView,TQT_SLOT(insertRichText())); items->insertItem(__tr2qs_ctx("&Rich text (html)","dcc"),m_pCanvasView,TQT_SLOT(insertRichText()));
@ -1525,7 +1525,7 @@ KviCanvasWidget::KviCanvasWidget(TQWidget * par)
polygons->insertItem(__tr2qs_ctx("&Pentagon","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonPentagon())); polygons->insertItem(__tr2qs_ctx("&Pentagon","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonPentagon()));
polygons->insertItem(__tr2qs_ctx("&Hexagon","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonHexagon())); polygons->insertItem(__tr2qs_ctx("&Hexagon","dcc"),m_pCanvasView,TQT_SLOT(insertPolygonHexagon()));
add->insertItem(__tr2qs_ctx("&Shape","dcc"),shapes); add->insertItem(__tr2qs_ctx("&Shape","dcc"),tqshapes);
add->insertItem(__tr2qs_ctx("&Item","dcc"),items); add->insertItem(__tr2qs_ctx("&Item","dcc"),items);
add->insertItem(__tr2qs_ctx("&Polygons","dcc"),polygons); add->insertItem(__tr2qs_ctx("&Polygons","dcc"),polygons);
@ -1540,9 +1540,9 @@ KviCanvasWidget::~KviCanvasWidget()
void KviCanvasWidget::resizeEvent(TQResizeEvent *) void KviCanvasWidget::resizeEvent(TQResizeEvent *)
{ {
int h = m_pMenuBar->sizeHint().height(); int h = m_pMenuBar->tqsizeHint().height();
m_pMenuBar->setGeometry(0,0,width(),h); m_pMenuBar->setGeometry(0,0,width(),h);
int h2 = m_pStatusLabel->sizeHint().height(); int h2 = m_pStatusLabel->tqsizeHint().height();
m_pStatusLabel->setGeometry(0,height() - h2,width(),h2); m_pStatusLabel->setGeometry(0,height() - h2,width(),h2);
m_pSplitter->setGeometry(0,h,width(),height() - (h + h2)); m_pSplitter->setGeometry(0,h,width(),height() - (h + h2));
} }

@ -221,7 +221,7 @@ void KviDccChat::connectionInProgress()
struct in_addr a; struct in_addr a;
if(kvi_stringIpToBinaryIp(ip.ptr(),&a))ip.setNum(htonl(a.s_addr)); if(kvi_stringIpToBinaryIp(ip.ptr(),&a))ip.setNum(htonl(a.s_addr));
TQString szReq = TQString("PRIVMSG %1 :%2DCC %3 chat %4 %5").arg(m_pDescriptor->szNick).arg((char)0x01).arg(m_pDescriptor->szType).arg(ip.ptr()).arg(port); TQString szReq = TQString("PRIVMSG %1 :%2DCC %3 chat %4 %5").tqarg(m_pDescriptor->szNick).tqarg((char)0x01).tqarg(m_pDescriptor->szType).tqarg(ip.ptr()).tqarg(port);
if(m_pDescriptor->isZeroPortRequest()) if(m_pDescriptor->isZeroPortRequest())
{ {
@ -268,13 +268,13 @@ const TQString & KviDccChat::target()
void KviDccChat::fillCaptionBuffers() void KviDccChat::fillCaptionBuffers()
{ {
TQString tmp = TQString("DCC %1 %2@%3:%4").arg( TQString tmp = TQString("DCC %1 %2@%3:%4").tqarg(
#ifdef COMPILE_SSL_SUPPORT #ifdef COMPILE_SSL_SUPPORT
m_pDescriptor->bIsSSL ? "SChat" : "Chat").arg( m_pDescriptor->bIsSSL ? "SChat" : "Chat").tqarg(
#else #else
"Chat").arg( "Chat").tqarg(
#endif #endif
m_pDescriptor->szNick).arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); m_pDescriptor->szNick).tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort);
m_szPlainTextCaption = tmp; m_szPlainTextCaption = tmp;
@ -473,16 +473,16 @@ bool KviDccChat::event(TQEvent *e)
void KviDccChat::resizeEvent(TQResizeEvent *e) void KviDccChat::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pInput->heightHint(); int hght = m_pInput->heightHint();
int hght2 = m_pTopSplitter->sizeHint().height(); int hght2 = m_pTopSplitter->tqsizeHint().height();
m_pTopSplitter->setGeometry(0,0,width(),hght2); m_pTopSplitter->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2)); m_pSplitter->setGeometry(0,hght2,width(),height() - (hght + hght2));
m_pInput->setGeometry(0,height() - hght,width(),hght); m_pInput->setGeometry(0,height() - hght,width(),hght);
} }
TQSize KviDccChat::sizeHint() const TQSize KviDccChat::tqsizeHint() const
{ {
TQSize ret(m_pIrcView->sizeHint().width(), TQSize ret(m_pIrcView->tqsizeHint().width(),
m_pIrcView->sizeHint().height() + m_pInput->heightHint()); m_pIrcView->tqsizeHint().height() + m_pInput->heightHint());
return ret; return ret;
} }

@ -81,7 +81,7 @@ protected:
virtual void getBaseLogFileName(KviStr &buffer); virtual void getBaseLogFileName(KviStr &buffer);
virtual TQPixmap * myIconPtr(); virtual TQPixmap * myIconPtr();
virtual void resizeEvent(TQResizeEvent *e); virtual void resizeEvent(TQResizeEvent *e);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual const TQString & localNick(); virtual const TQString & localNick();
virtual bool event(TQEvent *e); virtual bool event(TQEvent *e);
virtual void ownMessage(const TQString &text); virtual void ownMessage(const TQString &text);

@ -25,7 +25,7 @@
#include "kvi_iconmanager.h" #include "kvi_iconmanager.h"
#include "kvi_app.h" #include "kvi_app.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqstringlist.h> #include <tqstringlist.h>

@ -1543,8 +1543,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c)
[br] [br]
[big]DCC File Transfer[/big][br] [big]DCC File Transfer[/big][br]
DCC Send: Send a file, sender is passive, receiver is active (not good for firewalled senders)[br] DCC Send: Send a file, sender is passive, receiver is active (not good for firewalled senders)[br]
DCC Recv: Receive a file, sender is active, receiver is passive (not good for firewalled receivers)[br] DCC Recv: Receive a file, sender is active, receiver is passive (not good for firewalled tqreceivers)[br]
DCC RSend: Send a file, sender is active, receiver is passive (not good for firewalled receivers)[br] DCC RSend: Send a file, sender is active, receiver is passive (not good for firewalled tqreceivers)[br]
DCC Get: Receive a file, sender is passive if not firewalled, receiver active if sender not firewalled (will fail only if both are firewalled)[br] DCC Get: Receive a file, sender is passive if not firewalled, receiver active if sender not firewalled (will fail only if both are firewalled)[br]
The "turbo" extension disables the stream of acknowledges and is activated by prepending the 'T' character to the DCC subprotocol name[br] The "turbo" extension disables the stream of acknowledges and is activated by prepending the 'T' character to the DCC subprotocol name[br]
The "SSL" extension causes a Secure Socket Layer to be used and is activated by prepending the 'S' character to the DCC subprotocol name[br] The "SSL" extension causes a Secure Socket Layer to be used and is activated by prepending the 'S' character to the DCC subprotocol name[br]
@ -2369,16 +2369,16 @@ static bool dcc_kvs_fnc_ircContext(KviKvsModuleFunctionCall * c)
/* /*
@doc: dcc.transferStatus @doc: dcc.transfertqStatus
@type: @type:
function function
@title: @title:
$dcc.transferStatus $dcc.transfertqStatus
@short: @short:
Returns the current status of a dcc file transfer Returns the current status of a dcc file transfer
@syntax: @syntax:
<string> $dcc.transferStatus <string> $dcc.transfertqStatus
<string> $dcc.transferStatus(<dcc_id:uint>) <string> $dcc.transfertqStatus(<dcc_id:uint>)
@description: @description:
Returns the status in the specified DCC session.[br] Returns the status in the specified DCC session.[br]
The status is one of the strings "connecting", "transferring", "success" and "failure". The status is one of the strings "connecting", "transferring", "success" and "failure".
@ -2393,7 +2393,7 @@ static bool dcc_kvs_fnc_ircContext(KviKvsModuleFunctionCall * c)
See the [module:dcc]dcc module[/module] documentation for more informations.[br] See the [module:dcc]dcc module[/module] documentation for more informations.[br]
*/ */
static bool dcc_kvs_fnc_transferStatus(KviKvsModuleFunctionCall * c) static bool dcc_kvs_fnc_transfertqStatus(KviKvsModuleFunctionCall * c)
{ {
kvs_uint_t uDccId; kvs_uint_t uDccId;
KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETERS_BEGIN(c)
@ -2669,7 +2669,7 @@ static bool dcc_kvs_fnc_sessionList(KviKvsModuleFunctionCall * c)
[fnc]$dcc.sessionList[/fnc][br] [fnc]$dcc.sessionList[/fnc][br]
[fnc]$dcc.protocol[/fnc][br] [fnc]$dcc.protocol[/fnc][br]
[fnc]$dcc.connectionType[/fnc][br] [fnc]$dcc.connectionType[/fnc][br]
[fnc]$dcc.transferStatus[/fnc][br] [fnc]$dcc.transfertqStatus[/fnc][br]
[fnc]$dcc.isFileTransfer[/fnc][br] [fnc]$dcc.isFileTransfer[/fnc][br]
[fnc]$dcc.isFileUpload[/fnc][br] [fnc]$dcc.isFileUpload[/fnc][br]
[fnc]$dcc.isFileDownload[/fnc][br] [fnc]$dcc.isFileDownload[/fnc][br]
@ -2708,7 +2708,7 @@ static bool dcc_module_init(KviModule * m)
// FIXME: file upload / download state ? // FIXME: file upload / download state ?
KVSM_REGISTER_FUNCTION(m,"transferStatus",dcc_kvs_fnc_transferStatus); KVSM_REGISTER_FUNCTION(m,"transferStatus",dcc_kvs_fnc_transfertqStatus);
KVSM_REGISTER_FUNCTION(m,"protocol",dcc_kvs_fnc_protocol); KVSM_REGISTER_FUNCTION(m,"protocol",dcc_kvs_fnc_protocol);
KVSM_REGISTER_FUNCTION(m,"connectionType",dcc_kvs_fnc_connectionType); KVSM_REGISTER_FUNCTION(m,"connectionType",dcc_kvs_fnc_connectionType);
KVSM_REGISTER_FUNCTION(m,"isFileTransfer",dcc_kvs_fnc_isFileTransfer); KVSM_REGISTER_FUNCTION(m,"isFileTransfer",dcc_kvs_fnc_isFileTransfer);

@ -80,7 +80,7 @@ static void dcc_module_request_error(KviDccRequest * dcc,const TQString& errText
if(KVI_OPTION_BOOL(KviOption_boolNotifyFailedDccHandshakes)) if(KVI_OPTION_BOOL(KviOption_boolNotifyFailedDccHandshakes))
{ {
TQString szError = TQString("Sorry, your DCC %1 request can't be satisfied: %2").arg(dcc->szType.ptr()).arg(errText); TQString szError = TQString("Sorry, your DCC %1 request can't be satisfied: %2").tqarg(dcc->szType.ptr()).tqarg(errText);
dcc_module_reply_errmsg(dcc,szError); dcc_module_reply_errmsg(dcc,szError);
} }
} }

@ -67,7 +67,7 @@
#include <tqglobal.h> #include <tqglobal.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqspinbox.h> #include <tqspinbox.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#define INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS 3000 #define INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS 3000
@ -753,7 +753,7 @@ KviDccFileTransfer::KviDccFileTransfer(KviDccDescriptor * dcc)
m_tTransferEndTime = 0; m_tTransferEndTime = 0;
m_szStatusString = __tr2qs_ctx("Setting up the connection","dcc"); m_szStatusString = __tr2qs_ctx("Setting up the connection","dcc");
m_eGeneralStatus = Connecting; m_eGeneraltqStatus = Connecting;
bool bOk; bool bOk;
m_uTotalFileSize = dcc->bRecvFile ? dcc->szFileSize.toUInt(&bOk) : dcc->szLocalFileSize.toUInt(&bOk); m_uTotalFileSize = dcc->bRecvFile ? dcc->szFileSize.toUInt(&bOk) : dcc->szLocalFileSize.toUInt(&bOk);
@ -811,11 +811,11 @@ void KviDccFileTransfer::startConnection()
if(!(m_pDescriptor->bActive)) if(!(m_pDescriptor->bActive))
{ {
// PASSIVE CONNECTION // PASSIVE CONNECTION
m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").arg(m_szDccType.ptr()); m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").tqarg(m_szDccType.ptr());
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
} else { } else {
// ACTIVE CONNECTION // ACTIVE CONNECTION
m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").arg(m_szDccType.ptr()); m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").tqarg(m_szDccType.ptr());
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
} }
@ -841,7 +841,7 @@ void KviDccFileTransfer::startConnection()
m_pDescriptor->szPort.utf8().data(), m_pDescriptor->szPort.utf8().data(),
m_pDescriptor->szLocalFileSize.utf8().data(),0x01); m_pDescriptor->szLocalFileSize.utf8().data(),0x01);
} }
m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").arg(m_pDescriptor->szNick); m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").tqarg(m_pDescriptor->szNick);
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
// setup the resume timer: we don't want to wait forever // setup the resume timer: we don't want to wait forever
@ -919,7 +919,7 @@ void KviDccFileTransfer::abort()
else if(m_pSlaveSendThread)tmp.setNum(m_pSlaveSendThread->sentBytes()); else if(m_pSlaveSendThread)tmp.setNum(m_pSlaveSendThread->sentBytes());
else tmp = '0'; else tmp = '0';
m_eGeneralStatus = Failure; m_eGeneraltqStatus = Failure;
m_tTransferEndTime = kvi_unixTime(); m_tTransferEndTime = kvi_unixTime();
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc"); m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += __tr2qs_ctx("Aborted","dcc"); m_szStatusString += __tr2qs_ctx("Aborted","dcc");
@ -988,7 +988,7 @@ void KviDccFileTransfer::retryRevDCC()
void KviDccFileTransfer::fillStatusString(TQString &szBuffer) void KviDccFileTransfer::fillStatusString(TQString &szBuffer)
{ {
switch(m_eGeneralStatus) switch(m_eGeneraltqStatus)
{ {
case Connecting: case Connecting:
szBuffer = "connecting"; szBuffer = "connecting";
@ -1010,7 +1010,7 @@ void KviDccFileTransfer::fillStatusString(TQString &szBuffer)
bool KviDccFileTransfer::active() bool KviDccFileTransfer::active()
{ {
return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Transferring)); return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Transferring));
} }
int KviDccFileTransfer::bandwidthLimit() int KviDccFileTransfer::bandwidthLimit()
@ -1108,7 +1108,7 @@ void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int hei
{ {
TQString txt; TQString txt;
bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure)); bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure));
switch(column) switch(column)
{ {
@ -1117,7 +1117,7 @@ void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int hei
int xoffset = 0; int xoffset = 0;
int yoffset = 0; int yoffset = 0;
if(m_pDescriptor->bRecvFile)yoffset = 64; if(m_pDescriptor->bRecvFile)yoffset = 64;
switch(m_eGeneralStatus) switch(m_eGeneraltqStatus)
{ {
case Connecting: xoffset = 0; break; case Connecting: xoffset = 0; break;
case Transferring: xoffset = 48; break; case Transferring: xoffset = 48; break;
@ -1236,18 +1236,18 @@ void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int hei
if(iW2 > 0)p->fillRect(5 + iL2,5,iW2,10,bIsTerminated ? TQColor(150,130,110) : TQColor(220,170,100)); if(iW2 > 0)p->fillRect(5 + iL2,5,iW2,10,bIsTerminated ? TQColor(150,130,110) : TQColor(220,170,100));
p->fillRect(5,5,iL2,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100)); p->fillRect(5,5,iL2,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100));
txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviTQString::makeSizeReadable(iAckedBytes)).arg(KviTQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc2,0,'f',2); txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(iAckedBytes)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc2,0,'f',2);
} else { } else {
// we are receiving a file or not sending acks // we are receiving a file or not sending acks
double dPerc = (double)(((double)uTransferred) * 100.0) / (double)m_uTotalFileSize; double dPerc = (double)(((double)uTransferred) * 100.0) / (double)m_uTotalFileSize;
int iL = (int) ((((double)iW) * dPerc) / 100.0); int iL = (int) ((((double)iW) * dPerc) / 100.0);
p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100)); p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100));
txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviTQString::makeSizeReadable(uTransferred)).arg(KviTQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc,0,'f',2); txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc,0,'f',2);
} }
} else { } else {
txt = TQString(__tr2qs_ctx("%1","dcc")).arg(KviTQString::makeSizeReadable(uTransferred)); txt = TQString(__tr2qs_ctx("%1","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred));
} }
p->setPen(TQt::black); p->setPen(TQt::black);
@ -1343,7 +1343,7 @@ TQString KviDccFileTransfer::tipText()
TQString s; TQString s;
s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").arg(m_szDccType.ptr()).arg(id()); s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").tqarg(m_szDccType.ptr()).tqarg(id());
s += "<tr><td bgcolor=\"#404040\"><font color=\"#FFFFFF\">"; s += "<tr><td bgcolor=\"#404040\"><font color=\"#FFFFFF\">";
s += __tr2qs_ctx("Transfer Log","dcc"); s += __tr2qs_ctx("Transfer Log","dcc");
@ -1396,7 +1396,7 @@ KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(cons
if(t->localFileName() == szLocalFileName) if(t->localFileName() == szLocalFileName)
#endif #endif
{ {
if(t->m_eGeneralStatus != Failure) if(t->m_eGeneraltqStatus != Failure)
return t; return t;
} }
} }
@ -1456,7 +1456,7 @@ void KviDccFileTransfer::outputAndLog(int msgtype,const TQString &s)
void KviDccFileTransfer::addToTransferLog(const TQString &s) void KviDccFileTransfer::addToTransferLog(const TQString &s)
{ {
TQDateTime dt = TQDateTime::currentDateTime(); TQDateTime dt = TQDateTime::tqcurrentDateTime();
TQString ts; TQString ts;
ts.sprintf("[%4d.%2d.%2d %2d:%2d:%2d] ",dt.date().year(),dt.date().month(),dt.date().day(),dt.time().hour(),dt.time().minute(),dt.time().second()); ts.sprintf("[%4d.%2d.%2d %2d:%2d:%2d] ",dt.date().year(),dt.date().month(),dt.date().day(),dt.time().hour(),dt.time().minute(),dt.time().second());
m_szTransferLog += ts+s; m_szTransferLog += ts+s;
@ -1477,14 +1477,14 @@ void KviDccFileTransfer::connectionInProgress()
// if(TRIGGER_EVENT_5PARAM_RETVALUE(KviEvent_OnDCCSendConnected,this,m_pDescriptor->szPort.ptr(),m_pDescriptor->szFileName.ptr(),m_pDescriptor->szNick.ptr(),m_pDescriptor->szUser.ptr(),m_pDescriptor->szHost.ptr())); // if(TRIGGER_EVENT_5PARAM_RETVALUE(KviEvent_OnDCCSendConnected,this,m_pDescriptor->szPort.ptr(),m_pDescriptor->szFileName.ptr(),m_pDescriptor->szNick.ptr(),m_pDescriptor->szUser.ptr(),m_pDescriptor->szHost.ptr()));
// } // }
// //
m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort);
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
displayUpdate(); displayUpdate();
return; return;
} }
// PASSIVE CONNECTION // PASSIVE CONNECTION
m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort()); m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort());
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
if(m_pDescriptor->bSendRequest) if(m_pDescriptor->bSendRequest)
@ -1507,7 +1507,7 @@ void KviDccFileTransfer::connectionInProgress()
if(!tmp.isEmpty()) if(!tmp.isEmpty())
{ {
ip = tmp; ip = tmp;
outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").arg(ip)); outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").tqarg(ip));
} else { } else {
outputAndLog(__tr2qs_ctx("The local IP address is private, but unable to determine it from the IRC server","dcc")); outputAndLog(__tr2qs_ctx("The local IP address is private, but unable to determine it from the IRC server","dcc"));
} }
@ -1558,9 +1558,9 @@ void KviDccFileTransfer::connectionInProgress()
ip.utf8().data(),port.ptr(), ip.utf8().data(),port.ptr(),
&(m_pDescriptor->szLocalFileSize),0x01); &(m_pDescriptor->szLocalFileSize),0x01);
} }
outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").arg(szReq.ptr()).arg(m_pDescriptor->szNick)); outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").tqarg(szReq.ptr()).tqarg(m_pDescriptor->szNick));
} else { } else {
outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").arg(m_szDccType.ptr())); outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").tqarg(m_szDccType.ptr()));
} }
KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferConnectionInProgress,eventWindow(),m_pDescriptor->idString()); KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferConnectionInProgress,eventWindow(),m_pDescriptor->idString());
@ -1579,7 +1579,7 @@ void KviDccFileTransfer::startingSSLHandshake()
void KviDccFileTransfer::sslError(const char * msg) void KviDccFileTransfer::sslError(const char * msg)
{ {
#ifdef COMPILE_SSL_SUPPORT #ifdef COMPILE_SSL_SUPPORT
outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").arg(msg)); outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").tqarg(msg));
#endif #endif
} }
@ -1602,7 +1602,7 @@ bool KviDccFileTransfer::event(TQEvent *e)
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc"); m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += szErrorString; m_szStatusString += szErrorString;
m_eGeneralStatus = Failure; m_eGeneraltqStatus = Failure;
m_tTransferEndTime = kvi_unixTime(); m_tTransferEndTime = kvi_unixTime();
KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed, KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed,
@ -1642,7 +1642,7 @@ bool KviDccFileTransfer::event(TQEvent *e)
if(m_pDescriptor->bRecvFile)g_pApp->fileDownloadTerminated(true,m_pDescriptor->szFileName.utf8().data(),m_pDescriptor->szLocalFileName.utf8().data(),m_pDescriptor->szNick.utf8().data()); if(m_pDescriptor->bRecvFile)g_pApp->fileDownloadTerminated(true,m_pDescriptor->szFileName.utf8().data(),m_pDescriptor->szLocalFileName.utf8().data(),m_pDescriptor->szNick.utf8().data());
m_szStatusString = __tr2qs_ctx("Transfer completed","dcc"); m_szStatusString = __tr2qs_ctx("Transfer completed","dcc");
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
m_eGeneralStatus = Success; m_eGeneraltqStatus = Success;
m_tTransferEndTime = kvi_unixTime(); m_tTransferEndTime = kvi_unixTime();
KVS_TRIGGER_EVENT_2(KviEvent_OnDCCFileTransferSuccess, KVS_TRIGGER_EVENT_2(KviEvent_OnDCCFileTransferSuccess,
@ -1677,7 +1677,7 @@ bool KviDccFileTransfer::event(TQEvent *e)
void KviDccFileTransfer::handleMarshalError(int err) void KviDccFileTransfer::handleMarshalError(int err)
{ {
TQString szErr = KviError::getDescription(err); TQString szErr = KviError::getDescription(err);
m_eGeneralStatus = Failure; m_eGeneraltqStatus = Failure;
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc"); m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += szErr; m_szStatusString += szErr;
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
@ -1687,8 +1687,8 @@ void KviDccFileTransfer::handleMarshalError(int err)
void KviDccFileTransfer::connected() void KviDccFileTransfer::connected()
{ {
outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").arg(m_pMarshal->remoteIp()).arg(m_pMarshal->remotePort())); outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").tqarg(m_pMarshal->remoteIp()).tqarg(m_pMarshal->remotePort()));
outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort())); outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort()));
m_tTransferStartTime = kvi_unixTime(); m_tTransferStartTime = kvi_unixTime();
@ -1731,7 +1731,7 @@ void KviDccFileTransfer::connected()
m_pSlaveSendThread->start(); m_pSlaveSendThread->start();
} }
m_eGeneralStatus = Transferring; m_eGeneraltqStatus = Transferring;
m_szStatusString = __tr2qs_ctx("Transferring data","dcc"); m_szStatusString = __tr2qs_ctx("Transferring data","dcc");
KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferBegin,eventWindow(),m_pDescriptor->idString()); KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferBegin,eventWindow(),m_pDescriptor->idString());
@ -1758,7 +1758,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co
delete m_pResumeTimer; delete m_pResumeTimer;
m_pResumeTimer = 0; m_pResumeTimer = 0;
outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").arg(m_pDescriptor->szLocalFileSize)); outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").tqarg(m_pDescriptor->szLocalFileSize));
listenOrConnect(); listenOrConnect();
@ -1768,7 +1768,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co
if(ret != KviError_success)handleMarshalError(ret); if(ret != KviError_success)handleMarshalError(ret);
else { else {
m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort); m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort);
outputAndLog(m_szStatusString); outputAndLog(m_szStatusString);
displayUpdate(); displayUpdate();
} }
@ -1794,11 +1794,11 @@ bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsign
} }
if(iLocalFileSize <= filePos) if(iLocalFileSize <= filePos)
{ {
outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").arg(filePos)); outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").tqarg(filePos));
return false; return false;
} }
outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").arg(filePos)); outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").tqarg(filePos));
m_pDescriptor->szFileSize.setNum(filePos); m_pDescriptor->szFileSize.setNum(filePos);
@ -1830,7 +1830,7 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(TQWidget *
m_pTransfer = t; m_pTransfer = t;
int iVal = m_pTransfer->bandwidthLimit(); int iVal = m_pTransfer->bandwidthLimit();
TQString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").arg(t->id()); TQString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").tqarg(t->id());
setCaption(szText); setCaption(szText);
szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc"); szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc");

@ -173,7 +173,7 @@ class KviTalPopupMenu;
class KviDccFileTransfer : public KviFileTransfer, public KviDccMarshalOutputContext class KviDccFileTransfer : public KviFileTransfer, public KviDccMarshalOutputContext
{ {
enum GeneralStatus { Connecting , Transferring , Success , Failure }; enum GeneraltqStatus { Connecting , Transferring , Success , Failure };
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
@ -190,7 +190,7 @@ private:
TQString m_szTransferIdString; TQString m_szTransferIdString;
TQString m_szStatusString; TQString m_szStatusString;
GeneralStatus m_eGeneralStatus; GeneraltqStatus m_eGeneraltqStatus;
TQString m_szTransferLog; // html TQString m_szTransferLog; // html

@ -886,16 +886,16 @@ void KviDccVoice::updateInfo()
void KviDccVoice::resizeEvent(TQResizeEvent *e) void KviDccVoice::resizeEvent(TQResizeEvent *e)
{ {
int hght2 = m_pHBox->sizeHint().height(); int hght2 = m_pHBox->tqsizeHint().height();
m_pHBox->setGeometry(0,0,width(),hght2); m_pHBox->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - hght2); m_pSplitter->setGeometry(0,hght2,width(),height() - hght2);
} }
TQSize KviDccVoice::sizeHint() const TQSize KviDccVoice::tqsizeHint() const
{ {
int w = m_pIrcView->sizeHint().width(); int w = m_pIrcView->tqsizeHint().width();
int w2 = m_pHBox->sizeHint().width(); int w2 = m_pHBox->tqsizeHint().width();
TQSize ret(w > w2 ? w : w2, m_pIrcView->sizeHint().height() + m_pHBox->sizeHint().height()); TQSize ret(w > w2 ? w : w2, m_pIrcView->tqsizeHint().height() + m_pHBox->tqsizeHint().height());
return ret; return ret;
} }

@ -124,7 +124,7 @@ protected:
virtual void fillCaptionBuffers(); virtual void fillCaptionBuffers();
virtual TQPixmap * myIconPtr(); virtual TQPixmap * myIconPtr();
virtual void resizeEvent(TQResizeEvent *e); virtual void resizeEvent(TQResizeEvent *e);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual bool event(TQEvent *e); virtual bool event(TQEvent *e);
virtual void getBaseLogFileName(KviStr &buffer); virtual void getBaseLogFileName(KviStr &buffer);
void startTalking(); void startTalking();

@ -26,7 +26,7 @@
#include "libkvidialog.h" #include "libkvidialog.h"
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_hbox.h" #include "kvi_tal_hbox.h"
#include <tqlineedit.h> #include <tqlineedit.h>
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
@ -222,7 +222,7 @@ KviKvsCallbackTextInput::KviKvsCallbackTextInput(
{ {
TQLabel * il = new TQLabel(this); TQLabel * il = new TQLabel(this);
il->setPixmap(*pix); il->setPixmap(*pix);
il->setAlignment(TQt::AlignCenter); il->tqsetAlignment(TQt::AlignCenter);
g->addWidget(il,0,0); g->addWidget(il,0,0);
TQLabel * tl = new TQLabel(szLabel,this); TQLabel * tl = new TQLabel(szLabel,this);
g->addWidget(tl,0,1); g->addWidget(tl,0,1);

@ -308,7 +308,7 @@ static const char * idlemsgs[NIDLEMSGS]=
void KviDockWidget::enterEvent( TQEvent* ) void KviDockWidget::enterEvent( TQEvent* )
{ {
#ifdef COMPILE_KDE_SUPPORT #ifdef COMPILE_KDE_SUPPORT
if(!g_pApp->focusWidget()) if(!g_pApp->tqfocusWidget())
{ {
XEvent ev; XEvent ev;
kvi_memset(&ev, 0, sizeof(ev)); kvi_memset(&ev, 0, sizeof(ev));
@ -447,10 +447,10 @@ void KviDockWidget::fillContextPopup()
int id; int id;
if(pConsole->connection()->userInfo()->isAway()) if(pConsole->connection()->userInfo()->isAway())
{ {
id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").arg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int)));
bAllUnaway=0; bAllUnaway=0;
} else { } else {
id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").arg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int)));
bAllAway=0; bAllAway=0;
} }
m_pAwayPopup->setItemParameter(id,pConsole->ircContextId()); m_pAwayPopup->setItemParameter(id,pConsole->ircContextId());
@ -475,7 +475,7 @@ void KviDockWidget::fillContextPopup()
void KviDockWidget::toggleParentFrame() void KviDockWidget::toggleParentFrame()
{ {
TQWidget *top_widget = m_pFrm->topLevelWidget(); TQWidget *top_widget = m_pFrm->tqtopLevelWidget();
if(m_pFrm->isVisible()) { if(m_pFrm->isVisible()) {
m_pFrm->hide(); m_pFrm->hide();

@ -279,10 +279,10 @@ void KviDockWidget::fillContextPopup()
int id; int id;
if(pConsole->connection()->userInfo()->isAway()) if(pConsole->connection()->userInfo()->isAway())
{ {
id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").arg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Back on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int)));
bAllUnaway=0; bAllUnaway=0;
} else { } else {
id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").arg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int))); id=m_pAwayPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CONSOLE)),__tr2qs("Away on %1").tqarg(pConsole->currentNetworkName()),this,TQT_SLOT(doAway(int)));
bAllAway=0; bAllAway=0;
} }
m_pAwayPopup->setItemParameter(id,pConsole->ircContextId()); m_pAwayPopup->setItemParameter(id,pConsole->ircContextId());
@ -307,7 +307,7 @@ void KviDockWidget::fillContextPopup()
void KviDockWidget::toggleParentFrame() void KviDockWidget::toggleParentFrame()
{ {
TQWidget *top_widget = m_pFrm->topLevelWidget(); TQWidget *top_widget = m_pFrm->tqtopLevelWidget();
if(m_pFrm->isVisible()) { if(m_pFrm->isVisible()) {
m_pFrm->hide(); m_pFrm->hide();

@ -25,7 +25,7 @@
#include "scripteditor.h" #include "scripteditor.h"
#include <layout.h> #include <tqlayout.h>
#include <tqtoolbutton.h> #include <tqtoolbutton.h>
#include <kvi_tal_groupbox.h> #include <kvi_tal_groupbox.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
@ -55,7 +55,7 @@
#include "kvi_iconmanager.h" #include "kvi_iconmanager.h"
#include "kvi_kvs_kernel.h" #include "kvi_kvs_kernel.h"
#include <layout.h> #include <tqlayout.h>
extern KviPointerList<KviScriptEditorImplementation> * g_pScriptEditorWindowList; extern KviPointerList<KviScriptEditorImplementation> * g_pScriptEditorWindowList;
@ -107,11 +107,11 @@ void KviCompletionBox::updateContents(TQString buffer)
if(pos>0) if(pos>0)
{ {
szModule=buffer.left(pos); szModule=buffer.left(pos);
if(szModule[0].unicode()=='$') if(szModule[0].tqunicode()=='$')
szModule.remove(0,1); szModule.remove(0,1);
} }
if(pCur->unicode() == '$') if(pCur->tqunicode() == '$')
{ {
buffer.remove(0,1); buffer.remove(0,1);
if(!buffer.isEmpty()) if(!buffer.isEmpty())
@ -369,13 +369,13 @@ void KviScriptEditorWidget::keyPressEvent(TQKeyEvent * e)
TQString szPrev=text(para-1); TQString szPrev=text(para-1);
if(!szPrev.isEmpty()) if(!szPrev.isEmpty())
{ {
if(szPrev.at(szPrev.length() - 1).unicode() == ' ') if(szPrev.tqat(szPrev.length() - 1).tqunicode() == ' ')
szPrev.remove(szPrev.length() - 1,1); szPrev.remove(szPrev.length() - 1,1);
TQString szCur; TQString szCur;
const TQChar * pCur = (const TQChar *)szPrev.ucs2(); const TQChar * pCur = (const TQChar *)szPrev.ucs2();
if(pCur) if(pCur)
{ {
while(pCur->unicode() && pCur->isSpace()) while(pCur->tqunicode() && pCur->isSpace())
{ {
szCur.append(*pCur); szCur.append(*pCur);
pCur++; pCur++;
@ -557,9 +557,9 @@ void KviScriptEditorWidget::slotComplete(const TQString &str)
bool bIsFirstWordInLine; bool bIsFirstWordInLine;
getWordBeforeCursor(buffer,index,&bIsFirstWordInLine); getWordBeforeCursor(buffer,index,&bIsFirstWordInLine);
int len=buffer.length(); int len=buffer.length();
// if (buffer[1].unicode() == '$') len --; // if (buffer[1].tqunicode() == '$') len --;
complete.remove(0,len-1); complete.remove(0,len-1);
if (buffer[1].unicode() == '$') complete.append("("); if (buffer[1].tqunicode() == '$') complete.append("(");
else complete.append(" "); else complete.append(" ");
insert (complete); insert (complete);
completelistbox->hide(); completelistbox->hide();
@ -595,19 +595,19 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
const TQChar * pBegin; const TQChar * pBegin;
while(c->unicode()) while(c->tqunicode())
{ {
if(bInComment) if(bInComment)
{ {
pBegin = c; pBegin = c;
while(c->unicode() && (c->unicode() != '*'))c++; while(c->tqunicode() && (c->tqunicode() != '*'))c++;
if(!c->unicode()) if(!c->tqunicode())
{ {
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
return IN_COMMENT; return IN_COMMENT;
} }
c++; c++;
if(c->unicode() == '/') if(c->tqunicode() == '/')
{ {
// end of the comment! // end of the comment!
c++; c++;
@ -620,14 +620,14 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
if(c->isSpace()) if(c->isSpace())
{ {
while(c->unicode() && c->isSpace())c++; while(c->tqunicode() && c->isSpace())c++;
if(!c->unicode())continue; if(!c->tqunicode())continue;
} }
pBegin = c; pBegin = c;
// this does not break the bNewCommand flag // this does not break the bNewCommand flag
if((c->unicode() == '{') || (c->unicode() == '}')) if((c->tqunicode() == '{') || (c->tqunicode() == '}'))
{ {
c++; c++;
setFormat(pBegin - pBuf,1,g_fntNormal,g_clrBracket); setFormat(pBegin - pBuf,1,g_fntNormal,g_clrBracket);
@ -639,12 +639,12 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
{ {
bNewCommand = false; bNewCommand = false;
if(c->unicode() == '#') if(c->tqunicode() == '#')
{ {
if(c > pBuf) if(c > pBuf)
{ {
const TQChar * prev = c - 1; const TQChar * prev = c - 1;
if((prev->unicode() == ']') || (prev->unicode() == '}')) if((prev->tqunicode() == ']') || (prev->tqunicode() == '}'))
{ {
// array or hash count // array or hash count
c++; c++;
@ -653,19 +653,19 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
} }
} }
// comment until the end of the line // comment until the end of the line
while(c->unicode())c++; while(c->tqunicode())c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
continue; continue;
} }
if(c->unicode() == '/') if(c->tqunicode() == '/')
{ {
c++; c++;
if(c->unicode() == '/') if(c->tqunicode() == '/')
{ {
while(c->unicode())c++; while(c->tqunicode())c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
continue; continue;
} else if(c->unicode() == '*') } else if(c->tqunicode() == '*')
{ {
c++; c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
@ -674,13 +674,13 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
} }
c--; c--;
} }
if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_'))) if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_')))
{ {
c++; c++;
while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++; while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword);
// special processing for callbacks and magic commands // special processing for callbacks and magic commands
if(pBegin->unicode() == 'e') if(pBegin->tqunicode() == 'e')
{ {
if(c - pBegin == 4) if(c - pBegin == 4)
{ {
@ -691,7 +691,7 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
} }
} }
else else
if(pBegin->unicode() == 'f') if(pBegin->tqunicode() == 'f')
{ {
if(c - pBegin == 8) if(c - pBegin == 8)
{ {
@ -702,7 +702,7 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
} }
} }
if(pBegin->unicode() == 'i') if(pBegin->tqunicode() == 'i')
{ {
if(c - pBegin == 8) if(c - pBegin == 8)
{ {
@ -717,28 +717,28 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
continue; continue;
} }
} }
if(c->unicode() == '$') if(c->tqunicode() == '$')
{ {
c++; c++;
if(c->unicode() == '$') if(c->tqunicode() == '$')
{ {
c++; c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword);
} else { } else {
while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++; while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrFunction); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrFunction);
} }
continue; continue;
} }
if(c->unicode() == '-') if(c->tqunicode() == '-')
{ {
TQChar * pTmp =(TQChar *) c; TQChar * pTmp =(TQChar *) c;
c++; c++;
if(c->unicode() == '-') c++; if(c->tqunicode() == '-') c++;
if(c->isLetter()) if(c->isLetter())
{ {
while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_')))c++; while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword);
continue; continue;
} else { } else {
@ -746,35 +746,35 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
} }
} }
if(c->unicode() == '%') if(c->tqunicode() == '%')
{ {
c++; c++;
if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_'))) if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_')))
{ {
while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_')))c++; while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrVariable); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrVariable);
continue; continue;
} }
c--; c--;
} }
if(!c->unicode())continue; if(!c->tqunicode())continue;
if(c->isLetterOrNumber() || c->unicode() == '_') if(c->isLetterOrNumber() || c->tqunicode() == '_')
{ {
c++; c++;
while(c->unicode() && c->isLetterOrNumber() || (c->unicode() == '_'))c++; while(c->tqunicode() && c->isLetterOrNumber() || (c->tqunicode() == '_'))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText);
continue; continue;
} }
if(c->unicode() == '\\') if(c->tqunicode() == '\\')
{ {
c++; c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation);
// the next char is to be interpreted as normal text // the next char is to be interpreted as normal text
pBegin = c; pBegin = c;
if(c->unicode() && (c->unicode() != '\n')) if(c->tqunicode() && (c->tqunicode() != '\n'))
{ {
c++; c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText);
@ -785,13 +785,13 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
return IN_LINE; return IN_LINE;
} }
if(c->unicode() == '"') if(c->tqunicode() == '"')
{ {
bInString = !bInString; bInString = !bInString;
c++; c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation); setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation);
continue; continue;
} else if(c->unicode() == ';') } else if(c->tqunicode() == ';')
{ {
if(!bInString) bNewCommand = true; // the next will be a new command if(!bInString) bNewCommand = true; // the next will be a new command
} }
@ -1124,23 +1124,23 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co
emit initFind(); emit initFind();
setPaletteForegroundColor( TQColor( 0, 0, 0 ) ); setPaletteForegroundColor( TQColor( 0, 0, 0 ) );
setPaletteBackgroundColor( TQColor( 236, 233, 216 ) ); setPaletteBackgroundColor( TQColor( 236, 233, 216 ) );
TQGridLayout *layout = new TQGridLayout( this, 1, 1, 11, 6, "replace layout"); TQGridLayout *tqlayout = new TQGridLayout( this, 1, 1, 11, 6, "replace tqlayout");
m_pFindlineedit = new TQLineEdit( this, "findlineedit" ); m_pFindlineedit = new TQLineEdit( this, "findlineedit" );
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4
m_pFindlineedit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pFindlineedit->sizePolicy().hasHeightForWidth() ) ); m_pFindlineedit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_pFindlineedit->sizePolicy().hasHeightForWidth() ) );
m_pFindlineedit->setFrameShape( TQLineEdit::LineEditPanel ); m_pFindlineedit->setFrameShape( TQLineEdit::LineEditPanel );
m_pFindlineedit->setFrameShadow( TQLineEdit::Sunken ); m_pFindlineedit->setFrameShadow( TQLineEdit::Sunken );
#endif #endif
layout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 ); tqlayout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 );
m_pReplacelineedit = new TQLineEdit( this, "replacelineedit" ); m_pReplacelineedit = new TQLineEdit( this, "replacelineedit" );
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4
m_pReplacelineedit->setFrameShape( TQLineEdit::LineEditPanel ); m_pReplacelineedit->setFrameShape( TQLineEdit::LineEditPanel );
m_pReplacelineedit->setFrameShadow( TQLineEdit::Sunken ); m_pReplacelineedit->setFrameShadow( TQLineEdit::Sunken );
#endif #endif
layout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 ); tqlayout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 );
m_pFindlineedit->setFocus(); m_pFindlineedit->setFocus();
@ -1150,36 +1150,36 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co
findlabel->setAutoResize(true); findlabel->setAutoResize(true);
#endif #endif
layout->addWidget( findlabel, 2, 0 ); tqlayout->addWidget( findlabel, 2, 0 );
TQLabel *replacelabel = new TQLabel( this, "replacelabel" ); TQLabel *replacelabel = new TQLabel( this, "replacelabel" );
replacelabel->setText(tr("Replace with")); replacelabel->setText(tr("Replace with"));
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4
replacelabel->setAutoResize(true); replacelabel->setAutoResize(true);
#endif #endif
layout->addWidget( replacelabel, 3, 0 ); tqlayout->addWidget( replacelabel, 3, 0 );
TQPushButton *cancelbutton = new TQPushButton( this, "cancelButton" ); TQPushButton *cancelbutton = new TQPushButton( this, "cancelButton" );
cancelbutton->setText(tr("&Cancel")); cancelbutton->setText(tr("&Cancel"));
layout->addWidget( cancelbutton, 5, 2 ); tqlayout->addWidget( cancelbutton, 5, 2 );
replacebutton = new TQPushButton( this, "replacebutton" ); replacebutton = new TQPushButton( this, "replacebutton" );
replacebutton->setText(tr("&Replace")); replacebutton->setText(tr("&Replace"));
replacebutton->setEnabled( FALSE ); replacebutton->setEnabled( FALSE );
layout->addWidget( replacebutton, 5, 0 ); tqlayout->addWidget( replacebutton, 5, 0 );
checkReplaceAll = new KviStyledCheckBox( this, "replaceAll" ); checkReplaceAll = new KviStyledCheckBox( this, "replaceAll" );
checkReplaceAll->setText(tr("&Replace in all Aliases")); checkReplaceAll->setText(tr("&Replace in all Aliases"));
layout->addWidget( checkReplaceAll, 4, 0 ); tqlayout->addWidget( checkReplaceAll, 4, 0 );
findNext = new TQPushButton(this, "findNext(WIP)" ); findNext = new TQPushButton(this, "findNext(WIP)" );
findNext->setText(tr("&Findnext")); findNext->setText(tr("&Findnext"));
layout->addWidget( findNext, 2, 3 ); tqlayout->addWidget( findNext, 2, 3 );
findNext->setEnabled(false); findNext->setEnabled(false);
replace = new TQPushButton(this, "replace" ); replace = new TQPushButton(this, "replace" );
replace->setText(tr("&Replace(WIP)")); replace->setText(tr("&Replace(WIP)"));
layout->addWidget( replace, 3, 3 ); tqlayout->addWidget( replace, 3, 3 );
replace->setEnabled(false); replace->setEnabled(false);
#ifndef COMPILE_USE_QT4 #ifndef COMPILE_USE_QT4

@ -42,7 +42,7 @@
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <tqsplitter.h> #include <tqsplitter.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_vbox.h" #include "kvi_tal_vbox.h"
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <tqtooltip.h> #include <tqtooltip.h>
@ -476,7 +476,7 @@ TQPixmap * KviEventEditorWindow::myIconPtr()
void KviEventEditorWindow::resizeEvent(TQResizeEvent *e) void KviEventEditorWindow::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pBase->sizeHint().height(); int hght = m_pBase->tqsizeHint().height();
m_pEditor->setGeometry(0,0,width(),height()- hght); m_pEditor->setGeometry(0,0,width(),height()- hght);
m_pBase->setGeometry(0,height() - hght,width(),hght); m_pBase->setGeometry(0,height() - hght,width(),hght);
} }

@ -35,7 +35,7 @@
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include "kvi_file.h" #include "kvi_file.h"
#include <tqdir.h> #include <tqdir.h>
#include <textstream.h> #include <tqtextstream.h>
/* /*
@doc: file.copy @doc: file.copy
@ -873,7 +873,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c)
@switches: @switches:
!sw: -l | --local-8-bit !sw: -l | --local-8-bit
Causes the lines to be saved in local 8 bit character set instead Causes the lines to be saved in local 8 bit character set instead
of the default unicode encoding. of the default tqunicode encoding.
!sw: -a | --append !sw: -a | --append
If the file already exists, then the lines are appended to the end If the file already exists, then the lines are appended to the end
instead of overwriting the file. instead of overwriting the file.

@ -46,7 +46,7 @@
#endif #endif
#include <tqpainter.h> #include <tqpainter.h>
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <clipboard.h> #include <tqclipboard.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include <tqfile.h> #include <tqfile.h>
#include <tqlabel.h> #include <tqlabel.h>
@ -233,7 +233,7 @@ void KviFileTransferWindow::tipRequest(KviDynamicToolTip * tip,const TQPoint &pn
KviFileTransferItem * it = (KviFileTransferItem *)m_pListView->itemAt(pnt); KviFileTransferItem * it = (KviFileTransferItem *)m_pListView->itemAt(pnt);
if(!it)return; if(!it)return;
TQString txt = it->transfer()->tipText(); TQString txt = it->transfer()->tipText();
tip->tip(m_pListView->itemRect(it),txt); tip->tip(m_pListView->tqitemRect(it),txt);
} }
void KviFileTransferWindow::fillTransferView() void KviFileTransferWindow::fillTransferView()
@ -313,7 +313,7 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const TQPo
if(fi.exists()) if(fi.exists())
{ {
tmp += "<nobr>"; tmp += "<nobr>";
tmp += __tr2qs_ctx("Size: %1","filetransferwindow").arg(KviTQString::makeSizeReadable(fi.size())); tmp += __tr2qs_ctx("Size: %1","filetransferwindow").tqarg(KviTQString::makeSizeReadable(fi.size()));
tmp += "</nobr><br>"; tmp += "</nobr><br>";
} }
@ -580,12 +580,12 @@ void KviFileTransferWindow::copyLocalFileToClipboard()
TQString tmp = t->localFileName(); TQString tmp = t->localFileName();
if(tmp.isEmpty())return; if(tmp.isEmpty())return;
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQApplication::clipboard()->setText(tmp); TQApplication::tqclipboard()->setText(tmp);
#else #else
TQApplication::clipboard()->setSelectionMode(false); TQApplication::tqclipboard()->setSelectionMode(false);
TQApplication::clipboard()->setText(tmp); TQApplication::tqclipboard()->setText(tmp);
TQApplication::clipboard()->setSelectionMode(true); TQApplication::tqclipboard()->setSelectionMode(true);
TQApplication::clipboard()->setText(tmp); TQApplication::tqclipboard()->setText(tmp);
#endif #endif
} }
@ -701,9 +701,9 @@ void KviFileTransferWindow::resizeEvent(TQResizeEvent *e)
m_pInput->setGeometry(0,height() - h,width(),h); m_pInput->setGeometry(0,height() - h,width(),h);
} }
TQSize KviFileTransferWindow::sizeHint() const TQSize KviFileTransferWindow::tqsizeHint() const
{ {
return m_pSplitter->sizeHint(); return m_pSplitter->tqsizeHint();
} }
void KviFileTransferWindow::fillCaptionBuffers() void KviFileTransferWindow::fillCaptionBuffers()

@ -88,7 +88,7 @@ protected:
virtual void fontChange(const TQFont &oldFont); virtual void fontChange(const TQFont &oldFont);
bool eventFilter( TQObject *obj, TQEvent *ev ); bool eventFilter( TQObject *obj, TQEvent *ev );
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
int lineSpacing(){ return m_iLineSpacing; }; int lineSpacing(){ return m_iLineSpacing; };
protected slots: protected slots:
void transferRegistered(KviFileTransfer *t); void transferRegistered(KviFileTransfer *t);

@ -36,7 +36,7 @@
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include <tqtimer.h> #include <tqtimer.h>
#include <clipboard.h> #include <tqclipboard.h>
extern Index * g_pDocIndex; extern Index * g_pDocIndex;
extern KviPointerList<KviHelpWindow> * g_pHelpWindowList; extern KviPointerList<KviHelpWindow> * g_pHelpWindowList;
@ -108,7 +108,7 @@ void KviHelpWidget::showIndex()
void KviHelpWidget::resizeEvent(TQResizeEvent *e) void KviHelpWidget::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pToolBar->sizeHint().height(); int hght = m_pToolBar->tqsizeHint().height();
if(hght < 40)hght = 40; if(hght < 40)hght = 40;
m_pToolBar->setGeometry(0,0,width(),hght); m_pToolBar->setGeometry(0,0,width(),hght);
m_pTextBrowser->setGeometry(0,hght,width(),height() - hght); m_pTextBrowser->setGeometry(0,hght,width(),height() - hght);
@ -128,17 +128,17 @@ void KviHelpWidget::suicide()
delete this; delete this;
} }
TQSize KviHelpWidget::sizeHint() const TQSize KviHelpWidget::tqsizeHint() const
{ {
int wdth = m_pTextBrowser->sizeHint().width(); int wdth = m_pTextBrowser->tqsizeHint().width();
if(m_pToolBar->sizeHint().width() > wdth)wdth = m_pToolBar->sizeHint().width(); if(m_pToolBar->tqsizeHint().width() > wdth)wdth = m_pToolBar->tqsizeHint().width();
TQSize s(wdth,m_pTextBrowser->sizeHint().height() + m_pToolBar->sizeHint().height()); TQSize s(wdth,m_pTextBrowser->tqsizeHint().height() + m_pToolBar->tqsizeHint().height());
return s; return s;
} }
bool KviHelpWidget::eventFilter(TQObject * o, TQEvent *e) bool KviHelpWidget::eventFilter(TQObject * o, TQEvent *e)
{ {
TQClipboard *cb = TQApplication::clipboard(); TQClipboard *cb = TQApplication::tqclipboard();
if(e->type() == TQEvent::MouseButtonRelease) { if(e->type() == TQEvent::MouseButtonRelease) {
if(m_pTextBrowser->hasSelectedText()) { if(m_pTextBrowser->hasSelectedText()) {

@ -23,7 +23,7 @@
// //
#include "kvi_tal_hbox.h" #include "kvi_tal_hbox.h"
#include <textbrowser.h> #include <tqtextbrowser.h>
#include "index.h" #include "index.h"
#include <tqprogressbar.h> #include <tqprogressbar.h>
@ -54,7 +54,7 @@ protected slots:
void showIndex(); void showIndex();
void suicide(); void suicide();
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
TQTextBrowser * textBrowser() { return m_pTextBrowser; } TQTextBrowser * textBrowser() { return m_pTextBrowser; }
}; };

@ -303,9 +303,9 @@ void KviHelpWindow::resizeEvent(TQResizeEvent *e)
m_pSplitter->setGeometry(0,0,width(),height()); m_pSplitter->setGeometry(0,0,width(),height());
} }
TQSize KviHelpWindow::sizeHint() const TQSize KviHelpWindow::tqsizeHint() const
{ {
return m_pHelpWidget->sizeHint(); return m_pHelpWidget->tqsizeHint();
} }
void KviHelpWindow::fillCaptionBuffers() void KviHelpWindow::fillCaptionBuffers()
{ {

@ -62,7 +62,7 @@ protected:
virtual void saveProperties(KviConfig * cfg); virtual void saveProperties(KviConfig * cfg);
virtual void loadProperties(KviConfig * cfg); virtual void loadProperties(KviConfig * cfg);
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
TQTextBrowser * textBrowser(); TQTextBrowser * textBrowser();
public slots: public slots:
void indexSelected ( int ); void indexSelected ( int );

@ -5,7 +5,7 @@
#include <tqstringlist.h> #include <tqstringlist.h>
#include "kvi_pointerhashtable.h" #include "kvi_pointerhashtable.h"
#include <tqapplication.h> #include <tqapplication.h>
#include <textstream.h> #include <tqtextstream.h>
#include <ctype.h> #include <ctype.h>
@ -164,7 +164,7 @@ void Index::parseDocument( const TQString &filename, int docNum )
if (text.isNull()) if (text.isNull())
return; return;
bool valid = TRUE; bool valid = TRUE;
const TQChar *buf = text.unicode(); const TQChar *buf = text.tqunicode();
TQChar str[64]; TQChar str[64];
TQChar c = buf[0]; TQChar c = buf[0];
int j = 0; int j = 0;
@ -727,7 +727,7 @@ bool Index::searchForPattern( const TQStringList &patterns, const TQStringList &
bool valid = TRUE; bool valid = TRUE;
const TQChar *buf = text.unicode(); const TQChar *buf = text.tqunicode();
TQChar str[64]; TQChar str[64];

@ -67,7 +67,7 @@ KviHttpFileTransfer::KviHttpFileTransfer()
connect(m_pHttpRequest,TQT_SIGNAL(receivedResponse(const TQString &)),this,TQT_SLOT(receivedResponse(const TQString &))); connect(m_pHttpRequest,TQT_SIGNAL(receivedResponse(const TQString &)),this,TQT_SLOT(receivedResponse(const TQString &)));
connect(m_pHttpRequest,TQT_SIGNAL(connectionEstabilished()),this,TQT_SLOT(connectionEstabilished())); connect(m_pHttpRequest,TQT_SIGNAL(connectionEstabilished()),this,TQT_SLOT(connectionEstabilished()));
m_eGeneralStatus = Initializing; m_eGeneraltqStatus = Initializing;
m_szStatusString = __tr2qs_ctx("Initializing","http"); m_szStatusString = __tr2qs_ctx("Initializing","http");
} }
@ -110,20 +110,20 @@ void KviHttpFileTransfer::fillContextPopup(KviTalPopupMenu * m,int column)
bool KviHttpFileTransfer::active() bool KviHttpFileTransfer::active()
{ {
return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Downloading)); return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Downloading));
} }
void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int height) void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int height)
{ {
TQString txt; TQString txt;
bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure)); bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure));
switch(column) switch(column)
{ {
case COLUMN_TRANSFERTYPE: case COLUMN_TRANSFERTYPE:
{ {
int offset = 0; int offset = 0;
switch(m_eGeneralStatus) switch(m_eGeneraltqStatus)
{ {
case Initializing: offset = 0; break; case Initializing: offset = 0; break;
case Connecting: offset = 0; break; case Connecting: offset = 0; break;
@ -211,8 +211,8 @@ void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int he
//iR = iW - iL; //iR = iW - iL;
p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100)); p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100));
txt = TQString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).arg(KviTQString::makeSizeReadable(uRecvd)) txt = TQString(__tr2qs_ctx("%1 of %2 (%3 %)","http")).tqarg(KviTQString::makeSizeReadable(uRecvd))
.arg(KviTQString::makeSizeReadable(uTotal)).arg(dPerc,0,'f',2); .tqarg(KviTQString::makeSizeReadable(uTotal)).tqarg(dPerc,0,'f',2);
} else { } else {
txt = KviTQString::makeSizeReadable(m_pHttpRequest->receivedSize()); txt = KviTQString::makeSizeReadable(m_pHttpRequest->receivedSize());
} }
@ -265,17 +265,17 @@ void KviHttpFileTransfer::displayPaint(TQPainter * p,int column,int width,int he
{ {
KviTimeUtils::secondsToDaysHoursMinsSecs(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),&uD,&uH,&uM,&uS); KviTimeUtils::secondsToDaysHoursMinsSecs(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),&uD,&uH,&uM,&uS);
txt = "TOT: "; txt = "TOT: ";
if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).tqarg(uD).tqarg(uH).tqarg(uM).tqarg(uS);
else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).tqarg(uH).tqarg(uM).tqarg(uS);
else txt += TQString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); else txt += TQString(__tr2qs_ctx("%3m %4s","http")).tqarg(uM).tqarg(uS);
} else { } else {
if(iEta >= 0) if(iEta >= 0)
{ {
KviTimeUtils::secondsToDaysHoursMinsSecs(iEta,&uD,&uH,&uM,&uS); KviTimeUtils::secondsToDaysHoursMinsSecs(iEta,&uD,&uH,&uM,&uS);
txt = "ETA: "; txt = "ETA: ";
if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).arg(uD).arg(uH).arg(uM).arg(uS); if(uD > 0)txt += TQString(__tr2qs_ctx("%1d %2h %3m %4s","http")).tqarg(uD).tqarg(uH).tqarg(uM).tqarg(uS);
else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).arg(uH).arg(uM).arg(uS); else if(uH > 0)txt += TQString(__tr2qs_ctx("%2h %3m %4s","http")).tqarg(uH).tqarg(uM).tqarg(uS);
else txt += TQString(__tr2qs_ctx("%3m %4s","http")).arg(uM).arg(uS); else txt += TQString(__tr2qs_ctx("%3m %4s","http")).tqarg(uM).tqarg(uS);
} else { } else {
txt = "ETA: Unknown"; txt = "ETA: Unknown";
} }
@ -301,7 +301,7 @@ int KviHttpFileTransfer::displayHeight(int iLineSpacing)
TQString KviHttpFileTransfer::tipText() TQString KviHttpFileTransfer::tipText()
{ {
TQString s; TQString s;
s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>HTTP Transfer (ID %1)</b></font></td></tr>").arg(id()); s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>HTTP Transfer (ID %1)</b></font></td></tr>").tqarg(id());
if(m_lRequest.count() > 0) if(m_lRequest.count() > 0)
{ {
@ -390,13 +390,13 @@ void KviHttpFileTransfer::connectionEstabilished()
void KviHttpFileTransfer::resolvingHost(const TQString &hostname) void KviHttpFileTransfer::resolvingHost(const TQString &hostname)
{ {
m_szStatusString = __tr2qs_ctx("Resolving host %1","http").arg(hostname); m_szStatusString = __tr2qs_ctx("Resolving host %1","http").tqarg(hostname);
displayUpdate(); displayUpdate();
} }
void KviHttpFileTransfer::contactingHost(const TQString &ipandport) void KviHttpFileTransfer::contactingHost(const TQString &ipandport)
{ {
m_szStatusString = __tr2qs_ctx("Contacting host %1","http").arg(ipandport); m_szStatusString = __tr2qs_ctx("Contacting host %1","http").tqarg(ipandport);
displayUpdate(); displayUpdate();
} }
@ -404,9 +404,9 @@ void KviHttpFileTransfer::receivedResponse(const TQString &response)
{ {
m_lHeaders.clear(); m_lHeaders.clear();
m_lHeaders.append(response); m_lHeaders.append(response);
m_szStatusString = __tr2qs_ctx("Transferring data (%1)","http").arg(response); m_szStatusString = __tr2qs_ctx("Transferring data (%1)","http").tqarg(response);
m_tTransferStartTime = kvi_unixTime(); m_tTransferStartTime = kvi_unixTime();
m_eGeneralStatus = Downloading; m_eGeneraltqStatus = Downloading;
displayUpdate(); displayUpdate();
} }
@ -439,7 +439,7 @@ void KviHttpFileTransfer::transferTerminated(bool bSuccess)
if(bSuccess) if(bSuccess)
{ {
m_szStatusString = __tr2qs_ctx("Transfer completed","http"); m_szStatusString = __tr2qs_ctx("Transfer completed","http");
m_eGeneralStatus = Success; m_eGeneraltqStatus = Success;
displayUpdate(); displayUpdate();
if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICSUCCESS,__tr2qs_ctx("[HTTP %d]: Transfer completed","http"),id()); if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICSUCCESS,__tr2qs_ctx("[HTTP %d]: Transfer completed","http"),id());
g_pApp->fileDownloadTerminated(true,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),TQString(),!m_bNotifyCompletion); g_pApp->fileDownloadTerminated(true,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),TQString(),!m_bNotifyCompletion);
@ -447,7 +447,7 @@ void KviHttpFileTransfer::transferTerminated(bool bSuccess)
m_szStatusString = __tr2qs_ctx("Transfer failed","http"); m_szStatusString = __tr2qs_ctx("Transfer failed","http");
m_szStatusString += ": "; m_szStatusString += ": ";
m_szStatusString += m_pHttpRequest->lastError(); m_szStatusString += m_pHttpRequest->lastError();
m_eGeneralStatus = Failure; m_eGeneraltqStatus = Failure;
displayUpdate(); displayUpdate();
if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICERROR,__tr2qs_ctx("[HTTP %d]: Transfer failed: %Q","http"),id(),&(m_pHttpRequest->lastError())); if(out && (!m_bNoOutput))out->output(KVI_OUT_GENERICERROR,__tr2qs_ctx("[HTTP %d]: Transfer failed: %Q","http"),id(),&(m_pHttpRequest->lastError()));
g_pApp->fileDownloadTerminated(false,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),m_pHttpRequest->lastError(),!m_bNotifyCompletion); g_pApp->fileDownloadTerminated(false,m_pHttpRequest->url().url().ptr(),m_pHttpRequest->fileName(),TQString(),m_pHttpRequest->lastError(),!m_bNotifyCompletion);
@ -482,7 +482,7 @@ void KviHttpFileTransfer::headersReceived(KviPointerHashTable<const char *,KviSt
bool KviHttpFileTransfer::startDownload() bool KviHttpFileTransfer::startDownload()
{ {
m_eGeneralStatus = Connecting; m_eGeneraltqStatus = Connecting;
return m_pHttpRequest->start(); return m_pHttpRequest->start();
} }

@ -38,7 +38,7 @@ class KviTalPopupMenu;
class KviHttpFileTransfer : public KviFileTransfer class KviHttpFileTransfer : public KviFileTransfer
{ {
enum GeneralStatus { Initializing, Connecting, Downloading, Success, Failure }; enum GeneraltqStatus { Initializing, Connecting, Downloading, Success, Failure };
Q_OBJECT Q_OBJECT
TQ_OBJECT TQ_OBJECT
public: public:
@ -46,7 +46,7 @@ public:
~KviHttpFileTransfer(); ~KviHttpFileTransfer();
private: private:
KviHttpRequest * m_pHttpRequest; KviHttpRequest * m_pHttpRequest;
GeneralStatus m_eGeneralStatus; GeneraltqStatus m_eGeneraltqStatus;
TQString m_szStatusString; TQString m_szStatusString;
TQStringList m_lHeaders; TQStringList m_lHeaders;

@ -199,7 +199,7 @@ void KviIOGraphDisplay::drawContents(TQPainter * p)
} }
} }
TQSize KviIOGraphDisplay::sizeHint() const TQSize KviIOGraphDisplay::tqsizeHint() const
{ {
return TQSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT); return TQSize(KVI_IRCTOOLBARAPPLET_MAXIMUM_WIDTH,KVI_IRCTOOLBARAPPLET_MAXIMUM_HEIGHT);
} }

@ -47,7 +47,7 @@ protected:
bool m_bShowRecvGraph; bool m_bShowRecvGraph;
protected: protected:
virtual void drawContents(TQPainter *p); virtual void drawContents(TQPainter *p);
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual void timerEvent(TQTimerEvent *e); virtual void timerEvent(TQTimerEvent *e);
}; };

@ -136,15 +136,15 @@ TQPixmap * KviLinksWindow::myIconPtr()
void KviLinksWindow::resizeEvent(TQResizeEvent *e) void KviLinksWindow::resizeEvent(TQResizeEvent *e)
{ {
int hght2 = m_pTopSplitter->sizeHint().height(); int hght2 = m_pTopSplitter->tqsizeHint().height();
m_pTopSplitter->setGeometry(0,0,width(),hght2); m_pTopSplitter->setGeometry(0,0,width(),hght2);
m_pSplitter->setGeometry(0,hght2,width(),height() - hght2); m_pSplitter->setGeometry(0,hght2,width(),height() - hght2);
} }
TQSize KviLinksWindow::sizeHint() const TQSize KviLinksWindow::tqsizeHint() const
{ {
TQSize ret(m_pSplitter->sizeHint().width(), TQSize ret(m_pSplitter->tqsizeHint().width(),
m_pSplitter->sizeHint().height() + m_pTopSplitter->sizeHint().height()); m_pSplitter->tqsizeHint().height() + m_pTopSplitter->tqsizeHint().height());
return ret; return ret;
} }
@ -301,7 +301,7 @@ void KviLinksWindow::endOfLinks()
while(!m_pLinkList->isEmpty())m_pLinkList->removeFirst(); while(!m_pLinkList->isEmpty())m_pLinkList->removeFirst();
m_pListView->setUpdatesEnabled(true); m_pListView->setUpdatesEnabled(true);
m_pListView->repaint(); m_pListView->tqrepaint();
} }
KviTalListViewItem * KviLinksWindow::insertLink(KviLink *l) KviTalListViewItem * KviLinksWindow::insertLink(KviLink *l)

@ -79,7 +79,7 @@ protected slots:
void requestLinks(); void requestLinks();
void connectionStateChange(); void connectionStateChange();
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
private: private:
void reset(); void reset();
void endOfLinks(); void endOfLinks();

@ -140,12 +140,12 @@ void KviChannelListViewItem::paintCell(TQPainter * p,const TQColorGroup &cg,int
if ( isEnabled() || !lv ) if ( isEnabled() || !lv )
p->setPen( cg.highlightedText() ); p->setPen( cg.highlightedText() );
else if ( !isEnabled() && lv) else if ( !isEnabled() && lv)
p->setPen( lv->palette().disabled().highlightedText() ); p->setPen( lv->tqpalette().disabled().highlightedText() );
} else { } else {
if ( isEnabled() || !lv ) if ( isEnabled() || !lv )
p->setPen( cg.text() ); p->setPen( cg.text() );
else if ( !isEnabled() && lv) else if ( !isEnabled() && lv)
p->setPen( lv->palette().disabled().text() ); p->setPen( lv->tqpalette().disabled().text() );
} }
KviTopicWidget::paintColoredText(p,szText,cg,height(),width); KviTopicWidget::paintColoredText(p,szText,cg,height(),width);
@ -301,14 +301,14 @@ TQPixmap * KviListWindow::myIconPtr()
void KviListWindow::resizeEvent(TQResizeEvent *e) void KviListWindow::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pTopSplitter->sizeHint().height(); int hght = m_pTopSplitter->tqsizeHint().height();
m_pTopSplitter->setGeometry(0,0,width(),hght); m_pTopSplitter->setGeometry(0,0,width(),hght);
m_pSplitter->setGeometry(0,hght,width(),height() - hght); m_pSplitter->setGeometry(0,hght,width(),height() - hght);
} }
TQSize KviListWindow::sizeHint() const TQSize KviListWindow::tqsizeHint() const
{ {
return m_pSplitter->sizeHint(); return m_pSplitter->tqsizeHint();
} }
void KviListWindow::fillCaptionBuffers() void KviListWindow::fillCaptionBuffers()
@ -346,7 +346,7 @@ void KviListWindow::exportList()
TQString szFile; TQString szFile;
if(connection()) if(connection())
{ {
TQString szDate = TQDateTime::currentDateTime().toString("d MMM yyyy hh-mm"); TQString szDate = TQDateTime::tqcurrentDateTime().toString("d MMM yyyy hh-mm");
KviTQString::sprintf(szFile,__tr2qs("Channel list for %Q - %Q"), KviTQString::sprintf(szFile,__tr2qs("Channel list for %Q - %Q"),
&(connection()->networkName()),&(szDate)); &(connection()->networkName()),&(szDate));
} else { } else {

@ -113,7 +113,7 @@ protected slots:
void exportList(); void exportList();
void importList(); void importList();
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
private: private:
void reset(); void reset();
void endOfList(); void endOfList();

@ -47,7 +47,7 @@
#include <tqdir.h> #include <tqdir.h>
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <tqcursor.h> #include <tqcursor.h>
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
@ -55,7 +55,7 @@
#ifdef COMPILE_ZLIB_SUPPORT #ifdef COMPILE_ZLIB_SUPPORT
#include <zlib.h> #include <zlib.h>
#endif #endif
#include <textcodec.h> #include <tqtextcodec.h>
#include "kvi_styled_controls.h" #include "kvi_styled_controls.h"
#include <tqdatetimeedit.h> #include <tqdatetimeedit.h>
#include <tqlineedit.h> #include <tqlineedit.h>
@ -90,67 +90,67 @@ KviLogViewMDIWindow::KviLogViewMDIWindow(KviModuleExtensionDescriptor * d,KviFra
m_pSearchTab = new TQWidget(m_pTabWidget); m_pSearchTab = new TQWidget(m_pTabWidget);
m_pTabWidget->insertTab(m_pSearchTab,__tr2qs_ctx("Filter","logview")); m_pTabWidget->insertTab(m_pSearchTab,__tr2qs_ctx("Filter","logview"));
TQGridLayout *layout = new TQGridLayout(m_pSearchTab,10,2,3,5); TQGridLayout *tqlayout = new TQGridLayout(m_pSearchTab,10,2,3,5);
m_pShowChannelsCheck = new KviStyledCheckBox(__tr2qs_ctx("Show channel logs","logview"),m_pSearchTab); m_pShowChannelsCheck = new KviStyledCheckBox(__tr2qs_ctx("Show channel logs","logview"),m_pSearchTab);
m_pShowChannelsCheck->setChecked(true); m_pShowChannelsCheck->setChecked(true);
layout->addMultiCellWidget(m_pShowChannelsCheck,0,0,0,1); tqlayout->addMultiCellWidget(m_pShowChannelsCheck,0,0,0,1);
m_pShowQueryesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show query logs","logview"),m_pSearchTab); m_pShowQueryesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show query logs","logview"),m_pSearchTab);
m_pShowQueryesCheck->setChecked(true); m_pShowQueryesCheck->setChecked(true);
layout->addMultiCellWidget(m_pShowQueryesCheck,1,1,0,1); tqlayout->addMultiCellWidget(m_pShowQueryesCheck,1,1,0,1);
m_pShowConsolesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show console logs","logview"),m_pSearchTab); m_pShowConsolesCheck = new KviStyledCheckBox(__tr2qs_ctx("Show console logs","logview"),m_pSearchTab);
m_pShowConsolesCheck->setChecked(true); m_pShowConsolesCheck->setChecked(true);
layout->addMultiCellWidget(m_pShowConsolesCheck,2,2,0,1); tqlayout->addMultiCellWidget(m_pShowConsolesCheck,2,2,0,1);
m_pShowDccChatCheck = new KviStyledCheckBox(__tr2qs_ctx("Show DCC chat logs","logview"),m_pSearchTab); m_pShowDccChatCheck = new KviStyledCheckBox(__tr2qs_ctx("Show DCC chat logs","logview"),m_pSearchTab);
m_pShowDccChatCheck->setChecked(true); m_pShowDccChatCheck->setChecked(true);
layout->addMultiCellWidget(m_pShowDccChatCheck,3,3,0,1); tqlayout->addMultiCellWidget(m_pShowDccChatCheck,3,3,0,1);
m_pShowOtherCheck = new KviStyledCheckBox(__tr2qs_ctx("Show other logs","logview"),m_pSearchTab); m_pShowOtherCheck = new KviStyledCheckBox(__tr2qs_ctx("Show other logs","logview"),m_pSearchTab);
m_pShowOtherCheck->setChecked(true); m_pShowOtherCheck->setChecked(true);
layout->addMultiCellWidget(m_pShowOtherCheck,4,4,0,1); tqlayout->addMultiCellWidget(m_pShowOtherCheck,4,4,0,1);
TQLabel *l; TQLabel *l;
l = new TQLabel(__tr2qs_ctx("Contents filter","logview"),m_pSearchTab); l = new TQLabel(__tr2qs_ctx("Contents filter","logview"),m_pSearchTab);
layout->addMultiCellWidget(l,5,5,0,1); tqlayout->addMultiCellWidget(l,5,5,0,1);
l = new TQLabel(__tr2qs_ctx("Log name mask:","logview"),m_pSearchTab); l = new TQLabel(__tr2qs_ctx("Log name mask:","logview"),m_pSearchTab);
m_pFileNameMask = new TQLineEdit(m_pSearchTab); m_pFileNameMask = new TQLineEdit(m_pSearchTab);
connect(m_pFileNameMask,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(applyFilter())); connect(m_pFileNameMask,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(applyFilter()));
layout->addWidget(l,6,0); tqlayout->addWidget(l,6,0);
layout->addWidget(m_pFileNameMask,6,1); tqlayout->addWidget(m_pFileNameMask,6,1);
l = new TQLabel(__tr2qs_ctx("Log contents mask:","logview"),m_pSearchTab); l = new TQLabel(__tr2qs_ctx("Log contents mask:","logview"),m_pSearchTab);
m_pContentsMask = new TQLineEdit(m_pSearchTab); m_pContentsMask = new TQLineEdit(m_pSearchTab);
connect(m_pContentsMask,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(applyFilter())); connect(m_pContentsMask,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(applyFilter()));
layout->addWidget(l,7,0); tqlayout->addWidget(l,7,0);
layout->addWidget(m_pContentsMask,7,1); tqlayout->addWidget(m_pContentsMask,7,1);
m_pEnableFromFilter = new KviStyledCheckBox(__tr2qs_ctx("Only older than","logview"),m_pSearchTab); m_pEnableFromFilter = new KviStyledCheckBox(__tr2qs_ctx("Only older than","logview"),m_pSearchTab);
m_pFromDateEdit = new TQDateEdit(m_pSearchTab); m_pFromDateEdit = new TQDateEdit(m_pSearchTab);
m_pFromDateEdit->setDate(TQDate::currentDate()); m_pFromDateEdit->setDate(TQDate::tqcurrentDate());
layout->addWidget(m_pEnableFromFilter,8,0); tqlayout->addWidget(m_pEnableFromFilter,8,0);
layout->addWidget(m_pFromDateEdit,8,1); tqlayout->addWidget(m_pFromDateEdit,8,1);
connect(m_pEnableFromFilter,TQT_SIGNAL(toggled(bool)),m_pFromDateEdit,TQT_SLOT(setEnabled(bool))); connect(m_pEnableFromFilter,TQT_SIGNAL(toggled(bool)),m_pFromDateEdit,TQT_SLOT(setEnabled(bool)));
m_pFromDateEdit->setEnabled(false); m_pFromDateEdit->setEnabled(false);
m_pEnableToFilter = new KviStyledCheckBox(__tr2qs_ctx("Only newier than","logview"),m_pSearchTab); m_pEnableToFilter = new KviStyledCheckBox(__tr2qs_ctx("Only newier than","logview"),m_pSearchTab);
m_pToDateEdit = new TQDateEdit(m_pSearchTab); m_pToDateEdit = new TQDateEdit(m_pSearchTab);
m_pToDateEdit->setDate(TQDate::currentDate()); m_pToDateEdit->setDate(TQDate::tqcurrentDate());
layout->addWidget(m_pEnableToFilter,9,0); tqlayout->addWidget(m_pEnableToFilter,9,0);
layout->addWidget(m_pToDateEdit,9,1); tqlayout->addWidget(m_pToDateEdit,9,1);
connect(m_pEnableToFilter,TQT_SIGNAL(toggled(bool)),m_pToDateEdit,TQT_SLOT(setEnabled(bool))); connect(m_pEnableToFilter,TQT_SIGNAL(toggled(bool)),m_pToDateEdit,TQT_SLOT(setEnabled(bool)));
m_pToDateEdit->setEnabled(false); m_pToDateEdit->setEnabled(false);
TQPushButton *pb = new TQPushButton(__tr2qs_ctx("Apply filter","logview"),m_pSearchTab); TQPushButton *pb = new TQPushButton(__tr2qs_ctx("Apply filter","logview"),m_pSearchTab);
connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyFilter())); connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(applyFilter()));
layout->addWidget(pb,10,1); tqlayout->addWidget(pb,10,1);
TQWidget *w = new TQWidget(m_pSearchTab); TQWidget *w = new TQWidget(m_pSearchTab);
w->setSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored); w->tqsetSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored);
layout->addWidget(w,11,1); tqlayout->addWidget(w,11,1);
m_pIrcView = new KviIrcView(m_pSplitter,g_pFrame,this); m_pIrcView = new KviIrcView(m_pSplitter,g_pFrame,this);
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
@ -202,11 +202,11 @@ void KviLogViewMDIWindow::fillCaptionBuffers()
{ {
m_szPlainTextCaption = __tr2qs_ctx("Log Viewer","logview"); m_szPlainTextCaption = __tr2qs_ctx("Log Viewer","logview");
m_szHtmlActiveCaption = TQString("<nobr><font color=\"%1\"><b>").arg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii()); m_szHtmlActiveCaption = TQString("<nobr><font color=\"%1\"><b>").tqarg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextActive).name()).ascii());
m_szHtmlActiveCaption.append(m_szPlainTextCaption); m_szHtmlActiveCaption.append(m_szPlainTextCaption);
m_szHtmlActiveCaption.append("</b></font></nobr>"); m_szHtmlActiveCaption.append("</b></font></nobr>");
m_szHtmlInactiveCaption = TQString("<nobr><font color=\"%1\"><b>").arg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii()); m_szHtmlInactiveCaption = TQString("<nobr><font color=\"%1\"><b>").tqarg(TQString(KVI_OPTION_COLOR(KviOption_colorCaptionTextInactive).name()).ascii());
m_szHtmlInactiveCaption.append(m_szPlainTextCaption); m_szHtmlInactiveCaption.append(m_szPlainTextCaption);
m_szHtmlInactiveCaption.append("</b></font></nobr>"); m_szHtmlInactiveCaption.append("</b></font></nobr>");
} }
@ -216,9 +216,9 @@ void KviLogViewMDIWindow::die()
close(); close();
} }
TQSize KviLogViewMDIWindow::sizeHint() const TQSize KviLogViewMDIWindow::tqsizeHint() const
{ {
TQSize ret(m_pSplitter->sizeHint().width(),m_pIrcView->sizeHint().height()); TQSize ret(m_pSplitter->tqsizeHint().width(),m_pIrcView->tqsizeHint().height());
return ret; return ret;
} }
@ -361,7 +361,7 @@ void KviLogViewMDIWindow::itemSelected(KviTalListViewItem * it)
else else
outputNoFmt(0,*it,KviIrcView::NoRepaint | KviIrcView::NoTimestamp); outputNoFmt(0,*it,KviIrcView::NoRepaint | KviIrcView::NoTimestamp);
} }
m_pIrcView->repaint(false); m_pIrcView->tqrepaint(false);
} }
TQStringList KviLogViewMDIWindow::getFileNames() TQStringList KviLogViewMDIWindow::getFileNames()

@ -114,7 +114,7 @@ protected:
virtual void resizeEvent(TQResizeEvent *e); virtual void resizeEvent(TQResizeEvent *e);
virtual void fillCaptionBuffers(); virtual void fillCaptionBuffers();
virtual void die(); virtual void die();
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
protected slots: protected slots:
void rightButtonClicked ( KviTalListViewItem *, const TQPoint &, int ); void rightButtonClicked ( KviTalListViewItem *, const TQPoint &, int );
void itemSelected(KviTalListViewItem * it); void itemSelected(KviTalListViewItem * it);

@ -23,7 +23,7 @@
#include "logviewwidget.h" #include "logviewwidget.h"
#include <tqsplitter.h> #include <tqsplitter.h>
#include <layout.h> #include <tqlayout.h>
#include <tqdir.h> #include <tqdir.h>
//#include "kvi_debug.h" //#include "kvi_debug.h"
@ -35,7 +35,7 @@
#ifdef COMPILE_ZLIB_SUPPORT #ifdef COMPILE_ZLIB_SUPPORT
#include <zlib.h> #include <zlib.h>
#endif #endif
#include <textcodec.h> #include <tqtextcodec.h>
const TQPixmap * KviLogListViewItemType::pixmap(int col) const const TQPixmap * KviLogListViewItemType::pixmap(int col) const
{ {

@ -1401,7 +1401,7 @@ MP_KVS_FUNCTION(localFile)
MP_KVS_FAIL_ON_NO_INTERFACE MP_KVS_FAIL_ON_NO_INTERFACE
TQString szRet = g_pMPInterface->mrl(); TQString szRet = g_pMPInterface->mrl();
if(szRet.isEmpty())return true; if(szRet.isEmpty())return true;
if(szRet.startsWith("file://",false)) if(szRet.tqstartsWith("file://",false))
{ {
szRet.remove(0,7); szRet.remove(0,7);
c->returnValue()->setString(szRet); c->returnValue()->setString(szRet);
@ -1453,7 +1453,7 @@ MP_KVS_FUNCTION(status)
KVSM_PARAMETERS_END(c) KVSM_PARAMETERS_END(c)
MP_KVS_FAIL_ON_NO_INTERFACE MP_KVS_FAIL_ON_NO_INTERFACE
KviMediaPlayerInterface::PlayerStatus eStat = g_pMPInterface->status(); KviMediaPlayerInterface::PlayertqStatus eStat = g_pMPInterface->status();
switch(eStat) switch(eStat)
{ {
case KviMediaPlayerInterface::Stopped: case KviMediaPlayerInterface::Stopped:

@ -143,7 +143,7 @@ bool KviAmarokInterface::setShuffle(bool &bVal)
return voidRetBoolDCOPCall("player","enableRandomMode(bool)",bVal); return voidRetBoolDCOPCall("player","enableRandomMode(bool)",bVal);
} }
KviMediaPlayerInterface::PlayerStatus KviAmarokInterface::status() KviMediaPlayerInterface::PlayertqStatus KviAmarokInterface::status()
{ {
int ret; int ret;
if(!intRetVoidDCOPCall("player","status()",ret))return KviMediaPlayerInterface::Unknown; if(!intRetVoidDCOPCall("player","status()",ret))return KviMediaPlayerInterface::Unknown;

@ -62,7 +62,7 @@
//virtual int bitRate(); unsupported //virtual int bitRate(); unsupported
virtual int sampleRate(); virtual int sampleRate();
virtual bool playMrl(const TQString &mrl); virtual bool playMrl(const TQString &mrl);
virtual KviMediaPlayerInterface::PlayerStatus status(); virtual KviMediaPlayerInterface::PlayertqStatus status();
virtual bool getRepeat(); virtual bool getRepeat();
virtual bool getShuffle(); virtual bool getShuffle();
virtual bool setRepeat(bool &bVal); virtual bool setRepeat(bool &bVal);

@ -3,7 +3,7 @@
#ifdef COMPILE_ON_WINDOWS #ifdef COMPILE_ON_WINDOWS
#include <textcodec.h> #include <tqtextcodec.h>
#include "kvi_locale.h" #include "kvi_locale.h"
#include "kvi_module.h" #include "kvi_module.h"
@ -189,7 +189,7 @@ int KviAmipInterface::channels()
return ret; return ret;
} }
KviMediaPlayerInterface::PlayerStatus KviAmipInterface::status() KviMediaPlayerInterface::PlayertqStatus KviAmipInterface::status()
{ {
int ret = eval_int("var_stat"); int ret = eval_int("var_stat");
switch(ret) switch(ret)

@ -48,7 +48,7 @@
virtual bool setShuffle(bool &bVal); virtual bool setShuffle(bool &bVal);
virtual bool amipExec(const TQString &cmd); virtual bool amipExec(const TQString &cmd);
virtual TQString amipEval(const TQString &cmd); virtual TQString amipEval(const TQString &cmd);
virtual KviMediaPlayerInterface::PlayerStatus status(); virtual KviMediaPlayerInterface::PlayertqStatus status();
}; };
MP_DECLARE_DESCRIPTOR(KviAmipInterface) MP_DECLARE_DESCRIPTOR(KviAmipInterface)

@ -26,7 +26,7 @@
#include "mp_mp3.h" #include "mp_mp3.h"
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"
#include <textcodec.h> #include <tqtextcodec.h>
static TQTextCodec * mediaplayer_get_codec() static TQTextCodec * mediaplayer_get_codec()
{ {
@ -82,7 +82,7 @@ TQString KviMediaPlayerInterface::getLocalFile()
{ {
TQString ret = mrl(); TQString ret = mrl();
if(ret.isEmpty())return ret; if(ret.isEmpty())return ret;
if(ret.startsWith("file://",false)) if(ret.tqstartsWith("file://",false))
{ {
ret.remove(0,7); ret.remove(0,7);
return ret; return ret;
@ -183,7 +183,7 @@ bool KviMediaPlayerInterface::jumpTo(int &iPos)
return false; return false;
} }
KviMediaPlayerInterface::PlayerStatus KviMediaPlayerInterface::status() KviMediaPlayerInterface::PlayertqStatus KviMediaPlayerInterface::status()
{ {
notImplemented(); notImplemented();
return KviMediaPlayerInterface::Unknown; return KviMediaPlayerInterface::Unknown;
@ -265,12 +265,12 @@ bool KviMediaPlayerInterface::setShuffle(bool &bVal)
TQString KviMediaPlayerInterface::mediaType() TQString KviMediaPlayerInterface::mediaType()
{ {
TQString ret = mrl(); TQString ret = mrl();
if(ret.endsWith(".mp3",false))ret = "MPEG Layer 3"; if(ret.tqendsWith(".mp3",false))ret = "MPEG Layer 3";
else if(ret.endsWith(".ogg",false))ret = "OGG Vorbis"; else if(ret.tqendsWith(".ogg",false))ret = "OGG Vorbis";
else if(ret.endsWith(".avi",false))ret = "Audio Video Interleave"; else if(ret.tqendsWith(".avi",false))ret = "Audio Video Interleave";
else if(ret.endsWith(".mpeg",false))ret = "MPEG Video"; else if(ret.tqendsWith(".mpeg",false))ret = "MPEG Video";
else if(ret.endsWith(".mpg",false))ret = "MPEG Video"; else if(ret.tqendsWith(".mpg",false))ret = "MPEG Video";
else if(ret.startsWith("http://",false))ret = "HTTP Audio Stream"; else if(ret.tqstartsWith("http://",false))ret = "HTTP Audio Stream";
else ret = TQString(); else ret = TQString();
return ret; return ret;
} }

@ -108,8 +108,8 @@ public:
// return false only on communication failure // return false only on communication failure
virtual bool quit(); virtual bool quit();
// return the current player status // return the current player status
enum PlayerStatus { Unknown, Stopped, Playing, Paused }; enum PlayertqStatus { Unknown, Stopped, Playing, Paused };
virtual KviMediaPlayerInterface::PlayerStatus status(); virtual KviMediaPlayerInterface::PlayertqStatus status();
// current position in the media (msecs) // current position in the media (msecs)
// 0 if the player isn't playing anything and -1 if unknown // 0 if the player isn't playing anything and -1 if unknown
virtual int position(); virtual int position();

@ -140,7 +140,7 @@ int KviJukInterface::position()
return ret * 1000; return ret * 1000;
} }
KviMediaPlayerInterface::PlayerStatus KviJukInterface::status() KviMediaPlayerInterface::PlayertqStatus KviJukInterface::status()
{ {
int ret; int ret;
if(!intRetVoidDCOPCall("player","status()",ret))return KviMediaPlayerInterface::Unknown; if(!intRetVoidDCOPCall("player","status()",ret))return KviMediaPlayerInterface::Unknown;

@ -67,7 +67,7 @@
virtual bool setShuffle(bool &bVal); virtual bool setShuffle(bool &bVal);
virtual bool playMrl(const TQString &mrl); virtual bool playMrl(const TQString &mrl);
virtual KviMediaPlayerInterface::PlayerStatus status(); virtual KviMediaPlayerInterface::PlayertqStatus status();
}; };
MP_DECLARE_DESCRIPTOR(KviJukInterface) MP_DECLARE_DESCRIPTOR(KviJukInterface)

@ -41,7 +41,7 @@
#include "kvi_options.h" #include "kvi_options.h"
#include <tqfileinfo.h> #include <tqfileinfo.h>
#include <textcodec.h> #include <tqtextcodec.h>
#define MAXGENRE 147 #define MAXGENRE 147
#define GENREROWS 50 #define GENREROWS 50

@ -27,7 +27,7 @@
#ifdef COMPILE_ON_WINDOWS #ifdef COMPILE_ON_WINDOWS
#include <textcodec.h> #include <tqtextcodec.h>
#include "kvi_locale.h" #include "kvi_locale.h"
#include "kvi_module.h" #include "kvi_module.h"
@ -280,7 +280,7 @@ int KviWinampInterface::channels()
return ret; return ret;
} }
KviMediaPlayerInterface::PlayerStatus KviWinampInterface::status() KviMediaPlayerInterface::PlayertqStatus KviWinampInterface::status()
{ {
HWND hWinamp = find_winamp(this); HWND hWinamp = find_winamp(this);
int ret = 1000; int ret = 1000;

@ -66,7 +66,7 @@
virtual bool getShuffle(); virtual bool getShuffle();
virtual bool setRepeat(bool &bVal); virtual bool setRepeat(bool &bVal);
virtual bool setShuffle(bool &bVal); virtual bool setShuffle(bool &bVal);
virtual KviMediaPlayerInterface::PlayerStatus status(); virtual KviMediaPlayerInterface::PlayertqStatus status();
}; };
MP_DECLARE_DESCRIPTOR(KviWinampInterface) MP_DECLARE_DESCRIPTOR(KviWinampInterface)

@ -256,7 +256,7 @@ bool KviXmmsInterface::setShuffle(bool &bVal)
return true; return true;
} }
KviMediaPlayerInterface::PlayerStatus KviXmmsInterface::status() KviMediaPlayerInterface::PlayertqStatus KviXmmsInterface::status()
{ {
bool (*sym1)(int) = (bool (*)(int))lookupSymbol("xmms_remote_is_paused"); bool (*sym1)(int) = (bool (*)(int))lookupSymbol("xmms_remote_is_paused");
if(sym1) if(sym1)

@ -52,7 +52,7 @@
virtual bool jumpTo(kvs_int_t &iPos); virtual bool jumpTo(kvs_int_t &iPos);
virtual bool setVol(kvs_int_t &iVol); virtual bool setVol(kvs_int_t &iVol);
virtual int getVol(); virtual int getVol();
virtual KviMediaPlayerInterface::PlayerStatus status(); virtual KviMediaPlayerInterface::PlayertqStatus status();
virtual TQString nowPlaying(); virtual TQString nowPlaying();
virtual bool playMrl(const TQString &mrl); virtual bool playMrl(const TQString &mrl);
virtual TQString mrl(); virtual TQString mrl();

@ -243,7 +243,7 @@ void KviRemoteMircServerImportWizard::getListTerminated(bool bSuccess)
if(bSuccess) if(bSuccess)
{ {
m_pOutput->setText(__tr2qs("File downloaded: processing ...")); m_pOutput->setText(__tr2qs("File downloaded: processing ..."));
m_pOutput->repaint(); m_pOutput->tqrepaint();
#ifndef COMPILE_ON_WINDOWS #ifndef COMPILE_ON_WINDOWS
g_pApp->syncX(); g_pApp->syncX();
#endif //!COMPILE_ON_WINDOWS #endif //!COMPILE_ON_WINDOWS
@ -252,7 +252,7 @@ void KviRemoteMircServerImportWizard::getListTerminated(bool bSuccess)
TQString tmp; TQString tmp;
if(iCount > 0) if(iCount > 0)
tmp = __tr2qs("%1 servers imported succesfully").arg(iCount); tmp = __tr2qs("%1 servers imported succesfully").tqarg(iCount);
else else
tmp = __tr2qs("No servers imported"); tmp = __tr2qs("No servers imported");
m_pOutput->setText(tmp); m_pOutput->setText(tmp);

@ -72,12 +72,12 @@ bool Idle::usingPlatform() const
void Idle::start() void Idle::start()
{ {
d->startTime = TQDateTime::currentDateTime(); d->startTime = TQDateTime::tqcurrentDateTime();
if(!platform) { if(!platform) {
// generic idle // generic idle
d->lastMousePos = TQCursor::pos(); d->lastMousePos = TQCursor::pos();
d->idleSince = TQDateTime::currentDateTime(); d->idleSince = TQDateTime::tqcurrentDateTime();
} }
// poll every second (use a lower value if you need more accuracy) // poll every second (use a lower value if you need more accuracy)
@ -96,7 +96,7 @@ int Idle::secondsIdle()
i = platform->secondsIdle(); i = platform->secondsIdle();
else { else {
TQPoint curMousePos = TQCursor::pos(); TQPoint curMousePos = TQCursor::pos();
TQDateTime curDateTime = TQDateTime::currentDateTime(); TQDateTime curDateTime = TQDateTime::tqcurrentDateTime();
if(d->lastMousePos != curMousePos) { if(d->lastMousePos != curMousePos) {
d->lastMousePos = curMousePos; d->lastMousePos = curMousePos;
d->idleSince = curDateTime; d->idleSince = curDateTime;
@ -105,7 +105,7 @@ int Idle::secondsIdle()
} }
// set 'beginIdle' to the beginning of the idle time (by backtracking 'i' seconds from now) // set 'beginIdle' to the beginning of the idle time (by backtracking 'i' seconds from now)
TQDateTime beginIdle = TQDateTime::currentDateTime().addSecs(-i); TQDateTime beginIdle = TQDateTime::tqcurrentDateTime().addSecs(-i);
// set 't' to hold the number of seconds between 'beginIdle' and 'startTime' // set 't' to hold the number of seconds between 'beginIdle' and 'startTime'
int t = beginIdle.secsTo(d->startTime); int t = beginIdle.secsTo(d->startTime);
@ -121,7 +121,7 @@ int Idle::secondsIdle()
} }
// how long have we been idle? // how long have we been idle?
int idleTime = d->startTime.secsTo(TQDateTime::currentDateTime()); int idleTime = d->startTime.secsTo(TQDateTime::tqcurrentDateTime());
return idleTime; return idleTime;
} }

@ -24,8 +24,8 @@
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
// Why does Apple have to make this so complicated? // Why does Apple have to make this so complicated?
static OSStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) { static OStqStatus LoadFrameworkBundle(CFStringRef framework, CFBundleRef *bundlePtr) {
OSStatus err; OStqStatus err;
FSRef frameworksFolderRef; FSRef frameworksFolderRef;
CFURLRef baseURL; CFURLRef baseURL;
CFURLRef bundleURL; CFURLRef bundleURL;
@ -117,7 +117,7 @@ IdlePlatform::~IdlePlatform() {
// Typedef for the function we're getting back from CFBundleGetFunctionPointerForName. // Typedef for the function we're getting back from CFBundleGetFunctionPointerForName.
typedef OSStatus (*InstallEventLoopIdleTimerPtr)(EventLoopRef inEventLoop, typedef OStqStatus (*InstallEventLoopIdleTimerPtr)(EventLoopRef inEventLoop,
EventTimerInterval inFireDelay, EventTimerInterval inFireDelay,
EventTimerInterval inInterval, EventTimerInterval inInterval,
EventLoopIdleTimerUPP inTimerProc, EventLoopIdleTimerUPP inTimerProc,

@ -727,7 +727,7 @@ void KviNotifierWindow::redrawText()
if(m_pLineEdit->isVisible())y -= (m_pLineEdit->height() + 4); if(m_pLineEdit->isVisible())y -= (m_pLineEdit->height() + 4);
TQColorGroup grp = colorGroup(); TQColorGroup grp = tqcolorGroup();
int idx = iIdx; int idx = iIdx;
KviNotifierMessage * m = cur; KviNotifierMessage * m = cur;
@ -1191,7 +1191,7 @@ void KviNotifierWindow::redrawWindow()
} }
inline void KviNotifierWindow::setCursor(int cur) { inline void KviNotifierWindow::setCursor(int cur) {
if (m_cursor.shape() != cur) { if (m_cursor.tqshape() != cur) {
if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor(); if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor();
m_cursor.setShape((Qt::CursorShape)cur); m_cursor.setShape((Qt::CursorShape)cur);
TQApplication::setOverrideCursor(m_cursor); TQApplication::setOverrideCursor(m_cursor);

@ -77,7 +77,7 @@ protected:
TQPixmap m_pixBackgroundHighlighted; TQPixmap m_pixBackgroundHighlighted;
TQPixmap m_pixForeground; // we paint the stuff HERE TQPixmap m_pixForeground; // we paint the stuff HERE
// Notifier graphic layout // Notifier graphic tqlayout
TQPixmap m_pixBckgrnd; TQPixmap m_pixBckgrnd;
TQImage m_imgBuffer; // here we merge the two images TQImage m_imgBuffer; // here we merge the two images

@ -26,7 +26,7 @@
#include "kvi_iconmanager.h" #include "kvi_iconmanager.h"
#include <brush.h> #include <tqbrush.h>
#include <tqcolor.h> #include <tqcolor.h>
#include <tqpainter.h> #include <tqpainter.h>

@ -32,7 +32,7 @@
#include <tqevent.h> #include <tqevent.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <brush.h> #include <tqbrush.h>
#include <tqcolor.h> #include <tqcolor.h>
#include <tqfontmetrics.h> #include <tqfontmetrics.h>

@ -48,8 +48,8 @@
@description: @description:
This widget organizes buttons in a group. This widget organizes buttons in a group.
It will be usually a parent for other child controls. It will be usually a parent for other child controls.
You can either use a child layout to manage the children geometries You can either use a child tqlayout to manage the tqchildren geometries
or use $setColumnLayout function to manage the layout automatically. or use $setColumnLayout function to manage the tqlayout automatically.
The class ineriths groupbox. The class ineriths groupbox.
@functions: @functions:

@ -34,7 +34,7 @@
#include <tqdockwindow.h> #include <tqdockwindow.h>
#define TQT_DOCK_WINDOW TQDockWindow #define TQT_DOCK_WINDOW TQDockWindow
#endif #endif
#include <layout.h> #include <tqlayout.h>
/* /*
@doc: dockwindow @doc: dockwindow
@ -49,11 +49,11 @@
[class]widget[/class] [class]widget[/class]
@description: @description:
A window dockable to the KVIrc main frame borders (like a toolbar). A window dockable to the KVIrc main frame borders (like a toolbar).
The window has an implicit layout that will automatically manage The window has an implicit tqlayout that will automatically manage
the children depending on the dock window's orientation. the tqchildren depending on the dock window's orientation.
@functions: @functions:
!fn: $addWidget(<widget:hobject>) !fn: $addWidget(<widget:hobject>)
Adds <widget> to the internal layout of this dock window.[br] Adds <widget> to the internal tqlayout of this dock window.[br]
The widget must be a child of this dock window (otherwise strange things may happen). The widget must be a child of this dock window (otherwise strange things may happen).
!fn: <string> $orientation() !fn: <string> $orientation()
Returns the string "vertical" or "horizontal" depending on the orientation of this dock window. Returns the string "vertical" or "horizontal" depending on the orientation of this dock window.

@ -25,7 +25,7 @@
#include <tqfile.h> #include <tqfile.h>
#include <textstream.h> #include <tqtextstream.h>
#include "kvi_string.h" #include "kvi_string.h"

@ -29,7 +29,7 @@
#include "kvi_locale.h" #include "kvi_locale.h"
#include "kvi_iconmanager.h" #include "kvi_iconmanager.h"
// Tables used in $setAlignment , $alignment and in $setOrientation & $orientation // Tables used in $tqsetAlignment , $tqalignment and in $setOrientation & $orientation
const char * const align_tbl[] = { const char * const align_tbl[] = {
"Left", "Left",
@ -60,8 +60,8 @@ const int align_cod[] = {
@description: @description:
This widget can be used to display a groupbox. This widget can be used to display a groupbox.
It will be usually a parent for other child controls. It will be usually a parent for other child controls.
You can either use a child layout to manage the children geometries You can either use a child tqlayout to manage the tqchildren geometries
or use $setColumnLayout to manage the layout automatically. or use $setColumnLayout to manage the tqlayout automatically.
@functions: @functions:
!fn: $setTitle(<text:String>) !fn: $setTitle(<text:String>)
Sets the group box title to <text>. Sets the group box title to <text>.
@ -89,14 +89,14 @@ const int align_cod[] = {
Returns the number of columns or rows in the groupbox. Returns the number of columns or rows in the groupbox.
!fn: $addSpace() !fn: $addSpace()
Adds an empty cell at the next free position. Adds an empty cell at the next free position.
!fn: <string> $alignment() !fn: <string> $tqalignment()
Returns the alignment of the group box title. Returns the tqalignment of the group box title.
!fn: $setAlignment(<alignment:string>) !fn: $tqsetAlignment(<tqalignment:string>)
Set the alignment of the groupbox; Valid values are Left,Right,HCenter. Set the tqalignment of the groupbox; Valid values are Left,Right,HCenter.
!fn: $setOrientation<orientation:string> !fn: $setOrientation<orientation:string>
Sets the group box's orientation. Valid values are:Qt::Horizontal,Qt::Vertical. Sets the group box's orientation. Valid values are:Qt::Horizontal,Qt::Vertical.
!fn: $setColumnLayout(<columns:integer>,<orientation:string>) !fn: $setColumnLayout(<columns:integer>,<orientation:string>)
Enables the automatic layout management. The children are arranged in n columns with the specified orientation.[br] Enables the automatic tqlayout management. The tqchildren are arranged in n columns with the specified orientation.[br]
Valid values for <orientation> are:Qt::Horizontal,Qt::Vertical. Valid values for <orientation> are:Qt::Horizontal,Qt::Vertical.
@examples: @examples:
[example] [example]
@ -108,7 +108,7 @@ const int align_cod[] = {
#then the groupbox [br] #then the groupbox [br]
%gb=$new(groupbox,%widget)[br] %gb=$new(groupbox,%widget)[br]
%gb->$setTitle(Login)[br] %gb->$setTitle(Login)[br]
%gb->$setAlignment("Left")[br] %gb->$tqsetAlignment("Left")[br]
[br] [br]
#now we create the labels and lineedits.[br] #now we create the labels and lineedits.[br]
%labeluser=$new(label,%gb)[br] %labeluser=$new(label,%gb)[br]
@ -120,16 +120,16 @@ const int align_cod[] = {
%inputpass->$setechomode("password")[br] %inputpass->$setechomode("password")[br]
[br] [br]
#now lets' layouting the groupbox's element's.[br] #now lets' layouting the groupbox's element's.[br]
%layoutgb=$new(layout,%gb)[br] %layoutgb=$new(tqlayout,%gb)[br]
%layoutgb->$setmargin(20)[br] %layoutgb->$setmargin(20)[br]
%layoutgb->$addwidget(%labeluser,0,0)[br] %layoutgb->$addwidget(%labeluser,0,0)[br]
%layoutgb->$addwidget(%labelpass,1,0)[br] %layoutgb->$addwidget(%labelpass,1,0)[br]
%layoutgb->$addwidget(%inputuser,0,1)[br] %layoutgb->$addwidget(%inputuser,0,1)[br]
%layoutgb->$addwidget(%inputpass,1,1)[br] %layoutgb->$addwidget(%inputpass,1,1)[br]
[br] [br]
# now we create a fake widget and managing the two buttons layout.[br] # now we create a fake widget and managing the two buttons tqlayout.[br]
%fakewidget=$new(widget,%widget)[br] %fakewidget=$new(widget,%widget)[br]
%layoutbtn=$new(layout,%fakewidget)[br] %layoutbtn=$new(tqlayout,%fakewidget)[br]
%btnok=$new(button,%fakewidget)[br] %btnok=$new(button,%fakewidget)[br]
%btnok->$settext("OK")[br] %btnok->$settext("OK")[br]
%btncancel=$new(button,%fakewidget)[br] %btncancel=$new(button,%fakewidget)[br]
@ -137,13 +137,13 @@ const int align_cod[] = {
%layoutbtn->$addwidget(%btnok,0,0)[br] %layoutbtn->$addwidget(%btnok,0,0)[br]
%layoutbtn->$addwidget(%btncancel,0,1)[br] %layoutbtn->$addwidget(%btncancel,0,1)[br]
[br] [br]
#And finally we create a main layout with the groupbox (and its "children")[br] #And finally we create a main tqlayout with the groupbox (and its "tqchildren")[br]
#and fakewiget (with its buttons children). #and fakewiget (with its buttons tqchildren).
%mainlayout=$new(layout,%widget)[br] %maintqlayout=$new(tqlayout,%widget)[br]
%mainlayout->$setspacing(10)[br] %maintqlayout->$setspacing(10)[br]
%mainlayout->$setmargin(10)[br] %maintqlayout->$setmargin(10)[br]
%mainlayout->$addwidget(%gb,0,0)[br] %maintqlayout->$addwidget(%gb,0,0)[br]
%mainlayout->$addwidget(%fakewidget,1,0)[br] %maintqlayout->$addwidget(%fakewidget,1,0)[br]
[br] [br]
#Let's show our nice login request =D ! [br] #Let's show our nice login request =D ! [br]
%widget->$show()[br] %widget->$show()[br]
@ -165,8 +165,8 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_groupbox,"groupbox","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setColumns", functionSetColumns) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setColumns", functionSetColumns)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"columns", functionColumns) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"columns", functionColumns)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"addSpace", functionAddSpace) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"addSpace", functionAddSpace)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"alignment", functionAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"tqalignment", functionAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setAlignment", functionSetAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"tqsetAlignment", functionSetAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setOrientation", functionSetOrientation) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setOrientation", functionSetOrientation)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"isChecked", functionIsChecked) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"isChecked", functionIsChecked)
KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setChecked", functionSetChecked) KVSO_REGISTER_HANDLER(KviKvsObject_groupbox,"setChecked", functionSetChecked)
@ -310,23 +310,23 @@ bool KviKvsObject_groupbox::functionSetAlignment(KviKvsObjectFunctionCall *c)
{ {
TQString szAlign; TQString szAlign;
KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szAlign) KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szAlign)
KVSO_PARAMETERS_END(c) KVSO_PARAMETERS_END(c)
if (!widget()) return true; if (!widget()) return true;
for(unsigned int i = 0; i < align_num; i++) for(unsigned int i = 0; i < align_num; i++)
{ {
if(KviTQString::equalCI(szAlign, align_tbl[i])) if(KviTQString::equalCI(szAlign, align_tbl[i]))
{ {
((KviTalGroupBox *)widget())->setAlignment(align_cod[i]); ((KviTalGroupBox *)widget())->tqsetAlignment(align_cod[i]);
return true; return true;
} }
} }
c->warning(__tr2qs("Unknown alignment")); c->warning(__tr2qs("Unknown tqalignment"));
return true; return true;
} }
bool KviKvsObject_groupbox::functionAlignment(KviKvsObjectFunctionCall *c) bool KviKvsObject_groupbox::functionAlignment(KviKvsObjectFunctionCall *c)
{ {
int mode = ((KviTalGroupBox *)widget())->alignment(); int mode = ((KviTalGroupBox *)widget())->tqalignment();
TQString szAlignment=""; TQString szAlignment="";
for(unsigned int i = 0; i < align_num; i++) for(unsigned int i = 0; i < align_num; i++)
{ {

@ -35,16 +35,16 @@
@type: @type:
class class
@short: @short:
Manages child widget horizontal geometry Manages child widget horizontal tqgeometry
@inherits: @inherits:
[class]object[/class] [class]object[/class]
@description: @description:
The hbox class widget provides horizontal geometry management for its child widgets. The hbox class widget provides horizontal tqgeometry management for its child widgets.
@functions: @functions:
!fn: $setSpacing(<spacing:uint>) !fn: $setSpacing(<spacing:uint>)
Sets the default spacing of the widgets in pixels Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:uint>) !fn: $setMargin(<margin:uint>)
Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges. Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges.
!fn: $setStretchFactor(<widget:hobject>,<stretch:uint>) !fn: $setStretchFactor(<widget:hobject>,<stretch:uint>)
Sets the stretch factor of widget to stretch. Sets the stretch factor of widget to stretch.
*/ */

@ -34,7 +34,7 @@
// Tables used in $setAlignment & $alignment // Tables used in $tqsetAlignment & $tqalignment
const char * const align_tbl[] = { const char * const align_tbl[] = {
"Left", "Left",
"Right", "Right",
@ -120,7 +120,7 @@ const int frame_cod[] = {
[class]widget[/class] [class]widget[/class]
@description: @description:
This widget can be used to display a text or an image. It can This widget can be used to display a text or an image. It can
have different frame styles and text/image alignment. have different frame styles and text/image tqalignment.
@functions: @functions:
!fn: $setText(<text:string>) !fn: $setText(<text:string>)
Sets the text to be displayed by the label. Sets the text to be displayed by the label.
@ -144,15 +144,15 @@ const int frame_cod[] = {
automagically resize itself accordingly to the 'size' of the automagically resize itself accordingly to the 'size' of the
text it contains. text it contains.
See also [classfnc]$autoResize[/classfnc](). See also [classfnc]$autoResize[/classfnc]().
!fn: <string> $alignment() !fn: <string> $tqalignment()
Returns a string containing alignment flags that are set for Returns a string containing tqalignment flags that are set for
this label. The flags are separated by commas. An example output this label. The flags are separated by commas. An example output
could look like this:[br] could look like this:[br]
[pre]Bottom, Right[/pre][br] [pre]Bottom, Right[/pre][br]
See [classfnc]$setAlignment[/classfnc]() for explanation of all See [classfnc]$tqsetAlignment[/classfnc]() for explanation of all
alignment flags. tqalignment flags.
!fn: $setAlignment(<flag1:string>, <flag2:string>, ...) !fn: $tqsetAlignment(<flag1:string>, <flag2:string>, ...)
This function sets alignment flags, given as parameters, for This function sets tqalignment flags, given as parameters, for
this label. Valid flags are: this label. Valid flags are:
[pre] [pre]
Right - Text is aligned to right border[br] Right - Text is aligned to right border[br]
@ -179,8 +179,8 @@ const int frame_cod[] = {
frame-style flags and their explenation. frame-style flags and their explenation.
!fn: $setFrameStyle(<flag1>, <flag2>, ...) !fn: $setFrameStyle(<flag1>, <flag2>, ...)
Sets the frame-style flags to the ones passed as arguments. Sets the frame-style flags to the ones passed as arguments.
The flags can either decide of the shape or shadow of the The flags can either decide of the tqshape or shadow of the
label's frame. Valid shape flags are:[br] label's frame. Valid tqshape flags are:[br]
[pre] [pre]
NoFrame - draw no frame. You shouldn't specify a shadow when NoFrame - draw no frame. You shouldn't specify a shadow when
using this.[br] using this.[br]
@ -216,8 +216,8 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_label,"label","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_label,"setMargin", functionSetMargin) KVSO_REGISTER_HANDLER(KviKvsObject_label,"setMargin", functionSetMargin)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"autoResize", functionAutoResize) KVSO_REGISTER_HANDLER(KviKvsObject_label,"autoResize", functionAutoResize)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"setAutoResize", functionSetAutoResize) KVSO_REGISTER_HANDLER(KviKvsObject_label,"setAutoResize", functionSetAutoResize)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"alignment", functionAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_label,"tqalignment", functionAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"setAlignment", functionSetAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_label,"tqsetAlignment", functionSetAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"clear", functionClear) KVSO_REGISTER_HANDLER(KviKvsObject_label,"clear", functionClear)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"frameStyle", functionFrameStyle) KVSO_REGISTER_HANDLER(KviKvsObject_label,"frameStyle", functionFrameStyle)
KVSO_REGISTER_HANDLER(KviKvsObject_label,"setFrameStyle", functionSetFrameStyle) KVSO_REGISTER_HANDLER(KviKvsObject_label,"setFrameStyle", functionSetFrameStyle)
@ -297,13 +297,13 @@ bool KviKvsObject_label::functionAutoResize(KviKvsObjectFunctionCall *c)
// //
bool KviKvsObject_label::functionSetAlignment(KviKvsObjectFunctionCall *c) bool KviKvsObject_label::functionSetAlignment(KviKvsObjectFunctionCall *c)
{ {
TQStringList alignment; TQStringList tqalignment;
KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("alignment",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,alignment) KVSO_PARAMETER("tqalignment",KVS_PT_STRINGLIST,KVS_PF_OPTIONAL,tqalignment)
KVSO_PARAMETERS_END(c) KVSO_PARAMETERS_END(c)
if (!widget()) return true; if (!widget()) return true;
int align,sum=0; int align,sum=0;
for ( TQStringList::Iterator it = alignment.begin(); it != alignment.end(); ++it ) for ( TQStringList::Iterator it = tqalignment.begin(); it != tqalignment.end(); ++it )
{ {
align = 0; align = 0;
@ -318,15 +318,15 @@ bool KviKvsObject_label::functionSetAlignment(KviKvsObjectFunctionCall *c)
if(align) if(align)
sum = sum | align; sum = sum | align;
else else
c->warning(__tr2qs("Unknown alignment: '%Q'"),&(*it)); c->warning(__tr2qs("Unknown tqalignment: '%Q'"),&(*it));
} }
((TQLabel *)widget())->setAlignment(sum); ((TQLabel *)widget())->tqsetAlignment(sum);
return true; return true;
} }
bool KviKvsObject_label::functionAlignment(KviKvsObjectFunctionCall *c) bool KviKvsObject_label::functionAlignment(KviKvsObjectFunctionCall *c)
{ {
int mode = ((TQLabel *)widget())->alignment(); int mode = ((TQLabel *)widget())->tqalignment();
TQString szAlignment=""; TQString szAlignment="";
for(unsigned int i = 0; i < align_num; i++) for(unsigned int i = 0; i < align_num; i++)
{ {

@ -40,37 +40,37 @@
/* /*
@doc: layout @doc: tqlayout
@keyterms: @keyterms:
layout object class, child widgets tqlayout object class, child widgets
@title: @title:
layout class tqlayout class
@type: @type:
class class
@short: @short:
Manages child widget geometry Manages child widget tqgeometry
@inherits: @inherits:
[class]object[/class] [class]object[/class]
@description: @description:
The layout is a geometry management tool for child widgets. The tqlayout is a tqgeometry management tool for child widgets.
You create a layout , give it some widgets to manage and it will layout them You create a tqlayout , give it some widgets to manage and it will tqlayout them
automatically.[br] automatically.[br]
The parent of the layout must be the widget for which child widget geometries have to be managed. The parent of the tqlayout must be the widget for which child widget geometries have to be managed.
A layout is a grid of NxM cells in which you insert child widgets with [classfnc:layout]$addWidget[/classfnc]().[br] A tqlayout is a grid of NxM cells in which you insert child widgets with [classfnc:tqlayout]$addWidget[/classfnc]().[br]
Widgets that must span multiple cells can be added to the layout with [classfnc:layout]$addMultiCellWidget[/classfnc]().[br] Widgets that must span multiple cells can be added to the tqlayout with [classfnc:tqlayout]$addMultiCellWidget[/classfnc]().[br]
@functions: @functions:
!fn: $addWidget(<widget:object widget>,<row:uint>,<column:uint>) !fn: $addWidget(<widget:object widget>,<row:uint>,<column:uint>)
Adds a widget to this layout placing it at position <row>,<column> in the grid Adds a widget to this tqlayout placing it at position <row>,<column> in the grid
!fn: $addMultiCellWidget(<widget:object widget>,<start_row:uint>,<end_row:uint>,<start_col:uint>,<end_col:uint>) !fn: $addMultiCellWidget(<widget:object widget>,<start_row:uint>,<end_row:uint>,<start_col:uint>,<end_col:uint>)
Adds a widget to this layout spanning multiple grid cells Adds a widget to this tqlayout spanning multiple grid cells
!fn: $setRowStretch(<row:uint>,<stretch:uint>) !fn: $setRowStretch(<row:uint>,<stretch:uint>)
Sets the stretch value for a particular row of this layout. The <stretch_value> Sets the stretch value for a particular row of this tqlayout. The <stretch_value>
must be a positive integer. The rows with bigger stretch values will take more space must be a positive integer. The rows with bigger stretch values will take more space
in the layout. in the tqlayout.
!fn: $setColStretch(<column:uint>,<stretch:uint>) !fn: $setColStretch(<column:uint>,<stretch:uint>)
Sets the stretch value for a particular column in this layout. The <stretch_value> Sets the stretch value for a particular column in this tqlayout. The <stretch_value>
must be a positive integer. The rows with bigger stretch values will take more space must be a positive integer. The rows with bigger stretch values will take more space
in the layout. in the tqlayout.
!fn: $addRowSpacing(<row:uint>,<spacing:uint>) !fn: $addRowSpacing(<row:uint>,<spacing:uint>)
Sets the minimum height of the specified <row> to <spacing> which must be a positive integer Sets the minimum height of the specified <row> to <spacing> which must be a positive integer
!fn: $addColSpacing(<column:uint>,<spacing:uint>) !fn: $addColSpacing(<column:uint>,<spacing:uint>)
@ -78,18 +78,18 @@
!fn: $setSpacing(<spacing:uint>) !fn: $setSpacing(<spacing:uint>)
Sets the default spacing of the widgets in pixels Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:uint>) !fn: $setMargin(<margin:uint>)
Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges. Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges.
!fn: $setResizeMode(<resize_mode:string>) !fn: $setResizeMode(<resize_mode:string>)
Sets the resize mode of the parent widget in relation to this layout. Sets the resize mode of the parent widget in relation to this tqlayout.
<mode> can be one of:[br] <mode> can be one of:[br]
-Auto: this is the default[br] -Auto: this is the default[br]
-Fixed: the parent widget of this layout is resized to the "sizeHint" value and it cannot be resized by the user.[br] -Fixed: the parent widget of this tqlayout is resized to the "tqsizeHint" value and it cannot be resized by the user.[br]
-Minimum: the minimum size of the parent widget of this layout is set to minimumSize() and it cannot be smaller[br] -Minimum: the minimum size of the parent widget of this tqlayout is set to tqminimumSize() and it cannot be smaller[br]
-FreeResize: the parent widget of this layout is not constrained at all[br] -FreeResize: the parent widget of this tqlayout is not constrained at all[br]
*/ */
KVSO_BEGIN_REGISTERCLASS(KviKvsObject_layout,"layout","object") KVSO_BEGIN_REGISTERCLASS(KviKvsObject_layout,"tqlayout","object")
KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addWidget", functionAddWidget) KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addWidget", functionAddWidget)
KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addMultiCellWidget", functionAddMultiCellWidget) KVSO_REGISTER_HANDLER(KviKvsObject_layout,"addMultiCellWidget", functionAddMultiCellWidget)
KVSO_REGISTER_HANDLER(KviKvsObject_layout,"setRowStretch", functionSetRowStretch) KVSO_REGISTER_HANDLER(KviKvsObject_layout,"setRowStretch", functionSetRowStretch)
@ -116,7 +116,7 @@ bool KviKvsObject_layout::init(KviKvsRunTimeContext * pContext,KviKvsVariantList
if(!w) if(!w)
{ {
pContext->warning(__tr2qs("The parent of a layout must be a widget!")); pContext->warning(__tr2qs("The parent of a tqlayout must be a widget!"));
return false; return false;
} }
setObject(TQT_TQOBJECT(new TQGridLayout(w))); setObject(TQT_TQOBJECT(new TQGridLayout(w)));

@ -23,7 +23,7 @@
// //
#include "kvi_string.h" #include "kvi_string.h"
#include <layout.h> #include <tqlayout.h>
#include "object_macros.h" #include "object_macros.h"
class KviKvsObject_layout : public KviKvsObject class KviKvsObject_layout : public KviKvsObject

@ -100,7 +100,7 @@
This function is called by KVIrc when the current item changes. This function is called by KVIrc when the current item changes.
!fn: <index:integer> $onItemEvent() !fn: <index:integer> $onItemEvent()
This function is called by KVIrc when the current item pointed by the mouse changes and gives in $0 the item index. This function is called by KVIrc when the current item pointed by the mouse changes and gives in $0 the item index.
!fn: <array:x,y,width,height> $itemRect(<item:index>) !fn: <array:x,y,width,height> $tqitemRect(<item:index>)
Returns the rectangle on the screen that item occupies, or an invalid rectangle if item is 0 or is not currently visible. Returns the rectangle on the screen that item occupies, or an invalid rectangle if item is 0 or is not currently visible.
@signals: @signals:
@ -122,7 +122,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_listbox,"listbox","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"currentItem", functioncurrentItem) KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"currentItem", functioncurrentItem)
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"textAt", functiontextAt); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"textAt", functiontextAt);
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"itemAt", functionitemAt); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"itemAt", functionitemAt);
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"itemRect", functionitemRect); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"tqitemRect", functiontqitemRect);
KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"setCurrentItem", functionsetCurrentItem); KVSO_REGISTER_HANDLER(KviKvsObject_listbox,"setCurrentItem", functionsetCurrentItem);
@ -367,7 +367,7 @@ void KviKvsObject_listbox::onItem(KviTalListBoxItem *item)
} }
bool KviKvsObject_listbox::functionitemRect(KviKvsObjectFunctionCall *c) bool KviKvsObject_listbox::functiontqitemRect(KviKvsObjectFunctionCall *c)
{ {
kvs_uint_t uIndex; kvs_uint_t uIndex;
KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETERS_BEGIN(c)
@ -375,7 +375,7 @@ kvs_uint_t uIndex;
KVSO_PARAMETERS_END(c) KVSO_PARAMETERS_END(c)
if(widget()) if(widget())
{ {
TQRect rect=((KviTalListBox *)widget())->itemRect(((KviTalListBox *)widget())->item(uIndex)); TQRect rect=((KviTalListBox *)widget())->tqitemRect(((KviTalListBox *)widget())->item(uIndex));
KviKvsArray * a = new KviKvsArray(); KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)rect.left())); a->set(0,new KviKvsVariant((kvs_int_t)rect.left()));
a->set(1,new KviKvsVariant((kvs_int_t)rect.top())); a->set(1,new KviKvsVariant((kvs_int_t)rect.top()));

@ -60,7 +60,7 @@ protected:
bool functiononItemEvent(KviKvsObjectFunctionCall *c); bool functiononItemEvent(KviKvsObjectFunctionCall *c);
bool functionitemAt(KviKvsObjectFunctionCall *c); bool functionitemAt(KviKvsObjectFunctionCall *c);
bool functionitemRect(KviKvsObjectFunctionCall *c); bool functiontqitemRect(KviKvsObjectFunctionCall *c);
protected slots: protected slots:
void selectionChanged(); void selectionChanged();
void currentItemChanged(KviTalListBoxItem *); void currentItemChanged(KviTalListBoxItem *);

@ -55,7 +55,7 @@
[class]widget[/class] [class]widget[/class]
@description: @description:
It can display and control a hierarchy of multi-column items, and provides the ability to add new items at any time. It can display and control a hierarchy of multi-column items, and provides the ability to add new items at any time.
The items are added by creating children [class]listviewitem[/class] objects: simply allocating them with $new The items are added by creating tqchildren [class]listviewitem[/class] objects: simply allocating them with $new
will add the items to the listview and simply deleting them will remove them. will add the items to the listview and simply deleting them will remove them.
Allocating a [class]listviewitem[/class] item2 as a child of item1 will insert it to the same listview creating Allocating a [class]listviewitem[/class] item2 as a child of item1 will insert it to the same listview creating
a subtree of items spannig from item1. The subtree can be opened or closed by a simple click either a subtree of items spannig from item1. The subtree can be opened or closed by a simple click either
@ -132,11 +132,11 @@
The default implementation emits the [classfnc]$onItem[/classfnc]() signal. The default implementation emits the [classfnc]$onItem[/classfnc]() signal.
!fn: $itemExpandedEvent(<item:object>) !fn: $itemExpandedEvent(<item:object>)
This event is called when an item has been expanded, i.e. when the children of item are shown. This event is called when an item has been expanded, i.e. when the tqchildren of item are shown.
The default implementation emits the [classfnc]$expanded[/classfnc]() signal. The default implementation emits the [classfnc]$expanded[/classfnc]() signal.
!fn: $itemCollapsedEvent(<item:object>) !fn: $itemCollapsedEvent(<item:object>)
This event is called when an item has been collapsed, i.e. when the children of item are hidden. This event is called when an item has been collapsed, i.e. when the tqchildren of item are hidden.
The default implementation emits the [classfnc]$collapsed[/classfnc]() signal. The default implementation emits the [classfnc]$collapsed[/classfnc]() signal.
!fn: $itemRenamedEvent(<item:object>,<col:integer>,<text:string>) !fn: $itemRenamedEvent(<item:object>,<col:integer>,<text:string>)

@ -71,7 +71,7 @@
Returns $true if this item is enabled and $false otherwise Returns $true if this item is enabled and $false otherwise
!fn: $setOpen(<bOpen:boolean>) !fn: $setOpen(<bOpen:boolean>)
Opens or closes the item to show its children items Opens or closes the item to show its tqchildren items
!fn: $isOpen() !fn: $isOpen()
Returns the open state of this item Returns the open state of this item
@ -80,7 +80,7 @@
Makes this item checkable or not. This function should be called immediately Makes this item checkable or not. This function should be called immediately
after the item creation: changing this property later at runtime may have after the item creation: changing this property later at runtime may have
strange results (like the item being moved inside the list, text disappearing, strange results (like the item being moved inside the list, text disappearing,
hidden children etc... don't do it :D ). hidden tqchildren etc... don't do it :D ).
!fn: $isCheckable() !fn: $isCheckable()
Returns $true if this item is checkable and $false otherwise Returns $true if this item is checkable and $false otherwise
@ -94,7 +94,7 @@
have been previously called. have been previously called.
!fn: <listviewitem> $firstChild() !fn: <listviewitem> $firstChild()
Returns the first child item of this listviewitem or $null if this item has no children. Returns the first child item of this listviewitem or $null if this item has no tqchildren.
!fn: <listviewitem> $nextSibling() !fn: <listviewitem> $nextSibling()
Returns the next sibling item of this listviewitem or $null if there are no sibling items. Returns the next sibling item of this listviewitem or $null if there are no sibling items.

@ -40,7 +40,7 @@
#define TQTEXTEDIT_AUTO_BULLET_LIST Q3TextEdit::AutoBulletList #define TQTEXTEDIT_AUTO_BULLET_LIST Q3TextEdit::AutoBulletList
#else #else
#include <textstream.h> #include <tqtextstream.h>
#include <tqmultilineedit.h> #include <tqmultilineedit.h>
#define KviTalMultiLineEdit TQMultiLineEdit #define KviTalMultiLineEdit TQMultiLineEdit
@ -226,15 +226,15 @@ static int mod_cod[] = {
Returns 1(TRUE) if undo is available; otherwise returns 0(FALSE). Returns 1(TRUE) if undo is available; otherwise returns 0(FALSE).
!fn: <boolean> $isRedoAvailable () !fn: <boolean> $isRedoAvailable ()
Returns 1(TRUE) if redo is available; otherwise returns 0(FALSE). Returns 1(TRUE) if redo is available; otherwise returns 0(FALSE).
!fn: $setAlignment(<alignment:string>) !fn: $tqsetAlignment(<tqalignment:string>)
Sets the alignment of the current paragraph to <alignment>. Valid values are:[br] Sets the tqalignment of the current paragraph to <tqalignment>. Valid values are:[br]
- AlignAuto - Aligns according to the language.[br] - AlignAuto - Aligns according to the language.[br]
- TQt::AlignLeft - Aligns with the left edge.[br] - TQt::AlignLeft - Aligns with the left edge.[br]
- TQt::AlignRight - Aligns with the right edge.[br] - TQt::AlignRight - Aligns with the right edge.[br]
- TQt::AlignCenter - Centers in both dimensions. - TQt::AlignCenter - Centers in both dimensions.
!fn: $setVerticalAlignment(<vertical_alignment:string>) !fn: $setVerticalAlignment(<vertical_tqalignment:string>)
Sets the vertical alignment of the current format to <Valignemnt>. Valid Values are:[br] Sets the vertical tqalignment of the current format to <Valignemnt>. Valid Values are:[br]
- AlignNormal - Normal alignment.[br] - AlignNormal - Normal tqalignment.[br]
- AlignSuperScript - Superscript.[br] - AlignSuperScript - Superscript.[br]
- AlignSubScript - Subscript. - AlignSubScript - Subscript.
!fn: $setAutoFormatting(<afvalue:string>) !fn: $setAutoFormatting(<afvalue:string>)
@ -323,7 +323,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_mledit,"multilineedit","widget")
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setParagraphBackgroundColor", functionsetParagraphBackgroundColor) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setParagraphBackgroundColor", functionsetParagraphBackgroundColor)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"clearParagraphBackgroundColor", functionsetParagraphBackgroundColor) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"clearParagraphBackgroundColor", functionsetParagraphBackgroundColor)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"loadFile" , functionloadFile); // let's fantasy KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"loadFile" , functionloadFile); // let's fantasy
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setAlignment" , functionsetAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"tqsetAlignment" , functiontqsetAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setAutoFormatting" , functionsetAutoFormatting) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setAutoFormatting" , functionsetAutoFormatting)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setVerticalAlignment" , functionsetVerticalAlignment) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setVerticalAlignment" , functionsetVerticalAlignment)
KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setWrapPolicy" , functionsetWrapPolicy) KVSO_REGISTER_HANDLER(KviKvsObject_mledit,"setWrapPolicy" , functionsetWrapPolicy)
@ -1090,23 +1090,23 @@ bool KviKvsObject_mledit::functionloadFile(KviKvsObjectFunctionCall *c)
return true; return true;
} }
bool KviKvsObject_mledit::functionsetAlignment(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functiontqsetAlignment(KviKvsObjectFunctionCall *c)
{ {
TQString szAlignment; TQString szAlignment;
KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szAlignment) KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szAlignment)
KVSO_PARAMETERS_END(c) KVSO_PARAMETERS_END(c)
if(!widget()) return true; if(!widget()) return true;
if(KviTQString::equalCI(szAlignment,"Left")) if(KviTQString::equalCI(szAlignment,"Left"))
((KviTalMultiLineEdit *)widget())->setAlignment(TQt::AlignLeft); ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignLeft);
else if(KviTQString::equalCI(szAlignment,"Right")) else if(KviTQString::equalCI(szAlignment,"Right"))
((KviTalMultiLineEdit *)widget())->setAlignment(TQt::AlignRight); ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignRight);
else if(KviTQString::equalCI(szAlignment,"Center")) else if(KviTQString::equalCI(szAlignment,"Center"))
((KviTalMultiLineEdit *)widget())->setAlignment(TQt::AlignCenter); ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignCenter);
else if(KviTQString::equalCI(szAlignment,"Justify")) else if(KviTQString::equalCI(szAlignment,"Justify"))
((KviTalMultiLineEdit *)widget())->setAlignment(TQt::AlignJustify); ((KviTalMultiLineEdit *)widget())->tqsetAlignment(TQt::AlignJustify);
else c->warning(__tr2qs("Unknown alignment '%Q'"),&szAlignment); else c->warning(__tr2qs("Unknown tqalignment '%Q'"),&szAlignment);
return true; return true;
} }
@ -1131,18 +1131,18 @@ bool KviKvsObject_mledit::functionsetAutoFormatting(KviKvsObjectFunctionCall *c)
bool KviKvsObject_mledit::functionsetVerticalAlignment(KviKvsObjectFunctionCall *c) bool KviKvsObject_mledit::functionsetVerticalAlignment(KviKvsObjectFunctionCall *c)
{ {
TQString szValignment; TQString szVtqalignment;
KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("alignment",KVS_PT_STRING,0,szValignment) KVSO_PARAMETER("tqalignment",KVS_PT_STRING,0,szVtqalignment)
KVSO_PARAMETERS_END(c) KVSO_PARAMETERS_END(c)
if(!widget()) return true; if(!widget()) return true;
if(KviTQString::equalCI(szValignment,"Normal")) if(KviTQString::equalCI(szVtqalignment,"Normal"))
((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignNormal); ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignNormal);
else if(KviTQString::equalCI(szValignment,"SuperScript")) else if(KviTQString::equalCI(szVtqalignment,"SuperScript"))
((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSuperScript); ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSuperScript);
else if(KviTQString::equalCI(szValignment,"SubScript")) else if(KviTQString::equalCI(szVtqalignment,"SubScript"))
((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSubScript); ((KviTalMultiLineEdit *)widget())->setVerticalAlignment(KviTalMultiLineEdit::AlignSubScript);
else c->warning(__tr2qs("Unknown vertical alignment '%Q'"),&szValignment); else c->warning(__tr2qs("Unknown vertical tqalignment '%Q'"),&szVtqalignment);
return true; return true;
} }

@ -95,7 +95,7 @@ protected:
bool functionsetParagraphBackgroundColor(KviKvsObjectFunctionCall *c); bool functionsetParagraphBackgroundColor(KviKvsObjectFunctionCall *c);
bool functionclearParagraphBackground(KviKvsObjectFunctionCall *c); bool functionclearParagraphBackground(KviKvsObjectFunctionCall *c);
bool functionloadFile(KviKvsObjectFunctionCall *c); bool functionloadFile(KviKvsObjectFunctionCall *c);
bool functionsetAlignment(KviKvsObjectFunctionCall *c); bool functiontqsetAlignment(KviKvsObjectFunctionCall *c);
bool functionsetAutoFormatting(KviKvsObjectFunctionCall *c); bool functionsetAutoFormatting(KviKvsObjectFunctionCall *c);
bool functionsetVerticalAlignment(KviKvsObjectFunctionCall *c); bool functionsetVerticalAlignment(KviKvsObjectFunctionCall *c);
bool functionsetWrapPolicy(KviKvsObjectFunctionCall *c); bool functionsetWrapPolicy(KviKvsObjectFunctionCall *c);

@ -41,12 +41,12 @@
@type: @type:
class class
@short: @short:
This class provide a painter to paint line and shapes. This class provide a painter to paint line and tqshapes.
@inherits: @inherits:
[class]object[/class] [class]object[/class]
[class]widget[/class] [class]widget[/class]
@description: @description:
With this class you can draw many graphics objects from simple lines to complex shapes like pies and chords.[br] With this class you can draw many graphics objects from simple lines to complex tqshapes like pies and chords.[br]
It can also draw aligned text and pixmaps. Normally, it draws in a "natural" coordinate system, but it can also do view and world transformation.[br] It can also draw aligned text and pixmaps. Normally, it draws in a "natural" coordinate system, but it can also do view and world transformation.[br]
The class need to be implemented into a [classfnc]$paintEvent[/classfnc](); The class need to be implemented into a [classfnc]$paintEvent[/classfnc]();
@functions: @functions:
@ -196,8 +196,8 @@
timerevent()[br] timerevent()[br]
{[br] {[br]
$$->%b = $(($$->%b + 1) & 15);[br] $$->%b = $(($$->%b + 1) & 15);[br]
if ($$->%nextanim == 1) $$->$repaint(1);[br] if ($$->%nextanim == 1) $$->$tqrepaint(1);[br]
$$->$repaint(0);[br] $$->$tqrepaint(0);[br]
}[br] }[br]
drawAnim()[br] drawAnim()[br]
{[br] {[br]
@ -323,7 +323,7 @@
}[br] }[br]
}[br] }[br]
[br] [br]
%lay=$new(layout,%Hello)[br] %lay=$new(tqlayout,%Hello)[br]
%lay->$addwidget(%Btn,4,0)[br] %lay->$addwidget(%Btn,4,0)[br]
%Hello->$setBackgroundColor("000000");[br] %Hello->$setBackgroundColor("000000");[br]
%Hello->$setmaximumwidth(800)[br] %Hello->$setmaximumwidth(800)[br]
@ -414,12 +414,12 @@ if(__pXOrArray->isArray())\
KviKvsVariant * pH = __pXOrArray->array()->at(3);\ KviKvsVariant * pH = __pXOrArray->array()->at(3);\
if(!(pX && pY && pW && pH))\ if(!(pX && pY && pW && pH))\
{\ {\
c->error(__tr2qs("One of the geometry array parameters is empty"));\ c->error(__tr2qs("One of the tqgeometry array parameters is empty"));\
return false;\ return false;\
}\ }\
if(!(pX->asInteger(iX) && pY->asInteger(__iY) && pW->asInteger(__iW) && pH->asInteger(__iH)))\ if(!(pX->asInteger(iX) && pY->asInteger(__iY) && pW->asInteger(__iW) && pH->asInteger(__iH)))\
{\ {\
c->error(__tr2qs("One of the geometry array parameters didn't evaluate to an integer"));\ c->error(__tr2qs("One of the tqgeometry array parameters didn't evaluate to an integer"));\
return false;\ return false;\
}\ }\
} else {\ } else {\

@ -89,7 +89,7 @@
{[br] {[br]
#Geometry of the widget and setting-up of popupmenu [br] #Geometry of the widget and setting-up of popupmenu [br]
$$->$setGeometry(%X,%Y,100,100)[br] $$->$setGeometry(%X,%Y,100,100)[br]
$$->%lay=$new(layout,$$)[br] $$->%lay=$new(tqlayout,$$)[br]
#Here we generate a cicle to create our labels inside the widget.[br] #Here we generate a cicle to create our labels inside the widget.[br]
%i=0[br] %i=0[br]
while (%i<10)[br] while (%i<10)[br]
@ -110,7 +110,7 @@
#we create the label widget wich will be used as popup's title[br] #we create the label widget wich will be used as popup's title[br]
$$->%Popuptitle=$new(label)[br] $$->%Popuptitle=$new(label)[br]
$$->%Popuptitle->$settext(<B><U>"Windows Options"</B></U>)[br] $$->%Popuptitle->$settext(<B><U>"Windows Options"</B></U>)[br]
$$->%Popuptitle->$setAlignment(Center)[br] $$->%Popuptitle->$tqsetAlignment(Center)[br]
#and we add it.[br] #and we add it.[br]
%A=$$->%Popuptitle[br] %A=$$->%Popuptitle[br]
$$->%Popupmenu->$insertwidget(%A)[br] $$->%Popupmenu->$insertwidget(%A)[br]

@ -82,7 +82,7 @@
%tt=$new(test)[br] %tt=$new(test)[br]
%A=$new(widget)[br] %A=$new(widget)[br]
%A->$setGeometry(100,100,400,300)[br] %A->$setGeometry(100,100,400,300)[br]
%layoutA=$new(layout,%A)[br] %layoutA=$new(tqlayout,%A)[br]
%Ainput=$new(lineedit,%A)[br] %Ainput=$new(lineedit,%A)[br]
#%Aoutput=$new(textedit,%A)// coming soon in the new texteditor class[br] #%Aoutput=$new(textedit,%A)// coming soon in the new texteditor class[br]
%Aoutput=$new(label,%A)[br] %Aoutput=$new(label,%A)[br]

@ -57,7 +57,7 @@ KviScriptSocketObject::KviScriptSocketObject(KviScriptObjectClass * cla,KviScrip
{ {
m_uConnectionId = 0; m_uConnectionId = 0;
m_sock = KVI_INVALID_SOCKET; m_sock = KVI_INVALID_SOCKET;
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0; m_uRemotePort = 0;
m_uSecondaryPort = 0; m_uSecondaryPort = 0;
m_pSn = 0; m_pSn = 0;
@ -128,7 +128,7 @@ void KviScriptSocketObject::reset()
m_pOutBuffer = new KviDataBuffer(); m_pOutBuffer = new KviDataBuffer();
m_uInBufferLen = 0; m_uInBufferLen = 0;
m_uInDataLen = 0; m_uInDataLen = 0;
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0; m_uRemotePort = 0;
m_szRemoteIp.clear(); m_szRemoteIp.clear();
m_uLocalPort = 0; m_uLocalPort = 0;
@ -366,7 +366,7 @@ void KviScriptSocketObject::reset()
KVSO_BEGIN_REGISTERCLASS(KviKvsObject_socket,"socket","object") KVSO_BEGIN_REGISTERCLASS(KviKvsObject_socket,"socket","object")
KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functionStatus) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"status",functiontqStatus)
KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remotePort",functionRemotePort) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remotePort",functionRemotePort)
KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remoteIp",functionRemoteIp) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"remoteIp",functionRemoteIp)
KVSO_REGISTER_HANDLER(KviKvsObject_socket,"localIp",functionLocalIp) KVSO_REGISTER_HANDLER(KviKvsObject_socket,"localIp",functionLocalIp)
@ -398,7 +398,7 @@ KVSO_BEGIN_CONSTRUCTOR(KviKvsObject_socket,KviKvsObject)
m_bUdp = false; m_bUdp = false;
m_uConnectionId = 0; m_uConnectionId = 0;
m_sock = KVI_INVALID_SOCKET; m_sock = KVI_INVALID_SOCKET;
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0; m_uRemotePort = 0;
m_uSecondaryPort = 0; m_uSecondaryPort = 0;
m_pSn = 0; m_pSn = 0;
@ -430,15 +430,15 @@ KVSO_END_DESTRUCTOR(KviKvsObject_socket)
//---------------------- //----------------------
bool KviKvsObject_socket::functionStatus(KviKvsObjectFunctionCall *c) bool KviKvsObject_socket::functiontqStatus(KviKvsObjectFunctionCall *c)
{ {
c->returnValue()->setInteger(m_iStatus); c->returnValue()->setInteger(m_itqStatus);
return true; return true;
} }
bool KviKvsObject_socket::functionClose(KviKvsObjectFunctionCall *c) bool KviKvsObject_socket::functionClose(KviKvsObjectFunctionCall *c)
{ {
if((m_pOutBuffer->size() != 0) && (m_iStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED)) if((m_pOutBuffer->size() != 0) && (m_itqStatus == KVI_SCRIPT_SOCKET_STATUS_CONNECTED))
tryFlush(); tryFlush();
reset(); reset();
@ -591,7 +591,7 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c)
c->warning(__tr2qs("Value %d for port is out of range (values allowed are from 0 to 65535"),m_uRemotePort); c->warning(__tr2qs("Value %d for port is out of range (values allowed are from 0 to 65535"),m_uRemotePort);
return true; return true;
} }
if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED))
{ {
c->warning(__tr2qs("Another connection in progress")); c->warning(__tr2qs("Another connection in progress"));
c->returnValue()->setBoolean(true); c->returnValue()->setBoolean(true);
@ -608,11 +608,11 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c)
debug ("ok connecting"); debug ("ok connecting");
debug ("connectinhg on ip %s ",m_szRemoteIp.latin1()); debug ("connectinhg on ip %s ",m_szRemoteIp.latin1());
debug ("non so ip"); debug ("non so ip");
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTING;
delayedConnect(); delayedConnect();
} else { } else {
debug ("connectinhg on ip %s port %d",m_szRemoteIp.latin1(),m_uRemotePort); debug ("connectinhg on ip %s port %d",m_szRemoteIp.latin1(),m_uRemotePort);
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DNS; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DNS;
delayedLookupRemoteIp(); delayedLookupRemoteIp();
} }
c->returnValue()->setBoolean(true); c->returnValue()->setBoolean(true);
@ -626,7 +626,7 @@ bool KviKvsObject_socket::functionConnect(KviKvsObjectFunctionCall *c)
bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c) bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c)
{ {
if((m_sock != KVI_INVALID_SOCKET) || (m_iStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED)) if((m_sock != KVI_INVALID_SOCKET) || (m_itqStatus != KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED))
{ {
c->warning(__tr2qs("Another connection in progress")); c->warning(__tr2qs("Another connection in progress"));
c->returnValue()->setBoolean(false); c->returnValue()->setBoolean(false);
@ -770,7 +770,7 @@ bool KviKvsObject_socket::functionListen(KviKvsObjectFunctionCall *c)
TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(incomingConnection(int))); TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(incomingConnection(int)));
m_pSn->setEnabled(true); m_pSn->setEnabled(true);
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_LISTENING;
c->returnValue()->setBoolean(true); c->returnValue()->setBoolean(true);
return true; return true;
@ -846,7 +846,7 @@ void KviKvsObject_socket::acceptConnection(kvi_socket_t s,kvi_u32_t uPort,const
sareal.getStringAddress(m_szLocalIp); sareal.getStringAddress(m_szLocalIp);
} }
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED;
m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read); m_pSn = new TQSocketNotifier((int)m_sock,TQSocketNotifier::Read);
TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readNotifierFired(int))); TQObject::connect(m_pSn,TQT_SIGNAL(activated(int)),this,TQT_SLOT(readNotifierFired(int)));
@ -1070,7 +1070,7 @@ void KviKvsObject_socket::writeNotifierFired(int)
KviKvsVariantList *params=0; KviKvsVariantList *params=0;
callFunction(this,"connectEvent",params); callFunction(this,"connectEvent",params);
if(m_uConnectionId == uOldConnectionId) if(m_uConnectionId == uOldConnectionId)
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_CONNECTED;
// else the connection has been already changed! // else the connection has been already changed!
} }
} }
@ -1256,7 +1256,7 @@ void KviKvsObject_socket::reset()
m_pOutBuffer = new KviDataBuffer(); m_pOutBuffer = new KviDataBuffer();
m_uInBufferLen = 0; m_uInBufferLen = 0;
m_uInDataLen = 0; m_uInDataLen = 0;
m_iStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED; m_itqStatus = KVI_SCRIPT_SOCKET_STATUS_DISCONNECTED;
m_uRemotePort = 0; m_uRemotePort = 0;
m_szRemoteIp=""; m_szRemoteIp="";
m_uLocalPort = 0; m_uLocalPort = 0;

@ -47,7 +47,7 @@ public:
virtual ~KviScriptSocketObject(); virtual ~KviScriptSocketObject();
protected: protected:
kvi_socket_t m_sock; kvi_socket_t m_sock;
int m_iStatus; int m_itqStatus;
KviStr m_szRemoteIp; KviStr m_szRemoteIp;
unsigned short int m_uRemotePort; unsigned short int m_uRemotePort;
KviStr m_szLocalIp; KviStr m_szLocalIp;
@ -69,7 +69,7 @@ protected:
unsigned short int m_uSecondaryPort; unsigned short int m_uSecondaryPort;
KviStr m_szSecondaryIp; KviStr m_szSecondaryIp;
protected: protected:
bool functionStatus(KviCommand *c,KviParameterList * params,KviStr &buffer); bool functiontqStatus(KviCommand *c,KviParameterList * params,KviStr &buffer);
bool functionRemotePort(KviCommand *c,KviParameterList * params,KviStr &buffer); bool functionRemotePort(KviCommand *c,KviParameterList * params,KviStr &buffer);
bool functionRemoteIp(KviCommand *c,KviParameterList * params,KviStr &buffer); bool functionRemoteIp(KviCommand *c,KviParameterList * params,KviStr &buffer);
bool functionLocalPort(KviCommand *c,KviParameterList * params,KviStr &buffer); bool functionLocalPort(KviCommand *c,KviParameterList * params,KviStr &buffer);
@ -122,7 +122,7 @@ public:
protected: protected:
bool m_bUdp; bool m_bUdp;
kvi_socket_t m_sock; kvi_socket_t m_sock;
int m_iStatus; int m_itqStatus;
TQString m_szRemoteIp; TQString m_szRemoteIp;
// unsigned short int m_uRemotePort; // unsigned short int m_uRemotePort;
TQString m_szLocalIp; TQString m_szLocalIp;
@ -144,7 +144,7 @@ protected:
kvi_u32_t m_uSecondaryPort; kvi_u32_t m_uSecondaryPort;
TQString m_szSecondaryIp; TQString m_szSecondaryIp;
protected: protected:
bool functionStatus(KviKvsObjectFunctionCall *c); bool functiontqStatus(KviKvsObjectFunctionCall *c);
bool functionRemotePort(KviKvsObjectFunctionCall *c); bool functionRemotePort(KviKvsObjectFunctionCall *c);
bool functionRemoteIp(KviKvsObjectFunctionCall *c); bool functionRemoteIp(KviKvsObjectFunctionCall *c);
bool functionLocalPort(KviKvsObjectFunctionCall *c); bool functionLocalPort(KviKvsObjectFunctionCall *c);

@ -94,7 +94,7 @@
%secondtab=$new(widget,%Tabwidget) %secondtab=$new(widget,%Tabwidget)
# Now we'll create the item to put in to tab's pages. # Now we'll create the item to put in to tab's pages.
%layoutfirsttab=$new(layout,%firsttab) %layoutfirsttab=$new(tqlayout,%firsttab)
%labelbt=$new(label,%firsttab) %labelbt=$new(label,%firsttab)
%labelbt->$settext(Botton Tab) %labelbt->$settext(Botton Tab)
%labeltt=$new(label,%firsttab) %labeltt=$new(label,%firsttab)
@ -104,7 +104,7 @@
%buttontt=$new(button,%firsttab) %buttontt=$new(button,%firsttab)
%buttontt->$settext("To &Top") %buttontt->$settext("To &Top")
# Now we'll give a layout to all items. # Now we'll give a tqlayout to all items.
# This also allows to use privateimpl without making buttons global variables # This also allows to use privateimpl without making buttons global variables
%layoutfirsttab->$addwidget(%labelbt,0,0) %layoutfirsttab->$addwidget(%labelbt,0,0)
%layoutfirsttab->$addwidget(%labeltt,0,1) %layoutfirsttab->$addwidget(%labeltt,0,1)
@ -125,14 +125,14 @@
} }
# We do the same work with the second tab's page. # We do the same work with the second tab's page.
%layoutsecondtab=$new(layout,%secondtab) %layoutsecondtab=$new(tqlayout,%secondtab)
%labelwp=$new(label,%secondtab) %labelwp=$new(label,%secondtab)
%labelwp->$settext("Enjoy the new Class provided by") %labelwp->$settext("Enjoy the new Class provided by")
%layoutsecondtab->$addwidget(%labelwp,0,0) %layoutsecondtab->$addwidget(%labelwp,0,0)
%labelwp->$setalignment("Center") %labelwp->$settqalignment("Center")
%labelgen=$new(label,%secondtab) %labelgen=$new(label,%secondtab)
%labelgen->$settext(Grifisx \& Noldor) %labelgen->$settext(Grifisx \& Noldor)
%labelgen->$setalignment("Center") %labelgen->$settqalignment("Center")
%layoutsecondtab->$addwidget(%labelgen,1,0) %layoutsecondtab->$addwidget(%labelgen,1,0)
%Tabwidget->$addTab(%secondtab,&About,50) %Tabwidget->$addTab(%secondtab,&About,50)

@ -21,7 +21,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// //
#include <textbrowser.h> #include <tqtextbrowser.h>
#include "class_tbrowser.h" #include "class_tbrowser.h"
#include "kvi_error.h" #include "kvi_error.h"
#include "kvi_debug.h" #include "kvi_debug.h"

@ -23,7 +23,7 @@
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// //
#include <textbrowser.h> #include <tqtextbrowser.h>
#include "class_widget.h" #include "class_widget.h"
#include <tqfile.h> #include <tqfile.h>
#include "class_multilineedit.h" #include "class_multilineedit.h"

@ -152,7 +152,7 @@ bool KviScriptUrlLabelObject::eventFilter(TQObject * o, TQEvent * e)
!fn: $setText(<text>) !fn: $setText(<text>)
Sets the label's text. Reimplemented from internal reasons. Sets the label's text. Reimplemented from internal reasons.
!fn: $setCursorChange(<bEnabled:boolean>) !fn: $setCursorChange(<bEnabled:boolean>)
Tells the label wheather to change or not the shape of cursor, Tells the label wheather to change or not the tqshape of cursor,
when it is above the widget. Default is false. when it is above the widget. Default is false.
!fn: <boolean> $cursorChange() !fn: <boolean> $cursorChange()
Returns true if the cursor changes over the label, false if not. Returns true if the cursor changes over the label, false if not.
@ -287,7 +287,7 @@ bool KviKvsObject_urlabel::functionsetText(KviKvsObjectFunctionCall *c)
KVSO_PARAMETERS_END(c) KVSO_PARAMETERS_END(c)
if(!widget()) return true; if(!widget()) return true;
((TQLabel *)widget())->setText(szText); ((TQLabel *)widget())->setText(szText);
((TQLabel *)widget())->setFixedSize(((TQLabel *)widget())->sizeHint()); ((TQLabel *)widget())->setFixedSize(((TQLabel *)widget())->tqsizeHint());
return true; return true;
} }
bool KviKvsObject_urlabel::functionaction(KviKvsObjectFunctionCall *c) bool KviKvsObject_urlabel::functionaction(KviKvsObjectFunctionCall *c)

@ -35,16 +35,16 @@
@type: @type:
class class
@short: @short:
Manages child widget vertical geometry Manages child widget vertical tqgeometry
@inherits: @inherits:
[class]object[/class] [class]object[/class]
@description: @description:
The vbox class widget provides vertical geometry management for its child widgets. The vbox class widget provides vertical tqgeometry management for its child widgets.
@functions: @functions:
!fn: $setSpacing(<spacing:int>) !fn: $setSpacing(<spacing:int>)
Sets the default spacing of the widgets in pixels Sets the default spacing of the widgets in pixels
!fn: $setMargin(<margin:int>) !fn: $setMargin(<margin:int>)
Sets the dimension of the layout margin : the distance from the border to the outermost child widget edges. Sets the dimension of the tqlayout margin : the distance from the border to the outermost child widget edges.
!fn: $setStretchFactor(<widget:hobject>,<stretch:uint>) !fn: $setStretchFactor(<widget:hobject>,<stretch:uint>)
Sets the stretch factor of widget to stretch. Sets the stretch factor of widget to stretch.
*/ */

@ -36,7 +36,7 @@
#include <tqcursor.h> #include <tqcursor.h>
#include <tqiconset.h> #include <tqiconset.h>
#include <tqcolor.h> #include <tqcolor.h>
#include <layout.h> #include <tqlayout.h>
#include <tqbitmap.h> #include <tqbitmap.h>
#include <tqmetaobject.h> #include <tqmetaobject.h>
#include "class_widget.h" #include "class_widget.h"
@ -137,12 +137,12 @@ const int widgettypes_cod[] = {
All the other widget-type classes inherit from this one. All the other widget-type classes inherit from this one.
@functions: @functions:
!fn: $show() !fn: $show()
Shows this widget and the children. Shows this widget and the tqchildren.
See also [classfnc]$hide[/classfnc]() and [classfnc]$isVisible[/classfnc]. See also [classfnc]$hide[/classfnc]() and [classfnc]$isVisible[/classfnc].
!fn: $hide() !fn: $hide()
Hides this widget (and conseguently all the children). Hides this widget (and conseguently all the tqchildren).
See also [classfnc]$show[/classfnc]() and [classfnc]$isVisible[/classfnc]. See also [classfnc]$show[/classfnc]() and [classfnc]$isVisible[/classfnc].
!fn: $repaint(<bool erase>) !fn: $tqrepaint(<bool erase>)
Repaints the widget directly by calling [classfnc]$paintEvent[/classfnc]() immediately.[br] Repaints the widget directly by calling [classfnc]$paintEvent[/classfnc]() immediately.[br]
If erase is TRUE, erases the widget before the $paintEvent() call. If erase is TRUE, erases the widget before the $paintEvent() call.
!fn: $x() !fn: $x()
@ -157,29 +157,29 @@ const int widgettypes_cod[] = {
Returns the width of this widget in pixels. Returns the width of this widget in pixels.
!fn: $height() !fn: $height()
Returns the height of this widget in pixels. Returns the height of this widget in pixels.
!fn: $geometry() !fn: $tqgeometry()
Returns the widget geometry in this form:[br] Returns the widget tqgeometry in this form:[br]
x, y, width, height. x, y, width, height.
!fn: $setGeometry(<x_or_array>,[<y>,<width>,<heigth>]) !fn: $setGeometry(<x_or_array>,[<y>,<width>,<heigth>])
Sets the geometry of this widget. <x> and <y> are relative Sets the tqgeometry of this widget. <x> and <y> are relative
to the parent widget or to the desktop (if this widget is to the parent widget or to the desktop (if this widget is
a toplevel one). All the parameters are in pixels. a toplevel one). All the parameters are in pixels.
!fn: $setMinimumWidth(<value>) !fn: $setMinimumWidth(<value>)
Sets the minimum width of this widget to <value>. Sets the minimum width of this widget to <value>.
The user will not be able to resize the widget to a smaller The user will not be able to resize the widget to a smaller
value. This value is also used by the [class:layout]layout class[/class]. value. This value is also used by the [class:tqlayout]tqlayout class[/class].
!fn: $setMinimumHeight(<value>) !fn: $setMinimumHeight(<value>)
Sets the minimum height of this widget to <value>. Sets the minimum height of this widget to <value>.
The user will not be able to resize the widget to a smaller The user will not be able to resize the widget to a smaller
value. This value is also used by the [class:layout]layout class[/class]. value. This value is also used by the [class:tqlayout]tqlayout class[/class].
!fn: $setMaximumWidth(<value>) !fn: $setMaximumWidth(<value>)
Sets the maximum width of this widget to <value>. Sets the maximum width of this widget to <value>.
The user will not be able to resize the widget to a bigger The user will not be able to resize the widget to a bigger
value. This value is also used by the [class:layout]layout class[/class]. value. This value is also used by the [class:tqlayout]tqlayout class[/class].
!fn: $setMaximumHeight(<value>) !fn: $setMaximumHeight(<value>)
Sets the maximum height of this widget to <value>. Sets the maximum height of this widget to <value>.
The user will not be able to resize the widget to a bigger The user will not be able to resize the widget to a bigger
value. This value is also used by the [class:layout]layout class[/class]. value. This value is also used by the [class:tqlayout]tqlayout class[/class].
!fn: $move(<x_or_array>[,<y>]) !fn: $move(<x_or_array>[,<y>])
Moves this widget to the coordinate <x> and <y> relative to its Moves this widget to the coordinate <x> and <y> relative to its
parent widget (or the desktop if this widget is a toplevel one). parent widget (or the desktop if this widget is a toplevel one).
@ -341,7 +341,7 @@ const int widgettypes_cod[] = {
If a tooltip has setted with [classfnc]$setTooltip[/classfnc] the dynamic tooltip will be ignored. If a tooltip has setted with [classfnc]$setTooltip[/classfnc] the dynamic tooltip will be ignored.
The default implementation does nothing. The default implementation does nothing.
!fn: $paintEvent() !fn: $paintEvent()
This event handler can be reimplemented to repaint all or part of the widget. This event handler can be reimplemented to tqrepaint all or part of the widget.
It's needed by the Painter class. It's needed by the Painter class.
It's very useful for drawing flicker free animations or low level special graphic effects. It's very useful for drawing flicker free animations or low level special graphic effects.
If you call "[cmd]return[/cmd] $true" you will stop the internal processing If you call "[cmd]return[/cmd] $true" you will stop the internal processing
@ -522,7 +522,7 @@ const int widgettypes_cod[] = {
// ... now that I think about it , it // ... now that I think about it , it
// may happen that widget() will be zero here too: // may happen that widget() will be zero here too:
// If the TQt "physical" widget gets destroyed // If the TQt "physical" widget gets destroyed
// by some external factor (for example when children // by some external factor (for example when tqchildren
// of a wrapper widget destroyed by KVIrc). // of a wrapper widget destroyed by KVIrc).
// //
// as a convention: // as a convention:
@ -546,7 +546,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object")
// apparence // apparence
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"show",function_show) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"show",function_show)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"hide",function_hide) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"hide",function_hide)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"repaint",function_repaint) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"tqrepaint",function_tqrepaint)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isTopLevel",function_isTopLevel) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isTopLevel",function_isTopLevel)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isVisible",function_isVisible) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"isVisible",function_isVisible)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"raise",function_raise) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"raise",function_raise)
@ -567,10 +567,10 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object")
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsWidth",function_fontMetricsWidth) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsWidth",function_fontMetricsWidth)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsHeight",function_fontMetricsHeight) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"fontMetricsHeight",function_fontMetricsHeight)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFont",function_setFont) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFont",function_setFont)
// geometry // tqgeometry
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"screenResolution",function_screenResolution) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"screenResolution",function_screenResolution)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"centerToScreen",function_centerToScreen) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"centerToScreen",function_centerToScreen)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"geometry",function_geometry) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"geometry",function_tqgeometry)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setGeometry",function_setGeometry) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setGeometry",function_setGeometry)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapToGlobal",function_mapToGlobal) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapToGlobal",function_mapToGlobal)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapFromGlobal",function_mapFromGlobal) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"mapFromGlobal",function_mapFromGlobal)
@ -587,7 +587,7 @@ KVSO_BEGIN_REGISTERCLASS(KviKvsObject_widget,"widget","object")
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumWidth",function_setMaximumWidth) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumWidth",function_setMaximumWidth)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumHeight",function_setMaximumHeight) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setMaximumHeight",function_setMaximumHeight)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"move",function_move) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"move",function_move)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"sizeHint",function_sizeHint) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"tqsizeHint",function_tqsizeHint)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"resize",function_resize) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"resize",function_resize)
KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFocusPolicy",function_setFocusPolicy) KVSO_REGISTER_HANDLER(KviKvsObject_widget,"setFocusPolicy",function_setFocusPolicy)
@ -916,14 +916,14 @@ bool KviKvsObject_widget::function_fontAscent(KviKvsObjectFunctionCall * c)
} }
bool KviKvsObject_widget::function_repaint(KviKvsObjectFunctionCall * c) bool KviKvsObject_widget::function_tqrepaint(KviKvsObjectFunctionCall * c)
{ {
bool bEnabled; bool bEnabled;
KVSO_PARAMETERS_BEGIN(c) KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled) KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c) KVSO_PARAMETERS_END(c)
if(!widget()) return true; if(!widget()) return true;
widget()->repaint(bEnabled); widget()->tqrepaint(bEnabled);
return true; return true;
} }
@ -955,9 +955,9 @@ bool KviKvsObject_widget::function_screenResolution(KviKvsObjectFunctionCall * c
return true; return true;
} }
bool KviKvsObject_widget::function_geometry(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_tqgeometry(KviKvsObjectFunctionCall *c)
{ {
TQRect r = widget() ? widget()->geometry() : TQRect(0,0,0,0); TQRect r = widget() ? widget()->tqgeometry() : TQRect(0,0,0,0);
KviKvsArray * a = new KviKvsArray(); KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)r.x())); a->set(0,new KviKvsVariant((kvs_int_t)r.x()));
a->set(1,new KviKvsVariant((kvs_int_t)r.y())); a->set(1,new KviKvsVariant((kvs_int_t)r.y()));
@ -992,7 +992,7 @@ bool KviKvsObject_widget::function_setGeometry(KviKvsObjectFunctionCall *c)
if(pXOrArray->isArray()) if(pXOrArray->isArray())
{ {
// the user has passed a complete geometry array as first parameter // the user has passed a complete tqgeometry array as first parameter
// make sure it has at least 4 elements // make sure it has at least 4 elements
if(pXOrArray->array()->size() < 4) if(pXOrArray->array()->size() < 4)
{ {
@ -1009,12 +1009,12 @@ bool KviKvsObject_widget::function_setGeometry(KviKvsObjectFunctionCall *c)
// no parameter was set in that place // no parameter was set in that place
if(!(pX && pY && pW && pH)) if(!(pX && pY && pW && pH))
{ {
c->error(__tr2qs("One of the geometry array parameters is empty")); c->error(__tr2qs("One of the tqgeometry array parameters is empty"));
return false; return false;
} }
if(!(pX->asInteger(iX) && pY->asInteger(iY) && pW->asInteger(iW) && pH->asInteger(iH))) if(!(pX->asInteger(iX) && pY->asInteger(iY) && pW->asInteger(iW) && pH->asInteger(iH)))
{ {
c->error(__tr2qs("One of the geometry array parameters didn't evaluate to an integer")); c->error(__tr2qs("One of the tqgeometry array parameters didn't evaluate to an integer"));
return false; return false;
} }
// ok: the params are correct // ok: the params are correct
@ -1450,10 +1450,10 @@ bool KviKvsObject_widget::function_move(KviKvsObjectFunctionCall *c)
widget()->move(TQPoint(iX,iY)); widget()->move(TQPoint(iX,iY));
return true; return true;
} }
bool KviKvsObject_widget::function_sizeHint(KviKvsObjectFunctionCall *c) bool KviKvsObject_widget::function_tqsizeHint(KviKvsObjectFunctionCall *c)
{ {
if(!widget())return true; if(!widget())return true;
TQSize sizehint = widget()->sizeHint(); TQSize sizehint = widget()->tqsizeHint();
KviKvsArray * a = new KviKvsArray(); KviKvsArray * a = new KviKvsArray();
a->set(0,new KviKvsVariant((kvs_int_t)sizehint.width())); a->set(0,new KviKvsVariant((kvs_int_t)sizehint.width()));
a->set(1,new KviKvsVariant((kvs_int_t)sizehint.height())); a->set(1,new KviKvsVariant((kvs_int_t)sizehint.height()));
@ -1616,7 +1616,7 @@ bool KviKvsObject_widget::function_addWidgetToWrappedLayout(KviKvsObjectFunction
c->warning(__tr2qs("Widget parameter is not a valid object")); c->warning(__tr2qs("Widget parameter is not a valid object"));
return true; return true;
} }
TQLayout *lay=widget()->layout(); TQLayout *lay=widget()->tqlayout();
if (!lay) if (!lay)
{ {
c->warning(__tr2qs("No Layout associated to the widget ")); c->warning(__tr2qs("No Layout associated to the widget "));

@ -59,7 +59,7 @@ protected:
bool function_fontMetricsHeight(KviKvsObjectFunctionCall * c); bool function_fontMetricsHeight(KviKvsObjectFunctionCall * c);
bool function_fontMetricsWidth(KviKvsObjectFunctionCall * c); bool function_fontMetricsWidth(KviKvsObjectFunctionCall * c);
bool function_foregroundColor(KviKvsObjectFunctionCall *c); bool function_foregroundColor(KviKvsObjectFunctionCall *c);
bool function_geometry(KviKvsObjectFunctionCall *c); bool function_tqgeometry(KviKvsObjectFunctionCall *c);
bool function_globalCursorX(KviKvsObjectFunctionCall *c); bool function_globalCursorX(KviKvsObjectFunctionCall *c);
bool function_globalCursorY(KviKvsObjectFunctionCall *c); bool function_globalCursorY(KviKvsObjectFunctionCall *c);
bool function_hasFocus(KviKvsObjectFunctionCall *c); bool function_hasFocus(KviKvsObjectFunctionCall *c);
@ -74,7 +74,7 @@ protected:
bool function_move(KviKvsObjectFunctionCall *c); bool function_move(KviKvsObjectFunctionCall *c);
bool function_parentWidget(KviKvsObjectFunctionCall *c); bool function_parentWidget(KviKvsObjectFunctionCall *c);
bool function_raise(KviKvsObjectFunctionCall *); bool function_raise(KviKvsObjectFunctionCall *);
bool function_repaint(KviKvsObjectFunctionCall *c); bool function_tqrepaint(KviKvsObjectFunctionCall *c);
bool function_reparent(KviKvsObjectFunctionCall *c); bool function_reparent(KviKvsObjectFunctionCall *c);
bool function_resize(KviKvsObjectFunctionCall *c); bool function_resize(KviKvsObjectFunctionCall *c);
bool function_screenResolution(KviKvsObjectFunctionCall * c); bool function_screenResolution(KviKvsObjectFunctionCall * c);
@ -96,7 +96,7 @@ protected:
bool function_setGeometry(KviKvsObjectFunctionCall *c); bool function_setGeometry(KviKvsObjectFunctionCall *c);
bool function_setWFlags(KviKvsObjectFunctionCall *c); bool function_setWFlags(KviKvsObjectFunctionCall *c);
bool function_show(KviKvsObjectFunctionCall *c); bool function_show(KviKvsObjectFunctionCall *c);
bool function_sizeHint(KviKvsObjectFunctionCall *c); bool function_tqsizeHint(KviKvsObjectFunctionCall *c);
bool function_width(KviKvsObjectFunctionCall *); bool function_width(KviKvsObjectFunctionCall *);
bool function_x(KviKvsObjectFunctionCall *); bool function_x(KviKvsObjectFunctionCall *);
bool function_y(KviKvsObjectFunctionCall *); bool function_y(KviKvsObjectFunctionCall *);

@ -119,7 +119,7 @@ bool KviKvsObject_window::init(KviKvsRunTimeContext * pContext,KviKvsVariantList
KviWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),name()); KviWindow * w = new KviKvsScriptWindowWindow(pContext->window()->frame(),name());
setObject(TQT_TQOBJECT(w)); setObject(TQT_TQOBJECT(w));
pContext->window()->frame()->addWindow(w,false); pContext->window()->frame()->addWindow(w,false);
w->minimize(); // must be minimized before children are added, otherwise the focus handling goes nuts... w->minimize(); // must be minimized before tqchildren are added, otherwise the focus handling goes nuts...
return true; return true;
} }

@ -110,7 +110,7 @@
constructor[br] constructor[br]
{[br] {[br]
$$->$setGeometry(%X,%Y,100,100)[br] $$->$setGeometry(%X,%Y,100,100)[br]
$$->%lay=$new(layout,$$)[br] $$->%lay=$new(tqlayout,$$)[br]
%i=0[br] %i=0[br]
while (%i<10)[br] while (%i<10)[br]
{[br] {[br]

@ -72,7 +72,7 @@
The first entry in this example is a KVIrc server window, class "KviFrame" and name "kvirc_frame": The first entry in this example is a KVIrc server window, class "KviFrame" and name "kvirc_frame":
it is a toplevel widget.[br] it is a toplevel widget.[br]
The "qt_top_dock", "qt_custom_toolbar" and the "qt_dockwidget_internal" are The "qt_top_dock", "qt_custom_toolbar" and the "qt_dockwidget_internal" are
direct children of that widget.[br] direct tqchildren of that widget.[br]
To indicate a specific widget we will use the "class::name" form.[br] To indicate a specific widget we will use the "class::name" form.[br]
So to indicate the main KVIrc frame you will use "KviFrame::kvirc_main_frame". So to indicate the main KVIrc frame you will use "KviFrame::kvirc_main_frame".
Look at this example:[br] Look at this example:[br]
@ -183,7 +183,7 @@ bool KviKvsObject_wrapper::init(KviKvsRunTimeContext * pContext,KviKvsVariantLis
TQWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const TQString szClass, const TQString szName) TQWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const TQString szClass, const TQString szName)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQWidgetList list = g_pApp->topLevelWidgets(); TQWidgetList list = g_pApp->tqtopLevelWidgets();
if( !list.count() ) return 0; if( !list.count() ) return 0;
for(int idx=0;idx<list.count();idx++) for(int idx=0;idx<list.count();idx++)
{ {
@ -205,7 +205,7 @@ TQWidget *KviKvsObject_wrapper::findTopLevelWidgetToWrap(const TQString szClass,
return 0; return 0;
#else #else
TQWidgetList *list = g_pApp->topLevelWidgets(); TQWidgetList *list = g_pApp->tqtopLevelWidgets();
if( !list ) return 0; if( !list ) return 0;
TQWidgetListIt it(*list); TQWidgetListIt it(*list);

@ -153,7 +153,7 @@ static bool objects_kvs_cmd_killClass(KviKvsModuleCommandCall * c)
Suppresses any warning message Suppresses any warning message
@description: @description:
Removes the definition of the class <class_name>.[br] Removes the definition of the class <class_name>.[br]
All the instances of the class are killed (thus children objects are killed too).[br] All the instances of the class are killed (thus tqchildren objects are killed too).[br]
All the derived class definitions are removed as well.[br] All the derived class definitions are removed as well.[br]
Builtin class definitions cannot be removed and this commands Builtin class definitions cannot be removed and this commands
kills only all the instances of that class (derived class definitions kills only all the instances of that class (derived class definitions
@ -827,7 +827,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
KVSO_PARAMETERS_END(cmd) KVSO_PARAMETERS_END(cmd)
if (bFlag) cmd->window()->output(80, "Objects dump:"); if (bFlag) cmd->window()->output(80, "Objects dump:");
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
TQWidgetList list = g_pApp->topLevelWidgets(); TQWidgetList list = g_pApp->tqtopLevelWidgets();
KviStr spacing = ">"; KviStr spacing = ">";
TQString szTemp; TQString szTemp;
@ -865,7 +865,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
} }
#else #else
TQWidgetList *l = g_pApp->topLevelWidgets(); TQWidgetList *l = g_pApp->tqtopLevelWidgets();
l->setAutoDelete(false); l->setAutoDelete(false);
TQWidgetListIt it(*l); TQWidgetListIt it(*l);
KviStr spacing = ">"; KviStr spacing = ">";
@ -913,7 +913,7 @@ static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd)
static void dumpChildObjects(KviWindow *pWnd, TQObject *parent, const char *spacing, bool bFlag, KviKvsArray *n, int &idx) static void dumpChildObjects(KviWindow *pWnd, TQObject *parent, const char *spacing, bool bFlag, KviKvsArray *n, int &idx)
{ {
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
const TQObjectList list = parent->children(); const TQObjectList list = parent->tqchildren();
if( !list.count() ) return; if( !list.count() ) return;
TQString sp(spacing); TQString sp(spacing);
sp.append(">"); sp.append(">");

@ -27,7 +27,7 @@
#include "kvi_iconmanager.h" #include "kvi_iconmanager.h"
#include "kvi_app.h" #include "kvi_app.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include "kvi_tal_tooltip.h" #include "kvi_tal_tooltip.h"
#include <tqevent.h> #include <tqevent.h>
@ -59,7 +59,7 @@ void KviOptionsWidgetContainer::setup(KviOptionsWidget * w)
TQPushButton * b = new TQPushButton(__tr2qs_ctx("&OK","options"),this); TQPushButton * b = new TQPushButton(__tr2qs_ctx("&OK","options"),this);
KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, accepting all changes.","options")); KviTalToolTip::add(b,__tr2qs_ctx("Close this dialog, accepting all changes.","options"));
//b->setMinimumWidth(m_pCancel->sizeHint().width()); //b->setMinimumWidth(m_pCancel->tqsizeHint().width());
g->addWidget(b,1,1); g->addWidget(b,1,1);
b->setDefault(true); b->setDefault(true);
connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked()));

@ -32,7 +32,7 @@
#include "kvi_module.h" #include "kvi_module.h"
#include "kvi_styled_controls.h" #include "kvi_styled_controls.h"
#include "kvi_pointerhashtable.h" #include "kvi_pointerhashtable.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_accel.h" #include "kvi_accel.h"
#include <tqlabel.h> #include <tqlabel.h>
#include "kvi_tal_vbox.h" #include "kvi_tal_vbox.h"
@ -69,8 +69,8 @@ KviGeneralOptionsFrontWidget::KviGeneralOptionsFrontWidget(TQWidget *parent,cons
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
l->setWordWrap(true); l->setWordWrap(true);
#endif #endif
l->setAlignment(TQt::AlignTop); l->tqsetAlignment(TQt::AlignTop);
layout()->addWidget(l,0,0); tqlayout()->addWidget(l,0,0);
} }
KviGeneralOptionsFrontWidget::~KviGeneralOptionsFrontWidget() KviGeneralOptionsFrontWidget::~KviGeneralOptionsFrontWidget()
@ -179,7 +179,7 @@ KviOptionsDialog::KviOptionsDialog(TQWidget * par,const TQString &szGroup)
"</td>" \ "</td>" \
"</tr>" \ "</tr>" \
"</table>" "</table>"
).arg(szDialogTitle).arg(szDialog).arg(szInfoTips).arg(szOkCancelButtons); ).tqarg(szDialogTitle).tqarg(szDialog).tqarg(szInfoTips).tqarg(szOkCancelButtons);
TQString szCaption = szDialogTitle + " - KVIrc"; TQString szCaption = szDialogTitle + " - KVIrc";
setCaption(szCaption); setCaption(szCaption);
@ -534,10 +534,10 @@ void KviOptionsDialog::fillListView(KviTalListViewItem * p,KviPointerList<KviOpt
{ {
if(e->bIsContainer) if(e->bIsContainer)
{ {
// it's a container: add only eventual not contained children (containers or explicitly marked as not contained) // it's a container: add only eventual not contained tqchildren (containers or explicitly marked as not contained)
fillListView(it,e->pChildList,szGroup,true); fillListView(it,e->pChildList,szGroup,true);
} else { } else {
// it's not a container, add any children // it's not a container, add any tqchildren
fillListView(it,e->pChildList,szGroup,false); fillListView(it,e->pChildList,szGroup,false);
} }
} }
@ -578,7 +578,7 @@ KviOptionsListViewItem * KviOptionsDialog::findItemByPage(KviOptionsListViewItem
if(it->m_pOptionsWidget == pPage)return it; if(it->m_pOptionsWidget == pPage)return it;
KviOptionsListViewItem *i; KviOptionsListViewItem *i;
// run through the children // run through the tqchildren
i = (KviOptionsListViewItem *)(it->firstChild()); i = (KviOptionsListViewItem *)(it->firstChild());
if(i) if(i)
{ {
@ -586,7 +586,7 @@ KviOptionsListViewItem * KviOptionsDialog::findItemByPage(KviOptionsListViewItem
if(i)return i; if(i)return i;
} }
// not found in the children tree.. look in the next sibling // not found in the tqchildren tree.. look in the next sibling
i = (KviOptionsListViewItem *)(it->nextSibling()); i = (KviOptionsListViewItem *)(it->nextSibling());
if(i) if(i)
{ {
@ -647,7 +647,7 @@ void KviOptionsDialog::closeEvent(TQCloseEvent *e)
void KviOptionsDialog::recursiveCommit(KviOptionsListViewItem *it) void KviOptionsDialog::recursiveCommit(KviOptionsListViewItem *it)
{ {
// First commit the children // First commit the tqchildren
if(!it) return; if(!it) return;
KviOptionsListViewItem *it2 = (KviOptionsListViewItem *)it->firstChild(); KviOptionsListViewItem *it2 = (KviOptionsListViewItem *)it->firstChild();
while(it2) while(it2)

@ -271,7 +271,7 @@ printclass()
fi fi
} }
addchildren() addtqchildren()
{ {
if [ -f "$CLASSDIR/$2" ]; then if [ -f "$CLASSDIR/$2" ]; then
LEVEL=`cat $CLASSDIR/$2` LEVEL=`cat $CLASSDIR/$2`
@ -282,7 +282,7 @@ addchildren()
echo "$3 e$1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;" >> $TARGET echo "$3 e$1->pChildList = new KviPointerList<KviOptionsWidgetInstanceEntry>;" >> $TARGET
echo "$3 e$1->pChildList->setAutoDelete(true);" >> $TARGET echo "$3 e$1->pChildList->setAutoDelete(true);" >> $TARGET
NEXTLEVEL=`expr $1 + 1` NEXTLEVEL=`expr $1 + 1`
addchildren $NEXTLEVEL $achild "$3 " addtqchildren $NEXTLEVEL $achild "$3 "
else else
echo "$3 e$1->pChildList = 0;" >> $TARGET echo "$3 e$1->pChildList = 0;" >> $TARGET
fi fi
@ -290,7 +290,7 @@ addchildren()
fi fi
} }
addchildren 0 NOPARENT "" addtqchildren 0 NOPARENT ""
rm -fr $CLASSDIR rm -fr $CLASSDIR

@ -22,7 +22,7 @@
#include "optw_antispam.h" #include "optw_antispam.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"
@ -47,7 +47,7 @@ KviAntispamOptionsWidget::KviAntispamOptionsWidget(TQWidget * parent)
reenableStuff(true); reenableStuff(true);
layout()->setRowStretch(2,1); tqlayout()->setRowStretch(2,1);
} }
KviAntispamOptionsWidget::~KviAntispamOptionsWidget() KviAntispamOptionsWidget::~KviAntispamOptionsWidget()

@ -23,7 +23,7 @@
#include "optw_away.h" #include "optw_away.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -22,7 +22,7 @@
#include "optw_ctcpfloodprotection.h" #include "optw_ctcpfloodprotection.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -24,7 +24,7 @@
#include "optw_dcc.h" #include "optw_dcc.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -24,7 +24,7 @@
#include "optw_highlighting.h" #include "optw_highlighting.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -27,7 +27,7 @@
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_tooltip.h" #include "kvi_tal_tooltip.h"
#include <tqtabwidget.h> #include <tqtabwidget.h>
#include <tqcombobox.h> #include <tqcombobox.h>
@ -311,7 +311,7 @@ KviIdentityGeneralOptionsWidget::KviIdentityGeneralOptionsWidget(TQWidget * pare
createLayout(3,1); createLayout(3,1);
layout()->setMargin(10); tqlayout()->setMargin(10);
KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Basic Properties","options")); KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("Basic Properties","options"));
KviTalHBox * hb = new KviTalHBox(gbox); KviTalHBox * hb = new KviTalHBox(gbox);
@ -492,7 +492,7 @@ KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(TQWidget * parent
: KviOptionsWidget(parent) : KviOptionsWidget(parent)
{ {
createLayout(4,1); createLayout(4,1);
layout()->setMargin(10); tqlayout()->setMargin(10);
m_pLocalAvatar = new KviPixmap(KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar)); m_pLocalAvatar = new KviPixmap(KVI_OPTION_PIXMAP(KviOption_pixmapMyAvatar));
@ -540,7 +540,7 @@ KviIdentityAvatarOptionsWidget::KviIdentityAvatarOptionsWidget(TQWidget * parent
connect(m_pChooseAvatarButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseAvatar())); connect(m_pChooseAvatarButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(chooseAvatar()));
layout()->setRowStretch(1,2); tqlayout()->setRowStretch(1,2);
} }
KviIdentityAvatarOptionsWidget::~KviIdentityAvatarOptionsWidget() KviIdentityAvatarOptionsWidget::~KviIdentityAvatarOptionsWidget()
@ -678,7 +678,7 @@ KviIdentityAdvancedOptionsWidget::KviIdentityAdvancedOptionsWidget(TQWidget * pa
createLayout(2,1); createLayout(2,1);
layout()->setMargin(10); tqlayout()->setMargin(10);
KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("User Mode","options")); KviTalGroupBox * gbox = addGroupBox(0,0,0,0,1,Qt::Horizontal,__tr2qs_ctx("User Mode","options"));
m_pISelector = addBoolSelector(gbox,__tr2qs_ctx("Invisible (+i)","options"),&m_bI); m_pISelector = addBoolSelector(gbox,__tr2qs_ctx("Invisible (+i)","options"),&m_bI);

@ -22,7 +22,7 @@
#include "optw_ignore.h" #include "optw_ignore.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -21,7 +21,7 @@
// //
#include "optw_input.h" #include "optw_input.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"
@ -92,7 +92,7 @@ KviInputLookOptionsWidget::KviInputLookOptionsWidget(TQWidget * parent)
} }
layout()->setRowStretch(7,1); tqlayout()->setRowStretch(7,1);
} }
KviInputLookOptionsWidget::~KviInputLookOptionsWidget() KviInputLookOptionsWidget::~KviInputLookOptionsWidget()

@ -24,7 +24,7 @@
#include "optw_interfacefeatures.h" #include "optw_interfacefeatures.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <string.h> #include <string.h>

@ -22,7 +22,7 @@
#include "optw_interfacelookglobal.h" #include "optw_interfacelookglobal.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_settings.h" #include "kvi_settings.h"
#include "kvi_options.h" #include "kvi_options.h"
@ -104,13 +104,13 @@ KviThemeTransparencyOptionsWidget::KviThemeTransparencyOptionsWidget(TQWidget *
m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,6,1,6,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground, m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,6,1,6,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground,
KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency) && !KVI_OPTION_BOOL(KviOption_boolObtainGlobalBackgroundFromKde)); KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency) && !KVI_OPTION_BOOL(KviOption_boolObtainGlobalBackgroundFromKde));
layout()->setRowStretch(6,1); tqlayout()->setRowStretch(6,1);
connect(m_pObtainBackgroundFromKdeBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableGlobalBackgroundPixmapSelector(bool))); connect(m_pObtainBackgroundFromKdeBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableGlobalBackgroundPixmapSelector(bool)));
#else //!COMPILE_KDE_SUPPORT #else //!COMPILE_KDE_SUPPORT
m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,4,1,4,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground, m_pGlobalBackgroundPixmapSelector = addPixmapSelector(0,4,1,4,__tr2qs_ctx("Transparency blend image:","options"),KviOption_pixmapGlobalTransparencyBackground,
KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency)); KVI_OPTION_BOOL(KviOption_boolUseGlobalPseudoTransparency));
layout()->setRowStretch(4,1); tqlayout()->setRowStretch(4,1);
#endif //!COMPILE_KDE_SUPPORT #endif //!COMPILE_KDE_SUPPORT
connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableGlobalBackgroundPixmapSelector(bool))); connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableGlobalBackgroundPixmapSelector(bool)));
connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableUpdateKdeBackgroundBoolSelector(bool))); connect(m_pUseTransparencyBoolSelector,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(enableUpdateKdeBackgroundBoolSelector(bool)));
@ -177,7 +177,7 @@ KviThemeMdiAreaOptionsWidget::KviThemeMdiAreaOptionsWidget(TQWidget * parent)
addColorSelector(0,0,0,0,__tr2qs_ctx("Background","options"),KviOption_colorMdiBackground); addColorSelector(0,0,0,0,__tr2qs_ctx("Background","options"),KviOption_colorMdiBackground);
addPixmapSelector(0,1,0,1,__tr2qs_ctx("Background Image","options"),KviOption_pixmapMdiBackground); addPixmapSelector(0,1,0,1,__tr2qs_ctx("Background Image","options"),KviOption_pixmapMdiBackground);
layout()->setRowStretch(1,1); tqlayout()->setRowStretch(1,1);
} }
KviThemeMdiAreaOptionsWidget::~KviThemeMdiAreaOptionsWidget() KviThemeMdiAreaOptionsWidget::~KviThemeMdiAreaOptionsWidget()
@ -204,7 +204,7 @@ KviThemeToolBarAppletsOptionsWidget::KviThemeToolBarAppletsOptionsWidget(TQWidge
addPixmapSelector(0,8,0,8,__tr2qs_ctx("Background Image","options"),KviOption_pixmapIrcToolBarAppletBackground); addPixmapSelector(0,8,0,8,__tr2qs_ctx("Background Image","options"),KviOption_pixmapIrcToolBarAppletBackground);
layout()->setRowStretch(8,1); tqlayout()->setRowStretch(8,1);
} }
KviThemeToolBarAppletsOptionsWidget::~KviThemeToolBarAppletsOptionsWidget() KviThemeToolBarAppletsOptionsWidget::~KviThemeToolBarAppletsOptionsWidget()

@ -181,7 +181,7 @@ KviChannelAdvancedOptionsWidget::KviChannelAdvancedOptionsWidget(TQWidget * pPar
hostmask.mask(tmp1,(KviIrcMask::MaskType)i); hostmask.mask(tmp1,(KviIrcMask::MaskType)i);
ipmask.mask(tmp2,(KviIrcMask::MaskType)i); ipmask.mask(tmp2,(KviIrcMask::MaskType)i);
m_pBanTypeCombo->insertItem(TQString("%1 (%2)").arg(tmp1).arg(tmp2)); m_pBanTypeCombo->insertItem(TQString("%1 (%2)").tqarg(tmp1).tqarg(tmp2));
} }
m_pBanTypeCombo->setCurrentItem(KVI_OPTION_UINT(KviOption_uintDefaultBanType)); m_pBanTypeCombo->setCurrentItem(KVI_OPTION_UINT(KviOption_uintDefaultBanType));

@ -22,7 +22,7 @@
#include "optw_ircoutput.h" #include "optw_ircoutput.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_settings.h" #include "kvi_settings.h"
#include "kvi_options.h" #include "kvi_options.h"

@ -21,7 +21,7 @@
// //
#include "optw_ircview.h" #include "optw_ircview.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"
@ -98,7 +98,7 @@ KviIrcViewLookOptionsWidget::KviIrcViewLookOptionsWidget(TQWidget * parent)
m_pVerticalAlign->setCurrentItem(0); m_pVerticalAlign->setCurrentItem(0);
} }
layout()->setRowStretch(2,1); tqlayout()->setRowStretch(2,1);
} }
KviIrcViewLookOptionsWidget::~KviIrcViewLookOptionsWidget() KviIrcViewLookOptionsWidget::~KviIrcViewLookOptionsWidget()

@ -23,7 +23,7 @@
#include "optw_lag.h" #include "optw_lag.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_tooltip.h" #include "kvi_tal_tooltip.h"
#include "kvi_options.h" #include "kvi_options.h"

@ -23,7 +23,7 @@
#include "optw_logging.h" #include "optw_logging.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -22,7 +22,7 @@
#include "optw_mediatypes.h" #include "optw_mediatypes.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include "kvi_tal_tooltip.h" #include "kvi_tal_tooltip.h"
@ -77,72 +77,72 @@ KviMediaTypesOptionsWidget::KviMediaTypesOptionsWidget(TQWidget * parent)
connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentItemChanged(KviTalListViewItem *))); connect(m_pListView,TQT_SIGNAL(currentChanged(KviTalListViewItem *)),this,TQT_SLOT(currentItemChanged(KviTalListViewItem *)));
layout()->addMultiCellWidget(m_pListView,0,0,0,2); tqlayout()->addMultiCellWidget(m_pListView,0,0,0,2);
TQLabel * l = new TQLabel(__tr2qs_ctx("Description:","options"),this); TQLabel * l = new TQLabel(__tr2qs_ctx("Description:","options"),this);
layout()->addWidget(l,1,0); tqlayout()->addWidget(l,1,0);
m_pDescription = new TQLineEdit(this); m_pDescription = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pDescription,1,1,1,2); tqlayout()->addMultiCellWidget(m_pDescription,1,1,1,2);
l = new TQLabel(__tr2qs_ctx("MIME type:","options"),this); l = new TQLabel(__tr2qs_ctx("MIME type:","options"),this);
layout()->addWidget(l,2,0); tqlayout()->addWidget(l,2,0);
m_pIanaType = new TQLineEdit(this); m_pIanaType = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pIanaType,2,2,1,2); tqlayout()->addMultiCellWidget(m_pIanaType,2,2,1,2);
l = new TQLabel(__tr2qs_ctx("File pattern:","options"),this); l = new TQLabel(__tr2qs_ctx("File pattern:","options"),this);
layout()->addWidget(l,3,0); tqlayout()->addWidget(l,3,0);
m_pFileMask = new TQLineEdit(this); m_pFileMask = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pFileMask,3,3,1,2); tqlayout()->addMultiCellWidget(m_pFileMask,3,3,1,2);
l = new TQLabel(__tr2qs_ctx("Magic bytes:","options"),this); l = new TQLabel(__tr2qs_ctx("Magic bytes:","options"),this);
layout()->addWidget(l,4,0); tqlayout()->addWidget(l,4,0);
m_pMagicBytes = new TQLineEdit(this); m_pMagicBytes = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pMagicBytes,4,4,1,2); tqlayout()->addMultiCellWidget(m_pMagicBytes,4,4,1,2);
l = new TQLabel(__tr2qs_ctx("Save path:","options"),this); l = new TQLabel(__tr2qs_ctx("Save path:","options"),this);
layout()->addWidget(l,5,0); tqlayout()->addWidget(l,5,0);
m_pSavePath = new TQLineEdit(this); m_pSavePath = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pSavePath,5,5,1,2); tqlayout()->addMultiCellWidget(m_pSavePath,5,5,1,2);
l = new TQLabel(__tr2qs_ctx("Local open command:","options"),this); l = new TQLabel(__tr2qs_ctx("Local open command:","options"),this);
layout()->addWidget(l,6,0); tqlayout()->addWidget(l,6,0);
m_pCommandline = new TQLineEdit(this); m_pCommandline = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pCommandline,6,6,1,2); tqlayout()->addMultiCellWidget(m_pCommandline,6,6,1,2);
#ifdef COMPILE_INFO_TIPS #ifdef COMPILE_INFO_TIPS
mergeTip(m_pCommandline,__tr2qs_ctx("<center>This field contains the command to execute to open a local file.<br>" \ mergeTip(m_pCommandline,__tr2qs_ctx("<center>This field contains the command to execute to open a local file.<br>" \
"<tt>$0</tt> is used in place of the filename</center>","options")); "<tt>$0</tt> is used in place of the filename</center>","options"));
#endif #endif
l = new TQLabel(__tr2qs_ctx("Remote open command:","options"),this); l = new TQLabel(__tr2qs_ctx("Remote open command:","options"),this);
layout()->addWidget(l,7,0); tqlayout()->addWidget(l,7,0);
m_pRemoteExecCommandline = new TQLineEdit(this); m_pRemoteExecCommandline = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pRemoteExecCommandline,7,7,1,2); tqlayout()->addMultiCellWidget(m_pRemoteExecCommandline,7,7,1,2);
#ifdef COMPILE_INFO_TIPS #ifdef COMPILE_INFO_TIPS
mergeTip(m_pRemoteExecCommandline,__tr2qs_ctx("<center>This field contains the command to execute when automatically opening a received file.<br>" \ mergeTip(m_pRemoteExecCommandline,__tr2qs_ctx("<center>This field contains the command to execute when automatically opening a received file.<br>" \
"<tt>$0</tt> is used in place of the filename</center>","options")); "<tt>$0</tt> is used in place of the filename</center>","options"));
#endif #endif
l = new TQLabel(__tr2qs_ctx("Icon","options"),this); l = new TQLabel(__tr2qs_ctx("Icon","options"),this);
layout()->addWidget(l,8,0); tqlayout()->addWidget(l,8,0);
m_pIcon = new TQLineEdit(this); m_pIcon = new TQLineEdit(this);
layout()->addMultiCellWidget(m_pIcon,8,8,1,2); tqlayout()->addMultiCellWidget(m_pIcon,8,8,1,2);
TQFrame * f = new TQFrame(this); TQFrame * f = new TQFrame(this);
f->setFrameStyle(TQFrame::Sunken | TQFrame::HLine); f->setFrameStyle(TQFrame::Sunken | TQFrame::HLine);
layout()->addMultiCellWidget(f,9,9,0,2); tqlayout()->addMultiCellWidget(f,9,9,0,2);
TQPushButton * b = new TQPushButton(__tr2qs_ctx("&New","options"),this); TQPushButton * b = new TQPushButton(__tr2qs_ctx("&New","options"),this);
connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(newMediaType())); connect(b,TQT_SIGNAL(clicked()),this,TQT_SLOT(newMediaType()));
layout()->addWidget(b,10,1); tqlayout()->addWidget(b,10,1);
m_pDelete = new TQPushButton(__tr2qs_ctx("Re&move","options"),this); m_pDelete = new TQPushButton(__tr2qs_ctx("Re&move","options"),this);
connect(m_pDelete,TQT_SIGNAL(clicked()),this,TQT_SLOT(delMediaType())); connect(m_pDelete,TQT_SIGNAL(clicked()),this,TQT_SLOT(delMediaType()));
layout()->addWidget(m_pDelete,10,2); tqlayout()->addWidget(m_pDelete,10,2);
layout()->setColStretch(1,1); tqlayout()->setColStretch(1,1);
layout()->setColStretch(2,1); tqlayout()->setColStretch(2,1);
layout()->setRowStretch(0,1); tqlayout()->setRowStretch(0,1);
m_pLastItem = 0; m_pLastItem = 0;

@ -26,7 +26,7 @@
#include "optw_messages.h" #include "optw_messages.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include "kvi_tal_vbox.h" #include "kvi_tal_vbox.h"
#include <tqcursor.h> #include <tqcursor.h>
@ -186,7 +186,7 @@ KviStandardColorsOptionsWidget::KviStandardColorsOptionsWidget(TQWidget * parent
addRowSpacer(0,4,3,4); addRowSpacer(0,4,3,4);
layout()->setRowStretch(4,1); tqlayout()->setRowStretch(4,1);
} }
KviStandardColorsOptionsWidget::~KviStandardColorsOptionsWidget() KviStandardColorsOptionsWidget::~KviStandardColorsOptionsWidget()
@ -261,14 +261,14 @@ void KviMessageListViewItem::paintCell(TQPainter * p,const TQColorGroup &,int,in
#ifdef COMPILE_PSEUDO_TRANSPARENCY #ifdef COMPILE_PSEUDO_TRANSPARENCY
if(g_pShadedChildGlobalDesktopBackground) if(g_pShadedChildGlobalDesktopBackground)
{ {
TQPoint pnt = listView()->viewport()->mapToGlobal(TQPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy()))); TQPoint pnt = listView()->viewport()->mapToGlobal(TQPoint(int(p->tqworldMatrix().dx()),int(p->tqworldMatrix().dy())));
p->drawTiledPixmap(0,0,w,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y()); p->drawTiledPixmap(0,0,w,height(),*g_pShadedChildGlobalDesktopBackground,pnt.x(),pnt.y());
} else { } else {
#endif #endif
TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap(); TQPixmap * pix = KVI_OPTION_PIXMAP(KviOption_pixmapIrcViewBackground).pixmap();
if(pix) if(pix)
{ {
TQPoint pnt = listView()->viewportToContents(TQPoint(int(p->worldMatrix().dx()),int(p->worldMatrix().dy()))); TQPoint pnt = listView()->viewportToContents(TQPoint(int(p->tqworldMatrix().dx()),int(p->tqworldMatrix().dy())));
p->fillRect(0,0,w,height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground)); p->fillRect(0,0,w,height(),KVI_OPTION_COLOR(KviOption_colorIrcViewBackground));
p->drawTiledPixmap(0,0,w,height(),*pix,pnt.x(),pnt.y()); p->drawTiledPixmap(0,0,w,height(),*pix,pnt.x(),pnt.y());
} else { } else {
@ -335,7 +335,7 @@ void KviMessageColorListBoxItem::paint(TQPainter * p)
clr = lb->isEnabled() ? KVI_OPTION_MIRCCOLOR(m_iClrIdx) : TQt::gray; clr = lb->isEnabled() ? KVI_OPTION_MIRCCOLOR(m_iClrIdx) : TQt::gray;
p->fillRect(0,0,width(lb),height(lb),clr); p->fillRect(0,0,width(lb),height(lb),clr);
} else { } else {
clr = listBox()->colorGroup().background(); clr = listBox()->tqcolorGroup().background();
KviTalListBoxText::paint(p); KviTalListBoxText::paint(p);
} }
if(isSelected()) if(isSelected())
@ -464,8 +464,8 @@ KviMessageColorsOptionsWidget::KviMessageColorsOptionsWidget(TQWidget * parent)
it = new KviMessageListViewItem(m_pListView,i); it = new KviMessageListViewItem(m_pListView,i);
} }
layout()->setRowStretch(0,1); tqlayout()->setRowStretch(0,1);
layout()->setColStretch(0,1); tqlayout()->setColStretch(0,1);
connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(itemChanged(KviTalListViewItem *))); connect(m_pListView,TQT_SIGNAL(selectionChanged(KviTalListViewItem *)),this,TQT_SLOT(itemChanged(KviTalListViewItem *)));
connect(m_pForeListBox,TQT_SIGNAL(selectionChanged(KviTalListBoxItem *)),this,TQT_SLOT(colorChanged(KviTalListBoxItem *))); connect(m_pForeListBox,TQT_SIGNAL(selectionChanged(KviTalListBoxItem *)),this,TQT_SLOT(colorChanged(KviTalListBoxItem *)));

@ -24,7 +24,7 @@
#include "optw_nickserv.h" #include "optw_nickserv.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_tooltip.h" #include "kvi_tal_tooltip.h"
#include "kvi_tal_listview.h" #include "kvi_tal_listview.h"
#include <tqlineedit.h> #include <tqlineedit.h>
@ -236,7 +236,7 @@ KviNickServOptionsWidget::KviNickServOptionsWidget(TQWidget * parent)
{ {
createLayout(3,3); createLayout(3,3);
TQGridLayout * gl = layout(); TQGridLayout * gl = tqlayout();
KviNickServRuleSet * rs = g_pNickServRuleSet; KviNickServRuleSet * rs = g_pNickServRuleSet;
bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false; bool bNickServEnabled = rs ? (rs->isEnabled() && !rs->isEmpty()) : false;

@ -22,7 +22,7 @@
#include "optw_notify.h" #include "optw_notify.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_settings.h" #include "kvi_settings.h"
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -24,7 +24,7 @@
#include "optw_protection.h" #include "optw_protection.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_settings.h" #include "kvi_settings.h"
#include "kvi_options.h" #include "kvi_options.h"

@ -104,7 +104,7 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(TQWidget * parent)
KviTalGroupBox * gbox = addGroupBox(0,2,1,2,2,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),this); KviTalGroupBox * gbox = addGroupBox(0,2,1,2,2,Qt::Horizontal,__tr2qs_ctx("Configuration","options"),this);
//TQGridLayout * gl = new TQGridLayout(gbox->layout()); //TQGridLayout * gl = new TQGridLayout(gbox->tqlayout());
//gl->setMargin(2); //gl->setMargin(2);
//gl->setSpacing(4); //gl->setSpacing(4);
@ -147,8 +147,8 @@ KviProxyOptionsWidget::KviProxyOptionsWidget(TQWidget * parent)
fillProxyList(); fillProxyList();
layout()->setRowStretch(0,1); tqlayout()->setRowStretch(0,1);
layout()->setColStretch(0,1); tqlayout()->setColStretch(0,1);
m_pContextPopup = new KviTalPopupMenu(this); m_pContextPopup = new KviTalPopupMenu(this);

@ -23,7 +23,7 @@
#include "optw_query.h" #include "optw_query.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -102,7 +102,7 @@ KviNetworkDetailsWidget::KviNetworkDetailsWidget(TQWidget * par,KviIrcNetwork *
TQLabel * l = new TQLabel(szTmp,this); TQLabel * l = new TQLabel(szTmp,this);
l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); l->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel);
l->setAlignment(TQt::AlignCenter); l->tqsetAlignment(TQt::AlignCenter);
l->setMargin(10); l->setMargin(10);
g->addMultiCellWidget(l,0,0,0,3); g->addMultiCellWidget(l,0,0,0,3);
l->setMinimumWidth(200); l->setMinimumWidth(200);
@ -451,7 +451,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(TQWidget * par,KviIrcServer * s)
m_pHeaderLabel = new TQLabel("",this); // the text will be set later m_pHeaderLabel = new TQLabel("",this); // the text will be set later
m_pHeaderLabel->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel); m_pHeaderLabel->setFrameStyle(TQFrame::Raised | TQFrame::StyledPanel);
m_pHeaderLabel->setAlignment(TQt::AlignCenter); m_pHeaderLabel->tqsetAlignment(TQt::AlignCenter);
m_pHeaderLabel->setMargin(10); m_pHeaderLabel->setMargin(10);
g->addMultiCellWidget(m_pHeaderLabel,0,0,0,3); g->addMultiCellWidget(m_pHeaderLabel,0,0,0,3);
m_pHeaderLabel->setMinimumWidth(200); m_pHeaderLabel->setMinimumWidth(200);
@ -732,7 +732,7 @@ KviServerDetailsWidget::KviServerDetailsWidget(TQWidget * par,KviIrcServer * s)
KviPointerList<KviProxy> * proxylist = g_pProxyDataBase->proxyList(); KviPointerList<KviProxy> * proxylist = g_pProxyDataBase->proxyList();
for(KviProxy * p = proxylist->first();p;p = proxylist->next()) for(KviProxy * p = proxylist->first();p;p = proxylist->next())
{ {
m_pProxyEditor->insertItem(TQString("%1:%2").arg(p->hostname()).arg(p->port())); m_pProxyEditor->insertItem(TQString("%1:%2").tqarg(p->hostname()).tqarg(p->port()));
} }
if(m_pProxyEditor->count() > (s->proxy()+2)) if(m_pProxyEditor->count() > (s->proxy()+2))
m_pProxyEditor->setCurrentItem(s->proxy()+2); m_pProxyEditor->setCurrentItem(s->proxy()+2);
@ -1192,10 +1192,10 @@ KviServerOptionsWidget::KviServerOptionsWidget(TQWidget * parent)
fillServerList(); fillServerList();
layout()->setRowStretch(0,1); tqlayout()->setRowStretch(0,1);
//layout()->setColStretch(1,5); //tqlayout()->setColStretch(1,5);
//layout()->setColStretch(2,2); //tqlayout()->setColStretch(2,2);
layout()->setColStretch(0,1); tqlayout()->setColStretch(0,1);
setMinimumWidth(320); setMinimumWidth(320);
} }

@ -22,7 +22,7 @@
#include "optw_ssl.h" #include "optw_ssl.h"
#include <layout.h> #include <tqlayout.h>
#include <kvi_tal_groupbox.h> #include <kvi_tal_groupbox.h>
#include "kvi_options.h" #include "kvi_options.h"

@ -161,7 +161,7 @@ KviTreeTaskBarBackgroundOptionsWidget::KviTreeTaskBarBackgroundOptionsWidget(TQW
m_pVerticalAlign->setCurrentItem(0); m_pVerticalAlign->setCurrentItem(0);
} }
layout()->setRowStretch(1,1); tqlayout()->setRowStretch(1,1);
} }

@ -68,7 +68,7 @@ KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(TQWidget * parent)
m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("Automatic detection","options")); m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("Automatic detection","options"));
m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("en","options")); m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("en","options"));
TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homeDirPath()); TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath());
bool bIsDefaultLocale = !KviFileUtils::fileExists(szLangFile); bool bIsDefaultLocale = !KviFileUtils::fileExists(szLangFile);
//We Have setted locale, but not restarted kvirc //We Have setted locale, but not restarted kvirc
@ -121,7 +121,7 @@ void KviTextEncodingOptionsWidget::commit()
} }
idx=m_pForcedLocaleCombo->currentItem(); idx=m_pForcedLocaleCombo->currentItem();
TQString szLangFile=TQString("%1/.kvirc_force_locale").arg(TQDir::homeDirPath()); TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath());
if(idx==0) { if(idx==0) {
if(KviFileUtils::fileExists(szLangFile)) if(KviFileUtils::fileExists(szLangFile))
KviFileUtils::removeFile(szLangFile); KviFileUtils::removeFile(szLangFile);

@ -27,7 +27,7 @@
#include "kvi_locale.h" #include "kvi_locale.h"
#include "kvi_filedialog.h" #include "kvi_filedialog.h"
#include <layout.h> #include <tqlayout.h>
#include <tqcursor.h> #include <tqcursor.h>
#include "kvi_tal_hbox.h" #include "kvi_tal_hbox.h"
@ -37,7 +37,7 @@ KviTextIconEditor::KviTextIconEditor(TQWidget * par,KviTextIcon * icon,KviTextIc
{ {
m_pIconButton=new TQToolButton(this); m_pIconButton=new TQToolButton(this);
m_pBrowseButton=new TQToolButton(this); m_pBrowseButton=new TQToolButton(this);
m_pBrowseButton->setSizePolicy(TQSizePolicy(TQSizePolicy::Maximum,TQSizePolicy::Maximum)); m_pBrowseButton->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Maximum,TQSizePolicy::Maximum));
m_pBrowseButton->setText("..."); m_pBrowseButton->setText("...");
m_pIcon = icon; m_pIcon = icon;
m_pPopup = 0; m_pPopup = 0;
@ -160,14 +160,14 @@ KviTextIconsOptionsWidget::KviTextIconsOptionsWidget(TQWidget * parent)
++it; ++it;
} }
layout()->addMultiCellWidget(m_pTable,0,0,0,1); tqlayout()->addMultiCellWidget(m_pTable,0,0,0,1);
m_pAdd = new TQPushButton(__tr2qs_ctx("Add","options"),this); m_pAdd = new TQPushButton(__tr2qs_ctx("Add","options"),this);
layout()->addWidget(m_pAdd,1,0); tqlayout()->addWidget(m_pAdd,1,0);
connect(m_pAdd,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); connect(m_pAdd,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked()));
m_pDel = new TQPushButton(__tr2qs_ctx("Delete","options"),this); m_pDel = new TQPushButton(__tr2qs_ctx("Delete","options"),this);
layout()->addWidget(m_pDel,1,1); tqlayout()->addWidget(m_pDel,1,1);
connect(m_pDel,TQT_SIGNAL(clicked()),this,TQT_SLOT(delClicked())); connect(m_pDel,TQT_SIGNAL(clicked()),this,TQT_SLOT(delClicked()));
m_pDel->setEnabled(false); m_pDel->setEnabled(false);

@ -24,7 +24,7 @@
#include "optw_tools.h" #include "optw_tools.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_settings.h" #include "kvi_settings.h"
#include "kvi_options.h" #include "kvi_options.h"

@ -33,7 +33,7 @@ KviTopicLabelLookOptionsWidget::KviTopicLabelLookOptionsWidget(TQWidget *p):KviO
addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Background color","options"), KviOption_colorLabelBackground); addColorSelector(0, 2, 0, 2, __tr2qs_ctx("Background color","options"), KviOption_colorLabelBackground);
addPixmapSelector(0, 3, 0, 3, __tr2qs_ctx("Background image","options"), KviOption_pixmapLabelBackground); addPixmapSelector(0, 3, 0, 3, __tr2qs_ctx("Background image","options"), KviOption_pixmapLabelBackground);
layout()->setRowStretch(3, 1); tqlayout()->setRowStretch(3, 1);
} }
KviTopicLabelLookOptionsWidget::~KviTopicLabelLookOptionsWidget() KviTopicLabelLookOptionsWidget::~KviTopicLabelLookOptionsWidget()

@ -23,7 +23,7 @@
#include "optw_tray.h" #include "optw_tray.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_tooltip.h" #include "kvi_tal_tooltip.h"
#include "kvi_options.h" #include "kvi_options.h"

@ -23,7 +23,7 @@
#include "optw_uparser.h" #include "optw_uparser.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -24,7 +24,7 @@
#include "optw_urlhandlers.h" #include "optw_urlhandlers.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"

@ -21,7 +21,7 @@
// //
#include "optw_userlist.h" #include "optw_userlist.h"
#include <layout.h> #include <tqlayout.h>
#include "kvi_options.h" #include "kvi_options.h"
#include "kvi_locale.h" #include "kvi_locale.h"
@ -178,8 +178,8 @@ KviUserListLookBackgroundOptionsWidget::KviUserListLookBackgroundOptionsWidget(T
//layout()->setColStretch(0,1); //tqlayout()->setColStretch(0,1);
layout()->setRowStretch(1,1); tqlayout()->setRowStretch(1,1);
} }
KviUserListLookBackgroundOptionsWidget::~KviUserListLookBackgroundOptionsWidget() KviUserListLookBackgroundOptionsWidget::~KviUserListLookBackgroundOptionsWidget()

@ -43,7 +43,7 @@
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <tqdir.h> #include <tqdir.h>
#include <tqsplitter.h> #include <tqsplitter.h>
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqtooltip.h> #include <tqtooltip.h>
#include "kvi_pointerhashtable.h" #include "kvi_pointerhashtable.h"
@ -1372,7 +1372,7 @@ TQPixmap * KviPopupEditorWindow::myIconPtr()
void KviPopupEditorWindow::resizeEvent(TQResizeEvent *e) void KviPopupEditorWindow::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pBase->sizeHint().height(); int hght = m_pBase->tqsizeHint().height();
m_pEditor->setGeometry(0,0,width(),height()- hght); m_pEditor->setGeometry(0,0,width(),height()- hght);
m_pBase->setGeometry(0,height() - hght,width(),hght); m_pBase->setGeometry(0,height() - hght,width(),hght);
} }

@ -38,7 +38,7 @@
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <tqsplitter.h> #include <tqsplitter.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_vbox.h" #include "kvi_tal_vbox.h"
#include "kvi_tal_popupmenu.h" #include "kvi_tal_popupmenu.h"
#include <tqtooltip.h> #include <tqtooltip.h>
@ -502,7 +502,7 @@ TQPixmap * KviRawEditorWindow::myIconPtr()
void KviRawEditorWindow::resizeEvent(TQResizeEvent *e) void KviRawEditorWindow::resizeEvent(TQResizeEvent *e)
{ {
int hght = m_pBase->sizeHint().height(); int hght = m_pBase->tqsizeHint().height();
m_pEditor->setGeometry(0,0,width(),height()- hght); m_pEditor->setGeometry(0,0,width(),height()- hght);
m_pBase->setGeometry(0,height() - hght,width(),hght); m_pBase->setGeometry(0,height() - hght,width(),hght);
} }

@ -40,7 +40,7 @@
#include "kvi_stringconversion.h" #include "kvi_stringconversion.h"
#include "kvi_options.h" #include "kvi_options.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <tq3header.h> #include <tq3header.h>
@ -312,7 +312,7 @@ KviRegisteredUsersDialog::~KviRegisteredUsersDialog()
if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = TQRect(pos().x(),pos().y(), if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = TQRect(pos().x(),pos().y(),
size().width(),size().height()); size().width(),size().height());
#else #else
if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = geometry(); if(!parent())KVI_OPTION_RECT(KviOption_rectRegisteredUsersDialogGeometry) = tqgeometry();
#endif #endif
g_pRegisteredUsersDialog = 0; g_pRegisteredUsersDialog = 0;
@ -329,7 +329,7 @@ void KviRegisteredUsersDialog::itemPressed(KviTalListViewItem *it,const TQPoint
{ {
KviRegisteredUsersDialogItem *i = (KviRegisteredUsersDialogItem *)it; KviRegisteredUsersDialogItem *i = (KviRegisteredUsersDialogItem *)it;
TQRect r = m_pListView->itemRect(i); TQRect r = m_pListView->tqitemRect(i);
int daw = m_pListView->columnWidth(0); int daw = m_pListView->columnWidth(0);
TQPoint ppp = m_pListView->mapFromGlobal(pnt); TQPoint ppp = m_pListView->mapFromGlobal(pnt);

@ -41,7 +41,7 @@
#include "kvi_stringconversion.h" #include "kvi_stringconversion.h"
#include "kvi_options.h" #include "kvi_options.h"
#include <layout.h> #include <tqlayout.h>
#include <tqlabel.h> #include <tqlabel.h>
#include <tqgroupbox.h> #include <tqgroupbox.h>
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
@ -217,7 +217,7 @@ KviReguserMaskDialog::KviReguserMaskDialog(TQWidget * p,KviIrcMask * m)
TQGridLayout * g = new TQGridLayout(this,3,2,4,4); TQGridLayout * g = new TQGridLayout(this,3,2,4,4);
TQLabel * l = new TQLabel(__tr2qs("Insert a mask for this user.<br>It can contain the wildcard characters '*' and '?'."),this); TQLabel * l = new TQLabel(__tr2qs("Insert a mask for this user.<br>It can contain the wildcard characters '*' and '?'."),this);
//l->setAlignment(TQt::AlignCenter); //l->tqsetAlignment(TQt::AlignCenter);
g->addMultiCellWidget(l,0,0,0,1); g->addMultiCellWidget(l,0,0,0,1);
KviTalHBox * b = new KviTalHBox(this); KviTalHBox * b = new KviTalHBox(this);
@ -225,29 +225,29 @@ KviReguserMaskDialog::KviReguserMaskDialog(TQWidget * p,KviIrcMask * m)
m_pNickEdit = new TQLineEdit(b); m_pNickEdit = new TQLineEdit(b);
//m_pNickEdit->setMinimumWidth(120); //m_pNickEdit->setMinimumWidth(120);
m_pNickEdit->setAlignment(TQt::AlignRight); m_pNickEdit->tqsetAlignment(TQt::AlignRight);
#ifdef COMPILE_INFO_TIPS #ifdef COMPILE_INFO_TIPS
TQToolTip::add(m_pNickEdit,__tr2qs("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>")); TQToolTip::add(m_pNickEdit,__tr2qs("<center>This the <b>nickname</b> that will match this user, default value is the registered name.</center>"));
#endif #endif
l = new TQLabel("<center><b>!</b></center>",b); l = new TQLabel("<center><b>!</b></center>",b);
l->setAlignment(TQt::AlignCenter); l->tqsetAlignment(TQt::AlignCenter);
//l->setMinimumWidth(40); //l->setMinimumWidth(40);
m_pUserEdit = new TQLineEdit(b); m_pUserEdit = new TQLineEdit(b);
//m_pUserEdit->setMinimumWidth(120); //m_pUserEdit->setMinimumWidth(120);
m_pUserEdit->setAlignment(TQt::AlignCenter); m_pUserEdit->tqsetAlignment(TQt::AlignCenter);
#ifdef COMPILE_INFO_TIPS #ifdef COMPILE_INFO_TIPS
TQToolTip::add(m_pUserEdit,__tr2qs("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>")); TQToolTip::add(m_pUserEdit,__tr2qs("<center>This the <b>username</b> that will match this user. <b>*</b> will match any username.</center>"));
#endif #endif
l = new TQLabel("<center><b>@</b></center>",b); l = new TQLabel("<center><b>@</b></center>",b);
l->setAlignment(TQt::AlignCenter); l->tqsetAlignment(TQt::AlignCenter);
//l->setMinimumWidth(40); //l->setMinimumWidth(40);
m_pHostEdit = new TQLineEdit(b); m_pHostEdit = new TQLineEdit(b);
//m_pHostEdit->setMinimumWidth(120); //m_pHostEdit->setMinimumWidth(120);
m_pHostEdit->setAlignment(TQt::AlignLeft); m_pHostEdit->tqsetAlignment(TQt::AlignLeft);
#ifdef COMPILE_INFO_TIPS #ifdef COMPILE_INFO_TIPS
TQToolTip::add(m_pHostEdit,__tr2qs("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>")); TQToolTip::add(m_pHostEdit,__tr2qs("<center>This the <b>hostname</b> that will match this user. <b>*</b> will match any hostname.</center>"));
#endif #endif
@ -460,28 +460,28 @@ KviRegisteredUserEntryDialog::KviRegisteredUserEntryDialog(TQWidget *p,KviRegist
TQGroupBox * gb = new TQGroupBox(__tr2qs("Ignore features"),vb); TQGroupBox * gb = new TQGroupBox(__tr2qs("Ignore features"),vb);
connect(m_pIgnoreEnabled,TQT_SIGNAL(toggled(bool)),gb,TQT_SLOT(setEnabled(bool))); connect(m_pIgnoreEnabled,TQT_SIGNAL(toggled(bool)),gb,TQT_SLOT(setEnabled(bool)));
TQVBoxLayout * layout = new TQVBoxLayout(gb,20,3); TQVBoxLayout * tqlayout = new TQVBoxLayout(gb,20,3);
m_pIgnoreQuery = new KviStyledCheckBox(__tr2qs("Ignore query-messages"),gb); m_pIgnoreQuery = new KviStyledCheckBox(__tr2qs("Ignore query-messages"),gb);
layout->addWidget(m_pIgnoreQuery); tqlayout->addWidget(m_pIgnoreQuery);
m_pIgnoreChannel = new KviStyledCheckBox(__tr2qs("Ignore channel-messages"),gb); m_pIgnoreChannel = new KviStyledCheckBox(__tr2qs("Ignore channel-messages"),gb);
layout->addWidget(m_pIgnoreChannel); tqlayout->addWidget(m_pIgnoreChannel);
m_pIgnoreNotice = new KviStyledCheckBox(__tr2qs("Ignore notice-messages"),gb); m_pIgnoreNotice = new KviStyledCheckBox(__tr2qs("Ignore notice-messages"),gb);
layout->addWidget(m_pIgnoreNotice); tqlayout->addWidget(m_pIgnoreNotice);
m_pIgnoreCtcp = new KviStyledCheckBox(__tr2qs("Ignore ctcp-messages"),gb); m_pIgnoreCtcp = new KviStyledCheckBox(__tr2qs("Ignore ctcp-messages"),gb);
layout->addWidget(m_pIgnoreCtcp); tqlayout->addWidget(m_pIgnoreCtcp);
m_pIgnoreInvite = new KviStyledCheckBox(__tr2qs("Ignore invites"),gb); m_pIgnoreInvite = new KviStyledCheckBox(__tr2qs("Ignore invites"),gb);
layout->addWidget(m_pIgnoreInvite); tqlayout->addWidget(m_pIgnoreInvite);
m_pIgnoreDcc = new KviStyledCheckBox(__tr2qs("Ignore DCCs"),gb); m_pIgnoreDcc = new KviStyledCheckBox(__tr2qs("Ignore DCCs"),gb);
layout->addWidget(m_pIgnoreDcc); tqlayout->addWidget(m_pIgnoreDcc);
TQWidget *w = new TQWidget(vb); TQWidget *w = new TQWidget(vb);
w->setSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored); w->tqsetSizePolicy(TQSizePolicy::Ignored,TQSizePolicy::Ignored);
addTab(vb,__tr2qs("Ignore")); addTab(vb,__tr2qs("Ignore"));

@ -40,7 +40,7 @@
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqwidget.h> #include <tqwidget.h>
#include <layout.h> #include <tqlayout.h>
#include <tqvariant.h> #include <tqvariant.h>
#include <tqframe.h> #include <tqframe.h>
@ -91,7 +91,7 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere
m_pPage1Layout->addWidget(m_pLabel1, 0, 0); m_pPage1Layout->addWidget(m_pLabel1, 0, 0);
m_pEditRealName = new TQLineEdit(m_pPage1); m_pEditRealName = new TQLineEdit(m_pPage1);
//m_pEditRealName->setAlignment(int(TQLineEdit::AlignHCenter)); //m_pEditRealName->tqsetAlignment(int(TQLineEdit::AlignHCenter));
m_pPage1Layout->addWidget(m_pEditRealName,1,0); m_pPage1Layout->addWidget(m_pEditRealName,1,0);
addPage( m_pPage1,__tr2qs("Step 1: Entry Name")); addPage( m_pPage1,__tr2qs("Step 1: Entry Name"));
@ -120,13 +120,13 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere
//KviIrcMask masktempl(szMask.ptr()); //KviIrcMask masktempl(szMask.ptr());
m_pNicknameEdit1 = new TQLineEdit(m_pPage2); m_pNicknameEdit1 = new TQLineEdit(m_pPage2);
m_pNicknameEdit1->setAlignment(TQt::AlignRight); m_pNicknameEdit1->tqsetAlignment(TQt::AlignRight);
if(mask.nick() != "*")m_pNicknameEdit1->setText(mask.nick()); if(mask.nick() != "*")m_pNicknameEdit1->setText(mask.nick());
connect(m_pNicknameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(maskChanged(const TQString &))); connect(m_pNicknameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(maskChanged(const TQString &)));
m_pPage2Layout->addWidget( m_pNicknameEdit1, 1, 0 ); m_pPage2Layout->addWidget( m_pNicknameEdit1, 1, 0 );
m_pUsernameEdit1 = new TQLineEdit(m_pPage2); m_pUsernameEdit1 = new TQLineEdit(m_pPage2);
m_pUsernameEdit1->setAlignment(TQt::AlignHCenter); m_pUsernameEdit1->tqsetAlignment(TQt::AlignHCenter);
if(mask.hasUser())m_pUsernameEdit1->setText(mask.user()); if(mask.hasUser())m_pUsernameEdit1->setText(mask.user());
connect(m_pUsernameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(maskChanged(const TQString &))); connect(m_pUsernameEdit1,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(maskChanged(const TQString &)));
m_pPage2Layout->addWidget(m_pUsernameEdit1,1,2); m_pPage2Layout->addWidget(m_pUsernameEdit1,1,2);
@ -137,11 +137,11 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere
m_pPage2Layout->addWidget(m_pHostEdit1,1,4); m_pPage2Layout->addWidget(m_pHostEdit1,1,4);
m_pNicknameEdit2 = new TQLineEdit(m_pPage2); m_pNicknameEdit2 = new TQLineEdit(m_pPage2);
m_pNicknameEdit2->setAlignment(TQt::AlignRight); m_pNicknameEdit2->tqsetAlignment(TQt::AlignRight);
m_pPage2Layout->addWidget(m_pNicknameEdit2,2,0); m_pPage2Layout->addWidget(m_pNicknameEdit2,2,0);
m_pUsernameEdit2 = new TQLineEdit(m_pPage2); m_pUsernameEdit2 = new TQLineEdit(m_pPage2);
m_pUsernameEdit2->setAlignment(TQt::AlignHCenter); m_pUsernameEdit2->tqsetAlignment(TQt::AlignHCenter);
m_pPage2Layout->addWidget(m_pUsernameEdit2,2,2); m_pPage2Layout->addWidget(m_pUsernameEdit2,2,2);
m_pHostEdit2 = new TQLineEdit(m_pPage2); m_pHostEdit2 = new TQLineEdit(m_pPage2);
@ -149,22 +149,22 @@ KviRegistrationWizard::KviRegistrationWizard(const char * startMask,KviRegistere
TextLabel10_2 = new TQLabel(m_pPage2); TextLabel10_2 = new TQLabel(m_pPage2);
TextLabel10_2->setText("<center><b>!</b></center>"); TextLabel10_2->setText("<center><b>!</b></center>");
TextLabel10_2->setAlignment(int(TQt::AlignCenter)); TextLabel10_2->tqsetAlignment(int(TQt::AlignCenter));
m_pPage2Layout->addWidget(TextLabel10_2,2,1); m_pPage2Layout->addWidget(TextLabel10_2,2,1);
TextLabel10 = new TQLabel(m_pPage2); TextLabel10 = new TQLabel(m_pPage2);
TextLabel10->setText("<center><b>!</b></center>"); TextLabel10->setText("<center><b>!</b></center>");
TextLabel10->setAlignment(int(TQt::AlignCenter)); TextLabel10->tqsetAlignment(int(TQt::AlignCenter));
m_pPage2Layout->addWidget(TextLabel10,1,1); m_pPage2Layout->addWidget(TextLabel10,1,1);
TextLabel10_3 = new TQLabel(m_pPage2); TextLabel10_3 = new TQLabel(m_pPage2);
TextLabel10_3->setText("<center><b>@</b></center>"); TextLabel10_3->setText("<center><b>@</b></center>");
TextLabel10_3->setAlignment(int(TQt::AlignCenter)); TextLabel10_3->tqsetAlignment(int(TQt::AlignCenter));
m_pPage2Layout->addWidget(TextLabel10_3,1,3); m_pPage2Layout->addWidget(TextLabel10_3,1,3);
TextLabel10_3_2 = new TQLabel(m_pPage2); TextLabel10_3_2 = new TQLabel(m_pPage2);
TextLabel10_3_2->setText("<center><b>@</b></center>"); TextLabel10_3_2->setText("<center><b>@</b></center>");
TextLabel10_3_2->setAlignment(int(TQt::AlignCenter)); TextLabel10_3_2->tqsetAlignment(int(TQt::AlignCenter));
m_pPage2Layout->addWidget(TextLabel10_3_2,2,3); m_pPage2Layout->addWidget(TextLabel10_3_2,2,3);
addPage(m_pPage2,__tr2qs("Step 2: Mask Selection")); addPage(m_pPage2,__tr2qs("Step 2: Mask Selection"));

@ -42,8 +42,8 @@ bool g_bFoundMirc;
#include <tqdir.h> #include <tqdir.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqvalidator.h> #include <tqvalidator.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_hbox.h" #include "kvi_tal_hbox.h"
#ifdef COMPILE_ON_WINDOWS #ifdef COMPILE_ON_WINDOWS
@ -103,7 +103,7 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w)
m_pVBox = new KviTalVBox(this); m_pVBox = new KviTalVBox(this);
m_pVBox->setSpacing(4); m_pVBox->setSpacing(4);
m_pVBox->setMargin(0); m_pVBox->setMargin(0);
//m_pVBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding)); //m_pVBox->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding));
//m_pVBox->setBackgroundColor(TQColor(0,80,0)); //m_pVBox->setBackgroundColor(TQColor(0,80,0));
//m_pVBox->setMaximumHeight(450); //m_pVBox->setMaximumHeight(450);
g->addWidget(m_pVBox,0,1); g->addWidget(m_pVBox,0,1);
@ -111,7 +111,7 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w)
g->setColStretch(1,1); g->setColStretch(1,1);
TQLabel * l = new TQLabel(m_pVBox); TQLabel * l = new TQLabel(m_pVBox);
l->setAlignment(TQt::AlignAuto | TQt::AlignTop); l->tqsetAlignment(TQt::AlignAuto | TQt::AlignTop);
/* /*
TQString szHeader = "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"margin:0px;padding:0px;\" width=\"100%\"><tr><td bgcolor=\"#303030\">" \ TQString szHeader = "<table border=\"0\" cellpadding=\"4\" cellspacing=\"0\" style=\"margin:0px;padding:0px;\" width=\"100%\"><tr><td bgcolor=\"#303030\">" \
"<h1><font color=\"#FFFFFF\">KVIrc " KVI_VERSION "</font></h1>" \ "<h1><font color=\"#FFFFFF\">KVIrc " KVI_VERSION "</font></h1>" \
@ -120,7 +120,7 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w)
TQString szHeader = "<h1><font color=\"#FFFFFF\">&nbsp;KVIrc " KVI_VERSION "</font></h1>"; TQString szHeader = "<h1><font color=\"#FFFFFF\">&nbsp;KVIrc " KVI_VERSION "</font></h1>";
l->setText(szHeader); l->setText(szHeader);
l->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel); l->setFrameStyle(TQFrame::Sunken | TQFrame::StyledPanel);
l->setAlignment(TQt::AlignAuto | TQt::AlignVCenter); l->tqsetAlignment(TQt::AlignAuto | TQt::AlignVCenter);
l->setMargin(0); l->setMargin(0);
l->setBackgroundColor(TQColor(48,48,48)); l->setBackgroundColor(TQColor(48,48,48));
@ -128,7 +128,7 @@ KviSetupPage::KviSetupPage(KviSetupWizard * w)
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
m_pTextLabel->setWordWrap(true); m_pTextLabel->setWordWrap(true);
#endif #endif
m_pTextLabel->setAlignment(TQt::AlignJustify | TQt::AlignTop); m_pTextLabel->tqsetAlignment(TQt::AlignJustify | TQt::AlignTop);
m_pVBox->setStretchFactor(m_pTextLabel,1); m_pVBox->setStretchFactor(m_pTextLabel,1);
} }
@ -673,7 +673,7 @@ void KviSetupWizard::showEvent(TQShowEvent *e)
if(ww < 770)ww = 770; if(ww < 770)ww = 770;
} }
//wh = sizeHint().height(); //wh = tqsizeHint().height();
setGeometry((w - ww) / 2,(h - wh) / 2,ww,wh); setGeometry((w - ww) / 2,(h - wh) / 2,ww,wh);
@ -736,7 +736,7 @@ void KviSetupWizard::chooseOldDataPath()
__tr2qs("Do not overwrite folder? - KVIrc"), __tr2qs("Do not overwrite folder? - KVIrc"),
tqtr("A folder %1 seems to be not a valid KVIrc settings folder." tqtr("A folder %1 seems to be not a valid KVIrc settings folder."
"Do you want to use it anyway?") "Do you want to use it anyway?")
.arg( szBuffer ), .tqarg( szBuffer ),
__tr2qs("&Yes"), __tr2qs("&No"), __tr2qs("&Yes"), __tr2qs("&No"),
TQString(), 0, 1 ) == 0 TQString(), 0, 1 ) == 0
) { ) {
@ -1005,7 +1005,7 @@ void KviSetupWizard::accept()
#ifndef COMPILE_ON_WINDOWS #ifndef COMPILE_ON_WINDOWS
// Make local->global link // Make local->global link
TQString localPath = TQString("%1/global").arg(g_pApp->m_szLocalKvircDir); TQString localPath = TQString("%1/global").tqarg(g_pApp->m_szLocalKvircDir);
unlink(TQTextCodec::codecForLocale()->fromUnicode(localPath).data()); unlink(TQTextCodec::codecForLocale()->fromUnicode(localPath).data());
symlink(TQTextCodec::codecForLocale()->fromUnicode(g_pApp->m_szGlobalKvircDir).data(),TQTextCodec::codecForLocale()->fromUnicode(localPath).data()); symlink(TQTextCodec::codecForLocale()->fromUnicode(g_pApp->m_szGlobalKvircDir).data(),TQTextCodec::codecForLocale()->fromUnicode(localPath).data());
#endif #endif

@ -44,7 +44,7 @@
#include <tqsplitter.h> #include <tqsplitter.h>
#include "kvi_tal_hbox.h" #include "kvi_tal_hbox.h"
#include "kvi_tal_vbox.h" #include "kvi_tal_vbox.h"
#include <layout.h> #include <tqlayout.h>
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include <tqmessagebox.h> #include <tqmessagebox.h>
#include <tqfileinfo.h> #include <tqfileinfo.h>
@ -115,7 +115,7 @@ KviSharedFileEditDialog::KviSharedFileEditDialog(TQWidget * par,KviSharedFile *
m_pExpireDateTimeEdit->setEnabled(f->expires()); m_pExpireDateTimeEdit->setEnabled(f->expires());
} else { } else {
m_pExpireCheckBox->setChecked(false); m_pExpireCheckBox->setChecked(false);
m_pExpireDateTimeEdit->setDateTime(TQDateTime::currentDateTime()); m_pExpireDateTimeEdit->setDateTime(TQDateTime::tqcurrentDateTime());
m_pExpireDateTimeEdit->setEnabled(false); m_pExpireDateTimeEdit->setEnabled(false);
} }
@ -151,7 +151,7 @@ void KviSharedFileEditDialog::okClicked()
TQString szPath = m_pFilePathEdit->text(); TQString szPath = m_pFilePathEdit->text();
TQDateTime dt = m_pExpireDateTimeEdit->dateTime(); TQDateTime dt = m_pExpireDateTimeEdit->dateTime();
bool bExpires = m_pExpireCheckBox->isChecked(); bool bExpires = m_pExpireCheckBox->isChecked();
if(bExpires && (dt <= TQDateTime::currentDateTime())) if(bExpires && (dt <= TQDateTime::tqcurrentDateTime()))
{ {
TQMessageBox::warning(this,__tr2qs_ctx("Invalid expire time","sharedfileswindow"), TQMessageBox::warning(this,__tr2qs_ctx("Invalid expire time","sharedfileswindow"),
__tr2qs_ctx("The expire date/time is in the past: please either remove the \"expires\"" \ __tr2qs_ctx("The expire date/time is in the past: please either remove the \"expires\"" \
@ -336,7 +336,7 @@ void KviSharedFilesWindow::tipRequest(KviDynamicToolTip * tip,const TQPoint &pnt
KviSharedFilesItem * it = (KviSharedFilesItem *)m_pListView->itemAt(pnt); KviSharedFilesItem * it = (KviSharedFilesItem *)m_pListView->itemAt(pnt);
if(!it)return; if(!it)return;
TQString txt = it->transfer()->tipText(); TQString txt = it->transfer()->tipText();
tip->tip(m_pListView->itemRect(it),txt); tip->tip(m_pListView->tqitemRect(it),txt);
} }
*/ */
@ -411,7 +411,7 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const TQPoi
if(fi.exists()) if(fi.exists())
{ {
tmp += "<nobr>"; tmp += "<nobr>";
tmp += __tr2qs_ctx("Size: %1 bytes","filetransferwindow").arg(fi.size()); tmp += __tr2qs_ctx("Size: %1 bytes","filetransferwindow").tqarg(fi.size());
tmp += "</nobr><br>"; tmp += "</nobr><br>";
} }
@ -592,10 +592,10 @@ void KviSharedFilesWindow::copyLocalFileToClipboard()
if(!t)return; if(!t)return;
TQString tmp = t->localFileName(); TQString tmp = t->localFileName();
if(tmp.isEmpty())return; if(tmp.isEmpty())return;
TQApplication::clipboard()->setSelectionMode(false); TQApplication::tqclipboard()->setSelectionMode(false);
TQApplication::clipboard()->setText(tmp); TQApplication::tqclipboard()->setText(tmp);
TQApplication::clipboard()->setSelectionMode(true); TQApplication::tqclipboard()->setSelectionMode(true);
TQApplication::clipboard()->setText(tmp); TQApplication::tqclipboard()->setText(tmp);
} }
void KviSharedFilesWindow::openLocalFileFolder() void KviSharedFilesWindow::openLocalFileFolder()
@ -679,9 +679,9 @@ void KviSharedFilesWindow::resizeEvent(TQResizeEvent *e)
//m_pInput->setGeometry(0,height() - h,width(),h); //m_pInput->setGeometry(0,height() - h,width(),h);
} }
TQSize KviSharedFilesWindow::sizeHint() const TQSize KviSharedFilesWindow::tqsizeHint() const
{ {
return m_pSplitter->sizeHint(); return m_pSplitter->tqsizeHint();
} }
void KviSharedFilesWindow::fillCaptionBuffers() void KviSharedFilesWindow::fillCaptionBuffers()

@ -102,7 +102,7 @@ protected:
virtual void resizeEvent(TQResizeEvent *e); virtual void resizeEvent(TQResizeEvent *e);
virtual void getBaseLogFileName(KviStr &buffer); virtual void getBaseLogFileName(KviStr &buffer);
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
protected slots: protected slots:
void fillFileView(); void fillFileView();
void sharedFileAdded(KviSharedFile * f); void sharedFileAdded(KviSharedFile * f);

@ -67,9 +67,9 @@ void KviSocketSpyWindow::resizeEvent(TQResizeEvent *e)
m_pSplitter->setGeometry(0,0,width(),height()); m_pSplitter->setGeometry(0,0,width(),height());
} }
TQSize KviSocketSpyWindow::sizeHint() const TQSize KviSocketSpyWindow::tqsizeHint() const
{ {
return m_pIrcView->sizeHint(); return m_pIrcView->tqsizeHint();
} }
void KviSocketSpyWindow::getBaseLogFileName(KviStr &buffer) void KviSocketSpyWindow::getBaseLogFileName(KviStr &buffer)

@ -42,7 +42,7 @@ protected:
virtual void getBaseLogFileName(KviStr &buffer); virtual void getBaseLogFileName(KviStr &buffer);
virtual void applyOptions(); virtual void applyOptions();
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
virtual void incomingMessage(const char * message); virtual void incomingMessage(const char * message);
// message is NOT null terminated! For proxy connections it might spit out binary data! // message is NOT null terminated! For proxy connections it might spit out binary data!
virtual void outgoingMessage(const char * message,int len); virtual void outgoingMessage(const char * message,int len);

@ -28,7 +28,7 @@
#include <tqtimer.h> #include <tqtimer.h>
#include <tqstringlist.h> #include <tqstringlist.h>
#include <clipboard.h> #include <tqclipboard.h>
extern KviPointerList<SPasteController> * g_pControllerList; extern KviPointerList<SPasteController> * g_pControllerList;

@ -35,7 +35,7 @@
#include "kvi_out.h" #include "kvi_out.h"
#include <tqfile.h> #include <tqfile.h>
#include <clipboard.h> #include <tqclipboard.h>
#ifndef COMPILE_ON_WINDOWS #ifndef COMPILE_ON_WINDOWS
#include <unistd.h> #include <unistd.h>

@ -35,7 +35,7 @@
#include "kvi_kvs_arraycast.h" #include "kvi_kvs_arraycast.h"
#include <tqregexp.h> #include <tqregexp.h>
#include <clipboard.h> #include <tqclipboard.h>
#ifdef COMPILE_SSL_SUPPORT #ifdef COMPILE_SSL_SUPPORT
#include <openssl/evp.h> #include <openssl/evp.h>
@ -102,7 +102,7 @@ static bool str_kvs_fnc_fromclipboard(KviKvsModuleFunctionCall * c)
TQString szString; TQString szString;
KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETERS_END(c) KVSM_PARAMETERS_END(c)
TQClipboard *cb = TQApplication::clipboard(); TQClipboard *cb = TQApplication::tqclipboard();
szString = cb->text(TQClipboard::Clipboard); szString = cb->text(TQClipboard::Clipboard);
c->returnValue()->setString(szString); c->returnValue()->setString(szString);
return true; return true;
@ -132,7 +132,7 @@ static bool str_kvs_cmd_toClipboard(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue)
KVSM_PARAMETERS_END(c) KVSM_PARAMETERS_END(c)
TQClipboard *cb = TQApplication::clipboard(); TQClipboard *cb = TQApplication::tqclipboard();
cb->setText(szValue, TQClipboard::Clipboard ); cb->setText(szValue, TQClipboard::Clipboard );
return true; return true;
} }
@ -1360,17 +1360,17 @@ static bool str_kvs_fnc_word(KviKvsModuleFunctionCall * c)
int len = szString.length(); int len = szString.length();
while (idx<len) while (idx<len)
{ {
TQChar szTmp = szString[idx].unicode(); TQChar szTmp = szString[idx].tqunicode();
while (szTmp.isSpace()) while (szTmp.isSpace())
{ {
idx++; idx++;
szTmp = szString[idx].unicode(); szTmp = szString[idx].tqunicode();
} }
begin = idx; begin = idx;
while (idx<len && !szTmp.isSpace()) while (idx<len && !szTmp.isSpace())
{ {
idx++; idx++;
szTmp = szString[idx].unicode(); szTmp = szString[idx].tqunicode();
} }
if (iOccurence == (kvs_int_t)cnt) if (iOccurence == (kvs_int_t)cnt)
{ {
@ -1433,18 +1433,18 @@ static bool str_kvs_fnc_token(KviKvsModuleFunctionCall * c)
int len = szString.length(); int len = szString.length();
while (idx<len) while (idx<len)
{ {
TQChar szTmp = szString[idx].unicode(); TQChar szTmp = szString[idx].tqunicode();
// while (szTmp==sep) // while (szTmp==sep)
while (sep.contains(szTmp)) while (sep.contains(szTmp))
{ {
idx++; idx++;
szTmp = szString[idx].unicode(); szTmp = szString[idx].tqunicode();
} }
begin = idx; begin = idx;
while (idx<len && !sep.contains(szTmp)) while (idx<len && !sep.contains(szTmp))
{ {
idx++; idx++;
szTmp = szString[idx].unicode(); szTmp = szString[idx].tqunicode();
} }
if (n == cnt) if (n == cnt)
{ {
@ -1489,13 +1489,13 @@ static bool str_kvs_fnc_charsum(KviKvsModuleFunctionCall * c)
{ {
while(idx < len) while(idx < len)
{ {
sum += szString[idx].lower().unicode(); sum += szString[idx].lower().tqunicode();
idx++; idx++;
} }
} else { } else {
while(idx < len) while(idx < len)
{ {
sum += szString[idx].unicode(); sum += szString[idx].tqunicode();
idx++; idx++;
} }
} }
@ -1963,7 +1963,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
if(fmt) if(fmt)
{ {
TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * allocsize); TQChar * buffer = (TQChar *)kvi_malloc(sizeof(TQChar) * allocsize);
//TQChar * p = (TQChar *)s.unicode(); //TQChar * p = (TQChar *)s.tqunicode();
//9999999999999999999999999999999\0 //9999999999999999999999999999999\0
char numberBuffer[1024]; char numberBuffer[1024];
@ -1993,12 +1993,12 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
pVar = vArgs.first(); pVar = vArgs.first();
for(; fmt->unicode() ; ++fmt) for(; fmt->tqunicode() ; ++fmt)
{ {
if(reallen == allocsize)INCREMENT_MEM if(reallen == allocsize)INCREMENT_MEM
//copy up to a '?' //copy up to a '?'
if(fmt->unicode() != '?') if(fmt->tqunicode() != '?')
{ {
*p++ = *fmt; *p++ = *fmt;
reallen++; reallen++;
@ -2006,7 +2006,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
} }
++fmt; //skip this '?' ++fmt; //skip this '?'
switch(fmt->unicode()) switch(fmt->tqunicode())
{ {
case 's': case 's':
{ {
@ -2015,7 +2015,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
if(sz.isEmpty())continue; if(sz.isEmpty())continue;
int len = sz.length(); int len = sz.length();
if((allocsize - reallen) < len)INCREMENT_MEM_BY(len) if((allocsize - reallen) < len)INCREMENT_MEM_BY(len)
const TQChar * ch = sz.unicode(); const TQChar * ch = sz.tqunicode();
while(len--)*p++ = *ch++; while(len--)*p++ = *ch++;
reallen += sz.length(); reallen += sz.length();
pVar = vArgs.next(); pVar = vArgs.next();
@ -2149,7 +2149,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
} }
case '?': case '?':
{ {
if(fmt->unicode()) if(fmt->tqunicode())
{ {
if(reallen == allocsize)INCREMENT_MEM if(reallen == allocsize)INCREMENT_MEM
*p++ = *fmt; *p++ = *fmt;
@ -2171,15 +2171,15 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
int idx = 2; int idx = 2;
while((fmt->unicode() >= '0') && (fmt->unicode() <= '9') && (idx < 6)) while((fmt->tqunicode() >= '0') && (fmt->tqunicode() <= '9') && (idx < 6))
{ {
uPrecision *= 10; uPrecision *= 10;
fmtbuffer[idx] = fmt->unicode(); fmtbuffer[idx] = fmt->tqunicode();
uPrecision += fmtbuffer[idx] - '0'; uPrecision += fmtbuffer[idx] - '0';
fmt++; fmt++;
idx++; idx++;
} }
fmtbuffer[idx] = fmt->unicode(); fmtbuffer[idx] = fmt->tqunicode();
fmtbuffer[idx+1] = 0; fmtbuffer[idx+1] = 0;
if(pVar) if(pVar)
@ -2193,7 +2193,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
c->warning(__tr2qs("Missing argument for a floating point escape sequence, 0.0 assumed")); c->warning(__tr2qs("Missing argument for a floating point escape sequence, 0.0 assumed"));
argRValue = 0; argRValue = 0;
} }
switch(fmt->unicode()) switch(fmt->tqunicode())
{ {
case 'e': case 'e':
case 'E': case 'E':
@ -2212,7 +2212,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
fmt = save; fmt = save;
*p++ = '?'; //write it *p++ = '?'; //write it
reallen++; reallen++;
if(fmt->unicode()) if(fmt->tqunicode())
{ {
if(reallen == allocsize)INCREMENT_MEM if(reallen == allocsize)INCREMENT_MEM
*p++ = *fmt; *p++ = *fmt;
@ -2228,7 +2228,7 @@ static bool str_kvs_fnc_printf(KviKvsModuleFunctionCall * c)
{ {
*p++ = '?'; //write it *p++ = '?'; //write it
reallen++; reallen++;
if(fmt->unicode()) if(fmt->tqunicode())
{ {
if(reallen == allocsize)INCREMENT_MEM if(reallen == allocsize)INCREMENT_MEM
*p++ = *fmt; *p++ = *fmt;

@ -35,7 +35,7 @@
#include "kvi_osinfo.h" #include "kvi_osinfo.h"
#include "kvi_qcstring.h" #include "kvi_qcstring.h"
#include <clipboard.h> #include <tqclipboard.h>
#ifndef COMPILE_ON_WINDOWS #ifndef COMPILE_ON_WINDOWS
#include <sys/utsname.h> #include <sys/utsname.h>
@ -240,7 +240,7 @@ static bool system_kvs_fnc_getenv(KviKvsModuleFunctionCall *c)
static bool system_kvs_fnc_clipboard(KviKvsModuleFunctionCall *c) static bool system_kvs_fnc_clipboard(KviKvsModuleFunctionCall *c)
{ {
c->returnValue()->setString(g_pApp->clipboard()->text(TQClipboard::Clipboard)); c->returnValue()->setString(g_pApp->tqclipboard()->text(TQClipboard::Clipboard));
return true; return true;
} }
@ -275,7 +275,7 @@ static bool system_kvs_cmd_setClipboard(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue)
KVSM_PARAMETERS_END(c) KVSM_PARAMETERS_END(c)
g_pApp->clipboard()->setText(szValue,TQClipboard::Clipboard); g_pApp->tqclipboard()->setText(szValue,TQClipboard::Clipboard);
return true; return true;
} }
@ -307,7 +307,7 @@ static bool system_kvs_cmd_setSelection(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue) KVSM_PARAMETER("data",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue)
KVSM_PARAMETERS_END(c) KVSM_PARAMETERS_END(c)
g_pApp->clipboard()->setText(szValue,TQClipboard::Selection); g_pApp->tqclipboard()->setText(szValue,TQClipboard::Selection);
return true; return true;
} }
@ -337,7 +337,7 @@ static bool system_kvs_cmd_setSelection(KviKvsModuleCommandCall * c)
static bool system_kvs_fnc_selection(KviKvsModuleFunctionCall *c) static bool system_kvs_fnc_selection(KviKvsModuleFunctionCall *c)
{ {
c->returnValue()->setString(g_pApp->clipboard()->text(TQClipboard::Selection)); c->returnValue()->setString(g_pApp->tqclipboard()->text(TQClipboard::Selection));
return true; return true;
} }

@ -117,7 +117,7 @@ void KviTermWidget::resizeEvent(TQResizeEvent *e)
int hght = 0; int hght = 0;
if(m_bIsStandalone) if(m_bIsStandalone)
{ {
hght = m_pCloseButton->sizeHint().height(); hght = m_pCloseButton->tqsizeHint().height();
m_pHBox->setGeometry(1,1,width() - 2,hght + 1); m_pHBox->setGeometry(1,1,width() - 2,hght + 1);
} }
@ -157,18 +157,18 @@ void KviTermWidget::changeColumns(int)
{ {
} }
TQSize KviTermWidget::sizeHint() const TQSize KviTermWidget::tqsizeHint() const
{ {
int hght = 0; int hght = 0;
int wdth = 0; int wdth = 0;
if(m_pKonsoleWidget) if(m_pKonsoleWidget)
{ {
hght += m_pKonsoleWidget->sizeHint().height(); hght += m_pKonsoleWidget->tqsizeHint().height();
wdth = m_pKonsoleWidget->sizeHint().width(); wdth = m_pKonsoleWidget->tqsizeHint().width();
} }
if(m_pCloseButton) if(m_pCloseButton)
{ {
hght += m_pCloseButton->sizeHint().height(); hght += m_pCloseButton->tqsizeHint().height();
} }
return TQSize(wdth + 2,hght + 2); return TQSize(wdth + 2,hght + 2);

@ -60,7 +60,7 @@ protected slots:
void changeColumns(int); void changeColumns(int);
public: public:
TQWidget * konsoleWidget(){ return m_pKonsoleWidget ? m_pKonsoleWidget : this; }; TQWidget * konsoleWidget(){ return m_pKonsoleWidget ? m_pKonsoleWidget : this; };
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
int dummy() const { return 0; }; int dummy() const { return 0; };
protected slots: protected slots:
void konsoleDestroyed(); void konsoleDestroyed();

@ -60,9 +60,9 @@ void KviTermWindow::resizeEvent(TQResizeEvent *e)
if(m_pTermWidget)m_pTermWidget->setGeometry(0,0,width(),height()); if(m_pTermWidget)m_pTermWidget->setGeometry(0,0,width(),height());
} }
TQSize KviTermWindow::sizeHint() const TQSize KviTermWindow::tqsizeHint() const
{ {
return m_pTermWidget ? m_pTermWidget->sizeHint() : KviWindow::sizeHint(); return m_pTermWidget ? m_pTermWidget->tqsizeHint() : KviWindow::tqsizeHint();
} }
void KviTermWindow::fillCaptionBuffers() void KviTermWindow::fillCaptionBuffers()

@ -46,7 +46,7 @@ protected:
virtual void fillCaptionBuffers(); virtual void fillCaptionBuffers();
virtual void resizeEvent(TQResizeEvent *e); virtual void resizeEvent(TQResizeEvent *e);
public: public:
virtual TQSize sizeHint() const; virtual TQSize tqsizeHint() const;
}; };

@ -37,7 +37,7 @@
#include "kvi_msgbox.h" #include "kvi_msgbox.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include "kvi_tal_listbox.h" #include "kvi_tal_listbox.h"
#include <tqlineedit.h> #include <tqlineedit.h>
@ -128,7 +128,7 @@ void KviThemeListBoxItem::paint(TQPainter * p)
int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING; int afterIcon = LVI_BORDER + LVI_ICON_SIZE + LVI_SPACING;
int www = p->window().width() - (afterIcon + LVI_BORDER); int www = p->window().width() - (afterIcon + LVI_BORDER);
m_pText->setWidth(www); m_pText->setWidth(www);
m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,p->window().height() - (LVI_BORDER * 2)),listBox()->viewport()->colorGroup()); m_pText->draw(p,afterIcon,LVI_BORDER,TQRect(afterIcon,LVI_BORDER,www,p->window().height() - (LVI_BORDER * 2)),listBox()->viewport()->tqcolorGroup());
} }
int KviThemeListBoxItem::height(const KviTalListBox * lb) const int KviThemeListBoxItem::height(const KviTalListBox * lb) const
@ -198,7 +198,7 @@ KviThemeManagementDialog::KviThemeManagementDialog(TQWidget * parent)
connect(tb,TQT_SIGNAL(clicked()),this,TQT_SLOT(getMoreThemes())); connect(tb,TQT_SIGNAL(clicked()),this,TQT_SLOT(getMoreThemes()));
TQWidget *w= new TQWidget(hb); TQWidget *w= new TQWidget(hb);
w->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum); w->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum);
m_pListBox = new KviTalListBox(this); m_pListBox = new KviTalListBox(this);
m_pListBox->setMinimumHeight(400); m_pListBox->setMinimumHeight(400);
@ -455,5 +455,5 @@ void KviThemeManagementDialog::tipRequest(KviDynamicToolTip *pTip,const TQPoint
0 0
); );
pTip->tip(m_pListBox->itemRect(it),szThemeDescription); pTip->tip(m_pListBox->tqitemRect(it),szThemeDescription);
} }

@ -25,7 +25,7 @@
#include "packthemedialog.h" #include "packthemedialog.h"
#include "themefunctions.h" #include "themefunctions.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqregexp.h> #include <tqregexp.h>
@ -271,7 +271,7 @@ KviPackThemeDialog::KviPackThemeDialog(TQWidget * pParent,KviPointerList<KviThem
m_pImageLabel = new TQLabel(pPage); m_pImageLabel = new TQLabel(pPage);
m_pImageLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); m_pImageLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel);
m_pImageLabel->setMinimumSize(300,225); m_pImageLabel->setMinimumSize(300,225);
m_pImageLabel->setAlignment(TQt::AlignCenter | TQt::AlignVCenter); m_pImageLabel->tqsetAlignment(TQt::AlignCenter | TQt::AlignVCenter);
pLayout->addWidget(m_pImageLabel,1,0); pLayout->addWidget(m_pImageLabel,1,0);
TQString szFilter = "*.png *.jpg *.xpm"; TQString szFilter = "*.png *.jpg *.xpm";
@ -293,7 +293,7 @@ KviPackThemeDialog::KviPackThemeDialog(TQWidget * pParent,KviPointerList<KviThem
pLayout = new TQGridLayout(pPage,4,1,4,4); pLayout = new TQGridLayout(pPage,4,1,4,4);
pLabel = new TQLabel(pPage); pLabel = new TQLabel(pPage);
pLabel->setText(__tr2qs_ctx("Here you must choose the file name for the theme package. It should have a *.%1 extension.","theme").arg(KVI_FILEEXTENSION_THEMEPACKAGE)); pLabel->setText(__tr2qs_ctx("Here you must choose the file name for the theme package. It should have a *.%1 extension.","theme").tqarg(KVI_FILEEXTENSION_THEMEPACKAGE));
pLabel->setTextFormat(TQt::RichText); pLabel->setTextFormat(TQt::RichText);
pLayout->addWidget(pLabel,0,0); pLayout->addWidget(pLabel,0,0);
@ -393,7 +393,7 @@ bool KviPackThemeDialog::packTheme()
KviPackageWriter f; KviPackageWriter f;
TQString szTmp = TQDateTime::currentDateTime().toString(); TQString szTmp = TQDateTime::tqcurrentDateTime().toString();
f.addInfoField("PackageType","ThemePack"); f.addInfoField("PackageType","ThemePack");
f.addInfoField("ThemePackVersion","1"); f.addInfoField("ThemePackVersion","1");

@ -25,7 +25,7 @@
#include "savethemedialog.h" #include "savethemedialog.h"
#include "themefunctions.h" #include "themefunctions.h"
#include <layout.h> #include <tqlayout.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <tqlineedit.h> #include <tqlineedit.h>
#include <tqregexp.h> #include <tqregexp.h>
@ -158,7 +158,7 @@ KviSaveThemeDialog::KviSaveThemeDialog(TQWidget * pParent)
m_pImageLabel = new TQLabel(pPage); m_pImageLabel = new TQLabel(pPage);
m_pImageLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel); m_pImageLabel->setFrameStyle(TQFrame::Sunken | TQFrame::Panel);
m_pImageLabel->setMinimumSize(300,225); m_pImageLabel->setMinimumSize(300,225);
m_pImageLabel->setAlignment(TQt::AlignCenter | TQt::AlignVCenter); m_pImageLabel->tqsetAlignment(TQt::AlignCenter | TQt::AlignVCenter);
pLayout->addWidget(m_pImageLabel,1,0); pLayout->addWidget(m_pImageLabel,1,0);
TQString szFilter = "*.png *.jpg *.xpm"; TQString szFilter = "*.png *.jpg *.xpm";
@ -247,7 +247,7 @@ bool KviSaveThemeDialog::saveTheme()
sto.setAuthor(m_pAuthorNameEdit->text()); sto.setAuthor(m_pAuthorNameEdit->text());
sto.setDescription(m_pThemeDescriptionEdit->text()); sto.setDescription(m_pThemeDescriptionEdit->text());
sto.setDate(TQDateTime::currentDateTime().toString()); sto.setDate(TQDateTime::tqcurrentDateTime().toString());
sto.setVersion(m_pThemeVersionEdit->text()); sto.setVersion(m_pThemeVersionEdit->text());
sto.setApplication("KVIrc " KVI_VERSION "." KVI_SOURCES_DATE); sto.setApplication("KVIrc " KVI_VERSION "." KVI_SOURCES_DATE);

@ -44,7 +44,7 @@
#endif #endif
#include <tqfont.h> #include <tqfont.h>
#include <textcodec.h> #include <tqtextcodec.h>
#include <tqpainter.h> #include <tqpainter.h>
KviTipWindow * g_pTipWindow = 0; KviTipWindow * g_pTipWindow = 0;
@ -99,7 +99,7 @@ void KviTipFrame::drawContents(TQPainter *p)
TQRegion reg(0,0,1000,20000); TQRegion reg(0,0,1000,20000);
doc.draw(p,70,10,reg,colorGroup()); doc.draw(p,70,10,reg,tqcolorGroup());
} }
KviTipWindow::KviTipWindow() KviTipWindow::KviTipWindow()

@ -37,7 +37,7 @@
#include "kvi_draganddrop.h" #include "kvi_draganddrop.h"
#include <tqpushbutton.h> #include <tqpushbutton.h>
#include <layout.h> #include <tqlayout.h>
#include <tqapplication.h> #include <tqapplication.h>
#include <tqtooltip.h> #include <tqtooltip.h>
@ -61,7 +61,7 @@ KviTrashcanLabel::KviTrashcanLabel(TQWidget * p)
TQToolTip::add(this,__tr2qs("Drop here the icons from the toolbars to remove them")); TQToolTip::add(this,__tr2qs("Drop here the icons from the toolbars to remove them"));
setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel); setFrameStyle(TQFrame::Sunken | TQFrame::WinPanel);
setAcceptDrops(true); setAcceptDrops(true);
setAlignment(TQt::AlignCenter); tqsetAlignment(TQt::AlignCenter);
setMinimumSize(40,40); setMinimumSize(40,40);
m_uFlashCount = 0; m_uFlashCount = 0;
m_pFlashTimer = 0; m_pFlashTimer = 0;
@ -371,7 +371,7 @@ void KviCustomizeToolBarsDialog::deleteToolBar()
if(!t)return; if(!t)return;
if(TQMessageBox::question(this, if(TQMessageBox::question(this,
__tr2qs("Confirm ToolBar Deletion"), __tr2qs("Confirm ToolBar Deletion"),
__tr2qs("Do you really want to delete toolbar \"%1\" ?").arg(t->label()), __tr2qs("Do you really want to delete toolbar \"%1\" ?").tqarg(t->label()),
__tr2qs("No"), __tr2qs("No"),
__tr2qs("Yes")) == 0)return; __tr2qs("Yes")) == 0)return;
KviCustomToolBarManager::instance()->destroyDescriptor(t->descriptor()->id()); KviCustomToolBarManager::instance()->destroyDescriptor(t->descriptor()->id());
@ -462,7 +462,7 @@ void KviCustomizeToolBarsDialog::renameToolBar()
if(!t)return; if(!t)return;
KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this, KviCustomToolBarPropertiesDialog * dlg = new KviCustomToolBarPropertiesDialog(this,
__tr2qs("Please specify the properties for the toolbar \"%1\"").arg(t->label()), __tr2qs("Please specify the properties for the toolbar \"%1\"").tqarg(t->label()),
t->descriptor()->id(), t->descriptor()->id(),
t->descriptor()->labelCode(), t->descriptor()->labelCode(),
t->descriptor()->iconId()); t->descriptor()->iconId());

@ -39,12 +39,12 @@ void KviTorrentStatusBarApplet::selfRegister(KviStatusBar *bar)
TQString formatSize(float sz) TQString formatSize(float sz)
{ {
if (sz >= 1024.0f*1024.0f*1024.0f) if (sz >= 1024.0f*1024.0f*1024.0f)
return TQString("%1 GB").arg(sz / (1024.0f*1024.0f*1024.0f), 2, 'f', 2); return TQString("%1 GB").tqarg(sz / (1024.0f*1024.0f*1024.0f), 2, 'f', 2);
if (sz >= 1024.0f*1024.0f) if (sz >= 1024.0f*1024.0f)
return TQString("%1 MB").arg(sz / (1024.0f*1024.0f), 2, 'f', 2); return TQString("%1 MB").tqarg(sz / (1024.0f*1024.0f), 2, 'f', 2);
if (sz >= 1024.0f) if (sz >= 1024.0f)
return TQString("%1 KB").arg(sz / 1024.0f, 2, 'f', 2); return TQString("%1 KB").tqarg(sz / 1024.0f, 2, 'f', 2);
return TQString("%1 B").arg(sz, 2, 'f', 2); return TQString("%1 B").tqarg(sz, 2, 'f', 2);
} }
void KviTorrentStatusBarApplet::update() void KviTorrentStatusBarApplet::update()
@ -52,10 +52,10 @@ void KviTorrentStatusBarApplet::update()
if (KviTorrentInterface::selected()) if (KviTorrentInterface::selected())
{ {
TQString msg = TQString("up: %1 K/s (%2), dn: %3 K/s (%4)") TQString msg = TQString("up: %1 K/s (%2), dn: %3 K/s (%4)")
.arg(KviTorrentInterface::selected()->speedUp(), 2) .tqarg(KviTorrentInterface::selected()->speedUp(), 2)
.arg(formatSize(KviTorrentInterface::selected()->trafficUp())) .tqarg(formatSize(KviTorrentInterface::selected()->trafficUp()))
.arg(KviTorrentInterface::selected()->speedDown(), 2) .tqarg(KviTorrentInterface::selected()->speedDown(), 2)
.arg(formatSize(KviTorrentInterface::selected()->trafficDown())); .tqarg(formatSize(KviTorrentInterface::selected()->trafficDown()));
setText(msg); setText(msg);

@ -285,7 +285,7 @@ void UrlDialog::popup(KviTalListViewItem *item, const TQPoint &point, int col)
void UrlDialog::sayToWin(int itemID) void UrlDialog::sayToWin(int itemID)
{ {
KviWindow *wnd = g_pApp->findWindowByCaption(m_pListPopup->text(itemID).utf8().data()); KviWindow *wnd = g_pApp->findWindowByCaption(m_pListPopup->text(itemID).utf8().data());
TQString say=TQString("PRIVMSG %1 %2").arg(wnd->windowName()).arg(m_szUrl.ptr()); TQString say=TQString("PRIVMSG %1 %2").tqarg(wnd->windowName()).tqarg(m_szUrl.ptr());
if (wnd) { if (wnd) {
KviKvsScript::run(say,wnd); KviKvsScript::run(say,wnd);
wnd->raise(); wnd->raise();
@ -753,7 +753,7 @@ bool urllist_module_event_onUrl(KviKvsModuleEventCall * c)
KviUrl *tmp = new KviUrl; KviUrl *tmp = new KviUrl;
KviStr tmpTimestamp; KviStr tmpTimestamp;
TQDate d = TQDate::currentDate(); TQDate d = TQDate::tqcurrentDate();
KviStr date(KviStr::Format,"%d-%d%d-%d%d",d.year(),d.month() / 10,d.month() % 10,d.day() / 10,d.day() % 10); KviStr date(KviStr::Format,"%d-%d%d-%d%d",d.year(),d.month() / 10,d.month() % 10,d.day() / 10,d.day() % 10);
tmpTimestamp = "["+date+"]"+" ["; tmpTimestamp = "["+date+"]"+" [";
tmpTimestamp += TQTime::currentTime().toString()+"]"; tmpTimestamp += TQTime::currentTime().toString()+"]";

@ -22,7 +22,7 @@
#include <tqdialog.h> #include <tqdialog.h>
#include <layout.h> #include <tqlayout.h>
#include "kvi_tal_listview.h" #include "kvi_tal_listview.h"
#include <tqstring.h> #include <tqstring.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
@ -30,7 +30,7 @@
#ifdef COMPILE_USE_QT4 #ifdef COMPILE_USE_QT4
#include <tq3textstream.h> #include <tq3textstream.h>
#else #else
#include <textstream.h> #include <tqtextstream.h>
#endif #endif
#include <tqcheckbox.h> #include <tqcheckbox.h>
#include "kvi_tal_listbox.h" #include "kvi_tal_listbox.h"

@ -1499,7 +1499,7 @@ static bool window_module_init(KviModule *m)
// saveOutput (view()->saveBuffer()) // 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->registerCommand("setGeometry",window_module_cmd_setGeometry);
m->registerFunction("isActive",window_module_fnc_isActive); m->registerFunction("isActive",window_module_fnc_isActive);

Loading…
Cancel
Save