diff options
Diffstat (limited to 'tdehtml/rendering/render_form.cpp')
-rw-r--r-- | tdehtml/rendering/render_form.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/tdehtml/rendering/render_form.cpp b/tdehtml/rendering/render_form.cpp index 9d302bfc8..f18ce9ae6 100644 --- a/tdehtml/rendering/render_form.cpp +++ b/tdehtml/rendering/render_form.cpp @@ -99,25 +99,25 @@ void RenderFormElement::layout() setNeedsLayout(false); } -TQ_Alignment RenderFormElement::textAlignment() const +TQt::AlignmentFlags RenderFormElement::textAlignment() const { switch (style()->textAlign()) { case LEFT: case TDEHTML_LEFT: - return Qt::AlignLeft; + return TQt::AlignLeft; case RIGHT: case TDEHTML_RIGHT: - return Qt::AlignRight; + return TQt::AlignRight; case CENTER: case TDEHTML_CENTER: - return Qt::AlignHCenter; + return TQt::AlignHCenter; case JUSTIFY: // Just fall into the auto code for justify. case TAAUTO: - return style()->direction() == RTL ? Qt::AlignRight : Qt::AlignLeft; + return style()->direction() == RTL ? TQt::AlignRight : TQt::AlignLeft; } assert(false); // Should never be reached. - return Qt::AlignLeft; + return TQt::AlignLeft; } // ------------------------------------------------------------------------- @@ -146,7 +146,7 @@ RenderCheckBox::RenderCheckBox(HTMLInputElementImpl *element) // prevent firing toggled() signals on initialization b->setChecked(element->checked()); - connect(b,TQT_SIGNAL(stateChanged(int)),this,TQT_SLOT(slotStateChanged(int))); + connect(b,TQ_SIGNAL(stateChanged(int)),this,TQ_SLOT(slotStateChanged(int))); } @@ -192,7 +192,7 @@ RenderRadioButton::RenderRadioButton(HTMLInputElementImpl *element) // prevent firing toggled() signals on initialization b->setChecked(element->checked()); - connect(b,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotToggled(bool))); + connect(b,TQ_SIGNAL(toggled(bool)),this,TQ_SLOT(slotToggled(bool))); } void RenderRadioButton::updateFromElement() @@ -263,7 +263,7 @@ void RenderSubmitButton::calcMinMaxWidth() raw = TQString::fromLatin1("X"); TQFontMetrics fm = pb->fontMetrics(); TQSize ts = fm.size( ShowPrefix, raw); - TQSize s(pb->style().tqsizeFromContents( TQStyle::CT_PushButton, pb, ts ) + TQSize s(pb->style().sizeFromContents( TQStyle::CT_PushButton, pb, ts ) .expandedTo(TQApplication::globalStrut())); int margin = pb->style().pixelMetric( TQStyle::PM_ButtonMargin, pb) + pb->style().pixelMetric( TQStyle::PM_DefaultFrameWidth, pb ) * 2; @@ -312,7 +312,7 @@ LineEditWidget::LineEditWidget(DOM::HTMLInputElementImpl* input, TDEHTMLView* vi { setMouseTracking(true); TDEActionCollection *ac = new TDEActionCollection(this); - m_spellAction = KStdAction::spelling( TQT_TQOBJECT(this), TQT_SLOT( slotCheckSpelling() ), ac ); + m_spellAction = KStdAction::spelling( this, TQ_SLOT( slotCheckSpelling() ), ac ); } LineEditWidget::~LineEditWidget() @@ -328,11 +328,11 @@ void LineEditWidget::slotCheckSpelling() } delete m_spell; - m_spell = new KSpell( this, i18n( "Spell Checking" ), TQT_TQOBJECT(this), TQT_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true); + m_spell = new KSpell( this, i18n( "Spell Checking" ), this, TQ_SLOT( slotSpellCheckReady( KSpell *) ), 0, true, true); - connect( m_spell, TQT_SIGNAL( death() ),this, TQT_SLOT( spellCheckerFinished() ) ); - connect( m_spell, TQT_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),this, TQT_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) ); - connect( m_spell, TQT_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ),this, TQT_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) ); + connect( m_spell, TQ_SIGNAL( death() ),this, TQ_SLOT( spellCheckerFinished() ) ); + connect( m_spell, TQ_SIGNAL( misspelling( const TQString &, const TQStringList &, unsigned int ) ),this, TQ_SLOT( spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int ) ) ); + connect( m_spell, TQ_SIGNAL( corrected( const TQString &, const TQString &, unsigned int ) ),this, TQ_SLOT( spellCheckerCorrected( const TQString &, const TQString &, unsigned int ) ) ); } void LineEditWidget::spellCheckerMisspelling( const TQString &_text, const TQStringList &, unsigned int pos) @@ -362,7 +362,7 @@ void LineEditWidget::spellCheckerFinished() void LineEditWidget::slotSpellCheckReady( KSpell *s ) { s->check( text() ); - connect( s, TQT_SIGNAL( done( const TQString & ) ), this, TQT_SLOT( slotSpellCheckDone( const TQString & ) ) ); + connect( s, TQ_SIGNAL( done( const TQString & ) ), this, TQ_SLOT( slotSpellCheckDone( const TQString & ) ) ); } void LineEditWidget::slotSpellCheckDone( const TQString &s ) @@ -380,8 +380,8 @@ TQPopupMenu *LineEditWidget::createPopupMenu() return 0L; } - connect( popup, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( extendedMenuActivated( int ) ) ); + connect( popup, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( extendedMenuActivated( int ) ) ); if (m_input->autoComplete()) { popup->insertSeparator(); @@ -414,7 +414,7 @@ void LineEditWidget::extendedMenuActivated( int id) case EditHistory: { KHistoryComboEditor dlg( compObj() ? compObj()->items() : TQStringList(), this ); - connect( &dlg, TQT_SIGNAL( removeFromHistory(const TQString&) ), TQT_SLOT( slotRemoveFromHistory(const TQString&)) ); + connect( &dlg, TQ_SIGNAL( removeFromHistory(const TQString&) ), TQ_SLOT( slotRemoveFromHistory(const TQString&)) ); dlg.exec(); } default: @@ -469,8 +469,8 @@ RenderLineEdit::RenderLineEdit(HTMLInputElementImpl *element) : RenderFormElement(element) { LineEditWidget *edit = new LineEditWidget(element, view(), view()->viewport()); - connect(edit,TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReturnPressed())); - connect(edit,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotTextChanged(const TQString &))); + connect(edit,TQ_SIGNAL(returnPressed()), this, TQ_SLOT(slotReturnPressed())); + connect(edit,TQ_SIGNAL(textChanged(const TQString &)),this,TQ_SLOT(slotTextChanged(const TQString &))); if(element->inputType() == HTMLInputElementImpl::PASSWORD) edit->setEchoMode( TQLineEdit::Password ); @@ -785,9 +785,9 @@ RenderFileButton::RenderFileButton(HTMLInputElementImpl *element) w->setMode(KFile::File | KFile::ExistingOnly); w->completionObject()->setDir(TDEGlobalSettings::documentPath()); - connect(w->lineEdit(), TQT_SIGNAL(returnPressed()), this, TQT_SLOT(slotReturnPressed())); - connect(w->lineEdit(), TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(slotTextChanged(const TQString &))); - connect(w, TQT_SIGNAL(urlSelected(const TQString &)),this,TQT_SLOT(slotUrlSelected(const TQString &))); + connect(w->lineEdit(), TQ_SIGNAL(returnPressed()), this, TQ_SLOT(slotReturnPressed())); + connect(w->lineEdit(), TQ_SIGNAL(textChanged(const TQString &)),this,TQ_SLOT(slotTextChanged(const TQString &))); + connect(w, TQ_SIGNAL(urlSelected(const TQString &)),this,TQ_SLOT(slotUrlSelected(const TQString &))); setQWidget(w); m_haveFocus = false; @@ -805,7 +805,7 @@ void RenderFileButton::calcMinMaxWidth() int h = fm.lineSpacing(); int w = fm.width( 'x' ) * (size > 0 ? size+1 : 17); // "some" KLineEdit* edit = static_cast<KURLRequester*>( m_widget )->lineEdit(); - TQSize s = edit->style().tqsizeFromContents(TQStyle::CT_LineEdit, + TQSize s = edit->style().sizeFromContents(TQStyle::CT_LineEdit, edit, TQSize(w + 2 + 2*edit->frameWidth(), kMax(h, 14) + 2 + 2*edit->frameWidth())) .expandedTo(TQApplication::globalStrut()); @@ -890,7 +890,7 @@ bool ComboBoxWidget::event(TQEvent *e) return true; if (e->type()==TQEvent::KeyPress) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); switch(ke->key()) { case Key_Return: @@ -907,9 +907,9 @@ bool ComboBoxWidget::event(TQEvent *e) bool ComboBoxWidget::eventFilter(TQObject *dest, TQEvent *e) { - if (TQT_BASE_OBJECT(dest)==TQT_BASE_OBJECT(listBox()) && e->type()==TQEvent::KeyPress) + if (dest==listBox() && e->type()==TQEvent::KeyPress) { - TQKeyEvent *ke = TQT_TQKEYEVENT(e); + TQKeyEvent *ke = static_cast<TQKeyEvent*>(e); bool forward = false; switch(ke->key()) { @@ -1226,8 +1226,8 @@ TDEListBox* RenderSelect::createListBox() lb->setSelectionMode(m_multiple ? TQListBox::Extended : TQListBox::Single); // ### looks broken //lb->setAutoMask(true); - connect( lb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotSelectionChanged() ) ); -// connect( lb, TQT_SIGNAL( clicked( TQListBoxItem * ) ), this, TQT_SLOT( slotClicked() ) ); + connect( lb, TQ_SIGNAL( selectionChanged() ), this, TQ_SLOT( slotSelectionChanged() ) ); +// connect( lb, TQ_SIGNAL( clicked( TQListBoxItem * ) ), this, TQ_SLOT( slotClicked() ) ); m_ignoreSelectEvents = false; lb->setMouseTracking(true); @@ -1237,7 +1237,7 @@ TDEListBox* RenderSelect::createListBox() ComboBoxWidget *RenderSelect::createComboBox() { ComboBoxWidget *cb = new ComboBoxWidget(view()->viewport()); - connect(cb, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSelected(int))); + connect(cb, TQ_SIGNAL(activated(int)), this, TQ_SLOT(slotSelected(int))); return cb; } @@ -1295,9 +1295,9 @@ TextAreaWidget::TextAreaWidget(int wrap, TQWidget* parent) setMouseTracking(true); TDEActionCollection *ac = new TDEActionCollection(this); - m_findAction = KStdAction::find( TQT_TQOBJECT(this), TQT_SLOT( slotFind() ), ac ); - m_findNextAction = KStdAction::findNext( TQT_TQOBJECT(this), TQT_SLOT( slotFindNext() ), ac ); - m_replaceAction = KStdAction::replace( TQT_TQOBJECT(this), TQT_SLOT( slotReplace() ), ac ); + m_findAction = KStdAction::find( this, TQ_SLOT( slotFind() ), ac ); + m_findNextAction = KStdAction::findNext( this, TQ_SLOT( slotFindNext() ), ac ); + m_replaceAction = KStdAction::replace( this, TQ_SLOT( slotReplace() ), ac ); } @@ -1387,11 +1387,11 @@ void TextAreaWidget::slotDoReplace() // Connect highlight signal to code which handles highlighting // of found text. - connect(m_replace, TQT_SIGNAL(highlight(const TQString &, int, int)), - this, TQT_SLOT(slotFindHighlight(const TQString &, int, int))); - connect(m_replace, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotReplaceNext())); - connect(m_replace, TQT_SIGNAL(replace(const TQString &, int, int, int)), - this, TQT_SLOT(slotReplaceText(const TQString &, int, int, int))); + connect(m_replace, TQ_SIGNAL(highlight(const TQString &, int, int)), + this, TQ_SLOT(slotFindHighlight(const TQString &, int, int))); + connect(m_replace, TQ_SIGNAL(findNext()), this, TQ_SLOT(slotReplaceNext())); + connect(m_replace, TQ_SIGNAL(replace(const TQString &, int, int, int)), + this, TQ_SLOT(slotReplaceText(const TQString &, int, int, int))); m_repDlg->close(); slotReplaceNext(); @@ -1486,9 +1486,9 @@ void TextAreaWidget::slotDoFind() // Connect highlight signal to code which handles highlighting // of found text. - connect(m_find, TQT_SIGNAL(highlight(const TQString &, int, int)), - this, TQT_SLOT(slotFindHighlight(const TQString &, int, int))); - connect(m_find, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext())); + connect(m_find, TQ_SIGNAL(highlight(const TQString &, int, int)), + this, TQ_SLOT(slotFindHighlight(const TQString &, int, int))); + connect(m_find, TQ_SIGNAL(findNext()), this, TQ_SLOT(slotFindNext())); m_findDlg->close(); m_find->closeFindNextDialog(); @@ -1562,7 +1562,7 @@ void TextAreaWidget::slotFind() KWin::activateWindow( m_findDlg->winId() ); } else { m_findDlg = new KFindDialog(false, this, "TDEHTML Text Area Find Dialog"); - connect( m_findDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoFind()) ); + connect( m_findDlg, TQ_SIGNAL(okClicked()), this, TQ_SLOT(slotDoFind()) ); } m_findDlg->show(); } @@ -1578,7 +1578,7 @@ void TextAreaWidget::slotReplace() } else { m_repDlg = new KReplaceDialog(this, "TDEHTMLText Area Replace Dialog", 0, TQStringList(), TQStringList(), false); - connect( m_repDlg, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotDoReplace()) ); + connect( m_repDlg, TQ_SIGNAL(okClicked()), this, TQ_SLOT(slotDoReplace()) ); } m_repDlg->show(); } @@ -1618,7 +1618,7 @@ RenderTextArea::RenderTextArea(HTMLTextAreaElementImpl *element) edit->setCheckSpellingEnabled( settings->autoSpellCheck() ); edit->setTabChangesFocus( ! settings->allowTabulation() ); - connect(edit,TQT_SIGNAL(textChanged()),this,TQT_SLOT(slotTextChanged())); + connect(edit,TQ_SIGNAL(textChanged()),this,TQ_SLOT(slotTextChanged())); } RenderTextArea::~RenderTextArea() |