From 87a016680e3677da3993f333561e79eb0cead7d5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 29 Jun 2011 16:05:55 +0000 Subject: TQt4 port ktechlab This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- src/gui/asmformattingwidget.ui | 20 ++--- src/gui/colorcombo.cpp | 90 ++++++++++---------- src/gui/colorcombo.h | 29 +++---- src/gui/contexthelp.cpp | 50 ++++++------ src/gui/contexthelp.h | 23 +++--- src/gui/createsubprojectwidget.ui | 14 ++-- src/gui/doublespinbox.cpp | 46 +++++------ src/gui/doublespinbox.h | 21 ++--- src/gui/generaloptionswidget.ui | 38 ++++----- src/gui/gpasmsettingswidget.ui | 24 +++--- src/gui/itemeditor.cpp | 54 ++++++------ src/gui/itemeditor.h | 23 +++--- src/gui/itemselector.cpp | 154 +++++++++++++++++------------------ src/gui/itemselector.h | 66 ++++++++------- src/gui/linkeroptionswidget.ui | 18 ++-- src/gui/logicwidget.ui | 24 +++--- src/gui/logview.cpp | 48 +++++------ src/gui/logview.h | 23 +++--- src/gui/microselectwidget.cpp | 38 ++++----- src/gui/microselectwidget.h | 31 +++---- src/gui/microsettingsdlg.cpp | 142 ++++++++++++++++---------------- src/gui/microsettingsdlg.h | 21 ++--- src/gui/microsettingswidget.ui | 18 ++-- src/gui/newfiledlg.cpp | 62 +++++++------- src/gui/newfiledlg.h | 13 +-- src/gui/newfilewidget.ui | 20 ++--- src/gui/newpinmappingwidget.ui | 18 ++-- src/gui/newprojectwidget.ui | 16 ++-- src/gui/orientationwidget.cpp | 62 +++++++------- src/gui/orientationwidget.h | 15 ++-- src/gui/oscilloscope.cpp | 62 +++++++------- src/gui/oscilloscope.h | 17 ++-- src/gui/oscilloscopeview.cpp | 78 +++++++++--------- src/gui/oscilloscopeview.h | 35 ++++---- src/gui/oscilloscopewidget.ui | 38 ++++----- src/gui/outputmethoddlg.cpp | 18 ++-- src/gui/outputmethoddlg.h | 17 ++-- src/gui/outputmethodwidget.ui | 22 ++--- src/gui/picprogrammerconfigwidget.ui | 38 ++++----- src/gui/pieditor.cpp | 118 +++++++++++++-------------- src/gui/pieditor.h | 56 +++++++------ src/gui/plvitem.cpp | 22 ++--- src/gui/plvitem.h | 27 +++--- src/gui/probepositioner.cpp | 44 +++++----- src/gui/probepositioner.h | 23 +++--- src/gui/processingoptionswidget.ui | 10 +-- src/gui/programmerdlg.cpp | 6 +- src/gui/programmerdlg.h | 3 +- src/gui/programmerwidget.ui | 14 ++-- src/gui/projectdlgs.cpp | 56 ++++++------- src/gui/projectdlgs.h | 29 ++++--- src/gui/propertieslistview.cpp | 48 +++++------ src/gui/propertieslistview.h | 17 ++-- src/gui/sdccoptionswidget.ui | 90 ++++++++++---------- src/gui/settingsdlg.cpp | 96 +++++++++++----------- src/gui/settingsdlg.h | 5 +- src/gui/symbolviewer.cpp | 40 ++++----- src/gui/symbolviewer.h | 18 ++-- 58 files changed, 1151 insertions(+), 1117 deletions(-) (limited to 'src/gui') diff --git a/src/gui/asmformattingwidget.ui b/src/gui/asmformattingwidget.ui index ecfa529..a246581 100644 --- a/src/gui/asmformattingwidget.ui +++ b/src/gui/asmformattingwidget.ui @@ -1,6 +1,6 @@ AsmFormattingWidget - + AsmFormattingWidget @@ -25,7 +25,7 @@ 0 - + groupBox64 @@ -36,7 +36,7 @@ unnamed - + textLabel11 @@ -44,7 +44,7 @@ 'equ' Value - + textLabel8 @@ -52,7 +52,7 @@ Instruction Data - + textLabel9 @@ -60,7 +60,7 @@ Comment - + textLabel10 @@ -68,7 +68,7 @@ 'equ' - + textLabel7 @@ -164,7 +164,7 @@ - + kcfg_AutoFormatMBOutput @@ -185,7 +185,7 @@ Expanding - + 20 484 @@ -202,7 +202,7 @@ kcfg_IndentComment kcfg_AutoFormatMBOutput - + knuminput.h knuminput.h diff --git a/src/gui/colorcombo.cpp b/src/gui/colorcombo.cpp index aec39ae..786ef98 100644 --- a/src/gui/colorcombo.cpp +++ b/src/gui/colorcombo.cpp @@ -12,14 +12,14 @@ #include #include -#include +#include bool ColorCombo::createdPalettes = false; -QColor * ColorCombo::palette[ NumberOfSchemes ]; +TQColor * ColorCombo::palette[ NumberOfSchemes ]; int ColorCombo::paletteSize[ NumberOfSchemes ]; -ColorCombo::ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *name ) - : QComboBox( parent, name ) +ColorCombo::ColorCombo( ColorScheme colorScheme, TQWidget *tqparent, const char *name ) + : TQComboBox( tqparent, name ) { m_colorScheme = colorScheme; @@ -30,8 +30,8 @@ ColorCombo::ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *na addColors(); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); - connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) ); } @@ -46,32 +46,32 @@ void ColorCombo::createPalettes() return; createdPalettes = true; - paletteSize[ QtStandard ] = 17; - palette[ QtStandard ] = new QColor[ paletteSize[ QtStandard ] ]; + paletteSize[ TQtStandard ] = 17; + palette[ TQtStandard ] = new TQColor[ paletteSize[ TQtStandard ] ]; int i = 0; - palette[ QtStandard ][i++] = Qt::red; - palette[ QtStandard ][i++] = Qt::green; - palette[ QtStandard ][i++] = Qt::blue; - palette[ QtStandard ][i++] = Qt::cyan; - palette[ QtStandard ][i++] = Qt::magenta; - palette[ QtStandard ][i++] = Qt::yellow; - palette[ QtStandard ][i++] = Qt::darkRed; - palette[ QtStandard ][i++] = Qt::darkGreen; - palette[ QtStandard ][i++] = Qt::darkBlue; - palette[ QtStandard ][i++] = Qt::darkCyan; - palette[ QtStandard ][i++] = Qt::darkMagenta; - palette[ QtStandard ][i++] = Qt::darkYellow; - palette[ QtStandard ][i++] = Qt::white; - palette[ QtStandard ][i++] = Qt::lightGray; - palette[ QtStandard ][i++] = Qt::gray; - palette[ QtStandard ][i++] = Qt::darkGray; - palette[ QtStandard ][i++] = Qt::black; + palette[ TQtStandard ][i++] = TQt::red; + palette[ TQtStandard ][i++] = TQt::green; + palette[ TQtStandard ][i++] = TQt::blue; + palette[ TQtStandard ][i++] = TQt::cyan; + palette[ TQtStandard ][i++] = TQt::magenta; + palette[ TQtStandard ][i++] = TQt::yellow; + palette[ TQtStandard ][i++] = TQt::darkRed; + palette[ TQtStandard ][i++] = TQt::darkGreen; + palette[ TQtStandard ][i++] = TQt::darkBlue; + palette[ TQtStandard ][i++] = TQt::darkCyan; + palette[ TQtStandard ][i++] = TQt::darkMagenta; + palette[ TQtStandard ][i++] = TQt::darkYellow; + palette[ TQtStandard ][i++] = TQt::white; + palette[ TQtStandard ][i++] = TQt::lightGray; + palette[ TQtStandard ][i++] = TQt::gray; + palette[ TQtStandard ][i++] = TQt::darkGray; + palette[ TQtStandard ][i++] = TQt::black; paletteSize[ LED ] = 6; - palette[ LED ] = new QColor[ paletteSize[ LED ] ]; + palette[ LED ] = new TQColor[ paletteSize[ LED ] ]; i = 0; palette[ LED ][i++] = "#f62a2a"; @@ -83,16 +83,16 @@ void ColorCombo::createPalettes() } -void ColorCombo::setColor( const QColor &col ) +void ColorCombo::setColor( const TQColor &col ) { internalColor = col; addColors(); } -void ColorCombo::resizeEvent( QResizeEvent *re ) +void ColorCombo::resizeEvent( TQResizeEvent *re ) { - QComboBox::resizeEvent( re ); + TQComboBox::resizeEvent( re ); addColors(); } @@ -101,23 +101,23 @@ void ColorCombo::slotActivated( int index ) { if ( index == 0 ) { - if ( KColorDialog::getColor( customColor, this ) == QDialog::Accepted ) + if ( KColorDialog::getColor( customColor, this ) == TQDialog::Accepted ) { - QPainter painter; - QPen pen; - QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4); - QPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; + TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4); + TQPixmap pixmap( rect.width(), rect.height() ); - if ( qGray( customColor.rgb() ) < 128 ) + if ( tqGray( customColor.rgb() ) < 128 ) pen.setColor( white ); else pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); - painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") ); + painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") ); painter.end(); changeItem( pixmap, 0 ); @@ -144,10 +144,10 @@ void ColorCombo::slotHighlighted( int index ) void ColorCombo::addColors() { - QPainter painter; - QPen pen; - QRect rect( 0, 0, width(), QFontMetrics(painter.font()).height()+4 ); - QPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; + TQRect rect( 0, 0, width(), TQFontMetrics(painter.font()).height()+4 ); + TQPixmap pixmap( rect.width(), rect.height() ); int i; clear(); @@ -160,16 +160,16 @@ void ColorCombo::addColors() if ( i == paletteSize[ m_colorScheme ] ) customColor = internalColor; - if ( qGray( customColor.rgb() ) < 128 ) + if ( tqGray( customColor.rgb() ) < 128 ) pen.setColor( white ); else pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); - painter.drawText( 2, QFontMetrics(painter.font()).ascent()+2, i18n("Custom...") ); + painter.drawText( 2, TQFontMetrics(painter.font()).ascent()+2, i18n("Custom...") ); painter.end(); insertItem( pixmap ); @@ -178,7 +178,7 @@ void ColorCombo::addColors() for ( i = 0; i < paletteSize[ m_colorScheme ]; i++ ) { painter.begin( &pixmap ); - QBrush brush( palette[ m_colorScheme ][i] ); + TQBrush brush( palette[ m_colorScheme ][i] ); painter.fillRect( rect, brush ); painter.end(); diff --git a/src/gui/colorcombo.h b/src/gui/colorcombo.h index 65b2714..0fb6071 100644 --- a/src/gui/colorcombo.h +++ b/src/gui/colorcombo.h @@ -11,8 +11,8 @@ #ifndef COLORCOMBO_H #define COLORCOMBO_H -#include -#include +#include +#include /** Based on KColorCombo, Copyright (C) 1997 Martin Jones (mjones@kde.org). Allows @@ -20,15 +20,16 @@ which colours are displayed to be changed. @author David Saxton */ -class ColorCombo : public QComboBox +class ColorCombo : public TQComboBox { Q_OBJECT - Q_PROPERTY( QColor color READ color WRITE setColor ) + TQ_OBJECT + TQ_PROPERTY( TQColor color READ color WRITE setColor ) public: enum ColorScheme { - QtStandard = 0, + TQtStandard = 0, LED = 1, NumberOfSchemes = 2, ///< for internal usage; this should be one less than the number of items in the enum }; @@ -36,43 +37,43 @@ class ColorCombo : public QComboBox /** * Constructs a color combo box. */ - ColorCombo( ColorScheme colorScheme, QWidget *parent, const char *name = 0L ); + ColorCombo( ColorScheme colorScheme, TQWidget *tqparent, const char *name = 0L ); ~ColorCombo(); /** * Selects the color @p col. */ - void setColor( const QColor & col ); + void setColor( const TQColor & col ); /** * Returns the currently selected color. **/ - QColor color() const { return internalColor; } + TQColor color() const { return internalColor; } signals: /** * Emitted when a new color box has been selected. */ - void activated( const QColor &col ); + void activated( const TQColor &col ); /** * Emitted when a new item has been highlighted. */ - void highlighted( const QColor &col ); + void highlighted( const TQColor &col ); protected slots: void slotActivated( int index ); void slotHighlighted( int index ); protected: - virtual void resizeEvent( QResizeEvent *re ); + virtual void resizeEvent( TQResizeEvent *re ); void addColors(); void createPalettes(); - QColor customColor; - QColor internalColor; + TQColor customColor; + TQColor internalColor; ColorScheme m_colorScheme; static bool createdPalettes; - static QColor * palette[ NumberOfSchemes ]; + static TQColor * palette[ NumberOfSchemes ]; static int paletteSize[ NumberOfSchemes ]; }; diff --git a/src/gui/contexthelp.cpp b/src/gui/contexthelp.cpp index 3444737..dacd1b9 100644 --- a/src/gui/contexthelp.cpp +++ b/src/gui/contexthelp.cpp @@ -16,44 +16,44 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include ContextHelp * ContextHelp::m_pSelf = 0l; -ContextHelp * ContextHelp::self( KateMDI::ToolView * parent ) +ContextHelp * ContextHelp::self( KateMDI::ToolView * tqparent ) { if (!m_pSelf) { - assert(parent); - m_pSelf = new ContextHelp(parent); + assert(tqparent); + m_pSelf = new ContextHelp(tqparent); } return m_pSelf; } -ContextHelp::ContextHelp( KateMDI::ToolView * parent ) - : QWidget( parent, "Context Help" ) +ContextHelp::ContextHelp( KateMDI::ToolView * tqparent ) + : TQWidget( tqparent, "Context Help" ) { - QWhatsThis::add( this, i18n("Provides context-sensitive help relevant to the current editing being performed.") ); + TQWhatsThis::add( this, i18n("Provides context-sensitive help relevant to the current editing being performed.") ); - QVBoxLayout *vlayout = new QVBoxLayout( this, 0, 6 ); + TQVBoxLayout *vtqlayout = new TQVBoxLayout( this, 0, 6 ); - m_nameLbl = new QLabel( this, "" ); - vlayout->addWidget(m_nameLbl); - vlayout->addSpacing(8); + m_nameLbl = new TQLabel( this, "" ); + vtqlayout->addWidget(m_nameLbl); + vtqlayout->addSpacing(8); - m_info = new QTextBrowser( this, "" ); - vlayout->addWidget(m_info); - m_info->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + m_info = new TQTextBrowser( this, "" ); + vtqlayout->addWidget(m_info); + m_info->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ); - QSpacerItem *spacer3 = new QSpacerItem( 1, 1, QSizePolicy::Preferred, QSizePolicy::Preferred ); - vlayout->addItem(spacer3); + TQSpacerItem *spacer3 = new TQSpacerItem( 1, 1, TQSizePolicy::Preferred, TQSizePolicy::Preferred ); + vtqlayout->addItem(spacer3); slotClear(); } @@ -90,18 +90,18 @@ void ContextHelp::slotMultipleSelected() } -void ContextHelp::setContextHelp(const QString& name, const QString& help) +void ContextHelp::setContextHelp(const TQString& name, const TQString& help) { m_nameLbl->setText("

"+name+"

"); - QString parsed = help; + TQString parsed = help; parseInfo(parsed); m_info->setText( ""+parsed ); } -void ContextHelp::parseInfo( QString &info ) +void ContextHelp::parseInfo( TQString &info ) { - info.replace("","

Example:
"); - info.replace("","
"); + info.tqreplace("","

