summaryrefslogtreecommitdiffstats
path: root/src/modules/objects/class_lineedit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/objects/class_lineedit.cpp
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/objects/class_lineedit.cpp')
-rw-r--r--src/modules/objects/class_lineedit.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/modules/objects/class_lineedit.cpp b/src/modules/objects/class_lineedit.cpp
index c8ba58ff..e429adfa 100644
--- a/src/modules/objects/class_lineedit.cpp
+++ b/src/modules/objects/class_lineedit.cpp
@@ -35,9 +35,9 @@ static const char * mode_tbl[] = {
};
static const int mode_cod[] = {
- QLineEdit::Normal,
- QLineEdit::NoEcho,
- QLineEdit::Password
+ TQLineEdit::Normal,
+ TQLineEdit::NoEcho,
+ TQLineEdit::Password
};
#define mode_num (sizeof(mode_tbl) / sizeof(mode_tbl[0]))
@@ -128,8 +128,8 @@ static const int mode_cod[] = {
With this property user can drag text in the lineedit.
!fn: $setReadOnly(<bReadonly:boolean>)
Sets the lineedit to read only mode.
- !fn: $setInputMask(<mask:string>)
- Sets the validation input mask to inputMask.[br]
+ !fn: $setInputMask(<tqmask:string>)
+ Sets the validation input tqmask to inputMask.[br]
Example:[br]
[br]
%esempio->$setInputMask( "+99 99 99 99 99;_" );[br]
@@ -137,7 +137,7 @@ static const int mode_cod[] = {
%esempio->Ip Number Mask.[br]
%esempio->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" );[br]
[br]
- The mask format understands these mask characters:[br]
+ The tqmask format understands these tqmask characters:[br]
Character Meaning[br]
A ASCII alphabetic character required. A-Z, a-z.[br]
a ASCII alphabetic character permitted but not required.[br]
@@ -155,7 +155,7 @@ static const int mode_cod[] = {
! Switch off case conversion.[br]
\ Use \ to escape the special characters listed above to use them as separators.[br]
[br]
- The mask consists of a string of mask characters and separators, optionally[br]
+ The tqmask consists of a string of tqmask characters and separators, optionally[br]
followed by a semi-colon and the character used for blanks: the blank characters [br]
are always removed from the text after editing. The default blank character is space. [br]
!fn: $returnPressedEvent()
@@ -218,35 +218,35 @@ KVSO_END_CONSTRUCTOR(KviKvsObject_lineedit)
bool KviKvsObject_lineedit::init(KviKvsRunTimeContext * pContext,KviKvsVariantList * pParams)
{
- setObject(new QLineEdit(parentScriptWidget(),getName()),true);
- connect(widget(),SIGNAL(returnPressed()),this,SLOT(slotreturnPressed()));
- connect(widget(),SIGNAL(lostFocus()),this,SLOT(slotlostFocus()));
- connect(widget(),SIGNAL(textChanged(const QString & )),this,SLOT(slottextChanged(const QString & )));
+ setObject(TQT_TQOBJECT(new TQLineEdit(tqparentScriptWidget(),getName())),true);
+ connect(widget(),TQT_SIGNAL(returnPressed()),this,TQT_SLOT(slotreturnPressed()));
+ connect(widget(),TQT_SIGNAL(lostFocus()),this,TQT_SLOT(slotlostFocus()));
+ connect(widget(),TQT_SIGNAL(textChanged(const TQString & )),this,TQT_SLOT(slottextChanged(const TQString & )));
return true;
}
bool KviKvsObject_lineedit::functionText(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setString(((QLineEdit *)widget())->text());
+ c->returnValue()->setString(((TQLineEdit *)widget())->text());
return true;
}
bool KviKvsObject_lineedit::functionSetText(KviKvsObjectFunctionCall *c)
{
- QString szText;
+ TQString szText;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("text",KVS_PT_STRING,0,szText)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setText(szText);
+ ((TQLineEdit *)widget())->setText(szText);
return true;
}
bool KviKvsObject_lineedit::functionMaxLength(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QLineEdit *)widget())->maxLength());
+ c->returnValue()->setInteger(((TQLineEdit *)widget())->maxLength());
return true;
}
@@ -257,14 +257,14 @@ bool KviKvsObject_lineedit::functionSetMaxLength(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("maxlen",KVS_PT_UNSIGNEDINTEGER,0,iMaxlen)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setMaxLength(iMaxlen);
+ ((TQLineEdit *)widget())->setMaxLength(iMaxlen);
return true;
}
bool KviKvsObject_lineedit::functionFrame(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setBoolean(((QLineEdit *)widget())->frame());
+ c->returnValue()->setBoolean(((TQLineEdit *)widget())->frame());
return true;
}
@@ -275,14 +275,14 @@ bool KviKvsObject_lineedit::functionSetFrame(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bframe",KVS_PT_BOOL,0,bFrame)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QLineEdit *)widget())->setFrame(bFrame);
+ ((TQLineEdit *)widget())->setFrame(bFrame);
return true;
}
bool KviKvsObject_lineedit::functionCursorPosition(KviKvsObjectFunctionCall *c)
{
if(widget())
- c->returnValue()->setInteger(((QLineEdit *)widget())->cursorPosition());
+ c->returnValue()->setInteger(((TQLineEdit *)widget())->cursorPosition());
return true;
}
@@ -293,14 +293,14 @@ bool KviKvsObject_lineedit::functionSetCursorPosition(KviKvsObjectFunctionCall *
KVSO_PARAMETER("position",KVS_PT_UNSIGNEDINTEGER,0,iPos)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setCursorPosition(iPos);
+ ((TQLineEdit *)widget())->setCursorPosition(iPos);
return true;
}
bool KviKvsObject_lineedit::functionSelectAll(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->selectAll();
+ ((TQLineEdit *)widget())->selectAll();
return true;
}
@@ -312,35 +312,35 @@ bool KviKvsObject_lineedit::functionSetSelection(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("len",KVS_PT_UNSIGNEDINTEGER,0,uLen)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setSelection(uStart, uLen);
+ ((TQLineEdit *)widget())->setSelection(uStart, uLen);
return true;
}
bool KviKvsObject_lineedit::functionCopy(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->copy();
+ ((TQLineEdit *)widget())->copy();
return true;
}
bool KviKvsObject_lineedit::functionCut(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->cut();
+ ((TQLineEdit *)widget())->cut();
return true;
}
bool KviKvsObject_lineedit::functionPaste(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->paste();
+ ((TQLineEdit *)widget())->paste();
return true;
}
bool KviKvsObject_lineedit::functionEchoMode(KviKvsObjectFunctionCall *c)
{
- int mode = ((QLineEdit *)widget())->echoMode();
- QString szEchomode="";
+ int mode = ((TQLineEdit *)widget())->echoMode();
+ TQString szEchomode="";
for(unsigned int i = 0; i < mode_num; i++)
{
if(mode == mode_cod[i])
@@ -355,17 +355,17 @@ bool KviKvsObject_lineedit::functionEchoMode(KviKvsObjectFunctionCall *c)
bool KviKvsObject_lineedit::functionSetEchoMode(KviKvsObjectFunctionCall *c)
{
- QString szMode;
+ TQString szMode;
KVSO_PARAMETERS_BEGIN(c)
KVSO_PARAMETER("mode",KVS_PT_STRING,0,szMode)
KVSO_PARAMETERS_END(c)
if (!widget()) return true;
for(unsigned int i = 0; i < mode_num; i++)
{
- if(KviQString::equalCI(szMode, mode_tbl[i]))
+ if(KviTQString::equalCI(szMode, mode_tbl[i]))
{
- ((QLineEdit *)widget())->setEchoMode( \
- ((QLineEdit::EchoMode)mode_cod[i]));
+ ((TQLineEdit *)widget())->setEchoMode( \
+ ((TQLineEdit::EchoMode)mode_cod[i]));
return true;
}
}
@@ -376,7 +376,7 @@ bool KviKvsObject_lineedit::functionSetEchoMode(KviKvsObjectFunctionCall *c)
bool KviKvsObject_lineedit::functionClear(KviKvsObjectFunctionCall *c)
{
if(widget())
- ((QLineEdit *)widget())->clear();
+ ((TQLineEdit *)widget())->clear();
return true;
}
@@ -388,7 +388,7 @@ bool KviKvsObject_lineedit::functionDragAndDrop(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bEnabled",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QLineEdit *)widget())->setDragEnabled(bEnabled);
+ ((TQLineEdit *)widget())->setDragEnabled(bEnabled);
return true;
}
@@ -399,18 +399,18 @@ bool KviKvsObject_lineedit::functionSetReadOnly(KviKvsObjectFunctionCall *c)
KVSO_PARAMETER("bReadonly",KVS_PT_BOOL,0,bEnabled)
KVSO_PARAMETERS_END(c)
if(widget())
- ((QLineEdit *)widget())->setReadOnly(bEnabled);
+ ((TQLineEdit *)widget())->setReadOnly(bEnabled);
return true;
}
bool KviKvsObject_lineedit::functionSetInputMask(KviKvsObjectFunctionCall *c)
{
- QString szMask;
+ TQString szMask;
KVSO_PARAMETERS_BEGIN(c)
- KVSO_PARAMETER("mask",KVS_PT_STRING,0,szMask)
+ KVSO_PARAMETER("tqmask",KVS_PT_STRING,0,szMask)
KVSO_PARAMETERS_END(c)
if (widget())
- ((QLineEdit *)widget())->setInputMask(szMask);
+ ((TQLineEdit *)widget())->setInputMask(szMask);
return true;
}
@@ -451,7 +451,7 @@ bool KviKvsObject_lineedit::functiontextChangedEvent(KviKvsObjectFunctionCall *c
}
-void KviKvsObject_lineedit::slottextChanged(const QString &text)
+void KviKvsObject_lineedit::slottextChanged(const TQString &text)
{
KviKvsVariantList params(new KviKvsVariant(text));
callFunction(this,"textChangedEvent",&params);