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/dialogs/tagdialogs/colorcombo.cpp | 70 +++++------ quanta/dialogs/tagdialogs/colorcombo.h | 30 ++--- quanta/dialogs/tagdialogs/corewidgetdlg.cpp | 12 +- quanta/dialogs/tagdialogs/listdlg.cpp | 12 +- quanta/dialogs/tagdialogs/listdlg.h | 4 +- quanta/dialogs/tagdialogs/pictureview.cpp | 22 ++-- quanta/dialogs/tagdialogs/pictureview.h | 16 +-- quanta/dialogs/tagdialogs/tagattr.cpp | 32 ++--- quanta/dialogs/tagdialogs/tagattr.h | 64 +++++----- quanta/dialogs/tagdialogs/tagdialog.cpp | 146 +++++++++++----------- quanta/dialogs/tagdialogs/tagdialog.h | 38 +++--- quanta/dialogs/tagdialogs/tagimgdlg.cpp | 26 ++-- quanta/dialogs/tagdialogs/tagimgdlg.h | 48 +++---- quanta/dialogs/tagdialogs/tagimgdlgdata.cpp | 30 ++--- quanta/dialogs/tagdialogs/tagmaildlg.cpp | 24 ++-- quanta/dialogs/tagdialogs/tagmaildlg.h | 2 +- quanta/dialogs/tagdialogs/tagmiscdlg.cpp | 12 +- quanta/dialogs/tagdialogs/tagmiscdlg.h | 6 +- quanta/dialogs/tagdialogs/tagquicklistdlg.cpp | 20 +-- quanta/dialogs/tagdialogs/tagquicklistdlg.h | 24 ++-- quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp | 22 ++-- quanta/dialogs/tagdialogs/tagwidget.cpp | 34 ++--- quanta/dialogs/tagdialogs/tagwidget.h | 28 ++--- quanta/dialogs/tagdialogs/tagxml.cpp | 124 +++++++++--------- quanta/dialogs/tagdialogs/tagxml.h | 26 ++-- 25 files changed, 436 insertions(+), 436 deletions(-) (limited to 'quanta/dialogs/tagdialogs') diff --git a/quanta/dialogs/tagdialogs/colorcombo.cpp b/quanta/dialogs/tagdialogs/colorcombo.cpp index 2dcb6aa2..878216e3 100644 --- a/quanta/dialogs/tagdialogs/colorcombo.cpp +++ b/quanta/dialogs/tagdialogs/colorcombo.cpp @@ -32,17 +32,17 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -66,8 +66,8 @@ #define STANDARD_PAL_SIZE 17 -ColorCombo::ColorCombo( QWidget *parent, const char *name ) - : QComboBox( parent, name ) +ColorCombo::ColorCombo( TQWidget *parent, const char *name ) + : TQComboBox( parent, name ) { customColor.setRgb( 255, 255, 255 ); internalcolor.setRgb( 255, 255, 255 ); @@ -78,8 +78,8 @@ ColorCombo::ColorCombo( QWidget *parent, const char *name ) addColors(); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); - connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) ); } ColorCombo::~ColorCombo() @@ -91,7 +91,7 @@ ColorCombo::~ColorCombo() /** Sets the current color */ -void ColorCombo::setColor( const QColor &col ) +void ColorCombo::setColor( const TQColor &col ) { internalcolor = col; hascolor = true; @@ -103,7 +103,7 @@ void ColorCombo::setColor( const QColor &col ) /** Returns the currently selected color */ -QColor ColorCombo::color() const { +TQColor ColorCombo::color() const { return internalcolor; } @@ -113,10 +113,10 @@ bool ColorCombo::hasColor() const{ } -void ColorCombo::setColorName( const QString &color ) +void ColorCombo::setColorName( const TQString &color ) { - QColor c(color); + TQColor c(color); if ( c.isValid() && !color.isEmpty() ) { setColor( c ); @@ -128,7 +128,7 @@ void ColorCombo::setColorName( const QString &color ) } -QString ColorCombo::colorName() +TQString ColorCombo::colorName() { if ( hascolor ) { int i; @@ -145,9 +145,9 @@ QString ColorCombo::colorName() } -void ColorCombo::resizeEvent( QResizeEvent *re ) +void ColorCombo::resizeEvent( TQResizeEvent *re ) { - QComboBox::resizeEvent( re ); + TQComboBox::resizeEvent( re ); addColors(); } @@ -158,12 +158,12 @@ void ColorCombo::slotActivated( int index ) if ( index == 1 ) { - if ( KColorDialog::getColor( customColor ) == QDialog::Accepted ) + if ( KColorDialog::getColor( customColor ) == TQDialog::Accepted ) { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; if ( qGray( customColor.rgb() ) < 128 ) pen.setColor( white ); @@ -171,7 +171,7 @@ void ColorCombo::slotActivated( int index ) pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); painter.drawText( 2, painter.fontMetrics().height(), @@ -203,10 +203,10 @@ void ColorCombo::slotHighlighted( int index ) void ColorCombo::addColors() { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; int i; clear(); @@ -225,7 +225,7 @@ void ColorCombo::addColors() pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); @@ -240,7 +240,7 @@ void ColorCombo::addColors() for ( i = 0; i < STANDARD_PAL_SIZE; i++ ) { painter.begin( &pixmap ); - QBrush brush( standardPalette[i] ); + TQBrush brush( standardPalette[i] ); painter.fillRect( rect, brush ); painter.end(); @@ -266,7 +266,7 @@ void ColorCombo::addColors() void ColorCombo::createStandardPalette() { - standardPalette = new QColor [STANDARD_PAL_SIZE]; + standardPalette = new TQColor [STANDARD_PAL_SIZE]; int i = 0; @@ -289,7 +289,7 @@ void ColorCombo::createStandardPalette() standardPalette[i++] = Qt::black; - standardPaletteNames = new QString [STANDARD_PAL_SIZE]; + standardPaletteNames = new TQString [STANDARD_PAL_SIZE]; i = 0; diff --git a/quanta/dialogs/tagdialogs/colorcombo.h b/quanta/dialogs/tagdialogs/colorcombo.h index 35eae54a..b6f851e0 100644 --- a/quanta/dialogs/tagdialogs/colorcombo.h +++ b/quanta/dialogs/tagdialogs/colorcombo.h @@ -26,10 +26,10 @@ #ifndef COLORCOMBO_H #define COLORCOMBO_H -#include +#include #include -#include -#include +#include +#include #include #include "kselect.h" @@ -41,16 +41,16 @@ class ColorCombo : public QComboBox { Q_OBJECT public: - ColorCombo( QWidget *parent = 0L, const char *name = 0L ); + ColorCombo( TQWidget *parent = 0L, const char *name = 0L ); ~ColorCombo(); - void setColor( const QColor &col ); - void setColorName(const QString &color); - QString colorName(); + void setColor( const TQColor &col ); + void setColorName(const TQString &color); + TQString colorName(); /** * Retrieve the currently selected color. **/ - QColor color() const; + TQColor color() const; bool hasColor() const; @@ -59,25 +59,25 @@ public slots: void slotHighlighted( int index ); signals: - void activated( const QColor &col ); - void highlighted( const QColor &col ); + void activated( const TQColor &col ); + void highlighted( const TQColor &col ); protected: /** * @reimplemented */ - virtual void resizeEvent( QResizeEvent *re ); + virtual void resizeEvent( TQResizeEvent *re ); private: void createStandardPalette(); void addColors(); - QColor customColor; - QColor internalcolor; + TQColor customColor; + TQColor internalcolor; bool hascolor; - QColor *standardPalette; - QString *standardPaletteNames; + TQColor *standardPalette; + TQString *standardPaletteNames; }; diff --git a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp index 13a488e5..8e52ae01 100644 --- a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp +++ b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp @@ -18,10 +18,10 @@ #include "corewidgetdlg.moc" #include "tagwidget.h" -#include -#include +#include +#include -CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name) +CoreWidgetDlg::CoreWidgetDlg(TQWidget *parent, const char *name) :CoreWidgetDlgS(parent,name), TagWidget(parent,name) { } @@ -29,7 +29,7 @@ CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name) CoreWidgetDlg::~CoreWidgetDlg(){ } -void CoreWidgetDlg::readAttributes( QDict *d ) +void CoreWidgetDlg::readAttributes( TQDict *d ) { dict = d; @@ -43,10 +43,10 @@ void CoreWidgetDlg::readAttributes( QDict *d ) } -void CoreWidgetDlg::writeAttributes( QDict *d ) +void CoreWidgetDlg::writeAttributes( TQDict *d ) { dict = d; - QString *t; // value of attr. + TQString *t; // value of attr. if (( t=d->find("id") )) setValue(*t, lineId); if (( t=d->find("class") )) setValue(*t, lineClass); diff --git a/quanta/dialogs/tagdialogs/listdlg.cpp b/quanta/dialogs/tagdialogs/listdlg.cpp index 396143c2..713ccf2c 100644 --- a/quanta/dialogs/tagdialogs/listdlg.cpp +++ b/quanta/dialogs/tagdialogs/listdlg.cpp @@ -20,11 +20,11 @@ #include //qt includes -#include -#include -#include +#include +#include +#include -ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) +ListDlg::ListDlg(TQStringList &entryList,TQWidget* parent, const char *name ) :KDialogBase(parent,name), listbox(new KListBox(this)) { Q_CHECK_PTR(listbox); @@ -42,13 +42,13 @@ ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) adjustSize(); resize(sizeHint()); - connect(listbox,SIGNAL(doubleClicked( QListBoxItem * )), SLOT(slotOk())); + connect(listbox,TQT_SIGNAL(doubleClicked( TQListBoxItem * )), TQT_SLOT(slotOk())); } ListDlg::~ListDlg(){ } -QString ListDlg::getEntry() +TQString ListDlg::getEntry() { return listbox->currentText(); } diff --git a/quanta/dialogs/tagdialogs/listdlg.h b/quanta/dialogs/tagdialogs/listdlg.h index be1605f2..7b84e032 100644 --- a/quanta/dialogs/tagdialogs/listdlg.h +++ b/quanta/dialogs/tagdialogs/listdlg.h @@ -33,9 +33,9 @@ selected item with the getEntry() method. class ListDlg : public KDialogBase { Q_OBJECT public: - ListDlg(QStringList &entryList,QWidget* parent=0, const char *name =0); + ListDlg(TQStringList &entryList,TQWidget* parent=0, const char *name =0); ~ListDlg(); - QString getEntry(); + TQString getEntry(); int getEntryNum(); private: // Private attributes /** */ diff --git a/quanta/dialogs/tagdialogs/pictureview.cpp b/quanta/dialogs/tagdialogs/pictureview.cpp index 0082d379..65102ba8 100644 --- a/quanta/dialogs/tagdialogs/pictureview.cpp +++ b/quanta/dialogs/tagdialogs/pictureview.cpp @@ -17,20 +17,20 @@ #include "pictureview.h" #include "pictureview.moc" -#include "qpainter.h" -#include +#include "tqpainter.h" +#include -PictureView::PictureView(QWidget *parent, char *file, const char *name ) : QFrame(parent,name) +PictureView::PictureView(TQWidget *parent, char *file, const char *name ) : TQFrame(parent,name) { if ( file ) { - pix = new QImage(file); + pix = new TQImage(file); picwidth = pix->width(); picheight = pix->height(); x_of = 0; y_of = 0; scale(); } else { - pix = new QImage(); + pix = new TQImage(); picwidth = 0; picheight = 0; x_of = 0; @@ -45,24 +45,24 @@ PictureView::~PictureView() { } -void PictureView::paintEvent( QPaintEvent * e ) +void PictureView::paintEvent( TQPaintEvent * e ) { - QPainter p; + TQPainter p; p.begin( this ); p.drawImage( x_of, y_of, *pix ); p.end(); - QFrame::paintEvent(e); + TQFrame::paintEvent(e); } -void PictureView::resizeEvent ( QResizeEvent * e){ +void PictureView::resizeEvent ( TQResizeEvent * e){ scale(); - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); } /** set image */ -void PictureView::slotSetImage(const QString& file) +void PictureView::slotSetImage(const TQString& file) { pix->load( file ); picwidth = pix->width(); diff --git a/quanta/dialogs/tagdialogs/pictureview.h b/quanta/dialogs/tagdialogs/pictureview.h index aaf9186e..1688314d 100644 --- a/quanta/dialogs/tagdialogs/pictureview.h +++ b/quanta/dialogs/tagdialogs/pictureview.h @@ -18,8 +18,8 @@ #ifndef PICTUREVIEW_H #define PICTUREVIEW_H -#include -#include +#include +#include class QImage; /**Class for images preview @@ -27,22 +27,22 @@ used by TagImgDlg *@author Dmitry Poplavsky & Yacovlev Alexander */ -class PictureView : public QFrame { +class PictureView : public TQFrame { Q_OBJECT public: - PictureView(QWidget *parent=0, char *file=0, const char *name=0); + PictureView(TQWidget *parent=0, char *file=0, const char *name=0); /** try scale image */ void scale(); public slots: // Public slots /** set image */ - void slotSetImage(const QString& file); + void slotSetImage(const TQString& file); protected: // Protected methods /** */ - virtual void resizeEvent ( QResizeEvent * e); + virtual void resizeEvent ( TQResizeEvent * e); ~PictureView(); protected: - virtual void paintEvent( QPaintEvent * ); + virtual void paintEvent( TQPaintEvent * ); private: // Private attributes /** height of image */ @@ -53,7 +53,7 @@ private: // Private attributes int picwidth; int y_of; - QImage *pix; + TQImage *pix; }; #endif diff --git a/quanta/dialogs/tagdialogs/tagattr.cpp b/quanta/dialogs/tagdialogs/tagattr.cpp index 772da4fb..251c4b8b 100644 --- a/quanta/dialogs/tagdialogs/tagattr.cpp +++ b/quanta/dialogs/tagdialogs/tagattr.cpp @@ -23,8 +23,8 @@ #include //qt includes -#include -#include +#include +#include //app includes #include "tagattr.h" @@ -33,35 +33,35 @@ #include "qtag.h" #include "quantacommon.h" -QString Attr::attrName() const +TQString Attr::attrName() const { return name; } -Attr_list::Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ) +Attr_list::Attr_list( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) { - combo = (QComboBox *)w; + combo = (TQComboBox *)w; - QString source = el.attribute("source"); + TQString source = el.attribute("source"); if (source == "dcop") //fill the list with a result of a DCOP call { - QString method = el.attribute("method"); - QString interface = el.attribute("interface", "QuantaIf"); - QString arguments = el.attribute("arguments"); + TQString method = el.attribute("method"); + TQString interface = el.attribute("interface", "QuantaIf"); + TQString arguments = el.attribute("arguments"); arguments.replace("%tagname%", m_dtdTag->name()); DCOPReply reply = QuantaCommon::callDCOPMethod(interface, method, arguments); if (reply.isValid()) { - QStringList list = reply; + TQStringList list = reply; combo->insertStringList(list); } } - for ( QDomElement n = el.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + for ( TQDomElement n = el.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "items" ) { - QDomElement item = n.firstChild().toElement(); + TQDomElement item = n.firstChild().toElement(); while ( !item.isNull() ) { combo->insertItem( item.text() ); item = item.nextSibling().toElement(); @@ -72,7 +72,7 @@ Attr_list::Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ) setValue(""); } -void Attr_list::setValue(const QString &value) +void Attr_list::setValue(const TQString &value) { for ( int i=0; icount(); i++ ) @@ -87,11 +87,11 @@ void Attr_list::setValue(const QString &value) } -QDomNode findChild( QDomNode &parent, const QString &name ) +TQDomNode findChild( TQDomNode &parent, const TQString &name ) { - for ( QDomNode n = parent.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = parent.firstChild(); !n.isNull(); n = n.nextSibling() ) if ( n.nodeName() == name ) return n; - return QDomNode(); + return TQDomNode(); } diff --git a/quanta/dialogs/tagdialogs/tagattr.h b/quanta/dialogs/tagdialogs/tagattr.h index 30b5220d..2741a10c 100644 --- a/quanta/dialogs/tagdialogs/tagattr.h +++ b/quanta/dialogs/tagdialogs/tagattr.h @@ -19,10 +19,10 @@ #define TAGATTR_H //qt includes -#include -#include -#include -#include +#include +#include +#include +#include //kde includes #include @@ -37,26 +37,26 @@ class QWidget; class QTag; -QDomNode findChild( QDomNode &parent, const QString &name ); +TQDomNode findChild( TQDomNode &parent, const TQString &name ); class Attr { public: - Attr( QDomElement const& el, QWidget *, QTag *dtdTag ) + Attr( TQDomElement const& el, TQWidget *, QTag *dtdTag ) : domEl(el), name(domEl.attribute("name","")), m_dtdTag(dtdTag) {} //{ domEl = el; name = domEl->attribute("name",""); m_dtdTag = dtdTag;} virtual ~Attr(){} - virtual QString value()=0; - virtual void setValue(const QString &value)=0; + virtual TQString value()=0; + virtual void setValue(const TQString &value)=0; - QString attrName() const; - QDomElement const& domElement() const { return domEl; } + TQString attrName() const; + TQDomElement const& domElement() const { return domEl; } protected: - QDomElement domEl; - QString name; + TQDomElement domEl; + TQString name; QTag *m_dtdTag; }; @@ -64,15 +64,15 @@ class Attr class Attr_line : public Attr { protected: - QLineEdit *line; + TQLineEdit *line; public: - Attr_line( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) - { line = (QLineEdit *)w; } + Attr_line( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { line = (TQLineEdit *)w; } virtual ~Attr_line(){}; - virtual QString value() { return line->text(); } - virtual void setValue(const QString &value) { line->setText(value); } + virtual TQString value() { return line->text(); } + virtual void setValue(const TQString &value) { line->setText(value); } }; @@ -82,12 +82,12 @@ class Attr_color : public Attr ColorCombo *color; public: - Attr_color( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + Attr_color( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) { color = (ColorCombo *)w; } virtual ~Attr_color(){}; - virtual QString value() { return color->colorName(); } - virtual void setValue(const QString &value) { color->setColorName(value); } + virtual TQString value() { return color->colorName(); } + virtual void setValue(const TQString &value) { color->setColorName(value); } }; class Attr_file : public Attr @@ -96,40 +96,40 @@ class Attr_file : public Attr FileCombo *file; public: - Attr_file( QDomElement const& el, QWidget *w , QTag * dtdTag ) : Attr(el, w, dtdTag) + Attr_file( TQDomElement const& el, TQWidget *w , QTag * dtdTag ) : Attr(el, w, dtdTag) { file = (FileCombo *)w; } virtual ~Attr_file(){}; - virtual QString value() { return file->text(); } - virtual void setValue(const QString &value) { file->setText(value); } + virtual TQString value() { return file->text(); } + virtual void setValue(const TQString &value) { file->setText(value); } }; class Attr_list : public Attr { protected: - QComboBox *combo; + TQComboBox *combo; public: - Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ); + Attr_list( TQDomElement const& el, TQWidget *w, QTag *dtdTag ); virtual ~Attr_list(){}; - virtual QString value() { return combo->currentText(); } - virtual void setValue(const QString &value); + virtual TQString value() { return combo->currentText(); } + virtual void setValue(const TQString &value); }; class Attr_check : public Attr { protected: - QCheckBox *check; + TQCheckBox *check; public: - Attr_check( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) - { check = (QCheckBox *)w; } + Attr_check( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { check = (TQCheckBox *)w; } virtual ~Attr_check(){}; - virtual QString value() { return check->isChecked() ? "checked" : "unchecked" ; } - virtual void setValue(const QString &value) { check->setChecked( !value.isEmpty() ); } + virtual TQString value() { return check->isChecked() ? "checked" : "unchecked" ; } + virtual void setValue(const TQString &value) { check->setChecked( !value.isEmpty() ); } }; diff --git a/quanta/dialogs/tagdialogs/tagdialog.cpp b/quanta/dialogs/tagdialogs/tagdialog.cpp index b0da2f8b..bc5800ae 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.cpp +++ b/quanta/dialogs/tagdialogs/tagdialog.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // include qt headers -#include -#include -#include +#include +#include +#include // include kde headers #include @@ -43,7 +43,7 @@ #include "kafkacommon.h" TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true) + : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); @@ -52,7 +52,7 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) { for (int i = 0; i < m_tag->attrCount(); i++) { - dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + dict->insert(m_tag->attribute(i), new TQString(m_tag->attributeValue(i))); } } mainDlg = 0L; @@ -60,8 +60,8 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) } -TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const QString& selection, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const TQString& selection, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); @@ -70,15 +70,15 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const QString& selection, KURL a_ba { for (int i = 0; i < m_tag->attrCount(); i++) { - dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + dict->insert(m_tag->attribute(i), new TQString(m_tag->attributeValue(i))); } } mainDlg = 0L; parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, QString attrs, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true) +TagDialog::TagDialog(QTag* dtdTag, TQString attrs, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); if ( !attrs.isNull() ) @@ -90,8 +90,8 @@ TagDialog::TagDialog(QTag* dtdTag, QString attrs, KURL a_baseURL) parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, const QString& selection, QString attrs, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +TagDialog::TagDialog(QTag* dtdTag, const TQString& selection, TQString attrs, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); if ( !attrs.isNull() ) @@ -118,8 +118,8 @@ void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) setOkButton(KStdGuiItem::ok().text()); setCancelButton(KStdGuiItem::cancel().text()); - connect( this, SIGNAL(applyButtonPressed()), SLOT(slotAccept()) ); - connect( this, SIGNAL(cancelButtonPressed()), SLOT(reject()) ); + connect( this, TQT_SIGNAL(applyButtonPressed()), TQT_SLOT(slotAccept()) ); + connect( this, TQT_SIGNAL(cancelButtonPressed()), TQT_SLOT(reject()) ); if (!a_dtdTag) //the tag is invalid, let's create a default one { @@ -131,11 +131,11 @@ void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) dtdTag = a_dtdTag; deleteTag = false; } - dict = new QDict(1,false); + dict = new TQDict(1,false); dict->setAutoDelete(true); m_baseURL = a_baseURL; - QString caption = i18n("Tag Properties: "); + TQString caption = i18n("Tag Properties: "); caption += dtdTag->name(); setCaption( caption); resize(420,400); @@ -145,25 +145,25 @@ void TagDialog::parseTag() { if (dtdTag->name() != i18n("Unknown tag")) //read from the extra tags { - QDomDocument doc; + TQDomDocument doc; if (dtdTag->name().lower() == "img") //NOTE: HTML specific code! { mainDlg = new TagImgDlg(dtdTag->parentDTD, this); ((TagImgDlg *)mainDlg)->writeAttributes( dict ); } //read the tag file it is available - else if (QFileInfo(dtdTag->fileName()).exists()) + else if (TQFileInfo(dtdTag->fileName()).exists()) { - QFile f( dtdTag->fileName() ); + TQFile f( dtdTag->fileName() ); f.open( IO_ReadOnly ); if ( doc.setContent( &f ) ) { - QString tagName = dtdTag->name(); - QDomNodeList nodeList = doc.elementsByTagName("tag"); + TQString tagName = dtdTag->name(); + TQDomNodeList nodeList = doc.elementsByTagName("tag"); for ( uint i = 0; i < nodeList.count(); i++) { - QDomNode n = nodeList.item(i); - QString nodeTagName = n.toElement().attribute("name"); + TQDomNode n = nodeList.item(i); + TQString nodeTagName = n.toElement().attribute("name"); if (!dtdTag->parentDTD->caseSensitive) nodeTagName = nodeTagName.upper(); if (nodeTagName == tagName && n.toElement().elementsByTagName("attr").count() > 0) //read a tag @@ -178,12 +178,12 @@ void TagDialog::parseTag() } else { - QString docString = "\n\n"; - docString += QString("\n").arg(dtdTag->name()); + TQString docString = "\n\n"; + docString += TQString("\n").arg(dtdTag->name()); docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes()); docString += "\n\n"; doc.setContent(docString); - QDomNode domNode2 = doc.firstChild().firstChild(); + TQDomNode domNode2 = doc.firstChild().firstChild(); mainDlg = new Tagxml( domNode2, dtdTag, m_selection, this ); } @@ -195,48 +195,48 @@ void TagDialog::parseTag() KConfig *dtdConfig = new KConfig(dtdTag->parentDTD->fileName); dtdConfig->setGroup("General"); int numOfPages = dtdConfig->readNumEntry("NumOfPages"); - extraPageList = new QPtrList(); + extraPageList = new TQPtrList(); extraPageList->setAutoDelete(true); for (int i = 1; i <= numOfPages; i++) { Tagxml *extraPage = 0L; - dtdConfig->setGroup(QString("Page%1").arg(i)); - QString title = dtdConfig->readEntry("Title"); - QStringList groupList; + dtdConfig->setGroup(TQString("Page%1").arg(i)); + TQString title = dtdConfig->readEntry("Title"); + TQStringList groupList; groupList = dtdConfig->readListEntry("Groups"); - QDomDocument extraDoc; //build an internal tag XML for the groups + TQDomDocument extraDoc; //build an internal tag XML for the groups bool addPage = false; - QString docString = "\n\n"; - docString += QString("\n").arg(i); + TQString docString = "\n\n"; + docString += TQString("\n").arg(i); for (uint j = 0; j < groupList.count(); j++) { groupList[j] = groupList[j].stripWhiteSpace(); } - QDomDocument commonDoc; - QString commonFileName = QFileInfo(dtdTag->fileName()).dirPath() + "/common.tag"; - if (QFile(commonFileName).exists()) + TQDomDocument commonDoc; + TQString commonFileName = TQFileInfo(dtdTag->fileName()).dirPath() + "/common.tag"; + if (TQFile(commonFileName).exists()) { - QFile commonFile(commonFileName); + TQFile commonFile(commonFileName); commonFile.open(IO_ReadOnly); if (doc.setContent(&commonFile)) { int row = 0; - QDomNodeList nodeList = doc.elementsByTagName("tag"); + TQDomNodeList nodeList = doc.elementsByTagName("tag"); for ( uint j = 0; j < nodeList.count(); j++) { - QDomNode node = nodeList.item(j); - QString nodeTagName = node.toElement().attribute("name"); + TQDomNode node = nodeList.item(j); + TQString nodeTagName = node.toElement().attribute("name"); if (groupList.contains(nodeTagName) && dtdTag->commonGroups.contains(nodeTagName)) //add the attributes of this common tag to a new tab { - QString s; - QTextStream str(&s, IO_ReadWrite); - QString s2; - QTextStream str2(&s2, IO_ReadWrite); - for ( QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) + TQString s; + TQTextStream str(&s, IO_ReadWrite); + TQString s2; + TQTextStream str2(&s2, IO_ReadWrite); + for ( TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) { if (n.nodeName() == "attr") { - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); str.reset(); str << "" << el.attribute("name") << "" << endl; str << " " << endl; str << " " << endl; - QDomNodeList childNodes = n.childNodes(); + TQDomNodeList childNodes = n.childNodes(); for ( uint k = 0; k < childNodes.count(); k++) { - QDomNode childNode = childNodes.item(j); + TQDomNode childNode = childNodes.item(j); childNode.save(str2, 2); str << s2; } @@ -271,7 +271,7 @@ void TagDialog::parseTag() if (addPage) { extraDoc.setContent(docString); - QDomNode domNode = extraDoc.firstChild().firstChild(); + TQDomNode domNode = extraDoc.firstChild().firstChild(); extraPage = new Tagxml( domNode, dtdTag, m_selection, this ); extraPage->writeAttributes( dict ); addTab( extraPage, i18n(title.utf8()) ); @@ -283,30 +283,30 @@ void TagDialog::parseTag() } /** Insert an attribute to dict*/ -void TagDialog::insertAttribute(QString *attr, QString *value) +void TagDialog::insertAttribute(TQString *attr, TQString *value) { dict->insert( *attr , value ); } -/** Return the attributes in QDict format*/ -QDict * TagDialog::getAttributes() +/** Return the attributes in TQDict format*/ +TQDict * TagDialog::getAttributes() { return dict; } /** Return all the attributes in one string*/ -QString TagDialog::getAttributeString() +TQString TagDialog::getAttributeString() { - QDictIterator it( *dict ); + TQDictIterator it( *dict ); - QString attrStr; + TQString attrStr; while ( it.current() ) { - QString attr = QuantaCommon::attrCase(it.currentKey()); - QString val = *it.current(); + TQString attr = QuantaCommon::attrCase(it.currentKey()); + TQString val = *it.current(); - QString attrval = " "; // attr=value + TQString attrval = " "; // attr=value if ( val.isEmpty()) { attrval += attr; // for checkboxes dont print ="" @@ -322,9 +322,9 @@ QString TagDialog::getAttributeString() } /**Return the value of the attribute specified by attr. */ -QString TagDialog::getAttribute(const QString& attr) +TQString TagDialog::getAttribute(const TQString& attr) { - QString attrStr = getAttributeString()+" "; + TQString attrStr = getAttributeString()+" "; int pos = attrStr.upper().find(attr.upper()); if (pos != -1) { @@ -333,7 +333,7 @@ QString TagDialog::getAttribute(const QString& attr) } else { - return QString::null; + return TQString::null; } } @@ -362,9 +362,9 @@ KURL TagDialog::baseURL() } -void TagDialog::parseAttributes(const QString &attrs) +void TagDialog::parseAttributes(const TQString &attrs) { - QString t = attrs; + TQString t = attrs; t = t.stripWhiteSpace(); @@ -373,8 +373,8 @@ void TagDialog::parseAttributes(const QString &attrs) int i = 0; while ( !t[i].isSpace() && !t[i].isNull() && t[i] != '=' ) i++; - QString attr = t.left(i); - QString *value = new QString(); + TQString attr = t.left(i); + TQString *value = new TQString(); t = t.remove(0,i).stripWhiteSpace(); @@ -426,8 +426,8 @@ void TagDialog::insertTag(Document *w, bool insertInLine) { if (dtdTag->name() != i18n("Unknown tag")) { - QString newTag = getAttributeString(); - newTag = QString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; + TQString newTag = getAttributeString(); + newTag = TQString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; if ( dtdTag->parentDTD->singleTagStyle == "xml" && (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional())) @@ -437,11 +437,11 @@ void TagDialog::insertTag(Document *w, bool insertInLine) } newTag.append(">"); - QString secondPartOfTag = QString("name())+">"; + TQString secondPartOfTag = TQString("name())+">"; if ( !insertInLine ) { - QString space=""; + TQString space=""; space.fill( ' ',w->viewCursorIf->cursorColumnReal() ); newTag += "\n" + space + " "; secondPartOfTag = "\n" + space + secondPartOfTag; @@ -461,8 +461,8 @@ void TagDialog::insertTag(Document *w, bool insertInLine) Node *TagDialog::buildNode(Document *w) { Node *node; - QString attrStr(""); - QDictIterator it( *dict ); + TQString attrStr(""); + TQDictIterator it( *dict ); node = kafkaCommon::createNode(dtdTag->name(), "", Tag::XmlTag, w); @@ -476,9 +476,9 @@ Node *TagDialog::buildNode(Document *w) return node; } -void TagDialog::showEvent(QShowEvent *ev) +void TagDialog::showEvent(TQShowEvent *ev) { - QTabDialog::showEvent(ev); + TQTabDialog::showEvent(ev); if (dynamic_cast(mainDlg)) static_cast(mainDlg)->focusToFirstItem(); } diff --git a/quanta/dialogs/tagdialogs/tagdialog.h b/quanta/dialogs/tagdialogs/tagdialog.h index 67809bb0..3575c8e5 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.h +++ b/quanta/dialogs/tagdialogs/tagdialog.h @@ -18,10 +18,10 @@ #ifndef TAGDIALOG_H #define TAGDIALOG_H -#include -#include -#include -#include +#include +#include +#include +#include #include "resource.h" @@ -37,7 +37,7 @@ class Tag; class KURL; class QShowEvent; -class TagDialog : public QTabDialog { +class TagDialog : public TQTabDialog { Q_OBJECT public: @@ -51,24 +51,24 @@ public: */ TagDialog(QTag* dtdTag, Tag* tag, KURL a_baseURL = KURL()); - TagDialog(QTag* dtdTag, Tag* tag, const QString& selection, KURL a_baseURL = KURL()); - TagDialog(QTag* dtdTag, QString attrs=QString::null, KURL a_baseURL = KURL()); - TagDialog(QTag* dtdTag, const QString& selection, QString attrs=QString::null, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, Tag* tag, const TQString& selection, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, TQString attrs=TQString::null, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, const TQString& selection, TQString attrs=TQString::null, KURL a_baseURL = KURL()); ~TagDialog(); /** Insert an attribute to dict*/ - void insertAttribute(QString *attr, QString *value); + void insertAttribute(TQString *attr, TQString *value); /** */ void parseTag(); /** returen doc path */ KURL baseURL(); - /** Return the attributes in QDict format*/ - QDict * getAttributes(); + /** Return the attributes in TQDict format*/ + TQDict * getAttributes(); /** Return all the attributes in one string*/ - QString getAttributeString(); + TQString getAttributeString(); /**Return the value of the attribute specified by attr. */ - QString getAttribute(const QString& attr); + TQString getAttribute(const TQString& attr); /** Insert the new tag into the Document*/ void insertTag(Document *w, bool insertInLine = true); /** build and return the new Node.*/ @@ -76,27 +76,27 @@ public: public: - QWidget *mainDlg; + TQWidget *mainDlg; - QDict *dict; + TQDict *dict; KURL m_baseURL; public slots: // Public slots void slotAccept(); protected slots: - virtual void showEvent(QShowEvent *ev); + virtual void showEvent(TQShowEvent *ev); private: bool deleteTag; Tag *m_tag; QTag* dtdTag; - QString m_selection; + TQString m_selection; - QPtrList *extraPageList; + TQPtrList *extraPageList; void init(QTag* dtdTag, KURL a_baseURL); - void parseAttributes(const QString &attrs); + void parseAttributes(const TQString &attrs); }; #endif diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.cpp b/quanta/dialogs/tagdialogs/tagimgdlg.cpp index efacc768..9448f48d 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlg.cpp @@ -17,8 +17,8 @@ ***************************************************************************/ //qt includes -#include -#include +#include +#include //kde includes #include #include @@ -35,8 +35,8 @@ #include "tagimgdlg.moc" -TagImgDlg::TagImgDlg(const DTDStruct *dtd, QWidget *parent, const char *name) - : QWidget(parent,name), TagWidget(parent,name) +TagImgDlg::TagImgDlg(const DTDStruct *dtd, TQWidget *parent, const char *name) + : TQWidget(parent,name), TagWidget(parent,name) { m_dtd = dtd; img = 0L; @@ -45,9 +45,9 @@ TagImgDlg::TagImgDlg(const DTDStruct *dtd, QWidget *parent, const char *name) initDialog(); - connect( buttonImgSource, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); - connect( buttonRecalcImgSize, SIGNAL(clicked()), this, SLOT(slotRecalcImgSize()) ); - connect( lineImgSource, SIGNAL( returnPressed()), this, SLOT(slotLineFileSelect()) ); + connect( buttonImgSource, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) ); + connect( buttonRecalcImgSize, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRecalcImgSize()) ); + connect( lineImgSource, TQT_SIGNAL( returnPressed()), this, TQT_SLOT(slotLineFileSelect()) ); } TagImgDlg::~TagImgDlg() @@ -77,10 +77,10 @@ void TagImgDlg::slotImageSet(const KURL& imageURL) } widgetImg->slotSetImage(imgFileName); - img = new QImage(imgFileName); + img = new TQImage(imgFileName); if (!img->isNull() && lineWidth && lineHeight) { - QString s; + TQString s; s.setNum(img->width()); lineWidth->setText(s); s.setNum(img->height()); @@ -92,7 +92,7 @@ void TagImgDlg::slotImageSet(const KURL& imageURL) void TagImgDlg::slotRecalcImgSize() { if (img && lineWidth && lineHeight) { - QString s; + TQString s; s.setNum( img->width() ); lineWidth->setText( s ); s.setNum( img->height() ); @@ -120,7 +120,7 @@ void TagImgDlg::slotLineFileSelect() slotImageSet(url); } -void TagImgDlg::readAttributes( QDict *d ) +void TagImgDlg::readAttributes( TQDict *d ) { dict = d; @@ -140,10 +140,10 @@ void TagImgDlg::readAttributes( QDict *d ) updateDict("border",spinBorder ); } -void TagImgDlg::writeAttributes( QDict *d ) +void TagImgDlg::writeAttributes( TQDict *d ) { dict = d; - QString *t; // value of attr. + TQString *t; // value of attr. if (( t=d->find("src") )) { diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.h b/quanta/dialogs/tagdialogs/tagimgdlg.h index f1229ee2..73730c84 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.h +++ b/quanta/dialogs/tagdialogs/tagimgdlg.h @@ -20,11 +20,11 @@ #define TAGIMGDLG_H //Generated area. DO NOT EDIT!!!(begin) -#include -#include +#include +#include #include -#include -#include +#include +#include //Generated area. DO NOT EDIT!!!(end) #include "tagwidget.h" @@ -38,41 +38,41 @@ class QImage; *@author Dmitry Poplavsky & Yacovlev Alexander */ -class TagImgDlg : public QWidget, TagWidget { +class TagImgDlg : public TQWidget, TagWidget { Q_OBJECT public: - TagImgDlg(const DTDStruct *dtd, QWidget *parent=0, const char *name=0); + TagImgDlg(const DTDStruct *dtd, TQWidget *parent=0, const char *name=0); ~TagImgDlg(); public: void initDialog(); //Generated area. DO NOT EDIT!!!(begin) - QLabel *labelImgSource; + TQLabel *labelImgSource; KLineEdit *lineImgSource; - QPushButton *buttonImgSource; - QPushButton *buttonRecalcImgSize; - QLabel *QLabel_4; + TQPushButton *buttonImgSource; + TQPushButton *buttonRecalcImgSize; + TQLabel *QLabel_4; KLineEdit *lineWidth; - QLabel *QLabel_5; + TQLabel *QLabel_5; KLineEdit *lineHeight; - QLabel *QLabel_6; + TQLabel *QLabel_6; KLineEdit *lineHSpace; - QLabel *QLabel_7; + TQLabel *QLabel_7; KLineEdit *lineVSpace; - QLabel *QLabel_8; + TQLabel *QLabel_8; KLineEdit *lineAltText; - QLabel *QLabel_9; - QSpinBox *spinBorder; - QLabel *QLabel_10; - QComboBox *comboAlign; + TQLabel *QLabel_9; + TQSpinBox *spinBorder; + TQLabel *QLabel_10; + TQComboBox *comboAlign; PictureView *widgetImg; - QPushButton *buttonOk; - QPushButton *buttonCancel; + TQPushButton *buttonOk; + TQPushButton *buttonCancel; //Generated area. DO NOT EDIT!!!(end) private: - QImage *img; - QString imgFileName; + TQImage *img; + TQString imgFileName; bool isTmpFile; const DTDStruct *m_dtd; @@ -83,8 +83,8 @@ public slots: // Public slots void slotFileSelect(); void slotLineFileSelect(); - void readAttributes( QDict *d ); - void writeAttributes( QDict *d ); + void readAttributes( TQDict *d ); + void writeAttributes( TQDict *d ); /** recalculate image size */ void slotRecalcImgSize(); }; diff --git a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp index ec4a6a36..69d6a72e 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp @@ -13,24 +13,24 @@ #include #include -#include -#include +#include +#include #include "pictureview.h" #include "tagimgdlg.h" void TagImgDlg::initDialog(){ - QGridLayout *grid = new QGridLayout( this ); + TQGridLayout *grid = new TQGridLayout( this ); grid->setSpacing( 13 ); grid->setMargin( 11 ); - labelImgSource= new QLabel(this,"labelImgSource"); + labelImgSource= new TQLabel(this,"labelImgSource"); labelImgSource->setText(i18n("Image source:")); grid->addMultiCellWidget(labelImgSource, 0, 0, 0, 0); lineImgSource= new KLineEdit(this,"lineImgSource"); grid->addMultiCellWidget(lineImgSource, 0, 0, 1, 3); - buttonImgSource= new QPushButton(this,"NoName"); + buttonImgSource= new TQPushButton(this,"NoName"); buttonImgSource->setText(i18n("...")); grid->addMultiCellWidget(buttonImgSource, 0, 0, 4, 4); @@ -42,7 +42,7 @@ void TagImgDlg::initDialog(){ lineWidth = 0L; if (imgTag->attribute("width")) { - QLabel_4= new QLabel(this,"NoName"); + QLabel_4= new TQLabel(this,"NoName"); QLabel_4->setText(i18n("Width:")); grid->addMultiCellWidget(QLabel_4, 1, 1, 0, 0); @@ -54,7 +54,7 @@ void TagImgDlg::initDialog(){ lineHeight = 0L; if (imgTag->attribute("height")) { - QLabel_5= new QLabel(this,"NoName"); + QLabel_5= new TQLabel(this,"NoName"); QLabel_5->setText(i18n("Height:")); grid->addMultiCellWidget(QLabel_5, 1, 1, 2, 2); @@ -63,14 +63,14 @@ void TagImgDlg::initDialog(){ grid->addMultiCellWidget(lineHeight, 1, 1, 3, 3); } - buttonRecalcImgSize= new QPushButton(this,"NoName"); + buttonRecalcImgSize= new TQPushButton(this,"NoName"); buttonRecalcImgSize->setText(i18n("...")); grid->addMultiCellWidget(buttonRecalcImgSize, 1, 1, 4, 4); lineHSpace = 0L; if (imgTag->attribute("hspace")) { - QLabel_6= new QLabel(this,"NoName"); + QLabel_6= new TQLabel(this,"NoName"); QLabel_6->setText(i18n("HSpace:")); grid->addMultiCellWidget(QLabel_6, 2, 2, 0, 0); @@ -81,7 +81,7 @@ void TagImgDlg::initDialog(){ lineVSpace = 0L; if (imgTag->attribute("vspace")) { - QLabel_7= new QLabel(this,"NoName"); + QLabel_7= new TQLabel(this,"NoName"); QLabel_7->setText(i18n("VSpace:")); grid->addMultiCellWidget(QLabel_7, 2, 2, 2, 2); @@ -89,7 +89,7 @@ void TagImgDlg::initDialog(){ grid->addMultiCellWidget(lineVSpace, 2, 2, 3, 3); } - QLabel_8= new QLabel(this,"NoName"); + QLabel_8= new TQLabel(this,"NoName"); QLabel_8->setText(i18n("Alternate text:")); grid->addMultiCellWidget(QLabel_8, 3, 3, 0, 0); @@ -99,11 +99,11 @@ void TagImgDlg::initDialog(){ spinBorder = 0L; if (imgTag->attribute("border")) { - QLabel_9= new QLabel(this,"NoName"); + QLabel_9= new TQLabel(this,"NoName"); QLabel_9->setText(i18n("Border:")); grid->addMultiCellWidget(QLabel_9, 4, 4, 0, 0); - spinBorder= new QSpinBox(this,"NoName"); + spinBorder= new TQSpinBox(this,"NoName"); spinBorder->setRange(0,20); grid->addMultiCellWidget(spinBorder, 4, 4, 1, 1); } @@ -111,11 +111,11 @@ void TagImgDlg::initDialog(){ comboAlign = 0L; if (imgTag->attribute("align")) { - QLabel_10= new QLabel(this,"NoName"); + QLabel_10= new TQLabel(this,"NoName"); QLabel_10->setText(i18n("Align:")); grid->addMultiCellWidget(QLabel_10, 4, 4, 2, 2); - comboAlign= new QComboBox(this,"NoName"); + comboAlign= new TQComboBox(this,"NoName"); grid->addMultiCellWidget(comboAlign, 4, 4, 3, 4); comboAlign->insertStringList(imgTag->attribute("align")->values); } diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.cpp b/quanta/dialogs/tagdialogs/tagmaildlg.cpp index 329ffd59..3ed62c57 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmaildlg.cpp @@ -28,21 +28,21 @@ #include //qt includes -#include +#include #include -#include -#include +#include +#include -TagMailDlg::TagMailDlg(QWidget *parent, const char *name) +TagMailDlg::TagMailDlg(TQWidget *parent, const char *name) :TagMail(parent, name) { setCaption(name); setModal(true); - connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); - connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); - connect( buttonAddressSelect, SIGNAL(clicked()), SLOT(slotSelectAddress()) ); + connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); + connect( buttonAddressSelect, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectAddress()) ); buttonOk->setIconSet(SmallIconSet("button_ok")); buttonCancel->setIconSet(SmallIconSet("button_cancel")); lineEmail->setFocus(); @@ -54,13 +54,13 @@ TagMailDlg::~TagMailDlg(){ void TagMailDlg::slotSelectAddress() { //Based on KMail - QString addr, email, emailString; - QStringList result; + TQString addr, email, emailString; + TQStringList result; KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); KABC::AddressBook::Iterator it; for( it = addressBook->begin(); it != addressBook->end(); ++it ) { - QStringList emails = (*it).emails(); - QString n = (*it).prefix() + " " + + TQStringList emails = (*it).emails(); + TQString n = (*it).prefix() + " " + (*it).givenName() + " " + (*it).additionalName() + " " + (*it).familyName() + " " + @@ -71,7 +71,7 @@ void TagMailDlg::slotSelectAddress() if (n.isEmpty() || (emails[i].find( "<" ) != -1)) addr = ""; else { /* do we really need quotes around this name ? */ - if (n.find(QRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) + if (n.find(TQRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) addr = qConfig.attrValueQuotation + n + qConfig.attrValueQuotation + " "; else addr = n + " "; diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.h b/quanta/dialogs/tagdialogs/tagmaildlg.h index 590c646b..32dffaa5 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.h +++ b/quanta/dialogs/tagdialogs/tagmaildlg.h @@ -25,7 +25,7 @@ class TagMailDlg : public TagMail { Q_OBJECT public: - TagMailDlg(QWidget *parent=0, const char *name=0); + TagMailDlg(TQWidget *parent=0, const char *name=0); ~TagMailDlg(); private slots: // Private slots /** Select a mail address, using the KABC */ diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.cpp b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp index 13893a53..9313bb08 100644 --- a/quanta/dialogs/tagdialogs/tagmiscdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp @@ -16,14 +16,14 @@ #include "tagmiscdlg.h" #include "tagmisc.h" #include -#include -#include +#include +#include -TagMiscDlg::TagMiscDlg( QWidget* parent, const char* name, bool addClosingTag, const QString &element ) +TagMiscDlg::TagMiscDlg( TQWidget* parent, const char* name, bool addClosingTag, const TQString &element ) :KDialogBase( parent, name, true, i18n("Misc. Tag"), KDialogBase::Ok | KDialogBase::Cancel ) { miscWidget = new TagMisc(this); - connect( miscWidget->elementName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotMiscTagChanged(const QString & ) ) ); + connect( miscWidget->elementName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotMiscTagChanged(const TQString & ) ) ); setMainWidget(miscWidget); miscWidget->addClosingTag->setChecked(addClosingTag); miscWidget->elementName->setText(element); @@ -35,13 +35,13 @@ TagMiscDlg::~TagMiscDlg() } -void TagMiscDlg::slotMiscTagChanged( const QString &_tag ) +void TagMiscDlg::slotMiscTagChanged( const TQString &_tag ) { enableButtonOK( !_tag.isEmpty() ); } -QString TagMiscDlg::elementTagName() const +TQString TagMiscDlg::elementTagName() const { return miscWidget->elementName->text(); } diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.h b/quanta/dialogs/tagdialogs/tagmiscdlg.h index 8e9ded91..e8d68c3d 100644 --- a/quanta/dialogs/tagdialogs/tagmiscdlg.h +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.h @@ -26,14 +26,14 @@ class TagMiscDlg : public KDialogBase Q_OBJECT public: - TagMiscDlg( QWidget* parent = 0, const char* name = 0, bool addClosingTag=true, const QString &element=QString::null ); + TagMiscDlg( TQWidget* parent = 0, const char* name = 0, bool addClosingTag=true, const TQString &element=TQString::null ); ~TagMiscDlg(); - QString elementTagName() const; + TQString elementTagName() const; bool addClosingTag() const; protected slots: - void slotMiscTagChanged( const QString & ); + void slotMiscTagChanged( const TQString & ); private: TagMisc *miscWidget; diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp index ef971e83..7a9edbdb 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp @@ -16,15 +16,15 @@ ***************************************************************************/ #include "tagquicklistdlg.h" #include "tagquicklistdlg.moc" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -TagQuickListDlg::TagQuickListDlg(QWidget *parent, const char *name) - : QDialog(parent,name,true) +TagQuickListDlg::TagQuickListDlg(TQWidget *parent, const char *name) + : TQDialog(parent,name,true) { setCaption(name); @@ -33,8 +33,8 @@ TagQuickListDlg::TagQuickListDlg(QWidget *parent, const char *name) groupBox->insert(radioOrdered); groupBox->insert(radioUnordered); - connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); - connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); + connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); } TagQuickListDlg::~TagQuickListDlg(){ diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.h b/quanta/dialogs/tagdialogs/tagquicklistdlg.h index f2426fb3..90ea666b 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlg.h +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.h @@ -18,9 +18,9 @@ #ifndef TAGQUICKLISTDLG_H #define TAGQUICKLISTDLG_H -#include +#include -#include +#include class QLabel; class QSpinBox; class QPushButton; @@ -31,22 +31,22 @@ class QButtonGroup; *@author Dmitry Poplavsky & Yacovlev Alexander */ -class TagQuickListDlg : public QDialog { +class TagQuickListDlg : public TQDialog { Q_OBJECT public: - TagQuickListDlg(QWidget *parent=0, const char *name=0); + TagQuickListDlg(TQWidget *parent=0, const char *name=0); ~TagQuickListDlg(); public: void initDialog(); - QLabel *QLabel_1; - QSpinBox *spinBoxRows; - QPushButton *buttonOk; - QLabel *QLabel_2; - QRadioButton *radioOrdered; - QRadioButton *radioUnordered; - QPushButton *buttonCancel; - QButtonGroup *groupBox; + TQLabel *QLabel_1; + TQSpinBox *spinBoxRows; + TQPushButton *buttonOk; + TQLabel *QLabel_2; + TQRadioButton *radioOrdered; + TQRadioButton *radioUnordered; + TQPushButton *buttonCancel; + TQButtonGroup *groupBox; private: }; diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp index 331aefbb..f7e7b713 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp @@ -9,24 +9,24 @@ **********************************************************************/ #include #include -#include +#include #include "tagquicklistdlg.h" -#include -#include +#include +#include #include -#include +#include #include void TagQuickListDlg::initDialog() { resize(230,150); - QLabel_1= new QLabel(this,"NoName"); + QLabel_1= new TQLabel(this,"NoName"); QLabel_1->setGeometry(10,10,100,30); QLabel_1->setMinimumSize(0,0); QLabel_1->setText(i18n("Rows:")); - spinBoxRows= new QSpinBox(this,"NoName"); + spinBoxRows= new TQSpinBox(this,"NoName"); spinBoxRows->setGeometry(120,10,100,25); spinBoxRows->setMinimumSize(0,0); spinBoxRows->setRange(1,99); @@ -35,27 +35,27 @@ void TagQuickListDlg::initDialog() buttonOk->setGeometry(10,110,100,30); buttonOk->setMinimumSize(0,0); - QLabel_2= new QLabel(this,"NoName"); + QLabel_2= new TQLabel(this,"NoName"); QLabel_2->setGeometry(10,40,100,30); QLabel_2->setMinimumSize(0,0); QLabel_2->setText(i18n("Style:")); - buttonCancel= new QPushButton(this,"NoName"); + buttonCancel= new TQPushButton(this,"NoName"); buttonCancel->setGeometry(120,110,100,30); buttonCancel->setMinimumSize(0,0); buttonCancel->setText(KStdGuiItem::cancel().text()); - groupBox= new QButtonGroup(this,"NoName"); + groupBox= new TQButtonGroup(this,"NoName"); groupBox->setGeometry(120,40,100,60); groupBox->setMinimumSize(0,0); - radioOrdered= new QRadioButton(groupBox,"NoName"); + radioOrdered= new TQRadioButton(groupBox,"NoName"); radioOrdered->setGeometry(5,5,90,25); radioOrdered->setMinimumSize(0,0); radioOrdered->setText(i18n("Ordered")); radioOrdered->setChecked(true); - radioUnordered= new QRadioButton(groupBox,"NoName"); + radioUnordered= new TQRadioButton(groupBox,"NoName"); radioUnordered->setGeometry(5,30,90,25); radioUnordered->setMinimumSize(0,0); radioUnordered->setText(i18n("Unordered")); diff --git a/quanta/dialogs/tagdialogs/tagwidget.cpp b/quanta/dialogs/tagdialogs/tagwidget.cpp index 0d01f7a3..014549bc 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.cpp +++ b/quanta/dialogs/tagdialogs/tagwidget.cpp @@ -15,11 +15,11 @@ ***************************************************************************/ // QT files -#include +#include #include -#include -#include -#include +#include +#include +#include // KDE files #include @@ -30,7 +30,7 @@ #include "tagdialog.h" #include "resource.h" -TagWidget::TagWidget(QObject *parent, const char *) +TagWidget::TagWidget(TQObject *parent, const char *) { baseURL = ((TagDialog *)parent)->baseURL(); } @@ -38,9 +38,9 @@ TagWidget::TagWidget(QObject *parent, const char *) TagWidget::~TagWidget(){ } -void TagWidget::updateDict(const QString &attr, QComboBox *combo ) +void TagWidget::updateDict(const TQString &attr, TQComboBox *combo ) { - QString *s = new QString(combo->currentText()); + TQString *s = new TQString(combo->currentText()); if (s->isEmpty()) { dict->remove(attr); @@ -50,7 +50,7 @@ void TagWidget::updateDict(const QString &attr, QComboBox *combo ) dict->replace(attr, s); } -void TagWidget::setValue(const QString &val, QComboBox *combo) +void TagWidget::setValue(const TQString &val, TQComboBox *combo) { bool found = false; int num = combo->count(); @@ -68,24 +68,24 @@ void TagWidget::setValue(const QString &val, QComboBox *combo) combo->setEditText(val); } -void TagWidget::setValue(const QString &val, QLineEdit *line) +void TagWidget::setValue(const TQString &val, TQLineEdit *line) { line->setText(val); } -void TagWidget::setValue(const QString &val, QSpinBox *spin) +void TagWidget::setValue(const TQString &val, TQSpinBox *spin) { spin->setValue(val.toInt()); } -void TagWidget::setValue(const QString &val, KColorButton *button) +void TagWidget::setValue(const TQString &val, KColorButton *button) { button->setColor(val); } -void TagWidget::updateDict(const QString &attr, QLineEdit *line ) +void TagWidget::updateDict(const TQString &attr, TQLineEdit *line ) { - QString *s = new QString(line->text()); + TQString *s = new TQString(line->text()); if (s->isEmpty()) { dict->remove(attr); @@ -95,9 +95,9 @@ void TagWidget::updateDict(const QString &attr, QLineEdit *line ) dict->replace(attr, s); } -void TagWidget::updateDict(const QString &attr, QSpinBox *spin ) +void TagWidget::updateDict(const TQString &attr, TQSpinBox *spin ) { - QString *s = new QString(spin->text()); + TQString *s = new TQString(spin->text()); if (s->isEmpty()) { dict->remove(attr); @@ -107,13 +107,13 @@ void TagWidget::updateDict(const QString &attr, QSpinBox *spin ) dict->replace(attr, s); } -void TagWidget::updateDict(const QString &attr, QCheckBox *check ) +void TagWidget::updateDict(const TQString &attr, TQCheckBox *check ) { if (!check->isChecked()) dict->remove(attr); else { if (!dict->find(attr)) - dict->insert(attr, new QString("")); + dict->insert(attr, new TQString("")); } } diff --git a/quanta/dialogs/tagdialogs/tagwidget.h b/quanta/dialogs/tagdialogs/tagwidget.h index 89f8e371..83508aab 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.h +++ b/quanta/dialogs/tagdialogs/tagwidget.h @@ -17,8 +17,8 @@ #ifndef TAGWIDGET_H #define TAGWIDGET_H -#include -#include +#include +#include class QComboBox; class QLineEdit; @@ -33,23 +33,23 @@ class KURL; class TagWidget { public: - TagWidget(QObject *parent=0, const char *name=0); + TagWidget(TQObject *parent=0, const char *name=0); virtual ~TagWidget(); - virtual void readAttributes(QDict *) {}; - virtual void writeAttributes(QDict *) {}; - void updateDict(const QString &attr, QComboBox *combo); - void updateDict(const QString &attr, QLineEdit *line); - void updateDict(const QString &attr, QSpinBox *spin); - void updateDict(const QString &attr, QCheckBox *check); + virtual void readAttributes(TQDict *) {}; + virtual void writeAttributes(TQDict *) {}; + void updateDict(const TQString &attr, TQComboBox *combo); + void updateDict(const TQString &attr, TQLineEdit *line); + void updateDict(const TQString &attr, TQSpinBox *spin); + void updateDict(const TQString &attr, TQCheckBox *check); - void setValue(const QString &val, QComboBox *combo); - void setValue(const QString &val, QLineEdit *line); - void setValue(const QString &val, QSpinBox *spin); - void setValue(const QString &val, KColorButton *button); + void setValue(const TQString &val, TQComboBox *combo); + void setValue(const TQString &val, TQLineEdit *line); + void setValue(const TQString &val, TQSpinBox *spin); + void setValue(const TQString &val, KColorButton *button); protected: - QDict *dict; // dictionary of attributes and values + TQDict *dict; // dictionary of attributes and values KURL baseURL; }; diff --git a/quanta/dialogs/tagdialogs/tagxml.cpp b/quanta/dialogs/tagdialogs/tagxml.cpp index c9114d62..5c07b341 100644 --- a/quanta/dialogs/tagdialogs/tagxml.cpp +++ b/quanta/dialogs/tagdialogs/tagxml.cpp @@ -21,22 +21,22 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "styleeditor.h" -Tagxml::Tagxml( QDomNode &d, QTag *dtdTag, QWidget *parent, const char *name) - :QWidget(parent,name), TagWidget(parent,name), doc(d) +Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, TQWidget *parent, const char *name) + :TQWidget(parent,name), TagWidget(parent,name), doc(d) { initialize(d, dtdTag); } -Tagxml::Tagxml( QDomNode &d, QTag *dtdTag, const QString& selection, QWidget *parent, const char *name) - : QWidget(parent,name), TagWidget(parent,name), doc(d), m_selection(selection) +Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, const TQString& selection, TQWidget *parent, const char *name) + : TQWidget(parent,name), TagWidget(parent,name), doc(d), m_selection(selection) { initialize(d, dtdTag); } @@ -45,24 +45,24 @@ Tagxml::~Tagxml() { } -void Tagxml::initialize(QDomNode &d, QTag *dtdTag) +void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) { m_dtd = dtdTag->parentDTD; m_dtdTag = dtdTag; - QGridLayout *grid = new QGridLayout( this ); + TQGridLayout *grid = new TQGridLayout( this ); grid->setSpacing( 13 ); grid->setMargin( 11 ); m_firstItem = 0L; //parse the tag XML file, in order to build up the dialog - for ( QDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomNode location = findChild(n,"location"); + TQDomNode location = findChild(n,"location"); if ( location.isNull() ) continue; //debug( n.nodeName() ); - QDomElement el = location.toElement(); + TQDomElement el = location.toElement(); int row = el.attribute("row","0").toInt(); int col = el.attribute("col","0").toInt(); @@ -78,34 +78,34 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) // qDebug("%s col:%d row:%d cs:%d, rs:%d", n.nodeName().data(), col,row,colspan,rowspan ); - QString tip; - QDomNode tooltip = findChild( n ,"tooltip" ); + TQString tip; + TQDomNode tooltip = findChild( n ,"tooltip" ); if ( !tooltip.isNull() ) { if ( tooltip.firstChild().isText() ) { - QDomText text = tooltip.firstChild().toText(); + TQDomText text = tooltip.firstChild().toText(); tip = text.data(); } } - QString whatsThis; - QDomNode what = findChild( n ,"whatsthis" ); + TQString whatsThis; + TQDomNode what = findChild( n ,"whatsthis" ); if ( !what.isNull() ) { if ( what.firstChild().isText() ) { - QDomText text = what.firstChild().toText(); + TQDomText text = what.firstChild().toText(); whatsThis = text.data(); } } if ( n.nodeName() == "label" ) //a static label { - QLabel *label = new QLabel(this); - QDomElement ltext = findChild(n,"text").toElement(); + TQLabel *label = new TQLabel(this); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) - label->setText( ltext.text().isEmpty() ? QString("") : (ltext.text()+":") ); + label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); if ( !tip.isNull() ) - QToolTip::add( label, tip ); + TQToolTip::add( label, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); grid->addMultiCellWidget( label, row, row+rowspan, col, col+colspan ); } @@ -113,19 +113,19 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) if ( n.nodeName() == "attr" ) //an attribute { - QDomElement el(n.toElement()); - QString type = el.attribute("type","input"); + TQDomElement el(n.toElement()); + TQString type = el.attribute("type","input"); - QDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() && (type != "check") ) //if there is a text label for the attribute { - QLabel *label = new QLabel(this); - label->setText( ltext.text().isEmpty() ? QString("") : (ltext.text()+":") ); + TQLabel *label = new TQLabel(this); + label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); if ( !tip.isNull() ) - QToolTip::add( label, tip ); + TQToolTip::add( label, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); grid->addMultiCellWidget( label, textrow, textrow+textrowspan, textcol, textcol+textcolspan ); } @@ -137,9 +137,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_line *attr = new Attr_line(el, w, m_dtdTag); attributes.append(attr); @@ -149,16 +149,16 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) else if ( type == "check" ) { - QCheckBox *w = new QCheckBox(this); + TQCheckBox *w = new TQCheckBox(this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); - QDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) w->setText( ltext.text() ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_check *attr = new Attr_check(el, w, m_dtdTag); attributes.append(attr); @@ -167,12 +167,12 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) } else if ( type == "list" ) { - QComboBox *w = new QComboBox(true, this); + TQComboBox *w = new TQComboBox(true, this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_list *attr = new Attr_list(el, w, dtdTag); attributes.append(attr); if (!m_firstItem) @@ -184,9 +184,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_color *attr = new Attr_color(el, w, m_dtdTag); attributes.append(attr); @@ -199,9 +199,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_file *attr = new Attr_file(el, w, m_dtdTag); attributes.append(attr); if (!m_firstItem) @@ -215,9 +215,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_line *attr = new Attr_line(el, w->lineEdit(), m_dtdTag); attributes.append(attr); @@ -231,14 +231,14 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) if ( n.nodeName() == "spacer") { - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); - QSpacerItem* spacer; + TQSpacerItem* spacer; if ( el.attribute("orientation","v") == "v" ) - spacer = new QSpacerItem( 5, 10, QSizePolicy::Fixed, QSizePolicy::Expanding ); + spacer = new TQSpacerItem( 5, 10, TQSizePolicy::Fixed, TQSizePolicy::Expanding ); else - spacer = new QSpacerItem( 10, 5, QSizePolicy::Expanding, QSizePolicy::Fixed ); + spacer = new TQSpacerItem( 10, 5, TQSizePolicy::Expanding, TQSizePolicy::Fixed ); grid->addItem(spacer,row,col); } @@ -251,9 +251,9 @@ void Tagxml::focusToFirstItem() m_firstItem->setFocus(); } -void Tagxml::readAttributes( QDict *d ) +void Tagxml::readAttributes( TQDict *d ) { - QString name,value; + TQString name,value; Attr * attr = attributes.first(); while ( attr ) { @@ -270,10 +270,10 @@ void Tagxml::readAttributes( QDict *d ) { if (m_dtd->booleanAttributes == "simple") { - d->replace(name, new QString("") ); + d->replace(name, new TQString("") ); } else { - d->replace(name, new QString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all + d->replace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all } } else @@ -283,16 +283,16 @@ void Tagxml::readAttributes( QDict *d ) /* } else { value = (value == "checked")?m_dtd->booleanTrue:m_dtd->booleanFalse; - d->replace(name, new QString(value)); + d->replace(name, new TQString(value)); } */ } else if (dynamic_cast(attr)) { // value = KURL::encode_string(value); - d->replace(name, new QString(value)); + d->replace(name, new TQString(value)); } else { - value.replace(QRegExp("&(?!amp;)"), "&"); - d->replace(name, new QString(value) ); + value.replace(TQRegExp("&(?!amp;)"), "&"); + d->replace(name, new TQString(value) ); } } @@ -302,9 +302,9 @@ void Tagxml::readAttributes( QDict *d ) } -void Tagxml::writeAttributes( QDict *d ) +void Tagxml::writeAttributes( TQDict *d ) { - QString name,value; + TQString name,value; Attr * attr = attributes.first(); @@ -313,7 +313,7 @@ void Tagxml::writeAttributes( QDict *d ) name = attr->attrName(); - QString *v = d->find(name); + TQString *v = d->find(name); if ( v ) { v->replace("&","&"); if ( dynamic_cast(attr) ) // checkbox diff --git a/quanta/dialogs/tagdialogs/tagxml.h b/quanta/dialogs/tagdialogs/tagxml.h index 52c2973d..780b6b91 100644 --- a/quanta/dialogs/tagdialogs/tagxml.h +++ b/quanta/dialogs/tagdialogs/tagxml.h @@ -18,37 +18,37 @@ #ifndef TAGXML_H #define TAGXML_H -#include -#include -#include +#include +#include +#include #include "tagattr.h" #include "tagwidget.h" #include "qtag.h" -class Tagxml : public QWidget, TagWidget { +class Tagxml : public TQWidget, TagWidget { Q_OBJECT public: /** construtor */ - Tagxml(QDomNode &d, QTag *dtdTag, QWidget* parent=0, const char *name=0); - Tagxml(QDomNode &d, QTag *dtdTag, const QString& selection, QWidget* parent=0, const char *name=0); + Tagxml(TQDomNode &d, QTag *dtdTag, TQWidget* parent=0, const char *name=0); + Tagxml(TQDomNode &d, QTag *dtdTag, const TQString& selection, TQWidget* parent=0, const char *name=0); /** destructor */ ~Tagxml(); - QPtrList attributes; + TQPtrList attributes; - void readAttributes( QDict *d); - void writeAttributes( QDict *d ); + void readAttributes( TQDict *d); + void writeAttributes( TQDict *d ); void focusToFirstItem(); private: - void initialize(QDomNode &d, QTag *dtdTag); + void initialize(TQDomNode &d, QTag *dtdTag); - QDomNode doc; + TQDomNode doc; const DTDStruct *m_dtd; - QWidget *m_firstItem; + TQWidget *m_firstItem; QTag *m_dtdTag; - QString m_selection; + TQString m_selection; }; -- cgit v1.2.3