Example:
"); + info.tqreplace("","
"); } #include "contexthelp.moc" diff --git a/src/gui/contexthelp.h b/src/gui/contexthelp.h index 90159b7..c363e39 100644 --- a/src/gui/contexthelp.h +++ b/src/gui/contexthelp.h @@ -11,12 +11,12 @@ #ifndef CONTEXTHELP_H #define CONTEXTHELP_H -#include +#include class Item; class ContextHelp; -class QLabel; -class QTextBrowser; +class TQLabel; +class TQTextBrowser; namespace KateMDI { class ToolView; } /** @@ -27,30 +27,31 @@ in a ICNDocument. @author David Saxton */ -class ContextHelp : public QWidget +class ContextHelp : public TQWidget { Q_OBJECT + TQ_OBJECT public: - static ContextHelp * self( KateMDI::ToolView * parent = 0l ); - static QString toolViewIdentifier() { return "ContextHelp"; } + static ContextHelp * self( KateMDI::ToolView * tqparent = 0l ); + static TQString toolViewIdentifier() { return "ContextHelp"; } ~ContextHelp(); /** * Replace special tags with appropriate html formatting code. */ - void parseInfo( QString &info ); + void parseInfo( TQString &info ); public slots: void slotClear(); void slotMultipleSelected(); void slotUpdate( Item *item ); - void setContextHelp(const QString& name, const QString &help); + void setContextHelp(const TQString& name, const TQString &help); private: - ContextHelp( KateMDI::ToolView * parent ); + ContextHelp( KateMDI::ToolView * tqparent ); - QLabel *m_nameLbl; - QTextBrowser *m_info; + TQLabel *m_nameLbl; + TQTextBrowser *m_info; static ContextHelp * m_pSelf; }; diff --git a/src/gui/createsubprojectwidget.ui b/src/gui/createsubprojectwidget.ui index 267739e..bf3efde 100644 --- a/src/gui/createsubprojectwidget.ui +++ b/src/gui/createsubprojectwidget.ui @@ -1,6 +1,6 @@ CreateSubprojectWidget - + CreateSubprojectWidget @@ -22,7 +22,7 @@ 0 - + textLabel1 @@ -35,7 +35,7 @@ Subproject Details
- + textLabel2 @@ -43,7 +43,7 @@ Target File: - + textLabel1_2 @@ -51,7 +51,7 @@ Type: - + Program @@ -81,7 +81,7 @@ Expanding - + 20 20 @@ -90,7 +90,7 @@ - + kurlrequester.h klineedit.h diff --git a/src/gui/doublespinbox.cpp b/src/gui/doublespinbox.cpp index b8672b5..fb5efa4 100644 --- a/src/gui/doublespinbox.cpp +++ b/src/gui/doublespinbox.cpp @@ -15,9 +15,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -30,21 +30,21 @@ inline int roundDouble( double val ) } -DoubleSpinBox::DoubleSpinBox( double lower, double upper, double minAbs, double value, const QString &unit, QWidget * parent ) - : QSpinBox( parent ) +DoubleSpinBox::DoubleSpinBox( double lower, double upper, double minAbs, double value, const TQString &unit, TQWidget * tqparent ) + : TQSpinBox( tqparent ) { m_lastEmittedValue = value; m_unit = unit; m_minValue = lower; m_maxValue = upper; m_minAbsValue = minAbs; - m_queuedSuffix = QString::null; + m_queuedSuffix = TQString(); - editor()->setAlignment( Qt::AlignRight ); + editor()->tqsetAlignment( TQt::AlignRight ); - connect( this, SIGNAL(valueChanged(int)), this, SLOT(checkIfChanged()) ); - QSpinBox::setMinValue( -(1<<30) ); - QSpinBox::setMaxValue( +(1<<30) ); + connect( this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(checkIfChanged()) ); + TQSpinBox::setMinValue( -(1<<30) ); + TQSpinBox::setMaxValue( +(1<<30) ); setValue( value ); setValidator( 0 ); @@ -75,11 +75,11 @@ void DoubleSpinBox::setValue( double value ) updateSuffix( value ); - QSpinBox::setValue( roundDouble( (value / Item::getMultiplier( value )) * 100 ) ); + TQSpinBox::setValue( roundDouble( (value / Item::getMultiplier( value )) * 100 ) ); } -void DoubleSpinBox::setUnit( const QString & unit ) +void DoubleSpinBox::setUnit( const TQString & unit ) { updateSuffix( value() ); m_unit = unit; @@ -94,7 +94,7 @@ void DoubleSpinBox::updateSuffix( double value ) if ( m_queuedSuffix.stripWhiteSpace().isEmpty() ) m_queuedSuffix = ""; - QTimer::singleShot( 0, this, SLOT(setQueuedSuffix()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(setQueuedSuffix()) ); } @@ -106,7 +106,7 @@ void DoubleSpinBox::setQueuedSuffix() setSuffix( m_queuedSuffix ); changed = true; } - m_queuedSuffix = QString::null; + m_queuedSuffix = TQString(); if ( changed ) emit valueChanged( value() ); @@ -115,29 +115,29 @@ void DoubleSpinBox::setQueuedSuffix() double DoubleSpinBox::getMult() { - QString text = this->text().stripWhiteSpace(); + TQString text = this->text().stripWhiteSpace(); if ( !m_queuedSuffix.isNull() ) { - QString nsSuffix = suffix().stripWhiteSpace(); + TQString nsSuffix = suffix().stripWhiteSpace(); if ( nsSuffix.isEmpty() ) text.append( m_queuedSuffix ); else - text.replace( nsSuffix, m_queuedSuffix ); + text.tqreplace( nsSuffix, m_queuedSuffix ); } if ( text.length() == 0 ) return 1.0; - if ( text.endsWith( m_unit, false ) ) + if ( text.tqendsWith( m_unit, false ) ) text = text.remove( text.length() - m_unit.length(), m_unit.length() ); text.stripWhiteSpace(); - QChar siExp = text[ text.length()-1 ]; + TQChar siExp = text[ text.length()-1 ]; if ( siExp.isLetter() || siExp.isSymbol() ) - return CNItem::getMultiplier((QString)siExp); + return CNItem::getMultiplier((TQString)siExp); else return 1; @@ -149,12 +149,12 @@ double DoubleSpinBox::getDisplayedNumber( bool * ok ) KLocale * locale = KGlobal::locale(); // Fetch the characters that we don't want to discard - const QString exclude = locale->decimalSymbol() + const TQString exclude = locale->decimalSymbol() + locale->thousandsSeparator() + locale->positiveSign() + locale->negativeSign(); - QString number = cleanText().remove( QRegExp("[^"+exclude+"\\d]") ); + TQString number = cleanText().remove( TQRegExp("[^"+exclude+"\\d]") ); return locale->readNumber( number, ok ); } @@ -184,7 +184,7 @@ int DoubleSpinBox::mapTextToValue( bool * ok ) } -QString DoubleSpinBox::mapValueToText( int v ) +TQString DoubleSpinBox::mapValueToText( int v ) { double val = double(v)/100.0; diff --git a/src/gui/doublespinbox.h b/src/gui/doublespinbox.h index 75f6c90..6df8f76 100644 --- a/src/gui/doublespinbox.h +++ b/src/gui/doublespinbox.h @@ -11,7 +11,7 @@ #ifndef DOUBLESPINBOX_H #define DOUBLESPINBOX_H -#include +#include /** Where appropriate, function names with value in them should @@ -20,11 +20,12 @@ spin box plus the SI magnitude symbol it is showing @author David Saxton */ -class DoubleSpinBox : public QSpinBox +class DoubleSpinBox : public TQSpinBox { Q_OBJECT + TQ_OBJECT public: - DoubleSpinBox( double lower, double upper, double minAbs, double value, const QString & unit, QWidget * parent = 0 ); + DoubleSpinBox( double lower, double upper, double minAbs, double value, const TQString & unit, TQWidget * tqparent = 0 ); virtual ~DoubleSpinBox(); /** @@ -69,7 +70,7 @@ class DoubleSpinBox : public QSpinBox /** * Sets the unit used, e.g. "F" */ - void setUnit( const QString & unit ); + void setUnit( const TQString & unit ); public slots: virtual void stepUp(); @@ -88,7 +89,7 @@ class DoubleSpinBox : public QSpinBox */ void checkIfChanged(); /** - * Sets the suffix from m_queuedSuffix. Called from QTimer::singleShot + * Sets the suffix from m_queuedSuffix. Called from TQTimer::singleShot * to avoid strange recursion problems. */ void setQueuedSuffix(); @@ -108,20 +109,20 @@ class DoubleSpinBox : public QSpinBox */ double getDisplayedNumber( bool * ok ); /** - * Overloaded the method in QSpinxBox to allow SI prefixes to be entered + * Overloaded the method in TQSpinxBox to allow SI prefixes to be entered */ virtual int mapTextToValue( bool * ok ); /** - * Overloaded the method in QSpinxBox to allow SI prefixes to be entered + * Overloaded the method in TQSpinxBox to allow SI prefixes to be entered */ - virtual QString mapValueToText( int v ); + virtual TQString mapValueToText( int v ); /** * Returns value rounded off to one significant figure. */ double roundToOneSF( double value ); - QString m_queuedSuffix; ///< Used - QString m_unit; + TQString m_queuedSuffix; ///< Used + TQString m_unit; double m_minValue; double m_maxValue; double m_minAbsValue; diff --git a/src/gui/generaloptionswidget.ui b/src/gui/generaloptionswidget.ui index 0f3ee2a..d98b794 100644 --- a/src/gui/generaloptionswidget.ui +++ b/src/gui/generaloptionswidget.ui @@ -1,6 +1,6 @@ GeneralOptionsWidget - + GeneralOptionsWidget @@ -22,7 +22,7 @@ 0 - + kcfg_ReuseSameViewForOutput @@ -33,7 +33,7 @@ - + kcfg_ShowVoltageBars @@ -55,7 +55,7 @@ The grid color in the work area. - + kcfg_ShowGrid @@ -82,7 +82,7 @@ 100000 - + textLabel1 @@ -93,7 +93,7 @@ Maximum undo steps for work area. This doesn't apply to text documents - that is configurable seperately under Configure Editor. - + groupBox4 @@ -104,7 +104,7 @@ unnamed - + kcfg_RestoreDocumentsOnStartup @@ -115,7 +115,7 @@ Alt+U - + kcfg_RaiseItemSelectors @@ -126,7 +126,7 @@ Alt+A - + kcfg_RaiseMessagesLog @@ -139,7 +139,7 @@ - + groupBox21 @@ -150,15 +150,15 @@ unnamed - + - layout8_2 + tqlayout8_2 unnamed - + refreshRateSlider @@ -178,7 +178,7 @@ Below - + textLabel3_2 @@ -186,7 +186,7 @@ Refresh rate: - + refreshRateLabel @@ -196,7 +196,7 @@ - + textLabel9_2 @@ -217,7 +217,7 @@ false - + WordBreak|AlignVCenter @@ -233,7 +233,7 @@ Expanding - + 20 40 @@ -261,7 +261,7 @@ kcfg_RaiseMessagesLog refreshRateSlider - + kcolorbutton.h knuminput.h diff --git a/src/gui/gpasmsettingswidget.ui b/src/gui/gpasmsettingswidget.ui index 069711f..9cf9be0 100644 --- a/src/gui/gpasmsettingswidget.ui +++ b/src/gui/gpasmsettingswidget.ui @@ -1,6 +1,6 @@ GpasmSettingsWidget - + GpasmSettingsWidget @@ -25,7 +25,7 @@ 0 - + textLabel2 @@ -33,7 +33,7 @@ Radix (-r): - + textLabel3 @@ -41,7 +41,7 @@ Warning level (-w): - + textLabel1 @@ -49,7 +49,7 @@ Hex Format (-a): - + kcfg_IgnoreCase @@ -63,7 +63,7 @@ All user defined symbols and macros are case sensitive. This option makes them case insensitive. - + kcfg_DosFormat @@ -87,7 +87,7 @@ Expanding - + 20 16 @@ -207,7 +207,7 @@ Expanding - + 40 20 @@ -224,7 +224,7 @@ Expanding - + 40 20 @@ -241,14 +241,14 @@ Expanding - + 40 20 - + textLabel1_2 @@ -278,7 +278,7 @@ kcfg_IgnoreCase kcfg_DosFormat - + kcombobox.h kcombobox.h diff --git a/src/gui/itemeditor.cpp b/src/gui/itemeditor.cpp index bdfe539..3e8a30e 100644 --- a/src/gui/itemeditor.cpp +++ b/src/gui/itemeditor.cpp @@ -17,63 +17,63 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include ItemEditor * ItemEditor::m_pSelf = 0l; -ItemEditor * ItemEditor::self( KateMDI::ToolView * parent ) +ItemEditor * ItemEditor::self( KateMDI::ToolView * tqparent ) { if (!m_pSelf) { - assert(parent); - m_pSelf = new ItemEditor(parent); + assert(tqparent); + m_pSelf = new ItemEditor(tqparent); } return m_pSelf; } -ItemEditor::ItemEditor( KateMDI::ToolView * parent ) - : QWidget( (QWidget*)parent, "Item Editor" ) +ItemEditor::ItemEditor( KateMDI::ToolView * tqparent ) + : TQWidget( (TQWidget*)tqparent, "Item Editor" ) { - QWhatsThis::add( this, i18n("This allows editing of advanced properties of the selected item(s). Right click on the picture of the item to set the orientation.") ); + TQWhatsThis::add( this, i18n("This allows editing of advanced properties of the selected item(s). Right click on the picture of the item to set the orientation.") ); - QVBoxLayout *vlayout = new QVBoxLayout( this, 0, 6 ); + TQVBoxLayout *vtqlayout = new TQVBoxLayout( this, 0, 6 ); - m_nameLbl = new QLabel( this, "" ); - vlayout->addWidget(m_nameLbl); - vlayout->addSpacing(8); + m_nameLbl = new TQLabel( this, "" ); + vtqlayout->addWidget(m_nameLbl); + vtqlayout->addSpacing(8); propList = new PropertiesListView(this); - vlayout->addWidget(propList); - QWhatsThis::add(propList,i18n("Shows properties associated with the currently selected item(s).

Select a property to change its value. If multiple items are selected with different values then the property will appear greyed out, use ""Merge Properties"" to make them the same.

Select ""Defaults to set all properties to their default values""")); + vtqlayout->addWidget(propList); + TQWhatsThis::add(propList,i18n("Shows properties associated with the currently selected item(s).

Select a property to change its value. If multiple items are selected with different values then the property will appear greyed out, use ""Merge Properties"" to make them the same.

Select ""Defaults to set all properties to their default values""")); - QHBoxLayout *h1Layout = new QHBoxLayout( vlayout, 4 ); - QSpacerItem *spacer1 = new QSpacerItem( 1, 1 ); + TQHBoxLayout *h1Layout = new TQHBoxLayout( vtqlayout, 4 ); + TQSpacerItem *spacer1 = new TQSpacerItem( 1, 1 ); h1Layout->addItem(spacer1); - m_defaultsBtn = new QPushButton( i18n("Defaults"), this); + m_defaultsBtn = new TQPushButton( i18n("Defaults"), this); m_defaultsBtn->setEnabled(false); - connect(m_defaultsBtn,SIGNAL(clicked()),propList,SLOT(slotSetDefaults())); + connect(m_defaultsBtn,TQT_SIGNAL(clicked()),propList,TQT_SLOT(slotSetDefaults())); h1Layout->addWidget(m_defaultsBtn); - m_mergeBtn = new QPushButton( i18n("Merge properties"), this ); + m_mergeBtn = new TQPushButton( i18n("Merge properties"), this ); m_mergeBtn->setEnabled(false); - connect(m_mergeBtn,SIGNAL(clicked()),this,SLOT(mergeProperties())); + connect(m_mergeBtn,TQT_SIGNAL(clicked()),this,TQT_SLOT(mergeProperties())); h1Layout->addWidget(m_mergeBtn); - // Orientation widget stuff - QHBoxLayout *h2Layout = new QHBoxLayout( vlayout, 6 ); - QSpacerItem *spacer2 = new QSpacerItem( 1, 1 ); + // Qt::Orientation widget stuff + TQHBoxLayout *h2Layout = new TQHBoxLayout( vtqlayout, 6 ); + TQSpacerItem *spacer2 = new TQSpacerItem( 1, 1 ); h2Layout->addItem(spacer2); m_orientationWidget = new OrientationWidget(this); h2Layout->addWidget(m_orientationWidget); - QWhatsThis::add(m_orientationWidget,i18n("Change the orientation of the selected item by selecting the appropriate button")); - QSpacerItem *spacer3 = new QSpacerItem( 1, 1 ); + TQWhatsThis::add(m_orientationWidget,i18n("Change the orientation of the selected item by selecting the appropriate button")); + TQSpacerItem *spacer3 = new TQSpacerItem( 1, 1 ); h2Layout->addItem(spacer3); slotClear(); diff --git a/src/gui/itemeditor.h b/src/gui/itemeditor.h index 8c21e49..38ed260 100644 --- a/src/gui/itemeditor.h +++ b/src/gui/itemeditor.h @@ -11,8 +11,8 @@ #ifndef ITEMEDITOR_H #define ITEMEDITOR_H -#include -#include +#include +#include class ItemEditor; @@ -24,8 +24,8 @@ class ICNDocument; class ItemGroup; class OrientationWidget; class PropertiesListView; -class QPushButton; -class QLabel; +class TQPushButton; +class TQLabel; namespace KateMDI { class ToolView; } @@ -33,13 +33,14 @@ namespace KateMDI { class ToolView; } @author Daniel Clarke @author David Saxton */ -class ItemEditor : public QWidget +class ItemEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - static ItemEditor * self( KateMDI::ToolView * parent = 0l ); + static ItemEditor * self( KateMDI::ToolView * tqparent = 0l ); ~ItemEditor(); - static QString toolViewIdentifier() { return "ItemEditor"; } + static TQString toolViewIdentifier() { return "ItemEditor"; } public slots: /** @@ -70,11 +71,11 @@ class ItemEditor : public QWidget void mergeProperties(); private: - ItemEditor( KateMDI::ToolView * parent ); + ItemEditor( KateMDI::ToolView * tqparent ); - QLabel *m_nameLbl; - QPushButton *m_defaultsBtn; - QPushButton *m_mergeBtn; + TQLabel *m_nameLbl; + TQPushButton *m_defaultsBtn; + TQPushButton *m_mergeBtn; OrientationWidget *m_orientationWidget; }; diff --git a/src/gui/itemselector.cpp b/src/gui/itemselector.cpp index f85756e..c02fffd 100644 --- a/src/gui/itemselector.cpp +++ b/src/gui/itemselector.cpp @@ -23,23 +23,23 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -ILVItem::ILVItem( QListView* parent, const QString &id ) - : KListViewItem( parent, 0 ) +ILVItem::ILVItem( TQListView* tqparent, const TQString &id ) + : KListViewItem( tqparent, 0 ) { m_id = id; b_isRemovable = false; m_pProjectItem = 0l; } -ILVItem::ILVItem( QListViewItem* parent, const QString &id ) - : KListViewItem( parent, 0 ) +ILVItem::ILVItem( TQListViewItem* tqparent, const TQString &id ) + : KListViewItem( tqparent, 0 ) { m_id = id; b_isRemovable = false; @@ -47,8 +47,8 @@ ILVItem::ILVItem( QListViewItem* parent, const QString &id ) } -ItemSelector::ItemSelector( QWidget *parent, const char *name ) - : KListView( parent, name ) +ItemSelector::ItemSelector( TQWidget *tqparent, const char *name ) + : KListView( tqparent, name ) { addColumn( i18n( "Component" ) ); setFullWidth(true); @@ -56,10 +56,10 @@ ItemSelector::ItemSelector( QWidget *parent, const char *name ) setRootIsDecorated(true); setDragEnabled(true); -// connect( this, SIGNAL(executed(QListViewItem*) ), this, SLOT(slotItemExecuted(QListViewItem*)) ); - connect( this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotItemClicked(QListViewItem*)) ); - connect( this, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(slotItemDoubleClicked(QListViewItem*)) ); - connect( this, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int )), this, SLOT(slotContextMenuRequested(QListViewItem*, const QPoint&, int )) ); +// connect( this, TQT_SIGNAL(executed(TQListViewItem*) ), this, TQT_SLOT(slotItemExecuted(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(clicked(TQListViewItem*)), this, TQT_SLOT(slotItemClicked(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(slotItemDoubleClicked(TQListViewItem*)) ); + connect( this, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int )), this, TQT_SLOT(slotContextMenuRequested(TQListViewItem*, const TQPoint&, int )) ); } ItemSelector::~ItemSelector() @@ -75,11 +75,11 @@ void ItemSelector::clear() } -void ItemSelector::addItem( const QString & caption, const QString & id, const QString & _category, const QPixmap & icon, bool removable ) +void ItemSelector::addItem( const TQString & caption, const TQString & id, const TQString & _category, const TQPixmap & icon, bool removable ) { - ILVItem *parentItem = 0L; + ILVItem *tqparentItem = 0L; - QString category = _category; + TQString category = _category; if ( !category.startsWith("/") ) { category.prepend('/'); } @@ -87,44 +87,44 @@ void ItemSelector::addItem( const QString & caption, const QString & id, const Q do { category.remove(0,1); - QString cat; - category.replace( "\\/", "|" ); - int pos = category.find('/'); + TQString cat; + category.tqreplace( "\\/", "|" ); + int pos = category.tqfind('/'); if ( pos == -1 ) cat = category; else cat = category.left( pos ); - cat.replace( "|", "/" ); + cat.tqreplace( "|", "/" ); - if ( m_categories.findIndex(cat) == -1 ) + if ( m_categories.tqfindIndex(cat) == -1 ) { m_categories.append(cat); - if (parentItem) { - parentItem = new ILVItem( parentItem, "" ); + if (tqparentItem) { + tqparentItem = new ILVItem( tqparentItem, "" ); } else { - parentItem = new ILVItem( this, "" ); + tqparentItem = new ILVItem( this, "" ); } - parentItem->setOpen( readOpenState(cat) ); + tqparentItem->setOpen( readOpenState(cat) ); - parentItem->setExpandable(true); - parentItem->setText( 0, cat ); + tqparentItem->setExpandable(true); + tqparentItem->setText( 0, cat ); } else { - parentItem = (ILVItem*)findItem( cat, 0 ); + tqparentItem = (ILVItem*)tqfindItem( cat, 0 ); } category.remove( 0, pos ); - } while ( category.contains('/') ); + } while ( category.tqcontains('/') ); - if ( !parentItem ) + if ( !tqparentItem ) { - kdError() << "Unexpected error in finding parent item for category list"<setPixmap( 0, icon ); item->setText( 0, caption ); item->setRemovable(removable); @@ -136,10 +136,10 @@ void ItemSelector::writeOpenStates() KConfig *config = kapp->config(); config->setGroup( name() ); - const QStringList::iterator end = m_categories.end(); - for ( QStringList::iterator it = m_categories.begin(); it != end; ++it ) + const TQStringList::iterator end = m_categories.end(); + for ( TQStringList::iterator it = m_categories.begin(); it != end; ++it ) { - QListViewItem *item = findItem( *it, 0 ); + TQListViewItem *item = tqfindItem( *it, 0 ); if (item) { config->writeEntry( *it+"IsOpen", item->isOpen() ); } @@ -147,7 +147,7 @@ void ItemSelector::writeOpenStates() } -bool ItemSelector::readOpenState( const QString &id ) +bool ItemSelector::readOpenState( const TQString &id ) { KConfig *config = kapp->config(); config->setGroup( name() ); @@ -156,14 +156,14 @@ bool ItemSelector::readOpenState( const QString &id ) } -void ItemSelector::slotContextMenuRequested( QListViewItem* item, const QPoint& pos, int /*col*/ ) +void ItemSelector::slotContextMenuRequested( TQListViewItem* item, const TQPoint& pos, int /*col*/ ) { if ( !item || !(static_cast(item))->isRemovable() ) { return; } - QPopupMenu *menu = new QPopupMenu(this); - menu->insertItem( i18n("Remove %1").arg(item->text(0)), this, SLOT(slotRemoveSelectedItem()), Qt::Key_Delete ); + TQPopupMenu *menu = new TQPopupMenu(this); + menu->insertItem( i18n("Remove %1").tqarg(item->text(0)), this, TQT_SLOT(slotRemoveSelectedItem()), TQt::Key_Delete ); menu->popup(pos); } @@ -175,25 +175,25 @@ void ItemSelector::slotRemoveSelectedItem() return; emit itemRemoved( item->key( 0, 0 ) ); - ILVItem *parent = dynamic_cast(item->QListViewItem::parent()); + ILVItem *tqparent = dynamic_cast(item->TQListViewItem::tqparent()); delete item; - // Get rid of the category as well if it has no children - if ( parent && !parent->firstChild() ) + // Get rid of the category as well if it has no tqchildren + if ( tqparent && !tqparent->firstChild() ) { - m_categories.remove(parent->text(0)); - delete parent; + m_categories.remove(tqparent->text(0)); + delete tqparent; } } -void ItemSelector::setListCaption( const QString &caption ) +void ItemSelector::setListCaption( const TQString &caption ) { setColumnText( 0, caption ); } -void ItemSelector::slotItemClicked( QListViewItem *item ) +void ItemSelector::slotItemClicked( TQListViewItem *item ) { if (!item) return; @@ -205,12 +205,12 @@ void ItemSelector::slotItemClicked( QListViewItem *item ) } -void ItemSelector::slotItemDoubleClicked( QListViewItem *item ) +void ItemSelector::slotItemDoubleClicked( TQListViewItem *item ) { if (!item) return; - QString id = item->key( 0, 0 ); + TQString id = item->key( 0, 0 ); if ( Document * doc = DocManager::self()->getFocusedDocument() ) { @@ -228,34 +228,34 @@ void ItemSelector::slotItemDoubleClicked( QListViewItem *item ) } -QDragObject* ItemSelector::dragObject() +TQDragObject* ItemSelector::dragObject() { - const QString id = currentItem()->key(0,0); + const TQString id = currentItem()->key(0,0); - QStoredDrag * d = 0l; + TQStoredDrag * d = 0l; if ( id.startsWith("flow/") ) - d = new QStoredDrag( "ktechlab/flowpart", this ); + d = new TQStoredDrag( "ktechlab/flowpart", this ); else if ( id.startsWith("ec/") ) - d = new QStoredDrag( "ktechlab/component", this ); + d = new TQStoredDrag( "ktechlab/component", this ); else if ( id.startsWith("sc/") ) - d = new QStoredDrag( "ktechlab/subcircuit", this ); + d = new TQStoredDrag( "ktechlab/subcircuit", this ); else if ( id.startsWith("mech/") ) - d = new QStoredDrag( "ktechlab/mechanical", this ); + d = new TQStoredDrag( "ktechlab/mechanical", this ); if (d) { - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); stream << id; d->setEncodedData(data); } // A pixmap cursor is often hard to make out -// QPixmap *pixmap = const_cast(currentItem()->pixmap(0)); +// TQPixmap *pixmap = const_cast(currentItem()->pixmap(0)); // if (pixmap) d->setPixmap(*pixmap); return d; @@ -267,21 +267,21 @@ QDragObject* ItemSelector::dragObject() ComponentSelector * ComponentSelector::m_pSelf = 0l; -ComponentSelector * ComponentSelector::self( KateMDI::ToolView * parent ) +ComponentSelector * ComponentSelector::self( KateMDI::ToolView * tqparent ) { if (!m_pSelf) { - assert(parent); - m_pSelf = new ComponentSelector(parent); + assert(tqparent); + m_pSelf = new ComponentSelector(tqparent); } return m_pSelf; } -ComponentSelector::ComponentSelector( KateMDI::ToolView * parent ) - : ItemSelector( (QWidget*)parent, "Component Selector" ) +ComponentSelector::ComponentSelector( KateMDI::ToolView * tqparent ) + : ItemSelector( (TQWidget*)tqparent, "Component Selector" ) { - QWhatsThis::add( this, i18n( + TQWhatsThis::add( this, i18n( "Add components to the circuit diagram by dragging them into the circuit.

" "To add more than one component of the same type, doubleclick on a component, and click repeatedly in the circuit to place the component. Right click to stop placement.

" @@ -307,21 +307,21 @@ ComponentSelector::ComponentSelector( KateMDI::ToolView * parent ) FlowPartSelector * FlowPartSelector::m_pSelf = 0l; -FlowPartSelector * FlowPartSelector::self( KateMDI::ToolView * parent ) +FlowPartSelector * FlowPartSelector::self( KateMDI::ToolView * tqparent ) { if (!m_pSelf) { - assert(parent); - m_pSelf = new FlowPartSelector(parent); + assert(tqparent); + m_pSelf = new FlowPartSelector(tqparent); } return m_pSelf; } -FlowPartSelector::FlowPartSelector( KateMDI::ToolView * parent ) - : ItemSelector( (QWidget*)parent, "Part Selector" ) +FlowPartSelector::FlowPartSelector( KateMDI::ToolView * tqparent ) + : ItemSelector( (TQWidget*)tqparent, "Part Selector" ) { - QWhatsThis::add( this, i18n("Add FlowPart to the FlowCode document by dragging them there.

To add more than one FlowPart of the same type, doubleclick on a FlowPart, and click repeatedly in the FlowChart to place the component. Right click to stop placement.") ); + TQWhatsThis::add( this, i18n("Add FlowPart to the FlowCode document by dragging them there.

