Subversion Repositories tpanel

Rev

Rev 425 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 425 Rev 437
Line 138... Line 138...
138
void TQEditLine::setText(string &text)
138
void TQEditLine::setText(string &text)
139
{
139
{
140
    DECL_TRACER("TQEditLine::setText(string &text)");
140
    DECL_TRACER("TQEditLine::setText(string &text)");
141
 
141
 
142
    mText = text;
142
    mText = text;
-
 
143
    MSG_DEBUG("Setting text: " << text);
143
 
144
 
144
    if (mMultiline && mTextArea)
145
    if (mMultiline && mTextArea)
145
        mTextArea->setText(QString::fromStdString(text));
146
        mTextArea->setText(QString::fromStdString(text));
146
    else if (!mMultiline && mEdit)
147
    else if (!mMultiline && mEdit)
147
        mEdit->setText(QString::fromStdString(text));
148
        mEdit->setText(QString::fromStdString(text));
Line 416... Line 417...
416
    if (mMultiline && mTextArea)
417
    if (mMultiline && mTextArea)
417
        text = mTextArea->toPlainText().toStdString();
418
        text = mTextArea->toPlainText().toStdString();
418
    else if (!mMultiline && mEdit)
419
    else if (!mMultiline && mEdit)
419
        text = mEdit->text().toStdString();
420
        text = mEdit->text().toStdString();
420
 
421
 
-
 
422
    MSG_DEBUG("Current text: " << text);
-
 
423
 
421
    if (mChanged || text != mText)
424
    if (mChanged || text != mText)
422
    {
425
    {
423
        mText = text;
426
        mText = text;
424
        emit inputChanged(mHandle, mText);
427
        emit inputChanged(mHandle, mText);
425
        mChanged = false;
428
        mChanged = false;
Line 429... Line 432...
429
void TQEditLine::onTextChanged(const QString &text)
432
void TQEditLine::onTextChanged(const QString &text)
430
{
433
{
431
    DECL_TRACER("TQEditLine::onTextChanged(const QString &text)");
434
    DECL_TRACER("TQEditLine::onTextChanged(const QString &text)");
432
 
435
 
433
    mText = text.toStdString();
436
    mText = text.toStdString();
-
 
437
    MSG_DEBUG("Text changed to: " << mText);
434
    mChanged = true;
438
    mChanged = true;
435
}
439
}
436
 
440
 
437
void TQEditLine::onTextAreaChanged()
441
void TQEditLine::onTextAreaChanged()
438
{
442
{
439
    DECL_TRACER("TQEditLine::onTextAreaChanged()");
443
    DECL_TRACER("TQEditLine::onTextAreaChanged()");
440
 
444
 
441
    mText = mTextArea->toPlainText().toStdString();
445
    mText = mTextArea->toPlainText().toStdString();
-
 
446
    MSG_DEBUG("Multiline text changed to: " << mText);
442
    mChanged = true;
447
    mChanged = true;
443
}
448
}
444
 
449
 
445
void TQEditLine::onCursorPositionChangedS(int oldPos, int newPos)
450
void TQEditLine::onCursorPositionChangedS(int oldPos, int newPos)
446
{
451
{