diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-27 05:58:16 +0000 |
commit | f636ba5ba2df9d34d56b1c85f24c6598fa1cb645 (patch) | |
tree | 5365045e6bce685a7cbaeb81b4797a719e86089f /src/smalldialogs.cpp | |
parent | 63862fdfcb61f302ef69e86d40772bb1318d3763 (diff) | |
download | kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.tar.gz kdiff3-f636ba5ba2df9d34d56b1c85f24c6598fa1cb645.zip |
TQt4 port kdiff3
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdiff3@1238464 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/smalldialogs.cpp')
-rw-r--r-- | src/smalldialogs.cpp | 348 |
1 files changed, 174 insertions, 174 deletions
diff --git a/src/smalldialogs.cpp b/src/smalldialogs.cpp index d748611..006ffcf 100644 --- a/src/smalldialogs.cpp +++ b/src/smalldialogs.cpp @@ -21,17 +21,17 @@ #include "smalldialogs.h" #include "optiondialog.h" -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qdragobject.h> -#include <qregexp.h> -#include <qtooltip.h> -#include <qpopupmenu.h> -#include <qcursor.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqdragobject.h> +#include <tqregexp.h> +#include <tqtooltip.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> #include <kfiledialog.h> @@ -40,105 +40,105 @@ // OpenDialog ************************************************************** OpenDialog::OpenDialog( - QWidget* pParent, const QString& n1, const QString& n2, const QString& n3, - bool bMerge, const QString& outputName, const char* slotConfigure, OptionDialog* pOptions ) -: QDialog( pParent, "OpenDialog", true /*modal*/ ) + TQWidget* pParent, const TQString& n1, const TQString& n2, const TQString& n3, + bool bMerge, const TQString& outputName, const char* slotConfigure, OptionDialog* pOptions ) +: TQDialog( pParent, "OpenDialog", true /*modal*/ ) { m_pOptions = pOptions; - QVBoxLayout* v = new QVBoxLayout( this, 5 ); - QGridLayout* h = new QGridLayout( v, 5, 4, 5 ); + TQVBoxLayout* v = new TQVBoxLayout( this, 5 ); + TQGridLayout* h = new TQGridLayout( v, 5, 4, 5 ); h->setColStretch( 1, 10 ); - QLabel* label = new QLabel( i18n("A (Base):"), this ); + TQLabel* label = new TQLabel( i18n("A (Base):"), this ); - m_pLineA = new QComboBox( true, this ); + m_pLineA = new TQComboBox( true, this ); m_pLineA->insertStringList( m_pOptions->m_recentAFiles ); m_pLineA->setEditText( KURL(n1).prettyURL() ); m_pLineA->setMinimumSize( 200, m_pLineA->size().height() ); - QPushButton * button = new QPushButton( i18n("File..."), this ); - connect( button, SIGNAL(clicked()), this, SLOT( selectFileA() ) ); - QPushButton * button2 = new QPushButton( i18n("Dir..."), this ); - connect( button2, SIGNAL(clicked()), this, SLOT( selectDirA() ) ); - connect( m_pLineA, SIGNAL(textChanged(const QString&)), this, SLOT(inputFilenameChanged() ) ); + TQPushButton * button = new TQPushButton( i18n("File..."), this ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectFileA() ) ); + TQPushButton * button2 = new TQPushButton( i18n("Dir..."), this ); + connect( button2, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectDirA() ) ); + connect( m_pLineA, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(inputFilenameChanged() ) ); h->addWidget( label, 0, 0 ); h->addWidget( m_pLineA, 0, 1 ); h->addWidget( button, 0, 2 ); h->addWidget( button2, 0, 3 ); - label = new QLabel( "B:", this ); - m_pLineB = new QComboBox( true, this ); + label = new TQLabel( "B:", this ); + m_pLineB = new TQComboBox( true, this ); m_pLineB->insertStringList( m_pOptions->m_recentBFiles ); m_pLineB->setEditText( KURL(n2).prettyURL() ); m_pLineB->setMinimumSize( 200, m_pLineB->size().height() ); - button = new QPushButton( i18n("File..."), this ); - connect( button, SIGNAL(clicked()), this, SLOT( selectFileB() ) ); - button2 = new QPushButton( i18n("Dir..."), this ); - connect( button2, SIGNAL(clicked()), this, SLOT( selectDirB() ) ); - connect( m_pLineB, SIGNAL(textChanged(const QString&)), this, SLOT(inputFilenameChanged() ) ); + button = new TQPushButton( i18n("File..."), this ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectFileB() ) ); + button2 = new TQPushButton( i18n("Dir..."), this ); + connect( button2, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectDirB() ) ); + connect( m_pLineB, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(inputFilenameChanged() ) ); h->addWidget( label, 1, 0 ); h->addWidget( m_pLineB, 1, 1 ); h->addWidget( button, 1, 2 ); h->addWidget( button2, 1, 3 ); - label = new QLabel( i18n("C (Optional):"), this ); - m_pLineC= new QComboBox( true, this ); + label = new TQLabel( i18n("C (Optional):"), this ); + m_pLineC= new TQComboBox( true, this ); m_pLineC->insertStringList( m_pOptions->m_recentCFiles ); m_pLineC->setEditText( KURL(n3).prettyURL() ); m_pLineC->setMinimumSize( 200, m_pLineC->size().height() ); - button = new QPushButton( i18n("File..."), this ); - connect( button, SIGNAL(clicked()), this, SLOT( selectFileC() ) ); - button2 = new QPushButton( i18n("Dir..."), this ); - connect( button2, SIGNAL(clicked()), this, SLOT( selectDirC() ) ); - connect( m_pLineC, SIGNAL(textChanged(const QString&)), this, SLOT(inputFilenameChanged() ) ); + button = new TQPushButton( i18n("File..."), this ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectFileC() ) ); + button2 = new TQPushButton( i18n("Dir..."), this ); + connect( button2, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectDirC() ) ); + connect( m_pLineC, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(inputFilenameChanged() ) ); h->addWidget( label, 2, 0 ); h->addWidget( m_pLineC, 2, 1 ); h->addWidget( button, 2, 2 ); h->addWidget( button2, 2, 3 ); - m_pMerge = new QCheckBox( i18n("Merge"), this ); + m_pMerge = new TQCheckBox( i18n("Merge"), this ); h->addWidget( m_pMerge, 3, 0 ); - QHBoxLayout* hl = new QHBoxLayout(); + TQHBoxLayout* hl = new TQHBoxLayout(); h->addLayout( hl, 3, 1 ); hl->addStretch(2); - button = new QPushButton(i18n("Swap/Copy Names ..."), this); + button = new TQPushButton(i18n("Swap/Copy Names ..."), this); //button->setToggleButton(false); hl->addWidget( button ); - QPopupMenu* m = new QPopupMenu(this); + TQPopupMenu* m = new TQPopupMenu(this); int id=0; - m->insertItem( i18n("Swap %1<->%2").arg("A").arg("B"), id++ ); - m->insertItem( i18n("Swap %1<->%2").arg("B").arg("C"), id++ ); - m->insertItem( i18n("Swap %1<->%2").arg("C").arg("A"), id++ ); - m->insertItem( i18n("Copy %1->Output").arg("A"), id++ ); - m->insertItem( i18n("Copy %1->Output").arg("B"), id++ ); - m->insertItem( i18n("Copy %1->Output").arg("C"), id++ ); - m->insertItem( i18n("Swap %1<->Output").arg("A"), id++ ); - m->insertItem( i18n("Swap %1<->Output").arg("B"), id++ ); - m->insertItem( i18n("Swap %1<->Output").arg("C"), id++ ); - connect( m, SIGNAL(activated(int)), this, SLOT(slotSwapCopyNames(int))); + m->insertItem( i18n("Swap %1<->%2").tqarg("A").tqarg("B"), id++ ); + m->insertItem( i18n("Swap %1<->%2").tqarg("B").tqarg("C"), id++ ); + m->insertItem( i18n("Swap %1<->%2").tqarg("C").tqarg("A"), id++ ); + m->insertItem( i18n("Copy %1->Output").tqarg("A"), id++ ); + m->insertItem( i18n("Copy %1->Output").tqarg("B"), id++ ); + m->insertItem( i18n("Copy %1->Output").tqarg("C"), id++ ); + m->insertItem( i18n("Swap %1<->Output").tqarg("A"), id++ ); + m->insertItem( i18n("Swap %1<->Output").tqarg("B"), id++ ); + m->insertItem( i18n("Swap %1<->Output").tqarg("C"), id++ ); + connect( m, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSwapCopyNames(int))); button->setPopup(m); hl->addStretch(2); - label = new QLabel( i18n("Output (optional):"), this ); - m_pLineOut = new QComboBox( true, this ); + label = new TQLabel( i18n("Output (optional):"), this ); + m_pLineOut = new TQComboBox( true, this ); m_pLineOut->insertStringList( m_pOptions->m_recentOutputFiles ); m_pLineOut->setEditText( KURL(outputName).prettyURL() ); m_pLineOut->setMinimumSize( 200, m_pLineOut->size().height() ); - button = new QPushButton( i18n("File..."), this ); - connect( button, SIGNAL(clicked()), this, SLOT( selectOutputName() ) ); - button2 = new QPushButton( i18n("Dir..."), this ); - connect( button2, SIGNAL(clicked()), this, SLOT( selectOutputDir() ) ); - connect( m_pMerge, SIGNAL(stateChanged(int)), this, SLOT(internalSlot(int)) ); - connect( this, SIGNAL(internalSignal(bool)), m_pLineOut, SLOT(setEnabled(bool)) ); - connect( this, SIGNAL(internalSignal(bool)), button, SLOT(setEnabled(bool)) ); - connect( this, SIGNAL(internalSignal(bool)), button2, SLOT(setEnabled(bool)) ); + button = new TQPushButton( i18n("File..."), this ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectOutputName() ) ); + button2 = new TQPushButton( i18n("Dir..."), this ); + connect( button2, TQT_SIGNAL(clicked()), this, TQT_SLOT( selectOutputDir() ) ); + connect( m_pMerge, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(internalSlot(int)) ); + connect( this, TQT_SIGNAL(internalSignal(bool)), m_pLineOut, TQT_SLOT(setEnabled(bool)) ); + connect( this, TQT_SIGNAL(internalSignal(bool)), button, TQT_SLOT(setEnabled(bool)) ); + connect( this, TQT_SIGNAL(internalSignal(bool)), button2, TQT_SLOT(setEnabled(bool)) ); m_pMerge->setChecked( !bMerge ); m_pMerge->setChecked( bMerge ); @@ -153,24 +153,24 @@ OpenDialog::OpenDialog( h->addColSpacing( 1, 200 ); - QHBoxLayout* l = new QHBoxLayout( v, 5 ); + TQHBoxLayout* l = new TQHBoxLayout( v, 5 ); - button = new QPushButton( i18n("Configure..."), this ); - connect( button, SIGNAL(clicked()), pParent, slotConfigure ); + button = new TQPushButton( i18n("Configure..."), this ); + connect( button, TQT_SIGNAL(clicked()), pParent, slotConfigure ); l->addWidget( button, 1 ); l->addStretch(1); - button = new QPushButton( i18n("&OK"), this ); + button = new TQPushButton( i18n("&OK"), this ); button->setDefault( true ); - connect( button, SIGNAL(clicked()), this, SLOT( accept() ) ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT( accept() ) ); l->addWidget( button, 1 ); - button = new QPushButton( i18n("&Cancel"), this ); - connect( button, SIGNAL(clicked()), this, SLOT( reject() ) ); + button = new TQPushButton( i18n("&Cancel"), this ); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT( reject() ) ); l->addWidget( button,1 ); - QSize sh = sizeHint(); + TQSize sh = tqsizeHint(); setFixedHeight( sh.height() ); m_bInputFileNameChanged = false; @@ -185,23 +185,23 @@ OpenDialog::OpenDialog( // Eventfilter: Only needed under Windows. // Without this, files dropped in the line edit have URL-encoding. // This eventfilter decodes the filenames as needed by KDiff3. -bool OpenDialog::eventFilter(QObject* o, QEvent* e) +bool OpenDialog::eventFilter(TQObject* o, TQEvent* e) { - if (e->type()==QEvent::Drop) + if (e->type()==TQEvent::Drop) { - QDropEvent* d = static_cast<QDropEvent*>(e); + TQDropEvent* d = static_cast<TQDropEvent*>(e); - if ( !QUriDrag::canDecode( d ) ) { + if ( !TQUriDrag::canDecode( d ) ) { return false; } - QStringList lst; - QUriDrag::decodeLocalFiles( d, lst ); + TQStringList lst; + TQUriDrag::decodeLocalFiles( d, lst ); if ( lst.count() > 0 ) { - static_cast<QLineEdit*>(o)->setText( lst[0] ); - static_cast<QLineEdit*>(o)->setFocus(); + static_cast<TQLineEdit*>(TQT_TQWIDGET(o))->setText( lst[0] ); + static_cast<TQLineEdit*>(TQT_TQWIDGET(o))->setFocus(); } return true; @@ -210,9 +210,9 @@ bool OpenDialog::eventFilter(QObject* o, QEvent* e) } -void OpenDialog::selectURL( QComboBox* pLine, bool bDir, int i, bool bSave ) +void OpenDialog::selectURL( TQComboBox* pLine, bool bDir, int i, bool bSave ) { - QString current = pLine->currentText(); + TQString current = pLine->currentText(); if (current.isEmpty() && i>3 ){ current = m_pLineC->currentText(); } if (current.isEmpty() ){ current = m_pLineB->currentText(); } if (current.isEmpty() ){ current = m_pLineA->currentText(); } @@ -252,14 +252,14 @@ void OpenDialog::inputFilenameChanged() } } -static void fixCurrentText( QComboBox* pCB ) +static void fixCurrentText( TQComboBox* pCB ) { - QString s = pCB->currentText(); + TQString s = pCB->currentText(); - int pos = s.find( '\n' ); + int pos = s.tqfind( '\n' ); if ( pos>=0 ) s=s.left(pos); - pos = s.find( '\r' ); + pos = s.tqfind( '\r' ); if ( pos>=0 ) s=s.left(pos); @@ -271,9 +271,9 @@ void OpenDialog::accept() unsigned int maxNofRecentFiles = 10; fixCurrentText( m_pLineA ); - QString s = m_pLineA->currentText(); + TQString s = m_pLineA->currentText(); s = KURL::fromPathOrURL(s).prettyURL(); - QStringList* sl = &m_pOptions->m_recentAFiles; + TQStringList* sl = &m_pOptions->m_recentAFiles; // If an item exist, remove it from the list and reinsert it at the beginning. sl->remove(s); if ( !s.isEmpty() ) sl->prepend( s ); @@ -303,13 +303,13 @@ void OpenDialog::accept() if ( !s.isEmpty() ) sl->prepend( s ); if (sl->count()>maxNofRecentFiles) sl->erase( sl->at(maxNofRecentFiles), sl->end() ); - QDialog::accept(); + TQDialog::accept(); } void OpenDialog::slotSwapCopyNames( int id ) // id selected in the popup menu { - QComboBox* cb1=0; - QComboBox* cb2=0; + TQComboBox* cb1=0; + TQComboBox* cb2=0; switch(id) { case 0: cb1=m_pLineA; cb2=m_pLineB; break; @@ -324,8 +324,8 @@ void OpenDialog::slotSwapCopyNames( int id ) // id selected in the popup menu } if ( cb1 && cb2 ) { - QString t1 = cb1->currentText(); - QString t2 = cb2->currentText(); + TQString t1 = cb1->currentText(); + TQString t2 = cb2->currentText(); cb2->setCurrentText(t1); if ( id<=2 || id>=6 ) { @@ -336,172 +336,172 @@ void OpenDialog::slotSwapCopyNames( int id ) // id selected in the popup menu // FindDialog ********************************************* -FindDialog::FindDialog(QWidget* pParent) -: QDialog( pParent ) +FindDialog::FindDialog(TQWidget* pParent) +: TQDialog( pParent ) { - QGridLayout* layout = new QGridLayout( this ); - layout->setMargin(5); - layout->setSpacing(5); + TQGridLayout* tqlayout = new TQGridLayout( this ); + tqlayout->setMargin(5); + tqlayout->setSpacing(5); int line=0; - layout->addMultiCellWidget( new QLabel(i18n("Search text:"),this), line,line,0,1 ); + tqlayout->addMultiCellWidget( new TQLabel(i18n("Search text:"),this), line,line,0,1 ); ++line; - m_pSearchString = new QLineEdit( this ); - layout->addMultiCellWidget( m_pSearchString, line,line,0,1 ); + m_pSearchString = new TQLineEdit( this ); + tqlayout->addMultiCellWidget( m_pSearchString, line,line,0,1 ); ++line; - m_pCaseSensitive = new QCheckBox(i18n("Case sensitive"),this); - layout->addWidget( m_pCaseSensitive, line, 1 ); + m_pCaseSensitive = new TQCheckBox(i18n("Case sensitive"),this); + tqlayout->addWidget( m_pCaseSensitive, line, 1 ); - m_pSearchInA = new QCheckBox(i18n("Search A"),this); - layout->addWidget( m_pSearchInA, line, 0 ); + m_pSearchInA = new TQCheckBox(i18n("Search A"),this); + tqlayout->addWidget( m_pSearchInA, line, 0 ); m_pSearchInA->setChecked( true ); ++line; - m_pSearchInB = new QCheckBox(i18n("Search B"),this); - layout->addWidget( m_pSearchInB, line, 0 ); + m_pSearchInB = new TQCheckBox(i18n("Search B"),this); + tqlayout->addWidget( m_pSearchInB, line, 0 ); m_pSearchInB->setChecked( true ); ++line; - m_pSearchInC = new QCheckBox(i18n("Search C"),this); - layout->addWidget( m_pSearchInC, line, 0 ); + m_pSearchInC = new TQCheckBox(i18n("Search C"),this); + tqlayout->addWidget( m_pSearchInC, line, 0 ); m_pSearchInC->setChecked( true ); ++line; - m_pSearchInOutput = new QCheckBox(i18n("Search output"),this); - layout->addWidget( m_pSearchInOutput, line, 0 ); + m_pSearchInOutput = new TQCheckBox(i18n("Search output"),this); + tqlayout->addWidget( m_pSearchInOutput, line, 0 ); m_pSearchInOutput->setChecked( true ); ++line; - QPushButton* pButton = new QPushButton( i18n("&Search"), this ); - layout->addWidget( pButton, line, 0 ); - connect( pButton, SIGNAL(clicked()), this, SLOT(accept())); + TQPushButton* pButton = new TQPushButton( i18n("&Search"), this ); + tqlayout->addWidget( pButton, line, 0 ); + connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); - pButton = new QPushButton( i18n("&Cancel"), this ); - layout->addWidget( pButton, line, 1 ); - connect( pButton, SIGNAL(clicked()), this, SLOT(reject())); + pButton = new TQPushButton( i18n("&Cancel"), this ); + tqlayout->addWidget( pButton, line, 1 ); + connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); hide(); } -RegExpTester::RegExpTester( QWidget* pParent, const QString& autoMergeRegExpToolTip, - const QString& historyStartRegExpToolTip, const QString& historyEntryStartRegExpToolTip, const QString& historySortKeyOrderToolTip ) -: QDialog( pParent) +RegExpTester::RegExpTester( TQWidget* pParent, const TQString& autoMergeRegExpToolTip, + const TQString& historyStartRegExpToolTip, const TQString& historyEntryStartRegExpToolTip, const TQString& historySortKeyOrderToolTip ) +: TQDialog( pParent) { int line=0; setCaption(i18n("Regular Expression Tester")); - QGridLayout* pGrid = new QGridLayout( this, 11, 2, 5, 5 ); + TQGridLayout* pGrid = new TQGridLayout( this, 11, 2, 5, 5 ); - QLabel* l = new QLabel(i18n("Auto merge regular expression:"), this); + TQLabel* l = new TQLabel(i18n("Auto merge regular expression:"), this); pGrid->addWidget(l,line,0); - QToolTip::add( l, autoMergeRegExpToolTip ); - m_pAutoMergeRegExpEdit = new QLineEdit(this); + TQToolTip::add( l, autoMergeRegExpToolTip ); + m_pAutoMergeRegExpEdit = new TQLineEdit(this); pGrid->addWidget(m_pAutoMergeRegExpEdit,line,1); - connect( m_pAutoMergeRegExpEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc())); + connect( m_pAutoMergeRegExpEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotRecalc())); ++line; - l = new QLabel(i18n("Example auto merge line:"), this); + l = new TQLabel(i18n("Example auto merge line:"), this); pGrid->addMultiCellWidget(l,line,line,0,1); - QToolTip::add( l, i18n("For auto merge test copy a line as used in your files.") ); - m_pAutoMergeExampleEdit = new QLineEdit(this); + TQToolTip::add( l, i18n("For auto merge test copy a line as used in your files.") ); + m_pAutoMergeExampleEdit = new TQLineEdit(this); pGrid->addWidget(m_pAutoMergeExampleEdit,line,1); - connect( m_pAutoMergeExampleEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc())); + connect( m_pAutoMergeExampleEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotRecalc())); ++line; - l = new QLabel(i18n("Match result:"), this); + l = new TQLabel(i18n("Match result:"), this); pGrid->addWidget(l,line,0); - m_pAutoMergeMatchResult = new QLineEdit(this); + m_pAutoMergeMatchResult = new TQLineEdit(this); m_pAutoMergeMatchResult->setReadOnly(true); pGrid->addWidget(m_pAutoMergeMatchResult,line,1); ++line; - pGrid->addItem( new QSpacerItem(100,20), line, 0 ); + pGrid->addItem( new TQSpacerItem(100,20), line, 0 ); pGrid->setRowStretch( line, 5); ++line; - l = new QLabel(i18n("History start regular expression:"), this); + l = new TQLabel(i18n("History start regular expression:"), this); pGrid->addWidget(l,line,0); - QToolTip::add( l, historyStartRegExpToolTip ); - m_pHistoryStartRegExpEdit = new QLineEdit(this); + TQToolTip::add( l, historyStartRegExpToolTip ); + m_pHistoryStartRegExpEdit = new TQLineEdit(this); pGrid->addWidget(m_pHistoryStartRegExpEdit,line,1); - connect( m_pHistoryStartRegExpEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc())); + connect( m_pHistoryStartRegExpEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotRecalc())); ++line; - l = new QLabel(i18n("Example history start line (with leading comment):"), this); + l = new TQLabel(i18n("Example history start line (with leading comment):"), this); pGrid->addMultiCellWidget(l,line,line,0,1); ++line; - QToolTip::add( l, i18n("Copy a history start line as used in your files,\n" + TQToolTip::add( l, i18n("Copy a history start line as used in your files,\n" "including the leading comment.") ); - m_pHistoryStartExampleEdit = new QLineEdit(this); + m_pHistoryStartExampleEdit = new TQLineEdit(this); pGrid->addWidget(m_pHistoryStartExampleEdit,line,1); - connect( m_pHistoryStartExampleEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc())); + connect( m_pHistoryStartExampleEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotRecalc())); ++line; - l = new QLabel(i18n("Match result:"), this); + l = new TQLabel(i18n("Match result:"), this); pGrid->addWidget(l,line,0); - m_pHistoryStartMatchResult = new QLineEdit(this); + m_pHistoryStartMatchResult = new TQLineEdit(this); m_pHistoryStartMatchResult->setReadOnly(true); pGrid->addWidget(m_pHistoryStartMatchResult,line,1); ++line; - pGrid->addItem( new QSpacerItem(100,20), line, 0 ); + pGrid->addItem( new TQSpacerItem(100,20), line, 0 ); pGrid->setRowStretch( line, 5); ++line; - l = new QLabel(i18n("History entry start regular expression:"), this); + l = new TQLabel(i18n("History entry start regular expression:"), this); pGrid->addWidget(l,line,0); - QToolTip::add( l, historyEntryStartRegExpToolTip ); - m_pHistoryEntryStartRegExpEdit = new QLineEdit(this); + TQToolTip::add( l, historyEntryStartRegExpToolTip ); + m_pHistoryEntryStartRegExpEdit = new TQLineEdit(this); pGrid->addWidget(m_pHistoryEntryStartRegExpEdit,line,1); - connect( m_pHistoryEntryStartRegExpEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc())); + connect( m_pHistoryEntryStartRegExpEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotRecalc())); ++line; - l = new QLabel(i18n("History sort key order:"), this); + l = new TQLabel(i18n("History sort key order:"), this); pGrid->addWidget(l,line,0); - QToolTip::add( l, historySortKeyOrderToolTip ); - m_pHistorySortKeyOrderEdit = new QLineEdit(this); + TQToolTip::add( l, historySortKeyOrderToolTip ); + m_pHistorySortKeyOrderEdit = new TQLineEdit(this); pGrid->addWidget(m_pHistorySortKeyOrderEdit,line,1); - connect( m_pHistorySortKeyOrderEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc())); + connect( m_pHistorySortKeyOrderEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotRecalc())); ++line; - l = new QLabel(i18n("Example history entry start line (without leading comment):"), this); + l = new TQLabel(i18n("Example history entry start line (without leading comment):"), this); pGrid->addMultiCellWidget(l,line,line,0,1); - QToolTip::add( l, i18n("Copy a history entry start line as used in your files,\n" + TQToolTip::add( l, i18n("Copy a history entry start line as used in your files,\n" "but omit the leading comment.") ); ++line; - m_pHistoryEntryStartExampleEdit = new QLineEdit(this); + m_pHistoryEntryStartExampleEdit = new TQLineEdit(this); pGrid->addWidget(m_pHistoryEntryStartExampleEdit,line,1); - connect( m_pHistoryEntryStartExampleEdit, SIGNAL(textChanged(const QString&)), this, SLOT(slotRecalc())); + connect( m_pHistoryEntryStartExampleEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotRecalc())); ++line; - l = new QLabel(i18n("Match result:"), this); + l = new TQLabel(i18n("Match result:"), this); pGrid->addWidget(l,line,0); - m_pHistoryEntryStartMatchResult = new QLineEdit(this); + m_pHistoryEntryStartMatchResult = new TQLineEdit(this); m_pHistoryEntryStartMatchResult->setReadOnly(true); pGrid->addWidget(m_pHistoryEntryStartMatchResult,line,1); ++line; - l = new QLabel(i18n("Sort key result:"), this); + l = new TQLabel(i18n("Sort key result:"), this); pGrid->addWidget(l,line,0); - m_pHistorySortKeyResult = new QLineEdit(this); + m_pHistorySortKeyResult = new TQLineEdit(this); m_pHistorySortKeyResult->setReadOnly(true); pGrid->addWidget(m_pHistorySortKeyResult,line,1); ++line; - QPushButton* pButton = new QPushButton(i18n("OK"), this); + TQPushButton* pButton = new TQPushButton(i18n("OK"), this); pGrid->addWidget(pButton,line,0); - connect( pButton, SIGNAL(clicked()), this, SLOT(accept())); + connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept())); - pButton = new QPushButton(i18n("Cancel"), this); + pButton = new TQPushButton(i18n("Cancel"), this); pGrid->addWidget(pButton,line,1); - connect( pButton, SIGNAL(clicked()), this, SLOT(reject())); + connect( pButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject())); - resize( 800, sizeHint().height() ); + resize( 800, tqsizeHint().height() ); } -void RegExpTester::init( const QString& autoMergeRegExp, const QString& historyStartRegExp, const QString& historyEntryStartRegExp, const QString historySortKeyOrder ) +void RegExpTester::init( const TQString& autoMergeRegExp, const TQString& historyStartRegExp, const TQString& historyEntryStartRegExp, const TQString historySortKeyOrder ) { m_pAutoMergeRegExpEdit->setText( autoMergeRegExp ); m_pHistoryStartRegExpEdit->setText( historyStartRegExp ); @@ -509,29 +509,29 @@ void RegExpTester::init( const QString& autoMergeRegExp, const QString& historyS m_pHistorySortKeyOrderEdit->setText( historySortKeyOrder ); } -QString RegExpTester::autoMergeRegExp() +TQString RegExpTester::autoMergeRegExp() { return m_pAutoMergeRegExpEdit->text(); } -QString RegExpTester::historyStartRegExp() +TQString RegExpTester::historyStartRegExp() { return m_pHistoryStartRegExpEdit->text(); } -QString RegExpTester::historyEntryStartRegExp() +TQString RegExpTester::historyEntryStartRegExp() { return m_pHistoryEntryStartRegExpEdit->text(); } -QString RegExpTester::historySortKeyOrder() +TQString RegExpTester::historySortKeyOrder() { return m_pHistorySortKeyOrderEdit->text(); } void RegExpTester::slotRecalc() { - QRegExp autoMergeRegExp = m_pAutoMergeRegExpEdit->text(); + TQRegExp autoMergeRegExp = m_pAutoMergeRegExpEdit->text(); if ( autoMergeRegExp.exactMatch( m_pAutoMergeExampleEdit->text() ) ) { m_pAutoMergeMatchResult->setText( i18n("Match success.") ); @@ -541,7 +541,7 @@ void RegExpTester::slotRecalc() m_pAutoMergeMatchResult->setText( i18n("Match failed.") ); } - QRegExp historyStartRegExp = m_pHistoryStartRegExpEdit->text(); + TQRegExp historyStartRegExp = m_pHistoryStartRegExpEdit->text(); if ( historyStartRegExp.exactMatch( m_pHistoryStartExampleEdit->text() ) ) { m_pHistoryStartMatchResult->setText( i18n("Match success.") ); @@ -552,21 +552,21 @@ void RegExpTester::slotRecalc() } - QStringList parenthesesGroups; - bool bSuccess = findParenthesesGroups( m_pHistoryEntryStartRegExpEdit->text(), parenthesesGroups ); + TQStringList tqparenthesesGroups; + bool bSuccess = findParenthesesGroups( m_pHistoryEntryStartRegExpEdit->text(), tqparenthesesGroups ); if ( ! bSuccess ) { - m_pHistoryEntryStartMatchResult->setText( i18n("Opening and closing parentheses don't match in regular expression.") ); + m_pHistoryEntryStartMatchResult->setText( i18n("Opening and closing tqparentheses don't match in regular expression.") ); m_pHistorySortKeyResult->setText( i18n("") ); return; } - QRegExp historyEntryStartRegExp = m_pHistoryEntryStartRegExpEdit->text(); - QString s = m_pHistoryEntryStartExampleEdit->text(); + TQRegExp historyEntryStartRegExp = m_pHistoryEntryStartRegExpEdit->text(); + TQString s = m_pHistoryEntryStartExampleEdit->text(); if ( historyEntryStartRegExp.exactMatch( s ) ) { m_pHistoryEntryStartMatchResult->setText( i18n("Match success.") ); - QString key = calcHistorySortKey( m_pHistorySortKeyOrderEdit->text(),historyEntryStartRegExp,parenthesesGroups); + TQString key = calcHistorySortKey( m_pHistorySortKeyOrderEdit->text(),historyEntryStartRegExp,tqparenthesesGroups); m_pHistorySortKeyResult->setText(key); } else |