To add more than one FlowPart of the same type, doubleclick on a FlowPart, and click repeatedly in the FlowChart to place the component. Right click to stop placement.") ); setListCaption( i18n("Flow Part") ); @@ -340,21 +340,21 @@ FlowPartSelector::FlowPartSelector( KateMDI::ToolView * parent ) MechanicsSelector * MechanicsSelector::m_pSelf = 0l; -MechanicsSelector * MechanicsSelector::self( KateMDI::ToolView * parent ) +MechanicsSelector * MechanicsSelector::self( KateMDI::ToolView * tqparent ) { if (!m_pSelf) { - assert(parent); - m_pSelf = new MechanicsSelector( (QWidget*)parent ); + assert(tqparent); + m_pSelf = new MechanicsSelector( (TQWidget*)tqparent ); } return m_pSelf; } -MechanicsSelector::MechanicsSelector( QWidget *parent ) - : ItemSelector( (QWidget*)parent, "Mechanics Selector" ) +MechanicsSelector::MechanicsSelector( TQWidget *tqparent ) + : ItemSelector( (TQWidget*)tqparent, "Mechanics Selector" ) { - QWhatsThis::add( this, i18n("Add mechanical parts to the mechanics work area by dragging them there.") ); + TQWhatsThis::add( this, i18n("Add mechanical parts to the mechanics work area by dragging them there.") ); LibraryItemList *items = itemLibrary()->items(); const LibraryItemList::iterator end = items->end(); diff --git a/src/gui/itemselector.h b/src/gui/itemselector.h index ab9c11c..28f31b2 100644 --- a/src/gui/itemselector.h +++ b/src/gui/itemselector.h @@ -13,29 +13,29 @@ #include -#include -#include +#include +#include class ProjectItem; -class QStoredDrag; +class TQStoredDrag; namespace KateMDI { class ToolView; } /** @short Contains info about item for ItemSelector @author David Saxton */ -class ILVItem : public QObject, public KListViewItem +class ILVItem : public TQObject, public KListViewItem { public: - ILVItem( QListView *parent, const QString &id ); - ILVItem( QListViewItem *parent, const QString &id ); + ILVItem( TQListView *tqparent, const TQString &id ); + ILVItem( TQListViewItem *tqparent, const TQString &id ); void setProjectItem( ProjectItem * projectItem ) { m_pProjectItem = projectItem; } ProjectItem * projectItem() const { return m_pProjectItem; } - QString id() const { return m_id; } + TQString id() const { return m_id; } - QString key( int, bool ) const { return m_id; } + TQString key( int, bool ) const { return m_id; } /** * Set whether the item can be removed from the listview by the user */ @@ -46,7 +46,7 @@ class ILVItem : public QObject, public KListViewItem bool isRemovable() const { return b_isRemovable; } protected: - QString m_id; + TQString m_id; bool b_isRemovable; ProjectItem * m_pProjectItem; }; @@ -58,8 +58,9 @@ class ILVItem : public QObject, public KListViewItem class ItemSelector : public KListView { Q_OBJECT + TQ_OBJECT public: - ItemSelector( QWidget *parent, const char *name ); + ItemSelector( TQWidget *tqparent, const char *name ); ~ItemSelector(); /** * Adds a listview item to the ListView @@ -69,10 +70,10 @@ class ItemSelector : public KListView * @param icon The icon to be displayed to the left of the text * @param removable Whether the user can right-click on the item and select Remove */ - void addItem( const QString & caption, const QString & id, const QString & category, const QPixmap & icon = QPixmap(), bool removable = false ); + void addItem( const TQString & caption, const TQString & id, const TQString & category, const TQPixmap & icon = TQPixmap(), bool removable = false ); public slots: - virtual void slotContextMenuRequested( QListViewItem *item, const QPoint &pos, int col ); + virtual void slotContextMenuRequested( TQListViewItem *item, const TQPoint &pos, int col ); virtual void clear(); void slotRemoveSelectedItem(); @@ -80,17 +81,17 @@ class ItemSelector : public KListView /** * Emitted when a user selects an item and removes it */ - void itemRemoved( const QString &id ); - void itemDoubleClicked( const QString &id ); - void itemClicked( const QString &id ); + void itemRemoved( const TQString &id ); + void itemDoubleClicked( const TQString &id ); + void itemClicked( const TQString &id ); protected: /** * Sets the caption of the ListView (eg 'Components' or 'Files') */ - void setListCaption( const QString &caption ); + void setListCaption( const TQString &caption ); /** - * Writes the open status (folded or unfolded) of "parent" items in the view + * Writes the open status (folded or unfolded) of "tqparent" items in the view * to the config file. */ void writeOpenStates(); @@ -98,19 +99,19 @@ class ItemSelector : public KListView * Reads the open status (folded or unfolded) of the given item. The default * status for non-existant items is true. */ - bool readOpenState( const QString &id ); + bool readOpenState( const TQString &id ); private slots: - void slotItemClicked( QListViewItem *item ); - void slotItemDoubleClicked( QListViewItem *item ); + void slotItemClicked( TQListViewItem *item ); + void slotItemDoubleClicked( TQListViewItem *item ); private: /** * @return a dragobject encoding the currently selected component item. */ - QDragObject * dragObject(); + TQDragObject * dragObject(); - QStringList m_categories; + TQStringList m_categories; }; @@ -121,12 +122,13 @@ class ItemSelector : public KListView class ComponentSelector : public ItemSelector { Q_OBJECT + TQ_OBJECT public: - static ComponentSelector * self( KateMDI::ToolView * parent = 0l ); - static QString toolViewIdentifier() { return "ComponentSelector"; } + static ComponentSelector * self( KateMDI::ToolView * tqparent = 0l ); + static TQString toolViewIdentifier() { return "ComponentSelector"; } private: - ComponentSelector( KateMDI::ToolView * parent ); + ComponentSelector( KateMDI::ToolView * tqparent ); static ComponentSelector * m_pSelf; }; @@ -138,12 +140,13 @@ class ComponentSelector : public ItemSelector class FlowPartSelector : public ItemSelector { Q_OBJECT + TQ_OBJECT public: - static FlowPartSelector * self( KateMDI::ToolView * parent = 0l ); - static QString toolViewIdentifier() { return "FlowPartSelector"; } + static FlowPartSelector * self( KateMDI::ToolView * tqparent = 0l ); + static TQString toolViewIdentifier() { return "FlowPartSelector"; } private: - FlowPartSelector( KateMDI::ToolView * parent ); + FlowPartSelector( KateMDI::ToolView * tqparent ); static FlowPartSelector * m_pSelf; }; @@ -154,12 +157,13 @@ class FlowPartSelector : public ItemSelector class MechanicsSelector : public ItemSelector { Q_OBJECT + TQ_OBJECT public: - static MechanicsSelector * self( KateMDI::ToolView * parent = 0l ); - static QString toolViewIdentifier() { return "MechanicsSelector"; } + static MechanicsSelector * self( KateMDI::ToolView * tqparent = 0l ); + static TQString toolViewIdentifier() { return "MechanicsSelector"; } private: - MechanicsSelector( QWidget *parent = 0L ); + MechanicsSelector( TQWidget *tqparent = 0L ); static MechanicsSelector * m_pSelf; }; diff --git a/src/gui/linkeroptionswidget.ui b/src/gui/linkeroptionswidget.ui index e2c48d8..4674641 100644 --- a/src/gui/linkeroptionswidget.ui +++ b/src/gui/linkeroptionswidget.ui @@ -1,6 +1,6 @@ LinkerOptionsWidget - + LinkerOptionsWidget @@ -53,7 +53,7 @@ GPASM supports inhx8m, inhx8s, inhx16, and inhx32 hex file formats. This option controls which hex file format is used. - + textLabel3 @@ -66,7 +66,7 @@ m_pLibraryDir - + textLabel1 @@ -74,7 +74,7 @@ Hex Format (-a): - + m_pOutputMap @@ -85,7 +85,7 @@ Alt+O - + textLabel8 @@ -93,7 +93,7 @@ Linker Script (-s): - + m_pLinkerScript @@ -103,7 +103,7 @@ m_pOther - + textLabel4 @@ -111,7 +111,7 @@ Other: - + groupBox2 @@ -167,7 +167,7 @@ m_pOther m_pInternalLibraries - + kcombobox.h klineedit.h diff --git a/src/gui/logicwidget.ui b/src/gui/logicwidget.ui index 18c1860..a931dc5 100644 --- a/src/gui/logicwidget.ui +++ b/src/gui/logicwidget.ui @@ -1,6 +1,6 @@ LogicWidget - + LogicWidget @@ -22,7 +22,7 @@ 0 - + groupBox3 @@ -59,7 +59,7 @@ - + textLabel2_2 @@ -96,7 +96,7 @@ - + textLabel1 @@ -109,7 +109,7 @@ - + groupBox4 @@ -120,7 +120,7 @@ unnamed - + textLabel2 @@ -157,7 +157,7 @@ - + textLabel4 @@ -168,7 +168,7 @@ This is the output impedance when the output is high. - + textLabel1_2 @@ -230,7 +230,7 @@ - + textLabel2_3 @@ -239,7 +239,7 @@ These values will apply to all components, apart from the PIC, whose pins' impedances depend on the pin in use. - + WordBreak|AlignVCenter @@ -253,7 +253,7 @@ These values will apply to all components, apart from the PIC, whose pins' imped Expanding - + 20 16 @@ -262,7 +262,7 @@ These values will apply to all components, apart from the PIC, whose pins' imped - + knuminput.h knuminput.h diff --git a/src/gui/logview.cpp b/src/gui/logview.cpp index fcb8caf..690b593 100644 --- a/src/gui/logview.cpp +++ b/src/gui/logview.cpp @@ -14,20 +14,20 @@ #include #include #include -#include +#include //BEGIN class LogView -LogView::LogView( KateMDI::ToolView * parent, const char *name ) - : KTextEdit( parent, name ) +LogView::LogView( KateMDI::ToolView * tqparent, const char *name ) + : KTextEdit( tqparent, name ) { setReadOnly(true); - setPaper( Qt::white ); + setPaper( TQt::white ); setTextFormat( LogText ); setWordWrap( WidgetWidth ); // Connect up signal emitted when the user doubleclicks on a paragraph in the log view - connect( this, SIGNAL(clicked(int,int)), this, SLOT(slotParaClicked(int,int)) ); + connect( this, TQT_SIGNAL(clicked(int,int)), this, TQT_SLOT(slotParaClicked(int,int)) ); } @@ -43,29 +43,29 @@ void LogView::clear() } -void LogView::addOutput( QString text, OutputType outputType, MessageInfo messageInfo ) +void LogView::addOutput( TQString text, OutputType outputType, MessageInfo messageInfo ) { tidyText(text); switch(outputType) { case LogView::ot_important: - append( QString("%1").arg(text) ); + append( TQString("%1").tqarg(text) ); break; case LogView::ot_info: - append( QString("%1").arg(text) ); + append( TQString("%1").tqarg(text) ); break; case LogView::ot_message: - append( QString("%1").arg(text) ); + append( TQString("%1").tqarg(text) ); break; case LogView::ot_warning: - append( QString("%1").arg(text) ); + append( TQString("%1").tqarg(text) ); break; case LogView::ot_error: - append( QString("%1").arg(text) ); + append( TQString("%1").tqarg(text) ); break; } @@ -75,34 +75,34 @@ void LogView::addOutput( QString text, OutputType outputType, MessageInfo messag void LogView::slotParaClicked( int para, int /*pos*/ ) { - QString t = text(para); + TQString t = text(para); untidyText(t); emit paraClicked( t, m_messageInfoMap[para] ); } -void LogView::tidyText( QString &t ) +void LogView::tidyText( TQString &t ) { - t.replace( "&", "&" ); - t.replace( "<", "<" ); - t.replace( ">", ">" ); + t.tqreplace( "&", "&" ); + t.tqreplace( "<", "<" ); + t.tqreplace( ">", ">" ); } -void LogView::untidyText( QString &t ) +void LogView::untidyText( TQString &t ) { - t.replace( "<", "<" ); - t.replace( ">", ">" ); - t.replace( "&", "&" ); + t.tqreplace( "<", "<" ); + t.tqreplace( ">", ">" ); + t.tqreplace( "&", "&" ); } -QPopupMenu * LogView::createPopupMenu( const QPoint & pos ) +TQPopupMenu * LogView::createPopupMenu( const TQPoint & pos ) { - QPopupMenu * menu = KTextEdit::createPopupMenu( pos ); + TQPopupMenu * menu = KTextEdit::createPopupMenu( pos ); menu->insertSeparator(); - int id = menu->insertItem( i18n("Clear All"), this, SLOT(clear()) ); + int id = menu->insertItem( i18n("Clear All"), this, TQT_SLOT(clear()) ); // "an empty textedit is always considered to have one paragraph" - qt documentation // although this does not always seem to be the case, so I don't know... @@ -121,7 +121,7 @@ MessageInfo::MessageInfo() } -MessageInfo::MessageInfo( QString fileURL, int fileLine ) +MessageInfo::MessageInfo( TQString fileURL, int fileLine ) { m_fileURL = fileURL; m_fileLine = fileLine; diff --git a/src/gui/logview.h b/src/gui/logview.h index c568da8..a2b9487 100644 --- a/src/gui/logview.h +++ b/src/gui/logview.h @@ -14,7 +14,7 @@ class KTechlab; #include -#include +#include namespace KateMDI { class ToolView; } @@ -22,16 +22,16 @@ class MessageInfo { public: MessageInfo(); - MessageInfo( QString fileURL, int fileLine ); + MessageInfo( TQString fileURL, int fileLine ); - QString fileURL() const { return m_fileURL; } + TQString fileURL() const { return m_fileURL; } int fileLine() const { return m_fileLine; } protected: - QString m_fileURL; + TQString m_fileURL; int m_fileLine; }; -typedef QMap MessageInfoMap; +typedef TQMap MessageInfoMap; /** @@ -42,8 +42,9 @@ Base class for logviews (eg GpasmInterface) which output information, warnings, class LogView : public KTextEdit { Q_OBJECT + TQ_OBJECT public: - LogView( KateMDI::ToolView * parent, const char *name = 0 ); + LogView( KateMDI::ToolView * tqparent, const char *name = 0 ); ~LogView(); enum OutputType @@ -59,22 +60,22 @@ class LogView : public KTextEdit /** * Emitted when the user clicks on a paragraph in the log view */ - void paraClicked( const QString &text, MessageInfo messageInfo ); + void paraClicked( const TQString &text, MessageInfo messageInfo ); public slots: virtual void clear(); - void addOutput( QString text, OutputType outputType, MessageInfo messageInfo = MessageInfo() ); + void addOutput( TQString text, OutputType outputType, MessageInfo messageInfo = MessageInfo() ); protected: - virtual QPopupMenu * createPopupMenu( const QPoint & pos ); + virtual TQPopupMenu * createPopupMenu( const TQPoint & pos ); /** * Replaces "&" with &, "<" with <, etc */ - void tidyText( QString &t ); + void tidyText( TQString &t ); /** * Replaces "<" with "<", "&" with "&", etc */ - void untidyText( QString &t ); + void untidyText( TQString &t ); MessageInfoMap m_messageInfoMap; diff --git a/src/gui/microselectwidget.cpp b/src/gui/microselectwidget.cpp index 1c4150b..a1af719 100644 --- a/src/gui/microselectwidget.cpp +++ b/src/gui/microselectwidget.cpp @@ -15,15 +15,15 @@ #include #include -#include -#include -#include -#include -#include -#include - -MicroSelectWidget::MicroSelectWidget( QWidget* parent, const char* name, WFlags ) - : QGroupBox( 4, Qt::Horizontal, i18n("Microprocessor"), parent, name ) +#include +#include +#include +#include +#include +#include + +MicroSelectWidget::MicroSelectWidget( TQWidget* tqparent, const char* name, WFlags ) + : TQGroupBox( 4, Qt::Horizontal, i18n("Microprocessor"), tqparent, name ) { m_allowedAsmSet = AsmInfo::AsmSetAll; m_allowedGpsimSupport = m_allowedFlowCodeSupport = m_allowedMicrobeSupport = MicroInfo::AllSupport; @@ -31,22 +31,22 @@ MicroSelectWidget::MicroSelectWidget( QWidget* parent, const char* name, WFlags if ( !name ) setName( "MicroSelectWidget" ); - m_pMicroFamilyLabel = new QLabel( this, "m_pMicroFamilyLabel" ); + m_pMicroFamilyLabel = new TQLabel( this, "m_pMicroFamilyLabel" ); m_pMicroFamilyLabel->setText( i18n("Family") ); m_pMicroFamily = new KComboBox( FALSE, this, "m_pMicroFamily" ); - m_pMicroFamily->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); + m_pMicroFamily->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); - m_pMicroLabel = new QLabel( this, "m_pMicroLabel" ); + m_pMicroLabel = new TQLabel( this, "m_pMicroLabel" ); m_pMicroLabel->setText( i18n("Micro") ); m_pMicro = new KComboBox( FALSE, this, "m_pMicro" ); - m_pMicro->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); + m_pMicro->tqsetSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); m_pMicro->setEditable( TRUE ); m_pMicro->setAutoCompletion(true); updateFromAllowed(); setMicro("P16F84"); - connect( m_pMicroFamily, SIGNAL(activated(const QString & )), this, SLOT(microFamilyChanged(const QString& )) ); + connect( m_pMicroFamily, TQT_SIGNAL(activated(const TQString & )), this, TQT_SLOT(microFamilyChanged(const TQString& )) ); } @@ -78,7 +78,7 @@ void MicroSelectWidget::setAllowedMicrobeSupport( unsigned allowed ) void MicroSelectWidget::updateFromAllowed() { - QString oldFamily = m_pMicroFamily->currentText(); + TQString oldFamily = m_pMicroFamily->currentText(); m_pMicroFamily->clear(); @@ -95,7 +95,7 @@ void MicroSelectWidget::updateFromAllowed() } -void MicroSelectWidget::setMicro( const QString & id ) +void MicroSelectWidget::setMicro( const TQString & id ) { MicroInfo * info = MicroLibrary::self()->microInfoWithID(id); if (!info) @@ -109,15 +109,15 @@ void MicroSelectWidget::setMicro( const QString & id ) } -QString MicroSelectWidget::micro() const +TQString MicroSelectWidget::micro() const { return m_pMicro->currentText(); } -void MicroSelectWidget::microFamilyChanged( const QString & family ) +void MicroSelectWidget::microFamilyChanged( const TQString & family ) { - QString oldID = m_pMicro->currentText(); + TQString oldID = m_pMicro->currentText(); m_pMicro->clear(); m_pMicro->insertStringList( MicroLibrary::self()->microIDs( AsmInfo::stringToSet(family), m_allowedGpsimSupport, m_allowedFlowCodeSupport, m_allowedMicrobeSupport ) ); diff --git a/src/gui/microselectwidget.h b/src/gui/microselectwidget.h index 3730c8f..6555a1e 100644 --- a/src/gui/microselectwidget.h +++ b/src/gui/microselectwidget.h @@ -11,29 +11,30 @@ #ifndef MICROSELECTWIDGET_H #define MICROSELECTWIDGET_H -#include +#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; -class QGroupBox; -class QLabel; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQSpacerItem; +class TQGroupBox; +class TQLabel; class KComboBox; /** @author David Saxton */ -class MicroSelectWidget : public QGroupBox +class MicroSelectWidget : public TQGroupBox { Q_OBJECT + TQ_OBJECT public: - MicroSelectWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + MicroSelectWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 ); ~MicroSelectWidget(); - void setMicro( const QString & id ); - QString micro() const; + void setMicro( const TQString & id ); + TQString micro() const; /** * @see MicroLibrary::microIDs @@ -53,7 +54,7 @@ class MicroSelectWidget : public QGroupBox void setAllowedMicrobeSupport( unsigned allowed ); protected slots: - void microFamilyChanged( const QString & family ); + void microFamilyChanged( const TQString & family ); protected: void updateFromAllowed(); @@ -63,10 +64,10 @@ class MicroSelectWidget : public QGroupBox unsigned int m_allowedFlowCodeSupport; unsigned int m_allowedMicrobeSupport; - QHBoxLayout * m_pWidgetLayout; - QLabel * m_pMicroFamilyLabel; + TQHBoxLayout * m_pWidgetLayout; + TQLabel * m_pMicroFamilyLabel; KComboBox * m_pMicroFamily; - QLabel * m_pMicroLabel; + TQLabel * m_pMicroLabel; KComboBox * m_pMicro; }; diff --git a/src/gui/microsettingsdlg.cpp b/src/gui/microsettingsdlg.cpp index c3915e8..78b585d 100644 --- a/src/gui/microsettingsdlg.cpp +++ b/src/gui/microsettingsdlg.cpp @@ -24,24 +24,24 @@ #include #include -#include -#include -#include -#include -#include -#include - -MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n("PIC Settings"), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, KDialogBase::Ok, true ) +#include +#include +#include +#include +#include +#include + +MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("PIC Settings"), KDialogBase::Ok|KDialogBase::Apply|KDialogBase::Cancel, KDialogBase::Ok, true ) { m_pMicroSettings = microSettings; m_pNewPinMappingWidget = 0l; m_pNewPinMappingDlg = 0l; m_pWidget = new MicroSettingsWidget(this); - QWhatsThis::add( this, i18n("This dialog allows editing of the initial properties of the PIC") ); - QWhatsThis::add( m_pWidget->portsGroupBox, i18n("Edit the initial value of the ports here. For each binary number, the order from right-to-left is pins 0 through 7.

The \"Type (TRIS)\" edit shows the initial input/output state of the ports; 1 represents an input, and 0 an output.

