diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /parts/outputviews/appoutputwidget.cpp | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/outputviews/appoutputwidget.cpp')
-rw-r--r-- | parts/outputviews/appoutputwidget.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/parts/outputviews/appoutputwidget.cpp b/parts/outputviews/appoutputwidget.cpp index e3c3810a..c58065a2 100644 --- a/parts/outputviews/appoutputwidget.cpp +++ b/parts/outputviews/appoutputwidget.cpp @@ -14,13 +14,13 @@ #include "appoutputwidget.h" -#include <qregexp.h> -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qclipboard.h> +#include <tqregexp.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqclipboard.h> #include <klocale.h> #include <kdebug.h> @@ -40,13 +40,13 @@ AppOutputWidget::AppOutputWidget(AppOutputViewPart* part) : ProcessWidget(0, "app output widget"), m_part(part) { - connect(this, SIGNAL(executed(QListBoxItem*)), SLOT(slotRowSelected(QListBoxItem*))); - connect(this, SIGNAL(rightButtonClicked( QListBoxItem *, const QPoint & )), - SLOT(slotContextMenu( QListBoxItem *, const QPoint & ))); + connect(this, TQT_SIGNAL(executed(TQListBoxItem*)), TQT_SLOT(slotRowSelected(TQListBoxItem*))); + connect(this, TQT_SIGNAL(rightButtonClicked( TQListBoxItem *, const TQPoint & )), + TQT_SLOT(slotContextMenu( TQListBoxItem *, const TQPoint & ))); KConfig *config = kapp->config(); config->setGroup("General Options"); setFont(config->readFontEntry("OutputViewFont")); - setSelectionMode(QListBox::Extended); + setSelectionMode(TQListBox::Extended); } void AppOutputWidget::clearViewAndContents() @@ -70,11 +70,11 @@ void AppOutputWidget::childFinished(bool normal, int status) } -void AppOutputWidget::slotRowSelected(QListBoxItem* row) +void AppOutputWidget::slotRowSelected(TQListBoxItem* row) { - static QRegExp assertMatch("ASSERT: \\\"([^\\\"]+)\\\" in ([^\\( ]+) \\(([\\d]+)\\)"); - static QRegExp lineInfoMatch("\\[([^:]+):([\\d]+)\\]"); - static QRegExp rubyErrorMatch("([^:\\s]+\\.rb):([\\d]+):?.*$"); + static TQRegExp assertMatch("ASSERT: \\\"([^\\\"]+)\\\" in ([^\\( ]+) \\(([\\d]+)\\)"); + static TQRegExp lineInfoMatch("\\[([^:]+):([\\d]+)\\]"); + static TQRegExp rubyErrorMatch("([^:\\s]+\\.rb):([\\d]+):?.*$"); if (row) { if (assertMatch.exactMatch(row->text())) { @@ -87,7 +87,7 @@ void AppOutputWidget::slotRowSelected(QListBoxItem* row) m_part->mainWindow()->statusBar()->message(row->text(), 10000); m_part->mainWindow()->lowerView(this); } else if (rubyErrorMatch.search(row->text()) != -1) { - QString file; + TQString file; if (rubyErrorMatch.cap(1).startsWith("/")) { file = rubyErrorMatch.cap(1); } else { @@ -101,7 +101,7 @@ void AppOutputWidget::slotRowSelected(QListBoxItem* row) } -void AppOutputWidget::insertStdoutLine(const QCString &line) +void AppOutputWidget::insertStdoutLine(const TQCString &line) { // kdDebug(9004) << k_funcinfo << line << endl; @@ -110,17 +110,17 @@ void AppOutputWidget::insertStdoutLine(const QCString &line) m_part->showView(); } - QString sline; + TQString sline; if( !stdoutbuf.isEmpty() ) { - sline = QString::fromLocal8Bit( stdoutbuf+line ); + sline = TQString::fromLocal8Bit( stdoutbuf+line ); stdoutbuf.truncate( 0 ); }else { - sline = QString::fromLocal8Bit( line ); + sline = TQString::fromLocal8Bit( line ); } - m_contentList.append(QString("o-")+sline); + m_contentList.append(TQString("o-")+sline); if ( filterSingleLine( sline ) ) { ProcessWidget::insertStdoutLine( sline.local8Bit() ); @@ -128,7 +128,7 @@ void AppOutputWidget::insertStdoutLine(const QCString &line) } -void AppOutputWidget::insertStderrLine(const QCString &line) +void AppOutputWidget::insertStderrLine(const TQCString &line) { // kdDebug(9004) << k_funcinfo << line << endl; @@ -138,17 +138,17 @@ void AppOutputWidget::insertStderrLine(const QCString &line) } - QString sline; + TQString sline; if( !stderrbuf.isEmpty() ) { - sline = QString::fromLocal8Bit( stderrbuf+line ); + sline = TQString::fromLocal8Bit( stderrbuf+line ); stderrbuf.truncate( 0 ); }else { - sline = QString::fromLocal8Bit( line ); + sline = TQString::fromLocal8Bit( line ); } - m_contentList.append(QString("e-")+sline); + m_contentList.append(TQString("e-")+sline); if ( filterSingleLine( sline ) ) { ProcessWidget::insertStderrLine( sline.local8Bit() ); @@ -162,7 +162,7 @@ void AppOutputWidget::editFilter() dlg.regularExpression->setChecked( m_filter.m_isRegExp ); dlg.filterString->setText( m_filter.m_filterString ); - if ( dlg.exec() == QDialog::Accepted ) + if ( dlg.exec() == TQDialog::Accepted ) { m_filter.m_caseSensitive = dlg.caseSensitive->isChecked(); m_filter.m_isRegExp = dlg.regularExpression->isChecked(); @@ -174,13 +174,13 @@ void AppOutputWidget::editFilter() } } -bool AppOutputWidget::filterSingleLine(const QString & line) +bool AppOutputWidget::filterSingleLine(const TQString & line) { if ( !m_filter.m_isActive ) return true; if ( m_filter.m_isRegExp ) { - return ( line.find( QRegExp( m_filter.m_filterString, m_filter.m_caseSensitive, false ) ) != -1 ); + return ( line.find( TQRegExp( m_filter.m_filterString, m_filter.m_caseSensitive, false ) ) != -1 ); } else { @@ -192,7 +192,7 @@ void AppOutputWidget::reinsertAndFilter() { //copy the first item from the listbox //if a programm was started, this contains the issued command - QString issuedCommand; + TQString issuedCommand; if ( count() > 0 ) { setTopItem(0); @@ -208,12 +208,12 @@ void AppOutputWidget::reinsertAndFilter() } //grep through the list for items matching the filter... - QStringList strListFound; + TQStringList strListFound; if ( m_filter.m_isActive ) { if ( m_filter.m_isRegExp ) { - strListFound = m_contentList.grep( QRegExp(m_filter.m_filterString, m_filter.m_caseSensitive, false ) ); + strListFound = m_contentList.grep( TQRegExp(m_filter.m_filterString, m_filter.m_caseSensitive, false ) ); } else { @@ -226,7 +226,7 @@ void AppOutputWidget::reinsertAndFilter() } //... and reinsert the found items into the listbox - for ( QStringList::Iterator it = strListFound.begin(); it != strListFound.end(); ++it ) + for ( TQStringList::Iterator it = strListFound.begin(); it != strListFound.end(); ++it ) { if ((*it).startsWith("o-")) { @@ -247,28 +247,28 @@ void AppOutputWidget::clearFilter() reinsertAndFilter(); } -void AppOutputWidget::slotContextMenu( QListBoxItem *, const QPoint &p ) +void AppOutputWidget::slotContextMenu( TQListBoxItem *, const TQPoint &p ) { KPopupMenu popup(this, "filter output"); - int id = popup.insertItem( i18n("Clear output"), this, SLOT(clearViewAndContents()) ); + int id = popup.insertItem( i18n("Clear output"), this, TQT_SLOT(clearViewAndContents()) ); popup.setItemEnabled( id, m_contentList.size() > 0 ); - popup.insertItem( i18n("Copy selected lines"), this, SLOT(copySelected()) ); + popup.insertItem( i18n("Copy selected lines"), this, TQT_SLOT(copySelected()) ); popup.insertSeparator(); - popup.insertItem( i18n("Save unfiltered"), this, SLOT(saveAll()) ); - id = popup.insertItem( i18n("Save filtered output"), this, SLOT(saveFiltered()) ); + popup.insertItem( i18n("Save unfiltered"), this, TQT_SLOT(saveAll()) ); + id = popup.insertItem( i18n("Save filtered output"), this, TQT_SLOT(saveFiltered()) ); popup.setItemEnabled( id, m_filter.m_isActive ); popup.insertSeparator(); - id = popup.insertItem( i18n("Clear filter"), this, SLOT(clearFilter()) ); + id = popup.insertItem( i18n("Clear filter"), this, TQT_SLOT(clearFilter()) ); popup.setItemEnabled( id, m_filter.m_isActive ); - popup.insertItem( i18n("Edit filter"), this, SLOT(editFilter() ) ); + popup.insertItem( i18n("Edit filter"), this, TQT_SLOT(editFilter() ) ); popup.insertSeparator(); - popup.insertItem( i18n("Hide view"), this, SLOT(hideView()) ); + popup.insertItem( i18n("Hide view"), this, TQT_SLOT(hideView()) ); popup.exec(p); } @@ -290,16 +290,16 @@ void AppOutputWidget::saveFiltered() void AppOutputWidget::saveOutputToFile(bool useFilter) { - QString filename = KFileDialog::getSaveFileName(); + TQString filename = KFileDialog::getSaveFileName(); if ( filename.isEmpty() ) return; - QStringList contents; + TQStringList contents; if ( useFilter && m_filter.m_isActive ) { if ( m_filter.m_isRegExp ) { - contents = m_contentList.grep( QRegExp(m_filter.m_filterString, m_filter.m_caseSensitive, false ) ); + contents = m_contentList.grep( TQRegExp(m_filter.m_filterString, m_filter.m_caseSensitive, false ) ); } else { @@ -311,14 +311,14 @@ void AppOutputWidget::saveOutputToFile(bool useFilter) contents = m_contentList; } - QFile file( filename ); + TQFile file( filename ); if ( file.open( IO_WriteOnly ) ) { - QTextStream ostream( &file ); - QStringList::ConstIterator it = contents.begin(); + TQTextStream ostream( &file ); + TQStringList::ConstIterator it = contents.begin(); while( it != contents.end() ) { - QString line = *it; + TQString line = *it; if ( line.startsWith("o-") || line.startsWith("e-") ) { line.remove( 0, 2 ); @@ -333,7 +333,7 @@ void AppOutputWidget::saveOutputToFile(bool useFilter) void AppOutputWidget::copySelected() { uint n = count(); - QString buffer; + TQString buffer; for (uint i = 0; i < n; i++) { if (isSelected(i)) @@ -342,12 +342,12 @@ void AppOutputWidget::copySelected() kapp->clipboard()->setText(buffer, QClipboard::Clipboard); } -void AppOutputWidget::addPartialStderrLine(const QCString & line) +void AppOutputWidget::addPartialStderrLine(const TQCString & line) { stderrbuf += line; } -void AppOutputWidget::addPartialStdoutLine(const QCString & line) +void AppOutputWidget::addPartialStdoutLine(const TQCString & line) { stdoutbuf += line; } |