From dc6b8e72fed2586239e3514819238c520636c9d9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:54:04 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/components/csseditor/colorrequester.cpp | 38 ++-- quanta/components/csseditor/colorrequester.h | 14 +- quanta/components/csseditor/colorslider.cpp | 42 ++-- quanta/components/csseditor/colorslider.h | 14 +- quanta/components/csseditor/csseditor.cpp | 164 +++++++-------- quanta/components/csseditor/csseditor.h | 60 +++--- quanta/components/csseditor/csseditor_globals.cpp | 20 +- quanta/components/csseditor/csseditor_globals.h | 22 +- quanta/components/csseditor/cssselector.cpp | 190 ++++++++--------- quanta/components/csseditor/cssselector.h | 36 ++-- .../components/csseditor/cssshpropertyparser.cpp | 40 ++-- quanta/components/csseditor/cssshpropertyparser.h | 18 +- quanta/components/csseditor/doubleeditors.cpp | 46 ++--- quanta/components/csseditor/doubleeditors.h | 26 +-- quanta/components/csseditor/encodingselector.cpp | 8 +- quanta/components/csseditor/encodingselector.h | 6 +- quanta/components/csseditor/fontfamilychooser.cpp | 100 ++++----- quanta/components/csseditor/fontfamilychooser.h | 20 +- quanta/components/csseditor/minieditor.h | 4 +- quanta/components/csseditor/percentageeditor.cpp | 8 +- quanta/components/csseditor/percentageeditor.h | 12 +- quanta/components/csseditor/propertysetter.cpp | 44 ++-- quanta/components/csseditor/propertysetter.h | 20 +- quanta/components/csseditor/qmyhighlighter.cpp | 16 +- quanta/components/csseditor/qmyhighlighter.h | 8 +- quanta/components/csseditor/shorthandformer.cpp | 178 ++++++++-------- quanta/components/csseditor/shorthandformer.h | 70 +++---- quanta/components/csseditor/specialsb.cpp | 38 ++-- quanta/components/csseditor/specialsb.h | 28 +-- quanta/components/csseditor/styleeditor.cpp | 26 +-- quanta/components/csseditor/styleeditor.h | 4 +- quanta/components/csseditor/stylesheetparser.cpp | 36 ++-- quanta/components/csseditor/stylesheetparser.h | 18 +- quanta/components/csseditor/tlpeditors.cpp | 66 +++--- quanta/components/csseditor/tlpeditors.h | 34 +-- quanta/components/cvsservice/cvsservice.cpp | 146 ++++++------- quanta/components/cvsservice/cvsservice.h | 44 ++-- quanta/components/cvsservice/cvsservicedcopif.h | 4 +- quanta/components/debugger/backtracelistview.cpp | 16 +- quanta/components/debugger/backtracelistview.h | 24 +-- .../debugger/conditionalbreakpointdialog.cpp | 22 +- .../debugger/conditionalbreakpointdialog.h | 10 +- quanta/components/debugger/dbgp/dbgpnetwork.cpp | 42 ++-- quanta/components/debugger/dbgp/dbgpnetwork.h | 12 +- quanta/components/debugger/dbgp/dbgpsettings.cpp | 8 +- quanta/components/debugger/dbgp/dbgpsettings.h | 2 +- quanta/components/debugger/dbgp/qbytearrayfifo.cpp | 8 +- quanta/components/debugger/dbgp/qbytearrayfifo.h | 10 +- .../debugger/dbgp/quantadebuggerdbgp.cpp | 136 ++++++------ .../components/debugger/dbgp/quantadebuggerdbgp.h | 70 +++---- quanta/components/debugger/debuggerbreakpoint.cpp | 30 +-- quanta/components/debugger/debuggerbreakpoint.h | 44 ++-- .../components/debugger/debuggerbreakpointlist.cpp | 8 +- .../components/debugger/debuggerbreakpointlist.h | 18 +- .../components/debugger/debuggerbreakpointview.cpp | 24 +-- .../components/debugger/debuggerbreakpointview.h | 12 +- quanta/components/debugger/debuggermanager.cpp | 142 ++++++------- quanta/components/debugger/debuggermanager.h | 30 +-- quanta/components/debugger/debuggerui.cpp | 16 +- quanta/components/debugger/debuggerui.h | 10 +- quanta/components/debugger/debuggervariable.cpp | 24 +-- quanta/components/debugger/debuggervariable.h | 32 +-- quanta/components/debugger/gubed/gubedsettings.cpp | 4 +- quanta/components/debugger/gubed/gubedsettings.h | 2 +- .../debugger/gubed/quantadebuggergubed.cpp | 132 ++++++------ .../debugger/gubed/quantadebuggergubed.h | 58 +++--- .../debugger/interfaces/debuggerclient.cpp | 14 +- .../debugger/interfaces/debuggerclient.h | 20 +- .../debugger/interfaces/debuggerinterface.cpp | 4 +- .../debugger/interfaces/debuggerinterface.h | 30 +-- quanta/components/debugger/pathmapper.cpp | 56 ++--- quanta/components/debugger/pathmapper.h | 30 +-- quanta/components/debugger/pathmapperdialog.cpp | 24 +-- quanta/components/debugger/pathmapperdialog.h | 10 +- .../debugger/quantadebuggerinterface.cpp | 28 +-- .../components/debugger/quantadebuggerinterface.h | 30 +-- quanta/components/debugger/variableslistview.cpp | 34 +-- quanta/components/debugger/variableslistview.h | 10 +- quanta/components/framewizard/areaattributedb.h | 24 +-- quanta/components/framewizard/fmfpeditor.cpp | 36 ++-- quanta/components/framewizard/fmfpeditor.h | 10 +- quanta/components/framewizard/fmrceditor.cpp | 6 +- quanta/components/framewizard/fmrceditor.h | 2 +- quanta/components/framewizard/framewizard.cpp | 28 +-- quanta/components/framewizard/framewizard.h | 14 +- quanta/components/framewizard/selectablearea.cpp | 22 +- quanta/components/framewizard/selectablearea.h | 20 +- quanta/components/framewizard/treenode.cpp | 38 ++-- quanta/components/framewizard/treenode.h | 40 ++-- .../components/framewizard/visualframeeditor.cpp | 134 ++++++------ quanta/components/framewizard/visualframeeditor.h | 36 ++-- quanta/components/tableeditor/tableeditor.cpp | 230 ++++++++++----------- quanta/components/tableeditor/tableeditor.h | 54 ++--- quanta/components/tableeditor/tableitem.cpp | 46 ++--- quanta/components/tableeditor/tableitem.h | 20 +- 95 files changed, 1832 insertions(+), 1832 deletions(-) (limited to 'quanta/components') diff --git a/quanta/components/csseditor/colorrequester.cpp b/quanta/components/csseditor/colorrequester.cpp index 1333a48e..d2164b06 100644 --- a/quanta/components/csseditor/colorrequester.cpp +++ b/quanta/components/csseditor/colorrequester.cpp @@ -18,8 +18,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -30,11 +30,11 @@ class colorRequester::colorRequesterPrivate{ public: KLineEdit *edit; colorRequesterPrivate() { edit = 0L; } - void setText( const QString& text ) { edit->setText( text ); } - void connectSignals( QObject *receiver ) { connect( edit, SIGNAL( textChanged( const QString& )),receiver, SIGNAL( textChanged( const QString& ))); } + void setText( const TQString& text ) { edit->setText( text ); } + void connectSignals( TQObject *receiver ) { connect( edit, TQT_SIGNAL( textChanged( const TQString& )),receiver, TQT_SIGNAL( textChanged( const TQString& ))); } }; -colorRequester::colorRequester(QWidget *parent, const char* name) : miniEditor(parent,name){ +colorRequester::colorRequester(TQWidget *parent, const char* name) : miniEditor(parent,name){ d = new colorRequesterPrivate; init(); } @@ -45,7 +45,7 @@ colorRequester::~colorRequester(){ } void colorRequester::connectToPropertySetter(propertySetter* p){ - connect( this, SIGNAL(textChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect( this, TQT_SIGNAL(textChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } void colorRequester::init() @@ -56,31 +56,31 @@ void colorRequester::init() d->edit = new KLineEdit( this, "line edit" ); myButton = new KPushButton( this, "kfile button"); - QIconSet iconSet = SmallIconSet(QString::fromLatin1("colorize")); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("colorize")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); myButton->setIconSet( iconSet ); myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - QToolTip::add(myButton, i18n("Open color dialog")); + TQToolTip::add(myButton, i18n("Open color dialog")); setSpacing( KDialog::spacingHint() ); - QWidget *widget = (QWidget*) d->edit; + TQWidget *widget = (TQWidget*) d->edit; setFocusProxy( widget ); d->connectSignals( this ); - connect( myButton, SIGNAL( clicked() ), this, SLOT( openColorDialog() )); - connect( d->edit, SIGNAL( textChanged ( const QString & ) ), this, SLOT( setInitialValue(/*const QString&*/ ) )); + connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( openColorDialog() )); + connect( d->edit, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( setInitialValue(/*const TQString&*/ ) )); KAccel *accel = new KAccel( this ); - accel->insert( KStdAccel::Open, this, SLOT( openColorDialog() )); + accel->insert( KStdAccel::Open, this, TQT_SLOT( openColorDialog() )); accel->readSettings(); } void colorRequester::openColorDialog(){ KColorDialog dlg(this,"dlg",true); - dlg.setColor(QColor(m_initialValue)); + dlg.setColor(TQColor(m_initialValue)); if(dlg.exec()){ - QColor myColor(dlg.color()); + TQColor myColor(dlg.color()); d->edit->setText(myColor.name()); emit textChanged(myColor.name()); } @@ -90,13 +90,13 @@ KLineEdit * colorRequester::lineEdit() const{ return d->edit; } #include -void colorRequester::setInitialValue(/*const QString& s*/){ - QString temp = d->edit->text(); +void colorRequester::setInitialValue(/*const TQString& s*/){ + TQString temp = d->edit->text(); temp.remove(" "); if( temp.contains("#") != 0){ temp.remove("#"); if(temp.length() == 3) { - QString temp2; + TQString temp2; temp2.append(temp[0]); temp2.append(temp[0]); temp2.append(temp[1]); @@ -115,7 +115,7 @@ void colorRequester::setInitialValue(/*const QString& s*/){ if( temp.contains("rgb(") != 0){ temp.remove("rgb(").remove(")"); - QStringList rgbValues = QStringList::split(",",temp); + TQStringList rgbValues = TQStringList::split(",",temp); // bool ok; int r = rgbValues[0].toInt(); int g = rgbValues[1].toInt(); diff --git a/quanta/components/csseditor/colorrequester.h b/quanta/components/csseditor/colorrequester.h index e0b4be4f..baf95d86 100644 --- a/quanta/components/csseditor/colorrequester.h +++ b/quanta/components/csseditor/colorrequester.h @@ -17,7 +17,7 @@ #define COLORREQUESTER_H #include -#include +#include #include "minieditor.h" @@ -26,25 +26,25 @@ class KColorDialog; class colorRequester : public miniEditor{ Q_OBJECT public: - colorRequester(QWidget *parent, const char* name=0); + colorRequester(TQWidget *parent, const char* name=0); ~colorRequester(); KLineEdit * lineEdit() const; KPushButton * button() const { return myButton; } virtual void connectToPropertySetter(propertySetter* p); - //void setInitialValue(const QString&); + //void setInitialValue(const TQString&); public slots: void openColorDialog(); - void setInitialValue(/*const QString&*/); + void setInitialValue(/*const TQString&*/); protected: void init(); signals: - void selectedColor(QColor); - void textChanged(const QString&); + void selectedColor(TQColor); + void textChanged(const TQString&); private: mutable KColorDialog * myColorDialog; KPushButton *myButton; class colorRequesterPrivate; colorRequesterPrivate *d; - QColor m_initialValue; + TQColor m_initialValue; }; #endif diff --git a/quanta/components/csseditor/colorslider.cpp b/quanta/components/csseditor/colorslider.cpp index 436c7e21..98019f23 100644 --- a/quanta/components/csseditor/colorslider.cpp +++ b/quanta/components/csseditor/colorslider.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include @@ -29,27 +29,27 @@ -colorSlider::colorSlider(const QString& fn,const QString& l,const QString& c,const QString& r,QWidget *parent, const char *name) : miniEditor(parent,name) { +colorSlider::colorSlider(const TQString& fn,const TQString& l,const TQString& c,const TQString& r,TQWidget *parent, const char *name) : miniEditor(parent,name) { m_functionName = fn; - QVBox *leftBox = new QVBox(this); - QVBox *centerBox = new QVBox(this); - QVBox *rightBox = new QVBox(this); - QLabel *leftLabel = new QLabel("" + l +"",leftBox); - QLabel *centerLabel = new QLabel(("" + c +""),centerBox); - QLabel *rightLabel = new QLabel(("" + r +""),rightBox); + TQVBox *leftBox = new TQVBox(this); + TQVBox *centerBox = new TQVBox(this); + TQVBox *rightBox = new TQVBox(this); + TQLabel *leftLabel = new TQLabel("" + l +"",leftBox); + TQLabel *centerLabel = new TQLabel(("" + c +""),centerBox); + TQLabel *rightLabel = new TQLabel(("" + r +""),rightBox); leftLabel->setAlignment(Qt::AlignHCenter); centerLabel->setAlignment(Qt::AlignHCenter); rightLabel->setAlignment(Qt::AlignHCenter); leftLabel->setTextFormat (Qt::RichText ) ; centerLabel->setTextFormat ( Qt::RichText ) ; rightLabel->setTextFormat (Qt::RichText ) ; - m_leftValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox); - m_centerValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox); - m_rightValue = new QSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox); + m_leftValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , leftBox); + m_centerValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , centerBox); + m_rightValue = new TQSlider ( 0, 255, 1, 0, Qt::Horizontal , rightBox); setSpacing(10); - connect(m_leftValue, SIGNAL(valueChanged ( int)), this, SLOT(convertLeftValue(int))); - connect(m_centerValue, SIGNAL(valueChanged ( int)), this, SLOT(convertCenterValue(int))); - connect(m_rightValue, SIGNAL(valueChanged ( int)), this, SLOT(convertRightValue(int))); + connect(m_leftValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertLeftValue(int))); + connect(m_centerValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertCenterValue(int))); + connect(m_rightValue, TQT_SIGNAL(valueChanged ( int)), this, TQT_SLOT(convertRightValue(int))); } colorSlider::~colorSlider(){ @@ -59,26 +59,26 @@ colorSlider::~colorSlider(){ } void colorSlider::connectToPropertySetter(propertySetter* p){ - connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect( this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } void colorSlider::convertLeftValue(int i){ - emit valueChanged(m_functionName + "(" + QString::number(i,10) + "," + QString::number(m_centerValue->value(),10) + "," +QString::number(m_rightValue->value(),10) +")"); + emit valueChanged(m_functionName + "(" + TQString::number(i,10) + "," + TQString::number(m_centerValue->value(),10) + "," +TQString::number(m_rightValue->value(),10) +")"); } void colorSlider::convertCenterValue(int i){ - emit valueChanged(m_functionName + "(" + QString::number(m_leftValue->value(),10) + "," + QString::number(i,10) + "," + QString::number(m_rightValue->value(),10) +")"); + emit valueChanged(m_functionName + "(" + TQString::number(m_leftValue->value(),10) + "," + TQString::number(i,10) + "," + TQString::number(m_rightValue->value(),10) +")"); } void colorSlider::convertRightValue(int i){ - emit valueChanged(m_functionName + "(" + QString::number(m_leftValue->value(),10) + "," + QString::number(m_centerValue->value(),10) + "," + QString::number(i,10) +")"); + emit valueChanged(m_functionName + "(" + TQString::number(m_leftValue->value(),10) + "," + TQString::number(m_centerValue->value(),10) + "," + TQString::number(i,10) +")"); } -RGBcolorSlider::RGBcolorSlider(QWidget *parent, const char *name) : colorSlider("rgb",i18n("Red"),i18n("Green"),i18n("Blue"),parent,name){ +RGBcolorSlider::RGBcolorSlider(TQWidget *parent, const char *name) : colorSlider("rgb",i18n("Red"),i18n("Green"),i18n("Blue"),parent,name){ } //FOR CSS3 -/*HSLcolorSlider::HSLcolorSlider(QWidget *parent, const char *name) : colorSlider("hsl",i18n("Hue"),i18n("Saturation"),i18n("Lightness"),parent,name){ +/*HSLcolorSlider::HSLcolorSlider(TQWidget *parent, const char *name) : colorSlider("hsl",i18n("Hue"),i18n("Saturation"),i18n("Lightness"),parent,name){ } */ diff --git a/quanta/components/csseditor/colorslider.h b/quanta/components/csseditor/colorslider.h index 41a78fa9..d2e0b11b 100644 --- a/quanta/components/csseditor/colorslider.h +++ b/quanta/components/csseditor/colorslider.h @@ -18,7 +18,7 @@ #ifndef COLORSLIDER_H #define COLORSLIDER_H -#include +#include #include "minieditor.h" @@ -31,13 +31,13 @@ class colorSlider : public miniEditor { Q_OBJECT private : - QString m_functionName; + TQString m_functionName; protected: - QSlider *m_leftValue, + TQSlider *m_leftValue, *m_centerValue, *m_rightValue; public: - colorSlider(const QString& functionName,const QString& l=QString::null,const QString& c=QString::null,const QString& r=QString::null,QWidget *parent=0, const char *name=0); + colorSlider(const TQString& functionName,const TQString& l=TQString::null,const TQString& c=TQString::null,const TQString& r=TQString::null,TQWidget *parent=0, const char *name=0); virtual ~colorSlider(); virtual void connectToPropertySetter(propertySetter* p); @@ -47,13 +47,13 @@ class colorSlider : public miniEditor { void convertRightValue(int i); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class RGBcolorSlider : public colorSlider { Q_OBJECT public: - RGBcolorSlider(QWidget *parent=0, const char *name=0); + RGBcolorSlider(TQWidget *parent=0, const char *name=0); ~RGBcolorSlider(){} }; @@ -61,7 +61,7 @@ class RGBcolorSlider : public colorSlider { /*class HSLcolorSlider : public colorSlider { Q_OBJECT public: - HSLcolorSlider(QWidget *parent=0, const char *name=0); + HSLcolorSlider(TQWidget *parent=0, const char *name=0); ~HSLcolorSlider(); };*/ diff --git a/quanta/components/csseditor/csseditor.cpp b/quanta/components/csseditor/csseditor.cpp index 692a8edf..553d5478 100644 --- a/quanta/components/csseditor/csseditor.cpp +++ b/quanta/components/csseditor/csseditor.cpp @@ -16,13 +16,13 @@ ***************************************************************************/ #include "csseditor.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -47,11 +47,11 @@ -myCheckListItem::myCheckListItem(QListView * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){ +myCheckListItem::myCheckListItem(TQListView * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){ m_sig = new QSignal; } -myCheckListItem::myCheckListItem(QCheckListItem * parent, const QString & text):QCheckListItem(parent, text, QCheckListItem::CheckBox),m_checkedChildren(0){ +myCheckListItem::myCheckListItem(TQCheckListItem * parent, const TQString & text):TQCheckListItem(parent, text, TQCheckListItem::CheckBox),m_checkedChildren(0){ m_sig = new QSignal; } @@ -59,12 +59,12 @@ myCheckListItem::~myCheckListItem(){ delete m_sig; } -void myCheckListItem::connect( QObject *receiver, const char *member ){ +void myCheckListItem::connect( TQObject *receiver, const char *member ){ m_sig->connect( receiver, member ); } void myCheckListItem::activate(){ - if(isOn()) QCheckListItem::activate(); + if(isOn()) TQCheckListItem::activate(); } void myCheckListItem::addCheckedChild() { @@ -75,9 +75,9 @@ void myCheckListItem::stateChange (bool b){ if(!b) { if(childCount()) { - QListViewItem * child = firstChild(); + TQListViewItem * child = firstChild(); while( child ) { - m_sig->setValue(QVariant(child->text(0))); + m_sig->setValue(TQVariant(child->text(0))); m_sig->activate(); static_cast(child)->setOn(false); child = child->nextSibling(); @@ -90,12 +90,12 @@ void myCheckListItem::stateChange (bool b){ while( p ) { if( p->m_checkedChildren != 1) { p->m_checkedChildren--; - m_sig->setValue(QVariant(text(0))); + m_sig->setValue(TQVariant(text(0))); m_sig->activate(); break; } else { - m_sig->setValue(QVariant(text(0))); + m_sig->setValue(TQVariant(text(0))); m_sig->activate(); p->setOn(false); } @@ -103,7 +103,7 @@ void myCheckListItem::stateChange (bool b){ } } else { - m_sig->setValue(QVariant(text(0))); + m_sig->setValue(TQVariant(text(0))); m_sig->activate(); } } @@ -113,29 +113,29 @@ void myCheckListItem::stateChange (bool b){ } } -void CSSEditor::appendSub(QDomNodeList l, myCheckListItem *cli){ +void CSSEditor::appendSub(TQDomNodeList l, myCheckListItem *cli){ unsigned int i; for(i=0;iconnect(this,SLOT(removeProperty(const QVariant&))); + item->connect(this,TQT_SLOT(removeProperty(const TQVariant&))); if(l.item(i).toElement().attribute("hasSub") == "yes") appendSub(l.item(i).childNodes(),item); } } -void CSSEditor::buildListView(QDomNodeList l, QListView *lv){ +void CSSEditor::buildListView(TQDomNodeList l, TQListView *lv){ unsigned int i; for(i=0;iconnect(this,SLOT(removeProperty(const QVariant&))); + item->connect(this,TQT_SLOT(removeProperty(const TQVariant&))); if(l.item(i).toElement().attribute("hasSub") == "yes") { - QDomNodeList listSub = l.item(i).childNodes(); + TQDomNodeList listSub = l.item(i).childNodes(); appendSub(listSub,item); } } } -void CSSEditor::setCurrentPropOn(const QString& s){ +void CSSEditor::setCurrentPropOn(const TQString& s){ if( (m_currentProp = static_cast(lvVisual->findItem( s,0 )) )) m_currentProp->setOn(true); else @@ -161,12 +161,12 @@ void CSSEditor::setCurrentPropOn(const QString& s){ } - void CSSEditor::addAndSetPropertyOn(const QString& property, const QString& value){ + void CSSEditor::addAndSetPropertyOn(const TQString& property, const TQString& value){ addProperty(property,value); setCurrentPropOn(property); } - void CSSEditor::setSidesOfPropertyBorderOn(const QString& s){ + void CSSEditor::setSidesOfPropertyBorderOn(const TQString& s){ static_cast(lvVisual->findItem( "border-top",0 ))->setOn(true); static_cast(lvVisual->findItem( "border-right",0 ))->setOn(true); static_cast(lvVisual->findItem( "border-bottom",0 ))->setOn(true); @@ -184,20 +184,20 @@ void CSSEditor::hidePreviewer(){ void CSSEditor::initialize(){ m_config = kapp->config(); - connect(pbOk, SIGNAL(clicked()), this, SLOT(toggleShortendForm())); + connect(pbOk, TQT_SIGNAL(clicked()), this, TQT_SLOT(toggleShortendForm())); m_config->setGroup("CSSEditor Options"); SHckb->setChecked(m_config->readBoolEntry("Shorthand form enabled",false)); - QString configFile = locate("appdata", "csseditor/config.xml"); + TQString configFile = locate("appdata", "csseditor/config.xml"); m_myhi = new QMyHighlighter(display); - QBoxLayout *fPreviewLayout = new QBoxLayout(fPreview,QBoxLayout::LeftToRight); + TQBoxLayout *fPreviewLayout = new TQBoxLayout(fPreview,TQBoxLayout::LeftToRight); m_previewer=new KHTMLPart(fPreview); fPreviewLayout->addWidget(m_previewer->view()); - QFile file( configFile ); + TQFile file( configFile ); if ( !file.open( IO_ReadOnly ) ) { return; } @@ -207,11 +207,11 @@ void CSSEditor::initialize(){ } file.close(); - QDomElement docElem = m_doc.documentElement(); + TQDomElement docElem = m_doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.isNull() ) { if( e.attribute("type") == "visual") { lvVisual->setRootIsDecorated(true); @@ -239,32 +239,32 @@ void CSSEditor::initialize(){ Connect(); - QBoxLayout *fEditingLayout = new QBoxLayout(fEditing,QBoxLayout::LeftToRight); + TQBoxLayout *fEditingLayout = new TQBoxLayout(fEditing,TQBoxLayout::LeftToRight); m_ps = new propertySetter(fEditing); fEditingLayout->addWidget(m_ps); - connect(m_ps, SIGNAL(valueChanged(const QString&)), this, SLOT(checkProperty(const QString&))); + connect(m_ps, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(checkProperty(const TQString&))); - QStringList props; - QString temp; + TQStringList props; + TQString temp; bool normalMode = true; if( !m_selectorName.isEmpty() ){ //the cssselector has been called m_initialProperties = m_initialProperties.stripWhiteSpace(); - props=QStringList::split(";",m_initialProperties); + props=TQStringList::split(";",m_initialProperties); temp= m_selectorName + " {\n\t" ; } else { m_InlineStyleContent = m_InlineStyleContent.stripWhiteSpace(); normalMode = false; - props=QStringList::split(";",m_InlineStyleContent); + props=TQStringList::split(";",m_InlineStyleContent); temp="\n\t"; } - for ( QStringList::Iterator it = props.begin(); it != props.end(); ++it ) { - const QString propertyName((*it).section(":",0,0).stripWhiteSpace()); - const QString propertyValue((*it).section(":",1)); + for ( TQStringList::Iterator it = props.begin(); it != props.end(); ++it ) { + const TQString propertyName((*it).section(":",0,0).stripWhiteSpace()); + const TQString propertyValue((*it).section(":",1)); if( ShorthandFormer::SHFormList().contains(propertyName)==0 ) { temp+= propertyName + " : " + propertyValue +";\n\t"; @@ -272,8 +272,8 @@ void CSSEditor::initialize(){ } else{ ShorthandFormer decompressor; - QMap expandedProperties = decompressor.expand(propertyName, propertyValue ); - QMap::Iterator it; + TQMap expandedProperties = decompressor.expand(propertyName, propertyValue ); + TQMap::Iterator it; for ( it = expandedProperties.begin(); it != expandedProperties.end(); ++it ) { addAndSetPropertyOn( it.key(), it.data() ); @@ -296,7 +296,7 @@ void CSSEditor::toggleShortendForm() m_config->sync(); } -CSSEditor::CSSEditor(QListViewItem *i, QWidget *parent, const char *name) : CSSEditorS(parent, name){ +CSSEditor::CSSEditor(TQListViewItem *i, TQWidget *parent, const char *name) : CSSEditorS(parent, name){ m_selectorName = i->text(0); m_initialProperties = i->text(1); } @@ -307,21 +307,21 @@ CSSEditor::~CSSEditor() { delete m_previewer; } -void CSSEditor::setMiniEditors(QListViewItem* i){ +void CSSEditor::setMiniEditors(TQListViewItem* i){ m_ps->reset(); if(i->childCount()==0) { m_currentProp = static_cast(i); - QDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes(); + TQDomNodeList valueTypes = m_doc.elementsByTagName(i->text(0)).item(0).childNodes(); unsigned int i; for(i=0; isetComboBox(); - QStringList values = QStringList::split(",",curr.attribute("value")); + TQStringList values = TQStringList::split(",",curr.attribute("value")); m_ps->ComboBox()->insertStringList(values); if(m_properties.contains(m_currentProp->text(0)) !=0 ) if( values.contains(m_currentProp->text(0))) @@ -362,7 +362,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -381,13 +381,13 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ doubleLengthEditor *editor = new doubleLengthEditor(m_ps); if(m_properties.contains(m_currentProp->text(0)) !=0 ){ - QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), + TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), sx(temp.section(" ",0,0)), dx(temp.section(" ",1,1)); editor->setInitialValue(sx,dx); } - else editor->setInitialValue(QString::null,QString::null); + else editor->setInitialValue(TQString::null,TQString::null); m_ps->installMiniEditor(editor); } else @@ -395,13 +395,13 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ doublePercentageEditor *editor = new doublePercentageEditor(m_ps); if(m_properties.contains(m_currentProp->text(0)) !=0 ){ - QString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), + TQString temp(m_properties[m_currentProp->text(0)].simplifyWhiteSpace()), sx(temp.section(" ",0,0)), dx(temp.section(" ",1,1)); editor->setInitialValue(sx,dx); } - else editor->setInitialValue(QString::null,QString::null); + else editor->setInitialValue(TQString::null,TQString::null); m_ps->installMiniEditor(editor); } else @@ -410,7 +410,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -419,7 +419,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -428,7 +428,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ) editor->setInitialValue(m_properties[m_currentProp->text(0)]); else - editor->setInitialValue(QString::null); + editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } else @@ -467,8 +467,8 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ else if( valueTypeName =="doubleList") { doubleComboBoxEditor *editor = new doubleComboBoxEditor(m_ps); - editor->cbSx()->insertStringList(QStringList::split(",",curr.firstChild().toElement().attribute("value"))); - editor->cbDx()->insertStringList(QStringList::split(",",curr.lastChild().toElement().attribute("value"))); + editor->cbSx()->insertStringList(TQStringList::split(",",curr.firstChild().toElement().attribute("value"))); + editor->cbDx()->insertStringList(TQStringList::split(",",curr.lastChild().toElement().attribute("value"))); m_ps->installMiniEditor(editor); } else @@ -477,7 +477,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ if(m_properties.contains(m_currentProp->text(0)) !=0 ){ editor->setInitialValue(m_properties[m_currentProp->text(0)]); } - else editor->setInitialValue(QString::null); + else editor->setInitialValue(TQString::null); m_ps->installMiniEditor(editor); } } @@ -486,7 +486,7 @@ void CSSEditor::setMiniEditors(QListViewItem* i){ } } -void CSSEditor::checkProperty(const QString& v){ +void CSSEditor::checkProperty(const TQString& v){ if(!m_currentProp->isOn()) m_currentProp->setOn(true); @@ -500,7 +500,7 @@ void CSSEditor::checkProperty(const QString& v){ if(m_currentProp->text(0) =="border-style" ){ setSidesOfPropertyBorderOn("style"); - QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + TQStringList values = TQStringList::split(" ",v.stripWhiteSpace()); addProperty("border-top-style",values[0]); switch(values.count()) { case 1: @@ -530,7 +530,7 @@ void CSSEditor::checkProperty(const QString& v){ else if(m_currentProp->text(0) =="border-width" ){ setSidesOfPropertyBorderOn("width"); - QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + TQStringList values = TQStringList::split(" ",v.stripWhiteSpace()); addProperty("border-top-width",values[0]); switch(values.count()) { case 1: @@ -560,7 +560,7 @@ void CSSEditor::checkProperty(const QString& v){ else if(m_currentProp->text(0) =="border-color" ){ setSidesOfPropertyBorderOn("color"); - QStringList values = QStringList::split(" ",v.stripWhiteSpace()); + TQStringList values = TQStringList::split(" ",v.stripWhiteSpace()); addProperty("border-top-color",values[0]); switch(values.count()) { case 1: @@ -592,22 +592,22 @@ void CSSEditor::checkProperty(const QString& v){ } void CSSEditor::Connect(){ - connect(this, SIGNAL(signalUpdatePreview()), this, SLOT(updatePreview())); - connect(lvVisual,SIGNAL(selectionChanged ( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); - connect(lvAll,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); - connect(lvAural,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); - connect(lvInteractive,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); - connect(lvPaged,SIGNAL( selectionChanged( QListViewItem * )),this,SLOT(setMiniEditors ( QListViewItem * ))); + connect(this, TQT_SIGNAL(signalUpdatePreview()), this, TQT_SLOT(updatePreview())); + connect(lvVisual,TQT_SIGNAL(selectionChanged ( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvAll,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvAural,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvInteractive,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); + connect(lvPaged,TQT_SIGNAL( selectionChanged( TQListViewItem * )),this,TQT_SLOT(setMiniEditors ( TQListViewItem * ))); } -void CSSEditor::removeProperty(const QVariant& v){ +void CSSEditor::removeProperty(const TQVariant& v){ m_properties.remove(v.toString()); updatePreview(); } -QString CSSEditor::generateProperties(){ - QString props; - QMap::Iterator it; +TQString CSSEditor::generateProperties(){ + TQString props; + TQMap::Iterator it; if(!SHckb->isChecked()) { for ( it = m_properties.begin(); it != m_properties.end(); ++it ) props+= it.key() + " : " + it.data().stripWhiteSpace() + "; " ; @@ -628,7 +628,7 @@ void CSSEditor::updatePreview(){ void CSSEditor::activatePreview() { if(!m_isFileToPreviewExternal){ - QString testHeader, + TQString testHeader, testFooter, testBody; @@ -641,7 +641,7 @@ void CSSEditor::activatePreview() { testFooter = "\"" ; } - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) testBody+= it.key() + " : " + it.data() + ";"; @@ -652,22 +652,22 @@ void CSSEditor::activatePreview() { } else { - QString tmp("{"); - QFile file(m_fileToPreview); + TQString tmp("{"); + TQFile file(m_fileToPreview); if ( file.open( IO_ReadOnly ) ) { - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) tmp+= it.key() + " : " + it.data() + ";"; - QFileInfo fi(m_fileToPreview); + TQFileInfo fi(m_fileToPreview); KParts::URLArgs a; if(fi.extension().lower() == "xml" || fi.extension().lower() == "xhtml") a.serviceType="text/xml"; if(fi.extension().lower() == "html" || fi.extension().lower() == "html") a.serviceType="text/xml"; m_previewer->browserExtension()->setURLArgs(a); - QTextStream stream( &file ); + TQTextStream stream( &file ); m_previewer->begin(KURL(m_fileToPreview)); m_previewer->write(stream.read()); @@ -680,8 +680,8 @@ void CSSEditor::activatePreview() { } void CSSEditor::updateDisplay(){ - QString toDisplay; - QMap::Iterator it; + TQString toDisplay; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) toDisplay += it.key() + " : " + it.data() + ";\n\t"; diff --git a/quanta/components/csseditor/csseditor.h b/quanta/components/csseditor/csseditor.h index 6994a686..3bb44228 100644 --- a/quanta/components/csseditor/csseditor.h +++ b/quanta/components/csseditor/csseditor.h @@ -18,12 +18,12 @@ #ifndef CSSEDITOR_H #define CSSEDITOR_H -#include +#include #include "csseditors.h" -#include -#include -#include -#include +#include +#include +#include +#include class propertySetter; class KConfig; @@ -37,14 +37,14 @@ class QMyHighlighter; class myCheckListItem : public QCheckListItem { private: - QSignal *m_sig; + TQSignal *m_sig; unsigned int m_checkedChildren; public : - myCheckListItem(QCheckListItem * parent, const QString & text); - myCheckListItem(QListView * parent, const QString & text); + myCheckListItem(TQCheckListItem * parent, const TQString & text); + myCheckListItem(TQListView * parent, const TQString & text); ~myCheckListItem(); - void connect( QObject *receiver, const char *member ); + void connect( TQObject *receiver, const char *member ); void addCheckedChild(); protected : @@ -61,9 +61,9 @@ class CSSEditor : public CSSEditorS propertySetter *m_ps; myCheckListItem *m_currentProp; KHTMLPart *m_previewer; - QDomDocument m_doc; - QMap m_properties; - QString m_selectorName, + TQDomDocument m_doc; + TQMap m_properties; + TQString m_selectorName, m_initialProperties, m_Selectors, m_Header, @@ -79,36 +79,36 @@ class CSSEditor : public CSSEditorS //sourceFileName; void Connect(); - void appendSub(QDomNodeList, myCheckListItem *); - void buildListView(QDomNodeList, QListView *); + void appendSub(TQDomNodeList, myCheckListItem *); + void buildListView(TQDomNodeList, TQListView *); void updateDisplay(); void activatePreview(); - void setCurrentPropOn(const QString& s); - void addProperty(const QString& property, const QString& value) { m_properties[property] = value; } - void addAndSetPropertyOn(const QString& property, const QString& value); - void setSidesOfPropertyBorderOn(const QString& s); + void setCurrentPropOn(const TQString& s); + void addProperty(const TQString& property, const TQString& value) { m_properties[property] = value; } + void addAndSetPropertyOn(const TQString& property, const TQString& value); + void setSidesOfPropertyBorderOn(const TQString& s); private slots: - void checkProperty(const QString&); - void removeProperty(const QVariant&); + void checkProperty(const TQString&); + void removeProperty(const TQVariant&); void updatePreview(); - void setMiniEditors(QListViewItem*); + void setMiniEditors(TQListViewItem*); void toggleShortendForm(); public: - CSSEditor(QWidget* parent=0, const char *name=0): CSSEditorS(parent, name), m_config(0L){} - CSSEditor( QListViewItem * i, QWidget* parent=0, const char *name=0); + CSSEditor(TQWidget* parent=0, const char *name=0): CSSEditorS(parent, name), m_config(0L){} + CSSEditor( TQListViewItem * i, TQWidget* parent=0, const char *name=0); ~CSSEditor(); void initialize(); - void setSelectors( const QString& s) { m_Selectors = s; } - void setHeader( const QString& s) { m_Header = s; } - void setFooter( const QString& s) { m_Footer = s;} - void setInlineStyleContent( const QString& s){ m_InlineStyleContent = s; } - QString generateProperties(); + void setSelectors( const TQString& s) { m_Selectors = s; } + void setHeader( const TQString& s) { m_Header = s; } + void setFooter( const TQString& s) { m_Footer = s;} + void setInlineStyleContent( const TQString& s){ m_InlineStyleContent = s; } + TQString generateProperties(); void hidePreviewer(); - void setFileToPreview(const QString& s,bool b) { m_fileToPreview = s; m_isFileToPreviewExternal = b;} - void setExternalStyleSheetDefinition(const QString& s) { m_externalStyleSheetDefinition = s;} + void setFileToPreview(const TQString& s,bool b) { m_fileToPreview = s; m_isFileToPreviewExternal = b;} + void setExternalStyleSheetDefinition(const TQString& s) { m_externalStyleSheetDefinition = s;} signals: void signalUpdatePreview(); diff --git a/quanta/components/csseditor/csseditor_globals.cpp b/quanta/components/csseditor/csseditor_globals.cpp index a73cb876..c2be79c0 100644 --- a/quanta/components/csseditor/csseditor_globals.cpp +++ b/quanta/components/csseditor/csseditor_globals.cpp @@ -15,25 +15,25 @@ * * ***************************************************************************/ -#include +#include #include "csseditor_globals.h" -mySpinBox::mySpinBox(QWidget * parent , const char * name ) : QSpinBox (parent, name){ - connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & ))); - connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & ))); +mySpinBox::mySpinBox(TQWidget * parent , const char * name ) : TQSpinBox (parent, name){ + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(checkSuffix( const TQString & ))); + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged( const TQString & ))); } -mySpinBox::mySpinBox( int minValue, int maxValue, int step, QWidget * parent, const char * name ) : QSpinBox( minValue, maxValue, step, parent,name ){ - connect( editor(), SIGNAL(textChanged(const QString&)), this, SLOT(checkSuffix( const QString & ))); - connect( editor(), SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged( const QString & ))); +mySpinBox::mySpinBox( int minValue, int maxValue, int step, TQWidget * parent, const char * name ) : TQSpinBox( minValue, maxValue, step, parent,name ){ + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(checkSuffix( const TQString & ))); + connect( editor(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged( const TQString & ))); } mySpinBox::~mySpinBox(){} -void mySpinBox::checkSuffix(const QString&){// check if the suffix is present and how many times : it normalizes these times to one +void mySpinBox::checkSuffix(const TQString&){// check if the suffix is present and how many times : it normalizes these times to one if(!suffix().isEmpty()){ - const QString suf(suffix()); - QString t(editor()->text()); + const TQString suf(suffix()); + TQString t(editor()->text()); if( t.contains(suf) ==0 ) { editor()->setText( t + suf); editor()->setCursorPosition(editor()->cursorPosition() - 1); diff --git a/quanta/components/csseditor/csseditor_globals.h b/quanta/components/csseditor/csseditor_globals.h index fefae7c8..b577981e 100644 --- a/quanta/components/csseditor/csseditor_globals.h +++ b/quanta/components/csseditor/csseditor_globals.h @@ -17,12 +17,12 @@ #ifndef CSSEDITOR_GLOBALS_H #define CSSEDITOR_GLOBALS_H -#include -#include -#include +#include +#include +#include namespace CSSEditorGlobals { -const QStringList HTMLColors(QStringList::split(",",QString("aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond," +const TQStringList HTMLColors(TQStringList::split(",",TQString("aliceblue,antiquewhite,aqua,aquamarine,azure,beige,bisque,black,blanchedalmond," "blue,blueviolet,brown,burlywood,cadetblue,chartreuse,chocolate,coral,cornflowerblue," "cornsilk,crimson,cyan,darkblue,darkcyan,darkgoldenrod,darkgray,darkgreen," "darkkhaki,darkmagenta,darkolivegreen,darkorange,darkorchid,darkred,darksalmon," @@ -42,21 +42,21 @@ const QStringList HTMLColors(QStringList::split(",",QString("aliceblue,antiquewh "yellow,yellowgreen"))); - const QStringList lengthUnits(QStringList::split(",",QString("cm,em,ex,in,mm,pc,pt,px"))); - const QStringList frequencyUnits(QStringList::split(",",QString("Hz,kHz"))); - const QStringList angleUnits(QStringList::split(",",QString("deg,rad,grad"))); - const QStringList timeUnits(QStringList::split(",",QString("s,ms"))); + const TQStringList lengthUnits(TQStringList::split(",",TQString("cm,em,ex,in,mm,pc,pt,px"))); + const TQStringList frequencyUnits(TQStringList::split(",",TQString("Hz,kHz"))); + const TQStringList angleUnits(TQStringList::split(",",TQString("deg,rad,grad"))); + const TQStringList timeUnits(TQStringList::split(",",TQString("s,ms"))); } class mySpinBox : public QSpinBox{ Q_OBJECT public: - mySpinBox(QWidget * parent = 0, const char * name = 0 ); - mySpinBox( int minValue, int maxValue, int step = 1, QWidget * parent = 0, const char * name = 0 ); + mySpinBox(TQWidget * parent = 0, const char * name = 0 ); + mySpinBox( int minValue, int maxValue, int step = 1, TQWidget * parent = 0, const char * name = 0 ); ~mySpinBox(); public slots: - void checkSuffix(const QString&); + void checkSuffix(const TQString&); }; diff --git a/quanta/components/csseditor/cssselector.cpp b/quanta/components/csseditor/cssselector.cpp index 1425102f..73460c05 100644 --- a/quanta/components/csseditor/cssselector.cpp +++ b/quanta/components/csseditor/cssselector.cpp @@ -18,16 +18,16 @@ #include "cssselector.h" #include "csseditor.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -39,7 +39,7 @@ #include "stylesheetparser.h" -CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (parent,name),m_orderNumber(0),m_stopProcessingStylesheet(false) { +CSSSelector::CSSSelector(TQWidget *parent, const char* name) : CSSSelectorS (parent,name),m_orderNumber(0),m_stopProcessingStylesheet(false) { m_currentItem = 0L; @@ -47,15 +47,15 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare kurApplyToFile->fileDialog()->setURL(Project::ref()->projectBaseURL().url()); kurApplyToFile->fileDialog()->setFilter( "*.html *.htm |" + i18n("HTML Files") +" (*.html *.htm)\n*.xhtml |" + i18n("XHTML Files")+" (*.xhtml)\n*.xml |" + i18n("XML Files")+" (*.xml)\n*.*|" + i18n("All Files")+" (*.*)" ); - QWhatsThis::add((QLineEdit*)(kurApplyToFile->lineEdit()),"With this line edit you can insert the URL of the file you want to use to preview the style sheet you are editing"); + TQWhatsThis::add((TQLineEdit*)(kurApplyToFile->lineEdit()),"With this line edit you can insert the URL of the file you want to use to preview the style sheet you are editing"); - /*QString configDir = locate("appdata", "csseditor/config.xml"); - configDir = QFileInfo(configDir).dirPath() + "/";*/ + /*TQString configDir = locate("appdata", "csseditor/config.xml"); + configDir = TQFileInfo(configDir).dirPath() + "/";*/ - QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; + TQString configDir = TQFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; - QDomDocument doc; - QFile file( configDir+"pseudo.xml" ); + TQDomDocument doc; + TQFile file( configDir+"pseudo.xml" ); if ( !file.open( IO_ReadOnly ) ) return; if ( !doc.setContent( &file ) ) { @@ -64,11 +64,11 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare } file.close(); - QDomElement docElem = doc.documentElement(); + TQDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.isNull() ) { cbPseudo->insertItem(e.attribute("name")); } @@ -84,17 +84,17 @@ CSSSelector::CSSSelector(QWidget *parent, const char* name) : CSSSelectorS (pare } file.close(); - QStringList dtdNames, + TQStringList dtdNames, dtdNickNames; docElem = doc.documentElement(); n = docElem.firstChild(); while( !n.isNull() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if( !e.isNull() ) { dtdNames.append(e.attribute("name")); dtdNickNames.append(e.attribute("nickName")); if(e.attribute("default") == "yes") { - QStringList tagList = QStringList::split( ',',e.text() ); + TQStringList tagList = TQStringList::split( ',',e.text() ); tagList.sort(); cbTag->insertStringList( tagList ); cbTag->setAutoCompletion(true); @@ -110,43 +110,43 @@ CSSSelector::~CSSSelector(){ void CSSSelector::Connect(){ - connect(cbDTD,SIGNAL(activated(const QString&)),this,SLOT(setDTDTags(const QString&))); + connect(cbDTD,TQT_SIGNAL(activated(const TQString&)),this,TQT_SLOT(setDTDTags(const TQString&))); - connect(pbAddTag,SIGNAL(clicked()), this ,SLOT(addTag())); - connect(pbAddClass,SIGNAL(clicked()), this ,SLOT(addClass())); - connect(pbAddID,SIGNAL(clicked()), this ,SLOT(addID())); - connect(pbAddPseudo,SIGNAL(clicked()), this ,SLOT(addPseudo())); + connect(pbAddTag,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addTag())); + connect(pbAddClass,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addClass())); + connect(pbAddID,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addID())); + connect(pbAddPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(addPseudo())); - connect(lvTags, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); - connect(lvClasses, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); - connect(lvIDs, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); - connect(lvPseudo, SIGNAL(doubleClicked( QListViewItem * )), this, SLOT(openCSSEditor(QListViewItem *))); + connect(lvTags, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); + connect(lvClasses, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); + connect(lvIDs, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); + connect(lvPseudo, TQT_SIGNAL(doubleClicked( TQListViewItem * )), this, TQT_SLOT(openCSSEditor(TQListViewItem *))); - connect(lvTags, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); - connect(lvClasses, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); - connect(lvIDs, SIGNAL(selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); - connect(lvPseudo, SIGNAL( selectionChanged( QListViewItem * )), this, SLOT(setCurrentItem(QListViewItem *))); + connect(lvTags, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); + connect(lvClasses, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); + connect(lvIDs, TQT_SIGNAL(selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); + connect(lvPseudo, TQT_SIGNAL( selectionChanged( TQListViewItem * )), this, TQT_SLOT(setCurrentItem(TQListViewItem *))); - connect(pbRemoveSelectedTag,SIGNAL(clicked()), this ,SLOT(removeSelected())); - connect(pbRemoveSelectedClass,SIGNAL(clicked()), this ,SLOT(removeSelected())); - connect(pbRemoveSelectedID,SIGNAL(clicked()), this ,SLOT(removeSelected())); - connect(pbRemoveSelectedPseudo,SIGNAL(clicked()), this ,SLOT(removeSelected())); + connect(pbRemoveSelectedTag,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); + connect(pbRemoveSelectedClass,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); + connect(pbRemoveSelectedID,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); + connect(pbRemoveSelectedPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeSelected())); - connect(twSelectors,SIGNAL(currentChanged ( QWidget * )), this ,SLOT(setCurrentListView( QWidget * ))); + connect(twSelectors,TQT_SIGNAL(currentChanged ( TQWidget * )), this ,TQT_SLOT(setCurrentListView( TQWidget * ))); - connect(pbRemoveAllTags,SIGNAL(clicked()), this ,SLOT(removeAll())); - connect(pbRemoveAllClasses,SIGNAL(clicked()), this ,SLOT(removeAll())); - connect(pbRemoveAllIDs,SIGNAL(clicked()), this ,SLOT(removeAll())); - connect(pbRemoveAllPseudo,SIGNAL(clicked()), this ,SLOT(removeAll())); + connect(pbRemoveAllTags,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); + connect(pbRemoveAllClasses,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); + connect(pbRemoveAllIDs,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); + connect(pbRemoveAllPseudo,TQT_SIGNAL(clicked()), this ,TQT_SLOT(removeAll())); } -void CSSSelector::setDTDTags(const QString& s){ +void CSSSelector::setDTDTags(const TQString& s){ - QString configDir = QFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; + TQString configDir = TQFileInfo( locate("appdata", "csseditor/config.xml") ).dirPath() + "/"; - QDomDocument doc; + TQDomDocument doc; - QFile file( configDir+"dtdTags.xml" ); + TQFile file( configDir+"dtdTags.xml" ); if ( !file.open( IO_ReadOnly ) ) return; if ( !doc.setContent( &file ) ) { @@ -155,15 +155,15 @@ void CSSSelector::setDTDTags(const QString& s){ } file.close(); - QStringList dtdNames; - QDomElement docElem = doc.documentElement(); - QDomNode n = docElem.firstChild(); + TQStringList dtdNames; + TQDomElement docElem = doc.documentElement(); + TQDomNode n = docElem.firstChild(); while( !n.isNull() ) { if( n.toElement().attribute("nickName") == s ) break; n = n.nextSibling(); } - QStringList tagList = QStringList::split( ',',n.toElement().text() ); + TQStringList tagList = TQStringList::split( ',',n.toElement().text() ); tagList.sort(); cbTag->clear(); cbTag->insertStringList( tagList ); @@ -171,50 +171,50 @@ void CSSSelector::setDTDTags(const QString& s){ } void CSSSelector::addTag(){ - QListViewItem *item = new QListViewItem(lvTags); + TQListViewItem *item = new TQListViewItem(lvTags); if(!cbTag->currentText().isEmpty()){ item->setText(0,cbTag->currentText()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } } void CSSSelector::addClass(){ - QListViewItem *item = new QListViewItem(lvClasses); + TQListViewItem *item = new TQListViewItem(lvClasses); if(!leClass->text().isEmpty()){ item->setText(0,leClass->text()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } } void CSSSelector::addID(){ - QListViewItem *item = new QListViewItem(lvIDs); + TQListViewItem *item = new TQListViewItem(lvIDs); if(!leID->text().isEmpty()){ item->setText(0,leID->text()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } } void CSSSelector::addPseudo(){ - QListViewItem *item = new QListViewItem(lvPseudo); + TQListViewItem *item = new TQListViewItem(lvPseudo); item->setText(0,(lePseudoSelector->text()+":"+cbPseudo->currentText()).stripWhiteSpace()); - QPair tmp(QString::null,++m_orderNumber); + QPair tmp(TQString::null,++m_orderNumber); m_currentStylesheetStructure[item->text(0)]=tmp; } -void CSSSelector::openCSSEditor(QListViewItem * i){ +void CSSSelector::openCSSEditor(TQListViewItem * i){ if(!m_stopProcessingStylesheet){ - QListView *lv = i->listView(); - QListViewItem *temp; - QString s; - QObjectList *l = queryList( "QListView" ); - QObjectListIt it( *l ); // iterate over the listviews - QObject *obj; + TQListView *lv = i->listView(); + TQListViewItem *temp; + TQString s; + TQObjectList *l = queryList( "TQListView" ); + TQObjectListIt it( *l ); // iterate over the listviews + TQObject *obj; while ( (obj = it.current()) != 0 ) { - QListView *lvTemp = (QListView*)obj; + TQListView *lvTemp = (TQListView*)obj; if( lv != lvTemp){ temp = lvTemp->firstChild(); while(temp){ @@ -246,8 +246,8 @@ void CSSSelector::openCSSEditor(QListViewItem * i){ else { dlg.setFileToPreview(kurApplyToFile->url(),true); - QString tmp; - QListViewItem *item = lvTags->firstChild(); + TQString tmp; + TQListViewItem *item = lvTags->firstChild(); while( item ) { if(i->text(0).stripWhiteSpace() != item->text(0).stripWhiteSpace()) tmp += item->text(0) + " {" + item->text(1) + "}"; @@ -283,22 +283,22 @@ void CSSSelector::openCSSEditor(QListViewItem * i){ if(dlg.exec()) { i->setText(1,dlg.generateProperties()); - QPair tmp(m_currentStylesheetStructure[i->text(0)]); + QPair tmp(m_currentStylesheetStructure[i->text(0)]); tmp.first = dlg.generateProperties(); m_currentStylesheetStructure[i->text(0)] = tmp; } } } -void CSSSelector::setCurrentListView(QWidget* w){ - QObjectList *l = w->queryList( "QListView" ); - m_currentListView = static_cast(l->first()); +void CSSSelector::setCurrentListView(TQWidget* w){ + TQObjectList *l = w->queryList( "TQListView" ); + m_currentListView = static_cast(l->first()); } void CSSSelector::removeAll(){ - QListViewItemIterator it( m_currentListView ); + TQListViewItemIterator it( m_currentListView ); while ( it.current() ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); m_currentStylesheetStructure.remove(item->text(0)); ++it; } @@ -313,30 +313,30 @@ void CSSSelector::removeSelected(){ } } -void CSSSelector::loadCSSContent(const QString& s){ +void CSSSelector::loadCSSContent(const TQString& s){ stylesheetParser p(s); - connect(&p,SIGNAL(errorOccurred(const QString&)), this, SLOT(setStylesheetProcessing(const QString&))); + connect(&p,TQT_SIGNAL(errorOccurred(const TQString&)), this, TQT_SLOT(setStylesheetProcessing(const TQString&))); p.parse(); m_orderNumber = p.orderNumber(); - QMap >::Iterator it; + TQMap >::Iterator it; m_currentStylesheetStructure = p.stylesheetStructure(); for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) { if(!it.key().startsWith("@rule") && !it.key().startsWith("/*")){ - QListViewItem *item; + TQListViewItem *item; if(it.key().contains(":")){ - item = new QListViewItem(lvPseudo); + item = new TQListViewItem(lvPseudo); } else if(it.key().contains("#")){ - item = new QListViewItem(lvIDs); + item = new TQListViewItem(lvIDs); } else if(it.key().contains(".")){ - item = new QListViewItem(lvClasses); + item = new TQListViewItem(lvClasses); } else { - item = new QListViewItem(lvTags); + item = new TQListViewItem(lvTags); } item->setText(0,it.key()); @@ -346,27 +346,27 @@ void CSSSelector::loadCSSContent(const QString& s){ } } -QString CSSSelector::generateFormattedStyleSection(){ - QMap< QString,QPair >::Iterator it; - QString styleSection,tmpStr; +TQString CSSSelector::generateFormattedStyleSection(){ + TQMap< TQString,QPair >::Iterator it; + TQString styleSection,tmpStr; unsigned int indentWidth, indentDisplacement = 2; for ( unsigned int i=0;i<=m_orderNumber;i++ ) { for ( it = m_currentStylesheetStructure.begin(); it != m_currentStylesheetStructure.end(); ++it ) { - QString key = it.key(); + TQString key = it.key(); if(it.data().second == i){ if(key.startsWith("@rule")) styleSection += it.data().first; else if(key.startsWith("/*")) styleSection += it.data().first; else { - key.remove(QRegExp("-v[\\d]+$")); + key.remove(TQRegExp("-v[\\d]+$")); styleSection += "\n" + key + " {\n"; indentWidth = indentDisplacement + 2; - QStringList props = QStringList::split(";",it.data().first.simplifyWhiteSpace()); - QString indentStr; + TQStringList props = TQStringList::split(";",it.data().first.simplifyWhiteSpace()); + TQString indentStr; indentStr.fill(' ',indentWidth); - for ( QStringList::Iterator it = props.begin(); it != props.end(); ++it ) { + for ( TQStringList::Iterator it = props.begin(); it != props.end(); ++it ) { if((*it).startsWith(" ")) tmpStr += indentStr + (*it).remove(0,1) + ";\n"; else @@ -374,7 +374,7 @@ QString CSSSelector::generateFormattedStyleSection(){ } indentStr.fill(' ', indentDisplacement); styleSection += tmpStr + indentStr + "}\n\n"; - tmpStr = QString::null; + tmpStr = TQString::null; } } } @@ -387,7 +387,7 @@ void CSSSelector::enableApplyToFile(){ kurApplyToFile->setEnabled(true); } -void CSSSelector::setStylesheetProcessing(const QString& msg) { +void CSSSelector::setStylesheetProcessing(const TQString& msg) { m_stopProcessingStylesheet=true; KMessageBox::error (0L, msg ); } diff --git a/quanta/components/csseditor/cssselector.h b/quanta/components/csseditor/cssselector.h index f4d42e89..a569929a 100644 --- a/quanta/components/csseditor/cssselector.h +++ b/quanta/components/csseditor/cssselector.h @@ -18,8 +18,8 @@ #ifndef CSSSELECTOR_H #define CSSSELECTOR_H -#include -#include +#include +#include #include "cssselectors.h" class QListViewItem; @@ -32,42 +32,42 @@ class CSSSelector : public CSSSelectorS { Q_OBJECT private: - QListViewItem *m_currentItem; - QListView *m_currentListView; - QString m_header, + TQListViewItem *m_currentItem; + TQListView *m_currentListView; + TQString m_header, m_footer, m_callingFrom, m_fileToPreview; - QMap > m_currentStylesheetStructure; + TQMap > m_currentStylesheetStructure; unsigned int m_orderNumber; bool m_stopProcessingStylesheet; void Connect(); public: - CSSSelector(QWidget *parent=0, const char* name=0); + CSSSelector(TQWidget *parent=0, const char* name=0); ~CSSSelector(); - void loadCSSContent(const QString& s); - void setHeader(const QString& h) { m_header = h; } - void setFooter(const QString& f) { m_footer = f; } + void loadCSSContent(const TQString& s); + void setHeader(const TQString& h) { m_header = h; } + void setFooter(const TQString& f) { m_footer = f; } void enableApplyToFile(); - void setCallingFrom(const QString& cf){ m_callingFrom = cf ;} - void setFileToPreview(const QString& s){ m_fileToPreview=s;} + void setCallingFrom(const TQString& cf){ m_callingFrom = cf ;} + void setFileToPreview(const TQString& s){ m_fileToPreview=s;} bool errorOnProcessingStylesheet() const { return m_stopProcessingStylesheet; } - QString generateFormattedStyleSection(); + TQString generateFormattedStyleSection(); private slots: - void openCSSEditor(QListViewItem *); + void openCSSEditor(TQListViewItem *); void addTag(); void addClass(); void addID(); void addPseudo(); void removeAll(); void removeSelected(); - void setCurrentItem(QListViewItem* i) { m_currentItem = i; } - void setCurrentListView(QWidget*); - void setDTDTags(const QString&); - void setStylesheetProcessing(const QString&); + void setCurrentItem(TQListViewItem* i) { m_currentItem = i; } + void setCurrentListView(TQWidget*); + void setDTDTags(const TQString&); + void setStylesheetProcessing(const TQString&); }; #endif diff --git a/quanta/components/csseditor/cssshpropertyparser.cpp b/quanta/components/csseditor/cssshpropertyparser.cpp index d02c39a5..d117b5f5 100644 --- a/quanta/components/csseditor/cssshpropertyparser.cpp +++ b/quanta/components/csseditor/cssshpropertyparser.cpp @@ -18,15 +18,15 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "cssshpropertyparser.h" -#include +#include //#include -CSSSHPropertyParser::CSSSHPropertyParser(const QString& s){ - QStringList l1, - l2=QStringList::split(",",s); +CSSSHPropertyParser::CSSSHPropertyParser(const TQString& s){ + TQStringList l1, + l2=TQStringList::split(",",s); - for ( QStringList::Iterator it = l2.begin(); it != l2.end(); ++it ) { - QString temp; + for ( TQStringList::Iterator it = l2.begin(); it != l2.end(); ++it ) { + TQString temp; temp=removeBeginningWhiteSpaces((*it)); temp=removeEndingWhiteSpaces(temp); l1.append(temp); @@ -37,26 +37,26 @@ CSSSHPropertyParser::CSSSHPropertyParser(const QString& s){ CSSSHPropertyParser::~CSSSHPropertyParser(){} -QString CSSSHPropertyParser::removeEndingWhiteSpaces(const QString& s){ +TQString CSSSHPropertyParser::removeEndingWhiteSpaces(const TQString& s){ int index = s.length()-1; while(s[index] == ' ' ) index--; return s.left(index+1); } -QString CSSSHPropertyParser::removeBeginningWhiteSpaces(const QString& s){ +TQString CSSSHPropertyParser::removeBeginningWhiteSpaces(const TQString& s){ int index = 0; while(s[index] == ' ' ) index++; return s.right(s.length()-index); } -QString CSSSHPropertyParser::extractFunctionList(){ - QRegExp functionListPattern("\\s*([a-zA-Z0-9_]*\\([\\W\\w]*\\))\\s*"); +TQString CSSSHPropertyParser::extractFunctionList(){ + TQRegExp functionListPattern("\\s*([a-zA-Z0-9_]*\\([\\W\\w]*\\))\\s*"); functionListPattern.search(m_propertyToParse); return functionListPattern.cap(1); } -QString CSSSHPropertyParser::extractQuotedStringList(){ - QString temp; +TQString CSSSHPropertyParser::extractQuotedStringList(){ + TQString temp; bool stop = false; unsigned int i=0; while(!stop && i +#include class CSSSHPropertyParser{ public: - CSSSHPropertyParser(const QString& s); + CSSSHPropertyParser(const TQString& s); ~CSSSHPropertyParser(); - QStringList parse(); + TQStringList parse(); private: - QString m_propertyToParse; + TQString m_propertyToParse; private: - QString extractURIList(); - QString extractFunctionList(); - QString extractQuotedStringList(); - QString removeBeginningWhiteSpaces(const QString& s); - QString removeEndingWhiteSpaces(const QString& s); + TQString extractURIList(); + TQString extractFunctionList(); + TQString extractQuotedStringList(); + TQString removeBeginningWhiteSpaces(const TQString& s); + TQString removeEndingWhiteSpaces(const TQString& s); }; #endif diff --git a/quanta/components/csseditor/doubleeditors.cpp b/quanta/components/csseditor/doubleeditors.cpp index 6fab0547..e877e2ac 100644 --- a/quanta/components/csseditor/doubleeditors.cpp +++ b/quanta/components/csseditor/doubleeditors.cpp @@ -16,27 +16,27 @@ ***************************************************************************/ #include "doubleeditors.h" #include "specialsb.h" - #include + #include #include "csseditor_globals.h" #include "propertysetter.h" - #include + #include -doubleEditorBase::doubleEditorBase(QWidget *parent, const char *name) : miniEditor(parent,name){ +doubleEditorBase::doubleEditorBase(TQWidget *parent, const char *name) : miniEditor(parent,name){ } -void doubleEditorBase::sxValueSlot(const QString& v){ +void doubleEditorBase::sxValueSlot(const TQString& v){ m_sxValue=v; emit valueChanged( m_sxValue +" " + m_dxValue); } -void doubleEditorBase::dxValueSlot(const QString& v){ +void doubleEditorBase::dxValueSlot(const TQString& v){ m_dxValue=v; emit valueChanged( m_sxValue +" " + m_dxValue); } - doubleLengthEditor::doubleLengthEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ + doubleLengthEditor::doubleLengthEditor(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){ m_ssbSx = new specialSB(this); m_ssbSx->insertItem("cm"); @@ -58,8 +58,8 @@ void doubleEditorBase::dxValueSlot(const QString& v){ m_ssbDx->insertItem("pt"); m_ssbDx->insertItem("px"); - connect(m_ssbSx, SIGNAL(valueChanged(const QString&)), this, SLOT(sxValueSlot(const QString&))); - connect(m_ssbDx, SIGNAL(valueChanged(const QString&)), this, SLOT(dxValueSlot(const QString&))); + connect(m_ssbSx, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(sxValueSlot(const TQString&))); + connect(m_ssbDx, TQT_SIGNAL(valueChanged(const TQString&)), this, TQT_SLOT(dxValueSlot(const TQString&))); } doubleLengthEditor::~doubleLengthEditor(){ @@ -68,19 +68,19 @@ doubleLengthEditor::~doubleLengthEditor(){ } void doubleLengthEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } -void doubleLengthEditor::setInitialValue(const QString& sx, const QString& dx){ +void doubleLengthEditor::setInitialValue(const TQString& sx, const TQString& dx){ m_ssbSx->setInitialValue(sx); m_ssbDx->setInitialValue(dx); } -doubleComboBoxEditor::doubleComboBoxEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ - m_cbSx = new QComboBox(this); - m_cbDx = new QComboBox(this); - connect(m_cbSx, SIGNAL(activated ( const QString & )), this, SLOT(sxValueSlot(const QString&))); - connect(m_cbDx, SIGNAL(activated ( const QString & )), this, SLOT(dxValueSlot(const QString&))); +doubleComboBoxEditor::doubleComboBoxEditor(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){ + m_cbSx = new TQComboBox(this); + m_cbDx = new TQComboBox(this); + connect(m_cbSx, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(sxValueSlot(const TQString&))); + connect(m_cbDx, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(dxValueSlot(const TQString&))); } doubleComboBoxEditor::~doubleComboBoxEditor(){ @@ -89,16 +89,16 @@ doubleComboBoxEditor::~doubleComboBoxEditor(){ } void doubleComboBoxEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } -doublePercentageEditor::doublePercentageEditor(QWidget *parent, const char *name) : doubleEditorBase(parent,name){ +doublePercentageEditor::doublePercentageEditor(TQWidget *parent, const char *name) : doubleEditorBase(parent,name){ m_sbSx = new mySpinBox(this); m_sbDx = new mySpinBox(this); m_sbSx->setSuffix("%"); m_sbDx->setSuffix("%"); - connect(m_sbSx,SIGNAL(valueChanged(const QString&)),this,SLOT(sxValueSlot(const QString&))); - connect(m_sbDx,SIGNAL(valueChanged(const QString&)),this,SLOT(dxValueSlot(const QString&))); + connect(m_sbSx,TQT_SIGNAL(valueChanged(const TQString&)),this,TQT_SLOT(sxValueSlot(const TQString&))); + connect(m_sbDx,TQT_SIGNAL(valueChanged(const TQString&)),this,TQT_SLOT(dxValueSlot(const TQString&))); } doublePercentageEditor::~doublePercentageEditor(){ @@ -107,12 +107,12 @@ doublePercentageEditor::~doublePercentageEditor(){ } void doublePercentageEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } -void doublePercentageEditor::setInitialValue(const QString& a_sx, const QString& a_dx){ - QString sx = a_sx; - QString dx = a_dx; +void doublePercentageEditor::setInitialValue(const TQString& a_sx, const TQString& a_dx){ + TQString sx = a_sx; + TQString dx = a_dx; m_sbSx->setValue(sx.remove("%").toInt()); m_sbDx->setValue(dx.remove("%").toInt()); } diff --git a/quanta/components/csseditor/doubleeditors.h b/quanta/components/csseditor/doubleeditors.h index 6496a6fa..ed3b91cd 100644 --- a/quanta/components/csseditor/doubleeditors.h +++ b/quanta/components/csseditor/doubleeditors.h @@ -26,21 +26,21 @@ class doubleEditorBase : public miniEditor { Q_OBJECT protected: - QString m_sxValue, + TQString m_sxValue, m_dxValue; public: - doubleEditorBase(QWidget *parent=0, const char *name=0); + doubleEditorBase(TQWidget *parent=0, const char *name=0); virtual ~doubleEditorBase(){} virtual void setInitialValue(){} virtual void connectToPropertySetter(propertySetter* /*p*/){} public slots: - void sxValueSlot(const QString&); - void dxValueSlot(const QString&); + void sxValueSlot(const TQString&); + void dxValueSlot(const TQString&); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class doublePercentageEditor : public doubleEditorBase { @@ -50,23 +50,23 @@ class doublePercentageEditor : public doubleEditorBase { *m_sbDx; public: - doublePercentageEditor(QWidget *parent=0, const char *name=0); + doublePercentageEditor(TQWidget *parent=0, const char *name=0); virtual ~doublePercentageEditor(); - virtual void setInitialValue(const QString& sx, const QString& dx); + virtual void setInitialValue(const TQString& sx, const TQString& dx); virtual void connectToPropertySetter(propertySetter* p); }; class doubleComboBoxEditor : public doubleEditorBase { Q_OBJECT private: - QComboBox *m_cbSx, + TQComboBox *m_cbSx, *m_cbDx; public: - doubleComboBoxEditor(QWidget *parent=0, const char *name=0); + doubleComboBoxEditor(TQWidget *parent=0, const char *name=0); virtual ~doubleComboBoxEditor(); - QComboBox* cbSx() const { return m_cbSx;} - QComboBox* cbDx() const { return m_cbDx;} + TQComboBox* cbSx() const { return m_cbSx;} + TQComboBox* cbDx() const { return m_cbDx;} virtual void connectToPropertySetter(propertySetter* p); }; @@ -77,9 +77,9 @@ class doubleLengthEditor : public doubleEditorBase { *m_ssbDx; public: - doubleLengthEditor(QWidget *parent=0, const char *name=0); + doubleLengthEditor(TQWidget *parent=0, const char *name=0); virtual ~doubleLengthEditor(); - virtual void setInitialValue(const QString& sx, const QString& dx); + virtual void setInitialValue(const TQString& sx, const TQString& dx); virtual void connectToPropertySetter(propertySetter* p); }; diff --git a/quanta/components/csseditor/encodingselector.cpp b/quanta/components/csseditor/encodingselector.cpp index 3eeb593b..f8ba4ac6 100644 --- a/quanta/components/csseditor/encodingselector.cpp +++ b/quanta/components/csseditor/encodingselector.cpp @@ -20,18 +20,18 @@ #include "encodingselector.h" #include #include -#include +#include /** *@author gulmini luciano */ -encodingSelector::encodingSelector(QWidget *parent, const char* name) : encodingSelectorS(parent,name){ - QStringList encodings (KGlobal::charsets()->availableEncodingNames()); +encodingSelector::encodingSelector(TQWidget *parent, const char* name) : encodingSelectorS(parent,name){ + TQStringList encodings (KGlobal::charsets()->availableEncodingNames()); int insert = 0; for (uint i=0; i < encodings.count(); i++) { bool found = false; - QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found); + TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found); if (found){ cbEncoding->insertItem (encodings[i]); diff --git a/quanta/components/csseditor/encodingselector.h b/quanta/components/csseditor/encodingselector.h index 3b10fa23..f53dca27 100644 --- a/quanta/components/csseditor/encodingselector.h +++ b/quanta/components/csseditor/encodingselector.h @@ -20,7 +20,7 @@ #include "encodingselectors.h" -#include +#include /** *@author gulmini luciano @@ -30,9 +30,9 @@ class encodingSelector : public encodingSelectorS { Q_OBJECT public: - encodingSelector(QWidget *parent=0, const char* name=0); + encodingSelector(TQWidget *parent=0, const char* name=0); ~encodingSelector(); - QString encodingSet() const { return cbEncoding->currentText();} + TQString encodingSet() const { return cbEncoding->currentText();} }; diff --git a/quanta/components/csseditor/fontfamilychooser.cpp b/quanta/components/csseditor/fontfamilychooser.cpp index d42139f8..9f8da65d 100644 --- a/quanta/components/csseditor/fontfamilychooser.cpp +++ b/quanta/components/csseditor/fontfamilychooser.cpp @@ -16,35 +16,35 @@ #include "fontfamilychooser.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include -#include +#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include -fontFamilyChooser::fontFamilyChooser(QWidget* parent, const char *name) : fontFamilyChooserS(parent,name){ +fontFamilyChooser::fontFamilyChooser(TQWidget* parent, const char *name) : fontFamilyChooserS(parent,name){ - QFont tmpFont( KGlobalSettings::generalFont().family(), 64, QFont::Black ); + TQFont tmpFont( KGlobalSettings::generalFont().family(), 64, TQFont::Black ); lePreview->setMinimumHeight( lePreview->fontMetrics().lineSpacing() ); lePreview->setAlignment(Qt::AlignCenter); - QFont font; + TQFont font; font.setPointSize(20); lePreview->setFont(font); lePreview->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog")); - QFontDatabase fdb; - QStringList families = fdb.families(); - for ( QStringList::Iterator it = families.begin(); it != families.end(); ++it ) { + TQFontDatabase fdb; + TQStringList families = fdb.families(); + for ( TQStringList::Iterator it = families.begin(); it != families.end(); ++it ) { if( (*it).contains('[') !=0 ) it = families.remove(it); } @@ -52,49 +52,49 @@ fontFamilyChooser::fontFamilyChooser(QWidget* parent, const char *name) : fontFa if( families.count() != 0 ) lbAvailable->insertStringList(families); - QIconSet iconSet = SmallIconSet(QString::fromLatin1("forward")); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("forward")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); pbAdd->setIconSet(iconSet); pbAdd->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - iconSet = SmallIconSet(QString::fromLatin1("back")); + iconSet = SmallIconSet(TQString::fromLatin1("back")); pbRemove->setIconSet(iconSet); pbRemove->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - iconSet = SmallIconSet(QString::fromLatin1("up")); + iconSet = SmallIconSet(TQString::fromLatin1("up")); pbMoveUp->setIconSet(iconSet); pbMoveUp->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - iconSet = SmallIconSet(QString::fromLatin1("down")); + iconSet = SmallIconSet(TQString::fromLatin1("down")); pbMoveDown->setIconSet(iconSet); pbMoveDown->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); - connect(pbAdd, SIGNAL(clicked()), this ,SLOT( addFont() )); - connect( lbAvailable, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) ); - connect( lbAvailable, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedAvailableFamilyFont( const QString&) ) ); - connect( lbGeneric, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) ); - connect( lbGeneric, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedGenericFamilyFont( const QString&) ) ); - connect( lbSelected, SIGNAL( highlighted( const QString& ) ), this, SLOT( updatePreview( const QString&) ) ); - connect( lbSelected, SIGNAL( highlighted( int ) ), this, SLOT( setCurrentSelectedFont( int ) ) ); - connect( lbSelected, SIGNAL( highlighted( const QString& ) ), this, SLOT( setCurrentSelectedFont( const QString&) ) ); - connect( pbRemove, SIGNAL( clicked() ), this, SLOT( removeFont() ) ); - connect( pbMoveUp, SIGNAL( clicked() ), this, SLOT( moveFontUp() ) ); - connect( pbMoveDown, SIGNAL( clicked() ), this, SLOT( moveFontDown() ) ); + connect(pbAdd, TQT_SIGNAL(clicked()), this ,TQT_SLOT( addFont() )); + connect( lbAvailable, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) ); + connect( lbAvailable, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedAvailableFamilyFont( const TQString&) ) ); + connect( lbGeneric, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) ); + connect( lbGeneric, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedGenericFamilyFont( const TQString&) ) ); + connect( lbSelected, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( updatePreview( const TQString&) ) ); + connect( lbSelected, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( setCurrentSelectedFont( int ) ) ); + connect( lbSelected, TQT_SIGNAL( highlighted( const TQString& ) ), this, TQT_SLOT( setCurrentSelectedFont( const TQString&) ) ); + connect( pbRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeFont() ) ); + connect( pbMoveUp, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveFontUp() ) ); + connect( pbMoveDown, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveFontDown() ) ); - QWhatsThis::add(lbAvailable,i18n("These are the names of the available fonts on your system")); - QWhatsThis::add(lbGeneric,i18n("These are the names of the generic fonts ")); - QWhatsThis::add(lbSelected,i18n("These are the names of the generic fonts you have selected ")); - QWhatsThis::add(pbAdd,i18n("Click this to add a font to your style sheet")); - QWhatsThis::add(pbRemove,i18n("Click this to remove a font from your style sheet")); - QWhatsThis::add(pbMoveUp,i18n("Click this to make the font more preferable than the preceeding one")); - QWhatsThis::add(pbMoveDown,i18n("Click this to make the font less preferable than the following one")); + TQWhatsThis::add(lbAvailable,i18n("These are the names of the available fonts on your system")); + TQWhatsThis::add(lbGeneric,i18n("These are the names of the generic fonts ")); + TQWhatsThis::add(lbSelected,i18n("These are the names of the generic fonts you have selected ")); + TQWhatsThis::add(pbAdd,i18n("Click this to add a font to your style sheet")); + TQWhatsThis::add(pbRemove,i18n("Click this to remove a font from your style sheet")); + TQWhatsThis::add(pbMoveUp,i18n("Click this to make the font more preferable than the preceeding one")); + TQWhatsThis::add(pbMoveDown,i18n("Click this to make the font less preferable than the following one")); } fontFamilyChooser::~fontFamilyChooser(){} -void fontFamilyChooser::updatePreview(const QString& s){ - lePreview->setFont(QFont(s,20)); +void fontFamilyChooser::updatePreview(const TQString& s){ + lePreview->setFont(TQFont(s,20)); } void fontFamilyChooser::addFont(){ @@ -107,13 +107,13 @@ void fontFamilyChooser::addFont(){ } } -void fontFamilyChooser::setCurrentSelectedAvailableFamilyFont(const QString& f){ +void fontFamilyChooser::setCurrentSelectedAvailableFamilyFont(const TQString& f){ m_fontOrigin = available; m_currentSelectedFont = f; m_selectedFontMap[f] = available; } -void fontFamilyChooser::setCurrentSelectedGenericFamilyFont(const QString& f){ +void fontFamilyChooser::setCurrentSelectedGenericFamilyFont(const TQString& f){ m_fontOrigin = generic; m_currentSelectedFont =f; m_selectedFontMap[f] = generic; @@ -136,7 +136,7 @@ void fontFamilyChooser::moveFontDown(){ } void fontFamilyChooser::removeFont(){ - QString dummyFont(m_currentSelectedFont);// since removeItem emits highlighted signal, after + TQString dummyFont(m_currentSelectedFont);// since removeItem emits highlighted signal, after // removeItem call the value of m_currentSelectedFont // is actually the font after m_currentSelectedFont and so // we must save m_currentSelectedFont value in dummyFont @@ -152,20 +152,20 @@ void fontFamilyChooser::removeFont(){ } -QStringList fontFamilyChooser::fontList(){ - QStringList list; - QListBoxItem *item = lbSelected->firstItem(); +TQStringList fontFamilyChooser::fontList(){ + TQStringList list; + TQListBoxItem *item = lbSelected->firstItem(); while( item != 0 ){ - if( item->text().contains( QRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); + if( item->text().contains( TQRegExp("\\W") ) ) list.append( "'" + item->text() + "'" ); else list.append( item->text() ); item = item->next(); } return list; } -void fontFamilyChooser::setInitialValue(const QString& s){ - QStringList familyList = QStringList::split(",",s); - for ( QStringList::Iterator it = familyList.begin(); it != familyList.end(); ++it ) { +void fontFamilyChooser::setInitialValue(const TQString& s){ + TQStringList familyList = TQStringList::split(",",s); + for ( TQStringList::Iterator it = familyList.begin(); it != familyList.end(); ++it ) { (*it).remove("'"); (*it).remove("\""); lbSelected->insertItem((*it).stripWhiteSpace()); diff --git a/quanta/components/csseditor/fontfamilychooser.h b/quanta/components/csseditor/fontfamilychooser.h index c812e774..fa5c947e 100644 --- a/quanta/components/csseditor/fontfamilychooser.h +++ b/quanta/components/csseditor/fontfamilychooser.h @@ -18,7 +18,7 @@ #define FONTFAMILYCHOOSER_H #include "fontfamilychoosers.h" -#include +#include class QStringList; class fontFamilyChooser : public fontFamilyChooserS @@ -26,27 +26,27 @@ class fontFamilyChooser : public fontFamilyChooserS Q_OBJECT private: enum FontOrigin { available, generic }; - QString m_currentSelectedFont; + TQString m_currentSelectedFont; FontOrigin m_fontOrigin; int m_currentSelectedFontIndex; - QMap m_selectedFontMap; + TQMap m_selectedFontMap; private slots: - void updatePreview(const QString &); - void setCurrentSelectedAvailableFamilyFont(const QString&); - void setCurrentSelectedGenericFamilyFont(const QString&); + void updatePreview(const TQString &); + void setCurrentSelectedAvailableFamilyFont(const TQString&); + void setCurrentSelectedGenericFamilyFont(const TQString&); void setCurrentSelectedFont( int i) { m_currentSelectedFontIndex = i; } - void setCurrentSelectedFont( const QString& f ) { m_currentSelectedFont = f; } + void setCurrentSelectedFont( const TQString& f ) { m_currentSelectedFont = f; } void addFont(); void removeFont(); void moveFontUp(); void moveFontDown(); public: - fontFamilyChooser(QWidget* parent, const char *name=0); + fontFamilyChooser(TQWidget* parent, const char *name=0); ~fontFamilyChooser(); - QStringList fontList(); - void setInitialValue(const QString& s); + TQStringList fontList(); + void setInitialValue(const TQString& s); }; #endif diff --git a/quanta/components/csseditor/minieditor.h b/quanta/components/csseditor/minieditor.h index 773ed285..1f5c25ef 100644 --- a/quanta/components/csseditor/minieditor.h +++ b/quanta/components/csseditor/minieditor.h @@ -18,7 +18,7 @@ #ifndef MINIEDITOR_H #define MINIEDITOR_H -#include +#include /** *@author gulmini luciano @@ -28,7 +28,7 @@ class propertySetter; class miniEditor : public QHBox{ public: - miniEditor(QWidget *parent=0, const char *name=0):QHBox(parent,name){} + miniEditor(TQWidget *parent=0, const char *name=0):TQHBox(parent,name){} ~miniEditor(){} virtual void connectToPropertySetter(propertySetter* p)=0; }; diff --git a/quanta/components/csseditor/percentageeditor.cpp b/quanta/components/csseditor/percentageeditor.cpp index 0c8a9d6c..b02a1615 100644 --- a/quanta/components/csseditor/percentageeditor.cpp +++ b/quanta/components/csseditor/percentageeditor.cpp @@ -17,13 +17,13 @@ #include "percentageeditor.h" #include "propertysetter.h" -percentageEditor::percentageEditor(const QString& initialValue, QWidget *parent, const char *name) : miniEditor(parent,name) +percentageEditor::percentageEditor(const TQString& initialValue, TQWidget *parent, const char *name) : miniEditor(parent,name) { - QString temp(initialValue); + TQString temp(initialValue); m_sb = new mySpinBox(0,9999,1,this); m_sb->setValue(temp.remove("%").toInt()); m_sb->setSuffix("%"); - connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SIGNAL(valueChanged(const QString&))); + connect(m_sb, TQT_SIGNAL(valueChanged ( const TQString & )), this, TQT_SIGNAL(valueChanged(const TQString&))); } percentageEditor::~percentageEditor() @@ -32,7 +32,7 @@ percentageEditor::~percentageEditor() } void percentageEditor::connectToPropertySetter(propertySetter* p){ - connect( this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect( this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } #include "percentageeditor.moc" diff --git a/quanta/components/csseditor/percentageeditor.h b/quanta/components/csseditor/percentageeditor.h index d6931aec..a6aecb8c 100644 --- a/quanta/components/csseditor/percentageeditor.h +++ b/quanta/components/csseditor/percentageeditor.h @@ -18,11 +18,11 @@ #ifndef PERCENTAGEEDITOR_H #define PERCENTAGEEDITOR_H -#include -#include +#include +#include #include "doubleeditors.h" -#include -#include +#include +#include #include "csseditor_globals.h" #include "minieditor.h" @@ -41,11 +41,11 @@ class percentageEditor : public miniEditor { private: mySpinBox *m_sb; public: - percentageEditor(const QString& initialValue="0",QWidget *parent=0, const char *name=0); + percentageEditor(const TQString& initialValue="0",TQWidget *parent=0, const char *name=0); ~percentageEditor(); virtual void connectToPropertySetter(propertySetter* p); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; diff --git a/quanta/components/csseditor/propertysetter.cpp b/quanta/components/csseditor/propertysetter.cpp index 683320ae..922c7dbe 100644 --- a/quanta/components/csseditor/propertysetter.cpp +++ b/quanta/components/csseditor/propertysetter.cpp @@ -17,13 +17,13 @@ #include "propertysetter.h" -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -36,7 +36,7 @@ #include "csseditor_globals.h" #include "minieditor.h" -propertySetter::propertySetter(QWidget *parent, const char *name ) : QHBox(parent,name) { +propertySetter::propertySetter(TQWidget *parent, const char *name ) : TQHBox(parent,name) { m_ind = 0; m_cb = 0L; m_list.setAutoDelete(true); @@ -59,38 +59,38 @@ void propertySetter::reset(){ void propertySetter::setComboBox() { - m_cb = new QComboBox(this); - connect(m_cb, SIGNAL(activated(const QString&)), this, SIGNAL(valueChanged(const QString&))); - connect(m_cb, SIGNAL(textChanged(const QString&)), this, SIGNAL(valueChanged(const QString&))); + m_cb = new TQComboBox(this); + connect(m_cb, TQT_SIGNAL(activated(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&))); + connect(m_cb, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&))); m_list.append(m_cb); } -void propertySetter::setSpinBox(const QString& initialValue, const QString& min, const QString& max, const QString& s) +void propertySetter::setSpinBox(const TQString& initialValue, const TQString& min, const TQString& max, const TQString& s) { mySpinBox *editor = new mySpinBox(min.toInt(), max.toInt(), 1, this); editor->setSuffix(s); editor->setValue(initialValue.toInt()); - connect(editor, SIGNAL(valueChanged(const QString&)), this ,SIGNAL(valueChanged(const QString&))); + connect(editor, TQT_SIGNAL(valueChanged(const TQString&)), this ,TQT_SIGNAL(valueChanged(const TQString&))); m_list.append(editor); } void propertySetter::setLineEdit() { - QLineEdit *editor = new QLineEdit(this); - connect(editor,SIGNAL(textChanged ( const QString & )), this, SIGNAL(valueChanged ( const QString & ))); + TQLineEdit *editor = new TQLineEdit(this); + connect(editor,TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SIGNAL(valueChanged ( const TQString & ))); m_list.append(editor); } void propertySetter::setPredefinedColorListEditor() { - QComboBox *editor = new QComboBox(this); + TQComboBox *editor = new TQComboBox(this); editor->insertStringList(CSSEditorGlobals::HTMLColors); - connect(editor, SIGNAL(activated(const QString&)), this, SIGNAL(valueChanged(const QString&))); + connect(editor, TQT_SIGNAL(activated(const TQString&)), this, TQT_SIGNAL(valueChanged(const TQString&))); m_list.append(editor); } void propertySetter::Show(){ - QWidget *w; + TQWidget *w; for ( w = m_list.first(); w; w = m_list.next() ) w->hide(); @@ -112,13 +112,13 @@ void propertySetter::Show(){ void propertySetter::addButton(){ m_pb = new KPushButton(this); - QToolTip::add(m_pb, i18n( "More..." )); - QIconSet iconSet = SmallIconSet(QString::fromLatin1("2rightarrow")); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQToolTip::add(m_pb, i18n( "More..." )); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("2rightarrow")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_pb->setIconSet(iconSet); m_pb->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); m_pb->hide(); - connect(m_pb, SIGNAL(clicked()), this ,SLOT(Show())); + connect(m_pb, TQT_SIGNAL(clicked()), this ,TQT_SLOT(Show())); } void propertySetter::installMiniEditor(miniEditor *m){ diff --git a/quanta/components/csseditor/propertysetter.h b/quanta/components/csseditor/propertysetter.h index 3f13b8ba..2f0a90af 100644 --- a/quanta/components/csseditor/propertysetter.h +++ b/quanta/components/csseditor/propertysetter.h @@ -18,9 +18,9 @@ #ifndef PROPERTYSETTER_H #define PROPERTYSETTER_H -#include -#include -#include +#include +#include +#include class miniEditor; @@ -31,34 +31,34 @@ class KPushButton; *@author gulmini luciano */ -class propertySetter : public QHBox { +class propertySetter : public TQHBox { Q_OBJECT private: unsigned int m_ind; - QPtrList m_list; - QComboBox *m_cb; + TQPtrList m_list; + TQComboBox *m_cb; KPushButton *m_pb; public: - propertySetter(QWidget *parent=0, const char *name=0); + propertySetter(TQWidget *parent=0, const char *name=0); ~propertySetter(); void installMiniEditor(miniEditor *m); void setComboBox(); - void setSpinBox(const QString& initialValue="0", const QString& min="0", const QString& max="9999", const QString& s=QString::null); + void setSpinBox(const TQString& initialValue="0", const TQString& min="0", const TQString& max="9999", const TQString& s=TQString::null); void setLineEdit(); void setPredefinedColorListEditor(); void reset(); void addButton(); - QComboBox* ComboBox() const { return m_cb; } + TQComboBox* ComboBox() const { return m_cb; } public slots: void Show(); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; #endif diff --git a/quanta/components/csseditor/qmyhighlighter.cpp b/quanta/components/csseditor/qmyhighlighter.cpp index 431bf6a5..dad1fe24 100644 --- a/quanta/components/csseditor/qmyhighlighter.cpp +++ b/quanta/components/csseditor/qmyhighlighter.cpp @@ -16,22 +16,22 @@ ***************************************************************************/ #include "qmyhighlighter.h" -#include -QMyHighlighter::QMyHighlighter(QTextEdit* Qtxt):QSyntaxHighlighter(Qtxt){ +#include +QMyHighlighter::QMyHighlighter(TQTextEdit* Qtxt):TQSyntaxHighlighter(Qtxt){ } /*****************************************************************************/ QMyHighlighter::~QMyHighlighter(){ } /*****************************************************************************/ -int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLastPara*/ ) +int QMyHighlighter::highlightParagraph( const TQString & text, int /*endStateOfLastPara*/ ) { - //QRegExp pattern("\\s*\\{([\\w\\s\\d:;-\"]*)\\}\\s*"); - QRegExp pattern("([#:\\.\\w]*)\\s*\\{"); + //TQRegExp pattern("\\s*\\{([\\w\\s\\d:;-\"]*)\\}\\s*"); + TQRegExp pattern("([#:\\.\\w]*)\\s*\\{"); int pos=pattern.search(text,0); int l=int(pattern.cap(1).length()); - setFormat(pos,l,QColor("red")); + setFormat(pos,l,TQColor("red")); if( pos== -1) pos = 0; @@ -45,7 +45,7 @@ int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLa if ( pos > -1 ) { l = pattern.matchedLength(); - setFormat(pos,l,QColor("mediumvioletred")); + setFormat(pos,l,TQColor("mediumvioletred")); pos += pattern.matchedLength(); } } @@ -56,7 +56,7 @@ int QMyHighlighter::highlightParagraph( const QString & text, int /*endStateOfLa pos = pattern.search( text, pos ); if ( pos > -1 ) { l = pattern.cap(1).length(); - setFormat(pos + 2 ,l,QColor("steelblue")); + setFormat(pos + 2 ,l,TQColor("steelblue")); pos += pattern.matchedLength(); } } diff --git a/quanta/components/csseditor/qmyhighlighter.h b/quanta/components/csseditor/qmyhighlighter.h index a75d6d00..60e767f5 100644 --- a/quanta/components/csseditor/qmyhighlighter.h +++ b/quanta/components/csseditor/qmyhighlighter.h @@ -18,18 +18,18 @@ #ifndef QMYHIGHLIGHTER_H #define QMYHIGHLIGHTER_H -#include +#include /** *@author Emiliano Gulmini */ -class QMyHighlighter : public QSyntaxHighlighter { +class QMyHighlighter : public TQSyntaxHighlighter { public: - QMyHighlighter(QTextEdit* Qtxt); + QMyHighlighter(TQTextEdit* Qtxt); ~QMyHighlighter(); - int highlightParagraph ( const QString & text, int endStateOfLastPara ); + int highlightParagraph ( const TQString & text, int endStateOfLastPara ); }; diff --git a/quanta/components/csseditor/shorthandformer.cpp b/quanta/components/csseditor/shorthandformer.cpp index e8b7a837..08acc819 100644 --- a/quanta/components/csseditor/shorthandformer.cpp +++ b/quanta/components/csseditor/shorthandformer.cpp @@ -18,38 +18,38 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "shorthandformer.h" -#include +#include #include "cssshpropertyparser.h" #include #include "csseditor_globals.h" -QRegExp globalPercentagePattern("\\d%"), +TQRegExp globalPercentagePattern("\\d%"), globalLengthPattern("\\d(ex|em|px|cm|pt|pc|in|mm)"), globalColorPattern("#[\\w\\d]*"), globalNumberPattern("\\d*"); -static const QString borderStyleValueString("none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"); -static const QString widthValueString("thin,medium,thick,inherit"); -static const QString listTypeValueString("disc,circle,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,armenian,georgian,cjk-ideographic,hiragana,katakana,hiragana-iroha,katakana-iroha,none,inherit"); -static const QString fontSizeValueString("smaller,larger,xx-large,x-large,large,medium,small,x-small,xx-small,inherit"); -static const QString fontWeightValueString("900,800,700,600,500,400,300,200,100,lighter,bolder,normal,bold,inherit"); -static const QString fontVariantValueString("normal,small-caps,inherit"); -static const QString fontStyleValueString("oblique,italic,normal,inherit"); -static const QString backgroundRepeatValueString("repeat,repeat-x,repeat-y,no-repeat,inherit"); +static const TQString borderStyleValueString("none,hidden,dotted,dashed,solid,double,groove,ridge,inset,outset,inherit"); +static const TQString widthValueString("thin,medium,thick,inherit"); +static const TQString listTypeValueString("disc,circle,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,armenian,georgian,cjk-ideographic,hiragana,katakana,hiragana-iroha,katakana-iroha,none,inherit"); +static const TQString fontSizeValueString("smaller,larger,xx-large,x-large,large,medium,small,x-small,xx-small,inherit"); +static const TQString fontWeightValueString("900,800,700,600,500,400,300,200,100,lighter,bolder,normal,bold,inherit"); +static const TQString fontVariantValueString("normal,small-caps,inherit"); +static const TQString fontStyleValueString("oblique,italic,normal,inherit"); +static const TQString backgroundRepeatValueString("repeat,repeat-x,repeat-y,no-repeat,inherit"); -static const QStringList borderStyleValueList = QStringList::split(",",borderStyleValueString); -static const QStringList widthValueList = QStringList::split(",",widthValueString); -static const QStringList listTypeValueList = QStringList::split(",",listTypeValueString); -static const QStringList fontSizeValueList = QStringList::split(",",fontSizeValueString); -static const QStringList fontWeightValueList = QStringList::split(",",fontWeightValueString); -static const QStringList fontStyleValueList = QStringList::split(",",fontStyleValueString); -static const QStringList fontVariantValueList = QStringList::split(",",fontVariantValueString); -static const QStringList backgroundRepeatValueList = QStringList::split(",",backgroundRepeatValueString); +static const TQStringList borderStyleValueList = TQStringList::split(",",borderStyleValueString); +static const TQStringList widthValueList = TQStringList::split(",",widthValueString); +static const TQStringList listTypeValueList = TQStringList::split(",",listTypeValueString); +static const TQStringList fontSizeValueList = TQStringList::split(",",fontSizeValueString); +static const TQStringList fontWeightValueList = TQStringList::split(",",fontWeightValueString); +static const TQStringList fontStyleValueList = TQStringList::split(",",fontStyleValueString); +static const TQStringList fontVariantValueList = TQStringList::split(",",fontVariantValueString); +static const TQStringList backgroundRepeatValueList = TQStringList::split(",",backgroundRepeatValueString); -ShorthandFormer::ShorthandFormer( QMap m){ +ShorthandFormer::ShorthandFormer( TQMap m){ m_properties = m; if(m_properties.contains("cue-after")){ @@ -218,8 +218,8 @@ ShorthandFormer::ShorthandFormer( QMap m){ } } -QString ShorthandFormer::compress(){ - QString props; +TQString ShorthandFormer::compress(){ + TQString props; props += compressCueProp(); props += compressPauseProp(); @@ -231,7 +231,7 @@ QString ShorthandFormer::compress(){ props += compressListStyleProp(); props += compressBorderProp(); - QMap::Iterator it; + TQMap::Iterator it; for ( it = m_properties.begin(); it != m_properties.end(); ++it ) props += it.key() + " : " + it.data().stripWhiteSpace() + "; " ; @@ -240,8 +240,8 @@ QString ShorthandFormer::compress(){ return props; } -QString ShorthandFormer::compressBorderProp(){ - QString props; +TQString ShorthandFormer::compressBorderProp(){ + TQString props; bool allColorSidesSet = false, allStyleSidesSet = false, @@ -306,17 +306,17 @@ QString ShorthandFormer::compressBorderProp(){ return props; } -QString ShorthandFormer::compressBorderStyleProp(){ +TQString ShorthandFormer::compressBorderStyleProp(){ return compressImplementation( "border-style" ,border_top_style, border_bottom_style, border_right_style, border_left_style, "none"); } -QString ShorthandFormer::compressBorderWidthProp(){ +TQString ShorthandFormer::compressBorderWidthProp(){ return compressImplementation( "border-width" ,border_top_width, border_bottom_width, border_right_width, border_left_width, "medium"); } -QString ShorthandFormer::compressBorderColorProp(){ +TQString ShorthandFormer::compressBorderColorProp(){ //because the default value of color property is browser dependant, this method doesn't compress the color value - QString props; + TQString props; if( !border_top_color.isEmpty() ) props += "border-top-color : " + border_top_color +"; "; if( !border_right_color.isEmpty() ) @@ -328,8 +328,8 @@ QString ShorthandFormer::compressBorderColorProp(){ return props; } -QString ShorthandFormer::compressFontProp(){ - QString fontProp, +TQString ShorthandFormer::compressFontProp(){ + TQString fontProp, props; //bool appendLineHeight = false; @@ -368,51 +368,51 @@ QString ShorthandFormer::compressFontProp(){ return props; } -QString ShorthandFormer::compressCueProp(){ +TQString ShorthandFormer::compressCueProp(){ return compressImplementation2( "cue", cue_after, cue_before, "none"); } -QString ShorthandFormer::compressPauseProp(){ +TQString ShorthandFormer::compressPauseProp(){ return compressImplementation2( "pause", pause_after, pause_before, "0"); } -QString ShorthandFormer::compressBackgroundProp(){ - QString backgroundProp; +TQString ShorthandFormer::compressBackgroundProp(){ + TQString backgroundProp; if( !background_color.isEmpty() ) backgroundProp += (" " + background_color ); if( !background_image.isEmpty() ) backgroundProp += (" " + background_image ); if( !background_repeat.isEmpty() ) backgroundProp += (" " + background_repeat ); if( !background_attachment.isEmpty() ) backgroundProp += (" " + background_attachment ); if( !background_position.isEmpty() ) backgroundProp += (" " + background_position ); if( !backgroundProp.isEmpty() ) return ( "background :" + backgroundProp + "; "); - return QString::null; + return TQString::null; } -QString ShorthandFormer::compressPaddingProp(){ +TQString ShorthandFormer::compressPaddingProp(){ return compressImplementation( "padding" ,padding_top, padding_bottom, padding_right, padding_left, "0"); } -QString ShorthandFormer::compressMarginProp(){ +TQString ShorthandFormer::compressMarginProp(){ return compressImplementation( "margin" ,margin_top, margin_bottom, margin_right, margin_left, "0"); } -QString ShorthandFormer::compressOutlineProp(){ +TQString ShorthandFormer::compressOutlineProp(){ return compressImplementation3("outline", outline_color, outline_style, outline_width); } -QString ShorthandFormer::compressListStyleProp(){ +TQString ShorthandFormer::compressListStyleProp(){ return compressImplementation3("list-style", list_style_type, list_style_image, list_style_position); } -QString ShorthandFormer::compressImplementation3( const QString& prop, const QString& p1, const QString& p2, const QString& p3){ - QString props; +TQString ShorthandFormer::compressImplementation3( const TQString& prop, const TQString& p1, const TQString& p2, const TQString& p3){ + TQString props; if( !p1.isEmpty() ) props += (" " + p1 ); if( !p2.isEmpty() ) props += (" " + p2 ); if( !p3.isEmpty() ) props += (" " + p3 ); if( !props.isEmpty() ) return ( prop + " :" + props + "; "); - return QString::null; + return TQString::null; } -QString ShorthandFormer::compressImplementation2( const QString& prop, const QString& after, const QString& before, const QString& defValue){ - QString props; +TQString ShorthandFormer::compressImplementation2( const TQString& prop, const TQString& after, const TQString& before, const TQString& defValue){ + TQString props; if(after == before){ if(!after.isEmpty()) props+=( prop + " : " + after + "; "); } @@ -425,9 +425,9 @@ QString ShorthandFormer::compressImplementation2( const QString& prop, const QSt return props; } -QString ShorthandFormer::compressImplementation( const QString& prop, const QString& t, const QString& b, const QString& r, const QString& l, const QString& defValue){ +TQString ShorthandFormer::compressImplementation( const TQString& prop, const TQString& t, const TQString& b, const TQString& r, const TQString& l, const TQString& defValue){ - QString props, + TQString props, top(t.stripWhiteSpace()), bottom(b.stripWhiteSpace()), left(l.stripWhiteSpace()), @@ -440,7 +440,7 @@ QString ShorthandFormer::compressImplementation( const QString& prop, const QStr if( top == defValue && bottom == defValue && right == defValue && left == defValue) - return QString::null; + return TQString::null; if( top == bottom && bottom == right && right == left ) return ( prop +" : " + top + "; "); @@ -456,9 +456,9 @@ QString ShorthandFormer::compressImplementation( const QString& prop, const QStr //+++++++++++++++++++++EXPANDING METHODS+++++++++++++++++++++++++++++++++++ -QMap ShorthandFormer::expand( const QString& propertyName, const QString& propertyValue ){ +TQMap ShorthandFormer::expand( const TQString& propertyName, const TQString& propertyValue ){ CSSSHPropertyParser parser(propertyValue); - QStringList foundValues = parser.parse(); + TQStringList foundValues = parser.parse(); if( propertyName == "cue" ) return expandCueProp(foundValues); if( propertyName == "pause") return expandPauseProp(foundValues); @@ -476,19 +476,19 @@ QMap ShorthandFormer::expand( const QString& propertyName, cons if( propertyName == "border") return expandBorderProp(foundValues); if( propertyName == "padding") return expandPaddingProp(foundValues); if( propertyName == "margin") return expandMarginProp(foundValues); - return QMap();//dummy instruction avoiding a pedantic warning; can never be reached + return TQMap();//dummy instruction avoiding a pedantic warning; can never be reached } -QMap ShorthandFormer::expandCueProp(const QStringList& l){ +TQMap ShorthandFormer::expandCueProp(const TQStringList& l){ return expandImplementation("cue",l); } -QMap ShorthandFormer::expandPauseProp(const QStringList& l){ +TQMap ShorthandFormer::expandPauseProp(const TQStringList& l){ return expandImplementation("pause",l); } -QMap ShorthandFormer::expandImplementation(const QString& propertyName, const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandImplementation(const TQString& propertyName, const TQStringList& l){ + TQMap expandedProps; if( l.count()==1) { expandedProps[propertyName + "-before"] = l[0] ; expandedProps[propertyName + "-after"] = l[0] ; @@ -502,8 +502,8 @@ QMap ShorthandFormer::expandImplementation(const QString& prop } } -QMap ShorthandFormer::expandBackgroundProp(const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandBackgroundProp(const TQStringList& l){ + TQMap expandedProps; if(l.count()==1 && l[0] == "inherit"){ // it works also as protection against wrong single value inserted expandedProps["background-color"] = l[0]; expandedProps["background-image"] = l[0]; @@ -513,10 +513,10 @@ QMap ShorthandFormer::expandBackgroundProp(const QStringList& } else { - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( (*it).contains("url(") || temp == "none" || temp == "inherit" ){ expandedProps["background-image"] = (*it); } @@ -546,9 +546,9 @@ QMap ShorthandFormer::expandBackgroundProp(const QStringList& return expandedProps; } -QMap ShorthandFormer::expandBox(const QString& subPropName, const QStringList& l){ +TQMap ShorthandFormer::expandBox(const TQString& subPropName, const TQStringList& l){ - QMap expandedProps; + TQMap expandedProps; expandedProps["border-top-" + subPropName] = l[0]; switch(l.count()){ case 1 : @@ -576,14 +576,14 @@ QMap ShorthandFormer::expandBox(const QString& subPropName, co return expandedProps; } -QMap ShorthandFormer::expandFontProp(const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandFontProp(const TQStringList& l){ + TQMap expandedProps; - QRegExp percentagePattern("/"+globalPercentagePattern.pattern()), + TQRegExp percentagePattern("/"+globalPercentagePattern.pattern()), lengthPattern("/"+globalLengthPattern.pattern()), numberPattern("/"+globalNumberPattern.pattern()); - QStringList fontPseudoSHFormValues; + TQStringList fontPseudoSHFormValues; fontPseudoSHFormValues.append("caption"); fontPseudoSHFormValues.append("icon"); fontPseudoSHFormValues.append("menu"); @@ -595,10 +595,10 @@ QMap ShorthandFormer::expandFontProp(const QStringList& l){ return expandedProps; } else { - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString currentIt = (*it); - QString temp(currentIt.stripWhiteSpace()); + TQString currentIt = (*it); + TQString temp(currentIt.stripWhiteSpace()); if( fontStyleValueList.contains(temp)!=0 ) expandedProps["font-style"] = (*it); else if( fontVariantValueList.contains(temp)!=0 ) expandedProps["font-variant"] = currentIt ; @@ -621,8 +621,8 @@ QMap ShorthandFormer::expandFontProp(const QStringList& l){ } } -QMap ShorthandFormer::expandListstyleProp( const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandListstyleProp( const TQStringList& l){ + TQMap expandedProps; if( (l.count() == 1) && (l[0] == "inherit")){ expandedProps["list-style-image"] ="inherit"; expandedProps["list-style-type"] ="inherit"; @@ -637,9 +637,9 @@ QMap ShorthandFormer::expandListstyleProp( const QStringList& l } - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( listTypeValueList.contains(temp)!=0) { expandedProps["list-style-type"] = (*it) ; } @@ -656,11 +656,11 @@ QMap ShorthandFormer::expandListstyleProp( const QStringList& l return expandedProps; } -QMap ShorthandFormer::expandOutlineProp( const QStringList& l){ - QMap expandedProps; - QStringList::ConstIterator it = l.begin(); +TQMap ShorthandFormer::expandOutlineProp( const TQStringList& l){ + TQMap expandedProps; + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( borderStyleValueList.contains(temp)!=0 ) expandedProps["outline-style"] = (*it); else if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "invert" || temp == "inherit") @@ -673,12 +673,12 @@ QMap ShorthandFormer::expandOutlineProp( const QStringList& l) return expandedProps; } -QMap ShorthandFormer::expandBoxSide(const QString& subPropName, const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandBoxSide(const TQString& subPropName, const TQStringList& l){ + TQMap expandedProps; - QStringList::ConstIterator it = l.begin(); + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( borderStyleValueList.contains(temp)!=0 ) expandedProps[subPropName + "-style"] = (*it); else if( (*it).contains(globalColorPattern) || CSSEditorGlobals::HTMLColors.contains((*it))!=0 || temp == "transparent" || temp == "inherit") @@ -691,11 +691,11 @@ QMap ShorthandFormer::expandBoxSide(const QString& subPropName return expandedProps; } -QMap ShorthandFormer::expandBorderProp(const QStringList& l){ - QMap expandedProps; - QStringList::ConstIterator it = l.begin(); +TQMap ShorthandFormer::expandBorderProp(const TQStringList& l){ + TQMap expandedProps; + TQStringList::ConstIterator it = l.begin(); while ( it != l.end() ) { - QString temp((*it).stripWhiteSpace()); + TQString temp((*it).stripWhiteSpace()); if( borderStyleValueList.contains(temp)!=0 ){ expandedProps["border-top-style"] = (*it); expandedProps["border-left-style"] = (*it); @@ -721,8 +721,8 @@ QMap ShorthandFormer::expandBorderProp(const QStringList& l){ return expandedProps; } -QMap ShorthandFormer::expandImplementation2(const QString& propertyName, const QStringList& l){ - QMap expandedProps; +TQMap ShorthandFormer::expandImplementation2(const TQString& propertyName, const TQStringList& l){ + TQMap expandedProps; expandedProps[ propertyName + "-top" ] = l[0]; switch(l.count()){ case 1 : @@ -750,16 +750,16 @@ QMap ShorthandFormer::expandImplementation2(const QString& prop return expandedProps; } - QMap ShorthandFormer::expandPaddingProp(const QStringList& l){ + TQMap ShorthandFormer::expandPaddingProp(const TQStringList& l){ return expandImplementation2("padding", l); } - QMap ShorthandFormer::expandMarginProp(const QStringList& l){ + TQMap ShorthandFormer::expandMarginProp(const TQStringList& l){ return expandImplementation2("margin", l); } -QStringList ShorthandFormer::SHFormList() { - QStringList l; +TQStringList ShorthandFormer::SHFormList() { + TQStringList l; l.append("cue"); l.append("pause"); l.append("font"); diff --git a/quanta/components/csseditor/shorthandformer.h b/quanta/components/csseditor/shorthandformer.h index f5b0f291..8673c01e 100644 --- a/quanta/components/csseditor/shorthandformer.h +++ b/quanta/components/csseditor/shorthandformer.h @@ -23,22 +23,22 @@ /** @author Gulmini Luciano */ -#include +#include class QString; class QStringList; class ShorthandFormer{ public: ShorthandFormer(){} - ShorthandFormer( QMap m ); + ShorthandFormer( TQMap m ); ~ShorthandFormer(){} - QString compress(); - QMap expand(const QString& propertyName, const QString& propertyValue); - static QStringList SHFormList(); + TQString compress(); + TQMap expand(const TQString& propertyName, const TQString& propertyValue); + static TQStringList SHFormList(); private: - QMap m_properties; - QString cue_after, + TQMap m_properties; + TQString cue_after, cue_before, pause_before, pause_after, @@ -81,37 +81,37 @@ private: padding_right; private: - QString compressCueProp(); - QString compressPauseProp(); - QString compressPaddingProp(); - QString compressMarginProp(); - QString compressFontProp(); - QString compressBackgroundProp(); - QString compressOutlineProp(); - QString compressListStyleProp(); - QString compressBorderStyleProp(); - QString compressBorderWidthProp(); - QString compressBorderColorProp(); - QString compressBorderProp(); + TQString compressCueProp(); + TQString compressPauseProp(); + TQString compressPaddingProp(); + TQString compressMarginProp(); + TQString compressFontProp(); + TQString compressBackgroundProp(); + TQString compressOutlineProp(); + TQString compressListStyleProp(); + TQString compressBorderStyleProp(); + TQString compressBorderWidthProp(); + TQString compressBorderColorProp(); + TQString compressBorderProp(); - QString compressImplementation( const QString& prop, const QString& t, const QString& b, const QString& r, const QString& l, const QString& defValue); - QString compressImplementation2( const QString& prop, const QString& after, const QString& before, const QString& defValue); - QString compressImplementation3( const QString& prop, const QString& p1, const QString& p2, const QString& p3); + TQString compressImplementation( const TQString& prop, const TQString& t, const TQString& b, const TQString& r, const TQString& l, const TQString& defValue); + TQString compressImplementation2( const TQString& prop, const TQString& after, const TQString& before, const TQString& defValue); + TQString compressImplementation3( const TQString& prop, const TQString& p1, const TQString& p2, const TQString& p3); - QMap expandCueProp(const QStringList& l); - QMap expandPauseProp(const QStringList& l); - QMap expandBackgroundProp(const QStringList& l); - QMap expandFontProp(const QStringList& l); - QMap expandOutlineProp(const QStringList& l); - QMap expandListstyleProp(const QStringList& l); - QMap expandBoxSide(const QString& subPropName, const QStringList& l); - QMap expandBorderProp(const QStringList& l); - QMap expandBox(const QString& subPropName, const QStringList& l); - QMap expandPaddingProp(const QStringList& l); - QMap expandMarginProp(const QStringList& l); + TQMap expandCueProp(const TQStringList& l); + TQMap expandPauseProp(const TQStringList& l); + TQMap expandBackgroundProp(const TQStringList& l); + TQMap expandFontProp(const TQStringList& l); + TQMap expandOutlineProp(const TQStringList& l); + TQMap expandListstyleProp(const TQStringList& l); + TQMap expandBoxSide(const TQString& subPropName, const TQStringList& l); + TQMap expandBorderProp(const TQStringList& l); + TQMap expandBox(const TQString& subPropName, const TQStringList& l); + TQMap expandPaddingProp(const TQStringList& l); + TQMap expandMarginProp(const TQStringList& l); - QMap expandImplementation(const QString& propertyName, const QStringList& l); - QMap expandImplementation2(const QString& propertyName, const QStringList& l); + TQMap expandImplementation(const TQString& propertyName, const TQStringList& l); + TQMap expandImplementation2(const TQString& propertyName, const TQStringList& l); }; #endif diff --git a/quanta/components/csseditor/specialsb.cpp b/quanta/components/csseditor/specialsb.cpp index eb26e05f..6edf110c 100644 --- a/quanta/components/csseditor/specialsb.cpp +++ b/quanta/components/csseditor/specialsb.cpp @@ -21,21 +21,21 @@ #include -specialSB::specialSB(QWidget *parent, const char *name, bool useLineEdit ) : miniEditor(parent,name) { +specialSB::specialSB(TQWidget *parent, const char *name, bool useLineEdit ) : miniEditor(parent,name) { if (useLineEdit) { m_lineEdit = new KLineEdit(this); m_sb = 0L; - connect(m_lineEdit, SIGNAL(textChanged ( const QString & )), this, SLOT(lineEditValueSlot ( const QString & ))); + connect(m_lineEdit, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(lineEditValueSlot ( const TQString & ))); } else { m_sb=new mySpinBox(this); - connect(m_sb, SIGNAL(valueChanged ( const QString & )), this, SLOT(sbValueSlot(const QString&))); + connect(m_sb, TQT_SIGNAL(valueChanged ( const TQString & )), this, TQT_SLOT(sbValueSlot(const TQString&))); m_lineEdit = 0L; } - m_cb = new QComboBox(this); - connect(m_cb, SIGNAL(activated ( const QString & )), this, SLOT(cbValueSlot(const QString&))); + m_cb = new TQComboBox(this); + connect(m_cb, TQT_SIGNAL(activated ( const TQString & )), this, TQT_SLOT(cbValueSlot(const TQString&))); } specialSB::~specialSB(){ @@ -45,32 +45,32 @@ specialSB::~specialSB(){ } void specialSB::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p,SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p,TQT_SIGNAL(valueChanged(const TQString&))); } -void specialSB::cbValueSlot(const QString& s){ +void specialSB::cbValueSlot(const TQString& s){ if (m_sb) emit valueChanged( m_sb->text() +s ); else emit valueChanged( m_lineEdit->text() +s ); } -void specialSB::sbValueSlot(const QString& s){ +void specialSB::sbValueSlot(const TQString& s){ emit valueChanged( s + m_cb->currentText()); } -void specialSB::lineEditValueSlot(const QString& s){ +void specialSB::lineEditValueSlot(const TQString& s){ emit valueChanged( s + m_cb->currentText()); } -void specialSB::setInitialValue(const QString& s){ +void specialSB::setInitialValue(const TQString& s){ - QRegExp pattern("\\d("+ cbValueList().join("|")+")"); + TQRegExp pattern("\\d("+ cbValueList().join("|")+")"); if (pattern.search(s) != -1) { - QString temp(s.stripWhiteSpace()); - QString cbValue = pattern.cap(1); + TQString temp(s.stripWhiteSpace()); + TQString cbValue = pattern.cap(1); if (m_sb) m_sb->setValue(temp.remove(cbValue).toInt()); @@ -81,19 +81,19 @@ void specialSB::setInitialValue(const QString& s){ else return; } -QStringList specialSB::cbValueList(){ - QStringList l; +TQStringList specialSB::cbValueList(){ + TQStringList l; for(int i=0; icount();i++) l.append(m_cb->text(i)); return l; } -frequencyEditor::frequencyEditor(QWidget *parent, const char *name ) : specialSB(parent,name) { +frequencyEditor::frequencyEditor(TQWidget *parent, const char *name ) : specialSB(parent,name) { m_cb->insertItem("Hz"); m_cb->insertItem("kHz"); m_sb->setMaxValue(9999); } -angleEditor::angleEditor(QWidget *parent, const char *name) : specialSB(parent,name){ +angleEditor::angleEditor(TQWidget *parent, const char *name) : specialSB(parent,name){ m_cb->insertItem("deg"); m_cb->insertItem("grad"); m_cb->insertItem("rad"); @@ -101,13 +101,13 @@ angleEditor::angleEditor(QWidget *parent, const char *name) : specialSB(parent,n m_sb->setMaxValue(400); } -timeEditor::timeEditor(QWidget *parent, const char *name ) : specialSB(parent,name) { +timeEditor::timeEditor(TQWidget *parent, const char *name ) : specialSB(parent,name) { m_cb->insertItem("ms"); m_cb->insertItem("s"); m_sb->setMaxValue(99999); } -lengthEditor::lengthEditor(QWidget *parent, const char *name ) : specialSB(parent,name, true) { +lengthEditor::lengthEditor(TQWidget *parent, const char *name ) : specialSB(parent,name, true) { m_cb->insertItem("px"); m_cb->insertItem("em"); m_cb->insertItem("ex"); diff --git a/quanta/components/csseditor/specialsb.h b/quanta/components/csseditor/specialsb.h index 43d6273e..bca3d9fa 100644 --- a/quanta/components/csseditor/specialsb.h +++ b/quanta/components/csseditor/specialsb.h @@ -19,7 +19,7 @@ #define SPECIALSB_H #include "minieditor.h" -#include +#include class mySpinBox; class KLineEdit; @@ -30,50 +30,50 @@ class KLineEdit; class specialSB : public miniEditor { Q_OBJECT protected: - QComboBox *m_cb; + TQComboBox *m_cb; mySpinBox *m_sb; KLineEdit *m_lineEdit; public: - specialSB(QWidget *parent=0, const char *name=0, bool useLineEdit = false); + specialSB(TQWidget *parent=0, const char *name=0, bool useLineEdit = false); ~specialSB(); - void insertItem(const QString& s){ m_cb->insertItem(s); } - void setInitialValue(const QString& s); - QStringList cbValueList(); + void insertItem(const TQString& s){ m_cb->insertItem(s); } + void setInitialValue(const TQString& s); + TQStringList cbValueList(); virtual void connectToPropertySetter(propertySetter* p); public slots: - void cbValueSlot(const QString&); - void sbValueSlot(const QString&); - void lineEditValueSlot(const QString&); + void cbValueSlot(const TQString&); + void sbValueSlot(const TQString&); + void lineEditValueSlot(const TQString&); signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class angleEditor : public specialSB { Q_OBJECT public: - angleEditor(QWidget *parent=0, const char *name=0); + angleEditor(TQWidget *parent=0, const char *name=0); }; class frequencyEditor : public specialSB { Q_OBJECT public: - frequencyEditor(QWidget *parent=0, const char *name=0); + frequencyEditor(TQWidget *parent=0, const char *name=0); }; class timeEditor : public specialSB { Q_OBJECT public: - timeEditor(QWidget *parent=0, const char *name=0); + timeEditor(TQWidget *parent=0, const char *name=0); }; class lengthEditor : public specialSB { Q_OBJECT public: - lengthEditor(QWidget *parent=0, const char *name=0); + lengthEditor(TQWidget *parent=0, const char *name=0); }; #endif diff --git a/quanta/components/csseditor/styleeditor.cpp b/quanta/components/csseditor/styleeditor.cpp index 63d4af79..31f6788b 100644 --- a/quanta/components/csseditor/styleeditor.cpp +++ b/quanta/components/csseditor/styleeditor.cpp @@ -13,11 +13,11 @@ ***************************************************************************/ //qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include //kde includes #include @@ -39,11 +39,11 @@ #include "viewmanager.h" #include "csseditor.h" -StyleEditor::StyleEditor(QWidget *parent, const char* name) : TLPEditor(parent,name){ - connect(m_pb, SIGNAL(clicked()), this, SLOT(openCSSEditor())); +StyleEditor::StyleEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name){ + connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openCSSEditor())); setToolTip(i18n("Open css dialog")); - QIconSet iconSet = SmallIconSet(QString::fromLatin1("stylesheet")); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("stylesheet")); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_pb->setIconSet(iconSet); m_iconWidth = pixMap.width(); m_iconHeight = pixMap.height(); @@ -73,18 +73,18 @@ void StyleEditor::openCSSEditor(){ if (styleNode->tag->type == Tag::XmlTagEnd && styleNode->prev) styleNode = styleNode->prev; - QString fullDocument = w->editIf->text().stripWhiteSpace(); + TQString fullDocument = w->editIf->text().stripWhiteSpace(); if (styleNode && (styleNode->tag->type == Tag::XmlTag || styleNode->tag->type == Tag::Empty) ) { CSSEditor *dlg = new CSSEditor(this); - QFileInfo fi(ViewManager::ref()->currentURL()); + TQFileInfo fi(ViewManager::ref()->currentURL()); dlg->setFileToPreview(Project::ref()->projectBaseURL().path() + fi.baseName(),false); styleNode->tag->beginPos(bLine, bCol); styleNode->tag->endPos(eLine, eCol); dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol)); - QString temp; + TQString temp; if (styleNode->tag->hasAttribute("style")) { dlg->setInlineStyleContent(styleNode->tag->attributeValue("style")); Tag tempTag(*(styleNode->tag)); @@ -92,7 +92,7 @@ void StyleEditor::openCSSEditor(){ temp = tempTag.toString(); } else { - dlg->setInlineStyleContent(QString::null); + dlg->setInlineStyleContent(TQString::null); temp = styleNode->tag->toString(); } diff --git a/quanta/components/csseditor/styleeditor.h b/quanta/components/csseditor/styleeditor.h index 582ac848..bef9146f 100644 --- a/quanta/components/csseditor/styleeditor.h +++ b/quanta/components/csseditor/styleeditor.h @@ -29,13 +29,13 @@ class StyleEditor : public TLPEditor{ int m_iconWidth, m_iconHeight; public: - StyleEditor(QWidget *parent=0, const char* name=0); + StyleEditor(TQWidget *parent=0, const char* name=0); virtual void setButtonIcon(int width, int height); public slots: void openCSSEditor(); virtual void connectToPropertySetter(propertySetter* /*p*/){} - virtual void setInitialValue(const QString& /*s*/){} + virtual void setInitialValue(const TQString& /*s*/){} }; diff --git a/quanta/components/csseditor/stylesheetparser.cpp b/quanta/components/csseditor/stylesheetparser.cpp index b8cbf306..db36ea4c 100644 --- a/quanta/components/csseditor/stylesheetparser.cpp +++ b/quanta/components/csseditor/stylesheetparser.cpp @@ -19,10 +19,10 @@ #include #include -static const QString msg1(i18n("has not been closed")), +static const TQString msg1(i18n("has not been closed")), msg2(i18n("needs an opening parenthesis ")); -stylesheetParser::stylesheetParser(const QString& s){ +stylesheetParser::stylesheetParser(const TQString& s){ m_styleSheet = s; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-whiteSpaces(0)); m_stopProcessing = false; @@ -32,7 +32,7 @@ stylesheetParser::stylesheetParser(const QString& s){ int stylesheetParser::whiteSpaces(int d){ int ws=0; for( unsigned int i=d;i tmp(m_styleSheet.left(k+ws),++m_orderNumber); - m_stylesheetStructure["/*"+QString::number(m_orderNumber,10)]=tmp; + QPair tmp(m_styleSheet.left(k+ws),++m_orderNumber); + m_stylesheetStructure["/*"+TQString::number(m_orderNumber,10)]=tmp; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-k-ws); parse(); } @@ -87,8 +87,8 @@ void stylesheetParser::parseComment(){ } } -unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b){ - QChar searchFor = '{'; +unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const TQString& b){ + TQChar searchFor = '{'; if (p == closed) searchFor = '}'; int num = 0; @@ -106,7 +106,7 @@ unsigned int stylesheetParser::numberOfParenthesisInAParenthesisBlock(parenthesi return num; } -int findParanthesis(const QString& string, const QChar &ch, int startPos = 0) +int findParanthesis(const TQString& string, const TQChar &ch, int startPos = 0) { int pos = -1; int len = string.length(); @@ -134,7 +134,7 @@ void stylesheetParser::parseSelector(){ return; } - QString temp(m_styleSheet.left(closingParenthesisPos+1)); + TQString temp(m_styleSheet.left(closingParenthesisPos+1)); if(numberOfParenthesisInAParenthesisBlock(closed,temp) < numberOfParenthesisInAParenthesisBlock(opened,temp)){ m_stopProcessing = true; @@ -154,21 +154,21 @@ void stylesheetParser::parseSelector(){ openingParentheses = numberOfParenthesisInAParenthesisBlock(closed,m_styleSheet.left(closingParenthesisPos+1)); //m_styleSheet.left(closingParenthesisPos+1).contains("{"); if(openingParentheses==closingParentheses){ - QString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(), + TQString selectorName=m_styleSheet.left(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/).stripWhiteSpace(), selectorValue=m_styleSheet.mid(findParanthesis(m_styleSheet, '{')/*m_styleSheet.find("{")*/+1, closingParenthesisPos - m_styleSheet.find("{") -1); selectorName.remove("\n").remove("\t"); selectorValue.remove("\n").remove("\t"); - QPair tmp(selectorValue,++m_orderNumber); + QPair tmp(selectorValue,++m_orderNumber); if (m_stylesheetStructure.contains(selectorName)) { uint i = 2; - QString s = selectorName + QString("-v%1").arg(i); + TQString s = selectorName + TQString("-v%1").arg(i); while (m_stylesheetStructure.contains(s)) { i++; - s = selectorName + QString("-v%1").arg(i); + s = selectorName + TQString("-v%1").arg(i); } selectorName = s; } @@ -219,8 +219,8 @@ void stylesheetParser::parseAtRules1(){ } int ws=whiteSpaces(closingParenthesisPos+1); - QPair tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber); - m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp; + QPair tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber); + m_stylesheetStructure["@rule"+TQString::number(m_orderNumber,10)]=tmp; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-closingParenthesisPos-1-ws); parse(); } @@ -236,8 +236,8 @@ void stylesheetParser::parseAtRules2(){ } int ws=whiteSpaces(semicolonPos+1); - QPair tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber); - m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp; + QPair tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber); + m_stylesheetStructure["@rule"+TQString::number(m_orderNumber,10)]=tmp; m_styleSheet=m_styleSheet.right(m_styleSheet.length()-semicolonPos-1-ws); parse(); } diff --git a/quanta/components/csseditor/stylesheetparser.h b/quanta/components/csseditor/stylesheetparser.h index 26d5fa3e..06ad1f86 100644 --- a/quanta/components/csseditor/stylesheetparser.h +++ b/quanta/components/csseditor/stylesheetparser.h @@ -18,9 +18,9 @@ #ifndef STYLESHEETPARSER_H #define STYLESHEETPARSER_H -#include -#include -#include +#include +#include +#include /** *@author gulmini luciano @@ -31,27 +31,27 @@ class stylesheetParser : public QObject{ private: enum parenthesisKind { opened, closed }; - QString m_styleSheet; + TQString m_styleSheet; bool m_stopProcessing; unsigned int m_orderNumber; - QMap > m_stylesheetStructure; + TQMap > m_stylesheetStructure; void parseComment(); void parseSelector(); void parseAtRules1(); void parseAtRules2(); int whiteSpaces(int); - unsigned int numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const QString& b); + unsigned int numberOfParenthesisInAParenthesisBlock(parenthesisKind p, const TQString& b); public: - stylesheetParser(const QString& s); + stylesheetParser(const TQString& s); ~stylesheetParser(){} void parse(); - QMap > stylesheetStructure() { return m_stylesheetStructure; } + TQMap > stylesheetStructure() { return m_stylesheetStructure; } unsigned int orderNumber() const {return m_orderNumber; } signals: - void errorOccurred(const QString&); + void errorOccurred(const TQString&); }; #endif diff --git a/quanta/components/csseditor/tlpeditors.cpp b/quanta/components/csseditor/tlpeditors.cpp index 706ac518..81e72538 100644 --- a/quanta/components/csseditor/tlpeditors.cpp +++ b/quanta/components/csseditor/tlpeditors.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -34,9 +34,9 @@ #include "fontfamilychooser.h" #include "project.h" -TLPEditor::TLPEditor(QWidget *parent, const char* name) : miniEditor(parent,name){ - m_label = new QLabel(this); - m_le = new QLineEdit(this); +TLPEditor::TLPEditor(TQWidget *parent, const char* name) : miniEditor(parent,name){ + m_label = new TQLabel(this); + m_le = new TQLineEdit(this); m_pb = new KPushButton(this); setSpacing( KDialog::spacingHint() ); } @@ -47,59 +47,59 @@ TLPEditor::~TLPEditor(){ delete m_pb; } -void TLPEditor::setButtonIcon(QString s){ - QIconSet iconSet = SmallIconSet(QString::fromLatin1(s)); - QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal ); +void TLPEditor::setButtonIcon(TQString s){ + TQIconSet iconSet = SmallIconSet(TQString::fromLatin1(s)); + TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal ); m_pb->setIconSet(iconSet); m_pb->setFixedSize( pixMap.width()+8, pixMap.height()+8 ); } -void TLPEditor::setLabelText(QString s){ +void TLPEditor::setLabelText(TQString s){ m_label->setText(s); } -void TLPEditor::setToolTip(QString s){ - QToolTip::add(m_pb, s); +void TLPEditor::setToolTip(TQString s){ + TQToolTip::add(m_pb, s); } -void TLPEditor::setWhatsThis(QString s){ - QWhatsThis::add(m_le,s); +void TLPEditor::setWhatsThis(TQString s){ + TQWhatsThis::add(m_le,s); } -URIEditor::URIEditor(QWidget *parent, const char* name) : TLPEditor(parent,name){ - QString whatsthis =i18n("With this line edit you can insert the URI of the resource you want to reach"); +URIEditor::URIEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name){ + TQString whatsthis =i18n("With this line edit you can insert the URI of the resource you want to reach"); setWhatsThis(whatsthis); setLabelText(" Uri :"); setButtonIcon("fileopen"); setToolTip(i18n("Open the URI selector")); - connect(m_pb, SIGNAL(clicked()), this, SLOT(openFileDialog())); + connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openFileDialog())); } void URIEditor::connectToPropertySetter(propertySetter* p){ - connect(this,SIGNAL(valueChanged(const QString&)), p ,SIGNAL(valueChanged(const QString&))); + connect(this,TQT_SIGNAL(valueChanged(const TQString&)), p ,TQT_SIGNAL(valueChanged(const TQString&))); } void URIEditor::setMode(const mode& m) { m_Mode = m ; if( m_Mode == Single ) - connect(m_le, SIGNAL(textChanged ( const QString & )), this, SLOT(selectedURI(const QString&))); + connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(selectedURI(const TQString&))); else{ - connect(m_le, SIGNAL(textChanged ( const QString & )), this, SLOT(selectedURIs(const QStringList&))); + connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(selectedURIs(const TQStringList&))); } } -void URIEditor::selectedURI(const QString & s){ +void URIEditor::selectedURI(const TQString & s){ KURL u; u.setPath(s); emit valueChanged("url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } -void URIEditor::selectedURIs(const QStringList& s){ +void URIEditor::selectedURIs(const TQStringList& s){ KURL u; - QStringList selectedFiles = s, + TQStringList selectedFiles = s, selectedFilesWithURLFormat; - for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ + for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ u.setPath(*it); selectedFilesWithURLFormat.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } @@ -139,9 +139,9 @@ void URIEditor::openFileDialog(){ selectedURI( fd.selectedFile() ); else { selectedURIs( fd.selectedFiles() ); - /*QStringList selectedFiles = fd.selectedFiles(); + /*TQStringList selectedFiles = fd.selectedFiles(); KURL u; - for ( QStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ + for ( TQStringList::Iterator it = selectedFiles.begin(); it != selectedFiles.end(); ++it ){ u.setPath(*it); m_sFiles.append( "url(\'" + QExtFileInfo::toRelative(u, Project::ref()->projectBaseURL()).path() + "\')"); } @@ -150,18 +150,18 @@ void URIEditor::openFileDialog(){ } } -fontEditor::fontEditor(QWidget *parent, const char* name) : TLPEditor(parent,name), m_initialValue(QString::null){ - QString whatsthis =i18n("With this line edit you can insert the name of the font you want to use"); +fontEditor::fontEditor(TQWidget *parent, const char* name) : TLPEditor(parent,name), m_initialValue(TQString::null){ + TQString whatsthis =i18n("With this line edit you can insert the name of the font you want to use"); setWhatsThis(whatsthis); setLabelText(i18n("Font family:")); setButtonIcon("fonts"); setToolTip(i18n("Open font family chooser")); - connect(m_pb, SIGNAL(clicked()), this, SLOT(openFontChooser())); - connect(m_le, SIGNAL(textChanged ( const QString & )), this, SIGNAL( valueChanged( const QString& ) ) ); + connect(m_pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(openFontChooser())); + connect(m_le, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SIGNAL( valueChanged( const TQString& ) ) ); } void fontEditor::connectToPropertySetter(propertySetter* p){ - connect(this, SIGNAL(valueChanged(const QString&)), p, SIGNAL(valueChanged(const QString&))); + connect(this, TQT_SIGNAL(valueChanged(const TQString&)), p, TQT_SIGNAL(valueChanged(const TQString&))); } void fontEditor::openFontChooser(){ diff --git a/quanta/components/csseditor/tlpeditors.h b/quanta/components/csseditor/tlpeditors.h index d0e52d37..28881573 100644 --- a/quanta/components/csseditor/tlpeditors.h +++ b/quanta/components/csseditor/tlpeditors.h @@ -33,34 +33,34 @@ class TLPEditor : public miniEditor { //editor with a line text and a button cal Q_OBJECT protected: - QLineEdit *m_le; - QLabel *m_label; + TQLineEdit *m_le; + TQLabel *m_label; KPushButton *m_pb; public: - TLPEditor(QWidget *parent, const char* name=0); + TLPEditor(TQWidget *parent, const char* name=0); virtual ~TLPEditor(); - virtual void setButtonIcon(QString); - void setToolTip(QString); - void setLabelText(QString); - void setWhatsThis(QString); - QLineEdit* lineEdit() const { return m_le; } + virtual void setButtonIcon(TQString); + void setToolTip(TQString); + void setLabelText(TQString); + void setWhatsThis(TQString); + TQLineEdit* lineEdit() const { return m_le; } KPushButton* button() const { return m_pb; } - virtual void setInitialValue(const QString& s)=0; + virtual void setInitialValue(const TQString& s)=0; virtual void connectToPropertySetter(propertySetter* p)=0; signals: - void valueChanged(const QString&); + void valueChanged(const TQString&); }; class fontEditor : public TLPEditor{ Q_OBJECT private: - QString m_initialValue; + TQString m_initialValue; public: - fontEditor(QWidget *parent, const char* name=0); - virtual void setInitialValue(const QString& s) { m_initialValue = s; } + fontEditor(TQWidget *parent, const char* name=0); + virtual void setInitialValue(const TQString& s) { m_initialValue = s; } virtual void connectToPropertySetter(propertySetter* p); public slots: @@ -78,15 +78,15 @@ class URIEditor : public TLPEditor { URIResourceType m_resourceType; public: - URIEditor(QWidget *parent, const char* name=0); + URIEditor(TQWidget *parent, const char* name=0); void setMode(const mode& m); void setResourceType(const URIResourceType& r) { m_resourceType = r ; } - virtual void setInitialValue(const QString& /*s*/){} + virtual void setInitialValue(const TQString& /*s*/){} virtual void connectToPropertySetter(propertySetter* p); public slots: - void selectedURI(const QString&); - void selectedURIs(const QStringList&); + void selectedURI(const TQString&); + void selectedURIs(const TQStringList&); void openFileDialog(); }; diff --git a/quanta/components/cvsservice/cvsservice.cpp b/quanta/components/cvsservice/cvsservice.cpp index 043af54e..4849ea72 100644 --- a/quanta/components/cvsservice/cvsservice.cpp +++ b/quanta/components/cvsservice/cvsservice.cpp @@ -14,12 +14,12 @@ ***************************************************************************/ //qt include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include //kde includes #include @@ -47,30 +47,30 @@ CVSService::CVSService(KActionCollection *ac) { m_menu = new KPopupMenu(); - KAction *action = new KAction(i18n("&Commit..."), "vcs_commit", 0, this, SLOT(slotCommit()), ac, "vcs_commit"); + KAction *action = new KAction(i18n("&Commit..."), "vcs_commit", 0, this, TQT_SLOT(slotCommit()), ac, "vcs_commit"); action->plug(m_menu); - action = new KAction(i18n("&Update"), "vcs_update", 0, this, SLOT(slotUpdate()), ac, "vcs_update"); + action = new KAction(i18n("&Update"), "vcs_update", 0, this, TQT_SLOT(slotUpdate()), ac, "vcs_update"); action->plug(m_menu); KPopupMenu *updateToMenu = new KPopupMenu(m_menu); m_menu->insertItem(SmallIconSet("vcs_update"), i18n("Update &To"), updateToMenu); - action = new KAction(i18n("&Tag/Date..."), "vcs_update", 0, this, SLOT(slotUpdateToTag()), ac, "vcs_update_tag_date"); + action = new KAction(i18n("&Tag/Date..."), "vcs_update", 0, this, TQT_SLOT(slotUpdateToTag()), ac, "vcs_update_tag_date"); action->plug(updateToMenu); - action = new KAction(i18n("&HEAD"), "vcs_update", 0, this, SLOT(slotUpdateToHead()), ac, "vcs_update_head"); + action = new KAction(i18n("&HEAD"), "vcs_update", 0, this, TQT_SLOT(slotUpdateToHead()), ac, "vcs_update_head"); action->plug(updateToMenu); - action = new KAction(i18n("Re&vert"), "reload", 0, this, SLOT(slotRevert()), ac, "vcs_revert"); + action = new KAction(i18n("Re&vert"), "reload", 0, this, TQT_SLOT(slotRevert()), ac, "vcs_revert"); action->plug(m_menu); m_menu->insertSeparator(); - action = new KAction(i18n("&Add to Repository..."), "vcs_add", 0, this, SLOT(slotAdd()), ac, "vcs_add"); + action = new KAction(i18n("&Add to Repository..."), "vcs_add", 0, this, TQT_SLOT(slotAdd()), ac, "vcs_add"); action->plug(m_menu); - action = new KAction(i18n("&Remove From Repository..."), "vcs_remove", 0, this, SLOT(slotRemove()), ac, "vcs_remove"); + action = new KAction(i18n("&Remove From Repository..."), "vcs_remove", 0, this, TQT_SLOT(slotRemove()), ac, "vcs_remove"); action->plug(m_menu); - action = new KAction(i18n("&Ignore in CVS Operations"), 0, this, SLOT(slotAddToCVSIgnore()), ac); + action = new KAction(i18n("&Ignore in CVS Operations"), 0, this, TQT_SLOT(slotAddToCVSIgnore()), ac); action->plug(m_menu); - action = new KAction(i18n("Do &Not Ignore in CVS Operations"), 0, this, SLOT(slotRemoveFromCVSIgnore()), ac); + action = new KAction(i18n("Do &Not Ignore in CVS Operations"), 0, this, TQT_SLOT(slotRemoveFromCVSIgnore()), ac); action->plug(m_menu); m_menu->insertSeparator(); - action = new KAction(i18n("Show &Log Messages"), 0, this, SLOT(slotBrowseLog()), ac); + action = new KAction(i18n("Show &Log Messages"), 0, this, TQT_SLOT(slotBrowseLog()), ac); action->plug(m_menu); m_cvsJob = 0L; @@ -78,8 +78,8 @@ CVSService::CVSService(KActionCollection *ac) m_cvsService =0L; m_commitDlg = new CVSCommitDlgS(); m_updateToDlg = new CVSUpdateToDlgS(); - m_timer = new QTimer(this); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout())); + m_timer = new TQTimer(this); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); } CVSService::~CVSService() @@ -95,14 +95,14 @@ CVSService::~CVSService() delete m_updateToDlg; } -void CVSService::setAppId(const QCString &id) +void CVSService::setAppId(const TQCString &id) { m_appId = id; m_cvsService = new CvsService_stub(m_appId, "CvsService"); m_timer->start(CVSSERVICE_TIMEOUT, true); } -void CVSService::setRepository(const QString &repository) +void CVSService::setRepository(const TQString &repository) { startService(); delete m_repository; @@ -117,7 +117,7 @@ void CVSService::setRepository(const QString &repository) void CVSService::slotUpdate() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -131,7 +131,7 @@ void CVSService::slotUpdate() } } -void CVSService::slotUpdate(const QStringList &files) +void CVSService::slotUpdate(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -144,15 +144,15 @@ void CVSService::slotUpdate(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotUpdateToTag() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -166,13 +166,13 @@ void CVSService::slotUpdateToTag() } } -void CVSService::slotUpdateToTag(const QStringList &files) +void CVSService::slotUpdateToTag(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && m_updateToDlg->exec()) { - QString extraOpts; - QString commandStr; + TQString extraOpts; + TQString commandStr; if (m_updateToDlg->tagRadioButton->isChecked()) { extraOpts = "-r " + m_updateToDlg->tagCombo->currentText(); @@ -190,15 +190,15 @@ void CVSService::slotUpdateToTag(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotUpdateToHead() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -212,7 +212,7 @@ void CVSService::slotUpdateToHead() } } -void CVSService::slotUpdateToHead(const QStringList &files) +void CVSService::slotUpdateToHead(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -225,15 +225,15 @@ void CVSService::slotUpdateToHead(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotCommit() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -247,7 +247,7 @@ void CVSService::slotCommit() } } -void CVSService::slotCommit(const QStringList &files) +void CVSService::slotCommit(const TQStringList &files) { startService(); m_commitDlg->fileList->clear(); @@ -259,7 +259,7 @@ void CVSService::slotCommit(const QStringList &files) if (m_repository && !m_appId.isEmpty() && m_commitDlg->exec()) { m_commitDlg->messageCombo->removeItem(0); - QString message = m_commitDlg->logEdit->text(); + TQString message = m_commitDlg->logEdit->text(); if (message != m_commitDlg->messageCombo->currentText()) m_commitDlg->messageCombo->insertItem(message, 0); emit clearMessages(); @@ -270,15 +270,15 @@ void CVSService::slotCommit(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotRevert() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -292,7 +292,7 @@ void CVSService::slotRevert() } } -void CVSService::slotRevert(const QStringList &files) +void CVSService::slotRevert(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty()) @@ -305,15 +305,15 @@ void CVSService::slotRevert(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotAdd() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -327,7 +327,7 @@ void CVSService::slotAdd() } } -void CVSService::slotAdd(const QStringList &files) +void CVSService::slotAdd(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && (KMessageBox::questionYesNoList(0, i18n("Add the following files to repository?"), files, i18n("CVS Add"), KStdGuiItem::add(), i18n("Do Not Add")) == KMessageBox::Yes)) @@ -340,15 +340,15 @@ void CVSService::slotAdd(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } void CVSService::slotRemove() { - QStringList files; + TQStringList files; if (!m_defaultFile.isEmpty()) { if (m_defaultFile.startsWith(m_repositoryPath)) @@ -362,7 +362,7 @@ void CVSService::slotRemove() } } -void CVSService::slotRemove(const QStringList &files) +void CVSService::slotRemove(const TQStringList &files) { startService(); if (m_repository && !m_appId.isEmpty() && (KMessageBox::warningContinueCancelList(0, i18n("Remove the following files from the repository?
This will remove your working copy as well.
"), files, i18n("CVS Remove")) == KMessageBox::Continue)) @@ -375,8 +375,8 @@ void CVSService::slotRemove(const QStringList &files) m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } @@ -388,7 +388,7 @@ void CVSService::slotBrowseLog() { if (m_defaultFile.startsWith(m_repositoryPath)) { - QString file = m_defaultFile.remove(m_repositoryPath); + TQString file = m_defaultFile.remove(m_repositoryPath); if (m_repository && !m_appId.isEmpty() ) { emit clearMessages(); @@ -399,8 +399,8 @@ void CVSService::slotBrowseLog() m_cvsJob = new CvsJob_stub(m_job.app(), m_job.obj()); connectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)", true); - connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)", true); + connectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)", true); m_cvsJob->execute(); } } else @@ -417,14 +417,14 @@ void CVSService::slotAddToCVSIgnore() if (m_defaultFile.startsWith(m_repositoryPath)) { emit clearMessages(); - QFileInfo fInfo(m_defaultFile); - QFile f(fInfo.dirPath()+ "/.cvsignore"); + TQFileInfo fInfo(m_defaultFile); + TQFile f(fInfo.dirPath()+ "/.cvsignore"); if (f.open(IO_ReadWrite)) { bool found = false; - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; while (!str.atEnd()) { line = str.readLine().stripWhiteSpace(); @@ -457,15 +457,15 @@ void CVSService::slotRemoveFromCVSIgnore() if (m_defaultFile.startsWith(m_repositoryPath)) { emit clearMessages(); - QString content; - QFileInfo fInfo(m_defaultFile); - QFile f(fInfo.dirPath()+ "/.cvsignore"); + TQString content; + TQFileInfo fInfo(m_defaultFile); + TQFile f(fInfo.dirPath()+ "/.cvsignore"); bool found = false; if (f.open(IO_ReadWrite)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); - QString line; + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); + TQString line; while (!str.atEnd()) { line = str.readLine().stripWhiteSpace(); @@ -483,8 +483,8 @@ void CVSService::slotRemoveFromCVSIgnore() } if (found && f.open(IO_WriteOnly)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); str << content; emit showMessage(i18n("\"%1\" removed from the CVS ignore list.").arg(fInfo.fileName()) + "\n", false); f.close(); @@ -508,20 +508,20 @@ void CVSService::slotJobExited(bool normalExit, int exitStatus) emit commandExecuted(m_cvsCommand, m_files); } disconnectDCOPSignal(m_job.app(), m_job.obj(), "jobExited(bool, int)", "slotJobExited(bool, int)"); - disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(QString)", "slotReceivedStdout(QString)"); - disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(QString)", "slotReceivedStderr(QString)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStdout(TQString)", "slotReceivedStdout(TQString)"); + disconnectDCOPSignal(m_job.app(), m_job.obj(), "receivedStderr(TQString)", "slotReceivedStderr(TQString)"); //delete m_cvsJob; //m_cvsJob = 0L; emit showMessage(i18n("CVS command finished."), false); emit showMessage(" ", false); } -void CVSService::slotReceivedStdout(QString output) +void CVSService::slotReceivedStdout(TQString output) { emit showMessage(output, true); } -void CVSService::slotReceivedStderr(QString output) +void CVSService::slotReceivedStderr(TQString output) { emit showMessage(output, true); } @@ -536,8 +536,8 @@ void CVSService::startService() { if (!m_cvsService) { - QString error; - KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error, + TQString error; + KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error, &m_appId); m_cvsService = new CvsService_stub(m_appId, "CvsService"); } diff --git a/quanta/components/cvsservice/cvsservice.h b/quanta/components/cvsservice/cvsservice.h index ebfcb402..70d9c66a 100644 --- a/quanta/components/cvsservice/cvsservice.h +++ b/quanta/components/cvsservice/cvsservice.h @@ -17,7 +17,7 @@ #define CVSSERVICE_H //qt includes -#include +#include //kde includes #include @@ -38,7 +38,7 @@ class CVSUpdateToDlgS; /** @short This class manages the CVS repositories from withing Quanta with the help of "cvsservice" * */ -class CVSService : public QObject, public CVSServiceDCOPIf +class CVSService : public TQObject, public CVSServiceDCOPIf { Q_OBJECT @@ -57,40 +57,40 @@ public: ~CVSService(); - void setAppId(const QCString& id); + void setAppId(const TQCString& id); /** Returns true if the cvsservice was found */ bool exists() {return !m_appId.isEmpty();} - void setRepository(const QString &repository); - void setCurrentFile(const QString &file) {m_defaultFile = file;} + void setRepository(const TQString &repository); + void setCurrentFile(const TQString &file) {m_defaultFile = file;} KPopupMenu *menu() {return m_menu;} public slots: void slotUpdate(); - void slotUpdate(const QStringList &files); + void slotUpdate(const TQStringList &files); void slotUpdateToTag(); - void slotUpdateToTag(const QStringList &files); + void slotUpdateToTag(const TQStringList &files); void slotUpdateToHead(); - void slotUpdateToHead(const QStringList &files); + void slotUpdateToHead(const TQStringList &files); void slotCommit(); - void slotCommit(const QStringList &files); + void slotCommit(const TQStringList &files); void slotRevert(); - void slotRevert(const QStringList &files); + void slotRevert(const TQStringList &files); void slotAdd(); - void slotAdd(const QStringList &files); + void slotAdd(const TQStringList &files); void slotRemove(); - void slotRemove(const QStringList &files); + void slotRemove(const TQStringList &files); void slotBrowseLog(); void slotAddToCVSIgnore(); void slotRemoveFromCVSIgnore(); virtual void slotJobExited(bool normalExit, int exitStatus); - virtual void slotReceivedStdout(QString output); - virtual void slotReceivedStderr(QString output); + virtual void slotReceivedStdout(TQString output); + virtual void slotReceivedStderr(TQString output); signals: void clearMessages(); - void showMessage(const QString &msg, bool append); - void commandExecuted(const QString& command, const QStringList& files); + void showMessage(const TQString &msg, bool append); + void commandExecuted(const TQString& command, const TQStringList& files); private slots: void slotTimeout(); @@ -100,19 +100,19 @@ private: void notInRepository(); void startService(); - QCString m_appId; + TQCString m_appId; KPopupMenu *m_menu; Repository_stub *m_repository; CvsJob_stub *m_cvsJob; CvsService_stub *m_cvsService; - QString m_defaultFile; - QString m_repositoryPath; - QString m_cvsCommand; - QStringList m_files; + TQString m_defaultFile; + TQString m_repositoryPath; + TQString m_cvsCommand; + TQStringList m_files; CVSCommitDlgS *m_commitDlg; CVSUpdateToDlgS *m_updateToDlg; DCOPRef m_job; - QTimer *m_timer; + TQTimer *m_timer; }; #endif diff --git a/quanta/components/cvsservice/cvsservicedcopif.h b/quanta/components/cvsservice/cvsservicedcopif.h index 75c0434a..c3f178a6 100644 --- a/quanta/components/cvsservice/cvsservicedcopif.h +++ b/quanta/components/cvsservice/cvsservicedcopif.h @@ -16,7 +16,7 @@ #ifndef CVSSERVICEDCOPIF_H #define CVSSERVICEDCOPIF_H -#include +#include #include class CVSServiceDCOPIf : virtual public DCOPObject @@ -24,7 +24,7 @@ class CVSServiceDCOPIf : virtual public DCOPObject K_DCOP k_dcop: virtual void slotJobExited( bool normalExit, int exitStatus ) = 0; - virtual void slotReceivedStdout( QString someOutput ) = 0; + virtual void slotReceivedStdout( TQString someOutput ) = 0; }; #endif diff --git a/quanta/components/debugger/backtracelistview.cpp b/quanta/components/debugger/backtracelistview.cpp index aa5c8c95..202e86e0 100644 --- a/quanta/components/debugger/backtracelistview.cpp +++ b/quanta/components/debugger/backtracelistview.cpp @@ -49,7 +49,7 @@ BacktraceListviewItem::BacktraceListviewItem(BacktraceListview* view) } -BacktraceListview::BacktraceListview(QWidget *parent, const char *name) +BacktraceListview::BacktraceListview(TQWidget *parent, const char *name) : KListView(parent, name) { int charwidth = this->fontMetrics().width("0"); @@ -64,14 +64,14 @@ BacktraceListview::BacktraceListview(QWidget *parent, const char *name) setAllColumnsShowFocus(true); // Jump to bt - connect(this, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int) ), this, SLOT(slotBacktraceDoubleClick( QListViewItem *, const QPoint &, int))); + connect(this, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int) ), this, TQT_SLOT(slotBacktraceDoubleClick( TQListViewItem *, const TQPoint &, int))); } BacktraceListview::~BacktraceListview() {} -void BacktraceListview::backtraceShow(int level, BacktraceType type, const QString& filename, long line, const QString& func) +void BacktraceListview::backtraceShow(int level, BacktraceType type, const TQString& filename, long line, const TQString& func) { BacktraceListviewItem* item = new BacktraceListviewItem(this); item->setLevel(level); @@ -82,14 +82,14 @@ void BacktraceListview::backtraceShow(int level, BacktraceType type, const QStri item->setText(BacktraceListviewColumns::File, filename); item->setText(BacktraceListviewColumns::Function, func); - item->setText(BacktraceListviewColumns::Level, QString::number(level)); - item->setText(BacktraceListviewColumns::Line, QString::number(line + 1)); + item->setText(BacktraceListviewColumns::Level, TQString::number(level)); + item->setText(BacktraceListviewColumns::Line, TQString::number(line + 1)); item->setText(BacktraceListviewColumns::Type, type == File ? i18n("File") : i18n("Eval")); insertItem(item); } -void BacktraceListview::keyPressEvent(QKeyEvent *e) +void BacktraceListview::keyPressEvent(TQKeyEvent *e) { if(e->key() != Qt::Key_Enter) { @@ -106,7 +106,7 @@ void BacktraceListview::clear() KListView::clear(); } -void BacktraceListview::slotBacktraceDoubleClick(QListViewItem *item, const QPoint &, int ) +void BacktraceListview::slotBacktraceDoubleClick(TQListViewItem *item, const TQPoint &, int ) { if(!item) return; @@ -114,7 +114,7 @@ void BacktraceListview::slotBacktraceDoubleClick(QListViewItem *item, const QPoi jumpHistory(item); } -void BacktraceListview::jumpHistory(QListViewItem *item) +void BacktraceListview::jumpHistory(TQListViewItem *item) { BacktraceListviewItem* btitem = dynamic_cast(item); diff --git a/quanta/components/debugger/backtracelistview.h b/quanta/components/debugger/backtracelistview.h index e00d0afc..21b72d3d 100644 --- a/quanta/components/debugger/backtracelistview.h +++ b/quanta/components/debugger/backtracelistview.h @@ -21,7 +21,7 @@ #include #include -#include +#include class BacktraceListview; @@ -37,8 +37,8 @@ class BacktraceListviewItem : public KListViewItem { private: BacktraceType m_type; - QString m_filename; - QString m_func; + TQString m_filename; + TQString m_func; long m_line; long m_level; @@ -51,12 +51,12 @@ class BacktraceListviewItem : public KListViewItem void setType(BacktraceType type) { m_type = type; } // Filename - QString filename() const { return m_filename; } - void setFilename(const QString &filename) { m_filename = filename; } + TQString filename() const { return m_filename; } + void setFilename(const TQString &filename) { m_filename = filename; } // Function - QString func() const { return m_func; } - void setFunc(const QString &func) { m_func = func; } + TQString func() const { return m_func; } + void setFunc(const TQString &func) { m_func = func; } // Line long line() const { return m_line; } @@ -74,19 +74,19 @@ class BacktraceListview : public KListView public: - BacktraceListview(QWidget *parent = 0, const char *name = 0); + BacktraceListview(TQWidget *parent = 0, const char *name = 0); ~BacktraceListview(); - void backtraceShow(int level, BacktraceType type, const QString& filename, long line, const QString& func); + void backtraceShow(int level, BacktraceType type, const TQString& filename, long line, const TQString& func); void clear(); public slots: - void slotBacktraceDoubleClick(QListViewItem *item, const QPoint &point, int column); + void slotBacktraceDoubleClick(TQListViewItem *item, const TQPoint &point, int column); private: - void keyPressEvent(QKeyEvent *e); - void jumpHistory(QListViewItem *item); + void keyPressEvent(TQKeyEvent *e); + void jumpHistory(TQListViewItem *item); }; diff --git a/quanta/components/debugger/conditionalbreakpointdialog.cpp b/quanta/components/debugger/conditionalbreakpointdialog.cpp index 943c33d4..055512da 100644 --- a/quanta/components/debugger/conditionalbreakpointdialog.cpp +++ b/quanta/components/debugger/conditionalbreakpointdialog.cpp @@ -16,19 +16,19 @@ #include "conditionalbreakpointdialog.h" -#include -#include +#include +#include #include -#include +#include #include #include #include -#include -#include +#include +#include #include "debuggerbreakpoint.h" -ConditionalBreakpointDialog::ConditionalBreakpointDialog(const QString& expression, const QString& inFile, const QString& inClass, const QString& inFunction) +ConditionalBreakpointDialog::ConditionalBreakpointDialog(const TQString& expression, const TQString& inFile, const TQString& inClass, const TQString& inFunction) : ConditionalBreakpointDialogS(0, "ConditionalBreakpointDialog", false, 0) { comboExpression->setCurrentText(expression); @@ -40,11 +40,11 @@ ConditionalBreakpointDialog::ConditionalBreakpointDialog(const QString& expressi buttonClearClass->setPixmap(SmallIcon("clear_left")); buttonClearFunction->setPixmap(SmallIcon("clear_left")); - connect(comboExpression, SIGNAL(textChanged(const QString&)), this, SLOT(slotExpressionChanged())); + connect(comboExpression, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotExpressionChanged())); - connect(buttonClearFile, SIGNAL(pressed()), this, SLOT(slotClearFile())); - connect(buttonClearClass, SIGNAL(pressed()), this, SLOT(slotClearClass())); - connect(buttonClearFunction, SIGNAL(pressed()), this, SLOT(slotClearFunction())); + connect(buttonClearFile, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearFile())); + connect(buttonClearClass, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearClass())); + connect(buttonClearFunction, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClearFunction())); slotExpressionChanged(); } @@ -56,7 +56,7 @@ ConditionalBreakpointDialog::~ConditionalBreakpointDialog() void ConditionalBreakpointDialog::slotExpressionChanged() { - if(comboExpression->currentText().find( QRegExp("[^=!]=[^=]"), 0 ) >= 0) + if(comboExpression->currentText().find( TQRegExp("[^=!]=[^=]"), 0 ) >= 0) ledWarning->on(); else ledWarning->off(); diff --git a/quanta/components/debugger/conditionalbreakpointdialog.h b/quanta/components/debugger/conditionalbreakpointdialog.h index fdae39a3..cad4adeb 100644 --- a/quanta/components/debugger/conditionalbreakpointdialog.h +++ b/quanta/components/debugger/conditionalbreakpointdialog.h @@ -31,13 +31,13 @@ class ConditionalBreakpointDialog : public ConditionalBreakpointDialogS OnChange }; - ConditionalBreakpointDialog(const QString& expression, const QString& inFile, const QString& inClass, const QString& inFunction); + ConditionalBreakpointDialog(const TQString& expression, const TQString& inFile, const TQString& inClass, const TQString& inFunction); ~ConditionalBreakpointDialog(); -// QString expression(); -// QString inFile(); -// QString inClass(); -// QString inFunction(); +// TQString expression(); +// TQString inFile(); +// TQString inClass(); +// TQString inFunction(); // DebuggerBreakpoint::Types type(); DebuggerBreakpoint *breakpoint(); diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.cpp b/quanta/components/debugger/dbgp/dbgpnetwork.cpp index 8ef82c2d..62b0daa0 100644 --- a/quanta/components/debugger/dbgp/dbgpnetwork.cpp +++ b/quanta/components/debugger/dbgp/dbgpnetwork.cpp @@ -25,7 +25,7 @@ #include DBGpNetwork::DBGpNetwork() -: QObject() +: TQObject() { m_socket = NULL; m_server = NULL; @@ -37,7 +37,7 @@ DBGpNetwork::~DBGpNetwork() { } -void DBGpNetwork::sessionStart(bool useproxy, const QString& server, const QString & service) +void DBGpNetwork::sessionStart(bool useproxy, const TQString& server, const TQString & service) { kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; @@ -48,11 +48,11 @@ void DBGpNetwork::sessionStart(bool useproxy, const QString& server, const QStri if(m_socket) { // m_socket->setBufferSize(-1); - connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); - connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KNetwork::KResolverEntry &))); - connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); - connect(m_socket, SIGNAL(destroyed()), this, SLOT(slotSocketDestroyed())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KNetwork::KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); + connect(m_socket, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotSocketDestroyed())); m_socket->connect(); emit active(false); kdDebug(24002) << k_funcinfo << ", proxy:" << server << ", " << service << endl; @@ -65,8 +65,8 @@ void DBGpNetwork::sessionStart(bool useproxy, const QString& server, const QStri m_server = new KNetwork::KServerSocket(service); m_server->setAddressReuseable(true); - connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); - connect(m_server, SIGNAL(gotError(int)), this, SLOT(slotError(int))); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); if(m_server->listen()) { @@ -91,7 +91,7 @@ void DBGpNetwork::sessionEnd() if(m_socket) { m_socket->flush(); - disconnect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); + disconnect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); if (m_socket) m_socket->close(); delete m_socket; @@ -146,7 +146,7 @@ void DBGpNetwork::slotReadyAccept() kdDebug(24002) << k_funcinfo << ", m_server: " << m_server << ", m_socket" << m_socket << endl; if(!m_socket) { - disconnect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + disconnect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); m_socket = (KNetwork::KStreamSocket *)m_server->accept(); // KSocketServer returns a KStreamSocket (!) if(m_socket) @@ -156,10 +156,10 @@ void DBGpNetwork::slotReadyAccept() m_socket->setAddressReuseable(true); // m_socket->setSocketFlags(KExtendedSocket::inetSocket | KExtendedSocket::inputBufferedSocket); // m_socket->setBufferSize(-1); - connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); - connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KResolverEntry &))); - connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); connected(); } else @@ -215,7 +215,7 @@ void DBGpNetwork::slotConnectionClosed() } if(m_server) - connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); // Disable all session related actions and enable connection action emit connected(false); @@ -242,7 +242,7 @@ void DBGpNetwork::slotReadyRead() while(m_socket && (m_socket->bytesAvailable() > 0 || m_fifo.length() >= (unsigned long)m_datalen)) { int bytes; - QString data; + TQString data; if(m_socket && m_socket->bytesAvailable() > 0 ) { @@ -282,18 +282,18 @@ void DBGpNetwork::slotReadyRead() } } -long DBGpNetwork::sendCommand(const QString & command) +long DBGpNetwork::sendCommand(const TQString & command) { return sendCommand(command, ""); } -long DBGpNetwork::sendCommand(const QString & command, const QString & arguments) +long DBGpNetwork::sendCommand(const TQString & command, const TQString & arguments) { if(!isConnected()) return false; m_transaction_id++; - QString commandline = command + QString(" -i %1").arg(m_transaction_id) + (!arguments.isEmpty() ? " " : "") + arguments; + TQString commandline = command + TQString(" -i %1").arg(m_transaction_id) + (!arguments.isEmpty() ? " " : "") + arguments; kdDebug(24002) << k_funcinfo << ", sending: " << commandline << endl; @@ -302,7 +302,7 @@ long DBGpNetwork::sendCommand(const QString & command, const QString & arguments return m_transaction_id; } -long DBGpNetwork::sendCommand( const QString & command, const QString & arguments, const QString & data ) +long DBGpNetwork::sendCommand( const TQString & command, const TQString & arguments, const TQString & data ) { QByteArrayFifo buffer; buffer.append(data.ascii(), data.length()); diff --git a/quanta/components/debugger/dbgp/dbgpnetwork.h b/quanta/components/debugger/dbgp/dbgpnetwork.h index 435dbc8e..96faca06 100644 --- a/quanta/components/debugger/dbgp/dbgpnetwork.h +++ b/quanta/components/debugger/dbgp/dbgpnetwork.h @@ -45,22 +45,22 @@ class DBGpNetwork : public QObject signals: void active(bool isOnline); void connected(bool isConnected); - void networkError(const QString &error, bool log); - void command(const QString& data); + void networkError(const TQString &error, bool log); + void command(const TQString& data); public: DBGpNetwork(); ~DBGpNetwork(); - virtual void sessionStart(bool useproxy, const QString& server, const QString & service); + virtual void sessionStart(bool useproxy, const TQString& server, const TQString & service); virtual void sessionEnd(); bool isConnected(); bool isActive(); - long sendCommand(const QString & command); - long sendCommand(const QString & command, const QString & arguments); - long sendCommand(const QString & command, const QString & arguments, const QString & data); + long sendCommand(const TQString & command); + long sendCommand(const TQString & command, const TQString & arguments); + long sendCommand(const TQString & command, const TQString & arguments, const TQString & data); public slots: // Socket slots diff --git a/quanta/components/debugger/dbgp/dbgpsettings.cpp b/quanta/components/debugger/dbgp/dbgpsettings.cpp index 80b7eaf1..e9bbc249 100644 --- a/quanta/components/debugger/dbgp/dbgpsettings.cpp +++ b/quanta/components/debugger/dbgp/dbgpsettings.cpp @@ -15,16 +15,16 @@ ***************************************************************************/ -#include "qlineedit.h" -#include "qcheckbox.h" +#include "tqlineedit.h" +#include "tqcheckbox.h" #include "dbgpsettings.h" #include -DBGpSettings::DBGpSettings(const QString &protocolversion) +DBGpSettings::DBGpSettings(const TQString &protocolversion) : DBGpSettingsS(0, "DBGpSettings", false, 0) { textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); - connect(checkLocalProject, SIGNAL(toggled(bool)), this, SLOT(slotLocalProjectToggle(bool))); + connect(checkLocalProject, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotLocalProjectToggle(bool))); } DBGpSettings::~DBGpSettings() diff --git a/quanta/components/debugger/dbgp/dbgpsettings.h b/quanta/components/debugger/dbgp/dbgpsettings.h index 4f2721ff..bdf8c2f0 100644 --- a/quanta/components/debugger/dbgp/dbgpsettings.h +++ b/quanta/components/debugger/dbgp/dbgpsettings.h @@ -24,7 +24,7 @@ class DBGpSettings : public DBGpSettingsS Q_OBJECT public: - DBGpSettings(const QString &protocolversion); + DBGpSettings(const TQString &protocolversion); ~DBGpSettings(); public slots: diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp index f8f14aab..4f8e72d8 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.cpp +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.cpp @@ -18,7 +18,7 @@ */ #include "qbytearrayfifo.h" -#include +#include #include QByteArrayFifo::QByteArrayFifo( ) @@ -27,10 +27,10 @@ QByteArrayFifo::QByteArrayFifo( ) m_array.resize(0); } -QString QByteArrayFifo::retrieve( ) +TQString QByteArrayFifo::retrieve( ) { // See if there's a null teminator somewhere - QString str(m_array); + TQString str(m_array); size_t size = str.length() + 1; // Decrease size and move bytes to the beginning of the array @@ -69,7 +69,7 @@ long QByteArrayFifo::find( char character ) return m_array.find(character); } -QString QByteArrayFifo::base64Encoded() +TQString QByteArrayFifo::base64Encoded() { return KCodecs::base64Encode(m_array); } diff --git a/quanta/components/debugger/dbgp/qbytearrayfifo.h b/quanta/components/debugger/dbgp/qbytearrayfifo.h index 04dc4b2f..851c7f34 100644 --- a/quanta/components/debugger/dbgp/qbytearrayfifo.h +++ b/quanta/components/debugger/dbgp/qbytearrayfifo.h @@ -20,8 +20,8 @@ #ifndef qbytearrayfifo_H #define qbytearrayfifo_H -#include -#include +#include +#include class QByteArrayFifo { @@ -29,13 +29,13 @@ class QByteArrayFifo public: QByteArrayFifo(); bool append(const char * chars, size_t size); - QString retrieve(); - QString base64Encoded(); + TQString retrieve(); + TQString base64Encoded(); long find(char character); size_t length() { return m_size; } private: - QByteArray m_array; + TQByteArray m_array; size_t m_size; }; diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp index 100ec9d3..d16319a9 100644 --- a/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp @@ -22,14 +22,14 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -49,7 +49,7 @@ K_EXPORT_COMPONENT_FACTORY( quantadebuggerdbgp, const char QuantaDebuggerDBGp::protocolversion[] = "1.0"; -QuantaDebuggerDBGp::QuantaDebuggerDBGp (QObject *parent, const char*, const QStringList&) +QuantaDebuggerDBGp::QuantaDebuggerDBGp (TQObject *parent, const char*, const TQStringList&) : DebuggerClient (parent, "DBGp") { // Create a socket object and set up its signals @@ -59,10 +59,10 @@ QuantaDebuggerDBGp::QuantaDebuggerDBGp (QObject *parent, const char*, const QStr setExecutionState(m_defaultExecutionState); emit updateStatus(DebuggerUI::NoSession); - connect(&m_network, SIGNAL(command(const QString&)), this, SLOT(processCommand(const QString&))); - connect(&m_network, SIGNAL(active(bool)), this, SLOT(slotNetworkActive(bool))); - connect(&m_network, SIGNAL(connected(bool)), this, SLOT(slotNetworkConnected(bool))); - connect(&m_network, SIGNAL(networkError(const QString &, bool)), this, SLOT(slotNetworkError(const QString &, bool))); + connect(&m_network, TQT_SIGNAL(command(const TQString&)), this, TQT_SLOT(processCommand(const TQString&))); + connect(&m_network, TQT_SIGNAL(active(bool)), this, TQT_SLOT(slotNetworkActive(bool))); + connect(&m_network, TQT_SIGNAL(connected(bool)), this, TQT_SLOT(slotNetworkConnected(bool))); + connect(&m_network, TQT_SIGNAL(networkError(const TQString &, bool)), this, TQT_SLOT(slotNetworkError(const TQString &, bool))); } @@ -124,7 +124,7 @@ void QuantaDebuggerDBGp::slotNetworkConnected(bool connected) } -void QuantaDebuggerDBGp::slotNetworkError(const QString &errormsg, bool log) +void QuantaDebuggerDBGp::slotNetworkError(const TQString &errormsg, bool log) { debuggerInterface()->showStatus(errormsg, log); } @@ -187,7 +187,7 @@ void QuantaDebuggerDBGp::setExecutionState( const State & state, bool forcesend } // Change executionstate of the script -void QuantaDebuggerDBGp::setExecutionState(const QString &state) +void QuantaDebuggerDBGp::setExecutionState(const TQString &state) { kdDebug(24002) << k_funcinfo << state << endl; @@ -249,19 +249,19 @@ const uint QuantaDebuggerDBGp::supports(DebuggerClientCapabilities::Capabilities // Process a dbgp command -void QuantaDebuggerDBGp::processCommand(const QString& datas) +void QuantaDebuggerDBGp::processCommand(const TQString& datas) { kdDebug(24002) << k_lineinfo << datas.left(50) << " (" << datas.length() << " bytes)" << endl; - QDomDocument data; + TQDomDocument data; data.setContent(datas); kdDebug(24002) << datas << endl; // Did we get a normal response? if(data.elementsByTagName("response").count() > 0) { - QDomNode response = data.elementsByTagName("response").item(0); - QString command = attribute(response, "command"); + TQDomNode response = data.elementsByTagName("response").item(0); + TQString command = attribute(response, "command"); // Status command if(command == "status") @@ -321,7 +321,7 @@ void QuantaDebuggerDBGp::processCommand(const QString& datas) } else if(data.elementsByTagName("init").count() > 0) { - QDomNode init = data.elementsByTagName("init").item(0); + TQDomNode init = data.elementsByTagName("init").item(0); initiateSession(init); return; } @@ -334,7 +334,7 @@ void QuantaDebuggerDBGp::processCommand(const QString& datas) } -void QuantaDebuggerDBGp::initiateSession(const QDomNode& initpacket) +void QuantaDebuggerDBGp::initiateSession(const TQDomNode& initpacket) { if(attribute(initpacket, "protocol_version") != protocolversion) { @@ -347,7 +347,7 @@ void QuantaDebuggerDBGp::initiateSession(const QDomNode& initpacket) endSession(); return; } - QString path = attribute(initpacket, "fileuri"); + TQString path = attribute(initpacket, "fileuri"); if (path.startsWith("file://")) { path.remove(0, 7); @@ -369,22 +369,22 @@ void QuantaDebuggerDBGp::initiateSession(const QDomNode& initpacket) m_network.sendCommand("feature_get", "-n quanta_initialized"); } -void QuantaDebuggerDBGp::stackShow(const QDomNode&node) +void QuantaDebuggerDBGp::stackShow(const TQDomNode&node) { bool foundlowlevel = false; BacktraceType type; - QString typestr; + TQString typestr; // Clear backtrace debuggerInterface()->backtraceClear(); // Add new one - for(QDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) + for(TQDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) { // Type isnt currently correct with xdebug // type = (attribute(child, "type") == "file" ? File : Eval); typestr = attribute(child, "filename"); - if(typestr.find(QRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) + if(typestr.find(TQRegExp(".*%28[0-9]+%29%20%3A%20eval")) >= 0) type = Eval; else type = File; @@ -409,10 +409,10 @@ void QuantaDebuggerDBGp::stackShow(const QDomNode&node) } -void QuantaDebuggerDBGp::checkSupport( const QDomNode & node ) +void QuantaDebuggerDBGp::checkSupport( const TQDomNode & node ) { - QString feature = attribute(node, "feature_name"); - QString data = node.nodeValue(); + TQString feature = attribute(node, "feature_name"); + TQString data = node.nodeValue(); if(feature == "supports_async") m_supportsasync = data.toLong(); @@ -430,7 +430,7 @@ void QuantaDebuggerDBGp::checkSupport( const QDomNode & node ) } -QString QuantaDebuggerDBGp::attribute(const QDomNode&node, const QString &attribute) +TQString QuantaDebuggerDBGp::attribute(const TQDomNode&node, const TQString &attribute) { return node.attributes().namedItem(attribute).nodeValue(); } @@ -448,12 +448,12 @@ void QuantaDebuggerDBGp::debuggingState(bool enable) void QuantaDebuggerDBGp::sendWatches() { - for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + for(TQValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) m_network.sendCommand("property_get", "-n " + (*it)); } // Return name of debugger -QString QuantaDebuggerDBGp::getName() +TQString QuantaDebuggerDBGp::getName() { return "DBGp"; // no i18n on the name } @@ -462,7 +462,7 @@ QString QuantaDebuggerDBGp::getName() // Send HTTP Request void QuantaDebuggerDBGp::request() { - QString request; + TQString request; request = debuggerInterface()->activeFileParts(m_startsession); //if(request.startsWith(m_localBasedir, false)) @@ -525,7 +525,7 @@ void QuantaDebuggerDBGp::pause() // Add a breakpoint void QuantaDebuggerDBGp::addBreakpoint (DebuggerBreakpoint* breakpoint) { - QString type; + TQString type; if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) type = "line"; else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) @@ -537,20 +537,20 @@ void QuantaDebuggerDBGp::addBreakpoint (DebuggerBreakpoint* breakpoint) "breakpoint_set", "-t " + type + " -f " + mapLocalPathToServer(breakpoint->filePath()) + - " -n " + QString::number(breakpoint->line() + 1) + " -n " + TQString::number(breakpoint->line() + 1) , breakpoint->condition()); - breakpoint->setKey(QString("id %1").arg(id)); + breakpoint->setKey(TQString("id %1").arg(id)); } -void QuantaDebuggerDBGp::setBreakpointKey( const QDomNode & response ) +void QuantaDebuggerDBGp::setBreakpointKey( const TQDomNode & response ) { long id; id = attribute(response, "transaction_id").toLong(); if(id > 0) { - QString oldkey = QString("id %1").arg(id); + TQString oldkey = TQString("id %1").arg(id); DebuggerBreakpoint *bp = debuggerInterface()->findDebuggerBreakpoint(oldkey); if(bp) debuggerInterface()->updateBreakpointKey(*bp, attribute(response, "id")); @@ -565,13 +565,13 @@ void QuantaDebuggerDBGp::removeBreakpoint(DebuggerBreakpoint* bp) } // A file was opened... -void QuantaDebuggerDBGp::fileOpened(const QString&) +void QuantaDebuggerDBGp::fileOpened(const TQString&) { // sendCommand("reinitialize", 0); } // Watch a variable -void QuantaDebuggerDBGp::addWatch(const QString & variable) +void QuantaDebuggerDBGp::addWatch(const TQString & variable) { if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); @@ -602,10 +602,10 @@ void QuantaDebuggerDBGp::showCondition(const StringMap &) } // Read configuration -void QuantaDebuggerDBGp::readConfig(QDomNode node) +void QuantaDebuggerDBGp::readConfig(TQDomNode node) { // Server - QDomNode valuenode = node.namedItem("serverhost"); + TQDomNode valuenode = node.namedItem("serverhost"); m_serverHost = valuenode.firstChild().nodeValue(); if(m_serverHost.isEmpty()) m_serverHost = "localhost"; @@ -670,7 +670,7 @@ void QuantaDebuggerDBGp::readConfig(QDomNode node) // Show configuration -void QuantaDebuggerDBGp::showConfig(QDomNode node) +void QuantaDebuggerDBGp::showConfig(TQDomNode node) { DBGpSettings set(protocolversion); @@ -699,9 +699,9 @@ void QuantaDebuggerDBGp::showConfig(QDomNode node) if(m_profilerMapFilename) set.checkProfilerMapFilename->setChecked(true); - if(set.exec() == QDialog::Accepted ) + if(set.exec() == TQDialog::Accepted ) { - QDomElement el; + TQDomElement el; el = node.namedItem("localproject").toElement(); if (!el.isNull()) @@ -785,7 +785,7 @@ void QuantaDebuggerDBGp::showConfig(QDomNode node) + (set.checkBreakOnUserWarning->isChecked() ? QuantaDebuggerDBGp::User_Warning : 0) + (set.checkBreakOnUserError->isChecked() ? QuantaDebuggerDBGp::User_Error : 0); kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; - el.appendChild( node.ownerDocument().createTextNode(QString::number(m_errormask))); + el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_errormask))); // Profiler el = node.namedItem("profilerfilename").toElement(); @@ -815,14 +815,14 @@ void QuantaDebuggerDBGp::showConfig(QDomNode node) } // Map a server filepath to a local one using project settings -QString QuantaDebuggerDBGp::mapServerPathToLocal(const QString& serverpath) +TQString QuantaDebuggerDBGp::mapServerPathToLocal(const TQString& serverpath) { // Translate filename from server to local return debuggerInterface()->Mapper()->mapServerPathToLocal(serverpath); } // Map a local filepath to a server one using project settings -QString QuantaDebuggerDBGp::mapLocalPathToServer(const QString& localpath) +TQString QuantaDebuggerDBGp::mapLocalPathToServer(const TQString& localpath) { // Translate filename from local to server return debuggerInterface()->Mapper()->mapLocalPathToServer(localpath); @@ -832,7 +832,7 @@ void QuantaDebuggerDBGp::variableSetValue(const DebuggerVariable &variable) { m_network.sendCommand("property_set", "-n " + variable.name(), variable.value()); - for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + for(TQValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) if((*it) == variable.name()) { m_network.sendCommand("property_get", "-n " + variable.name(), variable.value()); @@ -849,14 +849,14 @@ void QuantaDebuggerDBGp::profilerOpen() void QuantaDebuggerDBGp::profilerOpen(bool forceopen) { - QString profileroutput = m_profilerFilename; + TQString profileroutput = m_profilerFilename; profileroutput.replace("%a", m_appid); profileroutput.replace("%c", m_initialscript); if(m_profilerMapFilename) profileroutput = mapServerPathToLocal( profileroutput); - bool exists = QFile::exists(profileroutput); + bool exists = TQFile::exists(profileroutput); if(m_profilerAutoOpen || forceopen) { if(exists) @@ -878,7 +878,7 @@ void QuantaDebuggerDBGp::profilerOpen(bool forceopen) } } -void QuantaDebuggerDBGp::typemapSetup( const QDomNode & typemapnode ) +void QuantaDebuggerDBGp::typemapSetup( const TQDomNode & typemapnode ) { /* @@ -902,7 +902,7 @@ void QuantaDebuggerDBGp::typemapSetup( const QDomNode & typemapnode ) // m_variabletypes["object"] = "object"; // m_variabletypes["resource"] = "resource"; - QDomNode child = typemapnode.firstChild(); + TQDomNode child = typemapnode.firstChild(); while(!child.isNull()) { if(child.nodeName() == "map") @@ -914,12 +914,12 @@ void QuantaDebuggerDBGp::typemapSetup( const QDomNode & typemapnode ) } -void QuantaDebuggerDBGp::showWatch( const QDomNode & variablenode) +void QuantaDebuggerDBGp::showWatch( const TQDomNode & variablenode) { debuggerInterface()->showVariable(buildVariable(variablenode.firstChild())); } -void QuantaDebuggerDBGp::propertySetResponse( const QDomNode & setnode) +void QuantaDebuggerDBGp::propertySetResponse( const TQDomNode & setnode) { if(attribute(setnode, "success") == "0") { @@ -928,7 +928,7 @@ void QuantaDebuggerDBGp::propertySetResponse( const QDomNode & setnode) } -DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const QDomNode & variablenode) +DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const TQDomNode & variablenode) { /* Sample: @@ -946,44 +946,44 @@ DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const QDomNode & variableno */ - QString name = attribute(variablenode, "name"); - QString type = m_variabletypes[attribute(variablenode, "type")]; + TQString name = attribute(variablenode, "name"); + TQString type = m_variabletypes[attribute(variablenode, "type")]; if(type == "int") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Integer); } else if (type == "string") { - QCString value = QCString(variablenode.firstChild().nodeValue()); + TQCString value = TQCString(variablenode.firstChild().nodeValue()); value = KCodecs::base64Decode(value); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::String); } else if (type == "bool") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Boolean); } else if (type == "resource") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Resource); } else if (type == "float") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, value, DebuggerVariableTypes::Float); } else if (type == "null") { - QString value = variablenode.firstChild().nodeValue(); + TQString value = variablenode.firstChild().nodeValue(); return debuggerInterface()->newDebuggerVariable( name, "", DebuggerVariableTypes::Undefined); } else if (type == "hash" || type == "array" || type == "object") { - QDomNode child = variablenode.firstChild(); - QPtrList vars ; + TQDomNode child = variablenode.firstChild(); + TQPtrList vars ; while(!child.isNull()) { DebuggerVariable* var = buildVariable( child); @@ -1001,12 +1001,12 @@ DebuggerVariable* QuantaDebuggerDBGp::buildVariable( const QDomNode & variableno return debuggerInterface()->newDebuggerVariable(name, "", DebuggerVariableTypes::Error);; } -void QuantaDebuggerDBGp::handleError(const QDomNode & statusnode ) +void QuantaDebuggerDBGp::handleError(const TQDomNode & statusnode ) { if(attribute(statusnode, "reason") == "error" || attribute(statusnode, "reason") == "aborted") { - QDomNode errornode = statusnode.firstChild(); + TQDomNode errornode = statusnode.firstChild(); while(!errornode.isNull()) { if(errornode.nodeName() == "error") diff --git a/quanta/components/debugger/dbgp/quantadebuggerdbgp.h b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h index fd8eda22..7c9601ad 100644 --- a/quanta/components/debugger/dbgp/quantadebuggerdbgp.h +++ b/quanta/components/debugger/dbgp/quantadebuggerdbgp.h @@ -19,22 +19,22 @@ #include #include -#include +#include #include -#include +#include #include "debuggerclient.h" #include "dbgpnetwork.h" -typedef QValueList WatchList; -typedef QMap StringMap; +typedef TQValueList WatchList; +typedef TQMap StringMap; class QuantaDebuggerDBGp : public DebuggerClient { Q_OBJECT public: - QuantaDebuggerDBGp(QObject *parent, const char* name, const QStringList&); + QuantaDebuggerDBGp(TQObject *parent, const char* name, const TQStringList&); ~QuantaDebuggerDBGp(); // Execution states @@ -70,7 +70,7 @@ class QuantaDebuggerDBGp : public DebuggerClient void stepOut(); void pause(); void kill(); - void setExecutionState(const QString &state); + void setExecutionState(const TQString &state); void setExecutionState(const State &state, bool forcesend = false); // Connection @@ -78,17 +78,17 @@ class QuantaDebuggerDBGp : public DebuggerClient void endSession(); // Return name of debugger - QString getName(); + TQString getName(); // Initiation - void checkSupport(const QDomNode&node); + void checkSupport(const TQDomNode&node); // New file opened in quanta - void fileOpened(const QString& file); + void fileOpened(const TQString& file); // Settings - void readConfig(QDomNode node); - void showConfig(QDomNode node); + void readConfig(TQDomNode node); + void showConfig(TQDomNode node); // Breakpoints void addBreakpoint(DebuggerBreakpoint* breakpoint); @@ -96,26 +96,26 @@ class QuantaDebuggerDBGp : public DebuggerClient void showCondition(const StringMap &args); // Variables - void addWatch(const QString &variable); + void addWatch(const TQString &variable); void removeWatch(DebuggerVariable *var); void variableSetValue(const DebuggerVariable &variable); - void propertySetResponse( const QDomNode & setnode); + void propertySetResponse( const TQDomNode & setnode); // Call stack - void stackShow(const QDomNode&node); + void stackShow(const TQDomNode&node); private: DBGpNetwork m_network; - QString m_serverBasedir; - QString m_localBasedir; - QString m_serverPort; - QString m_serverHost; - QString m_startsession; - QString m_listenPort; - QString m_profilerFilename; - QString m_appid; - QString m_initialscript; + TQString m_serverBasedir; + TQString m_localBasedir; + TQString m_serverPort; + TQString m_serverHost; + TQString m_startsession; + TQString m_listenPort; + TQString m_profilerFilename; + TQString m_appid; + TQString m_initialscript; bool m_useproxy; bool m_profilerAutoOpen; @@ -135,19 +135,19 @@ class QuantaDebuggerDBGp : public DebuggerClient void debuggingState(bool enable); void connected(); - void handleError(const QDomNode & statusnode ); + void handleError(const TQDomNode & statusnode ); - QString mapServerPathToLocal(const QString& serverpath); - QString mapLocalPathToServer(const QString& localpath); - QString bpToDBGp(DebuggerBreakpoint* breakpoint); - void setBreakpointKey(const QDomNode& response); + TQString mapServerPathToLocal(const TQString& serverpath); + TQString mapLocalPathToServer(const TQString& localpath); + TQString bpToDBGp(DebuggerBreakpoint* breakpoint); + void setBreakpointKey(const TQDomNode& response); - QString attribute(const QDomNode&node, const QString &attribute); - void initiateSession(const QDomNode& initpacket); + TQString attribute(const TQDomNode&node, const TQString &attribute); + void initiateSession(const TQDomNode& initpacket); - void typemapSetup(const QDomNode& typemapnode); - void showWatch(const QDomNode& typemapnode); - DebuggerVariable* buildVariable(const QDomNode& typemapnode); + void typemapSetup(const TQDomNode& typemapnode); + void showWatch(const TQDomNode& typemapnode); + DebuggerVariable* buildVariable(const TQDomNode& typemapnode); // Profiler void profilerOpen(bool forceopen); @@ -156,8 +156,8 @@ class QuantaDebuggerDBGp : public DebuggerClient public slots: void slotNetworkActive(bool active); void slotNetworkConnected(bool connected); - void slotNetworkError(const QString &errormsg, bool log); - void processCommand(const QString&); + void slotNetworkError(const TQString &errormsg, bool log); + void processCommand(const TQString&); signals: void updateStatus(DebuggerUI::DebuggerStatus); diff --git a/quanta/components/debugger/debuggerbreakpoint.cpp b/quanta/components/debugger/debuggerbreakpoint.cpp index ae8ed6cb..d19c299d 100644 --- a/quanta/components/debugger/debuggerbreakpoint.cpp +++ b/quanta/components/debugger/debuggerbreakpoint.cpp @@ -47,7 +47,7 @@ DebuggerBreakpoint::DebuggerBreakpoint( const DebuggerBreakpoint * bp ) } -DebuggerBreakpoint::DebuggerBreakpoint(const QString& filePath, int line) +DebuggerBreakpoint::DebuggerBreakpoint(const TQString& filePath, int line) { m_filePath = filePath; m_line = line; @@ -56,8 +56,8 @@ DebuggerBreakpoint::DebuggerBreakpoint(const QString& filePath, int line) } DebuggerBreakpoint::DebuggerBreakpoint(const Types type, - const QString& conditionExpr, const QString& filePath, - const QString& inClass, const QString& inFunction) + const TQString& conditionExpr, const TQString& filePath, + const TQString& inClass, const TQString& inFunction) { m_conditionExpr = conditionExpr; m_filePath = filePath; @@ -71,17 +71,17 @@ DebuggerBreakpoint::DebuggerBreakpoint(const Types type, DebuggerBreakpoint::~DebuggerBreakpoint() {} -void DebuggerBreakpoint::setFilePath(const QString& filePath) +void DebuggerBreakpoint::setFilePath(const TQString& filePath) { m_filePath = filePath; } -void DebuggerBreakpoint::setClass(const QString& newclass) +void DebuggerBreakpoint::setClass(const TQString& newclass) { m_class = newclass; } -void DebuggerBreakpoint::setFunction(const QString& function) +void DebuggerBreakpoint::setFunction(const TQString& function) { m_function = function; } @@ -91,12 +91,12 @@ void DebuggerBreakpoint::setLine(int line) m_line = line; } -void DebuggerBreakpoint::setCondition(const QString& expression) +void DebuggerBreakpoint::setCondition(const TQString& expression) { m_conditionExpr = expression; } -void DebuggerBreakpoint::setValue(const QString& value) +void DebuggerBreakpoint::setValue(const TQString& value) { m_value = value; } @@ -111,31 +111,31 @@ void DebuggerBreakpoint::setType(DebuggerBreakpoint::Types type ) m_type = type; } -void DebuggerBreakpoint::setKey(const QString& value) +void DebuggerBreakpoint::setKey(const TQString& value) { m_key = value; } -const QString& DebuggerBreakpoint::key() const +const TQString& DebuggerBreakpoint::key() const { return m_key; } -const QString& DebuggerBreakpoint::filePath() const +const TQString& DebuggerBreakpoint::filePath() const { return m_filePath; } -const QString& DebuggerBreakpoint::value() const +const TQString& DebuggerBreakpoint::value() const { return m_value; } -const QString& DebuggerBreakpoint::inClass() const +const TQString& DebuggerBreakpoint::inClass() const { return m_class; } -const QString& DebuggerBreakpoint::inFunction() const +const TQString& DebuggerBreakpoint::inFunction() const { return m_function; } @@ -150,7 +150,7 @@ int DebuggerBreakpoint::line() const return m_line; } -const QString& DebuggerBreakpoint::condition() const +const TQString& DebuggerBreakpoint::condition() const { return m_conditionExpr; } diff --git a/quanta/components/debugger/debuggerbreakpoint.h b/quanta/components/debugger/debuggerbreakpoint.h index 46e0950d..2be6c4f8 100644 --- a/quanta/components/debugger/debuggerbreakpoint.h +++ b/quanta/components/debugger/debuggerbreakpoint.h @@ -17,7 +17,7 @@ #ifndef DEBUGGERBREAKPOINT_H #define DEBUGGERBREAKPOINT_H -#include +#include class DebuggerBreakpoint @@ -41,45 +41,45 @@ class DebuggerBreakpoint DebuggerBreakpoint(); DebuggerBreakpoint(const DebuggerBreakpoint& bp); DebuggerBreakpoint(const DebuggerBreakpoint* bp); - DebuggerBreakpoint(const QString& filePath, int line); // Line BP + DebuggerBreakpoint(const TQString& filePath, int line); // Line BP DebuggerBreakpoint(const DebuggerBreakpoint::Types type, // Any kind - const QString& conditionExpr, const QString& filePath = "", - const QString& inClass = "", const QString& inFunction = ""); + const TQString& conditionExpr, const TQString& filePath = "", + const TQString& inClass = "", const TQString& inFunction = ""); virtual ~DebuggerBreakpoint(); - virtual void setFunction(const QString& filePath); - virtual void setClass(const QString& filePath); - virtual void setFilePath(const QString& filePath); + virtual void setFunction(const TQString& filePath); + virtual void setClass(const TQString& filePath); + virtual void setFilePath(const TQString& filePath); virtual void setLine(int line); - virtual void setCondition(const QString& expression); + virtual void setCondition(const TQString& expression); virtual void setState(int state); virtual void setType(Types type); - virtual void setValue(const QString& value); - virtual void setKey(const QString& value); + virtual void setValue(const TQString& value); + virtual void setKey(const TQString& value); - virtual const QString& filePath() const; - virtual const QString& inClass() const; - virtual const QString& inFunction() const; + virtual const TQString& filePath() const; + virtual const TQString& inClass() const; + virtual const TQString& inFunction() const; virtual int line() const; - virtual const QString& condition() const; + virtual const TQString& condition() const; virtual int state() const; virtual DebuggerBreakpoint::Types type() const; - virtual const QString& value() const; - virtual const QString& key() const; + virtual const TQString& value() const; + virtual const TQString& key() const; bool operator == (DebuggerBreakpoint) const; protected: - QString m_filePath; - QString m_class; - QString m_function; + TQString m_filePath; + TQString m_class; + TQString m_function; int m_line; - QString m_conditionExpr; + TQString m_conditionExpr; int m_state; Types m_type; - QString m_value; - QString m_key; + TQString m_value; + TQString m_key; }; #endif diff --git a/quanta/components/debugger/debuggerbreakpointlist.cpp b/quanta/components/debugger/debuggerbreakpointlist.cpp index ba117965..6a47d296 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.cpp +++ b/quanta/components/debugger/debuggerbreakpointlist.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include +#include #include #include @@ -76,7 +76,7 @@ void DebuggerBreakpointList::remove(DebuggerBreakpoint* bp) -DebuggerBreakpoint* DebuggerBreakpointList::retrieve(const QString& filePath, int line) +DebuggerBreakpoint* DebuggerBreakpointList::retrieve(const TQString& filePath, int line) { BreakpointList_t::iterator it; @@ -162,7 +162,7 @@ DebuggerBreakpoint* DebuggerBreakpointList::next() } } -DebuggerBreakpoint * DebuggerBreakpointList::findDebuggerBreakpoint( const QString & key ) +DebuggerBreakpoint * DebuggerBreakpointList::findDebuggerBreakpoint( const TQString & key ) { BreakpointList_t::iterator it; for(it = m_breakpointList->begin(); it != m_breakpointList->end(); ++it) @@ -176,7 +176,7 @@ DebuggerBreakpoint * DebuggerBreakpointList::findDebuggerBreakpoint( const QStri return NULL; } -void DebuggerBreakpointList::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +void DebuggerBreakpointList::updateBreakpointKey( const DebuggerBreakpoint & bp, const TQString & newkey ) { //DebuggerBreakpoint *bpp = new DebuggerBreakpoint(bp); BreakpointList_t::iterator it; diff --git a/quanta/components/debugger/debuggerbreakpointlist.h b/quanta/components/debugger/debuggerbreakpointlist.h index 4ca26a95..aa6cd803 100644 --- a/quanta/components/debugger/debuggerbreakpointlist.h +++ b/quanta/components/debugger/debuggerbreakpointlist.h @@ -18,12 +18,12 @@ #ifndef DEBUGGERBREAKPOINTLIST_H #define DEBUGGERBREAKPOINTLIST_H -#include -#include -#include +#include +#include +#include class DebuggerBreakpoint; - typedef QValueList BreakpointList_t; + typedef TQValueList BreakpointList_t; class DebuggerBreakpointList { @@ -39,15 +39,15 @@ class DebuggerBreakpointList void add(DebuggerBreakpoint*); void remove(DebuggerBreakpoint*); - //int remove(QString filePath, int line); + //int remove(TQString filePath, int line); void clear(); bool exists(DebuggerBreakpoint*); - //bool exists(QString filePath, int line); + //bool exists(TQString filePath, int line); - DebuggerBreakpoint* retrieve(const QString& filePath, int line); + DebuggerBreakpoint* retrieve(const TQString& filePath, int line); - DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); - void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& newkey); size_t count(); void rewind(); diff --git a/quanta/components/debugger/debuggerbreakpointview.cpp b/quanta/components/debugger/debuggerbreakpointview.cpp index 2f7eea36..8614bc28 100644 --- a/quanta/components/debugger/debuggerbreakpointview.cpp +++ b/quanta/components/debugger/debuggerbreakpointview.cpp @@ -52,7 +52,7 @@ DebuggerBreakpointViewItem::DebuggerBreakpointViewItem(DebuggerBreakpointView* v } -DebuggerBreakpointView::DebuggerBreakpointView(QWidget *parent, const char *name) +DebuggerBreakpointView::DebuggerBreakpointView(TQWidget *parent, const char *name) : KListView(parent, name) { // If you change here, change the DebuggerBreakpointViewColumns enums above @@ -63,16 +63,16 @@ DebuggerBreakpointView::DebuggerBreakpointView(QWidget *parent, const char *name addColumn(i18n("Line")); addColumn(i18n("Value")); - setResizeMode(QListView::AllColumns); + setResizeMode(TQListView::AllColumns); setAllColumnsShowFocus(true); m_breakpointPopup = new KPopupMenu(this); - m_breakpointPopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, SLOT(slotRemoveSelected())); + m_breakpointPopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, TQT_SLOT(slotRemoveSelected())); - connect(this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT(slotBreakpointContextMenu(KListView *, QListViewItem *, const QPoint &))); + connect(this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), this, TQT_SLOT(slotBreakpointContextMenu(KListView *, TQListViewItem *, const TQPoint &))); // Jump to bp - connect(this, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int) ), this, SLOT(slotBreakpointDoubleClick( QListViewItem *, const QPoint &, int))); + connect(this, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int) ), this, TQT_SLOT(slotBreakpointDoubleClick( TQListViewItem *, const TQPoint &, int))); } @@ -81,7 +81,7 @@ DebuggerBreakpointView::~DebuggerBreakpointView() void DebuggerBreakpointView::deleteBreakpoint(const DebuggerBreakpoint &bp) { - QListViewItem *item = findBreakpoint(bp, false); + TQListViewItem *item = findBreakpoint(bp, false); if(item) { delete item; @@ -91,14 +91,14 @@ void DebuggerBreakpointView::deleteBreakpoint(const DebuggerBreakpoint &bp) void DebuggerBreakpointView::showBreakpoint(const DebuggerBreakpoint &bp) { - QListViewItem *item = findBreakpoint(bp); + TQListViewItem *item = findBreakpoint(bp); if(!item) return; if(bp.type() == DebuggerBreakpoint::LineBreakpoint) { item->setText(DebuggerBreakpointViewColumns::Value, ""); - item->setText(DebuggerBreakpointViewColumns::Line, QString::number(bp.line() + 1)); + item->setText(DebuggerBreakpointViewColumns::Line, TQString::number(bp.line() + 1)); } else { @@ -111,7 +111,7 @@ void DebuggerBreakpointView::showBreakpoint(const DebuggerBreakpoint &bp) item->setText(DebuggerBreakpointViewColumns::Function, bp.inFunction()); } -QListViewItem* DebuggerBreakpointView::findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist) +TQListViewItem* DebuggerBreakpointView::findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist) { // Find the old item if its there DebuggerBreakpointViewItem* item = dynamic_cast(firstChild()); @@ -152,7 +152,7 @@ void DebuggerBreakpointView::slotRemoveSelected() emit removeBreakpoint(&bp); } -void DebuggerBreakpointView::keyPressEvent(QKeyEvent *e) +void DebuggerBreakpointView::keyPressEvent(TQKeyEvent *e) { if(e->key() != Qt::Key_Delete) { @@ -168,7 +168,7 @@ void DebuggerBreakpointView::clear() KListView::clear(); } -void DebuggerBreakpointView::slotBreakpointDoubleClick(QListViewItem *item, const QPoint &, int ) +void DebuggerBreakpointView::slotBreakpointDoubleClick(TQListViewItem *item, const TQPoint &, int ) { if(!item) return; @@ -182,7 +182,7 @@ void DebuggerBreakpointView::slotBreakpointDoubleClick(QListViewItem *item, cons } -void DebuggerBreakpointView::slotBreakpointContextMenu(KListView *, QListViewItem *, const QPoint& point) +void DebuggerBreakpointView::slotBreakpointContextMenu(KListView *, TQListViewItem *, const TQPoint& point) { if(!selectedItem()) return; diff --git a/quanta/components/debugger/debuggerbreakpointview.h b/quanta/components/debugger/debuggerbreakpointview.h index 1e3ca087..196cd451 100644 --- a/quanta/components/debugger/debuggerbreakpointview.h +++ b/quanta/components/debugger/debuggerbreakpointview.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include "debuggerbreakpoint.h" // class DebuggerBreakpoint; @@ -46,7 +46,7 @@ class DebuggerBreakpointView : public KListView Q_OBJECT public: - DebuggerBreakpointView(QWidget *parent = 0, const char *name = 0); + DebuggerBreakpointView(TQWidget *parent = 0, const char *name = 0); ~DebuggerBreakpointView(); void showBreakpoint(const DebuggerBreakpoint& bp); @@ -58,15 +58,15 @@ class DebuggerBreakpointView : public KListView public slots: void slotRemoveSelected(); - void slotBreakpointContextMenu(KListView *list, QListViewItem * item, const QPoint& point); - void slotBreakpointDoubleClick(QListViewItem *item, const QPoint &point, int column); + void slotBreakpointContextMenu(KListView *list, TQListViewItem * item, const TQPoint& point); + void slotBreakpointDoubleClick(TQListViewItem *item, const TQPoint &point, int column); signals: void removeBreakpoint(DebuggerBreakpoint*); private: - void keyPressEvent(QKeyEvent *e); - QListViewItem* findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist = true); + void keyPressEvent(TQKeyEvent *e); + TQListViewItem* findBreakpoint(const DebuggerBreakpoint& bp, bool addIfNotExist = true); KPopupMenu *m_breakpointPopup; }; diff --git a/quanta/components/debugger/debuggermanager.cpp b/quanta/components/debugger/debuggermanager.cpp index bbc6336c..4c5aaa58 100644 --- a/quanta/components/debugger/debuggermanager.cpp +++ b/quanta/components/debugger/debuggermanager.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "quanta.h" #include "document.h" @@ -49,8 +49,8 @@ // dialogs #include "debuggervariablesets.h" -DebuggerManager::DebuggerManager(QObject *myparent) - : QObject(myparent) +DebuggerManager::DebuggerManager(TQObject *myparent) + : TQObject(myparent) { initActions(); @@ -62,12 +62,12 @@ DebuggerManager::DebuggerManager(QObject *myparent) m_client = NULL; } -void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KURL &, const KURL &) +void DebuggerManager::slotNewProjectLoaded(const TQString &projectname, const KURL &, const KURL &) { if(m_client) { - disconnect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + disconnect(m_client, TQT_SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, TQT_SLOT(slotStatus(DebuggerUI::DebuggerStatus))); delete m_client; m_client = NULL; @@ -98,8 +98,8 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR int errCode = 0; //Workaround for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2 //The correct way should be a simple: -// m_client = KParts::ComponentFactory::createInstanceFromService(service, this, 0, QStringList(), &errCode); - QObject* obj = KParts::ComponentFactory::createInstanceFromService(service, this, 0, QStringList(), &errCode); +// m_client = KParts::ComponentFactory::createInstanceFromService(service, this, 0, TQStringList(), &errCode); + TQObject* obj = KParts::ComponentFactory::createInstanceFromService(service, this, 0, TQStringList(), &errCode); if (obj && obj->inherits("DebuggerClient")) m_client = static_cast(obj); @@ -118,10 +118,10 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR // Tell client to load its settings if (m_client) { - QDomNode nodeThisDbg; - QDomDocument *dom = Project::ref()->sessionDom(); - QDomNode projectNode = dom->firstChild().firstChild(); - QDomNode nodeDbg = projectNode.namedItem("debuggers"); + TQDomNode nodeThisDbg; + TQDomDocument *dom = Project::ref()->sessionDom(); + TQDomNode projectNode = dom->firstChild().firstChild(); + TQDomNode nodeDbg = projectNode.namedItem("debuggers"); if(nodeDbg.isNull()) { nodeDbg = dom->createElement("debuggers"); @@ -143,15 +143,15 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR // recreate UI m_debuggerui = new DebuggerUI(this, "debuggerui"); - connect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + connect(m_client, TQT_SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, TQT_SLOT(slotStatus(DebuggerUI::DebuggerStatus))); // Load saved breakpoints if(Project::ref()->debuggerPersistentBreakpoints()) { - QDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); + TQDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); if(!nodeBreakpoints.isNull()) { - QDomNode child = nodeBreakpoints.firstChild(); + TQDomNode child = nodeBreakpoints.firstChild(); while(!child.isNull()) { DebuggerBreakpoint* bp = new DebuggerBreakpoint(); @@ -180,13 +180,13 @@ void DebuggerManager::slotNewProjectLoaded(const QString &projectname, const KUR // Load saved Watches if(Project::ref()->debuggerPersistentWatches()) { - QDomNode nodeWatches = nodeDbg.namedItem("watches"); + TQDomNode nodeWatches = nodeDbg.namedItem("watches"); if(!nodeWatches.isNull()) { - QDomNode child = nodeWatches.firstChild(); + TQDomNode child = nodeWatches.firstChild(); while(!child.isNull()) { - QString watch = child.attributes().namedItem("name").nodeValue(); + TQString watch = child.attributes().namedItem("name").nodeValue(); DebuggerVariable *var = new DebuggerVariable(watch, "", DebuggerVariableTypes::Undefined); m_debuggerui->addVariable(var); m_client->addWatch(watch); @@ -212,65 +212,65 @@ void DebuggerManager::initActions() return; //Debugger, breakpoint - newaction = new KAction(i18n("Toggle &Breakpoint"), SmallIcon("debug_breakpoint"), Qt::CTRL+Qt::SHIFT+Qt::Key_B, this, SLOT(toggleBreakpoint()), ac, "debug_breakpoints_toggle"); + newaction = new KAction(i18n("Toggle &Breakpoint"), SmallIcon("debug_breakpoint"), Qt::CTRL+Qt::SHIFT+Qt::Key_B, this, TQT_SLOT(toggleBreakpoint()), ac, "debug_breakpoints_toggle"); newaction->setToolTip(i18n("Toggles a breakpoint at the current cursor location")); - newaction = new KAction(i18n("&Clear Breakpoints"), 0, this, SLOT(clearBreakpoints()), ac, "debug_breakpoints_clear"); + newaction = new KAction(i18n("&Clear Breakpoints"), 0, this, TQT_SLOT(clearBreakpoints()), ac, "debug_breakpoints_clear"); newaction->setToolTip(i18n("Clears all breakpoints")); - newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_break"); + newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, TQT_SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_break"); newaction->setToolTip(i18n("Adds a new conditional breakpoint")); - newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_breakdialog"); + newaction = new KAction(i18n("Break When..."), SmallIcon("math_int"), 0, this, TQT_SLOT(slotConditionalBreakpoint()), ac, "debug_conditional_breakdialog"); newaction->setToolTip(i18n("Adds a new conditional breakpoint")); // Execution - newaction = new KAction(i18n("Send HTTP R&equest"), SmallIcon("debug_currentline"), 0, this, SLOT(slotDebugRequest()), ac, "debug_request"); + newaction = new KAction(i18n("Send HTTP R&equest"), SmallIcon("debug_currentline"), 0, this, TQT_SLOT(slotDebugRequest()), ac, "debug_request"); newaction->setToolTip(i18n("Initiate HTTP Request to the server with debugging activated")); - newaction = new KAction(i18n("&Trace"), SmallIcon("debug_run"), 0, this, SLOT(slotDebugTrace()), ac, "debug_trace"); + newaction = new KAction(i18n("&Trace"), SmallIcon("debug_run"), 0, this, TQT_SLOT(slotDebugTrace()), ac, "debug_trace"); newaction->setToolTip(i18n("Traces through the script. If a script is currently not being debugged, it will start in trace mode when started")); - newaction = new KAction(i18n("&Run"), SmallIcon("debug_leap"), 0, this, SLOT(slotDebugRun()), ac, "debug_run"); + newaction = new KAction(i18n("&Run"), SmallIcon("debug_leap"), 0, this, TQT_SLOT(slotDebugRun()), ac, "debug_run"); newaction->setToolTip(i18n("Runs the script. If a script is currently not being debugged, it will start in run mode when started")); - newaction = new KAction(i18n("&Step"), SmallIcon("debug_stepover"), 0, this, SLOT(slotDebugStepOver()), ac, "debug_stepover"); + newaction = new KAction(i18n("&Step"), SmallIcon("debug_stepover"), 0, this, TQT_SLOT(slotDebugStepOver()), ac, "debug_stepover"); newaction->setToolTip(i18n("Executes the next line of execution, but does not step into functions or includes")); - newaction = new KAction(i18n("Step &Into"), SmallIcon("debug_stepinto"), 0, this, SLOT(slotDebugStepInto()), ac, "debug_stepinto"); + newaction = new KAction(i18n("Step &Into"), SmallIcon("debug_stepinto"), 0, this, TQT_SLOT(slotDebugStepInto()), ac, "debug_stepinto"); newaction->setToolTip(i18n("Executes the next line of execution and steps into it if it is a function call or inclusion of a file")); - newaction = new KAction(i18n("S&kip"), SmallIcon("debug_skip"), 0, this, SLOT(slotDebugSkip()), ac, "debug_skip"); + newaction = new KAction(i18n("S&kip"), SmallIcon("debug_skip"), 0, this, TQT_SLOT(slotDebugSkip()), ac, "debug_skip"); newaction->setToolTip(i18n("Skips the next command of execution and makes the next command the current one")); - newaction = new KAction(i18n("Step &Out"), SmallIcon("debug_stepout"), 0, this, SLOT(slotDebugStepOut()), ac, "debug_stepout"); + newaction = new KAction(i18n("Step &Out"), SmallIcon("debug_stepout"), 0, this, TQT_SLOT(slotDebugStepOut()), ac, "debug_stepout"); newaction->setToolTip(i18n("Executes the rest of the commands in the current function/file and pauses when it is done (when it reaches a higher level in the backtrace)")); - newaction = new KAction(i18n("&Pause"), SmallIcon("debug_pause"), 0, this, SLOT(slotDebugPause()), ac, "debug_pause"); + newaction = new KAction(i18n("&Pause"), SmallIcon("debug_pause"), 0, this, TQT_SLOT(slotDebugPause()), ac, "debug_pause"); newaction->setToolTip(i18n("Pauses the scripts if it is running or tracing. If a script is currently not being debugged, it will start in paused mode when started")); - newaction = new KAction(i18n("Kill"), SmallIcon("debug_kill"), 0, this, SLOT(slotDebugKill()), ac, "debug_kill"); + newaction = new KAction(i18n("Kill"), SmallIcon("debug_kill"), 0, this, TQT_SLOT(slotDebugKill()), ac, "debug_kill"); newaction->setToolTip(i18n("Kills the currently running script")); - newaction = new KAction(i18n("Start Session"), SmallIcon("debug_connect"), 0, this, SLOT(slotDebugStartSession()), ac, "debug_connect"); + newaction = new KAction(i18n("Start Session"), SmallIcon("debug_connect"), 0, this, TQT_SLOT(slotDebugStartSession()), ac, "debug_connect"); newaction->setToolTip(i18n("Starts the debugger internally (Makes debugging possible)")); - newaction = new KAction(i18n("End Session"), SmallIcon("debug_disconnect"), 0, this, SLOT(slotDebugEndSession()), ac, "debug_disconnect"); + newaction = new KAction(i18n("End Session"), SmallIcon("debug_disconnect"), 0, this, TQT_SLOT(slotDebugEndSession()), ac, "debug_disconnect"); newaction->setToolTip(i18n("Stops the debugger internally (debugging not longer possible)")); // Variables - newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, SLOT(slotAddWatch()), ac, "debug_addwatch"); + newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, TQT_SLOT(slotAddWatch()), ac, "debug_addwatch"); newaction->setToolTip(i18n("Adds a variable to the watch list")); - newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, SLOT(slotAddWatch()), ac, "debug_addwatchdialog"); + newaction = new KAction(i18n("Watch Variable"), SmallIcon("math_brace"), 0, this, TQT_SLOT(slotAddWatch()), ac, "debug_addwatchdialog"); newaction->setToolTip(i18n("Adds a variable to the watch list")); - newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, SLOT(slotVariableSet()), ac, "debug_variable_set"); + newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, TQT_SLOT(slotVariableSet()), ac, "debug_variable_set"); newaction->setToolTip(i18n("Changes the value of a variable")); - newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, SLOT(slotVariableSet()), ac, "debug_variable_setdialog"); + newaction = new KAction(i18n("Set Value of Variable"), SmallIcon("edit"), 0, this, TQT_SLOT(slotVariableSet()), ac, "debug_variable_setdialog"); newaction->setToolTip(i18n("Changes the value of a variable")); - newaction = new KAction(i18n("Open Profiler Output"), SmallIcon("launch"), 0, this, SLOT(slotProfilerOpen()), ac, "debug_profiler_open"); + newaction = new KAction(i18n("Open Profiler Output"), SmallIcon("launch"), 0, this, TQT_SLOT(slotProfilerOpen()), ac, "debug_profiler_open"); newaction->setToolTip(i18n("Opens the profiler output file")); enableAction("*", false); @@ -299,7 +299,7 @@ DebuggerManager::~DebuggerManager() if(m_client) { - disconnect(m_client, SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, SLOT(slotStatus(DebuggerUI::DebuggerStatus))); + disconnect(m_client, TQT_SIGNAL(updateStatus(DebuggerUI::DebuggerStatus)), m_debuggerui, TQT_SLOT(slotStatus(DebuggerUI::DebuggerStatus))); delete m_client; m_client = 0L; @@ -313,7 +313,7 @@ DebuggerManager::~DebuggerManager() m_pathmapper = 0L; } -void DebuggerManager::enableAction(const QString& action, bool enable) +void DebuggerManager::enableAction(const TQString& action, bool enable) { if(action == "*") { @@ -372,7 +372,7 @@ void DebuggerManager::slotAddWatch() return; - QString watch = KInputDialog::getText(i18n("Add Watch"), i18n("Specify variable to watch:"), quantaApp->popupWord); + TQString watch = KInputDialog::getText(i18n("Add Watch"), i18n("Specify variable to watch:"), quantaApp->popupWord); quantaApp->popupWord = ""; if(!watch.isEmpty()) { @@ -392,7 +392,7 @@ void DebuggerManager::slotVariableSet() DebuggerVariableSetS dlg; dlg.lineVariable->setText(quantaApp->popupWord); quantaApp->popupWord = ""; - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { DebuggerVariable var; var.setName(dlg.lineVariable->text()); @@ -403,7 +403,7 @@ void DebuggerManager::slotVariableSet() void DebuggerManager::slotConditionalBreakpoint() { - QString file; + TQString file; kdDebug(24002) << "DebuggerManager::slotConditionalBreakpoint() " << quantaApp->popupWord << endl; if(!m_client) @@ -415,7 +415,7 @@ void DebuggerManager::slotConditionalBreakpoint() ConditionalBreakpointDialog dlg(quantaApp->popupWord, file, "", ""); quantaApp->popupWord = ""; - if(dlg.exec() == QDialog::Accepted) + if(dlg.exec() == TQDialog::Accepted) { DebuggerBreakpoint * bp = dlg.breakpoint(); if(bp) @@ -524,7 +524,7 @@ void DebuggerManager::slotProfilerOpen( ) } // A new file was opened, tell the debugger so it can tell us about breakpoints etc -void DebuggerManager::fileOpened(const QString& file) +void DebuggerManager::fileOpened(const TQString& file) { // Set breakpoint markers if we have a bp in the file @@ -569,13 +569,13 @@ void DebuggerManager::refreshBreakpoints() // The debug server told us we have a breakpoint, mark it in the file -void DebuggerManager::haveBreakpoint (const QString& file, int line) +void DebuggerManager::haveBreakpoint (const TQString& file, int line) { setMark(file, line, true, KTextEditor::MarkInterface::markType02); } // The debug server told us we DONT have a breakpoint, remove it -void DebuggerManager::havenoBreakpoint (const QString& file, int line) +void DebuggerManager::havenoBreakpoint (const TQString& file, int line) { DebuggerBreakpoint* br = new DebuggerBreakpoint(file, line); m_breakpointList->remove(br); @@ -584,10 +584,10 @@ void DebuggerManager::havenoBreakpoint (const QString& file, int line) } // New current line -bool DebuggerManager::setActiveLine (const QString& file, int line ) +bool DebuggerManager::setActiveLine (const TQString& file, int line ) { //Get local filename - QString filename = file; + TQString filename = file; // Remove old active line mark setMark(m_currentFile, m_currentLine, false, KTextEditor::MarkInterface::markType05); @@ -614,7 +614,7 @@ bool DebuggerManager::setActiveLine (const QString& file, int line ) } // Set/clear a mark in a document -void DebuggerManager::setMark(const QString& filename, long line, bool set, int mark) +void DebuggerManager::setMark(const TQString& filename, long line, bool set, int mark) { if((!filename.isEmpty()) && ViewManager::ref()->isOpened(filename)) { @@ -642,26 +642,26 @@ void DebuggerManager::setMark(const QString& filename, long line, bool set, int void DebuggerManager::connectBreakpointSignals(Document* qdoc) { - connect(qdoc, SIGNAL(breakpointMarked(Document*, int)), - this, SLOT(slotBreakpointMarked(Document*, int))); + connect(qdoc, TQT_SIGNAL(breakpointMarked(Document*, int)), + this, TQT_SLOT(slotBreakpointMarked(Document*, int))); - connect(qdoc, SIGNAL(breakpointUnmarked(Document*, int)), - this, SLOT(slotBreakpointUnmarked(Document*, int))); + connect(qdoc, TQT_SIGNAL(breakpointUnmarked(Document*, int)), + this, TQT_SLOT(slotBreakpointUnmarked(Document*, int))); } void DebuggerManager::disconnectBreakpointSignals(Document* qdoc) { - disconnect(qdoc, SIGNAL(breakpointMarked(Document*, int)), - this, SLOT(slotBreakpointMarked(Document*, int))); + disconnect(qdoc, TQT_SIGNAL(breakpointMarked(Document*, int)), + this, TQT_SLOT(slotBreakpointMarked(Document*, int))); - disconnect(qdoc, SIGNAL(breakpointUnmarked(Document*, int)), - this, SLOT(slotBreakpointUnmarked(Document*, int))); + disconnect(qdoc, TQT_SIGNAL(breakpointUnmarked(Document*, int)), + this, TQT_SLOT(slotBreakpointUnmarked(Document*, int))); } // Show a status message and optionally put it on the log -bool DebuggerManager::showStatus(const QString& a_message, bool log) +bool DebuggerManager::showStatus(const TQString& a_message, bool log) { - QString message = a_message; + TQString message = a_message; quantaApp->slotStatusMsg(m_client->getName() + ": " + message); if(log) @@ -729,7 +729,7 @@ void DebuggerManager::slotBreakpointMarked(Document* qdoc, int line) void DebuggerManager::slotBreakpointUnmarked(Document* qdoc, int line) { - QString filePath = qdoc->url().prettyURL(0, KURL::StripFileProtocol); + TQString filePath = qdoc->url().prettyURL(0, KURL::StripFileProtocol); DebuggerBreakpoint* br = m_breakpointList->retrieve(filePath, line); @@ -744,7 +744,7 @@ void DebuggerManager::slotBreakpointUnmarked(Document* qdoc, int line) } } -void DebuggerManager::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +void DebuggerManager::updateBreakpointKey( const DebuggerBreakpoint & bp, const TQString & newkey ) { m_breakpointList->updateBreakpointKey(bp, newkey); @@ -756,7 +756,7 @@ void DebuggerManager::updateBreakpointKey( const DebuggerBreakpoint & bp, const } -DebuggerBreakpoint * DebuggerManager::findDebuggerBreakpoint( const QString & key ) +DebuggerBreakpoint * DebuggerManager::findDebuggerBreakpoint( const TQString & key ) { return m_breakpointList->findDebuggerBreakpoint(key); } @@ -766,9 +766,9 @@ void DebuggerManager::saveProperties( ) if (m_client) { - QDomDocument *dom = Project::ref()->sessionDom(); - QDomNode projectNode = dom->firstChild().firstChild(); - QDomNode nodeDbg = projectNode.namedItem("debuggers"); + TQDomDocument *dom = Project::ref()->sessionDom(); + TQDomNode projectNode = dom->firstChild().firstChild(); + TQDomNode nodeDbg = projectNode.namedItem("debuggers"); if(nodeDbg.isNull()) { nodeDbg = dom->createElement("debuggers"); @@ -779,7 +779,7 @@ void DebuggerManager::saveProperties( ) if(Project::ref()->debuggerPersistentBreakpoints()) { // (Re)create breakpoints section - QDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); + TQDomNode nodeBreakpoints = nodeDbg.namedItem("breakpoints"); if(!nodeBreakpoints.isNull()) nodeBreakpoints.parentNode().removeChild(nodeBreakpoints); @@ -794,12 +794,12 @@ void DebuggerManager::saveProperties( ) DebuggerBreakpoint* bp; while((bp = m_breakpointList->next())) { - QDomElement child = dom->createElement("breakpoint"); + TQDomElement child = dom->createElement("breakpoint"); child.setAttribute("filepath", bp->filePath()); child.setAttribute("class", bp->inClass()); child.setAttribute("function", bp->inFunction()); child.setAttribute("condition", bp->condition()); - child.setAttribute("line", QString::number(bp->line())); + child.setAttribute("line", TQString::number(bp->line())); if(bp->type() == DebuggerBreakpoint::ConditionalTrue) child.setAttribute("type", "true"); else if(bp->type() == DebuggerBreakpoint::ConditionalChange) @@ -816,7 +816,7 @@ void DebuggerManager::saveProperties( ) if(Project::ref()->debuggerPersistentWatches()) { // (Re)create watches section - QDomNode nodeWatches = nodeDbg.namedItem("watches"); + TQDomNode nodeWatches = nodeDbg.namedItem("watches"); if(!nodeWatches.isNull()) nodeWatches.parentNode().removeChild(nodeWatches); @@ -828,7 +828,7 @@ void DebuggerManager::saveProperties( ) // Loop watches and save 'em for( DebuggerVariable *v = m_debuggerui->watches()->first(); v; v = m_debuggerui->watches()->next()) { - QDomElement child = dom->createElement("watch"); + TQDomElement child = dom->createElement("watch"); child.setAttribute("name", v->name()); nodeWatches.appendChild(child); @@ -838,7 +838,7 @@ void DebuggerManager::saveProperties( ) } } -void DebuggerManager::slotHandleEvent( const QString & event, const QString &, const QString & ) +void DebuggerManager::slotHandleEvent( const TQString & event, const TQString &, const TQString & ) { if(event == "before_project_close") saveProperties(); diff --git a/quanta/components/debugger/debuggermanager.h b/quanta/components/debugger/debuggermanager.h index f7584bdf..5a88b156 100644 --- a/quanta/components/debugger/debuggermanager.h +++ b/quanta/components/debugger/debuggermanager.h @@ -18,8 +18,8 @@ #ifndef PHPDEBUGGERINTERFACE_H #define PHPDEBUGGERINTERFACE_H -#include -#include +#include +#include class DebuggerClient; class QuantaDebuggerInterface; @@ -49,11 +49,11 @@ class DebuggerManager : public QObject void connectBreakpointSignals(Document*); void disconnectBreakpointSignals(Document*); - QString m_currentFile; + TQString m_currentFile; long m_currentLine; public: - DebuggerManager(QObject *myparent); + DebuggerManager(TQObject *myparent); ~DebuggerManager(); // Access to memebers @@ -62,20 +62,20 @@ class DebuggerManager : public QObject PathMapper * Mapper() { return m_pathmapper; }; // Breakpoints - void haveBreakpoint (const QString& file, int line); - void havenoBreakpoint (const QString& file, int line); + void haveBreakpoint (const TQString& file, int line); + void havenoBreakpoint (const TQString& file, int line); void refreshBreakpoints(); // DebuggerBreakpoint *newDebuggerBreakpoint(); - DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); - void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& newkey); // Public help functions - bool showStatus(const QString& message, bool log); - bool setActiveLine (const QString& file, int line); - void setMark(const QString& filename, long line, bool set, int mark); + bool showStatus(const TQString& message, bool log); + bool setActiveLine (const TQString& file, int line); + void setMark(const TQString& filename, long line, bool set, int mark); - void enableAction(const QString& action, bool enable); - void fileOpened(const QString& file); + void enableAction(const TQString& action, bool enable); + void fileOpened(const TQString& file); bool hasClient() { return m_client != 0; }; @@ -111,10 +111,10 @@ class DebuggerManager : public QObject void slotProfilerOpen(); // Initiation - void slotNewProjectLoaded(const QString &, const KURL &, const KURL &); + void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &); // Event handling - void slotHandleEvent(const QString &, const QString &, const QString &); + void slotHandleEvent(const TQString &, const TQString &, const TQString &); private slots: void slotBreakpointMarked(Document*, int); diff --git a/quanta/components/debugger/debuggerui.cpp b/quanta/components/debugger/debuggerui.cpp index c290bd8a..fdf32a5c 100644 --- a/quanta/components/debugger/debuggerui.cpp +++ b/quanta/components/debugger/debuggerui.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -36,8 +36,8 @@ #include "resource.h" #include "whtmlpart.h" -DebuggerUI::DebuggerUI(QObject *parent, const char *name) - : QObject(parent, name), m_variablesListView(0) +DebuggerUI::DebuggerUI(TQObject *parent, const char *name) + : TQObject(parent, name), m_variablesListView(0) { // Variable watch tree @@ -64,14 +64,14 @@ DebuggerUI::DebuggerUI(QObject *parent, const char *name) m_preview->view()->setIcon(UserIcon("debug_run")); m_preview->view()->setCaption(i18n("Debug Output")); m_previewTVA = quantaApp->addToolWindow(m_preview->view(), quantaApp->prevDockPosition(m_preview->view(), KDockWidget::DockBottom), quantaApp->getMainDockWidget()); - connect(m_preview, SIGNAL(openFile(const KURL&, const QString&, bool)), quantaApp, SLOT(slotFileOpen(const KURL&, const QString&, bool))); + connect(m_preview, TQT_SIGNAL(openFile(const KURL&, const TQString&, bool)), quantaApp, TQT_SLOT(slotFileOpen(const KURL&, const TQString&, bool))); // Show debugger toolbar quantaApp->toolBar("debugger_toolbar")->show(); - connect(m_variablesListView, SIGNAL(removeVariable(DebuggerVariable* )), parent, SLOT(slotRemoveVariable(DebuggerVariable* ))); + connect(m_variablesListView, TQT_SIGNAL(removeVariable(DebuggerVariable* )), parent, TQT_SLOT(slotRemoveVariable(DebuggerVariable* ))); - connect(m_debuggerBreakpointView, SIGNAL(removeBreakpoint(DebuggerBreakpoint* )), parent, SLOT(slotRemoveBreakpoint(DebuggerBreakpoint* ))); + connect(m_debuggerBreakpointView, TQT_SIGNAL(removeBreakpoint(DebuggerBreakpoint* )), parent, TQT_SLOT(slotRemoveBreakpoint(DebuggerBreakpoint* ))); showMenu(); } @@ -99,7 +99,7 @@ DebuggerUI::~DebuggerUI() void DebuggerUI::showMenu() { - QPopupMenu* debuggerMenu = (QPopupMenu*)(quantaApp->guiFactory())->container("debugger_menu", quantaApp); + TQPopupMenu* debuggerMenu = (TQPopupMenu*)(quantaApp->guiFactory())->container("debugger_menu", quantaApp); if(debuggerMenu) { KMenuBar *mb = quantaApp->menuBar(); @@ -195,7 +195,7 @@ void DebuggerUI::backtraceClear( ) m_backtraceListview->clear(); } -void DebuggerUI::backtraceShow( long level, BacktraceType type, const QString & filename, long line, const QString & func ) +void DebuggerUI::backtraceShow( long level, BacktraceType type, const TQString & filename, long line, const TQString & func ) { if(m_backtraceListview) m_backtraceListview->backtraceShow(level, type, filename, line, func); diff --git a/quanta/components/debugger/debuggerui.h b/quanta/components/debugger/debuggerui.h index a86e4706..767facad 100644 --- a/quanta/components/debugger/debuggerui.h +++ b/quanta/components/debugger/debuggerui.h @@ -19,8 +19,8 @@ #ifndef DEBUGGERUI_H #define DEBUGGERUI_H -#include -#include +#include +#include #include #include "backtracelistview.h" @@ -49,14 +49,14 @@ class DebuggerUI : public QObject HaltedOnBreakpoint }; - DebuggerUI(QObject *parent = 0, const char *name = 0); + DebuggerUI(TQObject *parent = 0, const char *name = 0); ~DebuggerUI(); // Watches void addVariable(DebuggerVariable* var); void showBreakpoint(const DebuggerBreakpoint& bp); void deleteBreakpoint(const DebuggerBreakpoint& bp); - void parsePHPVariables(const QString &); + void parsePHPVariables(const TQString &); void sendRequest(const KURL &url); VariablesListView* watches() { return m_variablesListView; }; @@ -64,7 +64,7 @@ class DebuggerUI : public QObject void hideMenu(); void backtraceClear(); - void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func); + void backtraceShow(long level, BacktraceType type, const TQString &filename, long line, const TQString& func); private: VariablesListView* m_variablesListView; diff --git a/quanta/components/debugger/debuggervariable.cpp b/quanta/components/debugger/debuggervariable.cpp index b6a4f76a..390290a7 100644 --- a/quanta/components/debugger/debuggervariable.cpp +++ b/quanta/components/debugger/debuggervariable.cpp @@ -26,7 +26,7 @@ DebuggerVariable::DebuggerVariable() , m_item(NULL) {} -DebuggerVariable::DebuggerVariable(const QString& name) +DebuggerVariable::DebuggerVariable(const TQString& name) : m_isReference(false) , m_size(0) , m_type(DebuggerVariableTypes::Undefined) @@ -35,7 +35,7 @@ DebuggerVariable::DebuggerVariable(const QString& name) m_name = name; } -DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, int type) +DebuggerVariable::DebuggerVariable(const TQString& name, const TQString& value, int type) : m_isReference(false) , m_size(0) , m_item(NULL) @@ -47,7 +47,7 @@ DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, in m_size = value.length(); } -DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, int type, int size) +DebuggerVariable::DebuggerVariable(const TQString& name, const TQString& value, int type, int size) : m_isReference(false) , m_item(NULL) { @@ -57,7 +57,7 @@ DebuggerVariable::DebuggerVariable(const QString& name, const QString& value, in m_size = size; } -DebuggerVariable::DebuggerVariable(const QString& name, const ValueList_t& values, int type) +DebuggerVariable::DebuggerVariable(const TQString& name, const ValueList_t& values, int type) : m_isReference(false) , m_item(NULL) { @@ -88,20 +88,20 @@ DebuggerVariable::DebuggerVariable(DebuggerVariable* v, bool copyitem ) } -void DebuggerVariable::setName(const QString& name) +void DebuggerVariable::setName(const TQString& name) { m_name = name; } -QString DebuggerVariable::name() const +TQString DebuggerVariable::name() const { return m_name; } -void DebuggerVariable::setValue(const QString& value) +void DebuggerVariable::setValue(const TQString& value) { m_value = value; } -QString DebuggerVariable::value() const +TQString DebuggerVariable::value() const { if(isScalar()) return m_value; @@ -146,7 +146,7 @@ int DebuggerVariable::type() const return m_type; } -const QString DebuggerVariable::typeName() const +const TQString DebuggerVariable::typeName() const { switch(m_type) { @@ -186,7 +186,7 @@ long DebuggerVariable::size() const return m_size; } -QString DebuggerVariable::sizeName() const +TQString DebuggerVariable::sizeName() const { switch(m_type) { @@ -199,7 +199,7 @@ QString DebuggerVariable::sizeName() const case DebuggerVariableTypes::Error: return ""; } - return QString::number(m_size); + return TQString::number(m_size); } void DebuggerVariable::setReference(bool ref) @@ -241,7 +241,7 @@ void DebuggerVariable::deleteChild( DebuggerVariable * child ) } } -DebuggerVariable* DebuggerVariable::findItem( QListViewItem * item, bool traverse ) +DebuggerVariable* DebuggerVariable::findItem( TQListViewItem * item, bool traverse ) { if(item == m_item) return this; diff --git a/quanta/components/debugger/debuggervariable.h b/quanta/components/debugger/debuggervariable.h index 3c83de4b..50d28136 100644 --- a/quanta/components/debugger/debuggervariable.h +++ b/quanta/components/debugger/debuggervariable.h @@ -19,8 +19,8 @@ #ifndef DEBUGGERVARIABLE_H #define DEBUGGERVARIABLE_H -#include -#include +#include +#include #include namespace DebuggerVariableTypes @@ -41,38 +41,38 @@ namespace DebuggerVariableTypes } class DebuggerVariable; -typedef QPtrList ValueList_t; +typedef TQPtrList ValueList_t; class DebuggerVariable { public: DebuggerVariable(); DebuggerVariable(DebuggerVariable* var, bool copyitem = false); - DebuggerVariable(const QString& name); - DebuggerVariable(const QString& name, const QString& value, int type); - DebuggerVariable(const QString& name, const QString& value, int type, int size); - DebuggerVariable(const QString& name, const ValueList_t& values, int type); + DebuggerVariable(const TQString& name); + DebuggerVariable(const TQString& name, const TQString& value, int type); + DebuggerVariable(const TQString& name, const TQString& value, int type, int size); + DebuggerVariable(const TQString& name, const ValueList_t& values, int type); virtual ~DebuggerVariable(); - DebuggerVariable* findItem(QListViewItem *item, bool traverse = false); + DebuggerVariable* findItem(TQListViewItem *item, bool traverse = false); - virtual void setName(const QString& name); - virtual QString name() const; + virtual void setName(const TQString& name); + virtual TQString name() const; - virtual void setValue(const QString& value); - virtual QString value() const; + virtual void setValue(const TQString& value); + virtual TQString value() const; virtual void setValues(const ValueList_t& valueList); virtual ValueList_t values() const; virtual void setType(int type); virtual int type() const; - virtual const QString typeName() const ; + virtual const TQString typeName() const ; virtual bool isScalar() const; virtual void setSize(long size); virtual long size() const; - virtual QString sizeName() const; + virtual TQString sizeName() const; virtual void setReference(bool ref); virtual bool isReference() const; @@ -91,8 +91,8 @@ class DebuggerVariable private: ValueList_t m_valueList; - QString m_name; - QString m_value; + TQString m_name; + TQString m_value; bool m_isReference; long m_size; int m_type; diff --git a/quanta/components/debugger/gubed/gubedsettings.cpp b/quanta/components/debugger/gubed/gubedsettings.cpp index f728d884..9464dc81 100644 --- a/quanta/components/debugger/gubed/gubedsettings.cpp +++ b/quanta/components/debugger/gubed/gubedsettings.cpp @@ -15,11 +15,11 @@ ***************************************************************************/ -#include "qlineedit.h" +#include "tqlineedit.h" #include "gubedsettings.h" #include -GubedSettings::GubedSettings(const QString &protocolversion) +GubedSettings::GubedSettings(const TQString &protocolversion) : GubedSettingsS(0, "GubedSettings", false, 0) { textAbout->setText(textAbout->text().replace("%PROTOCOLVERSION%", protocolversion)); diff --git a/quanta/components/debugger/gubed/gubedsettings.h b/quanta/components/debugger/gubed/gubedsettings.h index dc070f32..73232e06 100644 --- a/quanta/components/debugger/gubed/gubedsettings.h +++ b/quanta/components/debugger/gubed/gubedsettings.h @@ -27,7 +27,7 @@ class GubedSettings : public GubedSettingsS virtual void slotUseProxyToggle( bool useproxy); public: - GubedSettings(const QString &protocolversion); + GubedSettings(const TQString &protocolversion); ~GubedSettings(); }; diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.cpp b/quanta/components/debugger/gubed/quantadebuggergubed.cpp index be703e73..f909832a 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.cpp +++ b/quanta/components/debugger/gubed/quantadebuggergubed.cpp @@ -19,14 +19,14 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include -#include +#include +#include #include @@ -47,7 +47,7 @@ K_EXPORT_COMPONENT_FACTORY( quantadebuggergubed, const char QuantaDebuggerGubed::protocolversion[] = "0.0.12"; -QuantaDebuggerGubed::QuantaDebuggerGubed (QObject *parent, const char* name, const QStringList&) +QuantaDebuggerGubed::QuantaDebuggerGubed (TQObject *parent, const char* name, const TQStringList&) : DebuggerClient (parent, name) { // Create a socket object and set up its signals @@ -98,10 +98,10 @@ void QuantaDebuggerGubed::startSession() { m_socket = new KNetwork::KStreamSocket(m_serverHost, m_serverPort); - connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); - connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KResolverEntry &))); - connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); m_socket->connect(); debuggerInterface()->enableAction("debug_connect", true); @@ -119,7 +119,7 @@ void QuantaDebuggerGubed::startSession() m_server = new KNetwork::KServerSocket(m_listenPort); m_server->setAddressReuseable(true); - connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); if(m_server->listen()) { @@ -280,7 +280,7 @@ void QuantaDebuggerGubed::slotReadyAccept() { // Perhaps this shouldnt be disconnected - instead check if connections are available at disconnect? - disconnect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + disconnect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); m_socket = (KNetwork::KStreamSocket *)m_server->accept(); // KSocketServer returns a KStreamSocket (!) if(m_socket) @@ -288,10 +288,10 @@ void QuantaDebuggerGubed::slotReadyAccept() kdDebug(24002) << k_funcinfo << ", ready" << endl; m_socket->enableRead(true); - connect(m_socket, SIGNAL(gotError(int)), this, SLOT(slotError(int))); - connect(m_socket, SIGNAL(connected(const KResolverEntry &)), this, SLOT(slotConnected(const KResolverEntry &))); - connect(m_socket, SIGNAL(closed()), this, SLOT(slotConnectionClosed())); - connect(m_socket, SIGNAL(readyRead()), this, SLOT(slotReadyRead())); + connect(m_socket, TQT_SIGNAL(gotError(int)), this, TQT_SLOT(slotError(int))); + connect(m_socket, TQT_SIGNAL(connected(const KResolverEntry &)), this, TQT_SLOT(slotConnected(const KResolverEntry &))); + connect(m_socket, TQT_SIGNAL(closed()), this, TQT_SLOT(slotConnectionClosed())); + connect(m_socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotReadyRead())); connected(); emit updateStatus(DebuggerUI::Connected); @@ -339,7 +339,7 @@ void QuantaDebuggerGubed::slotConnectionClosed() } if(m_server) - connect(m_server, SIGNAL(readyAccept()), this, SLOT(slotReadyAccept())); + connect(m_server, TQT_SIGNAL(readyAccept()), this, TQT_SLOT(slotReadyAccept())); // Disable all session related actions and enable connection action debuggerInterface()->enableAction("*", false); @@ -365,7 +365,7 @@ void QuantaDebuggerGubed::slotReadyRead() while(m_socket && (m_socket->bytesAvailable() > 0 || m_buffer.length() >= (unsigned long)m_datalen)) { int bytes; - QString data; + TQString data; if(m_socket && m_socket->bytesAvailable() > 0) { @@ -408,7 +408,7 @@ void QuantaDebuggerGubed::slotReadyRead() } // Process a gubed command -void QuantaDebuggerGubed::processCommand(const QString& datas) +void QuantaDebuggerGubed::processCommand(const TQString& datas) { kdDebug(24002) << k_funcinfo << ", " << m_command << " : " << datas.left(50) << endl; StringMap args = parseArgs(datas); @@ -429,7 +429,7 @@ void QuantaDebuggerGubed::processCommand(const QString& datas) else if(m_command == "getrunmode") { debuggingState(true); - sendCommand("setdisplaydelay", "newdelay", QString::number(m_displaydelay).ascii(), (char*)0L); + sendCommand("setdisplaydelay", "newdelay", TQString::number(m_displaydelay).ascii(), (char*)0L); if(m_executionState == Pause) sendCommand("pause", (char*)0L); else if(m_executionState == Run) @@ -437,15 +437,15 @@ void QuantaDebuggerGubed::processCommand(const QString& datas) else if(m_executionState == Trace) sendCommand("trace", (char*)0L); - sendCommand("seterrormask", "errormask", QString::number(m_errormask).ascii(), (char*)0L); + sendCommand("seterrormask", "errormask", TQString::number(m_errormask).ascii(), (char*)0L); } // Just some status info, display on status line else if(m_command == "status") { long argcnt = args["args"].toLong(); - QString msg = i18n(args["message"]); // How will we get these messages throught to the translators? + TQString msg = i18n(args["message"]); // How will we get these messages throught to the translators? for(int cnt = 1; cnt <= argcnt; cnt++) - msg.replace("%" + QString("%1").arg(cnt) + "%", args[QString("arg%1").arg(cnt)]); + msg.replace("%" + TQString("%1").arg(cnt) + "%", args[TQString("arg%1").arg(cnt)]); debuggerInterface()->showStatus(msg, false); } @@ -588,28 +588,28 @@ void QuantaDebuggerGubed::sendBreakpoints() } void QuantaDebuggerGubed::sendWatches() { - for(QValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) + for(TQValueList::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it) sendCommand("getwatch", "variable", (*it).ascii(), (char*)0L); sendCommand("sentwatches", "key", (char*)0L, (char*)0L); } // Send a command to gubed -bool QuantaDebuggerGubed::sendCommand(const QString& command, StringMap args) +bool QuantaDebuggerGubed::sendCommand(const TQString& command, StringMap args) { kdDebug(24002) << k_lineinfo << ", command " << command << " with data: " << phpSerialize(args) << endl; if(!m_socket || m_socket->state() != KNetwork::KClientSocketBase::Connected) return false; - QString buffer = phpSerialize(args); + TQString buffer = phpSerialize(args); - buffer = QString(command + ":%1;" + buffer).arg(buffer.length()); + buffer = TQString(command + ":%1;" + buffer).arg(buffer.length()); m_socket->writeBlock(buffer, buffer.length()); return true; } // Send a command to gubed -bool QuantaDebuggerGubed::sendCommand(const QString& command, char * firstarg, ...) +bool QuantaDebuggerGubed::sendCommand(const TQString& command, char * firstarg, ...) { StringMap ca; char *next; @@ -620,7 +620,7 @@ bool QuantaDebuggerGubed::sendCommand(const QString& command, char * firstarg, . next = firstarg; while(next) { - ca[(QString)next] = (QString)va_arg(l_Arg, char*); + ca[(TQString)next] = (TQString)va_arg(l_Arg, char*); // kdDebug(24002) << k_lineinfo << " Added arg/valuepair " << next << ", " << ca[next].left(30) << endl; next = va_arg(l_Arg, char*); } @@ -631,12 +631,12 @@ bool QuantaDebuggerGubed::sendCommand(const QString& command, char * firstarg, . } // Return name of debugger -QString QuantaDebuggerGubed::getName() +TQString QuantaDebuggerGubed::getName() { return "Gubed"; // no i18n on the name } -void QuantaDebuggerGubed::showWatch(const QString& data) +void QuantaDebuggerGubed::showWatch(const TQString& data) { debuggerInterface()->showVariable(parsePHPVariables(data)); } @@ -644,7 +644,7 @@ void QuantaDebuggerGubed::showWatch(const QString& data) // Send HTTP Request void QuantaDebuggerGubed::request() { - QString request; + TQString request; request = debuggerInterface()->activeFileParts(m_startsession); //if(request.startsWith(m_localBasedir, false)) @@ -711,7 +711,7 @@ void QuantaDebuggerGubed::pause() // Add a breakpoint void QuantaDebuggerGubed::addBreakpoint (DebuggerBreakpoint* breakpoint) { - QString type; + TQString type; if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) type = "line"; else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) @@ -725,13 +725,13 @@ void QuantaDebuggerGubed::addBreakpoint (DebuggerBreakpoint* breakpoint) "class", breakpoint->inClass().ascii(), "function", breakpoint->inFunction().ascii(), "expression", breakpoint->condition().ascii(), - "line", QString::number(breakpoint->line()).ascii(), + "line", TQString::number(breakpoint->line()).ascii(), (char *)0L); } -// QString QuantaDebuggerGubed::bpToGubed(DebuggerBreakpoint* breakpoint) +// TQString QuantaDebuggerGubed::bpToGubed(DebuggerBreakpoint* breakpoint) // { -// return QString("^" + mapLocalPathToServer(breakpoint->filePath()) + +// return TQString("^" + mapLocalPathToServer(breakpoint->filePath()) + // "^" + breakpoint->inClass() + // "^" + breakpoint->inFunction() + // "^" + (breakpoint->type() == DebuggerBreakpoint::ConditionalTrue ? "true" : "change") + @@ -741,7 +741,7 @@ void QuantaDebuggerGubed::addBreakpoint (DebuggerBreakpoint* breakpoint) // Clear a breakpoint void QuantaDebuggerGubed::removeBreakpoint(DebuggerBreakpoint* breakpoint) { - QString type; + TQString type; if(breakpoint->type() == DebuggerBreakpoint::LineBreakpoint) type = "line"; else if(breakpoint->type() == DebuggerBreakpoint::ConditionalTrue) @@ -755,18 +755,18 @@ void QuantaDebuggerGubed::removeBreakpoint(DebuggerBreakpoint* breakpoint) "class", breakpoint->inClass().ascii(), "function", breakpoint->inFunction().ascii(), "expression", breakpoint->condition().ascii(), - "line", QString::number(breakpoint->line()).ascii(), + "line", TQString::number(breakpoint->line()).ascii(), (char*)0L); } // A file was opened... -void QuantaDebuggerGubed::fileOpened(const QString&) +void QuantaDebuggerGubed::fileOpened(const TQString&) { sendCommand("reinitialize", (char*)0L); } // Watch a variable -void QuantaDebuggerGubed::addWatch(const QString &variable) +void QuantaDebuggerGubed::addWatch(const TQString &variable) { if(m_watchlist.find(variable) == m_watchlist.end()) m_watchlist.append(variable); @@ -798,10 +798,10 @@ void QuantaDebuggerGubed::showCondition(const StringMap &args) } // Read configuration -void QuantaDebuggerGubed::readConfig(QDomNode node) +void QuantaDebuggerGubed::readConfig(TQDomNode node) { // Server - QDomNode valuenode = node.namedItem("serverhost"); + TQDomNode valuenode = node.namedItem("serverhost"); m_serverHost = valuenode.firstChild().nodeValue(); if(m_serverHost.isEmpty()) m_serverHost = "localhost"; @@ -850,7 +850,7 @@ void QuantaDebuggerGubed::readConfig(QDomNode node) // Show configuration -void QuantaDebuggerGubed::showConfig(QDomNode node) +void QuantaDebuggerGubed::showConfig(TQDomNode node) { GubedSettings set(protocolversion); @@ -872,9 +872,9 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) set.checkBreakOnUserWarning->setChecked(QuantaDebuggerGubed::User_Warning & m_errormask); set.checkBreakOnUserError->setChecked(QuantaDebuggerGubed::User_Error & m_errormask); - if(set.exec() == QDialog::Accepted ) + if(set.exec() == TQDialog::Accepted ) { - QDomElement el; + TQDomElement el; el = node.namedItem("serverhost").toElement(); if (!el.isNull()) @@ -942,7 +942,7 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) el = node.ownerDocument().createElement("defaultexecutionstate"); node.appendChild( el ); m_defaultExecutionState = (State)set.comboDefaultExecutionState->currentItem(); - el.appendChild(node.ownerDocument().createTextNode(QString::number(m_defaultExecutionState))); + el.appendChild(node.ownerDocument().createTextNode(TQString::number(m_defaultExecutionState))); el = node.namedItem("displaydelay").toElement(); @@ -951,7 +951,7 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) el = node.ownerDocument().createElement("displaydelay"); node.appendChild( el ); m_displaydelay = set.sliderDisplayDelay->value(); - el.appendChild( node.ownerDocument().createTextNode(QString::number(m_displaydelay))); + el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_displaydelay))); el = node.namedItem("errormask").toElement(); if (!el.isNull()) @@ -964,20 +964,20 @@ void QuantaDebuggerGubed::showConfig(QDomNode node) + (set.checkBreakOnUserWarning->isChecked() ? QuantaDebuggerGubed::User_Warning : 0) + (set.checkBreakOnUserError->isChecked() ? QuantaDebuggerGubed::User_Error : 0); kdDebug(24002) << k_funcinfo << ", m_errormask = " << m_errormask << endl; - el.appendChild( node.ownerDocument().createTextNode(QString::number(m_errormask))); + el.appendChild( node.ownerDocument().createTextNode(TQString::number(m_errormask))); } } // Map a server filepath to a local one using project settings -QString QuantaDebuggerGubed::mapServerPathToLocal(const QString& serverpath) +TQString QuantaDebuggerGubed::mapServerPathToLocal(const TQString& serverpath) { // Translate filename from server to local return debuggerInterface()->Mapper()->mapServerPathToLocal(serverpath); } // Map a local filepath to a server one using project settings -QString QuantaDebuggerGubed::mapLocalPathToServer(const QString& localpath) +TQString QuantaDebuggerGubed::mapLocalPathToServer(const TQString& localpath) { // Translate filename from local to server return debuggerInterface()->Mapper()->mapLocalPathToServer(localpath); @@ -991,23 +991,23 @@ void QuantaDebuggerGubed::variableSetValue(const DebuggerVariable &variable) (char*)0L); } -QString QuantaDebuggerGubed::phpSerialize(StringMap args) +TQString QuantaDebuggerGubed::phpSerialize(StringMap args) { StringMap::Iterator it; // a:2:{s:4:"name";s:7:"Jessica";s:3:"age";s:2:"26";s:4:"test";i:1;} - QString ret = QString("a:%1:{").arg(args.size()); + TQString ret = TQString("a:%1:{").arg(args.size()); for( it = args.begin(); it != args.end(); ++it ) { bool isNumber; it.data().toInt(&isNumber); if(isNumber && !it.data().isEmpty()) - ret += QString("s:%1:\"%2\";i:%3;") + ret += TQString("s:%1:\"%2\";i:%3;") .arg(it.key().length()) .arg(it.key()) .arg(it.data()); else - ret += QString("s:%1:\"%2\";s:%3:\"%4\";") + ret += TQString("s:%1:\"%2\";s:%3:\"%4\";") .arg(it.key().length()) .arg(it.key()) .arg(it.data().length()) @@ -1020,7 +1020,7 @@ QString QuantaDebuggerGubed::phpSerialize(StringMap args) } -StringMap QuantaDebuggerGubed::parseArgs(const QString &args) +StringMap QuantaDebuggerGubed::parseArgs(const TQString &args) { StringMap ca; long cnt, length; @@ -1039,9 +1039,9 @@ StringMap QuantaDebuggerGubed::parseArgs(const QString &args) } cnt = args.mid(2, args.find("{") - 3).toLong(); - QString data = args.mid(args.find("{") + 1); + TQString data = args.mid(args.find("{") + 1); - QString tmp, func; + TQString tmp, func; while(cnt > 0) { tmp = data.left(data.find("\"")); @@ -1076,22 +1076,22 @@ StringMap QuantaDebuggerGubed::parseArgs(const QString &args) return ca; } -DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(const QString &varstring) +DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(const TQString &varstring) { - QString str = varstring; + TQString str = varstring; DebuggerVariable* var = parsePHPVariables(str); return var; } -DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(QString &str) +DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(TQString &str) { - QString key, data; - QString tempstring; + TQString key, data; + TQString tempstring; int length; DebuggerVariable* debuggervar = NULL; // get type of key - QString type = str.left(1); + TQString type = str.left(1); str.remove(0, 2); // Strings @@ -1172,7 +1172,7 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(QString &str) str.remove(0, str.find(':') + 2); length = tempstring.toUInt(); - QPtrList vars ; + TQPtrList vars ; while(length > 0) { //kdDebug(24002) << "VariablesListView::parsePHPVariables: length " << length << ", \"" << str << "\"" << endl; @@ -1201,7 +1201,7 @@ DebuggerVariable* QuantaDebuggerGubed::parsePHPVariables(QString &str) str.remove(0, str.find('{') + 1); - QPtrList vars ; + TQPtrList vars ; while(length > 0) { //kdDebug(24002) << "VariablesListView::parsePHPVariables: length " << length << ", \"" << str << "\"" << endl; diff --git a/quanta/components/debugger/gubed/quantadebuggergubed.h b/quanta/components/debugger/gubed/quantadebuggergubed.h index 62acac0b..0f41b804 100644 --- a/quanta/components/debugger/gubed/quantadebuggergubed.h +++ b/quanta/components/debugger/gubed/quantadebuggergubed.h @@ -19,21 +19,21 @@ #include #include -#include +#include #include -#include +#include #include "debuggerclient.h" -typedef QValueList WatchList; -typedef QMap StringMap; +typedef TQValueList WatchList; +typedef TQMap StringMap; class QuantaDebuggerGubed : public DebuggerClient { Q_OBJECT public: - QuantaDebuggerGubed(QObject *parent, const char* name, const QStringList&); + QuantaDebuggerGubed(TQObject *parent, const char* name, const TQStringList&); ~QuantaDebuggerGubed(); // Execution states @@ -76,14 +76,14 @@ class QuantaDebuggerGubed : public DebuggerClient void endSession(); // Return name of debugger - QString getName(); + TQString getName(); // New file opened in quanta - void fileOpened(const QString& file); + void fileOpened(const TQString& file); // Settings - void readConfig(QDomNode node); - void showConfig(QDomNode node); + void readConfig(TQDomNode node); + void showConfig(TQDomNode node); // Breakpoints void addBreakpoint(DebuggerBreakpoint* breakpoint); @@ -91,22 +91,22 @@ class QuantaDebuggerGubed : public DebuggerClient void showCondition(const StringMap &args); // Variables - void addWatch(const QString &variable); + void addWatch(const TQString &variable); void removeWatch(DebuggerVariable *var); void variableSetValue(const DebuggerVariable &variable); private: KNetwork::KStreamSocket *m_socket; KNetwork::KServerSocket *m_server; - QString m_command, m_buffer; + TQString m_command, m_buffer; long m_datalen; - QString m_serverBasedir; - QString m_localBasedir; - QString m_serverPort; - QString m_serverHost; - QString m_startsession; - QString m_listenPort; + TQString m_serverBasedir; + TQString m_localBasedir; + TQString m_serverPort; + TQString m_serverHost; + TQString m_startsession; + TQString m_listenPort; bool m_useproxy; State m_executionState, m_defaultExecutionState; long m_errormask; @@ -114,28 +114,28 @@ class QuantaDebuggerGubed : public DebuggerClient WatchList m_watchlist; -// bool sendCommand(const QString&, const QString&); - bool sendCommand(const QString& command, StringMap args); - bool sendCommand(const QString& command, char * firstarg, ...); +// bool sendCommand(const TQString&, const TQString&); + bool sendCommand(const TQString& command, StringMap args); + bool sendCommand(const TQString& command, char * firstarg, ...); - void processCommand(const QString&); + void processCommand(const TQString&); void sendWatches(); void sendBreakpoints(); void debuggingState(bool enable); void connected(); - QString mapServerPathToLocal(const QString& serverpath); - QString mapLocalPathToServer(const QString& localpath); - QString bpToGubed(DebuggerBreakpoint* breakpoint); + TQString mapServerPathToLocal(const TQString& serverpath); + TQString mapLocalPathToServer(const TQString& localpath); + TQString bpToGubed(DebuggerBreakpoint* breakpoint); // Communication helpers - QString phpSerialize(StringMap args); - StringMap parseArgs(const QString &args); + TQString phpSerialize(StringMap args); + StringMap parseArgs(const TQString &args); // Variables - DebuggerVariable* parsePHPVariables(const QString &varstring); - DebuggerVariable* parsePHPVariables(QString &str); - void showWatch(const QString& data); + DebuggerVariable* parsePHPVariables(const TQString &varstring); + DebuggerVariable* parsePHPVariables(TQString &str); + void showWatch(const TQString& data); public slots: diff --git a/quanta/components/debugger/interfaces/debuggerclient.cpp b/quanta/components/debugger/interfaces/debuggerclient.cpp index 8c3196d9..97140dbb 100644 --- a/quanta/components/debugger/interfaces/debuggerclient.cpp +++ b/quanta/components/debugger/interfaces/debuggerclient.cpp @@ -23,8 +23,8 @@ // CTor -DebuggerClient::DebuggerClient(QObject *parent, const char* name) - : QObject(parent, name) +DebuggerClient::DebuggerClient(TQObject *parent, const char* name) + : TQObject(parent, name) { m_active = false; } @@ -41,7 +41,7 @@ bool DebuggerClient::isActive() return m_active; } -void DebuggerClient::unSupportedAction(const QString &action) +void DebuggerClient::unSupportedAction(const TQString &action) { KMessageBox::error(NULL, i18n("The current debugger, %1, does not support the \"%2\" instruction.").arg(this->getName()).arg(action), i18n("Unsupported Debugger Function")); @@ -107,7 +107,7 @@ void DebuggerClient::profilerOpen( ) } // Unimplemented defaults -void DebuggerClient::fileOpened(const QString&) +void DebuggerClient::fileOpened(const TQString&) { return; } @@ -127,19 +127,19 @@ void DebuggerClient::removeBreakpoint(DebuggerBreakpoint*) // Unimplemented defaults -void DebuggerClient::showConfig(QDomNode) +void DebuggerClient::showConfig(TQDomNode) { KMessageBox::error(NULL, i18n("%1 does not have any specific settings.").arg(this->getName()), i18n("Settings")); } // Unimplemented defaults -void DebuggerClient::readConfig(QDomNode) +void DebuggerClient::readConfig(TQDomNode) { } // Unimplemented defaults: add watch -void DebuggerClient::addWatch(const QString &) +void DebuggerClient::addWatch(const TQString &) { KMessageBox::error(NULL, i18n("%1 does not support watches.").arg(this->getName()), i18n("Unsupported Debugger Function")); } diff --git a/quanta/components/debugger/interfaces/debuggerclient.h b/quanta/components/debugger/interfaces/debuggerclient.h index d50526cc..1966039f 100644 --- a/quanta/components/debugger/interfaces/debuggerclient.h +++ b/quanta/components/debugger/interfaces/debuggerclient.h @@ -18,10 +18,10 @@ #ifndef _DEBUGGERCLIENT_H #define _DEBUGGERCLIENT_H -#include -#include +#include +#include #include -#include +#include #include "debuggerui.h" @@ -66,7 +66,7 @@ class DebuggerClient : public QObject private: protected: - DebuggerClient(QObject *parent, const char* name); + DebuggerClient(TQObject *parent, const char* name); bool m_active; @@ -74,7 +74,7 @@ class DebuggerClient : public QObject virtual const uint supports(DebuggerClientCapabilities::Capabilities) = 0; virtual void startSession() = 0; virtual void endSession() = 0; - virtual QString getName() = 0; + virtual TQString getName() = 0; // Execution control virtual void request(); @@ -88,21 +88,21 @@ class DebuggerClient : public QObject virtual void pause(); // Settings - virtual void readConfig(QDomNode node); - virtual void showConfig(QDomNode node); + virtual void readConfig(TQDomNode node); + virtual void showConfig(TQDomNode node); // Profiler virtual void profilerOpen(); // Misc - virtual void fileOpened(const QString& file); + virtual void fileOpened(const TQString& file); virtual void addBreakpoint(DebuggerBreakpoint* breakpoint); virtual void removeBreakpoint(DebuggerBreakpoint* breakpoint); - virtual void addWatch(const QString &); + virtual void addWatch(const TQString &); virtual void removeWatch(DebuggerVariable*); virtual void variableSetValue(const DebuggerVariable &variable); - void unSupportedAction(const QString &action); + void unSupportedAction(const TQString &action); bool isActive(); DebuggerInterface *debuggerInterface(); diff --git a/quanta/components/debugger/interfaces/debuggerinterface.cpp b/quanta/components/debugger/interfaces/debuggerinterface.cpp index 5481180c..4d7beda6 100644 --- a/quanta/components/debugger/interfaces/debuggerinterface.cpp +++ b/quanta/components/debugger/interfaces/debuggerinterface.cpp @@ -17,8 +17,8 @@ #include "debuggerinterface.h" -DebuggerInterface::DebuggerInterface (QObject *parent, const char* name) - : QObject(parent, name) +DebuggerInterface::DebuggerInterface (TQObject *parent, const char* name) + : TQObject(parent, name) { } diff --git a/quanta/components/debugger/interfaces/debuggerinterface.h b/quanta/components/debugger/interfaces/debuggerinterface.h index 8c527979..1540a616 100644 --- a/quanta/components/debugger/interfaces/debuggerinterface.h +++ b/quanta/components/debugger/interfaces/debuggerinterface.h @@ -18,8 +18,8 @@ #ifndef DEBUGGERINTERFACE_H #define DEBUGGERINTERFACE_H -#include -#include +#include +#include #include #include "debuggervariable.h" @@ -36,40 +36,40 @@ class DebuggerInterface : public QObject public: - DebuggerInterface(QObject *parent, const char* name); + DebuggerInterface(TQObject *parent, const char* name); // Breakpoints - virtual void haveBreakpoint (const QString& file, int line) = 0; - virtual void havenoBreakpoint (const QString& file, int line) = 0; + virtual void haveBreakpoint (const TQString& file, int line) = 0; + virtual void havenoBreakpoint (const TQString& file, int line) = 0; // Public help functions - virtual bool showStatus(const QString& message, bool log) = 0; - virtual bool setActiveLine (const QString& file, int line) = 0; + virtual bool showStatus(const TQString& message, bool log) = 0; + virtual bool setActiveLine (const TQString& file, int line) = 0; - virtual void enableAction(const QString& action, bool enable) = 0; - virtual void fileOpened(const QString& file) = 0; + virtual void enableAction(const TQString& action, bool enable) = 0; + virtual void fileOpened(const TQString& file) = 0; virtual void sendRequest(const KURL &url) = 0; - virtual const QString activeFileParts(const QString & str) = 0; + virtual const TQString activeFileParts(const TQString & str) = 0; // Watch handling //virtual void preWatchUpdate() = 0; //virtual void postWatchUpdate() = 0; - virtual DebuggerVariable* newDebuggerVariable(const QString& name, const QString& value, int type) = 0; - virtual DebuggerVariable* newDebuggerVariable(const QString& name, const ValueList_t& values, int type) = 0; + virtual DebuggerVariable* newDebuggerVariable(const TQString& name, const TQString& value, int type) = 0; + virtual DebuggerVariable* newDebuggerVariable(const TQString& name, const ValueList_t& values, int type) = 0; virtual void showVariable(DebuggerVariable*) = 0; // Backtrace virtual void backtraceClear() = 0; - virtual void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func) = 0; + virtual void backtraceShow(long level, BacktraceType type, const TQString &filename, long line, const TQString& func) = 0; // Breakpoints virtual void showBreakpoint(const DebuggerBreakpoint &bp) = 0; virtual void refreshBreakpoints() = 0; virtual DebuggerBreakpoint * newDebuggerBreakpoint() = 0; - virtual DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key) = 0; - virtual void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey) = 0; + virtual DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key) = 0; + virtual void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& newkey) = 0; // Path mapping virtual PathMapper* Mapper() = 0; diff --git a/quanta/components/debugger/pathmapper.cpp b/quanta/components/debugger/pathmapper.cpp index 194355d7..c38e2fec 100644 --- a/quanta/components/debugger/pathmapper.cpp +++ b/quanta/components/debugger/pathmapper.cpp @@ -23,12 +23,12 @@ #include #include -#include +#include #include -#include +#include -PathMapper::PathMapper(QObject *parent, const char *name) - : QObject(parent, name) +PathMapper::PathMapper(TQObject *parent, const char *name) + : TQObject(parent, name) { } @@ -38,9 +38,9 @@ PathMapper::PathMapper() } -QString PathMapper::translate(const QString & path, const QString & from, const QString &to) +TQString PathMapper::translate(const TQString & path, const TQString & from, const TQString &to) { - QString translated = path; + TQString translated = path; // Check if this dir is matched by the maps if(path.startsWith(from, false)) @@ -52,7 +52,7 @@ QString PathMapper::translate(const QString & path, const QString & from, const return translated; } -QString PathMapper::mapLocalPathToServer(const QString &localpath) +TQString PathMapper::mapLocalPathToServer(const TQString &localpath) { if(localpath.isEmpty()) return localpath; @@ -60,7 +60,7 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath) if(m_localBasedir == "/" && m_serverBasedir == "/") return localpath; - QString newpath = translate(localpath, m_localBasedir, m_serverBasedir); + TQString newpath = translate(localpath, m_localBasedir, m_serverBasedir); // If no translation occurred, check and see if some of the other translations does if(newpath == localpath) @@ -89,7 +89,7 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath) for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]); - if(pmdlg.exec() == QDialog::Accepted ) + if(pmdlg.exec() == TQDialog::Accepted ) { newpath = translate(localpath, pmdlg.localPath(), pmdlg.serverPath()); addHistory(pmdlg.localPath(), pmdlg.serverPath(), newpath != localpath); @@ -101,9 +101,9 @@ QString PathMapper::mapLocalPathToServer(const QString &localpath) return newpath; } -QString PathMapper::mapServerPathToLocal(const QString &serverpath) +TQString PathMapper::mapServerPathToLocal(const TQString &serverpath) { - QString newpath; + TQString newpath; if(serverpath.isEmpty()) return serverpath; @@ -130,7 +130,7 @@ QString PathMapper::mapServerPathToLocal(const QString &serverpath) for (unsigned int cnt = 0; cnt < m_serverlist.count(); cnt++ ) pmdlg.addHistory(m_serverlist[cnt], m_locallist[cnt]); - if(pmdlg.exec() == QDialog::Accepted ) + if(pmdlg.exec() == TQDialog::Accepted ) { addHistory(pmdlg.localPath(), pmdlg.serverPath(), true); newpath = translate(serverpath, pmdlg.localPath(), pmdlg.serverPath()); @@ -141,21 +141,21 @@ QString PathMapper::mapServerPathToLocal(const QString &serverpath) return serverpath; } -void PathMapper::setLocalBasedir(const QString &localpath) +void PathMapper::setLocalBasedir(const TQString &localpath) { m_localBasedir = localpath; } -void PathMapper::setServerBasedir(const QString &serverpath) +void PathMapper::setServerBasedir(const TQString &serverpath) { m_serverBasedir = serverpath; } -QDomNode PathMapper::pathMapperNode() +TQDomNode PathMapper::pathMapperNode() { - QDomNode nodeThisDbg; - QDomDocument *dom = Project::ref()->sessionDom(); - QDomNode projectNode = dom->firstChild().firstChild(); - QDomNode nodeDbg = projectNode.namedItem("debuggers"); + TQDomNode nodeThisDbg; + TQDomDocument *dom = Project::ref()->sessionDom(); + TQDomNode projectNode = dom->firstChild().firstChild(); + TQDomNode nodeDbg = projectNode.namedItem("debuggers"); if(nodeDbg.isNull()) { nodeDbg = dom->createElement("debuggers"); @@ -173,7 +173,7 @@ QDomNode PathMapper::pathMapperNode() return nodeThisDbg; } -void PathMapper::addHistory(const QString &localpath, const QString &serverpath, bool saveinproject) +void PathMapper::addHistory(const TQString &localpath, const TQString &serverpath, bool saveinproject) { bool exists = false; for (unsigned int cnt = 0; cnt < m_serverlist.count() && !exists; cnt++ ) @@ -184,12 +184,12 @@ void PathMapper::addHistory(const QString &localpath, const QString &serverpath, { if(saveinproject) { - QDomNode node = pathMapperNode(); - QDomNode newnode = Project::ref()->dom()->createElement("mapping"); + TQDomNode node = pathMapperNode(); + TQDomNode newnode = Project::ref()->dom()->createElement("mapping"); - QDomAttr serverattr = Project::ref()->dom()->createAttribute("serverpath"); + TQDomAttr serverattr = Project::ref()->dom()->createAttribute("serverpath"); serverattr.setValue(serverpath); - QDomAttr localattr = Project::ref()->dom()->createAttribute("localpath"); + TQDomAttr localattr = Project::ref()->dom()->createAttribute("localpath"); localattr.setValue(localpath); newnode.attributes().setNamedItem(serverattr); @@ -207,12 +207,12 @@ void PathMapper::addHistory(const QString &localpath, const QString &serverpath, void PathMapper::readConfig() { - QDomNode node = pathMapperNode(); + TQDomNode node = pathMapperNode(); // Server - QDomNode valuenode = node.namedItem("mappings"); - QDomNode child = valuenode.firstChild(); - QString serverpath, localpath; + TQDomNode valuenode = node.namedItem("mappings"); + TQDomNode child = valuenode.firstChild(); + TQString serverpath, localpath; while(!child.isNull()) { serverpath = child.attributes().namedItem("serverpath").nodeValue(); diff --git a/quanta/components/debugger/pathmapper.h b/quanta/components/debugger/pathmapper.h index b93b48cb..fd48e3ab 100644 --- a/quanta/components/debugger/pathmapper.h +++ b/quanta/components/debugger/pathmapper.h @@ -19,9 +19,9 @@ #ifndef PATHMAPPER_H #define PATHMAPPER_H -#include -#include -#include +#include +#include +#include class KURL; @@ -30,26 +30,26 @@ class PathMapper : public QObject Q_OBJECT public: - PathMapper(QObject *parent = 0, const char *name = 0); + PathMapper(TQObject *parent = 0, const char *name = 0); PathMapper(); - virtual QString mapLocalPathToServer(const QString &localpath); - virtual QString mapServerPathToLocal(const QString &serverpath); + virtual TQString mapLocalPathToServer(const TQString &localpath); + virtual TQString mapServerPathToLocal(const TQString &serverpath); - virtual void setLocalBasedir(const QString &localpath); - virtual void setServerBasedir(const QString &serverpath); + virtual void setLocalBasedir(const TQString &localpath); + virtual void setServerBasedir(const TQString &serverpath); void readConfig(); private: - QDomNode pathMapperNode(); - QString translate(const QString & path, const QString & from, const QString &to); - void addHistory(const QString &localpath, const QString &serverpath, bool saveinproject); + TQDomNode pathMapperNode(); + TQString translate(const TQString & path, const TQString & from, const TQString &to); + void addHistory(const TQString &localpath, const TQString &serverpath, bool saveinproject); - QString m_localBasedir; - QString m_serverBasedir; + TQString m_localBasedir; + TQString m_serverBasedir; - QStringList m_serverlist; - QStringList m_locallist; + TQStringList m_serverlist; + TQStringList m_locallist; }; #endif diff --git a/quanta/components/debugger/pathmapperdialog.cpp b/quanta/components/debugger/pathmapperdialog.cpp index 8cfb949e..74e01956 100644 --- a/quanta/components/debugger/pathmapperdialog.cpp +++ b/quanta/components/debugger/pathmapperdialog.cpp @@ -16,13 +16,13 @@ #include "pathmapperdialog.h" -#include -#include +#include +#include #include -#include +#include #include -PathMapperDialog::PathMapperDialog(const QString& path, const PathMapperDialog::Direction direction) +PathMapperDialog::PathMapperDialog(const TQString& path, const PathMapperDialog::Direction direction) : PathMapperDialogS(0, "PathMapperDialog", false, 0) { m_direction = direction; @@ -32,18 +32,18 @@ PathMapperDialog::PathMapperDialog(const QString& path, const PathMapperDialog:: if(m_direction == LocalToServer) ledTranslationExists->hide(); - connect(listHistory, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); - connect(lineLocalPath, SIGNAL(textChanged(const QString&)), this, SLOT(slotPathsChanged())); - connect(lineServerPath, SIGNAL(textChanged(const QString&)), this, SLOT(slotPathsChanged())); + connect(listHistory, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + connect(lineLocalPath, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPathsChanged())); + connect(lineServerPath, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotPathsChanged())); } PathMapperDialog::~PathMapperDialog() { } -void PathMapperDialog::addHistory(const QString &serverdir, const QString &localdir) +void PathMapperDialog::addHistory(const TQString &serverdir, const TQString &localdir) { - new QListViewItem(listHistory, localdir, serverdir); + new TQListViewItem(listHistory, localdir, serverdir); } void PathMapperDialog::slotSelectionChanged() @@ -54,7 +54,7 @@ void PathMapperDialog::slotSelectionChanged() void PathMapperDialog::slotPathsChanged() { - QString translated, from, to; + TQString translated, from, to; if(m_direction == ServerToLocal) { from = lineServerPath->text(); @@ -88,12 +88,12 @@ void PathMapperDialog::slotPathsChanged() lineTranslated->setText(translated); } -QString PathMapperDialog::serverPath() +TQString PathMapperDialog::serverPath() { return lineServerPath->text(); } -QString PathMapperDialog::localPath() +TQString PathMapperDialog::localPath() { return lineLocalPath->text(); } diff --git a/quanta/components/debugger/pathmapperdialog.h b/quanta/components/debugger/pathmapperdialog.h index 786de8ea..39eb4600 100644 --- a/quanta/components/debugger/pathmapperdialog.h +++ b/quanta/components/debugger/pathmapperdialog.h @@ -30,20 +30,20 @@ class PathMapperDialog : public PathMapperDialogS LocalToServer }; - PathMapperDialog(const QString& path, const PathMapperDialog::Direction direction); + PathMapperDialog(const TQString& path, const PathMapperDialog::Direction direction); ~PathMapperDialog(); - void addHistory(const QString &serverdir, const QString &localdir); + void addHistory(const TQString &serverdir, const TQString &localdir); - QString serverPath(); - QString localPath(); + TQString serverPath(); + TQString localPath(); public slots: void slotSelectionChanged(); void slotPathsChanged(); private: - QString m_path; + TQString m_path; Direction m_direction; }; diff --git a/quanta/components/debugger/quantadebuggerinterface.cpp b/quanta/components/debugger/quantadebuggerinterface.cpp index bd9ba2e1..af70da0a 100644 --- a/quanta/components/debugger/quantadebuggerinterface.cpp +++ b/quanta/components/debugger/quantadebuggerinterface.cpp @@ -32,7 +32,7 @@ class DebuggerBreakpoint; -QuantaDebuggerInterface::QuantaDebuggerInterface (QObject *myparent, const char* name) +QuantaDebuggerInterface::QuantaDebuggerInterface (TQObject *myparent, const char* name) : DebuggerInterface(myparent, name) { m_manager = static_cast(parent()); @@ -41,33 +41,33 @@ QuantaDebuggerInterface::QuantaDebuggerInterface (QObject *myparent, const char* QuantaDebuggerInterface::~QuantaDebuggerInterface () {} -void QuantaDebuggerInterface::haveBreakpoint (const QString& file, int line) +void QuantaDebuggerInterface::haveBreakpoint (const TQString& file, int line) { return m_manager->haveBreakpoint(file, line); } -void QuantaDebuggerInterface::havenoBreakpoint (const QString& file, int line) +void QuantaDebuggerInterface::havenoBreakpoint (const TQString& file, int line) { return m_manager->havenoBreakpoint(file, line); } // Public help functions -bool QuantaDebuggerInterface::showStatus(const QString& message, bool log) +bool QuantaDebuggerInterface::showStatus(const TQString& message, bool log) { return m_manager->showStatus(message, log); } -bool QuantaDebuggerInterface::setActiveLine(const QString& file, int line) +bool QuantaDebuggerInterface::setActiveLine(const TQString& file, int line) { return m_manager->setActiveLine(file, line); } -void QuantaDebuggerInterface::enableAction(const QString& action, bool enable) +void QuantaDebuggerInterface::enableAction(const TQString& action, bool enable) { m_manager->enableAction(action, enable); } -void QuantaDebuggerInterface::fileOpened(const QString& file) +void QuantaDebuggerInterface::fileOpened(const TQString& file) { m_manager->fileOpened(file); } @@ -77,9 +77,9 @@ void QuantaDebuggerInterface::sendRequest(const KURL &url) m_manager->UI()->sendRequest(url); } -const QString QuantaDebuggerInterface::activeFileParts(const QString & str) +const TQString QuantaDebuggerInterface::activeFileParts(const TQString & str) { - QString newstr = str; + TQString newstr = str; // a/r = absolute/relative // f/p/d = file/project/docroot @@ -111,12 +111,12 @@ void QuantaDebuggerInterface::showVariable(DebuggerVariable* var) m_manager->UI()->addVariable(var); } -DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const QString& name, const QString& value, int type) +DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const TQString& name, const TQString& value, int type) { return new DebuggerVariable(name, value, type); } -DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const QString& name, const ValueList_t& values, int type) +DebuggerVariable *QuantaDebuggerInterface::newDebuggerVariable(const TQString& name, const ValueList_t& values, int type) { return new DebuggerVariable(name, values, type); } @@ -136,7 +136,7 @@ DebuggerBreakpoint *QuantaDebuggerInterface::newDebuggerBreakpoint() return new DebuggerBreakpoint(); } -DebuggerBreakpoint *QuantaDebuggerInterface::findDebuggerBreakpoint(const QString& key) +DebuggerBreakpoint *QuantaDebuggerInterface::findDebuggerBreakpoint(const TQString& key) { return m_manager->findDebuggerBreakpoint(key); } @@ -158,7 +158,7 @@ PathMapper* QuantaDebuggerInterface::Mapper() return m_manager->Mapper(); } -void QuantaDebuggerInterface::updateBreakpointKey( const DebuggerBreakpoint & bp, const QString & newkey ) +void QuantaDebuggerInterface::updateBreakpointKey( const DebuggerBreakpoint & bp, const TQString & newkey ) { m_manager->updateBreakpointKey(bp, newkey); } @@ -168,7 +168,7 @@ void QuantaDebuggerInterface::backtraceClear( ) m_manager->UI()->backtraceClear(); } -void QuantaDebuggerInterface::backtraceShow( long level, BacktraceType type, const QString & filename, long line, const QString & func ) +void QuantaDebuggerInterface::backtraceShow( long level, BacktraceType type, const TQString & filename, long line, const TQString & func ) { m_manager->UI()->backtraceShow(level, type, filename, line, func); } diff --git a/quanta/components/debugger/quantadebuggerinterface.h b/quanta/components/debugger/quantadebuggerinterface.h index 44be8f4a..d18fd1cd 100644 --- a/quanta/components/debugger/quantadebuggerinterface.h +++ b/quanta/components/debugger/quantadebuggerinterface.h @@ -18,8 +18,8 @@ #ifndef MYDEBUGMANAGER_H #define MYDEBUGMANAGER_H -#include -#include +#include +#include #include "debuggerinterface.h" #include "debuggervariable.h" @@ -33,39 +33,39 @@ class QuantaDebuggerInterface : public DebuggerInterface DebuggerManager *m_manager; public: - QuantaDebuggerInterface(QObject *myparent, const char* name); + QuantaDebuggerInterface(TQObject *myparent, const char* name); ~QuantaDebuggerInterface(); // Breakpoints - void haveBreakpoint (const QString& file, int line) ; - void havenoBreakpoint (const QString& file, int line) ; + void haveBreakpoint (const TQString& file, int line) ; + void havenoBreakpoint (const TQString& file, int line) ; void refreshBreakpoints(); // Public help functions - bool showStatus(const QString& message, bool log); - bool setActiveLine (const QString& file, int line) ; + bool showStatus(const TQString& message, bool log); + bool setActiveLine (const TQString& file, int line) ; - void enableAction(const QString& action, bool enable); - void fileOpened(const QString& file) ; + void enableAction(const TQString& action, bool enable); + void fileOpened(const TQString& file) ; void sendRequest(const KURL &url); - virtual const QString activeFileParts(const QString & str); + virtual const TQString activeFileParts(const TQString & str); // Watches handling //void preWatchUpdate(); //void postWatchUpdate(); - DebuggerVariable* newDebuggerVariable(const QString& name, const QString& value, int type); - DebuggerVariable* newDebuggerVariable(const QString& name, const ValueList_t& values, int type); + DebuggerVariable* newDebuggerVariable(const TQString& name, const TQString& value, int type); + DebuggerVariable* newDebuggerVariable(const TQString& name, const ValueList_t& values, int type); void showVariable(DebuggerVariable*); // Breakpoints void showBreakpoint(const DebuggerBreakpoint &bp); DebuggerBreakpoint * newDebuggerBreakpoint(); - DebuggerBreakpoint * findDebuggerBreakpoint(const QString& key); - void updateBreakpointKey(const DebuggerBreakpoint &bp, const QString& newkey); + DebuggerBreakpoint * findDebuggerBreakpoint(const TQString& key); + void updateBreakpointKey(const DebuggerBreakpoint &bp, const TQString& newkey); // Backtrace void backtraceClear(); - void backtraceShow(long level, BacktraceType type, const QString &filename, long line, const QString& func); + void backtraceShow(long level, BacktraceType type, const TQString &filename, long line, const TQString& func); // Path mapping PathMapper* Mapper(); diff --git a/quanta/components/debugger/variableslistview.cpp b/quanta/components/debugger/variableslistview.cpp index c9d77de3..03ddd7d3 100644 --- a/quanta/components/debugger/variableslistview.cpp +++ b/quanta/components/debugger/variableslistview.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include // Quanta includes #include "variableslistview.h" @@ -47,12 +47,12 @@ namespace VariablesListViewColumns }; } -VariablesListView::VariablesListView(QWidget *parent, const char *name) +VariablesListView::VariablesListView(TQWidget *parent, const char *name) : KListView(parent, name) { // If you change here, change the VariablesListViewColumns enums above addColumn(i18n("Name")); - addColumn(QString::null); + addColumn(TQString::null); addColumn(i18n("Value")); addColumn(i18n("Type")); addColumn(i18n("Size")); @@ -60,16 +60,16 @@ VariablesListView::VariablesListView(QWidget *parent, const char *name) setSorting(-1); // No sorting m_variablePopup = new KPopupMenu(this); - m_variablePopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, SLOT(slotRemoveSelected()), 0, removeWatch); + m_variablePopup->insertItem(SmallIcon("editdelete"), i18n("&Remove"), this, TQT_SLOT(slotRemoveSelected()), 0, removeWatch); if(quantaApp->debugger()->client()->supports(DebuggerClientCapabilities::VariableSetValue)) - m_variablePopup->insertItem(SmallIcon("edit"), i18n("&Set Value"), this, SLOT(slotVariableSetValue()), 0, setValue); + m_variablePopup->insertItem(SmallIcon("edit"), i18n("&Set Value"), this, TQT_SLOT(slotVariableSetValue()), 0, setValue); - m_variablePopup->insertItem(SmallIcon("viewmag"), i18n("&Dump in Messages Log"), this, SLOT(slotVariableDump()), 0, dumpValue); + m_variablePopup->insertItem(SmallIcon("viewmag"), i18n("&Dump in Messages Log"), this, TQT_SLOT(slotVariableDump()), 0, dumpValue); - m_variablePopup->insertItem(SmallIcon("editcopy"), i18n("&Copy to Clipboard"), this, SLOT(slotVariableCopyToClipboard()), 0, copyValue); + m_variablePopup->insertItem(SmallIcon("editcopy"), i18n("&Copy to Clipboard"), this, TQT_SLOT(slotVariableCopyToClipboard()), 0, copyValue); - connect(this, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & ) ), this, SLOT(slotVariableContextMenu(KListView *, QListViewItem *, const QPoint &))); + connect(this, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & ) ), this, TQT_SLOT(slotVariableContextMenu(KListView *, TQListViewItem *, const TQPoint &))); } @@ -104,7 +104,7 @@ void VariablesListView::slotRemoveSelected() delete v; } -void VariablesListView::keyPressEvent(QKeyEvent *e) +void VariablesListView::keyPressEvent(TQKeyEvent *e) { if(e->key() != Qt::Key_Delete) { @@ -161,11 +161,11 @@ void VariablesListView::replaceVariable(DebuggerVariable* oldvar, DebuggerVariab KListViewItem * item; // Remove children that doesen't exist anymore - QPtrList oldlist = oldvar->values(); + TQPtrList oldlist = oldvar->values(); for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev()) { bool found = false; - QPtrList newlist = newvar->values(); + TQPtrList newlist = newvar->values(); for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev()) { if(newchild->name() == oldchild->name()) @@ -179,11 +179,11 @@ void VariablesListView::replaceVariable(DebuggerVariable* oldvar, DebuggerVariab } // Update and add children - QPtrList newlist = newvar->values(); + TQPtrList newlist = newvar->values(); for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev()) { bool found = false; - QPtrList oldlist = oldvar->values(); + TQPtrList oldlist = oldvar->values(); for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev()) { if(newchild->name() == oldchild->name()) @@ -215,11 +215,11 @@ void VariablesListView::replaceVariable(DebuggerVariable* oldvar, DebuggerVariab item->setText(VariablesListViewColumns::Name, oldvar->name()); item->setText(VariablesListViewColumns::Type, oldvar->typeName()); item->setText(VariablesListViewColumns::Size, oldvar->sizeName()); - item->setText(VariablesListViewColumns::Value, (newvar->isScalar() ? oldvar->value() : QString())); + item->setText(VariablesListViewColumns::Value, (newvar->isScalar() ? oldvar->value() : TQString())); } -void VariablesListView::slotVariableContextMenu(KListView *, QListViewItem *, const QPoint& point) +void VariablesListView::slotVariableContextMenu(KListView *, TQListViewItem *, const TQPoint& point) { if(!selectedItem()) return; @@ -242,7 +242,7 @@ void VariablesListView::slotVariableSetValue() DebuggerVariable v(selected()); - QString newvalue; + TQString newvalue; switch(v.type()) { case DebuggerVariableTypes::String: @@ -284,7 +284,7 @@ void VariablesListView::slotVariableCopyToClipboard( ) DebuggerVariable *v = selected(true); if(!v) return; - QApplication::clipboard()->setText(v->value()); + TQApplication::clipboard()->setText(v->value()); } #include "variableslistview.moc" diff --git a/quanta/components/debugger/variableslistview.h b/quanta/components/debugger/variableslistview.h index 41de5328..729aa8d8 100644 --- a/quanta/components/debugger/variableslistview.h +++ b/quanta/components/debugger/variableslistview.h @@ -21,7 +21,7 @@ #include #include -#include +#include class DebuggerVariable; @@ -38,7 +38,7 @@ class VariablesListView : public KListView }; public: - VariablesListView(QWidget *parent = 0, const char *name = 0); + VariablesListView(TQWidget *parent = 0, const char *name = 0); ~VariablesListView(); void addVariable(DebuggerVariable* variable); @@ -54,17 +54,17 @@ class VariablesListView : public KListView void slotVariableSetValue(); void slotVariableDump(); void slotVariableCopyToClipboard(); - void slotVariableContextMenu(KListView *list, QListViewItem * item, const QPoint& point); + void slotVariableContextMenu(KListView *list, TQListViewItem * item, const TQPoint& point); signals: void valueChanged(DebuggerVariable*); void removeVariable(DebuggerVariable*); private: - void keyPressEvent(QKeyEvent *e); + void keyPressEvent(TQKeyEvent *e); void replaceVariable(DebuggerVariable* oldvar, DebuggerVariable* newvar); - QPtrList m_variablesList; + TQPtrList m_variablesList; KPopupMenu *m_variablePopup; }; diff --git a/quanta/components/framewizard/areaattributedb.h b/quanta/components/framewizard/areaattributedb.h index e13682b3..6dbe92d1 100644 --- a/quanta/components/framewizard/areaattributedb.h +++ b/quanta/components/framewizard/areaattributedb.h @@ -17,9 +17,9 @@ #ifndef AREAATTRIBUTEDB_H #define AREAATTRIBUTEDB_H -#include -#include -#include +#include +#include +#include /**this is *@author gulmini luciano */ @@ -28,22 +28,22 @@ class areaAttribute : public QObject{ Q_OBJECT private: - QRect m_geometry; - QMap m_attributeMap; //tag specific attributes + TQRect m_geometry; + TQMap m_attributeMap; //tag specific attributes public: areaAttribute(); ~areaAttribute(){}; - void setAttribute(const QString& name, const QString& value){ m_attributeMap[name] = value; } - void setAllAttributes(QMap map){ m_attributeMap = map; } + void setAttribute(const TQString& name, const TQString& value){ m_attributeMap[name] = value; } + void setAllAttributes(TQMap map){ m_attributeMap = map; } void resetAttributes(); - QRect geometry() const { return m_geometry; } - QString src() const{ return m_attributeMap["src"]; } - QString attributeValue(QString l) const { return attributeMap()[l];} - QMap attributeMap() const { return m_attributeMap; } + TQRect geometry() const { return m_geometry; } + TQString src() const{ return m_attributeMap["src"]; } + TQString attributeValue(TQString l) const { return attributeMap()[l];} + TQMap attributeMap() const { return m_attributeMap; } public slots: - void setGeometry(QRect g) { m_geometry = g; } + void setGeometry(TQRect g) { m_geometry = g; } }; #endif diff --git a/quanta/components/framewizard/fmfpeditor.cpp b/quanta/components/framewizard/fmfpeditor.cpp index cc262453..e2bfb44a 100644 --- a/quanta/components/framewizard/fmfpeditor.cpp +++ b/quanta/components/framewizard/fmfpeditor.cpp @@ -16,12 +16,12 @@ ***************************************************************************/ #include "fmfpeditor.h" -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include //#include @@ -33,11 +33,11 @@ fmFPeditor::fmFPeditor() : fmFPeditorS (){ sbLeft->setWrapping(true); sbTop->setWrapping(true); - QString htmlFiles = i18n("*.html *.htm|HTML Files"); - QString phpFiles = i18n("*.php|PHP Files"); - QString xmlFiles = i18n("*.xml|XML Files"); - QString xhtmlFiles = i18n("*xhtml|XHTML Files"); - QString allFiles = i18n("*|All Files"); + TQString htmlFiles = i18n("*.html *.htm|HTML Files"); + TQString phpFiles = i18n("*.php|PHP Files"); + TQString xmlFiles = i18n("*.xml|XML Files"); + TQString xhtmlFiles = i18n("*xhtml|XHTML Files"); + TQString allFiles = i18n("*|All Files"); fc->setFilter(htmlFiles+"\n"+phpFiles+"\n"+xmlFiles+"\n"+xhtmlFiles+"\n"+allFiles); @@ -45,14 +45,14 @@ fmFPeditor::fmFPeditor() : fmFPeditorS (){ fmFPeditor::~fmFPeditor(){ } -QString fmFPeditor::noresizeValue() { +TQString fmFPeditor::noresizeValue() { switch(bgNoresize->id(bgNoresize->selected())){ case 0:return "";break; default:return "noresize"; } } -QString fmFPeditor::scrollingValue() { +TQString fmFPeditor::scrollingValue() { switch(bgScrolling->id(bgScrolling->selected())){ case 0:return "yes";break; case 2:return "no";break; @@ -60,14 +60,14 @@ QString fmFPeditor::scrollingValue() { } } -QString fmFPeditor::frameborderValue() { +TQString fmFPeditor::frameborderValue() { switch(bgBorder->id(bgBorder->selected())){ case 1:return "0"; break; default:return "1"; } } -void fmFPeditor::setup(QMap m){ +void fmFPeditor::setup(TQMap m){ leId->setText(m["id"]); fc->setURL(m["src"]); leClass->setText(m["class"]); @@ -89,8 +89,8 @@ void fmFPeditor::setup(QMap m){ sbTop->setValue(m["marginheight"].toInt()); } -QMap fmFPeditor::attributeMap(){ - QMap map; +TQMap fmFPeditor::attributeMap(){ + TQMap map; map["name"] = leName->text(); map["longdesc"] = leLongdesc->text(); @@ -102,8 +102,8 @@ QMap fmFPeditor::attributeMap(){ map["class"] = leClass->text(); map["noresize"] = noresizeValue(); map["frameborder"] = frameborderValue(); - map["marginwidth"] = QString::number( sbLeft->value(),10 ); - map["marginheight"] = QString::number( sbTop->value(),10 ); + map["marginwidth"] = TQString::number( sbLeft->value(),10 ); + map["marginheight"] = TQString::number( sbTop->value(),10 ); return map; } diff --git a/quanta/components/framewizard/fmfpeditor.h b/quanta/components/framewizard/fmfpeditor.h index c434b421..1a89f0c8 100644 --- a/quanta/components/framewizard/fmfpeditor.h +++ b/quanta/components/framewizard/fmfpeditor.h @@ -30,13 +30,13 @@ class fmFPeditor : public fmFPeditorS { public: fmFPeditor(); ~fmFPeditor(); - void setup(QMap); - QMap attributeMap(); + void setup(TQMap); + TQMap attributeMap(); private: - QString noresizeValue(); - QString scrollingValue(); - QString frameborderValue(); + TQString noresizeValue(); + TQString scrollingValue(); + TQString frameborderValue(); }; #endif diff --git a/quanta/components/framewizard/fmrceditor.cpp b/quanta/components/framewizard/fmrceditor.cpp index 270b3e8c..67c36d62 100644 --- a/quanta/components/framewizard/fmrceditor.cpp +++ b/quanta/components/framewizard/fmrceditor.cpp @@ -16,8 +16,8 @@ ***************************************************************************/ #include "fmrceditor.h" -#include -#include +#include +#include fmRCeditor::fmRCeditor() : fmRCeditorS(){} @@ -27,7 +27,7 @@ int fmRCeditor::spinBoxValue() const { return sb->value(); } -void fmRCeditor::setLabelText(QString s){ +void fmRCeditor::setLabelText(TQString s){ tl->setText(s); } diff --git a/quanta/components/framewizard/fmrceditor.h b/quanta/components/framewizard/fmrceditor.h index 55441e91..254f1cc5 100644 --- a/quanta/components/framewizard/fmrceditor.h +++ b/quanta/components/framewizard/fmrceditor.h @@ -31,7 +31,7 @@ class fmRCeditor : public fmRCeditorS { ~fmRCeditor(); public: int spinBoxValue() const; - void setLabelText(QString); + void setLabelText(TQString); }; diff --git a/quanta/components/framewizard/framewizard.cpp b/quanta/components/framewizard/framewizard.cpp index 2f3903dd..e0e7d5d9 100644 --- a/quanta/components/framewizard/framewizard.cpp +++ b/quanta/components/framewizard/framewizard.cpp @@ -21,26 +21,26 @@ #include //#include #include -#include +#include #include "fwglobal.h" -static const QString info1=i18n("You must select an area."), +static const TQString info1=i18n("You must select an area."), info2=i18n("Before editing a frame you must save the file."); -FrameWizard::FrameWizard(QWidget *parent, const char *name) : FrameWizardS(parent, name), +FrameWizard::FrameWizard(TQWidget *parent, const char *name) : FrameWizardS(parent, name), m_hasSelected(false),m_saved(false) { m_hasSelected = false; m_currSA=vfe->internalTree()->root()->label(); - connect(this, SIGNAL(launchDraw()), this, SLOT(draw())); - connect(vfe, SIGNAL(areaSelected(const QString &)), this, SLOT(catchSelectedArea(const QString &))); + connect(this, TQT_SIGNAL(launchDraw()), this, TQT_SLOT(draw())); + connect(vfe, TQT_SIGNAL(areaSelected(const TQString &)), this, TQT_SLOT(catchSelectedArea(const TQString &))); - connect(pbHorizontal, SIGNAL(clicked()), this, SLOT(split())); - connect(pbVertical, SIGNAL(clicked()), this, SLOT(split())); - connect(pbEditFrame, SIGNAL(clicked()), this, SLOT(showFrameEditorDlg())); - connect(pbReset, SIGNAL(clicked()), this, SLOT(reset())); - connect(pbDelete, SIGNAL(clicked()), this, SLOT(remove())); + connect(pbHorizontal, TQT_SIGNAL(clicked()), this, TQT_SLOT(split())); + connect(pbVertical, TQT_SIGNAL(clicked()), this, TQT_SLOT(split())); + connect(pbEditFrame, TQT_SIGNAL(clicked()), this, TQT_SLOT(showFrameEditorDlg())); + connect(pbReset, TQT_SIGNAL(clicked()), this, TQT_SLOT(reset())); + connect(pbDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(remove())); } FrameWizard::~FrameWizard(){ @@ -48,7 +48,7 @@ FrameWizard::~FrameWizard(){ Q_CHECK_PTR( vfe ); } -void FrameWizard::catchSelectedArea(const QString &id ){ +void FrameWizard::catchSelectedArea(const TQString &id ){ m_currSA = id; //is the current SelectableArea selected m_hasSelected = true;// a SelectableArea has been selected } @@ -56,8 +56,8 @@ void FrameWizard::catchSelectedArea(const QString &id ){ void FrameWizard::split(){ if(m_hasSelected) { int split = 0; - QString currNodeLabel = m_currSA; - QString senderName=sender()->name(); + TQString currNodeLabel = m_currSA; + TQString senderName=sender()->name(); if(senderName=="pbHorizontal"){ split = showRCeditorDlg(i18n("Enter the desired number of rows:")); if(split>=2) vfe->split(currNodeLabel,split,HORIZONTAL); @@ -77,7 +77,7 @@ void FrameWizard::draw(){ vfe->draw(); } -int FrameWizard::showRCeditorDlg(const QString &s){ +int FrameWizard::showRCeditorDlg(const TQString &s){ int res = 0; fmRCeditor *dlg = new fmRCeditor; dlg->setLabelText(s); diff --git a/quanta/components/framewizard/framewizard.h b/quanta/components/framewizard/framewizard.h index 22e93789..6a5c3a54 100644 --- a/quanta/components/framewizard/framewizard.h +++ b/quanta/components/framewizard/framewizard.h @@ -32,26 +32,26 @@ class FrameWizard : public FrameWizardS // has been not saved and so you cannot edit the frame // This is for me: se non si salva il file no si riesce a conoscere il // percorso relativo dei file da mettere nell'attributo src - QString m_currSA; + TQString m_currSA; public: - FrameWizard( QWidget* parent=0, const char *name=0); + FrameWizard( TQWidget* parent=0, const char *name=0); ~FrameWizard(); private slots: void showFrameEditorDlg(); void reset(); void remove(); - void catchSelectedArea(const QString &id ); + void catchSelectedArea(const TQString &id ); void split(); void draw(); - int showRCeditorDlg(const QString &s); + int showRCeditorDlg(const TQString &s); public : - void loadExistingFramesetStructure(const QStringList &list){ vfe->loadExistingStructure(list);} - QString generateFramesetStructure(){ return vfe->framesetStructure(); } + void loadExistingFramesetStructure(const TQStringList &list){ vfe->loadExistingStructure(list);} + TQString generateFramesetStructure(){ return vfe->framesetStructure(); } void setSaved( bool b){ m_saved=b; } - void setMarkupLanguage(const QString& s){ vfe->setMarkupLanguage(s);} + void setMarkupLanguage(const TQString& s){ vfe->setMarkupLanguage(s);} signals: void launchDraw(); diff --git a/quanta/components/framewizard/selectablearea.cpp b/quanta/components/framewizard/selectablearea.cpp index 32ea234b..c168e323 100644 --- a/quanta/components/framewizard/selectablearea.cpp +++ b/quanta/components/framewizard/selectablearea.cpp @@ -16,34 +16,34 @@ ***************************************************************************/ #include "selectablearea.h" -#include +#include //#include #include "fwglobal.h" -SelectableArea::SelectableArea(QWidget *parent, const char *name ) : KHTMLPart(parent,name) { - view()->setFrameShape(QFrame::NoFrame); - view()->setMinimumSize(QSize(1,1)); +SelectableArea::SelectableArea(TQWidget *parent, const char *name ) : KHTMLPart(parent,name) { + view()->setFrameShape(TQFrame::NoFrame); + view()->setMinimumSize(TQSize(1,1)); view()->installEventFilter(this); } SelectableArea::~SelectableArea(){} -bool SelectableArea::eventFilter(QObject *o, QEvent *event){ +bool SelectableArea::eventFilter(TQObject *o, TQEvent *event){ switch ( event->type() ) { - case QEvent::FocusIn : { - view()->setFrameShape(QFrame::Box); - view()->setFrameShadow ( QFrame::Plain ); + case TQEvent::FocusIn : { + view()->setFrameShape(TQFrame::Box); + view()->setFrameShadow ( TQFrame::Plain ); view()->setLineWidth(2); emit selected(m_idLabel); return true; }; break; - case QEvent::FocusOut : { - view()->setFrameShape(QFrame::NoFrame); + case TQEvent::FocusOut : { + view()->setFrameShape(TQFrame::NoFrame); return true; } break; - case QEvent::Resize : { + case TQEvent::Resize : { emit Resized( view()->geometry() ); view()->hide(); view()->show(); diff --git a/quanta/components/framewizard/selectablearea.h b/quanta/components/framewizard/selectablearea.h index 252ec6c9..8de351a9 100644 --- a/quanta/components/framewizard/selectablearea.h +++ b/quanta/components/framewizard/selectablearea.h @@ -18,11 +18,11 @@ #ifndef SELECTABLEAREA_H #define SELECTABLEAREA_H -//#include +//#include #include #include -/**a QTextBrowser that can be selected +/**a TQTextBrowser that can be selected *@author gulmini luciano */ @@ -31,21 +31,21 @@ class SelectableArea : public KHTMLPart { Q_OBJECT public : - SelectableArea(QWidget *parent=0, const char *name=0); + SelectableArea(TQWidget *parent=0, const char *name=0); ~SelectableArea(); - QString idLabel() const { return m_idLabel; } - void setIdLabel(const QString &i) { m_idLabel = i; } - void setSource(const QString& s) { if(!s.isEmpty()) openURL( KURL(s) ); } + TQString idLabel() const { return m_idLabel; } + void setIdLabel(const TQString &i) { m_idLabel = i; } + void setSource(const TQString& s) { if(!s.isEmpty()) openURL( KURL(s) ); } protected : - virtual bool eventFilter(QObject*, QEvent*); + virtual bool eventFilter(TQObject*, TQEvent*); private : - QString m_idLabel; + TQString m_idLabel; signals : - void selected(const QString &); - void Resized(QRect); + void selected(const TQString &); + void Resized(TQRect); }; diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp index fcb60231..fd1f187f 100644 --- a/quanta/components/framewizard/treenode.cpp +++ b/quanta/components/framewizard/treenode.cpp @@ -19,7 +19,7 @@ static const int SIZE = 101; -treeNode::treeNode(const QString &l, const QString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){ +treeNode::treeNode(const TQString &l, const TQString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){ m_childrenList.setAutoDelete(true); m_atts = new areaAttribute; } @@ -28,17 +28,17 @@ treeNode::~treeNode(){ delete m_atts; } -void treeNode::addChildNode(const QString &l) { +void treeNode::addChildNode(const TQString &l) { m_childrenList.append( new treeNode(l,m_label) ); } -void treeNode::removeChildNode(const QString &l,bool autoDelete) { +void treeNode::removeChildNode(const TQString &l,bool autoDelete) { m_childrenList.setAutoDelete(autoDelete); m_childrenList.remove(findChild(l)); } -treeNode* treeNode::findChild(const QString &l){ - QPtrListIterator it( m_childrenList ); +treeNode* treeNode::findChild(const TQString &l){ + TQPtrListIterator it( m_childrenList ); treeNode *node; while ( (node = it.current()) != 0 ) { ++it; @@ -50,7 +50,7 @@ treeNode* treeNode::findChild(const QString &l){ int tree::nodeId = 0; tree::tree(){ - m_root = new treeNode(QString::number(nodeId,10)); + m_root = new treeNode(TQString::number(nodeId,10)); m_nodeList.resize(SIZE); } @@ -68,10 +68,10 @@ void tree::refreshGeometries(treeNode *n){ n->nextChild(); } - QPtrList list = n->childrenList(); - QPtrListIterator it( list ); + TQPtrList list = n->childrenList(); + TQPtrListIterator it( list ); treeNode *node= it.current(); - QRect newGeometry = n->atts()->geometry(); + TQRect newGeometry = n->atts()->geometry(); if(n->splitType()==VERTICAL){ newGeometry.setHeight(node->atts()->geometry().height()); while ( (node = it.current()) != 0 ) { @@ -96,30 +96,30 @@ void tree::refreshGeometries(treeNode *n){ } } -treeNode* tree::findNode(const QString &l){ +treeNode* tree::findNode(const TQString &l){ if(l==m_root->label()) return m_root; return m_nodeList.find(l); } -QString tree::addChildNode(const QString &l){ +TQString tree::addChildNode(const TQString &l){ treeNode *node; if( (node = findNode(l)) != 0) { ++nodeId; - treeNode *newNode = new treeNode(QString::number(nodeId,10),node->label()); + treeNode *newNode = new treeNode(TQString::number(nodeId,10),node->label()); newNode->atts()->setAttribute( "src",node->atts()->src() ); node->addChildNode(newNode); - m_nodeList.insert(QString::number(nodeId,10),newNode); + m_nodeList.insert(TQString::number(nodeId,10),newNode); } - return QString::number(nodeId,10); + return TQString::number(nodeId,10); } -bool tree::insertChildNode(const QString &l){ - QString parent = findNode(l)->parentLabel(); +bool tree::insertChildNode(const TQString &l){ + TQString parent = findNode(l)->parentLabel(); int pos=findNode( parent )->childPosition( findNode(l) ); ++nodeId; - treeNode *newNode = new treeNode(QString::number(nodeId,10),parent); + treeNode *newNode = new treeNode(TQString::number(nodeId,10),parent); newNode->atts()->setAttribute( "src",findNode(l)->atts()->src() ); - m_nodeList.insert(QString::number(nodeId,10),newNode); + m_nodeList.insert(TQString::number(nodeId,10),newNode); return findNode( parent )->insertChild(pos,newNode); } @@ -130,6 +130,6 @@ void tree::reset(){ m_nodeList.clear(); } -void tree::removeChildNode(const QString &pl,const QString &l,bool autoDelete){ +void tree::removeChildNode(const TQString &pl,const TQString &l,bool autoDelete){ findNode(pl)->removeChildNode(l,autoDelete); } diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h index c2d0f3d6..0d686630 100644 --- a/quanta/components/framewizard/treenode.h +++ b/quanta/components/framewizard/treenode.h @@ -18,9 +18,9 @@ #ifndef TREENODE_H #define TREENODE_H -#include -#include -#include +#include +#include +#include #include "fwglobal.h" #include "areaattributedb.h" @@ -30,34 +30,34 @@ */ class treeNode { private: - QString m_label, + TQString m_label, m_parentLabel; SplitType m_splitType; - QPtrList m_childrenList; + TQPtrList m_childrenList; areaAttribute *m_atts; public: - treeNode(const QString &l=QString::null, const QString &pl=QString::null); + treeNode(const TQString &l=TQString::null, const TQString &pl=TQString::null); ~treeNode(); - void addChildNode(const QString &L); + void addChildNode(const TQString &L); void addChildNode(treeNode *n){ m_childrenList.append(n); } - void removeChildNode(const QString &l, bool autoDelete); + void removeChildNode(const TQString &l, bool autoDelete); void setSplitType(SplitType s) { m_splitType = s; } - void setLabel(const QString &l) { m_label = l; } + void setLabel(const TQString &l) { m_label = l; } void removeChildren() { m_childrenList.clear(); } - void setParentLabel(const QString &s){ m_parentLabel = s;} + void setParentLabel(const TQString &s){ m_parentLabel = s;} int childPosition(treeNode* n){ return m_childrenList.find(n); } bool insertChild(unsigned int pos, treeNode* n) { return m_childrenList.insert( pos, n); } - QString label() const { return m_label; } - QString parentLabel() const { return m_parentLabel; } + TQString label() const { return m_label; } + TQString parentLabel() const { return m_parentLabel; } SplitType splitType() const { return m_splitType; } - QPtrList childrenList() { return m_childrenList; } + TQPtrList childrenList() { return m_childrenList; } treeNode* firstChild() { return m_childrenList.first(); } treeNode* nextChild() { return m_childrenList.next(); } treeNode* lastChild() { return m_childrenList.last(); } treeNode* currentChild() { return m_childrenList.current(); } - treeNode* findChild(const QString &L); + treeNode* findChild(const TQString &L); areaAttribute* atts() { return m_atts; } @@ -68,18 +68,18 @@ class treeNode { class tree{ private: treeNode *m_root; - QDict m_nodeList; + TQDict m_nodeList; static int nodeId; public: tree(); ~tree(); treeNode* root() const { return m_root; } - QString addChildNode(const QString &l); - bool insertChildNode(const QString &L); - void removeChildNode(const QString &pl,const QString &l,bool autoDelete);//parent node,child node - treeNode* findNode(const QString &L); - areaAttribute* findAreaAttribute(const QString &l){ return findNode(l)->atts(); }; + TQString addChildNode(const TQString &l); + bool insertChildNode(const TQString &L); + void removeChildNode(const TQString &pl,const TQString &l,bool autoDelete);//parent node,child node + treeNode* findNode(const TQString &L); + areaAttribute* findAreaAttribute(const TQString &l){ return findNode(l)->atts(); }; void reset(); void refreshGeometries(treeNode*); }; diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp index 3871ac61..db52da97 100644 --- a/quanta/components/framewizard/visualframeeditor.cpp +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -17,8 +17,8 @@ #include "visualframeeditor.h" -#include -#include +#include +#include //#include #include "qextfileinfo.h" @@ -28,13 +28,13 @@ static int cancelledPixels(int n){ return (n-1)*6; } -QMap > SIZES; +TQMap > SIZES; static int splitterIdNumber = 0; -VisualFrameEditor::VisualFrameEditor(QWidget * parent, const char * name) : QHBox(parent,name){ +VisualFrameEditor::VisualFrameEditor(TQWidget * parent, const char * name) : TQHBox(parent,name){ m_internalTree = new tree; - m_internalTree->root()->atts()->setGeometry(QRect(0,0,510,422)); + m_internalTree->root()->atts()->setGeometry(TQRect(0,0,510,422)); m_firstInsertedSA = 0L; m_markupLanguage = HTML; } @@ -44,11 +44,11 @@ VisualFrameEditor::~VisualFrameEditor(){ delete m_firstInsertedSA; } -void VisualFrameEditor::setGeometries(const QString &l){ +void VisualFrameEditor::setGeometries(const TQString &l){ int cP = cancelledPixels(m_internalTree->findNode(l)->countChildren()); - QRect newGeometry(m_internalTree->findNode(l)->atts()->geometry()); - QPtrList list=m_internalTree->findNode(l)->childrenList(); - QPtrListIterator it( list ); + TQRect newGeometry(m_internalTree->findNode(l)->atts()->geometry()); + TQPtrList list=m_internalTree->findNode(l)->childrenList(); + TQPtrListIterator it( list ); treeNode *node; if(m_internalTree->findNode(l)->splitType() == VERTICAL){ int dummyDimension=m_internalTree->findNode(l)->atts()->geometry().width()-cP; @@ -69,14 +69,14 @@ void VisualFrameEditor::setGeometries(const QString &l){ } } -void VisualFrameEditor::split(const QString &l, int n, SplitType type) { +void VisualFrameEditor::split(const TQString &l, int n, SplitType type) { if(l==m_internalTree->root()->label()){ m_internalTree->root()->setSplitType(type); for(int i = 1; i<=n; i++) m_internalTree->addChildNode(l); setGeometries(l); } else { - QString parentLabel=m_internalTree->findNode(l)->parentLabel(); + TQString parentLabel=m_internalTree->findNode(l)->parentLabel(); SplitType parentSplit=m_internalTree->findNode(parentLabel)->splitType(); if( parentSplit != type ) { m_internalTree->findNode(l)->setSplitType(type); @@ -91,7 +91,7 @@ void VisualFrameEditor::split(const QString &l, int n, SplitType type) { } } -void VisualFrameEditor::loadExistingStructure(const QStringList &list){ +void VisualFrameEditor::loadExistingStructure(const TQStringList &list){ if(!list.isEmpty()) { m_existingStructure = list; m_existingStructure.remove("");//closure tag not needed @@ -99,8 +99,8 @@ void VisualFrameEditor::loadExistingStructure(const QStringList &list){ } } -QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){ - QStringList list=QStringList::split(",",s); +TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ + TQStringList list=TQStringList::split(",",s); int leftPercentage = 100; int leftPercentageDistributedAmongAsterisks=0; int weightAsteriskCounter=0; @@ -108,7 +108,7 @@ QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){ // example cols="40%,5*,*" // then every asterisk must be assigned a percentage of 10% so the real percentage // notation is cols="40%,50%,10%" - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if(!(*it).contains("%") && !(*it).contains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; if((*it).contains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); if((*it).contains("*")) { @@ -124,38 +124,38 @@ QStringList VisualFrameEditor::convertAsterisks(const QString &s,int d){ // NB: I valori delle percentuali generati da if .. else possono non corrispondere // a quelli effettivamente generati dal metodo build che opera un'altra normalizzazione. // In genere la differenza �dell' 1% - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { if((*it).contains("*")){ int weight= (*it).section("*",0,0).toInt(); if(weight==0) weight=1; int newPercentage = weight*leftPercentageDistributedAmongAsterisks; - (*it)=(QString::number(newPercentage,10)+"%"); + (*it)=(TQString::number(newPercentage,10)+"%"); leftPercentage-=newPercentage; } } return list; } -void VisualFrameEditor::buildInternalTree(const QString &parent){ - QString line = m_existingStructure.first(); +void VisualFrameEditor::buildInternalTree(const TQString &parent){ + TQString line = m_existingStructure.first(); if(line.contains("findNode(parent)->atts()->geometry(); - QStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); + TQRect dummy=m_internalTree->findNode(parent)->atts()->geometry(); + TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1); - QPtrList list=m_internalTree->findNode(parent)->childrenList(); - QPtrListIterator it( list ); + TQPtrList list=m_internalTree->findNode(parent)->childrenList(); + TQPtrListIterator it( list ); treeNode *node; while ( (node = it.current()) != 0 ) { ++it; - QRect newGeometry(dummy); + TQRect newGeometry(dummy); double newDimension; if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; @@ -168,20 +168,20 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ else if(line.contains("cols")) { split(parent,(line.contains(",")+1),VERTICAL); - QRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); + TQRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); pattern.search(line); - QRect dummy=m_internalTree->findNode(parent)->atts()->geometry(); - QStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); + TQRect dummy=m_internalTree->findNode(parent)->atts()->geometry(); + TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1); - QPtrList list=m_internalTree->findNode(parent)->childrenList(); - QPtrListIterator it( list ); + TQPtrList list=m_internalTree->findNode(parent)->childrenList(); + TQPtrListIterator it( list ); treeNode *node; while ( (node = it.current()) != 0 ) { ++it; - QRect newGeometry(dummy); + TQRect newGeometry(dummy); double newDimension; if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; @@ -200,11 +200,11 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ } } else { - QMap attributeMap; - if( line.contains( QRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; - else attributeMap["noresize"] = QString::null; + TQMap attributeMap; + if( line.contains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; + else attributeMap["noresize"] = TQString::null; - QRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files + TQRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files if(srcPattern.search(line) !=-1 ) { KURL pathToConvert, basePath; pathToConvert.setPath(srcPattern.cap(1)); @@ -213,12 +213,12 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ line.remove(srcPattern);//we don't need to operate on this anymore } - QRegExp pattern("\\s+(\\w+\\s*=\\s*\"[\\w\\s\\./_\\+\\d]*\")"); + TQRegExp pattern("\\s+(\\w+\\s*=\\s*\"[\\w\\s\\./_\\+\\d]*\")"); int pos = 0; while ( pos >= 0 ) { pos = pattern.search( line, pos ); - attributeMap[ pattern.cap(1).section( QRegExp("=\\s*\"") ,0,0) ] = pattern.cap(1).section(QRegExp("=\\s*\""),1,1).remove("\""); + attributeMap[ pattern.cap(1).section( TQRegExp("=\\s*\"") ,0,0) ] = pattern.cap(1).section(TQRegExp("=\\s*\""),1,1).remove("\""); if ( pos >= 0 ) pos += pattern.matchedLength(); } m_internalTree->findNode(parent)->atts()->setAllAttributes(attributeMap); @@ -226,14 +226,14 @@ void VisualFrameEditor::buildInternalTree(const QString &parent){ } } -void VisualFrameEditor::paintEvent ( QPaintEvent * ){ +void VisualFrameEditor::paintEvent ( TQPaintEvent * ){ hide(); delete m_firstInsertedSA; m_firstInsertedSA = 0L; - QObjectList* splitterList = queryList("QSplitter"); + TQObjectList* splitterList = queryList("TQSplitter"); for (uint i = 0; i < splitterList->count(); i++) { - QObject* o = splitterList->at(i); + TQObject* o = splitterList->at(i); removeChild(o); //this will delete all childr of "o" } @@ -243,24 +243,24 @@ void VisualFrameEditor::paintEvent ( QPaintEvent * ){ show(); } -void VisualFrameEditor::removeNode(const QString &l){ +void VisualFrameEditor::removeNode(const TQString &l){ if( l == m_internalTree->root()->label() ) m_internalTree->reset();//trying to remove root node is equivalent to reinitialize else { - QString parentLabel=m_internalTree->findNode(l)->parentLabel(); + TQString parentLabel=m_internalTree->findNode(l)->parentLabel(); if(m_internalTree->findNode(parentLabel)->countChildren()>=3) m_internalTree->removeChildNode(parentLabel,l,true); else { m_internalTree->removeChildNode(parentLabel,l,true); if( !m_internalTree->findNode(parentLabel)->firstChild()->hasChildren() ){ //final nodes - QMap map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap(); + TQMap map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap(); m_internalTree->findNode(parentLabel)->removeChildren(); m_internalTree->findNode(parentLabel)->atts()->setAllAttributes( map ) ; m_internalTree->findNode(parentLabel)->setSplitType(NONE); } else { - QPtrList list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList(); + TQPtrList list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList(); if( parentLabel != m_internalTree->root()->label() ) { - QString grandParentLabel = m_internalTree->findNode(parentLabel)->parentLabel(); + TQString grandParentLabel = m_internalTree->findNode(parentLabel)->parentLabel(); m_internalTree->removeChildNode( parentLabel,m_internalTree->findNode(parentLabel)->firstChild()->label(),false ); m_internalTree->removeChildNode( grandParentLabel ,parentLabel, true ); treeNode *node; @@ -283,14 +283,14 @@ void VisualFrameEditor::removeNode(const QString &l){ } } -void VisualFrameEditor::drawGUI(treeNode *n, QWidget* parent){ +void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* parent){ if(n->hasChildren()) { - QString splitterName("splitter"+QString::number(++splitterIdNumber,10)); - QSplitter *splitter = new QSplitter(parent,splitterName); + TQString splitterName("splitter"+TQString::number(++splitterIdNumber,10)); + TQSplitter *splitter = new TQSplitter(parent,splitterName); if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] ); switch( n->splitType() ){ - case VERTICAL : splitter->setOrientation(QSplitter::Horizontal);break; - case HORIZONTAL : splitter->setOrientation(QSplitter::Vertical);break; + case VERTICAL : splitter->setOrientation(TQSplitter::Horizontal);break; + case HORIZONTAL : splitter->setOrientation(TQSplitter::Vertical);break; default:break; } n->firstChild(); @@ -301,19 +301,19 @@ void VisualFrameEditor::drawGUI(treeNode *n, QWidget* parent){ } else { SelectableArea *sa=new SelectableArea(parent,n->label()); - if(parent->isA("QSplitter")) dynamic_cast(parent)->setResizeMode(sa->view(),QSplitter::KeepSize ); + if(parent->isA("TQSplitter")) dynamic_cast(parent)->setResizeMode(sa->view(),TQSplitter::KeepSize ); else if(!m_firstInsertedSA) m_firstInsertedSA = sa; sa->view()->setGeometry(n->atts()->geometry()); sa->setIdLabel( n->label() ); sa->setSource( n->atts()->src() ); - connect(sa, SIGNAL(Resized(QRect)), m_internalTree->findNode(sa->idLabel())->atts(), SLOT(setGeometry(QRect))); - connect(sa, SIGNAL(selected(const QString &)),this, SIGNAL(areaSelected(const QString &))); + connect(sa, TQT_SIGNAL(Resized(TQRect)), m_internalTree->findNode(sa->idLabel())->atts(), TQT_SLOT(setGeometry(TQRect))); + connect(sa, TQT_SIGNAL(selected(const TQString &)),this, TQT_SIGNAL(areaSelected(const TQString &))); } } -QString VisualFrameEditor::createFrameTag(areaAttribute *a){ - QString Src(a->attributeValue("src")), +TQString VisualFrameEditor::createFrameTag(areaAttribute *a){ + TQString Src(a->attributeValue("src")), Longdesc(a->attributeValue("longdesc")), Name(a->attributeValue("name")), Scrolling(a->attributeValue("scrolling")), @@ -326,7 +326,7 @@ QString VisualFrameEditor::createFrameTag(areaAttribute *a){ Marginwidth(a->attributeValue("marginwidth")), Marginheight(a->attributeValue("marginheight")); - QString tagBegin=" dimMap; +TQString VisualFrameEditor::RCvalue(treeNode *n) { + TQString s; + TQMap dimMap; double percentage = 100.0; int remainingPercentage=100; int child_number = n->countChildren(); @@ -390,14 +390,14 @@ QString VisualFrameEditor::RCvalue(treeNode *n) { for(int i=1;i<=child_number-1;++i) { remainingPercentage-=proxInt(dimMap[i]*percentage); - s+=QString::number(proxInt(dimMap[i]*percentage),10); + s+=TQString::number(proxInt(dimMap[i]*percentage),10); s+="%,"; } - return s+=(QString::number(remainingPercentage,10)+"%"); + return s+=(TQString::number(remainingPercentage,10)+"%"); } -static QStringList nonFormattedStructure; +static TQStringList nonFormattedStructure; void VisualFrameEditor::createStructure(treeNode* n){ if(n==m_internalTree->root() && !n->hasChildren()) return; @@ -417,10 +417,10 @@ void VisualFrameEditor::createStructure(treeNode* n){ else nonFormattedStructure.append(createFrameTag(n->atts())); } -QString VisualFrameEditor::formatStructure(){ - QString s; +TQString VisualFrameEditor::formatStructure(){ + TQString s; int tabNum = 0; - for ( QStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { + for ( TQStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { if((*it).contains("")) { @@ -434,13 +434,13 @@ QString VisualFrameEditor::formatStructure(){ return s; } -QString VisualFrameEditor::framesetStructure() { +TQString VisualFrameEditor::framesetStructure() { m_internalTree->refreshGeometries(m_internalTree->root()); createStructure(m_internalTree->root()); return formatStructure(); } -void VisualFrameEditor::setMarkupLanguage(const QString& s){ +void VisualFrameEditor::setMarkupLanguage(const TQString& s){ if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML; else if( s.contains("html",false)!=0 ) m_markupLanguage = HTML; diff --git a/quanta/components/framewizard/visualframeeditor.h b/quanta/components/framewizard/visualframeeditor.h index 4924f3cb..27cef614 100644 --- a/quanta/components/framewizard/visualframeeditor.h +++ b/quanta/components/framewizard/visualframeeditor.h @@ -20,47 +20,47 @@ #include "treenode.h" #include "selectablearea.h" -#include +#include /** *@author gulmini luciano */ -class VisualFrameEditor : public QHBox { +class VisualFrameEditor : public TQHBox { Q_OBJECT private: enum MarkupLanguage{XHTML,HTML}; tree *m_internalTree; SelectableArea* m_firstInsertedSA; - QStringList m_existingStructure; + TQStringList m_existingStructure; MarkupLanguage m_markupLanguage; - void buildInternalTree(const QString &parent); - void setGeometries(const QString &l); - void drawGUI(treeNode *n, QWidget* parent); - QStringList convertAsterisks(const QString &s, int d); + void buildInternalTree(const TQString &parent); + void setGeometries(const TQString &l); + void drawGUI(treeNode *n, TQWidget* parent); + TQStringList convertAsterisks(const TQString &s, int d); - QString createFrameTag(areaAttribute *a); - QString formatStructure(); - QString RCvalue(treeNode *n); + TQString createFrameTag(areaAttribute *a); + TQString formatStructure(); + TQString RCvalue(treeNode *n); void createStructure(treeNode* n); public: - VisualFrameEditor( QWidget * parent = 0, const char * name = 0); + VisualFrameEditor( TQWidget * parent = 0, const char * name = 0); ~VisualFrameEditor(); void draw() { repaint(); } - void loadExistingStructure(const QStringList &list); - QString framesetStructure(); - void removeNode(const QString &l); - void split(const QString &l, int n, SplitType type); - void setMarkupLanguage(const QString& s); + void loadExistingStructure(const TQStringList &list); + TQString framesetStructure(); + void removeNode(const TQString &l); + void split(const TQString &l, int n, SplitType type); + void setMarkupLanguage(const TQString& s); tree* internalTree() { return m_internalTree;} protected: - virtual void paintEvent ( QPaintEvent * ); + virtual void paintEvent ( TQPaintEvent * ); signals: - void areaSelected(const QString &); + void areaSelected(const TQString &); }; #endif diff --git a/quanta/components/tableeditor/tableeditor.cpp b/quanta/components/tableeditor/tableeditor.cpp index 970828a2..bb581859 100644 --- a/quanta/components/tableeditor/tableeditor.cpp +++ b/quanta/components/tableeditor/tableeditor.cpp @@ -25,16 +25,16 @@ #include //qt includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include //own includes #include "tagdialog.h" @@ -48,25 +48,25 @@ int newNum; -TableEditor::TableEditor(QWidget* parent, const char* name) +TableEditor::TableEditor(TQWidget* parent, const char* name) : TableEditorS(parent, name) { m_popup = new KPopupMenu(); - m_cellEditId = m_popup->insertItem(i18n("&Edit Cell Properties"), this ,SLOT(slotEditCell())); - m_rowEditId = m_popup->insertItem(i18n("Edit &Row Properties"), this ,SLOT(slotEditRow())); - // m_colEditId = m_popup->insertItem(i18n("Edit &Column Properties"), this ,SLOT(slotEditCol())); + m_cellEditId = m_popup->insertItem(i18n("&Edit Cell Properties"), this ,TQT_SLOT(slotEditCell())); + m_rowEditId = m_popup->insertItem(i18n("Edit &Row Properties"), this ,TQT_SLOT(slotEditRow())); + // m_colEditId = m_popup->insertItem(i18n("Edit &Column Properties"), this ,TQT_SLOT(slotEditCol())); m_mergeSeparatorId = m_popup->insertSeparator(); - m_mergeCellsId = m_popup->insertItem(i18n("Merge Cells"), this, SLOT(slotMergeCells())); - m_unmergeCellsId = m_popup->insertItem(i18n("Break Merging"), this, SLOT(slotUnmergeCells())); + m_mergeCellsId = m_popup->insertItem(i18n("Merge Cells"), this, TQT_SLOT(slotMergeCells())); + m_unmergeCellsId = m_popup->insertItem(i18n("Break Merging"), this, TQT_SLOT(slotUnmergeCells())); m_popup->insertSeparator(); - m_popup->insertItem(i18n("&Insert Row"), this, SLOT(slotInsertRow())); - m_popup->insertItem(i18n("Insert Co&lumn"), this, SLOT(slotInsertCol())); - m_popup->insertItem(i18n("Remove Row"), this, SLOT(slotRemoveRow())); - m_popup->insertItem(i18n("Remove Column"), this, SLOT(slotRemoveCol())); + m_popup->insertItem(i18n("&Insert Row"), this, TQT_SLOT(slotInsertRow())); + m_popup->insertItem(i18n("Insert Co&lumn"), this, TQT_SLOT(slotInsertCol())); + m_popup->insertItem(i18n("Remove Row"), this, TQT_SLOT(slotRemoveRow())); + m_popup->insertItem(i18n("Remove Column"), this, TQT_SLOT(slotRemoveCol())); m_popup->insertSeparator(); - m_popup->insertItem(i18n("Edit &Table Properties"), this, SLOT(slotEditTable())); - m_editChildId = m_popup->insertItem(i18n("Edit Child Table"), this, SLOT(slotEditChildTable())); + m_popup->insertItem(i18n("Edit &Table Properties"), this, TQT_SLOT(slotEditTable())); + m_editChildId = m_popup->insertItem(i18n("Edit Child Table"), this, TQT_SLOT(slotEditChildTable())); buttonOk->setIconSet(SmallIconSet("button_ok")); buttonCancel->setIconSet(SmallIconSet("button_cancel")); @@ -79,38 +79,38 @@ TableEditor::TableEditor(QWidget* parent, const char* name) m_table = 0L; m_dtd = 0L; m_write = 0L; - m_tableDataTags = new QValueList >; - m_tableHeaderTags = new QValueList >; - m_tableFooterTags = new QValueList >; + m_tableDataTags = new TQValueList >; + m_tableHeaderTags = new TQValueList >; + m_tableFooterTags = new TQValueList >; m_tableTags = 0L; - m_tableDataRows = new QValueList; - m_tableHeaderRows = new QValueList; - m_tableFooterRows = new QValueList; + m_tableDataRows = new TQValueList; + m_tableHeaderRows = new TQValueList; + m_tableFooterRows = new TQValueList; m_tableRows = 0L; m_createNodes = true; newNum += 7; - connect(headerColSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int))); - connect(headerRowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int))); - connect(rowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int))); - connect(colSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int))); - connect(footerRowSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveRow(int))); - connect(footerColSpinBox, SIGNAL(valueChanged(int)), SLOT(slotAddRemoveCol(int))); - connect(tableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)), - SLOT(slotContextMenuRequested(int,int,const QPoint&))); - connect(pushButton7, SIGNAL(clicked()), SLOT(slotEditTable())); - connect(pushButton7_2, SIGNAL(clicked()), SLOT(slotEditTableBody())); - connect(pushButton7_3, SIGNAL(clicked()), SLOT(slotEditTableHeader())); - connect(pushButton7_4, SIGNAL(clicked()), SLOT(slotEditTableFooter())); - connect(headerTableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)), - SLOT(slotContextMenuRequested(int,int,const QPoint&))); - connect(footerTableData, SIGNAL(contextMenuRequested(int,int,const QPoint&)), - SLOT(slotContextMenuRequested(int,int,const QPoint&))); - connect(tabWidget, SIGNAL(currentChanged(QWidget*)), SLOT(slotTabChanged(QWidget*))); - connect(buttonHelp, SIGNAL(clicked()), SLOT(slotHelpInvoked())); - connect(tableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int))); - connect(headerTableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int))); - connect(footerTableData, SIGNAL(valueChanged(int,int)), SLOT(slotEditCellText(int,int))); + connect(headerColSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveCol(int))); + connect(headerRowSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveRow(int))); + connect(rowSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveRow(int))); + connect(colSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveCol(int))); + connect(footerRowSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveRow(int))); + connect(footerColSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotAddRemoveCol(int))); + connect(tableData, TQT_SIGNAL(contextMenuRequested(int,int,const TQPoint&)), + TQT_SLOT(slotContextMenuRequested(int,int,const TQPoint&))); + connect(pushButton7, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTable())); + connect(pushButton7_2, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTableBody())); + connect(pushButton7_3, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTableHeader())); + connect(pushButton7_4, TQT_SIGNAL(clicked()), TQT_SLOT(slotEditTableFooter())); + connect(headerTableData, TQT_SIGNAL(contextMenuRequested(int,int,const TQPoint&)), + TQT_SLOT(slotContextMenuRequested(int,int,const TQPoint&))); + connect(footerTableData, TQT_SIGNAL(contextMenuRequested(int,int,const TQPoint&)), + TQT_SLOT(slotContextMenuRequested(int,int,const TQPoint&))); + connect(tabWidget, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(slotTabChanged(TQWidget*))); + connect(buttonHelp, TQT_SIGNAL(clicked()), TQT_SLOT(slotHelpInvoked())); + connect(tableData, TQT_SIGNAL(valueChanged(int,int)), TQT_SLOT(slotEditCellText(int,int))); + connect(headerTableData, TQT_SIGNAL(valueChanged(int,int)), TQT_SLOT(slotEditCellText(int,int))); + connect(footerTableData, TQT_SIGNAL(valueChanged(int,int)), TQT_SLOT(slotEditCellText(int,int))); } TableEditor::~TableEditor() @@ -130,7 +130,7 @@ TableEditor::~TableEditor() kdDebug(24000) << "Undeleted new: " << newNum << endl; } -void TableEditor::slotContextMenuRequested( int row, int col, const QPoint & pos ) +void TableEditor::slotContextMenuRequested( int row, int col, const TQPoint & pos ) { m_row = row; m_col = col; @@ -149,9 +149,9 @@ void TableEditor::slotContextMenuRequested( int row, int col, const QPoint & pos m_popup->setItemVisible(m_unmergeCellsId, true); m_popup->setItemVisible(m_mergeSeparatorId, true); } - QTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); - QRect rect(QPoint(selection.topRow(), selection.leftCol()) , - QPoint(selection.bottomRow(), selection.rightCol())); + TQTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); + TQRect rect(TQPoint(selection.topRow(), selection.leftCol()) , + TQPoint(selection.bottomRow(), selection.rightCol())); if (rect.isValid() && (rect.width() > 1 || rect.height() > 1) && rect.contains(m_row, m_col)) { m_popup->setItemVisible(m_mergeCellsId, true); m_popup->setItemVisible(m_mergeSeparatorId, true); @@ -257,8 +257,8 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser m_rowSpin = 0L; m_colSpin = 0L; m_dataTable = 0L; - QValueList tableRowTags; - QValueVector< QValueVector > mergeMatrix; + TQValueList tableRowTags; + TQValueVector< TQValueVector > mergeMatrix; mergeMatrix.resize(pInitialTableSize); for (uint i = 0; i < pInitialTableSize; i++) mergeMatrix[i].resize(pInitialTableSize); @@ -266,7 +266,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser Node *n = node; while (n != lastNode->nextSibling()) { - QString tagName = n->tag->name.lower(); + TQString tagName = n->tag->name.lower(); if (tagName == "table") { if (m_table && m_dataTable && nRow > 0 && nCol > 0) //nested table! @@ -283,7 +283,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser table.node = n; table.nestedData = m_write->text(table.bLine, table.bCol, table.eLine, table.eCol); m_nestedTables.append(table); - m_dataTable->item(nRow -1, nCol -1)->setPixmap(QIconSet(UserIcon("quick_table")).pixmap()); + m_dataTable->item(nRow -1, nCol -1)->setPixmap(TQIconSet(UserIcon("quick_table")).pixmap()); m_dataTable->updateCell(nRow - 1, nCol - 1); } n = n->next; @@ -482,7 +482,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser tableNode.merged = false; tableRowTags.append(tableNode); } - QString colspanValue = n->tag->attributeValue("colspan", true); + TQString colspanValue = n->tag->attributeValue("colspan", true); int colValue = 1; int lastCol = nCol; if (!colspanValue.isEmpty()) @@ -510,7 +510,7 @@ bool TableEditor::setTableArea( int bLine, int bCol, int eLine, int eCol, Parser } else colValue = 1; } - QString rowspanValue = n->tag->attributeValue("rowspan", true); + TQString rowspanValue = n->tag->attributeValue("rowspan", true); if (!rowspanValue.isEmpty()) { bool ok; @@ -602,7 +602,7 @@ void TableEditor::slotEditTableFooter() } -void TableEditor::slotTabChanged( QWidget *w) +void TableEditor::slotTabChanged( TQWidget *w) { int i = tabWidget->indexOf(w); switch (i) @@ -636,9 +636,9 @@ void TableEditor::slotTabChanged( QWidget *w) } -QString TableEditor::readModifiedTable() +TQString TableEditor::readModifiedTable() { - QString tableString; + TQString tableString; tableString = m_table->toString(); if (!captionText->text().isEmpty()) { tableString += indent(2); @@ -646,7 +646,7 @@ QString TableEditor::readModifiedTable() tableString += captionText->text(); tableString += ""; } - for (QValueList::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) { + for (TQValueList::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) { tableString += indent(2); tableString += (*it)->toString(); } @@ -701,23 +701,23 @@ QString TableEditor::readModifiedTable() } -QString TableEditor::indent( int n ) +TQString TableEditor::indent( int n ) { - QString str; + TQString str; str.fill(' ', n); str.prepend('\n'); return str; } -QString TableEditor::cellValue( int row, int col ) +TQString TableEditor::cellValue( int row, int col ) { if (!m_dataTable) - return QString::null; - QString str; + return TQString::null; + TQString str; Node *node = (*m_tableTags)[row][col].node; if (!node) - return QString::null; + return TQString::null; str = node->tag->toString(); str += m_dataTable->text(row, col); str += "tag->name) + ">"; @@ -725,9 +725,9 @@ QString TableEditor::cellValue( int row, int col ) } -QString TableEditor::tableToString() +TQString TableEditor::tableToString() { - QString tableStr; + TQString tableStr; for (int i = 0; i < m_dataTable->numRows(); i++) { tableStr += indent(4); Node *node = (*m_tableRows)[i].node; @@ -755,11 +755,11 @@ QString TableEditor::tableToString() } -QString TableEditor::tagContent(Node *node) +TQString TableEditor::tagContent(Node *node) { if (!node) - return QString::null; - QString content; + return TQString::null; + TQString content; int bl, bc, el, ec; node->tag->endPos(bl, bc); bc++; @@ -775,7 +775,7 @@ QString TableEditor::tagContent(Node *node) n->tag->beginPos(el, ec); ec--; } else { - return QString::null; + return TQString::null; } } content = m_write->text(bl, bc, el, ec); @@ -798,12 +798,12 @@ void TableEditor::slotInsertRow() tableNode.node->tag = new Tag(); tableNode.node->tag->setDtd(m_dtd); tableNode.node->tag->parse("", m_write); - QValueList::Iterator rowIt = m_tableRows->at(num); + TQValueList::Iterator rowIt = m_tableRows->at(num); if (rowIt != m_tableRows->end()) m_tableRows->insert(rowIt, tableNode); else m_tableRows->append(tableNode); - QValueList tableRowTags; + TQValueList tableRowTags; for (int i = 0; i < m_dataTable->numCols(); i++) { tableNode.merged = false; tableNode.node = new Node(0L); @@ -818,7 +818,7 @@ void TableEditor::slotInsertRow() tableRowTags.append(tableNode); setCellText(m_dataTable, num, i, ""); } - QValueList >::Iterator it = m_tableTags->at(num); + TQValueList >::Iterator it = m_tableTags->at(num); if (it != m_tableTags->end()) m_tableTags->insert(it, tableRowTags); else @@ -838,7 +838,7 @@ void TableEditor::slotInsertCol() if (m_createNodes) { TableNode tableNode; int i = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { tableNode.merged = false; tableNode.node = new Node(0L); newNum++; @@ -899,9 +899,9 @@ void TableEditor::slotRemoveRow() m_row = m_dataTable->numRows() - 1; int i = 0; int j = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { j = 0; - for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + for (TQValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { if ((*it2).merged && (*it2).mergedRow == m_row) { (*it2).merged = false; setCellText(m_dataTable, i, j, tagContent((*it2).node)); @@ -913,9 +913,9 @@ void TableEditor::slotRemoveRow() } i++; } - QValueList updatedMainNodes; - QValueList >::Iterator it2 = m_tableTags->at(m_row); - for (QValueList::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) { + TQValueList updatedMainNodes; + TQValueList >::Iterator it2 = m_tableTags->at(m_row); + for (TQValueList::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) { if ((*it3).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it3).mergedRow][(*it3).mergedCol]); @@ -924,7 +924,7 @@ void TableEditor::slotRemoveRow() int rowspan = mainTableNode->node->tag->attributeValue("rowspan", true).toInt(); rowspan--; if (rowspan > 1) - mainTableNode->node->tag->editAttribute("rowspan", QString("%1").arg(rowspan)); + mainTableNode->node->tag->editAttribute("rowspan", TQString("%1").arg(rowspan)); else mainTableNode->node->tag->deleteAttribute("rowspan"); updatedMainNodes.append(mainTableNode); @@ -936,7 +936,7 @@ void TableEditor::slotRemoveRow() } m_tableTags->erase(it2); m_dataTable->removeRow(m_row); - QValueList::Iterator it = m_tableRows->at(m_row); + TQValueList::Iterator it = m_tableRows->at(m_row); Node::deleteNode((*it).node); newNum--; m_tableRows->erase(it); @@ -948,9 +948,9 @@ void TableEditor::slotRemoveCol() { int i = 0; int j = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { j = 0; - for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + for (TQValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { if ((*it2).merged && (*it2).mergedCol == m_col) { (*it2).merged = false; setCellText(m_dataTable, i, j, tagContent((*it2).node)); @@ -964,9 +964,9 @@ void TableEditor::slotRemoveCol() } if (m_col == -1) m_col = m_dataTable->numCols() - 1; - QValueList updatedMainNodes; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { - QValueList::Iterator it2 = (*it).at(m_col); + TQValueList updatedMainNodes; + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + TQValueList::Iterator it2 = (*it).at(m_col); if ((*it2).merged) { TableNode *mainTableNode = &((*m_tableTags)[(*it2).mergedRow][(*it2).mergedCol]); @@ -975,7 +975,7 @@ void TableEditor::slotRemoveCol() int colspan = mainTableNode->node->tag->attributeValue("colspan", true).toInt(); colspan--; if (colspan > 1) - mainTableNode->node->tag->editAttribute("colspan", QString("%1").arg(colspan)); + mainTableNode->node->tag->editAttribute("colspan", TQString("%1").arg(colspan)); else mainTableNode->node->tag->deleteAttribute("colspan"); updatedMainNodes.append(mainTableNode); @@ -1018,9 +1018,9 @@ void TableEditor::createNewTable(Document *write, const DTDStruct *dtd) } -void TableEditor::deleteList( QValueList *table ) +void TableEditor::deleteList( TQValueList *table ) { - for (QValueList::Iterator it = table->begin(); it != table->end(); ++it) { + for (TQValueList::Iterator it = table->begin(); it != table->end(); ++it) { Node::deleteNode((*it).node); newNum--; } @@ -1029,10 +1029,10 @@ void TableEditor::deleteList( QValueList *table ) } -void TableEditor::deleteMatrix( QValueList > *matrix ) +void TableEditor::deleteMatrix( TQValueList > *matrix ) { - for (QValueList >::Iterator it = matrix->begin(); it != matrix->end(); ++it) { - for (QValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { + for (TQValueList >::Iterator it = matrix->begin(); it != matrix->end(); ++it) { + for (TQValueList::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) { Node::deleteNode((*it2).node); newNum--; } @@ -1046,7 +1046,7 @@ void TableEditor::slotMergeCells() { slotUnmergeCells(); //first unmerge all cells from the selection - QTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); + TQTableSelection selection = m_dataTable->selection(m_dataTable->currentSelection()); int tRow, bRow, lCol, rCol; tRow = selection.topRow(); bRow = selection.bottomRow(); @@ -1054,9 +1054,9 @@ void TableEditor::slotMergeCells() rCol = selection.rightCol(); TableNode *mainTableNode = &((*m_tableTags)[tRow][lCol]); if (rCol - lCol > 0) - mainTableNode->node->tag->editAttribute("colspan", QString("%1").arg(rCol - lCol + 1)); + mainTableNode->node->tag->editAttribute("colspan", TQString("%1").arg(rCol - lCol + 1)); if (bRow - tRow > 0) - mainTableNode->node->tag->editAttribute("rowspan", QString("%1").arg(bRow - tRow + 1)); + mainTableNode->node->tag->editAttribute("rowspan", TQString("%1").arg(bRow - tRow + 1)); for (int i = 0; i < bRow - tRow + 1; i++) for (int j = 0; j < rCol - lCol + 1; j++) { if (i != 0 || j != 0) { @@ -1080,7 +1080,7 @@ void TableEditor::slotUnmergeCells() int tRow, bRow, lCol, rCol; int selectionNum = m_dataTable->currentSelection(); if (selectionNum != -1) { - QTableSelection selection = m_dataTable->selection(selectionNum); + TQTableSelection selection = m_dataTable->selection(selectionNum); tRow = selection.topRow(); bRow = selection.bottomRow(); lCol = selection.leftCol(); @@ -1099,9 +1099,9 @@ void TableEditor::slotUnmergeCells() TableNode newTableNode; int i = 0; int j = 0; - for (QValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { + for (TQValueList >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) { j = 0; - QValueList::Iterator it2 = (*it).begin(); + TQValueList::Iterator it2 = (*it).begin(); while (it2 != (*it).end()) { if ((*it2).merged && tableNode.mergedRow == (*it2).mergedRow && @@ -1138,8 +1138,8 @@ void TableEditor::slotUnmergeCells() newTableNode.node = new Node(0L); newNum++; newTableNode.node->tag = new Tag(*(tmpNode.node->tag)); - QValueList >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow); - QValueList::Iterator iter2 = (*iter1).at(tableNode.mergedCol); + TQValueList >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow); + TQValueList::Iterator iter2 = (*iter1).at(tableNode.mergedCol); iter2 = (*iter1).erase(iter2); (*iter1).insert(iter2, newTableNode); Node::deleteNode(tmpNode.node); @@ -1153,16 +1153,16 @@ void TableEditor::slotEditChildTable() { bool tempDocCreated = false; bool error = false; - QValueList::Iterator errorIt; + TQValueList::Iterator errorIt; Parser *localParser = 0L; Document *w = 0L; Node *savedBaseNode = 0L; NestedTable table; - for (QValueList::Iterator it = m_nestedTables.begin(); it != m_nestedTables.end(); ++it) { + for (TQValueList::Iterator it = m_nestedTables.begin(); it != m_nestedTables.end(); ++it) { table = *it; if (table.row == m_row && table.col == m_col) { - QString cellData = m_dataTable->text(table.row, table.col); + TQString cellData = m_dataTable->text(table.row, table.col); int pos = cellData.find(table.nestedData); if (pos == -1) { KMessageBox::error(this, i18n("Cannot edit the child table; you probably modified the cell containing the table manually."), i18n("Cannot Read Table")); @@ -1174,7 +1174,7 @@ void TableEditor::slotEditChildTable() KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", 0L, "KTextEditor::Document"); w = new Document(doc, 0L); - QString tableData = readModifiedTable(); + TQString tableData = readModifiedTable(); w->editIf->insertText(0, 0, tableData); localParser = new Parser(); savedBaseNode = baseNode; //we must save it as it's deleted in the localParser->parse(); @@ -1228,7 +1228,7 @@ void TableEditor::slotEditChildTable() //cleanup on error if (error) { m_nestedTables.erase(errorIt); - m_dataTable->item(table.row, table.col)->setPixmap(QPixmap()); + m_dataTable->item(table.row, table.col)->setPixmap(TQPixmap()); m_dataTable->updateCell(table.row, table.col); if (tempDocCreated) { Node::deleteNode(baseNode); @@ -1245,7 +1245,7 @@ void TableEditor::slotHelpInvoked() kapp->invokeHelp("table-editor","quanta"); } -void TableEditor::configureTable( QTable * table ) +void TableEditor::configureTable( TQTable * table ) { if (!table) return; @@ -1259,9 +1259,9 @@ void TableEditor::configureTable( QTable * table ) table->setRowMovingEnabled(true); } -void TableEditor::setCellText( QTable * table, int row, int col, const QString & text ) +void TableEditor::setCellText( TQTable * table, int row, int col, const TQString & text ) { - table->setItem(row, col, new TableItem(table, QTableItem::OnTyping, text)); + table->setItem(row, col, new TableItem(table, TQTableItem::OnTyping, text)); } void TableEditor::configureCell(int row, int col, Node * node) @@ -1273,7 +1273,7 @@ void TableEditor::configureCell(int row, int col, Node * node) item->setHeader(node->tag->name.lower() == "th"); // Horizontal alignment Qt::AlignmentFlags flags; - QString align = node->tag->attributeValue("align", true); + TQString align = node->tag->attributeValue("align", true); if (align == "right") flags = Qt::AlignRight; else if (align == "center") @@ -1286,7 +1286,7 @@ void TableEditor::configureCell(int row, int col, Node * node) flags = Qt::AlignLeft; item->setAlignment(flags); // Vertical alignment - QString valign = node->tag->attributeValue("valign", true); + TQString valign = node->tag->attributeValue("valign", true); if (valign == "top") flags = Qt::AlignTop; else if (valign == "bottom") diff --git a/quanta/components/tableeditor/tableeditor.h b/quanta/components/tableeditor/tableeditor.h index b1df7b48..15393b9c 100644 --- a/quanta/components/tableeditor/tableeditor.h +++ b/quanta/components/tableeditor/tableeditor.h @@ -16,7 +16,7 @@ #define TABLEEDITOR_H #include -#include +#include #include "tableeditors.h" #include "document.h" @@ -40,7 +40,7 @@ public: -typedef struct NestedTable{ Node *node; int row; int col; int bLine; int bCol; int eLine; int eCol; QString nestedData;}; +typedef struct NestedTable{ Node *node; int row; int col; int bLine; int bCol; int eLine; int eCol; TQString nestedData;}; class Parser; @@ -49,21 +49,21 @@ class TableEditor : public TableEditorS Q_OBJECT public: - TableEditor( QWidget* parent = 0, const char* name = 0 ); + TableEditor( TQWidget* parent = 0, const char* name = 0 ); ~TableEditor(); virtual bool setTableArea( int bLine, int bCol, int eLine, int eCol, Parser * docParser ); virtual void setBaseURL( const KURL & url ); - virtual QString readModifiedTable(); + virtual TQString readModifiedTable(); virtual void createNewTable( Document * write, const DTDStruct * dtd ); // Set defaults for table: enable word wrap, fit content, allow swapping col/rows with D&D - virtual void configureTable( QTable * table ); - virtual void setCellText( QTable * table, int row, int col, const QString & text ); + virtual void configureTable( TQTable * table ); + virtual void setCellText( TQTable * table, int row, int col, const TQString & text ); // Configure TableItem from tag attributes virtual void configureCell( int row, int col, Node * node ); public slots: - virtual void slotContextMenuRequested( int row, int col, const QPoint & pos ); + virtual void slotContextMenuRequested( int row, int col, const TQPoint & pos ); virtual void slotEditCell(); // Wrapper for setText to use TableItem instead of QTableItem virtual void slotEditCellText( int r, int ); @@ -73,7 +73,7 @@ public slots: virtual void slotEditTableBody(); virtual void slotEditTableHeader(); virtual void slotEditTableFooter(); - virtual void slotTabChanged( QWidget * w ); + virtual void slotTabChanged( TQWidget * w ); virtual void slotInsertRow(); virtual void slotInsertCol(); virtual void slotAddRemoveRow( int num ); @@ -86,17 +86,17 @@ public slots: virtual void slotHelpInvoked(); protected: - QValueList m_colTags; + TQValueList m_colTags; int m_unmergeCellsId; int m_mergeSeparatorId; int m_mergeCellsId; bool m_createNodes; - QValueList > *m_tableTags; - QValueList > *m_tableFooterTags; - QValueList > *m_tableHeaderTags; - QValueList *m_tableFooterRows; - QValueList *m_tableHeaderRows; - QValueList *m_tableRows; + TQValueList > *m_tableTags; + TQValueList > *m_tableFooterTags; + TQValueList > *m_tableHeaderTags; + TQValueList *m_tableFooterRows; + TQValueList *m_tableHeaderRows; + TQValueList *m_tableRows; Document* m_write; Tag *m_table; Tag *m_tfoot; @@ -111,21 +111,21 @@ protected: KPopupMenu *m_popup; KURL m_baseURL; const DTDStruct *m_dtd; - QValueList > *m_tableDataTags; - QValueList *m_tableDataRows; - QTable *m_dataTable; - QSpinBox *m_rowSpin; - QSpinBox *m_colSpin; + TQValueList > *m_tableDataTags; + TQValueList *m_tableDataRows; + TQTable *m_dataTable; + TQSpinBox *m_rowSpin; + TQSpinBox *m_colSpin; int m_bLine, m_bCol, m_eLine, m_eCol; - QValueList m_nestedTables; + TQValueList m_nestedTables; int m_editChildId; - virtual QString indent( int n ); - virtual QString cellValue( int row, int col ); - virtual QString tableToString(); - virtual QString tagContent( Node * node ); - virtual void deleteList( QValueList * table ); - virtual void deleteMatrix( QValueList > * matrix ); + virtual TQString indent( int n ); + virtual TQString cellValue( int row, int col ); + virtual TQString tableToString(); + virtual TQString tagContent( Node * node ); + virtual void deleteList( TQValueList * table ); + virtual void deleteMatrix( TQValueList > * matrix ); }; diff --git a/quanta/components/tableeditor/tableitem.cpp b/quanta/components/tableeditor/tableitem.cpp index 96d7d37c..6d3da1ac 100644 --- a/quanta/components/tableeditor/tableitem.cpp +++ b/quanta/components/tableeditor/tableitem.cpp @@ -14,66 +14,66 @@ * * ***************************************************************************/ -#include -#include +#include +#include #include "tableitem.h" -TableItem::TableItem(QTable* table, EditType et) : QTableItem(table, et) +TableItem::TableItem(TQTable* table, EditType et) : TQTableItem(table, et) { setReplaceable(false); m_halign = Qt::AlignLeft; m_valign = Qt::AlignVCenter; } -TableItem::TableItem(QTable* table, EditType et, const QString& text) : QTableItem(table, et, text) +TableItem::TableItem(TQTable* table, EditType et, const TQString& text) : TQTableItem(table, et, text) { setReplaceable(false); m_halign = Qt::AlignLeft; m_valign = Qt::AlignVCenter; } -TableItem::TableItem (QTable* table, EditType et, const QString& text, const QPixmap& p) : - QTableItem(table, et, text, p) +TableItem::TableItem (TQTable* table, EditType et, const TQString& text, const TQPixmap& p) : + TQTableItem(table, et, text, p) { setReplaceable(false); m_halign = Qt::AlignLeft; m_valign = Qt::AlignVCenter; } -QWidget* TableItem::createEditor() const +TQWidget* TableItem::createEditor() const { - QTextEdit* Editor = new QTextEdit(table()->viewport()); - Editor->setTextFormat(QTextEdit::PlainText); - Editor->setHScrollBarMode(QScrollView::AlwaysOff); - Editor->setVScrollBarMode(QScrollView::AlwaysOff); + TQTextEdit* Editor = new TQTextEdit(table()->viewport()); + Editor->setTextFormat(TQTextEdit::PlainText); + Editor->setHScrollBarMode(TQScrollView::AlwaysOff); + Editor->setVScrollBarMode(TQScrollView::AlwaysOff); Editor->setBold(m_header); Editor->setText(text()); - QObject::connect(Editor, SIGNAL(textChanged()), table(), SLOT(doValueChanged())); + TQObject::connect(Editor, TQT_SIGNAL(textChanged()), table(), TQT_SLOT(doValueChanged())); return Editor; } -void TableItem::setContentFromEditor(QWidget *w) +void TableItem::setContentFromEditor(TQWidget *w) { - if (w->inherits( "QTextEdit" )) - setText(((QTextEdit*)w)->text()); + if (w->inherits( "TQTextEdit" )) + setText(((TQTextEdit*)w)->text()); else - QTableItem::setContentFromEditor(w); + TQTableItem::setContentFromEditor(w); } -void TableItem::paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool selected) +void TableItem::paint(TQPainter* p, const TQColorGroup& cg, const TQRect& cr, bool selected) { if (m_header) { - QFont editFont = p->font(); + TQFont editFont = p->font(); editFont.setBold(true); p->setFont(editFont); } - QRect cr0(0, 0, cr.width(), cr.height()); + TQRect cr0(0, 0, cr.width(), cr.height()); if (selected) { - p->fillRect(cr0, cg.brush(QColorGroup::Highlight)); + p->fillRect(cr0, cg.brush(TQColorGroup::Highlight)); p->setPen(cg.highlightedText()); } else { - p->fillRect(cr0, cg.brush(QColorGroup::Base)); + p->fillRect(cr0, cg.brush(TQColorGroup::Base)); p->setPen(cg.text()); } if (!pixmap().isNull()) { @@ -84,9 +84,9 @@ void TableItem::paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool p->drawText(4, 4, cr0.width()-8, cr0.height()-8, m_halign | m_valign | WordBreak, text()); } -QSize TableItem::sizeHint() const +TQSize TableItem::sizeHint() const { - QSize size = QTableItem::sizeHint(); + TQSize size = TQTableItem::sizeHint(); size.setWidth(size.width()+8); size.setHeight(size.height()+8); return size; diff --git a/quanta/components/tableeditor/tableitem.h b/quanta/components/tableeditor/tableitem.h index 1eff7f59..88c94e20 100644 --- a/quanta/components/tableeditor/tableitem.h +++ b/quanta/components/tableeditor/tableitem.h @@ -17,7 +17,7 @@ #ifndef TABLEITEM_H #define TABLEITEM_H -#include +#include #include class TableItem : public QTableItem @@ -28,17 +28,17 @@ private: bool m_header; public: // Standard constructors copied from QTableItem - TableItem(QTable* table, EditType et); - TableItem(QTable* table, EditType et, const QString& text); - TableItem (QTable* table, EditType et, const QString& text, const QPixmap& p); - // Use QTextEdit instead of standard QLineEdit - virtual QWidget* createEditor() const; + TableItem(TQTable* table, EditType et); + TableItem(TQTable* table, EditType et, const TQString& text); + TableItem (TQTable* table, EditType et, const TQString& text, const TQPixmap& p); + // Use TQTextEdit instead of standard QLineEdit + virtual TQWidget* createEditor() const; // Get text from QTextEdit - virtual void setContentFromEditor(QWidget *w); + virtual void setContentFromEditor(TQWidget *w); // Paint cell - handle alignment (horizontal and vertical) and bold for header - virtual void paint(QPainter* p, const QColorGroup& cg, const QRect& cr, bool selected); - // Return A bit larger sizeHint because QTextEdit has some margin around - virtual QSize sizeHint() const; + virtual void paint(TQPainter* p, const TQColorGroup& cg, const TQRect& cr, bool selected); + // Return A bit larger sizeHint because TQTextEdit has some margin around + virtual TQSize sizeHint() const; // Get and set vertical aligment Qt::AlignmentFlags vAlignment() {return m_valign;} void setVAlignment(Qt::AlignmentFlags flags) {m_valign = flags;} -- cgit v1.2.1