The \"State (PORT)\" edit shows the initial high/low state of the ports; 1 represents a high, and 0 a low.") ); - QWhatsThis::add( m_pWidget->variables, i18n("Edit the initial value of the variables here.

Note that the value of the variable can only be in the range 0->255. These variables will be initialized before any other code is executed.") ); + TQWhatsThis::add( this, i18n("This dialog allows editing of the initial properties of the PIC") ); + TQWhatsThis::add( m_pWidget->portsGroupBox, i18n("Edit the initial value of the ports here. For each binary number, the order from right-to-left is pins 0 through 7.

The \"Type (TRIS)\" edit shows the initial input/output state of the ports; 1 represents an input, and 0 an output.

The \"State (PORT)\" edit shows the initial high/low state of the ports; 1 represents a high, and 0 a low.") ); + TQWhatsThis::add( m_pWidget->variables, i18n("Edit the initial value of the variables here.

Note that the value of the variable can only be in the range 0->255. These variables will be initialized before any other code is executed.") ); //BEGIN Initialize initial port settings @@ -51,14 +51,14 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare m_portStateEdit.resize( m_portNames.size(), 0 ); uint row = 0; - QStringList::iterator end = m_portNames.end(); - for ( QStringList::iterator it = m_portNames.begin(); it != end; ++it, ++row ) + TQStringList::iterator end = m_portNames.end(); + for ( TQStringList::iterator it = m_portNames.begin(); it != end; ++it, ++row ) { //BEGIN Get current Type / State text - QString portType = QString::number( microSettings->portType(*it), 2 ); - QString portState = QString::number( microSettings->portState(*it), 2 ); + TQString portType = TQString::number( microSettings->portType(*it), 2 ); + TQString portState = TQString::number( microSettings->portState(*it), 2 ); - QString fill; + TQString fill; fill.fill( '0', 8-portType.length() ); portType.prepend(fill); fill.fill( '0', 8-portState.length() ); @@ -66,17 +66,17 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare //END Get current Type / State text - QGroupBox * groupBox = new QGroupBox( *it, m_pWidget->portsGroupBox ); + TQGroupBox * groupBox = new TQGroupBox( *it, m_pWidget->portsGroupBox ); groupBox->setColumnLayout(0, Qt::Vertical ); - groupBox->layout()->setSpacing( 6 ); - groupBox->layout()->setMargin( 11 ); - QGridLayout * groupBoxLayout = new QGridLayout( groupBox->layout() ); - groupBoxLayout->setAlignment( Qt::AlignTop ); + groupBox->tqlayout()->setSpacing( 6 ); + groupBox->tqlayout()->setMargin( 11 ); + TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->tqlayout() ); + groupBoxLayout->tqsetAlignment( TQt::AlignTop ); // TODO: replace this with i18n( "the type", "Type (TRIS register):" ); - groupBoxLayout->addWidget( new QLabel( i18n("Type (TRIS register):"), groupBox ), 0, 0 ); - groupBoxLayout->addWidget( new QLabel( i18n("State (PORT register):"), groupBox ), 1, 0 ); + groupBoxLayout->addWidget( new TQLabel( i18n("Type (TRIS register):"), groupBox ), 0, 0 ); + groupBoxLayout->addWidget( new TQLabel( i18n("State (PORT register):"), groupBox ), 1, 0 ); m_portTypeEdit[row] = new KLineEdit( portType, groupBox ); groupBoxLayout->addWidget( m_portTypeEdit[row], 0, 1 ); @@ -84,8 +84,8 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare m_portStateEdit[row] = new KLineEdit( portState, groupBox ); groupBoxLayout->addWidget( m_portStateEdit[row], 1, 1 ); -// (dynamic_cast(m_pWidget->portsGroupBox->layout()))->insertWidget( row, groupBox ); - (dynamic_cast(m_pWidget->portsGroupBox->layout()))->addWidget( groupBox ); +// (dynamic_cast(m_pWidget->portsGroupBox->tqlayout()))->insertWidget( row, groupBox ); + (dynamic_cast(m_pWidget->portsGroupBox->tqlayout()))->addWidget( groupBox ); } //END Initialize initial port settings @@ -99,10 +99,10 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare m_pWidget->variables->setColumnStretchable( 0, true ); m_pWidget->variables->setColumnStretchable( 1, true ); - QStringList variables = microSettings->variableNames(); + TQStringList variables = microSettings->variableNames(); row = 0; end = variables.end(); - for ( QStringList::iterator it = variables.begin(); it != end; ++it ) + for ( TQStringList::iterator it = variables.begin(); it != end; ++it ) { VariableInfo *info = microSettings->variableInfo(*it); if (info) @@ -115,16 +115,16 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare } m_pWidget->variables->insertRows( row, 1 ); - connect( m_pWidget->variables, SIGNAL(valueChanged(int,int)), this, SLOT(checkAddVariableRow()) ); + connect( m_pWidget->variables, TQT_SIGNAL(valueChanged(int,int)), this, TQT_SLOT(checkAddVariableRow()) ); //END Initialize initial variable settings //BEGIN Initialize pin maps - connect( m_pWidget->pinMapAdd, SIGNAL(clicked()), this, SLOT(slotCreatePinMap()) ); - connect( m_pWidget->pinMapModify, SIGNAL(clicked()), this, SLOT(slotModifyPinMap()) ); - connect( m_pWidget->pinMapRename, SIGNAL(clicked()), this, SLOT(slotRenamePinMap()) ); - connect( m_pWidget->pinMapRemove, SIGNAL(clicked()), this, SLOT(slotRemovePinMap()) ); + connect( m_pWidget->pinMapAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCreatePinMap()) ); + connect( m_pWidget->pinMapModify, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModifyPinMap()) ); + connect( m_pWidget->pinMapRename, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRenamePinMap()) ); + connect( m_pWidget->pinMapRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemovePinMap()) ); m_pinMappings = microSettings->pinMappings(); m_pWidget->pinMapCombo->insertStringList( m_pinMappings.keys() ); @@ -138,7 +138,7 @@ MicroSettingsDlg::MicroSettingsDlg( MicroSettings * microSettings, QWidget *pare m_pWidget->adjustSize(); adjustSize(); - connect( this, SIGNAL(applyClicked()), this, SLOT(slotSaveStuff()) ); + connect( this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(slotSaveStuff()) ); } @@ -174,64 +174,64 @@ void MicroSettingsDlg::reject() } -QValidator::State MicroSettingsDlg::validatePinMapName( QString & name ) const +TQValidator::State MicroSettingsDlg::validatePinMapName( TQString & name ) const { - name.replace( ' ', '_' ); + name.tqreplace( ' ', '_' ); if ( name.isEmpty() ) - return QValidator::Intermediate; + return TQValidator::Intermediate; for ( unsigned i = 0; i < name.length(); ++i ) { if ( !name[i].isLetterOrNumber() && name[i] != '_' ) - return QValidator::Invalid; + return TQValidator::Invalid; } if ( name[0].isNumber() ) - return QValidator::Intermediate; + return TQValidator::Intermediate; if ( m_pWidget->pinMapCombo->contains( name ) ) - return QValidator::Intermediate; + return TQValidator::Intermediate; - return QValidator::Acceptable; + return TQValidator::Acceptable; } -class PinMappingNameValidator : public QValidator +class PinMappingNameValidator : public TQValidator { public: /** * Create a validator. If oldName is not empty, then the input is * allowed to be oldName. */ - PinMappingNameValidator( MicroSettingsDlg * dlg, const QString & oldName = 0 ) - : QValidator(0) + PinMappingNameValidator( MicroSettingsDlg * dlg, const TQString & oldName = 0 ) + : TQValidator(0) { m_pDlg = dlg; m_oldName = oldName; } - virtual State validate( QString & input, int & ) const + virtual State validate( TQString & input, int & ) const { if ( (!m_oldName.isEmpty()) && (input == m_oldName) ) - return QValidator::Acceptable; + return TQValidator::Acceptable; return m_pDlg->validatePinMapName( input ); } protected: MicroSettingsDlg * m_pDlg; - QString m_oldName; + TQString m_oldName; }; -void MicroSettingsDlg::slotCheckNewPinMappingName( const QString & name ) +void MicroSettingsDlg::slotCheckNewPinMappingName( const TQString & name ) { // Validate name might change the name so that it is valid - QString newName = name; + TQString newName = name; if ( m_pNewPinMappingWidget ) - m_pNewPinMappingDlg->enableButtonOK( validatePinMapName( newName ) == QValidator::Acceptable ); + m_pNewPinMappingDlg->enableButtonOK( validatePinMapName( newName ) == TQValidator::Acceptable ); if ( newName != name ) m_pNewPinMappingWidget->nameEdit->setText( newName ); @@ -248,18 +248,18 @@ void MicroSettingsDlg::slotCreatePinMap() PinMappingNameValidator * validator = new PinMappingNameValidator( this ); m_pNewPinMappingWidget->nameEdit->setValidator( validator ); - connect( m_pNewPinMappingWidget->nameEdit, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckNewPinMappingName(const QString &)) ); + connect( m_pNewPinMappingWidget->nameEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotCheckNewPinMappingName(const TQString &)) ); slotCheckNewPinMappingName( 0 ); int accepted = m_pNewPinMappingDlg->exec(); unsigned selectedType = m_pNewPinMappingWidget->typeCombo->currentItem(); - QString name = m_pNewPinMappingWidget->nameEdit->text(); + TQString name = m_pNewPinMappingWidget->nameEdit->text(); delete m_pNewPinMappingDlg; delete validator; m_pNewPinMappingDlg = 0l; m_pNewPinMappingWidget = 0l; - if ( accepted != QDialog::Accepted ) + if ( accepted != TQDialog::Accepted ) return; PinMapping::Type type = PinMapping::Invalid; @@ -296,14 +296,14 @@ void MicroSettingsDlg::slotRenamePinMap() { KComboBox * combo = m_pWidget->pinMapCombo; - QString oldName = combo->currentText(); + TQString oldName = combo->currentText(); if ( oldName.isEmpty() ) return; PinMappingNameValidator * validator = new PinMappingNameValidator( this, oldName ); bool ok = false; - QString newName = KInputDialog::getText( i18n("New Pin Map Name"), i18n("Name"), oldName, & ok, this, 0, validator ); + TQString newName = KInputDialog::getText( i18n("New Pin Map Name"), i18n("Name"), oldName, & ok, this, 0, validator ); delete validator; @@ -322,7 +322,7 @@ void MicroSettingsDlg::slotRenamePinMap() void MicroSettingsDlg::slotModifyPinMap() { - QString name = m_pWidget->pinMapCombo->currentText(); + TQString name = m_pWidget->pinMapCombo->currentText(); PinMapping pinMapping = m_pinMappings[ name ]; PinMapEditor * pinMapEditor = new PinMapEditor( & pinMapping, m_pMicroSettings->microInfo(), this, "PinMapEditor" ); @@ -330,7 +330,7 @@ void MicroSettingsDlg::slotModifyPinMap() delete pinMapEditor; - if ( accepted != QDialog::Accepted ) + if ( accepted != TQDialog::Accepted ) return; m_pinMappings[ name ] = pinMapping; @@ -341,7 +341,7 @@ void MicroSettingsDlg::slotRemovePinMap() { KComboBox * combo = m_pWidget->pinMapCombo; - QString pinMapID = combo->currentText(); + TQString pinMapID = combo->currentText(); if ( pinMapID.isEmpty() ) return; @@ -364,32 +364,32 @@ void MicroSettingsDlg::updatePinMapButtons() void MicroSettingsDlg::savePort( int row ) { - QString port = m_portNames[row]; + TQString port = m_portNames[row]; int type, state; - QString typeText = m_portTypeEdit[row]->text(); + TQString typeText = m_portTypeEdit[row]->text(); bool typeOk = true; - if ( typeText.startsWith( "0x", false ) ) type = typeText.remove(0,2).toInt( &typeOk, 16 ); - else if ( typeText.contains( QRegExp("[^01]") ) ) type = typeText.toInt( &typeOk, 10 ); + if ( typeText.tqstartsWith( "0x", false ) ) type = typeText.remove(0,2).toInt( &typeOk, 16 ); + else if ( typeText.tqcontains( TQRegExp("[^01]") ) ) type = typeText.toInt( &typeOk, 10 ); else type = typeText.toInt( &typeOk, 2 ); if ( !typeOk ) { -// KMessageBox::sorry( this, i18n("Unregnised Port Type: %1").arg(typeText) ); +// KMessageBox::sorry( this, i18n("Unregnised Port Type: %1").tqarg(typeText) ); return; } - QString stateText = m_portStateEdit[row]->text(); + TQString stateText = m_portStateEdit[row]->text(); bool stateOk = true; - if ( stateText.startsWith( "0x", false ) ) state = stateText.remove(0,2).toInt( &stateOk, 16 ); - else if ( stateText.contains( QRegExp("[^01]") ) ) state = stateText.toInt( &stateOk, 10 ); + if ( stateText.tqstartsWith( "0x", false ) ) state = stateText.remove(0,2).toInt( &stateOk, 16 ); + else if ( stateText.tqcontains( TQRegExp("[^01]") ) ) state = stateText.toInt( &stateOk, 10 ); else state = stateText.toInt( &stateOk, 2 ); if ( !stateOk ) { -// KMessageBox::sorry( this, i18n("Unregnised Port State: %1").arg(stateText) ); +// KMessageBox::sorry( this, i18n("Unregnised Port State: %1").tqarg(stateText) ); return; } @@ -400,18 +400,18 @@ void MicroSettingsDlg::savePort( int row ) void MicroSettingsDlg::saveVariable( int row ) { - QString name = m_pWidget->variables->text( row, 0 ); + TQString name = m_pWidget->variables->text( row, 0 ); if ( name.isEmpty() ) return; - QString valueText = m_pWidget->variables->text( row, 1 ); + TQString valueText = m_pWidget->variables->text( row, 1 ); int value; bool ok = true; - if ( valueText.startsWith( "0x", false ) ) value = valueText.remove(0,2).toInt( &ok, 16 ); + if ( valueText.tqstartsWith( "0x", false ) ) value = valueText.remove(0,2).toInt( &ok, 16 ); else value = valueText.toInt( &ok, 10 ); if (!ok) { - KMessageBox::sorry( this, i18n("Invalid variable value: %1").arg(valueText) ); + KMessageBox::sorry( this, i18n("Invalid variable value: %1").tqarg(valueText) ); return; } diff --git a/src/gui/microsettingsdlg.h b/src/gui/microsettingsdlg.h index 54582dd..3e47bfb 100644 --- a/src/gui/microsettingsdlg.h +++ b/src/gui/microsettingsdlg.h @@ -13,9 +13,9 @@ #include -#include -#include -#include +#include +#include +#include class KLineEdit; class MicroSettings; @@ -23,7 +23,7 @@ class MicroSettingsWidget; class NewPinMappingWidget; class PinMapping; -typedef QMap< QString, PinMapping > PinMappingMap; +typedef TQMap< TQString, PinMapping > PinMappingMap; /** @author David Saxton @@ -31,8 +31,9 @@ typedef QMap< QString, PinMapping > PinMappingMap; class MicroSettingsDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - MicroSettingsDlg( MicroSettings *_microSettings, QWidget *parent = 0L, const char *name = 0L ); + MicroSettingsDlg( MicroSettings *_microSettings, TQWidget *tqparent = 0L, const char *name = 0L ); ~MicroSettingsDlg(); void reject(); @@ -45,7 +46,7 @@ class MicroSettingsDlg : public KDialogBase * Intermediate for a pinMapName that starts with a number or is already * in use, and Acceptable otherwise. */ - QValidator::State validatePinMapName( QString & pinMapName ) const; + TQValidator::State validatePinMapName( TQString & pinMapName ) const; public slots: /** @@ -84,7 +85,7 @@ class MicroSettingsDlg : public KDialogBase void slotSaveStuff(); protected slots: - void slotCheckNewPinMappingName( const QString & name ); + void slotCheckNewPinMappingName( const TQString & name ); protected: /** @@ -97,9 +98,9 @@ class MicroSettingsDlg : public KDialogBase MicroSettingsWidget * m_pWidget; MicroSettings * m_pMicroSettings; PinMappingMap m_pinMappings; - QValueVector< KLineEdit * > m_portTypeEdit; - QValueVector< KLineEdit * > m_portStateEdit; - QStringList m_portNames; + TQValueVector< KLineEdit * > m_portTypeEdit; + TQValueVector< KLineEdit * > m_portStateEdit; + TQStringList m_portNames; }; #endif diff --git a/src/gui/microsettingswidget.ui b/src/gui/microsettingswidget.ui index 5c63a1b..417275d 100644 --- a/src/gui/microsettingswidget.ui +++ b/src/gui/microsettingswidget.ui @@ -1,6 +1,6 @@ MicroSettingsWidget - + MicroSettingsWidget @@ -30,7 +30,7 @@ 0 - + portsGroupBox @@ -41,7 +41,7 @@ unnamed - + textLabel1 @@ -63,7 +63,7 @@ Drag it to set the type (input/output). - + groupBox6 @@ -82,7 +82,7 @@ Drag it to set the type (input/output). unnamed - + Variable @@ -96,7 +96,7 @@ Drag it to set the type (input/output). variables - + 0 64 @@ -111,7 +111,7 @@ Drag it to set the type (input/output). - + groupBox3 @@ -145,7 +145,7 @@ Drag it to set the type (input/output). Expanding - + 60 20 @@ -186,7 +186,7 @@ Drag it to set the type (input/output). - + kcombobox.h kpushbutton.h diff --git a/src/gui/newfiledlg.cpp b/src/gui/newfiledlg.cpp index 485b3bf..8342976 100644 --- a/src/gui/newfiledlg.cpp +++ b/src/gui/newfiledlg.cpp @@ -25,46 +25,46 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -NewFileDlg::NewFileDlg( QWidget *parent ) - : KDialogBase( parent, "newfiledlg", true, "New File", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) +NewFileDlg::NewFileDlg( TQWidget *tqparent ) + : KDialogBase( tqparent, "newfiledlg", true, "New File", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { - m_pMainParent = parent; + m_pMainParent = tqparent; m_bAccepted = false; m_pNewFileWidget = new NewFileWidget(this); - m_pNewFileWidget->typeIconView->setSelectionMode(QIconView::Single); + m_pNewFileWidget->typeIconView->setSelectionMode(TQIconView::Single); m_pNewFileWidget->typeIconView->setMode(KIconView::Select); KIconLoader *loader = KGlobal::iconLoader(); - QValueList items; + TQValueList items; - items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Assembly Code (.asm)", loader->loadIcon( "source", KIcon::NoGroup, KIcon::SizeHuge ) ); - items << new QIconViewItem(m_pNewFileWidget->typeIconView,"C (.c)", loader->loadIcon( "source_c", KIcon::NoGroup, KIcon::SizeHuge ) ); - items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Circuit (.circuit)", loader->loadIcon( "ktechlab_circuit", KIcon::NoGroup, KIcon::SizeHuge ) ); - items << new QIconViewItem(m_pNewFileWidget->typeIconView,"FlowCode (.flowcode)", loader->loadIcon( "ktechlab_flowcode", KIcon::NoGroup, KIcon::SizeHuge ) ); + items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Assembly Code (.asm)", loader->loadIcon( "source", KIcon::NoGroup, KIcon::SizeHuge ) ); + items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"C (.c)", loader->loadIcon( "source_c", KIcon::NoGroup, KIcon::SizeHuge ) ); + items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Circuit (.circuit)", loader->loadIcon( "ktechlab_circuit", KIcon::NoGroup, KIcon::SizeHuge ) ); + items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"FlowCode (.flowcode)", loader->loadIcon( "ktechlab_flowcode", KIcon::NoGroup, KIcon::SizeHuge ) ); #ifdef MECHANICS - items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Mechanics (.mechanics)", loader->loadIcon( "exec", KIcon::NoGroup, KIcon::SizeHuge ) ); + items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Mechanics (.mechanics)", loader->loadIcon( "exec", KIcon::NoGroup, KIcon::SizeHuge ) ); #endif - items << new QIconViewItem(m_pNewFileWidget->typeIconView,"Microbe (.microbe)", loader->loadIcon( "ktechlab_microbe", KIcon::NoGroup, KIcon::SizeHuge ) ); + items << new TQIconViewItem(m_pNewFileWidget->typeIconView,"Microbe (.microbe)", loader->loadIcon( "ktechlab_microbe", KIcon::NoGroup, KIcon::SizeHuge ) ); unsigned minWidth = 20 + m_pNewFileWidget->typeIconView->spacing() * items.size(); int minHeight = 0; - const QValueList::iterator end = items.end(); - for ( QValueList::iterator it = items.begin(); it != end; ++it ) + const TQValueList::iterator end = items.end(); + for ( TQValueList::iterator it = items.begin(); it != end; ++it ) { (*it)->setDragEnabled(false); minWidth += (*it)->width(); - minHeight = QMAX( minHeight, (*it)->height()+20 ); + minHeight = TQMAX( minHeight, (*it)->height()+20 ); } m_pNewFileWidget->typeIconView->setMinimumSize( minWidth, minHeight ); @@ -76,8 +76,8 @@ NewFileDlg::NewFileDlg( QWidget *parent ) setMainWidget(m_pNewFileWidget); // Our behaviour is to have single click selects and double click accepts the dialog - connect( m_pNewFileWidget->typeIconView, SIGNAL(selectionChanged(QIconViewItem*)), this, SLOT(fileTypeChanged(QIconViewItem*)) ); - connect( m_pNewFileWidget->typeIconView, SIGNAL(doubleClicked(QIconViewItem*)), this, SLOT(accept())); + connect( m_pNewFileWidget->typeIconView, TQT_SIGNAL(selectionChanged(TQIconViewItem*)), this, TQT_SLOT(fileTypeChanged(TQIconViewItem*)) ); + connect( m_pNewFileWidget->typeIconView, TQT_SIGNAL(doubleClicked(TQIconViewItem*)), this, TQT_SLOT(accept())); setAcceptDrops(true); @@ -91,30 +91,30 @@ void NewFileDlg::accept() hide(); m_bAccepted = true; - const QString fileText = m_pNewFileWidget->typeIconView->currentItem()->text(); + const TQString fileText = m_pNewFileWidget->typeIconView->currentItem()->text(); - if ( fileText.contains(".flowcode") ) + if ( fileText.tqcontains(".flowcode") ) m_fileType = Document::dt_flowcode; - else if ( fileText.contains(".circuit") ) + else if ( fileText.tqcontains(".circuit") ) m_fileType = Document::dt_circuit; - else if ( fileText.contains(".mechanics") ) + else if ( fileText.tqcontains(".mechanics") ) m_fileType = Document::dt_mechanics; - else if ( fileText.contains(".asm") ) + else if ( fileText.tqcontains(".asm") ) { m_fileType = Document::dt_text; m_codeType = TextDocument::ct_asm; } - else if ( fileText.contains(".basic") || fileText.contains(".microbe") ) + else if ( fileText.tqcontains(".basic") || fileText.tqcontains(".microbe") ) { m_fileType = Document::dt_text; m_codeType = TextDocument::ct_microbe; } - else if (fileText.contains(".c") ) + else if (fileText.tqcontains(".c") ) { m_fileType = Document::dt_text; m_codeType = TextDocument::ct_c; @@ -135,10 +135,10 @@ void NewFileDlg::reject() } -void NewFileDlg::fileTypeChanged( QIconViewItem *item ) +void NewFileDlg::fileTypeChanged( TQIconViewItem *item ) { m_pNewFileWidget->m_pMicroSelect->setEnabled( - item->text().contains(".flowcode") ); + item->text().tqcontains(".flowcode") ); } diff --git a/src/gui/newfiledlg.h b/src/gui/newfiledlg.h index fc20800..28d3959 100644 --- a/src/gui/newfiledlg.h +++ b/src/gui/newfiledlg.h @@ -15,7 +15,7 @@ class MicroSelectWidget; class NewFileWidget; -class QIconViewItem; +class TQIconViewItem; /** A standard dialog for getting file details from the user for a new project @@ -25,8 +25,9 @@ A standard dialog for getting file details from the user for a new project class NewFileDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - NewFileDlg( QWidget *parent ); + NewFileDlg( TQWidget *tqparent ); void reject(); void accept(); @@ -35,21 +36,21 @@ class NewFileDlg : public KDialogBase int fileType() const { return m_fileType; } int codeType() const { return m_codeType; } bool addToProject() const { return m_bAddToProject; } - QString microID() const { return m_microID; } + TQString microID() const { return m_microID; } MicroSelectWidget * microSelectWidget() const; public slots: - void fileTypeChanged( QIconViewItem *item ); + void fileTypeChanged( TQIconViewItem *item ); protected: bool m_bAccepted; int m_fileType; int m_codeType; bool m_bAddToProject; - QString m_microID; + TQString m_microID; NewFileWidget * m_pNewFileWidget; - QWidget * m_pMainParent; + TQWidget * m_pMainParent; }; #endif diff --git a/src/gui/newfilewidget.ui b/src/gui/newfilewidget.ui index 0e02524..4925106 100644 --- a/src/gui/newfilewidget.ui +++ b/src/gui/newfilewidget.ui @@ -1,6 +1,6 @@ NewFileWidget - + NewFileWidget @@ -31,7 +31,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci 0 - + textLabel1 @@ -52,14 +52,14 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci New File Details - + textLabel1_2_2 File Type: - + AlignVCenter @@ -75,7 +75,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci 0 - + 500 150 @@ -94,7 +94,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci false - + addToProjectCheck @@ -128,13 +128,13 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci 0 - + 0 0 - + 32767 32767 @@ -151,7 +151,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci Expanding - + 20 0 @@ -187,7 +187,7 @@ Creates a new circuit, with drag and drop editor. Real time simulation of the ci typeIconView addToProjectCheck - + kiconview.h microselectwidget.h diff --git a/src/gui/newpinmappingwidget.ui b/src/gui/newpinmappingwidget.ui index 4ac5932..3ea01e7 100644 --- a/src/gui/newpinmappingwidget.ui +++ b/src/gui/newpinmappingwidget.ui @@ -1,6 +1,6 @@ NewPinMappingWidget - + NewPinMappingWidget @@ -22,7 +22,7 @@ 0 - + textLabel2 @@ -30,7 +30,7 @@ Type: - + textLabel1 @@ -38,7 +38,7 @@ Name: - + textLabel3 @@ -64,7 +64,7 @@ Expanding - + 20 21 @@ -83,7 +83,7 @@ 0 - + 300 0 @@ -93,7 +93,7 @@ The variable name of the pin mapping - this must be a valid Microbe variable name. - + Seven Segment @@ -112,7 +112,7 @@ typeCombo - + 200 0 @@ -123,7 +123,7 @@ - + klineedit.h diff --git a/src/gui/newprojectwidget.ui b/src/gui/newprojectwidget.ui index 9d8648f..efcebad 100644 --- a/src/gui/newprojectwidget.ui +++ b/src/gui/newprojectwidget.ui @@ -1,6 +1,6 @@ NewProjectWidget - + NewProjectWidget @@ -22,7 +22,7 @@ 0 - + textLabel8 @@ -30,7 +30,7 @@ Final location: - + locationLabel @@ -48,14 +48,14 @@ Expanding - + 20 16 - + textLabel4 @@ -63,7 +63,7 @@ Location: - + textLabel1 @@ -76,7 +76,7 @@ New Project Details - + textLabel10 @@ -100,7 +100,7 @@ projectNameEdit projectLocationURL - + klineedit.h kurlrequester.h diff --git a/src/gui/orientationwidget.cpp b/src/gui/orientationwidget.cpp index 28e10c7..49137c2 100644 --- a/src/gui/orientationwidget.cpp +++ b/src/gui/orientationwidget.cpp @@ -18,42 +18,42 @@ #include "node.h" #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include const int _size = 44; -OrientationWidget::OrientationWidget(QWidget *parent, const char *name) - : QWidget(parent, name) +OrientationWidget::OrientationWidget(TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { - QGridLayout *layout = new QGridLayout( this, 2, 4, 0, 4 ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 4, 0, 4 ); p_activeFlowPart = 0l; for ( int row=0; row<2; ++row ) { for ( int col=0; col<4; ++col ) { - QPushButton *btn = new QPushButton(this); + TQPushButton *btn = new TQPushButton(this); m_toolBtn[row][col] = btn; - layout->addWidget( btn, row, col ); + tqlayout->addWidget( btn, row, col ); btn->setFixedSize( _size+6, _size+6 ); // btn->setFlat(true); btn->setEnabled(false); } } - connect( m_toolBtn[0][0], SIGNAL(clicked()), this, SLOT(set_cio_noflip_0()) ); - connect( m_toolBtn[0][1], SIGNAL(clicked()), this, SLOT(set_cio_noflip_90()) ); - connect( m_toolBtn[0][2], SIGNAL(clicked()), this, SLOT(set_cio_noflip_180()) ); - connect( m_toolBtn[0][3], SIGNAL(clicked()), this, SLOT(set_cio_noflip_270()) ); - connect( m_toolBtn[1][0], SIGNAL(clicked()), this, SLOT(set_cio_flip_0()) ); - connect( m_toolBtn[1][1], SIGNAL(clicked()), this, SLOT(set_cio_flip_90()) ); - connect( m_toolBtn[1][2], SIGNAL(clicked()), this, SLOT(set_cio_flip_180()) ); - connect( m_toolBtn[1][3], SIGNAL(clicked()), this, SLOT(set_cio_flip_270()) ); + connect( m_toolBtn[0][0], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_0()) ); + connect( m_toolBtn[0][1], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_90()) ); + connect( m_toolBtn[0][2], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_180()) ); + connect( m_toolBtn[0][3], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_noflip_270()) ); + connect( m_toolBtn[1][0], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_0()) ); + connect( m_toolBtn[1][1], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_90()) ); + connect( m_toolBtn[1][2], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_180()) ); + connect( m_toolBtn[1][3], TQT_SIGNAL(clicked()), this, TQT_SLOT(set_cio_flip_270()) ); } @@ -98,7 +98,7 @@ void OrientationWidget::initFromFlowPart( FlowPart *flowPart ) if ( valid & (1<setEnabled(true); - QPixmap pm( 50, 50 ); + TQPixmap pm( 50, 50 ); flowPart->orientationPixmap( o, pm ); m_toolBtn[i][j]->setPixmap(pm); } @@ -109,9 +109,9 @@ void OrientationWidget::initFromFlowPart( FlowPart *flowPart ) void OrientationWidget::initFromComponent( Component *component ) { - const QImage im = itemLibrary()->itemImage(component); + const TQImage im = itemLibrary()->itemImage(component); - QRect bound = component->boundingRect(); + TQRect bound = component->boundingRect(); // We want a nice square bounding rect const int dy = bound.width() - bound.height(); @@ -127,24 +127,24 @@ void OrientationWidget::initFromComponent( Component *component ) } - QPixmap tbPm; + TQPixmap tbPm; tbPm.convertFromImage(im); m_toolBtn[0][0]->setPixmap(tbPm); m_toolBtn[0][0]->setEnabled(true); if ( component->canRotate() ) { -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 90, false, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[0][1]->setPixmap(tbPm); m_toolBtn[0][1]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 180, false, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[0][2]->setPixmap(tbPm); m_toolBtn[0][2]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 270, false, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[0][3]->setPixmap(tbPm); m_toolBtn[0][3]->setEnabled(true); @@ -152,24 +152,24 @@ void OrientationWidget::initFromComponent( Component *component ) if ( component->canFlip() ) { -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 0, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][0]->setPixmap(tbPm); m_toolBtn[1][0]->setEnabled(true); if ( component->canRotate() ) { -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 90, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][1]->setPixmap(tbPm); m_toolBtn[1][1]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 180, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][2]->setPixmap(tbPm); m_toolBtn[1][2]->setEnabled(true); -// QPixmap tbPm; +// TQPixmap tbPm; tbPm.convertFromImage( im.xForm( Component::transMatrix( 270, true, bound.width()/2, bound.height()/2 ) ) ); m_toolBtn[1][3]->setPixmap(tbPm); m_toolBtn[1][3]->setEnabled(true); @@ -185,7 +185,7 @@ void OrientationWidget::slotClear() for ( int col=0; col<4; ++col ) { // Hmm...this line has crashed before - m_toolBtn[row][col]->setPixmap( QPixmap::QPixmap() ); + m_toolBtn[row][col]->setPixmap( TQPixmap::TQPixmap() ); m_toolBtn[row][col]->setEnabled(false); } } diff --git a/src/gui/orientationwidget.h b/src/gui/orientationwidget.h index 6a6b6ce..84d2071 100644 --- a/src/gui/orientationwidget.h +++ b/src/gui/orientationwidget.h @@ -11,22 +11,23 @@ #ifndef ORIENTATIONWIDGET_H #define ORIENTATIONWIDGET_H -#include -#include +#include +#include class CNItem; class CNItemGroup; class FlowPart; -class QPushButton; +class TQPushButton; /** @author David Saxton */ -class OrientationWidget : public QWidget +class OrientationWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - OrientationWidget( QWidget *parent = 0l, const char *name = 0l ); + OrientationWidget( TQWidget *tqparent = 0l, const char *name = 0l ); ~OrientationWidget(); public slots: @@ -49,8 +50,8 @@ protected: void initFromComponent( Component *component ); void initFromFlowPart( FlowPart *flowPart ); - QPushButton *m_toolBtn[2][4]; - QGuardedPtr p_activeFlowPart; + TQPushButton *m_toolBtn[2][4]; + TQGuardedPtr p_activeFlowPart; }; #endif diff --git a/src/gui/oscilloscope.cpp b/src/gui/oscilloscope.cpp index e969f72..50d1346 100644 --- a/src/gui/oscilloscope.cpp +++ b/src/gui/oscilloscope.cpp @@ -24,42 +24,42 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include //BEGIN Oscilloscope Class -QColor probeColors[9] = { - QColor( 0x52, 0x22, 0x00 ), - QColor( 0xB5, 0x00, 0x2F ), - QColor( 0xF9, 0xBA, 0x07 ), - QColor( 0x53, 0x93, 0x16 ), - QColor( 0x00, 0x66, 0x2F ), - QColor( 0x00, 0x41, 0x88 ), - QColor( 0x1B, 0x2D, 0x83 ), - QColor( 0x55, 0x12, 0x7B ), - QColor( 0x7B, 0x0C, 0x82 ) }; +TQColor probeColors[9] = { + TQColor( 0x52, 0x22, 0x00 ), + TQColor( 0xB5, 0x00, 0x2F ), + TQColor( 0xF9, 0xBA, 0x07 ), + TQColor( 0x53, 0x93, 0x16 ), + TQColor( 0x00, 0x66, 0x2F ), + TQColor( 0x00, 0x41, 0x88 ), + TQColor( 0x1B, 0x2D, 0x83 ), + TQColor( 0x55, 0x12, 0x7B ), + TQColor( 0x7B, 0x0C, 0x82 ) }; Oscilloscope * Oscilloscope::m_pSelf = 0l; -Oscilloscope * Oscilloscope::self( KateMDI::ToolView * parent ) +Oscilloscope * Oscilloscope::self( KateMDI::ToolView * tqparent ) { if ( !m_pSelf ) { - assert(parent); - m_pSelf = new Oscilloscope(parent); + assert(tqparent); + m_pSelf = new Oscilloscope(tqparent); } return m_pSelf; } -Oscilloscope::Oscilloscope( KateMDI::ToolView * parent ) - : OscilloscopeWidget(parent) +Oscilloscope::Oscilloscope( KateMDI::ToolView * tqparent ) + : OscilloscopeWidget(tqparent) { m_nextColor = 0; m_nextId = 1; @@ -72,21 +72,21 @@ Oscilloscope::Oscilloscope( KateMDI::ToolView * parent ) horizontalScroll->setLineStep(32); horizontalScroll->setPageStep( oscilloscopeView->width() ); - connect( resetBtn, SIGNAL(clicked()), this, SLOT(reset()) ); - connect( zoomSlider, SIGNAL(valueChanged(int)), this, SLOT(slotZoomSliderChanged(int)) ); - connect( horizontalScroll, SIGNAL(valueChanged(int )), this, SLOT(slotSliderValueChanged(int )) ); + connect( resetBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset()) ); + connect( zoomSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotZoomSliderChanged(int)) ); + connect( horizontalScroll, TQT_SIGNAL(valueChanged(int )), this, TQT_SLOT(slotSliderValueChanged(int )) ); -// connect( pauseBtn, SIGNAL(clicked()), this, SLOT(slotTogglePause()) ); +// connect( pauseBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTogglePause()) ); - QTimer * updateScrollTmr = new QTimer(this); - connect( updateScrollTmr, SIGNAL(timeout()), this, SLOT(updateScrollbars()) ); + TQTimer * updateScrollTmr = new TQTimer(this); + connect( updateScrollTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateScrollbars()) ); updateScrollTmr->start(20); KGlobal::config()->setGroup("Oscilloscope"); setZoomLevel( KGlobal::config()->readDoubleNumEntry( "ZoomLevel", 0.5 ) ); - connect( this, SIGNAL(probeRegistered(int, ProbeData *)), probePositioner, SLOT(slotProbeDataRegistered(int, ProbeData *)) ); - connect( this, SIGNAL(probeUnregistered(int )), probePositioner, SLOT(slotProbeDataUnregistered(int )) ); + connect( this, TQT_SIGNAL(probeRegistered(int, ProbeData *)), probePositioner, TQT_SLOT(slotProbeDataRegistered(int, ProbeData *)) ); + connect( this, TQT_SIGNAL(probeUnregistered(int )), probePositioner, TQT_SLOT(slotProbeDataUnregistered(int )) ); } @@ -189,7 +189,7 @@ ProbeData * Oscilloscope::registerProbe( Probe * probe ) void Oscilloscope::unregisterProbe( int id ) { - ProbeDataMap::iterator it = m_probeDataMap.find(id); + ProbeDataMap::iterator it = m_probeDataMap.tqfind(id); if ( it == m_probeDataMap.end() ) return; @@ -211,7 +211,7 @@ void Oscilloscope::unregisterProbe( int id ) ProbeData * Oscilloscope::probeData( int id ) const { - const ProbeDataMap::const_iterator bit = m_probeDataMap.find(id); + const ProbeDataMap::const_iterator bit = m_probeDataMap.tqfind(id); if ( bit != m_probeDataMap.end() ) return bit.data(); diff --git a/src/gui/oscilloscope.h b/src/gui/oscilloscope.h index 79e0dbd..1d1503e 100644 --- a/src/gui/oscilloscope.h +++ b/src/gui/oscilloscope.h @@ -20,7 +20,7 @@ #endif #include "simulator.h" -#include +#include class FloatingProbeData; class LogicProbe; @@ -30,12 +30,12 @@ class Oscilloscope; class Probe; class ProbeData; class VoltageProbe; -class QTimer; +class TQTimer; namespace KateMDI { class ToolView; } -typedef QMap< int, ProbeData * > ProbeDataMap; -typedef QMap< int, LogicProbeData * > LogicProbeDataMap; -typedef QMap< int, FloatingProbeData * > FloatingProbeDataMap; +typedef TQMap< int, ProbeData * > ProbeDataMap; +typedef TQMap< int, LogicProbeData * > LogicProbeDataMap; +typedef TQMap< int, FloatingProbeData * > FloatingProbeDataMap; typedef unsigned long long ullong; typedef long long llong; @@ -76,9 +76,10 @@ void addOscilloscopeAsToolView( KTechlab *ktechlab ); class Oscilloscope : public OscilloscopeWidget { Q_OBJECT + TQ_OBJECT public: - static Oscilloscope * self( KateMDI::ToolView * parent = 0l ); - static QString toolViewIdentifier() { return "Oscilloscope"; } + static Oscilloscope * self( KateMDI::ToolView * tqparent = 0l ); + static TQString toolViewIdentifier() { return "Oscilloscope"; } virtual ~Oscilloscope(); /** @@ -176,7 +177,7 @@ class Oscilloscope : public OscilloscopeWidget void updateScrollbars(); private: - Oscilloscope( KateMDI::ToolView * parent ); + Oscilloscope( KateMDI::ToolView * tqparent ); static Oscilloscope * m_pSelf; double m_zoomLevel; diff --git a/src/gui/oscilloscopeview.cpp b/src/gui/oscilloscopeview.cpp index 3d2a40a..aa05311 100644 --- a/src/gui/oscilloscopeview.cpp +++ b/src/gui/oscilloscopeview.cpp @@ -19,14 +19,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -37,8 +37,8 @@ inline ullong min( ullong a, ullong b ) } -OscilloscopeView::OscilloscopeView( QWidget *parent, const char *name ) - : QFrame( parent, name, WNoAutoErase ), +OscilloscopeView::OscilloscopeView( TQWidget *tqparent, const char *name ) + : TQFrame( tqparent, name, WNoAutoErase ), b_needRedraw(true), m_pixmap(0l), m_fps(10), @@ -53,8 +53,8 @@ OscilloscopeView::OscilloscopeView( QWidget *parent, const char *name ) setBackgroundMode(NoBackground); setMouseTracking(true); - m_updateViewTmr = new QTimer(this); - connect( m_updateViewTmr, SIGNAL(timeout()), this, SLOT(updateViewTimeout()) ); + m_updateViewTmr = new TQTimer(this); + connect( m_updateViewTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateViewTimeout()) ); } @@ -77,7 +77,7 @@ void OscilloscopeView::updateView() void OscilloscopeView::updateViewTimeout() { b_needRedraw = true; - repaint(false); + tqrepaint(false); updateTimeLabel(); } @@ -86,26 +86,26 @@ void OscilloscopeView::updateTimeLabel() { if ( hasMouse() ) { - int x = mapFromGlobal( QCursor::pos() ).x(); + int x = mapFromGlobal( TQCursor::pos() ).x(); double time = (double(Oscilloscope::self()->scrollTime()) / LOGIC_UPDATE_RATE) + (x / Oscilloscope::self()->pixelsPerSecond()); - Oscilloscope::self()->timeLabel->setText( QString::number( time, 'f', 6 ) ); + Oscilloscope::self()->timeLabel->setText( TQString::number( time, 'f', 6 ) ); } else - Oscilloscope::self()->timeLabel->setText( QString::null ); + Oscilloscope::self()->timeLabel->setText( TQString() ); } -void OscilloscopeView::resizeEvent( QResizeEvent *e ) +void OscilloscopeView::resizeEvent( TQResizeEvent *e ) { delete m_pixmap; - m_pixmap = new QPixmap( e->size() ); + m_pixmap = new TQPixmap( e->size() ); b_needRedraw = true; - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); } -void OscilloscopeView::mousePressEvent( QMouseEvent *event ) +void OscilloscopeView::mousePressEvent( TQMouseEvent *event ) { switch ( event->button() ) { @@ -114,7 +114,7 @@ void OscilloscopeView::mousePressEvent( QMouseEvent *event ) event->accept(); m_clickOffsetPos = event->pos().x(); m_sliderValueAtClick = Oscilloscope::self()->horizontalScroll->value(); - setCursor( Qt::SizeAllCursor ); + setCursor( TQt::SizeAllCursor ); return; } @@ -130,25 +130,25 @@ void OscilloscopeView::mousePressEvent( QMouseEvent *event ) for ( uint i=0; i<5; ++i ) { const int num = fps[i]; - fpsMenu.insertItem( i18n("%1 fps").arg(num), num ); + fpsMenu.insertItem( i18n("%1 fps").tqarg(num), num ); fpsMenu.setItemChecked( num, num == m_fps ); } - connect( &fpsMenu, SIGNAL(activated(int )), this, SLOT(slotSetFrameRate(int )) ); + connect( &fpsMenu, TQT_SIGNAL(activated(int )), this, TQT_SLOT(slotSetFrameRate(int )) ); fpsMenu.exec( event->globalPos() ); return; } default: { - QFrame::mousePressEvent(event); + TQFrame::mousePressEvent(event); return; } } } -void OscilloscopeView::mouseMoveEvent( QMouseEvent *event ) +void OscilloscopeView::mouseMoveEvent( TQMouseEvent *event ) { event->accept(); updateTimeLabel(); @@ -162,14 +162,14 @@ void OscilloscopeView::mouseMoveEvent( QMouseEvent *event ) } -void OscilloscopeView::mouseReleaseEvent( QMouseEvent *event ) +void OscilloscopeView::mouseReleaseEvent( TQMouseEvent *event ) { if ( m_sliderValueAtClick == -1 ) - return QFrame::mouseReleaseEvent(event); + return TQFrame::mouseReleaseEvent(event); event->accept(); m_sliderValueAtClick = -1; - setCursor( Qt::ArrowCursor ); + setCursor( TQt::ArrowCursor ); } @@ -188,16 +188,16 @@ static double lld_modulus( llong a, double b ) } -void OscilloscopeView::paintEvent( QPaintEvent *e ) +void OscilloscopeView::paintEvent( TQPaintEvent *e ) { - QRect r = e->rect(); + TQRect r = e->rect(); if (b_needRedraw) { updateOutputHeight(); const double pixelsPerSecond = Oscilloscope::self()->pixelsPerSecond(); - QPainter p; + TQPainter p; m_pixmap->fill( paletteBackgroundColor() ); p.begin(m_pixmap); p.setClipRegion(e->region()); @@ -213,7 +213,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e ) double linesOffset = - lld_modulus( pixelsOffset, spacing ); int blackness = 256 - int(184.0 * spacing / (min_sep*divisions*divisions)); - p.setPen( QColor( blackness, blackness, blackness ) ); + p.setPen( TQColor( blackness, blackness, blackness ) ); for ( double i = linesOffset; i <= frameRect().width(); i += spacing ) p.drawLine( int(i), 1, int(i), frameRect().height()-2 ); @@ -224,7 +224,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e ) linesOffset = - lld_modulus( pixelsOffset, spacing ); blackness = 256 - int(184.0 * spacing / (min_sep*divisions*divisions)); - p.setPen( QColor( blackness, blackness, blackness ) ); + p.setPen( TQColor( blackness, blackness, blackness ) ); for ( double i = linesOffset; i <= frameRect().width(); i += spacing ) p.drawLine( int(i), 1, int(i), frameRect().height()-2 ); @@ -235,7 +235,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e ) linesOffset = - lld_modulus( pixelsOffset, spacing ); blackness = 256 - int(184.0); - p.setPen( QColor( blackness, blackness, blackness ) ); + p.setPen( TQColor( blackness, blackness, blackness ) ); for ( double i = linesOffset; i <= frameRect().width(); i += spacing ) p.drawLine( int(i), 1, int(i), frameRect().height()-2 ); @@ -244,7 +244,7 @@ void OscilloscopeView::paintEvent( QPaintEvent *e ) drawLogicData(p); drawFloatingData(p); - p.setPen(Qt::black); + p.setPen(TQt::black); p.drawRect( frameRect() ); b_needRedraw = false; @@ -260,7 +260,7 @@ void OscilloscopeView::updateOutputHeight() } -void OscilloscopeView::drawLogicData( QPainter & p ) +void OscilloscopeView::drawLogicData( TQPainter & p ) { const double pixelsPerSecond = Oscilloscope::self()->pixelsPerSecond(); @@ -286,7 +286,7 @@ void OscilloscopeView::drawLogicData( QPainter & p ) const llong timeOffset = Oscilloscope::self()->scrollTime(); // Draw the horizontal line indicating the midpoint of our output - p.setPen( QColor( 228, 228, 228 ) ); + p.setPen( TQColor( 228, 228, 228 ) ); p.drawLine( 0, midHeight, width(), midHeight ); // Set the pen colour according to the colour the user has selected for the probe @@ -365,7 +365,7 @@ void OscilloscopeView::drawLogicData( QPainter & p ) #define v_to_y int(midHeight - (logarithmic ? ( (v>0) ? log(v/lowerAbsValue) : -log(-v/lowerAbsValue) ) : v) * sf) -void OscilloscopeView::drawFloatingData( QPainter & p ) +void OscilloscopeView::drawFloatingData( TQPainter & p ) { const double pixelsPerSecond = Oscilloscope::self()->pixelsPerSecond(); @@ -386,7 +386,7 @@ void OscilloscopeView::drawFloatingData( QPainter & p ) const llong timeOffset = Oscilloscope::self()->scrollTime(); // Draw the horizontal line indicating the midpoint of our output - p.setPen( QColor( 228, 228, 228 ) ); + p.setPen( TQColor( 228, 228, 228 ) ); p.drawLine( 0, midHeight, width(), midHeight ); // Set the pen colour according to the colour the user has selected for the probe diff --git a/src/gui/oscilloscopeview.h b/src/gui/oscilloscopeview.h index 97cb595..d9daaa0 100644 --- a/src/gui/oscilloscopeview.h +++ b/src/gui/oscilloscopeview.h @@ -11,28 +11,29 @@ #ifndef OSCILLOSCOPEVIEW_H #define OSCILLOSCOPEVIEW_H -#include +#include class Oscilloscope; class Simulator; -class QMouseEvent; -class QPaintEvent; -class QPixmap; -class QTimer; +class TQMouseEvent; +class TQPaintEvent; +class TQPixmap; +class TQTimer; /** @author David Saxton */ -class OscilloscopeView : public QFrame +class OscilloscopeView : public TQFrame { Q_OBJECT + TQ_OBJECT public: - OscilloscopeView( QWidget *parent, const char *name = 0 ); + OscilloscopeView( TQWidget *tqparent, const char *name = 0 ); virtual ~OscilloscopeView(); public slots: /** - * Sets the needRedraw flag to true, and then class repaint + * Sets the needRedraw flag to true, and then class tqrepaint */ void updateView(); void slotSetFrameRate( int fps ); @@ -41,20 +42,20 @@ class OscilloscopeView : public QFrame void updateViewTimeout(); protected: - virtual void mousePressEvent( QMouseEvent *event ); - virtual void mouseMoveEvent( QMouseEvent *event ); - virtual void mouseReleaseEvent( QMouseEvent *event ); - virtual void paintEvent( QPaintEvent *event ); - virtual void resizeEvent( QResizeEvent *event ); + virtual void mousePressEvent( TQMouseEvent *event ); + virtual void mouseMoveEvent( TQMouseEvent *event ); + virtual void mouseReleaseEvent( TQMouseEvent *event ); + virtual void paintEvent( TQPaintEvent *event ); + virtual void resizeEvent( TQResizeEvent *event ); - void drawLogicData( QPainter & p ); - void drawFloatingData( QPainter & p ); + void drawLogicData( TQPainter & p ); + void drawFloatingData( TQPainter & p ); void updateOutputHeight(); void updateTimeLabel(); bool b_needRedraw; - QPixmap *m_pixmap; - QTimer *m_updateViewTmr; + TQPixmap *m_pixmap; + TQTimer *m_updateViewTmr; int m_fps; int m_sliderValueAtClick; int m_clickOffsetPos; diff --git a/src/gui/oscilloscopewidget.ui b/src/gui/oscilloscopewidget.ui index eb8002b..1d128ba 100644 --- a/src/gui/oscilloscopewidget.ui +++ b/src/gui/oscilloscopewidget.ui @@ -1,6 +1,6 @@ OscilloscopeWidget - + OscilloscopeWidget @@ -25,9 +25,9 @@ 0 - + - layout7 + tqlayout7 @@ -67,20 +67,20 @@ probePositioner - + 16 0 - + 16 32767 - + horizontalScroll @@ -90,9 +90,9 @@ - + - layout9 + tqlayout9 @@ -104,18 +104,18 @@ 0 - + textLabel1 Zoom - + AlignCenter - + zoomSlider @@ -150,21 +150,21 @@ MinimumExpanding - + 20 30 - + timeLabel - + AlignCenter @@ -178,14 +178,14 @@ Fixed - + 20 6 - + resetBtn @@ -216,7 +216,7 @@ Fixed - + 6 6 @@ -233,7 +233,7 @@ Fixed - + 6 6 @@ -281,7 +281,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042c49444154388db5954f6c14551cc73fefcd7476b65bdaae4bb78bb5502a14d404e4801c88182d1c4c2c693da847400f9c24c68b878684238660e2b1e01f12c19493012ef2478c814412d354a46017a8a564bb6da5bbedccee767776e63d0ffb073751d483bfe49799974c3eeffb7ebf37df9fd05a530b2184040cc0042420aaf9a4d0d554800f045a6b256ae0e1e1e1d6bebebe838ee31c48a7d39b5cd7fd075e251cc7617272f2ded8d8d819cff33e0316819259537aead4a9839d5dd6d1784f91f55b0a94830242088404d304292bef68a89f520802a598fecddaa04f1a876f5c250c7c0a64cdeac686e33807e23d45e6b297c8b877f1831542614550b6599835c83c2a81b6786a75134faf2f1169f12997350881d9021d0903e06de0745d3160a6d3e94dbd5b0a64dcbb94b5831d0e3375ab892b1772dcf9790528543f8dd0d367b36768153b5e31503a0f1aecb004580b44ffac58baae8b1714f0833c7638cc8dab303a320f4822ab4c7a37c69196203de3319d5ce1c4d13c733331dedc67a129a154fd128401ab0616d55a130ac3d42d93d1913940d13fd0c9ee0183685c60da01c5421bd72f7a8c8efccef9afd374267ad93d642365be0636a0d28ec7600941d9e6f23917f0e97f23ce5bef35d19ec863da0ed9059b2be70bec196c66dfa10ec0e49b338f7017258651bf95021035c595429bb0903248fe52a2b5b595dd7b4d945cc2340cdca536be389ee3f67886c5798f773fe8e0dac508c989659277a2180da4ca4ff07821058b8b251445d63d6b13ed1098a6417e39cac85197dbe31962ab9bd9f1f22a226d45366f6d0620fdb08c900d281af6110284b20085b414861d905d88f2e52739ee8cbb8022143259d3dd84691730aa2d52da441a8de0c6958068870022a41e9629ad3473fd3b8fdbe319dadb9b4924da994d2d716c7896fbe35152f78b48245d6b2da4507faf582be8eaf159b721cc837b05ae7debb1f79d08cb8b515edad942a22bc4b1c33eb3d34b1c797f06af90a72d16e2f96d9a74aa11dca8586b222d01af0fb60070f6c402d72f15d97f28c6f6d7027a5f5ce6c3233dc4e2ede496b278be4fff608cee8d3e1add806aeca51094cbb06397c1ecc328e746537c7e3ccdb5cb1136bf60635882d4d41c6ec6836ab37efa214f72208ed9f4d7cdd38ee310280542e38b1c43fb6de26b3672e1ec3cc99bcb246f66a938a3241ab3e91f7c861fbf77710b1e5e49915bae974203ba0e9e9c9cbc373d6d6d305a040a89c2a77f50b27d5782bbbf7acccf28349235dd16cf6dd374f7295e1de8a45c02d37499182b01cc0201a085d61a2144d8b2ac8fb6ed340e77240c4261890e04c250185262546d534a032154b59e0ad394e41c98182bf268ce6721ed9f064e0253356f6da2e24c1f030f783c15fe6da680af8021602bd051532ca9b8521488559f61aa86c29343578fbf0264a94c906c7d3409214c20043457a116ff6de6795578012889ff6b98fe016ea0ce1c6a2573410000000049454e44ae426082 - + oscilloscopeview.h probepositioner.h diff --git a/src/gui/outputmethoddlg.cpp b/src/gui/outputmethoddlg.cpp index bcb189e..32349e6 100644 --- a/src/gui/outputmethoddlg.cpp +++ b/src/gui/outputmethoddlg.cpp @@ -23,9 +23,9 @@ #include #include -#include -#include -#include +#include +#include +#include //BEGIN class OutputMethodInfo @@ -41,7 +41,7 @@ void OutputMethodInfo::initialize( OutputMethodDlg * dlg ) if ( dlg->m_widget->displayDirectCheck->isChecked() ) { m_method = Method::Direct; - KTempFile f( QString::null, dlg->m_outputExtension ); + KTempFile f( TQString(), dlg->m_outputExtension ); f.close(); m_outputFile = f.name(); m_bAddToProject = false; @@ -66,8 +66,8 @@ void OutputMethodInfo::initialize( OutputMethodDlg * dlg ) //BEGIN class OutputMethodDlg -OutputMethodDlg::OutputMethodDlg( const QString &caption, const KURL & inputURL, bool showPICSelect, QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, caption, Ok|Cancel ) +OutputMethodDlg::OutputMethodDlg( const TQString &caption, const KURL & inputURL, bool showPICSelect, TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, caption, Ok|Cancel ) { m_inputURL = inputURL; m_bAccepted = false; @@ -92,13 +92,13 @@ OutputMethodDlg::~OutputMethodDlg() } -void OutputMethodDlg::setOutputExtension( const QString & extension ) +void OutputMethodDlg::setOutputExtension( const TQString & extension ) { m_outputExtension = extension; } -void OutputMethodDlg::setFilter( const QString &filter ) +void OutputMethodDlg::setFilter( const TQString &filter ) { m_widget->outputFileURL->setFilter(filter); } @@ -125,7 +125,7 @@ void OutputMethodDlg::setMethod( OutputMethodInfo::Method::Type m ) } -void OutputMethodDlg::setPicID( const QString & id ) +void OutputMethodDlg::setPicID( const TQString & id ) { m_widget->m_pMicroSelect->setMicro(id); } diff --git a/src/gui/outputmethoddlg.h b/src/gui/outputmethoddlg.h index 14dff25..1bf4879 100644 --- a/src/gui/outputmethoddlg.h +++ b/src/gui/outputmethoddlg.h @@ -43,8 +43,8 @@ class OutputMethodInfo bool addToProject() const { return m_bAddToProject; } void setAddToProject( bool add ) { m_bAddToProject = add; } - QString picID() const { return m_picID; } - void setPicID( const QString & id ) { m_picID = id; } + TQString picID() const { return m_picID; } + void setPicID( const TQString & id ) { m_picID = id; } KURL outputFile() const { return m_outputFile; } void setOutputFile( const KURL & outputFile ) { m_outputFile = outputFile; } @@ -52,7 +52,7 @@ class OutputMethodInfo protected: Method::Type m_method; bool m_bAddToProject; - QString m_picID; + TQString m_picID; KURL m_outputFile; }; @@ -62,20 +62,21 @@ class OutputMethodInfo class OutputMethodDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * @param Caption The caption of the dialog window * @param inputURL Used for saving/restoring previous options the user has selected for this file; set this to null if temporary file * @param showPICSelect Whether to show the combo boxes for selecting a PIC */ - OutputMethodDlg( const QString & caption, const KURL & inputURL, bool showPICSelect = false, QWidget *parent = 0, const char *name = 0); + OutputMethodDlg( const TQString & caption, const KURL & inputURL, bool showPICSelect = false, TQWidget *tqparent = 0, const char *name = 0); ~OutputMethodDlg(); - void setOutputExtension( const QString & outputExtension ); - void setFilter( const QString &filter ); + void setOutputExtension( const TQString & outputExtension ); + void setFilter( const TQString &filter ); void setMethod( OutputMethodInfo::Method::Type m ); void setOutputFile( const KURL & out ); - void setPicID( const QString & id ); + void setPicID( const TQString & id ); virtual void reject(); virtual void accept(); @@ -87,7 +88,7 @@ class OutputMethodDlg : public KDialogBase protected: OutputMethodWidget *m_widget; - QString m_outputExtension; + TQString m_outputExtension; KURL m_inputURL; OutputMethodInfo m_outputMethodInfo; bool m_bAccepted; diff --git a/src/gui/outputmethodwidget.ui b/src/gui/outputmethodwidget.ui index 0182105..26b76f4 100644 --- a/src/gui/outputmethodwidget.ui +++ b/src/gui/outputmethodwidget.ui @@ -1,6 +1,6 @@ OutputMethodWidget - + OutputMethodWidget @@ -20,7 +20,7 @@ 0 - + 450 0 @@ -36,7 +36,7 @@ 0 - + buttonGroup2 @@ -50,7 +50,7 @@ unnamed - + displayDirectCheck @@ -61,7 +61,7 @@ true - + saveFileCheck @@ -72,7 +72,7 @@ false - + groupBox16 @@ -91,7 +91,7 @@ outputFileURL - + loadFileCheck @@ -99,7 +99,7 @@ Load File in &New View - + addToProjectCheck @@ -115,7 +115,7 @@ m_pMicroSelect - + 0 0 @@ -132,7 +132,7 @@ Expanding - + 20 0 @@ -172,7 +172,7 @@ setEnabled(bool) - + kurlrequester.h klineedit.h diff --git a/src/gui/picprogrammerconfigwidget.ui b/src/gui/picprogrammerconfigwidget.ui index 64c5ac8..520e9d4 100644 --- a/src/gui/picprogrammerconfigwidget.ui +++ b/src/gui/picprogrammerconfigwidget.ui @@ -1,6 +1,6 @@ PicProgrammerConfigWidget - + PicProgrammerConfigWidget @@ -22,7 +22,7 @@ 0 - + groupBox3 @@ -43,7 +43,7 @@ Expanding - + 295 20 @@ -72,7 +72,7 @@ Alt+M - + textLabel1_3 @@ -96,7 +96,7 @@ false - + m_pProgrammerDescription @@ -106,7 +106,7 @@ - + commandsGroupBox @@ -117,7 +117,7 @@ unnamed - + textLabel1_2 @@ -145,7 +145,7 @@ initCommand - + textLabel4 @@ -153,7 +153,7 @@ Read: - + textLabel3 @@ -171,7 +171,7 @@ eraseCommand - + textLabel2 @@ -187,7 +187,7 @@ RichText - + textLabel5 @@ -195,7 +195,7 @@ Erase: - + textLabel2_3 @@ -203,7 +203,7 @@ Verify: - + textLabel1_4 @@ -213,15 +213,15 @@ - + - layout5 + tqlayout5 unnamed - + textLabel1 @@ -229,7 +229,7 @@ Default port: - + kcfg_PicProgrammerPort @@ -249,7 +249,7 @@ Expanding - + 20 16 @@ -270,7 +270,7 @@ eraseCommand kcfg_PicProgrammerPort - + kpushbutton.h kpushbutton.h diff --git a/src/gui/pieditor.cpp b/src/gui/pieditor.cpp index b7ca0e5..7ca2663 100644 --- a/src/gui/pieditor.cpp +++ b/src/gui/pieditor.cpp @@ -18,15 +18,15 @@ #include #include #include -#include +#include //BEGIN class PIEditor -PIEditor::PIEditor(QString id, Variant *data, QWidget *parent, const char *name) - : QWidget(parent, name) +PIEditor::PIEditor(TQString id, Variant *data, TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { m_id = id; m_data = data; - connect(m_data,SIGNAL(valueChanged(QVariant, QVariant )),this,SLOT(valueChanged(QVariant))); + connect(m_data,TQT_SIGNAL(valueChanged(TQVariant, TQVariant )),this,TQT_SLOT(valueChanged(TQVariant))); setFocus(); update(); //show(); @@ -36,25 +36,25 @@ PIEditor::~PIEditor() { } -void PIEditor::valueChanged( QVariant /*variant*/ ) +void PIEditor::valueChanged( TQVariant /*variant*/ ) { } //END class PIEditor //BEGIN class PIBool -PIBool::PIBool(QString id, Variant *data, QWidget *parent, const char *name ) - : PIEditor( id, data, parent, name ) +PIBool::PIBool(TQString id, Variant *data, TQWidget *tqparent, const char *name ) + : PIEditor( id, data, tqparent, name ) { - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); m_comboBox = new KComboBox(this); m_comboBox->insertItem( i18n("True"), 0 ); m_comboBox->insertItem( i18n("False"), 1 ); m_comboBox->setCurrentItem( m_data->value().toBool() ? 0 : 1 ); - connect( m_comboBox, SIGNAL(activated(int )), this, SLOT(selectChanged(int )) ); + connect( m_comboBox, TQT_SIGNAL(activated(int )), this, TQT_SLOT(selectChanged(int )) ); } PIBool::~PIBool() @@ -68,10 +68,10 @@ void PIBool::popup() void PIBool::selectChanged( int index ) { - emit editorDataChanged( m_id, QVariant( index == 0 ) ); + emit editorDataChanged( m_id, TQVariant( index == 0 ) ); } -void PIBool::valueChanged( QVariant /*variant*/ ) +void PIBool::valueChanged( TQVariant /*variant*/ ) { m_comboBox->setCurrentItem( m_data->value().toBool() ? 0 : 1 ); } @@ -79,17 +79,17 @@ void PIBool::valueChanged( QVariant /*variant*/ ) //BEGIN class PIColor -PIColor::PIColor(QString id, Variant *data, QWidget *parent, const char *name ) - : PIEditor(id,data,parent, name) +PIColor::PIColor(TQString id, Variant *data, TQWidget *tqparent, const char *name ) + : PIEditor(id,data,tqparent, name) { - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); m_combo = new ColorCombo( (ColorCombo::ColorScheme)m_data->colorScheme(), this ); m_combo->setColor(m_data->value().toColor()); - connect(m_combo,SIGNAL(activated(const QColor&)),this,SLOT(colorChanged(const QColor&))); -// connect(m_combo,SIGNAL(highlighted(const QColor&)),this,SLOT(colorChanged(const QColor&))); + connect(m_combo,TQT_SIGNAL(activated(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); +// connect(m_combo,TQT_SIGNAL(highlighted(const TQColor&)),this,TQT_SLOT(colorChanged(const TQColor&))); } PIColor::~PIColor() @@ -101,12 +101,12 @@ void PIColor::popup() m_combo->popup(); } -void PIColor::colorChanged(const QColor &col) +void PIColor::colorChanged(const TQColor &col) { - emit editorDataChanged(m_id,QVariant(col)); + emit editorDataChanged(m_id,TQVariant(col)); } -void PIColor::valueChanged( QVariant /*variant*/ ) +void PIColor::valueChanged( TQVariant /*variant*/ ) { m_combo->setColor(m_data->value().toColor()); } @@ -114,15 +114,15 @@ void PIColor::valueChanged( QVariant /*variant*/ ) //BEGIN class PIDouble -PIDouble::PIDouble(QString id, Variant *data, QWidget *parent, const char *name ) - : PIEditor(id,data,parent, name) +PIDouble::PIDouble(TQString id, Variant *data, TQWidget *tqparent, const char *name ) + : PIEditor(id,data,tqparent, name) { - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); spin = new DoubleSpinBox(m_data->minValue(),m_data->maxValue(),m_data->minAbsValue(),m_data->value().toDouble(),m_data->unit(),this); - connect(spin,SIGNAL(valueChanged(double)),this,SLOT(spinValueChanged(double))); + connect(spin,TQT_SIGNAL(valueChanged(double)),this,TQT_SLOT(spinValueChanged(double))); } PIDouble::~PIDouble() @@ -131,10 +131,10 @@ PIDouble::~PIDouble() void PIDouble::spinValueChanged(double value) { - emit editorDataChanged(m_id,QVariant(value)); + emit editorDataChanged(m_id,TQVariant(value)); } -void PIDouble::valueChanged( QVariant /*variant*/ ) +void PIDouble::valueChanged( TQVariant /*variant*/ ) { spin->setValue(m_data->value().toDouble()); } @@ -142,11 +142,11 @@ void PIDouble::valueChanged( QVariant /*variant*/ ) //BEGIN class PIFileName -PIFilename::PIFilename(QString id, Variant *data, QWidget *parent, const char *name ) - : PIEditor(id,data,parent, name) +PIFilename::PIFilename(TQString id, Variant *data, TQWidget *tqparent, const char *name ) + : PIEditor(id,data,tqparent, name) { - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); m_combo = 0L; if( m_data->allowed().count() == 0 ) @@ -160,20 +160,20 @@ PIFilename::PIFilename(QString id, Variant *data, QWidget *parent, const char *n m_urlreq->setURL( m_data->value().toString() ); m_urlreq->setFilter( m_data->filter() ); - connect(m_urlreq,SIGNAL(urlSelected(const QString&)),this,SLOT(slotURLChanged(const QString&))); - //connect(m_urlreq,SIGNAL(openFileDialog(KURLRequester*)),this,SLOT(slotOpenFileDialog(KURLRequester* ))); + connect(m_urlreq,TQT_SIGNAL(urlSelected(const TQString&)),this,TQT_SLOT(slotURLChanged(const TQString&))); + //connect(m_urlreq,TQT_SIGNAL(openFileDialog(KURLRequester*)),this,TQT_SLOT(slotOpenFileDialog(KURLRequester* ))); } PIFilename::~PIFilename() { } -void PIFilename::slotURLChanged(const QString &url) +void PIFilename::slotURLChanged(const TQString &url) { - emit editorDataChanged(m_id,QVariant(url)); + emit editorDataChanged(m_id,TQVariant(url)); } -void PIFilename::valueChanged( QVariant /*variant*/ ) +void PIFilename::valueChanged( TQVariant /*variant*/ ) { if(m_combo) m_combo->setCurrentItem( m_data->value().toString() ); m_urlreq->setURL( m_data->value().toString() ); @@ -193,15 +193,15 @@ void PIFilename::valueChanged( QVariant /*variant*/ ) //BEGIN class PIInt -PIInt::PIInt( const QString &id, Variant *data, QWidget *parent, const char *name ) - : PIEditor( id, data, parent, name ) +PIInt::PIInt( const TQString &id, Variant *data, TQWidget *tqparent, const char *name ) + : PIEditor( id, data, tqparent, name ) { - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); spin = new KIntSpinBox( (int)m_data->minValue(), (int)m_data->maxValue(), 1, m_data->value().toInt(), 10, this ); - connect( spin, SIGNAL(valueChanged(int)), this, SLOT(spinValueChanged(int))); + connect( spin, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(spinValueChanged(int))); } PIInt::~PIInt() @@ -210,10 +210,10 @@ PIInt::~PIInt() void PIInt::spinValueChanged( int value ) { - emit editorDataChanged( m_id, QVariant(value) ); + emit editorDataChanged( m_id, TQVariant(value) ); } -void PIInt::valueChanged( QVariant /*variant*/ ) +void PIInt::valueChanged( TQVariant /*variant*/ ) { spin->setValue( m_data->value().toInt() ); } @@ -221,13 +221,13 @@ void PIInt::valueChanged( QVariant /*variant*/ ) //BEGIN class PILineEdit -PILineEdit::PILineEdit(QString id, Variant *data, QWidget *parent, const char *name) - : PIEditor( id, data, parent, name) +PILineEdit::PILineEdit(TQString id, Variant *data, TQWidget *tqparent, const char *name) + : PIEditor( id, data, tqparent, name) { - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); m_edit = new KLineEdit( m_data->value().toString() , this ); - connect(m_edit,SIGNAL(textChanged(const QString&)),this,SLOT(slotEditTextChanged())); + connect(m_edit,TQT_SIGNAL(textChanged(const TQString&)),this,TQT_SLOT(slotEditTextChanged())); } @@ -237,10 +237,10 @@ PILineEdit::~PILineEdit() void PILineEdit::slotEditTextChanged() { - emit editorDataChanged(m_id,QVariant(m_edit->text())); + emit editorDataChanged(m_id,TQVariant(m_edit->text())); } -void PILineEdit::valueChanged( QVariant /*variant*/ ) +void PILineEdit::valueChanged( TQVariant /*variant*/ ) { m_edit->setText(m_data->value().toString()); } @@ -248,11 +248,11 @@ void PILineEdit::valueChanged( QVariant /*variant*/ ) //BEGIN class PIStringCombo -PIStringCombo::PIStringCombo(QString id, Variant *data, QWidget *parent, const char *name) - : PIEditor( id, data, parent, name) +PIStringCombo::PIStringCombo(TQString id, Variant *data, TQWidget *tqparent, const char *name) + : PIEditor( id, data, tqparent, name) { - QHBoxLayout *layout = new QHBoxLayout(this); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + tqlayout->setAutoAdd(true); m_combo = new KComboBox( this ); m_combo->insertStringList(m_data->allowed()); @@ -262,8 +262,8 @@ PIStringCombo::PIStringCombo(QString id, Variant *data, QWidget *parent, const c type == Variant::Type::FileName || type == Variant::Type::VarName ); - connect(m_combo,SIGNAL(highlighted(const QString&)),this,SLOT(slotComboChanged())); - connect(m_combo,SIGNAL(activated(const QString&)),this,SLOT(slotComboChanged())); + connect(m_combo,TQT_SIGNAL(highlighted(const TQString&)),this,TQT_SLOT(slotComboChanged())); + connect(m_combo,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(slotComboChanged())); } @@ -278,10 +278,10 @@ void PIStringCombo::popup() void PIStringCombo::slotComboChanged() { - emit editorDataChanged(m_id,QVariant(m_combo->currentText())); + emit editorDataChanged(m_id,TQVariant(m_combo->currentText())); } -void PIStringCombo::valueChanged( QVariant /*variant*/ ) +void PIStringCombo::valueChanged( TQVariant /*variant*/ ) { m_combo->setCurrentItem(m_data->value().toString()); } diff --git a/src/gui/pieditor.h b/src/gui/pieditor.h index 8423c7d..bc3c7fb 100644 --- a/src/gui/pieditor.h +++ b/src/gui/pieditor.h @@ -11,9 +11,9 @@ #ifndef PIEDITOR_H #define PIEDITOR_H -#include -#include -#include +#include +#include +#include class DoubleSpinBox; class ColorCombo; @@ -27,21 +27,22 @@ class Variant; /** @author Daniel Clarke */ -class PIEditor : public QWidget +class PIEditor : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PIEditor(QString id, Variant *data, QWidget *parent = 0, const char *name = 0); + PIEditor(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0); ~PIEditor(); public slots: - virtual void valueChanged( QVariant variant ); + virtual void valueChanged( TQVariant variant ); signals: - void editorDataChanged(const QString &id, QVariant data); + void editorDataChanged(const TQString &id, TQVariant data); protected: - QString m_id; + TQString m_id; Variant *m_data; }; @@ -52,15 +53,16 @@ class PIEditor : public QWidget class PIBool : public PIEditor { Q_OBJECT + TQ_OBJECT public: - PIBool( QString id, Variant *data, QWidget *parent = 0, const char *name = 0 ); + PIBool( TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0 ); ~PIBool(); void popup(); protected slots: void selectChanged( int index ); - virtual void valueChanged( QVariant variant ); + virtual void valueChanged( TQVariant variant ); protected: KComboBox *m_comboBox; @@ -72,14 +74,15 @@ class PIBool : public PIEditor class PIColor : public PIEditor { Q_OBJECT + TQ_OBJECT public: - PIColor(QString id, Variant *data, QWidget *parent = 0, const char *name = 0); + PIColor(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0); ~PIColor(); void popup(); protected slots: - void colorChanged(const QColor &col); - virtual void valueChanged( QVariant variant ); + void colorChanged(const TQColor &col); + virtual void valueChanged( TQVariant variant ); protected: ColorCombo *m_combo; @@ -93,13 +96,14 @@ Allows the editing of double precision numerical values, using the DoubleNum wid class PIDouble : public PIEditor { Q_OBJECT + TQ_OBJECT public: - PIDouble(QString id, Variant *data, QWidget *parent = 0, const char *name = 0); + PIDouble(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0); ~PIDouble(); protected slots: void spinValueChanged(double value); - virtual void valueChanged( QVariant variant ); + virtual void valueChanged( TQVariant variant ); protected: DoubleSpinBox *spin; @@ -112,13 +116,14 @@ class PIDouble : public PIEditor class PIFilename : public PIEditor { Q_OBJECT + TQ_OBJECT public: - PIFilename(QString id, Variant *data, QWidget *parent = 0, const char *name = 0); + PIFilename(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0); ~PIFilename(); protected slots: - void slotURLChanged(const QString &url); - virtual void valueChanged( QVariant variant ); + void slotURLChanged(const TQString &url); + virtual void valueChanged( TQVariant variant ); // see comments in implementation. //void slotOpenFileDialog(KURLRequester *kurlreq); @@ -133,13 +138,14 @@ class PIFilename : public PIEditor class PIInt : public PIEditor { Q_OBJECT + TQ_OBJECT public: - PIInt( const QString &id, Variant *data, QWidget *parent = 0, const char *name = 0); + PIInt( const TQString &id, Variant *data, TQWidget *tqparent = 0, const char *name = 0); ~PIInt(); protected slots: void spinValueChanged( int value ); - virtual void valueChanged( QVariant variant ); + virtual void valueChanged( TQVariant variant ); protected: KIntSpinBox *spin; @@ -152,13 +158,14 @@ class PIInt : public PIEditor class PILineEdit : public PIEditor { Q_OBJECT + TQ_OBJECT public: - PILineEdit(QString id, Variant *data, QWidget *parent = 0, const char *name = 0); + PILineEdit(TQString id, Variant *data, TQWidget *tqparent = 0, const char *name = 0); ~PILineEdit(); protected slots: void slotEditTextChanged(); - virtual void valueChanged( QVariant variant ); + virtual void valueChanged( TQVariant variant ); protected: KLineEdit *m_edit; @@ -171,13 +178,14 @@ class PILineEdit : public PIEditor class PIStringCombo : public PIEditor { Q_OBJECT + TQ_OBJECT public: - PIStringCombo(QString id, Variant *data, QWidget *parent, const char *name = 0); + PIStringCombo(TQString id, Variant *data, TQWidget *tqparent, const char *name = 0); ~PIStringCombo(); void popup(); public slots: - virtual void valueChanged( QVariant variant ); + virtual void valueChanged( TQVariant variant ); void slotComboChanged(); protected: diff --git a/src/gui/plvitem.cpp b/src/gui/plvitem.cpp index 420259b..55f6f6a 100644 --- a/src/gui/plvitem.cpp +++ b/src/gui/plvitem.cpp @@ -12,18 +12,18 @@ #include "variant.h" #include -#include -#include +#include +#include //BEGIN class PLVItem -PLVItem::PLVItem(KListView *listview, const QString &id, Variant *data) +PLVItem::PLVItem(KListView *listview, const TQString &id, Variant *data) : KListViewItem(listview, data->editorCaption()) { p_data = data; m_id = id; setText(1,p_data->displayString() ); - connect(data,SIGNAL(valueChanged(QVariant, QVariant )),this,SLOT(updateData(QVariant ))); + connect(data,TQT_SIGNAL(valueChanged(TQVariant, TQVariant )),this,TQT_SLOT(updateData(TQVariant ))); //setHeight(100); } @@ -33,7 +33,7 @@ PLVItem::~PLVItem() { } -void PLVItem::updateData(QVariant /*value*/) +void PLVItem::updateData(TQVariant /*value*/) { if (!p_data) return; @@ -41,7 +41,7 @@ void PLVItem::updateData(QVariant /*value*/) } -int PLVItem::width ( const QFontMetrics & fm, const QListView * lv, int c ) const +int PLVItem::width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const { if ( c == 0 ) return 100; @@ -54,7 +54,7 @@ int PLVItem::width ( const QFontMetrics & fm, const QListView * lv, int c ) cons //BEGIN class PLVColorItem -PLVColorItem::PLVColorItem(KListView *listview, const QString &id, Variant *data) +PLVColorItem::PLVColorItem(KListView *listview, const TQString &id, Variant *data) : PLVItem(listview,id,data) { } @@ -64,7 +64,7 @@ PLVColorItem::~PLVColorItem() { } -void PLVColorItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) +void PLVColorItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ) { if (!p_data) return; @@ -73,14 +73,14 @@ void PLVColorItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, if (column == 1) { p->setBackgroundColor( p_data->value().toColor() ); - QBrush brush( p_data->value().toColor() ); - p->fillRect(QRect(0,0,listView()->columnWidth(1),KListViewItem::height()),brush); + TQBrush brush( p_data->value().toColor() ); + p->fillRect(TQRect(0,0,listView()->columnWidth(1),KListViewItem::height()),brush); } else KListViewItem::paintCell(p,cg,column,width,align); } -void PLVColorItem::updateData(QVariant value) +void PLVColorItem::updateData(TQVariant value) { listView()->triggerUpdate(); PLVItem::updateData(value); diff --git a/src/gui/plvitem.h b/src/gui/plvitem.h index fd48845..9dc1763 100644 --- a/src/gui/plvitem.h +++ b/src/gui/plvitem.h @@ -12,9 +12,9 @@ #define PLVITEM_H #include -#include -#include -#include +#include +#include +#include class Variant; @@ -24,28 +24,29 @@ class Variant; PropertiesListView Item Basic item, which holds the Variant data and Id for an item */ -class PLVItem : public QObject, public KListViewItem +class PLVItem : public TQObject, public KListViewItem { Q_OBJECT + TQ_OBJECT public: - PLVItem( KListView *listview, const QString &id, Variant * data ); + PLVItem( KListView *listview, const TQString &id, Variant * data ); ~PLVItem(); - QString id() const { return m_id; } + TQString id() const { return m_id; } Variant * data() const { return p_data; } - virtual int width ( const QFontMetrics & fm, const QListView * lv, int c ) const; + virtual int width ( const TQFontMetrics & fm, const TQListView * lv, int c ) const; public slots: /** * Call to change the data held by an item, and update the display * accordingly. */ - virtual void updateData(QVariant value); + virtual void updateData(TQVariant value); protected: - QString m_id; - QGuardedPtr p_data; + TQString m_id; + TQGuardedPtr p_data; }; /** @@ -54,13 +55,13 @@ class PLVItem : public QObject, public KListViewItem class PLVColorItem : public PLVItem { public: - PLVColorItem( KListView *listview, const QString &id, Variant *data ); + PLVColorItem( KListView *listview, const TQString &id, Variant *data ); ~PLVColorItem(); - void updateData(QVariant value); + void updateData(TQVariant value); protected: - virtual void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ); + virtual void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); }; #endif diff --git a/src/gui/probepositioner.cpp b/src/gui/probepositioner.cpp index 1ea2606..5cf8ee2 100644 --- a/src/gui/probepositioner.cpp +++ b/src/gui/probepositioner.cpp @@ -13,15 +13,15 @@ #include "oscilloscopeview.h" #include "probepositioner.h" -#include -#include -#include +#include +#include +#include #include #include -ProbePositioner::ProbePositioner(QWidget *parent, const char *name) - : QWidget( parent, name, WNoAutoErase ) +ProbePositioner::ProbePositioner(TQWidget *tqparent, const char *name) + : TQWidget( tqparent, name, WNoAutoErase ) { m_probePosOffset = 0; p_draggedProbe = 0l; @@ -41,7 +41,7 @@ ProbePositioner::~ProbePositioner() void ProbePositioner::forceRepaint() { b_needRedraw = true; - repaint(false); + tqrepaint(false); } @@ -91,7 +91,7 @@ void ProbePositioner::setProbePosition( ProbeData *probeData, int position ) } -ProbeData* ProbePositioner::probeAtPosition( const QPoint &pos ) +ProbeData* ProbePositioner::probeAtPosition( const TQPoint &pos ) { int relativeArrowHeight = int( probeArrowHeight * ( 1. - float(pos.x()/probeArrowWidth) ) ); @@ -112,9 +112,9 @@ ProbeData* ProbePositioner::probeAtPosition( const QPoint &pos ) void ProbePositioner::slotProbeDataRegistered( int id, ProbeData *probe ) { m_probeDataMap[id] = probe; - connect( probe, SIGNAL(displayAttributeChanged()), this, SLOT(forceRepaint()) ); + connect( probe, TQT_SIGNAL(displayAttributeChanged()), this, TQT_SLOT(forceRepaint()) ); // This connect doesn't really belong here, but it save a lot of code - connect( probe, SIGNAL(displayAttributeChanged()), Oscilloscope::self()->oscilloscopeView, SLOT(updateView()) ); + connect( probe, TQT_SIGNAL(displayAttributeChanged()), Oscilloscope::self()->oscilloscopeView, TQT_SLOT(updateView()) ); forceRepaint(); Oscilloscope::self()->oscilloscopeView->updateView(); } @@ -133,16 +133,16 @@ void ProbePositioner::slotProbeDataUnregistered( int id ) } -void ProbePositioner::resizeEvent( QResizeEvent *e ) +void ProbePositioner::resizeEvent( TQResizeEvent *e ) { delete m_pixmap; - m_pixmap = new QPixmap( e->size() ); - QWidget::resizeEvent(e); + m_pixmap = new TQPixmap( e->size() ); + TQWidget::resizeEvent(e); forceRepaint(); } -void ProbePositioner::mousePressEvent( QMouseEvent * e ) +void ProbePositioner::mousePressEvent( TQMouseEvent * e ) { p_draggedProbe = probeAtPosition(e->pos()); if (p_draggedProbe) @@ -152,7 +152,7 @@ void ProbePositioner::mousePressEvent( QMouseEvent * e ) } -void ProbePositioner::mouseReleaseEvent( QMouseEvent * e ) +void ProbePositioner::mouseReleaseEvent( TQMouseEvent * e ) { if (p_draggedProbe) e->accept(); @@ -161,7 +161,7 @@ void ProbePositioner::mouseReleaseEvent( QMouseEvent * e ) } -void ProbePositioner::mouseMoveEvent( QMouseEvent * e ) +void ProbePositioner::mouseMoveEvent( TQMouseEvent * e ) { if (!p_draggedProbe) { @@ -175,13 +175,13 @@ void ProbePositioner::mouseMoveEvent( QMouseEvent * e ) } -void ProbePositioner::paintEvent( QPaintEvent *e ) +void ProbePositioner::paintEvent( TQPaintEvent *e ) { - QRect r = e->rect(); + TQRect r = e->rect(); if (b_needRedraw) { - QPainter p; + TQPainter p; m_pixmap->fill( paletteBackgroundColor() ); p.begin(m_pixmap); p.setClipRegion(e->region()); @@ -193,10 +193,10 @@ void ProbePositioner::paintEvent( QPaintEvent *e ) p.setBrush( probeData->color() ); int currentPos = probePosition(probeData); - QPointArray pa(3); - pa[0] = QPoint( 0, int(currentPos-(probeArrowHeight/2)) ); - pa[1] = QPoint( int(probeArrowWidth), currentPos ); - pa[2] = QPoint( 0, int(currentPos+(probeArrowHeight/2)) ); + TQPointArray pa(3); + pa[0] = TQPoint( 0, int(currentPos-(probeArrowHeight/2)) ); + pa[1] = TQPoint( int(probeArrowWidth), currentPos ); + pa[2] = TQPoint( 0, int(currentPos+(probeArrowHeight/2)) ); p.drawPolygon(pa); } diff --git a/src/gui/probepositioner.h b/src/gui/probepositioner.h index d106b40..c99c0ab 100644 --- a/src/gui/probepositioner.h +++ b/src/gui/probepositioner.h @@ -11,10 +11,10 @@ #ifndef PROBEPOSITIONER_H #define PROBEPOSITIONER_H -#include +#include class ProbeData; -typedef QMap< int, ProbeData* > ProbeDataMap; +typedef TQMap< int, ProbeData* > ProbeDataMap; const float probeArrowWidth = 9; const float probeArrowHeight = 12; @@ -23,11 +23,12 @@ const float probeArrowHeight = 12; Widget for positioning the output of Probes in the OscilloscopeView @author David Saxton */ -class ProbePositioner : public QWidget +class ProbePositioner : public TQWidget { Q_OBJECT + TQ_OBJECT public: - ProbePositioner(QWidget *parent = 0, const char *name = 0); + ProbePositioner(TQWidget *tqparent = 0, const char *name = 0); ~ProbePositioner(); /** * Returns the amount of space (height in pixels) that a probe output @@ -50,7 +51,7 @@ class ProbePositioner : public QWidget * or NULL if none. Records the offset of the position from the mouse * in m_probePosOffset. */ - ProbeData* probeAtPosition( const QPoint &pos ); + ProbeData* probeAtPosition( const TQPoint &pos ); public slots: void forceRepaint(); @@ -60,18 +61,18 @@ class ProbePositioner : public QWidget void slotProbeDataUnregistered( int id ); protected: - virtual void mousePressEvent( QMouseEvent * e ); - virtual void mouseReleaseEvent( QMouseEvent * e ); - virtual void mouseMoveEvent( QMouseEvent * e ); - virtual void paintEvent( QPaintEvent *e ); - virtual void resizeEvent( QResizeEvent *event ); + virtual void mousePressEvent( TQMouseEvent * e ); + virtual void mouseReleaseEvent( TQMouseEvent * e ); + virtual void mouseMoveEvent( TQMouseEvent * e ); + virtual void paintEvent( TQPaintEvent *e ); + virtual void resizeEvent( TQResizeEvent *event ); ProbeDataMap m_probeDataMap; ProbeData *p_draggedProbe; int m_probePosOffset; bool b_needRedraw; - QPixmap *m_pixmap; + TQPixmap *m_pixmap; }; #endif diff --git a/src/gui/processingoptionswidget.ui b/src/gui/processingoptionswidget.ui index 683092a..be18723 100644 --- a/src/gui/processingoptionswidget.ui +++ b/src/gui/processingoptionswidget.ui @@ -1,6 +1,6 @@ ProcessingOptionsWidget - + ProcessingOptionsWidget @@ -26,7 +26,7 @@ m_pMicroSelect - + 0 0 @@ -43,14 +43,14 @@ Expanding - + 20 16 - + textLabel1 @@ -88,7 +88,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042949444154388db5954d6c545514c77ff7de37eff1a6a550da994e5ba798868f948fc847a2a2911816c436b0a02ed0083161a1981877ee10d90aa94656063491882c5cd4c4b8103f20cd806909a98604da8482341de80cb69de9bcd799799d79efba980f1da3a80b4f727273939bdff99f9b93f3175a6b6a21849080020c4002a29a8f0a5dcd002803bed63a1035f0d0d0504b6f6fef51d7758fa4d3e98d8ee3fc03af128ee3303939399548242eb8aefb09300f78464de9f0f0f0d148cc7caf3d5424de97a7ec17104220242805520a44557bbd4b21f083801d33e63a6d1bc7bf19c6064e0319a35a58b9ae7ba43d54e4d7c54b64dc097c7f09d30ef04b36736983cc7c11b4456b9b492c5e20dc54a6540e00896a8268a7017010f8bcae1830d2e9f4c69ebe3c197782b2ce60d94ddc9b30f9feeb45ae5d7181c5ead35636ef08d3ffe26a76ee3208b4031a56d80aa00768fda362e9380e25bf80ef3b587613d7afc099533380a4b5dda46fcb5aa42998b9eb7173dce5e6788e434763ec7fc942532008ea436003660d2caa7f8d69c3bd8910674e4d033e83877ad8d36fb0aa4d6058658ac5358c5df6383bf480f31fdda5a3632bbbfb6da4ccd5c00a10b2012cc12fd97cfb5516f0187c25cee0619396480ec3ca909d0f3372d1e5f9fe66de3ad605587c712ec55256a2540d5519d19ae24a29057329839f7ecc138944d833102290f3184ae1e6d6f0e98739c61229e6d21eafbed1c9c8c5558c8f3ee4ceed76946a1c43d97091828585223e2eebfbc295f60d45de89707628cb58224577bc85a79e5d4d786581cddb9b0148259711b20145836221400416e0232d1f6595c9ce4538773ac7b54406f0b15784e8e80aa1ac2594190220d021e49f2437960156b70ba095e95f96f18acd8c263cc6122962b1167a7ba34cdd7ec8c977a699bed546722a8fc2a02b6e2185fff78ab586ce78894ddb9ab9f5738ed14b1e030756929d8ff2e4ae5544632b38f96e89a99b298ebd6950cc2d12ed0eb3618b26f520788462ad09877df60db600f0f1fb49c646f21c7ebd836dcf94e9d9b4c0db27d6d3bd36c6426a96bce731703046d7da129a4670836284a054869d4f1b1c7e2dca67676ef3c1898091ef5ad8bc358c3205c93bf7c9a40ad4c660f4728edd7bbb3142ea2fc1da711cfc200011e08b45f6bd1c261adbce9717928c5f9d63fc6a19f0014567773303073790f8214bd6f5282dfbb8b9fa1f6b40d7c1939393533b92e63ad9240990484aec7e41b27d579cbb531e0f67023492d86316ebb768ba1e0f786e6f37e56550c62237aee7011e54abd7c1412291b8a06de378b4d3c0b215da9708e5a3a442192085404a83d4accfecac067c0c43e13a70e3fa12e96409e0325000966bbb354465339d04a6f9dd15fe6dde07ce030780278088d05ad72cc9a6b2f2daaaa74d75a1f0e8d0d5f60b40868a8364ead6248430000b0857a126ffcdf396abf03ce089ffcb4c7f033046c6b4a995e7a00000000049454e44ae426082 - + microselectwidget.h kurlrequester.h diff --git a/src/gui/programmerdlg.cpp b/src/gui/programmerdlg.cpp index a2186b4..9473720 100644 --- a/src/gui/programmerdlg.cpp +++ b/src/gui/programmerdlg.cpp @@ -21,8 +21,8 @@ #include #include -ProgrammerDlg::ProgrammerDlg( const QString & picID, QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, i18n("PIC Programmer"), Ok|Cancel ) +ProgrammerDlg::ProgrammerDlg( const TQString & picID, TQWidget *tqparent, const char *name ) + : KDialogBase( tqparent, name, true, i18n("PIC Programmer"), Ok|Cancel ) { // Change the "Ok" button to a "Burn" button KGuiItem burnItem = KStdGuiItem::ok(); @@ -35,7 +35,7 @@ ProgrammerDlg::ProgrammerDlg( const QString & picID, QWidget *parent, const char // Setup the list of programmers KComboBox * programmerCombo = m_pProgrammerWidget->m_pProgrammerProgram; - QStringList programmerNames = m_pProgrammerSettings->configNames( false ); + TQStringList programmerNames = m_pProgrammerSettings->configNames( false ); programmerCombo->insertStringList( programmerNames ); programmerCombo->setSizeLimit( programmerNames.size() ); programmerCombo->setCurrentText( KTLConfig::picProgrammerProgram() ); diff --git a/src/gui/programmerdlg.h b/src/gui/programmerdlg.h index ab64e5a..1c3fa63 100644 --- a/src/gui/programmerdlg.h +++ b/src/gui/programmerdlg.h @@ -25,13 +25,14 @@ class ProgrammerWidget; class ProgrammerDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: /** * Create a new ProgrammerDlg with the PIC type set to picID. Other * options (such as the program to use) will be read in from the * settings. */ - ProgrammerDlg( const QString & picID, QWidget * parent = 0, const char * name = 0 ); + ProgrammerDlg( const TQString & picID, TQWidget * tqparent = 0, const char * name = 0 ); ~ProgrammerDlg(); virtual void reject(); diff --git a/src/gui/programmerwidget.ui b/src/gui/programmerwidget.ui index 3436ac1..73c651a 100644 --- a/src/gui/programmerwidget.ui +++ b/src/gui/programmerwidget.ui @@ -1,6 +1,6 @@ ProgrammerWidget - + ProgrammerWidget @@ -22,7 +22,7 @@ 0 - + textLabel1_3 @@ -50,14 +50,14 @@ m_pMicroSelect - + 0 0 - + textLabel1 @@ -65,7 +65,7 @@ Port - + m_pPicProgrammerPort @@ -83,7 +83,7 @@ Expanding - + 20 0 @@ -115,7 +115,7 @@ 89504e470d0a1a0a0000000d4948445200000016000000160806000000c4b46c3b0000042949444154388db5954d6c545514c77ff7de37eff1a6a550da994e5ba798868f948fc847a2a2911816c436b0a02ed0083161a1981877ee10d90aa94656063491882c5cd4c4b8103f20cd806909a98604da8482341de80cb69de9bcd799799d79efba980f1da3a80b4f727273939bdff99f9b93f3175a6b6a21849080020c4002a29a8f0a5dcd002803bed63a1035f0d0d0504b6f6fef51d7758fa4d3e98d8ee3fc03af128ee3303939399548242eb8aefb09300f78464de9f0f0f0d148cc7caf3d5424de97a7ec17104220242805520a44557bbd4b21f083801d33e63a6d1bc7bf19c6064e0319a35a58b9ae7ba43d54e4d7c54b64dc097c7f09d30ef04b36736983cc7c11b4456b9b492c5e20dc54a6540e00896a8268a7017010f8bcae1830d2e9f4c69ebe3c197782b2ce60d94ddc9b30f9feeb45ae5d7181c5ead35636ef08d3ffe26a76ee3208b4031a56d80aa00768fda362e9380e25bf80ef3b587613d7afc099533380a4b5dda46fcb5aa42998b9eb7173dce5e6788e434763ec7fc942532008ea436003660d2caa7f8d69c3bd8910674e4d033e83877ad8d36fb0aa4d6058658ac5358c5df6383bf480f31fdda5a3632bbbfb6da4ccd5c00a10b2012cc12fd97cfb5516f0187c25cee0619396480ec3ca909d0f3372d1e5f9fe66de3ad605587c712ec55256a2540d5519d19ae24a29057329839f7ecc138944d833102290f3184ae1e6d6f0e98739c61229e6d21eafbed1c9c8c5558c8f3ee4ceed76946a1c43d97091828585223e2eebfbc295f60d45de89707628cb58224577bc85a79e5d4d786581cddb9b0148259711b20145836221400416e0232d1f6595c9ce4538773ac7b54406f0b15784e8e80aa1ac2594190220d021e49f2437960156b70ba095e95f96f18acd8c263cc6122962b1167a7ba34cdd7ec8c977a699bed546722a8fc2a02b6e2185fff78ab586ce78894ddb9ab9f5738ed14b1e030756929d8ff2e4ae5544632b38f96e89a99b298ebd6950cc2d12ed0eb3618b26f520788462ad09877df60db600f0f1fb49c646f21c7ebd836dcf94e9d9b4c0db27d6d3bd36c6426a96bce731703046d7da129a4670836284a054869d4f1b1c7e2dca67676ef3c1898091ef5ad8bc358c3205c93bf7c9a40ad4c660f4728edd7bbb3142ea2fc1da711cfc200011e08b45f6bd1c261adbce9717928c5f9d63fc6a19f0014567773303073790f8214bd6f5282dfbb8b9fa1f6b40d7c1939393533b92e63ad9240990484aec7e41b27d579cbb531e0f67023492d86316ebb768ba1e0f786e6f37e56550c62237aee7011e54abd7c1412291b8a06de378b4d3c0b215da9708e5a3a442192085404a83d4accfecac067c0c43e13a70e3fa12e96409e0325000966bbb354465339d04a6f9dd15fe6dde07ce030780278088d05ad72cc9a6b2f2daaaa74d75a1f0e8d0d5f60b40868a8364ead6248430000b0857a126ffcdf396abf03ce089ffcb4c7f033046c6b4a995e7a00000000049454e44ae426082 - + kcombobox.h microselectwidget.h diff --git a/src/gui/projectdlgs.cpp b/src/gui/projectdlgs.cpp index 4ea18c0..1cb560f 100644 --- a/src/gui/projectdlgs.cpp +++ b/src/gui/projectdlgs.cpp @@ -24,23 +24,23 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include //BEGIN class NewProjectDlg -NewProjectDlg::NewProjectDlg( QWidget * parent ) - : KDialogBase( parent, "newprojectdlg", true, "New Project", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) +NewProjectDlg::NewProjectDlg( TQWidget * tqparent ) + : KDialogBase( tqparent, "newprojectdlg", true, "New Project", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { m_pWidget = new NewProjectWidget(this); - connect( m_pWidget->projectNameEdit, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) ); - connect( m_pWidget->projectLocationURL, SIGNAL(textChanged(const QString & )), this, SLOT(locationChanged(const QString& )) ); + connect( m_pWidget->projectNameEdit, TQT_SIGNAL(textChanged(const TQString & )), this, TQT_SLOT(locationChanged(const TQString& )) ); + connect( m_pWidget->projectLocationURL, TQT_SIGNAL(textChanged(const TQString & )), this, TQT_SLOT(locationChanged(const TQString& )) ); // Check if already valid dir - locationChanged( QString::null ); + locationChanged( TQString() ); - m_pWidget->projectLocationURL->setURL( QDir::homeDirPath() ); + m_pWidget->projectLocationURL->setURL( TQDir::homeDirPath() ); m_pWidget->projectLocationURL->setMode( KFile::Directory ); setMainWidget( m_pWidget ); @@ -62,10 +62,10 @@ void NewProjectDlg::reject() m_bAccepted = false; } -void NewProjectDlg::locationChanged( const QString & ) +void NewProjectDlg::locationChanged( const TQString & ) { m_location = m_pWidget->projectLocationURL->url(); - QDir subDir(m_location); + TQDir subDir(m_location); if ( !m_location.endsWith("/") ) m_location.append("/"); @@ -75,7 +75,7 @@ void NewProjectDlg::locationChanged( const QString & ) m_pWidget->locationLabel->setText( m_location ); - QDir dir(m_location); + TQDir dir(m_location); if ( dir.exists() || !subDir.exists() ) enableButtonOK(false); @@ -88,8 +88,8 @@ void NewProjectDlg::locationChanged( const QString & ) //BEGIN class CreateSubprojectDlg -CreateSubprojectDlg::CreateSubprojectDlg( QWidget * parent ) - : KDialogBase( parent, "Create Subproject Dialog", true, "Create Subproject", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) +CreateSubprojectDlg::CreateSubprojectDlg( TQWidget * tqparent ) + : KDialogBase( tqparent, "Create Subproject Dialog", true, "Create Subproject", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { m_pWidget = new CreateSubprojectWidget(this); @@ -128,8 +128,8 @@ void CreateSubprojectDlg::reject() //BEGIN class LinkerOptionsDlg -LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *parent ) - : KDialogBase( parent, "Linker Options Dialog", true, "Linker Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) +LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, TQWidget *tqparent ) + : KDialogBase( tqparent, "Linker Options Dialog", true, "Linker Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { m_pLinkerOptions = linkingOptions; m_pWidget = new LinkerOptionsWidget(this); @@ -150,14 +150,14 @@ LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *par //BEGIN Update library widgets const KURL::List availableInternal = pi->childOutputURLs( ProjectItem::LibraryType ); - const QStringList linkedInternal = m_pLinkerOptions->linkedInternal(); + const TQStringList linkedInternal = m_pLinkerOptions->linkedInternal(); KURL::List::const_iterator end = availableInternal.end(); for ( KURL::List::const_iterator it = availableInternal.begin(); it != end; ++it ) { - QString relativeURL = KURL::relativeURL( pi->url(), *it ); - QCheckListItem * item = new QCheckListItem( m_pWidget->m_pInternalLibraries, relativeURL, QCheckListItem::CheckBox ); - item->setOn( linkedInternal.contains(relativeURL) ); + TQString relativeURL = KURL::relativeURL( pi->url(), *it ); + TQCheckListItem * item = new TQCheckListItem( m_pWidget->m_pInternalLibraries, relativeURL, TQCheckListItem::CheckBox ); + item->setOn( linkedInternal.tqcontains(relativeURL) ); } m_pExternalLibraryRequester = new KURLRequester( 0l ); @@ -165,8 +165,8 @@ LinkerOptionsDlg::LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *par delete m_pWidget->m_pExternalLibraries; m_pWidget->m_pExternalLibraries = new KEditListBox( i18n("Link libraries outside project"), m_pExternalLibraryRequester->customEditor(), m_pWidget ); - m_pWidget->m_pExternalLibraries->layout()->setMargin(11); - (dynamic_cast(m_pWidget->layout()))->addMultiCellWidget( m_pWidget->m_pExternalLibraries, 7, 7, 0, 1 ); + m_pWidget->m_pExternalLibraries->tqlayout()->setMargin(11); + (dynamic_cast(m_pWidget->tqlayout()))->addMultiCellWidget( m_pWidget->m_pExternalLibraries, 7, 7, 0, 1 ); #if defined(KDE_MAKE_VERSION) # if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0) @@ -192,10 +192,10 @@ void LinkerOptionsDlg::accept() { hide(); - QStringList linkedInternal; - for ( QListViewItemIterator internalIt( m_pWidget->m_pInternalLibraries ); internalIt.current(); ++internalIt ) + TQStringList linkedInternal; + for ( TQListViewItemIterator internalIt( m_pWidget->m_pInternalLibraries ); internalIt.current(); ++internalIt ) { - QCheckListItem * item = static_cast(internalIt.current()); + TQCheckListItem * item = static_cast(internalIt.current()); if ( item->isOn() ) linkedInternal << item->text(); } @@ -218,8 +218,8 @@ void LinkerOptionsDlg::reject() //BEGIN class ProcessingOptionsDlg -ProcessingOptionsDlg::ProcessingOptionsDlg( ProjectItem * projectItem, QWidget *parent ) - : KDialogBase( parent, "Processing Options Dialog", true, "Processing Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) +ProcessingOptionsDlg::ProcessingOptionsDlg( ProjectItem * projectItem, TQWidget *tqparent ) + : KDialogBase( tqparent, "Processing Options Dialog", true, "Processing Options", KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true ) { m_pProjectItem = projectItem; m_pWidget = new ProcessingOptionsWidget(this); diff --git a/src/gui/projectdlgs.h b/src/gui/projectdlgs.h index fe50361..5219072 100644 --- a/src/gui/projectdlgs.h +++ b/src/gui/projectdlgs.h @@ -30,8 +30,9 @@ A standard dialog for getting project details from the user for a new project class NewProjectDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - NewProjectDlg( QWidget * parent ); + NewProjectDlg( TQWidget * tqparent ); /** * Called when the 'Cancel' button is pressed. @@ -45,9 +46,9 @@ class NewProjectDlg : public KDialogBase void accept(); bool accepted() const { return m_bAccepted; } - QString projectName() const { return m_projectName; } - QString projectLocation() const { return m_projectLocation; } - QString location() const { return m_location; } + TQString projectName() const { return m_projectName; } + TQString projectLocation() const { return m_projectLocation; } + TQString location() const { return m_location; } public slots: /** @@ -55,14 +56,14 @@ class NewProjectDlg : public KDialogBase * Checks whether the resultant location combination is a valid path - * if so, enabels the OK button; otherwise disables it. */ - void locationChanged( const QString & ); + void locationChanged( const TQString & ); protected: NewProjectWidget * m_pWidget; bool m_bAccepted; - QString m_projectName; - QString m_projectLocation; - QString m_location; + TQString m_projectName; + TQString m_projectLocation; + TQString m_location; }; @@ -72,8 +73,9 @@ class NewProjectDlg : public KDialogBase class CreateSubprojectDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - CreateSubprojectDlg( QWidget *parent = 0 ); + CreateSubprojectDlg( TQWidget *tqparent = 0 ); ~CreateSubprojectDlg(); // The following values should agree with the positions in the combo box @@ -95,13 +97,13 @@ class CreateSubprojectDlg : public KDialogBase bool accepted() const { return m_bAccepted; } Type type() const { return m_type; } - QString targetFile() const { return m_targetFile; } + TQString targetFile() const { return m_targetFile; } protected: CreateSubprojectWidget * m_pWidget; bool m_bAccepted; Type m_type; - QString m_targetFile; + TQString m_targetFile; }; @@ -111,8 +113,9 @@ class CreateSubprojectDlg : public KDialogBase class LinkerOptionsDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - LinkerOptionsDlg( LinkerOptions * linkingOptions, QWidget *parent = 0 ); + LinkerOptionsDlg( LinkerOptions * linkingOptions, TQWidget *tqparent = 0 ); virtual ~LinkerOptionsDlg(); /** @@ -138,7 +141,7 @@ class LinkerOptionsDlg : public KDialogBase class ProcessingOptionsDlg : public KDialogBase { public: - ProcessingOptionsDlg( ProjectItem * projectItem, QWidget *parent = 0 ); + ProcessingOptionsDlg( ProjectItem * projectItem, TQWidget *tqparent = 0 ); virtual ~ProcessingOptionsDlg(); /** diff --git a/src/gui/propertieslistview.cpp b/src/gui/propertieslistview.cpp index 5f57aa3..7e55ed0 100644 --- a/src/gui/propertieslistview.cpp +++ b/src/gui/propertieslistview.cpp @@ -20,25 +20,25 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -PropertiesListView::PropertiesListView(QWidget *parent, const char *name) - : KListView(parent, name) +PropertiesListView::PropertiesListView(TQWidget *tqparent, const char *name) + : KListView(tqparent, name) { addColumn(i18n("Property")); addColumn(i18n("Data")); setFullWidth(true); - setColumnAlignment(1,Qt::AlignRight); + setColumnAlignment(1,TQt::AlignRight); p_lastItem = 0l; m_diffBt = 0L; - connect(this,SIGNAL(selectionChanged(QListViewItem*)),this,SLOT(slotSelectionChanged(QListViewItem*))); + connect(this,TQT_SIGNAL(selectionChanged(TQListViewItem*)),this,TQT_SLOT(slotSelectionChanged(TQListViewItem*))); m_editor = 0L; - connect(header(),SIGNAL(sizeChange(int,int,int)),this,SLOT(headerSizeChanged(int,int,int))); + connect(header(),TQT_SIGNAL(sizeChange(int,int,int)),this,TQT_SLOT(headerSizeChanged(int,int,int))); } PropertiesListView::~PropertiesListView() @@ -124,7 +124,7 @@ void PropertiesListView::slotUpdate( ItemGroup * itemGroup ) } } -void PropertiesListView::slotSelectionChanged(QListViewItem *item) +void PropertiesListView::slotSelectionChanged(TQListViewItem *item) { if (!item) return; destroyEditor(); @@ -185,24 +185,24 @@ void PropertiesListView::slotSelectionChanged(QListViewItem *item) } } - connect(p_lastItem->data(),SIGNAL(destroyed()),this,SLOT(destroyEditor())); + connect(p_lastItem->data(),TQT_SIGNAL(destroyed()),this,TQT_SLOT(destroyEditor())); // Connect so that changes in the editor change the canvas item data. - connect(m_editor,SIGNAL(editorDataChanged(const QString&,QVariant)),ItemInterface::self(),SLOT(slotSetData(const QString&,QVariant))); - connect(m_editor,SIGNAL(editorDataChanged(const QString&,QVariant)),this,SLOT(slotDataChanged(const QString&,QVariant))); + connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),ItemInterface::self(),TQT_SLOT(slotSetData(const TQString&,TQVariant))); + connect(m_editor,TQT_SIGNAL(editorDataChanged(const TQString&,TQVariant)),this,TQT_SLOT(slotDataChanged(const TQString&,TQVariant))); int x = columnWidth(0); - int y = viewportToContents(QPoint(0,itemRect(p_lastItem).y())).y(); + int y = viewportToContents(TQPoint(0,tqitemRect(p_lastItem).y())).y(); addChild(m_editor,x,y); m_editor->setFocus(); m_editor->show(); - m_editor->setGeometry(QRect(x,y,columnWidth(1),itemRect(p_lastItem).height())); + m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height())); if(p_lastItem->data()->type() == Variant::Type::FileName) { // The folder button in the KURLComboBox has a minimum size taller than // the height of the ListViewItems so this is a temporary kludge to // make it look slightly acceptable. - m_editor->setGeometry(QRect(x,y,columnWidth(1),itemRect(p_lastItem).height()+7)); + m_editor->setGeometry(TQRect(x,y,columnWidth(1),tqitemRect(p_lastItem).height()+7)); } // Active the editor as appropriate @@ -271,13 +271,13 @@ void PropertiesListView::headerSizeChanged(int section, int /*oldSize*/, int new // Resize the editor to the new column width // and move it to the right place. - QRect rect = m_editor->geometry(); + TQRect rect = m_editor->tqgeometry(); rect.setWidth(newSize); rect.setX( columnWidth(0) ); m_editor->setGeometry(rect); } -void PropertiesListView::slotDataChanged(const QString &/*id*/, QVariant data) +void PropertiesListView::slotDataChanged(const TQString &/*id*/, TQVariant data) { PLVItem *pItem = static_cast(currentItem()); pItem->updateData(data); @@ -285,7 +285,7 @@ void PropertiesListView::slotDataChanged(const QString &/*id*/, QVariant data) void PropertiesListView::slotMergeProperties() { - for( QListViewItemIterator it( this ); it.current(); ++it ) + for( TQListViewItemIterator it( this ); it.current(); ++it ) { PLVItem * pItem = static_cast(it.current()); if (pItem->isEnabled()) @@ -302,7 +302,7 @@ void PropertiesListView::slotMergeProperties() void PropertiesListView::slotSetDefaults() { - for( QListViewItemIterator it( this ); it.current(); ++it ) + for( TQListViewItemIterator it( this ); it.current(); ++it ) { PLVItem *pItem = static_cast(it.current()); ItemInterface::self()->slotSetData(pItem->id(),pItem->data()->defaultValue()); @@ -310,13 +310,13 @@ void PropertiesListView::slotSetDefaults() } -void PropertiesListView::wheelEvent( QWheelEvent *e ) +void PropertiesListView::wheelEvent( TQWheelEvent *e ) { - QPoint _pos = contentsToViewport(e->pos()); + TQPoint _pos = contentsToViewport(e->pos()); _pos -= pos(); _pos.setY( _pos.y()+header()->height() ); - QListViewItem *item = itemAt(_pos); - if ( item && item != dynamic_cast(p_lastItem) ) + TQListViewItem *item = itemAt(_pos); + if ( item && item != dynamic_cast(p_lastItem) ) { e->accept(); if(!item->isSelected()) slotSelectionChanged(item); diff --git a/src/gui/propertieslistview.h b/src/gui/propertieslistview.h index c6ad8f7..a879ae7 100644 --- a/src/gui/propertieslistview.h +++ b/src/gui/propertieslistview.h @@ -12,15 +12,15 @@ #define PROPERTIESLISTVIEW_H #include -#include +#include class CNItemGroup; class ItemGroup; class PIEditor; class PLVItem; -class QPushButton; +class TQPushButton; -typedef QMap< QString, PLVItem * > PLVItemMap; +typedef TQMap< TQString, PLVItem * > PLVItemMap; /** @author Daniel Clarke @@ -29,8 +29,9 @@ typedef QMap< QString, PLVItem * > PLVItemMap; class PropertiesListView : public KListView { Q_OBJECT + TQ_OBJECT public: - PropertiesListView( QWidget *parent = 0l, const char *name = 0l ); + PropertiesListView( TQWidget *tqparent = 0l, const char *name = 0l ); ~PropertiesListView(); public slots: @@ -48,7 +49,7 @@ public slots: * Removes all property items from the widget. */ void slotClear(); - void slotSelectionChanged(QListViewItem *item); + void slotSelectionChanged(TQListViewItem *item); /** * Whenthe selected items have different values, then the property editor * for the disagreeing property will have a value taken from one of the @@ -60,14 +61,14 @@ public slots: protected slots: void headerSizeChanged(int section, int oldSize, int newSize); - void slotDataChanged(const QString &id, QVariant data); + void slotDataChanged(const TQString &id, TQVariant data); void destroyEditor(); protected: - virtual void wheelEvent( QWheelEvent *e ); + virtual void wheelEvent( TQWheelEvent *e ); PIEditor *m_editor; - QPushButton *m_diffBt; + TQPushButton *m_diffBt; PLVItem *p_lastItem; PLVItemMap m_plvItemMap; }; diff --git a/src/gui/sdccoptionswidget.ui b/src/gui/sdccoptionswidget.ui index 218f796..3f73699 100644 --- a/src/gui/sdccoptionswidget.ui +++ b/src/gui/sdccoptionswidget.ui @@ -1,6 +1,6 @@ SDCCOptionsWidget - + SDCCOptionsWidget @@ -22,11 +22,11 @@ 0 - + tabWidget12 - + general @@ -37,7 +37,7 @@ unnamed - + kcfg_SDCC_nostdlib @@ -48,7 +48,7 @@ Alt+Y - + kcfg_SDCC_nostdinc @@ -59,7 +59,7 @@ - + kcfg_SDCC_less_pedantic @@ -70,7 +70,7 @@ Alt+B - + kcfg_SDCC_std_c89 @@ -84,7 +84,7 @@ Follow the C89 standard and disable SDCC features that conflict with the standard. - + kcfg_SDCC_std_c99 @@ -111,7 +111,7 @@ Expanding - + 20 20 @@ -120,7 +120,7 @@ - + code_generation @@ -131,7 +131,7 @@ unnamed - + kcfg_SDCC_stack_auto @@ -148,7 +148,7 @@ All functions in the source file will be compiled as reentrant, i.e. the parameters and local variables will be allocated on the stack. If this option is used all source files in the project should be compiled with this option. It automatically implies -int-long-reent and -float-reent. - + kcfg_SDCC_int_long_reent @@ -165,7 +165,7 @@ Integer (16 bit) and long (32 bit) libraries have been compiled as reentrant. Note by default these libraries are compiled as non-reentrant. - + kcfg_SDCC_float_reent @@ -179,7 +179,7 @@ Floating point library is compiled as reentrant. - + kcfg_SDCC_fommit_frame_pointer @@ -190,7 +190,7 @@ - + kcfg_SDCC_no_xinit_opt @@ -204,7 +204,7 @@ Will not memcpy initialized data from code space into xdata space. This saves a few bytes in code space if you don't have initialized data. - + kcfg_SDCC_all_callee_saves @@ -225,7 +225,7 @@ Expanding - + 20 20 @@ -234,7 +234,7 @@ - + optimization @@ -245,7 +245,7 @@ unnamed - + kcfg_SDCC_nooverlay @@ -259,7 +259,7 @@ The compiler will not overlay parameters and local variables of any function, see section Parameters and local variables for more details. - + kcfg_SDCC_nogcse @@ -270,7 +270,7 @@ - + kcfg_SDCC_nolabelopt @@ -284,7 +284,7 @@ Will not optimize labels (makes the dumpfiles more readable). - + kcfg_SDCC_noinvariant @@ -295,7 +295,7 @@ - + kcfg_SDCC_noinduction @@ -306,7 +306,7 @@ - + kcfg_SDCC_no_peep @@ -320,7 +320,7 @@ Disable peep-hole optimization. - + kcfg_SDCC_noloopreverse @@ -334,7 +334,7 @@ Will not do loop reversal optimization. - + kcfg_SDCC_opt_code_size @@ -348,7 +348,7 @@ The compiler will optimize code generation towards compact code, possibly at the expense of code speed. - + kcfg_SDCC_opt_code_speed @@ -362,7 +362,7 @@ The compiler will optimize code generation towards fast code, possibly at the expense of code size. - + kcfg_SDCC_peep_asm @@ -376,7 +376,7 @@ Pass the inline assembler code through the peep hole optimizer. This can cause unexpected changes to inline assembler code, please go through the peephole optimizer rules defined in the source file tree '<target>/peeph.def' before using this option. - + kcfg_SDCC_nojtbound @@ -397,7 +397,7 @@ Expanding - + 20 20 @@ -406,7 +406,7 @@ - + pic16_specific @@ -417,7 +417,7 @@ unnamed - + kcfg_SDCC_nodefaultlibs @@ -428,7 +428,7 @@ - + kcfg_SDCC_pno_banksel @@ -439,7 +439,7 @@ - + kcfg_SDCC_pstack_model_large @@ -450,7 +450,7 @@ Alt+K - + kcfg_SDCC_debug_xtra @@ -461,7 +461,7 @@ Alt+Y - + kcfg_SDCC_denable_peeps @@ -472,7 +472,7 @@ Alt+X - + kcfg_SDCC_calltree @@ -483,7 +483,7 @@ Alt+M - + kcfg_SDCC_fstack @@ -494,7 +494,7 @@ Alt+B - + kcfg_SDCC_optimize_goto @@ -505,7 +505,7 @@ Alt+Z - + kcfg_SDCC_optimize_cmp @@ -516,7 +516,7 @@ - + kcfg_SDCC_optimize_df @@ -537,7 +537,7 @@ Expanding - + 20 20 @@ -552,7 +552,7 @@ kcfg_MiscSDCCOptions - + textLabel2 @@ -570,7 +570,7 @@ Expanding - + 20 16 @@ -579,7 +579,7 @@ - + klineedit.h diff --git a/src/gui/settingsdlg.cpp b/src/gui/settingsdlg.cpp index 3b42027..641a9d2 100644 --- a/src/gui/settingsdlg.cpp +++ b/src/gui/settingsdlg.cpp @@ -30,18 +30,18 @@ #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // Make sure that this value is the same as that in ktechlab.kcfg const int defaultRefreshRate = 50; -SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *config ) - : KConfigDialog( parent, name, config ) +SettingsDlg::SettingsDlg( TQWidget *tqparent, const char *name, KConfigSkeleton *config ) + : KConfigDialog( tqparent, name, config ) { m_generalOptionsWidget = new GeneralOptionsWidget( this, "generalOptionsWidget" ); m_gpasmSettingsWidget = new GpasmSettingsWidget( this, "gpasmSettingsWidget" ); @@ -52,8 +52,8 @@ SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *co m_pPicProgrammerSettings = new PicProgrammerSettings; - m_logicWidget->kcfg_LogicOutputHighImpedance->setSuffix( QString(" ") + QChar(0x3a9) ); - m_logicWidget->kcfg_LogicOutputLowImpedance->setSuffix( QString(" ") + QChar(0x3a9) ); + m_logicWidget->kcfg_LogicOutputHighImpedance->setSuffix( TQString(" ") + TQChar(0x3a9) ); + m_logicWidget->kcfg_LogicOutputLowImpedance->setSuffix( TQString(" ") + TQChar(0x3a9) ); addPage( m_generalOptionsWidget, i18n("General"), "misc", i18n("General Options") ); addPage( m_picProgrammerConfigWidget, i18n("Programmer"), "memory", i18n("PIC Programmer") ); @@ -62,18 +62,18 @@ SettingsDlg::SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *co addPage( m_gpasmSettingsWidget, "Gpasm", "convert_to_hex", "gpasm" ); addPage( m_sdccOptionsWidget, "SDCC", "source_c", "SDCC" ); - connect( m_generalOptionsWidget->refreshRateSlider, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateRefreshRateLabel(int)) ); - connect( m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram, SIGNAL(activated(const QString &)), this, SLOT(slotUpdatePicProgrammerDescription()) ); - connect( m_picProgrammerConfigWidget->removeButton, SIGNAL(clicked()), this, SLOT(slotRemoveProgrammerConfig()) ); - connect( m_picProgrammerConfigWidget->addButton, SIGNAL(clicked()), this, SLOT(slotAddProgrammerConfig()) ); + connect( m_generalOptionsWidget->refreshRateSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotUpdateRefreshRateLabel(int)) ); + connect( m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotUpdatePicProgrammerDescription()) ); + connect( m_picProgrammerConfigWidget->removeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveProgrammerConfig()) ); + connect( m_picProgrammerConfigWidget->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddProgrammerConfig()) ); - connect( m_picProgrammerConfigWidget->initCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) ); - connect( m_picProgrammerConfigWidget->readCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) ); - connect( m_picProgrammerConfigWidget->writeCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) ); - connect( m_picProgrammerConfigWidget->verifyCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) ); - connect( m_picProgrammerConfigWidget->blankCheckCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) ); - connect( m_picProgrammerConfigWidget->eraseCommand, SIGNAL(textChanged(const QString &)), this, SLOT(slotSaveCurrentProgrammerConfig()) ); + connect( m_picProgrammerConfigWidget->initCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) ); + connect( m_picProgrammerConfigWidget->readCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) ); + connect( m_picProgrammerConfigWidget->writeCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) ); + connect( m_picProgrammerConfigWidget->verifyCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) ); + connect( m_picProgrammerConfigWidget->blankCheckCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) ); + connect( m_picProgrammerConfigWidget->eraseCommand, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotSaveCurrentProgrammerConfig()) ); m_generalOptionsWidget->kcfg_GridColor->setEnabled( KTLConfig::showGrid() ); @@ -100,23 +100,23 @@ void SettingsDlg::show() void SettingsDlg::slotUpdateRefreshRateLabel( int sliderValue ) { - const QString number = QString::number( sliderValueToRefreshRate(sliderValue) ); + const TQString number = TQString::number( sliderValueToRefreshRate(sliderValue) ); switch(sliderValue) { case 0: - m_generalOptionsWidget->refreshRateLabel->setText( i18n("Lowest (%1 FPS)").arg(number) ); + m_generalOptionsWidget->refreshRateLabel->setText( i18n("Lowest (%1 FPS)").tqarg(number) ); break; case 1: - m_generalOptionsWidget->refreshRateLabel->setText( i18n("Low (%1 FPS)").arg(number) ); + m_generalOptionsWidget->refreshRateLabel->setText( i18n("Low (%1 FPS)").tqarg(number) ); break; case 2: - m_generalOptionsWidget->refreshRateLabel->setText( i18n("Medium (%1 FPS)").arg(number) ); + m_generalOptionsWidget->refreshRateLabel->setText( i18n("Medium (%1 FPS)").tqarg(number) ); break; case 3: - m_generalOptionsWidget->refreshRateLabel->setText( i18n("High (%1 FPS)").arg(number) ); + m_generalOptionsWidget->refreshRateLabel->setText( i18n("High (%1 FPS)").tqarg(number) ); break; case 4: - m_generalOptionsWidget->refreshRateLabel->setText( i18n("Highest (%1 FPS)").arg(number) ); + m_generalOptionsWidget->refreshRateLabel->setText( i18n("Highest (%1 FPS)").tqarg(number) ); break; default: m_generalOptionsWidget->refreshRateLabel->setText( i18n("Unknown value") ); @@ -128,22 +128,22 @@ void SettingsDlg::slotUpdateRefreshRateLabel( int sliderValue ) void SettingsDlg::slotUpdatePicProgrammerDescription() { - QString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText(); + TQString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText(); ProgrammerConfig config = m_pPicProgrammerSettings->config( program ); - QString description = config.description; + TQString description = config.description; bool customProgrammer = ! m_pPicProgrammerSettings->isPredefined( program ); - QString executable = config.executable; + TQString executable = config.executable; if ( executable.isEmpty() ) executable = program.lower(); - QString programLocation = KStandardDirs::findExe( executable ); + TQString programLocation = KStandardDirs::findExe( executable ); if ( programLocation.isNull() ) - description.prepend( i18n("%1 cannot be found.
").arg( executable ) ); + description.prepend( i18n("%1 cannot be found.
").tqarg( executable ) ); else - description.prepend( i18n("%1 found: %2
").arg( executable ).arg(programLocation) ); + description.prepend( i18n("%1 found: %2
").tqarg( executable ).tqarg(programLocation) ); m_picProgrammerConfigWidget->m_pProgrammerDescription->setText( description ); m_picProgrammerConfigWidget->removeButton->setEnabled( customProgrammer ); @@ -154,7 +154,7 @@ void SettingsDlg::slotUpdatePicProgrammerDescription() edit = m_picProgrammerConfigWidget->name; \ edit->setText( config.name ); \ edit->setEnabled(customProgrammer); \ - QToolTip::add( edit, customProgrammer ? 0 : config.name ) + TQToolTip::add( edit, customProgrammer ? 0 : config.name ) SETUP_COMMAND( initCommand ); SETUP_COMMAND( readCommand ); @@ -169,7 +169,7 @@ void SettingsDlg::slotUpdatePicProgrammerDescription() void SettingsDlg::slotSaveCurrentProgrammerConfig() { - QString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText(); + TQString program = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram->currentText(); if ( m_pPicProgrammerSettings->isPredefined( program ) ) return; @@ -191,9 +191,9 @@ void SettingsDlg::slotRemoveProgrammerConfig() { KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram; - QString program = combo->currentText(); + TQString program = combo->currentText(); - KMessageBox::ButtonCode confirm = (KMessageBox::ButtonCode)KMessageBox::warningContinueCancel( this, i18n("Remove programmer configuration \"%1\"?").arg(program), i18n("Remove \"%1\"").arg(program), i18n("Remove") ); + KMessageBox::ButtonCode confirm = (KMessageBox::ButtonCode)KMessageBox::warningContinueCancel( this, i18n("Remove programmer configuration \"%1\"?").tqarg(program), i18n("Remove \"%1\"").tqarg(program), i18n("Remove") ); if ( confirm == KMessageBox::Cancel ) return; @@ -203,20 +203,20 @@ void SettingsDlg::slotRemoveProgrammerConfig() } -class NameValidator : public QValidator +class NameValidator : public TQValidator { public: - NameValidator( QStringList unallowed ) - : QValidator(0) { + NameValidator( TQStringList unallowed ) + : TQValidator(0) { m_unallowed = unallowed; } - virtual State validate( QString & input, int & ) const { - return (input.isEmpty() || m_unallowed.contains( input.lower() )) ? Intermediate : Acceptable; + virtual State validate( TQString & input, int & ) const { + return (input.isEmpty() || m_unallowed.tqcontains( input.lower() )) ? Intermediate : Acceptable; } protected: - QStringList m_unallowed; + TQStringList m_unallowed; }; @@ -224,7 +224,7 @@ void SettingsDlg::slotAddProgrammerConfig() { KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram; - QStringList takenNames; + TQStringList takenNames; int count = combo->count(); for ( int i = 0; i < count; ++i ) takenNames << combo->text(i).lower(); @@ -232,7 +232,7 @@ void SettingsDlg::slotAddProgrammerConfig() NameValidator * nv = new NameValidator( takenNames ); bool ok = false; - QString name = KInputDialog::getText( i18n("Configuration Name"), i18n("Name"), 0, &ok, this, 0, nv ); + TQString name = KInputDialog::getText( i18n("Configuration Name"), i18n("Name"), 0, &ok, this, 0, nv ); delete nv; @@ -300,7 +300,7 @@ void SettingsDlg::updateSettings() emit settingsChanged(); } - QTimer::singleShot( 0, this, SLOT(slotUpdateSettings()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateSettings()) ); } @@ -313,7 +313,7 @@ void SettingsDlg::slotUpdateSettings() return; KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram; - QString newProgram = combo->currentText(); + TQString newProgram = combo->currentText(); if ( newProgram != KTLConfig::picProgrammerProgram() ) { @@ -339,14 +339,14 @@ void SettingsDlg::updateWidgets() m_pPicProgrammerSettings->load( kapp->config() ); - QStringList programmerNames = m_pPicProgrammerSettings->configNames( false ); + TQStringList programmerNames = m_pPicProgrammerSettings->configNames( false ); KComboBox * combo = m_picProgrammerConfigWidget->kcfg_PicProgrammerProgram; combo->clear(); combo->insertStringList( programmerNames ); combo->setSizeLimit( programmerNames.size() ); - QTimer::singleShot( 0, this, SLOT(slotUpdateWidgets()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateWidgets()) ); } diff --git a/src/gui/settingsdlg.h b/src/gui/settingsdlg.h index 1fbf966..41f5b55 100644 --- a/src/gui/settingsdlg.h +++ b/src/gui/settingsdlg.h @@ -12,7 +12,7 @@ #define SETTINGSDLG_H #include -#include +#include class AsmFormattingWidget; class GeneralOptionsWidget; @@ -29,8 +29,9 @@ class SDCCOptionsWidget; class SettingsDlg : public KConfigDialog { Q_OBJECT + TQ_OBJECT public: - SettingsDlg( QWidget *parent, const char *name, KConfigSkeleton *config ); + SettingsDlg( TQWidget *tqparent, const char *name, KConfigSkeleton *config ); ~SettingsDlg(); static int refreshRateToSliderValue( int refreshRate ); diff --git a/src/gui/symbolviewer.cpp b/src/gui/symbolviewer.cpp index 74d54e1..da4d6bd 100644 --- a/src/gui/symbolviewer.cpp +++ b/src/gui/symbolviewer.cpp @@ -18,8 +18,8 @@ #include #include #include -#include -#include +#include +#include #include @@ -39,8 +39,8 @@ SymbolViewerItem::SymbolViewerItem( SymbolViewer * symbolViewer, RegisterInfo * // setText( TYPE_COLUMN, RegisterInfo::toString( m_pRegisterInfo->type() ) ); radixChanged(); // force update of displayed string - connect( m_pRegisterInfo, SIGNAL(valueChanged(unsigned)), this, SLOT(valueChanged(unsigned)) ); - connect( m_pSymbolViewer, SIGNAL(valueRadixChanged(SymbolViewer::Radix)), this, SLOT(radixChanged()) ); + connect( m_pRegisterInfo, TQT_SIGNAL(valueChanged(unsigned)), this, TQT_SLOT(valueChanged(unsigned)) ); + connect( m_pSymbolViewer, TQT_SIGNAL(valueRadixChanged(SymbolViewer::Radix)), this, TQT_SLOT(radixChanged()) ); } @@ -61,25 +61,25 @@ void SymbolViewerItem::radixChanged() //BEGIN class SymbolView SymbolViewer * SymbolViewer::m_pSelf = 0l; -SymbolViewer * SymbolViewer::self( KateMDI::ToolView * parent ) +SymbolViewer * SymbolViewer::self( KateMDI::ToolView * tqparent ) { if (!m_pSelf) { - assert (parent); - m_pSelf = new SymbolViewer(parent); + assert (tqparent); + m_pSelf = new SymbolViewer(tqparent); } return m_pSelf; } -SymbolViewer::SymbolViewer( KateMDI::ToolView * parent ) - : QWidget( (QWidget*)parent ) +SymbolViewer::SymbolViewer( KateMDI::ToolView * tqparent ) + : TQWidget( (TQWidget*)tqparent ) { - QGridLayout * grid = new QGridLayout( this, 1, 1, 0, 6 ); + TQGridLayout * grid = new TQGridLayout( this, 1, 1, 0, 6 ); m_pSymbolList = new KListView(this); grid->addMultiCellWidget( m_pSymbolList, 0, 0, 0, 1 ); - grid->addWidget( new QLabel( i18n("Value radix:"), this ), 1, 0 ); + grid->addWidget( new TQLabel( i18n("Value radix:"), this ), 1, 0 ); m_pRadixCombo = new KComboBox( false, this ); grid->addWidget( m_pRadixCombo, 1, 1 ); @@ -89,7 +89,7 @@ SymbolViewer::SymbolViewer( KateMDI::ToolView * parent ) m_pRadixCombo->insertItem( i18n("Hexadecimal") ); m_valueRadix = Decimal; m_pRadixCombo->setCurrentItem(2); - connect( m_pRadixCombo, SIGNAL(activated(int)), this, SLOT(selectRadix(int)) ); + connect( m_pRadixCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(selectRadix(int)) ); m_pGpsim = 0l; m_pCurrentContext = 0l; @@ -108,7 +108,7 @@ SymbolViewer::~SymbolViewer() void SymbolViewer::saveProperties( KConfig * config ) { - QString oldGroup = config->group(); + TQString oldGroup = config->group(); config->setGroup( "SymbolEditor" ); config->writeEntry( "Radix", m_valueRadix ); @@ -119,7 +119,7 @@ void SymbolViewer::saveProperties( KConfig * config ) void SymbolViewer::readProperties( KConfig * config ) { - QString oldGroup = config->group(); + TQString oldGroup = config->group(); config->setGroup( "SymbolEditor" ); m_valueRadix = (SymbolViewer::Radix)config->readNumEntry( "Radix", Decimal ); @@ -156,7 +156,7 @@ void SymbolViewer::setContext( GpsimProcessor * gpsim ) if (!m_pCurrentContext) return; - connect( gpsim, SIGNAL(destroyed()), m_pSymbolList, SLOT(clear()) ); + connect( gpsim, TQT_SIGNAL(destroyed()), m_pSymbolList, TQT_SLOT(clear()) ); unsigned count = m_pCurrentContext->size(); for ( unsigned i = 0; i < count; ++i ) @@ -192,21 +192,21 @@ void SymbolViewer::selectRadix( int selectIndex ) } -QString SymbolViewer::toDisplayString( unsigned value ) const +TQString SymbolViewer::toDisplayString( unsigned value ) const { switch ( m_valueRadix ) { case Binary: - return QString::number( value, 2 ).rightJustify( 8, '0', false ); + return TQString::number( value, 2 ).rightJustify( 8, '0', false ); case Octal: - return "0" + QString::number( value, 8 ); + return "0" + TQString::number( value, 8 ); case Decimal: - return QString::number( value, 10 ); + return TQString::number( value, 10 ); case Hexadecimal: - return "0x" + QString::number( value, 16 ); + return "0x" + TQString::number( value, 16 ); } return "?"; diff --git a/src/gui/symbolviewer.h b/src/gui/symbolviewer.h index 9a09cb6..ed2fcee 100644 --- a/src/gui/symbolviewer.h +++ b/src/gui/symbolviewer.h @@ -15,7 +15,7 @@ #define SYMBOLVIEWER_H #include -#include +#include class KComboBox; class RegisterInfo; @@ -27,12 +27,13 @@ namespace KateMDI { class ToolView; } /** @author David Saxton */ -class SymbolViewer : public QWidget +class SymbolViewer : public TQWidget { Q_OBJECT + TQ_OBJECT public: - static SymbolViewer * self( KateMDI::ToolView * parent = 0l ); - static QString toolViewIdentifier() { return "SymbolViewer"; } + static SymbolViewer * self( KateMDI::ToolView * tqparent = 0l ); + static TQString toolViewIdentifier() { return "SymbolViewer"; } ~SymbolViewer(); enum Radix @@ -62,7 +63,7 @@ class SymbolViewer : public QWidget * Converts the value to a string for display according to the currently * selected radix. */ - QString toDisplayString( unsigned value ) const; + TQString toDisplayString( unsigned value ) const; signals: void valueRadixChanged( SymbolViewer::Radix newRadix ); @@ -71,21 +72,22 @@ class SymbolViewer : public QWidget void selectRadix( int selectIndex ); protected: - QGuardedPtr m_pGpsim; + TQGuardedPtr m_pGpsim; RegisterSet * m_pCurrentContext; KListView * m_pSymbolList; Radix m_valueRadix; private: - SymbolViewer( KateMDI::ToolView * parent ); + SymbolViewer( KateMDI::ToolView * tqparent ); static SymbolViewer * m_pSelf; KComboBox * m_pRadixCombo; }; -class SymbolViewerItem : public QObject, public KListViewItem +class SymbolViewerItem : public TQObject, public KListViewItem { Q_OBJECT + TQ_OBJECT public: SymbolViewerItem( SymbolViewer * symbolViewer, RegisterInfo * registerInfo ); -- cgit v1.2.1