summaryrefslogtreecommitdiffstats
path: root/quanta
diff options
context:
space:
mode:
Diffstat (limited to 'quanta')
-rw-r--r--quanta/components/csseditor/colorrequester.cpp38
-rw-r--r--quanta/components/csseditor/colorrequester.h14
-rw-r--r--quanta/components/csseditor/colorslider.cpp42
-rw-r--r--quanta/components/csseditor/colorslider.h14
-rw-r--r--quanta/components/csseditor/csseditor.cpp164
-rw-r--r--quanta/components/csseditor/csseditor.h60
-rw-r--r--quanta/components/csseditor/csseditor_globals.cpp20
-rw-r--r--quanta/components/csseditor/csseditor_globals.h22
-rw-r--r--quanta/components/csseditor/cssselector.cpp190
-rw-r--r--quanta/components/csseditor/cssselector.h36
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.cpp40
-rw-r--r--quanta/components/csseditor/cssshpropertyparser.h18
-rw-r--r--quanta/components/csseditor/doubleeditors.cpp46
-rw-r--r--quanta/components/csseditor/doubleeditors.h26
-rw-r--r--quanta/components/csseditor/encodingselector.cpp8
-rw-r--r--quanta/components/csseditor/encodingselector.h6
-rw-r--r--quanta/components/csseditor/fontfamilychooser.cpp100
-rw-r--r--quanta/components/csseditor/fontfamilychooser.h20
-rw-r--r--quanta/components/csseditor/minieditor.h4
-rw-r--r--quanta/components/csseditor/percentageeditor.cpp8
-rw-r--r--quanta/components/csseditor/percentageeditor.h12
-rw-r--r--quanta/components/csseditor/propertysetter.cpp44
-rw-r--r--quanta/components/csseditor/propertysetter.h20
-rw-r--r--quanta/components/csseditor/qmyhighlighter.cpp16
-rw-r--r--quanta/components/csseditor/qmyhighlighter.h8
-rw-r--r--quanta/components/csseditor/shorthandformer.cpp178
-rw-r--r--quanta/components/csseditor/shorthandformer.h70
-rw-r--r--quanta/components/csseditor/specialsb.cpp38
-rw-r--r--quanta/components/csseditor/specialsb.h28
-rw-r--r--quanta/components/csseditor/styleeditor.cpp26
-rw-r--r--quanta/components/csseditor/styleeditor.h4
-rw-r--r--quanta/components/csseditor/stylesheetparser.cpp36
-rw-r--r--quanta/components/csseditor/stylesheetparser.h18
-rw-r--r--quanta/components/csseditor/tlpeditors.cpp66
-rw-r--r--quanta/components/csseditor/tlpeditors.h34
-rw-r--r--quanta/components/cvsservice/cvsservice.cpp146
-rw-r--r--quanta/components/cvsservice/cvsservice.h44
-rw-r--r--quanta/components/cvsservice/cvsservicedcopif.h4
-rw-r--r--quanta/components/debugger/backtracelistview.cpp16
-rw-r--r--quanta/components/debugger/backtracelistview.h24
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialog.cpp22
-rw-r--r--quanta/components/debugger/conditionalbreakpointdialog.h10
-rw-r--r--quanta/components/debugger/dbgp/dbgpnetwork.cpp42
-rw-r--r--quanta/components/debugger/dbgp/dbgpnetwork.h12
-rw-r--r--quanta/components/debugger/dbgp/dbgpsettings.cpp8
-rw-r--r--quanta/components/debugger/dbgp/dbgpsettings.h2
-rw-r--r--quanta/components/debugger/dbgp/qbytearrayfifo.cpp8
-rw-r--r--quanta/components/debugger/dbgp/qbytearrayfifo.h10
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.cpp136
-rw-r--r--quanta/components/debugger/dbgp/quantadebuggerdbgp.h70
-rw-r--r--quanta/components/debugger/debuggerbreakpoint.cpp30
-rw-r--r--quanta/components/debugger/debuggerbreakpoint.h44
-rw-r--r--quanta/components/debugger/debuggerbreakpointlist.cpp8
-rw-r--r--quanta/components/debugger/debuggerbreakpointlist.h18
-rw-r--r--quanta/components/debugger/debuggerbreakpointview.cpp24
-rw-r--r--quanta/components/debugger/debuggerbreakpointview.h12
-rw-r--r--quanta/components/debugger/debuggermanager.cpp142
-rw-r--r--quanta/components/debugger/debuggermanager.h30
-rw-r--r--quanta/components/debugger/debuggerui.cpp16
-rw-r--r--quanta/components/debugger/debuggerui.h10
-rw-r--r--quanta/components/debugger/debuggervariable.cpp24
-rw-r--r--quanta/components/debugger/debuggervariable.h32
-rw-r--r--quanta/components/debugger/gubed/gubedsettings.cpp4
-rw-r--r--quanta/components/debugger/gubed/gubedsettings.h2
-rw-r--r--quanta/components/debugger/gubed/quantadebuggergubed.cpp132
-rw-r--r--quanta/components/debugger/gubed/quantadebuggergubed.h58
-rw-r--r--quanta/components/debugger/interfaces/debuggerclient.cpp14
-rw-r--r--quanta/components/debugger/interfaces/debuggerclient.h20
-rw-r--r--quanta/components/debugger/interfaces/debuggerinterface.cpp4
-rw-r--r--quanta/components/debugger/interfaces/debuggerinterface.h30
-rw-r--r--quanta/components/debugger/pathmapper.cpp56
-rw-r--r--quanta/components/debugger/pathmapper.h30
-rw-r--r--quanta/components/debugger/pathmapperdialog.cpp24
-rw-r--r--quanta/components/debugger/pathmapperdialog.h10
-rw-r--r--quanta/components/debugger/quantadebuggerinterface.cpp28
-rw-r--r--quanta/components/debugger/quantadebuggerinterface.h30
-rw-r--r--quanta/components/debugger/variableslistview.cpp34
-rw-r--r--quanta/components/debugger/variableslistview.h10
-rw-r--r--quanta/components/framewizard/areaattributedb.h24
-rw-r--r--quanta/components/framewizard/fmfpeditor.cpp36
-rw-r--r--quanta/components/framewizard/fmfpeditor.h10
-rw-r--r--quanta/components/framewizard/fmrceditor.cpp6
-rw-r--r--quanta/components/framewizard/fmrceditor.h2
-rw-r--r--quanta/components/framewizard/framewizard.cpp28
-rw-r--r--quanta/components/framewizard/framewizard.h14
-rw-r--r--quanta/components/framewizard/selectablearea.cpp22
-rw-r--r--quanta/components/framewizard/selectablearea.h20
-rw-r--r--quanta/components/framewizard/treenode.cpp38
-rw-r--r--quanta/components/framewizard/treenode.h40
-rw-r--r--quanta/components/framewizard/visualframeeditor.cpp134
-rw-r--r--quanta/components/framewizard/visualframeeditor.h36
-rw-r--r--quanta/components/tableeditor/tableeditor.cpp230
-rw-r--r--quanta/components/tableeditor/tableeditor.h54
-rw-r--r--quanta/components/tableeditor/tableitem.cpp46
-rw-r--r--quanta/components/tableeditor/tableitem.h20
-rw-r--r--quanta/dialogs/actionconfigdialog.cpp208
-rw-r--r--quanta/dialogs/actionconfigdialog.h34
-rw-r--r--quanta/dialogs/copyto.cpp12
-rw-r--r--quanta/dialogs/dirtydlg.cpp18
-rw-r--r--quanta/dialogs/dirtydlg.h4
-rw-r--r--quanta/dialogs/dtepeditdlg.cpp58
-rw-r--r--quanta/dialogs/dtepeditdlg.h36
-rw-r--r--quanta/dialogs/filecombo.cpp44
-rw-r--r--quanta/dialogs/filecombo.h20
-rw-r--r--quanta/dialogs/settings/abbreviation.cpp90
-rw-r--r--quanta/dialogs/settings/abbreviation.h12
-rw-r--r--quanta/dialogs/settings/filemasks.cpp12
-rw-r--r--quanta/dialogs/settings/filemasks.h2
-rw-r--r--quanta/dialogs/settings/parseroptions.cpp14
-rw-r--r--quanta/dialogs/settings/parseroptions.h2
-rw-r--r--quanta/dialogs/settings/previewoptions.cpp30
-rw-r--r--quanta/dialogs/settings/previewoptions.h18
-rw-r--r--quanta/dialogs/specialchardialog.cpp38
-rw-r--r--quanta/dialogs/specialchardialog.h10
-rw-r--r--quanta/dialogs/tagdialogs/colorcombo.cpp70
-rw-r--r--quanta/dialogs/tagdialogs/colorcombo.h30
-rw-r--r--quanta/dialogs/tagdialogs/corewidgetdlg.cpp12
-rw-r--r--quanta/dialogs/tagdialogs/listdlg.cpp12
-rw-r--r--quanta/dialogs/tagdialogs/listdlg.h4
-rw-r--r--quanta/dialogs/tagdialogs/pictureview.cpp22
-rw-r--r--quanta/dialogs/tagdialogs/pictureview.h16
-rw-r--r--quanta/dialogs/tagdialogs/tagattr.cpp32
-rw-r--r--quanta/dialogs/tagdialogs/tagattr.h64
-rw-r--r--quanta/dialogs/tagdialogs/tagdialog.cpp146
-rw-r--r--quanta/dialogs/tagdialogs/tagdialog.h38
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlg.cpp26
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlg.h48
-rw-r--r--quanta/dialogs/tagdialogs/tagimgdlgdata.cpp30
-rw-r--r--quanta/dialogs/tagdialogs/tagmaildlg.cpp24
-rw-r--r--quanta/dialogs/tagdialogs/tagmaildlg.h2
-rw-r--r--quanta/dialogs/tagdialogs/tagmiscdlg.cpp12
-rw-r--r--quanta/dialogs/tagdialogs/tagmiscdlg.h6
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlg.cpp20
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlg.h24
-rw-r--r--quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp22
-rw-r--r--quanta/dialogs/tagdialogs/tagwidget.cpp34
-rw-r--r--quanta/dialogs/tagdialogs/tagwidget.h28
-rw-r--r--quanta/dialogs/tagdialogs/tagxml.cpp124
-rw-r--r--quanta/dialogs/tagdialogs/tagxml.h26
-rw-r--r--quanta/messages/annotationoutput.cpp102
-rw-r--r--quanta/messages/annotationoutput.h28
-rw-r--r--quanta/messages/messageitem.cpp24
-rw-r--r--quanta/messages/messageitem.h16
-rw-r--r--quanta/messages/messageoutput.cpp56
-rw-r--r--quanta/messages/messageoutput.h22
-rw-r--r--quanta/parsers/dtd/dtd.cpp128
-rw-r--r--quanta/parsers/dtd/dtd.h34
-rw-r--r--quanta/parsers/dtd/dtdparser.cpp84
-rw-r--r--quanta/parsers/dtd/dtdparser.h22
-rw-r--r--quanta/parsers/node.cpp50
-rw-r--r--quanta/parsers/node.h30
-rw-r--r--quanta/parsers/parser.cpp134
-rw-r--r--quanta/parsers/parser.h28
-rw-r--r--quanta/parsers/parsercommon.cpp26
-rw-r--r--quanta/parsers/parsercommon.h12
-rw-r--r--quanta/parsers/qtag.cpp28
-rw-r--r--quanta/parsers/qtag.h170
-rw-r--r--quanta/parsers/sagroupparser.cpp28
-rw-r--r--quanta/parsers/sagroupparser.h4
-rw-r--r--quanta/parsers/saparser.cpp50
-rw-r--r--quanta/parsers/saparser.h30
-rw-r--r--quanta/parsers/tag.cpp114
-rw-r--r--quanta/parsers/tag.h56
-rw-r--r--quanta/parts/kafka/cursors.h10
-rw-r--r--quanta/parts/kafka/domtreeview.cpp40
-rw-r--r--quanta/parts/kafka/domtreeview.h24
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.cpp82
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.h16
-rw-r--r--quanta/parts/kafka/htmlenhancer.cpp4
-rw-r--r--quanta/parts/kafka/kafkacommon.cpp216
-rw-r--r--quanta/parts/kafka/kafkacommon.h94
-rw-r--r--quanta/parts/kafka/kafkadragobject.cpp34
-rw-r--r--quanta/parts/kafka/kafkadragobject.h14
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.cpp88
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.h22
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.cpp12
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.h2
-rw-r--r--quanta/parts/kafka/undoredo.cpp46
-rw-r--r--quanta/parts/kafka/undoredo.h36
-rw-r--r--quanta/parts/kafka/wkafkapart.cpp178
-rw-r--r--quanta/parts/kafka/wkafkapart.h36
-rw-r--r--quanta/parts/preview/whtmlpart.cpp38
-rw-r--r--quanta/parts/preview/whtmlpart.h26
-rw-r--r--quanta/plugins/quantaplugin.cpp76
-rw-r--r--quanta/plugins/quantaplugin.h54
-rw-r--r--quanta/plugins/quantapluginconfig.cpp28
-rw-r--r--quanta/plugins/quantapluginconfig.h4
-rw-r--r--quanta/plugins/quantaplugineditor.cpp76
-rw-r--r--quanta/plugins/quantaplugineditor.h22
-rw-r--r--quanta/plugins/quantaplugininterface.cpp58
-rw-r--r--quanta/plugins/quantaplugininterface.h36
-rw-r--r--quanta/project/eventconfigurationdlg.cpp38
-rw-r--r--quanta/project/eventconfigurationdlg.h6
-rw-r--r--quanta/project/eventeditordlg.cpp90
-rw-r--r--quanta/project/eventeditordlg.h24
-rw-r--r--quanta/project/membereditdlg.cpp42
-rw-r--r--quanta/project/membereditdlg.h6
-rw-r--r--quanta/project/project.cpp302
-rw-r--r--quanta/project/project.h82
-rw-r--r--quanta/project/projectlist.cpp30
-rw-r--r--quanta/project/projectlist.h18
-rw-r--r--quanta/project/projectnewfinal.cpp6
-rw-r--r--quanta/project/projectnewfinal.h2
-rw-r--r--quanta/project/projectnewgeneral.cpp68
-rw-r--r--quanta/project/projectnewgeneral.h14
-rw-r--r--quanta/project/projectnewlocal.cpp66
-rw-r--r--quanta/project/projectnewlocal.h6
-rw-r--r--quanta/project/projectnewweb.cpp78
-rw-r--r--quanta/project/projectnewweb.h18
-rw-r--r--quanta/project/projectprivate.cpp382
-rw-r--r--quanta/project/projectprivate.h78
-rw-r--r--quanta/project/projectupload.cpp168
-rw-r--r--quanta/project/projectupload.h40
-rw-r--r--quanta/project/projecturl.h16
-rw-r--r--quanta/project/rescanprj.cpp70
-rw-r--r--quanta/project/rescanprj.h12
-rw-r--r--quanta/project/teammembersdlg.cpp66
-rw-r--r--quanta/project/teammembersdlg.h10
-rw-r--r--quanta/project/uploadprofiles.cpp28
-rw-r--r--quanta/project/uploadprofiles.h26
-rw-r--r--quanta/src/dcopquanta.cpp34
-rw-r--r--quanta/src/dcopquanta.h6
-rw-r--r--quanta/src/dcopquantaif.h8
-rw-r--r--quanta/src/dcopsettings.cpp8
-rw-r--r--quanta/src/dcopsettings.h6
-rw-r--r--quanta/src/dcopsettingsif.h8
-rw-r--r--quanta/src/dcopwindowmanagerif.h30
-rw-r--r--quanta/src/document.cpp556
-rw-r--r--quanta/src/document.h140
-rw-r--r--quanta/src/dtds.cpp274
-rw-r--r--quanta/src/dtds.h36
-rw-r--r--quanta/src/kqapp.cpp32
-rw-r--r--quanta/src/kqapp.h2
-rw-r--r--quanta/src/main.cpp14
-rw-r--r--quanta/src/quanta.cpp960
-rw-r--r--quanta/src/quanta.h162
-rw-r--r--quanta/src/quanta_init.cpp830
-rw-r--r--quanta/src/quanta_init.h18
-rw-r--r--quanta/src/quantadoc.cpp68
-rw-r--r--quanta/src/quantadoc.h6
-rw-r--r--quanta/src/quantaview.cpp152
-rw-r--r--quanta/src/quantaview.h52
-rw-r--r--quanta/src/viewmanager.cpp112
-rw-r--r--quanta/src/viewmanager.h16
-rw-r--r--quanta/treeviews/basetreeview.cpp228
-rw-r--r--quanta/treeviews/basetreeview.h50
-rw-r--r--quanta/treeviews/docfolder.cpp34
-rw-r--r--quanta/treeviews/docfolder.h12
-rw-r--r--quanta/treeviews/docitem.cpp8
-rw-r--r--quanta/treeviews/docitem.h12
-rw-r--r--quanta/treeviews/doctreeview.cpp74
-rw-r--r--quanta/treeviews/doctreeview.h22
-rw-r--r--quanta/treeviews/filestreeview.cpp70
-rw-r--r--quanta/treeviews/filestreeview.h8
-rw-r--r--quanta/treeviews/newtemplatedirdlg.cpp8
-rw-r--r--quanta/treeviews/newtemplatedirdlg.h4
-rw-r--r--quanta/treeviews/projecttreeview.cpp112
-rw-r--r--quanta/treeviews/projecttreeview.h24
-rw-r--r--quanta/treeviews/scripttreeview.cpp114
-rw-r--r--quanta/treeviews/scripttreeview.h20
-rw-r--r--quanta/treeviews/servertreeview.cpp62
-rw-r--r--quanta/treeviews/servertreeview.h10
-rw-r--r--quanta/treeviews/structtreetag.cpp26
-rw-r--r--quanta/treeviews/structtreetag.h8
-rw-r--r--quanta/treeviews/structtreeview.cpp176
-rw-r--r--quanta/treeviews/structtreeview.h64
-rw-r--r--quanta/treeviews/tagattributeitems.cpp124
-rw-r--r--quanta/treeviews/tagattributeitems.h60
-rw-r--r--quanta/treeviews/tagattributetree.cpp108
-rw-r--r--quanta/treeviews/tagattributetree.h36
-rw-r--r--quanta/treeviews/templatestreeview.cpp270
-rw-r--r--quanta/treeviews/templatestreeview.h32
-rw-r--r--quanta/treeviews/uploadtreefile.cpp22
-rw-r--r--quanta/treeviews/uploadtreefile.h6
-rw-r--r--quanta/treeviews/uploadtreefolder.cpp28
-rw-r--r--quanta/treeviews/uploadtreefolder.h16
-rw-r--r--quanta/treeviews/uploadtreeview.cpp64
-rw-r--r--quanta/treeviews/uploadtreeview.h30
-rw-r--r--quanta/utility/newstuff.cpp22
-rw-r--r--quanta/utility/newstuff.h12
-rw-r--r--quanta/utility/qpevents.cpp64
-rw-r--r--quanta/utility/qpevents.h32
-rw-r--r--quanta/utility/quantabookmarks.cpp58
-rw-r--r--quanta/utility/quantabookmarks.h16
-rw-r--r--quanta/utility/quantacommon.cpp212
-rw-r--r--quanta/utility/quantacommon.h102
-rw-r--r--quanta/utility/quantanetaccess.cpp40
-rw-r--r--quanta/utility/quantanetaccess.h28
-rw-r--r--quanta/utility/resource.h18
-rw-r--r--quanta/utility/tagaction.cpp232
-rw-r--r--quanta/utility/tagaction.h40
-rw-r--r--quanta/utility/tagactionmanager.cpp8
-rw-r--r--quanta/utility/tagactionmanager.h10
-rw-r--r--quanta/utility/tagactionset.cpp74
-rw-r--r--quanta/utility/tagactionset.h36
-rw-r--r--quanta/utility/toolbartabwidget.cpp154
-rw-r--r--quanta/utility/toolbartabwidget.h50
-rw-r--r--quanta/utility/toolbarxmlgui.cpp2
-rw-r--r--quanta/utility/toolbarxmlgui.h2
299 files changed, 8161 insertions, 8161 deletions
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 <klineedit.h>
#include <kcombobox.h>
#include <kcolordialog.h>
-#include <qtooltip.h>
-#include <qiconset.h>
+#include <tqtooltip.h>
+#include <tqiconset.h>
#include <kiconloader.h>
#include <klocale.h>
#include <kaccel.h>
@@ -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 <kdebug.h>
-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 <kpushbutton.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#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 <qvbox.h>
-#include <qlabel.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -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("<b>" + l +"</b>",leftBox);
- QLabel *centerLabel = new QLabel(("<b>" + c +"</b>"),centerBox);
- QLabel *rightLabel = new QLabel(("<b>" + r +"</b>"),rightBox);
+ TQVBox *leftBox = new TQVBox(this);
+ TQVBox *centerBox = new TQVBox(this);
+ TQVBox *rightBox = new TQVBox(this);
+ TQLabel *leftLabel = new TQLabel("<b>" + l +"</b>",leftBox);
+ TQLabel *centerLabel = new TQLabel(("<b>" + c +"</b>"),centerBox);
+ TQLabel *rightLabel = new TQLabel(("<b>" + r +"</b>"),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 <qslider.h>
+#include <tqslider.h>
#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 <qlayout.h>
-#include <qtabwidget.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqfileinfo.h>
#include <kapplication.h>
#include <klocale.h>
@@ -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<myCheckListItem*>(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;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(cli,l.item(i).toElement().tagName());
- item->connect(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;i<l.length();i++) {
myCheckListItem *item = new myCheckListItem(lv,l.item(i).toElement().tagName());
- item->connect(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<myCheckListItem*>(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<myCheckListItem*>(lvVisual->findItem( "border-top",0 ))->setOn(true);
static_cast<myCheckListItem*>(lvVisual->findItem( "border-right",0 ))->setOn(true);
static_cast<myCheckListItem*>(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<QString,QString> expandedProperties = decompressor.expand(propertyName, propertyValue );
- QMap<QString,QString>::Iterator it;
+ TQMap<TQString,TQString> expandedProperties = decompressor.expand(propertyName, propertyValue );
+ TQMap<TQString,TQString>::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<myCheckListItem*>(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; i<valueTypes.length(); i++) {
- QDomElement curr =valueTypes.item(i).toElement();
- QString valueTypeName(curr.tagName());
+ TQDomElement curr =valueTypes.item(i).toElement();
+ TQString valueTypeName(curr.tagName());
if(valueTypeName =="list") {
m_ps->setComboBox();
- 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<QString,QString>::Iterator it;
+TQString CSSEditor::generateProperties(){
+ TQString props;
+ TQMap<TQString,TQString>::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<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::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<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::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<QString,QString>::Iterator it;
+ TQString toDisplay;
+ TQMap<TQString,TQString>::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 <qwidget.h>
+#include <tqwidget.h>
#include "csseditors.h"
-#include <qdom.h>
-#include <qmap.h>
-#include <qlistview.h>
-#include <qsignal.h>
+#include <tqdom.h>
+#include <tqmap.h>
+#include <tqlistview.h>
+#include <tqsignal.h>
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<QString,QString> m_properties;
- QString m_selectorName,
+ TQDomDocument m_doc;
+ TQMap<TQString,TQString> 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 <qlineedit.h>
+#include <tqlineedit.h>
#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 <qspinbox.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqspinbox.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
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 <qlineedit.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
-#include <qtextstream.h>
-#include <qtabwidget.h>
-#include <qobjectlist.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
+#include <tqtextstream.h>
+#include <tqtabwidget.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
#include <kstandarddirs.h>
#include <klocale.h>
@@ -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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(QString::null,++m_orderNumber);
+ QPair<TQString, unsigned int> 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<QString, unsigned int> tmp(m_currentStylesheetStructure[i->text(0)]);
+ QPair<TQString, unsigned int> 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<QListView*>(l->first());
+void CSSSelector::setCurrentListView(TQWidget* w){
+ TQObjectList *l = w->queryList( "TQListView" );
+ m_currentListView = static_cast<TQListView*>(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<QString, QPair<QString,unsigned int> >::Iterator it;
+ TQMap<TQString, QPair<TQString,unsigned int> >::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<QString,unsigned int> >::Iterator it;
- QString styleSection,tmpStr;
+TQString CSSSelector::generateFormattedStyleSection(){
+ TQMap< TQString,QPair<TQString,unsigned int> >::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 <qmap.h>
-#include <qpair.h>
+#include <tqmap.h>
+#include <tqpair.h>
#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<QString, QPair<QString,unsigned int> > m_currentStylesheetStructure;
+ TQMap<TQString, QPair<TQString,unsigned int> > 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 <qregexp.h>
+#include <tqregexp.h>
//#include <kdebug.h>
-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<m_propertyToParse.length() ){
@@ -70,39 +70,39 @@ QString CSSSHPropertyParser::extractQuotedStringList(){
return temp;
}
-QString CSSSHPropertyParser::extractURIList(){//extract things like url('...') or url("..") or url("..."), url(.....
+TQString CSSSHPropertyParser::extractURIList(){//extract things like url('...') or url("..") or url("..."), url(.....
//kdDebug(24000) << "\n\n\nextractURIList()\n\n\n";
- QRegExp URIListPattern("\\s*(url\\([\\W\\w]*\\))\\s*");
+ TQRegExp URIListPattern("\\s*(url\\([\\W\\w]*\\))\\s*");
URIListPattern.search(m_propertyToParse);
return URIListPattern.cap(1);
}
-QStringList CSSSHPropertyParser::parse(){
- QStringList tokenList;
+TQStringList CSSSHPropertyParser::parse(){
+ TQStringList tokenList;
bool stop = false;
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse);
while(!stop){
- QString temp;
+ TQString temp;
for(unsigned int i=0;i<m_propertyToParse.length() ;i++){
if(m_propertyToParse[i] == ' ') break;// tokens are delimited by a blank
temp+=m_propertyToParse[i];
}
if(temp.contains("url(") !=0 ){
- QString foundURIList = extractURIList();
+ TQString foundURIList = extractURIList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundURIList));
tokenList.append(foundURIList);
}
else
if(temp.contains("(")!=0){
- QString foundFunctionList = extractFunctionList();
+ TQString foundFunctionList = extractFunctionList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundFunctionList));
tokenList.append(foundFunctionList);
}
else
if(temp.contains("'")!=0 || temp.contains("\"")!=0 || temp.contains(",")!=0){
- QString foundQuotedStringList = extractQuotedStringList();
+ TQString foundQuotedStringList = extractQuotedStringList();
m_propertyToParse = removeBeginningWhiteSpaces(m_propertyToParse.remove(foundQuotedStringList));
tokenList.append(foundQuotedStringList);
}
diff --git a/quanta/components/csseditor/cssshpropertyparser.h b/quanta/components/csseditor/cssshpropertyparser.h
index dd95eb39..fe7f8031 100644
--- a/quanta/components/csseditor/cssshpropertyparser.h
+++ b/quanta/components/csseditor/cssshpropertyparser.h
@@ -23,24 +23,24 @@
/**
@author Gulmini Luciano
*/
-#include <qstringlist.h>
+#include <tqstringlist.h>
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 <qcombobox.h>
+ #include <tqcombobox.h>
#include "csseditor_globals.h"
#include "propertysetter.h"
- #include <qregexp.h>
+ #include <tqregexp.h>
-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 <kglobal.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
/**
*@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 <qcombobox.h>
+#include <tqcombobox.h>
/**
*@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 <qfontdatabase.h>
-#include <qstringlist.h>
-#include <qlistbox.h>
-#include <qfont.h>
+#include <tqfontdatabase.h>
+#include <tqstringlist.h>
+#include <tqlistbox.h>
+#include <tqfont.h>
#include <klocale.h>
-#include <qiconset.h>
-#include <qpixmap.h>
+#include <tqiconset.h>
+#include <tqpixmap.h>
#include <kiconloader.h>
#include <kpushbutton.h>
#include <kglobalsettings.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include<kdebug.h>
-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 <qmap.h>
+#include <tqmap.h>
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<QString,FontOrigin> m_selectedFontMap;
+ TQMap<TQString,FontOrigin> 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 <qhbox.h>
+#include <tqhbox.h>
/**
*@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 <qhbox.h>
-#include <qptrlist.h>
+#include <tqhbox.h>
+#include <tqptrlist.h>
#include "doubleeditors.h"
-#include <qcombobox.h>
-#include <qslider.h>
+#include <tqcombobox.h>
+#include <tqslider.h>
#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 <qlineedit.h>
-#include <qcombobox.h>
-#include <qspinbox.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qvbox.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
#include <kpushbutton.h>
#include <kdebug.h>
@@ -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 <qhbox.h>
-#include <qptrlist.h>
-#include <qcombobox.h>
+#include <tqhbox.h>
+#include <tqptrlist.h>
+#include <tqcombobox.h>
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<QWidget> m_list;
- QComboBox *m_cb;
+ TQPtrList<TQWidget> 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 <qregexp.h>
-QMyHighlighter::QMyHighlighter(QTextEdit* Qtxt):QSyntaxHighlighter(Qtxt){
+#include <tqregexp.h>
+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 <qsyntaxhighlighter.h>
+#include <tqsyntaxhighlighter.h>
/**
*@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 <qstringlist.h>
+#include <tqstringlist.h>
#include "cssshpropertyparser.h"
#include <kdebug.h>
#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<QString,QString> m){
+ShorthandFormer::ShorthandFormer( TQMap<TQString,TQString> m){
m_properties = m;
if(m_properties.contains("cue-after")){
@@ -218,8 +218,8 @@ ShorthandFormer::ShorthandFormer( QMap<QString,QString> 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<QString,QString>::Iterator it;
+ TQMap<TQString,TQString>::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<QString,QString> ShorthandFormer::expand( const QString& propertyName, const QString& propertyValue ){
+TQMap<TQString,TQString> 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<QString,QString> 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<QString,QString>();//dummy instruction avoiding a pedantic warning; can never be reached
+ return TQMap<TQString,TQString>();//dummy instruction avoiding a pedantic warning; can never be reached
}
-QMap<QString,QString> ShorthandFormer::expandCueProp(const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandCueProp(const TQStringList& l){
return expandImplementation("cue",l);
}
-QMap<QString,QString> ShorthandFormer::expandPauseProp(const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandPauseProp(const TQStringList& l){
return expandImplementation("pause",l);
}
-QMap<QString,QString> ShorthandFormer::expandImplementation(const QString& propertyName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandImplementation(const TQString& propertyName, const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
if( l.count()==1) {
expandedProps[propertyName + "-before"] = l[0] ;
expandedProps[propertyName + "-after"] = l[0] ;
@@ -502,8 +502,8 @@ QMap<QString,QString> ShorthandFormer::expandImplementation(const QString& prop
}
}
-QMap<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandBackgroundProp(const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> 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<QString,QString> ShorthandFormer::expandBackgroundProp(const QStringList&
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBox(const QString& subPropName, const QStringList& l){
+TQMap<TQString,TQString> ShorthandFormer::expandBox(const TQString& subPropName, const TQStringList& l){
- QMap<QString,QString> expandedProps;
+ TQMap<TQString,TQString> expandedProps;
expandedProps["border-top-" + subPropName] = l[0];
switch(l.count()){
case 1 :
@@ -576,14 +576,14 @@ QMap<QString,QString> ShorthandFormer::expandBox(const QString& subPropName, co
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandFontProp(const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> 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<QString,QString> ShorthandFormer::expandFontProp(const QStringList& l){
}
}
-QMap<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandListstyleProp( const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
if( (l.count() == 1) && (l[0] == "inherit")){
expandedProps["list-style-image"] ="inherit";
expandedProps["list-style-type"] ="inherit";
@@ -637,9 +637,9 @@ QMap<QString,QString> 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<QString,QString> ShorthandFormer::expandListstyleProp( const QStringList& l
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandOutlineProp( const QStringList& l){
- QMap<QString,QString> expandedProps;
- QStringList::ConstIterator it = l.begin();
+TQMap<TQString,TQString> ShorthandFormer::expandOutlineProp( const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> ShorthandFormer::expandOutlineProp( const QStringList& l)
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBoxSide(const QString& subPropName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandBoxSide(const TQString& subPropName, const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> ShorthandFormer::expandBoxSide(const QString& subPropName
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandBorderProp(const QStringList& l){
- QMap<QString,QString> expandedProps;
- QStringList::ConstIterator it = l.begin();
+TQMap<TQString,TQString> ShorthandFormer::expandBorderProp(const TQStringList& l){
+ TQMap<TQString,TQString> 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<QString,QString> ShorthandFormer::expandBorderProp(const QStringList& l){
return expandedProps;
}
-QMap<QString,QString> ShorthandFormer::expandImplementation2(const QString& propertyName, const QStringList& l){
- QMap<QString,QString> expandedProps;
+TQMap<TQString,TQString> ShorthandFormer::expandImplementation2(const TQString& propertyName, const TQStringList& l){
+ TQMap<TQString,TQString> expandedProps;
expandedProps[ propertyName + "-top" ] = l[0];
switch(l.count()){
case 1 :
@@ -750,16 +750,16 @@ QMap<QString,QString> ShorthandFormer::expandImplementation2(const QString& prop
return expandedProps;
}
- QMap<QString,QString> ShorthandFormer::expandPaddingProp(const QStringList& l){
+ TQMap<TQString,TQString> ShorthandFormer::expandPaddingProp(const TQStringList& l){
return expandImplementation2("padding", l);
}
- QMap<QString,QString> ShorthandFormer::expandMarginProp(const QStringList& l){
+ TQMap<TQString,TQString> 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 <qmap.h>
+#include <tqmap.h>
class QString;
class QStringList;
class ShorthandFormer{
public:
ShorthandFormer(){}
- ShorthandFormer( QMap<QString,QString> m );
+ ShorthandFormer( TQMap<TQString,TQString> m );
~ShorthandFormer(){}
- QString compress();
- QMap<QString,QString> expand(const QString& propertyName, const QString& propertyValue);
- static QStringList SHFormList();
+ TQString compress();
+ TQMap<TQString,TQString> expand(const TQString& propertyName, const TQString& propertyValue);
+ static TQStringList SHFormList();
private:
- QMap<QString,QString> m_properties;
- QString cue_after,
+ TQMap<TQString,TQString> 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<QString,QString> expandCueProp(const QStringList& l);
- QMap<QString,QString> expandPauseProp(const QStringList& l);
- QMap<QString,QString> expandBackgroundProp(const QStringList& l);
- QMap<QString,QString> expandFontProp(const QStringList& l);
- QMap<QString,QString> expandOutlineProp(const QStringList& l);
- QMap<QString,QString> expandListstyleProp(const QStringList& l);
- QMap<QString,QString> expandBoxSide(const QString& subPropName, const QStringList& l);
- QMap<QString,QString> expandBorderProp(const QStringList& l);
- QMap<QString,QString> expandBox(const QString& subPropName, const QStringList& l);
- QMap<QString,QString> expandPaddingProp(const QStringList& l);
- QMap<QString,QString> expandMarginProp(const QStringList& l);
+ TQMap<TQString,TQString> expandCueProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandPauseProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBackgroundProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandFontProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandOutlineProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandListstyleProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBoxSide(const TQString& subPropName, const TQStringList& l);
+ TQMap<TQString,TQString> expandBorderProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandBox(const TQString& subPropName, const TQStringList& l);
+ TQMap<TQString,TQString> expandPaddingProp(const TQStringList& l);
+ TQMap<TQString,TQString> expandMarginProp(const TQStringList& l);
- QMap<QString,QString> expandImplementation(const QString& propertyName, const QStringList& l);
- QMap<QString,QString> expandImplementation2(const QString& propertyName, const QStringList& l);
+ TQMap<TQString,TQString> expandImplementation(const TQString& propertyName, const TQStringList& l);
+ TQMap<TQString,TQString> 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 <klineedit.h>
-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; i<m_cb->count();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 <qcombobox.h>
+#include <tqcombobox.h>
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 <qlineedit.h>
-#include <qtooltip.h>
-#include <qiconset.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
+#include <tqiconset.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
//kde includes
#include <kdialog.h>
@@ -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 <klocale.h>
#include <kdebug.h>
-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<m_styleSheet.length();i++){
- QString temp;
+ TQString temp;
if(m_styleSheet[i] == ' ' || m_styleSheet[i] == '\n' || m_styleSheet[i] == '\t' )
ws++;
else break;
@@ -63,7 +63,7 @@ void stylesheetParser::parseComment(){
bool stopProcessingComment=false;
unsigned int k;
for(k=2;k<m_styleSheet.length()-1;k++){
- QString temp;
+ TQString temp;
temp.append(m_styleSheet[k]).append(m_styleSheet[k+1]);
if(temp=="*/") {
k+=2;
@@ -74,8 +74,8 @@ void stylesheetParser::parseComment(){
if(stopProcessingComment){
int ws=whiteSpaces(k);
- QPair<QString,unsigned int> tmp(m_styleSheet.left(k+ws),++m_orderNumber);
- m_stylesheetStructure["/*"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> 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<QString,unsigned int> tmp(selectorValue,++m_orderNumber);
+ QPair<TQString,unsigned int> 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<QString,unsigned int> tmp(m_styleSheet.left(closingParenthesisPos+1+ws),++m_orderNumber);
- m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> 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<QString,unsigned int> tmp(m_styleSheet.left(semicolonPos+1+ws),++m_orderNumber);
- m_stylesheetStructure["@rule"+QString::number(m_orderNumber,10)]=tmp;
+ QPair<TQString,unsigned int> 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 <qmap.h>
-#include <qpair.h>
-#include <qobject.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqobject.h>
/**
*@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<QString, QPair<QString,unsigned int> > m_stylesheetStructure;
+ TQMap<TQString, QPair<TQString,unsigned int> > 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<QString, QPair<QString,unsigned int> > stylesheetStructure() { return m_stylesheetStructure; }
+ TQMap<TQString, QPair<TQString,unsigned int> > 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 <qlineedit.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kpushbutton.h>
#include <kurl.h>
@@ -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 <qfile.h>
-#include <qfileinfo.h>
-#include <qradiobutton.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqradiobutton.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
//kde includes
#include <kaction.h>
@@ -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("<qt>Remove the following files from the repository?<br>This will remove your <b>working copy</b> as well.</qt>"), 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 <qobject.h>
+#include <tqobject.h>
//kde includes
#include <dcopref.h>
@@ -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 <qstring.h>
+#include <tqstring.h>
#include <dcopobject.h>
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<BacktraceListviewItem*>(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 <klistview.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#include <qextfileinfo.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kcombobox.h>
#include <kled.h>
#include <kiconloader.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
#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 <klocale.h>
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 <ktextbrowser.h>
-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 <qcstring.h>
+#include <tqcstring.h>
#include <kmdcodec.h>
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 <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
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 <kmdcodec.h>
#include <kmessagebox.h>
#include <krun.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qslider.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqslider.h>
+#include <tqstring.h>
#include <stdarg.h>
@@ -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<QString>::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it)
+ for(TQValueList<TQString>::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<QString>::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it)
+ for(TQValueList<TQString>::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 )
{
/*
<map name="bool" type="bool" xsi:type="xsd:boolean"></map>
@@ -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
</property>
</property>
*/
- 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<DebuggerVariable> vars ;
+ TQDomNode child = variablenode.firstChild();
+ TQPtrList<DebuggerVariable> 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 <kserversocket.h>
#include <kstreamsocket.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "debuggerclient.h"
#include "dbgpnetwork.h"
-typedef QValueList<QString> WatchList;
-typedef QMap<QString, QString> StringMap;
+typedef TQValueList<TQString> WatchList;
+typedef TQMap<TQString, TQString> 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 <qstring.h>
+#include <tqstring.h>
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 <qobject.h>
+#include <tqobject.h>
#include <ktexteditor/markinterfaceextension.h>
#include <kdebug.h>
@@ -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 <qobject.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
class DebuggerBreakpoint;
- typedef QValueList<DebuggerBreakpoint*> BreakpointList_t;
+ typedef TQValueList<DebuggerBreakpoint*> 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<DebuggerBreakpointViewItem*>(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 <klistview.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#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 <kmessagebox.h>
#include <qextfileinfo.h>
#include <kinputdialog.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#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<DebuggerClient>(service, this, 0, QStringList(), &errCode);
- QObject* obj = KParts::ComponentFactory::createInstanceFromService<QObject>(service, this, 0, QStringList(), &errCode);
+// m_client = KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(service, this, 0, TQStringList(), &errCode);
+ TQObject* obj = KParts::ComponentFactory::createInstanceFromService<TQObject>(service, this, 0, TQStringList(), &errCode);
if (obj && obj->inherits("DebuggerClient"))
m_client = static_cast<DebuggerClient *>(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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
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 <kdockwidget.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <khtmlview.h>
#include <kmditoolviewaccessor.h>
#include <kstatusbar.h>
@@ -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 <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kmditoolviewaccessor.h>
#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 <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <klistview.h>
namespace DebuggerVariableTypes
@@ -41,38 +41,38 @@ namespace DebuggerVariableTypes
}
class DebuggerVariable;
-typedef QPtrList<DebuggerVariable> ValueList_t;
+typedef TQPtrList<DebuggerVariable> 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 <ktextbrowser.h>
-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 <kstreamsocket.h>
#include <klocale.h>
#include <kgenericfactory.h>
-#include <qlineedit.h>
-#include <qslider.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqlineedit.h>
+#include <tqslider.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <kdeversion.h>
#include <errno.h>
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
#include <stdarg.h>
@@ -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<QString>::iterator it = m_watchlist.begin(); it != m_watchlist.end(); ++it)
+ for(TQValueList<TQString>::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<DebuggerVariable> vars ;
+ TQPtrList<DebuggerVariable> 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<DebuggerVariable> vars ;
+ TQPtrList<DebuggerVariable> 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 <kserversocket.h>
#include <kstreamsocket.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "debuggerclient.h"
-typedef QValueList<QString> WatchList;
-typedef QMap<QString, QString> StringMap;
+typedef TQValueList<TQString> WatchList;
+typedef TQMap<TQString, TQString> 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 <qserversocket.h>
-#include <qobject.h>
+#include <tqserversocket.h>
+#include <tqobject.h>
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
#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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kurl.h>
#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 <kdebug.h>
#include <klocale.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <qextfileinfo.h>
-#include <qdom.h>
+#include <tqdom.h>
-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 <qobject.h>
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
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 <qlistview.h>
-#include <qlineedit.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
#include <qextfileinfo.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kled.h>
-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<DebuggerManager*>(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 <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#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 <kiconloader.h>
#include <kdeversion.h>
#include <kinputdialog.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
// 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<DebuggerVariable> oldlist = oldvar->values();
+ TQPtrList<DebuggerVariable> oldlist = oldvar->values();
for(DebuggerVariable* oldchild = oldlist.last(); oldchild; oldchild = oldlist.prev())
{
bool found = false;
- QPtrList<DebuggerVariable> newlist = newvar->values();
+ TQPtrList<DebuggerVariable> 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<DebuggerVariable> newlist = newvar->values();
+ TQPtrList<DebuggerVariable> newlist = newvar->values();
for(DebuggerVariable* newchild = newlist.last(); newchild; newchild = newlist.prev())
{
bool found = false;
- QPtrList<DebuggerVariable> oldlist = oldvar->values();
+ TQPtrList<DebuggerVariable> 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 <klistview.h>
#include <kpopupmenu.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
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<DebuggerVariable> m_variablesList;
+ TQPtrList<DebuggerVariable> 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 <qrect.h>
-#include <qmap.h>
-#include <qobject.h>
+#include <tqrect.h>
+#include <tqmap.h>
+#include <tqobject.h>
/**this is
*@author gulmini luciano
*/
@@ -28,22 +28,22 @@ class areaAttribute : public QObject{
Q_OBJECT
private:
- QRect m_geometry;
- QMap<QString,QString> m_attributeMap; //tag specific attributes
+ TQRect m_geometry;
+ TQMap<TQString,TQString> m_attributeMap; //tag specific attributes
public:
areaAttribute();
~areaAttribute(){};
- void setAttribute(const QString& name, const QString& value){ m_attributeMap[name] = value; }
- void setAllAttributes(QMap<QString,QString> map){ m_attributeMap = map; }
+ void setAttribute(const TQString& name, const TQString& value){ m_attributeMap[name] = value; }
+ void setAllAttributes(TQMap<TQString,TQString> 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<QString,QString> 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<TQString,TQString> 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 <qspinbox.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qregexp.h>
+#include <tqspinbox.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqregexp.h>
#include <kurlrequester.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kfiledialog.h>
#include <klocale.h>
//#include <kpreviewwidgetbase.h>
@@ -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<QString,QString> m){
+void fmFPeditor::setup(TQMap<TQString,TQString> m){
leId->setText(m["id"]);
fc->setURL(m["src"]);
leClass->setText(m["class"]);
@@ -89,8 +89,8 @@ void fmFPeditor::setup(QMap<QString,QString> m){
sbTop->setValue(m["marginheight"].toInt());
}
-QMap<QString,QString> fmFPeditor::attributeMap(){
- QMap<QString,QString> map;
+TQMap<TQString,TQString> fmFPeditor::attributeMap(){
+ TQMap<TQString,TQString> map;
map["name"] = leName->text();
map["longdesc"] = leLongdesc->text();
@@ -102,8 +102,8 @@ QMap<QString,QString> 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<QString,QString>);
- QMap<QString,QString> attributeMap();
+ void setup(TQMap<TQString,TQString>);
+ TQMap<TQString,TQString> 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 <qspinbox.h>
-#include <qlabel.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
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 <kmessagebox.h>
//#include <kdebug.h>
#include <klocale.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#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 <qframe.h>
+#include <tqframe.h>
//#include <kdebug.h>
#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 <qwidget.h>
+//#include <tqwidget.h>
#include <khtml_part.h>
#include <khtmlview.h>
-/**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<treeNode> it( m_childrenList );
+treeNode* treeNode::findChild(const TQString &l){
+ TQPtrListIterator<treeNode> 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<treeNode> list = n->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list = n->childrenList();
+ TQPtrListIterator<treeNode> 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 <qptrlist.h>
-#include <qdict.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
#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<treeNode> m_childrenList;
+ TQPtrList<treeNode> 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<treeNode> childrenList() { return m_childrenList; }
+ TQPtrList<treeNode> 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<treeNode> m_nodeList;
+ TQDict<treeNode> 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 <qobjectlist.h>
-#include <qsplitter.h>
+#include <tqobjectlist.h>
+#include <tqsplitter.h>
//#include <kdebug.h>
#include "qextfileinfo.h"
@@ -28,13 +28,13 @@ static int cancelledPixels(int n){
return (n-1)*6;
}
-QMap<QString, QValueList< int > > SIZES;
+TQMap<TQString, TQValueList< int > > 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<treeNode> list=m_internalTree->findNode(l)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQRect newGeometry(m_internalTree->findNode(l)->atts()->geometry());
+ TQPtrList<treeNode> list=m_internalTree->findNode(l)->childrenList();
+ TQPtrListIterator<treeNode> 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("</frameset>");//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("<frameset")) {
if(line.contains("rows")) {
split(parent,(line.contains(",")+1),HORIZONTAL);
- QRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
+ TQRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
pattern.search(line);
- QRect dummy=m_internalTree->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<treeNode> list=m_internalTree->findNode(parent)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ TQPtrListIterator<treeNode> 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<treeNode> list=m_internalTree->findNode(parent)->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list=m_internalTree->findNode(parent)->childrenList();
+ TQPtrListIterator<treeNode> 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<QString,QString> attributeMap;
- if( line.contains( QRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize";
- else attributeMap["noresize"] = QString::null;
+ TQMap<TQString,TQString> 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<QString,QString> map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap();
+ TQMap<TQString,TQString> 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<treeNode> list = m_internalTree->findNode(parentLabel)->firstChild()->childrenList();
+ TQPtrList<treeNode> 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<QSplitter *>(parent)->setResizeMode(sa->view(),QSplitter::KeepSize );
+ if(parent->isA("TQSplitter")) dynamic_cast<TQSplitter *>(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="<frame",
+ TQString tagBegin="<frame",
tagEnd,
tagMiddle;
@@ -362,9 +362,9 @@ QString VisualFrameEditor::createFrameTag(areaAttribute *a){
return tagBegin+tagMiddle+tagEnd;
}
-QString VisualFrameEditor::RCvalue(treeNode *n) {
- QString s;
- QMap<int,int> dimMap;
+TQString VisualFrameEditor::RCvalue(treeNode *n) {
+ TQString s;
+ TQMap<int,int> 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("<frameset")) tabNum++;
else
if((*it).contains("</frameset>")) {
@@ -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 <qhbox.h>
+#include <tqhbox.h>
/**
*@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 <ktexteditor/editinterface.h>
//qt includes
-#include <qcheckbox.h>
-#include <qiconset.h>
-#include <qlineedit.h>
-#include <qobject.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qspinbox.h>
-#include <qstring.h>
-#include <qtabwidget.h>
-#include <qvaluevector.h>
+#include <tqcheckbox.h>
+#include <tqiconset.h>
+#include <tqlineedit.h>
+#include <tqobject.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
+#include <tqtabwidget.h>
+#include <tqvaluevector.h>
//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<QValueList<TableNode> >;
- m_tableHeaderTags = new QValueList<QValueList<TableNode> >;
- m_tableFooterTags = new QValueList<QValueList<TableNode> >;
+ m_tableDataTags = new TQValueList<TQValueList<TableNode> >;
+ m_tableHeaderTags = new TQValueList<TQValueList<TableNode> >;
+ m_tableFooterTags = new TQValueList<TQValueList<TableNode> >;
m_tableTags = 0L;
- m_tableDataRows = new QValueList<TableNode>;
- m_tableHeaderRows = new QValueList<TableNode>;
- m_tableFooterRows = new QValueList<TableNode>;
+ m_tableDataRows = new TQValueList<TableNode>;
+ m_tableHeaderRows = new TQValueList<TableNode>;
+ m_tableFooterRows = new TQValueList<TableNode>;
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<TableNode> tableRowTags;
- QValueVector< QValueVector<TableNode> > mergeMatrix;
+ TQValueList<TableNode> tableRowTags;
+ TQValueVector< TQValueVector<TableNode> > 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 += "</" + QuantaCommon::tagCase("caption") + ">";
}
- for (QValueList<Tag*>::Iterator it = m_colTags.begin(); it != m_colTags.end(); ++it) {
+ for (TQValueList<Tag*>::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 += "</" + QuantaCommon::tagCase(node->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("<tr>", m_write);
- QValueList<TableNode>::Iterator rowIt = m_tableRows->at(num);
+ TQValueList<TableNode>::Iterator rowIt = m_tableRows->at(num);
if (rowIt != m_tableRows->end())
m_tableRows->insert(rowIt, tableNode);
else
m_tableRows->append(tableNode);
- QValueList<TableNode> tableRowTags;
+ TQValueList<TableNode> 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<QValueList<TableNode> >::Iterator it = m_tableTags->at(num);
+ TQValueList<TQValueList<TableNode> >::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
j = 0;
- for (QValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
+ for (TQValueList<TableNode>::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<TableNode*> updatedMainNodes;
- QValueList<QValueList<TableNode> >::Iterator it2 = m_tableTags->at(m_row);
- for (QValueList<TableNode>::Iterator it3 = (*it2).begin(); it3 != (*it2).end(); ++it3) {
+ TQValueList<TableNode*> updatedMainNodes;
+ TQValueList<TQValueList<TableNode> >::Iterator it2 = m_tableTags->at(m_row);
+ for (TQValueList<TableNode>::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<TableNode>::Iterator it = m_tableRows->at(m_row);
+ TQValueList<TableNode>::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
j = 0;
- for (QValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
+ for (TQValueList<TableNode>::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<TableNode*> updatedMainNodes;
- for (QValueList<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
- QValueList<TableNode>::Iterator it2 = (*it).at(m_col);
+ TQValueList<TableNode*> updatedMainNodes;
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ TQValueList<TableNode>::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<TableNode> *table )
+void TableEditor::deleteList( TQValueList<TableNode> *table )
{
- for (QValueList<TableNode>::Iterator it = table->begin(); it != table->end(); ++it) {
+ for (TQValueList<TableNode>::Iterator it = table->begin(); it != table->end(); ++it) {
Node::deleteNode((*it).node);
newNum--;
}
@@ -1029,10 +1029,10 @@ void TableEditor::deleteList( QValueList<TableNode> *table )
}
-void TableEditor::deleteMatrix( QValueList<QValueList<TableNode> > *matrix )
+void TableEditor::deleteMatrix( TQValueList<TQValueList<TableNode> > *matrix )
{
- for (QValueList<QValueList<TableNode> >::Iterator it = matrix->begin(); it != matrix->end(); ++it) {
- for (QValueList<TableNode>::Iterator it2 = (*it).begin(); it2 != (*it).end(); ++it2) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = matrix->begin(); it != matrix->end(); ++it) {
+ for (TQValueList<TableNode>::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<QValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
+ for (TQValueList<TQValueList<TableNode> >::Iterator it = m_tableTags->begin(); it != m_tableTags->end(); ++it) {
j = 0;
- QValueList<TableNode>::Iterator it2 = (*it).begin();
+ TQValueList<TableNode>::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<QValueList<TableNode> >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow);
- QValueList<TableNode>::Iterator iter2 = (*iter1).at(tableNode.mergedCol);
+ TQValueList<TQValueList<TableNode> >::Iterator iter1 = m_tableTags->at(tableNode.mergedRow);
+ TQValueList<TableNode>::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<NestedTable>::Iterator errorIt;
+ TQValueList<NestedTable>::Iterator errorIt;
Parser *localParser = 0L;
Document *w = 0L;
Node *savedBaseNode = 0L;
NestedTable table;
- for (QValueList<NestedTable>::Iterator it = m_nestedTables.begin(); it != m_nestedTables.end(); ++it) {
+ for (TQValueList<NestedTable>::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 <kurl.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#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<Tag*> m_colTags;
+ TQValueList<Tag*> m_colTags;
int m_unmergeCellsId;
int m_mergeSeparatorId;
int m_mergeCellsId;
bool m_createNodes;
- QValueList<QValueList<TableNode> > *m_tableTags;
- QValueList<QValueList<TableNode> > *m_tableFooterTags;
- QValueList<QValueList<TableNode> > *m_tableHeaderTags;
- QValueList<TableNode> *m_tableFooterRows;
- QValueList<TableNode> *m_tableHeaderRows;
- QValueList<TableNode> *m_tableRows;
+ TQValueList<TQValueList<TableNode> > *m_tableTags;
+ TQValueList<TQValueList<TableNode> > *m_tableFooterTags;
+ TQValueList<TQValueList<TableNode> > *m_tableHeaderTags;
+ TQValueList<TableNode> *m_tableFooterRows;
+ TQValueList<TableNode> *m_tableHeaderRows;
+ TQValueList<TableNode> *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<QValueList<TableNode> > *m_tableDataTags;
- QValueList<TableNode> *m_tableDataRows;
- QTable *m_dataTable;
- QSpinBox *m_rowSpin;
- QSpinBox *m_colSpin;
+ TQValueList<TQValueList<TableNode> > *m_tableDataTags;
+ TQValueList<TableNode> *m_tableDataRows;
+ TQTable *m_dataTable;
+ TQSpinBox *m_rowSpin;
+ TQSpinBox *m_colSpin;
int m_bLine, m_bCol, m_eLine, m_eCol;
- QValueList<NestedTable> m_nestedTables;
+ TQValueList<NestedTable> 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<TableNode> * table );
- virtual void deleteMatrix( QValueList<QValueList<TableNode> > * 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<TableNode> * table );
+ virtual void deleteMatrix( TQValueList<TQValueList<TableNode> > * 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 <qtextedit.h>
-#include <qpainter.h>
+#include <tqtextedit.h>
+#include <tqpainter.h>
#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 <qtable.h>
+#include <tqtable.h>
#include <kdeversion.h>
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;}
diff --git a/quanta/dialogs/actionconfigdialog.cpp b/quanta/dialogs/actionconfigdialog.cpp
index 9a4cfb3d..a66f7499 100644
--- a/quanta/dialogs/actionconfigdialog.cpp
+++ b/quanta/dialogs/actionconfigdialog.cpp
@@ -13,16 +13,16 @@
***************************************************************************/
//qt includes
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qmultilineedit.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qregexp.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqmultilineedit.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqregexp.h>
//kde includes
#include <kapplication.h>
@@ -50,7 +50,7 @@
#include "tagaction.h"
#include "toolbartabwidget.h"
-ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const QString& defaultAction )
+ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const TQString& defaultAction )
:ActionConfigDialogS( parent, name, modal, fl )
{
m_mainWindow = parent;
@@ -63,28 +63,28 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K
currentAction = 0L;
m_toolbarItem = 0L;
- connect(actionTreeView, SIGNAL(contextMenu(KListView *,QListViewItem *,const QPoint &)),
- SLOT(slotContextMenu(KListView *,QListViewItem *,const QPoint &)));
- connect(actionTreeView, SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(slotSelectionChanged(QListViewItem *)));
- connect(shortcutKeyButton, SIGNAL(capturedShortcut(const KShortcut &)),
- SLOT(slotShortcutCaptured(const KShortcut &)));
- connect(scriptPath, SIGNAL(activated(const QString&)),
- SLOT(slotTextChanged(const QString&)));
- connect(this, SIGNAL(addToolbar()), m_mainWindow, SLOT(slotAddToolbar()));
- connect(this, SIGNAL(removeToolbar(const QString&)), m_mainWindow, SLOT(slotRemoveToolbar(const QString&)));
- connect(this, SIGNAL(deleteUserAction(KAction*)), m_mainWindow, SLOT(slotDeleteAction(KAction*)));
- connect(this, SIGNAL(configureToolbars(const QString&)), m_mainWindow, SLOT(slotConfigureToolbars(const QString&)));
+ connect(actionTreeView, TQT_SIGNAL(contextMenu(KListView *,TQListViewItem *,const TQPoint &)),
+ TQT_SLOT(slotContextMenu(KListView *,TQListViewItem *,const TQPoint &)));
+ connect(actionTreeView, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ TQT_SLOT(slotSelectionChanged(TQListViewItem *)));
+ connect(shortcutKeyButton, TQT_SIGNAL(capturedShortcut(const KShortcut &)),
+ TQT_SLOT(slotShortcutCaptured(const KShortcut &)));
+ connect(scriptPath, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotTextChanged(const TQString&)));
+ connect(this, TQT_SIGNAL(addToolbar()), m_mainWindow, TQT_SLOT(slotAddToolbar()));
+ connect(this, TQT_SIGNAL(removeToolbar(const TQString&)), m_mainWindow, TQT_SLOT(slotRemoveToolbar(const TQString&)));
+ connect(this, TQT_SIGNAL(deleteUserAction(KAction*)), m_mainWindow, TQT_SLOT(slotDeleteAction(KAction*)));
+ connect(this, TQT_SIGNAL(configureToolbars(const TQString&)), m_mainWindow, TQT_SLOT(slotConfigureToolbars(const TQString&)));
//fill up the tree view with the toolbars and actions
actionTreeView->setSorting(-1);
allActionsItem = new KListViewItem(actionTreeView, i18n("All"));
actionTreeView->insertItem(allActionsItem);
- QListViewItem *item, *oldItem = allActionsItem;
+ TQListViewItem *item, *oldItem = allActionsItem;
KAction *action;
- QString toolbarName;
- QString toolbarId;
+ TQString toolbarName;
+ TQString toolbarId;
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QRegExp r("\\&(?!\\&)");
+ TQRegExp r("\\&(?!\\&)");
KActionCollection *ac = m_mainWindow->actionCollection();
for (int i = 0; i < tb->count(); i++)
{
@@ -94,11 +94,11 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K
actionTreeView->insertItem(item);
toolbarId = tb->id(i);
- QListViewItem *oldActionItem = 0L;
+ TQListViewItem *oldActionItem = 0L;
ToolbarEntry *p_toolbar = m_toolbarList[toolbarId];
if (p_toolbar)
{
- QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
+ TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
@@ -122,7 +122,7 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K
actionTreeView->setCurrentItem(item->firstChild());
} else
{
- QListViewItem *actionItem = item->firstChild();
+ TQListViewItem *actionItem = item->firstChild();
while (actionItem && actionItem->depth() > 0)
{
if (actionItem->text(0) == defaultAction || actionItem->text(0) == defaultAction + "...")
@@ -148,9 +148,9 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K
allActionsItem->sortChildItems(0, true);
treeMenu = new KPopupMenu(actionTreeView);
- treeMenu->insertItem(i18n("&Add New Toolbar"), this, SLOT(slotAddToolbar()));
- treeMenu->insertItem(i18n("&Remove Toolbar"), this, SLOT(slotRemoveToolbar()));
- treeMenu->insertItem(i18n("&Edit Toolbar"), this, SLOT(slotEditToolbar()));
+ treeMenu->insertItem(i18n("&Add New Toolbar"), this, TQT_SLOT(slotAddToolbar()));
+ treeMenu->insertItem(i18n("&Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar()));
+ treeMenu->insertItem(i18n("&Edit Toolbar"), this, TQT_SLOT(slotEditToolbar()));
globalShortcuts = KGlobal::config()->entryMap( "Global Shortcuts" );
}
@@ -162,8 +162,8 @@ ActionConfigDialog::~ActionConfigDialog()
void ActionConfigDialog::slotAddToolbar()
{
emit addToolbar();
- QString toolbarName;
- QListViewItem *item;
+ TQString toolbarName;
+ TQListViewItem *item;
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
for (int i = 0; i < tb->count(); i++)
{
@@ -181,8 +181,8 @@ void ActionConfigDialog::slotAddToolbar()
void ActionConfigDialog::slotRemoveToolbar()
{
- QListViewItem *item = actionTreeView->currentItem();
- QString s = item->text(0);
+ TQListViewItem *item = actionTreeView->currentItem();
+ TQString s = item->text(0);
if (item->parent())
{
item = item->parent();
@@ -190,29 +190,29 @@ void ActionConfigDialog::slotRemoveToolbar()
}
if (s != i18n("All"))
{
- if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").arg(s),QString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").arg(s),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue )
{
m_toolbarItem = item;
- connect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), SLOT(slotToolbarRemoved(const QString&)));
+ connect(m_mainWindow, TQT_SIGNAL(toolbarRemoved(const TQString&)), TQT_SLOT(slotToolbarRemoved(const TQString&)));
emit removeToolbar(s.lower());
}
}
}
-void ActionConfigDialog::slotToolbarRemoved(const QString &/*name*/)
+void ActionConfigDialog::slotToolbarRemoved(const TQString &/*name*/)
{
actionTreeView->setCurrentItem(allActionsItem);
delete m_toolbarItem;
m_toolbarItem = 0L;
- disconnect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), this, SLOT(slotToolbarRemoved(const QString&)));
+ disconnect(m_mainWindow, TQT_SIGNAL(toolbarRemoved(const TQString&)), this, TQT_SLOT(slotToolbarRemoved(const TQString&)));
}
void ActionConfigDialog::slotEditToolbar()
{
- QString toolbarName;
- QString toolbarId;
- QListViewItem *oldItem;
- QListViewItem *item = actionTreeView->currentItem();
+ TQString toolbarName;
+ TQString toolbarId;
+ TQListViewItem *oldItem;
+ TQListViewItem *item = actionTreeView->currentItem();
if (item->parent())
item = item->parent();
toolbarName = item->text(0);
@@ -235,7 +235,7 @@ void ActionConfigDialog::slotEditToolbar()
item = new KListViewItem(actionTreeView, oldItem, toolbarName);
item->setOpen(oldItem->isOpen());
delete oldItem;
- QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
+ TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
@@ -243,7 +243,7 @@ void ActionConfigDialog::slotEditToolbar()
action = ac->action(node.toElement().attribute("name"));
if (action)
{
- oldItem = new KListViewItem(item, oldItem, action->text().replace(QRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name());
+ oldItem = new KListViewItem(item, oldItem, action->text().replace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name());
oldItem->setPixmap(0, SmallIcon(action->icon()));
}
}
@@ -256,17 +256,17 @@ void ActionConfigDialog::slotEditToolbar()
}
}
-void ActionConfigDialog::slotContextMenu(KListView *,QListViewItem *,const QPoint &point)
+void ActionConfigDialog::slotContextMenu(KListView *,TQListViewItem *,const TQPoint &point)
{
treeMenu->popup(point);
}
-void ActionConfigDialog::slotSelectionChanged(QListViewItem *item)
+void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item)
{
if (currentAction && currentAction->inherits("TagAction"))
{
if ( buttonApply->isEnabled() &&
- KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes )
+ KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes )
{
saveCurrentAction();
}
@@ -282,7 +282,7 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item)
for (uint i = 0; i < acCount; i++)
{
KAction *a = ac->action(i);
- QString actionName = a->name();
+ TQString actionName = a->name();
if (a && actionName == item->text(2) && a->inherits("TagAction"))
{
action = static_cast<TagAction*>(a);
@@ -300,20 +300,20 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item)
if (action)
{
currentAction = action;
- QDomElement el = action->data();
+ TQDomElement el = action->data();
if ( el.hasAttribute("icon") )
{
- QString s = el.attribute("icon");
- if (!QFileInfo(s).exists())
- s = QFileInfo(s).fileName();
+ TQString s = el.attribute("icon");
+ if (!TQFileInfo(s).exists())
+ s = TQFileInfo(s).fileName();
actionIcon->setIcon(s);
}
- QString actionText = el.attribute("text");
- actionText.replace(QRegExp("\\&(?!\\&)"),"");
+ TQString actionText = el.attribute("text");
+ actionText.replace(TQRegExp("\\&(?!\\&)"),"");
lineText->setText(actionText);
lineToolTip->setText( el.attribute("tooltip") );
selectedShortcut = action->shortcut();
- QString shortcutText = action->shortcut().toString();
+ TQString shortcutText = action->shortcut().toString();
if (shortcutText.isEmpty())
{
noShortcut->setChecked(true);
@@ -332,12 +332,12 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item)
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
for (int i = 0; i < tb->count(); i++)
{
- QString toolbarName = tb->label(i);
- QString toolbarId = tb->id(i);
+ TQString toolbarName = tb->label(i);
+ TQString toolbarId = tb->id(i);
ToolbarEntry *p_toolbar = m_toolbarList[toolbarId];
if (p_toolbar)
{
- QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
+ TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action" &&
@@ -367,10 +367,10 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item)
errorBox->setCurrentItem(5);
textEdit->clear();
//set the detailed settings according to the type of the action
- QString type = el.attribute("type", "tag");
+ TQString type = el.attribute("type", "tag");
if (type == "tag")
{
- QDomElement eltag = el.namedItem("tag").toElement();
+ TQDomElement eltag = el.namedItem("tag").toElement();
lineTag->setText( eltag.text() );
useActionDialog->setChecked(eltag.attribute("useDialog","false") == "true");
eltag = el.namedItem("xtag").toElement();
@@ -380,10 +380,10 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item)
}
else if (type == "script")
{
- QDomElement elScript = el.namedItem("script").toElement();
+ TQDomElement elScript = el.namedItem("script").toElement();
scriptPath->setText( elScript.text() );
- QString s;
+ TQString s;
s = elScript.attribute("input","none");
if (s == "current")
{
@@ -465,12 +465,12 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item)
void ActionConfigDialog::saveCurrentAction()
{
static_cast<TagAction *>(currentAction)->setModified(true);
- QString s;
- QDomElement el = static_cast<TagAction *>(currentAction)->data();
+ TQString s;
+ TQDomElement el = static_cast<TagAction *>(currentAction)->data();
s = actionIcon->icon();
el.setAttribute("icon", s);
currentAction->setIcon(s);
- QString oldText = el.attribute("text");
+ TQString oldText = el.attribute("text");
s = lineText->text();
s.replace('&', "&&");
el.setAttribute("text", s);
@@ -491,8 +491,8 @@ void ActionConfigDialog::saveCurrentAction()
//update the tree view
- QListViewItem *listItem;
- QListViewItemIterator it(actionTreeView);
+ TQListViewItem *listItem;
+ TQListViewItemIterator it(actionTreeView);
while (it.current())
{
listItem = it.current();
@@ -506,7 +506,7 @@ void ActionConfigDialog::saveCurrentAction()
}
//remove all the detailed settings
- QDomElement item = el.namedItem("tag").toElement();
+ TQDomElement item = el.namedItem("tag").toElement();
if ( !item.isNull() )
el.removeChild(item);
item = el.namedItem("tag").toElement();
@@ -522,7 +522,7 @@ void ActionConfigDialog::saveCurrentAction()
if ( !item.isNull() )
el.removeChild(item);
//add the new detailed settings
- QDomDocument document = QDomDocument();
+ TQDomDocument document = TQDomDocument();
int type = typeCombo->currentItem();
switch (type)
{
@@ -611,13 +611,13 @@ void ActionConfigDialog::saveCurrentAction()
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
for (int i = 0; i < tb->count(); i++)
{
- QString toolbarName = tb->label(i);
- QString toolbarId = tb->id(i);
+ TQString toolbarName = tb->label(i);
+ TQString toolbarId = tb->id(i);
ToolbarEntry *p_toolbar = m_toolbarList[toolbarId];
bool isOnToolbar = false;
if (p_toolbar)
{
- QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
+ TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
bool placeOnToolbar = toolbarListBox->findItem(toolbarName, Qt::ExactMatch);
while (!node.isNull())
{
@@ -631,7 +631,7 @@ void ActionConfigDialog::saveCurrentAction()
currentAction->unplug(tb->page(i));
currentAction->unplug(p_toolbar->menu);
node.parentNode().removeChild(node);
- QListViewItemIterator iter(actionTreeView);
+ TQListViewItemIterator iter(actionTreeView);
while (iter.current())
{
listItem = iter.current();
@@ -661,7 +661,7 @@ void ActionConfigDialog::saveCurrentAction()
listItem = actionTreeView->findItem(toolbarName, 0);
if (listItem)
{
- QListViewItem *after = listItem->firstChild();
+ TQListViewItem *after = listItem->firstChild();
while ( after && (!after->nextSibling() || (after->nextSibling() && after->nextSibling()->depth()!=0 ) ))
{
if (after->text(2) == currentAction->name())
@@ -681,7 +681,7 @@ void ActionConfigDialog::saveCurrentAction()
KXMLGUIFactory::saveConfigFile(p_toolbar->guiClient->domDocument(),
p_toolbar->guiClient->xmlFile(), p_toolbar->guiClient->instance());
}
- QWidget *toolBar = tb->page(i);
+ TQWidget *toolBar = tb->page(i);
if (toolBar->minimumSizeHint().height() > 20)
{
toolBar->adjustSize();
@@ -696,23 +696,23 @@ void ActionConfigDialog::saveCurrentAction()
void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut)
{
- QString shortcutText = shortcut.toString();
- QString shortcutText2;
+ TQString shortcutText = shortcut.toString();
+ TQString shortcutText2;
int pos = shortcutText.find(';');
if (pos != -1)
{
shortcutText2 = shortcutText.mid(pos + 1);
shortcutText = shortcutText.left(pos);
}
- QString s = shortcutText;
+ TQString s = shortcutText;
s.replace('+', "\\+");
- QRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";");
+ TQRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";");
s = shortcutText2;
s.replace('+', "\\+");
- QRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";");
- QString global;
+ TQRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";");
+ TQString global;
//check for conflicting global shortcuts
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString>::Iterator it;
for ( it = globalShortcuts.begin(); it != globalShortcuts.end(); ++it )
{
if (it.data().contains(shortcutRx))
@@ -730,8 +730,8 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut)
if (global.isEmpty())
{
- QPtrList<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
+ TQPtrList<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it )
{
KActionCollection *ac = (*it)->actionCollection();
for (uint i = 0; i < ac->count(); i++)
@@ -762,7 +762,7 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut)
} else
{
global.replace('&',"");
- QString s = i18n("The '%1' key combination has already been allocated "
+ TQString s = i18n("The '%1' key combination has already been allocated "
"to the \"%2\" action.\n"
"Please choose a unique key combination.").
arg(shortcutText).arg(global);
@@ -779,22 +779,22 @@ void ActionConfigDialog::accept()
void ActionConfigDialog::reject()
{
- if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes )
+ if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes )
saveCurrentAction();
ActionConfigDialogS::reject();
}
void ActionConfigDialog::slotNewAction()
{
- QDomDocument doc;
- QDomElement el = doc.createElement("action");
+ TQDomDocument doc;
+ TQDomElement el = doc.createElement("action");
el.setAttribute( "name", "user_"+KApplication::randomString(10) );
el.setAttribute( "icon", "ball" );
currentAction = new TagAction(&el, m_mainWindow);
//add the actions to every toolbar xmlguiclient
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->insert(currentAction);
@@ -803,9 +803,9 @@ void ActionConfigDialog::slotNewAction()
selectedShortcut = KShortcut();
static_cast<TagAction*>(currentAction)->setModified(true);
- QListViewItem *currentItem = actionTreeView->currentItem();
- QListViewItem *item = new KListViewItem(allActionsItem);
- QString actionText = QString("Action_%1").arg(m_mainWindow->actionCollection()->count());
+ TQListViewItem *currentItem = actionTreeView->currentItem();
+ TQListViewItem *item = new KListViewItem(allActionsItem);
+ TQString actionText = TQString("Action_%1").arg(m_mainWindow->actionCollection()->count());
currentAction->setText(actionText);
item->setText(2, currentAction->name());
item->setText(0, actionText);
@@ -816,7 +816,7 @@ void ActionConfigDialog::slotNewAction()
actionTreeView->setCurrentItem(item);
} else
{
- QListViewItem *parentItem = currentItem->parent();
+ TQListViewItem *parentItem = currentItem->parent();
if (!parentItem)
parentItem = currentItem;
@@ -838,14 +838,14 @@ void ActionConfigDialog::slotNewAction()
void ActionConfigDialog::slotDeleteAction()
{
- if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").arg(currentAction->text()),QString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").arg(currentAction->text()),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue )
{
- QString actionName = currentAction->name();
+ TQString actionName = currentAction->name();
emit deleteUserAction(currentAction);
currentAction = 0L;
//update the tree view
- QListViewItem *listItem;
- QListViewItemIterator it(actionTreeView);
+ TQListViewItem *listItem;
+ TQListViewItemIterator it(actionTreeView);
while (it.current())
{
listItem = it.current();
@@ -873,7 +873,7 @@ void ActionConfigDialog::slotAddContainerToolbar()
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
int i;
- QStringList lst;
+ TQStringList lst;
for (i = 0; i < tb->count(); i++)
{
if (!toolbarListBox->findItem(tb->label(i), Qt::ExactMatch))
@@ -883,7 +883,7 @@ void ActionConfigDialog::slotAddContainerToolbar()
if (lst.count() > 0)
{
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Add Action to Toolbar" ),
i18n( "Please select a toolbar:" ), lst, 0, false, &ok, this );
@@ -916,12 +916,12 @@ void ActionConfigDialog::slotTextChanged()
buttonApply->setEnabled(true);
}
-void ActionConfigDialog::slotTextChanged(const QString&)
+void ActionConfigDialog::slotTextChanged(const TQString&)
{
buttonApply->setEnabled(true);
}
-void ActionConfigDialog::createScriptAction(const QString& a_name, const QString& a_script)
+void ActionConfigDialog::createScriptAction(const TQString& a_name, const TQString& a_script)
{
actionTreeView->setCurrentItem(allActionsItem);
slotNewAction();
diff --git a/quanta/dialogs/actionconfigdialog.h b/quanta/dialogs/actionconfigdialog.h
index f94ba67e..d58567ee 100644
--- a/quanta/dialogs/actionconfigdialog.h
+++ b/quanta/dialogs/actionconfigdialog.h
@@ -15,7 +15,7 @@
#ifndef ACTIONCONFIGDIALOG_H
#define ACTIONCONFIGDIALOG_H
-#include <qmap.h>
+#include <tqmap.h>
#include "actionconfigdialogs.h"
class QDomDocument;
@@ -29,11 +29,11 @@ class KXMLGUIClient;
typedef struct ToolbarEntry{
KXMLGUIClient *guiClient;
- QDomDocument *dom;
- QPopupMenu *menu;
+ TQDomDocument *dom;
+ TQPopupMenu *menu;
KURL url;
- QString name;
- QString id;
+ TQString name;
+ TQString id;
bool user;
bool visible;
bool nameModified; ///< True if the name of the toolbar was modified by Quanta on loading:" (n)" was added
@@ -45,48 +45,48 @@ class ActionConfigDialog: public ActionConfigDialogS
public:
- ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const QString& defaultAction = QString::null);
+ ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const TQString& defaultAction = TQString::null);
~ActionConfigDialog();
- void createScriptAction(const QString& a_name, const QString& a_script);
+ void createScriptAction(const TQString& a_name, const TQString& a_script);
public slots:
virtual void accept();
virtual void reject();
void slotToggled(bool);
void slotTextChanged();
- void slotTextChanged(const QString&);
+ void slotTextChanged(const TQString&);
void slotNewAction();
private slots:
void slotAddToolbar();
void slotRemoveToolbar();
void slotEditToolbar();
- void slotContextMenu(KListView *,QListViewItem *,const QPoint &);
- void slotSelectionChanged(QListViewItem *);
+ void slotContextMenu(KListView *,TQListViewItem *,const TQPoint &);
+ void slotSelectionChanged(TQListViewItem *);
void slotShortcutCaptured(const KShortcut&);
void slotDeleteAction();
void slotApply();
void slotAddContainerToolbar();
void slotRemoveContainerToolbar();
- void slotToolbarRemoved(const QString& toolbarName);
+ void slotToolbarRemoved(const TQString& toolbarName);
signals:
void addToolbar();
- void removeToolbar(const QString&);
+ void removeToolbar(const TQString&);
void deleteUserAction(KAction *);
- void configureToolbars(const QString&);
+ void configureToolbars(const TQString&);
private:
void saveCurrentAction();
KPopupMenu *treeMenu;
KAction *currentAction;
- QListViewItem *allActionsItem;
- QMap<QString, QString> globalShortcuts;
+ TQListViewItem *allActionsItem;
+ TQMap<TQString, TQString> globalShortcuts;
KShortcut selectedShortcut;
KMainWindow *m_mainWindow;
- QDict<ToolbarEntry> m_toolbarList;
- QListViewItem *m_toolbarItem;
+ TQDict<ToolbarEntry> m_toolbarList;
+ TQListViewItem *m_toolbarItem;
};
#endif
diff --git a/quanta/dialogs/copyto.cpp b/quanta/dialogs/copyto.cpp
index 429fa457..9f66cb11 100644
--- a/quanta/dialogs/copyto.cpp
+++ b/quanta/dialogs/copyto.cpp
@@ -63,10 +63,10 @@ KURL CopyTo::copy(const KURL& urlToCopy, const KURL& destination)
destURL.adjustPath(1);
KIO::CopyJob *job = KIO::copy(urlToCopy, destURL, true);
- connect( job, SIGNAL(result( KIO::Job *)),
- SLOT (slotResult( KIO::Job *)));
+ connect( job, TQT_SIGNAL(result( KIO::Job *)),
+ TQT_SLOT (slotResult( KIO::Job *)));
- QString path = destURL.path();
+ TQString path = destURL.path();
if (path != "." && path != "..")
m_destList.append(destURL);
}
@@ -101,7 +101,7 @@ KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination )
KIO::UDSEntry entry;
if (doCopy)
{
- QString path;
+ TQString path;
for (uint i = 0; i < sourceList.count(); i++)
{
KURL srcURL = sourceList[i];
@@ -117,8 +117,8 @@ KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination )
}
KIO::CopyJob *job = KIO::copy(sourceList, targetDirURL, true);
- connect( job, SIGNAL(result( KIO::Job *)),
- SLOT (slotResult( KIO::Job *)));
+ connect( job, TQT_SIGNAL(result( KIO::Job *)),
+ TQT_SLOT (slotResult( KIO::Job *)));
}
return m_destList;
diff --git a/quanta/dialogs/dirtydlg.cpp b/quanta/dialogs/dirtydlg.cpp
index ad9e408b..70d06c86 100644
--- a/quanta/dialogs/dirtydlg.cpp
+++ b/quanta/dialogs/dirtydlg.cpp
@@ -14,10 +14,10 @@
***************************************************************************/
//qt includes
-#include <qevent.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
//kde includes
#include <kdialogbase.h>
@@ -34,7 +34,7 @@
#include "resource.h"
#include "qextfileinfo.h"
-DirtyDlg::DirtyDlg(const QString& srcName, const QString& destName, bool createBackup, QWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n("File Changed"), KDialogBase::Ok)
+DirtyDlg::DirtyDlg(const TQString& srcName, const TQString& destName, bool createBackup, TQWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n("File Changed"), KDialogBase::Ok)
{
m_src.setPath(srcName);
m_dest.setPath(destName);
@@ -56,7 +56,7 @@ void DirtyDlg::slotOk()
KProcess *proc = new KProcess();
*proc << "kompare" << m_src.path() << m_dest.path();
proc->start();
- connect(proc, SIGNAL(processExited(KProcess*)),SLOT(slotCompareDone(KProcess*)));
+ connect(proc, TQT_SIGNAL(processExited(KProcess*)),TQT_SLOT(slotCompareDone(KProcess*)));
enableButton(KDialogBase::Ok, false);
enableButton(KDialogBase::Cancel, false);
} else
@@ -88,8 +88,8 @@ void DirtyDlg::slotCompareDone(KProcess* proc)
//TODO: Replace with KIO::NetAccess::file_move, when KDE 3.1 support
//is dropped
KIO::FileCopyJob *job = KIO::file_move(m_dest, m_src, m_permissions, true, false,false );
- connect( job, SIGNAL(result( KIO::Job *)),
- SLOT (slotResult( KIO::Job *)));
+ connect( job, TQT_SIGNAL(result( KIO::Job *)),
+ TQT_SLOT (slotResult( KIO::Job *)));
}
@@ -101,7 +101,7 @@ void DirtyDlg::slotResult(KIO::Job *)
}
/** No descriptions */
-void DirtyDlg::closeEvent(QCloseEvent* ev)
+void DirtyDlg::closeEvent(TQCloseEvent* ev)
{
if (m_busy)
ev->ignore();
diff --git a/quanta/dialogs/dirtydlg.h b/quanta/dialogs/dirtydlg.h
index 83d05339..4f71f64e 100644
--- a/quanta/dialogs/dirtydlg.h
+++ b/quanta/dialogs/dirtydlg.h
@@ -30,7 +30,7 @@ class DirtyDlg : public KDialogBase {
Q_OBJECT
public:
- DirtyDlg(const QString& srcName, const QString& destName, bool createBackup = false, QWidget *parent=0, const char *name=0);
+ DirtyDlg(const TQString& srcName, const TQString& destName, bool createBackup = false, TQWidget *parent=0, const char *name=0);
~DirtyDlg();
protected slots: // Protected slots
@@ -41,7 +41,7 @@ protected slots: // Protected slots
/** No descriptions */
void slotResult(KIO::Job *);
/** No descriptions */
- virtual void closeEvent(QCloseEvent* ev);
+ virtual void closeEvent(TQCloseEvent* ev);
protected: // Protected attributes
KURL m_src;
diff --git a/quanta/dialogs/dtepeditdlg.cpp b/quanta/dialogs/dtepeditdlg.cpp
index c0bf4797..c2595716 100644
--- a/quanta/dialogs/dtepeditdlg.cpp
+++ b/quanta/dialogs/dtepeditdlg.cpp
@@ -13,13 +13,13 @@
* *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qgroupbox.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
-#include <qwidgetstack.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqgroupbox.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
+#include <tqwidgetstack.h>
//kde includes
@@ -40,7 +40,7 @@
#include "resource.h"
#include "quantacommon.h"
-DTEPEditDlg::DTEPEditDlg(const QString& descriptionFile, QWidget *parent, const char *name)
+DTEPEditDlg::DTEPEditDlg(const TQString& descriptionFile, TQWidget *parent, const char *name)
: DTEPEditDlgS(parent, name)
{
nameEdit->setFocus();
@@ -91,8 +91,8 @@ void DTEPEditDlg::readGeneral()
rulesWidgetStack->raiseWidget(m_family);
generalWidgetStack->raiseWidget(m_family);
caseSensitive->setChecked(m_config->readBoolEntry("CaseSensitive", false));
- QString inherits = m_config->readEntry("Inherits");
- QStringList lst(DTDs::ref()->nameList());
+ TQString inherits = m_config->readEntry("Inherits");
+ TQStringList lst(DTDs::ref()->nameList());
inheritsCombo->insertStringList(lst);
int idx = lst.findIndex(inherits);
if (idx == -1)
@@ -113,11 +113,11 @@ void DTEPEditDlg::readGeneral()
void DTEPEditDlg::readPages()
{
int i = 1;
- while (m_config->hasGroup(QString("Page%1").arg(i)) && i < 6)
+ while (m_config->hasGroup(TQString("Page%1").arg(i)) && i < 6)
{
- m_config->setGroup(QString("Page%1").arg(i));
- QString title = m_config->readEntry("Title");
- QString groups = m_config->readEntry("Groups");
+ m_config->setGroup(TQString("Page%1").arg(i));
+ TQString title = m_config->readEntry("Title");
+ TQString groups = m_config->readEntry("Groups");
if (i == 1)
{
enablePage1->setChecked(true);
@@ -197,8 +197,8 @@ void DTEPEditDlg::readParserRules()
void DTEPEditDlg::saveResult()
{
- QString targetFile = m_descriptionFile;
- QFileInfo f(targetFile);
+ TQString targetFile = m_descriptionFile;
+ TQFileInfo f(targetFile);
if (!f.isWritable())
{
if (f.exists())
@@ -212,7 +212,7 @@ void DTEPEditDlg::saveResult()
}
if (!targetFile.isEmpty())
{
- QFile f(targetFile);
+ TQFile f(targetFile);
if (f.exists())
f.remove();
KConfig* newConfig = m_config->copyTo(targetFile);
@@ -255,35 +255,35 @@ void DTEPEditDlg::writePages(KConfig *config)
if (enablePage1->isChecked())
{
num++;
- config->setGroup(QString("Page%1").arg(num));
+ config->setGroup(TQString("Page%1").arg(num));
writeEntry(config, "Title", pageTitleEdit1->text());
writeEntry(config, "Groups", groupsEdit1->text());
}
if (enablePage2->isChecked())
{
num++;
- config->setGroup(QString("Page%1").arg(num));
+ config->setGroup(TQString("Page%1").arg(num));
writeEntry(config, "Title", pageTitleEdit2->text());
writeEntry(config, "Groups", groupsEdit2->text());
}
if (enablePage3->isChecked())
{
num++;
- config->setGroup(QString("Page%1").arg(num));
+ config->setGroup(TQString("Page%1").arg(num));
writeEntry(config, "Title", pageTitleEdit3->text());
writeEntry(config, "Groups", groupsEdit3->text());
}
if (enablePage4->isChecked())
{
num++;
- config->setGroup(QString("Page%1").arg(num));
+ config->setGroup(TQString("Page%1").arg(num));
writeEntry(config, "Title", pageTitleEdit4->text());
writeEntry(config, "Groups", groupsEdit4->text());
}
if (enablePage5->isChecked())
{
num++;
- config->setGroup(QString("Page%1").arg(num));
+ config->setGroup(TQString("Page%1").arg(num));
writeEntry(config, "Title", pageTitleEdit5->text());
writeEntry(config, "Groups", groupsEdit5->text());
}
@@ -343,10 +343,10 @@ void DTEPEditDlg::readStructures()
int objectGroupId = m_config->readNumEntry("ObjectGroupIndex", -1);
int i = 1;
- while (m_config->hasGroup(QString("StructGroup_%1").arg(i)))
+ while (m_config->hasGroup(TQString("StructGroup_%1").arg(i)))
{
StructGroup group;
- m_config->setGroup(QString("StructGroup_%1").arg(i));
+ m_config->setGroup(TQString("StructGroup_%1").arg(i));
group.name = m_config->readEntry("Name");
group.noName = m_config->readEntry("No_Name");
group.icon = m_config->readEntry("Icon");
@@ -372,7 +372,7 @@ void DTEPEditDlg::readStructures()
m_structGroups.append(group);
i++;
}
- for (QValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
+ for (TQValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
{
structuresList->insertItem((*it).name);
}
@@ -384,10 +384,10 @@ void DTEPEditDlg::writeStructures(KConfig *config)
config->writeEntry("StructGroupsCount", m_structGroups.count());
int i = 1;
- for (QValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
+ for (TQValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
{
StructGroup group = *it;
- config->setGroup(QString("StructGroup_%1").arg(i));
+ config->setGroup(TQString("StructGroup_%1").arg(i));
writeEntry(config, "Name", group.name);
writeEntry(config, "No_Name", group.noName);
writeEntry(config, "Icon", group.icon);
@@ -430,7 +430,7 @@ void DTEPEditDlg::writeStructures(KConfig *config)
i++;
}
- for (QValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
+ for (TQValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it)
{
structuresList->insertItem((*it).name);
}
@@ -544,7 +544,7 @@ void DTEPEditDlg::slotDeleteStructGroup()
}
}
-void DTEPEditDlg::writeEntry(KConfig *config, const QString &key, const QString &value)
+void DTEPEditDlg::writeEntry(KConfig *config, const TQString &key, const TQString &value)
{
if (value.isEmpty())
config->deleteEntry(key);
diff --git a/quanta/dialogs/dtepeditdlg.h b/quanta/dialogs/dtepeditdlg.h
index 45bd3d6d..ed921a5a 100644
--- a/quanta/dialogs/dtepeditdlg.h
+++ b/quanta/dialogs/dtepeditdlg.h
@@ -17,7 +17,7 @@
#define DTEPEDITDLG_H
//qt includes
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
//own includes
#include "dtepeditdlgs.h"
@@ -30,22 +30,22 @@ class KConfig;
class DTEPStructureEditDlgS;
struct StructGroup {
- QString name; ///<the name of the group
- QString noName; ///<the text when there are no elements in the group
- QString icon; ///<the icon of the group
- QString tag;
+ TQString name; ///<the name of the group
+ TQString noName; ///<the text when there are no elements in the group
+ TQString icon; ///<the icon of the group
+ TQString tag;
bool hasFileName;
- QString fileNameRx;
+ TQString fileNameRx;
bool appendToTags;
- QString parentGroup;
- QString definitionRx;
+ TQString parentGroup;
+ TQString definitionRx;
bool definitionRxMinimal;
- QString usageRx;
- QString typeRx;
- QString tagType;
+ TQString usageRx;
+ TQString typeRx;
+ TQString tagType;
bool parseFile;
- QString completeAfterRx;
- QString removeRx;
+ TQString completeAfterRx;
+ TQString removeRx;
bool simpleGroup;
bool variableGroup;
bool functionGroup;
@@ -57,7 +57,7 @@ class DTEPEditDlg : public DTEPEditDlgS
{
Q_OBJECT
public:
- DTEPEditDlg(const QString& descriptionFile, QWidget *parent = 0, const char *name = 0);
+ DTEPEditDlg(const TQString& descriptionFile, TQWidget *parent = 0, const char *name = 0);
~DTEPEditDlg();
void saveResult();
void slotFamilyChanged(int family);
@@ -77,13 +77,13 @@ class DTEPEditDlg : public DTEPEditDlgS
void writePages(KConfig *config);
void writeParserRules(KConfig *config);
void writeStructures(KConfig *config);
- void writeEntry(KConfig *config, const QString &key, const QString &value);
+ void writeEntry(KConfig *config, const TQString &key, const TQString &value);
- QString m_descriptionFile;
+ TQString m_descriptionFile;
KConfig *m_config;
int m_family;
- QWidget *m_pagesWidget;
- QValueList<StructGroup> m_structGroups;
+ TQWidget *m_pagesWidget;
+ TQValueList<StructGroup> m_structGroups;
};
#endif
diff --git a/quanta/dialogs/filecombo.cpp b/quanta/dialogs/filecombo.cpp
index 40415757..63fd1e58 100644
--- a/quanta/dialogs/filecombo.cpp
+++ b/quanta/dialogs/filecombo.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
// QT includes
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqpushbutton.h>
// KDE includes
#include <klocale.h>
@@ -29,17 +29,17 @@
#include "filecombo.h"
#include "qextfileinfo.h"
-FileCombo::FileCombo(const KURL& a_baseURL, QWidget *parent, const char *name )
- :QWidget(parent,name)
+FileCombo::FileCombo(const KURL& a_baseURL, TQWidget *parent, const char *name )
+ :TQWidget(parent,name)
{
baseURL = a_baseURL;
m_absolutePath = false;
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
- combo = new QComboBox(true,this);
+ combo = new TQComboBox(true,this);
combo->setEditable(true);
- button = new QPushButton(this);
+ button = new TQPushButton(this);
button ->setFixedSize(35,25);
button ->setText(i18n("..."));
@@ -47,21 +47,21 @@ FileCombo::FileCombo(const KURL& a_baseURL, QWidget *parent, const char *name )
layout ->addWidget( combo );
layout ->addWidget( button );
- connect( button, SIGNAL(clicked()), this, SLOT(slotFileSelect()) );
- connect( combo, SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&)));
- connect( combo, SIGNAL(textChanged(const QString&)), SLOT(slotComboActivated(const QString&)));
+ connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) );
+ connect( combo, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&)));
+ connect( combo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&)));
setFocusProxy(combo);
}
-FileCombo::FileCombo( QWidget *parent, const char *name )
- :QWidget( parent, name )
+FileCombo::FileCombo( TQWidget *parent, const char *name )
+ :TQWidget( parent, name )
{
baseURL.setPath(".");
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
- combo = new QComboBox(true,this);
- button = new QPushButton(this);
+ combo = new TQComboBox(true,this);
+ button = new TQPushButton(this);
button ->setFixedSize(35,25);
button ->setText(i18n("..."));
@@ -69,21 +69,21 @@ FileCombo::FileCombo( QWidget *parent, const char *name )
layout ->addWidget( combo );
layout ->addWidget( button );
- connect( button, SIGNAL(clicked()), this, SLOT(slotFileSelect()) );
- connect( combo, SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&)));
- connect( combo, SIGNAL(textChanged(const QString&)), SLOT(slotComboActivated(const QString&)));
+ connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) );
+ connect( combo, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&)));
+ connect( combo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&)));
setFocusProxy(combo);
}
FileCombo::~FileCombo(){
}
-QString FileCombo::text() const
+TQString FileCombo::text() const
{
return combo->currentText();
}
-void FileCombo::setText( const QString &_txt )
+void FileCombo::setText( const TQString &_txt )
{
combo ->setEditText( _txt );
}
@@ -114,7 +114,7 @@ void FileCombo::setReturnAbsolutePath(bool absolutePath)
m_absolutePath = absolutePath;
}
-void FileCombo::slotComboActivated(const QString&s)
+void FileCombo::slotComboActivated(const TQString&s)
{
emit activated(s);
}
diff --git a/quanta/dialogs/filecombo.h b/quanta/dialogs/filecombo.h
index 9403b808..9ec8198c 100644
--- a/quanta/dialogs/filecombo.h
+++ b/quanta/dialogs/filecombo.h
@@ -18,7 +18,7 @@
#ifndef FILECOMBO_H
#define FILECOMBO_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kurl.h>
/**
@@ -29,15 +29,15 @@ class QComboBox;
class QPushButton;
class KURL;
-class FileCombo : public QWidget {
+class FileCombo : public TQWidget {
Q_OBJECT
public:
- FileCombo(const KURL& a_baseURL, QWidget *parent=0, const char *name=0);
- FileCombo(QWidget *parent=0, const char *name=0);
+ FileCombo(const KURL& a_baseURL, TQWidget *parent=0, const char *name=0);
+ FileCombo(TQWidget *parent=0, const char *name=0);
~FileCombo();
- QString text() const;
- void setText( const QString &);
+ TQString text() const;
+ void setText( const TQString &);
/** The select URL dialogs shows this URL, and the returned value is relative to this */
void setBaseURL(const KURL& a_baseURL);
/** The selected URL will be stored with absolute path if absolutePath is true */
@@ -45,17 +45,17 @@ public:
public slots:
void slotFileSelect();
- void slotComboActivated(const QString&);
+ void slotComboActivated(const TQString&);
signals:
- void activated(const QString&);
+ void activated(const TQString&);
protected:
KURL baseURL;
bool m_absolutePath;
- QComboBox *combo;
- QPushButton *button;
+ TQComboBox *combo;
+ TQPushButton *button;
};
diff --git a/quanta/dialogs/settings/abbreviation.cpp b/quanta/dialogs/settings/abbreviation.cpp
index 56f81c0e..79dc4bc1 100644
--- a/quanta/dialogs/settings/abbreviation.cpp
+++ b/quanta/dialogs/settings/abbreviation.cpp
@@ -13,13 +13,13 @@
***************************************************************************/
//qt includes
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qtextedit.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtextedit.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
//kde includes
#include <kcombobox.h>
@@ -41,13 +41,13 @@
#include "dtds.h"
-AbbreviationDlg::AbbreviationDlg(QWidget *parent, const char *name):
+AbbreviationDlg::AbbreviationDlg(TQWidget *parent, const char *name):
AbbreviationDlgS(parent, name)
{
m_oldItem = 0L;
m_currentAbbrev = 0L;
- QMapConstIterator<QString, Abbreviation> it;
+ TQMapConstIterator<TQString, Abbreviation> it;
for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it)
{
groupCombo->insertItem(it.key());
@@ -59,10 +59,10 @@ AbbreviationDlg::~AbbreviationDlg()
{
}
-void AbbreviationDlg::slotGroupChanged(const QString& newGroupName)
+void AbbreviationDlg::slotGroupChanged(const TQString& newGroupName)
{
//save the current template
- QListViewItem *item = templatesList->currentItem();
+ TQListViewItem *item = templatesList->currentItem();
if (item && m_currentAbbrev)
m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text());
dtepList->clear();
@@ -70,9 +70,9 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName)
codeEdit->clear();
m_oldItem = 0L;
m_currentAbbrev = &qConfig.abbreviations[newGroupName];
- QString templateStr;
- QString templateName;
- QMap<QString, QString>::ConstIterator it;
+ TQString templateStr;
+ TQString templateName;
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = m_currentAbbrev->abbreviations.constBegin(); it != m_currentAbbrev->abbreviations.constEnd(); ++it )
{
templateStr = it.key();
@@ -80,7 +80,7 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName)
templateStr = templateStr.left(templateStr.find(' '));
new KListViewItem(templatesList, templateStr, templateName);
}
- for ( QStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit )
+ for ( TQStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit )
{
dtepList->insertItem(DTDs::ref()->getDTDNickNameFromName(*dtepit));
}
@@ -92,13 +92,13 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName)
void AbbreviationDlg::slotNewGroup()
{
bool ok;
- QString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this);
+ TQString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this);
if (ok && !groupName.isEmpty())
{
if (qConfig.abbreviations.contains(groupName))
{
KMessageBox::error(this, i18n("<qt>There is already an abbreviation group called <b>%1</b>. Choose an unique name for the new group.</qt>").arg(groupName), i18n("Group already exists"));
- QTimer::singleShot(0, this, SLOT(slotNewGroup()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotNewGroup()));
} else
{
groupCombo->insertItem(groupName);
@@ -110,17 +110,17 @@ void AbbreviationDlg::slotNewGroup()
void AbbreviationDlg::slotAddDTEP()
{
- QStringList lst = DTDs::ref()->nickNameList(false);
+ TQStringList lst = DTDs::ref()->nickNameList(false);
for (uint i = 0; i < dtepList->count(); i++)
lst.remove(dtepList->text(i));
bool ok = false;
- QStringList res = KInputDialog::getItemList(
+ TQStringList res = KInputDialog::getItemList(
i18n( "Add DTEP" ),
i18n( "Select a DTEP:" ), lst, 0, true, &ok, this );
if (ok)
{
dtepList->insertStringList(res);
- for (QStringList::ConstIterator it = res.constBegin(); it != res.constEnd(); ++it)
+ for (TQStringList::ConstIterator it = res.constBegin(); it != res.constEnd(); ++it)
{
m_currentAbbrev->dteps.append(DTDs::ref()->getDTDNameFromNickName(*it));
}
@@ -146,18 +146,18 @@ void AbbreviationDlg::slotRemoveDTEP()
}
}
-void AbbreviationDlg::slotTemplateSelectionChanged(QListViewItem* item)
+void AbbreviationDlg::slotTemplateSelectionChanged(TQListViewItem* item)
{
if (!item)
return;
- //QListViewItem *m_oldItem = templatesList->currentItem();
+ //TQListViewItem *m_oldItem = templatesList->currentItem();
if (m_oldItem)
{
- QString key = m_oldItem->text(0)+" " +m_oldItem->text(1);
+ TQString key = m_oldItem->text(0)+" " +m_oldItem->text(1);
m_currentAbbrev->abbreviations.insert(key, codeEdit->text());
}
- QString code = m_currentAbbrev->abbreviations[item->text(0)+" " +item->text(1)];
+ TQString code = m_currentAbbrev->abbreviations[item->text(0)+" " +item->text(1)];
codeEdit->setText(code);
m_oldItem = item;
}
@@ -170,11 +170,11 @@ void AbbreviationDlg::slotAddTemplate()
w.templateEdit->setFocus();
if (dlg.exec())
{
- QString templateName = w.templateEdit->text();
- QString description = w.descriptionEdit->text();
+ TQString templateName = w.templateEdit->text();
+ TQString description = w.descriptionEdit->text();
if (!templateName.isEmpty())
{
- QListViewItem *item = new KListViewItem(templatesList, templateName, description);
+ TQListViewItem *item = new KListViewItem(templatesList, templateName, description);
templatesList->setCurrentItem(item);
templatesList->setSelected(item, true);
templatesList->ensureItemVisible(item);
@@ -185,9 +185,9 @@ void AbbreviationDlg::slotAddTemplate()
void AbbreviationDlg::slotRemoveTemplate()
{
- QListViewItem *item = templatesList->currentItem();
+ TQListViewItem *item = templatesList->currentItem();
if (item &&
- KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> template?</qt>").arg(item->text(1)),QString::null,KStdGuiItem::del()) == KMessageBox::Continue)
+ KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> template?</qt>").arg(item->text(1)),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue)
{
m_currentAbbrev->abbreviations.remove(item->text(0)+" "+item->text(1));
delete item;
@@ -198,7 +198,7 @@ void AbbreviationDlg::slotRemoveTemplate()
void AbbreviationDlg::slotEditTemplate()
{
- QListViewItem *item = templatesList->currentItem();
+ TQListViewItem *item = templatesList->currentItem();
if (!item)
return;
KDialogBase dlg(this, 0, true, i18n("Edit Code Template"), KDialogBase::Ok | KDialogBase::Cancel);
@@ -218,33 +218,33 @@ void AbbreviationDlg::slotEditTemplate()
void AbbreviationDlg::saveTemplates()
{
- QListViewItem *item = templatesList->currentItem();
+ TQListViewItem *item = templatesList->currentItem();
if (item && m_currentAbbrev)
m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text());
- QString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
- QString s = "<!DOCTYPE Templates>\n<Templates>\n</Templates>\n";
- QString s2;
- QDomDocument doc;
+ TQString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
+ TQString s = "<!DOCTYPE Templates>\n<Templates>\n</Templates>\n";
+ TQString s2;
+ TQDomDocument doc;
doc.setContent(s);
- QDomNode firstNode = doc.firstChild();
+ TQDomNode firstNode = doc.firstChild();
Abbreviation abbrev;
- QMap<QString, Abbreviation>::ConstIterator abbrevIt;
+ TQMap<TQString, Abbreviation>::ConstIterator abbrevIt;
for (abbrevIt = qConfig.abbreviations.constBegin(); abbrevIt != qConfig.abbreviations.constEnd(); ++abbrevIt)
{
- QDomElement groupEl = doc.createElement("Group");
+ TQDomElement groupEl = doc.createElement("Group");
groupEl.setAttribute("name", abbrevIt.key());
abbrev = abbrevIt.data();
- for (QStringList::ConstIterator dtepIt = abbrev.dteps.constBegin(); dtepIt != abbrev.dteps.constEnd(); ++dtepIt)
+ for (TQStringList::ConstIterator dtepIt = abbrev.dteps.constBegin(); dtepIt != abbrev.dteps.constEnd(); ++dtepIt)
{
- QDomElement el = doc.createElement("DTEP");
+ TQDomElement el = doc.createElement("DTEP");
el.setAttribute("name", *dtepIt);
groupEl.appendChild(el);
}
int pos;
- QMap<QString,QString>::ConstIterator it;
+ TQMap<TQString,TQString>::ConstIterator it;
for (it = abbrev.abbreviations.constBegin(); it != abbrev.abbreviations.constEnd(); ++it)
{
- QDomElement el = doc.createElement("Template");
+ TQDomElement el = doc.createElement("Template");
el.setAttribute("code", it.data());
s = it.key();
s2 = "";
@@ -261,11 +261,11 @@ void AbbreviationDlg::saveTemplates()
firstNode.appendChild(groupEl);
}
- QFile f(abbrevFile);
+ TQFile f(abbrevFile);
if (f.open(IO_WriteOnly | IO_Truncate))
{
- QTextStream str(&f);
- str.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream str(&f);
+ str.setEncoding(TQTextStream::UnicodeUTF8);
str << doc.toString();
f.close();
} else
diff --git a/quanta/dialogs/settings/abbreviation.h b/quanta/dialogs/settings/abbreviation.h
index 0e2a34c6..24db8e3b 100644
--- a/quanta/dialogs/settings/abbreviation.h
+++ b/quanta/dialogs/settings/abbreviation.h
@@ -15,8 +15,8 @@
#ifndef ABBREVIATION_H
#define ABBREVIATION_H
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include <abbreviations.h>
@@ -28,25 +28,25 @@ class AbbreviationDlg : public AbbreviationDlgS
{
Q_OBJECT
public:
- AbbreviationDlg(QWidget *parent, const char *name = 0);
+ AbbreviationDlg(TQWidget *parent, const char *name = 0);
~AbbreviationDlg();
void saveTemplates();
public slots:
- void slotGroupChanged(const QString& newGroupName);
+ void slotGroupChanged(const TQString& newGroupName);
private slots:
void slotNewGroup();
void slotAddDTEP();
void slotRemoveDTEP();
- void slotTemplateSelectionChanged(QListViewItem*);
+ void slotTemplateSelectionChanged(TQListViewItem*);
void slotAddTemplate();
void slotRemoveTemplate();
void slotEditTemplate();
private:
- QListViewItem *m_oldItem;
+ TQListViewItem *m_oldItem;
Abbreviation *m_currentAbbrev;
};
diff --git a/quanta/dialogs/settings/filemasks.cpp b/quanta/dialogs/settings/filemasks.cpp
index 14e824c1..fee135f8 100644
--- a/quanta/dialogs/settings/filemasks.cpp
+++ b/quanta/dialogs/settings/filemasks.cpp
@@ -17,16 +17,16 @@
#include "filemasks.h"
#include "filemasks.moc"
// qt includes
-#include <qlineedit.h>
-#include <qpushbutton.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
//kde includes
#include <kmimetype.h>
-FileMasks::FileMasks(QWidget *parent, const char *name)
+FileMasks::FileMasks(TQWidget *parent, const char *name)
:FileMasksS(parent,name)
{
- connect(buttonDefault, SIGNAL(clicked()), this, SLOT(setToDefault()));
+ connect(buttonDefault, TQT_SIGNAL(clicked()), this, TQT_SLOT(setToDefault()));
}
FileMasks::~FileMasks(){
@@ -36,10 +36,10 @@ void FileMasks::setToDefault()
{
KMimeType::List list = KMimeType::allMimeTypes();
KMimeType::List::iterator it;
- QString markup, script, image, text;
+ TQString markup, script, image, text;
markup = "text/css; text/html; text/sgml; text/xml; ";
script = "text/x-perl; text/x-python; text/x-php; text/x-java; text/x-asp; ";
- QString name;
+ TQString name;
for ( it = list.begin(); it != list.end(); ++it )
{
name = (*it)->name();
diff --git a/quanta/dialogs/settings/filemasks.h b/quanta/dialogs/settings/filemasks.h
index 2d13c1f5..965eb190 100644
--- a/quanta/dialogs/settings/filemasks.h
+++ b/quanta/dialogs/settings/filemasks.h
@@ -25,7 +25,7 @@ class FileMasks : public FileMasksS
{
Q_OBJECT
public:
- FileMasks(QWidget *parent=0, const char *name=0);
+ FileMasks(TQWidget *parent=0, const char *name=0);
~FileMasks();
public slots:
diff --git a/quanta/dialogs/settings/parseroptions.cpp b/quanta/dialogs/settings/parseroptions.cpp
index 0ad00d73..24e3c6a6 100644
--- a/quanta/dialogs/settings/parseroptions.cpp
+++ b/quanta/dialogs/settings/parseroptions.cpp
@@ -15,8 +15,8 @@
#include "parseroptions.h"
#include "parseroptions.moc"
-#include <qcombobox.h>
-#include <qspinbox.h>
+#include <tqcombobox.h>
+#include <tqspinbox.h>
#include <klocale.h>
#include <kconfig.h>
@@ -25,16 +25,16 @@
* Constructs a ParserOptions which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*/
-ParserOptions::ParserOptions( KConfig *a_config, QWidget* parent, const char* name )
+ParserOptions::ParserOptions( KConfig *a_config, TQWidget* parent, const char* name )
: ParserOptionsUI( parent, name )
{
config = a_config;
config->setGroup("Parser options");
- QString handleLBM = config->readEntry("LBM", i18n("Find Tag & Open Tree"));
- QString handleMBM = config->readEntry("MBM", i18n("Nothing"));
- QString handleRBM = config->readEntry("RBM", i18n("Popup Menu"));
- QString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
+ TQString handleLBM = config->readEntry("LBM", i18n("Find Tag & Open Tree"));
+ TQString handleMBM = config->readEntry("MBM", i18n("Nothing"));
+ TQString handleRBM = config->readEntry("RBM", i18n("Popup Menu"));
+ TQString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
if ( !name )
diff --git a/quanta/dialogs/settings/parseroptions.h b/quanta/dialogs/settings/parseroptions.h
index a4bdd0f5..a4c5f6f3 100644
--- a/quanta/dialogs/settings/parseroptions.h
+++ b/quanta/dialogs/settings/parseroptions.h
@@ -25,7 +25,7 @@ class ParserOptions : public ParserOptionsUI
Q_OBJECT
public:
- ParserOptions( KConfig *config, QWidget* parent = 0, const char* name = 0);
+ ParserOptions( KConfig *config, TQWidget* parent = 0, const char* name = 0);
~ParserOptions();
void updateConfig();
diff --git a/quanta/dialogs/settings/previewoptions.cpp b/quanta/dialogs/settings/previewoptions.cpp
index c445c52d..2df03ea9 100644
--- a/quanta/dialogs/settings/previewoptions.cpp
+++ b/quanta/dialogs/settings/previewoptions.cpp
@@ -17,13 +17,13 @@
#include "previewoptions.h"
#include "previewoptions.moc"
// qt includes
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
// kde includes
#include <klocale.h>
#include <kmessagebox.h>
-PreviewOptions::PreviewOptions(QWidget *parent, const char *name)
+PreviewOptions::PreviewOptions(TQWidget *parent, const char *name)
: PreviewOptionsS(parent,name)
{
}
@@ -31,50 +31,50 @@ PreviewOptions::PreviewOptions(QWidget *parent, const char *name)
PreviewOptions::~PreviewOptions(){
}
-void PreviewOptions::setWindowLayout(const QString& layout )
+void PreviewOptions::setWindowLayout(const TQString& layout )
{
if ( layout == "Default") resetLayout->setChecked(true);
else resetLayout->setChecked(false);
}
-void PreviewOptions::setPosition(const QString& position )
+void PreviewOptions::setPosition(const TQString& position )
{
radioEditor->setChecked(true);
if ( position == "Toolview" ) radioToolview->setChecked(true);
}
-QString PreviewOptions::position()
+TQString PreviewOptions::position()
{
- QString position = "Editor";
+ TQString position = "Editor";
if ( radioToolview->isChecked() )
position = "Toolview";
return position;
}
-void PreviewOptions::setDocPosition(const QString &position)
+void PreviewOptions::setDocPosition(const TQString &position)
{
radioNewDocTab->setChecked(true);
if (position == "Toolview") radioSeparateDocView->setChecked(true);
}
-QString PreviewOptions::docPosition()
+TQString PreviewOptions::docPosition()
{
- QString position = "Tab";
+ TQString position = "Tab";
if (radioSeparateDocView->isChecked()) position = "Toolview";
return position;
}
-QString PreviewOptions::layout()
+TQString PreviewOptions::layout()
{
- QString layout = "Custom";
+ TQString layout = "Custom";
if ( resetLayout->isChecked() )
layout = "Default";
return layout;
}
-QString PreviewOptions::closeButtons()
+TQString PreviewOptions::closeButtons()
{
- QString closeButtonState = "ShowAlways";
+ TQString closeButtonState = "ShowAlways";
if (radioDelayedCloseButtons->isChecked())
closeButtonState = "ShowDelayed";
if (radioNoCloseButtons->isChecked())
@@ -82,7 +82,7 @@ QString PreviewOptions::closeButtons()
return closeButtonState;
}
-void PreviewOptions::setCloseButtons(const QString &state)
+void PreviewOptions::setCloseButtons(const TQString &state)
{
if (state == "ShowAlways") radioShowCloseButtons->setChecked(true);
if (state == "ShowDelayed") radioDelayedCloseButtons->setChecked(true);
diff --git a/quanta/dialogs/settings/previewoptions.h b/quanta/dialogs/settings/previewoptions.h
index cb1f6719..3cc5b820 100644
--- a/quanta/dialogs/settings/previewoptions.h
+++ b/quanta/dialogs/settings/previewoptions.h
@@ -25,21 +25,21 @@ class KConfig;
class PreviewOptions : public PreviewOptionsS {
Q_OBJECT
public:
- PreviewOptions(QWidget *parent=0, const char *name=0);
+ PreviewOptions(TQWidget *parent=0, const char *name=0);
~PreviewOptions();
- QString position();
- QString layout();
- QString closeButtons();
- QString docPosition();
+ TQString position();
+ TQString layout();
+ TQString closeButtons();
+ TQString docPosition();
uint toolviewTabs();
bool hiddenFiles();
bool saveTrees();
- void setPosition(const QString&);
- void setWindowLayout(const QString&);
- void setCloseButtons(const QString&);
+ void setPosition(const TQString&);
+ void setWindowLayout(const TQString&);
+ void setCloseButtons(const TQString&);
void setToolviewTabs(uint);
- void setDocPosition(const QString&);
+ void setDocPosition(const TQString&);
void setHiddenFiles(bool show);
void setSaveTrees(bool show);
diff --git a/quanta/dialogs/specialchardialog.cpp b/quanta/dialogs/specialchardialog.cpp
index e8f662ea..200b5afe 100644
--- a/quanta/dialogs/specialchardialog.cpp
+++ b/quanta/dialogs/specialchardialog.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qtextstream.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kstandarddirs.h>
@@ -28,16 +28,16 @@
#include "specialchardialog.h"
#include "resource.h"
-SpecialCharDialog::SpecialCharDialog( QWidget* parent, const char* name, bool modal, WFlags fl)
+SpecialCharDialog::SpecialCharDialog( TQWidget* parent, const char* name, bool modal, WFlags fl)
:SpecialCharDialogS( parent, name, modal, fl )
{
- connect ( FilterLineEdit, SIGNAL(textChanged(const QString&)),
- SLOT(filterChars(const QString&)) );
- connect ( CharsListBox, SIGNAL(doubleClicked(QListBoxItem*)),
- SLOT(insertCode()) );
- connect (buttonOk, SIGNAL(clicked()), SLOT(insertCode()));
- connect (buttonChar, SIGNAL(clicked()), SLOT(insertChar()));
- connect (buttonCancel, SIGNAL(clicked()), SLOT(cancel()));
+ connect ( FilterLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(filterChars(const TQString&)) );
+ connect ( CharsListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)),
+ TQT_SLOT(insertCode()) );
+ connect (buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(insertCode()));
+ connect (buttonChar, TQT_SIGNAL(clicked()), TQT_SLOT(insertChar()));
+ connect (buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancel()));
filterChars("");
}
@@ -45,13 +45,13 @@ SpecialCharDialog::~SpecialCharDialog()
{
}
-void SpecialCharDialog::filterChars(const QString& filter)
+void SpecialCharDialog::filterChars(const TQString& filter)
{
CharsListBox->clear();
if (filter.isEmpty())
CharsListBox->insertStringList(charList);
else {
- for (QStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it)
+ for (TQStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it)
if ( (*it).contains(filter, false) )
CharsListBox->insertItem(*it);
}
@@ -59,30 +59,30 @@ void SpecialCharDialog::filterChars(const QString& filter)
CharsListBox->setCurrentItem(0);
}
-QString SpecialCharDialog::selection()
+TQString SpecialCharDialog::selection()
{
return m_selection;
}
void SpecialCharDialog::insertCode()
{
- QString selected = CharsListBox->text(CharsListBox->currentItem());
+ TQString selected = CharsListBox->text(CharsListBox->currentItem());
int begin = selected.find("(&")+1;
int length = selected.find(";)") - begin + 1;
m_selection = selected.mid(begin, length);
- done(QDialog::Accepted);
+ done(TQDialog::Accepted);
}
void SpecialCharDialog::insertChar()
{
m_selection = CharsListBox->text(CharsListBox->currentItem()).left(1);
- done(QDialog::Accepted);
+ done(TQDialog::Accepted);
}
void SpecialCharDialog::cancel()
{
m_selection = "";
- done(QDialog::Rejected);
+ done(TQDialog::Rejected);
}
#include "specialchardialog.moc"
diff --git a/quanta/dialogs/specialchardialog.h b/quanta/dialogs/specialchardialog.h
index 23e5dc8d..4155e081 100644
--- a/quanta/dialogs/specialchardialog.h
+++ b/quanta/dialogs/specialchardialog.h
@@ -18,7 +18,7 @@
#ifndef SPECIALCHARDIALOG_H
#define SPECIALCHARDIALOG_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include "specialchardialogs.h"
class SpecialCharDialog : public SpecialCharDialogS
@@ -27,12 +27,12 @@ class SpecialCharDialog : public SpecialCharDialogS
public:
- SpecialCharDialog( QWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0);
+ SpecialCharDialog( TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0);
~SpecialCharDialog();
- QString selection();
+ TQString selection();
public slots:
- void filterChars(const QString&);
+ void filterChars(const TQString&);
void insertChar();
void insertCode();
void cancel();
@@ -40,7 +40,7 @@ public slots:
private slots:
private:
- QString m_selection;
+ TQString m_selection;
};
#endif
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 <stdio.h>
#include <stdlib.h>
-#include <qdrawutil.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqdrawutil.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
-#include <qvalidator.h>
-#include <qpainter.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqvalidator.h>
+#include <tqpainter.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <kcolordialog.h>
#include <kconfig.h>
@@ -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 <qcombobox.h>
+#include <tqcombobox.h>
#include <kdialogbase.h>
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <kcolordialog.h>
#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 <qdict.h>
-#include <qlineedit.h>
+#include <tqdict.h>
+#include <tqlineedit.h>
-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<QString> *d )
+void CoreWidgetDlg::readAttributes( TQDict<TQString> *d )
{
dict = d;
@@ -43,10 +43,10 @@ void CoreWidgetDlg::readAttributes( QDict<QString> *d )
}
-void CoreWidgetDlg::writeAttributes( QDict<QString> *d )
+void CoreWidgetDlg::writeAttributes( TQDict<TQString> *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 <klocale.h>
//qt includes
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
-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 <qimage.h>
+#include "tqpainter.h"
+#include <tqimage.h>
-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 <qwidget.h>
-#include <qframe.h>
+#include <tqwidget.h>
+#include <tqframe.h>
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 <klineedit.h>
//qt includes
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
//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; i<combo->count(); 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 <qstring.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqdom.h>
//kde includes
#include <klineedit.h>
@@ -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 <qdir.h>
-#include <qfileinfo.h>
-#include <qevent.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqevent.h>
// include kde headers
#include <klocale.h>
@@ -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<QString>(1,false);
+ dict = new TQDict<TQString>(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 = "<!DOCTYPE TAGS>\n<TAGS>\n";
- docString += QString("<tag name=\"%1\">\n").arg(dtdTag->name());
+ TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n";
+ docString += TQString("<tag name=\"%1\">\n").arg(dtdTag->name());
docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes());
docString += "</tag>\n</TAGS>\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<Tagxml>();
+ extraPageList = new TQPtrList<Tagxml>();
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 = "<!DOCTYPE TAGS>\n<TAGS>\n";
- docString += QString("<tag name=\"Page%1\">\n").arg(i);
+ TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n";
+ docString += TQString("<tag name=\"Page%1\">\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 << "<attr name=\"" << el.attribute("name") << "\" type=\"" << el.attribute("type", "input");
str << "\" source=\"" << el.attribute("source");
@@ -247,10 +247,10 @@ void TagDialog::parseTag()
str << " <text>" << el.attribute("name") << "</text>" << endl;
str << " <textlocation col=\"0\" row=\"" << row << "\" />" << endl;
str << " <location col=\"1\" row=\"" << row << "\" />" << 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<QString> format*/
-QDict<QString> * TagDialog::getAttributes()
+/** Return the attributes in TQDict<TQString> format*/
+TQDict<TQString> * TagDialog::getAttributes()
{
return dict;
}
/** Return all the attributes in one string*/
-QString TagDialog::getAttributeString()
+TQString TagDialog::getAttributeString()
{
- QDictIterator<QString> it( *dict );
+ TQDictIterator<TQString> 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("</")+QuantaCommon::tagCase(dtdTag->name())+">";
+ TQString secondPartOfTag = TQString("</")+QuantaCommon::tagCase(dtdTag->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<QString> it( *dict );
+ TQString attrStr("");
+ TQDictIterator<TQString> 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<Tagxml*>(mainDlg))
static_cast<Tagxml*>(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 <qwidget.h>
-#include <qtabdialog.h>
-#include <qdict.h>
-#include <qstrlist.h>
+#include <tqwidget.h>
+#include <tqtabdialog.h>
+#include <tqdict.h>
+#include <tqstrlist.h>
#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<QString> format*/
- QDict<QString> * getAttributes();
+ /** Return the attributes in TQDict<TQString> format*/
+ TQDict<TQString> * 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<QString> *dict;
+ TQDict<TQString> *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<Tagxml> *extraPageList;
+ TQPtrList<Tagxml> *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 <qspinbox.h>
-#include <qimage.h>
+#include <tqspinbox.h>
+#include <tqimage.h>
//kde includes
#include <kapplication.h>
#include <klocale.h>
@@ -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<QString> *d )
+void TagImgDlg::readAttributes( TQDict<TQString> *d )
{
dict = d;
@@ -140,10 +140,10 @@ void TagImgDlg::readAttributes( QDict<QString> *d )
updateDict("border",spinBorder );
}
-void TagImgDlg::writeAttributes( QDict<QString> *d )
+void TagImgDlg::writeAttributes( TQDict<TQString> *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 <qwidget.h>
-#include <qlabel.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
//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<QString> *d );
- void writeAttributes( QDict<QString> *d );
+ void readAttributes( TQDict<TQString> *d );
+ void writeAttributes( TQDict<TQString> *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 <knumvalidator.h>
#include <kiconloader.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
#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 <kabc/stdaddressbook.h>
//qt includes
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kpushbutton.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
-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 <klocale.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
-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 <qbuttongroup.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqgroupbox.h>
-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 <qwidget.h>
+#include <tqwidget.h>
-#include <qdialog.h>
+#include <tqdialog.h>
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 <kapplication.h>
#include <klocale.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include "tagquicklistdlg.h"
-#include <qspinbox.h>
-#include <qlabel.h>
+#include <tqspinbox.h>
+#include <tqlabel.h>
#include <kpushbutton.h>
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
#include <kstdguiitem.h>
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 <qcombobox.h>
+#include <tqcombobox.h>
#include <klineedit.h>
-#include <qstring.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
// KDE files
#include <kcolorbutton.h>
@@ -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 <qwidget.h>
-#include <qdict.h>
+#include <tqwidget.h>
+#include <tqdict.h>
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<QString> *) {};
- virtual void writeAttributes(QDict<QString> *) {};
- 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<TQString> *) {};
+ virtual void writeAttributes(TQDict<TQString> *) {};
+ 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<QString> *dict; // dictionary of attributes and values
+ TQDict<TQString> *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 <kdebug.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#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<QString> *d )
+void Tagxml::readAttributes( TQDict<TQString> *d )
{
- QString name,value;
+ TQString name,value;
Attr * attr = attributes.first();
while ( attr ) {
@@ -270,10 +270,10 @@ void Tagxml::readAttributes( QDict<QString> *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 <input disabled="false">, 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 <input disabled="false">, so if a checkbox is false, don't put in the tag at all
}
}
else
@@ -283,16 +283,16 @@ void Tagxml::readAttributes( QDict<QString> *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_file *>(attr))
{
// value = KURL::encode_string(value);
- d->replace(name, new QString(value));
+ d->replace(name, new TQString(value));
} else {
- value.replace(QRegExp("&(?!amp;)"), "&amp;");
- d->replace(name, new QString(value) );
+ value.replace(TQRegExp("&(?!amp;)"), "&amp;");
+ d->replace(name, new TQString(value) );
}
}
@@ -302,9 +302,9 @@ void Tagxml::readAttributes( QDict<QString> *d )
}
-void Tagxml::writeAttributes( QDict<QString> *d )
+void Tagxml::writeAttributes( TQDict<TQString> *d )
{
- QString name,value;
+ TQString name,value;
Attr * attr = attributes.first();
@@ -313,7 +313,7 @@ void Tagxml::writeAttributes( QDict<QString> *d )
name = attr->attrName();
- QString *v = d->find(name);
+ TQString *v = d->find(name);
if ( v ) {
v->replace("&amp;","&");
if ( dynamic_cast<Attr_check *>(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 <qwidget.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
#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<Attr> attributes;
+ TQPtrList<Attr> attributes;
- void readAttributes( QDict<QString> *d);
- void writeAttributes( QDict<QString> *d );
+ void readAttributes( TQDict<TQString> *d);
+ void writeAttributes( TQDict<TQString> *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;
};
diff --git a/quanta/messages/annotationoutput.cpp b/quanta/messages/annotationoutput.cpp
index 8c8d7d90..48ebb7fd 100644
--- a/quanta/messages/annotationoutput.cpp
+++ b/quanta/messages/annotationoutput.cpp
@@ -10,15 +10,15 @@
//
//
-#include <qdict.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qheader.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qtimer.h>
+#include <tqdict.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqheader.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kio/netaccess.h>
@@ -35,7 +35,7 @@
#include "quantacommon.h"
#include "viewmanager.h"
-AnnotationOutput::AnnotationOutput(QWidget *parent, const char *name)
+AnnotationOutput::AnnotationOutput(TQWidget *parent, const char *name)
: KTabWidget(parent, name)
{
m_currentFileAnnotations = new MessageOutput(this);
@@ -50,7 +50,7 @@ AnnotationOutput::AnnotationOutput(QWidget *parent, const char *name)
m_yourAnnotations->setLineWidth(2);
addTab(m_yourAnnotations, i18n("For You"));
- connect(m_yourAnnotations, SIGNAL(executed(QListViewItem*)), SLOT(yourAnnotationsItemExecuted(QListViewItem *)));
+ connect(m_yourAnnotations, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(yourAnnotationsItemExecuted(TQListViewItem *)));
m_allAnnotations = new KListView(this);
m_allAnnotations->addColumn("1", -1);
@@ -59,14 +59,14 @@ AnnotationOutput::AnnotationOutput(QWidget *parent, const char *name)
m_allAnnotations->header()->hide();
m_allAnnotations->setSorting(1);
m_allAnnotations->setLineWidth(2);
- connect(m_allAnnotations, SIGNAL(executed(QListViewItem*)), SLOT(allAnnotationsItemExecuted(QListViewItem *)));
+ connect(m_allAnnotations, TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(allAnnotationsItemExecuted(TQListViewItem *)));
addTab(m_allAnnotations, i18n("All Files"));
- connect(this, SIGNAL(currentChanged(QWidget*)), SLOT(tabChanged(QWidget*)));
+ connect(this, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(tabChanged(TQWidget*)));
- m_updateTimer = new QTimer(this);
- connect(m_updateTimer, SIGNAL(timeout()), this, SLOT(slotUpdateNextFile()));
+ m_updateTimer = new TQTimer(this);
+ connect(m_updateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdateNextFile()));
m_yourAnnotationsNum = 0;
}
@@ -75,16 +75,16 @@ AnnotationOutput::~AnnotationOutput()
{
}
-void AnnotationOutput::tabChanged(QWidget *w)
+void AnnotationOutput::tabChanged(TQWidget *w)
{
if (w == m_allAnnotations || w == m_yourAnnotations)
readAnnotations();
}
-void AnnotationOutput::insertAnnotation(uint line, const QString& fileName, const QPair<QString, QString>& annotation)
+void AnnotationOutput::insertAnnotation(uint line, const TQString& fileName, const QPair<TQString, TQString>& annotation)
{
line++;
- QString s = i18n("Line %1: %2").arg(line).arg(annotation.first);
+ TQString s = i18n("Line %1: %2").arg(line).arg(annotation.first);
s.replace('\n', ' ');
m_currentFileAnnotations->showMessage(line, 1, fileName, s);
}
@@ -106,8 +106,8 @@ void AnnotationOutput::readAnnotations()
}
KURL baseURL = Project::ref()->projectBaseURL();
- QStringList openedItems;
- QListViewItem *item = m_allAnnotations->firstChild();
+ TQStringList openedItems;
+ TQListViewItem *item = m_allAnnotations->firstChild();
while (item)
{
if (item->isOpen())
@@ -119,7 +119,7 @@ void AnnotationOutput::readAnnotations()
m_fileNames.clear();
m_lines.clear();
- QStringList yourOpenedItems;
+ TQStringList yourOpenedItems;
item = m_yourAnnotations->firstChild();
while (item)
{
@@ -134,17 +134,17 @@ void AnnotationOutput::readAnnotations()
m_yourLines.clear();
m_yourAnnotationsNum = 0;
- QDomElement annotationElement = Project::ref()->dom()->firstChild().firstChild().namedItem("annotations").toElement();
+ TQDomElement annotationElement = Project::ref()->dom()->firstChild().firstChild().namedItem("annotations").toElement();
if (annotationElement.isNull())
return;
- QString yourself = Project::ref()->yourself().lower();
- QStringList roles = Project::ref()->yourRoles();
- QDomNodeList nodes = annotationElement.childNodes();
+ TQString yourself = Project::ref()->yourself().lower();
+ TQStringList roles = Project::ref()->yourRoles();
+ TQDomNodeList nodes = annotationElement.childNodes();
int count = nodes.count();
for (int i = 0; i < count; i++)
{
- QDomElement el = nodes.item(i).toElement();
- QString fileName = el.attribute("url");
+ TQDomElement el = nodes.item(i).toElement();
+ TQString fileName = el.attribute("url");
KURL u = baseURL;
QuantaCommon::setUrl(u, fileName);
u = QExtFileInfo::toAbsolute(u, baseURL);
@@ -152,13 +152,13 @@ void AnnotationOutput::readAnnotations()
{
bool ok;
int line = el.attribute("line").toInt(&ok, 10);
- QString text = el.attribute("text");
- QString receiver = el.attribute("receiver");
+ TQString text = el.attribute("text");
+ TQString receiver = el.attribute("receiver");
text.replace('\n',' ');
- QString lineText = QString("%1").arg(line);
+ TQString lineText = TQString("%1").arg(line);
if (lineText.length() < 20)
{
- QString s;
+ TQString s;
s.fill('0', 20 - lineText.length());
lineText.prepend(s);
}
@@ -205,7 +205,7 @@ void AnnotationOutput::readAnnotations()
}
}
-void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap<uint, QPair<QString, QString> > &a_annotations)
+void AnnotationOutput::writeAnnotations(const TQString &fileName, const TQMap<uint, QPair<TQString, TQString> > &a_annotations)
{
m_annotatedFileItems.clear();
m_fileNames.clear();
@@ -215,23 +215,23 @@ void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap<uint
m_yourLines.clear();
bool modified = false;
- QMap<uint, QPair<QString, QString> > annotations = a_annotations;
- QDomDocument *dom = Project::ref()->dom();
- QDomElement annotationElement = dom->firstChild().firstChild().namedItem("annotations").toElement();
+ TQMap<uint, QPair<TQString, TQString> > annotations = a_annotations;
+ TQDomDocument *dom = Project::ref()->dom();
+ TQDomElement annotationElement = dom->firstChild().firstChild().namedItem("annotations").toElement();
if (annotationElement.isNull())
{
annotationElement = dom->createElement("annotations");
dom->firstChild().firstChild().appendChild(annotationElement);
}
- QDomNode n = annotationElement.firstChild();
+ TQDomNode n = annotationElement.firstChild();
while ( !n.isNull() )
{
- QDomElement el = n.toElement();
- QString fName = el.attribute("url");
- QDomNode n2 = n.nextSibling();
+ TQDomElement el = n.toElement();
+ TQString fName = el.attribute("url");
+ TQDomNode n2 = n.nextSibling();
if (fileName == fName)
{
- QString text = el.attribute("text");
+ TQString text = el.attribute("text");
bool ok;
int line = el.attribute("line").toInt(&ok, 10);
if (!annotations.contains(line) || (annotations[line].first != text))
@@ -243,9 +243,9 @@ void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap<uint
}
n = n2;
}
- for (QMap<uint, QPair<QString, QString> >::ConstIterator it = annotations.constBegin(); it != annotations.constEnd(); ++it)
+ for (TQMap<uint, QPair<TQString, TQString> >::ConstIterator it = annotations.constBegin(); it != annotations.constEnd(); ++it)
{
- QDomElement el = dom->createElement("annotation");
+ TQDomElement el = dom->createElement("annotation");
el.setAttribute("url", fileName);
el.setAttribute("line", it.key());
el.setAttribute("text", it.data().first);
@@ -259,7 +259,7 @@ void AnnotationOutput::writeAnnotations(const QString &fileName, const QMap<uint
readAnnotations();
}
-void AnnotationOutput::allAnnotationsItemExecuted(QListViewItem *item)
+void AnnotationOutput::allAnnotationsItemExecuted(TQListViewItem *item)
{
if (dynamic_cast<KListView*> (item->parent()) != m_allAnnotations)
{
@@ -268,7 +268,7 @@ void AnnotationOutput::allAnnotationsItemExecuted(QListViewItem *item)
emit clicked(m_fileNames[item], 0, 0);
}
-void AnnotationOutput::yourAnnotationsItemExecuted(QListViewItem *item)
+void AnnotationOutput::yourAnnotationsItemExecuted(TQListViewItem *item)
{
if (dynamic_cast<KListView*> (item->parent()) != m_yourAnnotations)
{
@@ -292,25 +292,25 @@ void AnnotationOutput::updateAnnotations()
void AnnotationOutput::updateAnnotationForFile(const KURL& url)
{
- static const QRegExp rx("-->|\\*/");
+ static const TQRegExp rx("-->|\\*/");
if (!ViewManager::ref()->isOpened(url) && QuantaCommon::checkMimeGroup(url, "text" ))
{
// kdDebug(24000) << "Testing " << url << endl;
- QFile f(url.path());
+ TQFile f(url.path());
if (f.open(IO_ReadOnly))
{
- QMap<uint, QPair<QString, QString> > annotations;
+ TQMap<uint, QPair<TQString, TQString> > annotations;
uint i = 0;
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString line;
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString line;
while (!stream.atEnd())
{
line = stream.readLine();
int pos = line.find("@annotation");
if (pos != -1)
{
- QString receiver;
+ TQString receiver;
pos += 11;
if (line[pos] == '(')
{
diff --git a/quanta/messages/annotationoutput.h b/quanta/messages/annotationoutput.h
index 0c5ab748..50e293d6 100644
--- a/quanta/messages/annotationoutput.h
+++ b/quanta/messages/annotationoutput.h
@@ -38,12 +38,12 @@ class AnnotationOutput : public KTabWidget
{
Q_OBJECT
public:
- AnnotationOutput(QWidget *parent = 0, const char *name = 0);
+ AnnotationOutput(TQWidget *parent = 0, const char *name = 0);
~AnnotationOutput();
MessageOutput *currentFileAnnotations() const {return m_currentFileAnnotations;}
KListView *allAnnotations() const {return m_allAnnotations;}
- void writeAnnotations(const QString &fileName, const QMap<uint, QPair<QString, QString> > &annotations);
+ void writeAnnotations(const TQString &fileName, const TQMap<uint, QPair<TQString, TQString> > &annotations);
public slots:
/**
@@ -52,16 +52,16 @@ public slots:
void updateAnnotations();
void readAnnotations();
void clearAnnotations();
- void insertAnnotation(uint line, const QString& fileName, const QPair<QString, QString>& annotation);
+ void insertAnnotation(uint line, const TQString& fileName, const QPair<TQString, TQString>& annotation);
private slots:
- void tabChanged(QWidget *w);
- void allAnnotationsItemExecuted(QListViewItem *item);
- void yourAnnotationsItemExecuted(QListViewItem *item);
+ void tabChanged(TQWidget *w);
+ void allAnnotationsItemExecuted(TQListViewItem *item);
+ void yourAnnotationsItemExecuted(TQListViewItem *item);
void slotUpdateNextFile();
signals:
- void clicked(const QString& fname, int line, int col);
+ void clicked(const TQString& fname, int line, int col);
private:
/**
@@ -72,17 +72,17 @@ private:
MessageOutput *m_currentFileAnnotations;
KListView *m_allAnnotations;
- QDict<KListViewItem> m_annotatedFileItems;
- QMap<QListViewItem*, QString> m_fileNames;
- QMap<QListViewItem*, uint> m_lines;
+ TQDict<KListViewItem> m_annotatedFileItems;
+ TQMap<TQListViewItem*, TQString> m_fileNames;
+ TQMap<TQListViewItem*, uint> m_lines;
uint m_yourAnnotationsNum;
KListView *m_yourAnnotations;
- QDict<KListViewItem> m_yourFileItems;
- QMap<QListViewItem*, QString> m_yourFileNames;
- QMap<QListViewItem*, uint> m_yourLines;
+ TQDict<KListViewItem> m_yourFileItems;
+ TQMap<TQListViewItem*, TQString> m_yourFileNames;
+ TQMap<TQListViewItem*, uint> m_yourLines;
- QTimer *m_updateTimer;
+ TQTimer *m_updateTimer;
KURL::List m_files;
uint m_fileIndex;
};
diff --git a/quanta/messages/messageitem.cpp b/quanta/messages/messageitem.cpp
index 7f906041..dc1c7ad8 100644
--- a/quanta/messages/messageitem.cpp
+++ b/quanta/messages/messageitem.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
#include "messageitem.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <klocale.h>
-MessageItem::MessageItem( QListBox * listbox, const QString &text, int line, int column, const QString &fname )
- :QListBoxText(listbox,text),lineNumber(line),columnNumber(column),filename(fname)
+MessageItem::MessageItem( TQListBox * listbox, const TQString &text, int line, int column, const TQString &fname )
+ :TQListBoxText(listbox,text),lineNumber(line),columnNumber(column),filename(fname)
{
}
@@ -30,14 +30,14 @@ int MessageItem::line()
return lineNumber;
}
else { // try to find first number in text
- QString s = text();
- int pos = s.find( QRegExp("[0-9]"));
+ TQString s = text();
+ int pos = s.find( TQRegExp("[0-9]"));
if ( pos == -1 )
return lineNumber;
int pos2 = pos;
while ( s[pos2].isDigit() ) pos2++;
- QString snum = s.mid(pos, pos2-pos);
+ TQString snum = s.mid(pos, pos2-pos);
return snum.toInt();
}
@@ -50,8 +50,8 @@ int MessageItem::column()
return columnNumber;
} else
{
- QString s = text();
- QRegExp exp("(?:\\D|^)(\\d{1,4})(?:\\D|$)");
+ TQString s = text();
+ TQRegExp exp("(?:\\D|^)(\\d{1,4})(?:\\D|$)");
int pos = exp.search(s);
if ( pos == -1 )
@@ -64,12 +64,12 @@ int MessageItem::column()
}
}
-QString MessageItem::fileName()
+TQString MessageItem::fileName()
{
if (filename.isEmpty())
{
- QString fname;
- QString s = text();
+ TQString fname;
+ TQString s = text();
int pos = s.find(i18n("File: "));
if (pos != -1)
{
@@ -85,7 +85,7 @@ QString MessageItem::fileName()
return filename;
}
-void MessageItem::addText(const QString &t)
+void MessageItem::addText(const TQString &t)
{
setText( text() + t );
}
diff --git a/quanta/messages/messageitem.h b/quanta/messages/messageitem.h
index 01e04b35..64894e25 100644
--- a/quanta/messages/messageitem.h
+++ b/quanta/messages/messageitem.h
@@ -19,34 +19,34 @@
#ifndef MESSAGEITEM_H
#define MESSAGEITEM_H
-#include <qlistbox.h>
+#include <tqlistbox.h>
/**
- Like QListBoxText with storing of filename and line in it.
+ Like TQListBoxText with storing of filename and line in it.
*/
-class MessageItem : public QListBoxText {
+class MessageItem : public TQListBoxText {
public:
- MessageItem( QListBox *listbox, const QString &text = QString::null, int line = -1, int column = -1, const QString &fname = QString::null);
+ MessageItem( TQListBox *listbox, const TQString &text = TQString::null, int line = -1, int column = -1, const TQString &fname = TQString::null);
/** return line number for file , associated with this message */
int line();
/** return column number for file , associated with this message */
int column();
/** return name of file , associated with this message */
- QString fileName();
+ TQString fileName();
void setLine(int line) { lineNumber = line; }
void setColumn(int line) { columnNumber = line; }
- void setFileName(const QString &fileName ) { filename = fileName; }
- void addText(const QString &text);
+ void setFileName(const TQString &fileName ) { filename = fileName; }
+ void addText(const TQString &text);
private:
// line number and filename , associated with this line
int lineNumber; ///< the line of the item. -1 if not defined
int columnNumber; ///< the column of the item. -1 if not defined
- QString filename; ///< the filename (URL) of the item. Empty if not defined
+ TQString filename; ///< the filename (URL) of the item. Empty if not defined
};
diff --git a/quanta/messages/messageoutput.cpp b/quanta/messages/messageoutput.cpp
index 6b89aaa9..de4627ca 100644
--- a/quanta/messages/messageoutput.cpp
+++ b/quanta/messages/messageoutput.cpp
@@ -25,40 +25,40 @@
#include <kiconloader.h>
// Qt includes
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include "messageoutput.h"
#include "messageitem.h"
-MessageOutput::MessageOutput(QWidget *parent, const char *name )
- : QListBox(parent,name)
+MessageOutput::MessageOutput(TQWidget *parent, const char *name )
+ : TQListBox(parent,name)
{
m_maxItems = 2000;
- QPalette pal = palette();
- pal.setColor(QColorGroup::HighlightedText, pal.color(QPalette::Normal, QColorGroup::Text));
- pal.setColor(QColorGroup::Highlight, pal.color(QPalette::Normal, QColorGroup::Mid));
+ TQPalette pal = palette();
+ pal.setColor(TQColorGroup::HighlightedText, pal.color(TQPalette::Normal, TQColorGroup::Text));
+ pal.setColor(TQColorGroup::Highlight, pal.color(TQPalette::Normal, TQColorGroup::Mid));
setPalette(pal);
setFocusPolicy( NoFocus );
m_popupMenu = new KPopupMenu(this);
- connect(this, SIGNAL(contextMenuRequested(QListBoxItem*, const QPoint&)),
- this, SLOT(showMenu(QListBoxItem*, const QPoint&)));
- m_popupMenu->insertItem( SmallIconSet("editcopy"), i18n("&Copy"), this, SLOT(copyContent()) ) ;
- m_popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save As..."), this, SLOT(saveContent()) ) ;
+ connect(this, TQT_SIGNAL(contextMenuRequested(TQListBoxItem*, const TQPoint&)),
+ this, TQT_SLOT(showMenu(TQListBoxItem*, const TQPoint&)));
+ m_popupMenu->insertItem( SmallIconSet("editcopy"), i18n("&Copy"), this, TQT_SLOT(copyContent()) ) ;
+ m_popupMenu->insertItem( SmallIconSet("filesaveas"), i18n("&Save As..."), this, TQT_SLOT(saveContent()) ) ;
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem( SmallIconSet("editclear"), i18n("Clear"), this, SLOT(clear()) ) ;
+ m_popupMenu->insertItem( SmallIconSet("editclear"), i18n("Clear"), this, TQT_SLOT(clear()) ) ;
- connect( this, SIGNAL(clicked(QListBoxItem*)), SLOT(clickItem(QListBoxItem*)) );
+ connect( this, TQT_SIGNAL(clicked(TQListBoxItem*)), TQT_SLOT(clickItem(TQListBoxItem*)) );
}
MessageOutput::~MessageOutput()
{
}
-MessageItem *MessageOutput::insertItem(const QString& s)
+MessageItem *MessageOutput::insertItem(const TQString& s)
{
checkMaxItems();
MessageItem *it = new MessageItem(this, s);
@@ -66,7 +66,7 @@ MessageItem *MessageOutput::insertItem(const QString& s)
return it;
}
-void MessageOutput::addToLastItem(const QString& s)
+void MessageOutput::addToLastItem(const TQString& s)
{
int ind = count() - 1;
if ( ind != -1 ) {
@@ -78,10 +78,10 @@ void MessageOutput::addToLastItem(const QString& s)
}
}
-void MessageOutput::showMessage(int line, int col, const QString &fileName, const QString& s, bool append)
+void MessageOutput::showMessage(int line, int col, const TQString &fileName, const TQString& s, bool append)
{
MessageItem *it = 0L;
- QString message = s;
+ TQString message = s;
int endPos;
if ( !count() || (!append && !text(count()-1).stripWhiteSpace().isEmpty()) )
it = insertItem("");
@@ -109,7 +109,7 @@ void MessageOutput::showMessage(int line, int col, const QString &fileName, cons
setBottomItem(count()>0?count()-1:0);
}
-void MessageOutput::showMessage(const QString& s, bool append)
+void MessageOutput::showMessage(const TQString& s, bool append)
{
showMessage(-1, -1, "", s, append);
}
@@ -121,7 +121,7 @@ void MessageOutput::checkMaxItems()
removeItem( index(firstItem()) );
}
-void MessageOutput::clickItem( QListBoxItem * l_item )
+void MessageOutput::clickItem( TQListBoxItem * l_item )
{
MessageItem *item = dynamic_cast<MessageItem*>(l_item);
if ( item ) {
@@ -131,14 +131,14 @@ void MessageOutput::clickItem( QListBoxItem * l_item )
}
}
-void MessageOutput::showMenu( QListBoxItem*, const QPoint& l_point )
+void MessageOutput::showMenu( TQListBoxItem*, const TQPoint& l_point )
{
m_popupMenu->exec(l_point);
}
-QString MessageOutput::content()
+TQString MessageOutput::content()
{
- QString p_content;
+ TQString p_content;
for (uint i=0; i<count(); i++)
p_content.append(text(i) + "\n");
return p_content;
@@ -151,25 +151,25 @@ void MessageOutput::copyContent()
void MessageOutput::saveContent()
{
- KURL url=KFileDialog::getSaveURL(QDir::currentDirPath(),
+ KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(),
i18n("*.log|Log Files (*.log)\n*|All Files"), this, i18n("Save Log File"));
if (url.isEmpty())
return;
- QFileInfo fileinfo(url.path());
+ TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::warningContinueCancel(0,
i18n("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .arg(url.path()), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ .arg(url.path()), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
return;
- QFile file(url.path());
+ TQFile file(url.path());
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("<qt>Cannot save log file<br><b>%1</b></qt>")
.arg(url.url()));
return;
}
- QTextStream textfile(&file);
+ TQTextStream textfile(&file);
textfile << content();
file.close();
diff --git a/quanta/messages/messageoutput.h b/quanta/messages/messageoutput.h
index 223470bd..125b85e2 100644
--- a/quanta/messages/messageoutput.h
+++ b/quanta/messages/messageoutput.h
@@ -18,7 +18,7 @@
#ifndef MESSAGEOUTPUT_H
#define MESSAGEOUTPUT_H
-#include <qlistbox.h>
+#include <tqlistbox.h>
class KProcess;
class KPopupMenu;
@@ -30,17 +30,17 @@ weblint output
*@author Yacovlev Alexander & Dmitry Poplavski
*/
-class MessageOutput : public QListBox {
+class MessageOutput : public TQListBox {
Q_OBJECT
public:
- MessageOutput(QWidget *parent=0, const char *name=0);
+ MessageOutput(TQWidget *parent=0, const char *name=0);
~MessageOutput();
// Return whole content as a single string with EOLs
- QString content();
+ TQString content();
public slots:
/** Inserts an item with the content s to the end of the list*/
- MessageItem *insertItem(const QString& s);
+ MessageItem *insertItem(const TQString& s);
/** Insert message for each line of string (EOL-separated).
@param line The line this message refers to. -1 if it's not specified (the first number is taken from the message string)
@@ -49,19 +49,19 @@ public slots:
@param message The message itself
@param append Append the message to the previous one or start a new line. Default is false, start a new line.
*/
- void showMessage(int line, int column, const QString &fileName, const QString& message, bool append = false);
+ void showMessage(int line, int column, const TQString &fileName, const TQString& message, bool append = false);
/** Insert message for each line of string (EOL-separated).
@param message The message itself
@param append Append the message to the previous one or start a new line. Default is false, start a new line.
*/
- void showMessage(const QString& message, bool append = false);
+ void showMessage(const TQString& message, bool append = false);
/** Append message string to the last item
@param line The line this message refers to. -1 if it's not specified (the first number is taken from the message string)
@param column The column this message refers to. -1 if it's not specified (the second number is taken from the message string)
@param fileName The URL of the file this message refers to. If empty, the string following the "File: " string in the message is used.
@param message The message itself
*/
- void addToLastItem(const QString& message);
+ void addToLastItem(const TQString& message);
// Copy message content to clipboard
void copyContent();
// Save message content to clipboard
@@ -75,12 +75,12 @@ public:
void checkMaxItems();
signals:
- void clicked(const QString& fname, int line, int col);
+ void clicked(const TQString& fname, int line, int col);
protected slots:
- void clickItem( QListBoxItem *);
+ void clickItem( TQListBoxItem *);
// Show context menu
- void showMenu(QListBoxItem*, const QPoint&);
+ void showMenu(TQListBoxItem*, const TQPoint&);
private:
uint m_maxItems;
diff --git a/quanta/parsers/dtd/dtd.cpp b/quanta/parsers/dtd/dtd.cpp
index 18e3d712..964c35fb 100644
--- a/quanta/parsers/dtd/dtd.cpp
+++ b/quanta/parsers/dtd/dtd.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kurl.h>
@@ -34,42 +34,42 @@
#include "../qextfileinfo.h"
-DTD::DTD(const KURL &dtdURL, const QString &dtepDir)
+DTD::DTD(const KURL &dtdURL, const TQString &dtepDir)
{
m_dtdURL = dtdURL;
- m_dtepDir = dtepDir + "/"+QFileInfo(dtdURL.fileName()).baseName(); //TODO: get the dir name from the DTD or from the user
+ m_dtepDir = dtepDir + "/"+TQFileInfo(dtdURL.fileName()).baseName(); //TODO: get the dir name from the DTD or from the user
}
DTD::~DTD()
{
}
-QStringList DTD::getTags()
+TQStringList DTD::getTags()
{
return tags;
}
-AttributeList* DTD::getTagAttributes(QString tag)
+AttributeList* DTD::getTagAttributes(TQString tag)
{
return tagAttributes.find(tag);
}
-QStringList DTD::getTextCompletion(QString tag)
+TQStringList DTD::getTextCompletion(TQString tag)
{
- return QStringList();
+ return TQStringList();
}
void DTD::printContents()
{
- for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) {
- QString tag = *tagIt;
+ for ( TQStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) {
+ TQString tag = *tagIt;
kdDebug(24000) << tag << endl;
AttributeList *attributes = getTagAttributes(tag);
for ( uint i = 0; i < attributes->count(); i++)
{
Attribute *attribute = attributes->at(i);
- QString s = " " + attribute->name + ": ";
+ TQString s = " " + attribute->name + ": ";
for (uint j = 0; j < attribute->values.count(); j++)
{
s += attribute->values[j] + ", ";
@@ -81,7 +81,7 @@ void DTD::printContents()
void DTD::writeTagFiles()
{
- QString dirName = m_dtepDir;
+ TQString dirName = m_dtepDir;
KURL u;
u.setPath(dirName);
if (!QExtFileInfo::createDir(dirName)) {
@@ -89,13 +89,13 @@ void DTD::writeTagFiles()
return;
}
dirName.append("/");
- for ( QStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) {
- QString tag = *tagIt;
+ for ( TQStringList::Iterator tagIt = tags.begin(); tagIt != tags.end(); ++tagIt ) {
+ TQString tag = *tagIt;
- QFile file( dirName + tag.lower() + ".tag" );
+ TQFile file( dirName + tag.lower() + ".tag" );
if ( file.open( IO_WriteOnly ) ) {
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << "<!DOCTYPE TAGS>" << endl
<< "<TAGS>" << endl
<< "<tag name=\"" << tag << "\">" << endl << endl;
@@ -114,31 +114,31 @@ void DTD::writeTagFiles()
KConfig config(dirName + "description.rc");
config.setGroup("General");
- config.writeEntry("Name", QFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the DTD!
- config.writeEntry("NickName", QFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the user!
+ config.writeEntry("Name", TQFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the DTD!
+ config.writeEntry("NickName", TQFileInfo(m_dtdURL.fileName()).baseName()); //TODO: get from the user!
config.sync();
}
bool DTD::parseDTD(const KURL &url)
{
- QString fileName = QString::null;
+ TQString fileName = TQString::null;
if (!KIO::NetAccess::download(url, fileName))
{
KMessageBox::error(0, i18n("<qt>Cannot download the DTD from <b>%1</b>.</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)));
return false;
}
- QFile file(fileName);
+ TQFile file(fileName);
if (file.open(IO_ReadOnly))
{
- QTextStream fileStream(&file);
- fileStream.setEncoding(QTextStream::UnicodeUTF8);
- QString entireDTD = fileStream.read();
+ TQTextStream fileStream(&file);
+ fileStream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString entireDTD = fileStream.read();
file.close();
removeComments(entireDTD);
- QString line;
- QStringList lines = QStringList::split("\n",entireDTD);
- QStringList::Iterator it = lines.begin();
+ TQString line;
+ TQStringList lines = TQStringList::split("\n",entireDTD);
+ TQStringList::Iterator it = lines.begin();
while (it != lines.end()) {
line = *it;
@@ -183,7 +183,7 @@ bool DTD::parseDTD(const KURL &url)
parseDTD(entityURL);
} else
{
- kdDebug(24000) << QString("Unknown tag: [%1]").arg(line) << endl;
+ kdDebug(24000) << TQString("Unknown tag: [%1]").arg(line) << endl;
}
if (it != lines.end()) ++it;
@@ -191,16 +191,16 @@ bool DTD::parseDTD(const KURL &url)
}
}
-void DTD::parseDTDEntity(QString line) {
- QString name;
- QString *value;
+void DTD::parseDTDEntity(TQString line) {
+ TQString name;
+ TQString *value;
line.replace("\\end", " ");
name = line.mid(11);
int firstSpace = name.find(' ');
name = name.remove(firstSpace, name.length()-firstSpace);
- value = new QString(line.mid(11+firstSpace));
+ value = new TQString(line.mid(11+firstSpace));
value->remove(0, value->find("\"")+1);
value->remove(value->findRev("\""), value->length());
@@ -212,17 +212,17 @@ void DTD::parseDTDEntity(QString line) {
//kdDebug() << "Entity --- Name: " << name << " --- Value: " << *value << endl;
}
-void DTD::parseDTDElement(const QString &l) {
- QString name;
- QString *value;
+void DTD::parseDTDElement(const TQString &l) {
+ TQString name;
+ TQString *value;
- QString line = l;
+ TQString line = l;
line.replace("\\end", " ");
name = line.mid(10);
int firstSpace = name.find(' ');
name.remove(firstSpace, name.length()-firstSpace);
- value = new QString(line.mid(10+firstSpace));
+ value = new TQString(line.mid(10+firstSpace));
//value->remove(0, value->find("\"")+1);
value->remove(value->find(">"), 10000);
@@ -232,8 +232,8 @@ void DTD::parseDTDElement(const QString &l) {
if ( name.startsWith("(") && name.endsWith(")") ) {
name.remove(0,1);
name.remove(name.length()-1,1);
- QStringList multipleTags = QStringList::split("|", name);
- QStringList::Iterator it = multipleTags.begin();
+ TQStringList multipleTags = TQStringList::split("|", name);
+ TQStringList::Iterator it = multipleTags.begin();
while(it != multipleTags.end()) {
name = *it;
name = name.stripWhiteSpace();
@@ -249,17 +249,17 @@ void DTD::parseDTDElement(const QString &l) {
}
}
-void DTD::parseDTDAttlist(const QString &l) {
- QString name;
- QString *value;
+void DTD::parseDTDAttlist(const TQString &l) {
+ TQString name;
+ TQString *value;
- QString line = l;
+ TQString line = l;
line.replace("\\end", " ");
name = line.mid(10);
int firstSpace = name.find(' ');
name.remove(firstSpace, name.length()-firstSpace);
- value = new QString(line.mid(10+firstSpace));
+ value = new TQString(line.mid(10+firstSpace));
//value->remove(0, value->find("\"")+1);
value->remove(value->find(">"), 10000);
@@ -269,8 +269,8 @@ void DTD::parseDTDAttlist(const QString &l) {
if ( name.startsWith("(") && name.endsWith(")") ) {
name.remove(0,1);
name.remove(name.length()-1,1);
- QStringList multipleTags = QStringList::split("|", name);
- QStringList::Iterator it = multipleTags.begin();
+ TQStringList multipleTags = TQStringList::split("|", name);
+ TQStringList::Iterator it = multipleTags.begin();
while(it != multipleTags.end()) {
name = *it;
name = name.stripWhiteSpace();
@@ -287,16 +287,16 @@ void DTD::parseDTDAttlist(const QString &l) {
}
-void DTD::parseTagAttributeValues(const QString &name, QString *value) {
+void DTD::parseTagAttributeValues(const TQString &name, TQString *value) {
AttributeList *attributes = new AttributeList();
- QStringList attrLines = QStringList::split("\\end",*value);
- QStringList::Iterator lineIt = attrLines.begin();
+ TQStringList attrLines = TQStringList::split("\\end",*value);
+ TQStringList::Iterator lineIt = attrLines.begin();
while (lineIt != attrLines.end()) //iterate through the attribute lines
{
//split the attribute line
- QStringList all = QStringList::split(" ", *lineIt);
- QStringList::Iterator it = all.begin();
+ TQStringList all = TQStringList::split(" ", *lineIt);
+ TQStringList::Iterator it = all.begin();
while(it != all.end())
{
Attribute *attr = new Attribute();
@@ -304,14 +304,14 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) {
//kdDebug() << "Inserting for tag " << name << ": " << *it << endl;
++it;
- QString values = *it;
+ TQString values = *it;
//list of possible values
if ( values.startsWith("(") && values.endsWith(")") )
{
values.remove(0,1);
values.remove(values.length()-1,1);
- attr->values = QStringList::split("|", values);
- QString s = (attr->values[0]+attr->values[1]).lower();
+ attr->values = TQStringList::split("|", values);
+ TQString s = (attr->values[0]+attr->values[1]).lower();
stripSpaces(&s);
if ((s == "truefalse") || (s == "falsetrue"))
{
@@ -330,7 +330,7 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) {
if (it != all.end())
{
++it;
- QString s=*it;
+ TQString s=*it;
if (s.startsWith("\"") && s.endsWith("\"") && it!=all.end())
{
s.remove(0,1);
@@ -360,13 +360,13 @@ void DTD::parseTagAttributeValues(const QString &name, QString *value) {
tagAttributes.insert(name, attributes);
}
-void DTD::parseDTDReplace(QString *value) {
+void DTD::parseDTDReplace(TQString *value) {
int begin, end;
begin = value->find("%");
end = value->find(";");
while (begin != -1 && end != -1) {
- QString replaceText = value->mid(begin+1, end-begin-1);
- QString *replaceValue = entities.find(replaceText);
+ TQString replaceText = value->mid(begin+1, end-begin-1);
+ TQString *replaceValue = entities.find(replaceText);
if (replaceValue != 0L) {
value->replace(begin, end-begin+1, *replaceValue);
@@ -380,7 +380,7 @@ void DTD::parseDTDReplace(QString *value) {
}
}
-void DTD::stripSpaces(QString *value) {
+void DTD::stripSpaces(TQString *value) {
int index=-1;
while ( (index=value->find(' ',++index)) != -1 ) {
if ( value->findRev('(',index) != -1 && value->find(')',index) != -1)
@@ -388,7 +388,7 @@ void DTD::stripSpaces(QString *value) {
}
}
-void DTD::removeComments(QString &value) {
+void DTD::removeComments(TQString &value) {
int begin, end;
begin = value.find("<!--");
end = value.find("-->",begin+2);
@@ -406,7 +406,7 @@ void DTD::removeComments(QString &value) {
end = value.find("--",begin+2);
}
- value.replace(QRegExp("<!>"), "");
+ value.replace(TQRegExp("<!>"), "");
}
bool DTD::parseDTD()
diff --git a/quanta/parsers/dtd/dtd.h b/quanta/parsers/dtd/dtd.h
index 45b0e213..cc0cf238 100644
--- a/quanta/parsers/dtd/dtd.h
+++ b/quanta/parsers/dtd/dtd.h
@@ -19,7 +19,7 @@
#define DTD_H
//qt includes
-#include <qdict.h>
+#include <tqdict.h>
//app includes
#include "qtag.h"
@@ -30,13 +30,13 @@ class DTD
{
public:
- DTD(const KURL &dtdURL, const QString& dtepDir);
+ DTD(const KURL &dtdURL, const TQString& dtepDir);
~DTD();
public:
- QStringList getTags();
- AttributeList* getTagAttributes(QString tag);
- QStringList getTextCompletion(QString tag);
+ TQStringList getTags();
+ AttributeList* getTagAttributes(TQString tag);
+ TQStringList getTextCompletion(TQString tag);
void printContents();
void writeTagFiles();
/** No descriptions */
@@ -44,21 +44,21 @@ public:
private:
bool parseDTD(const KURL& url);
- void parseDTDEntity(const QString &line);
- void parseDTDElement(const QString &line);
- void parseDTDAttlist(const QString &line);
- void parseTagAttributeValues(const QString &name, QString *value);
- void parseDTDReplace(QString *value);
- void stripSpaces(QString *value);
- void removeComments(QString &value);
+ void parseDTDEntity(const TQString &line);
+ void parseDTDElement(const TQString &line);
+ void parseDTDAttlist(const TQString &line);
+ void parseTagAttributeValues(const TQString &name, TQString *value);
+ void parseDTDReplace(TQString *value);
+ void stripSpaces(TQString *value);
+ void removeComments(TQString &value);
- QDict<QString> entities;
- QDict<QString> elements;
- QStringList tags;
- QDict<AttributeList> tagAttributes;
+ TQDict<TQString> entities;
+ TQDict<TQString> elements;
+ TQStringList tags;
+ TQDict<AttributeList> tagAttributes;
/** From where to load the DTD file. */
KURL m_dtdURL;
- QString m_dtepDir;
+ TQString m_dtepDir;
};
#endif
diff --git a/quanta/parsers/dtd/dtdparser.cpp b/quanta/parsers/dtd/dtdparser.cpp
index 86060967..0d623978 100644
--- a/quanta/parsers/dtd/dtdparser.cpp
+++ b/quanta/parsers/dtd/dtdparser.cpp
@@ -14,13 +14,13 @@
***************************************************************************/
//qt includes
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqstring.h>
//kde includes
#include <kconfig.h>
@@ -51,15 +51,15 @@
namespace DTD
{
- QString dirName;
+ TQString dirName;
xmlDtdPtr dtd_ptr; /* Pointer to the parsed DTD */
- QTextStream entityStream;
+ TQTextStream entityStream;
}
void saveElement(xmlElementPtr elem, xmlBufferPtr buf);
void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf);
-DTDParser::DTDParser(const KURL& dtdURL, const QString &dtepDir)
+DTDParser::DTDParser(const KURL& dtdURL, const TQString &dtepDir)
{
m_dtdURL = dtdURL;
m_dtepDir = dtepDir;
@@ -69,10 +69,10 @@ DTDParser::~DTDParser()
{
}
-bool DTDParser::parse(const QString &targetDir, bool entitiesOnly)
+bool DTDParser::parse(const TQString &targetDir, bool entitiesOnly)
{
bool fineTune = false;
- QString fileName = QString::null;
+ TQString fileName = TQString::null;
if (!KIO::NetAccess::download(m_dtdURL, fileName, 0))
{
KMessageBox::error(0, i18n("<qt>Cannot download the DTD from <b>%1</b>.</qt>").arg( m_dtdURL.prettyURL(0, KURL::StripFileProtocol)));
@@ -81,24 +81,24 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly)
DTD::dtd_ptr = xmlParseDTD(NULL, xmlCharStrndup(fileName.utf8(), fileName.utf8().length()));
if( DTD::dtd_ptr == NULL )
{
- QString errorStr = i18n("Unknown");
+ TQString errorStr = i18n("Unknown");
#ifndef LIBXML_2_5
xmlErrorPtr errorPtr = xmlGetLastError();
if (errorPtr != NULL)
{
- QString s = QString::fromLatin1(errorPtr->message);
+ TQString s = TQString::fromLatin1(errorPtr->message);
if (!s.isEmpty())
errorStr = s;
- s = QString::fromLatin1(errorPtr->str1);
+ s = TQString::fromLatin1(errorPtr->str1);
if (!s.isEmpty())
errorStr += "<br>" + s;
- s = QString::fromLatin1(errorPtr->str2);
+ s = TQString::fromLatin1(errorPtr->str2);
if (!s.isEmpty())
errorStr += "<br>" + s;
- s = QString::fromLatin1(errorPtr->str2);
+ s = TQString::fromLatin1(errorPtr->str2);
if (!s.isEmpty())
errorStr += "<br>" + s;
- errorStr += QString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2);
+ errorStr += TQString("(%1, %2)").arg(errorPtr->line).arg(errorPtr->int2);
xmlResetError(errorPtr);
}
#endif
@@ -110,20 +110,20 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly)
KDialogBase dlg(0L, 0L, true, i18n("DTD - > DTEP Conversion"), KDialogBase::Ok | KDialogBase::Cancel);
DTEPCreationDlg w(&dlg);
dlg.setMainWidget(&w);
- QString name = QString((const char*)DTD::dtd_ptr->name);
+ TQString name = TQString((const char*)DTD::dtd_ptr->name);
if (name == "none")
- name = QFileInfo(m_dtdURL.fileName()).baseName();
+ name = TQFileInfo(m_dtdURL.fileName()).baseName();
w.dtdName->setText(name);
w.nickName->setText(name);
- w.directory->setText(QFileInfo(m_dtdURL.fileName()).baseName());
- w.doctype->setText(QString((const char*)DTD::dtd_ptr->ExternalID));
- w.dtdURL->setText(QString((const char*)DTD::dtd_ptr->SystemID));
+ w.directory->setText(TQFileInfo(m_dtdURL.fileName()).baseName());
+ w.doctype->setText(TQString((const char*)DTD::dtd_ptr->ExternalID));
+ w.dtdURL->setText(TQString((const char*)DTD::dtd_ptr->SystemID));
if (!dlg.exec())
return false;
m_name = w.dtdName->text();
m_nickName = w.nickName->text();
m_doctype = w.doctype->text();
- m_doctype.replace(QRegExp("<!doctype", false), "");
+ m_doctype.replace(TQRegExp("<!doctype", false), "");
m_doctype = m_doctype.left(m_doctype.findRev(">"));
m_dtdURLLine = w.dtdURL->text();
m_defaultExtension = w.defaultExtension->text();
@@ -141,11 +141,11 @@ bool DTDParser::parse(const QString &targetDir, bool entitiesOnly)
DTD::dirName.append("/");
if (DTD::dtd_ptr->entities)
{
- QFile file( DTD::dirName + "entities.tag" );
+ TQFile file( DTD::dirName + "entities.tag" );
if ( file.open( IO_WriteOnly ) )
{
DTD::entityStream.setDevice(&file);
- DTD::entityStream.setEncoding(QTextStream::UnicodeUTF8);
+ DTD::entityStream.setEncoding(TQTextStream::UnicodeUTF8);
DTD::entityStream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
DTD::entityStream << "<!DOCTYPE TAGS>" << endl
<< "<TAGS>" << endl;
@@ -211,12 +211,12 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
Q_UNUSED(buf);
if (elem)
{
- QString elemName = QString((const char*)elem->name);
- QFile file( DTD::dirName + elemName + ".tag" );
+ TQString elemName = TQString((const char*)elem->name);
+ TQFile file( DTD::dirName + elemName + ".tag" );
if ( file.open( IO_WriteOnly ) )
{
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
stream << "<!DOCTYPE TAGS>" << endl
<< "<TAGS>" << endl
@@ -232,21 +232,21 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
at_ptr = el_ptr->attributes;
while (at_ptr) {
Attribute *attr = new Attribute;
- attr->name = QString((const char*)at_ptr->name);
+ attr->name = TQString((const char*)at_ptr->name);
switch (at_ptr->def) {
case 1: {attr->status = "optional"; break;} //NONE
case 2: {attr->status = "required"; break;} //REQUIRED
case 3: {attr->status = "implied"; break;} //IMPLIED
case 4: {attr->status = "fixed"; break;} //FIXED
}
- attr->defaultValue = QString((const char*)at_ptr->defaultValue);
+ attr->defaultValue = TQString((const char*)at_ptr->defaultValue);
xmlEnumerationPtr enum_ptr;
enum_ptr = at_ptr->tree;
while (enum_ptr) {
- attr->values += QString((const char*)enum_ptr->name);
+ attr->values += TQString((const char*)enum_ptr->name);
enum_ptr = enum_ptr->next;
}
- QString attrtype;
+ TQString attrtype;
switch (at_ptr->atype) {
case 9: {attrtype = "list"; break;}
default: {attrtype = "input"; break;} //TODO handle the rest of types
@@ -268,7 +268,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
stream << "<children>" << endl;
for( int i = 0; i < childNum; i++ )
{
- stream << " <child name=\"" << QString((const char*)list_ptr[i]) << "\"";
+ stream << " <child name=\"" << TQString((const char*)list_ptr[i]) << "\"";
xmlElementPtr child_ptr = xmlGetDtdElementDesc(DTD::dtd_ptr, list_ptr[i]);
if (child_ptr && child_ptr->content && child_ptr->content->ocur)
{
@@ -276,7 +276,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
//{
// stream << " usage=\"required\"";
// }
- QString ocur;
+ TQString ocur;
switch (child_ptr->content->ocur)
{
case 1: {ocur = "once"; break;}
@@ -285,7 +285,7 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
case 4: {ocur = "plus"; break;}
}
stream << " usage=\"" << ocur << "\"";
- QString name = QString((const char*)child_ptr->content->name);
+ TQString name = TQString((const char*)child_ptr->content->name);
if (name == "#PCDATA")
name == "#text";
stream << " name2=\"" << name << "\"";
@@ -303,10 +303,10 @@ void saveElement(xmlElementPtr elem, xmlBufferPtr buf)
stream << "<children>" << endl;
while (content_ptr)
{
- if (!QString((const char*)content_ptr->name).isEmpty())
+ if (!TQString((const char*)content_ptr->name).isEmpty())
{
- stream << " <child name=\"" << QString((const char*)content_ptr->name) << "\"";
- QString ocur;
+ stream << " <child name=\"" << TQString((const char*)content_ptr->name) << "\"";
+ TQString ocur;
switch (content_ptr->ocur)
{
case 1: {ocur = "once"; break;}
@@ -350,12 +350,12 @@ void saveEntity(xmlEntityPtr entity, xmlBufferPtr buf)
Q_UNUSED(buf);
if (entity)
{
- QString name = QString((const char*)entity->name);
+ TQString name = TQString((const char*)entity->name);
DTD::entityStream << "<tag name=\"" << name << "\" type=\"entity\" />" << endl << endl;
}
}
-QString DTDParser::dirName()
+TQString DTDParser::dirName()
{
return DTD::dirName;
}
diff --git a/quanta/parsers/dtd/dtdparser.h b/quanta/parsers/dtd/dtdparser.h
index b5b66d01..77c608ee 100644
--- a/quanta/parsers/dtd/dtdparser.h
+++ b/quanta/parsers/dtd/dtdparser.h
@@ -16,7 +16,7 @@
#define DTDPARSER_H
//qt includes
-#include <qdict.h>
+#include <tqdict.h>
//forward declarations
class KURL;
@@ -26,30 +26,30 @@ struct Attribute;
/** libxml2 based XML DTD parser and DTEP creation class*/
class DTDParser {
public:
- DTDParser(const KURL& dtdURL, const QString &dtepDir);
+ DTDParser(const KURL& dtdURL, const TQString &dtepDir);
~DTDParser();
- QString dirName();
+ TQString dirName();
/**
* Parse the DTD file.
* @param targetDir the directory of the destination DTEP. If empty, a dialog is shown to configure the destination.
* @param entitiesOnly if true, only the entities are extracted from the DTD into the entities.tag file
* @return true on success, false if some error happened
*/
- bool parse(const QString &targetDir = QString::null, bool entitiesOnly = false);
+ bool parse(const TQString &targetDir = TQString::null, bool entitiesOnly = false);
protected:
void writeDescriptionRC();
private:
KURL m_dtdURL;
- QString m_dtepDir;
- QString m_name;
- QString m_nickName;
- QString m_doctype;
- QString m_dtdURLLine;
+ TQString m_dtepDir;
+ TQString m_name;
+ TQString m_nickName;
+ TQString m_doctype;
+ TQString m_dtdURLLine;
bool m_caseSensitive;
- QString m_defaultExtension;
- QDict<Attribute> m_tags;
+ TQString m_defaultExtension;
+ TQDict<Attribute> m_tags;
};
#endif
diff --git a/quanta/parsers/node.cpp b/quanta/parsers/node.cpp
index 0831a67c..219716e9 100644
--- a/quanta/parsers/node.cpp
+++ b/quanta/parsers/node.cpp
@@ -15,8 +15,8 @@
* *
***************************************************************************/
//qt includes
-#include <qlistview.h>
-#include <qdom.h>
+#include <tqlistview.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -27,7 +27,7 @@
#include "structtreetag.h"
#include "kafkacommon.h"
-QMap<Node*, int> nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen...
+TQMap<Node*, int> nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen...
int NN = 0; //for debugging purposes: count the Node objects
@@ -112,10 +112,10 @@ Node::~Node()
NN--;
}
-void Node::save(QDomElement& element) const
+void Node::save(TQDomElement& element) const
{
//kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl;
- QDomElement child_element;
+ TQDomElement child_element;
if(next)
{
child_element = element.ownerDocument().createElement("nodeNext");
@@ -150,26 +150,26 @@ void Node::save(QDomElement& element) const
element.setAttribute("specialInsideXml", specialInsideXml); // bool
element.setAttribute("fileName", fileName); // QString
-/* QString s_element;
- QTextStream stream(&s_element, IO_WriteOnly);
+/* TQString s_element;
+ TQTextStream stream(&s_element, IO_WriteOnly);
element.save(stream, 3);*/
//kdDebug(25001) << "Load:\n" << s_element << endl;
//kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl;
}
-bool Node::load(QDomElement const& element)
+bool Node::load(TQDomElement const& element)
{
-/* QString s_element;
- QTextStream stream(&s_element, IO_WriteOnly);
+/* TQString s_element;
+ TQTextStream stream(&s_element, IO_WriteOnly);
element.save(stream, 3);*/
//kdDebug(25001) << "Load:\n" << s_element << endl;
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for(unsigned int i = 0; i != list.count(); ++i)
{
if(list.item(i).isElement())
{
- QDomElement e = list.item(i).toElement();
+ TQDomElement e = list.item(i).toElement();
if(e.tagName() == "nodeNext")
{
next = new Node(0);
@@ -196,11 +196,11 @@ bool Node::load(QDomElement const& element)
}
}
- closesPrevious = QString(element.attribute("closesPrevious")).toInt(); // bool
- opened = QString(element.attribute("opened")).toInt(); // bool
- removeAll = QString(element.attribute("removeAll")).toInt(); // bool
- insideSpecial = QString(element.attribute("insideSpecial")).toInt(); // bool
- specialInsideXml = QString(element.attribute("specialInsideXml")).toInt(); // bool
+ closesPrevious = TQString(element.attribute("closesPrevious")).toInt(); // bool
+ opened = TQString(element.attribute("opened")).toInt(); // bool
+ removeAll = TQString(element.attribute("removeAll")).toInt(); // bool
+ insideSpecial = TQString(element.attribute("insideSpecial")).toInt(); // bool
+ specialInsideXml = TQString(element.attribute("specialInsideXml")).toInt(); // bool
fileName = element.attribute("fileName"); // QString
//kafkaCommon::coutTree(this, 3);
@@ -287,21 +287,21 @@ Node *Node::nextNotChild()
}
}
-QString Node::nodeName()
+TQString Node::nodeName()
{
if(tag)
return tag->name;
- return QString::null;
+ return TQString::null;
}
-QString Node::nodeValue()
+TQString Node::nodeValue()
{
if(tag)
return tag->tagStr();
- return QString::null;
+ return TQString::null;
}
-void Node::setNodeValue(const QString &value)
+void Node::setNodeValue(const TQString &value)
{
if(!tag)
tag = new Tag();
@@ -500,7 +500,7 @@ Node *Node::getOpeningNode()
int Node::size()
{
int l = tag->size();
- l += 5*sizeof(Node*) + sizeof(QListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node);
+ l += 5*sizeof(Node*) + sizeof(TQListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node);
return l;
}
@@ -530,7 +530,7 @@ void Node::detachNode()
//kdDebug(24000) << &m_groupElements << " " << this << endl;
//Remove the references to this node from the list of group elements.
//They are actually stored in globalGroupMap.
- for (QValueListIterator<GroupElement*> it = m_groupElements.begin(); it != m_groupElements.end(); ++it)
+ for (TQValueListIterator<GroupElement*> it = m_groupElements.begin(); it != m_groupElements.end(); ++it)
{
GroupElement *groupElement = (*it);
groupElement->node = 0L;
@@ -546,7 +546,7 @@ void Node::detachNode()
kdDebug(24001) << count << " GroupElement scheduled for deletion. " << &m_groupElements << endl;
#endif
- QValueListIterator<QListViewItem*> listItem;
+ TQValueListIterator<TQListViewItem*> listItem;
for ( listItem = listItems.begin(); listItem != listItems.end(); ++listItem)
{
static_cast<StructTreeTag*>(*listItem)->node = 0L;
diff --git a/quanta/parsers/node.h b/quanta/parsers/node.h
index e3587c05..87d54141 100644
--- a/quanta/parsers/node.h
+++ b/quanta/parsers/node.h
@@ -18,9 +18,9 @@
#ifndef NODE_H
#define NODE_H
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <dom/dom_node.h>
class QDomElement;
@@ -40,12 +40,12 @@ struct GroupElement{
Node *parentNode;
bool global;
bool deleted;
- QString type;
+ TQString type;
XMLStructGroup *group; ///<is part of this group
};
-typedef QValueList<GroupElement*> GroupElementList;
-typedef QMap<QString, GroupElementList> GroupElementMapList;
+typedef TQValueList<GroupElement*> GroupElementList;
+typedef TQMap<TQString, GroupElementList> GroupElementMapList;
/**
* A Node is a basic unit of a Tree. It keeps track of his parent, his left neighbour, his right neighbour
@@ -79,8 +79,8 @@ public:
void operator =(Node* node);
/** For Kafka copy/paste */
- void save(QDomElement& element) const;
- bool load(QDomElement const& element);
+ void save(TQDomElement& element) const;
+ bool load(TQDomElement const& element);
Node *next;
Node *prev;
@@ -96,9 +96,9 @@ public:
Node *nextNotChild();
/** DOM like functions cf dom/dom_node.h */
- QString nodeName();
- QString nodeValue();
- void setNodeValue(const QString &value);
+ TQString nodeName();
+ TQString nodeValue();
+ void setNodeValue(const TQString &value);
Node* parentNode() {return parent;}
Node* firstChild() {return child;}
Node* lastChild();
@@ -162,15 +162,15 @@ public:
*/
Tag *tag;
- QValueList<QListViewItem *> listItems; ///<points to the listview items which represents this node in the structure tree
- QListViewItem *mainListItem; ///< the main listview item (from under the root node) associated with this node
+ TQValueList<TQListViewItem *> listItems; ///<points to the listview items which represents this node in the structure tree
+ TQListViewItem *mainListItem; ///< the main listview item (from under the root node) associated with this node
bool closesPrevious; //this node "closes" the tag from previous node
bool opened;
bool removeAll; //set to false if you don't want to remove the "next" and "child" when deleting the node.
bool insideSpecial; //true if the node is part of a special area
bool specialInsideXml; //< true if the node is a special area defined inside a tag, like the PHP in <a href="<? echo $a ?>">
- QString fileName; //the node is in this file. If empty, it's in the current document
- QValueList<GroupElement*> m_groupElements; ///< all the group elements pointing to this node
+ TQString fileName; //the node is in this file. If empty, it's in the current document
+ TQValueList<GroupElement*> m_groupElements; ///< all the group elements pointing to this node
private:
/**
diff --git a/quanta/parsers/parser.cpp b/quanta/parsers/parser.cpp
index 7559f1ec..1225aaa3 100644
--- a/quanta/parsers/parser.cpp
+++ b/quanta/parsers/parser.cpp
@@ -14,18 +14,18 @@
***************************************************************************/
//qt includes
-#include <qeventloop.h>
-#include <qstring.h>
-#include <qpoint.h>
-#include <qregexp.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qvaluelist.h>
-#include <qvaluestack.h>
+#include <tqeventloop.h>
+#include <tqstring.h>
+#include <tqpoint.h>
+#include <tqregexp.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqvaluelist.h>
+#include <tqvaluestack.h>
//standard library includes
#include <stdio.h>
@@ -65,10 +65,10 @@
#include <ktexteditor/viewcursorinterface.h>
extern GroupElementMapList globalGroupMap;
-static const QChar space(' ');
+static const TQChar space(' ');
extern int NN;
-extern QMap<Node*, int> nodes;
+extern TQMap<Node*, int> nodes;
Parser::Parser()
{
@@ -79,10 +79,10 @@ Parser::Parser()
m_parsingNeeded = true;
m_parseIncludedFiles = true;
m_saParser = new SAParser();
- connect(m_saParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool)));
- connect(m_saParser, SIGNAL(cleanGroups()), SLOT(cleanGroups()));
+ connect(m_saParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool)));
+ connect(m_saParser, TQT_SIGNAL(cleanGroups()), TQT_SLOT(cleanGroups()));
ParserCommon::includeWatch = new KDirWatch();
- connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&)));
+ connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&)));
}
Parser::~Parser()
@@ -94,7 +94,7 @@ Parser::~Parser()
Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, Node **lastNode, Node *a_node)
{
//first parse as an XML document
- QString textLine;
+ TQString textLine;
textLine.fill(space, startCol);
int line = startLine;
int col = 0;
@@ -147,7 +147,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No
currentNode = ParserCommon::createTextNode(write, currentNode, line, specialStartPos, parentNode);
if (!rootNode)
rootNode = currentNode;
- QString foundText = m_dtd->specialAreaStartRx.cap();
+ TQString foundText = m_dtd->specialAreaStartRx.cap();
//create a toplevel node for the special area
AreaStruct area(line, specialStartPos, line, specialStartPos + foundText.length() - 1);
Node *node = ParserCommon::createScriptTagNode(write, area, foundText, m_dtd, parentNode, currentNode);
@@ -247,7 +247,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No
//build an xml tag node here
AreaStruct area(tagStartLine, tagStartPos, tagEndLine, tagEndCol);
tag = new Tag(area, write, m_dtd, true);
- QString tagStr = tag->tagStr();
+ TQString tagStr = tag->tagStr();
tag->type = Tag::XmlTag;
tag->validXMLTag = (openNum == 0);
tag->single = QuantaCommon::isSingleTag(m_dtd->name, tag->name);
@@ -282,15 +282,15 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No
if (!rootNode)
rootNode = node;
//find the DTD that needs to be used for the special area
- QString tmpStr = m_dtd->specialTags[tag->name.lower()];
+ TQString tmpStr = m_dtd->specialTags[tag->name.lower()];
int defPos = tmpStr.find('[');
- QString defValue;
+ TQString defValue;
if (defPos != 0)
{
defValue = tmpStr.mid(defPos+1, tmpStr.findRev(']')-defPos-1).stripWhiteSpace();
tmpStr = tmpStr.left(defPos);
}
- QString s = tag->attributeValue(tmpStr);
+ TQString s = tag->attributeValue(tmpStr);
if (s.isEmpty())
s = defValue;
const DTDStruct *dtd = DTDs::ref()->find(s);
@@ -325,7 +325,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No
qTag = QuantaCommon::tagFromDTD(m_dtd, parentNode->tag->name);
if ( qTag )
{
- QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper();
+ TQString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper();
searchFor.remove('/');
if ( qTag->stoppingTags.contains(searchFor))
{
@@ -364,7 +364,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No
{
//handle the case when a tag is a stopping tag for parent, and grandparent and so on.
Node *n = parentNode;
- QString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper();
+ TQString searchFor = (m_dtd->caseSensitive)?tag->name:tag->name.upper();
while (qTag && n)
{
qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name);
@@ -505,7 +505,7 @@ Node *Parser::parseArea(int startLine, int startCol, int endLine, int endCol, No
from Nodes */
Node *Parser::parse(Document *w, bool force)
{
- QTime t;
+ TQTime t;
t.start();
QuantaView *view = ViewManager::ref()->activeView();
//If VPL is loaded, there shouldn't be any rebuild
@@ -527,8 +527,8 @@ Node *Parser::parse(Document *w, bool force)
Node::deleteNode(baseNode);
baseNode = 0L;
kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl;
-/* QMap<Node*, int> nList = nodes;
- for (QValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
+/* TQMap<Node*, int> nList = nodes;
+ for (TQValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
Node::deleteNode(*it);
kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl; */
}
@@ -567,7 +567,7 @@ Node *Parser::parse(Document *w, bool force)
emit nodeTreeChanged();
if (saParserEnabled)
- QTimer::singleShot(0, this, SLOT(slotParseInDetail()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail()));
return m_node;
}
@@ -702,8 +702,8 @@ bool Parser::invalidArea(Document *w, AreaStruct &area, Node **firstNode, Node *
w->viewCursorIf->cursorPositionReal(&line, &col);
Node *node = nodeAt(line, col, false);
int bl, bc, el, ec;
- QString text;
- QString tagStr;
+ TQString text;
+ TQString tagStr;
area.bLine = area.bCol = 0;
area.eLine = maxLines;
area.eCol = w->editIf->lineLength(maxLines) - 1;
@@ -976,7 +976,7 @@ void Parser::deleteNodes(Node *firstNode, Node *lastNode, NodeModifsSet *modifs)
Node *Parser::rebuild(Document *w)
{
kdDebug(24000) << "Rebuild started. " << endl;
- QTime t;
+ TQTime t;
t.start();
bool saParserEnabled = m_saParser->parsingEnabled();
@@ -1002,8 +1002,8 @@ Node *Parser::rebuild(Document *w)
m_saParser->setParsingEnabled(false);
m_saParser->init(0L, w);
parsingEnabled = true;
- QString text;
- QString tagStr;
+ TQString text;
+ TQString tagStr;
Node *firstNode = 0L;
Node *lastNode = 0L;
@@ -1020,7 +1020,7 @@ Node *Parser::rebuild(Document *w)
return n;
}
- kdDebug(24000) << QString("Invalid area: %1,%2,%3,%4").arg(area.bLine).arg(area.bCol).arg(area.eLine).arg(area.eCol) << "\n";
+ kdDebug(24000) << TQString("Invalid area: %1,%2,%3,%4").arg(area.bLine).arg(area.bCol).arg(area.eLine).arg(area.eCol) << "\n";
// kdDebug(24000) << "lastNode1: " << lastNode << " " << lastNode->tag << endl;
deleteNodes(firstNode->nextSibling(), lastNode, modifs);
@@ -1082,7 +1082,7 @@ Node *Parser::rebuild(Document *w)
lastNode->tag->endPos(area.eLine, area.eCol);
Tag *_tag = new Tag(*(lastNode->tag));
lastNode->tag->setTagPosition(area);
- QString s = write->text(area);
+ TQString s = write->text(area);
lastNode->tag->setStr(s);
if (!s.simplifyWhiteSpace().isEmpty())
{
@@ -1141,7 +1141,7 @@ Node *Parser::rebuild(Document *w)
qTag = QuantaCommon::tagFromDTD(m_dtd, node->parent->tag->name);
if ( qTag )
{
- QString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper();
+ TQString searchFor = (m_dtd->caseSensitive)?lastNode->tag->name:lastNode->tag->name.upper();
searchFor.remove('/');
if ( qTag->stoppingTags.contains( searchFor ) )
{
@@ -1172,7 +1172,7 @@ Node *Parser::rebuild(Document *w)
{
//handle the case when a tag is a stopping tag for parent, and grandparent and so on. I'm not sure it's needed here, but anyway...
Node *n = node->parent;
- QString searchFor = (m_dtd->caseSensitive) ? lastNode->tag->name : lastNode->tag->name.upper();
+ TQString searchFor = (m_dtd->caseSensitive) ? lastNode->tag->name : lastNode->tag->name.upper();
while (qTag && n)
{
qTag = QuantaCommon::tagFromDTD(m_dtd, n->tag->name);
@@ -1226,7 +1226,7 @@ Node *Parser::rebuild(Document *w)
return n;
}
/* if (lastNode)
- QString s = lastNode->tag->tagStr();*/
+ TQString s = lastNode->tag->tagStr();*/
}
}
/* kdDebug(24000)<< "END"<< endl;
@@ -1244,7 +1244,7 @@ Node *Parser::rebuild(Document *w)
m_saParser->init(m_node, w);
if (saParserEnabled)
- QTimer::singleShot(0, this, SLOT(slotParseInDetail()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotParseInDetail()));
emit nodeTreeChanged();
m_parsingNeeded = false;
return m_node;
@@ -1297,7 +1297,7 @@ void Parser::clearGroups()
ParserCommon::includedFilesDTD.clear();
delete ParserCommon::includeWatch;
ParserCommon::includeWatch = new KDirWatch();
- connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&)));
+ connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&)));
m_parseIncludedFiles = true;
}
@@ -1345,7 +1345,7 @@ void Parser::cleanGroups()
{
delete ParserCommon::includeWatch;
ParserCommon::includeWatch = new KDirWatch();
- connect(ParserCommon::includeWatch, SIGNAL(dirty(const QString&)), SLOT(slotIncludedFileChanged(const QString&)));
+ connect(ParserCommon::includeWatch, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotIncludedFileChanged(const TQString&)));
parseIncludedFiles();
}
}
@@ -1404,33 +1404,33 @@ struct GroupElementPosition{
int endPos;
};
-void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
+void Parser::parseIncludedFile(const TQString& fileName, const DTDStruct *dtd)
{
#ifdef DEBUG_PARSER
kdDebug(24000) << "parseIncludedFile: " << fileName << endl;
#endif
StructTreeGroup group;
- QString content;
- QFile file(fileName);
+ TQString content;
+ TQFile file(fileName);
if (file.open(IO_ReadOnly))
{
IncludedGroupElements *elements = &includedMap[fileName];
- QTextStream str(&file);
- QString encoding;
+ TQTextStream str(&file);
+ TQString encoding;
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(write->doc());
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- str.setCodec(QTextCodec::codecForName(encoding));
+ str.setCodec(TQTextCodec::codecForName(encoding));
content = str.read();
file.close();
if (dtd->specialAreas.count())
{
int areaPos = 0;
int lastAreaPos = 0;
- QString foundStr;
- QString specialEndStr;
+ TQString foundStr;
+ TQString specialEndStr;
while (areaPos != -1)
{
areaPos = content.find(dtd->specialAreaStartRx, lastAreaPos);
@@ -1452,7 +1452,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
QuantaCommon::removeCommentsAndQuotes(foundStr, dtd);
//gather the starting position of structures
- QValueList<uint> structPositions;
+ TQValueList<uint> structPositions;
int structPos = 0;
while (structPos !=-1)
{
@@ -1464,10 +1464,10 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
}
}
- QValueList<GroupElementPosition> gPositions;
+ TQValueList<GroupElementPosition> gPositions;
//go through the list of found structures and search for groups
int structStartPosition = 0; //from where to start the group search. This is before the structure begin position
- QString savedStr = foundStr;
+ TQString savedStr = foundStr;
for (uint i = 0; i < structPositions.count(); i++)
{
foundStr = savedStr;
@@ -1492,7 +1492,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
pos = foundStr.length();
int structEndPos = pos;
foundStr = foundStr.left(pos);
- QString spaces;
+ TQString spaces;
spaces.fill(' ', pos - structPos + 1);
foundStr.replace(structPos, pos - structPos + 1, spaces);
@@ -1522,7 +1522,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
//now check which groups are present in this area
structPos = pos + 1;
- QValueList<StructTreeGroup>::ConstIterator it;
+ TQValueList<StructTreeGroup>::ConstIterator it;
for (it = dtd->structTreeGroups.begin(); it != dtd->structTreeGroups.end(); ++it)
{
group = *it;
@@ -1535,7 +1535,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
if (pos != -1)
{
int l;
- QString ss = group.definitionRx.cap();
+ TQString ss = group.definitionRx.cap();
if (group.definitionRx.pos(1) > pos)
{
pos = group.definitionRx.pos(1);
@@ -1546,7 +1546,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
{
l = group.definitionRx.cap().length();
}
- QString s = content.mid(areaPos + pos, l);
+ TQString s = content.mid(areaPos + pos, l);
pos += l;
if (!(*elements)[group.name].contains(s))
{
@@ -1554,7 +1554,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
tag->name = s;
tag->setDtd(dtd);
tag->setWrite(write);
- QString s2 = content.left(areaPos + pos);
+ TQString s2 = content.left(areaPos + pos);
int newLineNum = s2.contains('\n');
int tmpCol = s2.length() - s2.findRev('\n') - 1;
tag->setTagPosition(newLineNum, tmpCol - s.length(), newLineNum, tmpCol);
@@ -1565,7 +1565,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
groupElement->node = node;
groupElement->parentNode = 0L;
int minPos = areaPos + pos + 1;
- for (QValueList<GroupElementPosition>::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt)
+ for (TQValueList<GroupElementPosition>::Iterator gPosIt = gPositions.begin(); gPosIt != gPositions.end(); ++gPosIt)
{
GroupElementPosition gPos = (*gPosIt);
if ( (areaPos + pos > gPos.startPos) && (areaPos + pos < gPos.endPos) && (gPos.startPos < minPos))
@@ -1604,7 +1604,7 @@ void Parser::parseIncludedFile(const QString& fileName, const DTDStruct *dtd)
}
}
-void Parser::slotIncludedFileChanged(const QString& fileName)
+void Parser::slotIncludedFileChanged(const TQString& fileName)
{
int pos = ParserCommon::includedFiles.findIndex(fileName);
if (pos != -1)
@@ -1640,8 +1640,8 @@ void Parser::parseForXMLGroup(Node *node)
{
XMLStructGroup group = xmlGroupIt.data();
Tag *newTag = new Tag(*node->tag);
- QString title = "";
- QStringList::Iterator it;
+ TQString title = "";
+ TQStringList::Iterator it;
for (it = group.attributes.begin(); it != group.attributes.end(); ++it)
{
if (newTag->hasAttribute(*it))
@@ -1674,10 +1674,10 @@ bool Parser::parseScriptInsideTag(Node *startNode)
const DTDStruct *dtd = startNode->tag->dtd();
if (dtd->specialAreas.count())
{
- QString foundText;
- QString s;
- QString specialEndStr;
- QString text = startNode->tag->tagStr();
+ TQString foundText;
+ TQString s;
+ TQString specialEndStr;
+ TQString text = startNode->tag->tagStr();
int pos = 0;
int col = startNode->tag->structBeginStr.length();
@@ -1751,7 +1751,7 @@ void Parser::synchParseInDetail()
void Parser::setSAParserEnabled(bool enabled)
{
m_saParser->setParsingEnabled(enabled);
- //kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled
+ //kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers); //this makes sure that the parsing is really disabled
}
#include "parser.moc"
diff --git a/quanta/parsers/parser.h b/quanta/parsers/parser.h
index db797df0..94f24aff 100644
--- a/quanta/parsers/parser.h
+++ b/quanta/parsers/parser.h
@@ -16,13 +16,13 @@
#ifndef PARSER_H
#define PARSER_H
-#include <qobject.h>
-#include <qdict.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include "node.h"
#include "tag.h"
@@ -38,11 +38,11 @@ class QRegExp;
class NodeModifsSet;
class SAParser;
-typedef QMap<QString, GroupElementMapList> IncludedGroupElements;
-typedef QMap<QString, IncludedGroupElements> IncludedGroupElementsMap;
+typedef TQMap<TQString, GroupElementMapList> IncludedGroupElements;
+typedef TQMap<TQString, IncludedGroupElements> IncludedGroupElementsMap;
-class Parser: public QObject {
+class Parser: public TQObject {
Q_OBJECT
@@ -95,7 +95,7 @@ public slots:
void cleanGroups();
private slots:
- void slotIncludedFileChanged(const QString& fileName);
+ void slotIncludedFileChanged(const TQString& fileName);
signals:
void nodeTreeChanged();
@@ -103,19 +103,19 @@ signals:
private:
Node* m_node; //the internal Node pointer
- QString m_dtdName; //the DTD name of write
+ TQString m_dtdName; //the DTD name of write
const DTDStruct* m_dtd; //the dtd used for main parsing
- QGuardedPtr<Document> write; //pointer to the parsed document
+ TQGuardedPtr<Document> write; //pointer to the parsed document
int maxLines; // how many lines are in the current document
int oldMaxLines;
int treeSize;
- QMap<QString, XMLStructGroup>::ConstIterator xmlGroupIt;
+ TQMap<TQString, XMLStructGroup>::ConstIterator xmlGroupIt;
bool m_parsingEnabled;
bool m_parsingNeeded;
/** Clears the group elements found in the included files */
void clearIncludedGroupElements();
- void parseIncludedFile(const QString &fileName, const DTDStruct *dtd);
+ void parseIncludedFile(const TQString &fileName, const DTDStruct *dtd);
/** Searches for scripts inside the text from startNode. It looks only for the
script begin/and delimiters, and not for the <script> or other special tags.
Useful when parsing for script inside the xml tags.
diff --git a/quanta/parsers/parsercommon.cpp b/quanta/parsers/parsercommon.cpp
index 3283ed52..be660255 100644
--- a/quanta/parsers/parsercommon.cpp
+++ b/quanta/parsers/parsercommon.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
//qt includes
-#include <qstring.h>
+#include <tqstring.h>
//kde includes
#include <kdebug.h>
@@ -36,14 +36,14 @@ class KDirWatch;
int nodeNum; //for memory debugging - remove if not needed
namespace ParserCommon {
- QStringList includedFiles;
- QPtrList<const DTDStruct> includedFilesDTD;
+ TQStringList includedFiles;
+ TQPtrList<const DTDStruct> includedFilesDTD;
KDirWatch *includeWatch;
//common methods.
-QString getLine(Document *write, int line, int endLine, int endCol)
+TQString getLine(Document *write, int line, int endLine, int endCol)
{
- QString textLine = write->editIf->textLine(line);
+ TQString textLine = write->editIf->textLine(line);
if (line == endLine)
{
if (endCol >0)
@@ -56,12 +56,12 @@ QString getLine(Document *write, int line, int endLine, int endCol)
void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node)
{
- QString tagStr = write->text(area);
- QString cleanStr = node->tag->cleanStr;
+ TQString tagStr = write->text(area);
+ TQString cleanStr = node->tag->cleanStr;
node->tag->setStr(node->tag->tagStr() + tagStr);
if (node->tag->type == Tag::Empty)
{
- QString s = tagStr;
+ TQString s = tagStr;
if (s.simplifyWhiteSpace().isEmpty())
{
node->tag->type = Tag::Empty;
@@ -70,7 +70,7 @@ void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node)
node->tag->type = Tag::Text;
}
}
- QString cleanedTagStr = tagStr;
+ TQString cleanedTagStr = tagStr;
QuantaCommon::removeCommentsAndQuotes(cleanedTagStr, node->tag->dtd());
node->tag->cleanStr = cleanStr + cleanedTagStr;
int bLine, bCol;
@@ -100,7 +100,7 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
{
AreaStruct area(bLine, bCol + 1, eLine, eCol);
textTag = new Tag(area, write, dtd);
- QString s = textTag->tagStr();
+ TQString s = textTag->tagStr();
textTag->single = true;
if (s.simplifyWhiteSpace().isEmpty())
{
@@ -162,7 +162,7 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
return node;
}
-Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString &areaName,
+Node* createScriptTagNode(Document *write, const AreaStruct &area, const TQString &areaName,
const DTDStruct *dtd, Node *parentNode, Node *currentNode)
{
Tag *tag = new Tag();
@@ -205,7 +205,7 @@ Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString
void coutTree(Node *node, int indent)
{
- QString output;
+ TQString output;
int bLine, bCol, eLine, eCol;
if (!node)
kdDebug(24000)<< "undoRedo::coutTree() - bad node!" << endl;
@@ -238,7 +238,7 @@ void coutTree(Node *node, int indent)
void verifyTree(Node *node)
{
- QString output;
+ TQString output;
int bLine, bCol, eLine, eCol;
while (node)
{
diff --git a/quanta/parsers/parsercommon.h b/quanta/parsers/parsercommon.h
index 7a7677ec..9b0c01f4 100644
--- a/quanta/parsers/parsercommon.h
+++ b/quanta/parsers/parsercommon.h
@@ -18,8 +18,8 @@
#define PARSERCOMMON_H
//qt includes
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
//own includes
#include "tag.h"
@@ -30,12 +30,12 @@ class Node;
class KDirWatch;
namespace ParserCommon{
- extern QStringList includedFiles;
- extern QPtrList<const DTDStruct> includedFilesDTD;
+ extern TQStringList includedFiles;
+ extern TQPtrList<const DTDStruct> includedFilesDTD;
extern KDirWatch *includeWatch;
//this methods may go in a common class as well
- QString getLine(Document *write, int line, int endLine, int endCol);
+ TQString getLine(Document *write, int line, int endLine, int endCol);
/** Appends a text area to a text node. */
void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node);
/** Creates a text/empty node between node and the provided position */
@@ -47,7 +47,7 @@ namespace ParserCommon{
parentNode: the parent of the node
currentNode: the last child of the parent, if it exists
*/
- Node* createScriptTagNode(Document *write, const AreaStruct &area, const QString &areaName,
+ Node* createScriptTagNode(Document *write, const AreaStruct &area, const TQString &areaName,
const DTDStruct *dtd, Node *parentNode, Node *currentNode);
/** Print the doc structure tree to the standard output.
diff --git a/quanta/parsers/qtag.cpp b/quanta/parsers/qtag.cpp
index 77031eee..46b5b411 100644
--- a/quanta/parsers/qtag.cpp
+++ b/quanta/parsers/qtag.cpp
@@ -63,8 +63,8 @@ void QTag::addAttribute(Attribute* attr)
a = new Attribute;
a->name = attr->name;
a->type = attr->type;
- QStringList::ConstIterator end = attr->values.constEnd();
- for ( QStringList::ConstIterator it = attr->values.constBegin(); it != end; ++it )
+ TQStringList::ConstIterator end = attr->values.constEnd();
+ for ( TQStringList::ConstIterator it = attr->values.constBegin(); it != end; ++it )
{
a->values.append(*it);
}
@@ -90,7 +90,7 @@ Attribute* QTag::attributeAt(int index)
}
/** Returns true if the attribute exists */
-bool QTag::isAttribute(const QString &attrName)
+bool QTag::isAttribute(const TQString &attrName)
{
Attribute *a;
int i;
@@ -129,12 +129,12 @@ void QTag::setOptional(bool isOptional)
optional = isOptional;
}
/** No descriptions */
-void QTag::setName(const QString& theName)
+void QTag::setName(const TQString& theName)
{
tagName = theName;
}
/** No descriptions */
-QString QTag::name(bool doNotConvert)
+TQString QTag::name(bool doNotConvert)
{
if (doNotConvert || !parentDTD || parentDTD->caseSensitive)
return tagName;
@@ -152,13 +152,13 @@ bool QTag::isOptional()
return optional;
}
/** No descriptions */
-void QTag::setFileName(const QString& fileName)
+void QTag::setFileName(const TQString& fileName)
{
m_fileName = fileName;
}
/** No descriptions */
-QString QTag::fileName()
+TQString QTag::fileName()
{
return m_fileName;
}
@@ -186,7 +186,7 @@ QTag QTag::operator = (QTag &t)
}
/** Returns the attribute with name, or 0 if the tag does not have any attribute with name. */
-Attribute* QTag::attribute(const QString& name)
+Attribute* QTag::attribute(const TQString& name)
{
Attribute *attr = 0L;
for (uint i = 0; i < attrs.count(); i++)
@@ -201,9 +201,9 @@ Attribute* QTag::attribute(const QString& name)
return attr;
}
-bool QTag::isChild(const QString& tag, bool trueIfNoChildsDefined)
+bool QTag::isChild(const TQString& tag, bool trueIfNoChildsDefined)
{
- QString tagName = tag;
+ TQString tagName = tag;
tagName = parentDTD->caseSensitive ? tagName : tagName.upper();
if(trueIfNoChildsDefined)
return (childTags.isEmpty() || childTags.contains(tagName));
@@ -213,7 +213,7 @@ bool QTag::isChild(const QString& tag, bool trueIfNoChildsDefined)
bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesAsText)
{
- QString nodeName;
+ TQString nodeName;
if(!node)
return false;
@@ -247,10 +247,10 @@ bool QTag::isChild(Node *node, bool trueIfNoChildsDefined, bool treatEmptyNodesA
return isChild(node->tag->name, trueIfNoChildsDefined);
}
-QPtrList<QTag> QTag::parents()
+TQPtrList<QTag> QTag::parents()
{
- QPtrList<QTag> qTagList;
- QDictIterator<QTag> it((*parentDTD->tagsList));
+ TQPtrList<QTag> qTagList;
+ TQDictIterator<QTag> it((*parentDTD->tagsList));
for(; it.current(); ++it)
{
if(it.current()->isChild(name()))
diff --git a/quanta/parsers/qtag.h b/quanta/parsers/qtag.h
index 6c38c334..89aa1e46 100644
--- a/quanta/parsers/qtag.h
+++ b/quanta/parsers/qtag.h
@@ -25,11 +25,11 @@
*@author Andras Mantia
*/
//qt includes
-#include <qdict.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
//app includes
@@ -38,49 +38,49 @@ class Node;
//an attribute of a tag looks like:
typedef struct Attribute{
- QString name;
- QString type; //"input", "check", "list"
- QStringList values; //the possible values it can have
- QString defaultValue; //the default value
- QString status; // "optional", "required","implied"
- QString source;
- QString interface;
- QString method;
- QString arguments;
+ TQString name;
+ TQString type; //"input", "check", "list"
+ TQStringList values; //the possible values it can have
+ TQString defaultValue; //the default value
+ TQString status; // "optional", "required","implied"
+ TQString source;
+ TQString interface;
+ TQString method;
+ TQString arguments;
};
class XMLStructGroup {
public:
- QString name; ///<the name of the group
- QString noName; ///<the text when there are no elements in the group
- QString icon; ///<the icon of the group
- QStringList attributes; ///<the attributes of the above tag to be displayed
+ TQString name; ///<the name of the group
+ TQString noName; ///<the text when there are no elements in the group
+ TQString icon; ///<the icon of the group
+ TQStringList attributes; ///<the attributes of the above tag to be displayed
bool hasFileName; ///<the group contains filename(s)
- QRegExp fileNameRx; ///<delete the matches of this regexp to obtain a filename (eg. linked, included file name)
+ TQRegExp fileNameRx; ///<delete the matches of this regexp to obtain a filename (eg. linked, included file name)
bool appendToTags; ///<true if the group elements must be used as normal tags in autocompletion
- QString parentGroup; ///<if the group element can be a child of another group (eg. member function of a class), holds the parent name. Makes sense only if appentToTags is true
+ TQString parentGroup; ///<if the group element can be a child of another group (eg. member function of a class), holds the parent name. Makes sense only if appentToTags is true
};
//the groups in structure tree are defined with the help of:
class StructTreeGroup:public XMLStructGroup {
public:
- QRegExp definitionRx; //regular expression to help us find the group element definition - for pseudo DTDs
- QRegExp usageRx; //regexp to find the usage of a group element in the document
+ TQRegExp definitionRx; //regular expression to help us find the group element definition - for pseudo DTDs
+ TQRegExp usageRx; //regexp to find the usage of a group element in the document
bool hasDefinitionRx; //true if searchRx should be used
bool isMinimalDefinitionRx; // true if the searchRx should be non-greedy
- QRegExp typeRx; //regular expression to help us find the group element type from the definition string - for pseudo DTDs
+ TQRegExp typeRx; //regular expression to help us find the group element type from the definition string - for pseudo DTDs
int tagType; //the tag type for which this is valid
- QRegExp autoCompleteAfterRx; //holds the char after the autocompletion box should be shown for this group elements. Null, if autocompletion shouldn't be used
- QRegExp removeFromAutoCompleteWordRx;
+ TQRegExp autoCompleteAfterRx; //holds the char after the autocompletion box should be shown for this group elements. Null, if autocompletion shouldn't be used
+ TQRegExp removeFromAutoCompleteWordRx;
bool parseFile; //parse the files belonging to this group
};
-typedef QPtrList<Attribute> AttributeList;
-typedef QDict<AttributeList> AttributeListDict;
+typedef TQPtrList<Attribute> AttributeList;
+typedef TQDict<AttributeList> AttributeListDict;
-typedef QDict<QTag> QTagList;
+typedef TQDict<QTag> QTagList;
enum DTDFamily{Unknown = 0, Xml, Script};
@@ -89,27 +89,27 @@ enum DTDFamily{Unknown = 0, Xml, Script};
//an internal representation of a DTD
typedef struct DTDStruct
{
- QString name; ///< DTD name
- QString nickName; ///< DTD nickname
+ TQString name; ///< DTD name
+ TQString nickName; ///< DTD nickname
bool loaded; ///< true = DTD is complet in memory
- QString url; ///< the url of the DTD definition file
- QString doctypeStr; ///< the string that appears right after !doctype
- QString inheritsTagsFrom; ///< Inherited DTD name
- QString defaultExtension; ///< default extension when creating new files
- QStringList mimeTypes;
+ TQString url; ///< the url of the DTD definition file
+ TQString doctypeStr; ///< the string that appears right after !doctype
+ TQString inheritsTagsFrom; ///< Inherited DTD name
+ TQString defaultExtension; ///< default extension when creating new files
+ TQStringList mimeTypes;
bool caseSensitive; ///< the tags&attributes in DTD are case sensitive or not
int family; ///< xml, script type
bool toplevel; ///< true if the DTD can be the main DTD of a document. Always true for XML like DTD's
- QString documentation; ///< the name of the documentation package
+ TQString documentation; ///< the name of the documentation package
QTagList* tagsList; ///< the list of all defined tags in the DTD
- QString fileName; ///< the DTD decription.rc with path
+ TQString fileName; ///< the DTD decription.rc with path
AttributeListDict* commonAttrs; ///< the attributes of the common groups
- QString booleanAttributes; ///< simple or extended <tag booleanAttr> or <tag booleanAttr="1">
- QString booleanTrue; ///< "true" or "1" or whatever
- QString booleanFalse; ///< "false" or "0" or whatever
- QString singleTagStyle; ///< "xml" or "html" (<tag/> or <tag>)
- QString defaultAttrType; ///< "input", "string" or whatever
+ TQString booleanAttributes; ///< simple or extended <tag booleanAttr> or <tag booleanAttr="1">
+ TQString booleanTrue; ///< "true" or "1" or whatever
+ TQString booleanFalse; ///< "false" or "0" or whatever
+ TQString singleTagStyle; ///< "xml" or "html" (<tag/> or <tag>)
+ TQString defaultAttrType; ///< "input", "string" or whatever
/****************** FOR THE NEW PARSER **********************/
@@ -122,18 +122,18 @@ typedef struct DTDStruct
/* The starting and closing strings of a special area. For PHP the special areas
are <? ?> and <* *>, so the entries are (<?,?>),(<*,*>).
*/
- QMap<QString, QString> specialAreas;
+ TQMap<TQString, TQString> specialAreas;
/* To which DTD this special area belongs. It may be a non-dtd name, like
"comment", which is treated as a special case.
Entries are in for of (<?,php) or (<!--,comment).
*/
- QMap<QString, QString> specialAreaNames;
+ TQMap<TQString, TQString> specialAreaNames;
/* A regular expression which matches the starting strings of all the
possible special areas.
*/
- mutable QRegExp specialAreaStartRx;
+ mutable TQRegExp specialAreaStartRx;
/* For each special tag name, holds an attribute name. This attribute is used to
figure out the DTD which is valid in the special tag area.
@@ -141,7 +141,7 @@ typedef struct DTDStruct
Special tags are skipped during parsing and parsed later according to
their DTD definition.
*/
- QMap<QString, QString> specialTags;
+ TQMap<TQString, TQString> specialTags;
/* A list of DTDs that can be present inside the DTD.
For each DTD specified here the definitionAreaBegin/definitionAreaEnd is
@@ -150,58 +150,58 @@ typedef struct DTDStruct
Basically this means that we use the DTD definitions when building
the special area and tag definitions.
*/
- QStringList insideDTDs;
+ TQStringList insideDTDs;
/* The definition tags for this DTD in the same for as the above. */
- QMap<QString, QString> definitionTags;
+ TQMap<TQString, TQString> definitionTags;
/* The beginning and end string of the definition areas for this DTD.
It is stored in (area_begin_str,area_end_str) pairs. E.g (<?,?>)
*/
- QMap<QString, QString> definitionAreas;
+ TQMap<TQString, TQString> definitionAreas;
/* Start/end pairs for comments. Eg. (//,\n); (<!--,-->) */
- QMap<QString, QString> comments;
+ TQMap<TQString, TQString> comments;
/* Regular expression to match the start of the comments (//, <!--)*/
- mutable QRegExp commentsStartRx;
+ mutable TQRegExp commentsStartRx;
/* How does a structure starts in this DTD. Eg. "{" or "begin".*/
- QString structBeginStr;
+ TQString structBeginStr;
/* How does a structure ends in this DTD. Eg. "}" or "end".*/
- QString structEndStr;
+ TQString structEndStr;
/* A regular expression to match the structe begin or end. */
- mutable QRegExp structRx;
+ mutable TQRegExp structRx;
/* Regular expression to match the possible keywords that can appear before
a structure, like "function", "for", etc. */
- mutable QRegExp structKeywordsRx;
+ mutable TQRegExp structKeywordsRx;
/* Regular expression containing the keywords that indicate that the groups
defined in the structure after the keyword have local scope */
- mutable QRegExp localScopeKeywordsRx;
+ mutable TQRegExp localScopeKeywordsRx;
/* A list of structure tree groups definition */
- mutable QValueList<StructTreeGroup> structTreeGroups;
- QMap<QString, XMLStructGroup> xmlStructTreeGroups;
+ mutable TQValueList<StructTreeGroup> structTreeGroups;
+ TQMap<TQString, XMLStructGroup> xmlStructTreeGroups;
/****************** END FOR THE NEW PARSER **********************/
- QStringList toolbars;
+ TQStringList toolbars;
/* True if foo-foo2 should be considered as one word. False (default) otherwise. */
bool minusAllowedInWord;
- mutable QChar tagAutoCompleteAfter;
+ mutable TQChar tagAutoCompleteAfter;
bool requestSpaceBeforeTagAutoCompletion;
- QChar attrAutoCompleteAfter;
- QChar attributeSeparator;
- QChar tagSeparator;
+ TQChar attrAutoCompleteAfter;
+ TQChar attributeSeparator;
+ TQChar tagSeparator;
/* Script language related items */
int variableGroupIndex; ///< the index of the structure tree group holding the variables. -1 if there is no such group.
int functionGroupIndex; ///< the index of the structure tree group holding the functions. -1 if there is no such group.
int classGroupIndex; ///< the index of the structure tree group holding the classes. -1 if there is no such group.
int objectGroupIndex; ///< the index of the structure tree group holding the classes. -1 if there is no such group.
- mutable QRegExp memberAutoCompleteAfter; ///< the regular expression after which a list with the existing member methods and variables for a class should be shown. Makes sense only if the language supports classes.
- QMap<QString, QString> classInheritance; ///<stores the inheritance tree
+ mutable TQRegExp memberAutoCompleteAfter; ///< the regular expression after which a list with the existing member methods and variables for a class should be shown. Makes sense only if the language supports classes.
+ TQMap<TQString, TQString> classInheritance; ///<stores the inheritance tree
};
@@ -219,15 +219,15 @@ public:
Attribute* attributeAt(int index);
AttributeList *attributes() { return &attrs;}
/** Returns true if the attribute exists */
- bool isAttribute(const QString &attrName);
+ bool isAttribute(const TQString &attrName);
/** No descriptions */
void setSingle(bool isSingle);
/** No descriptions */
void setOptional(bool isOptional);
/** No descriptions */
- void setName(const QString& theName);
+ void setName(const TQString& theName);
/** No descriptions */
- QString name(bool doNotConvert = false);
+ TQString name(bool doNotConvert = false);
/** No descriptions */
bool isSingle();
/** No descriptions */
@@ -239,44 +239,44 @@ public:
* the scope is a "word", i.e., the whole word will be affected by the action.
* Instead, if center is pressed, all surrounding inline nodes will be affected by the new tag.
*/
- QString const& scope() const {return m_scope;}
- void setScope(QString const& scope) {m_scope = scope;}
+ TQString const& scope() const {return m_scope;}
+ void setScope(TQString const& scope) {m_scope = scope;}
/** Returns true if tag is a possible child of this tag, or if
there are no children defined and if trueIfNoChildsDefined is set to true. */
- bool isChild(const QString& tag, bool trueIfNoChildsDefined = true);
+ bool isChild(const TQString& tag, bool trueIfNoChildsDefined = true);
//prefer using this variant, it handle Text, Empty, XmlTagEnd nodes!
bool isChild(Node *node, bool trueIfNoChildsDefined = true, bool treatEmptyNodesAsText = false);
/*** Returns the list of parent of this tag. */
- QPtrList<QTag> parents();
+ TQPtrList<QTag> parents();
/** No descriptions */
- QString fileName();
+ TQString fileName();
/** No descriptions */
- void setFileName(const QString& fileName);
+ void setFileName(const TQString& fileName);
/** Returns the attribute with name, or 0 if the tag does not have any attribute with name. */
- Attribute* attribute(const QString& name);
+ Attribute* attribute(const TQString& name);
/** The tag belongs to this DTD */
const DTDStruct *parentDTD;
/** The tag has the attributes of the above common groups */
- QStringList commonGroups;
- QStringList stoppingTags;
- QMap<QString, bool> childTags; ///<list of the possible child tags. If the value is true, the child is mandatory
- QString type; ///<function, class, xmltag, etc.
- QString returnType; ///<useful is type="function"; may be int, string or whatever
- QString className; ///< the name of the class where the tag belongs to. Used only for script DTEP tags
- QString comment; ///< comment associated to the tag. Will appear as a tooltip in the autocompletion box. Useful for specifying version information (eg. since PHP5)
+ TQStringList commonGroups;
+ TQStringList stoppingTags;
+ TQMap<TQString, bool> childTags; ///<list of the possible child tags. If the value is true, the child is mandatory
+ TQString type; ///<function, class, xmltag, etc.
+ TQString returnType; ///<useful is type="function"; may be int, string or whatever
+ TQString className; ///< the name of the class where the tag belongs to. Used only for script DTEP tags
+ TQString comment; ///< comment associated to the tag. Will appear as a tooltip in the autocompletion box. Useful for specifying version information (eg. since PHP5)
protected: // Protected attributes
/** List of the possible attributes */
AttributeList attrs;
bool single;
bool optional;
- QString tagName;
- QString m_scope;
+ TQString tagName;
+ TQString m_scope;
/** The path to the tag file. Null if there is no tag file for the tag. */
- QString m_fileName;
+ TQString m_fileName;
};
diff --git a/quanta/parsers/sagroupparser.cpp b/quanta/parsers/sagroupparser.cpp
index 77698a45..6e409509 100644
--- a/quanta/parsers/sagroupparser.cpp
+++ b/quanta/parsers/sagroupparser.cpp
@@ -14,8 +14,8 @@
* *
***************************************************************************/
//qt includes
-#include <qtimer.h>
-#include <qvaluelist.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
//kde includes
#include <kdebug.h>
@@ -45,8 +45,8 @@ SAGroupParser::SAGroupParser(SAParser *parent, Document *write, Node *startNode,
m_parent = parent;
m_write = write;
m_count = 0;
- m_parseForGroupTimer = new QTimer(this);
- connect(m_parseForGroupTimer, SIGNAL(timeout()), this, SLOT(slotParseForScriptGroup()));
+ m_parseForGroupTimer = new TQTimer(this);
+ connect(m_parseForGroupTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseForScriptGroup()));
}
void SAGroupParser::slotParseForScriptGroup()
@@ -106,23 +106,23 @@ void SAGroupParser::slotParseForScriptGroup()
void SAGroupParser::parseForScriptGroup(Node *node)
{
#ifdef DEBUG_PARSER
- QTime t;
+ TQTime t;
t.start();
#endif
int bl, bc, el, ec;
int pos;
- QString title;
- QString tmpStr;
+ TQString title;
+ TQString tmpStr;
StructTreeGroup group;
GroupElement *groupElement;
GroupElementList* groupElementList;
KURL baseURL = QExtFileInfo::path(m_write->url());
- QString str = node->tag->cleanStr;
- QString tagStr = node->tag->tagStr();
+ TQString str = node->tag->cleanStr;
+ TQString tagStr = node->tag->tagStr();
const DTDStruct* dtd = node->tag->dtd();
node->tag->beginPos(bl, bc);
- QValueList<StructTreeGroup>::ConstIterator it;
+ TQValueList<StructTreeGroup>::ConstIterator it;
for (it = dtd->structTreeGroups.begin(); it != dtd->structTreeGroups.end(); ++it)
{
group = *it;
@@ -158,7 +158,7 @@ void SAGroupParser::parseForScriptGroup(Node *node)
//have the same title. For example get the list of all group
//element which are variable and the matched string was "$i"
int cap1Pos = str.find(group.definitionRx.cap(1));
- QString s = tagStr.mid(cap1Pos, group.definitionRx.cap(1).length());
+ TQString s = tagStr.mid(cap1Pos, group.definitionRx.cap(1).length());
groupElementList = & (globalGroupMap[group.name + "|" + s]);
//Create a new tag which point to the exact location of the matched string.
//For example when the group defined PHP variables it
@@ -228,14 +228,14 @@ void SAGroupParser::parseForScriptGroup(Node *node)
if(qTag->className.length() != 0 && tagStr.contains('(') && tagStr.contains(')'))
{
// First we want to determine the whole line the tag is on
- QString tagWholeLineStr = tagStr;
+ TQString tagWholeLineStr = tagStr;
// Remove lines before target line
while(tagWholeLineStr.length() > 0) // this stops infinit looping in case something goes wrong!
{
int firstNewline = tagWholeLineStr.find('\n');
if(firstNewline == -1) //no new lines so we must be on the last
break;
- QString checkLineStr = tagWholeLineStr.mid(firstNewline+1,tagWholeLineStr.length());
+ TQString checkLineStr = tagWholeLineStr.mid(firstNewline+1,tagWholeLineStr.length());
if(checkLineStr.contains(s))
tagWholeLineStr = checkLineStr;
else
@@ -247,7 +247,7 @@ void SAGroupParser::parseForScriptGroup(Node *node)
int lastNewLine = tagWholeLineStr.findRev('\n');
if(lastNewLine == -1)
break;
- QString checkLineStr = tagWholeLineStr.mid(0,lastNewLine);
+ TQString checkLineStr = tagWholeLineStr.mid(0,lastNewLine);
if(checkLineStr.contains(s))
tagWholeLineStr = checkLineStr;
else
diff --git a/quanta/parsers/sagroupparser.h b/quanta/parsers/sagroupparser.h
index 1f2f184c..6cc15311 100644
--- a/quanta/parsers/sagroupparser.h
+++ b/quanta/parsers/sagroupparser.h
@@ -18,7 +18,7 @@
#define SAGROUPPARSER_H
//qt includes
-#include <qobject.h>
+#include <tqobject.h>
//forward definitions
class QTimer;
@@ -37,7 +37,7 @@ public:
SAGroupParser(SAParser *parent, Document *write, Node *startNode, Node *endNode, bool synchronous, bool parsingLastNode, bool paringLastGroup);
~SAGroupParser() {};
- QTimer *m_parseForGroupTimer;
+ TQTimer *m_parseForGroupTimer;
public slots:
void slotParseForScriptGroup();
diff --git a/quanta/parsers/saparser.cpp b/quanta/parsers/saparser.cpp
index 230ddbe0..f402e0c8 100644
--- a/quanta/parsers/saparser.cpp
+++ b/quanta/parsers/saparser.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
//qt includes
-#include <qtimer.h>
+#include <tqtimer.h>
//kde includes
#include <kdebug.h>
@@ -39,14 +39,14 @@ SAParser::SAParser()
m_write = 0L;
m_baseNode = 0L;
m_currentNode = 0L;
- m_quotesRx = QRegExp("\"|'");
+ m_quotesRx = TQRegExp("\"|'");
m_specialInsideXml = false;
m_parsingEnabled = true;
m_synchronous = true;
- m_parseOneLineTimer = new QTimer(this);
- connect(m_parseOneLineTimer, SIGNAL(timeout()), this, SLOT(slotParseOneLine()));
- m_parseInDetailTimer = new QTimer(this);
- connect(m_parseInDetailTimer, SIGNAL(timeout()), this, SLOT(slotParseNodeInDetail()));
+ m_parseOneLineTimer = new TQTimer(this);
+ connect(m_parseOneLineTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseOneLine()));
+ m_parseInDetailTimer = new TQTimer(this);
+ connect(m_parseInDetailTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotParseNodeInDetail()));
}
SAParser::~SAParser()
@@ -143,7 +143,7 @@ bool SAParser::slotParseOneLine()
if ( (groupKeywordPos < specialAreaPos || specialAreaPos == -1) &&
(groupKeywordPos < areaEndPos || areaEndPos == -1) )
{
- QString foundText = s_dtd->structRx.cap();
+ TQString foundText = s_dtd->structRx.cap();
if (foundText == s_dtd->structBeginStr)
{
s_context.type = Group;
@@ -201,7 +201,7 @@ bool SAParser::slotParseOneLine()
}
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = groupKeywordPos - 1;
- //kdDebug(24000) << QString("Group Struct s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("Group Struct s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
if (s_currentNode &&
(s_currentNode->tag->type == Tag::Text ||
@@ -265,7 +265,7 @@ bool SAParser::slotParseOneLine()
{
if (specialAreaPos < areaEndPos || areaEndPos == -1)
{
- QString foundText = s_dtd->specialAreaStartRx.cap();
+ TQString foundText = s_dtd->specialAreaStartRx.cap();
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = specialAreaPos - 1;
if (s_fullParse)
@@ -351,7 +351,7 @@ bool SAParser::slotParseOneLine()
s_currentNode->specialInsideXml = m_specialInsideXml;
}
}
- //kdDebug(24000) << QString("Special area %1 ends at %2, %3").arg(s_dtd->name).arg(s_line).arg(lastCol) << endl;
+ //kdDebug(24000) << TQString("Special area %1 ends at %2, %3").arg(s_dtd->name).arg(s_line).arg(lastCol) << endl;
//create a closing node for the special area
Tag *tag = new Tag();
@@ -396,9 +396,9 @@ bool SAParser::slotParseOneLine()
}
}
SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, g_endNode, m_synchronous, parsingLastNode, true);
- connect(groupParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool)));
- connect(groupParser, SIGNAL(cleanGroups()), SIGNAL(cleanGroups()));
- connect(groupParser, SIGNAL(parsingDone(SAGroupParser*)), SLOT(slotGroupParsingDone(SAGroupParser*)));
+ connect(groupParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool)));
+ connect(groupParser, TQT_SIGNAL(cleanGroups()), TQT_SIGNAL(cleanGroups()));
+ connect(groupParser, TQT_SIGNAL(parsingDone(SAGroupParser*)), TQT_SLOT(slotGroupParsingDone(SAGroupParser*)));
groupParser->slotParseForScriptGroup();
m_groupParsers.append(groupParser);
}
@@ -439,7 +439,7 @@ bool SAParser::slotParseOneLine()
{
//create a tag from the s_currentContext
Tag *tag = new Tag(s_currentContext.area, m_write, s_dtd);
- QString tagStr = tag->tagStr();
+ TQString tagStr = tag->tagStr();
tag->cleanStr = tagStr;
QuantaCommon::removeCommentsAndQuotes(tag->cleanStr, s_dtd);
if (tagStr.simplifyWhiteSpace().isEmpty())
@@ -468,7 +468,7 @@ bool SAParser::slotParseOneLine()
s_currentNode = node;
}
}
- //kdDebug(24000) << QString("%1 s_context: %2, %3, %4, %5").arg(s_currentContext.type).arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("%1 s_context: %2, %3, %4, %5").arg(s_currentContext.type).arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
s_currentContext = s_context;
s_col = s_context.area.bCol + s_context.startString.length();
@@ -514,7 +514,7 @@ bool SAParser::slotParseOneLine()
// if (pos != 0) pos++;
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = pos;
- //kdDebug(24000) << QString("Quoted String s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("Quoted String s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
if (s_fullParse)
{
if ( s_currentNode &&
@@ -561,7 +561,7 @@ bool SAParser::slotParseOneLine()
s_currentContext.area.eLine = s_line;
s_currentContext.area.eCol = pos + s_dtd->comments[s_currentContext.startString].length() - 1;
s_currentContext.type = s_previousContext.type;
- //kdDebug(24000) << QString("Comment s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
+ //kdDebug(24000) << TQString("Comment s_context: %1, %2, %3, %4").arg( s_currentContext.bLine).arg(s_currentContext.bCol).arg(s_currentContext.eLine).arg(s_currentContext.eCol) << endl;
if (s_fullParse)
{
@@ -633,8 +633,8 @@ bool SAParser::slotParseOneLine()
}
Node* SAParser::parseArea(const AreaStruct &specialArea,
- const QString &areaStartString,
- const QString &forcedAreaEndString,
+ const TQString &areaStartString,
+ const TQString &forcedAreaEndString,
Node *parentNode,
bool fullParse, bool synchronous)
{
@@ -649,7 +649,7 @@ Node* SAParser::parseArea(const AreaStruct &specialArea,
int s_startCol = specialArea.bCol;
s_endLine = specialArea.eLine;
s_endCol = specialArea.eCol;
- //kdDebug(24000) << QString("Starting to parse at %1, %2 for %3").arg(s_startLine).arg(s_startCol).arg(areaStartString) << endl;
+ //kdDebug(24000) << TQString("Starting to parse at %1, %2 for %3").arg(s_startLine).arg(s_startCol).arg(areaStartString) << endl;
s_searchForAreaEnd = false;
s_searchForForcedAreaEnd = false;
@@ -818,9 +818,9 @@ Node *SAParser::parsingDone()
if (!m_synchronous)
{
SAGroupParser *groupParser = new SAGroupParser(this, write(), g_node, 0L, m_synchronous, true /*last node*/, true);
- connect(groupParser, SIGNAL(rebuildStructureTree(bool)), SIGNAL(rebuildStructureTree(bool)));
- connect(groupParser, SIGNAL(cleanGroups()), SIGNAL(cleanGroups()));
- connect(groupParser, SIGNAL(parsingDone(SAGroupParser*)), SLOT(slotGroupParsingDone(SAGroupParser*)));
+ connect(groupParser, TQT_SIGNAL(rebuildStructureTree(bool)), TQT_SIGNAL(rebuildStructureTree(bool)));
+ connect(groupParser, TQT_SIGNAL(cleanGroups()), TQT_SIGNAL(cleanGroups()));
+ connect(groupParser, TQT_SIGNAL(parsingDone(SAGroupParser*)), TQT_SLOT(slotGroupParsingDone(SAGroupParser*)));
groupParser->slotParseForScriptGroup();
m_groupParsers.append(groupParser);
}
@@ -925,7 +925,7 @@ void SAParser::slotParseNodeInDetail()
#ifdef DEBUG_PARSER
kdDebug(24001) << "Calling parseArea from slotParseNodeInDetail." << endl;
#endif
- QString areaStartString = m_currentNode->tag->tagStr();
+ TQString areaStartString = m_currentNode->tag->tagStr();
if (m_currentNode->tag->dtd()->specialAreaNames[areaStartString].isEmpty())
{
AreaStruct area2(m_currentNode->tag->area());
@@ -967,7 +967,7 @@ void SAParser::setParsingEnabled(bool enabled)
{
m_parseOneLineTimer->stop();
m_parseInDetailTimer->stop();
- for (QValueList<SAGroupParser*>::Iterator it = m_groupParsers.begin(); it != m_groupParsers.end(); ++it)
+ for (TQValueList<SAGroupParser*>::Iterator it = m_groupParsers.begin(); it != m_groupParsers.end(); ++it)
{
(*it)->m_parseForGroupTimer->stop();
delete (*it);
diff --git a/quanta/parsers/saparser.h b/quanta/parsers/saparser.h
index 50c3dd41..c59a01bc 100644
--- a/quanta/parsers/saparser.h
+++ b/quanta/parsers/saparser.h
@@ -18,9 +18,9 @@
#define SAPARSER_H
//qt includes
-#include <qobject.h>
-#include <qregexp.h>
-#include <qvaluestack.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqvaluestack.h>
//own includes
#include "tag.h" //for AreaStruct
@@ -63,8 +63,8 @@ public:
return value: in synchronous case returns the last inserted node, otherwise return 0L.
*/
Node* parseArea(const AreaStruct &specialArea,
- const QString &areaStartString,
- const QString &forcedAreaEndString,
+ const TQString &areaStartString,
+ const TQString &forcedAreaEndString,
Node *parentNode,
bool fullParse, bool synchronous);
/** Returns the line where the last parsing run ended. */
@@ -95,7 +95,7 @@ private:
struct ContextStruct{
int type;
AreaStruct area;
- QString startString;
+ TQString startString;
Node *parentNode;
Node *lastNode;
};
@@ -117,34 +117,34 @@ private:
Node* m_currentNode; ///< the currently parsed script node for details. Changes only after the whole area between m_currentNode and m_currentNode->next is parsed.
int m_lastParsedLine, m_lastParsedCol;
const DTDStruct *m_dtd;
- QRegExp m_quotesRx;
+ TQRegExp m_quotesRx;
bool m_specialInsideXml; //< true if the special area is defined inside a tag, like the PHP in <a href="<? echo $a ?>">
bool s_contextFound;
ContextStruct s_currentContext;
Node *s_parentNode;
bool s_searchContent;
- QString s_searchedString;
- QString s_textLine;
+ TQString s_searchedString;
+ TQString s_textLine;
int s_line, s_col;
int s_endLine, s_endCol;
bool s_fullParse;
- QString s_areaEndString;
+ TQString s_areaEndString;
bool s_searchForAreaEnd;
bool s_searchForForcedAreaEnd;
- QRegExp s_forcedAreaRx;
+ TQRegExp s_forcedAreaRx;
const DTDStruct *s_dtd;
bool s_searchForSpecialAreas;
ContextStruct s_context;
- QValueStack<ContextStruct> s_contextStack;
+ TQValueStack<ContextStruct> s_contextStack;
ContextStruct s_previousContext;
Node *s_currentNode; ///< the current detailed node while parsing for details
Node *s_returnNode;
bool s_useReturnVars;
Node *s_next;
- QValueList<SAGroupParser*> m_groupParsers;
- QTimer *m_parseOneLineTimer;
- QTimer *m_parseInDetailTimer;
+ TQValueList<SAGroupParser*> m_groupParsers;
+ TQTimer *m_parseOneLineTimer;
+ TQTimer *m_parseInDetailTimer;
};
#endif
diff --git a/quanta/parsers/tag.cpp b/quanta/parsers/tag.cpp
index 8a1921db..54779d57 100644
--- a/quanta/parsers/tag.cpp
+++ b/quanta/parsers/tag.cpp
@@ -15,10 +15,10 @@
#include <ctype.h>
-#include <qdict.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qdom.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -31,7 +31,7 @@
#include "node.h"
-void TagAttr::save(QDomElement& element) const
+void TagAttr::save(TQDomElement& element) const
{
element.setAttribute("name", name); // QString
element.setAttribute("value", value); // QString
@@ -43,16 +43,16 @@ void TagAttr::save(QDomElement& element) const
element.setAttribute("special", special); // bool
}
-bool TagAttr::load(QDomElement const& element)
+bool TagAttr::load(TQDomElement const& element)
{
name = element.attribute("name");
value = element.attribute("value");
- nameLine = QString(element.attribute("nameLine")).toInt();
- nameCol = QString(element.attribute("nameCol")).toInt();
- valueLine = QString(element.attribute("valueLine")).toInt();
- valueCol = QString(element.attribute("valueCol")).toInt();
- quoted = QString(element.attribute("quoted")).toInt();
- special = QString(element.attribute("special")).toInt();
+ nameLine = TQString(element.attribute("nameLine")).toInt();
+ nameCol = TQString(element.attribute("nameCol")).toInt();
+ valueLine = TQString(element.attribute("valueLine")).toInt();
+ valueCol = TQString(element.attribute("valueCol")).toInt();
+ quoted = TQString(element.attribute("quoted")).toInt();
+ special = TQString(element.attribute("special")).toInt();
return true;
}
@@ -66,7 +66,7 @@ Tag::Tag()
Tag::Tag(const AreaStruct &area, Document *write, const DTDStruct *dtd, bool doParse)
{
init();
- QString s = write->text(area);
+ TQString s = write->text(area);
m_area = area;
m_dtd = dtd;
if (doParse)
@@ -125,7 +125,7 @@ void Tag::init()
m_notInTree = false;
}
-void Tag::save(QDomElement& element) const
+void Tag::save(TQDomElement& element) const
{
element.setAttribute("name", name); // QString
element.setAttribute("nameSpace", nameSpace); // QString
@@ -141,10 +141,10 @@ void Tag::save(QDomElement& element) const
element.setAttribute("nameLine", m_nameLine); // int
element.setAttribute("nameCol", m_nameCol); // int
- QValueList<TagAttr>::const_iterator it;
+ TQValueList<TagAttr>::const_iterator it;
for (it = attrs.begin(); it != attrs.end(); ++it)
{
- QDomElement child_element = element.ownerDocument().createElement("tagAttr");
+ TQDomElement child_element = element.ownerDocument().createElement("tagAttr");
element.appendChild(child_element);
(*it).save(child_element);
}
@@ -152,28 +152,28 @@ void Tag::save(QDomElement& element) const
element.setAttribute("tagStr", m_tagStr); // QString
}
-bool Tag::load(QDomElement const& element)
+bool Tag::load(TQDomElement const& element)
{
name = element.attribute("name"); // QString
nameSpace = element.attribute("nameSpace"); // QString
cleanStr = element.attribute("cleanStr"); // QString
- type = QString(element.attribute("type")).toInt(); // int
- single = QString(element.attribute("single")).toInt(); // bool
- closingMissing = QString(element.attribute("closingMissing")).toInt(); // bool
+ type = TQString(element.attribute("type")).toInt(); // int
+ single = TQString(element.attribute("single")).toInt(); // bool
+ closingMissing = TQString(element.attribute("closingMissing")).toInt(); // bool
structBeginStr = element.attribute("structBeginStr"); // QString
- validXMLTag = QString(element.attribute("validXMLTag")).toInt(); // bool
- m_cleanStrBuilt = QString(element.attribute("cleanStrBuilt")).toInt(); // bool
- m_indentationDone = QString(element.attribute("indentationDone")).toInt(); // bool
- m_notInTree = QString(element.attribute("notInTree")).toInt(); // bool
- m_nameLine = QString(element.attribute("nameLine")).toInt(); // int
- m_nameCol = QString(element.attribute("nameCol")).toInt(); // int
-
- QDomNodeList list = element.childNodes();
+ validXMLTag = TQString(element.attribute("validXMLTag")).toInt(); // bool
+ m_cleanStrBuilt = TQString(element.attribute("cleanStrBuilt")).toInt(); // bool
+ m_indentationDone = TQString(element.attribute("indentationDone")).toInt(); // bool
+ m_notInTree = TQString(element.attribute("notInTree")).toInt(); // bool
+ m_nameLine = TQString(element.attribute("nameLine")).toInt(); // int
+ m_nameCol = TQString(element.attribute("nameCol")).toInt(); // int
+
+ TQDomNodeList list = element.childNodes();
for (unsigned int i = 0; i != list.count(); ++i)
{
if (list.item(i).isElement())
{
- QDomElement e = list.item(i).toElement();
+ TQDomElement e = list.item(i).toElement();
if (e.tagName() == "tagAttr")
{
TagAttr tag_attr;
@@ -188,7 +188,7 @@ bool Tag::load(QDomElement const& element)
return true;
}
-void Tag::parse(const QString &p_tagStr, Document *p_write)
+void Tag::parse(const TQString &p_tagStr, Document *p_write)
{
attrs.clear();
m_tagStr = p_tagStr;
@@ -216,7 +216,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
name = name.mid(++nameSpacePos);
m_nameCol += nameSpacePos;
}
- QString attrStr;
+ TQString attrStr;
TagAttr attr;
attr.special = false; //by default non of the attributes are special
while (pos < strLength && m_tagStr[pos].isSpace())
@@ -242,7 +242,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
attr.nameCol = sPos + m_area.bCol;
else
attr.nameCol = m_tagStr.left(sPos).section('\n',-1).length();
- attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : QString("checked");
+ attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : TQString("checked");
attr.valueCol = attr.nameCol;
attr.valueLine = attr.nameLine;
attr.quoted = false;
@@ -264,7 +264,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
//treate it as a "true" boolean
if (m_tagStr[pos] != '=' || pos == strLength)
{
- attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : QString("checked");
+ attr.value = (m_dtd != 0) ? m_dtd->booleanTrue : TQString("checked");
attr.valueCol = attr.nameCol;
attr.valueLine = attr.nameLine;
attr.quoted = false;
@@ -278,7 +278,7 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
{
attr.quoted = true;
valueStartPos = pos + 1;
- QChar quotation = m_tagStr[pos];
+ TQChar quotation = m_tagStr[pos];
pos += 1;
while (pos < strLength &&
(m_tagStr[pos] != quotation ||
@@ -316,8 +316,8 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
//add the tag to the document usertag list if it's not present in the dtd
if (m_tagStr.startsWith("<") && m_tagStr.endsWith(">") && m_dtd)
{
- //QString tagName = (m_parsingDTD->caseSensitive) ? name : name.upper();
- QString tagName = name.lower();
+ //TQString tagName = (m_parsingDTD->caseSensitive) ? name : name.upper();
+ TQString tagName = name.lower();
//add the new xml tags to the userTagList
if ( !QuantaCommon::isKnownTag(m_dtd->name, tagName) &&
name[0] != '/' )
@@ -347,9 +347,9 @@ void Tag::parse(const QString &p_tagStr, Document *p_write)
}
-QString Tag::attribute(int index)
+TQString Tag::attribute(int index)
{
- QString attr="";
+ TQString attr="";
if ( index != -1 && index < (int)attrs.count() )
{
attr = attrs[index].name;
@@ -357,9 +357,9 @@ QString Tag::attribute(int index)
return attr;
}
-QString Tag::attributeValue(int index)
+TQString Tag::attributeValue(int index)
{
- QString val = "";
+ TQString val = "";
if ( index != -1 && index < (int)attrs.count() )
{
val = attrs[index].value;
@@ -367,9 +367,9 @@ QString Tag::attributeValue(int index)
return val;
}
-QString Tag::attributeValue(const QString &attr, bool ignoreCase)
+TQString Tag::attributeValue(const TQString &attr, bool ignoreCase)
{
- QString val = "";
+ TQString val = "";
for (uint i = 0 ; i < attrs.count(); i++)
{
@@ -384,7 +384,7 @@ QString Tag::attributeValue(const QString &attr, bool ignoreCase)
}
/** Check if this tag has the attr attribute defined */
-bool Tag::hasAttribute(const QString &attr, bool ignoreCase)
+bool Tag::hasAttribute(const TQString &attr, bool ignoreCase)
{
for (uint i = 0; i < attrs.count(); i++)
{
@@ -424,7 +424,7 @@ void Tag::setTagPosition(const AreaStruct &area)
}
/** Return the index of attr. */
-int Tag::attributeIndex(const QString &attr)
+int Tag::attributeIndex(const TQString &attr)
{
int index = -1;
uint i = 0;
@@ -483,7 +483,7 @@ void Tag::namePos(int &line, int &col)
col = m_nameCol;
}
-void Tag::setStr(const QString &p_tagStr)
+void Tag::setStr(const TQString &p_tagStr)
{
m_tagStr = p_tagStr; cleanStr = m_tagStr;
}
@@ -520,7 +520,7 @@ void Tag::attributeValuePos(int index, int &line, int &col)
}
}
-bool Tag::editAttribute(const QString& attrName, const QString& attrValue)
+bool Tag::editAttribute(const TQString& attrName, const TQString& attrValue)
{
TagAttr attr;
@@ -552,7 +552,7 @@ bool Tag::editAttribute(const QString& attrName, const QString& attrValue)
return false;
}
-void Tag::deleteAttribute(const QString& attrName)
+void Tag::deleteAttribute(const TQString& attrName)
{
for (uint i = 0 ; i < attrs.count(); i++)
{
@@ -564,12 +564,12 @@ void Tag::deleteAttribute(const QString& attrName)
}
}
-void Tag::modifyAttributes(QDict<QString> *attrDict)
+void Tag::modifyAttributes(TQDict<TQString> *attrDict)
{
QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name);
- QDictIterator<QString> it(*attrDict);
- QString attribute;
- QString value;
+ TQDictIterator<TQString> it(*attrDict);
+ TQString attribute;
+ TQString value;
while ( it.current() )
{
attribute = it.currentKey();
@@ -591,13 +591,13 @@ void Tag::modifyAttributes(QDict<QString> *attrDict)
}
}
-QString Tag::toString()
+TQString Tag::toString()
{
QTag *qTag = QuantaCommon::tagFromDTD(m_dtd, name);
- QValueList<TagAttr>::Iterator it;
+ TQValueList<TagAttr>::Iterator it;
TagAttr attr;
- QString attrString;
- QString tagString;
+ TQString attrString;
+ TQString tagString;
for (it = attrs.begin(); it != attrs.end(); ++it)
{
attr = *it;
@@ -652,7 +652,7 @@ void Tag::setDtd(const DTDStruct *dtd)
m_dtd = dtd;
}
-bool Tag::isInsideScript(const QString &str)
+bool Tag::isInsideScript(const TQString &str)
{
if (!m_dtd)
return false; //happens when the DTD is not known yet, e.g in Document::findDTDName
@@ -662,7 +662,7 @@ bool Tag::isInsideScript(const QString &str)
//TODO: speed up if you can...
if (str.find(m_dtd->specialAreaStartRx) != -1)
{
- QString foundString = m_dtd->specialAreaStartRx.cap();
+ TQString foundString = m_dtd->specialAreaStartRx.cap();
if (str.find(m_dtd->specialAreas[foundString]) == -1)
{
return true;
diff --git a/quanta/parsers/tag.h b/quanta/parsers/tag.h
index de2c0a7b..43ed610a 100644
--- a/quanta/parsers/tag.h
+++ b/quanta/parsers/tag.h
@@ -16,9 +16,9 @@
#ifndef TAG_H
#define TAG_H
-#include <qstring.h>
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
class QDomElement;
#include "qtag.h"
@@ -39,11 +39,11 @@ struct TagAttr {
TagAttr() {nameLine = nameCol = valueLine = valueCol = 0; quoted = true; special = false;}
/** For Kafka copy/paste */
- void save(QDomElement& element) const;
- bool load(QDomElement const& element);
+ void save(TQDomElement& element) const;
+ bool load(TQDomElement const& element);
- QString name; //attr name
- QString value; //attr value
+ TQString name; //attr name
+ TQString value; //attr value
int nameLine, nameCol; //where the attr name begins
int valueLine, valueCol;//where the attr value begins
bool quoted; //quote or not the attribute
@@ -73,17 +73,17 @@ public:
Tag operator = ( const Tag& );
/** For Kafka copy/paste */
- void save(QDomElement& element) const;
- bool load(QDomElement const& element);
+ void save(TQDomElement& element) const;
+ bool load(TQDomElement const& element);
/** Parse the p_tagStr in p_write and build up the tag's attributes and values */
- void parse (const QString &p_tagStr, Document *p_write);
+ void parse (const TQString &p_tagStr, Document *p_write);
/** Return the attribute at index*/
- QString attribute(int index);
+ TQString attribute(int index);
/** Return the attribute value at index*/
- QString attributeValue(int index);
+ TQString attributeValue(int index);
/** Return the value of attr*/
- QString attributeValue(const QString &attr, bool ignoreCase = false);
+ TQString attributeValue(const TQString &attr, bool ignoreCase = false);
/** Add an attribute */
void addAttribute(TagAttr attr) {attrs.append(attr);}
/** Get the attribute number index */
@@ -92,13 +92,13 @@ public:
void deleteAttribute(uint index) {attrs.remove(attrs.at(index));}
/** Insert a new Attribute, even if it already exists. Prefer using editAttribute.
Return true if something was mdofied. */
- bool editAttribute(const QString& attrName, const QString& attrValue);
+ bool editAttribute(const TQString& attrName, const TQString& attrValue);
/** Delete the attribute attrName */
- void deleteAttribute(const QString& attrName);
+ void deleteAttribute(const TQString& attrName);
/** Returns the quotation status of the attribute */
bool isQuotedAttribute(int index) const {return attrs[index].quoted;}
/** Check if this tag has the attr attribute defined */
- bool hasAttribute(const QString &attr, bool ignoreCase = false);
+ bool hasAttribute(const TQString &attr, bool ignoreCase = false);
/** set the coordinates of a tag attribute */
void setAttributePosition(int index, int bLineName, int bColName, int bLineValue, int bColValue);
/** Set the coordinates of tag inside the document */
@@ -116,9 +116,9 @@ public:
/** Where the attr value at index begins in the document */
void attributeValuePos(int index, int &line, int &col);
/** Set the internal string which is parsed */
- void setStr(const QString &p_tagStr);
+ void setStr(const TQString &p_tagStr);
/** Get the tag in string format */
- QString tagStr() const {return m_tagStr;};
+ TQString tagStr() const {return m_tagStr;};
/** Get the document where the tag lies */
Document *write() {return m_write;}
/** Set the document where the tag lies */
@@ -128,14 +128,14 @@ public:
/** Returns the index of attributevalue at (line,col). */
int valueIndexAtPos(int line, int col);
/** Return the index of attr. */
- int attributeIndex(const QString &attr);
+ int attributeIndex(const TQString &attr);
void namePos(int &line, int &col);
int attrCount() const {return attrs.count();}
/** modify the attributes of tag according to the attrDict*/
- void modifyAttributes(QDict<QString> *attrDict);
+ void modifyAttributes(TQDict<TQString> *attrDict);
/** returns the tag as a string */
- QString toString();
+ TQString toString();
/** returns true if the tag is a closing tag (name or namespace starts with "/") */
bool isClosingTag();
/** Sets the special flag of attribute at index*/
@@ -163,13 +163,13 @@ public:
//TODO: write setting/retrieving methods for the below attributes, and add
//them the m_ prefix
- QString name;
- QString nameSpace;
- QString cleanStr;
+ TQString name;
+ TQString nameSpace;
+ TQString cleanStr;
int type; //one of the TokenType
bool single; // tags like <tag />
bool closingMissing; //closing tag is optional and missing
- QString structBeginStr; //if it's a special block, contains the block beginning definition string (like <? or <style language="foo">)
+ TQString structBeginStr; //if it's a special block, contains the block beginning definition string (like <? or <style language="foo">)
bool validXMLTag; //false if the closing ">" was not found
bool cleanStrBuilt() {return m_cleanStrBuilt;}
@@ -196,15 +196,15 @@ private:
void init();
/** Verifies if the last char from @param str is inside a script area or not */
- bool isInsideScript(const QString& str);
+ bool isInsideScript(const TQString& str);
AreaStruct m_area; //where the tag is in the doc
int m_nameLine;//where the tag name begins
int m_nameCol;
const DTDStruct* m_dtd; //the tag belongs to this DTD
- QValueList<TagAttr> attrs; //attributes in a tag
- QString m_tagStr; //the tag in string format (as it is in the document)
+ TQValueList<TagAttr> attrs; //attributes in a tag
+ TQString m_tagStr; //the tag in string format (as it is in the document)
Document *m_write; //the document
};
diff --git a/quanta/parts/kafka/cursors.h b/quanta/parts/kafka/cursors.h
index 22eea7b1..6ff94439 100644
--- a/quanta/parts/kafka/cursors.h
+++ b/quanta/parts/kafka/cursors.h
@@ -85,13 +85,13 @@ public:
* @return Returns the location of the Node where the selection begin (and where the cursor is if
* m_cursorAtSelectionStart).
*/
- QValueList<int>& cursorNode() {return m_cursorNode;}
+ TQValueList<int>& cursorNode() {return m_cursorNode;}
/**
* @param cursorNode Set the location of the Node where the selection begin (and where the cursor is if
* m_cursorAtSelectionStart)
*/
- void setCursorNode(QValueList<int> cursorNode) {m_cursorNode = cursorNode;}
+ void setCursorNode(TQValueList<int> cursorNode) {m_cursorNode = cursorNode;}
/**
* @return Returns the offset of the cursor where the selection begin (and where the cursor is if
@@ -121,13 +121,13 @@ public:
* selection ends.
* Empty if this instance only carry the cursor coordinates.
*/
- QValueList<int>& cursorNodeEndSel() {return m_cursorNodeEndSel;}
+ TQValueList<int>& cursorNodeEndSel() {return m_cursorNodeEndSel;}
/**
* @param cursorNodeEndSel Set the location of the end selection Node where the
* selection ends.
*/
- void setCursorNodeEndSel(QValueList<int> cursorNodeEndSel)
+ void setCursorNodeEndSel(TQValueList<int> cursorNodeEndSel)
{m_cursorNodeEndSel = cursorNodeEndSel;}
/**
@@ -142,7 +142,7 @@ public:
{m_cursorOffsetEndSel = cursorOffsetEndSel;}
private:
- QValueList<int> m_cursorNode, m_cursorNodeEndSel;
+ TQValueList<int> m_cursorNode, m_cursorNodeEndSel;
int m_cursorOffset, m_cursorOffsetEndSel;
bool m_cursorAtSelectionStart;
};
diff --git a/quanta/parts/kafka/domtreeview.cpp b/quanta/parts/kafka/domtreeview.cpp
index 14fe17d2..5ed55a1b 100644
--- a/quanta/parts/kafka/domtreeview.cpp
+++ b/quanta/parts/kafka/domtreeview.cpp
@@ -21,13 +21,13 @@
#include <kdebug.h>
#include <khtml_part.h>
#include <klocale.h>
-#include <qstring.h>
-#include <qlayout.h>
+#include <tqstring.h>
+#include <tqlayout.h>
#include <dom/dom_text.h>
#include "domtreeview.moc"
-DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
+DOMTreeView::DOMTreeView(TQWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
{
setCaption(name);
setRootIsDecorated(true);
@@ -38,11 +38,11 @@ DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * n
addColumn("");
setSorting(-1);
part = currentpart;
- connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, SLOT(showTree(const DOM::Node &)));
- connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotItemClicked(QListViewItem *)));
+ connect(part, TQT_SIGNAL(nodeActivated(const DOM::Node &)), this, TQT_SLOT(showTree(const DOM::Node &)));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotItemClicked(TQListViewItem *)));
m_nodedict.setAutoDelete(true);
title = "";
- titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+ titleItem = new TQListViewItem(static_cast<TQListView *>(this), title, "");
}
DOMTreeView::~DOMTreeView()
@@ -50,7 +50,7 @@ DOMTreeView::~DOMTreeView()
disconnect(part);
}
-void DOMTreeView::setTitle(const QString &str)
+void DOMTreeView::setTitle(const TQString &str)
{
title = str;
titleItem->setText(1, title);
@@ -78,7 +78,7 @@ void DOMTreeView::showTree(const DOM::Node &pNode)
document = pNode.ownerDocument();
recursive(0, pNode.ownerDocument());
}
- titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+ titleItem = new TQListViewItem(static_cast<TQListView *>(this), title, "");
// }
setCurrentItem(m_itemdict[pNode.handle()]);
ensureItemVisible(m_itemdict[pNode.handle()]);
@@ -86,30 +86,30 @@ void DOMTreeView::showTree(const DOM::Node &pNode)
void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
{
- QListViewItem *cur_item;
+ TQListViewItem *cur_item;
int len;
if(pNode.ownerDocument() != document)
{
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
- cur_item = new QListViewItem(static_cast<QListView *>(this), node.nodeName().string(), val);
+ cur_item = new TQListViewItem(static_cast<TQListView *>(this), node.nodeName().string(), val);
document = pNode.ownerDocument();
}
else {
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
if(node.nodeType() == DOM::Node::TEXT_NODE)
len = (static_cast<DOM::CharacterData>(node)).length();
else
len = 0;
- cur_item = new QListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val, QString::number(len), QString::number(node.elementId()) );
+ cur_item = new TQListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val, TQString::number(len), TQString::number(node.elementId()) );
unsigned long i;
- QListViewItem *tmp = new QListViewItem(cur_item, "properties");
+ TQListViewItem *tmp = new TQListViewItem(cur_item, "properties");
for(i = 0; i < node.attributes().length(); i++)
{
- new QListViewItem(tmp, node.attributes().item(i).nodeName().string(),
+ new TQListViewItem(tmp, node.attributes().item(i).nodeName().string(),
node.attributes().item(i).nodeValue().string());
}
}
@@ -128,7 +128,7 @@ void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
+void DOMTreeView::slotItemClicked(TQListViewItem *cur_item)
{
DOM::Node *handle = m_nodedict[cur_item];
if(handle) {
@@ -137,11 +137,11 @@ void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
}
}
-KafkaDOMTreeDialog::KafkaDOMTreeDialog(QWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
- : QDialog(parent, name, modal, fl)
+KafkaDOMTreeDialog::KafkaDOMTreeDialog(TQWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
+ : TQDialog(parent, name, modal, fl)
{
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
- DialogLayout = new QGridLayout( this, 1, 1, 11, 6, "DialogLayout");
+ setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
+ DialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "DialogLayout");
domview = new DOMTreeView(this, part, name);
domview->setTitle(i18n( "Debugging KafkaWidget DOM Tree " ));
DialogLayout->addWidget(domview, 1,1);
diff --git a/quanta/parts/kafka/domtreeview.h b/quanta/parts/kafka/domtreeview.h
index 4e2a560f..60c6fed3 100644
--- a/quanta/parts/kafka/domtreeview.h
+++ b/quanta/parts/kafka/domtreeview.h
@@ -23,10 +23,10 @@
#ifdef HEAVY_DEBUG
#include <klistview.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qptrdict.h>
+#include <tqlistview.h>
+#include <tqptrdict.h>
#include <dom/dom_core.h>
-#include <qdialog.h>
+#include <tqdialog.h>
class QString;
class QGridLayout;
@@ -39,9 +39,9 @@ class DOMTreeView : public KListView
{
Q_OBJECT
public:
- DOMTreeView(QWidget *parent, KHTMLPart *part, const char * name = 0);
+ DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0);
~DOMTreeView();
- void setTitle(const QString &str);
+ void setTitle(const TQString &str);
void recursive(const DOM::Node &pNode, const DOM::Node &node);
signals:
@@ -51,13 +51,13 @@ class DOMTreeView : public KListView
void showTree(const DOM::Node &pNode);
protected slots:
- void slotItemClicked(QListViewItem *);
+ void slotItemClicked(TQListViewItem *);
private:
- QString title;
- QListViewItem *titleItem;
- QPtrDict<QListViewItem> m_itemdict;
- QPtrDict<DOM::Node> m_nodedict;
+ TQString title;
+ TQListViewItem *titleItem;
+ TQPtrDict<TQListViewItem> m_itemdict;
+ TQPtrDict<DOM::Node> m_nodedict;
DOM::Node document;
KHTMLPart *part;
@@ -67,10 +67,10 @@ class KafkaDOMTreeDialog : public QDialog
{
Q_OBJECT
public:
- KafkaDOMTreeDialog(QWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ KafkaDOMTreeDialog(TQWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KafkaDOMTreeDialog();
DOMTreeView *domview;
- QGridLayout *DialogLayout;
+ TQGridLayout *DialogLayout;
};
#endif
diff --git a/quanta/parts/kafka/htmldocumentproperties.cpp b/quanta/parts/kafka/htmldocumentproperties.cpp
index 0099f313..d8fee439 100644
--- a/quanta/parts/kafka/htmldocumentproperties.cpp
+++ b/quanta/parts/kafka/htmldocumentproperties.cpp
@@ -44,14 +44,14 @@
#include "viewmanager.h"
-htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
+htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
bool modal, WFlags fl) :
htmlDocumentPropertiesui(parent, name, modal, fl), titleNode( 0L ), htmlNode( 0L ),
headNode( 0L ), linkNode( 0L ), bodyNode( 0L), doctypeNode( 0L ), CSSNode ( 0L ),
xmlNode( 0L ), titleDirty(false), linkDirty(false)
{
Node *node;
- QString text, nodeName;
+ TQString text, nodeName;
bool b;
int index;
KURL url, baseURL;
@@ -69,17 +69,17 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
ok->setAutoDefault(true);
//set the taborder and disable focus for some widgets.
- currentDTD->setFocusPolicy(QWidget::NoFocus);
- QWidget::setTabOrder(title, metaItems);
- QWidget::setTabOrder(metaItems, metaItemsAdd);
- QWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
- QWidget::setTabOrder(metaItemsDelete, cssRules);
- QWidget::setTabOrder(cssRules, cssRulesAdd);
- QWidget::setTabOrder(cssRulesAdd, cssRulesEdit);
- QWidget::setTabOrder(cssRulesEdit, cssRulesDelete);
- QWidget::setTabOrder(cssRulesDelete, cssStylesheet);
- QWidget::setTabOrder(cssStylesheet, ok);
- QWidget::setTabOrder(ok, cancel);
+ currentDTD->setFocusPolicy(TQWidget::NoFocus);
+ TQWidget::setTabOrder(title, metaItems);
+ TQWidget::setTabOrder(metaItems, metaItemsAdd);
+ TQWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
+ TQWidget::setTabOrder(metaItemsDelete, cssRules);
+ TQWidget::setTabOrder(cssRules, cssRulesAdd);
+ TQWidget::setTabOrder(cssRulesAdd, cssRulesEdit);
+ TQWidget::setTabOrder(cssRulesEdit, cssRulesDelete);
+ TQWidget::setTabOrder(cssRulesDelete, cssStylesheet);
+ TQWidget::setTabOrder(cssStylesheet, ok);
+ TQWidget::setTabOrder(ok, cancel);
//set the current DTD name
currentDTD->setText(ViewManager::ref()->activeDocument()->defaultDTD()->nickName);
@@ -87,7 +87,7 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
//set the metaItems DualEditableTree
metaItems->addColumn(i18n("Name"));
metaItems->addColumn(i18n("Content"));
- metaItems->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ metaItems->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
metaItems->setLineWidth( 2 );
metaItems->setSorting(0, true);
@@ -96,9 +96,9 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
//cssRules->setEditable(false);
cssRules->addColumn(i18n("Selector"));
cssRules->addColumn(i18n("Rule"));
- cssRules->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ cssRules->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
cssRules->setLineWidth( 2 );
- //cssRules->setFocusPolicy(QWidget::ClickFocus);
+ //cssRules->setFocusPolicy(TQWidget::ClickFocus);
cssRules->setSorting(-1);
//search for the head, html, title Node
@@ -230,20 +230,20 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
cancel->setIconSet(SmallIconSet("button_cancel"));
//connect buttons
- connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
- connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
- connect(cssRulesAdd, SIGNAL(clicked()), this, SLOT(newCSSRule()));
- connect(cssRulesEdit, SIGNAL(clicked()), this, SLOT(editCSSRule()));
- connect (cssRulesDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentCSSRule()));
- connect(metaItemsAdd, SIGNAL(clicked()), this, SLOT(newMetaItem()));
- connect(metaItemsDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentMetaItem()));
- connect(title, SIGNAL(textChanged(const QString &)), this, SLOT(titleChanged(const QString &)));
- connect(metaItems, SIGNAL(itemModified( QListViewItem * )),
- this, SLOT(metaChanged(QListViewItem * )));
- connect(cssRules, SIGNAL(itemModified( QListViewItem * )),
- this, SLOT(CSSChanged(QListViewItem * )));
- connect(cssStylesheet, SIGNAL(textChanged(const QString &)),
- this, SLOT(linkChanged( const QString& )));
+ connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
+ connect(cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
+ connect(cssRulesAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(newCSSRule()));
+ connect(cssRulesEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(editCSSRule()));
+ connect (cssRulesDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteCurrentCSSRule()));
+ connect(metaItemsAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(newMetaItem()));
+ connect(metaItemsDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteCurrentMetaItem()));
+ connect(title, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(titleChanged(const TQString &)));
+ connect(metaItems, TQT_SIGNAL(itemModified( TQListViewItem * )),
+ this, TQT_SLOT(metaChanged(TQListViewItem * )));
+ connect(cssRules, TQT_SIGNAL(itemModified( TQListViewItem * )),
+ this, TQT_SLOT(CSSChanged(TQListViewItem * )));
+ connect(cssStylesheet, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(linkChanged( const TQString& )));
}
htmlDocumentProperties::~htmlDocumentProperties()
@@ -254,7 +254,7 @@ htmlDocumentProperties::~htmlDocumentProperties()
void htmlDocumentProperties::loadMetaNode(Node *node)
{
int index;
- QString name, content;
+ TQString name, content;
NodeLinkedViewItem *item;
index = node->tag->attributeIndex("name");
@@ -276,7 +276,7 @@ void htmlDocumentProperties::loadMetaNode(Node *node)
void htmlDocumentProperties::loadCSS(Node *node)
{
NodeLinkedViewItem *item;
- QString selector;
+ TQString selector;
CSSNode = node;
node = node->child;
@@ -314,7 +314,7 @@ void htmlDocumentProperties::deleteCurrentMetaItem()
{
if(metaItems->currentItem())
{
- QListViewItem *item = metaItems->currentItem();
+ TQListViewItem *item = metaItems->currentItem();
(static_cast<NodeLinkedViewItem *>(item))->deleted = true;
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
(static_cast<AttributeItem *>(item))->hideEditor(0);
@@ -344,7 +344,7 @@ void htmlDocumentProperties::deleteCurrentCSSRule()
{
if(cssRules->currentItem())
{
- QListViewItem *item = cssRules->currentItem();
+ TQListViewItem *item = cssRules->currentItem();
(static_cast<NodeLinkedViewItem *>(item))->deleted = true;
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
(static_cast<AttributeItem *>(item))->hideEditor(0);
@@ -354,24 +354,24 @@ void htmlDocumentProperties::deleteCurrentCSSRule()
}
-void htmlDocumentProperties::titleChanged(const QString &)
+void htmlDocumentProperties::titleChanged(const TQString &)
{
titleDirty = true;
}
-void htmlDocumentProperties::metaChanged(QListViewItem * item)
+void htmlDocumentProperties::metaChanged(TQListViewItem * item)
{
if(item)
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
}
-void htmlDocumentProperties::CSSChanged(QListViewItem * item)
+void htmlDocumentProperties::CSSChanged(TQListViewItem * item)
{
if(item)
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
}
-void htmlDocumentProperties::linkChanged( const QString& )
+void htmlDocumentProperties::linkChanged( const TQString& )
{
linkDirty = true;
}
@@ -384,7 +384,7 @@ void htmlDocumentProperties::accept()
TagAttr attr;
NodeModifsSet *modifs = new NodeModifsSet();
KURL url, baseURL;
- QString finalURL;
+ TQString finalURL;
NodeSelection *cursorPos;
bool goUp;
//TODO:see for !doctype
@@ -595,7 +595,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
Node *n, *nextNode;
bool htmlNodeCreated = false, bodyNodeCreated = false;
QTag *qHead, *qBody;
- QString tagName;
+ TQString tagName;
if(headNode)
return;
@@ -732,7 +732,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
}
}
-NodeLinkedViewItem::NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2)
+NodeLinkedViewItem::NodeLinkedViewItem(EditableTree *listView, const TQString& title, const TQString& title2)
: AttributeItem(listView, title, title2, 0L)
{
node = 0L;
diff --git a/quanta/parts/kafka/htmldocumentproperties.h b/quanta/parts/kafka/htmldocumentproperties.h
index 62a64659..3bcfdcb1 100644
--- a/quanta/parts/kafka/htmldocumentproperties.h
+++ b/quanta/parts/kafka/htmldocumentproperties.h
@@ -23,7 +23,7 @@ class NodeModifsSet;
class AttributeItem;
class EditableTree;
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "tagattributeitems.h"
#include "htmldocumentpropertiesui.h"
@@ -31,7 +31,7 @@ class EditableTree;
class NodeLinkedViewItem : public AttributeItem
{
public:
- NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2);
+ NodeLinkedViewItem(EditableTree *listView, const TQString& title, const TQString& title2);
virtual ~NodeLinkedViewItem();
Node *node;
@@ -50,7 +50,7 @@ public:
* @param forceInsertionOfBasicNodes Force the insertion of the basic Nodes (HTML, BODY, HEAD, ...) if pressing OK
* without having made any changes.
*/
- htmlDocumentProperties( QWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
+ htmlDocumentProperties( TQWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~htmlDocumentProperties();
@@ -66,10 +66,10 @@ private slots:
virtual void editCSSRule();
virtual void deleteCurrentCSSRule();
- virtual void titleChanged(const QString &);
- virtual void metaChanged(QListViewItem * );
- virtual void CSSChanged(QListViewItem * );
- virtual void linkChanged( const QString& );
+ virtual void titleChanged(const TQString &);
+ virtual void metaChanged(TQListViewItem * );
+ virtual void CSSChanged(TQListViewItem * );
+ virtual void linkChanged( const TQString& );
private:
/**
@@ -83,7 +83,7 @@ private:
void loadMetaNode(Node *node);
void loadCSS(Node *node);
- QPtrList<NodeLinkedViewItem> CSSList, metaList;
+ TQPtrList<NodeLinkedViewItem> CSSList, metaList;
Node *titleNode, *htmlNode, *headNode, *linkNode, *bodyNode, *doctypeNode, *CSSNode, *xmlNode;
bool titleDirty, linkDirty, m_forceInsertionOfBasicNodes;
};
diff --git a/quanta/parts/kafka/htmlenhancer.cpp b/quanta/parts/kafka/htmlenhancer.cpp
index 257ad239..d900d77d 100644
--- a/quanta/parts/kafka/htmlenhancer.cpp
+++ b/quanta/parts/kafka/htmlenhancer.cpp
@@ -52,7 +52,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
DOM::Node domNode, domNode2, attr, *ptDomNode;
bool tbody, goUp;
Node *n;
- QString script, filename, text, oldName;
+ TQString script, filename, text, oldName;
KURL url, baseURL;
int oldType;
@@ -236,7 +236,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
if(node->rootNode() && node->rootNode()->nodeName().string().lower() == "input")
{
domNode = *(node->rootNode());
- QString text = node->tag->attributeValue("name");
+ TQString text = node->tag->attributeValue("name");
kafkaCommon::editDomNodeAttribute(domNode, "input", m_wkafkapart->defaultDTD(),
"title", text, m_wkafkapart->getKafkaWidget()->document());
}
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp
index fe147bc7..0220646d 100644
--- a/quanta/parts/kafka/kafkacommon.cpp
+++ b/quanta/parts/kafka/kafkacommon.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kdebug.h>
#include <dom/dom_exception.h>
@@ -136,17 +136,17 @@ Node* kafkaCommon::getPrevNodeNE(Node *node, Node *endNode)
}
Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
{
// look for commonParent
Node* commonParent = 0;
Node* commonParentStartChild = 0, *commonParentEndChild = 0;
int locOffset = 1;
- QValueList<int> startNodeLocation = getLocation(startNode);
- QValueList<int> endNodeLocation = getLocation(endNode);
- QValueList<int>::iterator itStart = startNodeLocation.begin();
- QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ TQValueList<int> startNodeLocation = getLocation(startNode);
+ TQValueList<int> endNodeLocation = getLocation(endNode);
+ TQValueList<int>::iterator itStart = startNodeLocation.begin();
+ TQValueList<int>::iterator itEnd = endNodeLocation.begin();
while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
(*itStart) == (*itEnd))
{
@@ -186,17 +186,17 @@ Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
}
Node* kafkaCommon::DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
{
// look for commonParent
Node* commonParent = 0;
Node* commonParentStartChild = 0, *commonParentEndChild = 0;
int locOffset = 1;
- QValueList<int> startNodeLocation = getLocation(startNode);
- QValueList<int> endNodeLocation = getLocation(endNode);
- QValueList<int>::iterator itStart = startNodeLocation.begin();
- QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ TQValueList<int> startNodeLocation = getLocation(startNode);
+ TQValueList<int> endNodeLocation = getLocation(endNode);
+ TQValueList<int>::iterator itStart = startNodeLocation.begin();
+ TQValueList<int>::iterator itEnd = endNodeLocation.begin();
while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
(*itStart) == (*itEnd))
{
@@ -368,7 +368,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
Node *parent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
int nonInlineDepth = 0, nonInlineDepth2 = 0, i;
bool b = false;
- QString indentation1, indentation2, text;
+ TQString indentation1, indentation2, text;
if(!node)
return;
@@ -431,13 +431,13 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
if(nbOfSpaces == 0) // tabs are used
{
- indentation1 += QString().fill('\t', nbOfTabs * nonInlineDepth);
- indentation2 += QString().fill('\t', nbOfTabs * nonInlineDepth2);
+ indentation1 += TQString().fill('\t', nbOfTabs * nonInlineDepth);
+ indentation2 += TQString().fill('\t', nbOfTabs * nonInlineDepth2);
}
else // spaces are used
{
- indentation1 += QString().fill(' ', nbOfSpaces * nonInlineDepth);
- indentation2 += QString().fill(' ', nbOfSpaces * nonInlineDepth2);
+ indentation1 += TQString().fill(' ', nbOfSpaces * nonInlineDepth);
+ indentation2 += TQString().fill(' ', nbOfSpaces * nonInlineDepth2);
}
//test and add indentations if necessary
@@ -759,7 +759,7 @@ void kafkaCommon::fitsNodesPosition(Node* startNode, int colMovement, int lineMo
int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
{
- QString nodeName;
+ TQString nodeName;
if(!node)
return kafkaCommon::errorDisplay;
@@ -822,10 +822,10 @@ int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
return kafkaCommon::errorDisplay;
}
-QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
+TQString kafkaCommon::removeUnnecessaryWhitespaces(const TQString &string,
bool removeAllSpacesAtTheLeft, bool removeAllSpacesAtTheRight)
{
- /**QString newString;
+ /**TQString newString;
int i;
if(string.length() == 0)
@@ -845,11 +845,11 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
newString = newString.mid(0, newString.length() - 1);
return newString;*/
- QString newString;
+ TQString newString;
bool hasLeftWhiteSpaces, hasRightWhiteSpaces;
if(string.length() == 0)
- return QString();
+ return TQString();
hasLeftWhiteSpaces = (string[0].isSpace());
hasRightWhiteSpaces = (string[string.length() - 1].isSpace());
@@ -863,7 +863,7 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
return newString;
}
-Node* kafkaCommon::createNode(const QString &nodeName, const QString &tagString, int nodeType, Document *doc)
+Node* kafkaCommon::createNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc)
{
Node *node;
@@ -922,10 +922,10 @@ Node *kafkaCommon::createDoctypeNode(Document *doc)
return node;
}
-Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const QString &encoding)
+Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const TQString &encoding)
{
Node *node, *child, *closingNode;
- QString text;
+ TQString text;
if(!doc)
return 0L;
@@ -951,7 +951,7 @@ Node* kafkaCommon::createMandatoryNodeSubtree(Node *node, Document *doc)
QTag *nodeQTag, *oldNodeQTag;
bool searchForMandatoryNode;
Node *currentParent;
- QMap<QString, bool>::iterator it;
+ TQMap<TQString, bool>::iterator it;
if(!node)
return 0L;
@@ -1353,8 +1353,8 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
}
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = DTDGetNonInlineCommonParent(startNode, startNode,
commonParentStartChildLocation, commonParentEndChildLocation, 0);
@@ -1501,8 +1501,8 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
kdDebug(25001)<< "kafkaCommon::DTDinsertNode()" << endl;
#endif
- QValueList<int> startNodeLocation, endNodeLocation;
- QValueList<int>::iterator itStart, itEnd;
+ TQValueList<int> startNodeLocation, endNodeLocation;
+ TQValueList<int>::iterator itStart, itEnd;
Node *commonParent = 0L, *commonParentStartChild, *commonParentEndChild, *parentNode, *node;
Node *lastValidStartParent = 0L, *lastValidEndParent = 0L, *newParentNode, *child, *next;
Node *oldCommonParent, *lastNewNode, *oldParentNode;
@@ -1797,7 +1797,7 @@ bool kafkaCommon::DTDinsertRemoveNode(Node *newNode, Node *startNode, int startO
//what should we do?
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs,
bool merge)
{
@@ -1817,7 +1817,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
return node;
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs)
{
@@ -1837,7 +1837,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
return node;
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
{
@@ -1862,7 +1862,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
}
-bool kafkaCommon::DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString,
+bool kafkaCommon::DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs)
{
@@ -2160,7 +2160,7 @@ Node* kafkaCommon::getLastChild(Node* node)
Node *kafkaCommon::duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly)
{
- QPtrList<NodeLink> nodeLinkList;
+ TQPtrList<NodeLink> nodeLinkList;
bool goUp = false;
Node *currentNode, *currentNewNode, *newRootNode = 0, *newNext, *newParent, *newPrev;
NodeLink *link;
@@ -2221,9 +2221,9 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
//Node *prev;
bool isSingle;
int type;
- QString namespaceName, nodeName, caseSensitive;
- QString closingNamespaceName, closingNodeName, closingCaseSensitive;
- QValueList<int> location;
+ TQString namespaceName, nodeName, caseSensitive;
+ TQString closingNamespaceName, closingNodeName, closingCaseSensitive;
+ TQValueList<int> location;
if(!node)
return 0L;
@@ -2363,8 +2363,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
@@ -2423,8 +2423,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
if(extractInlineParentNodes)
@@ -2519,8 +2519,8 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
if(extractInlineParentNodes)
@@ -2536,20 +2536,20 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod
Node* newCommonParent = duplicateNodeSubtree(commonParent, true);
- QValueList<int> const startNodeLocation = getLocation(startNode);
- QValueList<int> const commonParentLocation = getLocation(commonParent);
+ TQValueList<int> const startNodeLocation = getLocation(startNode);
+ TQValueList<int> const commonParentLocation = getLocation(commonParent);
uint const commonParentDepth = commonParentLocation.size();
uint const newStartNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
uint const newEndNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
- QValueList<int> newStartNodeLocation, newEndNodeLocation;
+ TQValueList<int> newStartNodeLocation, newEndNodeLocation;
newStartNodeLocation.push_back(1);
newEndNodeLocation.push_back(1);
for(uint i = 1; i != newStartNodeDepth; ++i)
newStartNodeLocation.push_back(startNodeLocation[i + commonParentDepth - 1]);
- QValueList<int> const endNodeLocation = getLocation(endNode);
+ TQValueList<int> const endNodeLocation = getLocation(endNode);
for(uint i = 1; i != newEndNodeDepth; ++i)
newEndNodeLocation.push_back(endNodeLocation[i + commonParentDepth - 1]);
@@ -2577,7 +2577,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d
{
NodeModif modif;
Node *curNode, *nodePrev, *nodeNext, *nodeNext2, *n, *n2;
- QString nodeName, closingNodeName, namespaceName, namespaceName2;
+ TQString nodeName, closingNodeName, namespaceName, namespaceName2;
bool isSingle, caseSensitive, caseSensitive2;
if(!node)
@@ -2639,7 +2639,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d
}
}
-int kafkaCommon::DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode,
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
NodeModifsSet *modifs)
{
@@ -2904,7 +2904,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
{
NodeModif *modif;
Tag *tag;
- QString tagStr;
+ TQString tagStr;
Node *node;
if(!n || (n->tag->type != Tag::Text && n->tag->type != Tag::Empty) || offset <= 0 || offset >=
@@ -2939,7 +2939,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
}
void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs)
+ TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs)
{
//Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
// and the second will be surrounded by the new Node. Same thing for endNode.
@@ -2970,8 +2970,8 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
}
void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
bool subTree, NodeModifsSet* modifs)
{
Node* node = endNode;
@@ -3016,8 +3016,8 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
}
void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
NodeSelection& cursorHolder,
Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes)
{
@@ -3109,8 +3109,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeModifsSet *modifs, bool merg
}
// have in consideration two spaces in a row
- QString nStr(n->tag->tagStr());
- QString n2Str(n2->tag->tagStr());
+ TQString nStr(n->tag->tagStr());
+ TQString n2Str(n2->tag->tagStr());
if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
{
nStr = nStr.left(nStr.length() - 1);
@@ -3165,8 +3165,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, Nod
}
// have in consideration two spaces in a row
- QString nStr(n->tag->tagStr());
- QString n2Str(n2->tag->tagStr());
+ TQString nStr(n->tag->tagStr());
+ TQString n2Str(n2->tag->tagStr());
if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
{
nStr = nStr.left(nStr.length() - 1);
@@ -3293,7 +3293,7 @@ void kafkaCommon::mergeInlineNode(Node *startNode, Node *endNode, Node **cursorN
}
}
-void kafkaCommon::getEndPosition(const QString &tagString, int bLine, int bCol, int &eLine, int &eCol)
+void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol, int &eLine, int &eCol)
{
/**int result, oldResult;
@@ -3342,7 +3342,7 @@ void kafkaCommon::getEndPosition(Node *node, int bLine, int bCol, int &eLine, in
getEndPosition(node->tag->tagStr(), bLine, bCol, eLine, eCol);
}
-void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+void kafkaCommon::setTagString(Node *node, const TQString &newTagString, NodeModifsSet* modifs)
{
int eLine, eCol, bLine, bCol;
Tag *tag;
@@ -3368,7 +3368,7 @@ void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModi
node->tag->setTagPosition(bLine, bCol, eLine, eCol);
}
-void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+void kafkaCommon::setTagStringAndFitsNodes(Node *node, const TQString &newTagString, NodeModifsSet* modifs)
{
int eLine, eCol, oldELine, oldECol;
bool b = false;
@@ -3383,7 +3383,7 @@ void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagStri
fitsNodesPosition(getNextNode(node, b), eCol - oldECol, eLine - oldELine);
}
-void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs)
+void kafkaCommon::editNodeAttribute(Node* node, const TQString& name, const TQString& value, NodeModifsSet* modifs)
{
NodeModif *modif = 0;
@@ -3406,9 +3406,9 @@ void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QStri
}
}
-QValueList<int> kafkaCommon::getLocation(Node * node)
+TQValueList<int> kafkaCommon::getLocation(Node * node)
{
- QValueList<int> loc;
+ TQValueList<int> loc;
int i = 0;
while(node)
@@ -3425,9 +3425,9 @@ QValueList<int> kafkaCommon::getLocation(Node * node)
return loc;
}
-QValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
+TQValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
{
- QValueList<int> loc;
+ TQValueList<int> loc;
int i = 0;
while(!domNode.isNull())
@@ -3444,9 +3444,9 @@ QValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
return loc;
}
-Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc)
+Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
Node *node = baseNode;
Node *m = 0L;
int i;
@@ -3469,9 +3469,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc)
return m;
}
-Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree)
+Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc, Node* nodeTree)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
Node *node = nodeTree;
if(!node)
node = baseNode;
@@ -3496,9 +3496,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree)
return m;
}
-DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode)
+DOM::Node kafkaCommon::getNodeFromLocation(TQValueList<int> loc, DOM::Node rootNode)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
DOM::Node node = rootNode;
DOM::Node m = rootNode;
int i;
@@ -3522,10 +3522,10 @@ DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNo
return m;
}
-Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset)
+Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset)
{
- QValueList<int>::iterator it = loc.begin();
- QValueList<int> list;
+ TQValueList<int>::iterator it = loc.begin();
+ TQValueList<int> list;
int i;
for(i = 0; i < locOffset; ++i)
@@ -3537,10 +3537,10 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset)
return getNodeFromLocation(list);
}
-Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree)
+Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset, Node* nodeTree)
{
- QValueList<int>::iterator it = loc.begin();
- QValueList<int> list;
+ TQValueList<int>::iterator it = loc.begin();
+ TQValueList<int> list;
int i;
for(i = 0; i != locOffset; ++i)
@@ -3552,9 +3552,9 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, No
return getNodeFromLocation(list, nodeTree);
}
-int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2)
+int kafkaCommon::compareNodePosition(TQValueList<int> pos1, TQValueList<int> pos2)
{
- QValueList<int>::iterator it1, it2;
+ TQValueList<int>::iterator it1, it2;
it1 = pos1.begin();
it2 = pos2.begin();
@@ -3578,7 +3578,7 @@ int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2)
int kafkaCommon::compareNodePosition(Node *n1, Node *n2)
{
- QValueList<int> pos1, pos2;
+ TQValueList<int> pos1, pos2;
if(!n1 || !n2)
return kafkaCommon::positionError;
@@ -3644,7 +3644,7 @@ int kafkaCommon::nodeDepth(Node *node)
return depth;
}
-Node* kafkaCommon::hasParent(Node *node, const QString &name)
+Node* kafkaCommon::hasParent(Node *node, const TQString &name)
{
node = node->parent;
while(node)
@@ -3657,15 +3657,15 @@ Node* kafkaCommon::hasParent(Node *node, const QString &name)
return 0L;
}
-Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const QString &name)
+Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const TQString &name)
{
Q_ASSERT(startNode && endNode);
//Andras: don't crash
if (!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* node = DTDGetCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, 0);
@@ -3726,7 +3726,7 @@ bool kafkaCommon::removeDomNode(DOM::Node node)
return true;
}
-DOM::Node kafkaCommon::createDomNode(const QString &nodeName, const DTDStruct* dtd,
+DOM::Node kafkaCommon::createDomNode(const TQString &nodeName, const DTDStruct* dtd,
DOM::Document rootNode)
{
// FIXME
@@ -3757,13 +3757,13 @@ DOM::Node kafkaCommon::createDomNode(Node *node, DOM::Document rootNode)
return createDomNode(node->tag->name, node->tag->dtd(), rootNode);
}
-DOM::Node kafkaCommon::createTextDomNode(const QString &textString, DOM::Document rootNode)
+DOM::Node kafkaCommon::createTextDomNode(const TQString &textString, DOM::Document rootNode)
{
return rootNode.createTextNode(textString);
}
-DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+DOM::Node kafkaCommon::createDomNodeAttribute(const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
DOM::Node attr;
QTag *qTag = 0L;
@@ -3786,7 +3786,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTD
return attr;
}
-DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrName,
+DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const TQString &attrName,
DOM::Document rootNode)
{
if(!node)
@@ -3795,7 +3795,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrNam
return createDomNodeAttribute(node->tag->name, node->tag->dtd(), attrName, "", rootNode);
}
-//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const QString &attrName,
+//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const TQString &attrName,
// DOM::Document rootNode)
//{
/**if(node.isNull())
@@ -3815,8 +3815,8 @@ bool kafkaCommon::insertDomNodeAttribute(DOM::Node node, DOM::Node attr)
return true;
}
-bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
DOM::Node attr;
@@ -3837,7 +3837,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName,
}
bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
if(!node)
return false;
@@ -3846,7 +3846,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node,
attrName, attrValue, rootNode);
}
-DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const QString &name)
+DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const TQString &name)
{
while(!domNode.isNull())
{
@@ -3935,9 +3935,9 @@ bool kafkaCommon::parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Nod
return true;
}
-bool kafkaCommon::isInline(const QString &nodeNam)
+bool kafkaCommon::isInline(const TQString &nodeNam)
{
- QString nodeName = nodeNam.lower();
+ TQString nodeName = nodeNam.lower();
if(nodeName == "q" || nodeName == "u" || nodeName == "i" || nodeName == "b" ||
nodeName == "cite" || nodeName == "em" || nodeName == "var" || nodeName == "em" ||
nodeName == "tt" || nodeName == "code" || nodeName == "kbd" || nodeName == "samp" ||
@@ -3961,7 +3961,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
#endif
{
#ifdef HEAVY_DEBUG
- QString output, dots;
+ TQString output, dots;
int j;
DOM::Node node;
if(rootNode.isNull())
@@ -4002,7 +4002,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
void kafkaCommon::coutTree(Node *node, int indent)
{
- QString output, dots;
+ TQString output, dots;
int bLine, bCol, eLine, eCol, j;
if(!node)
kdDebug(25001)<< "kafkaCommon::coutTree() - bad node!" << endl;
@@ -4056,7 +4056,7 @@ void kafkaCommon::coutTree(Node *node, int indent)
}
}
-int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name)
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name)
{
Q_ASSERT(start_node && end_node);
//Andras: don't crash
@@ -4078,8 +4078,8 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& ta
return -1; // neither the nodes have tag_name as parent
}
-int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
- QString const& attribute_name, QString const& attribute_value)
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
+ TQString const& attribute_name, TQString const& attribute_value)
{
Q_ASSERT(start_node && end_node);
//Andras: don't crash
@@ -4109,7 +4109,7 @@ bool kafkaCommon::isBetweenWords(Node* node, int offset)
if (!node)
return false; //FIXME: Andras: don't crash
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
return !
(tag_str[offset].isSpace() || tag_str[offset].isPunct() ||
@@ -4129,7 +4129,7 @@ void kafkaCommon::getStartOfWord(Node*& node, int& offset)
kdDebug(23100) << "getStartOfWord node length: " << node->tag->tagStr().length() << endl;
kdDebug(23100) << "getStartOfWord offset BEGIN: " << offset << endl;
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
while(offset >= 0 && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
--offset;
@@ -4173,7 +4173,7 @@ void kafkaCommon::getEndOfWord(Node*& node, int& offset)
return;
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
while((uint)offset != tag_str.length() && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
++offset;
diff --git a/quanta/parts/kafka/kafkacommon.h b/quanta/parts/kafka/kafkacommon.h
index d71783aa..7de7d77e 100644
--- a/quanta/parts/kafka/kafkacommon.h
+++ b/quanta/parts/kafka/kafkacommon.h
@@ -18,7 +18,7 @@
#ifndef KAFKACOMMON_H
#define KAFKACOMMON_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <dom/dom_node.h>
namespace DOM
@@ -96,15 +96,15 @@ public:
* @return The first, non inline, common parent of startNode and endNode.
*/
static Node* DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
/**
* Same as above, only that the common parent can be inline.
*/
static Node* DTDGetCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
/**
* This function returns the next DOM::Node after node : the first child of
@@ -184,7 +184,7 @@ public:
/**
* Create/Delete the necessary Empty Nodes between n1 and n2 so that a nice indentation can be
* generated by the undoRedo system. The undoRedo system can't create itself these Nodes
- * because it will create them only during the synchronization, making all the QValueList<int>
+ * because it will create them only during the synchronization, making all the TQValueList<int>
* Nodes location wrong.
* WARNING n1 and n2 must be siblings or parent-child. If there are sibling and n1 is a XmlTag,
* n1 should not have non empty childs.
@@ -237,7 +237,7 @@ public:
* unlike the above example.
* @return Returns the modified string.
*/
- static QString removeUnnecessaryWhitespaces(const QString &string,
+ static TQString removeUnnecessaryWhitespaces(const TQString &string,
bool removeAllSpacesAtTheLeft = false, bool removeAllSpacesAtTheRight = false);
@@ -251,7 +251,7 @@ public:
* @param doc The document the Node will belong to.
* @return Returns the newly created node.
*/
- static Node* createNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node* createNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc);
/**
@@ -273,7 +273,7 @@ public:
* @param doc It needs the document where the xml node will be inserted.
* @param encoding The encoding to use (usually get it with quantaApp->defaultEncoding())
*/
- static Node *createXmlDeclarationNode(Document *doc, const QString &encoding);
+ static Node *createXmlDeclarationNode(Document *doc, const TQString &encoding);
/**
* Create a node subtree which contains the mandatory Nodes in order to be DTD compliant.
@@ -429,7 +429,7 @@ public:
* @param nextSibling The next sibling of the Node.
* @return Returns a pointer to the newly created Node.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs, bool merge = true);
/**
@@ -442,7 +442,7 @@ public:
* All the Nodes between the new Node and its closing Tag will be moved as childs of the new Node.
* @param modifs The changes made are logged into modifs.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling, NodeModifsSet *modifs);
/**
@@ -455,7 +455,7 @@ public:
* @param startOffset The first Node will be splitted at offset startOffset, the right part will be enclosed.
* @param endOffset The last Node will be splitted at offset endOffset, the left part will be enclosed.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs);
@@ -472,7 +472,7 @@ public:
* @param endOffset If endNode is a text, specify at which offset the new Node must stop to surround.
* @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid parent.
*/
- static bool DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static bool DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs);
@@ -621,7 +621,7 @@ public:
* @param modifs The usual modifs to log the modifications made for the undo/redo system.
* @return Returns a kafkaCommon::extractNodeStatus.
*/
- static int DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+ static int DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode,
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
NodeModifsSet *modifs);
@@ -705,8 +705,8 @@ public:
* @param modifs The changes made are logged into modifs.
*/
static void splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
NodeSelection& cursorHolder,
Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes = true);
@@ -746,7 +746,7 @@ public:
* @param eLine Returns the line of the last letter of tagString.
* @param eCol Returns the col of the last letter of tagString.
*/
- static void getEndPosition(const QString & tagString, int bLine, int bCol, int &eLine, int &eCol);
+ static void getEndPosition(const TQString & tagString, int bLine, int bCol, int &eLine, int &eCol);
/**
* It behaves essentially like the above function except that the string is the Tag String of Node.
@@ -760,18 +760,18 @@ public:
* @param newTagString The new tag String :-)
* @param modifs The changes made are logged into modifs.
*/
- static void setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+ static void setTagString(Node *node, const TQString &newTagString, NodeModifsSet* modifs);
/**
* This function behaves essentially like the above function except that all the others Nodes' position
* are updated too.
*/
- static void setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+ static void setTagStringAndFitsNodes(Node *node, const TQString &newTagString, NodeModifsSet* modifs);
/**
* This function behaves exactly like Node::editAttribute except that the change is logged inside a NodeModifsSet.
*/
- static void editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs);
+ static void editNodeAttribute(Node* node, const TQString& name, const TQString& value, NodeModifsSet* modifs);
/**
* Gets the location of a Node in a pointer-independant suit of ints e.g. 1,3,5 means
@@ -780,31 +780,31 @@ public:
* @param node The Node we want the location.
* @return Returns the location.
*/
- static QValueList<int> getLocation(Node* node);
+ static TQValueList<int> getLocation(Node* node);
/**
* It behaves essentially like the above function except that it operate on DOM::Nodes.
*/
- static QValueList<int> getLocation(DOM::Node domNode);
+ static TQValueList<int> getLocation(DOM::Node domNode);
/**
* Get the node corresponding to a location. See the above function.
* @param loc We want the Node from this location.
* @return Returns the Node at location loc.
*/
- static Node* getNodeFromLocation(QValueList<int> loc);
+ static Node* getNodeFromLocation(TQValueList<int> loc);
/**
* Similar to the above function but instead of using baseNode it uses the passes Node tree.
* @param nodeTree Node tree where to get the location.
*/
- static Node* getNodeFromLocation(QValueList<int> loc, Node* nodeTree);
+ static Node* getNodeFromLocation(TQValueList<int> loc, Node* nodeTree);
/**
* It behaves essentially like the above function except that it operate on DOM::Nodes.
* @rootNode It needs the root Node of the DOM::Node Tree i.e. the document() Node.
*/
- static DOM::Node getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode);
+ static DOM::Node getNodeFromLocation(TQValueList<int> loc, DOM::Node rootNode);
/**
* Get the node corresponding to a sublocation.
@@ -812,9 +812,9 @@ public:
* @locOffset We want the (totalNumberOfParent - locOffset)th parent of Node.
* @return Returns a parent of the node pointed by loc.
*/
- static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset);
+ static Node* getNodeFromSubLocation(TQValueList<int> loc, int locOffset);
- static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree);
+ static Node* getNodeFromSubLocation(TQValueList<int> loc, int locOffset, Node* nodeTree);
/**
* A enumeration for kafkaCommon::compareNodePosition().
@@ -839,7 +839,7 @@ public:
* @param pos2 The location of the Node to be compared to.
* @return Return a kafkaCommon::position flag.
*/
- static int compareNodePosition(QValueList<int> pos1, QValueList<int> pos2);
+ static int compareNodePosition(TQValueList<int> pos1, TQValueList<int> pos2);
/**
* It behave essentially like the above function except that it is based on Nodes.
@@ -864,12 +864,12 @@ public:
* Looks if node has a parent which is named name.
* @return Returns the first parent which is named name or 0L if not found.
*/
- static Node* hasParent(Node *node, const QString &name);
+ static Node* hasParent(Node *node, const TQString &name);
/**
* Tries to find the common parent to startNode and endNode, in the same conditions as above.
*/
- static Node* hasParent(Node* startNode, Node* endNode, const QString &name);
+ static Node* hasParent(Node* startNode, Node* endNode, const TQString &name);
/** ----------------- DOM::NODE TREE MODIFICATIONS --------------------*/
@@ -907,7 +907,7 @@ public:
* @param rootNode The rootNode is needed in order to create a new DOM::Node.
* @return Returns the DOM::Node created or a null DOM::Node if nodeName is invalid.
*/
- static DOM::Node createDomNode(const QString &nodeName, const DTDStruct* dtd, DOM::Document rootNode);
+ static DOM::Node createDomNode(const TQString &nodeName, const DTDStruct* dtd, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
@@ -921,7 +921,7 @@ public:
* @param rootNode The rootNode is needed in order to create a new Text DOM::Node.
* @return a new text DOM::Node.
*/
- static DOM::Node createTextDomNode(const QString &textString, DOM::Document rootNode);
+ static DOM::Node createTextDomNode(const TQString &textString, DOM::Document rootNode);
/**
* Create a new attribute and check if the attrName can have this attribute.
@@ -932,21 +932,21 @@ public:
* @param rootNode The rootNode is needed in order to create a new Attribute.
* @return Returns the new Attribute or a null DOM::Node if attrName is invalid.
*/
- static DOM::Node createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ static DOM::Node createDomNodeAttribute(const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
* @param node The corresponding DOM::Node of node will get the attribute. It don't add the attribute.
*/
- static DOM::Node createDomNodeAttribute(Node* node, const QString &attrName, DOM::Document rootNode);
+ static DOM::Node createDomNodeAttribute(Node* node, const TQString &attrName, DOM::Document rootNode);
/**
* It behaves essentially like the above function except that it use the DOM::Node->Node* link to get the
* corresponding Node. So be sure that the link is set.
* @param node The node which will get the attribute. It don't add the attribute.
*/
- //static DOM::node createDomNodeAttribute(DOM::Node node, const QString &attrName,
+ //static DOM::node createDomNodeAttribute(DOM::Node node, const TQString &attrName,
// DOM::Document rootNode);
/**
@@ -967,21 +967,21 @@ public:
* @param rootNode The rootNode is needed in order to create a new Attribute.
* @return Returns if the operation was successfull.
*/
- static bool editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ static bool editDomNodeAttribute(DOM::Node node, const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
* @param node The DOM::Node comes from this node.
*/
static bool editDomNodeAttribute(DOM::Node domNode, Node* node,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* Looks if domNode has a parent which is named name.
* @return Returns the first parent which is named name or an empty DOM::Node if not found.
*/
- static DOM::Node hasParent(DOM::Node domNode, const QString &name);
+ static DOM::Node hasParent(DOM::Node domNode, const TQString &name);
/**
* Returns the position of the child domNode.
@@ -1018,7 +1018,7 @@ public:
* TEMPORARY, HTML specific
* @return Returns true if it is a inline Node. Official DTD List, unlike getNodeDisplay().
*/
- static bool isInline(const QString &nodename);
+ static bool isInline(const TQString &nodename);
/**
* Prints in stdout the current DOM::Node tree.
@@ -1043,10 +1043,10 @@ public:
* 1 is inside tag_name
* 0 mixed
*/
- static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name);
+ static int isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name);
- static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
- QString const& attribute_name, QString const& attribute_value);
+ static int isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
+ TQString const& attribute_name, TQString const& attribute_value);
/**
* Return whether the offset is placed between two words in a text node.
@@ -1125,7 +1125,7 @@ private:
* @param modifs The changes made are logged into modifs.
*/
static void splitStartNodeSubtree(Node* startNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
+ TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
/**
* Split the last valid start parent (commonParentStartChild) into two.
* The following tree:
@@ -1169,8 +1169,8 @@ private:
* @param modifs The changes made are logged into modifs.
*/
static void splitEndNodeSubtree(Node* endNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
bool subTree, NodeModifsSet* modifs);
};
diff --git a/quanta/parts/kafka/kafkadragobject.cpp b/quanta/parts/kafka/kafkadragobject.cpp
index 652ea6f2..7d546036 100644
--- a/quanta/parts/kafka/kafkadragobject.cpp
+++ b/quanta/parts/kafka/kafkadragobject.cpp
@@ -17,8 +17,8 @@
#include <kdebug.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "kafkadragobject.h"
#include "node.h"
@@ -26,24 +26,24 @@
char const* KafkaDragObject::m_mimetype = "application/kafka-nodeselection";
-KafkaDragObject::KafkaDragObject(Node const* item, QWidget* dragSource, const char* name)
- : QStoredDrag(m_mimetype, dragSource, name), m_item(item)
+KafkaDragObject::KafkaDragObject(Node const* item, TQWidget* dragSource, const char* name)
+ : TQStoredDrag(m_mimetype, dragSource, name), m_item(item)
{
- QDomDocument doc("KafkaSelection");
- QString docstart = "<KafkaSelection/>";
+ TQDomDocument doc("KafkaSelection");
+ TQString docstart = "<KafkaSelection/>";
doc.setContent(docstart);
- QDomElement itemsElement = doc.createElement("Items");
+ TQDomElement itemsElement = doc.createElement("Items");
doc.documentElement().appendChild(itemsElement);
//kdDebug(25001) << doc.toString() << endl;
item->save(itemsElement);
- //QDataStream s(m_array, IO_WriteOnly);
- QTextStream s(m_array, IO_WriteOnly);
+ //TQDataStream s(m_array, IO_WriteOnly);
+ TQTextStream s(m_array, IO_WriteOnly);
s << doc.toString();
//s << "biltre";
/*
kdDebug(25001) << m_array.size() << endl;
kdDebug(25001) << doc.toString() << endl;
- kdDebug(25001) << QString(m_array) << endl;
+ kdDebug(25001) << TQString(m_array) << endl;
*/
//setEncodedData(m_array);
}
@@ -51,12 +51,12 @@ KafkaDragObject::KafkaDragObject(Node const* item, QWidget* dragSource, const ch
KafkaDragObject::~KafkaDragObject()
{}
-QByteArray KafkaDragObject::encodedData(const char* mimetype) const
+TQByteArray KafkaDragObject::encodedData(const char* mimetype) const
{
if(m_mimetype == mimetype)
return m_array;
- return QByteArray();
+ return TQByteArray();
}
Node const* KafkaDragObject::getItem() const
@@ -64,19 +64,19 @@ Node const* KafkaDragObject::getItem() const
return m_item;
}
-bool KafkaDragObject::canDecode(QMimeSource *e)
+bool KafkaDragObject::canDecode(TQMimeSource *e)
{
return e->provides(m_mimetype);
}
-bool KafkaDragObject::decode(QMimeSource* e, Node* node)
+bool KafkaDragObject::decode(TQMimeSource* e, Node* node)
{
if(!node || !e->provides(m_mimetype))
return false;
- QByteArray data = e->encodedData(m_mimetype);
- //kdDebug(25001) << QString(data) << endl;
- QDomDocument doc;
+ TQByteArray data = e->encodedData(m_mimetype);
+ //kdDebug(25001) << TQString(data) << endl;
+ TQDomDocument doc;
doc.setContent(data, false);
//kdDebug(25001) << doc.toString() << endl;
node->load(doc.documentElement().firstChild().toElement());
diff --git a/quanta/parts/kafka/kafkadragobject.h b/quanta/parts/kafka/kafkadragobject.h
index 3325812c..8b6c2e6e 100644
--- a/quanta/parts/kafka/kafkadragobject.h
+++ b/quanta/parts/kafka/kafkadragobject.h
@@ -18,8 +18,8 @@
#ifndef KAFKADRAGOBJECT_H
#define KAFKADRAGOBJECT_H
-#include <qcstring.h>
-#include <qdragobject.h>
+#include <tqcstring.h>
+#include <tqdragobject.h>
class Node;
@@ -31,17 +31,17 @@ class KafkaDragObject: public QStoredDrag
Q_OBJECT
public:
- KafkaDragObject(Node const* item, QWidget* dragSource = 0, const char* name = 0);
+ KafkaDragObject(Node const* item, TQWidget* dragSource = 0, const char* name = 0);
~KafkaDragObject();
- QByteArray encodedData(const char* c) const;
+ TQByteArray encodedData(const char* c) const;
Node const* getItem() const;
- static bool canDecode(QMimeSource*);
- static bool decode(QMimeSource*, Node* node);
+ static bool canDecode(TQMimeSource*);
+ static bool decode(TQMimeSource*, Node* node);
private:
- QByteArray m_array;
+ TQByteArray m_array;
Node const* m_item;
static char const* m_mimetype;
diff --git a/quanta/parts/kafka/kafkahtmlpart.cpp b/quanta/parts/kafka/kafkahtmlpart.cpp
index 493a9a3f..bcbc7611 100644
--- a/quanta/parts/kafka/kafkahtmlpart.cpp
+++ b/quanta/parts/kafka/kafkahtmlpart.cpp
@@ -16,15 +16,15 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qpainter.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qmainwindow.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
+#include <tqfile.h>
+#include <tqpainter.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqlayout.h>
+#include <tqmainwindow.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,7 +44,7 @@
#include "kafkacommon.h"
#ifdef HEAVY_DEBUG
#include "domtreeview.h"
-#include <qdialog.h>
+#include <tqdialog.h>
#endif
#include "wkafkapart.h"
#include "undoredo.h"
@@ -83,12 +83,12 @@ public:
#endif
};
-KafkaWidget::KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
const char *name)
: KHTMLPart(widgetParent, name, parent, name),
w(part)
{
- m_contextPopupMenu = new QPopupMenu();
+ m_contextPopupMenu = new TQPopupMenu();
d = new KafkaWidgetPrivate();
@@ -102,12 +102,12 @@ KafkaWidget::KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *
// With the mix of Leo Savernik's caret Mode and the current editing
// functions, it will be kind of VERY messy
setCaretMode(true);
- connect(this, SIGNAL(caretPositionChanged(const DOM::Node &, long)),
- this, SLOT(slotNewCursorPos(const DOM::Node &, long)));
+ connect(this, TQT_SIGNAL(caretPositionChanged(const DOM::Node &, long)),
+ this, TQT_SLOT(slotNewCursorPos(const DOM::Node &, long)));
setCaretDisplayPolicyNonFocused(KHTMLPart::CaretVisible);
- connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)),
- this, SLOT(slotContextMenuRequested(const QString&, const QPoint&)));
+ connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),
+ this, TQT_SLOT(slotContextMenuRequested(const TQString&, const TQPoint&)));
view()->setMouseTracking(true);
view()->installEventFilter(this);
@@ -130,7 +130,7 @@ void KafkaWidget::newDocument()
{
//FIXME: Somehow we should get it from Quanta settings: qConfig.attrValueQuotation
//-->No need for that: Quotations aren't stored in the DOM::Nodes
- QString newPageHTMLCode = "<html>\n"
+ TQString newPageHTMLCode = "<html>\n"
"<head>\n"
"</head>\n"
"<body>\n"
@@ -143,7 +143,7 @@ void KafkaWidget::newDocument()
}
-void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
+void KafkaWidget::insertText(DOM::Node node, const TQString &text, int position)
{
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "KafkaWidget::insertText text " << text << " pos " << position << endl;
@@ -184,7 +184,7 @@ void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
kdDebug(25001) << "KafkaWidget::insertText() - added text - 1" << endl;
#endif
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
return;
}
}
@@ -261,7 +261,7 @@ void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
}
//document().updateRendering();
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
void KafkaWidget::slotDelayedSetCaretPosition()
@@ -270,7 +270,7 @@ void KafkaWidget::slotDelayedSetCaretPosition()
emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
}
-void KafkaWidget::insertText(const QString &text, int position)
+void KafkaWidget::insertText(const TQString &text, int position)
{
insertText(m_currentNode, text, (position == -1 ? d->m_cursorOffset : position));
}
@@ -465,7 +465,7 @@ void KafkaWidget::keyReturn(bool specialPressed)
kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
//emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
@@ -476,17 +476,17 @@ void KafkaWidget::keyReturn(bool specialPressed)
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
#endif
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
-bool KafkaWidget::eventFilter(QObject *, QEvent *event)
+bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
{
bool forgetEvent = false;
//tmp
//DOM::Node attr, tmpNode;
//end tmp
- if(event->type() == QEvent::FocusIn)
+ if(event->type() == TQEvent::FocusIn)
{
#ifdef LIGHT_DEBUG
kdDebug(25001) << "KafkaWidget::eventFilter() FocusIn" << endl;
@@ -495,7 +495,7 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
emit hasFocus(true);
}
- if(event->type() == QEvent::FocusOut)
+ if(event->type() == TQEvent::FocusOut)
{
#ifdef LIGHT_DEBUG
kdDebug(25001) << "KafkaWidget::eventFilter() FocusOut" << endl;
@@ -504,9 +504,9 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
emit hasFocus(false);
}
- if(event->type() == QEvent::KeyPress)
+ if(event->type() == TQEvent::KeyPress)
{
- QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event);
//Create a new NodeModifsSet where the changes will be logged.
m_modifs = new NodeModifsSet();
@@ -694,7 +694,7 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
return forgetEvent;
}
-void KafkaWidget::slotContextMenuRequested(const QString& /*url*/, const QPoint& point)
+void KafkaWidget::slotContextMenuRequested(const TQString& /*url*/, const TQPoint& point)
{
TagActionManager::self()->fillWithTagActions(m_contextPopupMenu, nodeUnderMouse());
@@ -1204,7 +1204,7 @@ void KafkaWidget::keyBackspace()
DOM::Node toplevelBlock, toplevelBlock2, startNode, endNode, startNode2, endNode2;
DOM::Node childOfCommonParent, childOfCommonParent2, commonParent;
bool _goingTowardsRootNode, singleNodeDeleted, isParent, prevIsBlock, endNodeIsNotInline, boolTmp;
- QString text;
+ TQString text;
if(hasSelection())
{
@@ -1531,7 +1531,7 @@ void KafkaWidget::keyBackspace()
emit domNodeModified(temp, m_modifs);
if(boolTmp)
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
}
@@ -1597,7 +1597,7 @@ void KafkaWidget::keyBackspace()
{
m_currentNode = _nodePrev;
d->m_cursorOffset += (static_cast<DOM::CharacterData>(_nodePrev)).length();
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
_nodePrev.setNodeValue(_nodePrev.nodeValue() + _node.nodeValue());
emit domNodeModified(_nodePrev, m_modifs);
@@ -1618,7 +1618,7 @@ void KafkaWidget::keyBackspace()
m_currentNode = m_currentNode.previousSibling();
d->m_cursorOffset = 0;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
else if(!m_currentNode.nextSibling().isNull())
{
@@ -1839,18 +1839,18 @@ return;
// Iterate all toggable toolbar actions and toggle them on or off
// Look if there is a selection
TagAction* tag_action = 0;
- QPtrList<TagAction> tag_actions = quantaApp->tagActions();
+ TQPtrList<TagAction> tag_actions = quantaApp->tagActions();
for (tag_action = tag_actions.first(); tag_action; tag_action = tag_actions.next())
{
if(tag_action->toggable())
{
- QString tag_name = tag_action->XMLTagName();
+ TQString tag_name = tag_action->XMLTagName();
if(tag_name.isEmpty())
break;
- QDomElement data(tag_action->data());
- QString attribute_name(data.attribute("attribute_name", QString()));
- QString attribute_value(data.attribute("attribute_value", QString()));
+ TQDomElement data(tag_action->data());
+ TQString attribute_name(data.attribute("attribute_name", TQString()));
+ TQString attribute_value(data.attribute("attribute_value", TQString()));
int inside_tag;
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
@@ -2088,7 +2088,7 @@ void KafkaWidget::setCurrentNode(DOM::Node node, int offset)
d->m_cursorOffset = offset;
makeCursorVisible();
if(!m_currentNode.isNull() && m_currentNode.nodeName().string() != "#document")
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
//setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
}
@@ -2139,7 +2139,7 @@ void KafkaWidget::putCursorAtFirstAvailableLocation()
}
m_currentNode = node;
d->m_cursorOffset = 0;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
#ifdef LIGHT_DEBUG
@@ -2236,7 +2236,7 @@ void KafkaWidget::removeSelection()
setCurrentNode(m_currentNode, domNodeCursorOffset);
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
NodeSelection* cursorPos = new NodeSelection();
cursorPos->setCursorNode(cursorNode);
@@ -2252,9 +2252,9 @@ void KafkaWidget::removeSelection()
void KafkaWidget::applyQueuedToggableTagActions()
{
- QStringList queued_actions = quantaApp->tagActionPool();
- QPtrList<TagAction> action_list = quantaApp->tagActions();
- for(QStringList::Iterator it = queued_actions.begin(); it != queued_actions.end(); ++it)
+ TQStringList queued_actions = quantaApp->tagActionPool();
+ TQPtrList<TagAction> action_list = quantaApp->tagActions();
+ for(TQStringList::Iterator it = queued_actions.begin(); it != queued_actions.end(); ++it)
{
TagAction* tag_action = 0;
for (tag_action = action_list.first(); tag_action; tag_action = action_list.next())
diff --git a/quanta/parts/kafka/kafkahtmlpart.h b/quanta/parts/kafka/kafkahtmlpart.h
index f1dc79c1..52a7b031 100644
--- a/quanta/parts/kafka/kafkahtmlpart.h
+++ b/quanta/parts/kafka/kafkahtmlpart.h
@@ -24,10 +24,10 @@
#include <khtml_events.h>
#include <kparts/event.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qdockwindow.h>
-#include <qevent.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqdockwindow.h>
+#include <tqevent.h>
#include <dom/dom_node.h>
#include <dom/dom_element.h>
@@ -47,7 +47,7 @@ class KafkaWidget : public KHTMLPart
{
Q_OBJECT
public:
- KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+ KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
const char *name = 0);
~KafkaWidget();
@@ -133,7 +133,7 @@ public slots:
* @param text The text to be added
* @param position Specifies the position where to add text
*/
- void insertText(DOM::Node node, const QString &text, int position);
+ void insertText(DOM::Node node, const TQString &text, int position);
/**
* Category: HTML Editing Functions
@@ -142,7 +142,7 @@ public slots:
* @param position Specifies the position where to add text, if it's -1
* the text will be appended after the last position
*/
- void insertText(const QString &text, int position);
+ void insertText(const TQString &text, int position);
/**
* Puts all the child Text DOM::Node into a "normal" form where only
@@ -168,7 +168,7 @@ public slots:
void slotNewCursorPos(const DOM::Node &domNode, long offset);
/**
- * Called to set the cursor Position with a QTimer::singleShot() after calling
+ * Called to set the cursor Position with a TQTimer::singleShot() after calling
* document->updateRendering()
*/
void slotDelayedSetCaretPosition();
@@ -232,7 +232,7 @@ signals:
void hasFocus(bool focus);
protected:
- bool eventFilter(QObject *object, QEvent *event);
+ bool eventFilter(TQObject *object, TQEvent *event);
virtual void khtmlMouseMoveEvent(khtml::MouseMoveEvent *event);
virtual void khtmlMousePressEvent(khtml::MousePressEvent *event);
@@ -241,7 +241,7 @@ protected:
private slots:
- void slotContextMenuRequested(const QString& url, const QPoint& point);
+ void slotContextMenuRequested(const TQString& url, const TQPoint& point);
private:
#if 0
@@ -309,7 +309,7 @@ private:
KafkaDocument *w;
friend class KafkaWidgetPrivate;
- QPopupMenu* m_contextPopupMenu;
+ TQPopupMenu* m_contextPopupMenu;
};
#endif
diff --git a/quanta/parts/kafka/kafkasyncoptions.cpp b/quanta/parts/kafka/kafkasyncoptions.cpp
index a355b99a..e7066187 100644
--- a/quanta/parts/kafka/kafkasyncoptions.cpp
+++ b/quanta/parts/kafka/kafkasyncoptions.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
#include "kafkasyncoptions.h"
#include "kafkasyncoptions.moc"
-KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, QWidget* parent, const char* name )
+KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, TQWidget* parent, const char* name )
: KafkaSyncOptionsUI( parent, name )
{
config = a_config;
@@ -34,9 +34,9 @@ KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, QWidget* parent, const c
bool showIcons = config->readBoolEntry("Show Scripts Icons", true);
config->setGroup("Kafka Synchronization options");
- QString sourceRefresh = config->readEntry("Source refresh", "delay");
+ TQString sourceRefresh = config->readEntry("Source refresh", "delay");
int sourceRefreshDelay = config->readNumEntry("Source refresh delay", 500);
- QString kafkaRefresh = config->readEntry("Kafka refresh", "focus");
+ TQString kafkaRefresh = config->readEntry("Kafka refresh", "focus");
int kafkaRefreshDelay = config->readNumEntry("Kafka refresh delay", 4000);
if ( !name )
diff --git a/quanta/parts/kafka/kafkasyncoptions.h b/quanta/parts/kafka/kafkasyncoptions.h
index 25b200d7..daf67117 100644
--- a/quanta/parts/kafka/kafkasyncoptions.h
+++ b/quanta/parts/kafka/kafkasyncoptions.h
@@ -27,7 +27,7 @@ class KafkaSyncOptions : public KafkaSyncOptionsUI
Q_OBJECT
public:
- KafkaSyncOptions( KConfig *config, QWidget* parent = 0, const char* name = 0);
+ KafkaSyncOptions( KConfig *config, TQWidget* parent = 0, const char* name = 0);
~KafkaSyncOptions();
void updateConfig();
diff --git a/quanta/parts/kafka/undoredo.cpp b/quanta/parts/kafka/undoredo.cpp
index 7ca12718..dfe07142 100644
--- a/quanta/parts/kafka/undoredo.cpp
+++ b/quanta/parts/kafka/undoredo.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
//debug only
-#include <qdatetime.h>
+#include <tqdatetime.h>
//end debug only
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -174,9 +174,9 @@ void undoRedo::addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSel
kdDebug(25001)<< "undoRedo::addNewModifsSet() - NodeModifsSet type: " << modifLocation << endl;
#endif
- QValueList<NodeModif>::iterator it2;
+ TQValueList<NodeModif>::iterator it2;
NodeModifsSet *NMSet;
- QValueList<int> loc;
+ TQValueList<int> loc;
int curFocus, foo, foo2;
int diff, diff2;
NodeSelectionInd *nodeSelection;
@@ -233,7 +233,7 @@ void undoRedo::addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSel
if(modifs->nodeModifList().count() >= 1 && modifs->indentationStartOffset() == 1 &&
modifs->nodeModifList().at(0)->type() == NodeModif::NodeModified)
{
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
it = documentIterator;
if((*it) && (*it)->nodeModifList().count() >= 1 && (*it)->indentationStartOffset() == 1 &&
(*it)->nodeModifList().at(0)->type() == NodeModif::NodeModified &&
@@ -354,12 +354,12 @@ bool undoRedo::undo()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::undo()"<< endl;
- QTime t;
+ TQTime t;
t.start();
#endif
if(documentIterator.isEmpty() || !(*documentIterator))
return false;
- QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ TQPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
it.toLast();
while(*it)
@@ -393,7 +393,7 @@ bool undoRedo::undo()
//Update the modified flag
m_doc->setModified((*documentIterator)->isModifiedBefore());
- QPtrListIterator<NodeModifsSet> currentIt(documentIterator);
+ TQPtrListIterator<NodeModifsSet> currentIt(documentIterator);
--documentIterator;
//TEMP: Reload the kafka editor TODO: update only the modified Nodes
@@ -420,7 +420,7 @@ bool undoRedo::redo()
bool success = true;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
kdDebug(25001)<< "undoRedo::redo()" << endl;
#endif
@@ -432,7 +432,7 @@ bool undoRedo::redo()
else
++documentIterator;
- QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ TQPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
it.toFirst();
while(*it)
@@ -486,7 +486,7 @@ bool undoRedo::redo()
bool undoRedo::undoNodeModif(NodeModif *nodeModif)
{
Node *node, *newNode;
- QValueList<int> ref;
+ TQValueList<int> ref;
Tag *tag;
bool b;
@@ -547,7 +547,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
// No node at this location, getting the parent Node and appending newNode after
// the last child of the parent.
ref = nodeModif->location();
- QValueList<int> loc(ref);
+ TQValueList<int> loc(ref);
loc.remove(loc.fromLast());
if(loc.empty())
{
@@ -584,7 +584,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
bool undoRedo::redoNodeModif(NodeModif *nodeModif)
{
bool success;
- QValueList<int> tmp;
+ TQValueList<int> tmp;
//To do the opposite action of undoNodeModif(), we simply have
//to change the type of nodeModif
@@ -907,7 +907,7 @@ void undoRedo::reloadKafkaEditor(bool force, NodeSelection *selection)
void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encodeText)
{
- QString text, allText;
+ TQString text, allText;
Node *node = baseNode, *child;
int bCol, bLine, eCol, eLine, bCol2, bLine2, bCol3, bLine3, eCol3, eLine3, i;
KafkaDocument *kafkaInterface = KafkaDocument::ref();
@@ -1096,8 +1096,8 @@ bool undoRedo::syncKafkaView()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::syncKafkaView()" << endl;
#endif
- /** QValueList<NodeModifsSet>::iterator it;
- QValueList<NodeModif>::iterator it2;
+ /** TQValueList<NodeModifsSet>::iterator it;
+ TQValueList<NodeModif>::iterator it2;
bool undoKafkaView = true;
if(kafkaIterator == sourceIterator)
@@ -1250,8 +1250,8 @@ bool undoRedo::syncQuantaView()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::syncQuantaView()" << endl;
#endif
- /**QValueList<NodeModifsSet>::iterator it;
- QValueList<NodeModif>::iterator it2;
+ /**TQValueList<NodeModifsSet>::iterator it;
+ TQValueList<NodeModif>::iterator it2;
bool undoQuantaView = true;
if(kafkaIterator == sourceIterator)
@@ -1431,7 +1431,7 @@ void undoRedo::debugOutput()
kdDebug(24000)<< "Empty!" << endl;
return;
}
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
for(it.toFirst(); it ; ++it )
{
kdDebug(24000)<< "== Node Modifications set #" << i << "(" << (*it)->isModifiedBefore() << "," <<
@@ -1445,12 +1445,12 @@ void undoRedo::debugOutput()
}
//kdDebug(24000)<< "== Cursor Pos: " << (*it).cursorY << ":" << (*it).cursorX << endl;
//kdDebug(24000)<< "== Cursor Pos2:" << (*it).cursorY2 << ":" << (*it).cursorX2 << endl;
- QPtrListIterator<NodeModif> it2((*it)->nodeModifList());
+ TQPtrListIterator<NodeModif> it2((*it)->nodeModifList());
for(it2.toFirst(); it2; ++it2)
{
kdDebug(24000)<< "==== NodeModif type:" << (*it2)->type() << endl;
kdDebug(24000)<< "==== Location1: " << endl;
- QValueList<int>::iterator it3;
+ TQValueList<int>::iterator it3;
if((*it2)->location().empty())
{
kdDebug(24000)<< "==== Empty location!!" << endl;
@@ -1492,7 +1492,7 @@ void undoRedo::debugOutput()
void undoRedo::fileSaved()
{
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
bool previousWasDocIt = false;
for(it.toFirst(); it ; ++it )
{
@@ -1515,7 +1515,7 @@ void undoRedo::fileSaved()
}
}
/**
- QValueList<NodeModifsSet>::iterator it = sourceIterator;
+ TQValueList<NodeModifsSet>::iterator it = sourceIterator;
(*sourceIterator).isModified = false;
//seting isModified = true to all others
while(it != begin())
diff --git a/quanta/parts/kafka/undoredo.h b/quanta/parts/kafka/undoredo.h
index f9ec09cf..390dc5bb 100644
--- a/quanta/parts/kafka/undoredo.h
+++ b/quanta/parts/kafka/undoredo.h
@@ -18,9 +18,9 @@
#ifndef UNDOREDO_H
#define UNDOREDO_H
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
#include "node.h"
class Document;
@@ -53,23 +53,23 @@ public:
* For all type : Location of the Node added/modified/removed/moved.
* @param location The location of the Node, cf kafkaCommon::getNodeLocation()
*/
- void setLocation(QValueList<int> location) {m_location = location;}
+ void setLocation(TQValueList<int> location) {m_location = location;}
/**
* @return Returns the location of the Node which have been modified.
*/
- QValueList<int>& location() {return m_location;}
+ TQValueList<int>& location() {return m_location;}
/**
* For Node move : Final location of the Node moved.
* @param location The final location of the Node moved, cf kafkaCommon::getNodeLocation()
*/
- void setFinalLocation(QValueList<int> location) {m_finalLocation = location;}
+ void setFinalLocation(TQValueList<int> location) {m_finalLocation = location;}
/**
* @return Returns the final location of the Node which was moved.
*/
- QValueList<int>& finalLocation() {return m_finalLocation;}
+ TQValueList<int>& finalLocation() {return m_finalLocation;}
/**
* For Node deletion: Store the deleted Node.
@@ -145,7 +145,7 @@ public:
private:
int m_type;
- QValueList<int> m_location, m_finalLocation;
+ TQValueList<int> m_location, m_finalLocation;
Node *m_node;
Tag *m_tag;
int m_childrenMovedUp;
@@ -170,7 +170,7 @@ public:
/**
* Returns the list of NodeModifs.
*/
- QPtrList<NodeModif> & nodeModifList() {return m_nodeModifList;}
+ TQPtrList<NodeModif> & nodeModifList() {return m_nodeModifList;}
/**
* Set the Modified flag BEFORE the user input.
@@ -195,12 +195,12 @@ public:
/**
* Set a description to the user input.
*/
- void setDescription(const QString &description) {m_description = description;}
+ void setDescription(const TQString &description) {m_description = description;}
/**
* @return Returns the description of the user input.
*/
- QString description() {return m_description;}
+ TQString description() {return m_description;}
/**
* Set the coordinates of the selection before the user input.
@@ -237,9 +237,9 @@ public:
private:
- QPtrList<NodeModif> m_nodeModifList;
+ TQPtrList<NodeModif> m_nodeModifList;
bool m_isModifiedBefore, m_isModifiedAfter;
- QString m_description;
+ TQString m_description;
NodeSelectionInd *m_selectionBefore, *m_selectionAfter;
int m_indentationStartOffset, m_type;
};
@@ -429,7 +429,7 @@ private:
/**
* The main undoRedo list which contains the NodeModifsSet.
*/
- QPtrList<NodeModifsSet> m_undoList;
+ TQPtrList<NodeModifsSet> m_undoList;
/**
* The undoRedo list iterators which point the current location of each component in
* the undoRedo list.
@@ -437,13 +437,13 @@ private:
* sourceIterator point the current location of the source view (kate).
* kafkaIterator point the current location of the VPL view (kafka).
*/
- QPtrListIterator<NodeModifsSet> documentIterator;
- QPtrListIterator<NodeModifsSet> sourceIterator;
- QPtrListIterator<NodeModifsSet> kafkaIterator;
+ TQPtrListIterator<NodeModifsSet> documentIterator;
+ TQPtrListIterator<NodeModifsSet> sourceIterator;
+ TQPtrListIterator<NodeModifsSet> kafkaIterator;
int m_listLimit;
bool m_merging;
bool addingText;
- QValueList<int> m_currentLoc;
+ TQValueList<int> m_currentLoc;
Document *m_doc;
bool m_mergeNext;
int m_dontAddModifSet;
diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp
index 5641bb36..73e2a019 100644
--- a/quanta/parts/kafka/wkafkapart.cpp
+++ b/quanta/parts/kafka/wkafkapart.cpp
@@ -32,12 +32,12 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qregexp.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
-#include <qclipboard.h>
-#include <qptrvector.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
+#include <tqclipboard.h>
+#include <tqptrvector.h>
#include "document.h"
#include "viewmanager.h"
@@ -61,25 +61,25 @@
KafkaWidget *kafkaWidget;
KafkaDocument *kafkaDoc;
-KafkaDocument::KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name)
+KafkaDocument::KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name)
:domNodeProps(1021), _docLoaded(false)
{
// i18n reserve
-QString a = i18n("Selector");QString b = i18n("Attribute");QString c = i18n("Class");
-QString d = i18n("Pseudo-class");QString e = i18n("CSS rules");QString f = i18n("Universal selector");
-QString g = i18n("Linked stylesheets");QString h = i18n("Embedded stylesheets");QString i = i18n("Inline style attribute");
-QString j = i18n("Link");QString k = i18n("Priority");QString l = i18n("ID");
-QString m = i18n("Browser support");QString n = i18n("Pseudo-element");QString o = i18n("Imported");
-QString p = i18n("Inheritance");QString q = i18n("Inherited");QString r = "";
-
-QString s = i18n("Name");QString tt = i18n("Undo");QString u = i18n("Redo");
-QString v = i18n("Undo/Redo history");QString w = i18n("CSS styles");
-
-QString x = i18n("Sorry, VPL does not support this functionality yet.");
-QString y = i18n("Merge cells");
-QString z = i18n("Split cells");
-QString aa = i18n("Edit CSS style of this Tag");
-QString ab = i18n("Ident all");
+TQString a = i18n("Selector");TQString b = i18n("Attribute");TQString c = i18n("Class");
+TQString d = i18n("Pseudo-class");TQString e = i18n("CSS rules");TQString f = i18n("Universal selector");
+TQString g = i18n("Linked stylesheets");TQString h = i18n("Embedded stylesheets");TQString i = i18n("Inline style attribute");
+TQString j = i18n("Link");TQString k = i18n("Priority");TQString l = i18n("ID");
+TQString m = i18n("Browser support");TQString n = i18n("Pseudo-element");TQString o = i18n("Imported");
+TQString p = i18n("Inheritance");TQString q = i18n("Inherited");TQString r = "";
+
+TQString s = i18n("Name");TQString tt = i18n("Undo");TQString u = i18n("Redo");
+TQString v = i18n("Undo/Redo history");TQString w = i18n("CSS styles");
+
+TQString x = i18n("Sorry, VPL does not support this functionality yet.");
+TQString y = i18n("Merge cells");
+TQString z = i18n("Split cells");
+TQString aa = i18n("Edit CSS style of this Tag");
+TQString ab = i18n("Ident all");
//end
#ifdef LIGHT_DEBUG
@@ -96,13 +96,13 @@ QString ab = i18n("Ident all");
domNodeProps.setAutoDelete(false);
KStandardDirs *m_stddirs = new KStandardDirs();
- QFile file( m_stddirs->findResource("data", "kafkapart/entities" )/**locate("appdata","chars") */);
+ TQFile file( m_stddirs->findResource("data", "kafkapart/entities" )/**locate("appdata","chars") */);
delete m_stddirs;
- QString tmp;
+ TQString tmp;
if ( file.open(IO_ReadOnly) )
{
- QTextStream t( &file ); // use a text stream
- t.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream t( &file ); // use a text stream
+ t.setEncoding(TQTextStream::UnicodeUTF8);
while ( !t.eof() )
{
tmp = t.readLine();
@@ -116,17 +116,17 @@ QString ab = i18n("Ident all");
file.close();
}
- connect(m_kafkaPart, SIGNAL(domNodeInserted(DOM::Node, bool, NodeModifsSet*)),
- this, SLOT(slotDomNodeInserted(DOM::Node, bool, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeModified(DOM::Node, NodeModifsSet*)),
- this, SLOT(slotDomNodeModified(DOM::Node, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)),
- this, SLOT(slotDomNodeAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)),
- this, SLOT(slotDomNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeInserted(DOM::Node, bool, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeInserted(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeModified(DOM::Node, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeModified(DOM::Node, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeIsAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeNewCursorPos(DOM::Node, int)),
- this, SLOT(slotdomNodeNewCursorPos(DOM::Node, int)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeNewCursorPos(DOM::Node, int)),
+ this, TQT_SLOT(slotdomNodeNewCursorPos(DOM::Node, int)));
}
@@ -152,7 +152,7 @@ void KafkaDocument::loadDocument(Document *doc)
if(!m_kafkaPart) return;
if(!doc) return;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
m_currentDoc = doc;
@@ -336,7 +336,7 @@ Node *KafkaDocument::getNode(DOM::Node _domNode)
kNodeAttrs* KafkaDocument::connectDomNodeToQuantaNode(DOM::Node domNode, Node *node)
{
- QString name;
+ TQString name;
kNodeAttrs *props;
if(domNode.isNull())
@@ -512,7 +512,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
#endif
DOM::Node newNode, newNode2, attr, nextNode, parentNode, *ptDomNode;
bool removeLeftWhitespaces, removeRightWhitespaces;
- QString str, nodeValue;
+ TQString str, nodeValue;
Node *n, *parent;
int i;
@@ -686,7 +686,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
if(!attr.isNull())
{
//TODO: create a createAttr function and add this (setNodeValue sometimes
- //don't like null QString)
+ //don't like null TQString)
if(!node->tag->attributeValue(i).isNull())
attr.setNodeValue(node->tag->attributeValue(i));
kafkaCommon::insertDomNodeAttribute(newNode, attr);
@@ -806,7 +806,7 @@ void KafkaDocument::buildNodeFromKafkaNode(Node *node, DOM::Node domNode)
node->tag->setIndentationDone(false);
if(domNode.nodeType() == DOM::Node::TEXT_NODE)
{
- QString text = domNode.nodeValue().string();
+ TQString text = domNode.nodeValue().string();
text.replace("<", "&lt;");
text.replace(">", "&gt;");
node->tag->setStr(text);
@@ -873,9 +873,9 @@ Node * KafkaDocument::buildNodeFromKafkaNode(DOM::Node domNode, Node *nodeParent
return node;
}
-QString KafkaDocument::getDecodedChar(const QString &encodedChar)
+TQString KafkaDocument::getDecodedChar(const TQString &encodedChar)
{
- QMap<QString, QString>::Iterator it = encodedChars.find(encodedChar);
+ TQMap<TQString, TQString>::Iterator it = encodedChars.find(encodedChar);
if(it == encodedChars.end())
{
//try this
@@ -884,16 +884,16 @@ QString KafkaDocument::getDecodedChar(const QString &encodedChar)
return it.data();
}
-QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool translateWhiteSpacesAndLineBreaks,
+TQString KafkaDocument::getDecodedText(const TQString &a_encodedText, bool translateWhiteSpacesAndLineBreaks,
bool removeLeftWhitespaces, bool removeRightWhitespaces)
{
- QString encodedText = a_encodedText;
+ TQString encodedText = a_encodedText;
if (encodedText.isEmpty())
encodedText = " ";
- QString decodedChar;
+ TQString decodedChar;
int i, j;
#ifdef LIGHT_DEBUG
- QString oldEncodedText = encodedText;
+ TQString oldEncodedText = encodedText;
#endif
i = -1;
@@ -913,11 +913,11 @@ QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool transla
i = -1;
while((unsigned)++i < encodedText.length())
{
- if(QString(encodedText[i]) == "&")
+ if(TQString(encodedText[i]) == "&")
{
j = i;
while((unsigned)++i < encodedText.length() &&
- QString(encodedText[i]) != ";")
+ TQString(encodedText[i]) != ";")
{}
decodedChar = getDecodedChar(encodedText.mid(j, i - j + 1));
encodedText.remove(j, i - j + 1);
@@ -943,28 +943,28 @@ QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool transla
//return KGlobal::charsets()->resolveEntities(encodedText); =>nice but not sufficient
}
-QString KafkaDocument::getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar)
+TQString KafkaDocument::getEncodedChar(const TQString &decodedChar, const TQString &previousDecodedChar)
{
if(decodedChar[0].isSpace() && !previousDecodedChar[0].isSpace())
return " ";
else if(decodedChar[0].isSpace())
//FIXME:for an unknown reason, by default it return &iquest; instead of &nbsp;
return "&nbsp;";
- QMap<QString, QString>::Iterator it = decodedChars.find(decodedChar);
+ TQMap<TQString, TQString>::Iterator it = decodedChars.find(decodedChar);
if(it == decodedChars.end())
return decodedChar;
return it.data();
}
-QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, int bCol, int &eLine, int &eCol,
+TQString KafkaDocument::getEncodedText(const TQString &a_decodedText, int bLine, int bCol, int &eLine, int &eCol,
bool translateWhiteSpaces)
{
- QString decodedText = a_decodedText;
- QString Encodedchar;
- QString decodedChar, previousDecodedChar;
+ TQString decodedText = a_decodedText;
+ TQString Encodedchar;
+ TQString decodedChar, previousDecodedChar;
#ifdef LIGHT_DEBUG
- QString oldDecodedText = decodedText;
+ TQString oldDecodedText = decodedText;
#endif
int i;
#ifdef LIGHT_DEBUG
@@ -975,11 +975,11 @@ QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, i
while((unsigned)++i < decodedText.length())
{
previousDecodedChar = decodedChar;
- decodedChar = QString(decodedText[i]);
+ decodedChar = TQString(decodedText[i]);
if(translateWhiteSpaces || !decodedText[i].isSpace())
- Encodedchar = getEncodedChar(QString(decodedText[i]),
- (i>=1)?previousDecodedChar:QString(""));
+ Encodedchar = getEncodedChar(TQString(decodedText[i]),
+ (i>=1)?previousDecodedChar:TQString(""));
else
Encodedchar = decodedChar;
bCol += Encodedchar.length();
@@ -997,15 +997,15 @@ QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, i
return decodedText;
}
-QString KafkaDocument::getEncodedText(const QString& decodedText)
+TQString KafkaDocument::getEncodedText(const TQString& decodedText)
{
int a = 0, b = 0, c, d;
return getEncodedText(decodedText, a, b, c, d);
}
-QString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol, bool encodeText)
+TQString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol, bool encodeText)
{
- QString text, _char;
+ TQString text, _char;
Node *openingNode;
int bLineAttr, bColAttr;
int j = 0;
@@ -1102,7 +1102,7 @@ QString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int
/** Can't use KGlobal::charsets()->toEntity() :
* It translate all chars into entities! */
else if(!hasPreParent)
- text = node->tag->tagStr().replace(QRegExp("\\s+"), " ");
+ text = node->tag->tagStr().replace(TQRegExp("\\s+"), " ");
else
text = node->tag->tagStr();
}
@@ -1142,7 +1142,7 @@ void KafkaDocument::translateQuantaIntoKafkaCursorPosition(uint curLine, uint cu
{
Node *node;
int bCol, bLine, eCol, eLine, col, line;
- QString curChar, decodedChar, currentLine;
+ TQString curChar, decodedChar, currentLine;
bool lookForEntity, lookForSpaces, found;
node = baseNode;
@@ -1248,7 +1248,7 @@ void KafkaDocument::translateQuantaIntoKafkaCursorPosition(uint curLine, uint cu
void KafkaDocument::translateQuantaIntoNodeCursorPosition(uint line, uint col, Node **node, long &offset)
{
int curCol, curLine, beginCol, beginLine;
- QString currentLine;
+ TQString currentLine;
*node = parser->nodeAt(line, col, false);
@@ -1288,8 +1288,8 @@ void KafkaDocument::translateQuantaIntoNodeCursorPosition(uint line, uint col, N
void KafkaDocument::translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long domNodeOffset, Node **node, long &offset)
{
- QString decodedText, encodedChar, encodedText, currentChar;
- QChar curChar, oldChar;
+ TQString decodedText, encodedChar, encodedText, currentChar;
+ TQChar curChar, oldChar;
long currentOffset;
bool waitForSpace = false, found = false;
int curNodeOffset, bLine = 0, bCol = 0, eLine, eCol;
@@ -1356,10 +1356,10 @@ void KafkaDocument::translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long
{
curChar = decodedText.at(domNodeOffset - currentOffset);
#ifdef HEAVY_DEBUG
- //kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" <<
- // QString(oldChar) << endl;
+ //kdDebug(24000)<< "CurChar:" << TQString(curChar) << ": oldChar:" <<
+ // TQString(oldChar) << endl;
#endif
- encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ encodedChar = getEncodedChar(TQString(curChar), TQString(oldChar));
if(encodedChar == "&nbsp;")
encodedChar = " ";
found = false;
@@ -1409,8 +1409,8 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
{
Node *_currentNode, *closingNode, *node;
kNodeAttrs *attrs;
- QString decodedText, encodedChar, currentLine, currentChar;
- QChar curChar, oldChar;
+ TQString decodedText, encodedChar, currentLine, currentChar;
+ TQChar curChar, oldChar;
int currentOffset;
int curLine, curCol, endLine, endCol;
int i;
@@ -1504,9 +1504,9 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
{
curChar = decodedText[offset - currentOffset];
#ifdef HEAVY_DEBUG
-// kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" << QString(oldChar) << endl;
+// kdDebug(24000)<< "CurChar:" << TQString(curChar) << ": oldChar:" << TQString(oldChar) << endl;
#endif
- encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ encodedChar = getEncodedChar(TQString(curChar), TQString(oldChar));
if(encodedChar == "&nbsp;")
encodedChar = " ";
found = false;
@@ -1631,7 +1631,7 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
void KafkaDocument::translateNodeIntoKafkaCursorPosition(Node *node, int offset, DOM::Node &domNode,
long &domNodeOffset)
{
- QString textNode, curChar;
+ TQString textNode, curChar;
int col;
bool lookForEntity, lookForSpaces, found;
@@ -1820,7 +1820,7 @@ void KafkaDocument::coutLinkTree(Node *, int)
#endif
{
#ifdef HEAVY_DEBUG
- QString output, dots;
+ TQString output, dots;
DOM::Node domNode;
Node *n = 0L;
if(!node)
@@ -1869,7 +1869,7 @@ void KafkaDocument::slotDomNodeInserted(DOM::Node domNode, bool insertChilds, No
bool b = false;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -1935,7 +1935,7 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
QTag *qTag;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -2065,7 +2065,7 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
NodeModif *modif;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -2285,7 +2285,7 @@ void KafkaDocument::slotdomNodeNewCursorPos(DOM::Node, int)
void KafkaDocument::slotCut()
{
- QString text = m_kafkaPart->selectedText();
+ TQString text = m_kafkaPart->selectedText();
NodeSelectionInd selection_ind;
selection_ind.fillWithVPLCursorSelection();
@@ -2305,7 +2305,7 @@ void KafkaDocument::slotCut()
}
void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
- Node** cursorNode, long cursorOffset, QString const& text)
+ Node** cursorNode, long cursorOffset, TQString const& text)
{
if(!startNode || !endNode)
return;
@@ -2323,12 +2323,12 @@ void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int
if(subtree_root)
{
KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
- QTextDrag* text_drag = new QTextDrag(text);
+ TQTextDrag* text_drag = new TQTextDrag(text);
KMultipleDrag* drag_object = new KMultipleDrag();
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- QApplication::clipboard()->setData(drag_object);
+ TQApplication::clipboard()->setData(drag_object);
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
#endif
@@ -2337,7 +2337,7 @@ void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int
void KafkaDocument::slotCopy()
{
- QString text = m_kafkaPart->selectedText();
+ TQString text = m_kafkaPart->selectedText();
NodeSelectionInd selection_ind;
selection_ind.fillWithVPLCursorSelection();
@@ -2350,7 +2350,7 @@ void KafkaDocument::slotCopy()
slotCopy(startNode, startOffset, endNode, endOffset, text);
}
-void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& text)
+void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, TQString const& text)
{
if(!startNode || !endNode)
return;
@@ -2360,12 +2360,12 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
if(subtree_root)
{
KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
- QTextDrag* text_drag = new QTextDrag(text);
+ TQTextDrag* text_drag = new TQTextDrag(text);
KMultipleDrag* drag_object = new KMultipleDrag();
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- QApplication::clipboard()->setData(drag_object);
+ TQApplication::clipboard()->setData(drag_object);
// FIXME delete the subtree
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
@@ -2375,8 +2375,8 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
void KafkaDocument::slotPaste()
{
- QClipboard *cb = QApplication::clipboard();
- QMimeSource* e = cb->data();
+ QClipboard *cb = TQApplication::clipboard();
+ TQMimeSource* e = cb->data();
Node* node = new Node(0);
if(KafkaDragObject::decode(e, node))
diff --git a/quanta/parts/kafka/wkafkapart.h b/quanta/parts/kafka/wkafkapart.h
index 6b045150..712dc2e2 100644
--- a/quanta/parts/kafka/wkafkapart.h
+++ b/quanta/parts/kafka/wkafkapart.h
@@ -34,9 +34,9 @@ struct DTDStruct;
class NodeSelectionInd;
class NodeModifsSet;
-#include <qmap.h>
-#include <qobject.h>
-#include <qptrdict.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
#include "kafkahtmlpart.h"
@@ -52,7 +52,7 @@ class KafkaDocument : public QObject
Q_OBJECT
public:
/** Returns a reference to the KafkaDocument object */
- static KafkaDocument* const ref(QWidget *parent = 0L, QWidget *widgetParent = 0L, const char *name = 0L)
+ static KafkaDocument* const ref(TQWidget *parent = 0L, TQWidget *widgetParent = 0L, const char *name = 0L)
{
static KafkaDocument *m_ref;
if (!m_ref) m_ref = new KafkaDocument(parent, widgetParent, name);
@@ -184,7 +184,7 @@ public:
* from its encoded form (e.g. &nbsp;)
* @return Returns the special character.
*/
- QString getDecodedChar(const QString &encodedChar);
+ TQString getDecodedChar(const TQString &encodedChar);
/**
* This function returns the text decoded from its XML-encoded form.
@@ -197,7 +197,7 @@ public:
* e.g. if the current text is the last child of a BLOCK Node (e.g. P)
* @return Returns the text decoded.
*/
- QString getDecodedText(const QString &encodedText, bool translateWhiteSpacesAndLineBreaks = true,
+ TQString getDecodedText(const TQString &encodedText, bool translateWhiteSpacesAndLineBreaks = true,
bool removeLeftWhitespaces = false, bool removeRightWhitespaces = false);
/**
@@ -207,7 +207,7 @@ public:
* @param previousDecodedchar The previous decoded character.
* @return Returns the XML-encoded character.
*/
- QString getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar);
+ TQString getEncodedChar(const TQString &decodedChar, const TQString &previousDecodedChar);
/**
* This function returns the text with all the special XML characters encoded.
@@ -220,14 +220,14 @@ public:
* into &nbsp; Set it to false for PRE Tag.
* @return Return the XML-encoded text.
*/
- QString getEncodedText(const QString &decodedText, int bLine, int bCol, int &eLine, int &eCol,
+ TQString getEncodedText(const TQString &decodedText, int bLine, int bCol, int &eLine, int &eCol,
bool translateWhiteSpaces = true);
/**
* This function behaves essentially like the above function except that it doesn't
* return the position of the encoded text.
*/
- QString getEncodedText(const QString &decodedText);
+ TQString getEncodedText(const TQString &decodedText);
/**
* This function generates the code corresponding to the XML node.
@@ -240,7 +240,7 @@ public:
* (e.g. whitespace => &nbsp;)
* @return Returns the code.
*/
- QString generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol,
+ TQString generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol,
bool encodeText = true);
@@ -448,23 +448,23 @@ public slots:
void slotPaste();
void slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
- Node** cursorNode, long cursorOffset, QString const& plainText);
- void slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& plainText);
+ Node** cursorNode, long cursorOffset, TQString const& plainText);
+ void slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, TQString const& plainText);
public:
- //use a QPtrList aferwards
+ //use a TQPtrList aferwards
NodeEnhancer *mainEnhancer;
private:
/**
* Create a KafkaWidget.
*/
- KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name);
+ KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name);
- QMap<QString, QString> decodedChars;
- QMap<QString, QString> encodedChars;
- QPtrDict<kNodeAttrs> domNodeProps;
- QGuardedPtr<KafkaWidget> m_kafkaPart;
+ TQMap<TQString, TQString> decodedChars;
+ TQMap<TQString, TQString> encodedChars;
+ TQPtrDict<kNodeAttrs> domNodeProps;
+ TQGuardedPtr<KafkaWidget> m_kafkaPart;
Document *m_currentDoc;
bool _docLoaded;
diff --git a/quanta/parts/preview/whtmlpart.cpp b/quanta/parts/preview/whtmlpart.cpp
index b84ffe5c..1b34e123 100644
--- a/quanta/parts/preview/whtmlpart.cpp
+++ b/quanta/parts/preview/whtmlpart.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
//qt includes
-#include <qfileinfo.h>
-#include <qtextcodec.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
//kde includes
#include <kconfig.h>
@@ -33,8 +33,8 @@
#include "whtmlpart.h"
#include "resource.h"
-WHTMLPart::WHTMLPart(QWidget *parentWidget, const char *widgetName, bool enableViewSource,
- QObject *parent, const char *name, GUIProfile prof)
+WHTMLPart::WHTMLPart(TQWidget *parentWidget, const char *widgetName, bool enableViewSource,
+ TQObject *parent, const char *name, GUIProfile prof)
: KHTMLPart(parentWidget, widgetName, parent, name, prof), m_contextMenu(0)
{
//kdDebug(24000) << "WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << this << endl;
@@ -53,11 +53,11 @@ WHTMLPart::WHTMLPart(QWidget *parentWidget, const char *widgetName, bool enableV
if (m_enableViewSource)
{
m_contextMenu = new KPopupMenu(parentWidget);
- m_contextMenu->insertItem(i18n("View &Document Source"), this, SLOT(slotViewSource()));
+ m_contextMenu->insertItem(i18n("View &Document Source"), this, TQT_SLOT(slotViewSource()));
- connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)), SLOT(popupMenu(const QString&, const QPoint&)));
+ connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)), TQT_SLOT(popupMenu(const TQString&, const TQPoint&)));
}
- connect(browserExtension(), SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, SLOT(openURL(const KURL&)));
+ connect(browserExtension(), TQT_SIGNAL(openURLRequest (const KURL &, const KParts::URLArgs &)), this, TQT_SLOT(openURL(const KURL&)));
// setCharset( konqConfig.readEntry("DefaultEncoding") );
// setEncoding( konqConfig.readEntry("DefaultEncoding") );
@@ -86,7 +86,7 @@ bool WHTMLPart::openURL(const KURL& url)
return KHTMLPart::openURL(url);
}
-void WHTMLPart::urlSelected ( const QString &url, int button, int state, const QString &target, KParts::URLArgs args)
+void WHTMLPart::urlSelected ( const TQString &url, int button, int state, const TQString &target, KParts::URLArgs args)
{
KHTMLPart::urlSelected (url, button, state, target, args);
KURL cURL = completeURL( url );
@@ -120,7 +120,7 @@ void WHTMLPart::back()
}
-void WHTMLPart::addToHistory(const QString &url)
+void WHTMLPart::addToHistory(const TQString &url)
{
if ( history.count() > 0 )
@@ -149,26 +149,26 @@ bool WHTMLPart::forwardEnable()
return hpos < history.count()-1;
}
-KParts::ReadOnlyPart *WHTMLPart::createPart( QWidget * parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QString &, QString &,
- QStringList &, const QStringList &)
+KParts::ReadOnlyPart *WHTMLPart::createPart( TQWidget * parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQString &, TQString &,
+ TQStringList &, const TQStringList &)
{
//kdDebug(24000) << "Create WHTMLPart: " << parentWidget << " " << widgetName << " " << parent << " " << name << endl;
return new WHTMLPart(parentWidget, widgetName, m_enableViewSource, parent, name);
}
-bool WHTMLPart::eventFilter(QObject *watched, QEvent *e)
+bool WHTMLPart::eventFilter(TQObject *watched, TQEvent *e)
{
- if (watched == view() && e->type() == QEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
+ if (watched == view() && e->type() == TQEvent::FocusOut && (!m_contextMenu || !m_contextMenu->hasFocus()))
emit previewHasFocus(false);
else
- if (watched == view() && e->type() == QEvent::FocusIn)
+ if (watched == view() && e->type() == TQEvent::FocusIn)
emit previewHasFocus(true);
return false;
}
-void WHTMLPart::popupMenu(const QString &/*url*/, const QPoint &point)
+void WHTMLPart::popupMenu(const TQString &/*url*/, const TQPoint &point)
{
m_contextMenu->popup(point);
}
@@ -176,9 +176,9 @@ void WHTMLPart::popupMenu(const QString &/*url*/, const QPoint &point)
void WHTMLPart::slotViewSource()
{
KTempFile *tmpFile = new KTempFile(tmpDir + "-preview-", ".html");
- QString tempFileName = QFileInfo(*(tmpFile->file())).filePath();
+ TQString tempFileName = TQFileInfo(*(tmpFile->file())).filePath();
tmpFile->setAutoDelete(true);
- tmpFile->textStream()->setCodec(QTextCodec::codecForName("utf8"));
+ tmpFile->textStream()->setCodec(TQTextCodec::codecForName("utf8"));
*(tmpFile->textStream()) << documentSource();
tmpFile->close();
tempFileList.append(tmpFile);
diff --git a/quanta/parts/preview/whtmlpart.h b/quanta/parts/preview/whtmlpart.h
index 1c0c83c0..63be955b 100644
--- a/quanta/parts/preview/whtmlpart.h
+++ b/quanta/parts/preview/whtmlpart.h
@@ -18,7 +18,7 @@
#ifndef WHTMLPART_H
#define WHTMLPART_H
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <khtml_part.h>
@@ -30,8 +30,8 @@ class KPopupMenu;
class WHTMLPart : public KHTMLPart {
Q_OBJECT
public:
- WHTMLPart(QWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false,
- QObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
+ WHTMLPart(TQWidget *parentWidget = 0, const char *widgetname = 0, bool enableViewSource = false,
+ TQObject *parent = 0, const char *name = 0, GUIProfile prof = DefaultGUI );
virtual ~WHTMLPart();
/** Specify the URL where the preview was started */
@@ -46,29 +46,29 @@ public slots:
*/
void forward();
void back();
- void popupMenu(const QString &url, const QPoint &point);
+ void popupMenu(const TQString &url, const TQPoint &point);
void slotViewSource();
- void addToHistory(const QString &url);
- virtual bool eventFilter(QObject *watched, QEvent *e);
+ void addToHistory(const TQString &url);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
signals:
void updateStatus( bool back, bool forward );
void previewHasFocus(bool focus);
void showPreview(bool show);
- void openFile(const KURL&, const QString&, bool);
+ void openFile(const KURL&, const TQString&, bool);
protected:
- virtual void urlSelected( const QString &url, int button, int state, const QString &_target, KParts::URLArgs args = KParts::URLArgs());
- virtual KParts::ReadOnlyPart *createPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const QString &mimetype, QString &serviceName,
- QStringList &serviceTypes, const QStringList &params);
+ virtual void urlSelected( const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args = KParts::URLArgs());
+ virtual KParts::ReadOnlyPart *createPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const TQString &mimetype, TQString &serviceName,
+ TQStringList &serviceTypes, const TQStringList &params);
private:
KURL m_previewedURL;
KPopupMenu *m_contextMenu;
- QStrList history;
+ TQStrList history;
unsigned int hpos;
bool m_enableViewSource;
};
diff --git a/quanta/plugins/quantaplugin.cpp b/quanta/plugins/quantaplugin.cpp
index 89cde63f..730e41f2 100644
--- a/quanta/plugins/quantaplugin.cpp
+++ b/quanta/plugins/quantaplugin.cpp
@@ -28,13 +28,13 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qstring.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qwidget.h>
-#include <qwidgetstack.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqwidget.h>
+#include <tqwidgetstack.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
/* OTHER INCLUDES */
#include "quantaplugin.h"
@@ -68,27 +68,27 @@ QuantaPlugin::~QuantaPlugin()
}
/** Sets the superficial name of the plugin */
-void QuantaPlugin::setPluginName(const QString &a_name)
+void QuantaPlugin::setPluginName(const TQString &a_name)
{
m_name = a_name;
if (!m_action)
{
- m_action = new KToggleAction(i18n(a_name.utf8()), 0, this, SLOT(toggle()), quantaApp->actionCollection(), a_name);
+ m_action = new KToggleAction(i18n(a_name.utf8()), 0, this, TQT_SLOT(toggle()), quantaApp->actionCollection(), a_name);
}
m_action->setText(a_name);
}
-QString QuantaPlugin::pluginName() const
+TQString QuantaPlugin::pluginName() const
{
return m_name;
}
-void QuantaPlugin::setLocation(const QString &a_location)
+void QuantaPlugin::setLocation(const TQString &a_location)
{
m_location = a_location;
}
-QString QuantaPlugin::location() const
+TQString QuantaPlugin::location() const
{
return m_location;
}
@@ -98,7 +98,7 @@ bool QuantaPlugin::load()
if(isLoaded())
return false;
- QString loc = location();
+ TQString loc = location();
if(loc.isEmpty())
{
KStandardDirs *dirs = QuantaCommon::pluginDirs("lib");
@@ -107,12 +107,12 @@ bool QuantaPlugin::load()
}
else
{
- loc += QString("/") + fileName();
+ loc += TQString("/") + fileName();
}
- QFileInfo partInfo(loc);
- QString ow = outputWindow();
- m_targetWidget = new QWidget(quantaApp);
+ TQFileInfo partInfo(loc);
+ TQString ow = outputWindow();
+ m_targetWidget = new TQWidget(quantaApp);
if (m_readOnlyPart)
m_part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadOnlyPart>(partInfo.baseName().latin1(), m_targetWidget, 0, m_targetWidget, 0 );
else
@@ -126,7 +126,7 @@ bool QuantaPlugin::load()
}
m_part->setName(m_name); // for better debug output
m_part->widget()->setName(m_name); //needed to be able to dock the same plugin twice in separate toolviews
- m_part->widget()->setFocusPolicy(QWidget::ClickFocus);
+ m_part->widget()->setFocusPolicy(TQWidget::ClickFocus);
quantaApp->slotNewPart(m_part, false); // register the part in the partmanager
return true;
}
@@ -184,8 +184,8 @@ bool QuantaPlugin::run()
}
addWidget();
setRunning(true);
- connect( m_part, SIGNAL(setStatusBarText(const QString &)),
- quantaApp, SLOT(slotStatusMsg( const QString & )));
+ connect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)),
+ quantaApp, TQT_SLOT(slotStatusMsg( const TQString & )));
emit pluginStarted();
@@ -214,25 +214,25 @@ bool QuantaPlugin::toggle()
}
/** Returns the file name of the plugin */
-QString QuantaPlugin::fileName() const
+TQString QuantaPlugin::fileName() const
{
return m_fileName;
}
/** Sets the file name of the plugin */
-void QuantaPlugin::setFileName(const QString &a_fileName)
+void QuantaPlugin::setFileName(const TQString &a_fileName)
{
m_fileName = a_fileName;
}
/** Sets the output window */
-void QuantaPlugin::setOutputWindow(const QString &a_outputWindow)
+void QuantaPlugin::setOutputWindow(const TQString &a_outputWindow)
{
m_outputWindow = a_outputWindow;
}
/** Gets the output window */
-QString QuantaPlugin::outputWindow() const
+TQString QuantaPlugin::outputWindow() const
{
return m_outputWindow;
}
@@ -249,16 +249,16 @@ bool QuantaPlugin::validatePlugin(QuantaPlugin *a_plugin)
}
/** Returns true if the information of a plugin is valid, otherwise false */
-bool QuantaPlugin::validatePluginInfo(const QString & /*a_name*/,
- const QString &a_location, const QString &a_fileName, const QString &/*a_outputWindow*/)
+bool QuantaPlugin::validatePluginInfo(const TQString & /*a_name*/,
+ const TQString &a_location, const TQString &a_fileName, const TQString &/*a_outputWindow*/)
{
bool valid = true;
// look the file up if location is null
if(!a_location.isEmpty())
{
- QString path = a_location + QString("/") + a_fileName;
+ TQString path = a_location + TQString("/") + a_fileName;
- QFileInfo pluginFile(path);
+ TQFileInfo pluginFile(path);
if(!pluginFile.exists())
valid = false;
/* TODO : What other tests should we perform? Permissions etc? */
@@ -287,8 +287,8 @@ bool QuantaPlugin::unload(bool remove)
if(!isLoaded())
return false;
- disconnect( m_part, SIGNAL(setStatusBarText(const QString &)),
- quantaApp, SLOT(slotStatusMsg( const QString & )));
+ disconnect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)),
+ quantaApp, TQT_SLOT(slotStatusMsg( const TQString & )));
delete (KParts::ReadOnlyPart*) m_part;
m_part = 0;
@@ -327,22 +327,22 @@ bool QuantaPlugin::isStandard() const
}
/** No descriptions */
-QString QuantaPlugin::standardName()
+TQString QuantaPlugin::standardName()
{
return m_standardName;
}
/** No descriptions */
-void QuantaPlugin::setStandardName(const QString& a_stdName)
+void QuantaPlugin::setStandardName(const TQString& a_stdName)
{
m_standardName = a_stdName;
}
/** No descriptions */
-QString QuantaPlugin::icon()
+TQString QuantaPlugin::icon()
{
return m_icon;
}
/** No descriptions */
-void QuantaPlugin::setIcon(const QString& a_icon)
+void QuantaPlugin::setIcon(const TQString& a_icon)
{
m_icon = a_icon;
if (m_action) m_action->setIcon(a_icon);
@@ -350,7 +350,7 @@ void QuantaPlugin::setIcon(const QString& a_icon)
void QuantaPlugin::addWidget()
{
- QString ow = outputWindow();
+ TQString ow = outputWindow();
if(ow == i18n("Separate Toolview"))
{
m_part->widget()->setCaption(m_name);
@@ -366,7 +366,7 @@ void QuantaPlugin::addWidget()
void QuantaPlugin::removeWidget()
{
- QString ow = outputWindow();
+ TQString ow = outputWindow();
if(ow == i18n("Separate Toolview"))
{
delete m_pluginToolView;
@@ -378,7 +378,7 @@ void QuantaPlugin::removeWidget()
}
}
-QWidget *QuantaPlugin::widget()
+TQWidget *QuantaPlugin::widget()
{
if (isLoaded()) {
return m_part->widget();
@@ -387,7 +387,7 @@ QWidget *QuantaPlugin::widget()
}
}
-void QuantaPlugin::plugAction(QPopupMenu *menu)
+void QuantaPlugin::plugAction(TQPopupMenu *menu)
{
m_action->plug(menu);
}
diff --git a/quanta/plugins/quantaplugin.h b/quanta/plugins/quantaplugin.h
index 08b4dbdc..fb01477c 100644
--- a/quanta/plugins/quantaplugin.h
+++ b/quanta/plugins/quantaplugin.h
@@ -22,8 +22,8 @@
#include <kparts/part.h>
/* QT INCLUDES */
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class QString;
@@ -44,26 +44,26 @@ public:
~QuantaPlugin();
virtual bool isRunning() const;
/** Gets the superficial plugin name */
- virtual QString pluginName() const;
+ virtual TQString pluginName() const;
/** Gets the location of the plugin */
- virtual QString location() const;
+ virtual TQString location() const;
/** Gets the plugin's standard attribute */
virtual bool isStandard() const;
/** Gets the output window */
- virtual QString outputWindow() const;
+ virtual TQString outputWindow() const;
/** Returns true if the plugin specified by a_plugin is valid, false otherwise */
static bool validatePlugin(QuantaPlugin *);
/** Returns true if the options of a plugin are valid, otherwise false */
- static bool validatePluginInfo(const QString &, const QString &,
- const QString &, const QString &);
+ static bool validatePluginInfo(const TQString &, const TQString &,
+ const TQString &, const TQString &);
virtual void addWidget();
virtual void removeWidget();
- QWidget *widget();
+ TQWidget *widget();
KParts::ReadOnlyPart *part() {return m_part;}
- QString name() {return m_name;}
+ TQString name() {return m_name;}
/** plugs action into menu */
- void plugAction(QPopupMenu *menu);
+ void plugAction(TQPopupMenu *menu);
public slots:
/** Sets whether the plugin is running or not */
virtual void setRunning(bool);
@@ -76,29 +76,29 @@ public slots:
/** Runs the plugin if it's not running yet, unloads otherwise.*/
virtual bool toggle();
/** Sets the superficial name of the plugin */
- virtual void setPluginName(const QString &);
+ virtual void setPluginName(const TQString &);
/** Sets the output window */
- virtual void setOutputWindow(const QString &);
+ virtual void setOutputWindow(const TQString &);
/** Sets the plugin's standard attribute */
virtual void setStandard(bool isStandard);
/** Sets the location of the plugin */
- virtual void setLocation(const QString &);
+ virtual void setLocation(const TQString &);
/** Sets the file name of the plugin */
- virtual void setFileName(const QString &);
+ virtual void setFileName(const TQString &);
/** Returns the file name of the plugin */
- virtual QString fileName() const;
+ virtual TQString fileName() const;
virtual int input() {return m_input;}
virtual void setInput(int a_input) { m_input = a_input;}
/** Returns whether the plugin is loaded or not */
virtual bool isLoaded();
/** No descriptions */
- void setIcon(const QString& a_icon);
+ void setIcon(const TQString& a_icon);
/** No descriptions */
- QString icon();
+ TQString icon();
/** No descriptions */
- void setStandardName(const QString& a_stdName);
+ void setStandardName(const TQString& a_stdName);
/** No descriptions */
- QString standardName();
+ TQString standardName();
void setReadOnlyPart(bool a_readOnlyPart) {m_readOnlyPart = a_readOnlyPart;}
bool readOnlyPart() {return m_readOnlyPart;}
signals:
@@ -106,23 +106,23 @@ signals:
void pluginStopped();
protected:
/** Superficial name of plugin */
- QString m_fileName;
- QString m_name;
- QString m_location;
- QString m_icon;
- QString m_outputWindow;
+ TQString m_fileName;
+ TQString m_name;
+ TQString m_location;
+ TQString m_icon;
+ TQString m_outputWindow;
int m_input;
/** True, if it is not a user added plugin. Special handling code may be necessary for standard plugins. */
bool m_standard;
bool m_isRunning;
- QGuardedPtr<KParts::ReadOnlyPart> m_part;
+ TQGuardedPtr<KParts::ReadOnlyPart> m_part;
bool m_readOnlyPart;
QuantaView *m_view;
KToggleAction *m_action;
private: // Private attributes
- QString m_standardName;
+ TQString m_standardName;
KMdiToolViewAccessor* m_pluginToolView;
- QWidget *m_targetWidget; //this will be the parent, used only to make the plugin widget hidden until addWidget is called
+ TQWidget *m_targetWidget; //this will be the parent, used only to make the plugin widget hidden until addWidget is called
};
#endif
diff --git a/quanta/plugins/quantapluginconfig.cpp b/quanta/plugins/quantapluginconfig.cpp
index a03ffc2c..30fd6ee2 100644
--- a/quanta/plugins/quantapluginconfig.cpp
+++ b/quanta/plugins/quantapluginconfig.cpp
@@ -23,32 +23,32 @@
#include <kicondialog.h>
/* QT INCLUDES */
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
/* OTHER INCLUDES */
#include "quantapluginconfig.h"
#include "quantaplugin.h"
#include "pluginconfig.h"
-QuantaPluginConfig::QuantaPluginConfig(QWidget *a_parent, const char *a_name)
+QuantaPluginConfig::QuantaPluginConfig(TQWidget *a_parent, const char *a_name)
: KDialogBase(a_parent, a_name, true, i18n("Configure Plugin"), KDialogBase::Ok | KDialogBase::Cancel)
{
m_pluginConfigWidget = new PluginConfig(this);
- QStringList windows;
+ TQStringList windows;
i18n("Message Area Tab");
windows << i18n("Editor Tab") << i18n("Separate Toolview");
m_pluginConfigWidget->outputWindow->insertStringList(windows);
m_pluginConfigWidget->iconButton->setStrictIconSize(false);
- connect(m_pluginConfigWidget->pluginName, SIGNAL(textChanged(const QString &)), this, SLOT(nameChanged(const QString &)));
- connect(m_pluginConfigWidget->locationButton, SIGNAL(clicked()), this, SLOT(selectLocation()));
+ connect(m_pluginConfigWidget->pluginName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(nameChanged(const TQString &)));
+ connect(m_pluginConfigWidget->locationButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectLocation()));
setMainWidget(m_pluginConfigWidget);
}
@@ -77,16 +77,16 @@ void QuantaPluginConfig::accept()
/** Gets the plugin location */
void QuantaPluginConfig::selectLocation()
{
- QString pluginLocation = KFileDialog::getExistingDirectory(QString::null, this, i18n("Select Plugin Folder"));
+ TQString pluginLocation = KFileDialog::getExistingDirectory(TQString::null, this, i18n("Select Plugin Folder"));
if(!pluginLocation.isNull())
{
m_pluginConfigWidget->location->setText(pluginLocation);
}
}
-void QuantaPluginConfig::nameChanged(const QString &a_text)
+void QuantaPluginConfig::nameChanged(const TQString &a_text)
{
- QString text = a_text;
+ TQString text = a_text;
text = "lib" + text + ".la";
m_pluginConfigWidget->pluginFileName->setText(text.lower());
}
diff --git a/quanta/plugins/quantapluginconfig.h b/quanta/plugins/quantapluginconfig.h
index f56142e9..7fa81750 100644
--- a/quanta/plugins/quantapluginconfig.h
+++ b/quanta/plugins/quantapluginconfig.h
@@ -31,7 +31,7 @@ class QuantaPluginConfig : public KDialogBase
{
Q_OBJECT
public:
- QuantaPluginConfig(QWidget *, const char *);
+ QuantaPluginConfig(TQWidget *, const char *);
~QuantaPluginConfig();
public slots:
/** Validates the dialog before accepting */
@@ -39,7 +39,7 @@ public slots:
/** Gets the plugin location */
void selectLocation();
/** Updates other widgets based on the name */
- void nameChanged(const QString &);
+ void nameChanged(const TQString &);
protected:
PluginConfig *m_pluginConfigWidget;
diff --git a/quanta/plugins/quantaplugineditor.cpp b/quanta/plugins/quantaplugineditor.cpp
index e7c32ec0..42f6a237 100644
--- a/quanta/plugins/quantaplugineditor.cpp
+++ b/quanta/plugins/quantaplugineditor.cpp
@@ -24,14 +24,14 @@
#include <kdialogbase.h>
/* QT INCLUDES */
-#include <qwidget.h>
-#include <qobject.h>
-#include <qdict.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlistview.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include "quantaplugineditor.h"
@@ -41,32 +41,32 @@
#include "plugineditor.h"
#include "resource.h"
-QuantaPluginEditor::QuantaPluginEditor(QWidget *a_parent, const char *a_name)
+QuantaPluginEditor::QuantaPluginEditor(TQWidget *a_parent, const char *a_name)
: KDialogBase(a_parent, a_name, true, i18n("Edit Plugins"), KDialogBase::Ok | KDialogBase::Cancel)
{
// m_plugins.setAutoDelete(true);
m_pluginEditorWidget = new PluginEditor(this);
setMainWidget(m_pluginEditorWidget);
- m_pluginEditorWidget->pluginList->setSelectionMode(QListView::Single);
+ m_pluginEditorWidget->pluginList->setSelectionMode(TQListView::Single);
m_pluginEditorWidget->pluginList->setAllColumnsShowFocus(true);
m_pluginEditorWidget->pluginList->setColumnAlignment(2, Qt::AlignHCenter);
- connect(this, SIGNAL(pluginsChanged()), SLOT(refreshPlugins()));
- connect(m_pluginEditorWidget->refreshButton, SIGNAL(clicked()), SLOT(refreshPlugins()));
- connect(m_pluginEditorWidget->addButton, SIGNAL(clicked()), SLOT(addPlugin()));
- connect(m_pluginEditorWidget->removeButton, SIGNAL(clicked()), SLOT(removePlugin()));
- connect(m_pluginEditorWidget->addSearchPathButton, SIGNAL(clicked()), SLOT(addSearchPath()));
- connect(m_pluginEditorWidget->configureButton, SIGNAL(clicked()), SLOT(configurePlugin()));
- connect(m_pluginEditorWidget->pluginList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- SLOT(configurePlugin(QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL(pluginsChanged()), TQT_SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->refreshButton, TQT_SIGNAL(clicked()), TQT_SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->addButton, TQT_SIGNAL(clicked()), TQT_SLOT(addPlugin()));
+ connect(m_pluginEditorWidget->removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removePlugin()));
+ connect(m_pluginEditorWidget->addSearchPathButton, TQT_SIGNAL(clicked()), TQT_SLOT(addSearchPath()));
+ connect(m_pluginEditorWidget->configureButton, TQT_SIGNAL(clicked()), TQT_SLOT(configurePlugin()));
+ connect(m_pluginEditorWidget->pluginList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(configurePlugin(TQListViewItem*, const TQPoint&, int)));
}
QuantaPluginEditor::~QuantaPluginEditor()
{
}
-QDict<QuantaPlugin> QuantaPluginEditor::plugins()
+TQDict<QuantaPlugin> QuantaPluginEditor::plugins()
{
return m_plugins;
}
@@ -90,7 +90,7 @@ void QuantaPluginEditor::addPlugin()
newPlugin->setOutputWindow(configWidget->outputWindow->currentText());
newPlugin->setStandard(false);
newPlugin->setIcon(configWidget->iconButton->icon());
- QString pluginName = newPlugin->pluginName();
+ TQString pluginName = newPlugin->pluginName();
m_plugins.insert(pluginName, newPlugin);
emit pluginsChanged();
}
@@ -100,7 +100,7 @@ void QuantaPluginEditor::addPlugin()
void QuantaPluginEditor::addSearchPath()
{
// Get a dir and append it to the line edit
- QString appendDir = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select Folder"));
+ TQString appendDir = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select Folder"));
if(!appendDir.isNull())
{
m_pluginEditorWidget->searchPaths->setText(m_pluginEditorWidget->searchPaths->text()+appendDir+":");
@@ -110,8 +110,8 @@ void QuantaPluginEditor::addSearchPath()
void QuantaPluginEditor::configurePlugin()
{
// create a new config dialog. populate with plugin data
- QString key;
- QListViewItem *item = m_pluginEditorWidget->pluginList->currentItem();
+ TQString key;
+ TQListViewItem *item = m_pluginEditorWidget->pluginList->currentItem();
if(item)
key = item->text(0);
@@ -146,7 +146,7 @@ void QuantaPluginEditor::configurePlugin()
}
}
-void QuantaPluginEditor::configurePlugin(QListViewItem* item, const QPoint&, int)
+void QuantaPluginEditor::configurePlugin(TQListViewItem* item, const TQPoint&, int)
{
if (item)
configurePlugin();
@@ -157,15 +157,15 @@ void QuantaPluginEditor::refreshPlugins()
// call validate on all plugins to refresh their status
m_pluginEditorWidget->pluginList->clear();
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current();++it)
{
- QListViewItem *newItem = new PluginEditorItem(m_pluginEditorWidget->pluginList);
+ TQListViewItem *newItem = new PluginEditorItem(m_pluginEditorWidget->pluginList);
QuantaPlugin *curPlugin = it.current();
newItem->setText(0, curPlugin->pluginName());
- QPixmap statusIcon;
+ TQPixmap statusIcon;
bool isValid = QuantaPlugin::validatePlugin(curPlugin);
if(isValid)
statusIcon = SmallIcon("ok", KGlobal::instance());
@@ -183,7 +183,7 @@ void QuantaPluginEditor::refreshPlugins()
void QuantaPluginEditor::removePlugin()
{
- QListViewItem *currentItem = m_pluginEditorWidget->pluginList->currentItem();
+ TQListViewItem *currentItem = m_pluginEditorWidget->pluginList->currentItem();
if (currentItem)
{
QuantaPlugin *plugin = m_plugins.find(currentItem->text(0));
@@ -196,32 +196,32 @@ void QuantaPluginEditor::removePlugin()
}
}
-void QuantaPluginEditor::setPlugins(QDict<QuantaPlugin> a_plugins)
+void QuantaPluginEditor::setPlugins(TQDict<QuantaPlugin> a_plugins)
{
m_plugins = a_plugins;
emit pluginsChanged();
}
-PluginEditorItem::PluginEditorItem(QListView *a_parent)
- : QListViewItem(a_parent)
+PluginEditorItem::PluginEditorItem(TQListView *a_parent)
+ : TQListViewItem(a_parent)
{
}
-void PluginEditorItem::paintCell(QPainter *a_painter, const QColorGroup &a_cg, int a_column, int a_width, int a_align)
+void PluginEditorItem::paintCell(TQPainter *a_painter, const TQColorGroup &a_cg, int a_column, int a_width, int a_align)
{
/*
if(a_column == 2)
a_align = Qt::AlignCenter;
FIXME : Why won't QT let us align cell contents?
*/
- QListViewItem::paintCell(a_painter, a_cg, a_column, a_width, a_align);
+ TQListViewItem::paintCell(a_painter, a_cg, a_column, a_width, a_align);
}
/** No descriptions */
-void QuantaPluginEditor::setSearchPaths(const QStringList& paths)
+void QuantaPluginEditor::setSearchPaths(const TQStringList& paths)
{
- QString str;
+ TQString str;
for (uint i =0; i < paths.count(); i++)
{
str += paths[i] +":";
@@ -229,10 +229,10 @@ void QuantaPluginEditor::setSearchPaths(const QStringList& paths)
m_pluginEditorWidget->searchPaths->setText(str);
}
/** No descriptions */
-QStringList QuantaPluginEditor::searchPathList()
+TQStringList QuantaPluginEditor::searchPathList()
{
- QString str = m_pluginEditorWidget->searchPaths->text();
- QStringList paths = QStringList::split(":",str);
+ TQString str = m_pluginEditorWidget->searchPaths->text();
+ TQStringList paths = TQStringList::split(":",str);
return paths;
}
diff --git a/quanta/plugins/quantaplugineditor.h b/quanta/plugins/quantaplugineditor.h
index fc028056..88da3cfc 100644
--- a/quanta/plugins/quantaplugineditor.h
+++ b/quanta/plugins/quantaplugineditor.h
@@ -22,8 +22,8 @@
#include <kdialogbase.h>
/* QT INCLUDES */
-#include <qdict.h>
-#include <qlistview.h>
+#include <tqdict.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include "quantaplugin.h"
@@ -44,36 +44,36 @@ class QuantaPluginEditor : public KDialogBase
Q_OBJECT
public:
- QuantaPluginEditor(QWidget *, const char *);
+ QuantaPluginEditor(TQWidget *, const char *);
~QuantaPluginEditor();
- QDict<QuantaPlugin> plugins();
+ TQDict<QuantaPlugin> plugins();
/** No descriptions */
- QStringList searchPathList();
+ TQStringList searchPathList();
/** No descriptions */
- void setSearchPaths(const QStringList& paths);
+ void setSearchPaths(const TQStringList& paths);
signals:
void pluginsChanged();
public slots:
- void setPlugins(QDict<QuantaPlugin>);
+ void setPlugins(TQDict<QuantaPlugin>);
void addSearchPath();
void addPlugin();
void removePlugin();
void configurePlugin();
- void configurePlugin(QListViewItem*, const QPoint&, int);
+ void configurePlugin(TQListViewItem*, const TQPoint&, int);
void refreshPlugins();
protected:
- QDict<QuantaPlugin> m_plugins;
+ TQDict<QuantaPlugin> m_plugins;
PluginEditor *m_pluginEditorWidget;
};
class PluginEditorItem : public QListViewItem
{
public:
- PluginEditorItem(QListView *);
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ PluginEditorItem(TQListView *);
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
};
#endif
diff --git a/quanta/plugins/quantaplugininterface.cpp b/quanta/plugins/quantaplugininterface.cpp
index 45fb8caa..098c7828 100644
--- a/quanta/plugins/quantaplugininterface.cpp
+++ b/quanta/plugins/quantaplugininterface.cpp
@@ -25,10 +25,10 @@
#include <kmessagebox.h>
/* QT INCLUDES */
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfileinfo.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfileinfo.h>
/* OTHER INCLUDES */
#include "quantaplugininterface.h"
@@ -38,11 +38,11 @@
#include "resource.h"
#include "quantacommon.h"
-QuantaPluginInterface::QuantaPluginInterface(QWidget *parent)
+QuantaPluginInterface::QuantaPluginInterface(TQWidget *parent)
{
m_parent = parent;
(void) new KAction( i18n( "Configure &Plugins..." ), 0, 0,
- this, SLOT( slotPluginsEdit() ),
+ this, TQT_SLOT( slotPluginsEdit() ),
((KMainWindow*)parent)->actionCollection(), "configure_plugins" );
m_pluginMenu = 0L;
// m_plugins.setAutoDelete(true);
@@ -54,33 +54,33 @@ QuantaPluginInterface::~QuantaPluginInterface()
// TODO : free plugins
}
-void QuantaPluginInterface::readConfigFile(const QString& configFile)
+void QuantaPluginInterface::readConfigFile(const TQString& configFile)
{
KConfig *config = new KConfig(configFile);
config->setGroup("General");
- QStringList pList = config->readListEntry("Plugins");
- for(QStringList::Iterator it = pList.begin();it != pList.end(); ++it)
+ TQStringList pList = config->readListEntry("Plugins");
+ for(TQStringList::Iterator it = pList.begin();it != pList.end(); ++it)
(*it) = (*it).stripWhiteSpace();
//setPluginNames(pList);
- QStringList paths = QuantaCommon::readPathListEntry(config, "SearchPaths");
- for(QStringList::Iterator it = paths.begin();it != paths.end(); ++it)
+ TQStringList paths = QuantaCommon::readPathListEntry(config, "SearchPaths");
+ for(TQStringList::Iterator it = paths.begin();it != paths.end(); ++it)
(*it) = (*it).stripWhiteSpace();
qConfig.pluginSearchPaths = paths;
// now that we have a list of the plugins, go through and get the details of them
- for(QStringList::Iterator it = pList.begin();it != pList.end();++it)
+ for(TQStringList::Iterator it = pList.begin();it != pList.end();++it)
{
if (m_plugins.find(*it))
continue;
config->setGroup(*it);
QuantaPlugin *newPlugin = 0;
- QString pluginType = config->readEntry("Type", "KPart");
+ TQString pluginType = config->readEntry("Type", "KPart");
bool isStandard = config->readBoolEntry("Standard",false);
/* if (isStandard)
{
- QString stdName = config->readEntry("Standard Name");
+ TQString stdName = config->readEntry("Standard Name");
if (newPlugin)
{
newPlugin->setStandardName(stdName);
@@ -101,7 +101,7 @@ void QuantaPluginInterface::readConfigFile(const QString& configFile)
newPlugin->setFileName(config->readEntry("FileName"));
newPlugin->setLocation(config->readEntry("Location"));
newPlugin->setIcon(config->readEntry("Icon"));
- QString type = config->readEntry("OutputWindow");
+ TQString type = config->readEntry("OutputWindow");
if (type == "Message Frame" || type == "Separate Toolview")
type = i18n("Separate Toolview");
else
@@ -121,8 +121,8 @@ void QuantaPluginInterface::readConfig()
m_plugins.clear();
// read the local plugins.rc
- QString configFile = locateLocal("appdata", "plugins.rc");
- if (QFileInfo(configFile).exists())
+ TQString configFile = locateLocal("appdata", "plugins.rc");
+ if (TQFileInfo(configFile).exists())
readConfigFile(configFile);
// read the global plugins.rc
configFile = qConfig.globalDataDir + resourceDir + "plugins.rc";
@@ -135,13 +135,13 @@ void QuantaPluginInterface::writeConfig()
// write the plugin settings to the rc file
KConfig *config = new KConfig(locateLocal("appdata", "plugins.rc"));
- QStringList names = pluginNames();
+ TQStringList names = pluginNames();
config->setGroup("General");
config->writeEntry("Plugins", names);
config->writePathEntry("SearchPaths", qConfig.pluginSearchPaths);
- for(QStringList::Iterator it = names.begin();it != names.end(); ++it)
+ for(TQStringList::Iterator it = names.begin();it != names.end(); ++it)
{
config->setGroup(*it);
@@ -152,7 +152,7 @@ void QuantaPluginInterface::writeConfig()
config->writeEntry("Type", "KPart"); //not used, but just to be compatible
config->writeEntry("Location", curPlugin->location());
config->writeEntry("Icon", curPlugin->icon());
- QString type = curPlugin->outputWindow();
+ TQString type = curPlugin->outputWindow();
if (type == i18n("Editor Tab")) type = "Editor Tab";
if (type == i18n("Separate Toolview")) type = "Separate Toolview";
config->writeEntry("OutputWindow", type);
@@ -172,7 +172,7 @@ void QuantaPluginInterface::writeConfig()
/** Returns true if the plugin is available */
-bool QuantaPluginInterface::pluginAvailable(const QString &a_name)
+bool QuantaPluginInterface::pluginAvailable(const TQString &a_name)
{
if (a_name.isEmpty())
return false;
@@ -184,10 +184,10 @@ bool QuantaPluginInterface::pluginAvailable(const QString &a_name)
}
/** Gets the plugin names */
-QStringList QuantaPluginInterface::pluginNames() const
+TQStringList QuantaPluginInterface::pluginNames() const
{
- QStringList names;
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQStringList names;
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current();++it)
{
names << (*it)->pluginName();
@@ -197,7 +197,7 @@ QStringList QuantaPluginInterface::pluginNames() const
/** Gets the plugin specified by a_name */
-QuantaPlugin *QuantaPluginInterface::plugin(const QString &a_name)
+QuantaPlugin *QuantaPluginInterface::plugin(const TQString &a_name)
{
if (a_name.isEmpty())
return 0L;
@@ -210,7 +210,7 @@ void QuantaPluginInterface::buildPluginMenu()
m_pluginMenu->clear();
// m_pluginMenu->setCheckable(true);
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current() != 0;++it)
{
QuantaPlugin *curPlugin = it.current();
@@ -240,8 +240,8 @@ void QuantaPluginInterface::slotPluginsEdit()
void QuantaPluginInterface::slotPluginsValidate()
{
- QValueList<QuantaPlugin*> invalidPlugins;
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQValueList<QuantaPlugin*> invalidPlugins;
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current();++it)
{
if(!QuantaPlugin::validatePlugin(it.current()))
@@ -252,7 +252,7 @@ void QuantaPluginInterface::slotPluginsValidate()
uint invalidCount = invalidPlugins.count();
if (invalidCount > 0)
{
- QString invalidNames;
+ TQString invalidNames;
for (uint i=0; i < invalidCount; i++)
{
invalidNames += "<br>" + invalidPlugins[i]->name();
diff --git a/quanta/plugins/quantaplugininterface.h b/quanta/plugins/quantaplugininterface.h
index a3e85030..2749fbd0 100644
--- a/quanta/plugins/quantaplugininterface.h
+++ b/quanta/plugins/quantaplugininterface.h
@@ -23,10 +23,10 @@
#include <kstandarddirs.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qdict.h>
-#include <qstringlist.h>
-#include <qpopupmenu.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqpopupmenu.h>
/* OTHER INCLUDES */
@@ -45,7 +45,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static QuantaPluginInterface* const ref(QWidget *parent = 0L)
+ static QuantaPluginInterface* const ref(TQWidget *parent = 0L)
{
static QuantaPluginInterface *m_ref;
if (!m_ref) m_ref = new QuantaPluginInterface (parent);
@@ -58,16 +58,16 @@ public:
/** Write the rc file */
virtual void writeConfig();
/* Returns TRUE if the plugin specified by a_name is available for us*/
- bool pluginAvailable(const QString &);
+ bool pluginAvailable(const TQString &);
/** Gets the plugins */
- QDict<QuantaPlugin> plugins() {return m_plugins;};
+ TQDict<QuantaPlugin> plugins() {return m_plugins;};
/** Sets the plugins */
- void setPlugins(QDict<QuantaPlugin> plugins) {m_plugins = plugins;};
+ void setPlugins(TQDict<QuantaPlugin> plugins) {m_plugins = plugins;};
/** Gets the plugin specified by a_name */
- virtual QuantaPlugin *plugin(const QString &);
+ virtual QuantaPlugin *plugin(const TQString &);
/** Gets the plugin menu */
- virtual QPopupMenu *pluginMenu() {return m_pluginMenu;};
- void setPluginMenu(QPopupMenu *pluginMenu) {m_pluginMenu = pluginMenu;}
+ virtual TQPopupMenu *pluginMenu() {return m_pluginMenu;};
+ void setPluginMenu(TQPopupMenu *pluginMenu) {m_pluginMenu = pluginMenu;}
/** Builds the plugins menu dynamically */
void buildPluginMenu();
@@ -76,7 +76,7 @@ private:
* If you need the class use QuantaPluginInterface::ref() for
* construction and reference
*/
- QuantaPluginInterface(QWidget *parent);
+ QuantaPluginInterface(TQWidget *parent);
protected slots:
/** slot for the menu: validate */
@@ -86,18 +86,18 @@ protected slots:
protected:
/** Gets the plugin names */
- virtual QStringList pluginNames() const;
- void readConfigFile(const QString& configFile);
+ virtual TQStringList pluginNames() const;
+ void readConfigFile(const TQString& configFile);
- QDict<QuantaPlugin> m_plugins;
+ TQDict<QuantaPlugin> m_plugins;
- QWidget *m_parent;
+ TQWidget *m_parent;
- QPopupMenu *m_pluginMenu;
+ TQPopupMenu *m_pluginMenu;
signals:
void hideSplash();
- void statusMsg(const QString &);
+ void statusMsg(const TQString &);
};
#endif
diff --git a/quanta/project/eventconfigurationdlg.cpp b/quanta/project/eventconfigurationdlg.cpp
index e85ce7f6..29d23964 100644
--- a/quanta/project/eventconfigurationdlg.cpp
+++ b/quanta/project/eventconfigurationdlg.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
//qt includes
-#include <qdom.h>
+#include <tqdom.h>
//kde includes
#include <kcombobox.h>
@@ -29,7 +29,7 @@
#include "eventeditordlg.h"
#include "qpevents.h"
-EventConfigurationDlg::EventConfigurationDlg(KActionCollection *actionCollection, QWidget* parent, const char* name, WFlags fl)
+EventConfigurationDlg::EventConfigurationDlg(KActionCollection *actionCollection, TQWidget* parent, const char* name, WFlags fl)
: EventConfigurationDlgS(parent,name,fl)
{
m_actionCollection = actionCollection;
@@ -41,14 +41,14 @@ EventConfigurationDlg::~EventConfigurationDlg()
void EventConfigurationDlg::initEvents(EventActions *events)
{
- QListViewItem *item;
+ TQListViewItem *item;
for (EventActions::ConstIterator it = events->constBegin(); it != events->constEnd(); ++it)
{
- QValueList<EventAction> evList = it.data();
- for (QValueList<EventAction>::ConstIterator it2 = evList.constBegin(); it2 != evList.constEnd(); ++it2)
+ TQValueList<EventAction> evList = it.data();
+ for (TQValueList<EventAction>::ConstIterator it2 = evList.constBegin(); it2 != evList.constEnd(); ++it2)
{
EventAction ev = *it2;
- item = new QListViewItem(eventsListView, QPEvents::ref()->fullEventName(it.key()), QPEvents::ref()->fullActionName(ev.action));
+ item = new TQListViewItem(eventsListView, QPEvents::ref()->fullEventName(it.key()), QPEvents::ref()->fullActionName(ev.action));
int argcount = ev.arguments.count();
if (argcount > 0)
item->setText(2, ev.arguments[0]);
@@ -62,22 +62,22 @@ void EventConfigurationDlg::initEvents(EventActions *events)
}
}
-void EventConfigurationDlg::saveEvents(QDomDocument dom)
+void EventConfigurationDlg::saveEvents(TQDomDocument dom)
{
- QDomNode projectNode = dom.firstChild().firstChild();
- QDomNode eventsNode = projectNode.namedItem("events");
+ TQDomNode projectNode = dom.firstChild().firstChild();
+ TQDomNode eventsNode = projectNode.namedItem("events");
projectNode.removeChild(eventsNode);
eventsNode = dom.createElement("events");
projectNode.appendChild(eventsNode);
- QDomElement node;
- QListViewItemIterator it(eventsListView);
- QListViewItem *item;
+ TQDomElement node;
+ TQListViewItemIterator it(eventsListView);
+ TQListViewItem *item;
while (it.current())
{
item = it.current();
node = dom.createElement("event");
eventsNode.appendChild(node);
- QDomElement el = node.toElement();
+ TQDomElement el = node.toElement();
el.setAttribute("name", QPEvents::ref()->eventName(item->text(0)));
el.setAttribute("action", QPEvents::ref()->actionName(item->text(1)));
if (el.attribute("action") == "script" || el.attribute("action") == "action")
@@ -86,10 +86,10 @@ void EventConfigurationDlg::saveEvents(QDomDocument dom)
el.setAttribute("type", "internal");
for (uint i = 2; i < 6; i++)
{
- QString s = item->text(i);
+ TQString s = item->text(i);
if (s.isEmpty())
s = "--not set--";
- QDomNode argNode = dom.createElement("argument");
+ TQDomNode argNode = dom.createElement("argument");
node.appendChild(argNode);
argNode.appendChild(dom.createTextNode(s));
}
@@ -104,7 +104,7 @@ void EventConfigurationDlg::slotAddEvent()
editDlg.setMainWidget(&eventDlg);
if (editDlg.exec())
{
- QListViewItem *item = new QListViewItem(eventsListView);
+ TQListViewItem *item = new TQListViewItem(eventsListView);
item->setText(0, eventDlg.eventCombo->currentText());
item->setText(1, eventDlg.actionCombo->currentText());
item->setText(2, eventDlg.argument1());
@@ -116,14 +116,14 @@ void EventConfigurationDlg::slotAddEvent()
void EventConfigurationDlg::slotEditEvent()
{
- QListViewItem *item = eventsListView->currentItem();
+ TQListViewItem *item = eventsListView->currentItem();
if (!item) return;
KDialogBase editDlg(this, "edit_event", true, i18n("Edit Event"), KDialogBase::Ok | KDialogBase::Cancel);
EventEditorDlg eventDlg(m_actionCollection, &editDlg);
editDlg.setMainWidget(&eventDlg);
eventDlg.setEvent(item->text(0));
eventDlg.setAction(item->text(1));
- QStringList arguments;
+ TQStringList arguments;
arguments << item->text(2) << item->text(3) << item->text(4) << item->text(5);
eventDlg.setArguments(arguments);
if (editDlg.exec())
@@ -139,7 +139,7 @@ void EventConfigurationDlg::slotEditEvent()
void EventConfigurationDlg::slotDeleteEvent()
{
- QListViewItem *item = eventsListView->currentItem();
+ TQListViewItem *item = eventsListView->currentItem();
if (!item) return;
if (KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure that you want to remove the configuration of the <b>%1</b> event?</qt>").arg(item->text(0)), i18n("Delete Event Configuration"),KStdGuiItem::del()) == KMessageBox::Continue)
{
diff --git a/quanta/project/eventconfigurationdlg.h b/quanta/project/eventconfigurationdlg.h
index b1e4c14d..170a681c 100644
--- a/quanta/project/eventconfigurationdlg.h
+++ b/quanta/project/eventconfigurationdlg.h
@@ -22,17 +22,17 @@
class QDomDocument;
class KActionCollection;
struct EventAction;
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
class EventConfigurationDlg : public EventConfigurationDlgS
{
Q_OBJECT
public:
- EventConfigurationDlg(KActionCollection *actionCollection, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ EventConfigurationDlg(KActionCollection *actionCollection, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~EventConfigurationDlg();
void initEvents(EventActions *events);
- void saveEvents(QDomDocument dom);
+ void saveEvents(TQDomDocument dom);
public slots:
void slotEditEvent();
diff --git a/quanta/project/eventeditordlg.cpp b/quanta/project/eventeditordlg.cpp
index d67251f0..2926f916 100644
--- a/quanta/project/eventeditordlg.cpp
+++ b/quanta/project/eventeditordlg.cpp
@@ -15,9 +15,9 @@
***************************************************************************/
//qt includes
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqtooltip.h>
//kde includes
#include <kaction.h>
@@ -30,12 +30,12 @@
#include "project.h"
#include "tagaction.h"
-extern QString simpleMemberStr;
-extern QString taskLeaderStr;
-extern QString teamLeaderStr;
-extern QString subprojectLeaderStr;
+extern TQString simpleMemberStr;
+extern TQString taskLeaderStr;
+extern TQString teamLeaderStr;
+extern TQString subprojectLeaderStr;
-EventEditorDlg::EventEditorDlg(KActionCollection *actionCollection, QWidget* parent, const char* name, WFlags fl)
+EventEditorDlg::EventEditorDlg(KActionCollection *actionCollection, TQWidget* parent, const char* name, WFlags fl)
: EventEditorDlgS(parent,name,fl)
{
m_actionCollection = actionCollection;
@@ -48,7 +48,7 @@ EventEditorDlg::~EventEditorDlg()
{
}
-void EventEditorDlg::setEvent(const QString &name)
+void EventEditorDlg::setEvent(const TQString &name)
{
for (int i = 0; i < eventCombo->count(); i++)
{
@@ -60,7 +60,7 @@ void EventEditorDlg::setEvent(const QString &name)
}
}
-void EventEditorDlg::setAction(const QString &name)
+void EventEditorDlg::setAction(const TQString &name)
{
for (int i = 0; i < actionCombo->count(); i++)
{
@@ -73,12 +73,12 @@ void EventEditorDlg::setAction(const QString &name)
}
}
-QString EventEditorDlg::argument1()
+TQString EventEditorDlg::argument1()
{
if (argument1Combo->isEnabled())
{
- QString s = argument1Combo->currentText();
- QString actionType = actionCombo->currentText();
+ TQString s = argument1Combo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("email"))
{
if (s == i18n(teamLeaderStr.utf8()))
@@ -98,8 +98,8 @@ QString EventEditorDlg::argument1()
} else
if (actionType == QPEvents::ref()->fullActionName("script"))
{
- QString s = argument1Combo->currentText();
- for (QMap<QString, QString>::ConstIterator it = m_scriptActions.constBegin(); it != m_scriptActions.constEnd(); ++it)
+ TQString s = argument1Combo->currentText();
+ for (TQMap<TQString, TQString>::ConstIterator it = m_scriptActions.constBegin(); it != m_scriptActions.constEnd(); ++it)
{
if (it.data() == s)
{
@@ -111,8 +111,8 @@ QString EventEditorDlg::argument1()
} else
if (actionType == QPEvents::ref()->fullActionName("action"))
{
- QString s = argument1Combo->currentText();
- for (QMap<QString, QString>::ConstIterator it = m_otherActions.constBegin(); it != m_otherActions.constEnd(); ++it)
+ TQString s = argument1Combo->currentText();
+ for (TQMap<TQString, TQString>::ConstIterator it = m_otherActions.constBegin(); it != m_otherActions.constEnd(); ++it)
{
if (it.data() == s)
{
@@ -126,14 +126,14 @@ QString EventEditorDlg::argument1()
return s;
}
- return QString::null;
+ return TQString::null;
}
-QString EventEditorDlg::argument2()
+TQString EventEditorDlg::argument2()
{
if (argument2Combo->isEnabled())
{
- QString actionType = actionCombo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("log"))
{
int id = argument2Combo->currentItem();
@@ -152,14 +152,14 @@ QString EventEditorDlg::argument2()
}
return argument2Combo->currentText();
} else
- return QString::null;
+ return TQString::null;
}
-QString EventEditorDlg::argument3()
+TQString EventEditorDlg::argument3()
{
if (argument3Combo->isEnabled())
{
- QString actionType = actionCombo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("log"))
{
int id = argument3Combo->currentItem();
@@ -170,24 +170,24 @@ QString EventEditorDlg::argument3()
}
return argument3Combo->currentText();
} else
- return QString::null;
+ return TQString::null;
}
-QString EventEditorDlg::argument4()
+TQString EventEditorDlg::argument4()
{
if (argument4Combo->isEnabled())
{
return argument4Combo->currentText();
} else
- return QString::null;
+ return TQString::null;
}
-void EventEditorDlg::setArguments(const QStringList& arguments)
+void EventEditorDlg::setArguments(const TQStringList& arguments)
{
- QString actionType = actionCombo->currentText();
+ TQString actionType = actionCombo->currentText();
if (actionType == QPEvents::ref()->fullActionName("email"))
{
- QString s = arguments[0];
+ TQString s = arguments[0];
if (s == "teamleader")
s = i18n(teamLeaderStr.utf8());
else
@@ -220,7 +220,7 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
} else
if (actionType == QPEvents::ref()->fullActionName("script"))
{
- QString s = arguments[0];
+ TQString s = arguments[0];
if (m_scriptActions.contains(s))
s = m_scriptActions[s];
if (argument1Combo->contains(s))
@@ -248,7 +248,7 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
} else
if (actionType == QPEvents::ref()->fullActionName("action"))
{
- QString s = arguments[0];
+ TQString s = arguments[0];
if (m_otherActions.contains(s))
s = m_otherActions[s];
if (argument1Combo->contains(s))
@@ -272,7 +272,7 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
{
argument1Combo->insertItem(arguments[0], 0);
argument1Combo->setCurrentItem(0);
- QString s = arguments[1];
+ TQString s = arguments[1];
if (s == "full")
argument2Combo->setCurrentItem(0);
else if (s == "minimal")
@@ -296,17 +296,17 @@ void EventEditorDlg::setArguments(const QStringList& arguments)
argument4Combo->setCurrentItem(0);
}
-void EventEditorDlg::resetArgumentWidgets(QLabel *label, KComboBox *combo)
+void EventEditorDlg::resetArgumentWidgets(TQLabel *label, KComboBox *combo)
{
label->setText(i18n("Argument:"));
label->setEnabled(false);
combo->setEnabled(false);
combo->setEditable(true);
combo->clear();
- QToolTip::remove(combo);
+ TQToolTip::remove(combo);
}
-void EventEditorDlg::slotActionChanged(const QString &name)
+void EventEditorDlg::slotActionChanged(const TQString &name)
{
resetArgumentWidgets(argument1Label, argument1Combo);
resetArgumentWidgets(argument2Label, argument2Combo);
@@ -318,14 +318,14 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setText(i18n("Receiver:"));
argument1Combo->setEnabled(true);
argument1Combo->insertItem(i18n(teamLeaderStr.utf8()));
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
for (uint i = 0; i < subprojects->count(); i++)
{
- QString s = (*subprojects)[i].name;
+ TQString s = (*subprojects)[i].name;
if (!Project::ref()->subprojectLeader(s).name.isEmpty())
argument1Combo->insertItem(i18n(subprojectLeaderStr.utf8()) + " - " + s);
}
- QStringList tasks = Project::ref()->tasks();
+ TQStringList tasks = Project::ref()->tasks();
for (uint i = 0; i < tasks.count(); i++)
{
argument1Combo->insertItem(i18n(taskLeaderStr.utf8()) + " - " + tasks[i]);
@@ -336,7 +336,7 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setEnabled(true);
argument1Label->setText(i18n("Log file:"));
argument1Combo->setEnabled(true);
- QToolTip::add(argument1Combo, i18n("A relative file to the project folder or a file outside of the project folder in which case the full path must be specified."));
+ TQToolTip::add(argument1Combo, i18n("A relative file to the project folder or a file outside of the project folder in which case the full path must be specified."));
argument2Label->setEnabled(true);
argument2Label->setText(i18n("Detail:"));
argument2Combo->setEnabled(true);
@@ -355,9 +355,9 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setEnabled(true);
argument1Label->setText(i18n("Action name:"));
TagAction *action = 0L;
- QString s;
- QStringList items;
- QRegExp r("\\&(?!\\&)");
+ TQString s;
+ TQStringList items;
+ TQRegExp r("\\&(?!\\&)");
for (uint i = 0; i < m_actionCollection->count(); i++)
{
action = dynamic_cast<TagAction*>(m_actionCollection->action(i));
@@ -383,9 +383,9 @@ void EventEditorDlg::slotActionChanged(const QString &name)
argument1Label->setEnabled(true);
argument1Label->setText(i18n("Action name:"));
TagAction *action = 0L;
- QString s;
- QRegExp r("\\&(?!\\&)");
- QStringList items;
+ TQString s;
+ TQRegExp r("\\&(?!\\&)");
+ TQStringList items;
for (uint i = 0; i < m_actionCollection->count(); i++)
{
KAction *a = m_actionCollection->action(i);
diff --git a/quanta/project/eventeditordlg.h b/quanta/project/eventeditordlg.h
index a8dd6842..86ef5d08 100644
--- a/quanta/project/eventeditordlg.h
+++ b/quanta/project/eventeditordlg.h
@@ -29,24 +29,24 @@ class EventEditorDlg : public EventEditorDlgS
Q_OBJECT
public:
- EventEditorDlg(KActionCollection *actionCollection, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ EventEditorDlg(KActionCollection *actionCollection, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
~EventEditorDlg();
- void setEvent(const QString &name);
- void setAction(const QString &name);
- void setArguments(const QStringList& arguments);
- QString argument1();
- QString argument2();
- QString argument3();
- QString argument4();
+ void setEvent(const TQString &name);
+ void setAction(const TQString &name);
+ void setArguments(const TQStringList& arguments);
+ TQString argument1();
+ TQString argument2();
+ TQString argument3();
+ TQString argument4();
public slots:
- void slotActionChanged(const QString &name);
+ void slotActionChanged(const TQString &name);
protected:
- void resetArgumentWidgets(QLabel *label, KComboBox *combo);
+ void resetArgumentWidgets(TQLabel *label, KComboBox *combo);
- QMap<QString, QString> m_scriptActions;
- QMap<QString, QString> m_otherActions;
+ TQMap<TQString, TQString> m_scriptActions;
+ TQMap<TQString, TQString> m_otherActions;
KActionCollection *m_actionCollection;
protected slots:
diff --git a/quanta/project/membereditdlg.cpp b/quanta/project/membereditdlg.cpp
index 6e47d044..1b27d354 100644
--- a/quanta/project/membereditdlg.cpp
+++ b/quanta/project/membereditdlg.cpp
@@ -14,7 +14,7 @@
* *
***************************************************************************/
//qt includes
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
//kde includes
#include <kcombobox.h>
@@ -32,28 +32,28 @@
#include "subprojecteditdlgs.h"
#include "project.h"
-QString simpleMemberStr = I18N_NOOP("Simple Member");
-QString taskLeaderStr = I18N_NOOP("Task Leader");
-QString teamLeaderStr = I18N_NOOP("Team Leader");
-QString subprojectLeaderStr = I18N_NOOP("Subproject Leader");
+TQString simpleMemberStr = I18N_NOOP("Simple Member");
+TQString taskLeaderStr = I18N_NOOP("Task Leader");
+TQString teamLeaderStr = I18N_NOOP("Team Leader");
+TQString subprojectLeaderStr = I18N_NOOP("Subproject Leader");
-MemberEditDlg::MemberEditDlg(QWidget *parent, const char *name)
+MemberEditDlg::MemberEditDlg(TQWidget *parent, const char *name)
: MemberEditDlgS(parent, name)
{
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
- for (QValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (TQValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
subprojectCombo->insertItem((*it).name);
subprojectCombo->setEnabled(false);
editSubprojectsButton->setEnabled(false);
- QMap<QString, TeamMember> members = Project::ref()->allMembers();
- QStringList items;
- for (QMap<QString, TeamMember>::ConstIterator it = members.constBegin(); it != members.constEnd(); ++it)
+ TQMap<TQString, TeamMember> members = Project::ref()->allMembers();
+ TQStringList items;
+ for (TQMap<TQString, TeamMember>::ConstIterator it = members.constBegin(); it != members.constEnd(); ++it)
{
nameCombo->insertItem(it.key());
}
- nameCombo->insertItem(QString::null, 0);
+ nameCombo->insertItem(TQString::null, 0);
roleCombo->insertItem(i18n(teamLeaderStr.utf8()));
roleCombo->insertItem(i18n(subprojectLeaderStr.utf8()));
@@ -67,7 +67,7 @@ MemberEditDlg::~MemberEditDlg()
{
}
-void MemberEditDlg::slotRoleSelected(const QString &roleName)
+void MemberEditDlg::slotRoleSelected(const TQString &roleName)
{
if (roleName != i18n(subprojectLeaderStr.utf8()))
{
@@ -85,7 +85,7 @@ void MemberEditDlg::slotEditSubprojects()
KDialogBase editDlg(this, "edit_subprojects", true, i18n("Edit Subprojects"), KDialogBase::Ok | KDialogBase::Cancel);
SubprojectEditDlgS subprojectDlg(&editDlg);
editDlg.setMainWidget(&subprojectDlg);
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
int idx = 0;
SubProject subProject;
for (uint i = 0; i < subprojects->count(); i++)
@@ -103,7 +103,7 @@ void MemberEditDlg::slotEditSubprojects()
subprojectDlg.createNew->setChecked(true);
if (editDlg.exec())
{
- QString oldName = subProject.name;
+ TQString oldName = subProject.name;
subProject.name = subprojectDlg.nameEdit->text();
subProject.location = subprojectDlg.locationEdit->text();
if (subprojectDlg.createNew->isChecked() && (subProject.name != oldName))
@@ -121,15 +121,15 @@ void MemberEditDlg::slotEditSubprojects()
void MemberEditDlg::slotMemberSelected()
{
- QString name = nameCombo->currentText();
- QMap<QString, TeamMember> members = Project::ref()->allMembers();
+ TQString name = nameCombo->currentText();
+ TQMap<TQString, TeamMember> members = Project::ref()->allMembers();
if (members.contains(name))
{
emailEdit->setText(members[name].email);
}
}
-void MemberEditDlg::selectMember(const QString &name)
+void MemberEditDlg::selectMember(const TQString &name)
{
bool found = false;
for (int i = 0; i < nameCombo->count(); i++)
@@ -150,9 +150,9 @@ void MemberEditDlg::selectMember(const QString &name)
void MemberEditDlg::slotSelectFromAddrBook()
{
- QMap<QString, QString> uidMap;
- QString name;
- QStringList result;
+ TQMap<TQString, TQString> uidMap;
+ TQString name;
+ TQStringList result;
KABC::AddressBook *addressBook = KABC::StdAddressBook::self();
KABC::AddressBook::ConstIterator it;
KABC::AddressBook::ConstIterator end = addressBook->end();
diff --git a/quanta/project/membereditdlg.h b/quanta/project/membereditdlg.h
index 33669488..3c6c94a8 100644
--- a/quanta/project/membereditdlg.h
+++ b/quanta/project/membereditdlg.h
@@ -26,12 +26,12 @@ class MemberEditDlg : public MemberEditDlgS
{
Q_OBJECT
public:
- MemberEditDlg(QWidget *parent = 0, const char *name = 0);
+ MemberEditDlg(TQWidget *parent = 0, const char *name = 0);
~MemberEditDlg();
- void selectMember(const QString &name);
+ void selectMember(const TQString &name);
public slots:
- void slotRoleSelected(const QString& roleName);
+ void slotRoleSelected(const TQString& roleName);
void slotEditSubprojects();
void slotMemberSelected();
void slotSelectFromAddrBook();
diff --git a/quanta/project/project.cpp b/quanta/project/project.cpp
index 3601e628..abe47943 100644
--- a/quanta/project/project.cpp
+++ b/quanta/project/project.cpp
@@ -22,9 +22,9 @@
#include <unistd.h>
// include QT files
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// include files for KDE
#include <kactionclasses.h>
@@ -63,16 +63,16 @@
#include "viewmanager.h"
#include "qpevents.h"
-extern QString simpleMemberStr;
-extern QString taskLeaderStr;
-extern QString teamLeaderStr;
-extern QString subprojectLeaderStr;
+extern TQString simpleMemberStr;
+extern TQString taskLeaderStr;
+extern TQString teamLeaderStr;
+extern TQString subprojectLeaderStr;
Project::Project(KMainWindow *parent)
- : QObject()
+ : TQObject()
{
d = new ProjectPrivate(this);
- connect(d, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ connect(d, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), this, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )));
d->m_mainWindow = parent;
d->m_uploadDialog = 0L;
keepPasswd = true;
@@ -86,9 +86,9 @@ Project::~Project()
}
-QStringList Project::fileNameList()
+TQStringList Project::fileNameList()
{
- QStringList list;
+ TQStringList list;
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it) {
if (! it.current()->fileName(false).isEmpty())
@@ -124,15 +124,15 @@ void Project::insertFile(const KURL& nameURL, bool repaint )
KURL destination = urlRequesterDlg->selectedURL();
if (destination.isLocalFile())
{
- QDir dir(destination.path());
+ TQDir dir(destination.path());
destination.setPath(dir.canonicalPath());
}
delete urlRequesterDlg;
if ( !destination.isEmpty() )
{
CopyTo *dlg = new CopyTo(d->baseURL);
- connect(dlg, SIGNAL(deleteDialog(CopyTo*)), d,
- SLOT(slotDeleteCopytoDlg(CopyTo*)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo*)), d,
+ TQT_SLOT(slotDeleteCopytoDlg(CopyTo*)));
url = dlg->copy( nameURL, destination );
}
else // Copy canceled, addition aborted
@@ -140,7 +140,7 @@ void Project::insertFile(const KURL& nameURL, bool repaint )
return;
}
}
- QDomElement el;
+ TQDomElement el;
while ( d->baseURL.isParentOf(url) )
{
if ( !d->m_projectFiles.contains(url) )
@@ -157,11 +157,11 @@ void Project::insertFile(const KURL& nameURL, bool repaint )
}
url.setPath(url.directory(false));
}
- emit eventHappened("after_project_add", url.url(), QString::null);
+ emit eventHappened("after_project_add", url.url(), TQString::null);
setModified();
if ( repaint )
{
- emit reloadTree( &(d->m_projectFiles), false, QStringList());
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList());
emit newStatus();
}
}
@@ -181,33 +181,33 @@ void Project::readConfig(KConfig *config)
void Project::loadLastProject(bool reload)
{
d->config->setGroup("Projects");
- QStringList projectList = QuantaCommon::readPathListEntry(d->config, "OpenProjects");
- QStringList tempList = QuantaCommon::readPathListEntry(d->config, "ProjectTempFiles");
- QStringList sessionTempList = QuantaCommon::readPathListEntry(d->config, "ProjectSessionTempFiles");
+ TQStringList projectList = QuantaCommon::readPathListEntry(d->config, "OpenProjects");
+ TQStringList tempList = QuantaCommon::readPathListEntry(d->config, "ProjectTempFiles");
+ TQStringList sessionTempList = QuantaCommon::readPathListEntry(d->config, "ProjectSessionTempFiles");
// remove all local open projects because project and temp file are the same
for (uint i = 0; i < projectList.count(); ++i)
{
if (KURL::fromPathOrURL( projectList[i] ).isLocalFile())
{
projectList.remove( projectList.at(i) );
- QStringList::Iterator it = tempList.at(i);
+ TQStringList::Iterator it = tempList.at(i);
if (it != tempList.end())
tempList.remove(it);
- QStringList::Iterator it2 = sessionTempList.at(i);
+ TQStringList::Iterator it2 = sessionTempList.at(i);
if (it2 != sessionTempList.end())
sessionTempList.remove(it2);
--i;
}
}
- QString urlPath;
+ TQString urlPath;
KURL url;
// have we still a project left ?
while (projectList.count() > 0)
{
urlPath = projectList[0];
QuantaCommon::setUrl(url, urlPath);
- QString tempPath = tempList[0];
- QString sessionTempPath = sessionTempList[0];
+ TQString tempPath = tempList[0];
+ TQString sessionTempPath = sessionTempList[0];
// test if the remote project is available
if ( KIO::NetAccess::exists(url, false, d->m_mainWindow) )
{
@@ -262,7 +262,7 @@ void Project::slotOpenProject(const KURL &url)
{
emit hideSplash();
if (KMessageBox::questionYesNo(d->m_mainWindow,
- i18n("<qt>The file <b>%1</b> does not exist.<br> Do you want to remove it from the list?</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::del(), i18n("Keep") )
+ i18n("<qt>The file <b>%1</b> does not exist.<br> Do you want to remove it from the list?</qt>").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::del(), i18n("Keep") )
== KMessageBox::Yes)
{
d->m_projectRecent->removeURL(url);
@@ -271,7 +271,7 @@ void Project::slotOpenProject(const KURL &url)
} else
{
d->loadProject ( url );
- emit eventHappened("after_project_open", url.url(), QString::null);
+ emit eventHappened("after_project_open", url.url(), TQString::null);
}
}
}
@@ -307,10 +307,10 @@ void Project::slotAddDirectory(const KURL& p_dirURL, bool showDlg)
(!destination.isEmpty()) )
{
CopyTo *dlg = new CopyTo(d->baseURL);
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
- SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
- connect(dlg, SIGNAL(deleteDialog(CopyTo *)), d,
- SLOT (slotDeleteCopytoDlg(CopyTo *)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)),
+ TQT_SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo *)), d,
+ TQT_SLOT (slotDeleteCopytoDlg(CopyTo *)));
//if ( rdir.right(1) == "/" ) rdir.remove( rdir.length()-1,1);
dirURL = dlg->copy(dirURL, destination);
return;
@@ -324,7 +324,7 @@ void Project::slotAddDirectory(const KURL& p_dirURL, bool showDlg)
//And again, insert now directly the directory name into the project.
//It's important if rdir doesn't contain any files or subdirectories.
d->insertFiles(dirURL);
- emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList() );
}
}
@@ -338,7 +338,7 @@ void Project::slotInsertFilesAfterCopying(const KURL::List& a_urlList)
//url.adjustPath(1);
d->insertFiles( url, "*" );
}
- emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList() );
}
//rename the elements in the project dom tree
@@ -356,7 +356,7 @@ void Project::slotRenamed(const KURL& oldURL, const KURL& newURL)
progressBar->setValue(0);
progressBar->setTextEnabled(true);
- QDomElement el;
+ TQDomElement el;
bool isFolder = oldURL.fileName(false).isEmpty();
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it)
@@ -379,11 +379,11 @@ void Project::slotRenamed(const KURL& oldURL, const KURL& newURL)
progressBar->setValue(0);
progressBar->setTextEnabled(false);
- emit statusMsg(QString::null);
+ emit statusMsg(TQString::null);
if (d->m_modified)
setModified(); // there happens more than setting the flag !
- emit reloadTree(&(d->m_projectFiles), false, QStringList());
+ emit reloadTree(&(d->m_projectFiles), false, TQStringList());
emit newStatus();
}
@@ -406,7 +406,7 @@ void Project::slotRemove(const KURL& urlToRemove)
{
d->m_projectFiles.removeFromListAndXML(url);
d->m_modified = true;
- emit eventHappened("after_project_remove", url.url(), QString::null);
+ emit eventHappened("after_project_remove", url.url(), TQString::null);
if (!isFolder)
break;
}
@@ -417,26 +417,26 @@ void Project::slotRemove(const KURL& urlToRemove)
progressBar->setValue(0);
progressBar->setTextEnabled(false);
- emit statusMsg(QString::null);
+ emit statusMsg(TQString::null);
if (d->m_modified)
setModified(); // there happens more than setting the flag !
- emit reloadTree( &(d->m_projectFiles), false, QStringList() );
+ emit reloadTree( &(d->m_projectFiles), false, TQStringList() );
emit newStatus();
- QString urlPath = QExtFileInfo::toRelative(urlToRemove, d->baseURL).path();
- QString nice = urlPath;
+ TQString urlPath = QExtFileInfo::toRelative(urlToRemove, d->baseURL).path();
+ TQString nice = urlPath;
nice = KStringHandler::lsqueeze(nice, 60);
if (KMessageBox::warningContinueCancel(d->m_mainWindow, i18n("<qt>Do you want to remove <br><b>%1</b><br> from the server(s) as well?</qt>").arg(nice), i18n("Remove From Server"), KStdGuiItem::remove(), "RemoveFromServer") == KMessageBox::Continue )
{
- QDomNode profilesNode = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles");
- QDomNodeList profileList = profilesNode.toElement().elementsByTagName("profile");
- QDomElement e;
- QString s;
+ TQDomNode profilesNode = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles");
+ TQDomNodeList profileList = profilesNode.toElement().elementsByTagName("profile");
+ TQDomElement e;
+ TQString s;
for (uint i = 0; i < profileList.count(); i++)
{
e = profileList.item(i).toElement();
- QString path = e.attribute("remote_path","");
+ TQString path = e.attribute("remote_path","");
if (!path.startsWith("/"))
path.prepend("/");
KURL baseUrl;
@@ -445,7 +445,7 @@ void Project::slotRemove(const KURL& urlToRemove)
baseUrl.setHost(e.attribute("remote_host",""));
baseUrl.setPath(path);
baseUrl.setUser(e.attribute("user",""));
- QString passwd = password(e.attribute("remote_protocol") + "://" + e.attribute("user") + "@" + e.attribute("remote_host"));
+ TQString passwd = password(e.attribute("remote_protocol") + "://" + e.attribute("user") + "@" + e.attribute("remote_host"));
baseUrl.setPass(passwd);
baseUrl.addPath(urlPath);
KIO::NetAccess::del(baseUrl, d->m_mainWindow);
@@ -462,9 +462,9 @@ void Project::slotOptions()
// optionsDlg.setMainWidget(&optionsPage);
//add the main options page
- QFrame *page = optionsDlg.addPage(i18n("Options"));
+ TQFrame *page = optionsDlg.addPage(i18n("Options"));
ProjectOptions optionsPage(page);
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&optionsPage);
optionsPage.linePrjName->setText( d->projectName );
@@ -477,10 +477,10 @@ void Project::slotOptions()
optionsPage.lineEmail->setText( d->email );
// Signals to handle debugger settings
- connect(optionsPage.buttonDebuggerOptions, SIGNAL(clicked()),
- d, SLOT(slotDebuggerOptions()));
- connect(optionsPage.comboDebuggerClient, SIGNAL(activated(const QString &)),
- d, SLOT(slotDebuggerChanged(const QString &)));
+ connect(optionsPage.buttonDebuggerOptions, TQT_SIGNAL(clicked()),
+ d, TQT_SLOT(slotDebuggerOptions()));
+ connect(optionsPage.comboDebuggerClient, TQT_SIGNAL(activated(const TQString &)),
+ d, TQT_SLOT(slotDebuggerChanged(const TQString &)));
// Debuggers Combo
@@ -505,7 +505,7 @@ void Project::slotOptions()
optionsPage.checkDebuggerPersistentBreakpoints->setChecked(d->m_debuggerPersistentBreakpoints);
optionsPage.checkDebuggerPersistentWatches->setChecked(d->m_debuggerPersistentWatches);
- QString excludeStr;
+ TQString excludeStr;
for (uint i = 0; i < d->excludeList.count(); i++)
{
excludeStr.append(d->excludeList[i]);
@@ -515,7 +515,7 @@ void Project::slotOptions()
optionsPage.checkCvsignore->setChecked(d->m_excludeCvsignore);
optionsPage.linePrefix->setText(d->previewPrefix.prettyURL());
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
uint pos = 0;
for (uint i = 0; i < lst.count(); i++)
{
@@ -526,9 +526,9 @@ void Project::slotOptions()
optionsPage.dtdCombo->setCurrentItem(pos);
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
optionsPage.encodingCombo->insertStringList( availableEncodingNames );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
int iIndex = -1;
for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
{
@@ -541,8 +541,8 @@ void Project::slotOptions()
}
- QStringList list = d->projectViewList();
- QString defaultView = d->dom.firstChild().firstChild().namedItem("autoload").toElement().attribute("projectview");
+ TQStringList list = d->projectViewList();
+ TQString defaultView = d->dom.firstChild().firstChild().namedItem("autoload").toElement().attribute("projectview");
if (list.count() > 0)
{
optionsPage.viewCombo->insertStringList(list);
@@ -566,39 +566,39 @@ void Project::slotOptions()
//add upload profiles page
page = optionsDlg.addPage(i18n("Up&load Profiles"));
UploadProfilesPage uploadProfilesPage(page);
- topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&uploadProfilesPage);
- QDomElement uploadEl = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles").toElement();
+ TQDomElement uploadEl = d->m_sessionDom.firstChild().firstChild().namedItem("uploadprofiles").toElement();
uploadProfilesPage.profileLabel->setText(uploadEl.attribute("defaultProfile"));
uploadProfilesPage.checkShowUploadTreeviews->setChecked(d->m_showUploadTreeviews);
//add the team members page
page = optionsDlg.addPage(i18n("Team Configuration"));
TeamMembersDlg membersPage(page);
- topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&membersPage);
- QListViewItem *item;
+ TQListViewItem *item;
if (!teamLeader().name.isEmpty())
{
TeamMember member = teamLeader();
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Team Leader"), member.task);
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Team Leader"), member.task);
membersPage.membersListView->insertItem(item);
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
{
TeamMember member = it.data();
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Subproject Leader"), member.task, it.key());
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Subproject Leader"), member.task, it.key());
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
TeamMember member = it.data();
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Task Leader"), it.key());
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Task Leader"), it.key());
}
- for (QValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
+ for (TQValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
{
TeamMember member = *it;
- item = new QListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Simple Member"), member.task);
+ item = new TQListViewItem(membersPage.membersListView, member.name, member.nickName, member.email, i18n("Simple Member"), member.task);
}
membersPage.mailingListEdit->setText(d->m_mailingList);
membersPage.setYourself(d->m_yourself);
@@ -606,7 +606,7 @@ void Project::slotOptions()
//add the event configuration page
page = optionsDlg.addPage(i18n("Event Configuration"));
EventConfigurationDlg eventsPage(d->m_mainWindow->actionCollection(), page);
- topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
+ topLayout = new TQVBoxLayout( page, 0, KDialog::spacingHint() );
topLayout->addWidget(&eventsPage);
eventsPage.initEvents(d->m_events);
eventsPage.enableEventsBox->setChecked(d->m_eventsEnabled);
@@ -645,8 +645,8 @@ void Project::slotOptions()
d->usePreviewPrefix = optionsPage.checkPrefix->isChecked();
d->m_persistentBookmarks = optionsPage.checkPersistentBookmarks->isChecked();
- QDomNode projectNode = d->dom.firstChild().firstChild();
- QDomElement el;
+ TQDomNode projectNode = d->dom.firstChild().firstChild();
+ TQDomElement el;
el = projectNode.toElement();
el.setAttribute("name",d->projectName);
@@ -747,24 +747,24 @@ void Project::slotOptions()
}
uploadEl.setAttribute("showtreeviews", uploadProfilesPage.checkShowUploadTreeviews->isChecked() ? "true" : "false");
- QDomNode teamNode = projectNode.namedItem("teamdata");
+ TQDomNode teamNode = projectNode.namedItem("teamdata");
if (!teamNode.isNull())
projectNode.removeChild(teamNode);
teamNode = d->dom.createElement("teamdata");
- QDomNode taskLeadersNode = d->dom.createElement("taskleaders");
+ TQDomNode taskLeadersNode = d->dom.createElement("taskleaders");
teamNode.appendChild(taskLeadersNode);
- QDomNode subLeadersNode = d->dom.createElement("subprojectleaders");
+ TQDomNode subLeadersNode = d->dom.createElement("subprojectleaders");
teamNode.appendChild(subLeadersNode);
- QListViewItemIterator it(membersPage.membersListView);
- QListViewItem *item;
- QStringList savedSubprojects;
+ TQListViewItemIterator it(membersPage.membersListView);
+ TQListViewItem *item;
+ TQStringList savedSubprojects;
while (it.current())
{
item = it.current();
- QString role = item->text(3);
+ TQString role = item->text(3);
if (role == i18n(teamLeaderStr.utf8()))
{
- QDomElement leaderEl = d->dom.createElement("leader");
+ TQDomElement leaderEl = d->dom.createElement("leader");
teamNode.appendChild(leaderEl);
el = d->dom.createElement("name");
leaderEl.appendChild(el);
@@ -778,9 +778,9 @@ void Project::slotOptions()
} else
if (role == i18n(subprojectLeaderStr.utf8()))
{
- QString prjName = item->text(5);
+ TQString prjName = item->text(5);
savedSubprojects.append(prjName);
- QDomElement subEl = d->dom.createElement("subproject");
+ TQDomElement subEl = d->dom.createElement("subproject");
for (uint i = 0; i < d->m_subprojects.count(); i++)
{
if (d->m_subprojects[i].name == prjName)
@@ -808,7 +808,7 @@ void Project::slotOptions()
} else
if (role == i18n(simpleMemberStr.utf8()))
{
- QDomElement memberEl = d->dom.createElement("member");
+ TQDomElement memberEl = d->dom.createElement("member");
memberEl.setAttribute("task", item->text(4));
teamNode.appendChild(memberEl);
el = d->dom.createElement("name");
@@ -863,13 +863,13 @@ void Project::slotUpload()
if (!d->m_uploadDialog)
{
d->m_uploadDialog = new ProjectUpload(KURL(), "", false, false, false, i18n("Upload project items..."));
- connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ connect(d->m_uploadDialog, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), this, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )));
d->m_uploadDialog->show();
} else
d->m_uploadDialog->raise();
}
-void Project::slotUploadURL(const KURL& urlToUpload, const QString& profileName, bool quickUpload, bool markOnly)
+void Project::slotUploadURL(const KURL& urlToUpload, const TQString& profileName, bool quickUpload, bool markOnly)
{
if (!ViewManager::ref()->saveAll())
return;
@@ -878,14 +878,14 @@ void Project::slotUploadURL(const KURL& urlToUpload, const QString& profileName,
if (!d->m_uploadDialog)
{
d->m_uploadDialog = new ProjectUpload(url, profileName, false, quickUpload, markOnly, i18n("Upload project items..."));
- connect(d->m_uploadDialog, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), this, SIGNAL(eventHappened(const QString&, const QString&, const QString& )));
+ connect(d->m_uploadDialog, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), this, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )));
d->m_uploadDialog->show();
} else
d->m_uploadDialog->raise();
}
-void Project::slotGetMessages(const QString& data)
+void Project::slotGetMessages(const TQString& data)
{
emit messages(data);
}
@@ -898,7 +898,7 @@ void Project::slotRescanPrjDir()
{
d->insertFiles(dlg->files());
setModified();
- emit reloadTree(&(d->m_projectFiles), false, QStringList());
+ emit reloadTree(&(d->m_projectFiles), false, TQStringList());
}
delete dlg;
}
@@ -928,13 +928,13 @@ bool Project::contains(const KURL& url)
return d->m_projectFiles.contains(url);
}
-void Project::slotFileDescChanged(const KURL& url, const QString& desc)
+void Project::slotFileDescChanged(const KURL& url, const TQString& desc)
{
ProjectURL *proUrl = d->m_projectFiles.find(url);
if (! proUrl)
return;
- QDomElement el = proUrl->domElement;
+ TQDomElement el = proUrl->domElement;
el.setAttribute("desc", desc);
proUrl->fileDesc = desc;
setModified();
@@ -945,8 +945,8 @@ void Project::slotUploadStatusChanged(const KURL& url, int status)
if (! d->m_projectFiles.contains(url))
return;
- QDomElement el;
- QString urlStr = url.url();
+ TQDomElement el;
+ TQString urlStr = url.url();
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it)
{
@@ -966,7 +966,7 @@ void Project::slotChangeDocumentFolderStatus(const KURL &url, bool status)
if (! proUrl)
return;
- QDomElement el = proUrl->domElement;
+ TQDomElement el = proUrl->domElement;
el.setAttribute("documentFolder", (status ? "true" : "false"));
proUrl->documentFolder = status;
setModified();
@@ -994,7 +994,7 @@ KURL Project::projectBaseURL()
return result;
}
-void Project::savePassword(const QString &entry, const QString &passwd, bool store)
+void Project::savePassword(const TQString &entry, const TQString &passwd, bool store)
{
d->m_passwdList[entry] = passwd;
KConfig *config = kapp->config();
@@ -1011,7 +1011,7 @@ void Project::savePassword(const QString &entry, const QString &passwd, bool sto
config->sync();
}
-QString Project::password(const QString &entry)
+TQString Project::password(const TQString &entry)
{
if (d->m_passwdList.contains(entry))
return d->m_passwdList[entry];
@@ -1019,18 +1019,18 @@ QString Project::password(const QString &entry)
{
KConfig *config = kapp->config();
config->setGroup("Projects");
- QString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
-// QString passwd = config->readEntry(d->projectName + " | " + entry,"");
+ TQString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
+// TQString passwd = config->readEntry(d->projectName + " | " + entry,"");
return passwd;
}
}
-bool Project::passwordSaved(const QString &entry)
+bool Project::passwordSaved(const TQString &entry)
{
KConfig *config = kapp->config();
config->setGroup("Projects");
- QString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
-// QString passwd = config->readEntry(d->projectName + " | " + entry,"");
+ TQString passwd = KStringHandler::obscure(config->readEntry(d->projectName + " | " + entry,""));
+// TQString passwd = config->readEntry(d->projectName + " | " + entry,"");
return !passwd.isEmpty();
}
@@ -1052,12 +1052,12 @@ void Project::slotReloadProjectDocs()
{
delete d->m_dirWatch;
d->m_dirWatch = new KDirWatch(this);
- connect(d->m_dirWatch, SIGNAL(dirty(const QString &)), SIGNAL(reloadProjectDocs()));
- connect(d->m_dirWatch, SIGNAL(deleted(const QString &)), SIGNAL(reloadProjectDocs()));
+ connect(d->m_dirWatch, TQT_SIGNAL(dirty(const TQString &)), TQT_SIGNAL(reloadProjectDocs()));
+ connect(d->m_dirWatch, TQT_SIGNAL(deleted(const TQString &)), TQT_SIGNAL(reloadProjectDocs()));
if (d->baseURL.isLocalFile())
d->m_dirWatch->addDir(d->baseURL.path() + "/doc");
KURL url;
- QString path;
+ TQString path;
ProjectList::Iterator it( d->m_projectFiles );
for ( ; it.current(); ++it) {
url = *(it.current());
@@ -1077,18 +1077,18 @@ bool Project::hasProject()
return !d->projectName.isNull();
}
-QString Project::projectName()
+TQString Project::projectName()
{
return d->projectName;
}
-const QString& Project::defaultDTD()
+const TQString& Project::defaultDTD()
{
return d->m_defaultDTD;
}
-const QString& Project::defaultEncoding()
+const TQString& Project::defaultEncoding()
{
return d->m_defaultEncoding;
}
@@ -1106,22 +1106,22 @@ KURL Project::templateURL()
}
-QString Project::email()
+TQString Project::email()
{
return d->email;
}
-QDomDocument* Project::dom()
+TQDomDocument* Project::dom()
{
return &d->dom;
}
-QDomDocument* Project::sessionDom()
+TQDomDocument* Project::sessionDom()
{
return &d->m_sessionDom;
}
-QString Project::debuggerClient()
+TQString Project::debuggerClient()
{
return d->debuggerClient;
}
@@ -1151,27 +1151,27 @@ EventActions* Project::events()
return 0L;
}
-QString Project::yourself()
+TQString Project::yourself()
{
return d->m_yourself;
}
-QStringList Project::yourRoles()
+TQStringList Project::yourRoles()
{
- QStringList roles;
+ TQStringList roles;
if (d->m_yourself.isEmpty())
return roles;
- QString yourNick = d->m_yourself.lower();
+ TQString yourNick = d->m_yourself.lower();
if (d->m_teamLeader.nickName.lower() == yourNick)
roles += "team leader";
- QValueList<SubProject>::ConstIterator end = d->m_subprojects.constEnd();
- for (QValueList<SubProject>::ConstIterator it = d->m_subprojects.constBegin(); it != end; ++it)
+ TQValueList<SubProject>::ConstIterator end = d->m_subprojects.constEnd();
+ for (TQValueList<SubProject>::ConstIterator it = d->m_subprojects.constBegin(); it != end; ++it)
{
if (subprojectLeader((*it).name).nickName.lower() == yourNick)
roles += "subproject leader:" + (*it).name.lower();
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
if (it.data().nickName.lower() == yourNick)
roles += "task leader:" + it.key().lower();
@@ -1185,7 +1185,7 @@ TeamMember Project::teamLeader()
return d->m_teamLeader;
}
-TeamMember Project::subprojectLeader(const QString &name)
+TeamMember Project::subprojectLeader(const TQString &name)
{
if (d->m_subprojectLeaders.contains(name))
return d->m_subprojectLeaders[name];
@@ -1193,7 +1193,7 @@ TeamMember Project::subprojectLeader(const QString &name)
return TeamMember();
}
-TeamMember Project::taskLeader(const QString &name)
+TeamMember Project::taskLeader(const TQString &name)
{
if (d->m_taskLeaders.contains(name))
return d->m_taskLeaders[name];
@@ -1201,45 +1201,45 @@ TeamMember Project::taskLeader(const QString &name)
return TeamMember();
}
-QValueList<TeamMember> Project::simpleMembers()
+TQValueList<TeamMember> Project::simpleMembers()
{
return d->m_simpleMembers;
}
-QString Project::mailingList()
+TQString Project::mailingList()
{
return d->m_mailingList;
}
-QValueList<SubProject>* Project::subprojects()
+TQValueList<SubProject>* Project::subprojects()
{
return &d->m_subprojects;
}
-QStringList Project::tasks()
+TQStringList Project::tasks()
{
- QStringList result;
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ TQStringList result;
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
result << it.key();
}
return result;
}
-QMap<QString, TeamMember> Project::allMembers()
+TQMap<TQString, TeamMember> Project::allMembers()
{
- QMap<QString, TeamMember> members;
- for (QValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
+ TQMap<TQString, TeamMember> members;
+ for (TQValueList<TeamMember>::ConstIterator it = d->m_simpleMembers.constBegin(); it != d->m_simpleMembers.constEnd(); ++it)
{
members[(*it).name] = *it;
}
if (!d->m_teamLeader.name.isEmpty())
members[d->m_teamLeader.name] = d->m_teamLeader;
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_subprojectLeaders.constBegin(); it != d->m_subprojectLeaders.constEnd(); ++it)
{
members[it.data().name] = it.data();
}
- for (QMap<QString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
+ for (TQMap<TQString, TeamMember>::ConstIterator it = d->m_taskLeaders.constBegin(); it != d->m_taskLeaders.constEnd(); ++it)
{
members[it.data().name] = it.data();
}
@@ -1257,7 +1257,7 @@ bool Project::queryClose()
bool canExit = true;
if (hasProject())
{
- emit eventHappened("before_project_close", d->baseURL.url(), QString::null);
+ emit eventHappened("before_project_close", d->baseURL.url(), TQString::null);
d->config->setGroup("Projects");
KURL url = d->projectURL.url();
url.setPass("");
@@ -1270,18 +1270,18 @@ bool Project::queryClose()
}
if (canExit)
{
- emit eventHappened("after_project_close", d->baseURL.url(), QString::null);
+ emit eventHappened("after_project_close", d->baseURL.url(), TQString::null);
// empty dom tree
d->dom.clear();
d->m_sessionDom.clear();
d->m_events->clear();
d->init();
newProjectLoaded(d->projectName, d->baseURL, d->templateURL);
- reloadTree( &(d->m_projectFiles), true, QStringList());
+ reloadTree( &(d->m_projectFiles), true, TQStringList());
d->adjustActions();
d->m_projectRecent->setCurrentItem(-1);
newStatus();
-// kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+// kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
}
}
return canExit;
@@ -1296,7 +1296,7 @@ void Project::slotShowProjectToolbar(bool show)
{
if (d->m_mainWindow && d->m_mainWindow->factory())
{
- QWidget *w = d->m_mainWindow->factory()->container("project_toolbar", d->m_mainWindow);
+ TQWidget *w = d->m_mainWindow->factory()->container("project_toolbar", d->m_mainWindow);
if (w)
{
if (show && m_projectToolbarVisible)
@@ -1315,16 +1315,16 @@ void Project::loadBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf)
{
if (!markIf || !hasProject() || !contains(url) || !d->m_persistentBookmarks)
return;
- QDomNodeList nl = d->dom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->dom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
if ( el.attribute("url") == QuantaCommon::qUrl(u) )
{
- QString markListStr = el.attribute("bookmarks");
- QStringList markList = QStringList::split(",", markListStr);
+ TQString markListStr = el.attribute("bookmarks");
+ TQStringList markList = TQStringList::split(",", markListStr);
for (uint j = 0; j < markList.count(); j++)
{
int line = markList[j].toInt();
@@ -1339,16 +1339,16 @@ void Project::saveBookmarks(const KURL &url, KTextEditor::MarkInterface *markIf)
{
if (!markIf || !hasProject() || !contains(url) || !d->m_persistentBookmarks)
return;
- QStringList markList;
- QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ TQStringList markList;
+ TQPtrList<KTextEditor::Mark> marks = markIf->marks();
for (uint i = 0; i < marks.count(); i++)
{
KTextEditor::Mark *mark = marks.at(i);
if (mark->type == KTextEditor::MarkInterface::Bookmark)
- markList << QString("%1").arg(mark->line);
+ markList << TQString("%1").arg(mark->line);
}
- QDomNodeList nl = d->dom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->dom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
for ( uint i = 0; i < nl.count(); i++ )
{
@@ -1365,15 +1365,15 @@ void Project::loadCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa
{
if (!viewCursorIf || !hasProject() || !contains(url))
return;
- QDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
if ( el.attribute("url") == QuantaCommon::qUrl(u) )
{
- QString s = el.attribute("line");
+ TQString s = el.attribute("line");
uint line, col;
bool ok;
line = s.toUInt(&ok, 10);
@@ -1398,8 +1398,8 @@ void Project::saveCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa
{
if (!viewCursorIf || !hasProject() || !contains(url))
return;
- QDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = d->m_sessionDom.elementsByTagName("item");
+ TQDomElement el;
KURL u = QExtFileInfo::toRelative(url, d->baseURL);
uint line, col;
viewCursorIf->cursorPosition(&line, &col);
@@ -1421,7 +1421,7 @@ void Project::saveCursorPosition(const KURL &url, KTextEditor::ViewCursorInterfa
el.setAttribute("column", col);
el.setAttribute("line", line);
el.setAttribute("url", QuantaCommon::qUrl(u));
- QDomNode no = d->m_sessionDom.firstChild().firstChild().namedItem("itemcursorpositions");
+ TQDomNode no = d->m_sessionDom.firstChild().firstChild().namedItem("itemcursorpositions");
no.appendChild(el);
}
}
diff --git a/quanta/project/project.h b/quanta/project/project.h
index b6775da7..95995036 100644
--- a/quanta/project/project.h
+++ b/quanta/project/project.h
@@ -18,7 +18,7 @@
#ifndef PROJECT_H
#define PROJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include "projecturl.h"
@@ -30,7 +30,7 @@ namespace KTextEditor{
class ViewCursorInterface;
}
struct EventAction;
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
/**project
*@author Yacovlev Alexander & Dmitry Poplavsky & Andras Mantia & Jens Herden
@@ -40,18 +40,18 @@ class KConfig;
class KMainWindow;
struct TeamMember {
- QString name;
- QString email;
- QString nickName;
- QString task;
+ TQString name;
+ TQString email;
+ TQString nickName;
+ TQString task;
};
struct SubProject {
- QString name;
- QString location;
+ TQString name;
+ TQString location;
};
-class Project : public QObject {
+class Project : public TQObject {
Q_OBJECT
friend class ProjectPrivate; // need this because I use the signals
@@ -73,9 +73,9 @@ public:
~Project();
bool hasProject();
- QString projectName();
+ TQString projectName();
- QStringList fileNameList();
+ TQStringList fileNameList();
KURL::List files();
void insertFile( const KURL& nameURL, bool repaint );
@@ -87,9 +87,9 @@ public:
/** Returns the relative url with the prefix inserted. */
KURL urlWithPrefix(const KURL& url);
bool contains(const KURL &url);
- /** Read property of QString defaultDTD. */
- const QString& defaultDTD();
- const QString& defaultEncoding();
+ /** Read property of TQString defaultDTD. */
+ const TQString& defaultDTD();
+ const TQString& defaultEncoding();
/** Returns the project's base URL if it exists,
* the HOME dir if there is no project and no opened document
@@ -100,17 +100,17 @@ public:
KURL documentFolderForURL(const KURL &url);
/** Saves the password for entry into a list. Stores on disc if store == true */
- void savePassword(const QString& entry, const QString& passwd, bool store);
+ void savePassword(const TQString& entry, const TQString& passwd, bool store);
/** Returns the saved password for entry */
- QString password(const QString &entry);
- bool passwordSaved(const QString &entry);
- QDomDocument *dom();
- QDomDocument *sessionDom();
- QString debuggerClient();
+ TQString password(const TQString &entry);
+ bool passwordSaved(const TQString &entry);
+ TQDomDocument *dom();
+ TQDomDocument *sessionDom();
+ TQString debuggerClient();
bool debuggerPersistentBreakpoints();
bool debuggerPersistentWatches();
bool keepPasswd;
- QString email();
+ TQString email();
KURL templateURL();
KURL toolbarURL();
EventActions* events();
@@ -118,21 +118,21 @@ public:
* Get the nickname of the current user (you)
* @return the nickname
*/
- QString yourself();
+ TQString yourself();
/**
* Get the roles of the current user in the form "role:task".
* Examples: "team leader", "project leader:subprojectname", "task leader:taskname".
* @return the roles (in lowercase)
*/
- QStringList yourRoles();
+ TQStringList yourRoles();
TeamMember teamLeader();
- TeamMember subprojectLeader(const QString &name);
- TeamMember taskLeader(const QString &name);
- QValueList<TeamMember> simpleMembers();
- QString mailingList();
- QValueList<SubProject>* subprojects();
- QStringList tasks();
- QMap<QString, TeamMember> allMembers();
+ TeamMember subprojectLeader(const TQString &name);
+ TeamMember taskLeader(const TQString &name);
+ TQValueList<TeamMember> simpleMembers();
+ TQString mailingList();
+ TQValueList<SubProject>* subprojects();
+ TQStringList tasks();
+ TQMap<TQString, TeamMember> allMembers();
bool eventsEnabled();
void setProjectToolbarVisible(bool visible) {m_projectToolbarVisible = visible;}
@@ -157,7 +157,7 @@ public slots:
void slotOpenProject(const KURL&);
void slotOptions();
void slotUpload();
- void slotUploadURL(const KURL &urlToUpload, const QString &profileName, bool quickUpload, bool markOnly);
+ void slotUploadURL(const KURL &urlToUpload, const TQString &profileName, bool quickUpload, bool markOnly);
void slotAddDirectory(const KURL& dirURL, bool showDlg = true);
void slotInsertFile(const KURL& url);
@@ -168,10 +168,10 @@ public slots:
void slotRemove(const KURL& urlToRemove);
- void slotGetMessages(const QString&);
+ void slotGetMessages(const TQString&);
void slotRescanPrjDir();
- void slotFileDescChanged(const KURL& url, const QString& desc);
+ void slotFileDescChanged(const KURL& url, const TQString& desc);
void slotUploadStatusChanged(const KURL& url, int status);
void slotChangeDocumentFolderStatus(const KURL& url, bool status);
@@ -183,28 +183,28 @@ public slots:
signals:
- void openFile( const KURL&, const QString& );
- void openFiles( const KURL::List&, const QString& );
+ void openFile( const KURL&, const TQString& );
+ void openFiles( const KURL::List&, const TQString& );
void closeFile( const KURL&);
void closeFiles();
- void reloadTree(ProjectList *, bool, const QStringList &);
+ void reloadTree(ProjectList *, bool, const TQStringList &);
- void messages(const QString& );
+ void messages(const TQString& );
void enableMessageWidget();
void newStatus();
- void statusMsg(const QString &);
+ void statusMsg(const TQString &);
/** No descriptions */
- void newProjectLoaded(const QString &, const KURL &, const KURL &);
+ void newProjectLoaded(const TQString &, const KURL &, const KURL &);
void reloadProjectDocs();
void hideSplash();
void addProjectDoc(const KURL &);
void getUserToolbarFiles(KURL::List *);
void loadToolbarFile(const KURL &);
/** ask for the tree status for saving in project */
- void getTreeStatus(QStringList *);
- void eventHappened(const QString&, const QString&, const QString& );
+ void getTreeStatus(TQStringList *);
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
/** The constructor is privat because we use singleton patter.
diff --git a/quanta/project/projectlist.cpp b/quanta/project/projectlist.cpp
index f5fdc24e..fabec2fd 100644
--- a/quanta/project/projectlist.cpp
+++ b/quanta/project/projectlist.cpp
@@ -15,9 +15,9 @@
***************************************************************************/
// qt includes
-#include <qdom.h>
-#include <qstring.h>
-#include <qfileinfo.h>
+#include <tqdom.h>
+#include <tqstring.h>
+#include <tqfileinfo.h>
// kde includes
#include <kprogress.h>
@@ -39,19 +39,19 @@ void ProjectList::clear()
ProjectUrlList::clear();
}
-bool ProjectList::readFromXML(QDomDocument &dom, const KURL &baseURL,
- const KURL &/*templateURL*/, const QRegExp &excludeRx)
+bool ProjectList::readFromXML(TQDomDocument &dom, const KURL &baseURL,
+ const KURL &/*templateURL*/, const TQRegExp &excludeRx)
{
clear(); // empty the list
m_baseURL = baseURL; // remember this
bool modified = false;
- QDomElement el;
- QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ TQDomElement el;
+ TQDomNodeList nl = dom.firstChild().firstChild().childNodes();
progressBar->setTotalSteps(nl.count() - 1);
progressBar->setValue(0);
progressBar->setTextEnabled(true);
- QString path;
- QString tmpString;
+ TQString path;
+ TQString tmpString;
uint nlCount = nl.count();
for ( uint i = 0; i < nlCount; i++ )
{
@@ -86,7 +86,7 @@ bool ProjectList::readFromXML(QDomDocument &dom, const KURL &baseURL,
//remove non-existent local files
if ( url.isLocalFile() )
{
- QFileInfo fi( url.path() );
+ TQFileInfo fi( url.path() );
if ( !fi.exists() )
{
el.parentNode().removeChild( el );
@@ -128,7 +128,7 @@ bool ProjectList::removeFromListAndXML(const KURL &url)
{
ProjectURL *p = find(url);
if (p) {
- QDomElement el = p->domElement;
+ TQDomElement el = p->domElement;
el.parentNode().removeChild(el);
remove(url.url(-1));
return true;
@@ -162,25 +162,25 @@ bool ProjectList::isFolder(const KURL &url) const
}
-void ProjectList::insert(const QString & key, const ProjectURL * item)
+void ProjectList::insert(const TQString & key, const ProjectURL * item)
{
ProjectUrlList::insert(key, item);
}
-ProjectURL * ProjectList::find ( const QString & key ) const
+ProjectURL * ProjectList::find ( const TQString & key ) const
{
return ProjectUrlList::find(key);
}
-bool ProjectList::remove ( const QString & key )
+bool ProjectList::remove ( const TQString & key )
{
return ProjectUrlList::remove(key);
}
-void ProjectList::replace(const QString & key, const ProjectURL * item)
+void ProjectList::replace(const TQString & key, const ProjectURL * item)
{
ProjectUrlList::replace(key, item);
}
diff --git a/quanta/project/projectlist.h b/quanta/project/projectlist.h
index 505fbfd0..87593daf 100644
--- a/quanta/project/projectlist.h
+++ b/quanta/project/projectlist.h
@@ -26,7 +26,7 @@ class QDomDocument;
/**
@short Container for the project files.
- For fast lookup this container is based on QDict.
+ For fast lookup this container is based on TQDict.
The key is generated without a trailing '/' so it doesn't matter if you
search for a folder in this container with or without trailing '/'
*/
@@ -34,12 +34,12 @@ class QDomDocument;
class ProjectList : public ProjectUrlList
{
public:
- /** 1009 is a guess for maximum files in an average project, this number should be prime (@ref QDict)
+ /** 1009 is a guess for maximum files in an average project, this number should be prime (@ref TQDict)
*/
ProjectList( int size = 1009 );
~ProjectList() {};
- typedef QDictIterator<ProjectURL> Iterator;
+ typedef TQDictIterator<ProjectURL> Iterator;
/** resets @ref m_baseURL */
void clear();
@@ -49,8 +49,8 @@ public:
invalid entries gets removed!
@return true if an old structure was found
*/
- bool readFromXML(QDomDocument &dom, const KURL &baseURL,
- const KURL &templateURL, const QRegExp &excludeRx);
+ bool readFromXML(TQDomDocument &dom, const KURL &baseURL,
+ const KURL &templateURL, const TQRegExp &excludeRx);
/**
@return the relative URL
*/
@@ -93,23 +93,23 @@ private:
private because I want to control the key.
use insert(ProjectURL *url) instead.
*/
- void insert(const QString & key, const ProjectURL * item);
+ void insert(const TQString & key, const ProjectURL * item);
/**
private because I want to control the key.
use find(const KURL &url) instead.
*/
- ProjectURL *find ( const QString & key ) const;
+ ProjectURL *find ( const TQString & key ) const;
/**
private because I want to control the key.
*/
- bool remove ( const QString & key );
+ bool remove ( const TQString & key );
/**
private because I want to control the key.
*/
- void replace(const QString & key, const ProjectURL * item);
+ void replace(const TQString & key, const ProjectURL * item);
};
#endif // PROJECTFILES_H
diff --git a/quanta/project/projectnewfinal.cpp b/quanta/project/projectnewfinal.cpp
index c1901e69..b96e8b6f 100644
--- a/quanta/project/projectnewfinal.cpp
+++ b/quanta/project/projectnewfinal.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// qt includes
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// kde includes
#include <kiconloader.h>
@@ -26,7 +26,7 @@
#include "projectnewfinal.h"
#include "projectnewfinal.moc"
-ProjectNewFinal::ProjectNewFinal(QWidget *parent, const char *name )
+ProjectNewFinal::ProjectNewFinal(TQWidget *parent, const char *name )
: ProjectNewFinalS(parent,name)
{
imagelabel->setPixmap( UserIcon("wiznewprjfin") );
diff --git a/quanta/project/projectnewfinal.h b/quanta/project/projectnewfinal.h
index 5cde0ac5..16a40791 100644
--- a/quanta/project/projectnewfinal.h
+++ b/quanta/project/projectnewfinal.h
@@ -27,7 +27,7 @@
class ProjectNewFinal : public ProjectNewFinalS {
Q_OBJECT
public:
- ProjectNewFinal(QWidget *parent=0, const char *name=0);
+ ProjectNewFinal(TQWidget *parent=0, const char *name=0);
~ProjectNewFinal();
void setMargin(int);
diff --git a/quanta/project/projectnewgeneral.cpp b/quanta/project/projectnewgeneral.cpp
index 3f5fe547..28c4b611 100644
--- a/quanta/project/projectnewgeneral.cpp
+++ b/quanta/project/projectnewgeneral.cpp
@@ -16,14 +16,14 @@
***************************************************************************/
// qt includes
-#include <qdir.h>
-#include <qevent.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
+#include <tqdir.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
// kde includes
#include <kfiledialog.h>
@@ -39,19 +39,19 @@
#include "quantacommon.h"
#include "qextfileinfo.h"
-ProjectNewGeneral::ProjectNewGeneral(QWidget *parent, const char *name )
+ProjectNewGeneral::ProjectNewGeneral(TQWidget *parent, const char *name )
: ProjectNewGeneralS(parent,name)
{
imagelabel->setPixmap( UserIcon("wiznewprjglb") );
linePrjName->setFocus();
- QStringList protocols = KProtocolInfo::protocols();
+ TQStringList protocols = KProtocolInfo::protocols();
protocols.sort();
for ( uint i=0; i<protocols.count(); i++ )
{
KURL p;
p.setProtocol(protocols[i]);
- QString protocol = protocols[i];
+ TQString protocol = protocols[i];
if ( KProtocolInfo::supportsWriting(p) &&
KProtocolInfo::supportsMakeDir(p) &&
KProtocolInfo::supportsDeleting(p) &&
@@ -67,21 +67,21 @@ ProjectNewGeneral::ProjectNewGeneral(QWidget *parent, const char *name )
linePrjTmpl->setText("templates");
linePrjToolbar->setText("toolbars");
- connect(comboProtocol, SIGNAL(activated(const QString&)), SLOT(slotProtocolChanged(const QString &)));
- connect( linePrjFile, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotLinePrjFile(const QString &)));
- connect( linePrjName, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotLinePrjFile(const QString &)));
- connect( linePrjDir, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotLinePrjFile(const QString &)));
- connect( buttonDir, SIGNAL(clicked()),
- this, SLOT(slotButtonDir()));
- connect( linePrjName, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotChangeNames(const QString &)));
- connect( linePrjTmpl, SIGNAL(textChanged(const QString &)), SLOT(slotLinePrjFile(const QString &)));
- connect( buttonTmpl, SIGNAL(clicked()), SLOT(slotButtonTmpl()));
- connect( linePrjToolbar, SIGNAL(textChanged(const QString &)), SLOT(slotLinePrjFile(const QString &)));
- connect( buttonToolbar, SIGNAL(clicked()), SLOT(slotButtonToolbar()));
+ connect(comboProtocol, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotProtocolChanged(const TQString &)));
+ connect( linePrjFile, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( linePrjName, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( linePrjDir, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( buttonDir, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotButtonDir()));
+ connect( linePrjName, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotChangeNames(const TQString &)));
+ connect( linePrjTmpl, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( buttonTmpl, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonTmpl()));
+ connect( linePrjToolbar, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotLinePrjFile(const TQString &)));
+ connect( buttonToolbar, TQT_SIGNAL(clicked()), TQT_SLOT(slotButtonToolbar()));
linePrjTmpl->installEventFilter(this);
linePrjToolbar->installEventFilter(this);
@@ -101,7 +101,7 @@ void ProjectNewGeneral::slotButtonDir()
}
}
-void ProjectNewGeneral::slotLinePrjFile( const QString & )
+void ProjectNewGeneral::slotLinePrjFile( const TQString & )
{
bool valid = !(linePrjFile->text().isEmpty() ||
@@ -110,7 +110,7 @@ void ProjectNewGeneral::slotLinePrjFile( const QString & )
linePrjTmpl->text().isEmpty() ||
linePrjToolbar->text().isEmpty());
KURL url;
- QString s = lineHost->text();
+ TQString s = lineHost->text();
if (! s.isEmpty())
url.setHost(s);
@@ -145,16 +145,16 @@ void ProjectNewGeneral::slotLinePrjFile( const QString & )
emit enableNextButton( this, valid );
}
-void ProjectNewGeneral::slotChangeNames( const QString &text )
+void ProjectNewGeneral::slotChangeNames( const TQString &text )
{
int i;
- QString fname = text.lower();
+ TQString fname = text.lower();
while( (i=fname.find(" ")) >=0 ) fname.remove(i,1);
linePrjFile->setText( fname+".webprj" );
}
-QString ProjectNewGeneral::type()
+TQString ProjectNewGeneral::type()
{
// if ( radioCvs ->isChecked() ) return "CVS";
if ( radioLocal->isChecked() ) return "Local";
@@ -197,7 +197,7 @@ void ProjectNewGeneral::slotButtonToolbar()
}
-void ProjectNewGeneral::slotProtocolChanged(const QString& protocol)
+void ProjectNewGeneral::slotProtocolChanged(const TQString& protocol)
{
bool status = true;
if (protocol == i18n("Local"))
@@ -214,9 +214,9 @@ void ProjectNewGeneral::slotProtocolChanged(const QString& protocol)
lineHost->clear();
}
-bool ProjectNewGeneral::eventFilter ( QObject * watched, QEvent * e )
+bool ProjectNewGeneral::eventFilter ( TQObject * watched, TQEvent * e )
{
- if (e->type() == QEvent::FocusOut)
+ if (e->type() == TQEvent::FocusOut)
{
if (watched == linePrjTmpl)
{
diff --git a/quanta/project/projectnewgeneral.h b/quanta/project/projectnewgeneral.h
index b167c15c..6f39fde6 100644
--- a/quanta/project/projectnewgeneral.h
+++ b/quanta/project/projectnewgeneral.h
@@ -29,27 +29,27 @@ class KURL;
class ProjectNewGeneral : public ProjectNewGeneralS {
Q_OBJECT
public:
- ProjectNewGeneral(QWidget *parent=0, const char *name=0);
+ ProjectNewGeneral(TQWidget *parent=0, const char *name=0);
~ProjectNewGeneral();
- QString type();
+ TQString type();
void setMargin(int);
protected:
- bool eventFilter ( QObject * watched, QEvent * e );
+ bool eventFilter ( TQObject * watched, TQEvent * e );
public slots:
void slotButtonDir();
- void slotLinePrjFile(const QString &);
- void slotChangeNames(const QString &);
+ void slotLinePrjFile(const TQString &);
+ void slotChangeNames(const TQString &);
void slotButtonTmpl();
void slotButtonToolbar();
- void slotProtocolChanged(const QString& protocol);
+ void slotProtocolChanged(const TQString& protocol);
signals:
void setBaseURL(const KURL&);
- void enableNextButton(QWidget *, bool);
+ void enableNextButton(TQWidget *, bool);
private:
KURL baseUrl;
diff --git a/quanta/project/projectnewlocal.cpp b/quanta/project/projectnewlocal.cpp
index e037b662..e2d99d30 100644
--- a/quanta/project/projectnewlocal.cpp
+++ b/quanta/project/projectnewlocal.cpp
@@ -16,14 +16,14 @@
***************************************************************************/
// qt includes
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
// kde includes
#include <klocale.h>
@@ -45,7 +45,7 @@
#include "resource.h"
#include "quantacommon.h"
-ProjectNewLocal::ProjectNewLocal(QWidget *parent, const char *name )
+ProjectNewLocal::ProjectNewLocal(TQWidget *parent, const char *name )
: ProjectNewLocalS(parent,name)
{
imagelabel->setPixmap( UserIcon("wiznewprjloc") );
@@ -59,13 +59,13 @@ ProjectNewLocal::ProjectNewLocal(QWidget *parent, const char *name )
checkInsertWeb->setChecked( true );
- connect( checkInsert, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
- connect( checkInsertWeb, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
- connect( checkInsertWithMask, SIGNAL(toggled(bool)), this, SLOT(slotSetFiles(bool)));
+ connect( checkInsert, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFiles(bool)));
+ connect( checkInsertWeb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFiles(bool)));
+ connect( checkInsertWithMask, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotSetFiles(bool)));
- connect(addFiles, SIGNAL(clicked()),this,SLOT(slotAddFiles()));
- connect(addFolder, SIGNAL(clicked()),this,SLOT(slotAddFolder()));
- connect(clearList, SIGNAL(clicked()),this,SLOT(slotClearList()));
+ connect(addFiles, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotAddFiles()));
+ connect(addFolder, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotAddFolder()));
+ connect(clearList, TQT_SIGNAL(clicked()),this,TQT_SLOT(slotClearList()));
}
ProjectNewLocal::~ProjectNewLocal(){
@@ -86,8 +86,8 @@ KURL::List ProjectNewLocal::files()
//return fileList;
KURL::List r;
- QListViewItem *item;
- QListViewItemIterator it(listView);
+ TQListViewItem *item;
+ TQListViewItemIterator it(listView);
for ( ; it.current(); ++it )
{
item = it.current();
@@ -116,12 +116,12 @@ KURL::List ProjectNewLocal::projectFiles()
!baseURL.path().endsWith("/") ||
!checkInsert->isChecked() ) return list;
- QString fmask = "*";
+ TQString fmask = "*";
if ( checkInsertWeb->isChecked() )
{
KMimeType::List list = KMimeType::allMimeTypes();
KMimeType::List::iterator it;
- QString name;
+ TQString name;
fmask = "";
for ( it = list.begin(); it != list.end(); ++it )
{
@@ -130,7 +130,7 @@ KURL::List ProjectNewLocal::projectFiles()
qConfig.scriptMimeTypes.contains(name) ||
qConfig.imageMimeTypes.contains(name))
{
- QStringList patterns = (*it)->patterns();
+ TQStringList patterns = (*it)->patterns();
for (uint i = 0 ; i < patterns.count(); i++)
{
fmask = fmask+patterns[i]+" ";
@@ -159,7 +159,7 @@ void ProjectNewLocal::slotSetFiles(bool)
if ( !fileList.contains(files[i]))
{
fileList.append(files[i]);
- QListViewItem *it = listView->addItem(files[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ TQListViewItem *it = listView->addItem(files[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
if (it) it->setSelected(true);
progressBar->setValue(i);
}
@@ -171,7 +171,7 @@ void ProjectNewLocal::slotSetFiles(bool)
}
}
-void ProjectNewLocal::resizeEvent ( QResizeEvent *t )
+void ProjectNewLocal::resizeEvent ( TQResizeEvent *t )
{
ProjectNewLocalS::resizeEvent(t);
listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
@@ -202,10 +202,10 @@ void ProjectNewLocal::slotAddFiles()
if ( !destination.isEmpty())
{
CopyTo *dlg = new CopyTo( baseURL);
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
- SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
- connect(dlg, SIGNAL(deleteDialog(CopyTo *)),
- SLOT (slotDeleteCopyToDialog(CopyTo *)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)),
+ TQT_SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo *)),
+ TQT_SLOT (slotDeleteCopyToDialog(CopyTo *)));
list = dlg->copy( list, destination );
return;
} else
@@ -222,7 +222,7 @@ void ProjectNewLocal::slotAddFiles()
if (!fileList.contains(list[i]))
{
fileList.append(list[i]);
- QListViewItem *it = listView->addItem(list[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ TQListViewItem *it = listView->addItem(list[i], KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
if (it) it->setSelected(true);
progressBar->setValue(i);
}
@@ -263,10 +263,10 @@ void ProjectNewLocal::slotAddFolder()
if ( !destination.isEmpty())
{
CopyTo *dlg = new CopyTo( baseURL);
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)),
- SLOT (slotInsertFolderAfterCopying(const KURL::List&)));
- connect(dlg, SIGNAL(deleteDialog(CopyTo *)),
- SLOT (slotDeleteCopyToDialog(CopyTo *)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)),
+ TQT_SLOT (slotInsertFolderAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo *)),
+ TQT_SLOT (slotDeleteCopyToDialog(CopyTo *)));
dirURL = dlg->copy(dirURL, destination);
return;
} else
@@ -304,7 +304,7 @@ void ProjectNewLocal::slotInsertFolderAfterCopying(const KURL::List& a_urlList)
{
fileList.append(u);
listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
- QListViewItem *it = listView->itemByUrl(u);
+ TQListViewItem *it = listView->itemByUrl(u);
if (it)
{
it->setSelected(true);
@@ -332,7 +332,7 @@ void ProjectNewLocal::slotInsertFilesAfterCopying(const KURL::List& a_urlList)
if ( !fileList.contains(u))
{
fileList.append(u);
- QListViewItem *it = listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
+ TQListViewItem *it = listView->addItem(u, KFileItem(KFileItem::Unknown, KFileItem::Unknown, KURL()));
if (it)
{
it->setSelected(true);
diff --git a/quanta/project/projectnewlocal.h b/quanta/project/projectnewlocal.h
index 2d2d6d10..498b336d 100644
--- a/quanta/project/projectnewlocal.h
+++ b/quanta/project/projectnewlocal.h
@@ -18,7 +18,7 @@
#ifndef PROJECTNEWLOCAL_H
#define PROJECTNEWLOCAL_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <projectnewlocals.h>
@@ -31,7 +31,7 @@ class CopyTo;
class ProjectNewLocal : public ProjectNewLocalS {
Q_OBJECT
public:
- ProjectNewLocal(QWidget *parent=0, const char *name=0);
+ ProjectNewLocal(TQWidget *parent=0, const char *name=0);
~ProjectNewLocal();
KURL::List files();
@@ -47,7 +47,7 @@ public slots:
void slotInsertFilesAfterCopying(const KURL::List&);
void slotDeleteCopyToDialog(CopyTo*);
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
private:
KURL baseURL;
diff --git a/quanta/project/projectnewweb.cpp b/quanta/project/projectnewweb.cpp
index 20685021..5959d01e 100644
--- a/quanta/project/projectnewweb.cpp
+++ b/quanta/project/projectnewweb.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
// qt includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qlistview.h>
-#include <qfileinfo.h>
-#include <qcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
+#include <tqfileinfo.h>
+#include <tqcombobox.h>
// kde includes
#include <klocale.h>
@@ -38,7 +38,7 @@
#include "quantacommon.h"
#include "uploadtreeview.h"
-ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
+ProjectNewWeb::ProjectNewWeb(TQWidget *parent, const char *name )
: ProjectNewWebS(parent,name)
{
button->setEnabled(false);
@@ -49,14 +49,14 @@ ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
listView->removeColumn(1);
listView->removeColumn(1);
- connect( commandLine, SIGNAL(textChanged(const QString&)),
- this, SLOT (enableStart(const QString&)));
- connect( siteUrl, SIGNAL(textChanged(const QString&)),
- this, SLOT (setCommandL(const QString&)));
- connect( button, SIGNAL(clicked()),
- this, SLOT (slotStart()));
- connect( protocolCombo,SIGNAL(highlighted(const QString&)),
- this, SLOT (setProtocol(const QString&)));
+ connect( commandLine, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT (enableStart(const TQString&)));
+ connect( siteUrl, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT (setCommandL(const TQString&)));
+ connect( button, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT (slotStart()));
+ connect( protocolCombo,TQT_SIGNAL(highlighted(const TQString&)),
+ this, TQT_SLOT (setProtocol(const TQString&)));
start = false;
KLed1->setState(KLed::Off);
@@ -66,21 +66,21 @@ ProjectNewWeb::ProjectNewWeb(QWidget *parent, const char *name )
ProjectNewWeb::~ProjectNewWeb(){
}
-void ProjectNewWeb::enableStart(const QString&)
+void ProjectNewWeb::enableStart(const TQString&)
{
if ( !commandLine->text().isEmpty() ) button->setEnabled(true);
else button->setEnabled(false);
}
-void ProjectNewWeb::setCommandL(const QString& url)
+void ProjectNewWeb::setCommandL(const TQString& url)
{
- QString siteurl = url;
+ TQString siteurl = url;
commandLine->setText("wget -c -np -r --level=5 -nH "+ protocolCombo->currentText().lower()+ "://"+siteurl);
}
/** No descriptions */
-void ProjectNewWeb::setProtocol(const QString& protocol)
+void ProjectNewWeb::setProtocol(const TQString& protocol)
{
commandLine->setText("wget -c -np -r --level=5 -nH "+ protocol.lower()+ "://"+siteUrl->text());
}
@@ -108,25 +108,25 @@ void ProjectNewWeb::slotStart()
proc = new KProcess();
proc ->clearArguments();
- QStringList list = QStringList::split (" ", commandLine->text());
+ TQStringList list = TQStringList::split (" ", commandLine->text());
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
{
*proc << *it;
}
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetWgetOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetWgetOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess *)), this,
- SLOT( slotGetWgetExited(KProcess *)));
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetWgetOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(processExited( KProcess *)), this,
+ TQT_SLOT( slotGetWgetExited(KProcess *)));
if (proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
{
start = true;
button->setText( i18n("Stop") );
- emit enableNextButton((QWidget *)this->parent(),false);
+ emit enableNextButton((TQWidget *)this->parent(),false);
} else
{
KMessageBox::error(this, i18n("There was an error while trying to run the \"wget\" application.\
@@ -138,14 +138,14 @@ void ProjectNewWeb::slotStart()
KMessageBox::sorry(this,i18n("This feature is available only if the project lies on a local disk."));
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
} else
{
QuantaCommon::dirCreationError(this, baseURL);
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
} else {
@@ -155,7 +155,7 @@ void ProjectNewWeb::slotStart()
start = false;
button->setText( i18n("Start") );
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
}
@@ -166,18 +166,18 @@ void ProjectNewWeb::slotGetWgetExited(KProcess*)
start = false;
button->setText( i18n("Start") );
emit messages(i18n("wget finished...\n"));
- emit enableNextButton((QWidget *)this->parent(),true);
+ emit enableNextButton((TQWidget *)this->parent(),true);
}
void ProjectNewWeb::slotGetWgetOutput(KProcess *, char *buffer, int buflen)
{
- QString output = buffer;
+ TQString output = buffer;
output = output.left( buflen );
emit messages(output);
int pos;
- QString basePath = baseURL.path(1);
+ TQString basePath = baseURL.path(1);
while ( (pos = output.find("saved")) != -1 )
{
if (KLed1->state() == KLed::Off)
@@ -201,7 +201,7 @@ void ProjectNewWeb::slotGetWgetOutput(KProcess *, char *buffer, int buflen)
continue;
}
- QString fileName = output.left(endName);
+ TQString fileName = output.left(endName);
fileName = fileName.right( endName - begName-1);
output = output.remove(0,pos+1);
@@ -218,8 +218,8 @@ KURL::List ProjectNewWeb::files()
KURL::List r;
KURL u;
- QListViewItem *item;
- QListViewItemIterator it(listView);
+ TQListViewItem *item;
+ TQListViewItemIterator it(listView);
for ( ; it.current(); ++it )
{
item = it.current();
@@ -236,7 +236,7 @@ KURL::List ProjectNewWeb::files()
return r;
}
-void ProjectNewWeb::resizeEvent ( QResizeEvent *t )
+void ProjectNewWeb::resizeEvent ( TQResizeEvent *t )
{
ProjectNewWebS::resizeEvent(t);
// listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
diff --git a/quanta/project/projectnewweb.h b/quanta/project/projectnewweb.h
index 62da219f..28a395b4 100644
--- a/quanta/project/projectnewweb.h
+++ b/quanta/project/projectnewweb.h
@@ -19,8 +19,8 @@
#define PROJECTNEWWEB_H
//qt includes
-#include <qwidget.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
//app includes
#include "projectnewwebs.h"
@@ -35,12 +35,12 @@ class KURL;
class ProjectNewWeb : public ProjectNewWebS {
Q_OBJECT
public:
- ProjectNewWeb(QWidget *parent=0, const char *name=0);
+ ProjectNewWeb(TQWidget *parent=0, const char *name=0);
~ProjectNewWeb();
public slots:
- void enableStart(const QString&);
- void setCommandL(const QString&);
+ void enableStart(const TQString&);
+ void setCommandL(const TQString&);
void setBaseURL(const KURL& a_baseURL);
void slotStart();
@@ -50,15 +50,15 @@ public slots:
void slotGetWgetExited(KProcess *);
void slotGetWgetOutput(KProcess *proc, char *buffer, int buflen);
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
signals:
void enableMessagesWidget();
- void messages(const QString& );
+ void messages(const TQString& );
/** No descriptions */
- void enableNextButton(QWidget *,bool);
+ void enableNextButton(TQWidget *,bool);
private:
KURL baseURL;
@@ -69,7 +69,7 @@ private:
private slots: // Private slots
/** No descriptions */
- void setProtocol(const QString& protocol);
+ void setProtocol(const TQString& protocol);
};
#endif
diff --git a/quanta/project/projectprivate.cpp b/quanta/project/projectprivate.cpp
index c74b1dc9..86f4e221 100644
--- a/quanta/project/projectprivate.cpp
+++ b/quanta/project/projectprivate.cpp
@@ -18,13 +18,13 @@
#include "projectprivate.h"
//qt includes
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qradiobutton.h>
-#include <qwidgetstack.h>
-#include <qwizard.h>
-#include <qeventloop.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
+#include <tqwidgetstack.h>
+#include <tqwizard.h>
+#include <tqeventloop.h>
//kde includes
#include <kaction.h>
@@ -63,7 +63,7 @@
#include "viewmanager.h"
ProjectPrivate::ProjectPrivate(Project *p)
- : QObject(), config(0L), m_dirWatch(0L), tempFile(0L), sessionTempFile(0L)
+ : TQObject(), config(0L), m_dirWatch(0L), tempFile(0L), sessionTempFile(0L)
{
parent = p;
m_projectFiles.setAutoDelete(true);
@@ -83,73 +83,73 @@ ProjectPrivate::~ProjectPrivate()
void ProjectPrivate::initActions(KActionCollection *ac)
{
(void) new KAction( i18n( "&New Project..." ), "window_new", 0,
- this, SLOT( slotNewProject() ),
+ this, TQT_SLOT( slotNewProject() ),
ac, "project_new" );
(void) new KAction( i18n( "&Open Project..." ), "project_open", 0,
- this, SLOT( slotOpenProject() ),
+ this, TQT_SLOT( slotOpenProject() ),
ac, "project_open" );
m_projectRecent =
- KStdAction::openRecent(parent, SLOT(slotOpenProject(const KURL&)),
+ KStdAction::openRecent(parent, TQT_SLOT(slotOpenProject(const KURL&)),
ac, "project_open_recent");
m_projectRecent->setText(i18n("Open Recent Project"));
m_projectRecent->setIcon("project_open");
m_projectRecent->setToolTip(i18n("Open/Open recent project"));
- connect(m_projectRecent, SIGNAL(activated()), this, SLOT(slotOpenProject()));
+ connect(m_projectRecent, TQT_SIGNAL(activated()), this, TQT_SLOT(slotOpenProject()));
closeprjAction = new KAction( i18n( "&Close Project" ), "fileclose", 0,
- this, SLOT( slotCloseProject() ),
+ this, TQT_SLOT( slotCloseProject() ),
ac, "project_close" );
openPrjViewAction = new KSelectAction( i18n( "Open Project &View..." ), 0,
ac, "project_view_open" );
- connect(openPrjViewAction, SIGNAL(activated(const QString &)),
- this, SLOT(slotOpenProjectView(const QString &)));
+ connect(openPrjViewAction, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotOpenProjectView(const TQString &)));
openPrjViewAction->setToolTip(i18n("Open project view"));
savePrjViewAction = new KAction( i18n( "&Save Project View" ), "filesave", 0,
- this, SLOT( slotSaveProjectView() ),
+ this, TQT_SLOT( slotSaveProjectView() ),
ac, "project_view_save" );
saveAsPrjViewAction = new KAction( i18n( "Save Project View &As..." ), "filesaveas", 0,
- this, SLOT( slotSaveAsProjectView() ),
+ this, TQT_SLOT( slotSaveAsProjectView() ),
ac, "project_view_save_as" );
deletePrjViewAction = new KSelectAction( i18n( "&Delete Project View" ), "editdelete", 0,
ac, "project_view_delete" );
- connect(deletePrjViewAction, SIGNAL(activated(const QString &)),
- this, SLOT(slotDeleteProjectView(const QString &)));
+ connect(deletePrjViewAction, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(slotDeleteProjectView(const TQString &)));
deletePrjViewAction->setToolTip(i18n("Close project view"));
insertFileAction = new KAction( i18n( "&Insert Files..." ), 0,
- this, SLOT( slotAddFiles() ),
+ this, TQT_SLOT( slotAddFiles() ),
ac, "project_insert_file" );
insertDirAction = new KAction( i18n( "Inser&t Folder..." ), 0,
- this, SLOT( slotAddDirectory() ),
+ this, TQT_SLOT( slotAddDirectory() ),
ac, "project_insert_directory" );
rescanPrjDirAction = new KAction( i18n( "&Rescan Project Folder..." ), "reload", 0,
- parent, SLOT( slotRescanPrjDir() ),
+ parent, TQT_SLOT( slotRescanPrjDir() ),
ac, "project_rescan" );
uploadProjectAction = new KAction( i18n( "&Upload Project..." ), "up", Key_F8,
- parent, SLOT( slotUpload() ),
+ parent, TQT_SLOT( slotUpload() ),
ac, "project_upload" );
projectOptionAction = new KAction( i18n( "&Project Properties" ), "configure", SHIFT + Key_F7,
- parent, SLOT( slotOptions() ),
+ parent, TQT_SLOT( slotOptions() ),
ac, "project_options" );
saveAsProjectTemplateAction =
new KAction( i18n( "Save as Project Template..." ), 0,
- m_mainWindow, SLOT( slotFileSaveAsProjectTemplate() ),
+ m_mainWindow, TQT_SLOT( slotFileSaveAsProjectTemplate() ),
ac, "save_project_template" );
saveSelectionAsProjectTemplateAction =
new KAction( i18n( "Save Selection to Project Template File..." ), 0,
- m_mainWindow, SLOT( slotFileSaveSelectionAsProjectTemplate() ),
+ m_mainWindow, TQT_SLOT( slotFileSaveSelectionAsProjectTemplate() ),
ac, "save_selection_project_template" );
adjustActions();
}
@@ -179,8 +179,8 @@ void ProjectPrivate::adjustActions()
void ProjectPrivate::adjustViewActions()
{
- QStringList viewList = projectViewList();
- QString oldItem = openPrjViewAction->currentText();
+ TQStringList viewList = projectViewList();
+ TQString oldItem = openPrjViewAction->currentText();
openPrjViewAction->clear();
openPrjViewAction->setItems(viewList);
int i = viewList.findIndex(oldItem);
@@ -193,11 +193,11 @@ void ProjectPrivate::adjustViewActions()
}
-QStringList ProjectPrivate::projectViewList()
+TQStringList ProjectPrivate::projectViewList()
{
- QStringList list;
- QDomNodeList nl = dom.elementsByTagName("projectview");
- QDomElement el;
+ TQStringList list;
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomElement el;
for (uint i = 0; i < nl.count(); i++)
{
el = nl.item(i).cloneNode().toElement();
@@ -211,7 +211,7 @@ void ProjectPrivate::init()
{
projectURL = KURL();
templateURL = KURL();
- projectName = QString::null;
+ projectName = TQString::null;
m_modified = false;
m_defaultDTD = qConfig.defaultDocType;
excludeRx.setPattern(".*~$");
@@ -223,11 +223,11 @@ void ProjectPrivate::init()
m_debuggerPersistentBreakpoints = false;
m_debuggerPersistentWatches = false;
m_excludeCvsignore = false;
- currentProjectView = QString::null;
+ currentProjectView = TQString::null;
m_projectFiles.clear();
- m_mailingList = QString::null;
- m_teamLeader.name = QString::null;
- m_teamLeader.email = QString::null;
+ m_mailingList = TQString::null;
+ m_teamLeader.name = TQString::null;
+ m_teamLeader.email = TQString::null;
m_taskLeaders.clear();
m_subprojectLeaders.clear();
m_subprojects.clear();
@@ -241,17 +241,17 @@ void ProjectPrivate::openCurrentView()
if (currentProjectView.isEmpty())
return;
KURL::List urlsToOpen, urlsInView;
- QDomNodeList nl = dom.elementsByTagName("projectview");
- QDomElement el;
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomElement el;
for (uint i = 0; i < nl.count(); i++)
{
el = nl.item(i).cloneNode().toElement();
if (el.attribute("name") == currentProjectView)
{
- QDomNodeList itemNodes = el.childNodes();
+ TQDomNodeList itemNodes = el.childNodes();
for (uint j = 0; j < itemNodes.count(); j++)
{
- QDomElement el2 = itemNodes.item(j).cloneNode().toElement();
+ TQDomElement el2 = itemNodes.item(j).cloneNode().toElement();
KURL url = baseURL;
QuantaCommon::setUrl(url,el2.attribute("url"));
url = QExtFileInfo::toAbsolute(url, baseURL);
@@ -280,7 +280,7 @@ void ProjectPrivate::openCurrentView()
break;
}
}
- QStringList viewList = projectViewList();
+ TQStringList viewList = projectViewList();
int i = viewList.findIndex(currentProjectView);
if (i > -1)
openPrjViewAction->setCurrentItem(i);
@@ -288,7 +288,7 @@ void ProjectPrivate::openCurrentView()
}
/** Opens a project view (toolbars & files). */
-void ProjectPrivate::slotOpenProjectView(const QString &view)
+void ProjectPrivate::slotOpenProjectView(const TQString &view)
{
currentProjectView = view;
openCurrentView();
@@ -297,8 +297,8 @@ void ProjectPrivate::slotOpenProjectView(const QString &view)
/** insert files */
void ProjectPrivate::insertFiles( KURL::List files )
{
- QDomElement el;
- QDomNodeList nl = dom.elementsByTagName("item");
+ TQDomElement el;
+ TQDomNodeList nl = dom.elementsByTagName("item");
parent->statusMsg( i18n("Adding files to the project...") );
progressBar->setTotalSteps(2 * files.count() - 2);
progressBar->setValue(0);
@@ -328,7 +328,7 @@ void ProjectPrivate::insertFiles( KURL::List files )
el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false)));
dom.firstChild().firstChild().appendChild(el);
m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) );
- emit eventHappened("after_project_add", url.url(), QString::null);
+ emit eventHappened("after_project_add", url.url(), TQString::null);
m_modified = true;
}
url.setPath(url.directory(false));
@@ -340,7 +340,7 @@ void ProjectPrivate::insertFiles( KURL::List files )
el.setAttribute("url", QuantaCommon::qUrl(QExtFileInfo::toRelative(url, baseURL, false)));
dom.firstChild().firstChild().appendChild(el);
m_projectFiles.insert( new ProjectURL(url, "", 1, false, el) );
- emit eventHappened("after_project_add", url.url(), QString::null);
+ emit eventHappened("after_project_add", url.url(), TQString::null);
m_modified = true;
}
}
@@ -350,14 +350,14 @@ void ProjectPrivate::insertFiles( KURL::List files )
progressBar->setValue(0);
progressBar->setTextEnabled(false);
- parent->reloadTree(&(m_projectFiles), false, QStringList());
+ parent->reloadTree(&(m_projectFiles), false, TQStringList());
parent->newStatus();
- parent->statusMsg(QString::null);
+ parent->statusMsg(TQString::null);
}
/** insert files from dir recursive */
-void ProjectPrivate::insertFiles(const KURL& pathURL, const QString& mask )
+void ProjectPrivate::insertFiles(const KURL& pathURL, const TQString& mask )
{
KURL::List list;
@@ -372,10 +372,10 @@ void ProjectPrivate::loadProjectXML()
//TODO: Optimize reading. For example iterate through all the nodes and handle them
//according to the found node type
parent->statusMsg( i18n("Reading the project file...") );
- QDomNode no;
- QDomElement el;
+ TQDomNode no;
+ TQDomElement el;
KURL url;
- QDomNode projectNode = dom.firstChild().firstChild();
+ TQDomNode projectNode = dom.firstChild().firstChild();
projectName = projectNode.toElement().attribute("name");
if ( projectNode.isNull() || projectName.isEmpty() )
@@ -387,8 +387,8 @@ void ProjectPrivate::loadProjectXML()
}
m_modified = false;
- QString tmpString;
- QDomNode sessionNode;
+ TQString tmpString;
+ TQDomNode sessionNode;
if (!m_createSessionDom)
{
@@ -439,7 +439,7 @@ void ProjectPrivate::loadProjectXML()
currentProjectView = no.toElement().attribute("projectview");
if (currentProjectView.isEmpty())
{
- QStringList list = projectViewList();
+ TQStringList list = projectViewList();
if (list.count() > 0)
currentProjectView = list[0];
}
@@ -508,13 +508,13 @@ void ProjectPrivate::loadProjectXML()
no = projectNode.namedItem("exclude");
m_excludeCvsignore = (no.toElement().attribute("cvsignore", "false") == "true");
- QString excludeStr = no.firstChild().nodeValue();
- QString regExpStr = "";
- excludeList = QStringList::split(';', excludeStr);
+ TQString excludeStr = no.firstChild().nodeValue();
+ TQString regExpStr = "";
+ excludeList = TQStringList::split(';', excludeStr);
for (uint i = 0; i < excludeList.count(); i++)
{
excludeStr = excludeList[i].stripWhiteSpace();
- QString str = excludeStr;
+ TQString str = excludeStr;
if (!excludeStr.startsWith("*"))
{
if (!excludeStr.endsWith("*"))
@@ -531,10 +531,10 @@ void ProjectPrivate::loadProjectXML()
if (i+1 < excludeList.count())
regExpStr.append("|");
}
- QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ TQDomNodeList nl = dom.firstChild().firstChild().childNodes();
if (m_excludeCvsignore && projectURL.isLocalFile())
{
- QStringList cvsIgnoreList;
+ TQStringList cvsIgnoreList;
uint nlCount = nl.count();
for ( uint i = 0; i < nlCount; i++ )
{
@@ -544,18 +544,18 @@ void ProjectPrivate::loadProjectXML()
cvsIgnoreList.append(tmpString);
}
cvsIgnoreList.append("");
- for (QStringList::ConstIterator it = cvsIgnoreList.constBegin(); it != cvsIgnoreList.constEnd(); ++it)
+ for (TQStringList::ConstIterator it = cvsIgnoreList.constBegin(); it != cvsIgnoreList.constEnd(); ++it)
{
tmpString = *it;
- QString rxStr;
+ TQString rxStr;
KURL cvsIgnoreURL;
cvsIgnoreURL.setPath(baseURL.path(1) + tmpString + ".cvsignore");
- QFile f(cvsIgnoreURL.path());
+ TQFile f(cvsIgnoreURL.path());
if (f.open(IO_ReadOnly))
{
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
- QString line;
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString line;
while (!stream.atEnd())
{
line = stream.readLine().stripWhiteSpace();
@@ -588,10 +588,10 @@ void ProjectPrivate::loadProjectXML()
else
ev.type = EventAction::External;
ev.action = el.attribute("action");
- QDomNodeList nl2 = el.elementsByTagName("argument");
+ TQDomNodeList nl2 = el.elementsByTagName("argument");
for (uint j = 0; j < nl2.count(); j++)
{
- QString s = nl2.item(j).toElement().text();
+ TQString s = nl2.item(j).toElement().text();
if (s != "--not set--" && !s.isEmpty())
ev.arguments << s;
}
@@ -600,13 +600,13 @@ void ProjectPrivate::loadProjectXML()
(*m_events)[el.attribute("name")].append(ev);
} else
{
- QValueList<EventAction> evList;
+ TQValueList<EventAction> evList;
evList.append(ev);
m_events->insert(el.attribute("name"), evList);
}
}
- QDomNode teamNode = projectNode.namedItem("teamdata");
+ TQDomNode teamNode = projectNode.namedItem("teamdata");
no = teamNode.namedItem("leader");
if (!no.isNull())
{
@@ -622,7 +622,7 @@ void ProjectPrivate::loadProjectXML()
for (uint i = 0; i < nl.count(); i++)
{
el = nl.item(i).toElement();
- QDomElement el2 = el.namedItem("subprojectleader").toElement();
+ TQDomElement el2 = el.namedItem("subprojectleader").toElement();
TeamMember member;
member.name = el2.attribute("name");
member.nickName = el2.attribute("nickName");
@@ -667,7 +667,7 @@ void ProjectPrivate::loadProjectXML()
if (m_projectFiles.readFromXML(dom, baseURL, templateURL, excludeRx))
m_modified = true;
- QDomNode uploadNode;
+ TQDomNode uploadNode;
if (!m_createSessionDom)
{
uploadNode = sessionNode.namedItem("uploadprofiles");
@@ -677,7 +677,7 @@ void ProjectPrivate::loadProjectXML()
sessionNode.appendChild(uploadNode);
}
- QDomElement uploadEl = uploadNode.toElement();
+ TQDomElement uploadEl = uploadNode.toElement();
m_showUploadTreeviews = uploadEl.attribute("showtreeviews", "true") == "true";
if (m_showUploadTreeviews)
{
@@ -688,7 +688,7 @@ void ProjectPrivate::loadProjectXML()
if (m_createSessionDom)
{
- QDomNode node;
+ TQDomNode node;
node = projectNode.namedItem("treestatus").cloneNode(true);
sessionNode.appendChild(node);
node = projectNode.namedItem("debuggers").cloneNode(true);
@@ -696,7 +696,7 @@ void ProjectPrivate::loadProjectXML()
}
- parent->statusMsg(QString::null);
+ parent->statusMsg(TQString::null);
parent->newProjectLoaded(projectName, baseURL, templateURL);
parent->reloadTree(&(m_projectFiles), true, treeStatusFromXML());
parent->newStatus();
@@ -708,13 +708,13 @@ void ProjectPrivate::slotAcceptCreateProject()
bool errorOccured = false;
projectName = png->linePrjName->text();
- QString basePath = png->linePrjDir ->text();
+ TQString basePath = png->linePrjDir ->text();
KURL oldBaseURL = baseURL;
baseURL = KURL::fromPathOrURL(basePath);
if (baseURL.isLocalFile())
{
- QString path = QDir(baseURL.path()).canonicalPath();
+ TQString path = TQDir(baseURL.path()).canonicalPath();
if (baseURL.path().endsWith("/"))
path.append("/");
if (!path.isEmpty())
@@ -724,7 +724,7 @@ void ProjectPrivate::slotAcceptCreateProject()
it is important to set the fields only if there is some input
otherwise you set them to an empty string and the treeview will
not recognize it as parent url because:
- QString::Null != ""
+ TQString::Null != ""
*/
if (!png->lineHost->text().isEmpty())
baseURL.setHost(png->lineHost->text());
@@ -759,7 +759,7 @@ void ProjectPrivate::slotAcceptCreateProject()
previewPrefix = KURL::fromPathOrURL( pnf->linePrefix->text() );
usePreviewPrefix = pnf->checkPrefix->isChecked();
- QDomElement el;
+ TQDomElement el;
KURL url;
el = dom.firstChild().firstChild().toElement();
@@ -877,13 +877,13 @@ void ProjectPrivate::slotSaveProjectView()
/** Deletes a project view */
-void ProjectPrivate::slotDeleteProjectView(const QString &view)
+void ProjectPrivate::slotDeleteProjectView(const TQString &view)
{
- QDomNodeList nl = dom.elementsByTagName("projectview");
- QDomElement el;
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomElement el;
for (uint i = 0; i < nl.count(); i++)
{
- QDomNode node = nl.item(i);
+ TQDomNode node = nl.item(i);
el = node.cloneNode().toElement();
if (el.attribute("name") == view)
{
@@ -903,21 +903,21 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName)
if (askForName)
{
bool ok;
- QString newProjectView = KInputDialog::getText(i18n("Save Project View As"),
+ TQString newProjectView = KInputDialog::getText(i18n("Save Project View As"),
i18n("Enter the name of the view:"), "", &ok, m_mainWindow).lower();
if (!ok)
return;
currentProjectView = newProjectView;
}
- QDomNodeList nl = dom.elementsByTagName("projectview");
+ TQDomNodeList nl = dom.elementsByTagName("projectview");
for (uint i = 0 ;i < nl.count(); i++)
{
- QDomNode node = nl.item(i);
+ TQDomNode node = nl.item(i);
if (node.toElement().attribute("name") == currentProjectView)
{
if (!askForName ||
KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>A project view named <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>")
- .arg(currentProjectView), QString::null, i18n("Overwrite")) == KMessageBox::Continue)
+ .arg(currentProjectView), TQString::null, i18n("Overwrite")) == KMessageBox::Continue)
{
node.parentNode().removeChild(node);
break;
@@ -928,9 +928,9 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName)
}
}
- QDomElement el = dom.createElement("projectview");
+ TQDomElement el = dom.createElement("projectview");
el.setAttribute("name", currentProjectView);
- QDomElement item;
+ TQDomElement item;
KURL::List openURLs = ViewManager::ref()->openedFiles(true); // get open urls
KURL::List::Iterator it;
for ( it = openURLs.begin(); it != openURLs.end(); ++it )
@@ -961,7 +961,7 @@ void ProjectPrivate::slotSaveAsProjectView(bool askForName)
}
-void ProjectPrivate::slotSelectProjectType(const QString &title)
+void ProjectPrivate::slotSelectProjectType(const TQString &title)
{
if ( png->radioLocal->isChecked() ) stack->raiseWidget( 0 );
if ( png->radioWeb ->isChecked() ) stack->raiseWidget( 1 );
@@ -972,9 +972,9 @@ void ProjectPrivate::slotSelectProjectType(const QString &title)
bool ProjectPrivate::createEmptyDom()
{
- QString str;
- QTextStream stream(&str, IO_WriteOnly);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString str;
+ TQTextStream stream(&str, IO_WriteOnly);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << "<!DOCTYPE webproject ><webproject>" << endl;
stream << "\t<project name=\"" << projectName << "\">" << endl;
@@ -982,9 +982,9 @@ bool ProjectPrivate::createEmptyDom()
stream << "\t</project>" << endl;
stream << "</webproject>" << endl;
- QString sessionStr;
- QTextStream sessionStream(&sessionStr, IO_WriteOnly);
- sessionStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString sessionStr;
+ TQTextStream sessionStream(&sessionStr, IO_WriteOnly);
+ sessionStream.setEncoding(TQTextStream::UnicodeUTF8);
sessionStream << "<!DOCTYPE webprojectsession ><webprojectsession>" << endl;
sessionStream << "\t<session>" << endl;
@@ -992,7 +992,7 @@ bool ProjectPrivate::createEmptyDom()
sessionStream << "</webprojectsession>" << endl;
KURL sessionURL = projectURL;
- QString fileName = projectURL.fileName();
+ TQString fileName = projectURL.fileName();
if (fileName.endsWith(".webprj"))
fileName.replace(".webprj", ".session");
else
@@ -1005,7 +1005,7 @@ bool ProjectPrivate::createEmptyDom()
{
tempFile = new KTempFile(tmpDir); // tempFile will get deleted in slotProjectClose()
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(tempFile->textStream()) << str;
tempFile->close();
result = QExtFileInfo::createDir(baseURL, m_mainWindow);
@@ -1016,7 +1016,7 @@ bool ProjectPrivate::createEmptyDom()
sessionTempFile = new KTempFile(tmpDir); // sessionTempFile will get deleted in slotProjectClose()
sessionTempFile->setAutoDelete(true);
- sessionTempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ sessionTempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(sessionTempFile->textStream()) << sessionStr;
sessionTempFile->close();
result = KIO::NetAccess::upload(sessionTempFile->name(), sessionURL, m_mainWindow);
@@ -1024,11 +1024,11 @@ bool ProjectPrivate::createEmptyDom()
m_tmpSessionFile= sessionTempFile->name();
} else
{
- QFile f(projectURL.path());
+ TQFile f(projectURL.path());
if (f.open( IO_WriteOnly ))
{
- QTextStream fstream(&f);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&f);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << str;
m_tmpProjectFile = projectURL.path(); // we are local: the temp file and the projectURL are the same
} else
@@ -1041,8 +1041,8 @@ bool ProjectPrivate::createEmptyDom()
f.setName(sessionURL.path());
if (f.open(IO_WriteOnly))
{
- QTextStream fstream(&f);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&f);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << sessionStr;
m_tmpSessionFile = sessionURL.path(); // we are local: the temp file and the projectURL are the same
} else
@@ -1071,15 +1071,15 @@ bool ProjectPrivate::createEmptyDom()
}
-QStringList ProjectPrivate::treeStatusFromXML()
+TQStringList ProjectPrivate::treeStatusFromXML()
{
- QStringList folderList;
- QDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
+ TQStringList folderList;
+ TQDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
if (nl.count() > 0) {
nl = nl.item(0).childNodes();
for ( unsigned int i = 0; i < nl.count(); i++ )
{
- QString urlString = nl.item(i).toElement().attribute("url");
+ TQString urlString = nl.item(i).toElement().attribute("url");
folderList.append( baseURL.url(1) + urlString);
}
}
@@ -1090,15 +1090,15 @@ QStringList ProjectPrivate::treeStatusFromXML()
void ProjectPrivate::getStatusFromTree()
{
// remove old status
- QDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
- QDomElement el;
+ TQDomNodeList nl = m_sessionDom.elementsByTagName("treestatus");
+ TQDomElement el;
for ( unsigned int i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
el.parentNode().removeChild( el );
i--;
}
- QStringList folderList;
+ TQStringList folderList;
parent->getTreeStatus( &folderList );
// toplevel folder is always open in a project and QExtFileInfo::toRelative
// creates strange output -> we remove the toplevel folder
@@ -1106,9 +1106,9 @@ void ProjectPrivate::getStatusFromTree()
folderList.remove(folderList.begin());
if (folderList.count() > 0) {
// create the root element
- QDomElement root = m_sessionDom.createElement("treestatus");
+ TQDomElement root = m_sessionDom.createElement("treestatus");
m_sessionDom.firstChild().firstChild().appendChild(root);
- for (QStringList::Iterator it = folderList.begin(); it != folderList.end(); ++it) {
+ for (TQStringList::Iterator it = folderList.begin(); it != folderList.end(); ++it) {
el = m_sessionDom.createElement("openfolder");
el.setAttribute("url", QuantaCommon::qUrl( QExtFileInfo::toRelative(KURL(*it), baseURL) ) );
root.appendChild( el );
@@ -1120,13 +1120,13 @@ void ProjectPrivate::getStatusFromTree()
/** create new project */
void ProjectPrivate::slotNewProject()
{
- QWizard *wiz = new QWizard(m_mainWindow, "new", true);
+ TQWizard *wiz = new TQWizard(m_mainWindow, "new", true);
wiz->setCaption(i18n("New Project Wizard"));
- wiz->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ wiz->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
png = new ProjectNewGeneral(0L);
- stack = new QWidgetStack(0L);
+ stack = new TQWidgetStack(0L);
pnl = new ProjectNewLocal(stack);
pnw = new ProjectNewWeb(stack);
@@ -1145,38 +1145,38 @@ void ProjectPrivate::slotNewProject()
wiz->setNextEnabled ( pnf, false );
wiz->setFinishEnabled( pnf, true );
- connect( png, SIGNAL(enableNextButton(QWidget *,bool)),
- wiz, SLOT(setNextEnabled(QWidget*,bool)));
- connect( png, SIGNAL(setBaseURL(const KURL&)),
- pnl, SLOT( setBaseURL(const KURL&)));
- connect( png, SIGNAL(setBaseURL(const KURL&)),
- pnw, SLOT( setBaseURL(const KURL&)));
- connect( this,SIGNAL(setLocalFiles(bool)),
- pnl, SLOT(slotSetFiles(bool)));
+ connect( png, TQT_SIGNAL(enableNextButton(TQWidget *,bool)),
+ wiz, TQT_SLOT(setNextEnabled(TQWidget*,bool)));
+ connect( png, TQT_SIGNAL(setBaseURL(const KURL&)),
+ pnl, TQT_SLOT( setBaseURL(const KURL&)));
+ connect( png, TQT_SIGNAL(setBaseURL(const KURL&)),
+ pnw, TQT_SLOT( setBaseURL(const KURL&)));
+ connect( this,TQT_SIGNAL(setLocalFiles(bool)),
+ pnl, TQT_SLOT(slotSetFiles(bool)));
- connect(wiz, SIGNAL(selected(const QString &)),
- this, SLOT (slotSelectProjectType(const QString &)));
- connect(wiz, SIGNAL(helpClicked()), SLOT(slotNewProjectHelpClicked()));
-
- connect( pnw, SIGNAL(enableMessagesWidget()),
- parent, SIGNAL(enableMessageWidget()));
- connect( pnw, SIGNAL(messages(const QString&)),
- parent, SLOT (slotGetMessages(const QString&)));
- connect( pnw, SIGNAL(enableNextButton(QWidget *,bool)),
- wiz, SLOT(setNextEnabled(QWidget*,bool)));
- connect( pnw, SIGNAL(enableNextButton(QWidget *,bool)),
- wiz, SLOT(setBackEnabled(QWidget*,bool)));
-
- QStringList lst = DTDs::ref()->nickNameList(true);
+ connect(wiz, TQT_SIGNAL(selected(const TQString &)),
+ this, TQT_SLOT (slotSelectProjectType(const TQString &)));
+ connect(wiz, TQT_SIGNAL(helpClicked()), TQT_SLOT(slotNewProjectHelpClicked()));
+
+ connect( pnw, TQT_SIGNAL(enableMessagesWidget()),
+ parent, TQT_SIGNAL(enableMessageWidget()));
+ connect( pnw, TQT_SIGNAL(messages(const TQString&)),
+ parent, TQT_SLOT (slotGetMessages(const TQString&)));
+ connect( pnw, TQT_SIGNAL(enableNextButton(TQWidget *,bool)),
+ wiz, TQT_SLOT(setNextEnabled(TQWidget*,bool)));
+ connect( pnw, TQT_SIGNAL(enableNextButton(TQWidget *,bool)),
+ wiz, TQT_SLOT(setBackEnabled(TQWidget*,bool)));
+
+ TQStringList lst = DTDs::ref()->nickNameList(true);
pnf->dtdCombo->insertStringList(lst);
- QString defaultDTDName = DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType.lower());
+ TQString defaultDTDName = DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType.lower());
int pos = lst.findIndex(defaultDTDName);
if (pos >= 0)
pnf->dtdCombo->setCurrentItem(pos);
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
pnf->encodingCombo->insertStringList( availableEncodingNames );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
int iIndex = -1;
for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
{
@@ -1204,41 +1204,41 @@ void ProjectPrivate::slotNewProject()
void ProjectPrivate::slotCloseProject()
{
if (!parent->hasProject()) return;
- connect(ViewManager::ref(), SIGNAL(filesClosed(bool)), this, SLOT(slotProceedWithCloseProject(bool)));
+ connect(ViewManager::ref(), TQT_SIGNAL(filesClosed(bool)), this, TQT_SLOT(slotProceedWithCloseProject(bool)));
parent->closeFiles();
}
void ProjectPrivate::slotProceedWithCloseProject(bool success)
{
- disconnect(ViewManager::ref(), SIGNAL(filesClosed(bool)), this, SLOT(slotProceedWithCloseProject(bool)));
+ disconnect(ViewManager::ref(), TQT_SIGNAL(filesClosed(bool)), this, TQT_SLOT(slotProceedWithCloseProject(bool)));
if (!success) return;
- emit eventHappened("before_project_close", baseURL.url(), QString::null);
+ emit eventHappened("before_project_close", baseURL.url(), TQString::null);
if (!uploadProjectFile())
{
if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("Saving of project failed. Do you want to continue with closing (might cause data loss)?"), i18n("Project Saving Error"), KStdGuiItem::close()) == KMessageBox::Cancel)
return;
}
- emit eventHappened("after_project_close", baseURL.url(), QString::null);
+ emit eventHappened("after_project_close", baseURL.url(), TQString::null);
// empty dom tree
dom.clear();
m_sessionDom.clear();
m_events->clear();
config->setGroup("Projects");
- config->writePathEntry("Last Project", QString::null);
+ config->writePathEntry("Last Project", TQString::null);
init();
parent->newProjectLoaded(projectName, baseURL, templateURL);
- parent->reloadTree( &(m_projectFiles), true, QStringList());
+ parent->reloadTree( &(m_projectFiles), true, TQStringList());
adjustActions();
m_projectRecent->setCurrentItem(-1);
parent->newStatus();
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
}
/** open project file */
void ProjectPrivate::slotOpenProject()
{
- KURL url = KFileDialog::getOpenURL( QString::null,
+ KURL url = KFileDialog::getOpenURL( TQString::null,
"*.wpj *.webprj"+i18n("|Project Files\n*|All Files"), m_mainWindow,
i18n("Open Project"));
@@ -1255,8 +1255,8 @@ bool ProjectPrivate::saveProject()
if ( !parent->hasProject() ) return false;
bool result = true;
// remove old opened files
- QDomElement el;
- QDomNodeList nl = dom.firstChild().firstChild().childNodes();
+ TQDomElement el;
+ TQDomNodeList nl = dom.firstChild().firstChild().childNodes();
for ( unsigned int i = 0; i < nl.count(); i++ )
{
@@ -1268,18 +1268,18 @@ bool ProjectPrivate::saveProject()
}
}
getStatusFromTree();
- QFile f(m_tmpProjectFile);
+ TQFile f(m_tmpProjectFile);
if (f.open(IO_WriteOnly))
{
- QTextStream stream( &f );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &f );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
dom.save(stream, 2);
f.close();
f.setName(m_tmpSessionFile);
if (f.open(IO_WriteOnly))
{
- QTextStream stream(&f);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&f);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
m_sessionDom.save(stream, 2);
f.close();
}
@@ -1295,21 +1295,21 @@ bool ProjectPrivate::saveProject()
}
-void ProjectPrivate::loadProjectFromTemp(const KURL &url, const QString &tempFile, const QString &sessionTempFile)
+void ProjectPrivate::loadProjectFromTemp(const KURL &url, const TQString &tempFile, const TQString &sessionTempFile)
{
m_createSessionDom = true;
m_tmpProjectFile = tempFile;
if (!sessionTempFile.isEmpty())
m_tmpSessionFile = sessionTempFile;
projectURL = url;
- QFile f(tempFile);
+ TQFile f(tempFile);
if (f.open(IO_ReadOnly))
{
baseURL = url;
baseURL.setPath(url.directory(true, true));
if (baseURL.isLocalFile())
{
- QDir dir(baseURL.path());
+ TQDir dir(baseURL.path());
baseURL.setPath(dir.canonicalPath());
baseURL.adjustPath(-1);
}
@@ -1357,11 +1357,11 @@ bool ProjectPrivate::loadProject(const KURL &url)
if ( projectAlreadyOpen(url.url()) )
{
parent->hideSplash();
- if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>The project<br><b>%1</b><br> seems to be used by another Quanta instance.<br>You may end up with data loss if you open the same project in two instances, modify and save them in both.<br><br>Do you want to proceed with open?</qt>").arg(url.prettyURL()), QString::null, KStdGuiItem::open()) == KMessageBox::Cancel)
+ if (KMessageBox::warningContinueCancel(m_mainWindow, i18n("<qt>The project<br><b>%1</b><br> seems to be used by another Quanta instance.<br>You may end up with data loss if you open the same project in two instances, modify and save them in both.<br><br>Do you want to proceed with open?</qt>").arg(url.prettyURL()), TQString::null, KStdGuiItem::open()) == KMessageBox::Cancel)
return false;
}
- QString projectTmpFile;
- QString sessionTmpFile;
+ TQString projectTmpFile;
+ TQString sessionTmpFile;
// test if url is writeable and download to local file
if (KIO::NetAccess::exists(url, false, m_mainWindow) &&
@@ -1372,7 +1372,7 @@ bool ProjectPrivate::loadProject(const KURL &url)
slotCloseProject();
}
KURL sessionURL = url;
- QString fileName = url.fileName();
+ TQString fileName = url.fileName();
if (fileName.endsWith(".webprj"))
fileName.replace(".webprj", ".session");
else
@@ -1382,9 +1382,9 @@ bool ProjectPrivate::loadProject(const KURL &url)
KIO::NetAccess::download(sessionURL, sessionTmpFile, m_mainWindow);
else
{
- QString sessionStr;
- QTextStream sessionStream(&sessionStr, IO_WriteOnly);
- sessionStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString sessionStr;
+ TQTextStream sessionStream(&sessionStr, IO_WriteOnly);
+ sessionStream.setEncoding(TQTextStream::UnicodeUTF8);
sessionStream << "<!DOCTYPE webprojectsession ><webprojectsession>" << endl;
sessionStream << "\t<session>" << endl;
@@ -1394,17 +1394,17 @@ bool ProjectPrivate::loadProject(const KURL &url)
{
sessionTempFile = new KTempFile(tmpDir); // sessionTempFile will get deleted in slotProjectClose()
sessionTempFile->setAutoDelete(true);
- sessionTempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ sessionTempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(sessionTempFile->textStream()) << sessionStr;
sessionTempFile->close();
m_tmpSessionFile = sessionTempFile->name();
} else
{
- QFile f(sessionURL.path());
+ TQFile f(sessionURL.path());
if (f.open(IO_WriteOnly))
{
- QTextStream fstream(&f);
- fstream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream fstream(&f);
+ fstream.setEncoding(TQTextStream::UnicodeUTF8);
fstream << sessionStr;
m_tmpSessionFile = sessionURL.path(); // we are local: the temp file and the projectURL are the same
}
@@ -1446,10 +1446,10 @@ void ProjectPrivate::slotAddFiles()
if ( !destination.isEmpty())
{
CopyTo *dlg = new CopyTo( baseURL);
- connect(dlg, SIGNAL(deleteDialog(CopyTo*)),
- SLOT (slotDeleteCopytoDlg(CopyTo*)));
- connect(dlg, SIGNAL(addFilesToProject(const KURL::List&)), parent,
- SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
+ connect(dlg, TQT_SIGNAL(deleteDialog(CopyTo*)),
+ TQT_SLOT (slotDeleteCopytoDlg(CopyTo*)));
+ connect(dlg, TQT_SIGNAL(addFilesToProject(const KURL::List&)), parent,
+ TQT_SLOT (slotInsertFilesAfterCopying(const KURL::List&)));
list = dlg->copy( list, destination );
return;
}
@@ -1470,7 +1470,7 @@ void ProjectPrivate::slotAddFiles()
}
}
- parent->reloadTree( &(m_projectFiles), false, QStringList());
+ parent->reloadTree( &(m_projectFiles), false, TQStringList());
}
}
@@ -1505,15 +1505,15 @@ void ProjectPrivate::slotDebuggerOptions()
int errCode = 0;
//Workaround for dynamic_cast not working correctly on SUSE 10, gcc 4.0.2
//The correct way should be a simple:
-// DebuggerClient *dbg = KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(service, this, 0, QStringList(), &errCode);
- QObject* obj = KParts::ComponentFactory::createInstanceFromService<QObject>(service, this, 0, QStringList(), &errCode);
+// DebuggerClient *dbg = KParts::ComponentFactory::createInstanceFromService<DebuggerClient>(service, this, 0, TQStringList(), &errCode);
+ TQObject* obj = KParts::ComponentFactory::createInstanceFromService<TQObject>(service, this, 0, TQStringList(), &errCode);
if (obj && obj->inherits("DebuggerClient"))
dbg = static_cast<DebuggerClient *>(obj);
if (dbg)
{
- QDomNode projectNode = m_sessionDom.firstChild().firstChild();
- QDomNode nodeThisDbg;
- QDomNode nodeDbg = projectNode.namedItem("debuggers");
+ TQDomNode projectNode = m_sessionDom.firstChild().firstChild();
+ TQDomNode nodeThisDbg;
+ TQDomNode nodeDbg = projectNode.namedItem("debuggers");
if(nodeDbg.isNull())
{
nodeDbg = m_sessionDom.createElement("debuggers");
@@ -1538,7 +1538,7 @@ void ProjectPrivate::slotDebuggerOptions()
}
}
-void ProjectPrivate::slotDebuggerChanged(const QString &debugger)
+void ProjectPrivate::slotDebuggerChanged(const TQString &debugger)
{
m_debuggerClientEdit = debugger;
}
@@ -1555,7 +1555,7 @@ void ProjectPrivate::writeConfig()
// add project to list
if (!projectURL.isEmpty())
{
- QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ TQStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
if (projectList.contains( projectURL.url() ) == 0)
{
projectList.append( projectURL.url() );
@@ -1576,11 +1576,11 @@ void ProjectPrivate::writeConfig()
}
-void ProjectPrivate::removeFromConfig(const QString & urlStr)
+void ProjectPrivate::removeFromConfig(const TQString & urlStr)
{
config->reparseConfiguration();
config->setGroup("Projects");
- QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ TQStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
int i = projectList.findIndex( urlStr );
if ( i > -1)
{
@@ -1601,11 +1601,11 @@ void ProjectPrivate::removeFromConfig(const QString & urlStr)
}
-bool ProjectPrivate::projectAlreadyOpen(const QString & urlStr)
+bool ProjectPrivate::projectAlreadyOpen(const TQString & urlStr)
{
config->reparseConfiguration();
config->setGroup("Projects");
- QStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
+ TQStringList projectList = QuantaCommon::readPathListEntry(config, "OpenProjects");
return (projectList.contains(urlStr) != 0);
}
@@ -1616,7 +1616,7 @@ bool ProjectPrivate::uploadProjectFile()
if (m_tmpProjectFile.isNull() || !saveProject())
return false;
KURL sessionURL = projectURL;
- QString fileName = projectURL.fileName();
+ TQString fileName = projectURL.fileName();
if (fileName.endsWith(".webprj"))
fileName.replace(".webprj", ".session");
else
@@ -1632,7 +1632,7 @@ bool ProjectPrivate::uploadProjectFile()
tempFile = 0L;
delete sessionTempFile;
sessionTempFile = 0L;
- m_tmpProjectFile = QString::null;
+ m_tmpProjectFile = TQString::null;
return true;
}
if (KIO::NetAccess::upload(m_tmpProjectFile, projectURL, m_mainWindow) && KIO::NetAccess::upload(m_tmpSessionFile, sessionURL, m_mainWindow))
@@ -1659,7 +1659,7 @@ bool ProjectPrivate::uploadProjectFile()
{
if (quantaApp)
{
- parent->statusMsg(QString::null );
+ parent->statusMsg(TQString::null );
KMessageBox::error(m_mainWindow, KIO::NetAccess::lastErrorString());
}
return false;
diff --git a/quanta/project/projectprivate.h b/quanta/project/projectprivate.h
index 3ab1a20a..e09977a2 100644
--- a/quanta/project/projectprivate.h
+++ b/quanta/project/projectprivate.h
@@ -19,9 +19,9 @@
#define PROJECTPRIVATE_H
//qt includes
-#include <qmap.h>
-#include <qregexp.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqguardedptr.h>
//app includes
#include "project.h"
@@ -45,7 +45,7 @@ class ProjectNewWeb;
class ProjectNewFinal;
class ProjectList;
struct EventAction;
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
class ProjectPrivate
: public QObject
@@ -59,7 +59,7 @@ public:
Project *parent;
/** Point to the .webprj file */
KURL projectURL;
- QString projectName;
+ TQString projectName;
/** Points to the directory of the .webprj file */
KURL baseURL;
/** Points to the document root inside the project. Item under this folder
@@ -71,7 +71,7 @@ upload.*/
KURL previewPrefix;
bool usePreviewPrefix;
bool m_persistentBookmarks;
- QString author;
+ TQString author;
KRecentFilesAction *m_projectRecent;
ProjectNewGeneral *png;
@@ -79,39 +79,39 @@ upload.*/
ProjectNewWeb *pnw;
ProjectNewFinal *pnf;
- QWidgetStack *stack;
- QString currentProjectView;
+ TQWidgetStack *stack;
+ TQString currentProjectView;
KConfig *config;
bool m_modified;
bool m_excludeCvsignore;
/** Default DTD for this project. */
- QString m_defaultDTD;
- QString m_defaultEncoding;
- QRegExp excludeRx;
- QStringList excludeList;
+ TQString m_defaultDTD;
+ TQString m_defaultEncoding;
+ TQRegExp excludeRx;
+ TQStringList excludeList;
KMainWindow *m_mainWindow;
- QString m_debuggerClientEdit;
- QMap<QString, QString> m_passwdList;
+ TQString m_debuggerClientEdit;
+ TQMap<TQString, TQString> m_passwdList;
ProjectList m_projectFiles; ///< the list with the _absolute_ URL's of the project
KDirWatch *m_dirWatch; ///< watches some project directories for modification
KURL toolbarURL;
KURL templateURL;
- QString email;
- QDomDocument dom;
- QDomDocument m_sessionDom;
- QString debuggerClient;
+ TQString email;
+ TQDomDocument dom;
+ TQDomDocument m_sessionDom;
+ TQString debuggerClient;
bool m_debuggerPersistentBreakpoints;
bool m_debuggerPersistentWatches;
- QGuardedPtr<ProjectUpload> m_uploadDialog;
+ TQGuardedPtr<ProjectUpload> m_uploadDialog;
TeamMember m_teamLeader;
- QMap<QString, TeamMember> m_subprojectLeaders;
- QMap<QString, TeamMember> m_taskLeaders;
- QValueList<TeamMember> m_simpleMembers;
- QValueList<SubProject> m_subprojects;
- QString m_yourself;
- QString m_mailingList;
+ TQMap<TQString, TeamMember> m_subprojectLeaders;
+ TQMap<TQString, TeamMember> m_taskLeaders;
+ TQValueList<TeamMember> m_simpleMembers;
+ TQValueList<SubProject> m_subprojects;
+ TQString m_yourself;
+ TQString m_mailingList;
bool m_showUploadTreeviews;
bool m_eventsEnabled;
@@ -124,8 +124,8 @@ upload.*/
KSelectAction *openPrjViewAction, *deletePrjViewAction;
/** the filename of the local webprj file after download */
- QString m_tmpProjectFile;
- QString m_tmpSessionFile;
+ TQString m_tmpProjectFile;
+ TQString m_tmpSessionFile;
/** used for creating a new project */
KTempFile *tempFile;
KTempFile *sessionTempFile;
@@ -138,7 +138,7 @@ upload.*/
void adjustViewActions();
- QStringList projectViewList();
+ TQStringList projectViewList();
void init();
@@ -147,7 +147,7 @@ upload.*/
void insertFiles( KURL::List files );
/** insert files from dir recursive */
- void insertFiles(const KURL& pathURL, const QString& mask );
+ void insertFiles(const KURL& pathURL, const TQString& mask );
void loadProjectXML();
@@ -165,7 +165,7 @@ upload.*/
@param tempFile the path of the already downloaded temp file
@param sessionTempFile the path of the downloaded project session file. Empty if no such file was downloaded
*/
- void loadProjectFromTemp(const KURL &url, const QString &tempFile, const QString &sessionTempFile);
+ void loadProjectFromTemp(const KURL &url, const TQString &tempFile, const TQString &sessionTempFile);
void getStatusFromTree();
@@ -185,14 +185,14 @@ upload.*/
@param the url string of the project to remove
*/
- void removeFromConfig(const QString & urlStr);
+ void removeFromConfig(const TQString & urlStr);
/**
test if a project is in the list of open projects in config
@param the url string of the project to test
*/
- bool projectAlreadyOpen(const QString & urlStr);
+ bool projectAlreadyOpen(const TQString & urlStr);
/** uploads the project file
@return false if there was nothing to upload or an error occured during upload
@@ -203,7 +203,7 @@ public slots:
void slotDebuggerOptions();
- void slotDebuggerChanged(const QString &debugger);
+ void slotDebuggerChanged(const TQString &debugger);
/** create new project */
void slotNewProject();
@@ -222,7 +222,7 @@ public slots:
void slotAddFiles();
/** Deletes a project view */
- void slotDeleteProjectView(const QString &view);
+ void slotDeleteProjectView(const TQString &view);
/** Saves a project view (group of files & toolbars) asking for a name. */
void slotSaveAsProjectView(bool askForName = true);
@@ -231,10 +231,10 @@ public slots:
void slotSaveProjectView();
/** Opens a project view (toolbars & files). */
- void slotOpenProjectView(const QString &view);
+ void slotOpenProjectView(const TQString &view);
/** for the new project wizard */
- void slotSelectProjectType(const QString &title);
+ void slotSelectProjectType(const TQString &title);
void slotDeleteCopytoDlg(CopyTo *dlg);
@@ -243,11 +243,11 @@ private slots:
signals:
void setLocalFiles(bool);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
- QStringList treeStatusFromXML();
- QString m_wizTitle ;
+ TQStringList treeStatusFromXML();
+ TQString m_wizTitle ;
bool m_createSessionDom;
};
diff --git a/quanta/project/projectupload.cpp b/quanta/project/projectupload.cpp
index e95f9446..ce621c07 100644
--- a/quanta/project/projectupload.cpp
+++ b/quanta/project/projectupload.cpp
@@ -18,20 +18,20 @@
//qt includes
-#include <qlistview.h>
-#include <qeventloop.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qurl.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qframe.h>
-#include <qtooltip.h>
+#include <tqlistview.h>
+#include <tqeventloop.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqurl.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqframe.h>
+#include <tqtooltip.h>
//kde includes
#include <kapplication.h>
@@ -62,7 +62,7 @@
#include "qextfileinfo.h"
#include "resource.h"
-ProjectUpload::ProjectUpload(const KURL& url, const QString& profileName, bool showOnlyProfiles, bool quickUpload, bool markOnly, const char* name)
+ProjectUpload::ProjectUpload(const KURL& url, const TQString& profileName, bool showOnlyProfiles, bool quickUpload, bool markOnly, const char* name)
:ProjectUploadS( 0L, name, false, Qt::WDestructiveClose)
{
m_quickUpload = quickUpload;
@@ -83,7 +83,7 @@ ProjectUpload::ProjectUpload(const KURL& url, const QString& profileName, bool s
{
if (markOnly)
markAsUploaded->setChecked(true);
- QTimer::singleShot(10, this, SLOT(slotBuildTree()));
+ TQTimer::singleShot(10, this, TQT_SLOT(slotBuildTree()));
currentItem = 0L;
}
}
@@ -95,20 +95,20 @@ ProjectUpload::~ProjectUpload()
delete baseUrl;
}
-void ProjectUpload::initProjectInfo(const QString& defaultProfile)
+void ProjectUpload::initProjectInfo(const TQString& defaultProfile)
{
baseUrl = new KURL();
// list->setMultiSelection(true);
- QDomDocument *dom = m_project->sessionDom();
+ TQDomDocument *dom = m_project->sessionDom();
m_profilesNode = dom->firstChild().firstChild().namedItem("uploadprofiles");
if (m_profilesNode.isNull()) //compat code, remove when upgrade from 3.2 is not supported
{
m_currentProfileElement = dom->firstChild().firstChild().namedItem("upload").toElement();
m_defaultProfile = m_currentProfileElement.attribute("user","") + "@" + m_currentProfileElement.attribute("remote_host","");
- QDomElement e = dom->createElement("uploadprofiles");
+ TQDomElement e = dom->createElement("uploadprofiles");
e.setAttribute("defaultProfile", m_defaultProfile);
- QDomElement el = dom->createElement("profile");
+ TQDomElement el = dom->createElement("profile");
el.setAttribute("remote_host", m_currentProfileElement.attribute("remote_host",""));
el.setAttribute("user", m_currentProfileElement.attribute("user",""));
el.setAttribute("remote_path", m_currentProfileElement.attribute("remote_path",""));
@@ -128,10 +128,10 @@ void ProjectUpload::initProjectInfo(const QString& defaultProfile)
m_defaultProfile = m_profilesNode.toElement().attribute("defaultProfile");
else
m_defaultProfile = defaultProfile;
- QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
- QDomElement e;
+ TQDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ TQDomElement e;
m_currentProfileElement = profileList.item(0).toElement();
- QString s;
+ TQString s;
int defaultIdx = 0;
for (uint i = 0; i < profileList.count(); i++)
{
@@ -149,7 +149,7 @@ void ProjectUpload::initProjectInfo(const QString& defaultProfile)
buttonRemoveProfile->setEnabled(comboProfile->count() > 1);
keepPasswords->setChecked(m_project->keepPasswd);
uploadInProgress = false;
- connect( this, SIGNAL( uploadNext() ), SLOT( slotUploadNext() ) );
+ connect( this, TQT_SIGNAL( uploadNext() ), TQT_SLOT( slotUploadNext() ) );
setProfileTooltip();
}
@@ -159,12 +159,12 @@ void ProjectUpload::slotBuildTree()
emit eventHappened("upload_requested", m_project->projectBaseURL().url(), "");
loadRemoteUploadInfo();
KIO::UDSEntry entry;
- QString strUrl = QuantaCommon::qUrl(startUrl);
+ TQString strUrl = QuantaCommon::qUrl(startUrl);
bool isDirectory = strUrl.endsWith("/");
bool forceUpload = !startUrl.isEmpty();
- QString s;
- QDomElement el;
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQString s;
+ TQDomElement el;
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
totalProgress->setTotalSteps(nl.count() - 1 );
totalProgress->setValue(0);
totalText->setText(i18n("Scanning project files..."));
@@ -174,7 +174,7 @@ void ProjectUpload::slotBuildTree()
{
u = QExtFileInfo::toAbsolute(startUrl, u);
}
- QDict<KFileItem> projectDirFiles;
+ TQDict<KFileItem> projectDirFiles;
if (startUrl.isEmpty() || strUrl.endsWith("/")) //upload a folder
{
@@ -184,7 +184,7 @@ void ProjectUpload::slotBuildTree()
projectDirFiles.insert(u.url(), new KFileItem(KFileItem::Unknown, KFileItem::Unknown, u, true));
}
- QTime t;
+ TQTime t;
t.start();
u = m_project->projectBaseURL();
@@ -245,8 +245,8 @@ void ProjectUpload::slotBuildTree()
void ProjectUpload::buildSelectedItemList()
{
- QListViewItem *item;
- QListViewItemIterator it(list);
+ TQListViewItem *item;
+ TQListViewItemIterator it(list);
toUpload.clear();
needsConfirmation.clear();
for ( ; it.current(); ++it )
@@ -274,7 +274,7 @@ void ProjectUpload::buildSelectedItemList()
void ProjectUpload::initBaseUrl()
{
- QString path = m_currentProfileElement.attribute("remote_path","");
+ TQString path = m_currentProfileElement.attribute("remote_path","");
if (!path.startsWith("/"))
path.prepend("/");
@@ -283,7 +283,7 @@ void ProjectUpload::initBaseUrl()
baseUrl->setHost(m_currentProfileElement.attribute("remote_host",""));
baseUrl->setPath(path);
baseUrl->setUser(m_currentProfileElement.attribute("user",""));
- QString password;
+ TQString password;
if (keepPasswords->isChecked())
{
m_project->keepPasswd = true;
@@ -304,16 +304,16 @@ void ProjectUpload::startUpload()
{
if (m_profilesOnly)
{
- QDialog::accept();
+ TQDialog::accept();
return;
}
stopUpload = false;
initBaseUrl();
if (markAsUploaded->isChecked())
{
- QStringList selectedList;
- QListViewItem *item;
- QListViewItemIterator it(list);
+ TQStringList selectedList;
+ TQListViewItem *item;
+ TQListViewItemIterator it(list);
for ( ; it.current(); ++it )
{
item = it.current();
@@ -333,8 +333,8 @@ void ProjectUpload::startUpload()
}
}
//update upload time
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQDomElement el;
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
@@ -351,14 +351,14 @@ void ProjectUpload::startUpload()
int confirmCount = needsConfirmation.count();
if (confirmCount > 0)
{
- QValueList<QListViewItem*>::Iterator it;
- QStringList confirmList;
+ TQValueList<TQListViewItem*>::Iterator it;
+ TQStringList confirmList;
for (it = needsConfirmation.begin(); it != needsConfirmation.end(); ++it)
{
confirmList.append(((UploadTreeFile*)(*it))->url().prettyURL(0, KURL::StripFileProtocol));
}
bool ok;
- QStringList confirmedList = KInputDialog::getItemList(i18n("Confirm Upload"), i18n("Confirm that you want to upload the following files (unselect the files you do not want to upload):"), confirmList, confirmList, true, &ok, this);
+ TQStringList confirmedList = KInputDialog::getItemList(i18n("Confirm Upload"), i18n("Confirm that you want to upload the following files (unselect the files you do not want to upload):"), confirmList, confirmList, true, &ok, this);
if (!ok) return;
for (it = needsConfirmation.begin(); it != needsConfirmation.end(); ++it)
{
@@ -382,7 +382,7 @@ void ProjectUpload::startUpload()
} else
{
if (KMessageBox::warningContinueCancel(this, i18n("<qt><b>%1</b> seems to be unaccessible.<br>Do you want to proceed with upload?</qt>")
- .arg(u.prettyURL(0, KURL::StripFileProtocol)),QString::null,KStdGuiItem::cont()) == KMessageBox::Continue)
+ .arg(u.prettyURL(0, KURL::StripFileProtocol)),TQString::null,KStdGuiItem::cont()) == KMessageBox::Continue)
{
upload();
return;
@@ -456,12 +456,12 @@ void ProjectUpload::upload()
emit eventHappened("before_upload", from.url(), to.url());
KIO::FileCopyJob *job = KIO::file_copy( from, to, fileItem->permissions(), true, false, false );
- connect( job, SIGNAL( result( KIO::Job * ) ),this,
- SLOT( uploadFinished( KIO::Job * ) ) );
- connect( job, SIGNAL( percent( KIO::Job *,unsigned long ) ),
- this, SLOT( uploadProgress( KIO::Job *,unsigned long ) ) );
- connect( job, SIGNAL( infoMessage( KIO::Job *,const QString& ) ),
- this, SLOT( uploadMessage( KIO::Job *,const QString& ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),this,
+ TQT_SLOT( uploadFinished( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( percent( KIO::Job *,unsigned long ) ),
+ this, TQT_SLOT( uploadProgress( KIO::Job *,unsigned long ) ) );
+ connect( job, TQT_SIGNAL( infoMessage( KIO::Job *,const TQString& ) ),
+ this, TQT_SLOT( uploadMessage( KIO::Job *,const TQString& ) ) );
labelCurFile->setText(i18n("Current: %1").arg(currentURL.fileName()));
currentProgress->setProgress( 0 );
@@ -500,7 +500,7 @@ void ProjectUpload::uploadProgress ( KIO::Job *, unsigned long percent )
currentProgress->setProgress( percent );
}
-void ProjectUpload::uploadMessage ( KIO::Job *, const QString & msg )
+void ProjectUpload::uploadMessage ( KIO::Job *, const TQString & msg )
{
labelCurFile->setText( currentURL.fileName() + " : " + msg );
}
@@ -515,7 +515,7 @@ void ProjectUpload::selectModified()
{
for ( KURL::List::Iterator file = modified.begin(); file != modified.end(); ++file )
{
- QListViewItem *it = list->findItem( (*file).path() );
+ TQListViewItem *it = list->findItem( (*file).path() );
it->setSelected(true);
it->repaint();
}
@@ -544,7 +544,7 @@ void ProjectUpload::collapseAll()
list->collapseAll();
}
-void ProjectUpload::resizeEvent ( QResizeEvent *t )
+void ProjectUpload::resizeEvent ( TQResizeEvent *t )
{
ProjectUploadS::resizeEvent(t);
list->setColumnWidth(0,list->width()-list->columnWidth(1)-list->columnWidth(2)-20);
@@ -556,8 +556,8 @@ void ProjectUpload::slotUploadNext()
if (!suspendUpload)
{
totalProgress->setProgress(totalProgress->progress()+1);
- // QListViewItem *it = list->findItem( currentURL.path() );
- QListViewItem *it = currentItem;
+ // TQListViewItem *it = list->findItem( currentURL.path() );
+ TQListViewItem *it = currentItem;
if (it)
{
it->setSelected(false);
@@ -569,8 +569,8 @@ void ProjectUpload::slotUploadNext()
toUpload.remove( it );
//update upload time
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
- QDomElement el;
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQDomElement el;
for ( uint i = 0; i < nl.count(); i++ )
{
el = nl.item(i).toElement();
@@ -587,10 +587,10 @@ void ProjectUpload::slotUploadNext()
void ProjectUpload::clearProjectModified()
{
- QDomNodeList nl = m_project->dom()->elementsByTagName("item");
+ TQDomNodeList nl = m_project->dom()->elementsByTagName("item");
for ( unsigned int i=0; i<nl.count(); i++ )
{
- QDomElement el = nl.item(i).toElement();
+ TQDomElement el = nl.item(i).toElement();
m_uploadTimeList[el.attribute("url")] = el.attribute("modified_time").toInt();
}
modified.clear();
@@ -601,7 +601,7 @@ void ProjectUpload::clearProjectModified()
void ProjectUpload::slotNewProfile()
{
UploadProfileDlgS *profileDlg = new UploadProfileDlgS(this);
- QDomElement el = m_currentProfileElement;
+ TQDomElement el = m_currentProfileElement;
m_currentProfileElement = m_project->dom()->createElement("profile");
fillProfileDlg(profileDlg);
if (profileDlg->exec())
@@ -638,7 +638,7 @@ void ProjectUpload::slotRemoveProfile()
KMessageBox::error(this, i18n("You cannot remove the last profile."), i18n("Profile Removal Error") );
} else
{
- QString profileName = comboProfile->currentText();
+ TQString profileName = comboProfile->currentText();
if (KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> upload profile?</qt>").arg(profileName),
i18n("Profile Removal"), KStdGuiItem::del()) == KMessageBox::Continue)
{
@@ -648,7 +648,7 @@ void ProjectUpload::slotRemoveProfile()
if (newIdx >= comboProfile->count())
newIdx = idx - 1;
comboProfile->setCurrentItem(newIdx);
- QString currentProfile = comboProfile->currentText();
+ TQString currentProfile = comboProfile->currentText();
slotNewProfileSelected(currentProfile);
if (profileName == defaultProfile())
{
@@ -669,13 +669,13 @@ void ProjectUpload::fillProfileDlg(UploadProfileDlgS *profileDlg)
profileDlg->lineUser->setText(m_currentProfileElement.attribute("user",""));
profileDlg->linePath->setText(m_currentProfileElement.attribute("remote_path",""));
profileDlg->port->setText( m_currentProfileElement.attribute("remote_port","") );
- QString def_p = m_currentProfileElement.attribute("remote_protocol","ftp");
+ TQString def_p = m_currentProfileElement.attribute("remote_protocol","ftp");
- QStringList protocols = KProtocolInfo::protocols();
+ TQStringList protocols = KProtocolInfo::protocols();
protocols.sort();
for ( uint i=0; i<protocols.count(); i++ )
{
- QString protocol = protocols[i];
+ TQString protocol = protocols[i];
KURL p;
p.setProtocol(protocol);
if ( KProtocolInfo::supportsWriting(p) &&
@@ -687,7 +687,7 @@ void ProjectUpload::fillProfileDlg(UploadProfileDlgS *profileDlg)
profileDlg->comboProtocol->setCurrentItem(profileDlg->comboProtocol->count()-1 );
}
}
- QString entry = profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text();
+ TQString entry = profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text();
if (m_project->keepPasswd || m_project->passwordSaved(entry))
{
profileDlg->linePasswd->insert(m_project->password(entry));
@@ -703,7 +703,7 @@ void ProjectUpload::fillProfileDlg(UploadProfileDlgS *profileDlg)
void ProjectUpload::readProfileDlg(UploadProfileDlgS *profileDlg)
{
- QString path = profileDlg->linePath->text();
+ TQString path = profileDlg->linePath->text();
if (path.startsWith("~/"))
{
KUser user;
@@ -715,7 +715,7 @@ void ProjectUpload::readProfileDlg(UploadProfileDlgS *profileDlg)
m_currentProfileElement.setAttribute("remote_path", path);
m_currentProfileElement.setAttribute("remote_port", profileDlg->port->text());
m_currentProfileElement.setAttribute("remote_protocol", profileDlg->comboProtocol->currentText());
- QString passwd = QString(profileDlg->linePasswd->password());
+ TQString passwd = TQString(profileDlg->linePasswd->password());
m_project->savePassword(profileDlg->comboProtocol->currentText() + "://" + profileDlg->lineUser->text() + "@" + profileDlg->lineHost->text(), passwd, profileDlg->keepPasswd->isChecked());
m_lastEditedProfileElement = m_currentProfileElement;
m_lastPassword = passwd;
@@ -723,11 +723,11 @@ void ProjectUpload::readProfileDlg(UploadProfileDlgS *profileDlg)
m_profilesNode.toElement().setAttribute("defaultProfile", profileDlg->lineProfileName->text());
}
-void ProjectUpload::slotNewProfileSelected(const QString& profileName)
+void ProjectUpload::slotNewProfileSelected(const TQString& profileName)
{
- QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
- QDomElement e;
- QString s;
+ TQDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ TQDomElement e;
+ TQString s;
for (uint i = 0; i < profileList.count(); i++)
{
e = profileList.item(i).toElement();
@@ -747,7 +747,7 @@ void ProjectUpload::slotNewProfileSelected(const QString& profileName)
}
}
-QString ProjectUpload::defaultProfile()
+TQString ProjectUpload::defaultProfile()
{
return m_profilesNode.toElement().attribute("defaultProfile");
}
@@ -767,47 +767,47 @@ void ProjectUpload::reject()
}
}
- QDialog::reject();
+ TQDialog::reject();
}
void ProjectUpload::setProfileTooltip()
{
- QString tip = m_currentProfileElement.attribute("remote_protocol","ftp") + "://";
- QString user = m_currentProfileElement.attribute("user","");
+ TQString tip = m_currentProfileElement.attribute("remote_protocol","ftp") + "://";
+ TQString user = m_currentProfileElement.attribute("user","");
if (! user.isEmpty()) {
tip += user + "@";
}
tip += m_currentProfileElement.attribute("remote_host","");
- QString port = m_currentProfileElement.attribute("remote_port","");
+ TQString port = m_currentProfileElement.attribute("remote_port","");
if (! port.isEmpty()) {
tip += ":" + port;
}
tip += m_currentProfileElement.attribute("remote_path","");
- QToolTip::add(comboProfile, tip);
+ TQToolTip::add(comboProfile, tip);
}
void ProjectUpload::loadRemoteUploadInfo()
{
- QDomNodeList nl = m_currentProfileElement.elementsByTagName("uploadeditem");
+ TQDomNodeList nl = m_currentProfileElement.elementsByTagName("uploadeditem");
for (uint i = 0; i < nl.count(); i++)
{
- QDomElement el = nl.item(i).toElement();
+ TQDomElement el = nl.item(i).toElement();
m_uploadTimeList[el.attribute("url")] = el.attribute("upload_time").toInt();
}
}
void ProjectUpload::saveRemoteUploadInfo()
{
- QDomNode parent = m_currentProfileElement.parentNode();
- QDomNode profileNode = m_currentProfileElement.cloneNode(false);
+ TQDomNode parent = m_currentProfileElement.parentNode();
+ TQDomNode profileNode = m_currentProfileElement.cloneNode(false);
parent.removeChild(m_currentProfileElement);
parent.appendChild(profileNode);
- QMap<QString, int>::ConstIterator it;
+ TQMap<TQString, int>::ConstIterator it;
for (it = m_uploadTimeList.constBegin(); it != m_uploadTimeList.constEnd(); ++it)
{
- QDomElement el = m_uploadStatusDom.createElement("uploadeditem");
+ TQDomElement el = m_uploadStatusDom.createElement("uploadeditem");
el.setAttribute("url", it.key());
el.setAttribute("upload_time", it.data());
profileNode.appendChild(el);
diff --git a/quanta/project/projectupload.h b/quanta/project/projectupload.h
index 375898ec..d76d1767 100644
--- a/quanta/project/projectupload.h
+++ b/quanta/project/projectupload.h
@@ -21,9 +21,9 @@
#include "projectuploads.h"
#include "project.h"
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <kio/job.h>
@@ -44,9 +44,9 @@ public:
If quickUpload is true, the upload starts immediately without checking
for modifications or confirmation from the user. The url will be
uploaded to the default profile */
- ProjectUpload(const KURL& url, const QString& profileName = QString::null, bool showOnlyProfiles = false, bool quickUpload = false, bool markOnly = false, const char * name = 0);
+ ProjectUpload(const KURL& url, const TQString& profileName = TQString::null, bool showOnlyProfiles = false, bool quickUpload = false, bool markOnly = false, const char * name = 0);
~ProjectUpload();
- QString defaultProfile();
+ TQString defaultProfile();
public slots: // Public slots
/** No descriptions */
@@ -57,7 +57,7 @@ protected slots:
void upload();
void uploadFinished( KIO::Job *job );
void uploadProgress ( KIO::Job *job, unsigned long percent );
- void uploadMessage ( KIO::Job *, const QString & msg );
+ void uploadMessage ( KIO::Job *, const TQString & msg );
void slotUploadNext();
void clearSelection();
@@ -71,16 +71,16 @@ protected slots:
void slotNewProfile();
void slotEditProfile();
void slotRemoveProfile();
- void slotNewProfileSelected(const QString &profileName);
+ void slotNewProfileSelected(const TQString &profileName);
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
virtual void reject();
signals: // Signals
/** No descriptions */
void uploadNext();
- void eventHappened(const QString&, const QString&, const QString&);
+ void eventHappened(const TQString&, const TQString&, const TQString&);
private:
void buildSelectedItemList();
@@ -89,13 +89,13 @@ private:
void setProfileTooltip();
void loadRemoteUploadInfo();
void saveRemoteUploadInfo();
- void initProjectInfo(const QString& defaultProfile);
+ void initProjectInfo(const TQString& defaultProfile);
void initBaseUrl(); /// Reads the current profile setting and initialize the baseUrl from it
KURL::List modified; // modified files
- QValueList<QListViewItem*> needsConfirmation;
- QPtrList<QListViewItem> toUpload; // list of files , still didn't uploaded
- QListViewItem *currentItem;
+ TQValueList<TQListViewItem*> needsConfirmation;
+ TQPtrList<TQListViewItem> toUpload; // list of files , still didn't uploaded
+ TQListViewItem *currentItem;
KURL currentURL;
KURL::List madeDirs;
KURL *baseUrl;
@@ -103,14 +103,14 @@ private:
bool stopUpload;
bool uploadInProgress;
bool suspendUpload;
- QString m_lastPassword;
+ TQString m_lastPassword;
Project *m_project;
- QString m_defaultProfile;
- QDomElement m_currentProfileElement;
- QDomElement m_lastEditedProfileElement;
- QDomNode m_profilesNode;
- QDomDocument m_uploadStatusDom;
- QMap<QString, int> m_uploadTimeList;
+ TQString m_defaultProfile;
+ TQDomElement m_currentProfileElement;
+ TQDomElement m_lastEditedProfileElement;
+ TQDomNode m_profilesNode;
+ TQDomDocument m_uploadStatusDom;
+ TQMap<TQString, int> m_uploadTimeList;
bool m_profilesOnly;
bool m_quickUpload;
};
diff --git a/quanta/project/projecturl.h b/quanta/project/projecturl.h
index 67299d90..cf3eae66 100644
--- a/quanta/project/projecturl.h
+++ b/quanta/project/projecturl.h
@@ -17,9 +17,9 @@
#ifndef PROJECT_URL_H
#define PROJECT_URL_H
-#include <qdom.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kurl.h>
@@ -31,10 +31,10 @@
class ProjectURL : public KURL
{
public:
- QString fileDesc;
+ TQString fileDesc;
int uploadStatus; ///< The upload state, see UploadStatus
bool documentFolder;
- QDomElement domElement;
+ TQDomElement domElement;
ProjectURL()
: KURL(), uploadStatus(1), documentFolder(false) {}
@@ -42,10 +42,10 @@ public:
ProjectURL(const KURL& url)
: KURL(url), uploadStatus(1), documentFolder(false) {}
- ProjectURL(const KURL& url, const QString& desc, int status, bool docFolder)
+ ProjectURL(const KURL& url, const TQString& desc, int status, bool docFolder)
: KURL(url), fileDesc(desc), uploadStatus(status), documentFolder(docFolder) {}
- ProjectURL(const KURL& url, const QString& desc, int status, bool docFolder, QDomElement el)
+ ProjectURL(const KURL& url, const TQString& desc, int status, bool docFolder, TQDomElement el)
: KURL(url), fileDesc(desc), uploadStatus(status), documentFolder(docFolder), domElement(el) {}
virtual ~ProjectURL() {}
@@ -59,6 +59,6 @@ public:
};
};
-typedef QDict<ProjectURL> ProjectUrlList;
+typedef TQDict<ProjectURL> ProjectUrlList;
#endif // PROJECT_URL_H
diff --git a/quanta/project/rescanprj.cpp b/quanta/project/rescanprj.cpp
index fe0bb588..1c467c7d 100644
--- a/quanta/project/rescanprj.cpp
+++ b/quanta/project/rescanprj.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// qt includes
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
// kde includes
#include <kdebug.h>
@@ -39,8 +39,8 @@
#include "projectlist.h"
-RescanPrj::RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const QRegExp &p_excludeRx,
- QWidget *parent, const char *name, bool modal )
+RescanPrj::RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const TQRegExp &p_excludeRx,
+ TQWidget *parent, const char *name, bool modal )
: RescanPrjDir(parent,name,modal)
{
setCaption(name);
@@ -56,22 +56,22 @@ RescanPrj::RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, co
KIO::ListJob *job = KIO::listRecursive( baseURL, false );
m_listJobCount = 1;
- connect( job, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
- this,SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
- connect( job, SIGNAL(result(KIO::Job *)),
- this,SLOT (slotListDone(KIO::Job *)));
-
-
- connect( buttonSelect, SIGNAL(clicked()),
- this, SLOT(slotSelect()));
- connect( buttonDeselect, SIGNAL(clicked()),
- this, SLOT(slotDeselect()));
- connect( buttonInvert, SIGNAL(clicked()),
- this, SLOT(slotInvert()));
- connect( buttonExpand, SIGNAL(clicked()),
- this, SLOT(slotExpand()));
- connect( buttonCollapse, SIGNAL(clicked()),
- this, SLOT(slotCollapse()));
+ connect( job, TQT_SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,TQT_SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( job, TQT_SIGNAL(result(KIO::Job *)),
+ this,TQT_SLOT (slotListDone(KIO::Job *)));
+
+
+ connect( buttonSelect, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSelect()));
+ connect( buttonDeselect, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDeselect()));
+ connect( buttonInvert, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotInvert()));
+ connect( buttonExpand, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotExpand()));
+ connect( buttonCollapse, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCollapse()));
}
RescanPrj::~RescanPrj()
@@ -88,15 +88,15 @@ void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list)
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
// avoid creating these QStrings again and again
- static const QString& dot = KGlobal::staticQString(".");
- static const QString& dotdot = KGlobal::staticQString("..");
+ static const TQString& dot = KGlobal::staticQString(".");
+ static const TQString& dotdot = KGlobal::staticQString("..");
KIO::UDSEntryListConstIterator it = list.begin();
KIO::UDSEntryListConstIterator end = list.end();
KURL itemURL;
URLListEntry urlEntry;
- QString name;
- QPtrList<KFileItem> linkItems;
+ TQString name;
+ TQPtrList<KFileItem> linkItems;
linkItems.setAutoDelete(true);
for ( ; it != end; ++it )
{
@@ -104,7 +104,7 @@ void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list)
name = item.name();
if (item.isDir() && item.isLink())
{
- QString linkDest = item.linkDest();
+ TQString linkDest = item.linkDest();
kdDebug(24000) << "Got link: " << name << " Points to:" << linkDest << endl;
KURL u = item.url();
if (linkDest.startsWith("."))
@@ -146,19 +146,19 @@ void RescanPrj::addEntries(KIO::Job *job,const KIO::UDSEntryList &list)
}
}
}
- for (QPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
+ for (TQPtrList<KFileItem>::ConstIterator it = linkItems.constBegin(); it != linkItems.constEnd(); ++it)
{
KIO::ListJob *ljob = KIO::listRecursive( (*it)->url(), false );
m_listJobCount++;
- connect( ljob, SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
- this,SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
- connect( ljob, SIGNAL(result(KIO::Job *)),
- this,SLOT (slotListDone(KIO::Job *)));
+ connect( ljob, TQT_SIGNAL(entries(KIO::Job *,const KIO::UDSEntryList &)),
+ this,TQT_SLOT (addEntries(KIO::Job *,const KIO::UDSEntryList &)));
+ connect( ljob, TQT_SIGNAL(result(KIO::Job *)),
+ this,TQT_SLOT (slotListDone(KIO::Job *)));
}
}
-void RescanPrj::resizeEvent ( QResizeEvent *t )
+void RescanPrj::resizeEvent ( TQResizeEvent *t )
{
RescanPrjDir::resizeEvent(t);
// listView->setColumnWidth(0,listView->width()-listView->columnWidth(1)-20);
@@ -197,8 +197,8 @@ KURL::List RescanPrj::files()
{
KURL::List r;
- QListViewItem *item;
- QListViewItemIterator it(listView);
+ TQListViewItem *item;
+ TQListViewItemIterator it(listView);
for ( ; it.current(); ++it )
{
item = it.current();
diff --git a/quanta/project/rescanprj.h b/quanta/project/rescanprj.h
index 1eb32d50..e1e61f04 100644
--- a/quanta/project/rescanprj.h
+++ b/quanta/project/rescanprj.h
@@ -18,7 +18,7 @@
#ifndef RESCANPRJ_H
#define RESCANPRJ_H
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kio/job.h>
@@ -35,8 +35,8 @@ struct URLListEntry{
class RescanPrj : public RescanPrjDir {
Q_OBJECT
public:
- RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const QRegExp &p_excludeRx,
- QWidget *parent=0, const char *name=0, bool modal = true);
+ RescanPrj(const ProjectList &p_prjFileList, const KURL& p_baseURL, const TQRegExp &p_excludeRx,
+ TQWidget *parent=0, const char *name=0, bool modal = true);
~RescanPrj();
public slots:
@@ -46,7 +46,7 @@ public slots:
void slotExpand();
void slotCollapse();
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
KURL::List files();
@@ -55,8 +55,8 @@ public slots:
private:
KURL baseURL;
ProjectList prjFileList;
- QRegExp excludeRx;
- QValueList<URLListEntry> urlList;
+ TQRegExp excludeRx;
+ TQValueList<URLListEntry> urlList;
int m_listJobCount;
protected slots: // Protected slots
diff --git a/quanta/project/teammembersdlg.cpp b/quanta/project/teammembersdlg.cpp
index bd159186..ea3e415c 100644
--- a/quanta/project/teammembersdlg.cpp
+++ b/quanta/project/teammembersdlg.cpp
@@ -14,7 +14,7 @@
* *
***************************************************************************/
//qt includes
-#include <qlabel.h>
+#include <tqlabel.h>
//kde includes
#include <kcombobox.h>
@@ -37,12 +37,12 @@
#define SUBPROJECT_COL 5
-extern QString simpleMemberStr;
-extern QString taskLeaderStr;
-extern QString teamLeaderStr;
-extern QString subprojectLeaderStr;
+extern TQString simpleMemberStr;
+extern TQString taskLeaderStr;
+extern TQString teamLeaderStr;
+extern TQString subprojectLeaderStr;
-TeamMembersDlg::TeamMembersDlg(QWidget *parent, const char *name)
+TeamMembersDlg::TeamMembersDlg(TQWidget *parent, const char *name)
: TeamMembersDlgS(parent, name)
{
m_yourself = "";
@@ -63,12 +63,12 @@ void TeamMembersDlg::slotAddMember()
result = addDlg.exec();
if (result)
{
- QString name = memberDlg.nameCombo->currentText();
- QString role = memberDlg.roleCombo->currentText();
- QString task = memberDlg.taskEdit->text();
- QString subProject = memberDlg.subprojectCombo->currentText();
- QString nickName = memberDlg.nicknameEdit->text();
- QString email = memberDlg.emailEdit->text();
+ TQString name = memberDlg.nameCombo->currentText();
+ TQString role = memberDlg.roleCombo->currentText();
+ TQString task = memberDlg.taskEdit->text();
+ TQString subProject = memberDlg.subprojectCombo->currentText();
+ TQString nickName = memberDlg.nicknameEdit->text();
+ TQString email = memberDlg.emailEdit->text();
if (name.isEmpty())
{
KMessageBox::error(this, i18n("The member name cannot be empty."));
@@ -84,7 +84,7 @@ void TeamMembersDlg::slotAddMember()
addDlg.show();
} else
{
- QListViewItem *item = new QListViewItem(membersListView, name, nickName, email, role, task);
+ TQListViewItem *item = new TQListViewItem(membersListView, name, nickName, email, role, task);
if (memberDlg.subprojectCombo->isEnabled())
item->setText(SUBPROJECT_COL, subProject);
result = false;
@@ -95,14 +95,14 @@ void TeamMembersDlg::slotAddMember()
void TeamMembersDlg::slotEditMember()
{
- QListViewItem *item =membersListView->currentItem();
+ TQListViewItem *item =membersListView->currentItem();
if (!item) return;
KDialogBase editDlg(this, "edit_member", true, i18n("Edit Member"), KDialogBase::Ok | KDialogBase::Cancel);
MemberEditDlg memberDlg(&editDlg);
memberDlg.selectMember(item->text(NAME_COL));
memberDlg.nicknameEdit->setText(item->text(NICKNAME_COL));
memberDlg.emailEdit->setText(item->text(EMAIL_COL));
- QString role = item->text(ROLE_COL);
+ TQString role = item->text(ROLE_COL);
for (int i = 0; i < memberDlg.roleCombo->count(); i++)
{
if (memberDlg.roleCombo->text(i) == role)
@@ -115,8 +115,8 @@ void TeamMembersDlg::slotEditMember()
memberDlg.taskEdit->setText(item->text(TASK_COL));
int idx = 0;
int subprojectIdx = 0;
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
- for (QValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ for (TQValueList<SubProject>::ConstIterator it = subprojects->constBegin(); it != subprojects->constEnd(); ++it)
{
if (item->text(SUBPROJECT_COL) == (*it).name)
{
@@ -133,12 +133,12 @@ void TeamMembersDlg::slotEditMember()
result = editDlg.exec();
if (result)
{
- QString name = memberDlg.nameCombo->currentText();
- QString nickName = memberDlg.nicknameEdit->text();
- QString email = memberDlg.emailEdit->text();
- QString role = memberDlg.roleCombo->currentText();
- QString task = memberDlg.taskEdit->text();
- QString subProject = memberDlg.subprojectCombo->currentText();
+ TQString name = memberDlg.nameCombo->currentText();
+ TQString nickName = memberDlg.nicknameEdit->text();
+ TQString email = memberDlg.emailEdit->text();
+ TQString role = memberDlg.roleCombo->currentText();
+ TQString task = memberDlg.taskEdit->text();
+ TQString subProject = memberDlg.subprojectCombo->currentText();
if (name.isEmpty())
{
KMessageBox::error(this, i18n("The member name cannot be empty."));
@@ -169,11 +169,11 @@ void TeamMembersDlg::slotEditMember()
void TeamMembersDlg::slotDeleteMember()
{
- QListViewItem *item =membersListView->currentItem();
+ TQListViewItem *item =membersListView->currentItem();
if (!item) return;
bool deleteYourself = (item->text(NICKNAME_COL) == m_yourself);
- QListViewItemIterator it(membersListView);
+ TQListViewItemIterator it(membersListView);
while ( it.current() )
{
if (item != it.current() && it.current()->text(NICKNAME_COL) == m_yourself)
@@ -198,11 +198,11 @@ void TeamMembersDlg::slotDeleteMember()
}
}
-bool TeamMembersDlg::checkDuplicates(QListViewItem *item, const QString &name, const QString &nickName, const QString &email, const QString &role, const QString &task, const QString &subProject)
+bool TeamMembersDlg::checkDuplicates(TQListViewItem *item, const TQString &name, const TQString &nickName, const TQString &email, const TQString &role, const TQString &task, const TQString &subProject)
{
- QString s;
- QString nick;
- QListViewItemIterator it(membersListView);
+ TQString s;
+ TQString nick;
+ TQListViewItemIterator it(membersListView);
while ( it.current() )
{
s = it.current()->text(ROLE_COL);
@@ -213,7 +213,7 @@ bool TeamMembersDlg::checkDuplicates(QListViewItem *item, const QString &name, c
(role == i18n(subprojectLeaderStr.utf8()) && it.current()->text(SUBPROJECT_COL) == subProject)
) )
{
- if (KMessageBox::warningYesNo(this, i18n("<qt>The <b>%1</b> role is already assigned to <b>%2</b>. Do you want to reassign it to the current member?</qt>").arg(role).arg(it.current()->text(NAME_COL)), QString::null, i18n("Reassign"), i18n("Do Not Reassign")) == KMessageBox::Yes)
+ if (KMessageBox::warningYesNo(this, i18n("<qt>The <b>%1</b> role is already assigned to <b>%2</b>. Do you want to reassign it to the current member?</qt>").arg(role).arg(it.current()->text(NAME_COL)), TQString::null, i18n("Reassign"), i18n("Do Not Reassign")) == KMessageBox::Yes)
{
it.current()->setText(ROLE_COL, i18n(simpleMemberStr.utf8()));
return true;
@@ -233,13 +233,13 @@ bool TeamMembersDlg::checkDuplicates(QListViewItem *item, const QString &name, c
void TeamMembersDlg::slotSetToYourself()
{
- QListViewItem *item =membersListView->currentItem();
+ TQListViewItem *item =membersListView->currentItem();
if (!item) return;
yourselfLabel->setText(item->text(NAME_COL) + " <" + item->text(EMAIL_COL) + ">");
m_yourself = item->text(NICKNAME_COL);
}
-void TeamMembersDlg::setYourself(const QString &name)
+void TeamMembersDlg::setYourself(const TQString &name)
{
m_yourself = name;
if (name.isEmpty())
@@ -247,7 +247,7 @@ void TeamMembersDlg::setYourself(const QString &name)
yourselfLabel->setText(i18n("Please select your identity from the member list."));
return;
}
- QListViewItemIterator it(membersListView);
+ TQListViewItemIterator it(membersListView);
while ( it.current() )
{
if (it.current()->text(NICKNAME_COL).lower() == name.lower())
diff --git a/quanta/project/teammembersdlg.h b/quanta/project/teammembersdlg.h
index c3281e23..045c0a7c 100644
--- a/quanta/project/teammembersdlg.h
+++ b/quanta/project/teammembersdlg.h
@@ -26,11 +26,11 @@ class TeamMembersDlg : public TeamMembersDlgS
{
Q_OBJECT
public:
- TeamMembersDlg(QWidget *parent = 0, const char *name = 0);
+ TeamMembersDlg(TQWidget *parent = 0, const char *name = 0);
~TeamMembersDlg();
- void setYourself(const QString &name);
- QString yourself() {return m_yourself;}
+ void setYourself(const TQString &name);
+ TQString yourself() {return m_yourself;}
public slots:
void slotAddMember();
@@ -44,9 +44,9 @@ private:
of duplicate entries, it shows a dialog and if the user answer yes, the old
teamleader is set to Simple Member and the new member is set to teamleader
and the method returns true, otherwise it returns false. */
- bool checkDuplicates(QListViewItem *item, const QString &name, const QString &nickName, const QString &email, const QString &role, const QString &task, const QString &subProject);
+ bool checkDuplicates(TQListViewItem *item, const TQString &name, const TQString &nickName, const TQString &email, const TQString &role, const TQString &task, const TQString &subProject);
- QString m_yourself;
+ TQString m_yourself;
};
#endif
diff --git a/quanta/project/uploadprofiles.cpp b/quanta/project/uploadprofiles.cpp
index d32596ed..669971ce 100644
--- a/quanta/project/uploadprofiles.cpp
+++ b/quanta/project/uploadprofiles.cpp
@@ -15,7 +15,7 @@
***************************************************************************/
// qt includes
-#include <qobject.h>
+#include <tqobject.h>
// KDE includes
#include <kiconloader.h>
@@ -34,14 +34,14 @@ UploadProfiles::UploadProfiles() : UploadProfileMap()
}
-void UploadProfiles::readFromXML(const QDomDocument &dom)
+void UploadProfiles::readFromXML(const TQDomDocument &dom)
{
clear(); // empty the list
m_profilesNode = dom.firstChild().firstChild().namedItem("uploadprofiles");
if (m_profilesNode.isNull())
return;
- QDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
+ TQDomNodeList profileList = m_profilesNode.toElement().elementsByTagName("profile");
UploadProfile newProfile;
for (uint i = 0; i < profileList.count(); i++)
{
@@ -53,13 +53,13 @@ void UploadProfiles::readFromXML(const QDomDocument &dom)
}
-bool UploadProfiles::removeFromMapAndXML(const QString &name)
+bool UploadProfiles::removeFromMapAndXML(const TQString &name)
{
UploadProfiles::Iterator it = find(name);
if ( it == end() )
return false;
// ok now remove
- QDomElement el = (*it).domElement;
+ TQDomElement el = (*it).domElement;
el.parentNode().removeChild(el);
erase(name);
return true;
@@ -79,9 +79,9 @@ void UploadProfiles::clear()
UploadProfileMap::clear();
}
-QWidget * UploadProfiles::createTreeview(const UploadProfile &profile)
+TQWidget * UploadProfiles::createTreeview(const UploadProfile &profile)
{
- QWidget *widget = 0L;
+ TQWidget *widget = 0L;
KURL kurl = url(profile.domElement);
if (kurl.isValid() && ! kurl.isEmpty())
{
@@ -94,26 +94,26 @@ QWidget * UploadProfiles::createTreeview(const UploadProfile &profile)
}
-KURL UploadProfiles::url(const QDomElement &e)
+KURL UploadProfiles::url(const TQDomElement &e)
{
- QString protocol = e.attribute("remote_protocol","ftp") + "://";
- QString s = protocol;
- QString host = e.attribute("remote_host","");
+ TQString protocol = e.attribute("remote_protocol","ftp") + "://";
+ TQString s = protocol;
+ TQString host = e.attribute("remote_host","");
s += host;
- QString port = e.attribute("remote_port","");
+ TQString port = e.attribute("remote_port","");
if (! port.isEmpty()) {
s += ":" + port;
}
s += e.attribute("remote_path","");
KURL url = KURL::fromPathOrURL(s);
- QString user = e.attribute("user","");
+ TQString user = e.attribute("user","");
if (!user.isEmpty()) {
url.setUser(user);
}
// check if we know the password
if ( !user.isEmpty() && Project::ref()->keepPasswd )
{
- QString password = Project::ref()->password(protocol + user + "@" + host);
+ TQString password = Project::ref()->password(protocol + user + "@" + host);
url.setPass(password);
}
return url;
diff --git a/quanta/project/uploadprofiles.h b/quanta/project/uploadprofiles.h
index 20d77b80..b04c376d 100644
--- a/quanta/project/uploadprofiles.h
+++ b/quanta/project/uploadprofiles.h
@@ -14,9 +14,9 @@
#define UPLOADPROFILES_H
// QT includes
-#include <qmap.h>
-#include <qdom.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqdom.h>
+#include <tqguardedptr.h>
// KDE includes
#include <kurl.h>
@@ -32,13 +32,13 @@ class QObject;
struct UploadProfile
{
- QString name; ///< name of profile
- QDomElement domElement; ///< domtree element of this profile
- QGuardedPtr<QWidget> treeview; ///< treeview for this url
+ TQString name; ///< name of profile
+ TQDomElement domElement; ///< domtree element of this profile
+ TQGuardedPtr<TQWidget> treeview; ///< treeview for this url
};
/** a map for the upload profiles */
-typedef QMap<QString, UploadProfile> UploadProfileMap;
+typedef TQMap<TQString, UploadProfile> UploadProfileMap;
class UploadProfiles : public UploadProfileMap
@@ -61,7 +61,7 @@ public:
@param the dom document to parse
*/
- void readFromXML(const QDomDocument &dom);
+ void readFromXML(const TQDomDocument &dom);
/**
removes a profile from the map and the dom tree
@@ -70,7 +70,7 @@ public:
@return true if profile was found and removed
*/
- bool removeFromMapAndXML(const QString &name);
+ bool removeFromMapAndXML(const TQString &name);
/**
clears the map and removes all treeviews
@@ -91,18 +91,18 @@ private:
@return the pointer to the treeview
*/
- QWidget * createTreeview(const UploadProfile &profile);
+ TQWidget * createTreeview(const UploadProfile &profile);
/**
creates a KURL from a QDomElement
- @param e a QDomElement where the path is saved
+ @param e a TQDomElement where the path is saved
@return KURL of the location
*/
- KURL url(const QDomElement &e);
+ KURL url(const TQDomElement &e);
- QDomNode m_profilesNode; ///< under this node the profiles are saved in the dom tree
+ TQDomNode m_profilesNode; ///< under this node the profiles are saved in the dom tree
};
#endif
diff --git a/quanta/src/dcopquanta.cpp b/quanta/src/dcopquanta.cpp
index 55ff068e..149240d6 100644
--- a/quanta/src/dcopquanta.cpp
+++ b/quanta/src/dcopquanta.cpp
@@ -17,7 +17,7 @@
//kde includes
//qt includes
-#include <qregexp.h>
+#include <tqregexp.h>
//app includes
#include "dcopquanta.h"
@@ -29,21 +29,21 @@ DCOPQuanta::DCOPQuanta() : DCOPObject("QuantaIf")
{
}
-QStringList DCOPQuanta::selectors(const QString& tag)
+TQStringList DCOPQuanta::selectors(const TQString& tag)
{
- const QRegExp rx("\\.|\\#|\\:");
- QStringList selectorList;
+ const TQRegExp rx("\\.|\\#|\\:");
+ TQStringList selectorList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("Selectors|"))
{
- QString selectorName = key.mid(10);
+ TQString selectorName = key.mid(10);
int index = selectorName.find(':');
if (index != -1)
selectorName = selectorName.mid(0, index);
- QString tmpStr;
+ TQString tmpStr;
index = selectorName.find(rx);
if (index != -1)
{
@@ -63,17 +63,17 @@ QStringList DCOPQuanta::selectors(const QString& tag)
return selectorList;
}
-QStringList DCOPQuanta::idSelectors()
+TQStringList DCOPQuanta::idSelectors()
{
- QStringList selectorList;
+ TQStringList selectorList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith("Selectors|"))
{
- QString selectorName = key.mid(10);
- QString tmpStr;
+ TQString selectorName = key.mid(10);
+ TQString tmpStr;
if (selectorName.startsWith("#"))
{
selectorList << selectorName.mid(1);
@@ -83,20 +83,20 @@ QStringList DCOPQuanta::idSelectors()
return selectorList;
}
-QStringList DCOPQuanta::groupElements(const QString& group)
+TQStringList DCOPQuanta::groupElements(const TQString& group)
{
- QStringList elementList;
+ TQStringList elementList;
GroupElementMapList::Iterator it;
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
{
- QString key = it.key();
+ TQString key = it.key();
if (key.startsWith(group + "|"))
{
- QString name = key.mid(10);
+ TQString name = key.mid(10);
int index = name.find(':');
if (index != -1)
name = name.mid(0, index);
- QString tmpStr;
+ TQString tmpStr;
index = name.find("|");
if (index != -1)
{
diff --git a/quanta/src/dcopquanta.h b/quanta/src/dcopquanta.h
index 5c92f06f..b1dd7c4b 100644
--- a/quanta/src/dcopquanta.h
+++ b/quanta/src/dcopquanta.h
@@ -26,9 +26,9 @@ public:
DCOPQuanta();
~DCOPQuanta() {};
- virtual QStringList selectors(const QString& tag);
- virtual QStringList idSelectors();
- virtual QStringList groupElements(const QString &group);
+ virtual TQStringList selectors(const TQString& tag);
+ virtual TQStringList idSelectors();
+ virtual TQStringList groupElements(const TQString &group);
};
#endif
diff --git a/quanta/src/dcopquantaif.h b/quanta/src/dcopquantaif.h
index f0ec1818..f5ee3a5c 100644
--- a/quanta/src/dcopquantaif.h
+++ b/quanta/src/dcopquantaif.h
@@ -17,7 +17,7 @@
#ifndef DCOPQUANTAIF_H
#define DCOPQUANTAIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPQuantaIf : virtual public DCOPObject
{
@@ -25,9 +25,9 @@ class DCOPQuantaIf : virtual public DCOPObject
k_dcop:
- virtual QStringList selectors(const QString &tag) = 0;
- virtual QStringList idSelectors() = 0;
- virtual QStringList groupElements(const QString &group) = 0;
+ virtual TQStringList selectors(const TQString &tag) = 0;
+ virtual TQStringList idSelectors() = 0;
+ virtual TQStringList groupElements(const TQString &group) = 0;
};
#endif
diff --git a/quanta/src/dcopsettings.cpp b/quanta/src/dcopsettings.cpp
index b47e6c39..504eca84 100644
--- a/quanta/src/dcopsettings.cpp
+++ b/quanta/src/dcopsettings.cpp
@@ -25,16 +25,16 @@ DCOPSettings::DCOPSettings() : DCOPObject("SettingsIf")
{
}
-QString DCOPSettings::encoding()
+TQString DCOPSettings::encoding()
{
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
encoding.replace("iso ", "iso-"); //it's said that "iso-8859-x" is the valid format
encoding.replace("utf", "utf-"); //it's said that "utf-x" is the valid format
encoding.replace("cp ", "windows-");
return encoding;
}
-QString DCOPSettings::dtep()
+TQString DCOPSettings::dtep()
{
if (Project::ref()->hasProject())
{
@@ -44,7 +44,7 @@ QString DCOPSettings::dtep()
return DTDs::ref()->getDTDNickNameFromName(qConfig.defaultDocType);
}
-QString DCOPSettings::quotationChar()
+TQString DCOPSettings::quotationChar()
{
return qConfig.attrValueQuotation;
}
diff --git a/quanta/src/dcopsettings.h b/quanta/src/dcopsettings.h
index 62dc52b0..9509e62c 100644
--- a/quanta/src/dcopsettings.h
+++ b/quanta/src/dcopsettings.h
@@ -27,9 +27,9 @@ public:
DCOPSettings();
~DCOPSettings() {};
- virtual QString encoding();
- virtual QString dtep();
- virtual QString quotationChar();
+ virtual TQString encoding();
+ virtual TQString dtep();
+ virtual TQString quotationChar();
};
#endif
diff --git a/quanta/src/dcopsettingsif.h b/quanta/src/dcopsettingsif.h
index 7a811bc2..048117a4 100644
--- a/quanta/src/dcopsettingsif.h
+++ b/quanta/src/dcopsettingsif.h
@@ -17,7 +17,7 @@
#define DCOPSETTINGSIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPSettingsIf : virtual public DCOPObject
{
@@ -25,9 +25,9 @@ class DCOPSettingsIf : virtual public DCOPObject
k_dcop:
- virtual QString encoding() = 0;
- virtual QString dtep() = 0;
- virtual QString quotationChar() = 0;
+ virtual TQString encoding() = 0;
+ virtual TQString dtep() = 0;
+ virtual TQString quotationChar() = 0;
};
#endif
diff --git a/quanta/src/dcopwindowmanagerif.h b/quanta/src/dcopwindowmanagerif.h
index d0f8a908..9030f9e0 100644
--- a/quanta/src/dcopwindowmanagerif.h
+++ b/quanta/src/dcopwindowmanagerif.h
@@ -17,7 +17,7 @@
#define DCOPWINDOWMANAGERIF_H
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
class DCOPWindowManagerIf : virtual public DCOPObject
{
@@ -26,20 +26,20 @@ class DCOPWindowManagerIf : virtual public DCOPObject
k_dcop:
virtual int currentEditorIfNum() const = 0;
- virtual QString currentURL() const = 0;
- virtual QString projectURL() const = 0;
- virtual QStringList openedURLs() const = 0;
- virtual QStringList tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent) const = 0;
- virtual void newCursorPosition(const QString &file, int lineNumber, int columnNumber) = 0;
- virtual void newDebuggerPosition(const QString &file, int lineNumber) = 0;
- virtual void openFile(const QString &file, int lineNumber, int columnNumber) = 0;
- virtual QString saveCurrentFile() = 0;
- virtual void setDtep(const QString& dtepName, bool convert) = 0;
- virtual QString documentFolderForURL(const QString &url) = 0;
- virtual QString urlWithPreviewPrefix(const QString &url) = 0;
- virtual void addFileToProject(const QString &url) = 0;
- virtual void addFolderToProject(const QString &url) = 0;
- virtual void uploadURL(const QString &url, const QString& profile, bool markOnly) = 0;
+ virtual TQString currentURL() const = 0;
+ virtual TQString projectURL() const = 0;
+ virtual TQStringList openedURLs() const = 0;
+ virtual TQStringList tagAreas(const TQString& tag, bool includeCoordinates, bool skipFoundContent) const = 0;
+ virtual void newCursorPosition(const TQString &file, int lineNumber, int columnNumber) = 0;
+ virtual void newDebuggerPosition(const TQString &file, int lineNumber) = 0;
+ virtual void openFile(const TQString &file, int lineNumber, int columnNumber) = 0;
+ virtual TQString saveCurrentFile() = 0;
+ virtual void setDtep(const TQString& dtepName, bool convert) = 0;
+ virtual TQString documentFolderForURL(const TQString &url) = 0;
+ virtual TQString urlWithPreviewPrefix(const TQString &url) = 0;
+ virtual void addFileToProject(const TQString &url) = 0;
+ virtual void addFolderToProject(const TQString &url) = 0;
+ virtual void uploadURL(const TQString &url, const TQString& profile, bool markOnly) = 0;
};
#endif
diff --git a/quanta/src/document.cpp b/quanta/src/document.cpp
index 0c3c30ab..c3309a42 100644
--- a/quanta/src/document.cpp
+++ b/quanta/src/document.cpp
@@ -20,16 +20,16 @@
#include <stdlib.h>
//QT includes
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qeventloop.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlineedit.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlineedit.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqradiobutton.h>
// KDE includes
#include <kapplication.h>
@@ -93,8 +93,8 @@
extern GroupElementMapList globalGroupMap;
Document::Document(KTextEditor::Document *doc,
- QWidget *parent, const char *name, WFlags f )
- : QWidget(parent, name, f)
+ TQWidget *parent, const char *name, WFlags f )
+ : TQWidget(parent, name, f)
{
m_dirty = false;
busy = false;
@@ -164,7 +164,7 @@ Document::Document(KTextEditor::Document *doc,
m_encoding = encodingIf->encoding();
if (m_encoding.isEmpty())
m_encoding = "utf8"; //final fallback
- m_codec = QTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding);
selectionIf = dynamic_cast<KTextEditor::SelectionInterface *>(m_doc);
selectionIfExt = dynamic_cast<KTextEditor::SelectionInterfaceExt *>(m_doc);
@@ -190,7 +190,7 @@ Document::Document(KTextEditor::Document *doc,
}
tempFile = 0;
- m_tempFileName = QString::null;
+ m_tempFileName = TQString::null;
dtdName = Project::ref()->defaultDTD();
reparseEnabled = true;
repaintEnabled = true;
@@ -198,27 +198,27 @@ Document::Document(KTextEditor::Document *doc,
docUndoRedo = new undoRedo(this);
//path of the backup copy file of the document
- m_backupPathValue = QString::null;
+ m_backupPathValue = TQString::null;
- connect( m_doc, SIGNAL(charactersInteractivelyInserted (int ,int ,const QString&)),
- this, SLOT(slotCharactersInserted(int ,int ,const QString&)) );
+ connect( m_doc, TQT_SIGNAL(charactersInteractivelyInserted (int ,int ,const TQString&)),
+ this, TQT_SLOT(slotCharactersInserted(int ,int ,const TQString&)) );
- connect( m_view, SIGNAL(completionAborted()),
- this, SLOT( slotCompletionAborted()) );
+ connect( m_view, TQT_SIGNAL(completionAborted()),
+ this, TQT_SLOT( slotCompletionAborted()) );
- connect( m_view, SIGNAL(completionDone(KTextEditor::CompletionEntry)),
- this, SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
+ connect( m_view, TQT_SIGNAL(completionDone(KTextEditor::CompletionEntry)),
+ this, TQT_SLOT( slotCompletionDone(KTextEditor::CompletionEntry)) );
- connect( m_view, SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,QString *)),
- this, SLOT( slotFilterCompletion(KTextEditor::CompletionEntry*,QString *)) );
- connect( m_doc, SIGNAL(textChanged()), SLOT(slotTextChanged()));
+ connect( m_view, TQT_SIGNAL(filterInsertString(KTextEditor::CompletionEntry*,TQString *)),
+ this, TQT_SLOT( slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *)) );
+ connect( m_doc, TQT_SIGNAL(textChanged()), TQT_SLOT(slotTextChanged()));
- connect(m_view, SIGNAL(gotFocus(Kate::View*)), SIGNAL(editorGotFocus()));
+ connect(m_view, TQT_SIGNAL(gotFocus(Kate::View*)), TQT_SIGNAL(editorGotFocus()));
- connect(fileWatcher, SIGNAL(dirty(const QString&)), SLOT(slotFileDirty(const QString&)));
+ connect(fileWatcher, TQT_SIGNAL(dirty(const TQString&)), TQT_SLOT(slotFileDirty(const TQString&)));
-// connect(m_doc, SIGNAL(marksChanged()), this, SLOT(slotMarksChanged()));
- connect(m_doc, SIGNAL(markChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)), this, SLOT(slotMarkChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)));
+// connect(m_doc, TQT_SIGNAL(marksChanged()), this, TQT_SLOT(slotMarksChanged()));
+ connect(m_doc, TQT_SIGNAL(markChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)), this, TQT_SLOT(slotMarkChanged(KTextEditor::Mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction)));
}
@@ -232,7 +232,7 @@ Document::~Document()
delete m_doc;
}
-void Document::setUntitledUrl(const QString &url)
+void Document::setUntitledUrl(const TQString &url)
{
untitledUrl = url;
openURL(KURL());
@@ -250,9 +250,9 @@ KURL Document::url()
// kwrite addons
-void Document::insertTag(const QString &s1, const QString &s2)
+void Document::insertTag(const TQString &s1, const TQString &s2)
{
- QString selection;
+ TQString selection;
if (selectionIf && selectionIf->hasSelection())
{
@@ -267,10 +267,10 @@ void Document::insertTag(const QString &s1, const QString &s2)
/** Change the current tag's attributes with those from dict */
-void Document::changeTag(Tag *tag, QDict<QString> *dict )
+void Document::changeTag(Tag *tag, TQDict<TQString> *dict )
{
tag->modifyAttributes(dict);
- QString tagStr = tag->toString();
+ TQString tagStr = tag->toString();
reparseEnabled = false;
int bLine, bCol, eLine, eCol;
@@ -283,7 +283,7 @@ void Document::changeTag(Tag *tag, QDict<QString> *dict )
/**Change the namespace in a tag. Add if it's not present, or remove if the
namespace argument is empty*/
-void Document::changeTagNamespace(Tag *tag, const QString& nameSpace)
+void Document::changeTagNamespace(Tag *tag, const TQString& nameSpace)
{
int bl, bc;
int nl, nc;
@@ -312,9 +312,9 @@ void Document::changeTagNamespace(Tag *tag, const QString& nameSpace)
}
/**Change the attr value of the called attrName to attrValue*/
-void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QString& attrValue)
+void Document::changeTagAttribute(Tag *tag, const TQString& attrName, const TQString& attrValue)
{
- QString value;
+ TQString value;
int line, col;
int index = tag->attributeIndex(attrName);
if (index != -1)
@@ -329,7 +329,7 @@ void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QStri
if (line == aLine && col == aCol)
{
col += tag->attribute(index).length();
- value = QString("=") + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
+ value = TQString("=") + qConfig.attrValueQuotation + attrValue + qConfig.attrValueQuotation;
} else
{
endCol = col + value.length();
@@ -339,7 +339,7 @@ void Document::changeTagAttribute(Tag *tag, const QString& attrName, const QStri
endCol++;
}
reparseEnabled = false;
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
while (col > 1 && textLine[col-1].isSpace())
col--;
@@ -385,7 +385,7 @@ void Document::selectText(int x1, int y1, int x2, int y2 )
}
-void Document::replaceSelected(const QString &s)
+void Document::replaceSelected(const TQString &s)
{
if (selectionIf)
{
@@ -401,7 +401,7 @@ void Document::replaceSelected(const QString &s)
void Document::insertFile(const KURL& url)
{
- QString fileName;
+ TQString fileName;
if (url.isLocalFile())
{
fileName = url.path();
@@ -413,11 +413,11 @@ void Document::insertFile(const KURL& url)
return;
}
}
- QFile file(fileName);
+ TQFile file(fileName);
if (file.open(IO_ReadOnly))
{
- QTextStream stream( &file );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream( &file );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
insertText(stream.read());
file.close();
} else
@@ -425,9 +425,9 @@ void Document::insertFile(const KURL& url)
}
/** Inserts text at the current cursor position */
-void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse)
+void Document::insertText(const TQString &a_text, bool adjustCursor, bool reparse)
{
- QString text = a_text;
+ TQString text = a_text;
if(text.isEmpty())
return;
@@ -440,7 +440,7 @@ void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse
{
int bLine, bCol;
n->tag->beginPos(bLine, bCol);
- QString s = this->text(bLine, bCol, line, col);
+ TQString s = this->text(bLine, bCol, line, col);
bool insideQuotes = false;
for (int i = 0 ; i < (int)s.length() - 1; i++)
{
@@ -500,7 +500,7 @@ void Document::insertText(const QString &a_text, bool adjustCursor, bool reparse
}
else if(!noWordWrap && !(isspace(ascii[i]))) // new word, see if it wraps
{
- // TOO SLOW int wordLength = (text.mid(i).section(QRegExp("[ \t\r\n]"), 0, 0).length());
+ // TOO SLOW int wordLength = (text.mid(i).section(TQRegExp("[ \t\r\n]"), 0, 0).length());
wordLength = -1;
for(j = i+1;ascii[j];++j) // get word size, ascii is MUCH faster
{
@@ -559,14 +559,14 @@ bool Document::insertChildTags(QTag *tag, QTag *lastTag)
{
return false;
}
- QMap<QString, bool>::Iterator it;
+ TQMap<TQString, bool>::Iterator it;
for (it = tag->childTags.begin(); it != tag->childTags.end(); ++it)
{
if (it.data())
{
childInserted = true;
QTag *childTag = QuantaCommon::tagFromDTD(tag->parentDTD, it.key());
- QString tagStr =QuantaCommon::tagCase(it.key());
+ TQString tagStr =QuantaCommon::tagCase(it.key());
if ( tag->parentDTD->singleTagStyle == "xml" &&
( childTag->isSingle() ||
(childTag->isOptional() && !qConfig.closeOptionalTags)) )
@@ -576,7 +576,7 @@ bool Document::insertChildTags(QTag *tag, QTag *lastTag)
{
insertText("<" +tagStr + ">", true, false);
}
- QString closingStr;
+ TQString closingStr;
if (insertChildTags(childTag, tag))
{
closingStr = "";
@@ -624,16 +624,16 @@ void Document::createTempFile()
closeTempFile();
tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
- QString encoding = quantaApp->defaultEncoding();
+ m_tempFileName = TQFileInfo(*(tempFile->file())).filePath();
+ TQString encoding = quantaApp->defaultEncoding();
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- tempFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ tempFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
* (tempFile->textStream()) << editIf->text();
- m_tempFileName = QFileInfo(*(tempFile->file())).filePath();
+ m_tempFileName = TQFileInfo(*(tempFile->file())).filePath();
tempFile->close();
// kdDebug(24000) << "Creating tempfile " << m_tempFileName << " for " << url() << endl;
}
@@ -645,13 +645,13 @@ void Document::closeTempFile()
delete tempFile;
tempFile = 0L;
}
- if (QFileInfo(m_tempFileName).exists())
- QFile::remove(m_tempFileName);
+ if (TQFileInfo(m_tempFileName).exists())
+ TQFile::remove(m_tempFileName);
- m_tempFileName = QString::null;
+ m_tempFileName = TQString::null;
}
-QString Document::tempFileName()
+TQString Document::tempFileName()
{
return m_tempFileName;
}
@@ -661,10 +661,10 @@ QString Document::tempFileName()
It will work even if the tag has not been completed yet. An
empty string will be returned if no tag is found.
*/
-QString Document::getTagNameAt(int line, int col )
+TQString Document::getTagNameAt(int line, int col )
{
- QString name = "";
- QString textLine = editIf->textLine(line);
+ TQString name = "";
+ TQString textLine = editIf->textLine(line);
textLine = textLine.left(col);
while (line >= 0)
{
@@ -703,7 +703,7 @@ QString Document::getTagNameAt(int line, int col )
}
/** Show the code completions passed in as an argument */
-void Document::showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions ) {
+void Document::showCodeCompletions( TQValueList<KTextEditor::CompletionEntry> *completions ) {
bool reparse = reparseEnabled;
reparseEnabled = false;
codeCompletionIf->showCompletionBox( *completions, false );
@@ -725,7 +725,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
/* if (completion.type == "charCompletion")
{
m_lastCompletionList = getCharacterCompletions(completion.userdata);
- QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedShowCodeCompletion()));
} else*/
if (completion.type == "attribute")
{
@@ -736,7 +736,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
if (tag)
{
m_lastCompletionList = getAttributeValueCompletions(tag->name(), completion.text);
- QTimer::singleShot(0, this, SLOT(slotDelayedShowCodeCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedShowCodeCompletion()));
}
}
} else
@@ -755,7 +755,7 @@ void Document::slotCompletionDone( KTextEditor::CompletionEntry completion )
{
m_lastLine = line;
m_lastCol = col - 1;
- QTimer::singleShot(0, this, SLOT(slotDelayedScriptAutoCompletion()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedScriptAutoCompletion()));
}
}
}
@@ -774,12 +774,12 @@ void Document::slotDelayedShowCodeCompletion()
can filter this completion to allow more intelligent
code compeltions
*/
-void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,QString *string )
+void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,TQString *string )
{
kdDebug(24000) << *string << endl;
kdDebug(24000) << completion->userdata << endl;
int pos = completion->userdata.find("|");
- QString s = completion->userdata.left(pos);
+ TQString s = completion->userdata.left(pos);
completion->userdata.remove(0,pos+1);
string->remove(0, s.length());
kdDebug(24000) << *string << endl;
@@ -789,7 +789,7 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
*string = completion->userdata;
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString s2 = editIf->textLine(line).left(col);
+ TQString s2 = editIf->textLine(line).left(col);
kdDebug(24000) << s2 << endl;
int pos = s2.findRev('&');
if (pos != -1)
@@ -804,8 +804,8 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
{
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString textLine = editIf->textLine(line);
- QChar tagSeparator = completionDTD->tagSeparator;
+ TQString textLine = editIf->textLine(line);
+ TQChar tagSeparator = completionDTD->tagSeparator;
if (tagSeparator == '\'' || tagSeparator =='"')
tagSeparator = qConfig.attrValueQuotation;
if (textLine[col] != tagSeparator)
@@ -813,13 +813,13 @@ void Document::slotFilterCompletion( KTextEditor::CompletionEntry *completion ,Q
} else
if ( completion->type == "attribute" )
{
- string->append("="+QString(qConfig.attrValueQuotation)+QString(qConfig.attrValueQuotation));
+ string->append("="+TQString(qConfig.attrValueQuotation)+TQString(qConfig.attrValueQuotation));
} else
if (completion->type == "doctypeList")
{
s = *string;
string->remove(0, string->length());
- QString s2 = QString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\"");
+ TQString s2 = TQString("public \""+DTDs::ref()->getDTDNameFromNickName(s)+"\"");
const DTDStruct *dtd = DTDs::ref()->find(DTDs::ref()->getDTDNameFromNickName(s));
if (dtd && !dtd->url.isEmpty())
{
@@ -842,24 +842,24 @@ void Document::slotReplaceChar()
/** Called when a user types in a character. From this we can show possibile
completions based on what they are trying to input.
*/
-void Document::slotCharactersInserted(int line, int column, const QString& string)
+void Document::slotCharactersInserted(int line, int column, const TQString& string)
{
if (qConfig.replaceNotInEncoding)
{
if (encodingIf)
{
- QString encoding = encodingIf->encoding();
+ TQString encoding = encodingIf->encoding();
if (encoding != m_encoding)
{
m_encoding = encoding;
- m_codec = QTextCodec::codecForName(encoding);
+ m_codec = TQTextCodec::codecForName(encoding);
}
if (!m_codec->canEncode(string[0]))
{
m_replaceLine = line;
m_replaceCol = column;
m_replaceStr = QuantaCommon::encodedChar(string[0].unicode());
- QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar()));
return;
}
}
@@ -872,7 +872,7 @@ void Document::slotCharactersInserted(int line, int column, const QString& strin
m_replaceLine = line;
m_replaceCol = column;
m_replaceStr = QuantaCommon::encodedChar(c);
- QTimer::singleShot(0, this, SLOT(slotReplaceChar()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReplaceChar()));
return;
}
}
@@ -934,17 +934,17 @@ void Document::slotCharactersInserted(int line, int column, const QString& strin
/** Called whenever a user inputs text in an XML type document.
Returns true if the code completionw as handled.
*/
-bool Document::xmlAutoCompletion(int line, int column, const QString & string)
+bool Document::xmlAutoCompletion(int line, int column, const TQString & string)
{
QTag *tag;
- QString tagName;
+ TQString tagName;
bool handled = false;
tagName = getTagNameAt(line, column);
tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
if (!tag && !tagName.isEmpty())
tag = userTagList.find(tagName.lower());
- QString s = editIf->textLine(line).left(column + 1);
+ TQString s = editIf->textLine(line).left(column + 1);
bool namespacecompletion = false;
if (!tagName.isEmpty() && string ==":" && s.endsWith("<" + tagName + ":"))
namespacecompletion = true;
@@ -983,7 +983,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
node = node->parent;
if (node->tag->type == Tag::XmlTag && (!node->next || !QuantaCommon::closesTag(node->tag, node->next->tag)))
{
- QString name = node->tag->name;
+ TQString name = node->tag->name;
name = name.left(name.find(" | "));
if (!node->tag->nameSpace.isEmpty())
name.prepend(node->tag->nameSpace + ":");
@@ -1041,7 +1041,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
else if ( string == " " )
{
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
if (!QuantaCommon::insideCommentsOrQuotes(column, textLine, completionDTD))
{
showCodeCompletions(getAttributeCompletions(tagName, ""));
@@ -1051,8 +1051,8 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
else if ( string[0] == qConfig.attrValueQuotation )
{
//we need to find the attribute name
- QString textLine = editIf->textLine(line).left(column-1);
- QString attribute = textLine.mid(textLine.findRev(' ')+1);
+ TQString textLine = editIf->textLine(line).left(column-1);
+ TQString attribute = textLine.mid(textLine.findRev(' ')+1);
if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
{
completionDTD = DTDs::ref()->find("text/css");
@@ -1066,7 +1066,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
if (!handled)
{
//check if we are inside a style attribute, and use css autocompletion if we are
- QString textLine = editIf->textLine(line);
+ TQString textLine = editIf->textLine(line);
textLine = textLine.left(column);
int pos = textLine.findRev('"');
if (pos != -1)
@@ -1078,7 +1078,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
pos = textLine.find('=');
if (pos != -1)
{
- QString attribute = textLine.left(pos);
+ TQString attribute = textLine.left(pos);
if (attribute == "style" && completionDTD->insideDTDs.contains("css"))
{
completionDTD = DTDs::ref()->find("text/css");
@@ -1088,7 +1088,7 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
}
}
- QString s = editIf->textLine(line).left(column + 1);
+ TQString s = editIf->textLine(line).left(column + 1);
pos = s.findRev('&');
if (pos != -1)
{
@@ -1102,20 +1102,20 @@ bool Document::xmlAutoCompletion(int line, int column, const QString & string)
}
/** Return a list of possible variable name completions */
-QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *node, const StructTreeGroup& group, int line, int col)
+TQValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *node, const StructTreeGroup& group, int line, int col)
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "variable";
- QString textLine = editIf->textLine(line).left(col);
- QString word = findWordRev(textLine);
+ TQString textLine = editIf->textLine(line).left(col);
+ TQString word = findWordRev(textLine);
if (!group.removeFromAutoCompleteWordRx.pattern().isEmpty())
word.remove(group.removeFromAutoCompleteWordRx);
completion.userdata = word + "|";
GroupElementMapList::Iterator it;
- QString str = group.name;
+ TQString str = group.name;
str.append("|");
str.append(word);
for ( it = globalGroupMap.begin(); it != globalGroupMap.end(); ++it )
@@ -1151,7 +1151,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *no
IncludedGroupElementsMap::Iterator it2;
for ( it2 = elements.begin(); it2 != elements.end(); ++it2 )
{
- QStringList list = it2.data()[group.name].keys();
+ TQStringList list = it2.data()[group.name].keys();
list.sort();
for (uint i = 0; i < list.count(); i++)
{
@@ -1167,12 +1167,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getGroupCompletions(Node *no
return completions;
}
-bool Document::isDerivatedFrom(const QString& className, const QString &baseClass)
+bool Document::isDerivatedFrom(const TQString& className, const TQString &baseClass)
{
if (className.isEmpty() || !completionDTD->classInheritance.contains(className))
return false;
- QString parentClass = completionDTD->classInheritance[className];
+ TQString parentClass = completionDTD->classInheritance[className];
int result = 0;
do {
if (parentClass == baseClass)
@@ -1191,9 +1191,9 @@ bool Document::isDerivatedFrom(const QString& className, const QString &baseClas
/** Return a list of possible tag name completions */
-QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, int col)
+TQValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line, int col)
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
switch (completionDTD->family)
{
@@ -1211,10 +1211,10 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
QTag *parentQTag= 0L;
if (node && node->parent)
parentQTag = QuantaCommon::tagFromDTD(node->parent);
- QString textLine = editIf->textLine(line).left(col);
- QString word = findWordRev(textLine, completionDTD).upper();
- QString classStr = "";
- QString objStr;
+ TQString textLine = editIf->textLine(line).left(col);
+ TQString word = findWordRev(textLine, completionDTD).upper();
+ TQString classStr = "";
+ TQString objStr;
if (completionDTD->classGroupIndex != -1 && completionDTD->objectGroupIndex != -1)
{
textLine = textLine.left(textLine.length() - word.length());
@@ -1222,14 +1222,14 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
if (pos != -1)
{
textLine = textLine.left(pos);
- QRegExp *r = &(completionDTD->structTreeGroups[completionDTD->classGroupIndex].usageRx);
+ TQRegExp *r = &(completionDTD->structTreeGroups[completionDTD->classGroupIndex].usageRx);
pos = r->searchRev(textLine);
if (pos != -1)
{
objStr = r->cap(1);
if (objStr == "this")
{
- QString parentGroupStr = "";
+ TQString parentGroupStr = "";
bool classFound = false;
parser->synchParseInDetail();
Node *n = parser->nodeAt(line, col);
@@ -1285,12 +1285,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
return completions;
}
completion.userdata = word + "|";
- QStringList tagNameList;
- QMap<QString, QString> comments;
- //A QMap to hold the completion type (function/string/class/etc)
- QMap<QString, QString> type;
- QString tagName;
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQStringList tagNameList;
+ TQMap<TQString, TQString> comments;
+ //A TQMap to hold the completion type (function/string/class/etc)
+ TQMap<TQString, TQString> type;
+ TQString tagName;
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
int i = 0;
for( ; it.current(); ++it )
{
@@ -1303,7 +1303,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
{
if (!parentQTag || (parentQTag && parentQTag->isChild(tagName)))
{
- tagName = tag->name() + QString("%1").arg(i, 10);
+ tagName = tag->name() + TQString("%1").arg(i, 10);
tagNameList += tagName;
comments.insert(tagName, tag->comment);
i++;
@@ -1312,14 +1312,14 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
}
}
- QDictIterator<QTag> it2(userTagList);
+ TQDictIterator<QTag> it2(userTagList);
for( ; it2.current(); ++it2 )
{
QTag *tag = it2.current();
if ((tag->className == classStr ||
isDerivatedFrom(classStr, tag->className)) && tag->name().upper().startsWith(word))
{
- tagName = tag->name() + QString("%1").arg(i, 10);
+ tagName = tag->name() + TQString("%1").arg(i, 10);
tagNameList += tagName;
comments.insert(tagName, tag->comment);
@@ -1350,8 +1350,8 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
// We only want to do this if we are completing Script DTDs
// We are going to use a couple of iterators to sort the list by Type
// Type Sorting is as follows: 0:Other, 1:Variables, 2: Functions (script)
- QValueList<KTextEditor::CompletionEntry>::Iterator otherIt=completions->begin();
- QValueList<KTextEditor::CompletionEntry>::Iterator variableIt=completions->begin();
+ TQValueList<KTextEditor::CompletionEntry>::Iterator otherIt=completions->begin();
+ TQValueList<KTextEditor::CompletionEntry>::Iterator variableIt=completions->begin();
for (uint i = 0; i < tagNameList.count(); i++)
{
if (completionDTD->family == Xml)
@@ -1400,16 +1400,16 @@ QValueList<KTextEditor::CompletionEntry>* Document::getTagCompletions(int line,
}
/** Return a list of valid attributes for the given tag */
-QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(const QString& tagName, const QString& a_startsWith )
+TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(const TQString& tagName, const TQString& a_startsWith )
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
QTag *tag = QuantaCommon::tagFromDTD(completionDTD, tagName);
if (!tag)
{
tag = userTagList.find(tagName.lower());
}
- QString startsWith = a_startsWith.upper();
+ TQString startsWith = a_startsWith.upper();
if (tag)
{
switch (completionDTD->family)
@@ -1421,11 +1421,11 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
//list specified attributes for this tag
AttributeList *list = tag->attributes();
- QValueList<KTextEditor::CompletionEntry> tempCompletions;
- QStringList nameList;
+ TQValueList<KTextEditor::CompletionEntry> tempCompletions;
+ TQStringList nameList;
for (uint i = 0; i < list->count(); i++)
{
- QString item = list->at(i)->name;
+ TQString item = list->at(i)->name;
if (item.upper().startsWith(startsWith))
{
completion.text = QuantaCommon::attrCase(item);
@@ -1436,12 +1436,12 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
}
//list common attributes for this tag
- for (QStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = tag->commonGroups.begin(); it != tag->commonGroups.end(); ++it)
{
AttributeList *attrs = tag->parentDTD->commonAttrs->find(*it);
for (uint j = 0; j < attrs->count(); j++)
{
- QString name = attrs->at(j)->name;
+ TQString name = attrs->at(j)->name;
if (name.upper().startsWith(startsWith))
{
completion.text = QuantaCommon::attrCase(name);
@@ -1454,8 +1454,8 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
if (tag->name().contains("!doctype",false)) //special case, list all the known document types
{
- QStringList nickNames = DTDs::ref()->nickNameList(true);
- for ( QStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it )
+ TQStringList nickNames = DTDs::ref()->nickNameList(true);
+ for ( TQStringList::Iterator it = nickNames.begin(); it != nickNames.end(); ++it )
{
completion.type = "doctypeList";
completion.text = *it;
@@ -1463,11 +1463,11 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
nameList.append(completion.text);
}
}
- //below isn't fast, but enough here. May be better with QMap<QString, KTextEditor::CompletionEntry>
+ //below isn't fast, but enough here. May be better with TQMap<TQString, KTextEditor::CompletionEntry>
nameList.sort();
- for ( QStringList::Iterator it = nameList.begin(); it != nameList.end(); ++it )
+ for ( TQStringList::Iterator it = nameList.begin(); it != nameList.end(); ++it )
{
- for (QValueList<KTextEditor::CompletionEntry>::Iterator compIt = tempCompletions.begin(); compIt != tempCompletions.end(); ++compIt)
+ for (TQValueList<KTextEditor::CompletionEntry>::Iterator compIt = tempCompletions.begin(); compIt != tempCompletions.end(); ++compIt)
{
if ( (*compIt).text == *it)
{
@@ -1485,7 +1485,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
AttributeList *list = tag->attributes();
for (uint i = 0; i < list->count(); i++)
{
- QString item = list->at(i)->name;
+ TQString item = list->at(i)->name;
completion.text = item;
completion.comment = list->at(i)->type;
completions->append( completion );
@@ -1499,21 +1499,21 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeCompletions(cons
}
/** Return a list of valid attribute values for the given tag and attribute */
-QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith )
+TQValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith )
{
- QValueList<KTextEditor::CompletionEntry> *completions = new QValueList<KTextEditor::CompletionEntry>();
+ TQValueList<KTextEditor::CompletionEntry> *completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "attributeValue";
completion.userdata = startsWith+"|"+tagName + "," + attribute;
bool deleteValues;
- QStringList *values = tagAttributeValues(completionDTD->name,tagName, attribute, deleteValues);
+ TQStringList *values = tagAttributeValues(completionDTD->name,tagName, attribute, deleteValues);
if (attribute.lower() == "class")
{
if (!values)
{
- values = new QStringList(quantaApp->selectors(tagName));
+ values = new TQStringList(quantaApp->selectors(tagName));
deleteValues = true;
}
} else
@@ -1521,13 +1521,13 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
{
if (!values)
{
- values = new QStringList(quantaApp->idSelectors());
+ values = new TQStringList(quantaApp->idSelectors());
deleteValues = true;
}
}
if (values)
{
- for ( QStringList::Iterator it = values->begin(); it != values->end(); ++it )
+ for ( TQStringList::Iterator it = values->begin(); it != values->end(); ++it )
{
completion.text = *it;
if (completion.text.startsWith(startsWith))
@@ -1541,7 +1541,7 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
int andSignPos = startsWith.find('&');
if (andSignPos != -1)
{
- QValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1));
+ TQValueList<KTextEditor::CompletionEntry> *charCompletions = getCharacterCompletions(startsWith.mid(andSignPos + 1));
*completions += *charCompletions;
delete charCompletions;
}
@@ -1551,10 +1551,10 @@ QValueList<KTextEditor::CompletionEntry>* Document::getAttributeValueCompletions
}
/** Return a list of character completions (like &nbsp; ...) */
-QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(const QString& startsWith)
+TQValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(const TQString& startsWith)
{
- QValueList<KTextEditor::CompletionEntry> *completions = 0L;
- QMap<QString, KTextEditor::CompletionEntry> completionMap;
+ TQValueList<KTextEditor::CompletionEntry> *completions = 0L;
+ TQMap<TQString, KTextEditor::CompletionEntry> completionMap;
//first search for entities defined in the document
const DTDStruct *dtdDTD = DTDs::ref()->find("dtd");
@@ -1583,18 +1583,18 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
if (!completions)
- completions = new QValueList<KTextEditor::CompletionEntry>();
+ completions = new TQValueList<KTextEditor::CompletionEntry>();
KTextEditor::CompletionEntry completion;
completion.type = "charCompletion";
//add the entities from the tag files
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
for( ; it.current(); ++it )
{
QTag *tag = it.current();
if (tag->type == "entity")
{
- QString tagName = tag->name(true);
+ TQString tagName = tag->name(true);
if (tagName.upper().startsWith(startsWith.upper()) || startsWith.isEmpty())
{
completion.text = tagName;
@@ -1605,22 +1605,22 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
}
- QValueList<KTextEditor::CompletionEntry> *completions2 = new QValueList<KTextEditor::CompletionEntry>();
- for (QMap<QString, KTextEditor::CompletionEntry>::ConstIterator it = completionMap.constBegin(); it != completionMap.constEnd(); ++it)
+ TQValueList<KTextEditor::CompletionEntry> *completions2 = new TQValueList<KTextEditor::CompletionEntry>();
+ for (TQMap<TQString, KTextEditor::CompletionEntry>::ConstIterator it = completionMap.constBegin(); it != completionMap.constEnd(); ++it)
{
completions2->append(it.data());
}
delete completions;
completions = completions2;
- for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
{
completion.text = *it;
int begin = completion.text.find("(&") + 2;
if (begin == 1)
continue;
int length = completion.text.find(";)") - begin + 1;
- QString s = completion.text.mid(begin, length - 1);
+ TQString s = completion.text.mid(begin, length - 1);
completion.text = s + " : " + completion.text.left(begin -2) + " - " + completion.text.mid(begin + length + 1);
if (s.startsWith(startsWith))
{
@@ -1633,13 +1633,13 @@ QValueList<KTextEditor::CompletionEntry>* Document::getCharacterCompletions(cons
}
/** Returns the DTD identifier for the document */
-QString Document::getDTDIdentifier()
+TQString Document::getDTDIdentifier()
{
return dtdName;
}
/** Sets the DTD identifier */
-void Document::setDTDIdentifier(const QString &id)
+void Document::setDTDIdentifier(const TQString &id)
{
dtdName = id.lower();
m_groupsForDTEPs.clear();
@@ -1669,15 +1669,15 @@ const DTDStruct* Document::defaultDTD() const
}
/** Find the DTD name for a part of the document. */
-QString Document::findDTDName(Tag **tag)
+TQString Document::findDTDName(Tag **tag)
{
//Do some magic to find the document type
int endLine = editIf->numLines();
- QString foundText = "";
+ TQString foundText = "";
int pos = 0;
int i = 0;
int line, startPos;
- QString text;
+ TQString text;
do
{
text = editIf->textLine(i);
@@ -1747,7 +1747,7 @@ QString Document::findDTDName(Tag **tag)
}
/** Called whenever a user inputs text in a script type document. */
-bool Document::scriptAutoCompletion(int line, int column, const QString& insertedString)
+bool Document::scriptAutoCompletion(int line, int column, const TQString& insertedString)
{
bool handled = false;
Node *node = parser->nodeAt(line, column);
@@ -1764,17 +1764,17 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
int bl, bc;
node->tag->beginPos(bl, bc);
- QString s = text(bl, bc, line, column);
+ TQString s = text(bl, bc, line, column);
if (QuantaCommon::insideCommentsOrQuotes(s.length() -1, s, dtd))
return true; //again, nothing to do
- QString s2 = s;
+ TQString s2 = s;
int i = s.length() - 1;
while (i > 0 && s[i].isSpace())
i--;
while (i > 0 && (s[i].isLetterOrNumber() || s[i] == '_' ||
(completionDTD->minusAllowedInWord && s[i] == '-') ) )
i--;
- QString startStr = s.mid(i + 1).stripWhiteSpace();
+ TQString startStr = s.mid(i + 1).stripWhiteSpace();
s = s.left(i + 1);
if (s[i] == completionDTD->attributeSeparator)
{
@@ -1792,26 +1792,26 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
if ( s[i] == completionDTD->attrAutoCompleteAfter ||
s[i] == completionDTD->attributeSeparator ) //if we need to list the arguments of a function
{
- QString textLine = s.left(i);
- QString word = findWordRev(textLine, completionDTD);
- QValueList<QTag *> tags;
+ TQString textLine = s.left(i);
+ TQString word = findWordRev(textLine, completionDTD);
+ TQValueList<QTag *> tags;
if (!word.isEmpty())
{
tags.append(userTagList.find(word.lower()));
- QDictIterator<QTag> it(*(completionDTD->tagsList));
+ TQDictIterator<QTag> it(*(completionDTD->tagsList));
for( ; it.current(); ++it )
{
if (it.currentKey() == word)
tags.append(it.current());
}
}
- QStringList argList;
- for (QValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it)
+ TQStringList argList;
+ for (TQValueList<QTag*>::ConstIterator it = tags.constBegin(); it != tags.constEnd(); ++it)
{
QTag *tag = *it;
if (!tag)
continue;
- QString arguments;
+ TQString arguments;
if (tag->type != "property")
{
for (int i =0; i < tag->attributeCount(); i++)
@@ -1873,7 +1873,7 @@ bool Document::scriptAutoCompletion(int line, int column, const QString& inserte
/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
work correctly. */
-QString Document::text(int bLine, int bCol, int eLine, int eCol) const
+TQString Document::text(int bLine, int bCol, int eLine, int eCol) const
{
if (bLine > eLine)
{
@@ -1884,7 +1884,7 @@ QString Document::text(int bLine, int bCol, int eLine, int eCol) const
bCol = eCol;
eCol = tmp;
}
- QString t = editIf->textLine(bLine);
+ TQString t = editIf->textLine(bLine);
if (bLine == eLine)
{
return t.mid(bCol, eCol-bCol +1);
@@ -1902,18 +1902,18 @@ QString Document::text(int bLine, int bCol, int eLine, int eCol) const
//TODO: profile which one is used more often and time critical places and use
//that one as the default and call from that one the other version
-QString Document::text(const AreaStruct &area) const
+TQString Document::text(const AreaStruct &area) const
{
return text(area.bLine, area.bCol, area.eLine, area.eCol);
}
-QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+TQString Document::find(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
{
- QRegExp rx = regExp;
- QString foundText = "";
+ TQRegExp rx = regExp;
+ TQString foundText = "";
int maxLine = editIf->numLines();
- QString textToSearch = text(sLine, sCol, sLine, editIf->lineLength(sLine));
+ TQString textToSearch = text(sLine, sCol, sLine, editIf->lineLength(sLine));
int pos;
int line = sLine;
do
@@ -1936,7 +1936,7 @@ QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine,
if (pos != -1)
{
foundText = rx.cap();
- QString s = textToSearch.left(pos);
+ TQString s = textToSearch.left(pos);
int linesUntilFound = s.contains("\n");
fbLine = sLine + linesUntilFound;
fbCol = s.length()-s.findRev("\n")-1;
@@ -1965,13 +1965,13 @@ QString Document::find(const QRegExp& regExp, int sLine, int sCol, int& fbLine,
return foundText;
}
-QString Document::findRev(const QRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
+TQString Document::findRev(const TQRegExp& regExp, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol)
{
- QRegExp rx = regExp;
- QString foundText = "";
+ TQRegExp rx = regExp;
+ TQString foundText = "";
int pos = -1;
int line = sLine;
- QString textToSearch = text(sLine, 0, sLine, sCol);
+ TQString textToSearch = text(sLine, 0, sLine, sCol);
do
{
pos = rx.searchRev(textToSearch);
@@ -2003,7 +2003,7 @@ QString Document::findRev(const QRegExp& regExp, int sLine, int sCol, int& fbLin
if (fbCol < 0) fbCol = 0;
if (feCol < 0) feCol = 0;
/*
- QString s = text(fbLine, fbCol, feLine, feCol);
+ TQString s = text(fbLine, fbCol, feLine, feCol);
if (s != foundText) //debug, error
{
KMessageBox::error(this,"FindRev\nFound: "+foundText+"\nRead: "+s);
@@ -2046,7 +2046,7 @@ void Document::handleCodeCompletion()
/* if (!handled)
{
completionDTD = defaultDTD();
- QString s = text(line, 0, line, col).stripWhiteSpace();
+ TQString s = text(line, 0, line, col).stripWhiteSpace();
if (s.findRev("<") != -1)
{
//showCodeCompletions(getTagCompletions(line, col + 1));
@@ -2078,7 +2078,7 @@ void Document::codeCompletionHintRequested()
completionDTD = currentDTD();
if (completionDTD->family == Script)
{
-// QString textLine = editIf->textLine(line).left(col);
+// TQString textLine = editIf->textLine(line).left(col);
// int pos = textLine.findRev("(");
// int pos2 = textLine.findRev(")");
//if (pos > pos2 )
@@ -2088,13 +2088,13 @@ void Document::codeCompletionHintRequested()
completionRequested = false;
}
-QString Document::currentWord()
+TQString Document::currentWord()
{
uint line, col;
viewCursorIf->cursorPositionReal(&line, &col);
- QString textLine = editIf->textLine(line);
- int startPos = textLine.findRev(QRegExp("\\W"), col);
- int endPos = textLine.find(QRegExp("\\W"), col);
+ TQString textLine = editIf->textLine(line);
+ int startPos = textLine.findRev(TQRegExp("\\W"), col);
+ int endPos = textLine.find(TQRegExp("\\W"), col);
if (startPos == -1)
startPos = 0;
else
@@ -2105,16 +2105,16 @@ QString Document::currentWord()
}
/** Find the word until the first word boundary backwards */
-QString Document::findWordRev(const QString& textToSearch, const DTDStruct *dtd)
+TQString Document::findWordRev(const TQString& textToSearch, const DTDStruct *dtd)
{
- QString t = textToSearch;
+ TQString t = textToSearch;
while (t.endsWith(" "))
t = t.left(t.length()-1);
int startPos = -1;
int pos;
bool end = false;
do{
- pos = t.findRev(QRegExp("\\W"), startPos);
+ pos = t.findRev(TQRegExp("\\W"), startPos);
if (t[pos] == '_' ||
(dtd && dtd->minusAllowedInWord && t[pos] == '-'))
{
@@ -2139,9 +2139,9 @@ bool Document::xmlCodeCompletion(int line, int col)
Tag *tag = node->tag;
int bLine, bCol;
tag->beginPos(bLine, bCol);
- QString s;
+ TQString s;
int index;
- QString tagName = tag->name.section('|', 0, 0).stripWhiteSpace();
+ TQString tagName = tag->name.section('|', 0, 0).stripWhiteSpace();
int nameCol = bCol + tagName.length() + 1;
if (!tag->nameSpace.isEmpty())
nameCol += 1 + tag->nameSpace.length();
@@ -2189,7 +2189,7 @@ bool Document::xmlCodeCompletion(int line, int col)
}
if (!handled)
{
- QString s = editIf->textLine(line).left(col);
+ TQString s = editIf->textLine(line).left(col);
int pos = s.findRev('&');
if (pos != -1)
{
@@ -2214,7 +2214,7 @@ void Document::slotCompletionAborted()
/** Ask for user confirmation if the file was changed outside. */
void Document::checkDirtyStatus()
{
- QString fileName;
+ TQString fileName;
if (url().isLocalFile())
fileName = url().path();
if (m_dirty)
@@ -2222,7 +2222,7 @@ void Document::checkDirtyStatus()
createTempFile();
if (!fileName.isEmpty())
{
- QDateTime modifTime = QFileInfo(fileName).lastModified();
+ TQDateTime modifTime = TQFileInfo(fileName).lastModified();
if (modifTime == m_modifTime)
m_dirty = false;
}
@@ -2230,7 +2230,7 @@ void Document::checkDirtyStatus()
{
if (m_md5sum.isEmpty())
{
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
const char* c = "";
@@ -2245,10 +2245,10 @@ void Document::checkDirtyStatus()
{
//check if the file is changed, also by file content. Might help to reduce
//unwanted warning on NFS
- QFile f(fileName);
+ TQFile f(fileName);
if (f.open(IO_ReadOnly))
{
- QString md5sum;
+ TQString md5sum;
const char* c = "";
KMD5 context(c);
context.reset();
@@ -2268,7 +2268,7 @@ void Document::checkDirtyStatus()
{
DirtyDlg *dlg = new DirtyDlg(url().path(), m_tempFileName, false, this);
DirtyDialog *w = static_cast<DirtyDialog*>(dlg->mainWidget());
- QString kompareStr = KStandardDirs::findExe("kompare");
+ TQString kompareStr = KStandardDirs::findExe("kompare");
if (kompareStr.isEmpty())
{
w->buttonCompare->setEnabled(false);
@@ -2279,7 +2279,7 @@ void Document::checkDirtyStatus()
m_doc->setModified(false);
openURL(url());
}
- m_modifTime = QFileInfo(fileName).lastModified();
+ m_modifTime = TQFileInfo(fileName).lastModified();
delete dlg;
}
closeTempFile();
@@ -2292,13 +2292,13 @@ void Document::save()
{
if (url().isLocalFile())
{
- QString fileName;
+ TQString fileName;
fileName = url().path();
fileWatcher->removeFile(fileName);
// kdDebug(24000) << "removeFile[save]: " << fileName << endl;
m_doc->save();
m_dirty = false;
- m_modifTime = QFileInfo(fileName).lastModified();
+ m_modifTime = TQFileInfo(fileName).lastModified();
fileWatcher->addFile(fileName);
// kdDebug(24000) << "addFile[save]: " << fileName << endl;
} else
@@ -2317,7 +2317,7 @@ bool Document::saveAs(const KURL& url)
m_md5sum = "";
if (url.isLocalFile())
{
- QFile f(url.path());
+ TQFile f(url.path());
if (f.open(IO_ReadOnly))
{
const char* c = "";
@@ -2332,7 +2332,7 @@ bool Document::saveAs(const KURL& url)
return result;
}
-void Document::enableGroupsForDTEP(const QString& dtepName, bool enable)
+void Document::enableGroupsForDTEP(const TQString& dtepName, bool enable)
{
if (m_groupsForDTEPs.isEmpty())
m_groupsForDTEPs = m_DTEPList;
@@ -2352,9 +2352,9 @@ void Document::resetGroupsForDTEPList()
}
/** Returns true if the number of " (excluding \") inside text is even. */
-bool Document::evenQuotes(const QString &text)
+bool Document::evenQuotes(const TQString &text)
{
- int num = text.contains(QRegExp("[^\\\\]\""));
+ int num = text.contains(TQRegExp("[^\\\\]\""));
return (num /2 *2 == num);
}
@@ -2367,7 +2367,7 @@ void Document::slotTextChanged()
{
kdDebug(24000) << "Delayed text changed called." << endl;
//delay the handling, otherwise we may get wrong values for (line,column)
- QTimer::singleShot(0, this, SLOT(slotDelayedTextChanged()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedTextChanged()));
delayedTextChangedEnabled = false;
}
}
@@ -2378,14 +2378,14 @@ void Document::slotDelayedTextChanged(bool forced)
{
kdDebug(24000) << "Reparsing delayed!" << endl;
parser->setParsingNeeded(true);
- QTimer::singleShot(1000, this, SLOT(slotDelayedTextChanged()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(slotDelayedTextChanged()));
reparseEnabled = false;
delayedTextChangedEnabled = false;
return;
}
uint line, column;
- QString oldNodeName = "";
+ TQString oldNodeName = "";
Node *node;
Node *currentNode = 0L; //holds a copy of the node which is at (line,column)
Node *previousNode = 0L;//holds a copy of the node before currentNode
@@ -2441,7 +2441,7 @@ void Document::slotDelayedTextChanged(bool forced)
if (bl == bl2 && bc == bc2 &&
((node->tag->type == Tag::XmlTag && !node->tag->single) || currentNode->tag->type == Tag::XmlTagEnd))
{
- QString newName = node->tag->name;
+ TQString newName = node->tag->name;
bool updateClosing = (currentNode->tag->type == Tag::XmlTag) && !newName.startsWith("!");
int num = 1;
if (!node->tag->nameSpace.isEmpty())
@@ -2517,14 +2517,14 @@ void Document::slotDelayedTextChanged(bool forced)
}
/** Returns list of values for attribute */
-QStringList* Document::tagAttributeValues(const QString& dtdName, const QString& tag, const QString &attribute, bool &deleteResult)
+TQStringList* Document::tagAttributeValues(const TQString& dtdName, const TQString& tag, const TQString &attribute, bool &deleteResult)
{
- QStringList *values = 0L;
+ TQStringList *values = 0L;
deleteResult = true;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd)
{
- QString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper();
+ TQString searchForAttr = (dtd->caseSensitive) ? attribute : attribute.upper();
AttributeList* attrs = QuantaCommon::tagAttributes(dtdName, tag);
if (attrs)
{
@@ -2532,17 +2532,17 @@ QStringList* Document::tagAttributeValues(const QString& dtdName, const QString&
KURL u;
KURL base = url();
base.setPath(base.directory(false,false));
- QString s;
+ TQString s;
for ( attr = attrs->first(); attr; attr = attrs->next() )
{
- QString attrName = (dtd->caseSensitive) ? attr->name : attr->name.upper();
+ TQString attrName = (dtd->caseSensitive) ? attr->name : attr->name.upper();
if (attrName == searchForAttr)
{
if (attr->type == "url") {
Project *project = Project::ref();
if (project->hasProject())
{
- values = new QStringList(project->fileNameList());
+ values = new TQStringList(project->fileNameList());
for (uint i = 0; i < values->count(); i++)
{
u = (*values)[i];
@@ -2553,8 +2553,8 @@ QStringList* Document::tagAttributeValues(const QString& dtdName, const QString&
values->append("mailto:" + project->email());
} else
{
- QDir dir = QDir(url().directory());
- values = new QStringList(dir.entryList());
+ TQDir dir = TQDir(url().directory());
+ values = new TQStringList(dir.entryList());
}
break;
} else {
@@ -2590,11 +2590,11 @@ void Document::paste()
}
/** returns all the areas that are between tag and it's closing pair */
-QStringList Document::tagAreas(const QString& tag, bool includeCoordinates, bool skipFoundContent)
+TQStringList Document::tagAreas(const TQString& tag, bool includeCoordinates, bool skipFoundContent)
{
Node *node = baseNode;
int bl, bc, el, ec;
- QStringList result;
+ TQStringList result;
while (node)
{
@@ -2611,10 +2611,10 @@ QStringList Document::tagAreas(const QString& tag, bool includeCoordinates, bool
el = editIf->numLines()-1;
ec = editIf->lineLength(el);
}
- QString s = text(bl, bc, el, ec);
+ TQString s = text(bl, bc, el, ec);
if (includeCoordinates)
{
- s.prepend(QString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec));
+ s.prepend(TQString("%1,%2,%3,%4\n").arg(bl).arg(bc).arg(el).arg(ec));
}
result += s;
if (skipFoundContent)
@@ -2647,7 +2647,7 @@ void Document::clearErrorMarks()
{
if (!markIf)
return;
- QPtrList<KTextEditor::Mark> marks = markIf->marks();
+ TQPtrList<KTextEditor::Mark> marks = markIf->marks();
KTextEditor::Mark* mark;
for (mark = marks.first(); mark; mark = marks.next())
{
@@ -2656,12 +2656,12 @@ void Document::clearErrorMarks()
}
}
-QString Document::backupPathEntryValue()
+TQString Document::backupPathEntryValue()
{
return m_backupPathValue;
}
-void Document::setBackupPathEntryValue(const QString& ev)
+void Document::setBackupPathEntryValue(const TQString& ev)
{
m_backupPathValue = ev;
}
@@ -2678,10 +2678,10 @@ void Document::createBackup(KConfig* config)
{
m_backupPathValue = qConfig.backupDirPath + url().fileName() + "." + hashFilePath(url().url());
}
- QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+ TQString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
//the encoding used for the current document
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
@@ -2689,8 +2689,8 @@ void Document::createBackup(KConfig* config)
//creates an entry string in quantarc if it does not exist yet
config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files"); //the files that were backedup
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files"); //the list of actual backup files inside $KDEHOME/share/apps/quanta/backups
if (!autosavedFilesEntryList.contains(backupPathValueURL)) //not yet backed up, add an entry for this file
{
autosavedFilesEntryList.append(backupPathValueURL);
@@ -2704,11 +2704,11 @@ void Document::createBackup(KConfig* config)
}
//creates a copy of this specific document
- QFile file(m_backupPathValue);
+ TQFile file(m_backupPathValue);
if (file.open(IO_WriteOnly))
{
- QTextStream stream(&file);
- stream.setCodec(QTextCodec::codecForName(encoding));
+ TQTextStream stream(&file);
+ stream.setCodec(TQTextCodec::codecForName(encoding));
stream << editIf->text();
file.close();
}
@@ -2717,13 +2717,13 @@ void Document::createBackup(KConfig* config)
/** if there is no more need for a backup copy then remove it */
void Document::removeBackup(KConfig *config)
{
- QString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
+ TQString backupPathValueURL = KURL::fromPathOrURL(m_backupPathValue).url();
config->reparseConfiguration();
config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files");
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files");
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(config, "List of backedup files");
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(config, "List of autosaved files");
autosavedFilesEntryList.remove(backupPathValueURL);
config->writePathEntry("List of autosaved files", autosavedFilesEntryList);
@@ -2731,22 +2731,22 @@ void Document::removeBackup(KConfig *config)
config->writePathEntry("List of backedup files", backedupFilesEntryList);
config->sync();
- if(QFile::exists(m_backupPathValue))
- QFile::remove(m_backupPathValue);
+ if(TQFile::exists(m_backupPathValue))
+ TQFile::remove(m_backupPathValue);
}
/** creates a string by hashing a bit the path string of this document */
-QString Document::hashFilePath(const QString& p)
+TQString Document::hashFilePath(const TQString& p)
{
switch(p.length())
{
case 1: {
int c = int(p[0]);
- return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(c, 10) + "P" + qConfig.quantaPID;
}
case 2: {
int c = int(p[1]) * 2;
- return QString::number(c, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(c, 10) + "P" + qConfig.quantaPID;
}
default: {
@@ -2759,9 +2759,9 @@ QString Document::hashFilePath(const QString& p)
sign *= -1;
}
if( sum >= 0 )
- return QString::number(sum, 10) + "P" + qConfig.quantaPID;
+ return TQString::number(sum, 10) + "P" + qConfig.quantaPID;
else
- return QString::number(sum*(-1), 10) + "N" + qConfig.quantaPID;
+ return TQString::number(sum*(-1), 10) + "N" + qConfig.quantaPID;
}
}
}
@@ -2793,7 +2793,7 @@ void Document::convertCase()
progressDlg.setLabel(i18n("Changing tag and attribute case. This may take some time, depending on the document complexity."));
progressDlg.setAllowCancel(false);
progressDlg.show();
- kapp->eventLoop()->processEvents( QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
KProgress *pBar = progressDlg.progressBar();
pBar->setValue(0);
pBar->setTotalSteps(nodeNum);
@@ -2826,7 +2826,7 @@ void Document::convertCase()
ec = bc + node->tag->name.length();
editIf->removeText(bl, bc, bl, ec);
viewCursorIf->setCursorPositionReal(bl, bc);
- QString newName = node->tag->name;
+ TQString newName = node->tag->name;
if (tagCase == 1)
newName = newName.lower();
else if (tagCase == 2)
@@ -2837,7 +2837,7 @@ void Document::convertCase()
}
if (attrCase != 0)
{
- QString newName;
+ TQString newName;
for (int i = 0; i < node->tag->attrCount(); i++)
{
if(editIfExt)
@@ -2864,18 +2864,18 @@ void Document::convertCase()
}
}
-void Document::open(const KURL &url, const QString &encoding)
+void Document::open(const KURL &url, const TQString &encoding)
{
if (encodingIf)
{
encodingIf->setEncoding(encoding);
m_encoding = encoding;
- m_codec = QTextCodec::codecForName(m_encoding);
+ m_codec = TQTextCodec::codecForName(m_encoding);
}
- connect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- connect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ connect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ connect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
if (!openURL(url))
- slotOpeningFailed(QString::null);
+ slotOpeningFailed(TQString::null);
if (!url.isLocalFile())
{
QExtFileInfo internalFileInfo;
@@ -2888,38 +2888,38 @@ void Document::slotOpeningCompleted()
KURL u = url();
if (!u.isLocalFile())
{
- m_modifTime = QDateTime();
+ m_modifTime = TQDateTime();
qApp->exit_loop();
}
else
{
fileWatcher->addFile(u.path());
- m_modifTime = QFileInfo(u.path()).lastModified();
+ m_modifTime = TQFileInfo(u.path()).lastModified();
// kdDebug(24000) << "addFile[Document::open]: " << u.path() << endl;
}
- disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ disconnect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
m_dirty = false;
m_view->setFocus();
processDTD();
emit openingCompleted(u);
}
-void Document::slotOpeningFailed(const QString &errorMessage)
+void Document::slotOpeningFailed(const TQString &errorMessage)
{
m_md5sum = "";
Q_UNUSED(errorMessage); //TODO: append the error message to our own error message
if (!url().isLocalFile())
qApp->exit_loop();
- disconnect(m_doc, SIGNAL(completed()), this, SLOT(slotOpeningCompleted()));
- disconnect(m_doc, SIGNAL(canceled(const QString&)), this, SLOT(slotOpeningFailed(const QString&)));
+ disconnect(m_doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotOpeningCompleted()));
+ disconnect(m_doc, TQT_SIGNAL(canceled(const TQString&)), this, TQT_SLOT(slotOpeningFailed(const TQString&)));
emit openingFailed(url());
}
-void Document::processDTD(const QString& documentType)
+void Document::processDTD(const TQString& documentType)
{
- QString foundName;
- QString projectDTD = Project::ref()->defaultDTD();
+ TQString foundName;
+ TQString projectDTD = Project::ref()->defaultDTD();
setDTDIdentifier(projectDTD);
Tag *tag = 0L;
if (documentType.isEmpty())
@@ -2931,8 +2931,8 @@ void Document::processDTD(const QString& documentType)
KDialogBase dlg(this, 0L, true, i18n("DTD Selector"), KDialogBase::Ok | KDialogBase::Cancel);
DTDSelectDialog *dtdWidget = new DTDSelectDialog(&dlg);
dlg.setMainWidget(dtdWidget);
- QStringList lst = DTDs::ref()->nickNameList(true);
- QString foundNickName = DTDs::ref()->getDTDNickNameFromName(foundName);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
+ TQString foundNickName = DTDs::ref()->getDTDNickNameFromName(foundName);
for (uint i = 0; i < lst.count(); i++)
{
dtdWidget->dtdCombo->insertItem(lst[i]);
@@ -2946,14 +2946,14 @@ void Document::processDTD(const QString& documentType)
if (!DTDs::ref()->find(foundName))
{
//try to find the closest matching DTD
- QString s = foundName.lower();
+ TQString s = foundName.lower();
uint spaceNum = s.contains(' ');
- QStringList dtdList = DTDs::ref()->nameList();
- QStringList lastDtdList;
+ TQStringList dtdList = DTDs::ref()->nameList();
+ TQStringList lastDtdList;
for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
{
lastDtdList = dtdList;
- QStringList::Iterator strIt = dtdList.begin();
+ TQStringList::Iterator strIt = dtdList.begin();
while (strIt != dtdList.end())
{
if (!(*strIt).startsWith(s.section(' ', 0, i)))
@@ -2969,7 +2969,7 @@ void Document::processDTD(const QString& documentType)
for (uint i = 0; i <= spaceNum && !dtdList.empty(); i++)
{
lastDtdList = dtdList;
- QStringList::Iterator strIt = dtdList.begin();
+ TQStringList::Iterator strIt = dtdList.begin();
while (strIt != dtdList.end())
{
if (!(*strIt).endsWith(s.section(' ', -(i+1), -1)))
@@ -2990,7 +2990,7 @@ void Document::processDTD(const QString& documentType)
// dlg->dtdCombo->insertItem(i18n("Create New DTD Info"));
dtdWidget->messageLabel->setText(i18n("This DTD is not known for Quanta. Choose a DTD or create a new one."));
dtdWidget->currentDTD->setText(DTDs::ref()->getDTDNickNameFromName(foundName));
- QString projectDTDNickName = DTDs::ref()->getDTDNickNameFromName(projectDTD);
+ TQString projectDTDNickName = DTDs::ref()->getDTDNickNameFromName(projectDTD);
for (int i = 0; i < dtdWidget->dtdCombo->count(); i++)
{
if (dtdWidget->dtdCombo->text(i) == projectDTDNickName)
@@ -3021,7 +3021,7 @@ void Document::processDTD(const QString& documentType)
} else //DOCTYPE not found in file
{
KURL u = url();
- QString dtdId = DTDs::ref()->DTDforURL(u)->name;
+ TQString dtdId = DTDs::ref()->DTDforURL(u)->name;
// if (dtdId == "empty")
{
const DTDStruct * dtd = DTDs::ref()->find(projectDTD);
@@ -3052,7 +3052,7 @@ void Document::processDTD(const QString& documentType)
/** Called when a file on the disk has changed. */
-void Document::slotFileDirty(const QString& fileName)
+void Document::slotFileDirty(const TQString& fileName)
{
if ( url().path() == fileName && !dirty() )
{
@@ -3081,7 +3081,7 @@ void Document::resetDTEPs()
m_DTEPList.append(defaultDTD()->name);
}
-void Document::addDTEP(const QString &dtepName)
+void Document::addDTEP(const TQString &dtepName)
{
if (m_DTEPList.contains(dtepName) == 0)
{
@@ -3089,7 +3089,7 @@ void Document::addDTEP(const QString &dtepName)
}
}
-QStringList Document::groupsForDTEPs()
+TQStringList Document::groupsForDTEPs()
{
if (m_groupsForDTEPs.isEmpty())
return m_DTEPList;
@@ -3097,16 +3097,16 @@ QStringList Document::groupsForDTEPs()
return m_groupsForDTEPs;
}
-QString Document::annotationText(uint line)
+TQString Document::annotationText(uint line)
{
- QMap<uint, QPair<QString, QString> >::Iterator it = m_annotations.find(line);
+ TQMap<uint, QPair<TQString, TQString> >::Iterator it = m_annotations.find(line);
if (it != m_annotations.end())
return it.data().first;
else
- return QString::null;
+ return TQString::null;
}
-void Document::setAnnotationText(uint line, const QString& text)
+void Document::setAnnotationText(uint line, const TQString& text)
{
if (text.isEmpty())
{
@@ -3115,16 +3115,16 @@ void Document::setAnnotationText(uint line, const QString& text)
markIf->removeMark(line, KTextEditor::MarkInterface::markType08);
} else
{
- m_annotations.insert(line, qMakePair(text, QString("")));
+ m_annotations.insert(line, qMakePair(text, TQString("")));
if (markIf)
markIf->setMark(line, KTextEditor::MarkInterface::markType08);
uint line, column;
viewCursorIf->cursorPositionReal(&line, &column);
viewCursorIf->setCursorPositionReal(line, 0);
const DTDStruct *dtd = currentDTD(true);
- QString commentBegin = "";
- QString commentEnd = "";
- for (QMap<QString, QString>::ConstIterator it = dtd->comments.constBegin(); it != dtd->comments.constEnd(); ++it)
+ TQString commentBegin = "";
+ TQString commentEnd = "";
+ for (TQMap<TQString, TQString>::ConstIterator it = dtd->comments.constBegin(); it != dtd->comments.constEnd(); ++it)
{
commentBegin = it.key();
commentEnd = it.data();
@@ -3143,15 +3143,15 @@ void Document::setAnnotationText(uint line, const QString& text)
commentEnd = "*/";
}
}
- QString s = "@annotation: " + text;
+ TQString s = "@annotation: " + text;
s.prepend(commentBegin + " ");
s.append(" " + commentEnd + "\n");
insertText(s, true, true);
- emit showAnnotation(line, "", qMakePair(text, QString("")));
+ emit showAnnotation(line, "", qMakePair(text, TQString("")));
}
}
-void Document::addAnnotation(uint line, const QPair<QString, QString>& annotation)
+void Document::addAnnotation(uint line, const QPair<TQString, TQString>& annotation)
{
m_annotations.insert(line, annotation);
if (markIf)
@@ -3163,7 +3163,7 @@ void Document::clearAnnotations()
{
if (markIf)
{
- QPtrList<KTextEditor::Mark> m = markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = markIf->marks();
for (uint i=0; i < m.count(); i++)
markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType08 );
}
@@ -3175,7 +3175,7 @@ bool Document::openURL(const KURL& url)
m_md5sum = "";
if (url.isLocalFile())
{
- QFile f(url.path());
+ TQFile f(url.path());
if (f.open(IO_ReadOnly))
{
const char* c = "";
diff --git a/quanta/src/document.h b/quanta/src/document.h
index 7b6ef151..ac5e3f84 100644
--- a/quanta/src/document.h
+++ b/quanta/src/document.h
@@ -19,10 +19,10 @@
#define DOCUMENT_H
//qt includes
-#include <qdatetime.h>
-#include <qdict.h>
-#include <qmap.h>
-#include <qwidget.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
+#include <tqmap.h>
+#include <tqwidget.h>
#include <kurl.h>
#include <ktexteditor/markinterfaceextension.h>
@@ -71,39 +71,39 @@ class Document : public QWidget{
public:
Document(KTextEditor::Document *doc,
- QWidget *parent = 0, const char *name = 0, WFlags f=0);
+ TQWidget *parent = 0, const char *name = 0, WFlags f=0);
~Document();
KURL url();
bool isUntitled();
- void setUntitledUrl(const QString &url);
+ void setUntitledUrl(const TQString &url);
/** Returns tag name at specified position */
- QString getTagNameAt(int line, int col );
+ TQString getTagNameAt(int line, int col );
void selectText(int x1, int y1, int x2, int y2 );
- void replaceSelected(const QString &s);
+ void replaceSelected(const TQString &s);
/** insert tag in document */
- void insertTag(const QString &s1, const QString &s2 = QString::null);
+ void insertTag(const TQString &s1, const TQString &s2 = TQString::null);
/** Change the current tag's attributes with those from dict */
- void changeTag(Tag *tag, QDict<QString> *dict );
+ void changeTag(Tag *tag, TQDict<TQString> *dict );
/**Change the attr value of the called attrName to attrValue*/
- void changeTagAttribute(Tag *tag, const QString& attrName, const QString&attrValue);
+ void changeTagAttribute(Tag *tag, const TQString& attrName, const TQString&attrValue);
/**Change the namespace in a tag. Add if it's not present, or remove if the
namespace argument is empty*/
- void changeTagNamespace(Tag *tag, const QString& nameSpace);
+ void changeTagNamespace(Tag *tag, const TQString& nameSpace);
/** Insert the content of the url into the document. */
void insertFile(const KURL& url);
/** Inserts text at the current cursor position */
- void insertText(const QString &text, bool adjustCursor = true, bool reparse = true);
+ void insertText(const TQString &text, bool adjustCursor = true, bool reparse = true);
/** Recursively insert the mandatory childs of tag. Returns true if a child was
inserted.*/
bool insertChildTags(QTag *tag, QTag* lastTag = 0L);
- QPoint getGlobalCursorPos();
- QString find(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
- QString findRev(const QRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQPoint getGlobalCursorPos();
+ TQString find(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
+ TQString findRev(const TQRegExp& rx, int sLine, int sCol, int& fbLine, int&fbCol, int &feLine, int&feCol);
/** Get the view of the document */
KTextEditor::View* view();
/** Get the KTextEditor::Document of the document */
@@ -118,24 +118,24 @@ public:
void createTempFile();
/** Closes and removes the temporary file. */
void closeTempFile();
- /** Returns the name of the temporary file, QString::null if no temporary file exists. */
- QString tempFileName();
+ /** Returns the name of the temporary file, TQString::null if no temporary file exists. */
+ TQString tempFileName();
/** Returns the DTD identifier for the document */
- QString getDTDIdentifier();
+ TQString getDTDIdentifier();
/** Sets the DTD identifier */
- void setDTDIdentifier(const QString &id);
+ void setDTDIdentifier(const TQString &id);
/** Get a pointer to the current active DTD. If fallback is true, this always gives back a valid and known DTD pointer: the active, the document specified and in last case the application default document type. */
const DTDStruct* currentDTD(bool fallback = true);
/** Get a pointer to the default DTD (document, or app). */
const DTDStruct* defaultDTD() const;
/** Find the DTD name for a part of the document. */
- QString findDTDName(Tag **tag);
+ TQString findDTDName(Tag **tag);
/** Retrives the text from the specified rectangle. The KTextEditor::EditInterface::text seems to not
work correctly. */
- QString text(int bLine, int bCol, int eLine, int eCol) const;
+ TQString text(int bLine, int bCol, int eLine, int eCol) const;
/** Same as the above, but using AreaStruct as an argument */
- QString text(const AreaStruct &area) const;
+ TQString text(const AreaStruct &area) const;
/** Code completion was requested by the user. */
void codeCompletionRequested();
/** Bring up the code completion tooltip. */
@@ -150,11 +150,11 @@ work correctly. */
/** Save the document under a new name and calculate the new md5sum. */
bool saveAs(const KURL& url);
/** Enable or disable the visibility of groups for a DTEP.*/
- void enableGroupsForDTEP(const QString& dtepName, bool enable = true);
+ void enableGroupsForDTEP(const TQString& dtepName, bool enable = true);
/** Clears the selected DTEP list */
void resetGroupsForDTEPList();
/** Find the word until the first word boundary backwards */
- QString findWordRev(const QString& textToSearch, const DTDStruct *dtd = 0L);
+ TQString findWordRev(const TQString& textToSearch, const DTDStruct *dtd = 0L);
/** Returns the changed status since the last query. Resets changed.*/
bool hasChanged();
/** Sets the changed status.*/
@@ -167,7 +167,7 @@ work correctly. */
bool parserActivated() {return reparseEnabled;}
/** returns all the areas that are between tag and it's closing pair */
- QStringList tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent);
+ TQStringList tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent);
/** disable/enable the repaint of the Kate view */
void activateRepaintView(bool activation);
@@ -178,25 +178,25 @@ work correctly. */
void convertCase();
/** returns the word under the cursor */
- QString currentWord();
+ TQString currentWord();
/** Opens the url. The url must be valid and the file pointed to it must exists. */
- void open(const KURL &url, const QString &encoding);
+ void open(const KURL &url, const TQString &encoding);
/**
* Opens a file in the editor part.
* @param url
*/
bool openURL(const KURL& url);
/** Reads the DTD info from the file, tries to find the correct DTD and builds the tag/attribute list from the DTD file. */
- void processDTD(const QString& documentType = QString::null);
+ void processDTD(const TQString& documentType = TQString::null);
/** Resets the list of DTEPs found in the document */
void resetDTEPs();
/** Adds a DTEP to the list of DTEPs present in the document */
- void addDTEP(const QString &dtepName);
+ void addDTEP(const TQString &dtepName);
/** Returns the list of DTEPs that should appear in the structure tree. By default
this is the list of DTEPs present in the document, but the user can turn on/
off them with the help of RMB->Show Groups For in the structure tree */
- QStringList groupsForDTEPs();
+ TQStringList groupsForDTEPs();
bool busy;
@@ -219,17 +219,17 @@ work correctly. */
/** Creates an automatic backup copy for the crash recovering mechanism */
void createBackup(KConfig* config);
/** No descriptions */
- QString backupPathEntryValue();
+ TQString backupPathEntryValue();
/** No descriptions */
- void setBackupPathEntryValue(const QString& ev);
+ void setBackupPathEntryValue(const TQString& ev);
/** Removes automatic backup copies */
void removeBackup(KConfig *config);
/** create a string using document path string */
- static QString hashFilePath(const QString& p);
- QString annotationText(uint line);
- void setAnnotationText(uint line, const QString& text);
- QMap<uint, QPair<QString, QString> > annotations() {return m_annotations;}
- void addAnnotation(uint line, const QPair<QString, QString>& annotation);
+ static TQString hashFilePath(const TQString& p);
+ TQString annotationText(uint line);
+ void setAnnotationText(uint line, const TQString& text);
+ TQMap<uint, QPair<TQString, TQString> > annotations() {return m_annotations;}
+ void addAnnotation(uint line, const QPair<TQString, TQString>& annotation);
void clearAnnotations();
public slots:
@@ -237,9 +237,9 @@ public slots:
/** Called after a completion is inserted */
void slotCompletionDone( KTextEditor::CompletionEntry completion );
/** Called when a user selects a completion, we then can modify it */
- void slotFilterCompletion(KTextEditor::CompletionEntry*,QString *);
+ void slotFilterCompletion(KTextEditor::CompletionEntry*,TQString *);
/** Called whenever a user inputs text */
- void slotCharactersInserted(int ,int ,const QString&);
+ void slotCharactersInserted(int ,int ,const TQString&);
/** Called when the code completion is aborted.*/
void slotCompletionAborted();
/** Called whenever the text in the document is changed. */
@@ -259,44 +259,44 @@ signals:
void breakpointMarked(Document*, int);
void breakpointUnmarked(Document*, int);
- void showAnnotation(uint, const QString&, const QPair<QString, QString>&);
+ void showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&);
private slots:
void slotReplaceChar();
void slotOpeningCompleted();
- void slotOpeningFailed(const QString &errorMessage);
+ void slotOpeningFailed(const TQString &errorMessage);
/** Called when a file on the disk has changed. */
- void slotFileDirty(const QString& fileName);
+ void slotFileDirty(const TQString& fileName);
void slotMarkChanged(KTextEditor::Mark mark, KTextEditor::MarkInterfaceExtension::MarkChangeAction action);
private:
/**
* Finds the beginning of a tag in the document, starting from a position.
* @param position start to look from this position backwards
- * @return the position of the starting character or an empty QPoint if not found
+ * @return the position of the starting character or an empty TQPoint if not found
*/
- QPoint findTagBeginning(const QPoint& position);
- QPoint findTagEnd(const QPoint& position);
+ TQPoint findTagBeginning(const TQPoint& position);
+ TQPoint findTagEnd(const TQPoint& position);
- QMap<uint, QPair<QString, QString> > m_annotations;
- QString untitledUrl;
+ TQMap<uint, QPair<TQString, TQString> > m_annotations;
+ TQString untitledUrl;
int m_replaceLine;
int m_replaceCol;
- QString m_replaceStr;
+ TQString m_replaceStr;
KTextEditor::Document *m_doc;
KTextEditor::View *m_view;
KTempFile *tempFile;
- QString m_tempFileName;
- QDateTime m_modifTime;
+ TQString m_tempFileName;
+ TQDateTime m_modifTime;
/* path of the backup copy file of the document */
- QString m_backupPathValue;
- QString dtdName;
- QString m_encoding;
- QTextCodec *m_codec;
+ TQString m_backupPathValue;
+ TQString dtdName;
+ TQString m_encoding;
+ TQTextCodec *m_codec;
/*The DTD valid in the place where the completion was invoked.*/
const DTDStruct *completionDTD;
@@ -310,42 +310,42 @@ private:
bool delayedTextChangedEnabled;
/** True if the document is dirty (has been modified outside). */
bool m_dirty;
- QString m_md5sum;
+ TQString m_md5sum;
Project *m_project;
/** Parse the document according to this DTD. */
- QStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
- QStringList m_DTEPList; ///< The list of all DTEPs found in the document
+ TQStringList m_groupsForDTEPs; ///< The list of the DTEPs for which the groups should appear in the structure tree
+ TQStringList m_DTEPList; ///< The list of all DTEPs found in the document
//stores the data after an autocompletion. Used when bringing up the
//autocompletion box delayed with the singleshot timer (workaround for
//a bug: the box is not showing up if it is called from slotCompletionDone)
int m_lastLine, m_lastCol;
- QValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
+ TQValueList<KTextEditor::CompletionEntry>* m_lastCompletionList;
/** Get list of possibile variable name completions */
- QValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getGroupCompletions(Node *node, const StructTreeGroup& groupName, int line, int col);
/** Get list of possibile tag name completions */
- QValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
+ TQValueList<KTextEditor::CompletionEntry>* getTagCompletions(int line, int col);
/** Get list of possibile tag attribute completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const QString& tagName,const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeCompletions(const TQString& tagName,const TQString& startsWith=TQString::null);
/** Get list of possibile tag attribute value completions */
- QValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const QString& tagName, const QString& attribute, const QString& startsWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getAttributeValueCompletions(const TQString& tagName, const TQString& attribute, const TQString& startsWith=TQString::null);
/** Get list of possibile completions in normal text input (nt creating a tag) */
- QValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const QString& starstWith=QString::null);
+ TQValueList<KTextEditor::CompletionEntry>* getCharacterCompletions(const TQString& starstWith=TQString::null);
/** Invoke code completion dialog for XML like tags according to the position (line, col), using DTD dtd. */
bool xmlCodeCompletion(int line, int col);
/** Returns list of values for attribute. If deleteResult is true after the call,
the caller must delete the returned list. */
- QStringList* tagAttributeValues(const QString& dtdName, const QString& tag, const QString& attribute, bool &deleteResult);
+ TQStringList* tagAttributeValues(const TQString& dtdName, const TQString& tag, const TQString& attribute, bool &deleteResult);
/** Brings up list of code completions */
- void showCodeCompletions( QValueList<KTextEditor::CompletionEntry> *completions );
+ void showCodeCompletions( TQValueList<KTextEditor::CompletionEntry> *completions );
/** Called whenever a user inputs text in an XML type document. */
- bool xmlAutoCompletion(int , int , const QString & );
+ bool xmlAutoCompletion(int , int , const TQString & );
/** Called whenever a user inputs text in a script type document. */
- bool scriptAutoCompletion(int line, int col, const QString &insertedString);
+ bool scriptAutoCompletion(int line, int col, const TQString &insertedString);
/** Returns true if the number of " (excluding \") inside text is even. */
- bool evenQuotes(const QString &text);
+ bool evenQuotes(const TQString &text);
void handleCodeCompletion();
- bool isDerivatedFrom(const QString& className, const QString &baseClass);
+ bool isDerivatedFrom(const TQString& className, const TQString &baseClass);
};
#endif
diff --git a/quanta/src/dtds.cpp b/quanta/src/dtds.cpp
index 44fba0ab..9943904a 100644
--- a/quanta/src/dtds.cpp
+++ b/quanta/src/dtds.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
//qt includes
-#include <qfile.h>
+#include <tqfile.h>
#include <qextfileinfo.h>
-#include <qdom.h>
-#include <qcursor.h>
-#include <qtimer.h>
+#include <tqdom.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
// include files for KDE
#include <kapplication.h>
@@ -50,36 +50,36 @@
#include "dtds.h"
/** filename for the desciption of the dtd */
-const QString m_rcFilename("description.rc");
+const TQString m_rcFilename("description.rc");
/**
This constructor reads the dictionary of known dtd's, the attributes and tags will be loaded
on the first access to one dtd.
*/
-DTDs::DTDs(QObject *parent)
- :QObject(parent)
+DTDs::DTDs(TQObject *parent)
+ :TQObject(parent)
{
- connect(this, SIGNAL(hideSplash()), parent, SLOT(slotHideSplash()));
- connect(this, SIGNAL(enableIdleTimer(bool)), parent, SLOT(slotEnableIdleTimer(bool)));
- connect(this, SIGNAL(loadToolbarForDTD(const QString&)), parent, SLOT(slotLoadToolbarForDTD(const QString&)));
+ connect(this, TQT_SIGNAL(hideSplash()), parent, TQT_SLOT(slotHideSplash()));
+ connect(this, TQT_SIGNAL(enableIdleTimer(bool)), parent, TQT_SLOT(slotEnableIdleTimer(bool)));
+ connect(this, TQT_SIGNAL(loadToolbarForDTD(const TQString&)), parent, TQT_SLOT(slotLoadToolbarForDTD(const TQString&)));
// kdDebug(24000) << "dtds::dtds" << endl;
- m_dict = new QDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough.
+ m_dict = new TQDict<DTDStruct>(119, false); //optimized for max 119 DTD. This should be enough.
m_dict->setAutoDelete(true);
- m_doc = new QDomDocument();
+ m_doc = new TQDomDocument();
- QString localKDEdir = KGlobal::instance()->dirs()->localkdedir();
- QStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
- QStringList tagsDirs;
- QStringList::ConstIterator end = tagsResourceDirs.constEnd();
- for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ TQString localKDEdir = KGlobal::instance()->dirs()->localkdedir();
+ TQStringList tagsResourceDirs = KGlobal::instance()->dirs()->findDirs("appdata", "dtep");
+ TQStringList tagsDirs;
+ TQStringList::ConstIterator end = tagsResourceDirs.constEnd();
+ for ( TQStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
{
if ((*it).startsWith(localKDEdir))
{
- QDir dir(*it);
- dir.setFilter(QDir::Dirs);
- QStringList subDirs = dir.entryList();
- QStringList::ConstIterator subitEnd = subDirs.constEnd();
- for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ TQDir dir(*it);
+ dir.setFilter(TQDir::Dirs);
+ TQStringList subDirs = dir.entryList();
+ TQStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( TQStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
{
// kdDebug(24000) << "dtds::dtds add:" << *it + *subit+"/" << endl;
if ((*subit != ".") && (*subit != ".."))
@@ -87,15 +87,15 @@ DTDs::DTDs(QObject *parent)
}
}
}
- for ( QStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
+ for ( TQStringList::ConstIterator it = tagsResourceDirs.constBegin(); it != end; ++it )
{
if (!(*it).startsWith(localKDEdir))
{
- QDir dir(*it);
- dir.setFilter(QDir::Dirs);
- QStringList subDirs = dir.entryList();
- QStringList::ConstIterator subitEnd = subDirs.constEnd();
- for ( QStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
+ TQDir dir(*it);
+ dir.setFilter(TQDir::Dirs);
+ TQStringList subDirs = dir.entryList();
+ TQStringList::ConstIterator subitEnd = subDirs.constEnd();
+ for ( TQStringList::ConstIterator subit = subDirs.constBegin(); subit != subitEnd; ++subit )
{
// kdDebug(24000) << "dtds::dtds add2:" << *it + *subit+"/" << endl;
if ((*subit != ".") && (*subit != ".."))
@@ -104,17 +104,17 @@ DTDs::DTDs(QObject *parent)
}
}
// kdDebug(24000) << tagsDirs.count() << " folders found." << endl;
- QTime t;
+ TQTime t;
t.start();
- QStringList::ConstIterator tagsDirsEnd = tagsDirs.constEnd();
- for ( QStringList::ConstIterator it = tagsDirs.constBegin(); it != tagsDirsEnd; ++it )
+ TQStringList::ConstIterator tagsDirsEnd = tagsDirs.constEnd();
+ for ( TQStringList::ConstIterator it = tagsDirs.constBegin(); it != tagsDirsEnd; ++it )
{
// kdDebug(24000) << "read:" << *it << endl;
readTagDir(*it, false); // read all tags, but only short form
}
kdDebug(24000) << "DTD reading: " << t.elapsed() << endl;
//load the mimetypes from the insideDTDs
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
DTDStruct * dtd = it.current();
@@ -133,7 +133,7 @@ DTDs::DTDs(QObject *parent)
DTDs::~DTDs()
{
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
removeDTD (it.current());
@@ -159,15 +159,15 @@ void DTDs::removeDTD(DTDStruct *dtd)
/** Reads the tag files and the description.rc from tagDir in order to
build up the internal DTD and tag structures. */
-bool DTDs::readTagDir(const QString &dirName, bool loadAll)
+bool DTDs::readTagDir(const TQString &dirName, bool loadAll)
{
// kdDebug(24000) << "dtds::readTagDir:" << dirName << " all:" << loadAll << endl;
- QString tmpStr = dirName + m_rcFilename;
- if (!QFile::exists(tmpStr))
+ TQString tmpStr = dirName + m_rcFilename;
+ if (!TQFile::exists(tmpStr))
return false;
KConfig *dtdConfig = new KConfig(tmpStr, true);
dtdConfig->setGroup("General");
- QString dtdName = dtdConfig->readEntry("Name", "Unknown");
+ TQString dtdName = dtdConfig->readEntry("Name", "Unknown");
if (m_dict->find(dtdName.lower()))
{
delete dtdConfig;
@@ -194,14 +194,14 @@ bool DTDs::readTagDir(const QString &dirName, bool loadAll)
//Read the areas that define the areas
dtdConfig->setGroup("Parsing rules");
- QStringList definitionAreaBorders = dtdConfig->readListEntry("AreaBorders");
+ TQStringList definitionAreaBorders = dtdConfig->readListEntry("AreaBorders");
for (uint i = 0; i < definitionAreaBorders.count(); i++)
{
- QStringList tmpStrList = QStringList::split(" ", definitionAreaBorders[i].stripWhiteSpace());
+ TQStringList tmpStrList = TQStringList::split(" ", definitionAreaBorders[i].stripWhiteSpace());
dtd->definitionAreas[tmpStrList[0].stripWhiteSpace()] = tmpStrList[1].stripWhiteSpace();
}
//Read the tags that define this DTD
- QStringList tmpStrList = dtdConfig->readListEntry("Tags");
+ TQStringList tmpStrList = dtdConfig->readListEntry("Tags");
for (uint i = 0; i < tmpStrList.count(); i++)
{
tmpStr = tmpStrList[i].stripWhiteSpace();
@@ -237,9 +237,9 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
{
// kdDebug(24000) << "dtds::readTagDir2:" << dtd->name << " at " << dtd->fileName << endl;
- if (!QFile::exists(dtd->fileName)) return false;
+ if (!TQFile::exists(dtd->fileName)) return false;
- kapp->setOverrideCursor( QCursor(Qt::WaitCursor) );
+ kapp->setOverrideCursor( TQCursor(Qt::WaitCursor) );
KConfig *dtdConfig = new KConfig(dtd->fileName, true);
@@ -269,15 +269,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
//read all the tag files
KURL dirURL(dtd->fileName);
dirURL.setFileName("");
- QString dirName = dirURL.path(1);
- if (QFile::exists(dirName + "common.tag"))
+ TQString dirName = dirURL.path(1);
+ if (TQFile::exists(dirName + "common.tag"))
readTagFile(dirName + "common.tag", dtd, 0L);
//bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
emit enableIdleTimer(false);
KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*.tag", 0L);
//quantaApp->slotEnableIdleTimer(idleTimerStatus);
emit enableIdleTimer(true);
- QString tmpStr;
+ TQString tmpStr;
KURL::List::ConstIterator end_f = files.constEnd();
for ( KURL::List::ConstIterator it_f = files.constBegin(); it_f != end_f; ++it_f )
{
@@ -306,15 +306,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
//read the extra tags and their attributes
dtdConfig->setGroup("Extra tags");
dtd->defaultAttrType = dtdConfig->readEntry("DefaultAttrType","input");
- QStrList extraTagsList;
+ TQStrList extraTagsList;
dtdConfig->readListEntry("List",extraTagsList);
- QString option;
- QStrList optionsList;
- QStrList attrList;
+ TQString option;
+ TQStrList optionsList;
+ TQStrList attrList;
for (uint i = 0 ; i < extraTagsList.count(); i++)
{
QTag *tag = new QTag();
- tag->setName(QString(extraTagsList.at(i)).stripWhiteSpace());
+ tag->setName(TQString(extraTagsList.at(i)).stripWhiteSpace());
tmpStr = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
if (tagList->find(tmpStr)) //the tag is already defined in a .tag file
@@ -324,11 +324,11 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
}
tag->parentDTD = dtd;
//read the possible stopping tags
- QStrList stoppingTags;
+ TQStrList stoppingTags;
dtdConfig->readListEntry(tag->name() + "_stoppingtags",stoppingTags);
for (uint j = 0; j < stoppingTags.count(); j++)
{
- QString stopTag = QString(stoppingTags.at(j)).stripWhiteSpace();
+ TQString stopTag = TQString(stoppingTags.at(j)).stripWhiteSpace();
if (!dtd->caseSensitive) stopTag = stopTag.upper();
tag->stoppingTags.append(stopTag);
}
@@ -337,14 +337,14 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtdConfig->readListEntry(tag->name() + "_options",optionsList);
for (uint j = 0; j < optionsList.count(); j++)
{
- option = QString(optionsList.at(j)).stripWhiteSpace();
- QDictIterator<AttributeList> it(*(dtd->commonAttrs));
+ option = TQString(optionsList.at(j)).stripWhiteSpace();
+ TQDictIterator<AttributeList> it(*(dtd->commonAttrs));
for( ; it.current(); ++it )
{
- tmpStr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ tmpStr = "has" + TQString(it.currentKey()).stripWhiteSpace();
if (option == tmpStr)
{
- tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ tag->commonGroups += TQString(it.currentKey()).stripWhiteSpace();
}
}
if (option == "single")
@@ -361,7 +361,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
for (uint j = 0; j < attrList.count(); j++)
{
Attribute* attr = new Attribute;
- attr->name = QString(attrList.at(j)).stripWhiteSpace();
+ attr->name = TQString(attrList.at(j)).stripWhiteSpace();
attr->type = dtd->defaultAttrType;
tag->addAttribute(attr);
delete attr;
@@ -383,7 +383,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtdConfig->setGroup("Parsing rules");
bool appendCommonRules = dtdConfig->readBoolEntry("AppendCommonSpecialAreas", true);
//Read the special areas and area names
- QString rxStr = "";
+ TQString rxStr = "";
if (dtd->family == Xml && appendCommonRules)
{
dtd->specialAreas["<?xml"] = "?>";
@@ -396,14 +396,14 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
tmpStr = "(<?xml)|(<!--)|(<!)|";
rxStr = QuantaCommon::makeRxCompatible(tmpStr);
}
- QStringList specialAreasList = dtdConfig->readListEntry("SpecialAreas");
- QStringList specialAreaNameList = dtdConfig->readListEntry("SpecialAreaNames");
- QStringList tmpStrList;
+ TQStringList specialAreasList = dtdConfig->readListEntry("SpecialAreas");
+ TQStringList specialAreaNameList = dtdConfig->readListEntry("SpecialAreaNames");
+ TQStringList tmpStrList;
for (uint i = 0; i < specialAreasList.count(); i++)
{
if (!specialAreasList[i].stripWhiteSpace().isEmpty())
{
- tmpStrList = QStringList::split(" ",specialAreasList[i].stripWhiteSpace());
+ tmpStrList = TQStringList::split(" ",specialAreasList[i].stripWhiteSpace());
tmpStr = tmpStrList[0].stripWhiteSpace();
rxStr.append(QuantaCommon::makeRxCompatible(tmpStr)+"|");
dtd->specialAreas[tmpStr] = tmpStrList[1].stripWhiteSpace();
@@ -426,15 +426,15 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
dtd->specialTags[tmpStr.left(pos).stripWhiteSpace()] = tmpStr.mid(pos+1, tmpStr.findRev(')')-pos-1).stripWhiteSpace();
}
- //static const QString quotationStr = "\\\\\"|\\\\'";
+ //static const TQString quotationStr = "\\\\\"|\\\\'";
rxStr = "\\\\\"|\\\\'|";
- QStringList commentsList = dtdConfig->readListEntry("Comments");
+ TQStringList commentsList = dtdConfig->readListEntry("Comments");
if (dtd->family == Xml && appendCommonRules)
commentsList.append("<!-- -->");
- QString tmpStr2;
+ TQString tmpStr2;
for (uint i = 0; i < commentsList.count(); i++)
{
- tmpStrList = QStringList::split(" ",commentsList[i].stripWhiteSpace());
+ tmpStrList = TQStringList::split(" ",commentsList[i].stripWhiteSpace());
tmpStr = tmpStrList[0].stripWhiteSpace();
rxStr += QuantaCommon::makeRxCompatible(tmpStr);
rxStr += "|";
@@ -448,7 +448,7 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
/**** End of code for the new parser *****/
//read the definition of a structure, and the structure keywords
- QStringList structKeywords = dtdConfig->readListEntry("StructKeywords",',');
+ TQStringList structKeywords = dtdConfig->readListEntry("StructKeywords",',');
if (structKeywords.count() !=0 )
{
tmpStr = "\\b(";
@@ -529,11 +529,11 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
if (dtd->family == Script)
{
StructTreeGroup group;
- QRegExp attrRx("\\([^\\)]*\\)");
- QString tagStr;
+ TQRegExp attrRx("\\([^\\)]*\\)");
+ TQString tagStr;
for (uint index = 1; index <= structGroupsCount; index++)
{
- dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ dtdConfig->setGroup(TQString("StructGroup_%1").arg(index));
//new code
group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
@@ -579,22 +579,22 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
} else
{
XMLStructGroup group;
- QRegExp attrRx("\\([^\\)]*\\)");
- QString tagName;
+ TQRegExp attrRx("\\([^\\)]*\\)");
+ TQString tagName;
for (uint index = 1; index <= structGroupsCount; index++)
{
- dtdConfig->setGroup(QString("StructGroup_%1").arg(index));
+ dtdConfig->setGroup(TQString("StructGroup_%1").arg(index));
group.name = dtdConfig->readEntry("Name").stripWhiteSpace();
group.noName = dtdConfig->readEntry("No_Name").stripWhiteSpace();
group.icon = dtdConfig->readEntry("Icon").stripWhiteSpace();
group.appendToTags = dtdConfig->readBoolEntry("AppendToTags", false);
group.parentGroup = dtdConfig->readEntry("ParentGroup").stripWhiteSpace();
- QString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace();
+ TQString tagStr = dtdConfig->readEntry("Tag").stripWhiteSpace();
if (!tagStr.isEmpty())
{
attrRx.search(tagStr);
tmpStr = attrRx.cap();
- tmpStrList = QStringList::split(',', tmpStr.mid(1, tmpStr.length()-2));
+ tmpStrList = TQStringList::split(',', tmpStr.mid(1, tmpStr.length()-2));
tagName = tagStr.left(tagStr.find('(')).lower();
group.attributes.clear();
for (uint i = 0; i < tmpStrList.count(); i++)
@@ -621,11 +621,11 @@ void DTDs::resolveInherited (DTDStruct *dtd)
if (!dtd->inheritsTagsFrom.isEmpty())
{
DTDStruct *parent = (DTDStruct *) find(dtd->inheritsTagsFrom); // this loads the dtd, if not present in memory
- QDictIterator<QTag> tag_it(*(parent->tagsList));
+ TQDictIterator<QTag> tag_it(*(parent->tagsList));
for ( ; tag_it.current(); ++tag_it)
{
QTag *tag = tag_it.current();
- QString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag->name() : tag->name().upper();
if (!dtd->tagsList->find(searchForTag))
{
QTag *newTag = new QTag(*tag);
@@ -636,8 +636,8 @@ void DTDs::resolveInherited (DTDStruct *dtd)
//Read the pseudo DTD area definition strings (special area/tag string)
//from the DTD's which may be present in the DTD (May_Contain setting)
- QMap<QString, QString>::ConstIterator mapIt;
- QString specialAreaStartRxStr = dtd->specialAreaStartRx.pattern();
+ TQMap<TQString, TQString>::ConstIterator mapIt;
+ TQString specialAreaStartRxStr = dtd->specialAreaStartRx.pattern();
if (!specialAreaStartRxStr.isEmpty())
specialAreaStartRxStr += "|";
for (uint i = 0; i < dtd->insideDTDs.count(); i++)
@@ -649,7 +649,7 @@ void DTDs::resolveInherited (DTDStruct *dtd)
{
for (mapIt = insideDTD->definitionAreas.begin(); mapIt != insideDTD->definitionAreas.end(); ++mapIt)
{
- QString tmpStr = mapIt.key();
+ TQString tmpStr = mapIt.key();
dtd->specialAreas[tmpStr] = mapIt.data();
dtd->specialAreaNames[tmpStr] = dtd->insideDTDs[i];
specialAreaStartRxStr.append("(?:" + QuantaCommon::makeRxCompatible(tmpStr) + ")|");
@@ -667,10 +667,10 @@ void DTDs::resolveInherited (DTDStruct *dtd)
/** Reads the tags for the tag files. Returns the number of read tags. */
-uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList)
+uint DTDs::readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList)
{
// kdDebug(24000) << "dtds::readTagFile:" << fileName << endl;
- QFile f(fileName);
+ TQFile f(fileName);
if (! f.exists())
kdError() << "dtds::readTagFile file does not exist:" << fileName << endl;
else
@@ -680,7 +680,7 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
kdError() << "dtds::readTagFile unable to open:" << fileName
<< " Status: " << f.status() << endl;
}
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorCol;
if (!m_doc->setContent( &f, &errorMsg, &errorLine, &errorCol ))
{
@@ -691,16 +691,16 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
}
f.close();
- QDomNodeList nodeList = m_doc->elementsByTagName("tag");
+ TQDomNodeList nodeList = m_doc->elementsByTagName("tag");
uint numOfTags = nodeList.count();
for (uint i = 0; i < numOfTags; i++)
{
- QDomNode n = nodeList.item(i);
- QDomElement e = n.toElement();
+ TQDomNode n = nodeList.item(i);
+ TQDomElement e = n.toElement();
if (e.attribute("type") == "class")
{
- QString extends = e.attribute("extends");
- QString name = e.attribute("name");
+ TQString extends = e.attribute("extends");
+ TQString name = e.attribute("name");
if (!name.isEmpty() && !extends.isEmpty())
parentDTD->classInheritance[name] = extends;
continue;
@@ -713,7 +713,7 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
setAttributes(&n, tag, common);
if (common)
{
- QString groupName = e.attribute("name");
+ TQString groupName = e.attribute("name");
AttributeList *attrs = tag->attributes();
attrs->setAutoDelete(false);
AttributeList *commonAttrList = new AttributeList; //no need to delete it
@@ -739,27 +739,27 @@ uint DTDs::readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *
/**
Parse the dom document and retrieve the tag attributes
*/
-void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
+void DTDs::setAttributes(TQDomNode *dom, QTag* tag, bool &common)
{
common = false;
Attribute *attr;
- QDomElement el = dom->toElement();
- QString tmpStr;
+ TQDomElement el = dom->toElement();
+ TQString tmpStr;
tmpStr = el.attribute("common");
if ((tmpStr != "1" && tmpStr != "yes")) //in case of common tags, we are not interested in these options
{
if (tag->parentDTD->commonAttrs)
{
- QDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs));
+ TQDictIterator<AttributeList> it(*(tag->parentDTD->commonAttrs));
for( ; it.current(); ++it )
{
- QString lookForAttr = "has" + QString(it.currentKey()).stripWhiteSpace();
+ TQString lookForAttr = "has" + TQString(it.currentKey()).stripWhiteSpace();
tmpStr = el.attribute(lookForAttr);
if (tmpStr == "1" || tmpStr == "yes")
{
- tag->commonGroups += QString(it.currentKey()).stripWhiteSpace();
+ tag->commonGroups += TQString(it.currentKey()).stripWhiteSpace();
}
}
}
@@ -790,20 +790,20 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
{
common = true;
}
- QString attrList;
- for ( QDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() )
+ TQString attrList;
+ for ( TQDomNode n = dom->firstChild(); !n.isNull(); n = n.nextSibling() )
{
tmpStr = n.nodeName();
if (tmpStr == "children")
{
- QDomElement el = n.toElement();
- QDomElement item = el.firstChild().toElement();
+ TQDomElement el = n.toElement();
+ TQDomElement item = el.firstChild().toElement();
while ( !item.isNull() )
{
tmpStr = item.tagName();
if (tmpStr == "child")
{
- QString childTag = item.attribute("name");
+ TQString childTag = item.attribute("name");
if (!tag->parentDTD->caseSensitive)
childTag = childTag.upper();
tag->childTags.insert(childTag, item.attribute("usage") == "required");
@@ -813,13 +813,13 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
} else
if (tmpStr == "stoppingtags") //read what tag can act as closing tag
{
- QDomElement el = n.toElement();
- QDomElement item = el.firstChild().toElement();
+ TQDomElement el = n.toElement();
+ TQDomElement item = el.firstChild().toElement();
while ( !item.isNull() )
{
if (item.tagName() == "stoppingtag")
{
- QString stopTag = item.attribute("name");
+ TQString stopTag = item.attribute("name");
if (!tag->parentDTD->caseSensitive)
stopTag = stopTag.upper();
tag->stoppingTags.append(stopTag);
@@ -829,7 +829,7 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
} else
if (tmpStr == "attr") //an attribute
{
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
attr = new Attribute;
attr->name = el.attribute("name");
attr->source = el.attribute("source");
@@ -842,9 +842,9 @@ void DTDs::setAttributes(QDomNode *dom, QTag* tag, bool &common)
attr->status = el.attribute("status");
if ( attr->type == "list" ) {
- for ( QDomElement attrEl = el.firstChild().toElement(); !attrEl.isNull(); attrEl = attrEl.nextSibling().toElement() ) {
+ for ( TQDomElement attrEl = el.firstChild().toElement(); !attrEl.isNull(); attrEl = attrEl.nextSibling().toElement() ) {
if ( attrEl.tagName() == "items" ) {
- QDomElement item = attrEl.firstChild().toElement();
+ TQDomElement item = attrEl.firstChild().toElement();
while ( !item.isNull() ) {
attr->values.append( item.text() );
item = item.nextSibling().toElement();
@@ -907,21 +907,21 @@ void DTDs::slotLoadDTD()
DTDParser dtdParser(url, KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
if (dtdParser.parse())
{
- QString dirName = dtdParser.dirName();
+ TQString dirName = dtdParser.dirName();
KConfig dtdcfg(dirName + m_rcFilename, true);
dtdcfg.setGroup("General");
- QString dtdName = dtdcfg.readEntry("Name");
- QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ TQString dtdName = dtdcfg.readEntry("Name");
+ TQString nickName = dtdcfg.readEntry("NickName", dtdName);
DTDStruct * dtd = m_dict->find(dtdName) ;
if (dtd &&
- KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
{
return;
}
removeDTD(dtd);
if (readTagDir(dirName))
{
- QString family = dtdcfg.readEntry("Family", "1");
+ TQString family = dtdcfg.readEntry("Family", "1");
Document *w = ViewManager::ref()->activeDocument();
if (family == "1" && w &&
KMessageBox::questionYesNo(0L, i18n("<qt>Use the newly loaded <b>%1</b> DTD for the current document?</qt>").arg(nickName), i18n("Change DTD"), i18n("Use"), i18n("Do Not Use")) == KMessageBox::Yes)
@@ -935,18 +935,18 @@ void DTDs::slotLoadDTD()
}
}
-void DTDs::slotLoadDTEP(const QString &_dirName, bool askForAutoload)
+void DTDs::slotLoadDTEP(const TQString &_dirName, bool askForAutoload)
{
- QString dirName = _dirName;
+ TQString dirName = _dirName;
if (!dirName.endsWith("/"))
dirName += "/";
KConfig dtdcfg(dirName + m_rcFilename, true);
dtdcfg.setGroup("General");
- QString dtdName = dtdcfg.readEntry("Name");
- QString nickName = dtdcfg.readEntry("NickName", dtdName);
+ TQString dtdName = dtdcfg.readEntry("Name");
+ TQString nickName = dtdcfg.readEntry("NickName", dtdName);
DTDStruct * dtd = m_dict->find(dtdName) ;
if ( dtd &&
- KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), QString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
+ KMessageBox::warningYesNo(0L, i18n("<qt>Do you want to replace the existing <b>%1</b> DTD?</qt>").arg(nickName), TQString::null, i18n("Replace"), i18n("Do Not Replace")) == KMessageBox::No)
{
return;
}
@@ -956,13 +956,13 @@ void DTDs::slotLoadDTEP(const QString &_dirName, bool askForAutoload)
KMessageBox::error(0L, i18n("<qt>Cannot read the DTEP from <b>%1</b>. Check that the folder contains a valid DTEP (<i>description.rc and *.tag files</i>).</qt>").arg(dirName), i18n("Error Loading DTEP"));
} else
{
- QString family = dtdcfg.readEntry("Family", "1");
- if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), QString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes)
+ TQString family = dtdcfg.readEntry("Family", "1");
+ if (askForAutoload && KMessageBox::questionYesNo(0L, i18n("<qt>Autoload the <b>%1</b> DTD in the future?</qt>").arg(nickName), TQString::null, i18n("Load"), i18n("Do Not Load")) == KMessageBox::Yes)
{
KURL src;
src.setPath(dirName);
KURL target;
- QString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ TQString destDir = KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
target.setPath(destDir + src.fileName());
KIO::copy( src, target, false); //don't care about the result
}
@@ -981,12 +981,12 @@ void DTDs::slotLoadEntities()
{
KDialogBase dlg(0L, "loadentities", true, i18n("Load DTD Entities Into DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
LoadEntityDlgS entitiesWidget(&dlg);
- QStringList lst(DTDs::ref()->nickNameList(true));
+ TQStringList lst(DTDs::ref()->nickNameList(true));
entitiesWidget.targetDTEPCombo->insertStringList(lst);
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
entitiesWidget.targetDTEPCombo->setCurrentItem(lst.findIndex(nickName));
}
dlg.setMainWidget(&entitiesWidget);
@@ -994,7 +994,7 @@ void DTDs::slotLoadEntities()
{
DTDStruct * dtd = m_dict->find(getDTDNameFromNickName(entitiesWidget.targetDTEPCombo->currentText()));
DTDParser dtdParser(KURL::fromPathOrURL(entitiesWidget.sourceDTDRequester->url()), KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep");
- QString dtdDir = QFileInfo(dtd->fileName).dirPath();
+ TQString dtdDir = TQFileInfo(dtd->fileName).dirPath();
if (dtdParser.parse(dtdDir, true))
{
readTagFile(dtdDir + "/entities.tag", dtd, dtd->tagsList);
@@ -1004,9 +1004,9 @@ void DTDs::slotLoadEntities()
/** Returns the DTD name (identifier) corresponding to the DTD's nickname */
-QString DTDs::getDTDNameFromNickName(const QString& nickName)
+TQString DTDs::getDTDNameFromNickName(const TQString& nickName)
{
- QDictIterator<DTDStruct> it(*m_dict);
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (it.current()->nickName.lower() == nickName.lower())
@@ -1018,10 +1018,10 @@ QString DTDs::getDTDNameFromNickName(const QString& nickName)
}
/** returns the known nick names */
-QStringList DTDs::nickNameList(bool topLevelOnly)
+TQStringList DTDs::nickNameList(bool topLevelOnly)
{
- QStringList nickList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nickList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1035,10 +1035,10 @@ QStringList DTDs::nickNameList(bool topLevelOnly)
/** returns the known names */
-QStringList DTDs::nameList(bool topLevelOnly)
+TQStringList DTDs::nameList(bool topLevelOnly)
{
- QStringList nameList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nameList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1050,10 +1050,10 @@ QStringList DTDs::nameList(bool topLevelOnly)
return nameList;
}
-QStringList DTDs::fileNameList(bool topLevelOnly)
+TQStringList DTDs::fileNameList(bool topLevelOnly)
{
- QStringList nameList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQStringList nameList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (!topLevelOnly || it.current()->toplevel)
@@ -1067,8 +1067,8 @@ QStringList DTDs::fileNameList(bool topLevelOnly)
const DTDStruct * DTDs::DTDforURL(const KURL &url)
{
- QValueList<DTDStruct*> foundList;
- QDictIterator<DTDStruct> it(*m_dict);
+ TQValueList<DTDStruct*> foundList;
+ TQDictIterator<DTDStruct> it(*m_dict);
for( ; it.current(); ++it )
{
if (it.current()->toplevel && canHandle(it.current(), url))
@@ -1080,7 +1080,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url)
return find("empty");
else
{
- QString path = url.path();
+ TQString path = url.path();
for (uint i = 0; i < foundList.count(); i++)
{
if (path.endsWith('.' + foundList[i]->defaultExtension))
@@ -1092,7 +1092,7 @@ const DTDStruct * DTDs::DTDforURL(const KURL &url)
bool DTDs::canHandle(const DTDStruct *dtd, const KURL &url)
{
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (dtd->mimeTypes.contains(mimetype))
return true;
if (url.path().endsWith('.' + dtd->defaultExtension))
diff --git a/quanta/src/dtds.h b/quanta/src/dtds.h
index 1e26f712..a56da5b1 100644
--- a/quanta/src/dtds.h
+++ b/quanta/src/dtds.h
@@ -22,11 +22,11 @@
// application specific includes
#include "qtag.h"
-#include "qobject.h"
-#include "qfile.h"
+#include "tqobject.h"
+#include "tqfile.h"
//qt includes
-#include <qdict.h>
+#include <tqdict.h>
//kde includes
#include <kdebug.h>
@@ -56,7 +56,7 @@ public:
* since this class is a singleton you must use this function to access it
* @return the class pointer
*/
- static DTDs* ref(QObject *parent = 0L)
+ static DTDs* ref(TQObject *parent = 0L)
{
static DTDs *m_ref;
if (!m_ref) m_ref = new DTDs(parent);
@@ -72,7 +72,7 @@ public:
* @param dtdName name of the dtd, will be converted to lowercase inside
* @return the found dtd structure
*/
- const DTDStruct * find (const QString &dtdName)
+ const DTDStruct * find (const TQString &dtdName)
{
// kdDebug(24000) << "dtds::find " << dtdName << endl;
DTDStruct *dtd = m_dict->find(dtdName.lower()) ;
@@ -84,13 +84,13 @@ public:
* @return the name (identifier) to the nickname. If the DTD is not found you get
* nickName back!
*/
- QString getDTDNameFromNickName(const QString& nickName);
+ TQString getDTDNameFromNickName(const TQString& nickName);
/**
* @param name name of the DTD
* @return the nickname to the name. If the DTD is not found you get
* name back!
*/
- QString getDTDNickNameFromName(const QString& name)
+ TQString getDTDNickNameFromName(const TQString& name)
{
DTDStruct *dtd = m_dict->find(name);
if ( dtd )
@@ -106,7 +106,7 @@ public:
* are included
* @return all known nick names
*/
- QStringList nickNameList (bool topLevelOnly=false);
+ TQStringList nickNameList (bool topLevelOnly=false);
/**
* creates a list of all available names
@@ -115,7 +115,7 @@ public:
* are included
* @return all known names
*/
- QStringList nameList (bool topLevelOnly=false);
+ TQStringList nameList (bool topLevelOnly=false);
/**
* creates a list with the path to the description.rc of all available DTEPs
*
@@ -124,7 +124,7 @@ public:
* @return a list with the name and the path to the description.rc of all available DTEPs in form of
* DTEPName | path to description.rc
*/
- QStringList fileNameList (bool topLevelOnly=false);
+ TQStringList fileNameList (bool topLevelOnly=false);
/** finds a dtd for a given url
@@ -153,7 +153,7 @@ public slots:
* the DTEP will be copied to the local resource directory and will be autoloaded on
* startup
*/
- void slotLoadDTEP(const QString& dirName, bool askForAutoLoad);
+ void slotLoadDTEP(const TQString& dirName, bool askForAutoLoad);
/**
* Loads (replaces) the entities for a DTEP.
@@ -170,7 +170,7 @@ signals:
/** Enable/disbale the idle timer*/
void enableIdleTimer(bool);
- void loadToolbarForDTD(const QString&);
+ void loadToolbarForDTD(const TQString&);
private:
@@ -178,7 +178,7 @@ private:
* If you need the class use DTDs::ref() for
* construction and reference
*/
- DTDs(QObject *parent);
+ DTDs(TQObject *parent);
/** Reads the tag files and the description.rc from tagDir in order to
@@ -188,7 +188,7 @@ private:
* @param loadAll true = all information and tags will be loaded now (@ref readTagDir2 will be called)
* @return true = no error
*/
- bool readTagDir(const QString &dirName, bool loadAll=true);
+ bool readTagDir(const TQString &dirName, bool loadAll=true);
/** Reads the tag files and the description.rc from tagDir in order to
* build up the internal DTD and tag structures.
@@ -212,7 +212,7 @@ private:
* @param tagList the list where the tags are inserted
* @return the number of read tags.
*/
- uint readTagFile(const QString& fileName, DTDStruct* parentDTD, QTagList *tagList);
+ uint readTagFile(const TQString& fileName, DTDStruct* parentDTD, QTagList *tagList);
/** Parses the dom document and retrieve the tag attributes
*
@@ -220,7 +220,7 @@ private:
* @param tag the QTag object that will be initialized by using the information in dom
* @param common will be true, if the tag is a just a list of common group attributes
*/
- void setAttributes(QDomNode *dom, QTag* tag, bool &common);
+ void setAttributes(TQDomNode *dom, QTag* tag, bool &common);
/** removes dtd from dictonary and deletes all components
*
* @param dtd the dtd to delete
@@ -228,10 +228,10 @@ private:
void removeDTD(DTDStruct *dtd);
/** helper to read the tag files */
- QDomDocument *m_doc;
+ TQDomDocument *m_doc;
/** dictonary with references to all DTD's in memory */
- QDict<DTDStruct> *m_dict;
+ TQDict<DTDStruct> *m_dict;
};
diff --git a/quanta/src/kqapp.cpp b/quanta/src/kqapp.cpp
index 6e7f02df..1bf2055d 100644
--- a/quanta/src/kqapp.cpp
+++ b/quanta/src/kqapp.cpp
@@ -16,7 +16,7 @@
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, US
*/
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -41,13 +41,13 @@ QuantaApp *quantaApp = 0L; //global pointer to the main application object
#define SPLASH_PICTURE "quantalogo"
KSplash::KSplash()
- : QFrame( 0L, QString("Quanta")+QUANTA_VERSION,
- QWidget::WStyle_NoBorder | QWidget::WStyle_Customize | WX11BypassWM)
+ : TQFrame( 0L, TQString("Quanta")+QUANTA_VERSION,
+ TQWidget::WStyle_NoBorder | TQWidget::WStyle_Customize | WX11BypassWM)
{
- QPixmap pm( UserIcon(SPLASH_PICTURE) );
+ TQPixmap pm( UserIcon(SPLASH_PICTURE) );
setBackgroundPixmap(pm);
- QRect desk = KGlobalSettings::splashScreenDesktopGeometry();
+ TQRect desk = KGlobalSettings::splashScreenDesktopGeometry();
setGeometry( desk.center().x()-225, desk.center().y()-150, 450, 300 );
setLineWidth(0);
show();
@@ -80,7 +80,7 @@ KQApplication::KQApplication()
KConfig *config = kapp->config();
config->setGroup("General Options");
int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
- QString layout = config->readEntry("Window layout", "Default");
+ TQString layout = config->readEntry("Window layout", "Default");
if (layout == "Default" || args->isSet("resetlayout"))
{
mdiMode = KMdi::IDEAlMode;
@@ -93,8 +93,8 @@ KQApplication::KQApplication()
{
sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
sp->show();
- connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
- QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ connect(quantaApp, TQT_SIGNAL(showSplash(bool)), sp, TQT_SLOT(setShown(bool)));
+ TQTimer::singleShot(10*1000, this, TQT_SLOT(slotSplashTimeout()));
}
setMainWidget(quantaApp);
slotInit();
@@ -151,7 +151,7 @@ int KQUniqueApplication::newInstance()
KConfig *config = kapp->config();
config->setGroup("General Options");
int mdiMode = config->readNumEntry("MDI mode", KMdi::IDEAlMode);
- QString layout = config->readEntry("Window layout", "Default");
+ TQString layout = config->readEntry("Window layout", "Default");
if (layout == "Default" || args->isSet("resetlayout"))
{
mdiMode = KMdi::IDEAlMode;
@@ -164,8 +164,8 @@ int KQUniqueApplication::newInstance()
{
sp = new KSplashScreen(UserIcon(SPLASH_PICTURE));
sp->show();
- connect(quantaApp, SIGNAL(showSplash(bool)), sp, SLOT(setShown(bool)));
- QTimer::singleShot(10*1000, this, SLOT(slotSplashTimeout()));
+ connect(quantaApp, TQT_SIGNAL(showSplash(bool)), sp, TQT_SLOT(setShown(bool)));
+ TQTimer::singleShot(10*1000, this, TQT_SLOT(slotSplashTimeout()));
}
setMainWidget(quantaApp);
slotInit();
@@ -197,13 +197,13 @@ void KQApplicationPrivate::init()
quantaApp->m_quantaInit->initQuanta();
quantaApp->show();
- QString initialProject;
- QStringList initialFiles;
+ TQString initialProject;
+ TQStringList initialFiles;
for (int i = 0; i < args->count(); i++ )
{
- QString arg = args->url(i).url();
+ TQString arg = args->url(i).url();
- if(arg.findRev(QRegExp(".+\\.webprj")) != -1)
+ if(arg.findRev(TQRegExp(".+\\.webprj")) != -1)
initialProject = arg;
else
initialFiles += arg;
@@ -212,7 +212,7 @@ void KQApplicationPrivate::init()
//recoverCrashed manages the autosaved copies
quantaApp->m_quantaInit->recoverCrashed(initialFiles);
- for(QStringList::Iterator it = initialFiles.begin();it != initialFiles.end();++it)
+ for(TQStringList::Iterator it = initialFiles.begin();it != initialFiles.end();++it)
{
KURL url;
QuantaCommon::setUrl(url, (*it));
diff --git a/quanta/src/kqapp.h b/quanta/src/kqapp.h
index 592d7cbc..1ecda501 100644
--- a/quanta/src/kqapp.h
+++ b/quanta/src/kqapp.h
@@ -19,7 +19,7 @@
#ifndef KQAPPLICATION_H
#define KQAPPLICATION_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kuniqueapplication.h>
class KCmdLineArgs;
diff --git a/quanta/src/main.cpp b/quanta/src/main.cpp
index 39672048..527c9956 100644
--- a/quanta/src/main.cpp
+++ b/quanta/src/main.cpp
@@ -28,11 +28,11 @@
#include <dcopref.h>
// qt includes
-#include <qpixmap.h>
-#include <qnetwork.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqpixmap.h>
+#include <tqnetwork.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
// app includes
#include "kqapp.h"
@@ -202,8 +202,8 @@ int main(int argc, char *argv[])
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
for (int i = 0; i < args->count(); i++)
{
- QString s = args->url(i).url();
- DCOPRef("quanta", "WindowManagerIf").call("openFile(QString, int, int)", s, 1, 1); // Activate it
+ TQString s = args->url(i).url();
+ DCOPRef("quanta", "WindowManagerIf").call("openFile(TQString, int, int)", s, 1, 1); // Activate it
}
DCOPRef("quanta", QUANTA_PACKAGE).call("newInstance()");
exit(0);
diff --git a/quanta/src/quanta.cpp b/quanta/src/quanta.cpp
index 596dc7e3..55be7e18 100644
--- a/quanta/src/quanta.cpp
+++ b/quanta/src/quanta.cpp
@@ -18,34 +18,34 @@
#include <time.h>
// include files for QT
-#include <qaction.h>
-#include <qdragobject.h>
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qwidgetstack.h>
-#include <qtabwidget.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qtabbar.h>
-#include <qradiobutton.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
-#include <qtextedit.h>
-#include <qiodevice.h>
-#include <qcombobox.h>
-#include <qdockarea.h>
-#include <qdom.h>
-#include <qspinbox.h>
-#include <qeventloop.h>
-#include <qfontmetrics.h>
-#include <qclipboard.h>
-#include <qptrlist.h>
-#include <qbuffer.h>
-#include <qdatetime.h>
+#include <tqaction.h>
+#include <tqdragobject.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqwidgetstack.h>
+#include <tqtabwidget.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqtabbar.h>
+#include <tqradiobutton.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
+#include <tqtextedit.h>
+#include <tqiodevice.h>
+#include <tqcombobox.h>
+#include <tqdockarea.h>
+#include <tqdom.h>
+#include <tqspinbox.h>
+#include <tqeventloop.h>
+#include <tqfontmetrics.h>
+#include <tqclipboard.h>
+#include <tqptrlist.h>
+#include <tqbuffer.h>
+#include <tqdatetime.h>
// include files for KDE
@@ -193,7 +193,7 @@
extern int NN;
-const QString resourceDir = QString(QUANTA_PACKAGE) + "/";
+const TQString resourceDir = TQString(QUANTA_PACKAGE) + "/";
// from kfiledialog.cpp - avoid qt warning in STDERR (~/.xsessionerrors)
static void silenceQToolBar(QtMsgType, const char *){}
@@ -212,10 +212,10 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_toolbarList.setAutoDelete(true);
userToolbarsCount = 0;
baseNode = 0L;
- currentToolbarDTD = QString::null;
+ currentToolbarDTD = TQString::null;
m_config=kapp->config();
- idleTimer = new QTimer(this);
- connect(idleTimer, SIGNAL(timeout()), SLOT(slotIdleTimerExpired()));
+ idleTimer = new TQTimer(this);
+ connect(idleTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotIdleTimerExpired()));
m_idleTimerEnabled = true;
qConfig.globalDataDir = KGlobal::dirs()->findResourceDir("data",resourceDir + "toolbar/quantalogo.png");
@@ -226,23 +226,23 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
kdWarning() << i18n("Quanta data files were not found.") << endl;
kdWarning() << i18n("You may have forgotten to run \"make install\", or your KDEDIR, KDEDIRS or PATH are not set correctly.") << endl;
kdWarning() << "***************************************************************************" << endl;
- QTimer::singleShot(20, kapp, SLOT(quit()));
+ TQTimer::singleShot(20, kapp, TQT_SLOT(quit()));
return;
}
qConfig.enableDTDToolbar = true;
// connect up signals from KXXsldbgPart
- connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(QString,int)", false );
- connectDCOPSignal(0, 0, "editorPositionChanged(QString,int,int)", "newCursorPosition(QString,int,int)", false );
- connectDCOPSignal(0, 0, "openFile(QString,int,int)", "openFile(QString,int,int)", false);
+ connectDCOPSignal(0, 0, "debuggerPositionChangedQString,int)", "newDebuggerPosition(TQString,int)", false );
+ connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false );
+ connectDCOPSignal(0, 0, "openFile(TQString,int,int)", "openFile(TQString,int,int)", false);
m_partManager = new KParts::PartManager(this);
// When the manager says the active part changes,
// the builder updates (recreates) the GUI
- connect(m_partManager, SIGNAL(activePartChanged(KParts::Part * )),
- this, SLOT(slotActivePartChanged(KParts::Part * )));
- connect(this, SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
- connect(tabWidget(), SIGNAL(initiateDrag(QWidget *)), this, SLOT(slotTabDragged(QWidget*)));
+ connect(m_partManager, TQT_SIGNAL(activePartChanged(KParts::Part * )),
+ this, TQT_SLOT(slotActivePartChanged(KParts::Part * )));
+ connect(this, TQT_SIGNAL(dockWidgetHasUndocked(KDockWidget *)), this, TQT_SLOT(slotDockWidgetHasUndocked(KDockWidget *)));
+ connect(tabWidget(), TQT_SIGNAL(initiateDrag(TQWidget *)), this, TQT_SLOT(slotTabDragged(TQWidget*)));
m_oldKTextEditor = 0L;
m_previewToolView = 0L;
@@ -258,7 +258,7 @@ QuantaApp::QuantaApp(int mdiMode) : DCOPObject("WindowManagerIf"), KMdiMainFrm(
m_parserEnabled = true;
cursorLine = 0;
cursorCol = 0;
- emit eventHappened("quanta_start", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ emit eventHappened("quanta_start", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
setAcceptDrops(true);
tabWidget()->installEventFilter(this);
}
@@ -276,9 +276,9 @@ QuantaApp::~QuantaApp()
m_newScriptStuff = 0L;
delete m_newDTEPStuff;
m_newDocStuff = 0L;
- // disconnect(m_htmlPart, SIGNAL(destroyed(QObject *)));
- // disconnect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)));
- disconnect(this, SIGNAL(lastChildViewClosed()), ViewManager::ref(), SLOT(slotLastViewClosed()));
+ // disconnect(m_htmlPart, TQT_SIGNAL(destroyed(TQObject *)));
+ // disconnect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)));
+ disconnect(this, TQT_SIGNAL(lastChildViewClosed()), ViewManager::ref(), TQT_SLOT(slotLastViewClosed()));
//kdDebug(24000) << "QuantaApp::~QuantaApp" << endl;
#ifdef ENABLE_CVSSERVICE
delete CVSService::ref();
@@ -305,7 +305,7 @@ QuantaApp::~QuantaApp()
KIO::NetAccess::del(KURL().fromPathOrURL(tempDirList.at(i)->name()), this);
}
tempDirList.clear();
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
ToolbarEntry *p_toolbar;
for( ; iter.current(); ++iter )
{
@@ -316,17 +316,17 @@ QuantaApp::~QuantaApp()
}
m_toolbarList.clear();
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
if (tmpDirs[i].contains("kde-"))
tmpDir = tmpDirs[i];
}
- QString infoCss = tmpDir;
+ TQString infoCss = tmpDir;
infoCss += "quanta/info.css";
- QFile::remove(infoCss);
- QDir dir;
+ TQFile::remove(infoCss);
+ TQDir dir;
dir.rmdir(tmpDir + "quanta");
delete dcopSettings;
@@ -336,9 +336,9 @@ QuantaApp::~QuantaApp()
kdDebug(24000) << "Undeleted node objects :" << NN << endl;
}
-void QuantaApp::setTitle(const QString& title)
+void QuantaApp::setTitle(const TQString& title)
{
- QString s = title;
+ TQString s = title;
if (Project::ref()->hasProject())
{
s = Project::ref()->projectName() + " : " + s;
@@ -353,8 +353,8 @@ void QuantaApp::slotFileNew()
void QuantaApp::slotFileOpen()
{
- QString myEncoding = defaultEncoding();
- QString startDir;
+ TQString myEncoding = defaultEncoding();
+ TQString startDir;
Document *w = ViewManager::ref()->activeDocument();
if (w && !w->isUntitled())
startDir = w->url().url();
@@ -367,7 +367,7 @@ void QuantaApp::slotFileOpen()
slotFileOpen(data.URLs, data.encoding);
}
-void QuantaApp::slotFileOpen(const KURL::List &urls, const QString& encoding)
+void QuantaApp::slotFileOpen(const KURL::List &urls, const TQString& encoding)
{
m_doc->blockSignals(true);
m_parserEnabled = false;
@@ -397,12 +397,12 @@ void QuantaApp::slotFileOpen(const KURL &url)
slotFileOpen(url, defaultEncoding());
}
-void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding)
+void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding)
{
m_doc->openDocument(url, encoding);
}
-void QuantaApp::slotFileOpen(const KURL &url, const QString& encoding, bool readOnly)
+void QuantaApp::slotFileOpen(const KURL &url, const TQString& encoding, bool readOnly)
{
m_doc->openDocument(url, encoding, true, readOnly);
}
@@ -412,7 +412,7 @@ void QuantaApp::slotFileOpenRecent(const KURL &url)
if (!QExtFileInfo::exists(url, true, this))
{
if (KMessageBox::questionYesNo(this,
- i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::del(), i18n("Keep"))
+ i18n("The file %1 does not exist.\n Do you want to remove it from the list?").arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::del(), i18n("Keep"))
== KMessageBox::Yes)
{
fileRecent->removeURL(url);
@@ -465,7 +465,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
}
//FIXME: in katepart changing encoding saves the original file if it was modified, so it's useless in saveas...
-// QString myEncoding = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc())->encoding();
+// TQString myEncoding = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc())->encoding();
bool gotPath = false;
@@ -511,7 +511,7 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
"all/allfiles text/html text/xml application/x-php text/plain", this, i18n("Save File"));
KURL saveUrl = data.URLs[0];
bool found;
- QString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
+ TQString encoding = KGlobal::charsets()->codecForName(data.encoding, found)->name();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf && encodingIf->encoding() != encoding)
encodingIf->setEncoding(encoding);
@@ -523,12 +523,12 @@ bool QuantaApp::slotFileSaveAs(QuantaView *viewToSave)
{
oldURL = saveUrl;
if (Project::ref()->hasProject() && !Project::ref()->contains(saveUrl) &&
- KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), QString::null, KStdGuiItem::add(), i18n("Do Not Add"))
+ KMessageBox::Yes == KMessageBox::questionYesNo(0,i18n("<qt>Do you want to add the<br><b>%1</b><br>file to project?</qt>").arg(saveUrl.prettyURL(0, KURL::StripFileProtocol)), TQString::null, KStdGuiItem::add(), i18n("Do Not Add"))
)
{
if (saveUrl.isLocalFile())
{
- QDir dir(saveUrl.path());
+ TQDir dir(saveUrl.path());
saveUrl.setPath(dir.canonicalPath());
}
Project::ref()->insertFile(saveUrl, true);
@@ -558,17 +558,17 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
int query;
KURL projectTemplateURL;
w->checkDirtyStatus();
- QString localTemplateDir = locateLocal("data", resourceDir + "templates/");
+ TQString localTemplateDir = locateLocal("data", resourceDir + "templates/");
do {
query = KMessageBox::Yes;
if (projectTemplate)
{
- url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), QString::null, this);
+ url = KFileDialog::getSaveURL(Project::ref()->templateURL().url(), TQString::null, this);
} else
{
- url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), QString::null, this);
+ url = KFileDialog::getSaveURL(locateLocal("data", resourceDir + "templates/"), TQString::null, this);
}
if (url.isEmpty()) return;
@@ -595,10 +595,10 @@ void QuantaApp::saveAsTemplate(bool projectTemplate, bool selectionOnly)
{
KTempFile *tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- QString content;
+ TQString content;
content = w->selectionIf->selection();
- QTextStream stream(tempFile->file());
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(tempFile->file());
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
stream << content;
tempFile->file()->flush();
tempFile->close();
@@ -703,15 +703,15 @@ void QuantaApp::slotEditFindInFiles()
void QuantaApp::slotHelpTip()
{
- KTipDialog::showTip(this, QString::null, true);
+ KTipDialog::showTip(this, TQString::null, true);
}
-void QuantaApp::slotStatusMsg(const QString &msg)
+void QuantaApp::slotStatusMsg(const TQString &msg)
{
statusbarTimer->stop();
statusBar()->changeItem(" " + KStringHandler::cPixelSqueeze(msg, statusBar()->fontMetrics(), progressBar->x() - 20), IDS_STATUS);
statusBar()->repaint();
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
statusbarTimer->start(10000, true);
}
@@ -733,14 +733,14 @@ void QuantaApp::slotRepaintPreview()
KParts::BrowserExtension *browserExtension = KParts::BrowserExtension::childObject(m_htmlPart);
KParts::URLArgs args(true, browserExtension->xOffset(), browserExtension->yOffset());
browserExtension->setURLArgs( args );
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
KURL url;
m_htmlPart->setEncoding(encoding, true);
- QStringList list;
+ TQStringList list;
if (m_noFramesPreview)
{
list = w->tagAreas("frameset", true, true);
@@ -749,19 +749,19 @@ void QuantaApp::slotRepaintPreview()
else
{
m_htmlPart->closeURL();
- QStringList noframearea = w->tagAreas("noframes", false, true);
+ TQStringList noframearea = w->tagAreas("noframes", false, true);
//find the frameset area
int bl, bc, el, ec;
- QStringList l = QStringList::split('\n', list[0], true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ TQStringList l = TQStringList::split('\n', list[0], true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
ec = coordList[3].toInt();
- QString noFramesText = w->text(0,0, bl, bc - 1);
+ TQString noFramesText = w->text(0,0, bl, bc - 1);
noFramesText += noframearea[0];
noFramesText += w->text(el, ec + 1, w->editIf->numLines() - 1, w->editIf->lineLength(w->editIf->numLines() - 1));
- noFramesText.replace(QRegExp("</?noframes[^>]*>", false), "");
+ noFramesText.replace(TQRegExp("</?noframes[^>]*>", false), "");
//kdDebug(24000) << "NOFRAMES: " << noFramesText << endl;
if (w->isUntitled())
m_htmlPart->begin(Project::ref()->projectBaseURL(), xOffset, yOffset);
@@ -779,7 +779,7 @@ void QuantaApp::slotRepaintPreview()
if (!m_noFramesPreview)
{
m_htmlPart->closeURL();
- QString text = w->editIf->text();
+ TQString text = w->editIf->text();
if (text.isEmpty())
{
text = i18n("<center><h3>The current document is empty...</h3></center>");
@@ -798,15 +798,15 @@ void QuantaApp::slotRepaintPreview()
previewURL.setFileName("preview-" + previewURL.fileName());
//save the content to disk, so preview with prefix works
KTempFile *tmpFile = new KTempFile(tmpDir);
- QString tempFileName = QFileInfo(*(tmpFile->file())).filePath();
+ TQString tempFileName = TQFileInfo(*(tmpFile->file())).filePath();
tmpFile->setAutoDelete(true);
- QString encoding = quantaApp->defaultEncoding();
+ TQString encoding = quantaApp->defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding.isEmpty())
encoding = "utf8"; //final fallback
- tmpFile->textStream()->setCodec(QTextCodec::codecForName(encoding));
+ tmpFile->textStream()->setCodec(TQTextCodec::codecForName(encoding));
*(tmpFile->textStream()) << w->editIf->text();
tmpFile->close();
if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFileName), previewURL, -1, true)) {
@@ -835,7 +835,7 @@ void QuantaApp::slotImageOpen(const KURL& url)
{
slotShowPreviewWidget(true);
WHTMLPart *part = m_htmlPart;
- QString text = "<html>\n<body>\n<div align=\"center\">\n<img src=\"";
+ TQString text = "<html>\n<body>\n<div align=\"center\">\n<img src=\"";
text += url.fileName(); //TODO
text += "\">\n</div>\n</body>\n</html>\n";
part->closeURL();
@@ -865,7 +865,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
baseURL.setFileName("");
}
KURL relURL = QExtFileInfo::toRelative(url, baseURL);
- QString urlStr = relURL.url();
+ TQString urlStr = relURL.url();
if (relURL.protocol() == baseURL.protocol())
urlStr = relURL.path();
bool isImage = false;
@@ -875,18 +875,18 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
w->insertTag(dirInfo.preText+urlStr+dirInfo.postText);
} else
{
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (mimetype.contains("image"))
{
- QString imgFileName;
+ TQString imgFileName;
KIO::NetAccess::download(url, imgFileName, this);
- QImage img(imgFileName);
+ TQImage img(imgFileName);
if (!img.isNull())
{
- QString width,height;
+ TQString width,height;
width.setNum(img.width());
height.setNum(img.height());
- QString imgTag = QuantaCommon::tagCase("<img ");
+ TQString imgTag = QuantaCommon::tagCase("<img ");
imgTag += QuantaCommon::attrCase("src=");
imgTag += QuantaCommon::quoteAttributeValue(urlStr);
imgTag += QuantaCommon::attrCase(" width=");
@@ -904,7 +904,7 @@ void QuantaApp::slotInsertTag(const KURL& url, DirInfo dirInfo)
}
if (!isImage)
{
- QString tag = QuantaCommon::tagCase("<a ");
+ TQString tag = QuantaCommon::tagCase("<a ");
tag += QuantaCommon::attrCase("href=");
tag += QuantaCommon::quoteAttributeValue(urlStr);
tag += ">";
@@ -955,14 +955,14 @@ void QuantaApp::slotOptionsConfigureKeys()
{
Document *w = ViewManager::ref()->activeDocument();
KKeyDialog dlg( false, this );
- QPtrList<KXMLGUIClient> toolbarGuiClients;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQPtrList<KXMLGUIClient> toolbarGuiClients;
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
toolbarGuiClients.append(iter.current()->guiClient);
}
- QPtrList<KXMLGUIClient> clients = guiFactory()->clients();
- for( QPtrListIterator<KXMLGUIClient> it( clients );
+ TQPtrList<KXMLGUIClient> clients = guiFactory()->clients();
+ for( TQPtrListIterator<KXMLGUIClient> it( clients );
it.current(); ++it )
{
if (toolbarGuiClients.contains(*it) <= 0) //no need to insert the collections of the toolbars as they are present in the main actionCollection
@@ -972,9 +972,9 @@ void QuantaApp::slotOptionsConfigureKeys()
{
// this is needed for when we have multiple embedded kateparts and change one of them.
// it also needs to be done to their views, as they too have actioncollections to update
- if (const QPtrList<KParts::Part> * partlist = m_partManager->parts())
+ if (const TQPtrList<KParts::Part> * partlist = m_partManager->parts())
{
- QPtrListIterator<KParts::Part> it(*partlist);
+ TQPtrListIterator<KParts::Part> it(*partlist);
while (KParts::Part* part = it.current())
{
if (KTextEditor::Document *doc = dynamic_cast<KTextEditor::Document*>(part))
@@ -990,8 +990,8 @@ void QuantaApp::slotOptionsConfigureKeys()
}
doc->reloadXML();
- QPtrList<KTextEditor::View> const & list = doc->views();
- QPtrListIterator<KTextEditor::View> itt( list );
+ TQPtrList<KTextEditor::View> const & list = doc->views();
+ TQPtrListIterator<KTextEditor::View> itt( list );
while (KTextEditor::View * view = itt.current())
{
if (!w || w->view() != view)
@@ -1010,10 +1010,10 @@ void QuantaApp::slotOptionsConfigureKeys()
}
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(KXMLGUIFactory::readConfigFile(xmlFile(), instance()));
- QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
- QDomNode node = nodeList.item(0).firstChild();
+ TQDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ TQDomNode node = nodeList.item(0).firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
@@ -1022,7 +1022,7 @@ void QuantaApp::slotOptionsConfigureKeys()
if (action)
{
action->setModified(true);
- QDomElement el = action->data();
+ TQDomElement el = action->data();
el.setAttribute("shortcut", action->shortcut().toString());
el = node.toElement();
node = node.nextSibling();
@@ -1036,10 +1036,10 @@ void QuantaApp::slotOptionsConfigureKeys()
}
}
-void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
+void QuantaApp::slotConfigureToolbars(const TQString& defaultToolbar)
{
currentPageIndex = ToolbarTabWidget::ref()->currentPageIndex();
- QDomNodeList nodeList;
+ TQDomNodeList nodeList;
ToolbarEntry *p_toolbar = 0L;
saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
@@ -1065,7 +1065,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
}
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QString toolbarId;
+ TQString toolbarId;
for (int i = 0; i < tb->count(); i++)
{
toolbarId = tb->id(i);
@@ -1077,12 +1077,12 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
}
- connect(dlg, SIGNAL(newToolbarConfig()), SLOT(slotNewToolbarConfig()));
+ connect(dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(slotNewToolbarConfig()));
dlg->exec();
delete dlg;
- QPopupMenu *menu = 0L;
- m_tagsMenu = static_cast<QPopupMenu*>(factory()->container("tags", this));
- QString toolbarName;
+ TQPopupMenu *menu = 0L;
+ m_tagsMenu = static_cast<TQPopupMenu*>(factory()->container("tags", this));
+ TQString toolbarName;
for (int i = 0; i < tb->count(); i++)
{
toolbarName = tb->label(i);
@@ -1090,7 +1090,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
p_toolbar = quantaApp->m_toolbarList[toolbarId];
if (p_toolbar)
{
- menu = new QPopupMenu(m_tagsMenu);
+ menu = new TQPopupMenu(m_tagsMenu);
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
for (uint i = 0; i < nodeList.count(); i++)
{
@@ -1105,7 +1105,7 @@ void QuantaApp::slotConfigureToolbars(const QString& defaultToolbar)
}
//add back the menus
- m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(factory()->container("plugins", this)));
+ m_pluginInterface->setPluginMenu(static_cast<TQPopupMenu*>(factory()->container("plugins", this)));
m_pluginInterface->buildPluginMenu();
for (uint i = 0 ; i < mb->count(); i++)
{
@@ -1161,8 +1161,8 @@ void QuantaApp::slotOptions()
KDialogBase::Ok, this, "tabdialog");
// Tag Style options
- QVBox *page=kd->addVBoxPage(i18n("Tag Style"), QString::null, BarIcon("kwrite", KIcon::SizeMedium));
- StyleOptionsS *styleOptionsS = new StyleOptionsS( (QWidget *)page);
+ TQVBox *page=kd->addVBoxPage(i18n("Tag Style"), TQString::null, BarIcon("kwrite", KIcon::SizeMedium));
+ StyleOptionsS *styleOptionsS = new StyleOptionsS( (TQWidget *)page);
styleOptionsS->tagCase->setCurrentItem( qConfig.tagCase);
styleOptionsS->attributeCase->setCurrentItem( qConfig.attrCase);
@@ -1175,8 +1175,8 @@ void QuantaApp::slotOptions()
// Environment options
//TODO FileMasks name is not good anymore
- page=kd->addVBoxPage(i18n("Environment"), QString::null, UserIcon("files", KIcon::SizeMedium ) );
- FileMasks *fileMasks = new FileMasks((QWidget *)page);
+ page=kd->addVBoxPage(i18n("Environment"), TQString::null, UserIcon("files", KIcon::SizeMedium ) );
+ FileMasks *fileMasks = new FileMasks((TQWidget *)page);
fileMasks->lineMarkup->setText( qConfig.markupMimeTypes );
fileMasks->lineScript->setText( qConfig.scriptMimeTypes );
@@ -1191,9 +1191,9 @@ void QuantaApp::slotOptions()
fileMasks->sbAutoSave->setValue(m_config->readNumEntry("Autosave interval"));
//else default value 15
- QStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
+ TQStringList availableEncodingNames(KGlobal::charsets()->availableEncodingNames());
fileMasks->encodingCombo->insertStringList( availableEncodingNames );
- QStringList::ConstIterator iter;
+ TQStringList::ConstIterator iter;
int iIndex = -1;
for (iter = availableEncodingNames.begin(); iter != availableEncodingNames.end(); ++iter)
{
@@ -1204,7 +1204,7 @@ void QuantaApp::slotOptions()
break;
}
}
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQStringList lst = DTDs::ref()->nickNameList(true);
uint pos = 0;
for (uint i = 0; i < lst.count(); i++)
{
@@ -1215,8 +1215,8 @@ void QuantaApp::slotOptions()
fileMasks->defaultDTDCombo->setCurrentItem(pos);
// Preview options
- page=kd->addVBoxPage(i18n("User Interface"), QString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
- PreviewOptions *uiOptions = new PreviewOptions( (QWidget *)page );
+ page=kd->addVBoxPage(i18n("User Interface"), TQString::null, BarIcon("view_choose", KIcon::SizeMedium ) );
+ PreviewOptions *uiOptions = new PreviewOptions( (TQWidget *)page );
uiOptions->setPosition(qConfig.previewPosition);
uiOptions->setDocPosition(qConfig.docPosition);
@@ -1238,11 +1238,11 @@ void QuantaApp::slotOptions()
uiOptions->warnEventActions->setChecked(true);
}
//kafka options
- page = kd->addVBoxPage(i18n("VPL View"), QString::null, UserIcon("vpl_text", KIcon::SizeMedium));
- KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (QWidget *)page );
+ page = kd->addVBoxPage(i18n("VPL View"), TQString::null, UserIcon("vpl_text", KIcon::SizeMedium));
+ KafkaSyncOptions *kafkaOptions = new KafkaSyncOptions( m_config, (TQWidget *)page );
- page=kd->addVBoxPage(i18n("Parser"), QString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
- ParserOptions *parserOptions = new ParserOptions( m_config, (QWidget *)page );
+ page=kd->addVBoxPage(i18n("Parser"), TQString::null, BarIcon("kcmsystem", KIcon::SizeMedium ) );
+ ParserOptions *parserOptions = new ParserOptions( m_config, (TQWidget *)page );
parserOptions->refreshFrequency->setValue(qConfig.refreshFrequency);
parserOptions->instantUpdate->setChecked(qConfig.instantUpdate);
@@ -1250,8 +1250,8 @@ void QuantaApp::slotOptions()
parserOptions->showClosingTags->setChecked(qConfig.showClosingTags);
parserOptions->spinExpand->setValue(qConfig.expandLevel);
- page = kd->addVBoxPage(i18n("Abbreviations"), QString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
- AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((QWidget*)(page));
+ page = kd->addVBoxPage(i18n("Abbreviations"), TQString::null, BarIcon("fontsizeup", KIcon::SizeMedium));
+ AbbreviationDlg *abbreviationOptions = new AbbreviationDlg((TQWidget*)(page));
bool reloadTrees = false;
kd->adjustSize();
@@ -1282,7 +1282,7 @@ void QuantaApp::slotOptions()
m_config->writeEntry("Reload Files", fileMasks->reloadFiles->isChecked());
qConfig.defaultEncoding = fileMasks->encodingCombo->currentText();
- QString tmpStr = uiOptions->closeButtons();
+ TQString tmpStr = uiOptions->closeButtons();
if (tmpStr != qConfig.showCloseButtons)
uiRebuildNeeded = true;
qConfig.showCloseButtons = tmpStr;
@@ -1379,14 +1379,14 @@ void QuantaApp::slotShowPreviewWidget(bool show)
{
delete m_previewToolView;
m_previewToolView = 0L;
- view->addCustomWidget(m_htmlPart->view(), QString::null);
+ view->addCustomWidget(m_htmlPart->view(), TQString::null);
} else
{
if (!m_previewToolView)
{
m_previewToolView= addToolWindow(m_htmlPart->view(), prevDockPosition(m_htmlPart->view(), KDockWidget::DockBottom), getMainDockWidget());
- connect(m_previewToolView->wrapperWidget(), SIGNAL(iMBeingClosed
-()), this, SLOT(slotPreviewBeingClosed()));
+ connect(m_previewToolView->wrapperWidget(), TQT_SIGNAL(iMBeingClosed
+()), this, TQT_SLOT(slotPreviewBeingClosed()));
}
m_htmlPart->view()->show();
m_previewToolView->show();
@@ -1397,12 +1397,12 @@ void QuantaApp::slotShowPreviewWidget(bool show)
{
m_noFramesPreview = false;
m_previewVisible = false;
- m_htmlPart->view()->reparent(this, 0, QPoint(), false);
+ m_htmlPart->view()->reparent(this, 0, TQPoint(), false);
m_htmlPart->view()->resize(0, 0);
m_htmlPart->view()->hide();
if (qConfig.previewPosition == "Editor")
{
- view->addCustomWidget(0L, QString::null);
+ view->addCustomWidget(0L, TQString::null);
delete m_previewToolView;
m_previewToolView = 0L;
} else
@@ -1504,25 +1504,25 @@ void QuantaApp::slotShowNoFramesPreview()
}
-void QuantaApp::newCursorPosition(const QString &file, int lineNumber, int columnNumber)
+void QuantaApp::newCursorPosition(const TQString &file, int lineNumber, int columnNumber)
{
Q_UNUSED(file);
typingInProgress = true;
startIdleTimer();
// updateTreeViews();
- QString linenumber;
+ TQString linenumber;
linenumber = i18n("Line: %1 Col: %2").arg(lineNumber).arg(columnNumber);
statusBar()->changeItem(linenumber, IDS_STATUS_CLM);
statusBar()->changeItem(i18n(" R/O "),IDS_INS_OVR);
statusBar()->changeItem("",IDS_MODIFIED);
}
-void QuantaApp::newDebuggerPosition(const QString &file, int lineNumber)
+void QuantaApp::newDebuggerPosition(const TQString &file, int lineNumber)
{
newCursorPosition(file, lineNumber, 0);
}
-void QuantaApp::openFile(const QString &file, int lineNumber, int columnNumber)
+void QuantaApp::openFile(const TQString &file, int lineNumber, int columnNumber)
{
gotoFileAndLine(file, lineNumber, columnNumber);
slotNewStatus();
@@ -1533,7 +1533,7 @@ void QuantaApp::slotNewLineColumn()
typingInProgress = true;
startIdleTimer();
// updateTreeViews();
- QString linenumber;
+ TQString linenumber;
oldCursorLine = cursorLine;
oldCursorCol = cursorCol;
Document *w = ViewManager::ref()->activeDocument();
@@ -1648,7 +1648,7 @@ void QuantaApp::setCursorPosition( int row, int col )
}
}
-void QuantaApp::gotoFileAndLine(const QString& filename, int line, int column)
+void QuantaApp::gotoFileAndLine(const TQString& filename, int line, int column)
{
// First, check if we're already showing this file
Document *w = ViewManager::ref()->activeDocument();
@@ -1707,7 +1707,7 @@ void QuantaApp::selectArea(int line1, int col1, int line2, int col2)
}
}
-void QuantaApp::openDoc(const QString& url)
+void QuantaApp::openDoc(const TQString& url)
{
if (qConfig.docPosition == "Tab")
{
@@ -1727,7 +1727,7 @@ void QuantaApp::openDoc(const QString& url)
}
m_htmlPartDoc->view()->setFocus(); // activates the part
- QString urlStr = url;
+ TQString urlStr = url;
if (urlStr.startsWith("/"))
urlStr.prepend("file:");
KURL u(urlStr);
@@ -1745,7 +1745,7 @@ void QuantaApp::slotContextHelp()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString currentWord = "";
+ TQString currentWord = "";
parser->setSAParserEnabled(false);
reparse(true);
parser->setSAParserEnabled(true);
@@ -1760,7 +1760,7 @@ void QuantaApp::slotContextHelp()
currentWord = w->currentWord();
}
const DTDStruct *dtd = w->currentDTD(true);
- QString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
+ TQString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
if (url)
openDoc(*url);
}
@@ -1781,26 +1781,26 @@ void QuantaApp::slotShowAnnotationView()
makeDockVisible(dynamic_cast<KDockWidget*>(m_annotationOutputView->wrapperWidget()));
}
-QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomElement &element, int &id )
+TQWidget* QuantaApp::createContainer( TQWidget *parent, int index, const TQDomElement &element, int &id )
{
- QString tabname = element.attribute( "i18ntabname", "" );
- QString idStr = element.attribute( "id", "" );
+ TQString tabname = element.attribute( "i18ntabname", "" );
+ TQString idStr = element.attribute( "id", "" );
if ( element.tagName().lower() == "toolbar" && !tabname.isEmpty())
{
-//avoid QToolBar warning in the log
+//avoid TQToolBar warning in the log
QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
- QWidget *w = new QWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
+ TQWidget *w = new TQWidget(toolbarTab, "ToolbarHoldingWidget" + element.attribute("name"));
QuantaToolBar *tb = new QuantaToolBar(w, element.attribute("name"), true, true);
tb->loadState(element);
- tb->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum);
+ tb->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
//kdDebug(24000) << "tb->iconSize() " << tb->iconSize() << endl;
if (toolbarTab->iconText() == KToolBar::IconTextBottom)
{
- tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
+ tb->setGeometry(0,0, toolbarTab->width(), tb->iconSize() + TQFontMetrics(KGlobalSettings::toolBarFont()).height() + 10);
toolbarTab->setFixedHeight(toolbarTab->tabHeight() + tb->height() + 3);
} else
{
@@ -1815,10 +1815,10 @@ QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomEleme
toolbarTab->insertTab(tb, tabname, idStr);
qInstallMsgHandler( oldHandler );
- connect(tb, SIGNAL(removeAction(const QString&, const QString&)),
- SLOT(slotRemoveAction(const QString&, const QString&)));
- connect(tb, SIGNAL(editAction(const QString&)),
- SLOT(slotEditAction(const QString&)));
+ connect(tb, TQT_SIGNAL(removeAction(const TQString&, const TQString&)),
+ TQT_SLOT(slotRemoveAction(const TQString&, const TQString&)));
+ connect(tb, TQT_SIGNAL(editAction(const TQString&)),
+ TQT_SLOT(slotEditAction(const TQString&)));
return tb;
}
@@ -1826,7 +1826,7 @@ QWidget* QuantaApp::createContainer( QWidget *parent, int index, const QDomEleme
}
-void QuantaApp::removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id )
+void QuantaApp::removeContainer( TQWidget *container, TQWidget *parent, TQDomElement &element, int id )
{
if (dynamic_cast<QuantaToolBar*>(container))
{
@@ -1880,11 +1880,11 @@ void QuantaApp::slotContextMenuAboutToShow()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QPopupMenu *popup = static_cast<QPopupMenu*>(factory()->container("popup_editor",this));
- QString name;
+ TQPopupMenu *popup = static_cast<TQPopupMenu*>(factory()->container("popup_editor",this));
+ TQString name;
uint line, col;
int bl, bc, el, ec;
- QString tagStr;
+ TQString tagStr;
w->viewCursorIf->cursorPositionReal(&line, &col);
Node *node = parser->nodeAt(line, col, false);
if (node)
@@ -1907,10 +1907,10 @@ void QuantaApp::slotContextMenuAboutToShow()
pos = group.definitionRx.search(node->tag->cleanStr, pos);
if (pos != -1)
{
- QString cleanName = node->tag->cleanStr.mid(pos, group.definitionRx.matchedLength());
+ TQString cleanName = node->tag->cleanStr.mid(pos, group.definitionRx.matchedLength());
name = tagStr.mid(pos, group.definitionRx.matchedLength());
node->tag->beginPos(bl, bc);
- QString tmpStr = tagStr.left(pos);
+ TQString tmpStr = tagStr.left(pos);
int newLines = tmpStr.contains('\n');
bl += newLines;
int l = tmpStr.findRev('\n'); //the last EOL
@@ -1942,7 +1942,7 @@ void QuantaApp::slotContextMenuAboutToShow()
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
+ TQMap<TQString, XMLStructGroup>::ConstIterator it = node->tag->dtd()->xmlStructTreeGroups.find(node->tag->name.lower());
if (it != node->tag->dtd()->xmlStructTreeGroups.constEnd())
{
@@ -1986,7 +1986,7 @@ void QuantaApp::slotContextMenuAboutToShow()
if(debugger() && debugger()->hasClient())
{
int startpos;
- QString word;
+ TQString word;
// If we have a selection made, thats what we want to use for watching, setting etc
if (w->selectionIf && w->selectionIf->hasSelection())
@@ -1997,13 +1997,13 @@ void QuantaApp::slotContextMenuAboutToShow()
{
// Otherwise, find the word under the cursor
word = w->editIf->textLine(w->viewCursorIf->cursorLine());
- startpos = word.findRev(QRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
+ startpos = word.findRev(TQRegExp("$|[^a-zA-Z0-9_]"), w->viewCursorIf->cursorColumn());
word.remove(0, startpos);
if(word.left(1) != "$")
word.remove(0, 1);
- word = word.left(word.find(QRegExp("[^a-zA-Z0-9_]"), 1));
+ word = word.left(word.find(TQRegExp("[^a-zA-Z0-9_]"), 1));
}
// If we have a linebreak, take everything before the break
startpos = word.find("\n");
@@ -2095,7 +2095,7 @@ void QuantaApp::slotOpenFileUnderCursor()
/** Load an user toolbar file from the disk. */
void QuantaApp::slotLoadToolbarFile(const KURL& url)
{
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
ToolbarEntry *p_toolbar;
while (it.current())
{
@@ -2104,31 +2104,31 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
if (url == p_toolbar->url)
return;
}
- QDomDocument actionDom;
+ TQDomDocument actionDom;
- QTextStream str;
- str.setEncoding(QTextStream::UnicodeUTF8);
- QString fileName = url.path();
+ TQTextStream str;
+ str.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString fileName = url.path();
if ( url.fileName().endsWith(toolbarExtension) )
{
- QDomDocument *toolbarDom = new QDomDocument();
+ TQDomDocument *toolbarDom = new TQDomDocument();
//extract the files from the archives
KTar tar(fileName);
if (tar.open(IO_ReadOnly))
{
- QString base = QFileInfo(fileName).baseName();
+ TQString base = TQFileInfo(fileName).baseName();
KArchiveFile* file = (KArchiveFile *) tar.directory()->entry(base+".toolbar");
if (file)
{
- QIODevice *device = file->device();
+ TQIODevice *device = file->device();
toolbarDom->setContent(device);
delete device;
}
file = (KArchiveFile *) tar.directory()->entry(base+".actions");
if (file)
{
- QIODevice *device = file->device();
+ TQIODevice *device = file->device();
actionDom.setContent(device);
delete device;
}
@@ -2142,14 +2142,14 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
return;
}
- QDomNodeList nodeList = toolbarDom->elementsByTagName("ToolBar");
- QString name = nodeList.item(0).cloneNode().toElement().attribute("tabname");
+ TQDomNodeList nodeList = toolbarDom->elementsByTagName("ToolBar");
+ TQString name = nodeList.item(0).cloneNode().toElement().attribute("tabname");
//search for another toolbar with the same name
- QPtrList<KXMLGUIClient> xml_clients = guiFactory()->clients();
- QString newName = name;
- QString i18nName = i18n(name.utf8());
- QString origName = name;
+ TQPtrList<KXMLGUIClient> xml_clients = guiFactory()->clients();
+ TQString newName = name;
+ TQString i18nName = i18n(name.utf8());
+ TQString origName = name;
bool found = false;
bool nameModified = false;
int count = 2;
@@ -2166,8 +2166,8 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
{
if ((nodeList.item(i).cloneNode().toElement().attribute("name").lower() ) == name.lower())
{
- newName = origName + QString(" (%1)").arg(count);
- i18nName = i18n(origName.utf8()) + QString(" (%1)").arg(count);
+ newName = origName + TQString(" (%1)").arg(count);
+ i18nName = i18n(origName.utf8()) + TQString(" (%1)").arg(count);
nameModified = true;
count++;
found = true;
@@ -2187,19 +2187,19 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
p_toolbar = new ToolbarEntry;
- QDomDocument *dom = new QDomDocument();
+ TQDomDocument *dom = new TQDomDocument();
dom->setContent(toolbarDom->toString());
p_toolbar->dom = dom;
p_toolbar->nameModified = nameModified;
- QString s = i18nName.lower();
- QString toolbarId = s;
- QRegExp rx("\\s|\\.");
+ TQString s = i18nName.lower();
+ TQString toolbarId = s;
+ TQRegExp rx("\\s|\\.");
toolbarId.replace(rx, "_");
int n = 1;
while (m_toolbarList.find(toolbarId) != 0L)
{
- toolbarId = s + QString("%1").arg(n);
+ toolbarId = s + TQString("%1").arg(n);
toolbarId.replace(rx, "_");
n++;
}
@@ -2212,14 +2212,14 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
tempFile->setAutoDelete(true);
nodeList = toolbarDom->elementsByTagName("ToolBar");
- QDomElement el = nodeList.item(0).toElement();
+ TQDomElement el = nodeList.item(0).toElement();
el.setAttribute("name", name.lower());
el.setAttribute("tabname", name);
el.setAttribute("i18ntabname", i18nName);
el.setAttribute("id", toolbarId);
nodeList = toolbarDom->elementsByTagName("text");
el.firstChild().setNodeValue(name);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
* (tempFile->textStream()) << toolbarDom->toString();
tempFile->close();
@@ -2230,9 +2230,9 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
nodeList = actionDom.elementsByTagName("action");
for (uint i = 0; i < nodeList.count(); i++)
{
- QDomNode node = nodeList.item(i).cloneNode();
+ TQDomNode node = nodeList.item(i).cloneNode();
el = node.toElement();
- QString actionName = el.attribute("name");
+ TQString actionName = el.attribute("name");
//if there is no such action yet, add to the available actions
if (!actionCollection()->action(actionName))
{
@@ -2241,7 +2241,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
m_tagActions.append(tagAction);
//add the actions to every toolbar xmlguiclient
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->insert(tagAction);
@@ -2272,7 +2272,7 @@ void QuantaApp::slotLoadToolbarFile(const KURL& url)
guiFactory()->addClient(toolbarGUI);
//Plug in the actions & build the menu
- QPopupMenu *menu = new QPopupMenu;
+ TQPopupMenu *menu = new QPopupMenu;
KAction *action;
nodeList = toolbarGUI->domDocument().elementsByTagName("Action");
for (uint i = 0; i < nodeList.count(); i++)
@@ -2317,8 +2317,8 @@ void QuantaApp::showToolbarFile(const KURL &url)
}
} else
{
- QDomNodeList nodeList;
- QPopupMenu *menu = new QPopupMenu;
+ TQDomNodeList nodeList;
+ TQPopupMenu *menu = new QPopupMenu;
KAction *action;
KActionCollection *ac = actionCollection();
nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("Action");
@@ -2360,7 +2360,7 @@ void QuantaApp::slotLoadGlobalToolbar()
}
}
-KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFile)
+KURL QuantaApp::saveToolbarToFile(const TQString& toolbarName, const KURL& destFile)
{
KURL tarFile = destFile;
@@ -2369,24 +2369,24 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
tarFile.setFileName(destFile.fileName() + toolbarExtension);
}
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open(IO_ReadWrite);
- QString toolStr;
- QTextStream toolStream(&toolStr, IO_ReadWrite);
- toolStream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString toolStr;
+ TQTextStream toolStream(&toolStr, IO_ReadWrite);
+ toolStream.setEncoding(TQTextStream::UnicodeUTF8);
- QBuffer buffer2;
+ TQBuffer buffer2;
buffer2.open(IO_WriteOnly);
- QTextStream actStr(&buffer2);
- actStr.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream actStr(&buffer2);
+ actStr.setEncoding(TQTextStream::UnicodeUTF8);
- QDomNodeList nodeList, nodeList2;
+ TQDomNodeList nodeList, nodeList2;
toolStream << "<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n";
- actStr << QString("<!DOCTYPE actionsconfig>\n<actions>\n");
+ actStr << TQString("<!DOCTYPE actionsconfig>\n<actions>\n");
//look up the clients
- QPtrList<KXMLGUIClient> xml_clients = factory()->clients();
+ TQPtrList<KXMLGUIClient> xml_clients = factory()->clients();
for (uint index = 0; index < xml_clients.count(); index++)
{
nodeList = xml_clients.at(index)->domDocument().elementsByTagName("ToolBar");
@@ -2397,10 +2397,10 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
{
//find the actions registered to the toolbar
- QDomNode n = nodeList.item(i).firstChild();
+ TQDomNode n = nodeList.item(i).firstChild();
while (! n.isNull())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.tagName() == "Action")
{
TagAction *action = dynamic_cast<TagAction*>(actionCollection()->action(e.attribute("name")));
@@ -2416,9 +2416,9 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
n = n.nextSibling();
}
- QDomElement e = nodeList.item(0).toElement();
- QString i18nName = e.attribute("i18ntabname");
- QString id = e.attribute("id");
+ TQDomElement e = nodeList.item(0).toElement();
+ TQString i18nName = e.attribute("i18ntabname");
+ TQString id = e.attribute("id");
e.removeAttribute("i18ntabname");
e.removeAttribute("id");
nodeList.item(i).save(toolStream,2);
@@ -2427,22 +2427,22 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
}
}
- toolStream << QString("\n</kpartgui>");
- actStr << QString("\n</actions>");
+ toolStream << TQString("\n</kpartgui>");
+ actStr << TQString("\n</actions>");
//buffer.flush();
ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
- QDomDocument *oldDom = p_toolbar->dom;
- QDomDocument *dom = new QDomDocument();
- QString s = toolStr;
- QString error;
+ TQDomDocument *oldDom = p_toolbar->dom;
+ TQDomDocument *dom = new TQDomDocument();
+ TQString s = toolStr;
+ TQString error;
int el, ec;
if (!dom->setContent(s, &error, &el, &ec))
- kdError(24000) << QString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3)").arg(error).arg(el).arg(ec)<<endl;
p_toolbar->dom = dom;
- QTextStream bufferStr(&buffer);
- bufferStr.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream bufferStr(&buffer);
+ bufferStr.setEncoding(TQTextStream::UnicodeUTF8);
bufferStr << toolStr;
buffer.close();
buffer2.close();
@@ -2453,9 +2453,9 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
KTar tar(tempFile->name(), "application/x-gzip");
if (!tar.open(IO_WriteOnly))
return KURL();
- if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".toolbar", "user", "group", buffer.buffer().size(), buffer.buffer().data()))
+ if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".toolbar", "user", "group", buffer.buffer().size(), buffer.buffer().data()))
return KURL();
- if (!tar.writeFile(QFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
+ if (!tar.writeFile(TQFileInfo(tarFile.path()).baseName()+".actions", "user", "group", buffer2.buffer().size(), buffer2.buffer().data()))
return KURL();
tar.close();
if (!QExtFileInfo::copy(KURL::fromPathOrURL(tempFile->name()), tarFile, -1, true, false, this))
@@ -2472,20 +2472,20 @@ KURL QuantaApp::saveToolbarToFile(const QString& toolbarName, const KURL& destFi
}
/** Saves a toolbar as local or project specific. */
-bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, const KURL& destURL)
+bool QuantaApp::saveToolbar(bool localToolbar, const TQString& toolbarToSave, const KURL& destURL)
{
int query;
KURL url;
KURL projectToolbarsURL;
- QString toolbarName;
- QString localToolbarsDir = locateLocal("data",resourceDir + "toolbars/");
+ TQString toolbarName;
+ TQString localToolbarsDir = locateLocal("data",resourceDir + "toolbars/");
if (toolbarToSave.isEmpty())
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current=0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2495,7 +2495,7 @@ bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, con
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Save Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if ( !ok )
@@ -2514,8 +2514,8 @@ bool QuantaApp::saveToolbar(bool localToolbar, const QString& toolbarToSave, con
toolbarName = toolbarToSave;
}
ToolbarEntry *p_toolbar = m_toolbarList[toolbarName];
- QString toolbarFileName = p_toolbar->url.fileName(false);
- QString toolbarRelPath = p_toolbar->url.url();
+ TQString toolbarFileName = p_toolbar->url.fileName(false);
+ TQString toolbarRelPath = p_toolbar->url.url();
if (toolbarRelPath.startsWith("file://" + qConfig.globalDataDir))
{
toolbarRelPath.remove("file://" + qConfig.globalDataDir + resourceDir + "toolbars/");
@@ -2591,24 +2591,24 @@ void QuantaApp::slotSaveProjectToolbar()
void QuantaApp::slotAddToolbar()
{
bool ok;
- QString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
+ TQString name = KInputDialog::getText(i18n("New Toolbar"), i18n("Enter toolbar name:"), i18n("User_%1").arg(userToolbarsCount), &ok, this);
if (ok)
{
userToolbarsCount++;
- QString toolbarId = name;
+ TQString toolbarId = name;
int n = 1;
while (m_toolbarList.find(toolbarId) != 0L)
{
- toolbarId = name + QString("%1").arg(n);
+ toolbarId = name + TQString("%1").arg(n);
n++;
}
toolbarId = toolbarId.lower();
KTempFile* tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
- * (tempFile->textStream()) << QString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
+ * (tempFile->textStream()) << TQString("<!DOCTYPE kpartgui SYSTEM \"kpartgui.dtd\">\n<kpartgui name=\"quanta\" version=\"2\">\n<ToolBar name=\"%1\" tabname=\"%2\" i18ntabname=\"%3\" id=\"%4\">\n<text>%5</text>\n</ToolBar>\n</kpartgui>\n")
.arg(name.lower()).arg(name).arg(name).arg(toolbarId).arg(name);
tempFile->close();
@@ -2624,7 +2624,7 @@ void QuantaApp::slotAddToolbar()
ToolbarEntry *p_toolbar = new ToolbarEntry;
p_toolbar->guiClient = toolbarGUI;
- QDomDocument *dom = new QDomDocument(toolbarGUI->domDocument());
+ TQDomDocument *dom = new TQDomDocument(toolbarGUI->domDocument());
p_toolbar->dom = dom;
p_toolbar->name = name;
@@ -2647,8 +2647,8 @@ bool QuantaApp::slotRemoveToolbar()
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
int i;
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current=0, j =0;
for (i = 0; i < tb->count(); i++)
{
@@ -2659,13 +2659,13 @@ bool QuantaApp::slotRemoveToolbar()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Remove Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (ok)
{
- QString id = res;
+ TQString id = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == res)
@@ -2680,12 +2680,12 @@ bool QuantaApp::slotRemoveToolbar()
}
-QString QuantaApp::createToolbarTarball()
+TQString QuantaApp::createToolbarTarball()
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current = 0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2695,14 +2695,14 @@ QString QuantaApp::createToolbarTarball()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Send Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (!ok)
- return QString::null;
+ return TQString::null;
- QString toolbarName = res;
+ TQString toolbarName = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == toolbarName)
@@ -2711,11 +2711,11 @@ QString QuantaApp::createToolbarTarball()
break;
}
}
- QString prefix="quanta";
+ TQString prefix="quanta";
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + toolbarName;
+ TQString tempFileName=tempDir->name() + toolbarName;
KURL tempURL;
tempURL.setPath(tempFileName);
@@ -2728,23 +2728,23 @@ QString QuantaApp::createToolbarTarball()
void QuantaApp::slotSendToolbar()
{
- QString tempFileName = createToolbarTarball();
+ TQString tempFileName = createToolbarTarball();
if (tempFileName.isNull())
return;
- QStringList toolbarFile;
+ TQStringList toolbarFile;
toolbarFile += tempFileName;
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send toolbar in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] toolbar.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() ) {
if ( !mailDlg->lineEmail->text().isEmpty())
{
@@ -2759,7 +2759,7 @@ void QuantaApp::slotSendToolbar()
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, toolbarFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, toolbarFile);
}
delete mailDlg;
}
@@ -2773,7 +2773,7 @@ void QuantaApp::slotDownloadToolbar()
void QuantaApp::slotUploadToolbar()
{
- QString tempFileName = createToolbarTarball();
+ TQString tempFileName = createToolbarTarball();
if (tempFileName.isNull())
return;
if (!m_newToolbarStuff)
@@ -2786,8 +2786,8 @@ void QuantaApp::slotRenameToolbar()
{
ToolbarTabWidget *tb = ToolbarTabWidget::ref();
- QStringList lst;
- QStringList idLst;
+ TQStringList lst;
+ TQStringList idLst;
int current = 0;
for (int i = 0; i < tb->count(); i++)
{
@@ -2797,12 +2797,12 @@ void QuantaApp::slotRenameToolbar()
}
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Rename Toolbar" ),
i18n( "Please select a toolbar:" ), lst, current, false, &ok, this );
if (ok)
{
- QString id = res;
+ TQString id = res;
for (uint i = 0; i < lst.count(); i++)
{
if (lst[i] == res)
@@ -2815,22 +2815,22 @@ void QuantaApp::slotRenameToolbar()
}
}
-void QuantaApp::slotRenameToolbar(const QString& name)
+void QuantaApp::slotRenameToolbar(const TQString& name)
{
ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[name];
if (p_toolbar)
{
bool ok;
- QString newName = KInputDialog::getText(i18n("Rename Toolbar"), i18n("Enter the new name:"), p_toolbar->name, &ok, this);
+ TQString newName = KInputDialog::getText(i18n("Rename Toolbar"), i18n("Enter the new name:"), p_toolbar->name, &ok, this);
if (ok && newName != p_toolbar->name)
{
m_toolbarList.take(name);
p_toolbar->name = newName;
- QDomElement el = p_toolbar->guiClient->domDocument().firstChild().firstChild().toElement();
+ TQDomElement el = p_toolbar->guiClient->domDocument().firstChild().firstChild().toElement();
el.setAttribute("tabname", p_toolbar->name);
el.removeAttribute("i18ntabname");
el.setAttribute("name", p_toolbar->name.lower());
- QDomNodeList nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("text");
+ TQDomNodeList nodeList = p_toolbar->guiClient->domDocument().elementsByTagName("text");
nodeList.item(0).firstChild().setNodeValue(p_toolbar->name);
//Rename the _Separator_ tags back to Separator, so they are not treated
//as changes
@@ -2859,19 +2859,19 @@ void QuantaApp::slotRenameToolbar(const QString& name)
/** Ask for save all the modified user toolbars. */
bool QuantaApp::removeToolbars()
{
- QStringList names;
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQStringList names;
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
for (;it.current();++it)
{
names += it.currentKey();
}
- for (QStringList::ConstIterator iter = names.constBegin(); iter != names.constEnd(); ++iter)
+ for (TQStringList::ConstIterator iter = names.constBegin(); iter != names.constEnd(); ++iter)
{
if (!slotRemoveToolbar(*iter))
return false;
}
- QString s = "<!DOCTYPE actionsconfig>\n<actions>\n</actions>\n";
+ TQString s = "<!DOCTYPE actionsconfig>\n<actions>\n</actions>\n";
m_actions->setContent(s);
TagAction *action;
for (uint i = 0; i < actionCollection()->count(); i++)
@@ -2879,18 +2879,18 @@ bool QuantaApp::removeToolbars()
action = dynamic_cast<TagAction *>(actionCollection()->action(i));
if (action)
{
- QDomElement el = action->data();
+ TQDomElement el = action->data();
m_actions->firstChild().appendChild(el);
}
}
- QFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
+ TQFile f(KGlobal::instance()->dirs()->saveLocation("data")+resourceDir + "actions.rc" );
if (f.open( IO_ReadWrite | IO_Truncate ))
{
if (!m_actions->firstChild().firstChild().isNull())
{
- QTextStream qts(&f);
- qts.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream qts(&f);
+ qts.setEncoding(TQTextStream::UnicodeUTF8);
m_actions->save(qts,0);
f.close();
} else
@@ -2903,13 +2903,13 @@ bool QuantaApp::removeToolbars()
void QuantaApp::slotDeleteAction(KAction *action)
{
//remove all references to this action
- QDomElement el = static_cast<TagAction*>(action)->data();
- QString text = el.attribute("text");
- QString actionName = action->name();
+ TQDomElement el = static_cast<TagAction*>(action)->data();
+ TQString text = el.attribute("text");
+ TQString actionName = action->name();
- QPtrList<KXMLGUIClient> guiClients = factory()->clients();
+ TQPtrList<KXMLGUIClient> guiClients = factory()->clients();
KXMLGUIClient *guiClient = 0;
- QDomNodeList nodeList;
+ TQDomNodeList nodeList;
for (uint i = 0; i < guiClients.count(); i++)
{
guiClient = guiClients.at(i);
@@ -2932,14 +2932,14 @@ void QuantaApp::slotDeleteAction(KAction *action)
action = 0L;
}
-void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_actionName)
+void QuantaApp::slotRemoveAction(const TQString& toolbarName, const TQString& a_actionName)
{
KAction *action = 0L;
- QString actionName = a_actionName;
+ TQString actionName = a_actionName;
actionName.replace('&',"&&");
KActionCollection *ac = actionCollection();
uint actionCount = ac->count();
- QString str;
+ TQString str;
for (uint i = 0; i < actionCount; i++)
{
str = ac->action(i)->text();
@@ -2968,7 +2968,7 @@ void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_ac
ToolbarEntry *p_toolbar = quantaApp->m_toolbarList[toolbarName];
if (p_toolbar)
{
- QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
+ TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action" &&
@@ -2986,7 +2986,7 @@ void QuantaApp::slotRemoveAction(const QString& toolbarName, const QString& a_ac
}
}
-void QuantaApp::slotEditAction(const QString& actionName)
+void QuantaApp::slotEditAction(const TQString& actionName)
{
ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg", true, 0, actionName);
dlg.exec();
@@ -2999,21 +2999,21 @@ void QuantaApp::slotNewAction()
dlg.exec();
}
-void QuantaApp::slotAssignActionToScript(const KURL& a_scriptURL, const QString& a_interpreter)
+void QuantaApp::slotAssignActionToScript(const KURL& a_scriptURL, const TQString& a_interpreter)
{
ActionConfigDialog dlg(m_toolbarList, this, "actions_config_dlg");
- QString name = a_scriptURL.fileName();
- name.truncate(name.length() - QFileInfo(name).extension().length() - 1);
+ TQString name = a_scriptURL.fileName();
+ name.truncate(name.length() - TQFileInfo(name).extension().length() - 1);
dlg.createScriptAction(name, a_interpreter + " " + a_scriptURL.path());
dlg.exec();
}
-void QuantaApp::setDtep(const QString& dtepName, bool convert)
+void QuantaApp::setDtep(const TQString& dtepName, bool convert)
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
+ TQString dtep = DTDs::ref()->getDTDNameFromNickName(dtepName);
if (!DTDs::ref()->find(dtep))
return;
w->setDTDIdentifier(dtep);
@@ -3057,12 +3057,12 @@ void QuantaApp::slotChangeDTD()
int pos = -1;
int defaultIndex = 0;
- QString oldDtdName = w->getDTDIdentifier();
- QString defaultDocType = Project::ref()->defaultDTD();
- QStringList lst = DTDs::ref()->nickNameList(true);
+ TQString oldDtdName = w->getDTDIdentifier();
+ TQString defaultDocType = Project::ref()->defaultDTD();
+ TQStringList lst = DTDs::ref()->nickNameList(true);
- QString oldDtdNickName = DTDs::ref()->getDTDNickNameFromName(oldDtdName);
- QString defaultDtdNickName = DTDs::ref()->getDTDNickNameFromName(defaultDocType);
+ TQString oldDtdNickName = DTDs::ref()->getDTDNickNameFromName(oldDtdName);
+ TQString defaultDtdNickName = DTDs::ref()->getDTDNickNameFromName(defaultDocType);
for(uint i = 0; i < lst.count(); i++)
{
dtdWidget->dtdCombo->insertItem(lst[i]);
@@ -3091,19 +3091,19 @@ void QuantaApp::slotEditDTD()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QStringList lst(DTDs::ref()->nickNameList());
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQStringList lst(DTDs::ref()->nickNameList());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Edit DTD" ),
i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
- QString s = i18n("Create a new DTEP description");
+ TQString s = i18n("Create a new DTEP description");
s = i18n("Load DTEP description from disk");
if (!ok)
return;
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
KDialogBase editDlg(this, "edit_dtep", true, i18n("Configure DTEP"), KDialogBase::Ok | KDialogBase::Cancel);
DTEPEditDlg dtepDlg(DTDs::ref()->find(dtdName)->fileName, &editDlg);
@@ -3115,7 +3115,7 @@ void QuantaApp::slotEditDTD()
}
}
-void QuantaApp::focusInEvent(QFocusEvent* e)
+void QuantaApp::focusInEvent(TQFocusEvent* e)
{
KDockMainWindow::focusInEvent(e);
Document *w = ViewManager::ref()->activeDocument();
@@ -3144,7 +3144,7 @@ void QuantaApp::slotMakeDonation()
{
DonationDialog *dlg = new DonationDialog(this);
dlg->closeButton->setIconSet(SmallIconSet("fileclose"));
- connect(dlg->closeButton, SIGNAL(clicked()), dlg, SLOT(accept()));
+ connect(dlg->closeButton, TQT_SIGNAL(clicked()), dlg, TQT_SLOT(accept()));
dlg->exec();
delete dlg;
}
@@ -3160,7 +3160,7 @@ void QuantaApp::slotHelpUserList()
}
/** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
-void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
+void QuantaApp::slotLoadToolbarForDTD(const TQString& dtdName)
{
const DTDStruct *oldDtd = 0L;
@@ -3170,7 +3170,7 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
if (!oldDtd)
oldDtd = DTDs::ref()->find(Project::ref()->defaultDTD());
}
- QString fileName;
+ TQString fileName;
const DTDStruct *newDtd = DTDs::ref()->find(dtdName);
if (!newDtd)
{
@@ -3220,14 +3220,14 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
for (uint i = 0; i < oldDtd->toolbars.count(); i++)
{
KURL url;
- QString fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+oldDtd->toolbars[i];
+ TQString fileName = qConfig.globalDataDir + resourceDir + "toolbars/"+oldDtd->toolbars[i];
QuantaCommon::setUrl(url, fileName);
KURL urlLocal;
fileName = locateLocal("data", resourceDir + "toolbars/"+oldDtd->toolbars[i]);
QuantaCommon::setUrl(urlLocal, fileName);
if (newToolbars.contains(url) == 0)
{
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3260,12 +3260,12 @@ void QuantaApp::slotLoadToolbarForDTD(const QString& dtdName)
}
/** Remove the toolbar named "name". */
-bool QuantaApp::slotRemoveToolbar(const QString& a_name)
+bool QuantaApp::slotRemoveToolbar(const TQString& a_name)
{
- QString name = a_name; // increase reference counter for this string
+ TQString name = a_name; // increase reference counter for this string
ToolbarEntry *p_toolbar = m_toolbarList[name];
- QRegExp i18ntabnameRx("\\si18ntabname=\"[^\"]*\"");
- QRegExp idRx("\\sid=\"[^\"]*\"");
+ TQRegExp i18ntabnameRx("\\si18ntabname=\"[^\"]*\"");
+ TQRegExp idRx("\\sid=\"[^\"]*\"");
if (p_toolbar)
{
KXMLGUIClient* toolbarGUI = p_toolbar->guiClient;
@@ -3275,7 +3275,7 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
KAction *action;
//Rename the _Separator_ tags back to Separator, so they are not treated
//as changes
- QDomNodeList nodeList = toolbarGUI->domDocument().elementsByTagName("_Separator_");
+ TQDomNodeList nodeList = toolbarGUI->domDocument().elementsByTagName("_Separator_");
for (uint i = 0; i < nodeList.count(); i++)
{
nodeList.item(i).toElement().setTagName("Separator");
@@ -3295,20 +3295,20 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
}
//check if the toolbar's XML GUI was modified or not
- QString s1 = p_toolbar->dom->toString();
- QString s2 = toolbarGUI->domDocument().toString();
+ TQString s1 = p_toolbar->dom->toString();
+ TQString s2 = toolbarGUI->domDocument().toString();
s1.remove(i18ntabnameRx);
s2.remove(i18ntabnameRx);
s1.remove(idRx);
s2.remove(idRx);
if (p_toolbar->nameModified)
{
- QRegExp tabnameRx("\\stabname=\"[^\"]*\"");
+ TQRegExp tabnameRx("\\stabname=\"[^\"]*\"");
tabnameRx.search(s2);
- QString name1 = tabnameRx.cap();
+ TQString name1 = tabnameRx.cap();
name1.remove(" tab");
- QString name2 = name1;
- name2.remove(QRegExp("[\\s]\\([0-9]+\\)"));
+ TQString name2 = name1;
+ name2.remove(TQRegExp("[\\s]\\([0-9]+\\)"));
s2.replace(name1, name2);
s2.replace(name1.lower(), name2.lower());
}
@@ -3385,7 +3385,7 @@ bool QuantaApp::slotRemoveToolbar(const QString& a_name)
{
//take out the action from every toolbar's xmlguiclient
//this avoid a crash when removing a toolbar
- QDictIterator<ToolbarEntry> it(m_toolbarList);
+ TQDictIterator<ToolbarEntry> it(m_toolbarList);
while (it.current())
{
it.current()->guiClient->actionCollection()->take(action);
@@ -3430,7 +3430,7 @@ void QuantaApp::slotRefreshActiveWindow()
}
-void QuantaApp::slotShowGroupsForDTEP(const QString& dtepName, bool show)
+void QuantaApp::slotShowGroupsForDTEP(const TQString& dtepName, bool show)
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
@@ -3475,9 +3475,9 @@ void QuantaApp::slotBuildPrjToolbarsMenu()
}
/** Returns the project (if there is one loaded) or global default encoding. */
-QString QuantaApp::defaultEncoding()
+TQString QuantaApp::defaultEncoding()
{
- QString encoding = qConfig.defaultEncoding;
+ TQString encoding = qConfig.defaultEncoding;
if (Project::ref()->hasProject())
{
encoding = Project::ref()->defaultEncoding();
@@ -3488,7 +3488,7 @@ QString QuantaApp::defaultEncoding()
void QuantaApp::slotGetUserToolbarFiles(KURL::List *list)
{
ToolbarEntry *p_toolbar;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3502,7 +3502,7 @@ void QuantaApp::slotGetUserToolbarFiles(KURL::List *list)
ToolbarEntry *QuantaApp::toolbarByURL(const KURL& url)
{
ToolbarEntry *p_toolbar = 0L;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3522,7 +3522,7 @@ bool QuantaApp::allToolbarsHidden() const
bool result = true;
showDTDToolbar->setEnabled(false);
ToolbarEntry *p_toolbar = 0L;
- QDictIterator<ToolbarEntry> iter(m_toolbarList);
+ TQDictIterator<ToolbarEntry> iter(m_toolbarList);
for( ; iter.current(); ++iter )
{
p_toolbar = iter.current();
@@ -3542,35 +3542,35 @@ bool QuantaApp::allToolbarsHidden() const
void QuantaApp::slotLoadDTEP()
{
- QString dirName = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select DTEP Directory"));
+ TQString dirName = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select DTEP Directory"));
if (!dirName.isEmpty())
{
DTDs::ref()->slotLoadDTEP(dirName, true);
}
}
-QString QuantaApp::createDTEPTarball()
+TQString QuantaApp::createDTEPTarball()
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QStringList lst(DTDs::ref()->nickNameList());
- QString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
+ TQStringList lst(DTDs::ref()->nickNameList());
+ TQString nickName = DTDs::ref()->getDTDNickNameFromName(w->getDTDIdentifier());
bool ok = false;
- QString res = KInputDialog::getItem(
+ TQString res = KInputDialog::getItem(
i18n( "Send DTD" ),
i18n( "Please select a DTD:" ), lst, lst.findIndex(nickName), false, &ok, this );
if (!ok)
- return QString::null;
+ return TQString::null;
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(res);
- QString prefix="quanta";
+ TQString prefix="quanta";
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(QRegExp("\\s|\\."), "_") + ".tgz";
+ TQString tempFileName=tempDir->name() +"/"+ DTDs::ref()->getDTDNickNameFromName(dtdName).replace(TQRegExp("\\s|\\."), "_") + ".tgz";
//pack the .tag files and the description.rc into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
@@ -3583,11 +3583,11 @@ QString QuantaApp::createDTEPTarball()
KURL::List files = QExtFileInfo::allFilesRelative(dirURL, "*", this);
for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
- QString name = (*it_f).fileName();
+ TQString name = (*it_f).fileName();
- QFile file(dirURL.path()+name);
+ TQFile file(dirURL.path()+name);
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile(dirURL.fileName()+"/"+name, "user", "group", bArray.size(), bArray.data());
file.close();
@@ -3595,7 +3595,7 @@ QString QuantaApp::createDTEPTarball()
tar.close();
return tempFileName;
}
- return QString::null;
+ return TQString::null;
}
void QuantaApp::slotEmailDTEP()
@@ -3603,22 +3603,22 @@ void QuantaApp::slotEmailDTEP()
Document *w = ViewManager::ref()->activeDocument();
if (w)
{
- QString tempFileName = createDTEPTarball();
+ TQString tempFileName = createDTEPTarball();
if (tempFileName.isNull())
return;
- QStringList dtdFile;
+ TQStringList dtdFile;
dtdFile += tempFileName;
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send DTEP in Email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] DTEP definition tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -3634,7 +3634,7 @@ void QuantaApp::slotEmailDTEP()
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, dtdFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, dtdFile);
}
delete mailDlg;
}
@@ -3649,7 +3649,7 @@ void QuantaApp::slotDownloadDTEP()
void QuantaApp::slotUploadDTEP()
{
- QString tempFileName = createDTEPTarball();
+ TQString tempFileName = createDTEPTarball();
if (tempFileName.isNull())
return;
if (!m_newDTEPStuff)
@@ -3681,7 +3681,7 @@ void QuantaApp::slotDownloadTemplate()
m_newTemplateStuff->downloadResource();
}
-void QuantaApp::slotUploadTemplate(const QString &fileName)
+void QuantaApp::slotUploadTemplate(const TQString &fileName)
{
if (!m_newTemplateStuff)
m_newTemplateStuff = new QNewTemplateStuff("quanta/template", this);
@@ -3696,7 +3696,7 @@ void QuantaApp::slotDownloadScript()
m_newScriptStuff->downloadResource();
}
-void QuantaApp::slotUploadScript(const QString &fileName)
+void QuantaApp::slotUploadScript(const TQString &fileName)
{
if (!m_newScriptStuff)
m_newScriptStuff = new QNewScriptStuff("quanta/script", this);
@@ -3709,7 +3709,7 @@ void QuantaApp::slotDownloadDoc()
if (!m_newDocStuff)
{
m_newDocStuff = new QNewDocStuff("quanta/documentation", this);
- connect(m_newDocStuff, SIGNAL(installFinished()), dTab, SLOT(slotRefreshTree()));
+ connect(m_newDocStuff, TQT_SIGNAL(installFinished()), dTab, TQT_SLOT(slotRefreshTree()));
}
m_newDocStuff->downloadResource();
}
@@ -3764,15 +3764,15 @@ int QuantaApp::currentEditorIfNum() const
}
}
-QString QuantaApp::projectURL() const
+TQString QuantaApp::projectURL() const
{
return Project::ref()->projectBaseURL().url();
}
-QStringList QuantaApp::openedURLs() const
+TQStringList QuantaApp::openedURLs() const
{
- QStringList list;
- QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ TQStringList list;
+ TQPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
KMdiChildView *view;
QuantaView *qView;
while ( (view = childIt.current()) != 0 )
@@ -3784,7 +3784,7 @@ QStringList QuantaApp::openedURLs() const
Document *w = qView->document();
if ( w )
{
- list.prepend( QString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
+ list.prepend( TQString("%1:%2").arg(w->editIf->editInterfaceNumber()).arg(w->url().url()));
}
}
}
@@ -3800,17 +3800,17 @@ void QuantaApp::slotExpandAbbreviation()
const DTDStruct *dtd = w->currentDTD();
uint line, col;
w->viewCursorIf->cursorPositionReal(&line, &col);
- QString text = w->text(line, 0, line, col - 1);
+ TQString text = w->text(line, 0, line, col - 1);
text = w->findWordRev(text) + " ";
- QString textToInsert;
- QMap<QString, Abbreviation>::ConstIterator it;
+ TQString textToInsert;
+ TQMap<TQString, Abbreviation>::ConstIterator it;
for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it)
{
bool found = false;
Abbreviation abbrev = it.data();
if (abbrev.dteps.contains(dtd->name))
{
- QMap<QString, QString>::ConstIterator it2;
+ TQMap<TQString, TQString>::ConstIterator it2;
for (it2 = abbrev.abbreviations.constBegin(); it2 != abbrev.abbreviations.constEnd(); ++it2)
{
if (it2.key().startsWith(text))
@@ -3886,28 +3886,28 @@ bool QuantaApp::structTreeVisible() const
return StructTreeView::ref()->isVisible();
}
-QStringList QuantaApp::tagAreas(const QString &tag, bool includeCoordinates, bool skipFoundContent) const
+TQStringList QuantaApp::tagAreas(const TQString &tag, bool includeCoordinates, bool skipFoundContent) const
{
Document *w = ViewManager::ref()->activeDocument();
if (w)
return w->tagAreas(tag, includeCoordinates, skipFoundContent);
else
- return QStringList();
+ return TQStringList();
}
-QString QuantaApp::documentFolderForURL(const QString &url)
+TQString QuantaApp::documentFolderForURL(const TQString &url)
{
KURL u = KURL::fromPathOrURL(url);
return Project::ref()->documentFolderForURL(u).url();
}
-QString QuantaApp::urlWithPreviewPrefix(const QString &url)
+TQString QuantaApp::urlWithPreviewPrefix(const TQString &url)
{
KURL u = KURL::fromPathOrURL(url);
return Project::ref()->urlWithPrefix(u).url();
}
-void QuantaApp::addFileToProject(const QString &url)
+void QuantaApp::addFileToProject(const TQString &url)
{
if (Project::ref()->hasProject())
{
@@ -3915,7 +3915,7 @@ void QuantaApp::addFileToProject(const QString &url)
}
}
-void QuantaApp::addFolderToProject(const QString &url)
+void QuantaApp::addFolderToProject(const TQString &url)
{
if (Project::ref()->hasProject())
{
@@ -3923,7 +3923,7 @@ void QuantaApp::addFolderToProject(const QString &url)
}
}
-void QuantaApp::uploadURL(const QString &url, const QString& profile, bool markOnly)
+void QuantaApp::uploadURL(const TQString &url, const TQString& profile, bool markOnly)
{
if (Project::ref()->hasProject())
{
@@ -3934,7 +3934,7 @@ void QuantaApp::uploadURL(const QString &url, const QString& profile, bool markO
void QuantaApp::slotAutosaveTimer()
{
m_config->reparseConfiguration();
- QPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
+ TQPtrListIterator<KMdiChildView> childIt(*m_pDocumentViews);
KMdiChildView *view;
QuantaView *qView;
while ( (view = childIt.current()) != 0 )
@@ -3956,9 +3956,9 @@ void QuantaApp::slotAutosaveTimer()
/** Get script output */
void QuantaApp::slotGetScriptOutput(KProcess* ,char* buf,int buflen)
{
- QCString tmp( buf, buflen + 1 );
- m_scriptOutput = QString::null;
- m_scriptOutput = QString::fromLocal8Bit(tmp).remove(" ");
+ TQCString tmp( buf, buflen + 1 );
+ m_scriptOutput = TQString::null;
+ m_scriptOutput = TQString::fromLocal8Bit(tmp).remove(" ");
}
/** Get script error*/
@@ -3993,7 +3993,7 @@ void QuantaApp::slotActivePartChanged(KParts::Part * part)
m_oldKTextEditor = 0L;
}
createGUI(part);
- QWidget * activeWid = m_partManager->activeWidget();
+ TQWidget * activeWid = m_partManager->activeWidget();
if ( activeWid && activeWid->inherits("KTextEditor::View"))
{
m_oldKTextEditor = dynamic_cast<KTextEditor::View *>(activeWid);
@@ -4039,12 +4039,12 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
n = node->child;
}
Tag *commentTag = n->tag;
- QString text = commentTag->tagStr();
+ TQString text = commentTag->tagStr();
int pos = text.find("@annotation");
if (pos != -1)
{
pos += 11;
- QString receiver;
+ TQString receiver;
if (text[pos] == '(')
{
int p = pos;
@@ -4070,11 +4070,11 @@ void QuantaApp::slotReloadStructTreeView(bool groupOnly)
}
}
-QString QuantaApp::saveCurrentFile()
+TQString QuantaApp::saveCurrentFile()
{
Document *w = ViewManager::ref()->activeDocument();
if (!w)
- return QString::null;
+ return TQString::null;
if (w->isModified())
{
if ( KMessageBox::questionYesNo(this,
@@ -4094,7 +4094,7 @@ QString QuantaApp::saveCurrentFile()
}
} else
{
- return QString::null;
+ return TQString::null;
}
}
KURL url = Project::ref()->urlWithPrefix(w->url());
@@ -4122,7 +4122,7 @@ bool QuantaApp::queryClose()
if (quantaStarted)
{
m_config->setGroup("General Options");
- QStringList urlStrList;
+ TQStringList urlStrList;
KURL::List urlList = ViewManager::ref()->openedFiles();
KURL u;
for (KURL::List::Iterator it = urlList.begin(); it != urlList.end(); ++it)
@@ -4132,13 +4132,13 @@ bool QuantaApp::queryClose()
urlStrList += u.url();
}
m_config->writePathEntry("List of opened files", urlStrList);
- QStringList encodings;
- QValueList<Document*> documents = ViewManager::ref()->openedDocuments();
- for (QValueList<Document*>::ConstIterator it = documents.constBegin(); it != documents.constEnd(); ++it)
+ TQStringList encodings;
+ TQValueList<Document*> documents = ViewManager::ref()->openedDocuments();
+ for (TQValueList<Document*>::ConstIterator it = documents.constBegin(); it != documents.constEnd(); ++it)
{
if (!(*it)->isUntitled())
{
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>((*it)->doc());
if (encodingIf)
encoding = encodingIf->encoding();
@@ -4160,7 +4160,7 @@ bool QuantaApp::queryClose()
{
saveOptions();
// kdDebug(24000) << "Quanta will exit" << endl;
- emit eventHappened("quanta_exit", QDateTime::currentDateTime().toString(Qt::ISODate), QString::null);
+ emit eventHappened("quanta_exit", TQDateTime::currentDateTime().toString(Qt::ISODate), TQString::null);
} else
slotFileNew();
return canExit;
@@ -4205,7 +4205,7 @@ void QuantaApp::saveOptions()
//If user choose the timer interval, it needs to restart the timer too
m_config->writeEntry("Autosave interval", qConfig.autosaveInterval);
m_config->writePathEntry("Top folders", fTab->topURLList.toStringList());
- QStringList aliasList;
+ TQStringList aliasList;
for (KURL::List::Iterator it2 = fTab->topURLList.begin(); it2 != fTab->topURLList.end(); ++it2)
{
aliasList.append(fTab->topURLAliases[(*it2).url()]);
@@ -4248,12 +4248,12 @@ void QuantaApp::statusBarTimeout()
statusBar()->changeItem("", IDS_STATUS);
}
-QStringList QuantaApp::selectors(const QString &tag)
+TQStringList QuantaApp::selectors(const TQString &tag)
{
return dcopQuanta->selectors(tag);
}
-QStringList QuantaApp::idSelectors()
+TQStringList QuantaApp::idSelectors()
{
return dcopQuanta->idSelectors();
}
@@ -4271,7 +4271,7 @@ void QuantaApp::slotEditCurrentTag()
w->viewCursorIf->cursorPositionReal(&line, &col);
Node *node = parser->nodeAt(line, col, false);
bool isUnknown = true;
- QString tagName;
+ TQString tagName;
if (node && node->tag)
{
Tag *tag = new Tag(*node->tag); //create a copy, as a reparse might happen meantime and that would make node (and node->tag) invalid
@@ -4279,7 +4279,7 @@ void QuantaApp::slotEditCurrentTag()
if ( QuantaCommon::isKnownTag(tag->dtd()->name,tagName) )
{
isUnknown = false;
- QString selection;
+ TQString selection;
if (w->selectionIf)
selection = w->selectionIf->selection();
TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(tag->dtd(),tagName), tag, selection, ViewManager::ref()->activeView()->baseURL() );
@@ -4296,7 +4296,7 @@ void QuantaApp::slotEditCurrentTag()
const DTDStruct *dtd = w->defaultDTD();
if (dtd->family == Xml)
{
- QString currentLine = w->editIf->textLine(line);
+ TQString currentLine = w->editIf->textLine(line);
int sPos = currentLine.findRev('<', col);
if (sPos != -1)
{
@@ -4308,7 +4308,7 @@ void QuantaApp::slotEditCurrentTag()
if ( QuantaCommon::isKnownTag(dtd->name, tag->name) )
{
isUnknown = false;
- QString selection;
+ TQString selection;
if (w->selectionIf)
selection = w->selectionIf->selection();
TagDialog *dlg = new TagDialog( QuantaCommon::tagFromDTD(dtd, tag->name), tag, selection, ViewManager::ref()->activeView()->baseURL() );
@@ -4327,7 +4327,7 @@ void QuantaApp::slotEditCurrentTag()
slotEnableIdleTimer(true);
if (isUnknown)
{
- QString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").arg(tagName);
slotStatusMsg( message );
}
}
@@ -4378,17 +4378,17 @@ void QuantaApp::slotFrameWizard()
Document *w = ViewManager::ref()->activeDocument();
if (!w)
return;
- QStringList list = w->tagAreas("frameset", true, true);
+ TQStringList list = w->tagAreas("frameset", true, true);
bool framesetExists = !list.isEmpty();
int bl, bc, el, ec;
bl = bc = el = ec = 0;
- QStringList l;
- QStringList l2;
+ TQStringList l;
+ TQStringList l2;
QuantaCommon::normalizeStructure(list[0],l2);
if (framesetExists)
{
- l = QStringList::split('\n',list[0],true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ l = TQStringList::split('\n',list[0],true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
@@ -4407,8 +4407,8 @@ void QuantaApp::slotFrameWizard()
if ( dlg.exec() )
{
- QString tag =
-QString("\n")+dlg.generateFramesetStructure()+QString("\n");
+ TQString tag =
+TQString("\n")+dlg.generateFramesetStructure()+TQString("\n");
if (framesetExists)
{
w->activateParser(false);
@@ -4452,7 +4452,7 @@ void QuantaApp::slotInsertCSS()
while (parentNode && parentNode->parent &&
parentNode->tag->type != Tag::XmlTag)
parentNode = parentNode->parent;
- QString fullDocument = w->editIf->text().stripWhiteSpace();
+ TQString fullDocument = w->editIf->text().stripWhiteSpace();
if (styleNode->tag->name.lower() == "comment block" && styleNode->parent) {
if (styleNode->parent->tag->name.lower() == "style") {
@@ -4463,17 +4463,17 @@ void QuantaApp::slotInsertCSS()
if (styleNode && styleNode->tag->name.lower() == "style" && styleNode->next) //inside <style> invoke the selector editor
{
styleNode->tag->endPos(bLine, bCol);
- QString header(w->text(0, 0, bLine, bCol));// beginning part of the file
+ TQString header(w->text(0, 0, bLine, bCol));// beginning part of the file
styleNode->next->tag->endPos(eLine, eCol);
- QString footer("</style>" + w->text(eLine, eCol+1, lastLine, lastCol)); // ending part of the file
+ TQString footer("</style>" + w->text(eLine, eCol+1, lastLine, lastCol)); // ending part of the file
styleNode->next->tag->beginPos(eLine, eCol);
- QString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
+ TQString styleTagContent(w->text(bLine, bCol+1, eLine, eCol-1).remove("<!--").remove("-->"));// <style></style> block content
kdDebug(24000) << "Style tag contains: " << endl << styleTagContent << endl;
CSSSelector *dlg = new CSSSelector;
dlg->setCallingFrom("XHTML");
- QFileInfo fi(ViewManager::ref()->currentURL());
+ TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(projectBaseURL().path() + fi.baseName());
@@ -4517,7 +4517,7 @@ void QuantaApp::slotInsertCSS()
{
kdDebug(24000) << "[CSS editor] We will add a style attribute to: " << parentNode->tag->name << endl;
CSSEditor *dlg = new CSSEditor(this);
- QFileInfo fi(ViewManager::ref()->currentURL());
+ TQFileInfo fi(ViewManager::ref()->currentURL());
dlg->setFileToPreview(projectBaseURL().path() + fi.baseName(),false);
@@ -4525,7 +4525,7 @@ void QuantaApp::slotInsertCSS()
parentNode->tag->endPos(eLine, eCol);
dlg->setFooter(">" + w->text(eLine, eCol + 1, lastLine, lastCol));
- QString temp;
+ TQString temp;
if (parentNode->tag->hasAttribute("style"))
{
dlg->setInlineStyleContent(parentNode->tag->attributeValue("style"));
@@ -4534,10 +4534,10 @@ void QuantaApp::slotInsertCSS()
temp = tempTag.toString();
} else {
- dlg->setInlineStyleContent(QString::null);
+ dlg->setInlineStyleContent(TQString::null);
temp = parentNode->tag->toString();
}
- //using QString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
+ //using TQString::mid sometimes generates strange results; maybe this is due to a (random) blank in temp
temp = temp.left(temp.length()-1);//remove >
temp = temp.right(temp.length()-1);//remove <
dlg->setHeader(w->text(0, 0, bLine, bCol) + temp);
@@ -4561,19 +4561,19 @@ void QuantaApp::slotTagMail()
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Email Link (mailto)"));
if ( mailDlg->exec() ) {
- QString tag = QString(QuantaCommon::tagCase("<a"));
+ TQString tag = TQString(QuantaCommon::tagCase("<a"));
- if ( !QString(mailDlg->lineEmail->text()).isEmpty())
+ if ( !TQString(mailDlg->lineEmail->text()).isEmpty())
{
tag += QuantaCommon::attrCase(" href=")+qConfig.attrValueQuotation+"mailto:"+mailDlg->lineEmail->text();
- if ( !QString(mailDlg->lineSubject->text()).isEmpty())
+ if ( !TQString(mailDlg->lineSubject->text()).isEmpty())
tag += "?subject="+KURL::encode_string(mailDlg->lineSubject->text());
tag += qConfig.attrValueQuotation;
}
- if ( !QString(mailDlg->titleEdit->text()).isEmpty())
+ if ( !TQString(mailDlg->titleEdit->text()).isEmpty())
tag += QuantaCommon::attrCase(" title=")+qConfig.attrValueQuotation+mailDlg->titleEdit->text()+qConfig.attrValueQuotation;
- tag += QString(">");
+ tag += TQString(">");
w->insertTag(tag,QuantaCommon::tagCase("</a>"));
}
delete mailDlg;
@@ -4586,14 +4586,14 @@ void QuantaApp::slotTagMisc()
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
- static QString element = "";
+ static TQString element = "";
static bool addClosingTag = true;
TagMiscDlg * miscDlg = new TagMiscDlg( this, 0L, addClosingTag, element );
if ( miscDlg->exec() )
{
- QString tag;
+ TQString tag;
element = miscDlg->elementTagName();
element.remove('<');
element.remove('>');
@@ -4616,7 +4616,7 @@ void QuantaApp::slotTagMisc()
/** do quick list */
void QuantaApp::slotTagQuickList()
{
- QString space =" " ;
+ TQString space =" " ;
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
@@ -4625,20 +4625,20 @@ void QuantaApp::slotTagQuickList()
int i;
int n = listDlg->spinBoxRows->value();
- QString tag;
+ TQString tag;
if ( listDlg->radioOrdered->isChecked())
- tag = QString("<ol>\n")+space;
- else tag = QString("<ul>\n")+space;
+ tag = TQString("<ol>\n")+space;
+ else tag = TQString("<ul>\n")+space;
for ( i=0;i<n;i++)
if ( qConfig.closeTags )
- tag += QString(" <li> </li>\n")+space;
+ tag += TQString(" <li> </li>\n")+space;
else
- tag += QString(" <li> \n")+space;
+ tag += TQString(" <li> \n")+space;
if ( listDlg->radioOrdered->isChecked())
- tag += QString("</ol>");
- else tag += QString("</ul>");
+ tag += TQString("</ol>");
+ else tag += TQString("</ul>");
w->insertTag( QuantaCommon::tagCase(tag));
}
@@ -4650,20 +4650,20 @@ void QuantaApp::slotTagEditTable()
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
baseNode = parser->rebuild(w);
- QStringList list = w->tagAreas("table", true, false);
+ TQStringList list = w->tagAreas("table", true, false);
bool tableExists = false;
uint line, col;
w->viewCursorIf->cursorPositionReal(&line, &col);
int bl, bc, el, ec;
int bLine, bCol, eLine, eCol;
bLine = bCol = eLine = eCol = 0;
- QStringList l;
- QStringList l2;
- for (QStringList::Iterator it = list.begin(); it != list.end(); ++it)
+ TQStringList l;
+ TQStringList l2;
+ for (TQStringList::Iterator it = list.begin(); it != list.end(); ++it)
{
QuantaCommon::normalizeStructure(*it, l2);
- l = QStringList::split('\n', *it, true);
- QStringList coordList = QStringList::split(',', l[0], true);
+ l = TQStringList::split('\n', *it, true);
+ TQStringList coordList = TQStringList::split(',', l[0], true);
bl = coordList[0].toInt();
bc = coordList[1].toInt();
el = coordList[2].toInt();
@@ -4703,7 +4703,7 @@ void QuantaApp::slotTagEditTable()
}
if (tableRead && editor.exec())
{
- QString tableString = editor.readModifiedTable();
+ TQString tableString = editor.readModifiedTable();
w->activateParser(false);
//#ifdef BUILD_KAFKAPART
// if(w->editIfExt)
@@ -4727,13 +4727,13 @@ void QuantaApp::slotTagColor()
{
Document *w = ViewManager::ref()->activeDocument();
if (!w) return;
- QColor color;
+ TQColor color;
if (KColorDialog::getColor( color )) {
char c[8];
sprintf(c,"#%2X%2X%2X",color.red(),color.green(),color.blue());
for (int i=0;i<7;i++) if (c[i] == ' ') c[i] = '0';
- QString scolor = (char *)c;
+ TQString scolor = (char *)c;
w->insertTag(scolor);
}
}
@@ -4745,7 +4745,7 @@ void QuantaApp::slotTagDate()
if (!w) return;
time_t tektime;
time( &tektime);
- QString stime = ctime( &tektime);
+ TQString stime = ctime( &tektime);
w->insertTag( stime);
}
@@ -4841,7 +4841,7 @@ void QuantaApp::slotPasteHTMLQuoted()
if (w)
{
QClipboard *cb = qApp->clipboard();
- QString text = cb->text();
+ TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
{
@@ -4851,15 +4851,15 @@ void QuantaApp::slotPasteHTMLQuoted()
text.replace( ">", "&gt;" );
//TODO: Replace only the chars not present in the current encoding.
- QString encoding = defaultEncoding();
+ TQString encoding = defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(w->doc());
if (encodingIf)
encoding = encodingIf->encoding();
if (encoding != "UTF-8" && encoding != "UTF-16" && encoding != "ISO-10646-UCS-2")
{
- for ( QStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
+ for ( TQStringList::Iterator it = charList.begin(); it != charList.end(); ++it )
{
- QString s = *it;
+ TQString s = *it;
int begin = s.find("(&#") + 3;
if (begin == 1)
continue;
@@ -4869,7 +4869,7 @@ void QuantaApp::slotPasteHTMLQuoted()
int code = s.toInt(&ok);
if (!ok || code < 191)
continue;
- text.replace(QChar(code), QString("&#%1;").arg(s));
+ text.replace(TQChar(code), TQString("&#%1;").arg(s));
}
}
unsigned int line, col;
@@ -4886,7 +4886,7 @@ void QuantaApp::slotPasteURLEncoded()
if (w)
{
QClipboard *cb = qApp->clipboard();
- QString text = cb->text();
+ TQString text = cb->text();
if ( ( !text.isNull() ) && (!text.isEmpty() ) )
{
@@ -4907,7 +4907,7 @@ void QuantaApp::slotUndo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus && w)
{
/**MessageBox::information(this, i18n("VPL does not support this functionality yet."),
- QString::null, "show undo unavailable");*/
+ TQString::null, "show undo unavailable");*/
w->docUndoRedo->undo();
return;
}
@@ -4932,7 +4932,7 @@ void QuantaApp::slotRedo ()
if(ViewManager::ref()->activeView()->hadLastFocus() == QuantaView::VPLFocus)
{
/**KMessageBox::information(this, i18n("VPL does not support this functionality yet."),
- QString::null, "show redo unavailable");*/
+ TQString::null, "show redo unavailable");*/
w->docUndoRedo->redo();
return;
}
@@ -4971,7 +4971,7 @@ void QuantaApp::slotCut()
{
/*
KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- QString::null, "show cut unavailable");
+ TQString::null, "show cut unavailable");
*/
KafkaDocument::ref()->slotCut();
return;
@@ -4991,7 +4991,7 @@ void QuantaApp::slotCopy()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //QString::null, "show copy unavailable");
+ //TQString::null, "show copy unavailable");
KafkaDocument::ref()->slotCopy();
return;
}
@@ -5003,15 +5003,15 @@ void QuantaApp::slotCopy()
}
if (m_htmlPart->view()->hasFocus())
{
- QString selection = m_htmlPart->selectedText();
- QClipboard *cb = QApplication::clipboard();
+ TQString selection = m_htmlPart->selectedText();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(selection, QClipboard::Clipboard);
}
else
if (m_htmlPartDoc->view()->hasFocus())
{
- QString selection = m_htmlPartDoc->selectedText();
- QClipboard *cb = QApplication::clipboard();
+ TQString selection = m_htmlPartDoc->selectedText();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText(selection, QClipboard::Clipboard);
}
@@ -5024,7 +5024,7 @@ void QuantaApp::slotPaste()
if(view && view->hadLastFocus() == QuantaView::VPLFocus)
{
//KMessageBox::information(this, i18n("Sorry, VPL does not support this functionality yet."),
- //QString::null, "show paste unavailable");
+ //TQString::null, "show paste unavailable");
KafkaDocument::ref()->slotPaste();
return;
}
@@ -5036,7 +5036,7 @@ void QuantaApp::slotPaste()
}
}
-Node *QuantaApp::showTagDialogAndReturnNode(const QString &tag, const QString &attr)
+Node *QuantaApp::showTagDialogAndReturnNode(const TQString &tag, const TQString &attr)
{
Node *n = 0L;
QuantaView *view = ViewManager::ref()->activeView();
@@ -5044,7 +5044,7 @@ Node *QuantaApp::showTagDialogAndReturnNode(const QString &tag, const QString &a
{
Document *w = view->document();
- QString selection;
+ TQString selection;
if(view->hadLastFocus() == QuantaView::VPLFocus)
selection = KafkaDocument::ref()->getKafkaWidget()->selectedText();
@@ -5106,9 +5106,9 @@ void QuantaApp::initTabWidget(bool closeButtonsOnly)
if (!closeButtonsOnly)
{
tab->setTabReorderingEnabled(true);
- tab->setTabPosition(QTabWidget::Bottom);
- connect(tab, SIGNAL( contextMenu( QWidget *, const QPoint & ) ), ViewManager::ref(), SLOT(slotTabContextMenu( QWidget *, const QPoint & ) ) );
- connect(tab, SIGNAL(initiateTabMove(int, int)), this, SLOT(slotTabAboutToMove(int, int))); connect(tab, SIGNAL(movedTab(int, int)), this, SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
+ tab->setTabPosition(TQTabWidget::Bottom);
+ connect(tab, TQT_SIGNAL( contextMenu( TQWidget *, const TQPoint & ) ), ViewManager::ref(), TQT_SLOT(slotTabContextMenu( TQWidget *, const TQPoint & ) ) );
+ connect(tab, TQT_SIGNAL(initiateTabMove(int, int)), this, TQT_SLOT(slotTabAboutToMove(int, int))); connect(tab, TQT_SIGNAL(movedTab(int, int)), this, TQT_SLOT(slotTabMoved(int, int))); setTabWidgetVisibility(KMdi::AlwaysShowTabs);
}
}
if (!closeButtonsOnly)
@@ -5128,15 +5128,15 @@ void QuantaApp::slotFileClosed(Document *w)
}
}
-void QuantaApp::slotCVSCommandExecuted(const QString& command, const QStringList& files)
+void QuantaApp::slotCVSCommandExecuted(const TQString& command, const TQStringList& files)
{
- QString file;
+ TQString file;
for (uint i = 0; i < files.count(); i++)
{
file = files[i];
if (Project::ref()->contains(KURL::fromPathOrURL(file)))
{
- emit eventHappened("after_" + command, file, QString::null);
+ emit eventHappened("after_" + command, file, TQString::null);
}
}
}
@@ -5154,8 +5154,8 @@ void QuantaApp::closeAllViews()
void QuantaApp::resetDockLayout()
{
- QStringList groupList = m_config->groupList();
- for (QStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it)
+ TQStringList groupList = m_config->groupList();
+ for (TQStringList::Iterator it = groupList.begin(); it != groupList.end(); ++it)
{
if ((*it).startsWith("dock_setting_default"))
{
@@ -5163,7 +5163,7 @@ void QuantaApp::resetDockLayout()
}
}
m_config->sync();
- QWidget *mainDockWidget = getMainDockWidget();
+ TQWidget *mainDockWidget = getMainDockWidget();
addToolWindow(fTab, KDockWidget::DockLeft, mainDockWidget);
addToolWindow(ProjectTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
addToolWindow(TemplatesTreeView::ref(), KDockWidget::DockLeft, mainDockWidget);
@@ -5178,9 +5178,9 @@ void QuantaApp::resetDockLayout()
m_previewToolView = addToolWindow(m_htmlPart->view(), KDockWidget::DockBottom, mainDockWidget);
if (m_documentationToolView)
m_documentationToolView= addToolWindow(m_htmlPartDoc->view(), KDockWidget::DockBottom, mainDockWidget);
- for (QMap<QWidget*,KMdiToolViewAccessor*>::Iterator it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it)
+ for (TQMap<TQWidget*,KMdiToolViewAccessor*>::Iterator it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it)
{
- QWidget *widget = it.key();
+ TQWidget *widget = it.key();
if (dynamic_cast<ServerTreeView*>(widget))
addToolWindow(widget, KDockWidget::DockRight, mainDockWidget);
if (dynamic_cast<VariablesListView*>(widget))
@@ -5190,11 +5190,11 @@ void QuantaApp::resetDockLayout()
}
}
-KDockWidget::DockPosition QuantaApp::prevDockPosition(QWidget* widget, KDockWidget::DockPosition def)
+KDockWidget::DockPosition QuantaApp::prevDockPosition(TQWidget* widget, KDockWidget::DockPosition def)
{
- QMap<KDockWidget::DockPosition,QString> maps;
- QMap<QString,QString> map;
- QString dock = widget->name();
+ TQMap<KDockWidget::DockPosition,TQString> maps;
+ TQMap<TQString,TQString> map;
+ TQString dock = widget->name();
// Which groups to search through
maps[KDockWidget::DockTop] = "dock_setting_default::KMdiDock::topDock";
@@ -5203,11 +5203,11 @@ KDockWidget::DockPosition QuantaApp::prevDockPosition(QWidget* widget, KDockWidg
maps[KDockWidget::DockRight] = "dock_setting_default::KMdiDock::rightDock";
// Loop the groups
- for(QMap<KDockWidget::DockPosition,QString>::Iterator itmaps = maps.begin(); itmaps != maps.end(); ++itmaps )
+ for(TQMap<KDockWidget::DockPosition,TQString>::Iterator itmaps = maps.begin(); itmaps != maps.end(); ++itmaps )
{
// Loop the items in the group
map = quantaApp->config()->entryMap(itmaps.data());
- for(QMap<QString,QString>::Iterator it = map.begin(); it != map.end(); ++it )
+ for(TQMap<TQString,TQString>::Iterator it = map.begin(); it != map.end(); ++it )
{
// If we found it, return the key of the group
if(it.data() == dock)
@@ -5258,18 +5258,18 @@ void QuantaApp::slotDockWidgetHasUndocked(KDockWidget *widget)
slotPreviewBeingClosed();
}
-void QuantaApp::slotTabDragged(QWidget *widget)
+void QuantaApp::slotTabDragged(TQWidget *widget)
{
QuantaView *view = dynamic_cast<QuantaView*>(widget);
if (view && view->document())
{
- QString url = view->document()->url().url();
- QDragObject *d = new QTextDrag( url, this );
+ TQString url = view->document()->url().url();
+ TQDragObject *d = new TQTextDrag( url, this );
d->dragCopy();
}
}
-void QuantaApp::setTabToolTip(QWidget *w, const QString &toolTipStr)
+void QuantaApp::setTabToolTip(TQWidget *w, const TQString &toolTipStr)
{
if (tabWidget())
tabWidget()->setTabToolTip(w, toolTipStr);
@@ -5282,10 +5282,10 @@ void QuantaApp::createPreviewPart()
m_htmlPart->view()->setIcon(UserIcon("preview"));
m_htmlPart->view()->setCaption(i18n("Preview"));
slotNewPart(m_htmlPart, false);
- connect(m_htmlPart, SIGNAL(previewHasFocus(bool)), this, SLOT(slotPreviewHasFocus(bool)));
- connect(m_htmlPart, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
- connect(m_htmlPart, SIGNAL(openFile(const KURL&, const QString&, bool)), this, SLOT(slotFileOpen(const KURL&, const QString&, bool)));
- connect(m_htmlPart, SIGNAL(showPreview(bool)), this, SLOT(slotShowPreviewWidget(bool)));
+ connect(m_htmlPart, TQT_SIGNAL(previewHasFocus(bool)), this, TQT_SLOT(slotPreviewHasFocus(bool)));
+ connect(m_htmlPart, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(slotHTMLPartDeleted(TQObject *)));
+ connect(m_htmlPart, TQT_SIGNAL(openFile(const KURL&, const TQString&, bool)), this, TQT_SLOT(slotFileOpen(const KURL&, const TQString&, bool)));
+ connect(m_htmlPart, TQT_SIGNAL(showPreview(bool)), this, TQT_SLOT(slotShowPreviewWidget(bool)));
}
@@ -5296,21 +5296,21 @@ void QuantaApp::createDocPart()
m_htmlPartDoc->view()->setIcon(SmallIcon("contents"));
m_htmlPartDoc->view()->setCaption(i18n("Documentation"));
slotNewPart(m_htmlPartDoc, false);
- connect(m_htmlPartDoc, SIGNAL(destroyed(QObject *)), this, SLOT(slotHTMLPartDeleted(QObject *)));
+ connect(m_htmlPartDoc, TQT_SIGNAL(destroyed(TQObject *)), this, TQT_SLOT(slotHTMLPartDeleted(TQObject *)));
}
-void QuantaApp::insertTagActionPoolItem(QString const& action_item)
+void QuantaApp::insertTagActionPoolItem(TQString const& action_item)
{
- for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ for(TQStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
if(action_item == *it)
return;
m_tagActionPool += action_item;
}
-void QuantaApp::removeTagActionPoolItem(QString const& action_item)
+void QuantaApp::removeTagActionPoolItem(TQString const& action_item)
{
- for(QStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
+ for(TQStringList::Iterator it = m_tagActionPool.begin(); it != m_tagActionPool.end(); ++it)
{
if(action_item == *it)
{
@@ -5320,7 +5320,7 @@ void QuantaApp::removeTagActionPoolItem(QString const& action_item)
}
}
-void QuantaApp::slotHTMLPartDeleted(QObject *object)
+void QuantaApp::slotHTMLPartDeleted(TQObject *object)
{
if (object == m_htmlPart)
{
@@ -5335,17 +5335,17 @@ void QuantaApp::slotTabMoved(int from, int to)
KMdiChildView *view = m_pDocumentViews->at(from);
m_pDocumentViews->remove(from);
m_pDocumentViews->insert(to, view);
- connect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+ connect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
}
void QuantaApp::slotTabAboutToMove(int from, int to)
{
Q_UNUSED(from);
Q_UNUSED(to);
- disconnect(this, SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(this, TQT_SIGNAL(viewActivated (KMdiChildView *)), ViewManager::ref(), TQT_SLOT(slotViewActivated(KMdiChildView*)));
}
-QString QuantaApp::currentURL() const
+TQString QuantaApp::currentURL() const
{
return ViewManager::ref()->currentURL();
}
@@ -5368,7 +5368,7 @@ void QuantaApp::slotAnnotate()
}
}
-void QuantaApp::dropEvent(QDropEvent* event)
+void QuantaApp::dropEvent(TQDropEvent* event)
{
if (KURLDrag::canDecode(event))
{
@@ -5382,7 +5382,7 @@ void QuantaApp::dropEvent(QDropEvent* event)
}
}
-void QuantaApp::dragEnterEvent( QDragEnterEvent *e)
+void QuantaApp::dragEnterEvent( TQDragEnterEvent *e)
{
e->accept();
}
diff --git a/quanta/src/quanta.h b/quanta/src/quanta.h
index 5cee4c1f..a29ba1f4 100644
--- a/quanta/src/quanta.h
+++ b/quanta/src/quanta.h
@@ -31,11 +31,11 @@
#define IDS_DEFAULT "Ready."
// include files for Qt
-#include <qmap.h>
-#include <qdict.h>
-#include <qvaluelist.h>
-#include <qstrlist.h>
-#include <qptrlist.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
+#include <tqstrlist.h>
+#include <tqptrlist.h>
// include files for KDE
#include <kdeversion.h>
@@ -122,7 +122,7 @@ public:
~QuantaApp();
QuantaDoc *doc() const {return m_doc; }
- QPopupMenu *tagsMenu() const {return m_tagsMenu;}
+ TQPopupMenu *tagsMenu() const {return m_tagsMenu;}
KConfig *config() const {return m_config;}
//TODO: check if we really need these "get" methods (and get rid o get)
@@ -133,39 +133,39 @@ public:
DebuggerManager *debugger() const {return m_debugger;}
KParts::PartManager *partManager() {return m_partManager;}
- QWidget* createContainer(QWidget *parent, int index, const QDomElement &element, int &id );
- void removeContainer(QWidget *container, QWidget *parent, QDomElement &element, int id );
+ TQWidget* createContainer(TQWidget *parent, int index, const TQDomElement &element, int &id );
+ void removeContainer(TQWidget *container, TQWidget *parent, TQDomElement &element, int id );
/** Returns the project's base URL if it exists, the HOME dir if there is no project and no opened document (or the current opened document was not saved yet), and the base URL of the opened document, if it is saved somewhere.
maps to the same function in Project*/
KURL projectBaseURL() const;
/** Returns the project (if there is one loaded) or global default encoding. */
- QString defaultEncoding();
+ TQString defaultEncoding();
/** Returns the interface number for the currently active editor. */
int currentEditorIfNum() const;
/** Return the URL of the currently active document */
- QString currentURL() const;
+ TQString currentURL() const;
/** Return the URL of the currently project */
- QString projectURL() const;
+ TQString projectURL() const;
/** Return the list of opened URLs and their editor interface numbers*/
- QStringList openedURLs() const;
- QString saveCurrentFile();
+ TQStringList openedURLs() const;
+ TQString saveCurrentFile();
/**
* Sets the DTEP for the current document.
* @param dtepName the name (nickname or full name) of the DTEP
* @param convert if true, converts the !DOCTYPE line to the new DTEP
*/
- void setDtep(const QString& dtepName, bool convert);
- QStringList tagAreas(const QString& name, bool includeCoordinates, bool skipFoundContent) const;
- QString documentFolderForURL(const QString &url);
- QString urlWithPreviewPrefix(const QString &url);
- void addFileToProject(const QString &url);
- void addFolderToProject(const QString &url);
- void uploadURL(const QString &url, const QString& profile, bool markOnly); /** Capture DCOP signals from KXsldbgPart or similar plugin */
- void newCursorPosition(const QString &file, int lineNumber, int columnNumber);
- void newDebuggerPosition(const QString &file, int lineNumber);
- void openFile(const QString &file, int lineNumber, int columnNumber);
+ void setDtep(const TQString& dtepName, bool convert);
+ TQStringList tagAreas(const TQString& name, bool includeCoordinates, bool skipFoundContent) const;
+ TQString documentFolderForURL(const TQString &url);
+ TQString urlWithPreviewPrefix(const TQString &url);
+ void addFileToProject(const TQString &url);
+ void addFolderToProject(const TQString &url);
+ void uploadURL(const TQString &url, const TQString& profile, bool markOnly); /** Capture DCOP signals from KXsldbgPart or similar plugin */
+ void newCursorPosition(const TQString &file, int lineNumber, int columnNumber);
+ void newDebuggerPosition(const TQString &file, int lineNumber);
+ void openFile(const TQString &file, int lineNumber, int columnNumber);
/** reparse current document and initialize node. */
void reparse(bool force);
@@ -176,8 +176,8 @@ public:
//return the old Cursor position
void oldCursorPos(uint &line, uint &col) {line = oldCursorLine; col = oldCursorCol;}
- QStringList selectors(const QString& tag);
- QStringList idSelectors();
+ TQStringList selectors(const TQString& tag);
+ TQStringList idSelectors();
WHTMLPart *documentationPart() {return m_htmlPartDoc;}
/** Show the toolbar which is in url. If it was not loaded yet, it loads the
toolbar from the file */
@@ -195,7 +195,7 @@ public:
* @param attr The string containing the attrs of the new Node to create.
* @return Returns a new Node created according to the contents of the TagDialog.
*/
- Node *showTagDialogAndReturnNode(const QString &tag, const QString &attr = QString::null);
+ Node *showTagDialogAndReturnNode(const TQString &tag, const TQString &attr = TQString::null);
/** Returns the baseURL of the document. */
KURL baseURL();
@@ -203,7 +203,7 @@ public:
/** Called when a document was closed. Resets some variables. */
void slotFileClosed(Document *w);
- void setTabToolTip(QWidget *w, const QString& toolTipStr);
+ void setTabToolTip(TQWidget *w, const TQString& toolTipStr);
void createPreviewPart();
void createDocPart();
@@ -214,18 +214,18 @@ public:
* If the user presses a key right away the character is inserted inside the tags for the queued actions.
* If the user changes the place of the cursor, the actions waiting for being inserted are removed.
*/
- QStringList const& tagActionPool() const {return m_tagActionPool;}
- void insertTagActionPoolItem(QString const& action_item);
- void removeTagActionPoolItem(QString const& action_item);
+ TQStringList const& tagActionPool() const {return m_tagActionPool;}
+ void insertTagActionPoolItem(TQString const& action_item);
+ void removeTagActionPoolItem(TQString const& action_item);
void removeAllTagActionPoolItems() {m_tagActionPool.clear();}
/** Updates the structure and attribute treeview. */
void updateTreeViews();
- void setTitle(const QString&);
+ void setTitle(const TQString&);
- QPtrList<TagAction> const& tagActions() const {return m_tagActions;}
+ TQPtrList<TagAction> const& tagActions() const {return m_tagActions;}
/** Clicked word or selected text for context sensitive menu in editor */
- QString popupWord;
+ TQString popupWord;
signals: // Signals
/** signal used to hide the splash screen */
@@ -234,20 +234,20 @@ signals: // Signals
void reloadAllTrees();
/** Emitted when some kind of event that can have associated actions has happened. */
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
- void toolbarRemoved(const QString&);
+ void toolbarRemoved(const TQString&);
- void showMessage(const QString&, bool);
+ void showMessage(const TQString&, bool);
void clearMessages();
public slots:
void slotFileNew();
void slotFileOpen();
void slotFileOpen(const KURL &url);
- void slotFileOpen(const KURL &url, const QString &encoding);
- void slotFileOpen(const KURL &url, const QString &encoding, bool readOnly);
- void slotFileOpen(const KURL::List &urls, const QString& encoding);
+ void slotFileOpen(const KURL &url, const TQString &encoding);
+ void slotFileOpen(const KURL &url, const TQString &encoding, bool readOnly);
+ void slotFileOpen(const KURL::List &urls, const TQString& encoding);
void slotFileSave();
bool slotFileSaveAs(QuantaView *viewToSave = 0L);
void slotFileSaveAsLocalTemplate();
@@ -269,7 +269,7 @@ public slots:
void slotEditFindInFiles();
/// open url in documentation window
- void openDoc(const QString& url);
+ void openDoc(const TQString& url);
void slotContextHelp();
@@ -281,11 +281,11 @@ public slots:
WARNING: Don't use in place where nothing should happen until the function
exits (like in startup code, DTD reading, etc.) as it calls processEvents() and
unexpected things may happen. */
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
void slotNewStatus();
void slotNewLineColumn();
-// void slotUpdateStatus(QWidget*);FIXME:
+// void slotUpdateStatus(TQWidget*);FIXME:
/** repaint preview */
void slotRepaintPreview();
@@ -317,11 +317,11 @@ public slots:
void slotOptionsConfigureToolbars();
void slotNewToolbarConfig();
/** Configure toolbars, show defaultToolbar by default */
- void slotConfigureToolbars(const QString& defaultToolbar = QString::null);
+ void slotConfigureToolbars(const TQString& defaultToolbar = TQString::null);
void slotOptionsConfigureActions();
void setCursorPosition(int row, int col );
- void gotoFileAndLine(const QString& filename, int line, int column);
+ void gotoFileAndLine(const TQString& filename, int line, int column);
void selectArea(int line1, int col1, int line2, int col2);
@@ -338,7 +338,7 @@ public slots:
/** Saves a toolbar as project specific. */
void slotSaveProjectToolbar();
/** Loads the toolbars for dtd named dtdName and unload the ones belonging to oldDtdName. */
- void slotLoadToolbarForDTD(const QString& dtdName);
+ void slotLoadToolbarForDTD(const TQString& dtdName);
/** Load an user toolbar from the disk. */
void slotLoadToolbarFile(const KURL& url);
/** Load an user toolbar from the disk. */
@@ -346,22 +346,22 @@ public slots:
/** Load a global toolbar from the disk. */
void slotLoadGlobalToolbar();
/** Remove the toolbar named "name". */
- bool slotRemoveToolbar(const QString& name);
+ bool slotRemoveToolbar(const TQString& name);
/** Rename the toolbar named "name". */
- void slotRenameToolbar(const QString& name);
+ void slotRenameToolbar(const TQString& name);
/** Rename the toolbar. */
void slotRenameToolbar();
/** Delete an action */
void slotDeleteAction(KAction *action);
/** Remove the action from toolbar*/
- void slotRemoveAction(const QString&, const QString& actionName);
+ void slotRemoveAction(const TQString&, const TQString& actionName);
/** Edit the action */
- void slotEditAction(const QString&);
+ void slotEditAction(const TQString&);
/** Creates a new, empty action */
void slotNewAction();
/** Creates a script action for a_scriptURL using the a_interpreter as the script
interpreter application */
- void slotAssignActionToScript(const KURL&a_scriptURL, const QString& a_interpreter);
+ void slotAssignActionToScript(const KURL&a_scriptURL, const TQString& a_interpreter);
/** Change the DTD/DTEP of the current document. */
void slotChangeDTD();
@@ -374,7 +374,7 @@ public slots:
/** Show or hide the groups for dtepName in the structure tree.
The special value of "clear" for dtepName means show groups
for all DTEPs found in the document.*/
- void slotShowGroupsForDTEP(const QString& dtepName, bool show);
+ void slotShowGroupsForDTEP(const TQString& dtepName, bool show);
/** Build the project specific toolbar menu. */
void slotBuildPrjToolbarsMenu();
@@ -410,10 +410,10 @@ public slots:
void slotDeleteFile(QuantaView *view=0L);
/** Called when the CVS command working on files was executed successfully. */
- void slotCVSCommandExecuted(const QString &command, const QStringList &files);
+ void slotCVSCommandExecuted(const TQString &command, const TQStringList &files);
/** Called when the preview or documentation part is deleted. */
- void slotHTMLPartDeleted(QObject *object);
+ void slotHTMLPartDeleted(TQObject *object);
void slotRefreshActiveWindow();
@@ -430,7 +430,7 @@ public slots:
void slotGetUserToolbarFiles(KURL::List *list);
// Get saved position of dock
- KDockWidget::DockPosition prevDockPosition(QWidget* dock, KDockWidget::DockPosition def);
+ KDockWidget::DockPosition prevDockPosition(TQWidget* dock, KDockWidget::DockPosition def);
protected slots:
void slotDockWidgetHasUndocked(KDockWidget *widget);
@@ -458,11 +458,11 @@ protected slots:
/** Downloads a template from the main server */
void slotDownloadTemplate();
/** Uploads a template to the main server */
- void slotUploadTemplate(const QString &fileName);
+ void slotUploadTemplate(const TQString &fileName);
/** Downloads a script from the main server */
void slotDownloadScript();
/** Uploads a script to the main server */
- void slotUploadScript(const QString &fileName);
+ void slotUploadScript(const TQString &fileName);
/** Downloads a documentation from the main server */
void slotDownloadDoc();
/** Shows tip of the day */
@@ -518,42 +518,42 @@ protected slots:
void slotShowSourceEditor();
void slotShowVPLAndSourceEditor();
void slotShowVPLOnly();
- void slotTabDragged(QWidget *widget);
+ void slotTabDragged(TQWidget *widget);
void slotTabMoved(int from, int to);
void slotTabAboutToMove(int from, int to);
void slotAnnotate();
protected:
/** Create a DTEP tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createDTEPTarball();
+ TQString createDTEPTarball();
/** Create a toolbar tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createToolbarTarball();
+ TQString createToolbarTarball();
/** Ask for save all the modified user toolbars. */
bool removeToolbars();
/** Returns true if all toolbars are hidden, false otherwise. */
bool allToolbarsHidden() const;
/** No descriptions */
- virtual void focusInEvent(QFocusEvent*);
+ virtual void focusInEvent(TQFocusEvent*);
void saveOptions();
virtual bool queryClose();
void saveAsTemplate (bool projectTemplate, bool selectionOnly = false);
/** Saves a toolbar as local or project specific. */
- bool saveToolbar(bool localToolbar = true, const QString& toolbarToSave = QString::null, const KURL& destURL = KURL());
+ bool saveToolbar(bool localToolbar = true, const TQString& toolbarToSave = TQString::null, const KURL& destURL = KURL());
/** Saves the toolbar and the actions. Returns the name of the actions file*/
- KURL saveToolbarToFile(const QString& toolbarName,const KURL& destFile);
+ KURL saveToolbarToFile(const TQString& toolbarName,const KURL& destFile);
/** Makes the tabwidget look and behave like we want. If closeButtonsOnly is true,
only the close button behavior is changed. */
void initTabWidget(bool closeButtonsOnly = false);
- void dropEvent(QDropEvent *ev);
- void dragEnterEvent ( QDragEnterEvent * );
+ void dropEvent(TQDropEvent *ev);
+ void dragEnterEvent ( TQDragEnterEvent * );
void resetDockLayout();
@@ -578,7 +578,7 @@ private:
QuantaPluginInterface *m_pluginInterface;
- QPopupMenu *m_tagsMenu;
+ TQPopupMenu *m_tagsMenu;
// config
KConfig *m_config;
@@ -591,7 +591,7 @@ private:
QuantaDoc *m_doc;
/** parsered tree of document */
- QTimer *statusbarTimer;
+ TQTimer *statusbarTimer;
// ACTIONS
KRecentFilesAction *projectToolbarFiles;
@@ -603,9 +603,9 @@ private:
KAction *editTagAction, *selectTagAreaAction;
- QDomDocument* m_actions;
+ TQDomDocument* m_actions;
- QPtrList<KTextEditor::Mark> markList;
+ TQPtrList<KTextEditor::Mark> markList;
int currentPageIndex;
uint userToolbarsCount;
@@ -620,37 +620,37 @@ private:
bool m_noFramesPreview;
bool m_parserEnabled; ///< enables/disables reparsing. If false, even a forced reparse is ignored (used when opening multiple files)
- QString m_scriptOutput;
+ TQString m_scriptOutput;
- QStringList m_tagActionPool;
- QPtrList<TagAction> m_tagActions;
+ TQStringList m_tagActionPool;
+ TQPtrList<TagAction> m_tagActions;
protected: // Protected attributes
/** Timer to refresh the structure tree. */
- QTimer *refreshTimer;
+ TQTimer *refreshTimer;
/** Timer to detect idle periods. Every time the cursor moves the timer is
restarted.*/
- QTimer *idleTimer;
+ TQTimer *idleTimer;
/** The toolbars for this DTD are currently shown to the user. */
- QString currentToolbarDTD;
+ TQString currentToolbarDTD;
KDockWidget *m_oldTreeViewWidget;
/** The ids of the widgets visible before doing the preview/documentation browsing */
- QValueList<int> previousWidgetList;
+ TQValueList<int> previousWidgetList;
/* Store the old shortcuts from the local quantaui.rc */
- QMap<QString, QString> oldShortcuts;
+ TQMap<TQString, TQString> oldShortcuts;
KURL urlUnderCursor;
- QTimer *autosaveTimer;
+ TQTimer *autosaveTimer;
DCOPSettings *dcopSettings;
DCOPQuanta *dcopQuanta;
KParts::PartManager *m_partManager; ///< the pointer to the part manager
- QGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI
+ TQGuardedPtr<KTextEditor::View> m_oldKTextEditor; ///< remembers the last activated GUI
QNewDTEPStuff *m_newDTEPStuff;
QNewToolbarStuff *m_newToolbarStuff;
QNewTemplateStuff *m_newTemplateStuff;
QNewScriptStuff *m_newScriptStuff;
QNewDocStuff *m_newDocStuff;
- QDict<ToolbarEntry> m_toolbarList;
+ TQDict<ToolbarEntry> m_toolbarList;
public: //TODO: check if it's worth to make a read method for them
KRecentFilesAction *fileRecent;
diff --git a/quanta/src/quanta_init.cpp b/quanta/src/quanta_init.cpp
index 91f9f043..3a752299 100644
--- a/quanta/src/quanta_init.cpp
+++ b/quanta/src/quanta_init.cpp
@@ -17,21 +17,21 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qtabwidget.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qeventloop.h>
-#include <qtimer.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextcodec.h>
-#include <qpopupmenu.h>
-#include <qdatetime.h>
-#include <qradiobutton.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqtabwidget.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqeventloop.h>
+#include <tqtimer.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqtextcodec.h>
+#include <tqpopupmenu.h>
+#include <tqdatetime.h>
+#include <tqradiobutton.h>
// include files for KDE
#include <dcopclient.h>
@@ -113,13 +113,13 @@
#include "tagactionmanager.h"
#include "tagactionset.h"
-extern QMap<int, QString> replacementMap;
+extern TQMap<int, TQString> replacementMap;
QuantaInit::QuantaInit(QuantaApp * quantaApp)
- : QObject()
+ : TQObject()
{
m_quanta = quantaApp;
- connect(this, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+ connect(this, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
}
QuantaInit::~QuantaInit()
@@ -133,8 +133,8 @@ void QuantaInit::initQuanta()
m_config = quantaApp->m_config;
parser = new Parser();
- QStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
- QDir dir;
+ TQStringList tmpDirs = KGlobal::dirs()->resourceDirs("tmp");
+ TQDir dir;
tmpDir = tmpDirs[0];
for (uint i = 0; i < tmpDirs.count(); i++)
{
@@ -171,13 +171,13 @@ void QuantaInit::initQuanta()
// Initialize debugger
m_quanta->m_debugger = new DebuggerManager(m_quanta);
- connect(Project::ref(), SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->m_debugger, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(Project::ref(), SIGNAL(eventHappened(const QString &, const QString &, const QString &)),
- m_quanta->m_debugger, SLOT(slotHandleEvent(const QString &, const QString &, const QString &)));
- connect(m_quanta->m_debugger, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
+ connect(Project::ref(), TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->m_debugger, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(Project::ref(), TQT_SIGNAL(eventHappened(const TQString &, const TQString &, const TQString &)),
+ m_quanta->m_debugger, TQT_SLOT(slotHandleEvent(const TQString &, const TQString &, const TQString &)));
+ connect(m_quanta->m_debugger, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
- //m_quanta->KDockMainWindow::createGUI( QString::null, false /* conserveMemory */ );
+ //m_quanta->KDockMainWindow::createGUI( TQString::null, false /* conserveMemory */ );
m_quanta->createShellGUI(true);
addToolTreeView(m_quanta->fTab, i18n("Files"), UserIcon("ftab"), KDockWidget::DockLeft);
@@ -193,7 +193,7 @@ void QuantaInit::initQuanta()
// Restore the dock layout
m_config->setGroup ("General Options");
- QString layout = m_config->readEntry("Window layout", "Default");
+ TQString layout = m_config->readEntry("Window layout", "Default");
int mdiMode = m_config->readNumEntry("MDI mode", -1);
if (mdiMode != -1 && layout != "Default")
{
@@ -209,24 +209,24 @@ void QuantaInit::initQuanta()
if (mdiMode == KMdi::ToplevelMode)
{
m_quanta->switchToChildframeMode();
- QTimer::singleShot(0, m_quanta, SLOT(switchToToplevelMode()));
+ TQTimer::singleShot(0, m_quanta, TQT_SLOT(switchToToplevelMode()));
}
// Always hide debugger toolbar at this point
m_quanta->toolBar("debugger_toolbar")->hide();
- m_quanta->m_pluginInterface->setPluginMenu(static_cast<QPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta)));
+ m_quanta->m_pluginInterface->setPluginMenu(static_cast<TQPopupMenu*>(m_quanta->factory()->container("plugins", m_quanta)));
m_quanta->m_pluginInterface->buildPluginMenu();
//TODO: Remove after upgrade from 3.1 is not supported
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(KXMLGUIFactory::readConfigFile(m_quanta->xmlFile(), m_quanta->instance()));
- QDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
- QDomNode node = nodeList.item(0).firstChild();
+ TQDomNodeList nodeList = doc.elementsByTagName("ActionProperties");
+ TQDomNode node = nodeList.item(0).firstChild();
while (!node.isNull())
{
if (node.nodeName() == "Action")
{
- QDomElement el = node.toElement();
+ TQDomElement el = node.toElement();
m_quanta->oldShortcuts.insert(el.attribute("name"), el.attribute("shortcut"));
node = node.nextSibling();
el.parentNode().removeChild(el);
@@ -238,7 +238,7 @@ void QuantaInit::initQuanta()
m_quanta->applyMainWindowSettings(m_config);
- m_quanta->m_tagsMenu = static_cast<QPopupMenu*>(m_quanta->factory()->container("tags", m_quanta));
+ m_quanta->m_tagsMenu = static_cast<TQPopupMenu*>(m_quanta->factory()->container("tags", m_quanta));
KMenuBar *mb = m_quanta->menuBar();
for (uint i = 0 ; i < mb->count(); i++)
{
@@ -252,20 +252,20 @@ void QuantaInit::initQuanta()
if (toolviewMenu)
toolviewMenu->plug(m_quanta->windowMenu());
- QPopupMenu *toolbarsMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta);
- connect(toolbarsMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotBuildPrjToolbarsMenu()));
+ TQPopupMenu *toolbarsMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("toolbars_load", m_quanta);
+ connect(toolbarsMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotBuildPrjToolbarsMenu()));
- QPopupMenu *contextMenu = (QPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta);
- connect(contextMenu, SIGNAL(aboutToShow()), m_quanta, SLOT(slotContextMenuAboutToShow()));
+ TQPopupMenu *contextMenu = (TQPopupMenu*)(m_quanta->guiFactory())->container("popup_editor", m_quanta);
+ connect(contextMenu, TQT_SIGNAL(aboutToShow()), m_quanta, TQT_SLOT(slotContextMenuAboutToShow()));
- connect(m_quanta->m_messageOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_problemOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_annotationOutput->currentFileAnnotations(), SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
- connect(m_quanta->m_annotationOutput, SIGNAL(clicked(const QString&, int, int)),
- m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_quanta->m_messageOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_problemOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_annotationOutput->currentFileAnnotations(), TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
+ connect(m_quanta->m_annotationOutput, TQT_SIGNAL(clicked(const TQString&, int, int)),
+ m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
m_quanta->slotFileNew();
m_quanta->slotNewStatus();
@@ -275,23 +275,23 @@ void QuantaInit::initQuanta()
KTipDialog::showTip(m_quanta);
//get the PID of this running instance
- qConfig.quantaPID = QString::number(int(getpid()), 10);
+ qConfig.quantaPID = TQString::number(int(getpid()), 10);
qConfig.backupDirPath = KGlobal::instance()->dirs()->saveLocation("data", resourceDir + "backups/");
- m_quanta->autosaveTimer = new QTimer(m_quanta);
- connect(m_quanta->autosaveTimer, SIGNAL(timeout()), m_quanta, SLOT(slotAutosaveTimer()));
+ m_quanta->autosaveTimer = new TQTimer(m_quanta);
+ connect(m_quanta->autosaveTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotAutosaveTimer()));
m_quanta->autosaveTimer->start(qConfig.autosaveInterval * 60000, false);
- connect(m_quanta->m_doc, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
- connect(parser, SIGNAL(rebuildStructureTree(bool)),
- m_quanta, SLOT(slotReloadStructTreeView(bool)));
+ connect(m_quanta->m_doc, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
+ connect(parser, TQT_SIGNAL(rebuildStructureTree(bool)),
+ m_quanta, TQT_SLOT(slotReloadStructTreeView(bool)));
// Read list of characters
- QFile file(locate("appdata","chars"));
+ TQFile file(locate("appdata","chars"));
if ( file.open(IO_ReadOnly) ) { // file opened successfully
- QTextStream t( &file ); // use a text stream
- t.setEncoding(QTextStream::UnicodeUTF8);
- QString s;
+ TQTextStream t( &file ); // use a text stream
+ t.setEncoding(TQTextStream::UnicodeUTF8);
+ TQString s;
while (!t.eof())
{
s = t.readLine();
@@ -300,22 +300,22 @@ void QuantaInit::initQuanta()
if (begin == 1)
continue;
int length = s.find(";)") - begin + 1;
- QString s2 = s.mid(begin, length - 1);
+ TQString s2 = s.mid(begin, length - 1);
replacementMap[s[0].unicode()] = s2;
}
file.close();
}
- QString infoCss = tmpDir;
- infoCss.replace(QRegExp("/quanta$"),"");
+ TQString infoCss = tmpDir;
+ infoCss.replace(TQRegExp("/quanta$"),"");
infoCss += "/info.css";
QExtFileInfo::copy(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.css"), KURL().fromPathOrURL(infoCss));
checkRuntimeDependencies();
ViewManager::ref()->activeDocument()->view()->setFocus();
- m_quanta->refreshTimer = new QTimer(m_quanta);
- connect(m_quanta->refreshTimer, SIGNAL(timeout()), m_quanta, SLOT(slotReparse()));
+ m_quanta->refreshTimer = new TQTimer(m_quanta);
+ connect(m_quanta->refreshTimer, TQT_SIGNAL(timeout()), m_quanta, TQT_SLOT(slotReparse()));
m_quanta->refreshTimer->start( qConfig.refreshFrequency*1000, false ); //update the structure tree every 5 seconds
if (qConfig.instantUpdate || qConfig.refreshFrequency == 0)
{
@@ -332,9 +332,9 @@ void QuantaInit::initToolBars()
void QuantaInit::initStatusBar()
{
- m_quanta->statusbarTimer = new QTimer(m_quanta);
- connect(m_quanta->statusbarTimer,SIGNAL(timeout()),
- m_quanta, SLOT(statusBarTimeout()));
+ m_quanta->statusbarTimer = new TQTimer(m_quanta);
+ connect(m_quanta->statusbarTimer,TQT_SIGNAL(timeout()),
+ m_quanta, TQT_SLOT(statusBarTimeout()));
progressBar = new KProgress(m_quanta->statusBar());
progressBar->setTextEnabled(false);
@@ -356,111 +356,111 @@ void QuantaInit::initStatusBar()
void QuantaInit::initDocument()
{
m_quanta->m_doc = new QuantaDoc(0L);
- connect(m_quanta->m_doc, SIGNAL(newStatus()),
- m_quanta, SLOT(slotNewStatus()));
+ connect(m_quanta->m_doc, TQT_SIGNAL(newStatus()),
+ m_quanta, TQT_SLOT(slotNewStatus()));
}
void QuantaInit::initProject()
{
Project *m_project = Project::ref(m_quanta);
- connect(m_project, SIGNAL(getTreeStatus(QStringList *)),
- pTab, SLOT(slotGetTreeStatus(QStringList *)));
- connect(m_project, SIGNAL(loadToolbarFile(const KURL &)),
- m_quanta, SLOT(slotLoadToolbarFile(const KURL &)));
- connect(m_project, SIGNAL(getUserToolbarFiles(KURL::List *)),
- m_quanta, SLOT(slotGetUserToolbarFiles(KURL::List *)));
- connect(m_project, SIGNAL(openFiles(const KURL::List &, const QString&)),
- m_quanta, SLOT(slotFileOpen(const KURL::List &, const QString&)));
- connect(m_project, SIGNAL(openFile(const KURL &, const QString&)),
- m_quanta, SLOT(slotFileOpen(const KURL &, const QString&)));
- connect(m_project, SIGNAL(closeFile(const KURL &)),
- m_quanta, SLOT(slotFileClose(const KURL &)));
- connect(m_project, SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
- pTab, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
- connect(m_project, SIGNAL(closeFiles()), ViewManager::ref(), SLOT(closeAll()));
- connect(m_project, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
-
- connect(m_quanta->fTab, SIGNAL(insertDirInProject(const KURL&)),
- m_project, SLOT(slotAddDirectory(const KURL&)));
-
- connect(m_quanta->fTab, SIGNAL(insertFileInProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
-
- connect(TemplatesTreeView::ref(), SIGNAL(insertDirInProject(const KURL&)),
- m_project, SLOT(slotAddDirectory(const KURL&)));
-
- connect(TemplatesTreeView::ref(), SIGNAL(insertFileInProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
- connect(TemplatesTreeView::ref(), SIGNAL(downloadTemplate()),
- m_quanta, SLOT(slotDownloadTemplate()));
- connect(TemplatesTreeView::ref(), SIGNAL(uploadTemplate(const QString&)), m_quanta, SLOT(slotUploadTemplate(const QString&)));
+ connect(m_project, TQT_SIGNAL(getTreeStatus(TQStringList *)),
+ pTab, TQT_SLOT(slotGetTreeStatus(TQStringList *)));
+ connect(m_project, TQT_SIGNAL(loadToolbarFile(const KURL &)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL &)));
+ connect(m_project, TQT_SIGNAL(getUserToolbarFiles(KURL::List *)),
+ m_quanta, TQT_SLOT(slotGetUserToolbarFiles(KURL::List *)));
+ connect(m_project, TQT_SIGNAL(openFiles(const KURL::List &, const TQString&)),
+ m_quanta, TQT_SLOT(slotFileOpen(const KURL::List &, const TQString&)));
+ connect(m_project, TQT_SIGNAL(openFile(const KURL &, const TQString&)),
+ m_quanta, TQT_SLOT(slotFileOpen(const KURL &, const TQString&)));
+ connect(m_project, TQT_SIGNAL(closeFile(const KURL &)),
+ m_quanta, TQT_SLOT(slotFileClose(const KURL &)));
+ connect(m_project, TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)),
+ pTab, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &)));
+ connect(m_project, TQT_SIGNAL(closeFiles()), ViewManager::ref(), TQT_SLOT(closeAll()));
+ connect(m_project, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+
+ connect(m_quanta->fTab, TQT_SIGNAL(insertDirInProject(const KURL&)),
+ m_project, TQT_SLOT(slotAddDirectory(const KURL&)));
+
+ connect(m_quanta->fTab, TQT_SIGNAL(insertFileInProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertDirInProject(const KURL&)),
+ m_project, TQT_SLOT(slotAddDirectory(const KURL&)));
+
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(insertFileInProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(downloadTemplate()),
+ m_quanta, TQT_SLOT(slotDownloadTemplate()));
+ connect(TemplatesTreeView::ref(), TQT_SIGNAL(uploadTemplate(const TQString&)), m_quanta, TQT_SLOT(slotUploadTemplate(const TQString&)));
// inform project if something was renamed
- connect(pTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
- connect(m_quanta->fTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
- connect(tTab, SIGNAL(renamed(const KURL&, const KURL&)),
- m_project, SLOT(slotRenamed(const KURL&, const KURL&)));
-
- connect(pTab, SIGNAL(insertToProject(const KURL&)),
- m_project, SLOT(slotInsertFile(const KURL&)));
- connect(pTab, SIGNAL(removeFromProject(const KURL&)),
- m_project, SLOT(slotRemove(const KURL&)));
- connect(pTab, SIGNAL(uploadSingleURL(const KURL&, const QString&, bool, bool)),
- m_project, SLOT(slotUploadURL(const KURL&, const QString&, bool, bool)));
- connect(pTab, SIGNAL(rescanProjectDir()), m_project, SLOT(slotRescanPrjDir()));
- connect(pTab, SIGNAL(showProjectOptions()), m_project, SLOT(slotOptions()));
- connect(pTab, SIGNAL(uploadProject()), m_project, SLOT(slotUpload()));
-
- connect(m_quanta->dTab, SIGNAL(reloadProjectDocs()), m_project, SLOT(slotReloadProjectDocs()));
- connect(m_project, SIGNAL(reloadProjectDocs()), m_quanta->dTab, SLOT(slotReloadProjectDocs()));
- connect(m_project, SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, SLOT(slotAddProjectDoc(const KURL&)));
-
- connect(m_project, SIGNAL(enableMessageWidget()),
- m_quanta, SLOT(slotShowMessagesView()));
-
- connect(m_project, SIGNAL(messages(const QString&)),
- m_quanta->m_messageOutput, SLOT(showMessage(const QString&)));
-
- connect(m_project, SIGNAL(newStatus()),
- m_quanta, SLOT(slotNewStatus()));
-
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- TemplatesTreeView::ref(), SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- pTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->fTab, SLOT(slotNewProjectLoaded(const QString &, const KURL &, const KURL &)));
- connect(m_project, SIGNAL(newProjectLoaded(const QString &, const KURL &, const KURL &)),
- m_quanta->annotationOutput(), SLOT(updateAnnotations()));
-
- connect(pTab, SIGNAL(changeFileDescription(const KURL&, const QString&)),
- m_project, SLOT(slotFileDescChanged(const KURL&, const QString&)));
- connect(pTab, SIGNAL(changeUploadStatus(const KURL&, int)),
- m_project, SLOT(slotUploadStatusChanged(const KURL&, int)));
- connect(pTab, SIGNAL(changeDocumentFolderStatus(const KURL&, bool)),
- m_project, SLOT(slotChangeDocumentFolderStatus(const KURL&, bool)));
-
- connect(m_project, SIGNAL(hideSplash()), m_quanta, SLOT(slotHideSplash()));
-
- connect(m_project, SIGNAL(statusMsg(const QString &)),
- m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(pTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(m_quanta->fTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+ connect(tTab, TQT_SIGNAL(renamed(const KURL&, const KURL&)),
+ m_project, TQT_SLOT(slotRenamed(const KURL&, const KURL&)));
+
+ connect(pTab, TQT_SIGNAL(insertToProject(const KURL&)),
+ m_project, TQT_SLOT(slotInsertFile(const KURL&)));
+ connect(pTab, TQT_SIGNAL(removeFromProject(const KURL&)),
+ m_project, TQT_SLOT(slotRemove(const KURL&)));
+ connect(pTab, TQT_SIGNAL(uploadSingleURL(const KURL&, const TQString&, bool, bool)),
+ m_project, TQT_SLOT(slotUploadURL(const KURL&, const TQString&, bool, bool)));
+ connect(pTab, TQT_SIGNAL(rescanProjectDir()), m_project, TQT_SLOT(slotRescanPrjDir()));
+ connect(pTab, TQT_SIGNAL(showProjectOptions()), m_project, TQT_SLOT(slotOptions()));
+ connect(pTab, TQT_SIGNAL(uploadProject()), m_project, TQT_SLOT(slotUpload()));
+
+ connect(m_quanta->dTab, TQT_SIGNAL(reloadProjectDocs()), m_project, TQT_SLOT(slotReloadProjectDocs()));
+ connect(m_project, TQT_SIGNAL(reloadProjectDocs()), m_quanta->dTab, TQT_SLOT(slotReloadProjectDocs()));
+ connect(m_project, TQT_SIGNAL(addProjectDoc(const KURL&)), m_quanta->dTab, TQT_SLOT(slotAddProjectDoc(const KURL&)));
+
+ connect(m_project, TQT_SIGNAL(enableMessageWidget()),
+ m_quanta, TQT_SLOT(slotShowMessagesView()));
+
+ connect(m_project, TQT_SIGNAL(messages(const TQString&)),
+ m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&)));
+
+ connect(m_project, TQT_SIGNAL(newStatus()),
+ m_quanta, TQT_SLOT(slotNewStatus()));
+
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ TemplatesTreeView::ref(), TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ pTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->fTab, TQT_SLOT(slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)));
+ connect(m_project, TQT_SIGNAL(newProjectLoaded(const TQString &, const KURL &, const KURL &)),
+ m_quanta->annotationOutput(), TQT_SLOT(updateAnnotations()));
+
+ connect(pTab, TQT_SIGNAL(changeFileDescription(const KURL&, const TQString&)),
+ m_project, TQT_SLOT(slotFileDescChanged(const KURL&, const TQString&)));
+ connect(pTab, TQT_SIGNAL(changeUploadStatus(const KURL&, int)),
+ m_project, TQT_SLOT(slotUploadStatusChanged(const KURL&, int)));
+ connect(pTab, TQT_SIGNAL(changeDocumentFolderStatus(const KURL&, bool)),
+ m_project, TQT_SLOT(slotChangeDocumentFolderStatus(const KURL&, bool)));
+
+ connect(m_project, TQT_SIGNAL(hideSplash()), m_quanta, TQT_SLOT(slotHideSplash()));
+
+ connect(m_project, TQT_SIGNAL(statusMsg(const TQString &)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
}
void QuantaInit::initView()
{
ViewManager *m_viewManager = ViewManager::ref(m_quanta);
- connect(m_quanta, SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, SLOT(slotViewActivated(KMdiChildView*)));
- connect(m_quanta, SIGNAL(lastChildViewClosed()), m_viewManager, SLOT(slotLastViewClosed()));
-// connect(m_quanta, SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, SLOT(slotViewDeactivated(KMdiChildView*)));
+ connect(m_quanta, TQT_SIGNAL(viewActivated (KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(m_quanta, TQT_SIGNAL(lastChildViewClosed()), m_viewManager, TQT_SLOT(slotLastViewClosed()));
+// connect(m_quanta, TQT_SIGNAL(viewDeactivated(KMdiChildView *)), m_viewManager, TQT_SLOT(slotViewDeactivated(KMdiChildView*)));
KafkaDocument *m_kafkaDocument = KafkaDocument::ref(0, 0, "KafkaPart");
m_kafkaDocument->getKafkaWidget()->view()->setMinimumHeight(50);
m_kafkaDocument->readConfig(quantaApp->config());
loadVPLConfig();
ToolbarTabWidget *toolBarTab = ToolbarTabWidget::ref(quantaApp);
- connect(toolBarTab, SIGNAL(iconTextModeChanged()), quantaApp, SLOT(slotRefreshActiveWindow()));
+ connect(toolBarTab, TQT_SIGNAL(iconTextModeChanged()), quantaApp, TQT_SLOT(slotRefreshActiveWindow()));
//set the toolview and close button style before the GUI is created
m_config->setGroup("General Options");
@@ -481,77 +481,77 @@ void QuantaInit::initView()
m_quanta->scriptTab = new ScriptTreeView(m_quanta, "Scripts");
m_quanta->m_messageOutput = new MessageOutput(m_quanta, "Messages");
- m_quanta->m_messageOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_messageOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->m_messageOutput->showMessage(i18n("Message Window..."));
- connect(m_quanta, SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
- connect(m_quanta, SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
+ connect(m_quanta, TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool)));
+ connect(m_quanta, TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear()));
m_quanta->m_problemOutput = new MessageOutput(m_quanta, "Problems");
- m_quanta->m_problemOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_problemOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->m_annotationOutput = new AnnotationOutput(m_quanta, "Annotations");
- m_quanta->m_annotationOutput->setFocusPolicy(QWidget::NoFocus);
+ m_quanta->m_annotationOutput->setFocusPolicy(TQWidget::NoFocus);
m_quanta->createPreviewPart();
m_quanta->createDocPart();
- connect(m_quanta, SIGNAL(reloadAllTrees()),
- m_quanta->fTab, SLOT(slotReloadAllTrees()));
-
- connect(pTab, SIGNAL(loadToolbarFile (const KURL&)),
- m_quanta, SLOT(slotLoadToolbarFile(const KURL&)));
- connect(m_viewManager, SIGNAL(viewActivated(const KURL&)),
- pTab, SLOT(slotViewActivated(const KURL&)));
-
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- pTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- tTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- m_quanta->scriptTab, SLOT(slotDocumentClosed(const KURL&)));
- connect(m_viewManager, SIGNAL(documentClosed(const KURL&)),
- m_quanta->fTab, SLOT(slotDocumentClosed(const KURL&)));
-
- connect(tTab, SIGNAL(insertFile (const KURL &)),
- m_quanta, SLOT(slotInsertFile(const KURL &)));
-
- connect(m_quanta->scriptTab, SIGNAL(openFileInPreview(const KURL &)),
- m_quanta, SLOT(slotOpenFileInPreview(const KURL &)));
- connect(m_quanta->scriptTab, SIGNAL(showPreviewWidget(bool)),
- m_quanta, SLOT(slotShowPreviewWidget(bool)));
- connect(m_quanta->scriptTab, SIGNAL(assignActionToScript(const KURL &, const QString&)),
- m_quanta, SLOT(slotAssignActionToScript(const KURL &, const QString&)));
- connect(m_quanta->scriptTab, SIGNAL(downloadScript()), m_quanta, SLOT(slotDownloadScript()));
- connect(m_quanta->scriptTab, SIGNAL(uploadScript(const QString&)), m_quanta, SLOT(slotUploadScript(const QString&)));
- connect(m_quanta->dTab, SIGNAL(downloadDoc()), m_quanta, SLOT(slotDownloadDoc()));
-
- connect(m_quanta->m_htmlPart, SIGNAL(onURL(const QString&)),
- m_quanta, SLOT(slotStatusMsg(const QString&)));
- connect(m_quanta->m_htmlPartDoc, SIGNAL(onURL(const QString&)),
- m_quanta, SLOT(slotStatusMsg(const QString&)));
-
- connect(sTab, SIGNAL(newCursorPosition(int,int)), m_quanta, SLOT(setCursorPosition(int,int)));
- connect(sTab, SIGNAL(selectArea(int,int,int,int)), m_quanta, SLOT( selectArea(int,int,int,int)));
- connect(sTab, SIGNAL(selectTagArea(Node*)), m_quanta, SLOT(slotSelectTagArea(Node*)));
- connect(sTab, SIGNAL(needReparse()), m_quanta, SLOT(slotForceReparse()));
- connect(sTab, SIGNAL(showGroupsForDTEP(const QString&, bool)), m_quanta, SLOT(slotShowGroupsForDTEP(const QString&, bool)));
- connect(sTab, SIGNAL(openFile(const KURL &)),
- m_quanta, SLOT (slotFileOpen(const KURL &)));
- connect(sTab, SIGNAL(openImage (const KURL&)),
- m_quanta, SLOT(slotImageOpen(const KURL&)));
- connect(sTab, SIGNAL(showProblemMessage(const QString&)),
- m_quanta->m_problemOutput, SLOT(showMessage(const QString&)));
- connect(sTab, SIGNAL(clearProblemOutput()),
- m_quanta->m_problemOutput, SLOT(clear()));
- connect(parser, SIGNAL(nodeTreeChanged()), sTab, SLOT(slotNodeTreeChanged()));
-
- connect(m_quanta->dTab, SIGNAL(openURL(const QString&)), m_quanta, SLOT(openDoc(const QString&)));
-
- connect(m_viewManager, SIGNAL(dragInsert(QDropEvent *)), tTab, SLOT(slotDragInsert(QDropEvent *)));
+ connect(m_quanta, TQT_SIGNAL(reloadAllTrees()),
+ m_quanta->fTab, TQT_SLOT(slotReloadAllTrees()));
+
+ connect(pTab, TQT_SIGNAL(loadToolbarFile (const KURL&)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(viewActivated(const KURL&)),
+ pTab, TQT_SLOT(slotViewActivated(const KURL&)));
+
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ pTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ tTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ m_quanta->scriptTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(m_viewManager, TQT_SIGNAL(documentClosed(const KURL&)),
+ m_quanta->fTab, TQT_SLOT(slotDocumentClosed(const KURL&)));
+
+ connect(tTab, TQT_SIGNAL(insertFile (const KURL &)),
+ m_quanta, TQT_SLOT(slotInsertFile(const KURL &)));
+
+ connect(m_quanta->scriptTab, TQT_SIGNAL(openFileInPreview(const KURL &)),
+ m_quanta, TQT_SLOT(slotOpenFileInPreview(const KURL &)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(showPreviewWidget(bool)),
+ m_quanta, TQT_SLOT(slotShowPreviewWidget(bool)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(assignActionToScript(const KURL &, const TQString&)),
+ m_quanta, TQT_SLOT(slotAssignActionToScript(const KURL &, const TQString&)));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(downloadScript()), m_quanta, TQT_SLOT(slotDownloadScript()));
+ connect(m_quanta->scriptTab, TQT_SIGNAL(uploadScript(const TQString&)), m_quanta, TQT_SLOT(slotUploadScript(const TQString&)));
+ connect(m_quanta->dTab, TQT_SIGNAL(downloadDoc()), m_quanta, TQT_SLOT(slotDownloadDoc()));
+
+ connect(m_quanta->m_htmlPart, TQT_SIGNAL(onURL(const TQString&)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString&)));
+ connect(m_quanta->m_htmlPartDoc, TQT_SIGNAL(onURL(const TQString&)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString&)));
+
+ connect(sTab, TQT_SIGNAL(newCursorPosition(int,int)), m_quanta, TQT_SLOT(setCursorPosition(int,int)));
+ connect(sTab, TQT_SIGNAL(selectArea(int,int,int,int)), m_quanta, TQT_SLOT( selectArea(int,int,int,int)));
+ connect(sTab, TQT_SIGNAL(selectTagArea(Node*)), m_quanta, TQT_SLOT(slotSelectTagArea(Node*)));
+ connect(sTab, TQT_SIGNAL(needReparse()), m_quanta, TQT_SLOT(slotForceReparse()));
+ connect(sTab, TQT_SIGNAL(showGroupsForDTEP(const TQString&, bool)), m_quanta, TQT_SLOT(slotShowGroupsForDTEP(const TQString&, bool)));
+ connect(sTab, TQT_SIGNAL(openFile(const KURL &)),
+ m_quanta, TQT_SLOT (slotFileOpen(const KURL &)));
+ connect(sTab, TQT_SIGNAL(openImage (const KURL&)),
+ m_quanta, TQT_SLOT(slotImageOpen(const KURL&)));
+ connect(sTab, TQT_SIGNAL(showProblemMessage(const TQString&)),
+ m_quanta->m_problemOutput, TQT_SLOT(showMessage(const TQString&)));
+ connect(sTab, TQT_SIGNAL(clearProblemOutput()),
+ m_quanta->m_problemOutput, TQT_SLOT(clear()));
+ connect(parser, TQT_SIGNAL(nodeTreeChanged()), sTab, TQT_SLOT(slotNodeTreeChanged()));
+
+ connect(m_quanta->dTab, TQT_SIGNAL(openURL(const TQString&)), m_quanta, TQT_SLOT(openDoc(const TQString&)));
+
+ connect(m_viewManager, TQT_SIGNAL(dragInsert(TQDropEvent *)), tTab, TQT_SLOT(slotDragInsert(TQDropEvent *)));
qConfig.windowLayout = "Default";
}
-KMdiToolViewAccessor* QuantaInit::addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position)
+KMdiToolViewAccessor* QuantaInit::addToolTreeView(TQWidget *widget, const TQString &name, const TQPixmap &icon, KDockWidget::DockPosition position)
{
widget->setIcon(icon);
widget->setCaption(name);
@@ -589,7 +589,7 @@ void QuantaInit::readOptions()
KAction *action = quantaApp->actionCollection()->action("smart_tag_insertion");
(static_cast<KToggleAction* >(action))->setChecked(qConfig.smartTagInsertion);
- QSize s(800,580);
+ TQSize s(800,580);
m_quanta->resize( m_config->readSizeEntry("Geometry", &s));
qConfig.autosaveInterval = m_config->readNumEntry("Autosave interval", 1);
@@ -619,7 +619,7 @@ void QuantaInit::readOptions()
//KNewStuff config
m_config->setGroup("KNewStuff");
- QString str = m_config->readEntry("ProvidersUrl");
+ TQString str = m_config->readEntry("ProvidersUrl");
if (str.isEmpty())
{
m_config->writeEntry( "ProvidersUrl", "http://quanta.kdewebdev.org/newstuff/providers.xml" );
@@ -645,7 +645,7 @@ void QuantaInit::openLastFiles()
// because project now can be
// in load stage ( remote prj )
m_config->setGroup("Projects");
- QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+ TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
KURL u;
QuantaCommon::setUrl(u, pu);
@@ -657,12 +657,12 @@ void QuantaInit::openLastFiles()
m_config->setGroup("General Options");
- QStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files");
- QStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files");
+ TQStringList urls = QuantaCommon::readPathListEntry(m_config, "List of opened files");
+ TQStringList encodings = QuantaCommon::readPathListEntry(m_config, "Encoding of opened files");
m_quanta->m_doc->blockSignals(true);
m_quanta->setParserEnabled(false);
uint i = 0;
- for ( QStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
+ for ( TQStringList::Iterator it = urls.begin(); it != urls.end(); ++it )
{
KURL fu;
QuantaCommon::setUrl(fu, *it);
@@ -684,7 +684,7 @@ void QuantaInit::openLastFiles()
}
/** Loads the initial project */
-void QuantaInit::loadInitialProject(const QString& url)
+void QuantaInit::loadInitialProject(const TQString& url)
{
if(url.isNull())
{
@@ -706,74 +706,74 @@ void QuantaInit::loadInitialProject(const QString& url)
void QuantaInit::initActions()
{
KActionCollection *ac = m_quanta->actionCollection();
- new KAction(i18n("Annotate..."), 0, m_quanta, SLOT(slotAnnotate()),ac, "annotate");
+ new KAction(i18n("Annotate..."), 0, m_quanta, TQT_SLOT(slotAnnotate()),ac, "annotate");
m_quanta->editTagAction = new KAction( i18n( "&Edit Current Tag..." ), CTRL+Key_E,
- m_quanta, SLOT( slotEditCurrentTag() ),
+ m_quanta, TQT_SLOT( slotEditCurrentTag() ),
ac, "edit_current_tag" );
m_quanta->selectTagAreaAction = new KAction( i18n( "&Select Current Tag Area" ), 0,
- m_quanta, SLOT( slotSelectTagArea() ),
+ m_quanta, TQT_SLOT( slotSelectTagArea() ),
ac, "select_tag_area" );
new KAction( i18n( "E&xpand Abbreviation" ), CTRL+SHIFT+Key_J,
- m_quanta, SLOT( slotExpandAbbreviation() ),
+ m_quanta, TQT_SLOT( slotExpandAbbreviation() ),
ac, "expand_abbreviation" );
- new KAction(i18n("&Report Bug..."), 0, m_quanta, SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta
+ new KAction(i18n("&Report Bug..."), 0, m_quanta, TQT_SLOT(slotReportBug()), ac, "help_reportbug"); //needed, because quanta_be bugs should be reported for quanta
//Kate actions
//Edit menu
- KStdAction::undo(m_quanta, SLOT(slotUndo()), ac);
- KStdAction::redo(m_quanta, SLOT(slotRedo()), ac);
- KStdAction::cut(m_quanta, SLOT(slotCut()), ac);
- KStdAction::copy(m_quanta, SLOT(slotCopy()), ac) ;
- KStdAction::pasteText(m_quanta, SLOT(slotPaste()), ac);
+ KStdAction::undo(m_quanta, TQT_SLOT(slotUndo()), ac);
+ KStdAction::redo(m_quanta, TQT_SLOT(slotRedo()), ac);
+ KStdAction::cut(m_quanta, TQT_SLOT(slotCut()), ac);
+ KStdAction::copy(m_quanta, TQT_SLOT(slotCopy()), ac) ;
+ KStdAction::pasteText(m_quanta, TQT_SLOT(slotPaste()), ac);
//help
(void) new KAction(i18n("Ti&p of the Day"), "idea", "", m_quanta,
- SLOT(slotHelpTip()), ac, "help_tip");
+ TQT_SLOT(slotHelpTip()), ac, "help_tip");
// File actions
//
- KStdAction::openNew( m_quanta, SLOT( slotFileNew() ), ac);
- KStdAction::open ( m_quanta, SLOT( slotFileOpen() ), ac, "file_open");
- (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), SLOT(slotCloseOtherTabs()), ac, "close_other_tabs");
+ KStdAction::openNew( m_quanta, TQT_SLOT( slotFileNew() ), ac);
+ KStdAction::open ( m_quanta, TQT_SLOT( slotFileOpen() ), ac, "file_open");
+ (void) new KAction(i18n("Close Other Tabs"), 0, ViewManager::ref(), TQT_SLOT(slotCloseOtherTabs()), ac, "close_other_tabs");
- m_quanta->fileRecent = KStdAction::openRecent(m_quanta, SLOT(slotFileOpenRecent(const KURL&)),
+ m_quanta->fileRecent = KStdAction::openRecent(m_quanta, TQT_SLOT(slotFileOpenRecent(const KURL&)),
ac, "file_open_recent");
m_quanta->fileRecent->setToolTip(i18n("Open / Open Recent"));
- connect(m_quanta->fileRecent, SIGNAL(activated()), m_quanta, SLOT(slotFileOpen()));
+ connect(m_quanta->fileRecent, TQT_SIGNAL(activated()), m_quanta, TQT_SLOT(slotFileOpen()));
(void) new KAction( i18n( "Close All" ), 0, m_quanta,
- SLOT( slotFileCloseAll() ),
+ TQT_SLOT( slotFileCloseAll() ),
ac, "file_close_all" );
- m_quanta->saveAction = KStdAction::save(m_quanta, SLOT( slotFileSave() ), ac);
+ m_quanta->saveAction = KStdAction::save(m_quanta, TQT_SLOT( slotFileSave() ), ac);
- KStdAction::saveAs( m_quanta, SLOT( slotFileSaveAs() ), ac );
+ KStdAction::saveAs( m_quanta, TQT_SLOT( slotFileSaveAs() ), ac );
m_quanta->saveAllAction = new KAction( i18n( "Save All..." ), "save_all", SHIFT+KStdAccel::shortcut(KStdAccel::Save).keyCodeQt(),
- m_quanta, SLOT( slotFileSaveAll() ),
+ m_quanta, TQT_SLOT( slotFileSaveAll() ),
ac, "file_save_all" );
(void) new KAction(i18n("Reloa&d"), "revert", SHIFT+Key_F5, m_quanta,
- SLOT(slotFileReload()), ac, "file_reload");
+ TQT_SLOT(slotFileReload()), ac, "file_reload");
// (void) new KAction(i18n("Reload All "), 0, 0, m_quanta,
-// SLOT(slotFileReloadAll()), ac, "file_reload_all");
+// TQT_SLOT(slotFileReloadAll()), ac, "file_reload_all");
(void) new KAction( i18n( "Save as Local Template..." ), 0,
- m_quanta, SLOT( slotFileSaveAsLocalTemplate() ),
+ m_quanta, TQT_SLOT( slotFileSaveAsLocalTemplate() ),
ac, "save_local_template" );
(void) new KAction( i18n( "Save Selection to Local Template File..." ), 0,
- m_quanta, SLOT( slotFileSaveSelectionAsLocalTemplate() ),
+ m_quanta, TQT_SLOT( slotFileSaveSelectionAsLocalTemplate() ),
ac, "save_selection_local_template" );
- KStdAction::quit( m_quanta, SLOT( slotFileQuit() ), ac );
+ KStdAction::quit( m_quanta, TQT_SLOT( slotFileQuit() ), ac );
// Edit actions
(void) new KAction( i18n( "Find in Files..." ),
SmallIcon("filefind"), CTRL+ALT+Key_F,
- m_quanta, SLOT( slotEditFindInFiles() ),
+ m_quanta, TQT_SLOT( slotEditFindInFiles() ),
ac, "find_in_files" );
KAction* aux = TagActionManager::self()->actionCollection()->action("apply_source_indentation");
@@ -783,69 +783,69 @@ void QuantaInit::initActions()
// Tool actions
(void) new KAction( i18n( "&Context Help..." ), CTRL+Key_H,
- m_quanta, SLOT( slotContextHelp() ),
+ m_quanta, TQT_SLOT( slotContextHelp() ),
ac, "context_help" );
(void) new KAction( i18n( "&Quanta Homepage" ), 0,
- m_quanta, SLOT( slotHelpHomepage() ),
+ m_quanta, TQT_SLOT( slotHelpHomepage() ),
ac, "help_homepage" );
(void) new KAction( i18n( "&User Mailing List" ), 0,
- m_quanta, SLOT( slotHelpUserList() ),
+ m_quanta, TQT_SLOT( slotHelpUserList() ),
ac, "help_userlist" );
(void) new KAction( i18n( "Make &Donation" ), 0,
- m_quanta, SLOT( slotMakeDonation() ),
+ m_quanta, TQT_SLOT( slotMakeDonation() ),
ac, "help_donation" );
(void) new KAction( i18n( "Tag &Attributes..." ), ALT+Key_Down,
- m_quanta->m_doc, SLOT( slotAttribPopup() ),
+ m_quanta->m_doc, TQT_SLOT( slotAttribPopup() ),
ac, "tag_attributes" );
(void) new KAction( i18n( "&Change the DTD..." ), 0,
- m_quanta, SLOT( slotChangeDTD() ),
+ m_quanta, TQT_SLOT( slotChangeDTD() ),
ac, "change_dtd" );
(void) new KAction( i18n( "&Edit DTD Settings..." ), 0,
- m_quanta, SLOT( slotEditDTD() ),
+ m_quanta, TQT_SLOT( slotEditDTD() ),
ac, "edit_dtd" );
(void) new KAction( i18n( "&Load && Convert DTD..." ), 0,
- DTDs::ref(), SLOT( slotLoadDTD() ),
+ DTDs::ref(), TQT_SLOT( slotLoadDTD() ),
ac, "load_dtd" );
(void) new KAction( i18n( "Load DTD E&ntities..." ), 0,
- DTDs::ref(), SLOT( slotLoadEntities() ),
+ DTDs::ref(), TQT_SLOT( slotLoadEntities() ),
ac, "load_entities" );
(void) new KAction( i18n( "Load DTD &Package (DTEP)..." ), 0,
- m_quanta, SLOT( slotLoadDTEP() ),
+ m_quanta, TQT_SLOT( slotLoadDTEP() ),
ac, "load_dtep" );
(void) new KAction( i18n( "Send DTD Package (DTEP) in E&mail..." ), "mail_send", 0,
- m_quanta, SLOT( slotEmailDTEP() ),
+ m_quanta, TQT_SLOT( slotEmailDTEP() ),
ac, "send_dtep" );
(void) new KAction( i18n( "&Download DTD Package (DTEP)..." ), "network", 0,
- m_quanta, SLOT( slotDownloadDTEP() ),
+ m_quanta, TQT_SLOT( slotDownloadDTEP() ),
ac, "download_dtep" );
(void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), "network", 0,
- m_quanta, SLOT( slotUploadDTEP() ),
+ m_quanta, TQT_SLOT( slotUploadDTEP() ),
ac, "upload_dtep" );
/*
(void) new KAction( i18n( "&Upload DTD Package (DTEP)..." ), 0,
- m_quanta, SLOT( slotUploadDTEP() ),
+ m_quanta, TQT_SLOT( slotUploadDTEP() ),
ac, "send_dtep" );
*/
(void) new KAction( i18n( "&Document Properties" ), 0,
- m_quanta, SLOT( slotDocumentProperties() ),
+ m_quanta, TQT_SLOT( slotDocumentProperties() ),
ac, "tools_document_properties" );
(void) new KAction ( i18n ("F&ormat XML Code"), 0,
- m_quanta, SLOT( slotCodeFormatting() ),
+ m_quanta, TQT_SLOT( slotCodeFormatting() ),
ac, "tools_code_formatting");
(void) new KAction( i18n( "&Convert Tag && Attribute Case..."), 0,
- m_quanta, SLOT(slotConvertCase()),
+ m_quanta, TQT_SLOT(slotConvertCase()),
ac, "tools_change_case");
// View actions
@@ -853,109 +853,109 @@ void QuantaInit::initActions()
m_quanta->showSourceAction =
new KToggleAction( i18n( "&Source Editor"), UserIcon ("view_text"), ALT+Key_F9,
- m_quanta, SLOT( slotShowSourceEditor()),
+ m_quanta, TQT_SLOT( slotShowSourceEditor()),
ac, "show_quanta_editor");
m_quanta->showSourceAction->setExclusiveGroup("view");
m_quanta->showVPLAction =
new KToggleAction( i18n( "&VPL Editor"), UserIcon ("vpl"), CTRL+SHIFT+Key_F9,
- m_quanta, SLOT( slotShowVPLOnly() ),
+ m_quanta, TQT_SLOT( slotShowVPLOnly() ),
ac, "show_kafka_view");
m_quanta->showVPLAction->setExclusiveGroup("view");
m_quanta->showVPLSourceAction =
new KToggleAction( i18n("VPL && So&urce Editors"), UserIcon ("vpl_text"), Key_F9,
- m_quanta, SLOT( slotShowVPLAndSourceEditor() ),
+ m_quanta, TQT_SLOT( slotShowVPLAndSourceEditor() ),
ac, "show_kafka_and_quanta");
m_quanta->showVPLSourceAction->setExclusiveGroup("view");
/**kafkaSelectAction = new KSelectAction(i18n("Main &View"), 0, ac,"show_kafka");
- QStringList list2;
+ TQStringList list2;
list2.append(i18n("&Source Editor"));
list2.append(i18n("&VPL Editor (experimental)"));
list2.append(i18n("&Both Editors"));
kafkaSelectAction->setItems(list2);
- connect(kafkaSelectAction, SIGNAL(activated(int)), m_quanta, SLOT(slotShowKafkaPartl(int)));*/
+ connect(kafkaSelectAction, TQT_SIGNAL(activated(int)), m_quanta, TQT_SLOT(slotShowKafkaPartl(int)));*/
(void) new KAction( i18n( "&Reload Preview" ), "reload",
KStdAccel::shortcut(KStdAccel::Reload).keyCodeQt(),
- m_quanta, SLOT(slotRepaintPreview()),
+ m_quanta, TQT_SLOT(slotRepaintPreview()),
ac, "reload" );
(void) new KAction( i18n( "&Previous File" ), "1leftarrow", KStdAccel::back(),
- m_quanta, SLOT( slotBack() ),
+ m_quanta, TQT_SLOT( slotBack() ),
ac, "previous_file" );
(void) new KAction( i18n( "&Next File" ), "1rightarrow", KStdAccel::forward(),
- m_quanta, SLOT( slotForward() ),
+ m_quanta, TQT_SLOT( slotForward() ),
ac, "next_file" );
// Options actions
//
(void) new KAction( i18n( "Configure &Actions..." ), UserIcon("ball"),0,
- m_quanta, SLOT( slotOptionsConfigureActions() ),
+ m_quanta, TQT_SLOT( slotOptionsConfigureActions() ),
ac, "configure_actions" );
- KStdAction::showMenubar(m_quanta, SLOT(slotShowMenuBar()), ac, "options_show_menubar");
- KStdAction::keyBindings(m_quanta, SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts");
- KStdAction::configureToolbars( m_quanta, SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars");
- KStdAction::preferences(m_quanta, SLOT( slotOptions() ), ac, "general_options");
- new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, SLOT(slotPreviewOptions()), ac, "preview_options");
+ KStdAction::showMenubar(m_quanta, TQT_SLOT(slotShowMenuBar()), ac, "options_show_menubar");
+ KStdAction::keyBindings(m_quanta, TQT_SLOT( slotOptionsConfigureKeys() ), ac, "configure_shortcuts");
+ KStdAction::configureToolbars( m_quanta, TQT_SLOT( slotOptionsConfigureToolbars() ), ac, "options_configure_toolbars");
+ KStdAction::preferences(m_quanta, TQT_SLOT( slotOptions() ), ac, "general_options");
+ new KAction(i18n("Configure Pre&view..."), SmallIcon("konqueror"), 0, m_quanta, TQT_SLOT(slotPreviewOptions()), ac, "preview_options");
// Toolbars actions
m_quanta->projectToolbarFiles = new KRecentFilesAction(i18n("Load &Project Toolbar"),0,
- m_quanta, SLOT(slotLoadToolbarFile(const KURL&)),
+ m_quanta, TQT_SLOT(slotLoadToolbarFile(const KURL&)),
ac, "toolbars_load_project");
- new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global");
- new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, SLOT(slotLoadToolbar()), ac, "toolbars_load_user");
- new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local");
- new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project");
- new KAction(i18n("&New User Toolbar..."), 0, m_quanta, SLOT(slotAddToolbar()), ac, "toolbars_add");
- new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, SLOT(slotRemoveToolbar()), ac, "toolbars_remove");
- new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, SLOT(slotRenameToolbar()), ac, "toolbars_rename");
- new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, SLOT(slotSendToolbar()), ac, "toolbars_send");
- new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, SLOT(slotUploadToolbar()), ac, "toolbars_upload" );
- new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, SLOT(slotDownloadToolbar()), ac, "toolbars_download" );
+ new KAction(i18n("Load &Global Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadGlobalToolbar()), ac, "toolbars_load_global");
+ new KAction(i18n("Load &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotLoadToolbar()), ac, "toolbars_load_user");
+ new KAction(i18n("Save as &Local Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveLocalToolbar()), ac, "toolbars_save_local");
+ new KAction(i18n("Save as &Project Toolbar..."), 0, m_quanta, TQT_SLOT(slotSaveProjectToolbar()), ac, "toolbars_save_project");
+ new KAction(i18n("&New User Toolbar..."), 0, m_quanta, TQT_SLOT(slotAddToolbar()), ac, "toolbars_add");
+ new KAction(i18n("&Remove User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRemoveToolbar()), ac, "toolbars_remove");
+ new KAction(i18n("Re&name User Toolbar..."), 0, m_quanta, TQT_SLOT(slotRenameToolbar()), ac, "toolbars_rename");
+ new KAction(i18n("Send Toolbar in E&mail..."), "mail_send", 0, m_quanta, TQT_SLOT(slotSendToolbar()), ac, "toolbars_send");
+ new KAction(i18n("&Upload Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotUploadToolbar()), ac, "toolbars_upload" );
+ new KAction(i18n("&Download Toolbar..." ), "network", 0, m_quanta, TQT_SLOT(slotDownloadToolbar()), ac, "toolbars_download" );
KToggleAction *toggle = new KToggleAction( i18n("Smart Tag Insertion"), 0, ac, "smart_tag_insertion");
- connect(toggle, SIGNAL(toggled(bool)), m_quanta, SLOT(slotSmartTagInsertion()));
+ connect(toggle, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotSmartTagInsertion()));
m_quanta->showDTDToolbar=new KToggleAction(i18n("Show DTD Toolbar"), 0, ac, "view_dtd_toolbar");
- connect(m_quanta->showDTDToolbar, SIGNAL(toggled(bool)), m_quanta, SLOT(slotToggleDTDToolbar(bool)));
+ connect(m_quanta->showDTDToolbar, TQT_SIGNAL(toggled(bool)), m_quanta, TQT_SLOT(slotToggleDTDToolbar(bool)));
m_quanta->showDTDToolbar->setCheckedState(i18n("Hide DTD Toolbar"));
new KAction(i18n("Complete Text"), CTRL+Key_Space,
- m_quanta, SLOT(slotShowCompletion()), ac,"show_completion");
+ m_quanta, TQT_SLOT(slotShowCompletion()), ac,"show_completion");
new KAction(i18n("Completion Hints"), CTRL+SHIFT+Key_Space,
- m_quanta, SLOT(slotShowCompletionHint()), ac,"show_completion_hint");
+ m_quanta, TQT_SLOT(slotShowCompletionHint()), ac,"show_completion_hint");
- KStdAction::back(m_quanta, SLOT( slotBack() ), ac, "w_back");
- KStdAction::forward(m_quanta, SLOT( slotForward() ), ac, "w_forward");
+ KStdAction::back(m_quanta, TQT_SLOT( slotBack() ), ac, "w_back");
+ KStdAction::forward(m_quanta, TQT_SLOT( slotForward() ), ac, "w_forward");
- new KAction(i18n("Open File: none"), 0, m_quanta, SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor");
- new KAction(i18n("Upload..."), 0, m_quanta, SLOT(slotUploadFile()), ac, "upload_file");
- new KAction(i18n("Delete File"), 0, m_quanta, SLOT(slotDeleteFile()), ac, "delete_file");
+ new KAction(i18n("Open File: none"), 0, m_quanta, TQT_SLOT(slotOpenFileUnderCursor()), ac, "open_file_under_cursor");
+ new KAction(i18n("Upload..."), 0, m_quanta, TQT_SLOT(slotUploadFile()), ac, "upload_file");
+ new KAction(i18n("Delete File"), 0, m_quanta, TQT_SLOT(slotDeleteFile()), ac, "delete_file");
- QString ss = i18n("Upload Opened Project Files...");
-/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */
+ TQString ss = i18n("Upload Opened Project Files...");
+/* new KAction(i18n("Upload Opened Project Files"), 0, m_quanta, TQT_SLOT(slotUploadOpenedFiles()), ac, "upload_opened_files"); */
- QString error;
+ TQString error;
int el, ec;
- m_quanta->m_actions = new QDomDocument();
+ m_quanta->m_actions = new TQDomDocument();
//load the global actions
- QFile f(qConfig.globalDataDir + resourceDir + "actions.rc");
+ TQFile f(qConfig.globalDataDir + resourceDir + "actions.rc");
if ( f.open( IO_ReadOnly ))
{
if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
{
- QDomElement docElem = m_quanta->m_actions->documentElement();
+ TQDomElement docElem = m_quanta->m_actions->documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull() ) { // the node was really an element.
bool toggable = (e.attribute("toggable", "") == "true");
new TagAction(&e, m_quanta, toggable);
@@ -963,12 +963,12 @@ void QuantaInit::initActions()
n = n.nextSibling();
}
} else
- kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
f.close();
}
m_quanta->m_actions->clear();
//read the user defined actions
- QString s = locateLocal("appdata","actions.rc");
+ TQString s = locateLocal("appdata","actions.rc");
if (!s.isEmpty())
{
f.setName(s);
@@ -976,11 +976,11 @@ void QuantaInit::initActions()
{
if (m_quanta->m_actions->setContent(&f, &error, &el, &ec))
{
- QDomElement docElem = m_quanta->m_actions->documentElement();
+ TQDomElement docElem = m_quanta->m_actions->documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement(); // try to convert the node to an element.
+ TQDomElement e = n.toElement(); // try to convert the node to an element.
if( !e.isNull())
{ // the node was really an element.
delete ac->action(e.attribute("name"));
@@ -990,7 +990,7 @@ void QuantaInit::initActions()
n = n.nextSibling();
}
} else
- kdError(24000) << QString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
+ kdError(24000) << TQString("Error %1 at (%2, %3) in %4").arg(error).arg(el).arg(ec).arg(f.name()) << endl;
f.close();
}
} else
@@ -1001,16 +1001,16 @@ void QuantaInit::initActions()
// create the preview action
m_quanta->showPreviewAction =
new KToolBarPopupAction( i18n( "&Preview" ), "preview", Key_F6,
- m_quanta, SLOT( slotToggleShowPreview() ),
+ m_quanta, TQT_SLOT( slotToggleShowPreview() ),
ac, "show_preview" );
KAction *act = new KAction( i18n( "Preview Without Frames" ), "", 0,
- m_quanta, SLOT(slotShowNoFramesPreview()),
+ m_quanta, TQT_SLOT(slotShowNoFramesPreview()),
ac, "show_preview_no_frames" );
act->plug(m_quanta->showPreviewAction->popupMenu());
act = new KAction( i18n( "View with &Konqueror" ), "konqueror", Key_F12,
- m_quanta, SLOT( slotViewInKFM() ),
+ m_quanta, TQT_SLOT( slotViewInKFM() ),
ac, "view_with_konqueror" );
act->plug(m_quanta->showPreviewAction->popupMenu());
@@ -1032,62 +1032,62 @@ void QuantaInit::initActions()
act->plug(m_quanta->showPreviewAction->popupMenu());
act = new KAction( i18n( "View with L&ynx" ), "terminal", 0,
- m_quanta, SLOT( slotViewInLynx() ),
+ m_quanta, TQT_SLOT( slotViewInLynx() ),
ac, "view_with_lynx" );
act->plug(m_quanta->showPreviewAction->popupMenu());
(void) new KAction( i18n( "Table Editor..." ), "quick_table", 0,
- m_quanta, SLOT( slotTagEditTable() ),
+ m_quanta, TQT_SLOT( slotTagEditTable() ),
ac, "tag_edit_table" );
(void) new KAction( i18n( "Quick List..." ), "quick_list", 0,
- m_quanta, SLOT( slotTagQuickList() ),
+ m_quanta, TQT_SLOT( slotTagQuickList() ),
ac, "tag_quick_list" );
(void) new KAction( i18n( "Color..." ), "colorize", CTRL+SHIFT+Key_C,
- m_quanta, SLOT( slotTagColor() ),
+ m_quanta, TQT_SLOT( slotTagColor() ),
ac, "tag_color" );
(void) new KAction( i18n( "Email..." ), "tag_mail", 0,
- m_quanta, SLOT( slotTagMail() ),
+ m_quanta, TQT_SLOT( slotTagMail() ),
ac, "tag_mail" );
(void) new KAction( i18n( "Misc. Tag..." ), "tag_misc", CTRL+SHIFT+Key_T,
- m_quanta, SLOT( slotTagMisc() ),
+ m_quanta, TQT_SLOT( slotTagMisc() ),
ac, "tag_misc" );
(void) new KAction( i18n( "Frame Wizard..." ), "frame", 0,
- m_quanta, SLOT( slotFrameWizard() ),
+ m_quanta, TQT_SLOT( slotFrameWizard() ),
ac, "tag_frame_wizard" );
(void) new KAction( i18n( "Paste &HTML Quoted" ), "editpaste", 0,
- m_quanta, SLOT( slotPasteHTMLQuoted() ),
+ m_quanta, TQT_SLOT( slotPasteHTMLQuoted() ),
ac, "edit_paste_html_quoted" );
(void) new KAction( i18n( "Paste &URL Encoded" ), "editpaste", 0,
- m_quanta, SLOT( slotPasteURLEncoded() ),
+ m_quanta, TQT_SLOT( slotPasteURLEncoded() ),
ac, "edit_paste_url_encoded" );
(void) new KAction( i18n( "Insert CSS..." ),"css", 0,
- m_quanta, SLOT( slotInsertCSS() ),
+ m_quanta, TQT_SLOT( slotInsertCSS() ),
ac, "insert_css" );
// special-character combo
KAction* char_action = new KAction(
i18n( "Insert Special Character" ), "charset", 0,
ac, "insert_char" );
- connect( char_action, SIGNAL(activated()),
- m_quanta, SLOT(slotInsertChar()) );
+ connect( char_action, TQT_SIGNAL(activated()),
+ m_quanta, TQT_SLOT(slotInsertChar()) );
- connect(m_quanta, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
- connect(m_quanta->doc(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
- connect(ViewManager::ref(), SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(m_quanta), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(m_quanta, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+ connect(m_quanta->doc(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
+ connect(ViewManager::ref(), TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(m_quanta), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
QuantaBookmarks *m_bookmarks = new QuantaBookmarks(ViewManager::ref(m_quanta));
m_bookmarks->createActions(ac);
- connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), m_quanta, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), m_quanta, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
}
/** Initialize the plugin architecture. */
@@ -1097,10 +1097,10 @@ void QuantaInit::initPlugins()
m_quanta->m_pluginInterface = QuantaPluginInterface::ref(m_quanta);
- connect(m_quanta->m_pluginInterface, SIGNAL(hideSplash()),
- m_quanta, SLOT(slotHideSplash()));
- connect(m_quanta->m_pluginInterface, SIGNAL(statusMsg(const QString &)),
- m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(m_quanta->m_pluginInterface, TQT_SIGNAL(hideSplash()),
+ m_quanta, TQT_SLOT(slotHideSplash()));
+ connect(m_quanta->m_pluginInterface, TQT_SIGNAL(statusMsg(const TQString &)),
+ m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
m_quanta->m_pluginInterface->readConfig();
if (!m_quanta->m_pluginInterface->pluginAvailable("KFileReplace"))
@@ -1110,15 +1110,15 @@ void QuantaInit::initPlugins()
}
-void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
+void QuantaInit::recoverCrashed(TQStringList& recoveredFileNameList)
{
m_quanta->m_doc->blockSignals(true);
execCommandPS("ps -C quanta -C quanta_be -o pid --no-headers");
- m_PIDlist = QStringList::split("\n", m_quanta->m_scriptOutput);
+ m_PIDlist = TQStringList::split("\n", m_quanta->m_scriptOutput);
m_config->setGroup("Projects");
- QString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
+ TQString pu = QuantaCommon::readPathEntry(m_config, "Last Project");
KURL u;
QuantaCommon::setUrl(u, pu);
@@ -1131,18 +1131,18 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
m_config->reparseConfiguration();
m_config->setGroup("General Options");
- QStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
- QStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+ TQStringList backedUpUrlsList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ TQStringList autosavedUrlsList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
- QStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd();
- for (QStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin();
+ TQStringList::ConstIterator backedUpUrlsEndIt = backedUpUrlsList.constEnd();
+ for (TQStringList::ConstIterator backedUpUrlsIt = backedUpUrlsList.constBegin();
backedUpUrlsIt != backedUpUrlsEndIt; ++backedUpUrlsIt )
{
// when quanta crashes and file autoreloading option is on
// then if user restarts quanta, the backup copies will reload
- QString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID
+ TQString backedUpFileName = (*backedUpUrlsIt).left((*backedUpUrlsIt).findRev(".")); //the filename without the PID
bool notFound;
- QString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound);
+ TQString autosavedPath = searchPathListEntry(backedUpFileName, autosavedUrlsList, notFound);
if (!autosavedPath.isEmpty()) //the current item was autosaved and is not in use by another Quanta
{
KURL originalVersion;
@@ -1158,16 +1158,16 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
KIO::UDSEntry entry;
KIO::NetAccess::stat(originalVersion, entry, m_quanta);
KFileItem* item= new KFileItem(entry, originalVersion, false, true);
- QString origTime = item->timeString();
+ TQString origTime = item->timeString();
KIO::filesize_t origSize = item->size();
delete item;
KIO::NetAccess::stat(autosavedVersion, entry, m_quanta);
item= new KFileItem(entry, autosavedVersion, false, true);
- QString backupTime = item->timeString();
+ TQString backupTime = item->timeString();
KIO::filesize_t backupSize = item->size();
delete item;
- if (QFileInfo(autosavedPath).exists()) //if the backup file exists
+ if (TQFileInfo(autosavedPath).exists()) //if the backup file exists
{
emit hideSplash();
DirtyDlg *dlg = new DirtyDlg(autosavedVersion.path(), originalVersion.path(), false, m_quanta);
@@ -1198,7 +1198,7 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
{
//backup the current version and restore it from the autosaved backup
KURL backupURL = originalVersion;
- backupURL.setPath(backupURL.path() + "." + QString::number(getpid(),10) + ".backup");
+ backupURL.setPath(backupURL.path() + "." + TQString::number(getpid(),10) + ".backup");
QExtFileInfo::copy(originalVersion, backupURL, -1, true, false, m_quanta);
QExtFileInfo::copy(autosavedVersion, originalVersion, -1, true, false, m_quanta);
//we save a list of autosaved file names so "KQApplicationPrivate::init()"
@@ -1211,13 +1211,13 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
recoveredFileNameList += backedUpFileName;
}
delete dlg;
- QFile::remove(autosavedPath); //we don't need the backup anymore
+ TQFile::remove(autosavedPath); //we don't need the backup anymore
}
}
//remove the auto-backup file from the list
m_config->setGroup("General Options");
- QStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
- QStringList::Iterator entryIt = autosavedFilesEntryList.begin();
+ TQStringList autosavedFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of autosaved files");
+ TQStringList::Iterator entryIt = autosavedFilesEntryList.begin();
while(entryIt != autosavedFilesEntryList.end())
{
if ((*entryIt) == KURL::fromPathOrURL(autosavedPath).url())
@@ -1235,8 +1235,8 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
//remove processed items
m_config->setGroup("General Options");
- QStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
- QStringList::Iterator entryIt = backedupFilesEntryList.begin();
+ TQStringList backedupFilesEntryList = QuantaCommon::readPathListEntry(m_config, "List of backedup files");
+ TQStringList::Iterator entryIt = backedupFilesEntryList.begin();
while (entryIt != backedupFilesEntryList.end())
{
if ((*entryIt) == (*backedUpUrlsIt))
@@ -1249,15 +1249,15 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
//clean up auto-backup list, just in case of an old Quanta was used before
- QStringList::Iterator entryIt = autosavedUrlsList.begin();
+ TQStringList::Iterator entryIt = autosavedUrlsList.begin();
while (entryIt != autosavedUrlsList.end())
{
- QString quPID = retrievePID((*entryIt));
+ TQString quPID = retrievePID((*entryIt));
//check if the file is opened by another running Quanta or not
bool isOrphan = true;
- QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
- for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
{
if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
{
@@ -1276,20 +1276,20 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
- void QuantaInit::execCommandPS(const QString& cmd)
+ void QuantaInit::execCommandPS(const TQString& cmd)
{
//We create a KProcess that executes the "ps" *nix command to get the PIDs of the
//other instances of quanta actually running
KProcess *execCommand = new KProcess();
- *(execCommand) << QStringList::split(" ",cmd);
+ *(execCommand) << TQStringList::split(" ",cmd);
- connect(execCommand, SIGNAL(receivedStdout(KProcess*,char*,int)),
- m_quanta, SLOT(slotGetScriptOutput(KProcess*,char*,int)));
- connect(execCommand, SIGNAL(receivedStderr(KProcess*,char*,int)),
- m_quanta, SLOT(slotGetScriptError(KProcess*,char*,int)));
- connect(execCommand, SIGNAL(processExited(KProcess*)),
- m_quanta, SLOT(slotProcessExited(KProcess*)));
+ connect(execCommand, TQT_SIGNAL(receivedStdout(KProcess*,char*,int)),
+ m_quanta, TQT_SLOT(slotGetScriptOutput(KProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ m_quanta, TQT_SLOT(slotGetScriptError(KProcess*,char*,int)));
+ connect(execCommand, TQT_SIGNAL(processExited(KProcess*)),
+ m_quanta, TQT_SLOT(slotProcessExited(KProcess*)));
if (!execCommand->start(KProcess::NotifyOnExit,KProcess::All))
{
@@ -1298,9 +1298,9 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
else
{
//To avoid lock-ups, start a timer.
- QTimer *timer = new QTimer(m_quanta);
- connect(timer, SIGNAL(timeout()),
- m_quanta, SLOT(slotProcessTimeout()));
+ TQTimer *timer = new TQTimer(m_quanta);
+ connect(timer, TQT_SIGNAL(timeout()),
+ m_quanta, TQT_SLOT(slotProcessTimeout()));
timer->start(180*1000, true);
QExtFileInfo internalFileInfo;
m_quanta->m_loopStarted = true;
@@ -1310,21 +1310,21 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
- QString QuantaInit::searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound)
+ TQString QuantaInit::searchPathListEntry(const TQString& url, const TQStringList& autosavedUrlsList, bool &notFound)
{
- QString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url));
+ TQString backedUpUrlHashedPath = retrieveHashedPath('.' + Document::hashFilePath(url));
notFound = true;
- QStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd();
- for (QStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin();
+ TQStringList::ConstIterator autosavedUrlsEndIt = autosavedUrlsList.constEnd();
+ for (TQStringList::ConstIterator autosavedUrlsIt = autosavedUrlsList.constBegin();
autosavedUrlsIt != autosavedUrlsEndIt;
++autosavedUrlsIt)
{
- QString quPID = retrievePID((*autosavedUrlsIt));
+ TQString quPID = retrievePID((*autosavedUrlsIt));
//check if the file is opened by another running Quanta or not
bool isOrphan = true;
- QStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
- for (QStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
+ TQStringList::ConstIterator PIDEndIt = m_PIDlist.constEnd();
+ for (TQStringList::ConstIterator PIDIt = m_PIDlist.constBegin(); PIDIt != PIDEndIt; ++PIDIt )
{
if ((*PIDIt) == quPID && qConfig.quantaPID != quPID)
{
@@ -1341,11 +1341,11 @@ void QuantaInit::recoverCrashed(QStringList& recoveredFileNameList)
}
}
- return QString::null;
+ return TQString::null;
}
/** Retrieves hashed path from the name of a backup file */
-QString QuantaInit::retrieveHashedPath(const QString& filename)
+TQString QuantaInit::retrieveHashedPath(const TQString& filename)
{
int lastPoint = filename.findRev(".");
int Ppos = filename.find("P", lastPoint);
@@ -1355,9 +1355,9 @@ QString QuantaInit::retrieveHashedPath(const QString& filename)
/** Retrieves PID from the name of a backup file */
-QString QuantaInit::retrievePID(const QString& filename)
+TQString QuantaInit::retrievePID(const TQString& filename)
{
- QString strPID = QString::null;
+ TQString strPID = TQString::null;
strPID = filename.mid(filename.findRev("P") + 1);
if (strPID.isEmpty())
@@ -1385,10 +1385,10 @@ void QuantaInit::loadVPLConfig()
}
struct Dependency{
- QString name;
- QString execName;
- QString url;
- QString description;
+ TQString name;
+ TQString execName;
+ TQString url;
+ TQString description;
enum Type{
Executable = 0,
Plugin
@@ -1399,7 +1399,7 @@ struct Dependency{
void QuantaInit::checkRuntimeDependencies()
{
- QValueList<Dependency> dependencies;
+ TQValueList<Dependency> dependencies;
Dependency dependency;
dependency.name = "Kommander";
dependency.execName = "kmdr-executor";
@@ -1474,40 +1474,40 @@ void QuantaInit::checkRuntimeDependencies()
dependency.type = Dependency::Plugin;
dependencies.append(dependency);
- QString errorStr;
- QString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;");
- for (QValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it)
+ TQString errorStr;
+ TQString stdErrorMsg = i18n("<br><b>- %1</b> [<i>%2</i>] - %3 will not be available;");
+ for (TQValueList<Dependency>::ConstIterator it = dependencies.constBegin(); it != dependencies.constEnd(); ++it)
{
dependency = *it;
if (dependency.type == Dependency::Executable)
{
if (KStandardDirs::findExe(dependency.execName).isNull())
- errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+ errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
} else
if (dependency.type == Dependency::Plugin)
{
if (!QuantaPlugin::validatePlugin(m_quanta->m_pluginInterface->plugin(dependency.execName)))
- errorStr += QString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
+ errorStr += TQString(stdErrorMsg).arg(dependency.name).arg(dependency.url).arg(dependency.description);
}
}
#ifdef ENABLE_CVSSERVICE
- QString error;
- QCString appId;
+ TQString error;
+ TQCString appId;
- KApplication::startServiceByDesktopName("cvsservice", QStringList(), &error,
+ KApplication::startServiceByDesktopName("cvsservice", TQStringList(), &error,
&appId);
if (appId.isEmpty())
{
- errorStr += QString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management"));
+ errorStr += TQString(stdErrorMsg).arg("Cervisia (cvsservice)").arg("http://www.kde.org/apps/cervisia").arg(i18n("integrated CVS management"));
} else
{
CVSService::ref(m_quanta->actionCollection())->setAppId(appId);
- connect(CVSService::ref(), SIGNAL(clearMessages()), m_quanta->m_messageOutput, SLOT(clear()));
- connect(CVSService::ref(), SIGNAL(showMessage(const QString&, bool)), m_quanta->m_messageOutput, SLOT(showMessage(const QString&, bool)));
- connect(CVSService::ref(), SIGNAL(commandExecuted(const QString&, const QStringList&)), m_quanta, SLOT(slotCVSCommandExecuted(const QString&, const QStringList&)));
- //connect(CVSService::ref(), SIGNAL(statusMsg(const QString &)), m_quanta, SLOT(slotStatusMsg(const QString & )));
+ connect(CVSService::ref(), TQT_SIGNAL(clearMessages()), m_quanta->m_messageOutput, TQT_SLOT(clear()));
+ connect(CVSService::ref(), TQT_SIGNAL(showMessage(const TQString&, bool)), m_quanta->m_messageOutput, TQT_SLOT(showMessage(const TQString&, bool)));
+ connect(CVSService::ref(), TQT_SIGNAL(commandExecuted(const TQString&, const TQStringList&)), m_quanta, TQT_SLOT(slotCVSCommandExecuted(const TQString&, const TQStringList&)));
+ //connect(CVSService::ref(), TQT_SIGNAL(statusMsg(const TQString &)), m_quanta, TQT_SLOT(slotStatusMsg(const TQString & )));
m_quanta->fTab->plugCVSMenu();
pTab->plugCVSMenu();
}
@@ -1523,36 +1523,36 @@ void QuantaInit::checkRuntimeDependencies()
void QuantaInit::readAbbreviations()
{
- QDomDocument doc;
- QString groupName;
+ TQDomDocument doc;
+ TQString groupName;
bool mainAbbrevFileFound = false;
- QStringList mainFileList;
+ TQStringList mainFileList;
mainFileList << qConfig.globalDataDir + resourceDir + "abbreviations.xml";
mainFileList << KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml";
for (uint i = 0; i < mainFileList.count(); i++)
{
- if (!QFile::exists(mainFileList[i]))
+ if (!TQFile::exists(mainFileList[i]))
continue;
- QFile file(mainFileList[i]);
+ TQFile file(mainFileList[i]);
if (file.open(IO_ReadOnly))
{
if (doc.setContent(&file))
{
- QDomNodeList groupList = doc.elementsByTagName("Group");
+ TQDomNodeList groupList = doc.elementsByTagName("Group");
for (uint groupIdx = 0; groupIdx < groupList.count(); groupIdx++)
{
Abbreviation abbrev;
- QDomElement el = groupList.item(groupIdx).toElement();
+ TQDomElement el = groupList.item(groupIdx).toElement();
groupName = el.attribute("name");
- QDomNodeList dtepList = el.elementsByTagName("DTEP");
+ TQDomNodeList dtepList = el.elementsByTagName("DTEP");
for (uint dtepListIdx = 0; dtepListIdx < dtepList.count(); dtepListIdx++)
{
abbrev.dteps.append(dtepList.item(dtepListIdx).toElement().attribute("name"));
}
- QDomNodeList nodeList = el.elementsByTagName("Template");
+ TQDomNodeList nodeList = el.elementsByTagName("Template");
for (uint nodeIdx = 0; nodeIdx < nodeList.count(); nodeIdx++)
{
- QDomElement e = nodeList.item(nodeIdx).toElement();
+ TQDomElement e = nodeList.item(nodeIdx).toElement();
abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
}
qConfig.abbreviations.insert(groupName, abbrev);
@@ -1565,19 +1565,19 @@ void QuantaInit::readAbbreviations()
if (mainAbbrevFileFound) return;
//Compatibility code: read the abbreviations files from the DTEP directories
//TODO: Remove when upgrade from 3.2 is not supported.
- QStringList filenameList = DTDs::ref()->fileNameList(false);
- QStringList::Iterator it;
+ TQStringList filenameList = DTDs::ref()->fileNameList(false);
+ TQStringList::Iterator it;
for (it = filenameList.begin(); it != filenameList.end(); ++it)
{
int pos =(*it).find('|');
- QString dirName = (*it).mid(pos + 1);
- QString dtepName = (*it).left(pos);
+ TQString dirName = (*it).mid(pos + 1);
+ TQString dtepName = (*it).left(pos);
KURL dirURL(dirName);
dirURL.setFileName("");
dirName = dirURL.path(1);
- QString abbrevFile = dirName;
- QString tmpStr = dirName;
- QStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
+ TQString abbrevFile = dirName;
+ TQString tmpStr = dirName;
+ TQStringList resourceDirs = KGlobal::dirs()->resourceDirs("data");
bool dirFound = false;
for (uint i = 0; i < resourceDirs.count(); i++)
{
@@ -1593,18 +1593,18 @@ void QuantaInit::readAbbreviations()
abbrevFile = KGlobal::dirs()->saveLocation("data", tmpStr) +"/";
}
abbrevFile.append("abbreviations");
- if (!QFile::exists(abbrevFile))
+ if (!TQFile::exists(abbrevFile))
abbrevFile = dirName + "abbreviations";
- QFile f(abbrevFile);
+ TQFile f(abbrevFile);
if (f.open(IO_ReadOnly))
{
if (doc.setContent(&f))
{
Abbreviation abbrev;
- QDomNodeList nodeList = doc.elementsByTagName("Template");
+ TQDomNodeList nodeList = doc.elementsByTagName("Template");
for (uint i = 0; i < nodeList.count(); i++)
{
- QDomElement e = nodeList.item(i).toElement();
+ TQDomElement e = nodeList.item(i).toElement();
abbrev.abbreviations.insert(e.attribute("name")+" "+e.attribute("description"), e.attribute("code"));
}
abbrev.dteps.append(dtepName);
@@ -1622,7 +1622,7 @@ int QuantaInit::runningQuantas()
int i = 0;
for (QCStringList::iterator it = list.begin(); it != list.end(); ++it)
{
- if (QString(*it).startsWith("quanta", false))
+ if (TQString(*it).startsWith("quanta", false))
++i;
}
return i;
diff --git a/quanta/src/quanta_init.h b/quanta/src/quanta_init.h
index 8013e0bd..0b1f6ae9 100644
--- a/quanta/src/quanta_init.h
+++ b/quanta/src/quanta_init.h
@@ -20,7 +20,7 @@
// include files for Qt
-#include <qobject.h>
+#include <tqobject.h>
// include files for KDE
#include <kparts/dockmainwindow.h>
@@ -48,12 +48,12 @@ public:
~QuantaInit();
/** Loads the initial project */
- void loadInitialProject(const QString& url);
+ void loadInitialProject(const TQString& url);
/**Executes *nix ps command */
- void execCommandPS(const QString& cmd);
+ void execCommandPS(const TQString& cmd);
/** if there are backup files, asks user whether wants to restore them or to mantain the originals instead*/
- void recoverCrashed(QStringList& recoveredFileNameList);
+ void recoverCrashed(TQStringList& recoveredFileNameList);
/** Delayed initialization. */
void initQuanta();
void openLastFiles();
@@ -76,22 +76,22 @@ private:
void checkRuntimeDependencies();
void readAbbreviations();
- KMdiToolViewAccessor* addToolTreeView(QWidget *widget, const QString &name, const QPixmap &icon, KDockWidget::DockPosition position);
+ KMdiToolViewAccessor* addToolTreeView(TQWidget *widget, const TQString &name, const TQPixmap &icon, KDockWidget::DockPosition position);
/** Initialize the plugin architecture. */
void initPlugins();
/** find where was url backed up in the list of autosaved urls*/
- QString searchPathListEntry(const QString& url, const QStringList& autosavedUrlsList, bool &notFound);
+ TQString searchPathListEntry(const TQString& url, const TQStringList& autosavedUrlsList, bool &notFound);
/** Retrieves hashed path from the name of a backup file */
- QString retrieveHashedPath(const QString& filename);
+ TQString retrieveHashedPath(const TQString& filename);
/** Obtains PID from file extension */
- QString retrievePID(const QString& filename);
+ TQString retrievePID(const TQString& filename);
ProjectTreeView *pTab;
TemplatesTreeView *tTab;
// config
KConfig *m_config;
- QStringList m_PIDlist;
+ TQStringList m_PIDlist;
/** @return number of Quanta instances registered by dcop */
int runningQuantas();
};
diff --git a/quanta/src/quantadoc.cpp b/quanta/src/quantadoc.cpp
index 9100432e..eb5c538f 100644
--- a/quanta/src/quantadoc.cpp
+++ b/quanta/src/quantadoc.cpp
@@ -16,14 +16,14 @@
***************************************************************************/
// include files for Qt
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
-#include <qlayout.h>
-#include <qdragobject.h>
-#include <qobject.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
+#include <tqlayout.h>
+#include <tqdragobject.h>
+#include <tqobject.h>
// include files for KDE
@@ -76,13 +76,13 @@
#include "tagactionmanager.h"
#include "tagactionset.h"
-QuantaDoc::QuantaDoc(QWidget *parent, const char *name) : QObject(parent, name)
+QuantaDoc::QuantaDoc(TQWidget *parent, const char *name) : TQObject(parent, name)
{
fileWatcher = new KDirWatch(this);
attribMenu = new KPopupMenu();
attribMenu->insertTitle(i18n("Tag"));
- connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
}
QuantaDoc::~QuantaDoc()
@@ -144,18 +144,18 @@ bool QuantaDoc::newDocument( const KURL& url, bool switchToExisting )
return true;
}
-void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
+void QuantaDoc::openDocument(const KURL& urlToOpen, const TQString &a_encoding,
bool switchToExisting, bool readOnly)
{
bool idleTimerStatus = quantaApp->slotEnableIdleTimer(false);
KURL url = urlToOpen;
if (url.isLocalFile())
{
- QString path = QDir(url.path()).canonicalPath();
+ TQString path = TQDir(url.path()).canonicalPath();
if (!path.isEmpty())
url.setPath(path);
}
- QString encoding = a_encoding;
+ TQString encoding = a_encoding;
if (!newDocument(url, switchToExisting))
{
quantaApp->slotEnableIdleTimer(idleTimerStatus);
@@ -175,10 +175,10 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
{
if (encoding.isEmpty())
encoding = quantaApp->defaultEncoding();
- w->disconnect(SIGNAL(openingFailed(const KURL&)));
- connect(w, SIGNAL(openingFailed(const KURL&)), this, SLOT(slotOpeningFailed(const KURL&)));
- w->disconnect(SIGNAL(openingCompleted(const KURL&)));
- connect(w, SIGNAL(openingCompleted(const KURL&)), this, SLOT(slotOpeningCompleted(const KURL&)));
+ w->disconnect(TQT_SIGNAL(openingFailed(const KURL&)));
+ connect(w, TQT_SIGNAL(openingFailed(const KURL&)), this, TQT_SLOT(slotOpeningFailed(const KURL&)));
+ w->disconnect(TQT_SIGNAL(openingCompleted(const KURL&)));
+ connect(w, TQT_SIGNAL(openingCompleted(const KURL&)), this, TQT_SLOT(slotOpeningCompleted(const KURL&)));
w->open(url, encoding);
quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
}
@@ -192,7 +192,7 @@ void QuantaDoc::openDocument(const KURL& urlToOpen, const QString &a_encoding,
KTextEditor::HighlightingInterface* highlightIf = dynamic_cast<KTextEditor::HighlightingInterface*>(w->doc());
if (highlightIf)
{
- QString hlName;
+ TQString hlName;
int htmlIdx = -1, xmlIdx = -1;
for (uint i = 0; i < highlightIf->hlModeCount(); i++)
{
@@ -243,7 +243,7 @@ void QuantaDoc::slotOpeningCompleted(const KURL &url)
quantaApp->slotNewStatus();
quantaApp->setTitle(url.prettyURL(0, KURL::StripFileProtocol));
Project::ref()->loadCursorPosition(w->url(), dynamic_cast<KTextEditor::ViewCursorInterface*>(w->view()));
- emit eventHappened("after_open", url.url(), QString::null);
+ emit eventHappened("after_open", url.url(), TQString::null);
bool flag = TagActionManager::canIndentDTD(w->defaultDTD()->name);
quantaApp->actionCollection()->action("apply_source_indentation")->setEnabled(flag);
@@ -263,16 +263,16 @@ void QuantaDoc::slotAttribPopup()
if (node && node->tag)
{
Tag *tag = node->tag;
- QString tagName = tag->name;
- QStrIList attrList = QStrIList();
- QString name;
+ TQString tagName = tag->name;
+ TQStrIList attrList = TQStrIList();
+ TQString name;
for (int i=0; i < tag->attrCount(); i++ )
attrList.append( tag->attribute(i) );
if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(),tagName) )
{
- QString caption = i18n("Attributes of <%1>").arg(tagName);
+ TQString caption = i18n("Attributes of <%1>").arg(tagName);
attribMenu->insertTitle( caption );
AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(),tagName );
@@ -289,9 +289,9 @@ void QuantaDoc::slotAttribPopup()
}
QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
- for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
- QPopupMenu* popUpMenu = new QPopupMenu(attribMenu, (*it).latin1());
+ TQPopupMenu* popUpMenu = new TQPopupMenu(attribMenu, (*it).latin1());
AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
for (uint j = 0; j < attrs->count(); j++)
{
@@ -302,7 +302,7 @@ void QuantaDoc::slotAttribPopup()
popUpMenu->setItemEnabled( menuId , false );
}
}
- connect( popUpMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( popUpMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
attribMenu->insertItem(*it, popUpMenu);
}
@@ -310,14 +310,14 @@ void QuantaDoc::slotAttribPopup()
{
attribMenu->setActiveItem( 0);
- QPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates());
- QFont font = w->view()->font();
- globalPos.setY(globalPos.y() + QFontMetrics(font).height());
+ TQPoint globalPos = w->view()->mapToGlobal(w->viewCursorIf->cursorCoordinates());
+ TQFont font = w->view()->font();
+ globalPos.setY(globalPos.y() + TQFontMetrics(font).height());
attribMenu->exec(globalPos);
}
}
else {
- QString message = i18n("Unknown tag: %1").arg(tagName);
+ TQString message = i18n("Unknown tag: %1").arg(tagName);
quantaApp->slotStatusMsg( message );
}
}
@@ -333,20 +333,20 @@ void QuantaDoc::slotInsertAttrib( int id )
if (node && node->tag)
{
Tag *tag = node->tag;
- QString tagName = tag->name;
+ TQString tagName = tag->name;
if ( QuantaCommon::isKnownTag(w->getDTDIdentifier(), tagName) )
{
int menuId;
AttributeList *list = QuantaCommon::tagAttributes(w->getDTDIdentifier(), tagName);
menuId = list->count();
- QString attrStr;
+ TQString attrStr;
if (id <= menuId)
{
attrStr = list->at(id)->name;
} else
{
QTag* qtag = QuantaCommon::tagFromDTD(w->getDTDIdentifier(), tagName);
- for (QStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
+ for (TQStringList::Iterator it = qtag->commonGroups.begin(); it != qtag->commonGroups.end(); ++it)
{
AttributeList *attrs = qtag->parentDTD->commonAttrs->find(*it);
menuId += attrs->count();
@@ -367,7 +367,7 @@ void QuantaDoc::slotInsertAttrib( int id )
delete attribMenu;
attribMenu = new KPopupMenu();
attribMenu->insertTitle(i18n("Tag"));
- connect( attribMenu, SIGNAL(activated(int)), this, SLOT(slotInsertAttrib(int)));
+ connect( attribMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotInsertAttrib(int)));
}
}
diff --git a/quanta/src/quantadoc.h b/quanta/src/quantadoc.h
index f825d72e..37891d69 100644
--- a/quanta/src/quantadoc.h
+++ b/quanta/src/quantadoc.h
@@ -31,11 +31,11 @@ class QuantaDoc : public QObject
public:
- QuantaDoc(QWidget *parent, const char *name=0);
+ QuantaDoc(TQWidget *parent, const char *name=0);
~QuantaDoc();
bool newDocument(const KURL&, bool switchToExisting = true);
- void openDocument(const KURL&, const QString& a_encoding = QString::null, bool switchToExisting = true, bool readOnly = false);
+ void openDocument(const KURL&, const TQString& a_encoding = TQString::null, bool switchToExisting = true, bool readOnly = false);
public slots:
/** close documents. */
@@ -49,7 +49,7 @@ public slots:
signals:
void newStatus();
void hideSplash();
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
KPopupMenu *attribMenu;
diff --git a/quanta/src/quantaview.cpp b/quanta/src/quantaview.cpp
index 39cff3bc..51f93294 100644
--- a/quanta/src/quantaview.cpp
+++ b/quanta/src/quantaview.cpp
@@ -16,20 +16,20 @@
***************************************************************************/
// include files for Qt
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qtabbar.h>
-#include <qtabwidget.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qevent.h>
-#include <qwidget.h>
-#include <qsplitter.h>
-#include <qpoint.h>
-#include <qscrollview.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqtabbar.h>
+#include <tqtabwidget.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqevent.h>
+#include <tqwidget.h>
+#include <tqsplitter.h>
+#include <tqpoint.h>
+#include <tqscrollview.h>
// include files for KDE
#include <kaction.h>
@@ -74,9 +74,9 @@
#include "tagdialog.h"
extern int NN;
-extern QValueList<Node*> nodes;
+extern TQValueList<Node*> nodes;
-QuantaView::QuantaView(QWidget *parent, const char *name, const QString &caption )
+QuantaView::QuantaView(TQWidget *parent, const char *name, const TQString &caption )
: KMdiChildView(parent, name)
, m_document(0L)
, m_plugin(0L)
@@ -86,21 +86,21 @@ QuantaView::QuantaView(QWidget *parent, const char *name, const QString &caption
{
setMDICaption(caption);
//Connect the VPL update timers
- connect(&m_sourceUpdateTimer, SIGNAL(timeout()), this, SLOT(sourceUpdateTimerTimeout()));
- connect(&m_VPLUpdateTimer, SIGNAL(timeout()), this, SLOT(VPLUpdateTimerTimeout()));
+ connect(&m_sourceUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(sourceUpdateTimerTimeout()));
+ connect(&m_VPLUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(VPLUpdateTimerTimeout()));
//create the source and VPL holding widgets
- m_documentArea = new QWidget(this);
+ m_documentArea = new TQWidget(this);
//get the reference to the user toolbar holding widget
ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
- m_toolbarTab->reparent(this, 0, QPoint(), true);
- m_toolbarTab ->setFocusPolicy( QWidget::NoFocus );
+ m_toolbarTab->reparent(this, 0, TQPoint(), true);
+ m_toolbarTab ->setFocusPolicy( TQWidget::NoFocus );
//create a splitter to separate the VPL and document area
- m_splitter = new QSplitter(Qt::Vertical, this);
+ m_splitter = new TQSplitter(Qt::Vertical, this);
//place the widgets in a grid
- m_viewLayout = new QGridLayout(this, 2, 0);
+ m_viewLayout = new TQGridLayout(this, 2, 0);
m_viewLayout->setRowStretch(0, 0);
m_viewLayout->setRowStretch(1,1);
m_viewLayout->addWidget( m_toolbarTab, 0, 0);
@@ -118,7 +118,7 @@ QuantaView::~QuantaView()
quantaApp->slotFileClosed(m_document);
if (m_document)
{
- m_document->view()->reparent(0L, 0, QPoint(), false);
+ m_document->view()->reparent(0L, 0, TQPoint(), false);
if (quantaApp)
emit documentClosed(m_document->url());
}
@@ -138,7 +138,7 @@ bool QuantaView::mayRemove()
if (m_document && m_document->isUntitled() && !m_document->isModified())
unmodifiedUntitled = true;
if (m_customWidget)
- m_customWidget->reparent(0L, 0, QPoint(), false);
+ m_customWidget->reparent(0L, 0, TQPoint(), false);
if (!saveModified())
return false;
slotSetSourceLayout();
@@ -149,8 +149,8 @@ bool QuantaView::mayRemove()
Node::deleteNode(baseNode);
baseNode = 0L;
kdDebug(24000) << "Node objects after delete = " << NN << " ; list count = " << nodes.count() << endl;
- QValueList<Node*> nList = nodes;
-/* for (QValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
+ TQValueList<Node*> nList = nodes;
+/* for (TQValueList<Node*>::ConstIterator it = nList.constBegin(); it != nList.constEnd(); ++it)
Node::deleteNode(*it);
kdDebug(24000) << "Node objects after cleanup = " << NN << " ; list count = " << nodes.count() << endl;*/
}
@@ -159,7 +159,7 @@ bool QuantaView::mayRemove()
KURL url = m_document->url();
Project::ref()->saveBookmarks(url, dynamic_cast<KTextEditor::MarkInterface*>(m_document->doc()));
if (!unmodifiedUntitled)
- emit eventHappened("before_close", url.url(), QString::null);
+ emit eventHappened("before_close", url.url(), TQString::null);
m_currentViewsLayout = -1;
// m_document->closeTempFile();
if (!m_document->isUntitled() && url.isLocalFile())
@@ -172,7 +172,7 @@ bool QuantaView::mayRemove()
quantaApp->menuBar()->activateItemAt(-1);
quantaApp->guiFactory()->removeClient(m_document->view());
if (!unmodifiedUntitled)
- emit eventHappened("after_close", url.url(), QString::null);
+ emit eventHappened("after_close", url.url(), TQString::null);
}
/* kdDebug(24000) << "Calling reparse from close " << endl;
parser->setSAParserEnabled(true);
@@ -186,18 +186,18 @@ void QuantaView::addDocument(Document *document)
if (!document)
return;
m_document = document;
- connect(m_document, SIGNAL(editorGotFocus()), this, SLOT(slotSourceGetFocus()));
- connect(m_document->view(), SIGNAL(cursorPositionChanged()), this, SIGNAL(cursorPositionChanged()));
+ connect(m_document, TQT_SIGNAL(editorGotFocus()), this, TQT_SLOT(slotSourceGetFocus()));
+ connect(m_document->view(), TQT_SIGNAL(cursorPositionChanged()), this, TQT_SIGNAL(cursorPositionChanged()));
m_kafkaDocument = KafkaDocument::ref();
- connect(m_kafkaDocument->getKafkaWidget(), SIGNAL(hasFocus(bool)),
- this, SLOT(slotVPLGetFocus(bool)));
- connect(m_kafkaDocument, SIGNAL(newCursorPosition(int,int)),
- this, SLOT(slotSetCursorPositionInSource(int, int)));
- connect(m_kafkaDocument, SIGNAL(loadingError(Node *)),
- this, SLOT(slotVPLLoadingError(Node *)));
+ connect(m_kafkaDocument->getKafkaWidget(), TQT_SIGNAL(hasFocus(bool)),
+ this, TQT_SLOT(slotVPLGetFocus(bool)));
+ connect(m_kafkaDocument, TQT_SIGNAL(newCursorPosition(int,int)),
+ this, TQT_SLOT(slotSetCursorPositionInSource(int, int)));
+ connect(m_kafkaDocument, TQT_SIGNAL(loadingError(Node *)),
+ this, TQT_SLOT(slotVPLLoadingError(Node *)));
m_kafkaReloadingEnabled = true;
m_quantaReloadingEnabled = true;
@@ -215,29 +215,29 @@ void QuantaView::addDocument(Document *document)
void QuantaView::addPlugin(QuantaPlugin *plugin)
{
ToolbarTabWidget *m_toolbarTab = ToolbarTabWidget::ref();
- m_toolbarTab->reparent(0, 0, QPoint(), false);
+ m_toolbarTab->reparent(0, 0, TQPoint(), false);
m_plugin = plugin;
m_splitter->hide();
- QWidget *w = m_plugin->widget();
+ TQWidget *w = m_plugin->widget();
if (w)
{
- w->reparent(m_documentArea, 0, QPoint(), true);
+ w->reparent(m_documentArea, 0, TQPoint(), true);
w->resize(m_documentArea->size());
}
- m_documentArea->reparent(this, 0, QPoint(), true);
+ m_documentArea->reparent(this, 0, TQPoint(), true);
m_viewLayout->addWidget(m_documentArea, 1, 0);
activated();
updateTab();
}
-void QuantaView::addCustomWidget(QWidget *widget, const QString &label)
+void QuantaView::addCustomWidget(TQWidget *widget, const TQString &label)
{
if (widget)
{
- ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false);
m_customWidget = widget;
m_splitter->hide();
- widget->reparent(m_documentArea, 0, QPoint(), true);
+ widget->reparent(m_documentArea, 0, TQPoint(), true);
widget->resize(m_documentArea->size());
if (!label.isEmpty())
{
@@ -249,7 +249,7 @@ void QuantaView::addCustomWidget(QWidget *widget, const QString &label)
} else
if (m_customWidget)
{
- ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar);
m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
m_customWidget = 0L; //avoid infinite recursion
reloadLayout();
@@ -287,10 +287,10 @@ void QuantaView::updateTab()
if (m_document)
{
// try to set the icon from mimetype
- QIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small));
+ TQIconSet mimeIcon (KMimeType::pixmapForURL(m_document->url(), 0, KIcon::Small));
if (mimeIcon.isNull())
- mimeIcon = QIconSet(SmallIcon("document"));
- QString urlStr = QExtFileInfo::shortName(m_document->url().path());
+ mimeIcon = TQIconSet(SmallIcon("document"));
+ TQString urlStr = QExtFileInfo::shortName(m_document->url().path());
if (m_document->isModified())
{
if (qConfig.showCloseButtons == "ShowAlways")
@@ -330,7 +330,7 @@ void QuantaView::updateTab()
}
}
-QString QuantaView::tabName()
+TQString QuantaView::tabName()
{
if (m_document)
{
@@ -371,8 +371,8 @@ void QuantaView::slotSetSourceLayout()
//show the document if full size
m_splitter->hide();
- m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, QPoint(), false);
- m_document->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(0, 0, TQPoint(), false);
+ m_document->view()->reparent(m_documentArea, 0, TQPoint(), true);
m_document->view()->resize(m_documentArea->size());
m_viewLayout->addWidget(m_documentArea, 1, 0);
m_document->view()->setFocus();
@@ -412,9 +412,9 @@ void QuantaView::slotSetSourceAndVPLLayout()
{
reloadSourceView();
}
- m_kafkaDocument->getKafkaWidget()->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_splitter, 0, TQPoint(), true);
m_splitter->moveToFirst(m_kafkaDocument->getKafkaWidget()->view());
- m_document->view()->reparent(m_splitter, 0, QPoint(), true);
+ m_document->view()->reparent(m_splitter, 0, TQPoint(), true);
m_viewLayout->addWidget(m_splitter, 1, 0);
m_splitter->setSizes(m_splitterSizes);
m_splitter->show();
@@ -458,7 +458,7 @@ void QuantaView::slotSetVPLOnlyLayout()
if (!m_kafkaDocument->isLoaded())
m_kafkaDocument->loadDocument(m_document);
- m_kafkaDocument->getKafkaWidget()->view()->reparent(m_documentArea, 0, QPoint(), true);
+ m_kafkaDocument->getKafkaWidget()->view()->reparent(m_documentArea, 0, TQPoint(), true);
m_kafkaDocument->getKafkaWidget()->view()->resize(m_documentArea->size());
m_viewLayout->addWidget(m_documentArea, 1, 0);
m_kafkaDocument->getKafkaWidget()->view()->setFocus();
@@ -672,19 +672,19 @@ void QuantaView::slotSetCursorPositionInSource(int col, int line)
m_document->viewCursorIf->setCursorPositionReal(line, col);
}
-void QuantaView::dragEnterEvent(QDragEnterEvent *e)
+void QuantaView::dragEnterEvent(TQDragEnterEvent *e)
{
e->accept(KURLDrag::canDecode(e));
}
-void QuantaView::dropEvent(QDropEvent *e)
+void QuantaView::dropEvent(TQDropEvent *e)
{
emit dragInsert(e);
}
-void QuantaView::resizeEvent(QResizeEvent *e)
+void QuantaView::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
resize(m_documentArea->width(), m_documentArea->height());
}
@@ -719,12 +719,12 @@ void QuantaView::insertTag(const char *tag)
{
if (!m_document )
return;
- QString tagStr = QuantaCommon::tagCase(tag);
+ TQString tagStr = QuantaCommon::tagCase(tag);
const DTDStruct *dtd = m_document->currentDTD(true);
bool single = QuantaCommon::isSingleTag(dtd->name, tagStr);
bool optional = QuantaCommon::isOptionalTag(dtd->name, tagStr);
- QString startTag = tagStr;
+ TQString startTag = tagStr;
startTag.prepend("<");
if ( dtd->singleTagStyle == "xml" &&
( single || (optional && !qConfig.closeOptionalTags))
@@ -737,7 +737,7 @@ void QuantaView::insertTag(const char *tag)
if ( (qConfig.closeTags && !single && !optional) ||
(qConfig.closeOptionalTags && optional) )
{
- m_document->insertTag( startTag, QString("</")+tagStr+">");
+ m_document->insertTag( startTag, TQString("</")+tagStr+">");
}
else
{
@@ -747,7 +747,7 @@ void QuantaView::insertTag(const char *tag)
//FIXME: Move out from here??
/** Insert a new tag by bringing up the TagDialog. */
-void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool insertInLine)
+void QuantaView::insertNewTag(const TQString &tag, const TQString &attr, bool insertInLine)
{
if (m_document)
{
@@ -756,7 +756,7 @@ void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool inse
insertOutputInTheNodeTree("", "", quantaApp->showTagDialogAndReturnNode(tag, attr));
else
{
- QString selection;
+ TQString selection;
if (m_document->selectionIf)
selection = m_document->selectionIf->selection();
TagDialog *dlg = new TagDialog(QuantaCommon::tagFromDTD(m_document->getDTDIdentifier(), tag), selection, attr, baseURL());
@@ -770,7 +770,7 @@ void QuantaView::insertNewTag(const QString &tag, const QString &attr, bool inse
}
}
-void QuantaView::insertOutputInTheNodeTree(const QString &str1, const QString &str2, Node *node)
+void QuantaView::insertOutputInTheNodeTree(const TQString &str1, const TQString &str2, Node *node)
{
if (!m_document)
return;
@@ -785,14 +785,14 @@ void QuantaView::insertOutputInTheNodeTree(const QString &str1, const QString &s
KafkaWidget *kafkaPart = m_kafkaDocument->getKafkaWidget();
NodeModifsSet *modifs;
DOM::Node domNode, domStartContainer, domEndContainer;
- QString tagName;
+ TQString tagName;
QTag *nodeQTag, *qTag, *nodeParentQTag;
Node *nodeCursor, *startContainer, *endContainer, *nodeParent, *dummy;
- QPtrList<QTag> qTagList;
+ TQPtrList<QTag> qTagList;
int startCol, startLine, endCol, endLine;
bool specialTagInsertion = false;
long nodeOffset, startOffset, endOffset, domNodeOffset;
- QValueList<int> loc;
+ TQValueList<int> loc;
uint line, col;
bool smartTagInsertion, hasSelection, nodeTreeModified;
@@ -1018,7 +1018,7 @@ void QuantaView::activated()
refreshWindow();
return;
}
- ToolbarTabWidget::ref()->reparent(this, 0, QPoint(), qConfig.enableDTDToolbar);
+ ToolbarTabWidget::ref()->reparent(this, 0, TQPoint(), qConfig.enableDTDToolbar);
m_viewLayout->addWidget(ToolbarTabWidget::ref(), 0 , 0);
quantaApp->partManager()->setActivePart(m_document->doc(), m_document->view());
m_document->checkDirtyStatus();
@@ -1055,7 +1055,7 @@ bool QuantaView::saveModified(bool ask)
return true;
bool completed=true;
- QString fileName = m_document->url().fileName();
+ TQString fileName = m_document->url().fileName();
if (m_document->isModified() )
{
@@ -1108,7 +1108,7 @@ bool QuantaView::saveDocument(const KURL& url)
if (url.isEmpty())
return false;
- emit eventHappened("before_save", url.url(), QString::null);
+ emit eventHappened("before_save", url.url(), TQString::null);
m_saveResult = true;
KURL oldURL = m_document->url();
if (!m_document->isUntitled() && oldURL.isLocalFile())
@@ -1134,8 +1134,8 @@ bool QuantaView::saveDocument(const KURL& url)
{
KTextEditor::Document *doc = m_document->doc();
m_eventLoopStarted = false;
- connect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
- connect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ connect(doc, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotSavingFailed(const TQString &)));
+ connect(doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSavingCompleted()));
m_saveResult = m_document->saveAs(url);
if (m_saveResult)
{
@@ -1144,8 +1144,8 @@ bool QuantaView::saveDocument(const KURL& url)
m_eventLoopStarted = true;
internalFileInfo.enter_loop();
}
- disconnect(doc, SIGNAL(canceled(const QString &)), this, SLOT(slotSavingFailed(const QString &)));
- disconnect(doc, SIGNAL(completed()), this, SLOT(slotSavingCompleted()));
+ disconnect(doc, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotSavingFailed(const TQString &)));
+ disconnect(doc, TQT_SIGNAL(completed()), this, TQT_SLOT(slotSavingCompleted()));
if (!m_saveResult) //there was an error while saving
{
if (oldURL.isLocalFile())
@@ -1161,11 +1161,11 @@ bool QuantaView::saveDocument(const KURL& url)
{
setCaption(m_document->url().fileName());
}
- emit eventHappened("after_save", m_document->url().url(), QString::null);
+ emit eventHappened("after_save", m_document->url().url(), TQString::null);
return true;
}
-void QuantaView::slotSavingFailed(const QString &error)
+void QuantaView::slotSavingFailed(const TQString &error)
{
Q_UNUSED(error);
m_saveResult = false;
diff --git a/quanta/src/quantaview.h b/quanta/src/quantaview.h
index 24ecd776..f8033133 100644
--- a/quanta/src/quantaview.h
+++ b/quanta/src/quantaview.h
@@ -19,11 +19,11 @@
#define QUANTAVIEW_H
// include files for Qt
-#include <qguardedptr.h>
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
//kde includes
#include <kmdichildview.h>
@@ -53,7 +53,7 @@ class QSplitter;
class Node;
/** The QuantaView class provides the view widget for the QuantaApp
- * instance. The View instance inherits QWidget as a base class and
+ * instance. The View instance inherits TQWidget as a base class and
* represents the view object of a KTMainWindow. As QuantaView is part
* of the docuement-view model, it needs a reference to the document
* object connected with it by the QuantaApp class to manipulate and
@@ -67,7 +67,7 @@ class QuantaView : public KMdiChildView
public:
- QuantaView(QWidget *parent = 0, const char *name=0, const QString &caption = QString::null);
+ QuantaView(TQWidget *parent = 0, const char *name=0, const TQString &caption = TQString::null);
~QuantaView();
/** returns true if the view can be removed, false otherwise */
@@ -77,7 +77,7 @@ public:
void addDocument(Document *document);
/** Adds a custom widget to the view. */
- void addCustomWidget(QWidget *widget, const QString &label);
+ void addCustomWidget(TQWidget *widget, const TQString &label);
/** returns the Document object associated with this view. Returns 0L if the view holds
a non-Document object */
@@ -86,7 +86,7 @@ public:
/**Adds a QuantaPlugin object to the view.*/
void addPlugin(QuantaPlugin *plugin);
- QWidget* documentArea() {return m_documentArea;}
+ TQWidget* documentArea() {return m_documentArea;}
bool saveDocument(const KURL&);
/** Saves the document if it's modified. Ask the user if their
@@ -114,7 +114,7 @@ public:
/** Called when this view lost the active status */
void deactivated();
- void resizeEvent(QResizeEvent* e);
+ void resizeEvent(TQResizeEvent* e);
/** Resize the current view */
void resize(int width, int height);
/** Redraws the view, resizes the components to their correct size */
@@ -124,17 +124,17 @@ public:
void updateTab();
/** Returns the tab name associated with this view */
- QString tabName();
+ TQString tabName();
void insertTag( const char *tag);
/** Insert a new tag by bringing up the TagDialog. */
- void insertNewTag(const QString &tag, const QString &attr = QString::null, bool insertInLine = true);
+ void insertNewTag(const TQString &tag, const TQString &attr = TQString::null, bool insertInLine = true);
/**
* This function take the output of the TagAction, parse it into Nodes and insert it
* in the Node tree. Then kafka will take care of updating itself from the Node Tree.
*/
- void insertOutputInTheNodeTree(const QString &str1, const QString &str2 = QString::null, Node *node = 0L);
+ void insertOutputInTheNodeTree(const TQString &str1, const TQString &str2 = TQString::null, Node *node = 0L);
enum ViewFocus {
SourceFocus = 0,
@@ -180,7 +180,7 @@ public slots:
private slots:
void slotSavingCompleted();
- void slotSavingFailed(const QString& error);
+ void slotSavingFailed(const TQString& error);
/**
* Called to update VPL.
@@ -194,40 +194,40 @@ private slots:
signals:
/** emitted when a file from the template view is dropped on the view */
- void dragInsert(QDropEvent *);
+ void dragInsert(TQDropEvent *);
/** asks for hiding the preview widget */
void hidePreview();
void showProblemsView();
void cursorPositionChanged();
- void title(const QString &);
+ void title(const TQString &);
/** emitted if this view contained an editor and it is closed */
void documentClosed(const KURL&);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
private:
/** Kafka stuff */
- QValueList<int> m_splitterSizes;
+ TQValueList<int> m_splitterSizes;
int m_curCol, m_curLine, m_curOffset;
DOM::Node curNode;
bool m_kafkaReloadingEnabled, m_quantaReloadingEnabled;
- QTimer m_sourceUpdateTimer, m_VPLUpdateTimer;
+ TQTimer m_sourceUpdateTimer, m_VPLUpdateTimer;
- QWidget *m_documentArea;///< the area of the view which can be used to show the source/VPL
+ TQWidget *m_documentArea;///< the area of the view which can be used to show the source/VPL
Document *m_document;
QuantaPlugin *m_plugin;
- QWidget *m_customWidget; ///<view holds a custom widget, eg. a documentation
- QGuardedPtr<KafkaDocument> m_kafkaDocument;
- QSplitter *m_splitter;
- QGridLayout *m_viewLayout;
+ TQWidget *m_customWidget; ///<view holds a custom widget, eg. a documentation
+ TQGuardedPtr<KafkaDocument> m_kafkaDocument;
+ TQSplitter *m_splitter;
+ TQGridLayout *m_viewLayout;
int m_currentViewsLayout; ///< holds the current layout, which can be SourceOnly, VPLOnly or SourceAndVPL
int m_currentFocus;
bool m_saveResult;
bool m_eventLoopStarted;
protected:
- virtual void dropEvent(QDropEvent *e);
- virtual void dragEnterEvent(QDragEnterEvent *e);
+ virtual void dropEvent(TQDropEvent *e);
+ virtual void dragEnterEvent(TQDragEnterEvent *e);
};
#endif // QUANTAVIEW_H
diff --git a/quanta/src/viewmanager.cpp b/quanta/src/viewmanager.cpp
index f02108e9..5d9ea103 100644
--- a/quanta/src/viewmanager.cpp
+++ b/quanta/src/viewmanager.cpp
@@ -13,7 +13,7 @@
***************************************************************************/
//qt includes
-#include <qdir.h>
+#include <tqdir.h>
//kde includes
#include <kdirwatch.h>
@@ -61,26 +61,26 @@
#define UPLOAD_ID 12
#define DELETE_ID 13
-ViewManager::ViewManager(QObject *parent, const char *name) : QObject(parent, name)
+ViewManager::ViewManager(TQObject *parent, const char *name) : TQObject(parent, name)
{
m_lastActiveView = 0L;
m_lastActiveEditorView = 0L;
m_documentationView = 0L;
m_tabPopup = new KPopupMenu(quantaApp);
- m_tabPopup->insertItem(SmallIcon("fileclose"), i18n("&Close"), this, SLOT(slotCloseView()));
- m_tabPopup->insertItem(i18n("Close &Other Tabs"), this, SLOT(slotCloseOtherTabs()));
- m_tabPopup->insertItem(i18n("Close &All"), this, SLOT(closeAll()));
- m_tabPopup->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReloadFile()), 0, RELOAD_ID);
- m_tabPopup->insertItem(SmallIcon("up"), i18n("&Upload File"), this, SLOT(slotUploadFile()), 0, UPLOAD_ID);
- m_tabPopup->insertItem(SmallIcon("editdelete"), i18n("&Delete File"), this, SLOT(slotDeleteFile()), 0, DELETE_ID);
+ m_tabPopup->insertItem(SmallIcon("fileclose"), i18n("&Close"), this, TQT_SLOT(slotCloseView()));
+ m_tabPopup->insertItem(i18n("Close &Other Tabs"), this, TQT_SLOT(slotCloseOtherTabs()));
+ m_tabPopup->insertItem(i18n("Close &All"), this, TQT_SLOT(closeAll()));
+ m_tabPopup->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReloadFile()), 0, RELOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("up"), i18n("&Upload File"), this, TQT_SLOT(slotUploadFile()), 0, UPLOAD_ID);
+ m_tabPopup->insertItem(SmallIcon("editdelete"), i18n("&Delete File"), this, TQT_SLOT(slotDeleteFile()), 0, DELETE_ID);
m_tabPopup->insertSeparator();
m_fileListPopup = new KPopupMenu(quantaApp);
- connect(m_fileListPopup, SIGNAL(aboutToShow()), this, SLOT(slotFileListPopupAboutToShow()));
- connect(m_fileListPopup, SIGNAL(activated(int)), this, SLOT(slotFileListPopupItemActivated(int)));
+ connect(m_fileListPopup, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotFileListPopupAboutToShow()));
+ connect(m_fileListPopup, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotFileListPopupItemActivated(int)));
m_bookmarks = new QuantaBookmarks(this, QuantaBookmarks::Position, true);
m_bookmarksMenu = new KPopupMenu(quantaApp);
m_bookmarks->setBookmarksMenu(m_bookmarksMenu);
- connect(m_bookmarks, SIGNAL(gotoFileAndLine(const QString&, int, int)), quantaApp, SLOT(gotoFileAndLine(const QString&, int, int)));
+ connect(m_bookmarks, TQT_SIGNAL(gotoFileAndLine(const TQString&, int, int)), quantaApp, TQT_SLOT(gotoFileAndLine(const TQString&, int, int)));
m_bookmarksMenuId = m_tabPopup->insertItem(SmallIconSet("bookmark"), i18n("&Bookmarks"), m_bookmarksMenu);
m_tabPopup->insertItem(i18n("&Switch To"), m_fileListPopup);
m_contextView = 0L;
@@ -88,18 +88,18 @@ ViewManager::ViewManager(QObject *parent, const char *name) : QObject(parent, na
m_separatorVisible = false;
}
-QuantaView* ViewManager::createView(const QString &caption)
+QuantaView* ViewManager::createView(const TQString &caption)
{
QuantaView *view = new QuantaView(quantaApp, "", caption);
quantaApp->addWindow(view);
- connect(view, SIGNAL(cursorPositionChanged()), quantaApp, SLOT(slotNewLineColumn()));
- connect(view, SIGNAL(title(const QString &)), quantaApp, SLOT(slotNewLineColumn()));
- connect(view, SIGNAL(dragInsert(QDropEvent*)), this, SIGNAL(dragInsert(QDropEvent *)));
- connect(view, SIGNAL(hidePreview()), quantaApp, SLOT(slotChangePreviewStatus()));
- disconnect(view, SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
- connect(view, SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, SLOT(slotCloseRequest(KMdiChildView*)));
- connect(view, SIGNAL(documentClosed(const KURL&)), this, SLOT(slotDocumentClosed(const KURL&)));
- connect(view, SIGNAL(eventHappened(const QString&, const QString&, const QString& )), QPEvents::ref(), SLOT(slotEventHappened(const QString&, const QString&, const QString& )));
+ connect(view, TQT_SIGNAL(cursorPositionChanged()), quantaApp, TQT_SLOT(slotNewLineColumn()));
+ connect(view, TQT_SIGNAL(title(const TQString &)), quantaApp, TQT_SLOT(slotNewLineColumn()));
+ connect(view, TQT_SIGNAL(dragInsert(TQDropEvent*)), this, TQT_SIGNAL(dragInsert(TQDropEvent *)));
+ connect(view, TQT_SIGNAL(hidePreview()), quantaApp, TQT_SLOT(slotChangePreviewStatus()));
+ disconnect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView *)), 0, 0 );
+ connect(view, TQT_SIGNAL(childWindowCloseRequest( KMdiChildView*)), this, TQT_SLOT(slotCloseRequest(KMdiChildView*)));
+ connect(view, TQT_SIGNAL(documentClosed(const KURL&)), this, TQT_SLOT(slotDocumentClosed(const KURL&)));
+ connect(view, TQT_SIGNAL(eventHappened(const TQString&, const TQString&, const TQString& )), QPEvents::ref(), TQT_SLOT(slotEventHappened(const TQString&, const TQString&, const TQString& )));
return view;
}
@@ -108,7 +108,7 @@ void ViewManager::createNewDocument()
{
int i = 1;
while (isOpened(KURL("file:"+i18n("Untitled%1").arg(i)))) i++;
- QString fname = i18n("Untitled%1").arg(i);
+ TQString fname = i18n("Untitled%1").arg(i);
QuantaView *view = createView(fname);
#ifdef ENABLE_EDITORS
@@ -121,8 +121,8 @@ void ViewManager::createNewDocument()
KTextEditor::Document *doc = KTextEditor::createDocument ("libkatepart", view, "KTextEditor::Document");
#endif
Document *w = new Document(doc, 0L);
- connect(w, SIGNAL(showAnnotation(uint, const QString&, const QPair<QString, QString>&)), quantaApp->annotationOutput(), SLOT(insertAnnotation(uint, const QString&, const QPair<QString, QString>&)));
- QString encoding = quantaApp->defaultEncoding();
+ connect(w, TQT_SIGNAL(showAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)), quantaApp->annotationOutput(), TQT_SLOT(insertAnnotation(uint, const TQString&, const QPair<TQString, TQString>&)));
+ TQString encoding = quantaApp->defaultEncoding();
KTextEditor::EncodingInterface* encodingIf = dynamic_cast<KTextEditor::EncodingInterface*>(doc);
if (encodingIf)
encodingIf->setEncoding(encoding);
@@ -130,16 +130,16 @@ void ViewManager::createNewDocument()
KTextEditor::View * v = w->view();
//[MB02] connect all kate views for drag and drop
- connect(w->view(), SIGNAL(dropEventPass(QDropEvent *)), this, SIGNAL(dragInsert(QDropEvent *)));
+ connect(w->view(), TQT_SIGNAL(dropEventPass(TQDropEvent *)), this, TQT_SIGNAL(dragInsert(TQDropEvent *)));
w->setUntitledUrl( fname );
KTextEditor::PopupMenuInterface* popupIf = dynamic_cast<KTextEditor::PopupMenuInterface*>(w->view());
if (popupIf)
- popupIf->installPopup((QPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
+ popupIf->installPopup((TQPopupMenu *)quantaApp->factory()->container("popup_editor", quantaApp));
quantaApp->setFocusProxy(w->view());
- w->view()->setFocusPolicy(QWidget::WheelFocus);
- connect( v, SIGNAL(newStatus()), quantaApp, SLOT(slotNewStatus()));
+ w->view()->setFocusPolicy(TQWidget::WheelFocus);
+ connect( v, TQT_SIGNAL(newStatus()), quantaApp, TQT_SLOT(slotNewStatus()));
quantaApp->slotNewPart(doc, true); // register new part in partmanager and make active
view->addDocument(w);
@@ -154,7 +154,7 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
{
if (!view) return false;
int noOfViews = 0;
- QValueList<Document*> list;
+ TQValueList<Document*> list;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
for (it->first(); !it->isDone(); it->next())
{
@@ -180,9 +180,9 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
if (view == m_lastActiveEditorView)
m_lastActiveEditorView = 0L;
if (view == activeView())
- ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false);
if (!createNew)
- disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
quantaApp->closeWindow(view);
if (createNew)
{
@@ -191,7 +191,7 @@ bool ViewManager::removeView(QuantaView *view, bool force, bool createNew)
quantaApp->slotFileNew();
}
} else
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
return true;
}
}
@@ -255,17 +255,17 @@ void ViewManager::slotCloseOtherTabs()
else
currentView = quantaApp->activeWindow();
if (dynamic_cast<QuantaView*>(currentView) && !static_cast<QuantaView*>(currentView)->document())
- ToolbarTabWidget::ref()->reparent(0, 0, QPoint(), false);
+ ToolbarTabWidget::ref()->reparent(0, 0, TQPoint(), false);
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView *> children;
+ TQValueList<KMdiChildView *> children;
for (it->first(); !it->isDone(); it->next())
{
children.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
view = *childIt;
@@ -283,7 +283,7 @@ void ViewManager::slotCloseOtherTabs()
{
KURL::List filesToSave;
KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
for (childIt = children.begin(); childIt != children.end(); ++childIt)
@@ -328,7 +328,7 @@ QuantaView* ViewManager::isOpened(const KURL& url)
KURL url2 = url;
if (url2.isLocalFile() && !url.path().startsWith(i18n("Untitled")))
{
- QDir dir(url2.path());
+ TQDir dir(url2.path());
url2.setPath(dir.canonicalPath());
}
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
@@ -366,9 +366,9 @@ KURL::List ViewManager::openedFiles(bool noUntitled)
return list;
}
-QValueList<Document*> ViewManager::openedDocuments()
+TQValueList<Document*> ViewManager::openedDocuments()
{
- QValueList<Document*> list;
+ TQValueList<Document*> list;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
for (it->first(); !it->isDone(); it->next())
@@ -400,13 +400,13 @@ bool ViewManager::saveAll()
{
if (!w->isUntitled())
{
- emit eventHappened("before_save", w->url().url(), QString::null);
+ emit eventHappened("before_save", w->url().url(), TQString::null);
w->docUndoRedo->fileSaved();
w->save();
w->removeBackup(quantaApp->config());
if (w->isModified())
flagsave = false;
- emit eventHappened("after_save", w->url().url(), QString::null);
+ emit eventHappened("after_save", w->url().url(), TQString::null);
} else
{
if (!view->saveModified())
@@ -428,14 +428,14 @@ bool ViewManager::closeAll(bool createNew)
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
//save the children first to a list, as removing invalidates our iterator
- QValueList<KMdiChildView *> children;
+ TQValueList<KMdiChildView *> children;
for (it->first(); !it->isDone(); it->next())
{
children.append(it->currentItem());
}
delete it;
KURL::List modifiedList;
- QValueListIterator<KMdiChildView *> childIt;
+ TQValueListIterator<KMdiChildView *> childIt;
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
view = dynamic_cast<QuantaView*>(*childIt);
@@ -452,7 +452,7 @@ bool ViewManager::closeAll(bool createNew)
{
KURL::List filesToSave;
KSaveSelectDialog dlg(modifiedList, filesToSave /*empty ignore list */, quantaApp);
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
filesToSave = dlg.filesToSave();
for (childIt = children.begin(); childIt != children.end(); ++childIt)
@@ -480,9 +480,9 @@ bool ViewManager::closeAll(bool createNew)
return false; //save aborted
}
}
- disconnect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- disconnect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
- ToolbarTabWidget::ref()->reparent(0L, 0, QPoint(), false);
+ disconnect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ disconnect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
+ ToolbarTabWidget::ref()->reparent(0L, 0, TQPoint(), false);
for (childIt = children.begin(); childIt != children.end(); ++childIt)
{
@@ -508,8 +508,8 @@ bool ViewManager::closeAll(bool createNew)
} else
{
//actually this code should be never executed
- connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
view->activated();
emit filesClosed(false);
return false;
@@ -523,8 +523,8 @@ bool ViewManager::closeAll(bool createNew)
}
}
}
- connect(quantaApp, SIGNAL(viewActivated (KMdiChildView *)), this, SLOT(slotViewActivated(KMdiChildView*)));
- connect(quantaApp, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastViewClosed()));
+ connect(quantaApp, TQT_SIGNAL(viewActivated (KMdiChildView *)), this, TQT_SLOT(slotViewActivated(KMdiChildView*)));
+ connect(quantaApp, TQT_SIGNAL(lastChildViewClosed()), this, TQT_SLOT(slotLastViewClosed()));
if (createNew)
{
createNewDocument();
@@ -561,7 +561,7 @@ QuantaView* ViewManager::documentationView(bool create)
if (!m_documentationView && create)
{
m_documentationView = createView();
- m_documentationView->addCustomWidget((QWidget*)quantaApp->documentationPart()->view(), i18n("Documentation"));
+ m_documentationView->addCustomWidget((TQWidget*)quantaApp->documentationPart()->view(), i18n("Documentation"));
}
return m_documentationView;
}
@@ -588,7 +588,7 @@ bool ViewManager::allEditorsClosed()
return true;
}
-void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
+void ViewManager::slotTabContextMenu(TQWidget *widget, const TQPoint& point)
{
if (m_separatorVisible)
m_tabPopup->removeItemAt(SEPARATOR_INDEX);
@@ -627,8 +627,8 @@ void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
if (w && w->markIf)
{
m_bookmarks->setDocument(w);
- QPtrList<KTextEditor::Mark> m = w->markIf->marks();
- QPtrListIterator<KTextEditor::Mark> it(m);
+ TQPtrList<KTextEditor::Mark> m = w->markIf->marks();
+ TQPtrListIterator<KTextEditor::Mark> it(m);
for(; *it; ++it)
{
if ((*it)->type & KTextEditor::MarkInterface::markType01)
@@ -667,7 +667,7 @@ void ViewManager::slotTabContextMenu(QWidget *widget, const QPoint& point)
void ViewManager::slotFileListPopupAboutToShow()
{
m_fileListPopup->clear();
- QStringList viewList;
+ TQStringList viewList;
KMdiIterator<KMdiChildView*> *it = quantaApp->createIterator();
QuantaView *view;
int id = 0;
@@ -736,7 +736,7 @@ void ViewManager::slotDocumentClosed(const KURL& url)
}
/** Return the URL of the currently active document */
-QString ViewManager::currentURL()
+TQString ViewManager::currentURL()
{
Document *w = activeDocument();
if (w)
diff --git a/quanta/src/viewmanager.h b/quanta/src/viewmanager.h
index e7a4fb31..05278901 100644
--- a/quanta/src/viewmanager.h
+++ b/quanta/src/viewmanager.h
@@ -34,7 +34,7 @@ class ViewManager : public QObject
Q_OBJECT
public:
/** Returns a reference to the viewmanager object */
- static ViewManager* const ref(QObject *parent = 0L, const char *name = 0L)
+ static ViewManager* const ref(TQObject *parent = 0L, const char *name = 0L)
{
static ViewManager *m_ref;
if (!m_ref) m_ref = new ViewManager(parent, name);
@@ -44,7 +44,7 @@ public:
virtual ~ViewManager(){};
/** Creates a QuantaView object */
- QuantaView *createView(const QString &caption = QString::null);
+ QuantaView *createView(const TQString &caption = TQString::null);
/** Removes a QuantaView object. Returns false on failure (eg. the view was not saved and it refused
the delete itself.) If force is true, the view is removed without asking for save.
*/
@@ -65,7 +65,7 @@ public:
/** Returns a list with the URLs of the opened documents */
KURL::List openedFiles(bool noUntitled=true);
/** Returns a list with the Document* object of the opened documents */
- QValueList<Document*> openedDocuments();
+ TQValueList<Document*> openedDocuments();
/** Returns the view holding the documentation widget. If create is true and there is no such view yet,
it creates one. */
@@ -75,7 +75,7 @@ public:
QuantaView *lastActiveEditorView() {return m_lastActiveEditorView;}
/** Return the URL of the currently active document */
- QString currentURL();
+ TQString currentURL();
public slots:
/**called when a new view was activated */
@@ -91,7 +91,7 @@ public slots:
void slotLastViewClosed();
/** called when the context menu was invoked on a tab */
- void slotTabContextMenu(QWidget *widget, const QPoint & point);
+ void slotTabContextMenu(TQWidget *widget, const TQPoint & point);
/** called when the user requests to close a tab with the close button */
void slotCloseRequest(KMdiChildView *widget);
/** called from the views and just emits the signal @ref documentClosed */
@@ -99,12 +99,12 @@ public slots:
signals:
/** emitted when a file from the template view is dropped on a view */
- void dragInsert(QDropEvent *);
+ void dragInsert(TQDropEvent *);
/** emitted when a view was activated */
void viewActivated(const KURL &);
/** emitted when a view was closed */
void documentClosed(const KURL&);
- void eventHappened(const QString&, const QString&, const QString& );
+ void eventHappened(const TQString&, const TQString&, const TQString& );
/** emitted when all files were closed. The argument is true if the closes
was successful, false if the unser canceled the closing */
void filesClosed(bool);
@@ -123,7 +123,7 @@ private slots:
private:
/** Private constructor for the singleton object. */
- ViewManager(QObject * parent = 0, const char * name = 0);
+ ViewManager(TQObject * parent = 0, const char * name = 0);
/** Returns true if there isn't any opened view holding an editor */
bool allEditorsClosed();
diff --git a/quanta/treeviews/basetreeview.cpp b/quanta/treeviews/basetreeview.cpp
index 8d8fad11..c7f65b22 100644
--- a/quanta/treeviews/basetreeview.cpp
+++ b/quanta/treeviews/basetreeview.cpp
@@ -16,20 +16,20 @@
***************************************************************************/
// QT includes
-#include <qeventloop.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qimage.h>
-#include <qregexp.h>
-#include <qclipboard.h>
-#include <qpoint.h>
-#include <qregexp.h>
-#include <qlineedit.h>
-#include <qfont.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qptrstack.h>
+#include <tqeventloop.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqimage.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
+#include <tqpoint.h>
+#include <tqregexp.h>
+#include <tqlineedit.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqptrstack.h>
// KDE includes
#include <kaction.h>
@@ -70,32 +70,32 @@
class BaseTreeViewToolTip : public QToolTip
{
public:
- BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv );
+ BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv );
- void maybeTip( const QPoint &pos );
+ void maybeTip( const TQPoint &pos );
private:
BaseTreeView *m_view;
};
-BaseTreeViewToolTip::BaseTreeViewToolTip( QWidget *parent, BaseTreeView *lv )
- : QToolTip( parent ), m_view( lv )
+BaseTreeViewToolTip::BaseTreeViewToolTip( TQWidget *parent, BaseTreeView *lv )
+ : TQToolTip( parent ), m_view( lv )
{
}
-void BaseTreeViewToolTip::maybeTip( const QPoint &pos )
+void BaseTreeViewToolTip::maybeTip( const TQPoint &pos )
{
if ( !parentWidget() || !m_view || !m_view->showToolTips() )
return;
- QListViewItem *item = m_view->itemAt(pos);
+ TQListViewItem *item = m_view->itemAt(pos);
if (!item)
return;
- QString text;
+ TQString text;
KFileTreeViewItem * kftvi = dynamic_cast<BaseTreeViewItem *> (item);
if (kftvi) {
- QString desc = kftvi->text(1);
+ TQString desc = kftvi->text(1);
text = kftvi->fileItem()->getToolTipText();
if ( !desc.isEmpty() )
text.prepend("&nbsp;<i>" + desc + "</i><br>");
@@ -116,7 +116,7 @@ BaseTreeViewItem::BaseTreeViewItem( KFileTreeViewItem *parent, KFileItem* item,
{
}
-QString BaseTreeViewItem::key(int column, bool ascending) const
+TQString BaseTreeViewItem::key(int column, bool ascending) const
{
if (ascending)
if (isDir())
@@ -130,19 +130,19 @@ QString BaseTreeViewItem::key(int column, bool ascending) const
return text(column).prepend(" ");
}
-int BaseTreeViewItem::compare(QListViewItem *i, int col,
+int BaseTreeViewItem::compare(TQListViewItem *i, int col,
bool ascending) const
{
return key(col, ascending).compare(i->key(col, ascending));
}
-void BaseTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void BaseTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if (column == 0)
{
- QFont f = p->font();
+ TQFont f = p->font();
if (quantaApp)
f.setBold(ViewManager::ref()->isOpened(url()));
p->setFont(f);
@@ -151,7 +151,7 @@ void BaseTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
int h, s, v;
p->pen().color().getHsv(&h, &s, &v);
v = (v < 155 ? v + 100 : 255);
- _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ _cg.setColor(TQColorGroup::Text, TQColor(h, s, v, TQColor::Hsv));
};
KFileTreeViewItem::paintCell( p, _cg, column, width, align );
}
@@ -164,7 +164,7 @@ void BaseTreeViewItem::refreshIcon()
//BaseTreeBranch implementation
BaseTreeBranch::BaseTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden ,
KFileTreeViewItem *branchRoot)
: KFileTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -203,7 +203,7 @@ KFileTreeViewItem* BaseTreeBranch::createTreeViewItem(KFileTreeViewItem *parent,
}
-void BaseTreeBranch::addOpenFolder(QStringList* openFolder)
+void BaseTreeBranch::addOpenFolder(TQStringList* openFolder)
{
if (! openFolder) // just in case
return;
@@ -244,7 +244,7 @@ void BaseTreeBranch::reopenFolder()
if (folderToOpen.isEmpty())
return;
KFileTreeViewItem *item;
- for (QStringList::Iterator it = folderToOpen.begin(); it != folderToOpen.end(); ++it) {
+ for (TQStringList::Iterator it = folderToOpen.begin(); it != folderToOpen.end(); ++it) {
KURL url( (*it) );
item = findTVIByURL(url);
if (item) {
@@ -265,7 +265,7 @@ void BaseTreeBranch::updateOpenFolder()
while (item) {
if (item->isDir() && item->isOpen()) {
updateDirectory( item->url() );
- kapp->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers);
+ kapp->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers);
// dive into the tree first
newItem = dynamic_cast<KFileTreeViewItem *>(item->firstChild());
if (newItem) {
@@ -291,11 +291,11 @@ void BaseTreeBranch::updateOpenFolder()
//
////////////////////////////////////////////////////////////////////////////////////
-BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
+BaseTreeView::BaseTreeView(TQWidget *parent, const char *name)
: KFileTreeView(parent, name), fileInfoDlg(0), m_saveOpenFolder(false), m_openWithMenu(0L), m_openWithMenuId(-1)
{
m_parent = parent;
- QToolTip::remove(viewport()); // remove the tooltip from QListView
+ TQToolTip::remove(viewport()); // remove the tooltip from QListView
m_tooltip = new BaseTreeViewToolTip(viewport(), this);
setFrameStyle( Panel | Sunken );
setRootIsDecorated(true);
@@ -303,38 +303,38 @@ BaseTreeView::BaseTreeView(QWidget *parent, const char *name)
setLineWidth(2);
setFullWidth(true);
setShowSortIndicator(true);
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
setShowFolderOpenPixmap(false);
- connect(this, SIGNAL(returnPressed(QListViewItem *)),
- this, SLOT(slotReturnPressed(QListViewItem *)));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)),
+ this, TQT_SLOT(slotReturnPressed(TQListViewItem *)));
- connect(this, SIGNAL(dropped(QWidget *, QDropEvent *, KURL::List&, KURL&)),
- this, SLOT(slotDropped(QWidget *, QDropEvent *, KURL::List&, KURL&)));
+ connect(this, TQT_SIGNAL(dropped(TQWidget *, TQDropEvent *, KURL::List&, KURL&)),
+ this, TQT_SLOT(slotDropped(TQWidget *, TQDropEvent *, KURL::List&, KURL&)));
- connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int )),
- this, SLOT(slotRenameItem(QListViewItem*, const QString &, int )));
+ connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int )),
+ this, TQT_SLOT(slotRenameItem(TQListViewItem*, const TQString &, int )));
- connect(this, SIGNAL(executed(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
- connect(this, SIGNAL(openFile(const KURL &)),
- quantaApp, SLOT(slotFileOpen(const KURL &)));
+ connect(this, TQT_SIGNAL(openFile(const KURL &)),
+ quantaApp, TQT_SLOT(slotFileOpen(const KURL &)));
- connect(this, SIGNAL(openImage(const KURL &)),
- quantaApp, SLOT(slotImageOpen(const KURL &)));
+ connect(this, TQT_SIGNAL(openImage(const KURL &)),
+ quantaApp, TQT_SLOT(slotImageOpen(const KURL &)));
- connect(this, SIGNAL(closeFile(const KURL &)),
- quantaApp, SLOT(slotFileClose(const KURL &)));
+ connect(this, TQT_SIGNAL(closeFile(const KURL &)),
+ quantaApp, TQT_SLOT(slotFileClose(const KURL &)));
- connect(this, SIGNAL(insertTag(const KURL &, DirInfo)),
- quantaApp, SLOT(slotInsertTag(const KURL &, DirInfo)));
+ connect(this, TQT_SIGNAL(insertTag(const KURL &, DirInfo)),
+ quantaApp, TQT_SLOT(slotInsertTag(const KURL &, DirInfo)));
}
BaseTreeView::~BaseTreeView()
{
- QToolTip::remove(viewport());
+ TQToolTip::remove(viewport());
delete m_tooltip;
}
@@ -360,7 +360,7 @@ void BaseTreeView::itemRenamed(const KURL& oldURL, const KURL& newURL)
/** Called for: double click, return, Open */
-void BaseTreeView::slotSelectFile(QListViewItem *item)
+void BaseTreeView::slotSelectFile(TQListViewItem *item)
{
KFileTreeViewItem* kftvi = currentKFileTreeViewItem();
if (!kftvi || kftvi->isDir()) return;
@@ -400,7 +400,7 @@ bool BaseTreeView::expandArchiv (KFileTreeViewItem *item)
if ( ! urlToOpen.isLocalFile()) return false;
- QString mimeType = KMimeType::findByURL(urlToOpen)->name();
+ TQString mimeType = KMimeType::findByURL(urlToOpen)->name();
if ( mimeType == "application/x-tgz" ||
mimeType == "application/x-tbz" ||
@@ -435,8 +435,8 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
if ( !currentKFileTreeViewItem()->isDir() )
{
- QFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info"));
- QVBoxLayout *topLayout = new QVBoxLayout( quantaFilePage);
+ TQFrame *quantaFilePage = propDlg->addPage(i18n("Quanta File Info"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout( quantaFilePage);
quantaFileProperties = new FileInfoDlg( quantaFilePage, i18n("Quanta") );
int fsize,fimgsize=0;
@@ -444,20 +444,20 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
KURL u = currentURL();
if (u.isLocalFile()) //get the file info only for local file. TODO: for non-local ones
{
- QString nameForInfo = u.path();
- QString path =u.directory(0,0); //extract path for images
- QString sourcename=u.fileName(0);
+ TQString nameForInfo = u.path();
+ TQString path =u.directory(0,0); //extract path for images
+ TQString sourcename=u.fileName(0);
- QFile qfile(nameForInfo);
+ TQFile qfile(nameForInfo);
fsize=qfile.size(); //html file size
- QString mimetype = KMimeType::findByFileContent(nameForInfo)->name();
+ TQString mimetype = KMimeType::findByFileContent(nameForInfo)->name();
if (mimetype.contains("text"))
{
qfile.open(IO_ReadOnly);
- QString imgname,imgpath;
- QTextStream stream(&qfile);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString imgname,imgpath;
+ TQTextStream stream(&qfile);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
while (!stream.atEnd()) //open & parse file
{
imgname = stream.readLine();
@@ -482,7 +482,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
{
KURL v(KURL::fromPathOrURL( path ),imgname);
imgpath=v.path();
- QFile qimage(imgpath);
+ TQFile qimage(imgpath);
if (qimage.exists() && v.isLocalFile())
{
fimgsize+=qimage.size();
@@ -501,7 +501,7 @@ FileInfoDlg* BaseTreeView::addFileInfoPage(KPropertiesDialog* propDlg)
}
else if (mimetype.contains("image"))
{ // assume it's an image file
- QImage imagefile=QImage(nameForInfo);
+ TQImage imagefile=TQImage(nameForInfo);
quantaFileProperties->lineNum->setText(i18n("Image size: %1 x %2").arg(imagefile.width()).arg(imagefile.height()));
quantaFileProperties->imageNum->hide();
quantaFileProperties->imageSize->hide();
@@ -532,7 +532,7 @@ void BaseTreeView::slotClose()
void BaseTreeView::slotOpen()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
emit open(item);
@@ -592,9 +592,9 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
}
m_openWithActions.clear();
KURL urlToOpen = currentURL();
- QString mimeType = KMimeType::findByURL(urlToOpen, 0, true, true)->name();
+ TQString mimeType = KMimeType::findByURL(urlToOpen, 0, true, true)->name();
KTrader::OfferList offers = KTrader::self()->query(mimeType, "Type == 'Application'");
- QDict<QuantaPlugin> plugins = QuantaPluginInterface::ref()->plugins();
+ TQDict<QuantaPlugin> plugins = QuantaPluginInterface::ref()->plugins();
m_pluginIds.clear();
if (offers.count() > 0 || plugins.count() > 0)
@@ -605,8 +605,8 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
KTrader::OfferList::Iterator it;
for (it = offers.begin(); it != offers.end(); ++it)
{
- KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, QFile::encodeName((*it)->desktopEntryPath()).data());
- connect(action, SIGNAL(activated()), this, SLOT(slotOpenWithApplication()));
+ KAction *action = new KAction((*it)->name(), (*it)->icon(), 0, 0, TQFile::encodeName((*it)->desktopEntryPath()).data());
+ connect(action, TQT_SIGNAL(activated()), this, TQT_SLOT(slotOpenWithApplication()));
action->plug(m_openWithMenu);
m_openWithActions.append(action);
}
@@ -615,19 +615,19 @@ void BaseTreeView::insertOpenWithMenu(KPopupMenu *menu, int position)
if (plugins.count() > 0)
{
m_openWithMenu->insertTitle(i18n("Plugins"));
- QDictIterator<QuantaPlugin> it2(plugins);
+ TQDictIterator<QuantaPlugin> it2(plugins);
for(;it2.current();++it2)
{
int id = m_openWithMenu->insertItem(KGlobal::iconLoader()->loadIconSet(it2.current()->icon(),KIcon::Small), it2.current()->name());
m_pluginIds[id] = it2.current();
}
- connect(m_openWithMenu, SIGNAL(activated(int)), SLOT(slotOpenWithActivated(int)));
+ connect(m_openWithMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotOpenWithActivated(int)));
m_openWithMenu->insertSeparator();
}
- m_openWithMenu->insertItem(i18n("&Other..."), this, SLOT(slotOpenWith()));
+ m_openWithMenu->insertItem(i18n("&Other..."), this, TQT_SLOT(slotOpenWith()));
m_openWithMenuId = menu->insertItem(i18n("Open &With"), m_openWithMenu, -1, position);
} else
- m_openWithMenuId = menu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()), 0, -1, position);
+ m_openWithMenuId = menu->insertItem(i18n("Open &With..."), this, TQT_SLOT(slotOpenWith()), 0, -1, position);
}
void BaseTreeView::slotInsertTag()
@@ -648,7 +648,7 @@ void BaseTreeView::slotCopy()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
+ QClipboard *cb = TQApplication::clipboard();
cb->setText( currentURL().prettyURL() );
}
}
@@ -658,8 +658,8 @@ void BaseTreeView::slotPaste()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
KURL url = currentURL();
if ( ! currentKFileTreeViewItem()->isDir() )
@@ -701,7 +701,7 @@ void BaseTreeView::slotPopulateFinished(KFileTreeViewItem *item)
item->setOpen(false);
item->setExpandable(false);
} else {
- QString url = item->url().url();
+ TQString url = item->url().url();
BaseTreeBranch *btb = dynamic_cast<BaseTreeBranch *>(item->branch());
if (btb && ! btb->folderToOpen.empty()) {
btb->reopenFolder();
@@ -740,7 +740,7 @@ void BaseTreeView::slotProperties()
{
fileInfoDlg = addFileInfoPage(propDlg);
}
- connect(propDlg, SIGNAL( applied() ), this, SLOT( slotPropertiesApplied()) );
+ connect(propDlg, TQT_SIGNAL( applied() ), this, TQT_SLOT( slotPropertiesApplied()) );
propDlg->exec();
}
@@ -758,7 +758,7 @@ void BaseTreeView::slotPropertiesApplied()
if (fileInfoDlg && kftvi)
{
// has description changed?
- QString newDesc = fileInfoDlg->fileDesc->text();
+ TQString newDesc = fileInfoDlg->fileDesc->text();
if (kftvi->text(1) != newDesc)
itemDescChanged(kftvi, newDesc);
}
@@ -776,7 +776,7 @@ void BaseTreeView::slotPropertiesApplied()
void BaseTreeView::slotReloadAllTrees()
{
- QPtrStack<BaseTreeBranch> stack;
+ TQPtrStack<BaseTreeBranch> stack;
BaseTreeBranch *btb;
KFileTreeBranchIterator it( branches() );
for ( ; it.current(); ++it)
@@ -804,7 +804,7 @@ void BaseTreeView::slotReload()
void BaseTreeView::reload(BaseTreeBranch *btb)
{
// remember the old status
- QStringList folderToOpen;
+ TQStringList folderToOpen;
btb->addOpenFolder(&folderToOpen);
KURL url = btb->rootUrl();
// remove and open again
@@ -829,16 +829,16 @@ void BaseTreeView::slotJobFinished(KIO::Job *job)
}
-void BaseTreeView::slotReturnPressed(QListViewItem *item)
+void BaseTreeView::slotReturnPressed(TQListViewItem *item)
{
emit executed(item);
}
-bool BaseTreeView::acceptDrag(QDropEvent* e ) const
+bool BaseTreeView::acceptDrag(TQDropEvent* e ) const
{
- QPoint p (contentsToViewport(e->pos()));
- QListViewItem *atpos = itemAt(p);
+ TQPoint p (contentsToViewport(e->pos()));
+ TQListViewItem *atpos = itemAt(p);
KFileTreeViewItem *kftvi = dynamic_cast <KFileTreeViewItem *> (atpos);
if (kftvi)
return (KFileTreeView::acceptDrag(e) && kftvi->isDir()); // accept only on folders
@@ -847,7 +847,7 @@ bool BaseTreeView::acceptDrag(QDropEvent* e ) const
}
-void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileList, KURL& dest)
+void BaseTreeView::slotDropped (TQWidget *, TQDropEvent * /*e*/, KURL::List& fileList, KURL& dest)
{
if(fileList.empty())
return;
@@ -880,7 +880,7 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
} else {
// create the popup menu
- QPopupMenu popup;
+ TQPopupMenu popup;
if (sMoving || (sReading && sDeleting))
popup.insertItem(SmallIconSet("goto"), i18n("&Move Here"), 2 );
if (sReading)
@@ -890,7 +890,7 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
popup.insertSeparator();
popup.insertItem(SmallIconSet("cancel"), i18n("C&ancel"), 5);
- result = popup.exec( QCursor::pos() );
+ result = popup.exec( TQCursor::pos() );
}
}
bool tooltip = showToolTips();
@@ -915,18 +915,18 @@ void BaseTreeView::slotDropped (QWidget *, QDropEvent * /*e*/, KURL::List& fileL
if (!job)
return;
- connect(job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotJobFinished(KIO::Job *) ) );
+ connect(job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotJobFinished(KIO::Job *) ) );
progressBar->setTotalSteps(100);
- connect(job, SIGNAL(percent( KIO::Job *, unsigned long)),
- this, SLOT(slotPercent( KIO::Job *, unsigned long)));
+ connect(job, TQT_SIGNAL(percent( KIO::Job *, unsigned long)),
+ this, TQT_SLOT(slotPercent( KIO::Job *, unsigned long)));
}
-void BaseTreeView::findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after)
+void BaseTreeView::findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after)
{
- QPoint p (contentsToViewport(pos));
- QListViewItem *atpos = itemAt(p);
+ TQPoint p (contentsToViewport(pos));
+ TQListViewItem *atpos = itemAt(p);
// if (atpos && atpos->parent()) {
// after = atpos;
// parent = atpos->parent();
@@ -937,7 +937,7 @@ void BaseTreeView::findDrop(const QPoint &pos, QListViewItem *&parent, QListView
}
-void BaseTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &)
+void BaseTreeView::slotNewProjectLoaded(const TQString &name, const KURL &baseURL, const KURL &)
{
m_projectName = name;
m_projectBaseURL = baseURL;
@@ -952,8 +952,8 @@ bool BaseTreeView::isFileOpen(const KURL &url)
bool BaseTreeView::isPathInClipboard()
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
for ( KURL::List::Iterator it = list.begin(); it != list.end(); ++it )
{
if ( !(*it).isValid() )
@@ -975,7 +975,7 @@ void BaseTreeView::slotDocumentClosed(const KURL& url)
item->repaint();
}
}
-/* QListViewItemIterator iter(this);
+/* TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
iter.current()->repaint();
@@ -1002,7 +1002,7 @@ void BaseTreeView::cancelRename(int col)
}
-void BaseTreeView::slotRenameItem(QListViewItem* item, const QString & newText, int col)
+void BaseTreeView::slotRenameItem(TQListViewItem* item, const TQString & newText, int col)
{
if (!item)
return;
@@ -1017,7 +1017,7 @@ void BaseTreeView::slotRenameItem(QListViewItem* item, const QString & newText,
}
-void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
+void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const TQString & newName)
{
if (! kftvi)
return;
@@ -1027,7 +1027,7 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
if (kftvi->isDir())
{
- newURL.setPath(QFileInfo(oldURL.path(-1)).dirPath() + '/' + newName + '/');
+ newURL.setPath(TQFileInfo(oldURL.path(-1)).dirPath() + '/' + newName + '/');
oldURL.adjustPath(1);
} else
{
@@ -1057,7 +1057,7 @@ void BaseTreeView::doRename(KFileTreeViewItem* kftvi, const QString & newName)
}
-void BaseTreeView::saveLayout(KConfig *config, const QString &group)
+void BaseTreeView::saveLayout(KConfig *config, const TQString &group)
{
KListView::saveLayout(config, group);
if (! m_saveOpenFolder || ! qConfig.saveTrees)
@@ -1072,18 +1072,18 @@ void BaseTreeView::saveLayout(KConfig *config, const QString &group)
btb = dynamic_cast<BaseTreeBranch *>( (*it) );
if (btb && btb->rootUrl().isLocalFile()) {
++i;
- QStringList folderList;
+ TQStringList folderList;
// remember the root url so that I find the branch on restore
folderList.append(btb->rootUrl().url());
btb->addOpenFolder(&folderList);
- config->writePathEntry("OpenFolderList" + QString::number(i), folderList);
+ config->writePathEntry("OpenFolderList" + TQString::number(i), folderList);
}
}
config->writeEntry("NumOpenFolderList", i);
}
-void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
+void BaseTreeView::restoreLayout(KConfig *config, const TQString &group)
{
KListView::restoreLayout(config, group);
KConfigGroupSaver saver(config, group);
@@ -1097,7 +1097,7 @@ void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
int maxBranch = config->readNumEntry("NumOpenFolderList", 0);
for (int i = 1; i <= maxBranch; ++i)
{
- QStringList folderList = QuantaCommon::readPathListEntry(config, "OpenFolderList" + QString::number(i));
+ TQStringList folderList = QuantaCommon::readPathListEntry(config, "OpenFolderList" + TQString::number(i));
if (folderList.count() > 1) {
KURL rootURL = (*folderList.begin());
folderList.remove(folderList.begin()); // remove the root URL
@@ -1120,7 +1120,7 @@ void BaseTreeView::restoreLayout(KConfig *config, const QString &group)
void BaseTreeView::slotCreateSiteTemplate()
{
- QString startDir;
+ TQString startDir;
if (Project::ref()->hasProject())
{
startDir = Project::ref()->templateURL().url();
@@ -1164,10 +1164,10 @@ void BaseTreeView::slotCreateSiteTemplate()
{
if (!(*it).path().endsWith("/"))
{
- QFile f((*it).path());
+ TQFile f((*it).path());
if (f.open(IO_ReadOnly))
{
- QByteArray buffer(f.readAll());
+ TQByteArray buffer(f.readAll());
if (!tar.writeFile((*it).path().remove(url.path()), "user", "group", buffer.size(), buffer.data()))
{
error = true;
@@ -1191,7 +1191,7 @@ void BaseTreeView::slotCreateSiteTemplate()
void BaseTreeView::slotCreateFolder()
{
bool ok;
- QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ TQString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -1206,7 +1206,7 @@ void BaseTreeView::slotCreateFolder()
void BaseTreeView::slotCreateFile()
{
bool ok;
- QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ TQString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
diff --git a/quanta/treeviews/basetreeview.h b/quanta/treeviews/basetreeview.h
index 345b5a79..2ec49022 100644
--- a/quanta/treeviews/basetreeview.h
+++ b/quanta/treeviews/basetreeview.h
@@ -19,7 +19,7 @@
#define BASETREEVIEW_H
//qt includes
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
//kde includes
#include <kfiletreebranch.h>
@@ -59,17 +59,17 @@ public:
/**
sorts folders separate from files
*/
- QString key (int column, bool ascending) const;
+ TQString key (int column, bool ascending) const;
/**
makes compare independent from locale
*/
- int compare( QListViewItem *i, int col, bool ascending ) const;
+ int compare( TQListViewItem *i, int col, bool ascending ) const;
/**
makes open files bold and the second column lighter
*/
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
/**
refresh icon
@@ -87,7 +87,7 @@ class BaseTreeBranch : public KFileTreeBranch {
public:
BaseTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0);
/**
get the BaseTreeViewItem
@@ -102,7 +102,7 @@ public:
/**
files matching to this will not be shown
*/
- QRegExp excludeFilterRx;
+ TQRegExp excludeFilterRx;
/**
adds the current open folders of the branch to a stringslist.
@@ -110,13 +110,13 @@ public:
@param openFolder the list where to add the URL strings
*/
- void addOpenFolder(QStringList *openFolder);
+ void addOpenFolder(TQStringList *openFolder);
/** opens the next folder in @ref folderToOpen */
void reopenFolder();
/** list of folders to open */
- QStringList folderToOpen;
+ TQStringList folderToOpen;
/** inform the dirwatcher to update all open folders */
void updateOpenFolder();
@@ -135,7 +135,7 @@ class BaseTreeView : public KFileTreeView {
Q_OBJECT
public:
- BaseTreeView(QWidget *parent = 0L, const char *name = 0L);
+ BaseTreeView(TQWidget *parent = 0L, const char *name = 0L);
virtual ~BaseTreeView();
/**
@@ -145,7 +145,7 @@ public:
* @param config the KConfig object to write to
* @param group the config group to use
*/
- void saveLayout(KConfig *config, const QString &group);
+ void saveLayout(KConfig *config, const TQString &group);
/**
* Reads the list view's layout from a KConfig group as stored with
@@ -154,7 +154,7 @@ public:
* @param config the KConfig object to read from
* @param group the config group to use
*/
- void restoreLayout(KConfig *config, const QString &group);
+ void restoreLayout(KConfig *config, const TQString &group);
/**
* en/disable saving a list of open folders in @ref saveLayout and
@@ -169,7 +169,7 @@ public slots:
/**
sets new project information
*/
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
/**
repaints all treeview items
*/
@@ -183,8 +183,8 @@ protected slots:
virtual void slotJobFinished( KIO::Job *job);
void slotInsertInProject();
void slotInsertDirInProject();
- virtual void slotReturnPressed(QListViewItem *item);
- virtual void slotDropped (QWidget *, QDropEvent *, KURL::List&, KURL&);
+ virtual void slotReturnPressed(TQListViewItem *item);
+ virtual void slotDropped (TQWidget *, TQDropEvent *, KURL::List&, KURL&);
/**
sends value from KIO::Job to progressbar
*/
@@ -204,7 +204,7 @@ protected slots:
emits a signal (@ref openFile or @ref openImage)
or expands an archiv (@ref expandArchiv) in the tree
*/
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
/**
emits the signal @ref insertTag
*/
@@ -246,7 +246,7 @@ protected slots:
/**
connect signal itemRenamed to this slot to handle inline rename
*/
- virtual void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ virtual void slotRenameItem(TQListViewItem* kvtvi, const TQString & newText, int col);
/**
create a site template tarball from the selected directory
*/
@@ -282,7 +282,7 @@ protected:
@param item the treeview item
@param newDesc the new description of item
*/
- virtual void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+ virtual void itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc)
{
Q_UNUSED(item);
Q_UNUSED(newDesc);
@@ -304,8 +304,8 @@ protected:
@return true if expanding was possible
*/
bool expandArchiv (KFileTreeViewItem *item);
- bool acceptDrag(QDropEvent* e ) const;
- void findDrop(const QPoint &pos, QListViewItem *&parent, QListViewItem *&after);
+ bool acceptDrag(TQDropEvent* e ) const;
+ void findDrop(const TQPoint &pos, TQListViewItem *&parent, TQListViewItem *&after);
/**
this is for project and template tree to reduce includes there
@@ -321,24 +321,24 @@ protected:
*/
void insertOpenWithMenu(KPopupMenu *menu, int position);
KPropertiesDialog *propDlg;
- QString m_projectName;
+ TQString m_projectName;
KURL m_projectBaseURL;
FileInfoDlg* fileInfoDlg;
/** the parent of the treeview
the passwords are cached there
*/
- QWidget * m_parent;
+ TQWidget * m_parent;
BaseTreeViewToolTip * m_tooltip;
// some stuff for renaming
- void doRename(KFileTreeViewItem* kvtvi, const QString & newName);
+ void doRename(KFileTreeViewItem* kvtvi, const TQString & newName);
/** reimplemented to reset renameable */
void cancelRename(int col);
signals:
void openFile(const KURL&);
void openImage(const KURL&);
- void open(QListViewItem *name);
+ void open(TQListViewItem *name);
void insertDirInProject(const KURL&);
void insertFileInProject(const KURL&);
void insertTag(const KURL &, DirInfo);
@@ -355,8 +355,8 @@ private:
bool m_saveOpenFolder;
KPopupMenu *m_openWithMenu;
int m_openWithMenuId;
- QValueList<KAction *> m_openWithActions;
- QMap<int, QuantaPlugin*> m_pluginIds;
+ TQValueList<KAction *> m_openWithActions;
+ TQMap<int, QuantaPlugin*> m_pluginIds;
};
#endif
diff --git a/quanta/treeviews/docfolder.cpp b/quanta/treeviews/docfolder.cpp
index 02669a1e..0a1d941d 100644
--- a/quanta/treeviews/docfolder.cpp
+++ b/quanta/treeviews/docfolder.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// QT includes
-#include <qstrlist.h>
-#include <qpixmap.h>
+#include <tqstrlist.h>
+#include <tqpixmap.h>
// KDE includes
#include <kconfig.h>
@@ -28,14 +28,14 @@
#include "docfolder.h"
#include "docitem.h"
-DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath)
+DocFolder::DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath)
: KListViewItem(parent)
{
name = _name;
topLevel = false;
url = "";
- QStrList list;
+ TQStrList list;
config->readListEntry( name, list );
@@ -43,14 +43,14 @@ DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *confi
for ( list.last(); ( item = list.current() ) ; list.prev() ) {
if ( item[0] != '#' ) {
- QString url = config->readEntry( item );
- DocItem *el = new DocItem( this, QString(item), basePath+url);
+ TQString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, TQString(item), basePath+url);
el->setPixmap( 0, SmallIcon("info") );
} else
if ( item[0] == '#' ) { // current item is folder
item++; // remove leading #
- QString l_url = config->readEntry( QString("folder_")+item, "" );
- DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ TQString l_url = config->readEntry( TQString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, TQString(item), config, basePath);
if ( ! l_url.isEmpty() )
el->url = basePath+l_url;
el->setPixmap( 0, UserIcon("mini-book1") );
@@ -59,13 +59,13 @@ DocFolder::DocFolder(QListViewItem *parent, const QString &_name, KConfig *confi
}
}
-DocFolder::DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath)
+DocFolder::DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath)
: KListViewItem(parent)
{
name = _name;
topLevel = false;
url = "";
- QStrList list;
+ TQStrList list;
config->readListEntry( name, list );
@@ -73,14 +73,14 @@ DocFolder::DocFolder(QListView *parent, const QString &_name, KConfig *config, c
for ( list.last(); ( item = list.current() ) ; list.prev() ) {
if ( item[0] != '#' ) {
- QString url = config->readEntry( item );
- DocItem *el = new DocItem( this, QString(item), basePath+url);
+ TQString url = config->readEntry( item );
+ DocItem *el = new DocItem( this, TQString(item), basePath+url);
el->setPixmap( 0, SmallIcon("info") );
} else
if ( item[0] == '#' ) { // current item is folder
item++; // remove leading #
- QString l_url = config->readEntry( QString("folder_")+item, "" );
- DocFolder *el = new DocFolder(this, QString(item), config, basePath);
+ TQString l_url = config->readEntry( TQString("folder_")+item, "" );
+ DocFolder *el = new DocFolder(this, TQString(item), config, basePath);
if ( ! l_url.isEmpty() )
el->url = basePath+l_url;
el->setPixmap( 0, UserIcon("mini-book1") );
@@ -95,7 +95,7 @@ DocFolder::~DocFolder(){
}
-QString DocFolder::text( int i) const
+TQString DocFolder::text( int i) const
{
if (i == 0)
return name;
@@ -106,12 +106,12 @@ QString DocFolder::text( int i) const
void DocFolder::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
/** */
void DocFolder::setOpen( bool o)
{
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
if ( !topLevel ) {
if (o)
setPixmap( 0, UserIcon("mini-book2") );
diff --git a/quanta/treeviews/docfolder.h b/quanta/treeviews/docfolder.h
index 6b6668e1..f3c8db87 100644
--- a/quanta/treeviews/docfolder.h
+++ b/quanta/treeviews/docfolder.h
@@ -18,7 +18,7 @@
#ifndef DOCFOLDER_H
#define DOCFOLDER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -33,17 +33,17 @@ class KConfig;
class DocFolder : public KListViewItem {
public:
- DocFolder(QListViewItem *parent, const QString &_name, KConfig *config, const QString &basePath);
- DocFolder(QListView *parent, const QString &_name, KConfig *config, const QString &basePath);
+ DocFolder(TQListViewItem *parent, const TQString &_name, KConfig *config, const TQString &basePath);
+ DocFolder(TQListView *parent, const TQString &_name, KConfig *config, const TQString &basePath);
~DocFolder();
- QString text( int column ) const;
+ TQString text( int column ) const;
void setup();
/** */
void setOpen( bool o);
public:
- QString url;
- QString name;
+ TQString url;
+ TQString name;
bool topLevel;
};
diff --git a/quanta/treeviews/docitem.cpp b/quanta/treeviews/docitem.cpp
index 7c9efa83..f24c3bb9 100644
--- a/quanta/treeviews/docitem.cpp
+++ b/quanta/treeviews/docitem.cpp
@@ -15,20 +15,20 @@
* *
***************************************************************************/
-#include <qstrlist.h>
+#include <tqstrlist.h>
#include <kconfig.h>
#include "docitem.h"
-DocItem::DocItem(QListViewItem *parent, const QString &_name, const QString &_url)
+DocItem::DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url)
: KListViewItem(parent)
{
url = _url;
name = _name;
}
-DocItem::DocItem(QListView *parent, const QString &_name, const QString &_url)
+DocItem::DocItem(TQListView *parent, const TQString &_name, const TQString &_url)
: KListViewItem(parent)
{
url = _url;
@@ -41,7 +41,7 @@ DocItem::~DocItem()
}
-QString DocItem::text( int i) const
+TQString DocItem::text( int i) const
{
if (i == 0)
return name;
diff --git a/quanta/treeviews/docitem.h b/quanta/treeviews/docitem.h
index 94fff375..59b126a1 100644
--- a/quanta/treeviews/docitem.h
+++ b/quanta/treeviews/docitem.h
@@ -18,7 +18,7 @@
#ifndef DOCITEM_H
#define DOCITEM_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
@@ -31,14 +31,14 @@ class KConfig;
class DocItem : public KListViewItem {
public:
- DocItem(QListViewItem *parent, const QString &_name, const QString &_url);
- DocItem(QListView *parent, const QString &_name, const QString &_url);
+ DocItem(TQListViewItem *parent, const TQString &_name, const TQString &_url);
+ DocItem(TQListView *parent, const TQString &_name, const TQString &_url);
~DocItem();
- QString text( int column ) const;
+ TQString text( int column ) const;
public: // Public attributes
- QString url;
- QString name;
+ TQString url;
+ TQString name;
};
diff --git a/quanta/treeviews/doctreeview.cpp b/quanta/treeviews/doctreeview.cpp
index fd9abf65..d0234faf 100644
--- a/quanta/treeviews/doctreeview.cpp
+++ b/quanta/treeviews/doctreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT clases
-#include <qstrlist.h>
-#include <qheader.h>
-#include <qpixmap.h>
-#include <qdir.h>
+#include <tqstrlist.h>
+#include <tqheader.h>
+#include <tqpixmap.h>
+#include <tqdir.h>
// KDE clases
#include <kconfig.h>
@@ -35,11 +35,11 @@
#include "docfolder.h"
#include "docitem.h"
-DocTreeView::DocTreeView(QWidget *parent, const char *name )
+DocTreeView::DocTreeView(TQWidget *parent, const char *name )
: KListView(parent,name)
{
- contextHelpDict = new QDict<QString>( 101, false );
+ contextHelpDict = new TQDict<TQString>( 101, false );
setRootIsDecorated( true );
header()->hide();
@@ -54,17 +54,17 @@ DocTreeView::DocTreeView(QWidget *parent, const char *name )
projectDocFolder = new KListViewItem(this, i18n("Project Documentation"));
projectDocFolder->setOpen(true);
slotRefreshTree();
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect(this, SIGNAL(executed(QListViewItem *)), SLOT(clickItem(QListViewItem *)) );
- connect(this, SIGNAL(returnPressed(QListViewItem *)), SLOT(clickItem(QListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)) );
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotDoubleClicked(TQListViewItem *)));
m_contextMenu = new KPopupMenu(this);
- m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, SLOT(slotReloadProjectDocs()));
- m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, SIGNAL(downloadDoc()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, TQT_SLOT(slotReloadProjectDocs()));
+ m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, TQT_SIGNAL(downloadDoc()));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
}
@@ -75,41 +75,41 @@ DocTreeView::~DocTreeView(){
void DocTreeView::slotRefreshTree()
{
- for (QValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
+ for (TQValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
{
delete *it;
}
m_folderList.clear();
- QStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
+ TQStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
- for ( QStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
+ for ( TQStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
{
- QString docDir = *it;
- QDir dir(docDir, "*.docrc");
- QStringList files = dir.entryList();
+ TQString docDir = *it;
+ TQDir dir(docDir, "*.docrc");
+ TQStringList files = dir.entryList();
- for ( QStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
+ for ( TQStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
KConfig config( docDir + *it_f );
config.setGroup("Tree");
- QString relDocDir = config.readEntry("Doc dir");
- QString name = config.readEntry("Name").lower();
+ TQString relDocDir = config.readEntry("Doc dir");
+ TQString name = config.readEntry("Name").lower();
- DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , QDir::cleanDirPath(docDir+relDocDir)+"/");
+ DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , TQDir::cleanDirPath(docDir+relDocDir)+"/");
folder->setPixmap( 0, SmallIcon("folder_open") );
folder->topLevel = true;
folder->setOpen(true);
m_folderList.append(folder);
config.setGroup("Context");
- QStrList list;
+ TQStrList list;
config.readListEntry("ContextList", list );
for ( unsigned int i=0; i<list.count(); i++ )
{
- QString keyword = list.at(i);
- QString *url = new QString(QDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
+ TQString keyword = list.at(i);
+ TQString *url = new TQString(TQDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
contextHelpDict->insert( name + "|" + keyword, url );
}
}
@@ -117,9 +117,9 @@ void DocTreeView::slotRefreshTree()
}
-void DocTreeView::clickItem( QListViewItem *)
+void DocTreeView::clickItem( TQListViewItem *)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( !it )
return;
DocItem *dit = dynamic_cast< DocItem *>(it);
@@ -136,16 +136,16 @@ void DocTreeView::clickItem( QListViewItem *)
}
-QString * DocTreeView::contextHelp(const QString &keyword)
+TQString * DocTreeView::contextHelp(const TQString &keyword)
{
- QString word = keyword.mid(keyword.find("|"));
+ TQString word = keyword.mid(keyword.find("|"));
if (contextHelpDict->find(keyword))
return contextHelpDict->find(keyword);
else
return contextHelpDict->find(word); //to support old documentation packages
}
-void DocTreeView::slotDoubleClicked(QListViewItem *item )
+void DocTreeView::slotDoubleClicked(TQListViewItem *item )
{
if (item)
{
@@ -155,13 +155,13 @@ void DocTreeView::slotDoubleClicked(QListViewItem *item )
void DocTreeView::slotAddProjectDoc(const KURL& url)
{
- QString path = url.path();
+ TQString path = url.path();
int pos = path.find("/doc/");
path = path.mid(pos + 5);
new DocItem(projectDocFolder, path, url.url());
}
-void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+void DocTreeView::slotMenu(KListView *, TQListViewItem *item, const TQPoint &point)
{
m_contextMenu->setItemVisible(m_menuReload, false);
if (item)
@@ -175,16 +175,16 @@ void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point
m_contextMenu->popup(point);
}
-void DocTreeView::slotNewProjectLoaded(const QString &, const KURL &, const KURL &)
+void DocTreeView::slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)
{
slotReloadProjectDocs();
}
void DocTreeView::slotReloadProjectDocs()
{
- QListViewItem *child = projectDocFolder->firstChild();
+ TQListViewItem *child = projectDocFolder->firstChild();
while (child) {
- QListViewItem *c = child;
+ TQListViewItem *c = child;
child = child->nextSibling();
delete c;
}
diff --git a/quanta/treeviews/doctreeview.h b/quanta/treeviews/doctreeview.h
index 8061085d..ef60d468 100644
--- a/quanta/treeviews/doctreeview.h
+++ b/quanta/treeviews/doctreeview.h
@@ -19,8 +19,8 @@
#define DOCTREEVIEW_H
//qt includes
-#include <qdict.h>
-#include <qvaluelist.h>
+#include <tqdict.h>
+#include <tqvaluelist.h>
//kde includes
#include <klistview.h>
@@ -36,33 +36,33 @@ class KPopupMenu;
class DocTreeView : public KListView {
Q_OBJECT
public:
- DocTreeView(QWidget *parent=0, const char *name=0);
+ DocTreeView(TQWidget *parent=0, const char *name=0);
~DocTreeView();
- QString *contextHelp(const QString &keyword);
+ TQString *contextHelp(const TQString &keyword);
public slots:
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
void slotReloadProjectDocs();
void slotAddProjectDoc(const KURL& url);
/** Re-reads the documentation directories. */
void slotRefreshTree();
signals:
- void openURL(const QString& );
+ void openURL(const TQString& );
void reloadProjectDocs();
void downloadDoc();
private slots:
- void clickItem( QListViewItem *);
- void slotDoubleClicked(QListViewItem *);
- void slotMenu(KListView *, QListViewItem *item, const QPoint &point);
+ void clickItem( TQListViewItem *);
+ void slotDoubleClicked(TQListViewItem *);
+ void slotMenu(KListView *, TQListViewItem *item, const TQPoint &point);
private:
- QDict<QString> *contextHelpDict;
- QValueList<DocFolder *> m_folderList;
+ TQDict<TQString> *contextHelpDict;
+ TQValueList<DocFolder *> m_folderList;
KListViewItem *projectDocFolder;
KPopupMenu *m_contextMenu;
int m_menuReload;
diff --git a/quanta/treeviews/filestreeview.cpp b/quanta/treeviews/filestreeview.cpp
index be4c6a7e..fd943139 100644
--- a/quanta/treeviews/filestreeview.cpp
+++ b/quanta/treeviews/filestreeview.cpp
@@ -40,7 +40,7 @@
//FilesTreeView implementation
-FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
+FilesTreeView::FilesTreeView(KConfig *config, TQWidget *parent, const char *name)
: BaseTreeView(parent, name)
{
setAcceptDrops(true);
@@ -52,8 +52,8 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
// I must read this here because quanta_init has not done it yet
qConfig.showHiddenFiles = m_config->readBoolEntry("Show Hidden Files", true);
qConfig.saveTrees = m_config->readBoolEntry("Save Local Trees", true);
- QStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders");
- QStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases");
+ TQStringList topStrList = QuantaCommon::readPathListEntry(m_config, "Top folders");
+ TQStringList topStrAliasList = QuantaCommon::readPathListEntry(m_config, "Top folder aliases");
KURL url;
for (uint i = 0; i < topStrList.count(); i++)
{
@@ -84,49 +84,49 @@ FilesTreeView::FilesTreeView(KConfig *config, QWidget *parent, const char *name)
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
KPopupMenu *createNewMenu = new KPopupMenu(this);
- createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
- createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile()));
m_folderMenu = new KPopupMenu();
- m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()));
- m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, SLOT(slotAddToTop()));
- m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder()));
+ m_menuTop = m_folderMenu->insertItem(i18n("&Add Folder to Top"), this, TQT_SLOT(slotAddToTop()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate()));
m_folderMenu->insertItem(SmallIcon("empty"), i18n("&Create New"), createNewMenu);
m_folderMenu->insertSeparator();
- m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, SLOT(slotChangeAlias()));
- m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_menuChangeAlias = m_folderMenu->insertItem(i18n("&Change Alias..."), this, TQT_SLOT(slotChangeAlias()));
+ m_menuFolderRename = m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_emptyMenu = new KPopupMenu();
- m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, SLOT(slotNewTopFolder()), 0, -1 , 0);
+ m_emptyMenu->insertItem(i18n("New Top &Folder..."), this, TQT_SLOT(slotNewTopFolder()), 0, -1 , 0);
addColumn(i18n("Files Tree"), -1);
addColumn("");
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
// generate top list of directories
for (uint i = 0; i < topURLList.count(); i++)
@@ -158,7 +158,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url)
newBrnch = new BaseTreeBranch(this, url, i18n("Home Folder"), SmallIcon(fileItem.iconName()), true);
} else
{
- QString s = url.fileName();
+ TQString s = url.fileName();
if (s.isEmpty())
s = "/";
if (topURLAliases.contains(url.url()))
@@ -175,7 +175,7 @@ KFileTreeBranch* FilesTreeView::newBranch(const KURL& url)
/** RMB pressed, bring up the menu */
-void FilesTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+void FilesTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQPoint &point)
{
Q_UNUSED(listView);
#ifdef ENABLE_CVSSERVICE
@@ -255,7 +255,7 @@ void FilesTreeView::slotAddToTop()
{
topURLList.append(url);
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
if (!ok)
aliasName = url.fileName();
topURLAliases.insert(url.url(), aliasName);
@@ -274,13 +274,13 @@ void FilesTreeView::slotAddToTop()
void FilesTreeView::slotNewTopFolder()
{
- KURL url = KFileDialog::getExistingURL(QString::null, this, i18n("Choose Local or Remote Folder"));
+ KURL url = KFileDialog::getExistingURL(TQString::null, this, i18n("Choose Local or Remote Folder"));
if (url.isEmpty()) return;
url.adjustPath(+1);
if (topURLList.findIndex(url) == -1)
{
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Set Alias"), i18n("Alternative folder name:"), url.fileName(), &ok, this);
if (!ok)
aliasName = url.fileName();
topURLAliases.insert(url.url(), aliasName);
@@ -316,7 +316,7 @@ void FilesTreeView::slotChangeAlias()
if (topURLList.findIndex(url) != -1)
{
bool ok;
- QString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this);
+ TQString aliasName = KInputDialog::getText(i18n("Change Alias"), i18n("Alternative folder name:"), topURLAliases[url.url()], &ok, this);
if (ok)
{
topURLAliases.replace(url.url(), aliasName);
diff --git a/quanta/treeviews/filestreeview.h b/quanta/treeviews/filestreeview.h
index a77ba3de..7522b74e 100644
--- a/quanta/treeviews/filestreeview.h
+++ b/quanta/treeviews/filestreeview.h
@@ -19,7 +19,7 @@
#define FILESTREEVIEW_H
//qt includes
-#include <qmap.h>
+#include <tqmap.h>
// quanta includes
#include "basetreeview.h"
@@ -35,10 +35,10 @@ class FilesTreeView : public BaseTreeView {
Q_OBJECT
public:
- FilesTreeView(KConfig *config, QWidget *parent, const char *name = 0L);
+ FilesTreeView(KConfig *config, TQWidget *parent, const char *name = 0L);
virtual ~FilesTreeView();
KURL::List topURLList;
- QMap<QString, QString> topURLAliases;
+ TQMap<TQString, TQString> topURLAliases;
void plugCVSMenu();
protected slots:
@@ -47,7 +47,7 @@ protected slots:
*/
void slotNewTopFolder();
- virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ virtual void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/**
creates a new branch from the current url
*/
diff --git a/quanta/treeviews/newtemplatedirdlg.cpp b/quanta/treeviews/newtemplatedirdlg.cpp
index bdf6d87f..48fd6b5e 100644
--- a/quanta/treeviews/newtemplatedirdlg.cpp
+++ b/quanta/treeviews/newtemplatedirdlg.cpp
@@ -13,15 +13,15 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "newtemplatedirdlg.h"
#include "newtemplatedirdlg.moc"
-NewTemplateDirDlg::NewTemplateDirDlg(QWidget *parent, const char *name ) : TemplateDirForm(parent,name)
+NewTemplateDirDlg::NewTemplateDirDlg(TQWidget *parent, const char *name ) : TemplateDirForm(parent,name)
{
setCaption(name);
- 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()) );
}
NewTemplateDirDlg::~NewTemplateDirDlg()
diff --git a/quanta/treeviews/newtemplatedirdlg.h b/quanta/treeviews/newtemplatedirdlg.h
index daa6864a..730246e7 100644
--- a/quanta/treeviews/newtemplatedirdlg.h
+++ b/quanta/treeviews/newtemplatedirdlg.h
@@ -16,7 +16,7 @@
#ifndef NEWTEMPLATEDIRDLG_H
#define NEWTEMPLATEDIRDLG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <templatedirform.h>
/**
@@ -26,7 +26,7 @@
class NewTemplateDirDlg : public TemplateDirForm {
Q_OBJECT
public:
- NewTemplateDirDlg(QWidget *parent=0, const char *name=0);
+ NewTemplateDirDlg(TQWidget *parent=0, const char *name=0);
~NewTemplateDirDlg();
};
diff --git a/quanta/treeviews/projecttreeview.cpp b/quanta/treeviews/projecttreeview.cpp
index dc8744aa..0b28e246 100644
--- a/quanta/treeviews/projecttreeview.cpp
+++ b/quanta/treeviews/projecttreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT includes
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qdict.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqdict.h>
// KDE includes
#include <klocale.h>
@@ -51,10 +51,10 @@ ProjectTreeViewItem::ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem*
{
}
-void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ProjectTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QFont f = p->font();
+ TQFont f = p->font();
if (ProjectTreeView::ref()->isDocumentFolder(url()))
{
f.setItalic(true);
@@ -71,7 +71,7 @@ void ProjectTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
//ProjectTreeBranch implementation
ProjectTreeBranch::ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden,
KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -100,7 +100,7 @@ KFileTreeViewItem* ProjectTreeBranch::createTreeViewItem(KFileTreeViewItem *pare
}
//ProjectTreeView implementation
-ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
+ProjectTreeView::ProjectTreeView(TQWidget *parent, const char *name )
: BaseTreeView(parent,name), m_projectFiles(0)
{
//setSelectionModeExt(KListView::Extended);
@@ -118,62 +118,62 @@ ProjectTreeView::ProjectTreeView(QWidget *parent, const char *name )
m_projectDir->root()->setEnabled(false);
m_uploadStatusMenu = new KPopupMenu(this);
- m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, SLOT(slotAlwaysUpload()));
- m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, SLOT(slotNeverUpload()));
- m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, SLOT(slotConfirmUpload()));
- connect(m_uploadStatusMenu, SIGNAL(aboutToShow()), this, SLOT(slotUploadMenuAboutToShow()));
+ m_alwaysUploadId = m_uploadStatusMenu->insertItem(i18n("&When Modified"), this, TQT_SLOT(slotAlwaysUpload()));
+ m_neverUploadId = m_uploadStatusMenu->insertItem(i18n("&Never"), this, TQT_SLOT(slotNeverUpload()));
+ m_confirmUploadId = m_uploadStatusMenu->insertItem(i18n("&Confirm"), this, TQT_SLOT(slotConfirmUpload()));
+ connect(m_uploadStatusMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotUploadMenuAboutToShow()));
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, SLOT(slotOpen()));
- m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, SLOT(slotLoadToolbar()));
- m_fileMenu->insertItem(i18n("Insert &Tag"), this, SLOT(slotInsertTag()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this, TQT_SLOT(slotOpen()));
+ m_openInQuantaId = m_fileMenu->insertItem(i18n("Load Toolbar"), this, TQT_SLOT(slotLoadToolbar()));
+ m_fileMenu->insertItem(i18n("Insert &Tag"), this, TQT_SLOT(slotInsertTag()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, SLOT(slotUploadSingleURL()));
- m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, SLOT(slotQuickUploadURL()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_fileMenu->insertItem( i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Upload File..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_fileMenu->insertItem(SmallIcon("up"), i18n("&Quick File Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_fileMenu->insertItem( i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
m_fileMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
KPopupMenu *createNewMenu = new KPopupMenu(this);
- createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, SLOT(slotCreateFolder()));
- createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, SLOT(slotCreateFile()));
+ createNewMenu->insertItem(SmallIcon("folder_new"), i18n("F&older..."), this, TQT_SLOT(slotCreateFolder()));
+ createNewMenu->insertItem(SmallIcon("document"), i18n("&File..."), this, TQT_SLOT(slotCreateFile()));
m_folderMenu = new KPopupMenu(this);
m_folderMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, SLOT(slotUploadSingleURL()));
- m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, SLOT(slotQuickUploadURL()));
- m_folderMenu->insertItem(i18n("Create Site &Template..."), this, SLOT(slotCreateSiteTemplate()));
- m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
- m_folderMenu->insertItem(i18n("&Remove From Project"), this, SLOT(slotRemoveFromProject(int)));
- m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Upload Folder..."), this, TQT_SLOT(slotUploadSingleURL()));
+ m_folderMenu->insertItem(SmallIcon("up"), i18n("&Quick Folder Upload"), this, TQT_SLOT(slotQuickUploadURL()));
+ m_folderMenu->insertItem(i18n("Create Site &Template..."), this, TQT_SLOT(slotCreateSiteTemplate()));
+ m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
+ m_folderMenu->insertItem(i18n("&Remove From Project"), this, TQT_SLOT(slotRemoveFromProject(int)));
+ m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, SLOT(slotChangeDocumentFolderStatus()));
+ m_setDocumentRootId = m_folderMenu->insertItem(i18n("Document-&Base Folder"), this, TQT_SLOT(slotChangeDocumentFolderStatus()));
m_folderMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_projectMenu = new KPopupMenu(this);
m_projectMenu->insertItem(SmallIconSet("filenew"), i18n("&Create New"), createNewMenu);
m_projectMenu->insertSeparator();
- m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, SLOT(slotUploadProject()));
- m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, SLOT(slotRescan()));
- m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, SLOT(slotOptions()));
- m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_projectMenu->insertItem(SmallIcon("up"), i18n("&Upload Project..."), this, TQT_SLOT(slotUploadProject()));
+ m_projectMenu->insertItem(SmallIcon("reload"), i18n("Re&scan Project Folder..."), this, TQT_SLOT(slotRescan()));
+ m_projectMenu->insertItem(SmallIcon("configure"), i18n("Project &Properties"), this, TQT_SLOT(slotOptions()));
+ m_projectMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_projectMenu->insertSeparator();
m_projectMenu->insertItem(i18n("Upload &Status"), m_uploadStatusMenu);
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
restoreLayout(kapp->config(), className());
// the restored size of the first column might be too large for the current content
@@ -187,7 +187,7 @@ ProjectTreeView::~ProjectTreeView(){
KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
{
- QString m_projectNameStr = m_projectName+" ";
+ TQString m_projectNameStr = m_projectName+" ";
if (m_projectName)
{
if (url.protocol() == "file")
@@ -208,8 +208,8 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
setRootIsDecorated(false);
}
- connect(m_projectDir, SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ connect(m_projectDir, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
addBranch(m_projectDir);
m_projectDir->urlList = m_projectFiles; // set list for filter
if (m_projectName)
@@ -222,7 +222,7 @@ KFileTreeBranch* ProjectTreeView::newBranch(const KURL& url)
/** slot for context menu */
-void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const QPoint& point)
+void ProjectTreeView::slotMenu(KListView *listView, TQListViewItem *item, const TQPoint& point)
{
Q_UNUSED(listView);
KURL url = currentURL();
@@ -230,7 +230,7 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
CVSService::ref()->setRepository(m_projectBaseURL.path());
if (url.isLocalFile())
{
- QString path = url.path();
+ TQString path = url.path();
if (path == m_projectBaseURL.path())
path += "/.";
CVSService::ref()->setCurrentFile(path);
@@ -278,12 +278,12 @@ void ProjectTreeView::slotMenu(KListView *listView, QListViewItem *item, const Q
/** Sets the project template directory */
-void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &baseURL, const KURL &templateURL)
+void ProjectTreeView::slotNewProjectLoaded(const TQString &name, const KURL &baseURL, const KURL &templateURL)
{
BaseTreeView::slotNewProjectLoaded(name, baseURL, templateURL); // set m_projectName and m_projectBaseURL
if (!m_projectName.isNull())
{
- QString projectNameStr = m_projectName+" ";
+ TQString projectNameStr = m_projectName+" ";
if (m_projectBaseURL.protocol() == "file")
{
projectNameStr += i18n("[local disk]");
@@ -305,7 +305,7 @@ void ProjectTreeView::slotNewProjectLoaded(const QString &name, const KURL &base
m_documentFolderList.append(m_projectBaseURL);
}
-void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen)
{
m_projectFiles = fileList;
m_documentFolderList.clear();
@@ -341,7 +341,7 @@ void ProjectTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree,
KFileTreeViewItem *item;
KFileTreeViewItem *rootItem = m_projectDir->root();
KURL url;
- QListViewItemIterator iter(this);
+ TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
item = dynamic_cast <KFileTreeViewItem*> (iter.current());
@@ -372,7 +372,7 @@ void ProjectTreeView::slotLoadToolbar()
void ProjectTreeView::slotCreateFolder()
{
bool ok;
- QString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
+ TQString folderName = KInputDialog::getText(i18n("Create New Folder"), i18n("Folder name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -390,7 +390,7 @@ void ProjectTreeView::slotCreateFolder()
void ProjectTreeView::slotCreateFile()
{
bool ok;
- QString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
+ TQString fileName = KInputDialog::getText(i18n("Create New File"), i18n("File name:"), "", &ok, this);
if (ok)
{
KURL url = currentURL();
@@ -418,11 +418,11 @@ void ProjectTreeView::slotCreateFile()
void ProjectTreeView::slotRemoveFromProject(int askForRemove)
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
KURL url = currentURL();
- QString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
+ TQString nice = QExtFileInfo::toRelative(url, m_projectBaseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( !askForRemove ||
KMessageBox::warningContinueCancel(this,i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") == KMessageBox::Continue )
@@ -477,7 +477,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
{
BaseTreeView::slotPopulateFinished(item);
// populate descriptions
- QString desc;
+ TQString desc;
KFileTreeViewItem* file_item;
ProjectList::Iterator it( *m_projectFiles );
for ( ; it.current(); ++it)
@@ -506,7 +506,7 @@ void ProjectTreeView::slotPopulateFinished(KFileTreeViewItem* item)
}
-void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const QString& newDesc)
+void ProjectTreeView::itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc)
{
if (item) {
item->setText(1, newDesc);
@@ -622,7 +622,7 @@ bool ProjectTreeView::isDocumentFolder(const KURL &url)
}
-void ProjectTreeView::slotRenameItem(QListViewItem* kftvi, const QString& newText, int col)
+void ProjectTreeView::slotRenameItem(TQListViewItem* kftvi, const TQString& newText, int col)
{
if (!kftvi)
return;
diff --git a/quanta/treeviews/projecttreeview.h b/quanta/treeviews/projecttreeview.h
index 3bd7548d..e0235d30 100644
--- a/quanta/treeviews/projecttreeview.h
+++ b/quanta/treeviews/projecttreeview.h
@@ -31,14 +31,14 @@ class ProjectTreeViewItem : public BaseTreeViewItem {
public:
ProjectTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
/** makes document root italics */
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
};
class ProjectTreeBranch : public BaseTreeBranch {
public:
ProjectTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** check for CVS and visible*/
@@ -61,7 +61,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static ProjectTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static ProjectTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static ProjectTreeView *m_ref;
if (!m_ref) m_ref = new ProjectTreeView(parent, name);
@@ -76,14 +76,14 @@ public:
public slots: // Public slots
void slotOpen();
void slotLoadToolbar();
- void slotReloadTree(ProjectList *a_fileList, bool buildNewtree, const QStringList &folderToOpen);
+ void slotReloadTree(ProjectList *a_fileList, bool buildNewtree, const TQStringList &folderToOpen);
/** Sets new project information */
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
void slotPopulateFinished(KFileTreeViewItem* );
/** makes the url visible in the tree */
void slotViewActivated(const KURL&);
/** fills the list with the url's of the open folder */
- void slotGetTreeStatus(QStringList *folderToOpen)
+ void slotGetTreeStatus(TQStringList *folderToOpen)
{
m_projectDir->addOpenFolder(folderToOpen);
}
@@ -91,8 +91,8 @@ public slots: // Public slots
protected slots:
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
- void slotRenameItem(QListViewItem* kvtvi, const QString & newText, int col);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
+ void slotRenameItem(TQListViewItem* kvtvi, const TQString & newText, int col);
virtual void slotCreateFolder();
virtual void slotCreateFile();
@@ -103,10 +103,10 @@ signals: // Signals
/** No descriptions */
void showProjectOptions();
void insertToProject(const KURL&);
- void uploadSingleURL(const KURL&, const QString&, bool, bool);
+ void uploadSingleURL(const KURL&, const TQString&, bool, bool);
void loadToolbarFile(const KURL&);
void uploadProject();
- void changeFileDescription(const KURL& url, const QString& desc);
+ void changeFileDescription(const KURL& url, const TQString& desc);
void changeUploadStatus(const KURL& url, int status);
void changeDocumentFolderStatus(const KURL& url, bool status);
void reloadProject();
@@ -116,7 +116,7 @@ private:
* If you need the class use ProjectTreeView::ref() for
* construction and reference
*/
- ProjectTreeView(QWidget *parent, const char *name);
+ ProjectTreeView(TQWidget *parent, const char *name);
ProjectTreeBranch *m_projectDir;
KPopupMenu *m_fileMenu;
@@ -147,7 +147,7 @@ protected:
@param item the treeview item
@param newDesc the new description of item
*/
- void itemDescChanged(KFileTreeViewItem* item, const QString& newDesc);
+ void itemDescChanged(KFileTreeViewItem* item, const TQString& newDesc);
/**
adds the Quanta fileinfopage to the properties dialog
overwritten to enable the file description
diff --git a/quanta/treeviews/scripttreeview.cpp b/quanta/treeviews/scripttreeview.cpp
index 191be51c..896ed243 100644
--- a/quanta/treeviews/scripttreeview.cpp
+++ b/quanta/treeviews/scripttreeview.cpp
@@ -28,15 +28,15 @@
#include <kdebug.h>
//qt includes
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtextedit.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtextedit.h>
//other includes
#include <libxml/xmlmemory.h>
@@ -59,7 +59,7 @@
extern int xmlLoadExtDtdDefaultValue;
-ScriptTreeView::ScriptTreeView(QWidget *parent, const char *name )
+ScriptTreeView::ScriptTreeView(TQWidget *parent, const char *name )
: BaseTreeView(parent,name)
{
setSaveOpenFolder(true);
@@ -80,28 +80,28 @@ ScriptTreeView::ScriptTreeView(QWidget *parent, const char *name )
addBranch(m_localDir);
// here you define which files should not be visible for the users
- const QString excludeString = ".*\\.info$|.*\\.css$|.*\\.xsl$";
+ const TQString excludeString = ".*\\.info$|.*\\.css$|.*\\.xsl$";
m_globalDir->excludeFilterRx.setPattern(excludeString);
m_localDir->excludeFilterRx.setPattern(excludeString);
m_fileMenu = new KPopupMenu(this);
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Description"), this, SLOT(slotProperties()));
- m_fileMenu->insertItem(SmallIcon("run"), i18n("&Run Script"), this, SLOT(slotRun()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Description"), this, TQT_SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("run"), i18n("&Run Script"), this, TQT_SLOT(slotRun()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(i18n("&Edit Script"), this, SLOT(slotEditScript()));
- m_fileMenu->insertItem(i18n("Edit in &Quanta"), this, SLOT(slotEditInQuanta()));
- m_fileMenu->insertItem(i18n("Edi&t Description"), this, SLOT(slotEditDescription()));
+ m_fileMenu->insertItem(i18n("&Edit Script"), this, TQT_SLOT(slotEditScript()));
+ m_fileMenu->insertItem(i18n("Edit in &Quanta"), this, TQT_SLOT(slotEditInQuanta()));
+ m_fileMenu->insertItem(i18n("Edi&t Description"), this, TQT_SLOT(slotEditDescription()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(UserIcon("ball"), i18n("&Assign Action"), this, SLOT(slotAssignAction()));
- m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("&Send in Email..."), this, SLOT(slotSendScriptInMail()));
- m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Script..."), this, SLOT(slotUploadScript()));
+ m_fileMenu->insertItem(UserIcon("ball"), i18n("&Assign Action"), this, TQT_SLOT(slotAssignAction()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("&Send in Email..."), this, TQT_SLOT(slotSendScriptInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Script..."), this, TQT_SLOT(slotUploadScript()));
m_folderMenu = new KPopupMenu(this);
- m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Script..."), this, SIGNAL(downloadScript()));
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Script..."), this, TQT_SIGNAL(downloadScript()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
restoreLayout( kapp->config(), className() );
// the restored size of the first column might be too large for the current content
@@ -113,7 +113,7 @@ ScriptTreeView::~ScriptTreeView()
{
}
-void ScriptTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+void ScriptTreeView::slotMenu(KListView *, TQListViewItem *item, const TQPoint &point)
{
if (!item)
{
@@ -140,7 +140,7 @@ void ScriptTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &po
}
}
-void ScriptTreeView::slotSelectFile(QListViewItem *item)
+void ScriptTreeView::slotSelectFile(TQListViewItem *item)
{
if (item) {
if ( !currentKFileTreeViewItem()->isDir() )
@@ -168,7 +168,7 @@ void ScriptTreeView::slotEditScript()
emit showPreviewWidget(false);
KURL urlToOpen = currentURL();
KURL infoUrl = infoFile(urlToOpen);
- QString editApp = infoOptionValue(infoUrl, "editor");
+ TQString editApp = infoOptionValue(infoUrl, "editor");
if (editApp.isEmpty())
emit openFile(urlToOpen);
else
@@ -187,7 +187,7 @@ void ScriptTreeView::slotRun()
{
KURL urlToOpen = currentURL();
KURL infoUrl = infoFile(urlToOpen);
- QString execApp = infoOptionValue(infoUrl, "interpreter");
+ TQString execApp = infoOptionValue(infoUrl, "interpreter");
if (execApp.isEmpty())
{
KURL::List list;
@@ -197,7 +197,7 @@ void ScriptTreeView::slotRun()
else
{
KProcess *proc = new KProcess();
- QStringList argsList = QStringList::split(' ', execApp);
+ TQStringList argsList = TQStringList::split(' ', execApp);
*proc << argsList;
*proc << urlToOpen.path();
proc->start(KProcess::DontCare);
@@ -222,7 +222,7 @@ void ScriptTreeView::slotAssignAction()
{
KURL url = currentURL();
KURL infoURL = infoFile(url);
- QString execApp = infoOptionValue(infoURL, "interpreter");
+ TQString execApp = infoOptionValue(infoURL, "interpreter");
if (execApp.isEmpty())
execApp = "sh";
url.setPath(url.path().replace(locateLocal("data", resourceDir + "scripts/"), "%scriptdir/"));
@@ -231,7 +231,7 @@ void ScriptTreeView::slotAssignAction()
}
}
-QString ScriptTreeView::createScriptTarball()
+TQString ScriptTreeView::createScriptTarball()
{
KURL url = currentURL();
KURL infoURL = infoFile(url);
@@ -239,7 +239,7 @@ QString ScriptTreeView::createScriptTarball()
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+ TQString tempFileName=tempDir->name() + url.fileName() + ".tgz";
//pack the .tag files and the description.rc into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
@@ -251,9 +251,9 @@ QString ScriptTreeView::createScriptTarball()
files.append(KURL().fromPathOrURL(qConfig.globalDataDir + resourceDir + "scripts/info.xsl"));
for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
- QFile file((*it_f).path());
+ TQFile file((*it_f).path());
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile((*it_f).fileName(), "user", "group", bArray.size(), bArray.data());
file.close();
}
@@ -267,19 +267,19 @@ void ScriptTreeView::slotSendScriptInMail()
if ( !currentKFileTreeViewItem()->isDir() )
{
- QStringList attachmentFile;
+ TQStringList attachmentFile;
attachmentFile += createScriptTarball();
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send script in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] script tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -294,7 +294,7 @@ void ScriptTreeView::slotSendScriptInMail()
delete mailDlg;
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile);
}
delete mailDlg;
@@ -305,7 +305,7 @@ void ScriptTreeView::slotUploadScript()
{
if ( !currentKFileTreeViewItem()->isDir() )
{
- QString fileName = createScriptTarball();
+ TQString fileName = createScriptTarball();
emit uploadScript(fileName);
}
}
@@ -313,17 +313,17 @@ void ScriptTreeView::slotUploadScript()
KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
{
KURL returnUrl = url;
- QString fileName = returnUrl.fileName();
- //fileName.truncate(fileName.length() - QFileInfo(fileName).extension().length() - 1);
+ TQString fileName = returnUrl.fileName();
+ //fileName.truncate(fileName.length() - TQFileInfo(fileName).extension().length() - 1);
fileName.append(".info");
returnUrl.setFileName(fileName);
- if (!QFileInfo(returnUrl.path()).exists())
+ if (!TQFileInfo(returnUrl.path()).exists())
{
- QFile f(returnUrl.path());
+ TQFile f(returnUrl.path());
if (f.open(IO_WriteOnly))
{
- QTextStream str(&f);
- str.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream str(&f);
+ str.setEncoding(TQTextStream::UnicodeUTF8);
str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
str << "<!DOCTYPE QuantaScriptInfo>" << endl;
@@ -344,13 +344,13 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
if (htmlVersion)
{
KTempFile *tempInfoFile = 0L;
- if (!QFileInfo(returnUrl.path()).exists())
+ if (!TQFileInfo(returnUrl.path()).exists())
{
tempInfoFile = new KTempFile(tmpDir);
tempInfoFile->setAutoDelete(true);
returnUrl = KURL::fromPathOrURL(tempInfoFile->name());
- QTextStream str(tempInfoFile->file());
- str.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream str(tempInfoFile->file());
+ str.setEncoding(TQTextStream::UnicodeUTF8);
str << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
str << "<?xml-stylesheet type=\"text/xsl\" href=\"info.xsl\" ?>" << endl;
str << "<!DOCTYPE QuantaScriptInfo>" << endl;
@@ -374,7 +374,7 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
xmlDocPtr doc, res;
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
- QString xslFile = qConfig.globalDataDir + resourceDir + "scripts/info.xsl";
+ TQString xslFile = qConfig.globalDataDir + resourceDir + "scripts/info.xsl";
cur = xsltParseStylesheetFile(xmlCharStrndup(xslFile.utf8(), xslFile.utf8().length()));
doc = xmlParseFile(returnUrl.path().utf8());
res = xsltApplyStylesheet(cur, doc, 0);
@@ -394,19 +394,19 @@ KURL ScriptTreeView::infoFile(const KURL& url, bool htmlVersion)
return returnUrl;
}
-QString ScriptTreeView::infoOptionValue(const KURL& infoURL, const QString& optionName)
+TQString ScriptTreeView::infoOptionValue(const KURL& infoURL, const TQString& optionName)
{
- QString value;
- QFile f(infoURL.path());
+ TQString value;
+ TQFile f(infoURL.path());
if (f.open(IO_ReadOnly))
{
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(&f);
f.close();
- QDomNodeList nodes = doc.elementsByTagName("options");
+ TQDomNodeList nodes = doc.elementsByTagName("options");
if (nodes.count() > 0)
{
- QDomElement el = nodes.item(0).toElement();
+ TQDomElement el = nodes.item(0).toElement();
value = el.attribute(optionName);
}
}
diff --git a/quanta/treeviews/scripttreeview.h b/quanta/treeviews/scripttreeview.h
index 7cf2b145..1bfa934d 100644
--- a/quanta/treeviews/scripttreeview.h
+++ b/quanta/treeviews/scripttreeview.h
@@ -44,7 +44,7 @@ class ScriptTreeView : public BaseTreeView {
public:
- ScriptTreeView(QWidget *parent, const char *name = 0L);
+ ScriptTreeView(TQWidget *parent, const char *name = 0L);
~ScriptTreeView();
protected slots:
@@ -55,12 +55,12 @@ protected slots:
*
* @param listView KListView where the event comes from
*
- * @param item QListViewItem where the mousepointer is hovering
+ * @param item TQListViewItem where the mousepointer is hovering
*
- * @param point QPoint coordinates of the event
+ * @param point TQPoint coordinates of the event
*
*/
- virtual void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ virtual void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/**
* slot of QListView
@@ -69,7 +69,7 @@ protected slots:
*
* @param item the selected QListViewItem
*/
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
/**
* slot for the RBM
@@ -157,7 +157,7 @@ signals:
/**
* emited from @ref slotAssignAction to open the assignment dialog
*/
- void assignActionToScript(const KURL&, const QString&);
+ void assignActionToScript(const KURL&, const TQString&);
/**
* emited to make the script describtion visible
@@ -172,7 +172,7 @@ signals:
/**
* request to upload the @ref fileName script tarball
*/
- void uploadScript(const QString& fileName);
+ void uploadScript(const TQString& fileName);
private:
/**
@@ -201,12 +201,12 @@ private:
*
* @return the value of the option
*/
- QString infoOptionValue(const KURL& infoURL, const QString& optionName);
+ TQString infoOptionValue(const KURL& infoURL, const TQString& optionName);
/** Create a script tarball which can be uploaded or sent in email. Returns
- * the name of the created file or QString::null if creation has failed.
+ * the name of the created file or TQString::null if creation has failed.
*/
- QString createScriptTarball();
+ TQString createScriptTarball();
/**
* remember the menu for manipulation
diff --git a/quanta/treeviews/servertreeview.cpp b/quanta/treeviews/servertreeview.cpp
index 024e31d5..16d42b45 100644
--- a/quanta/treeviews/servertreeview.cpp
+++ b/quanta/treeviews/servertreeview.cpp
@@ -16,7 +16,7 @@
***************************************************************************/
// Qt includes
-#include <qpainter.h>
+#include <tqpainter.h>
// KDE includes
#include <kdebug.h>
@@ -41,30 +41,30 @@ ServerTreeViewItem::ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* it
{
}
-void ServerTreeViewItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ServerTreeViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
KURL baseURL = Project::ref()->projectBaseURL();
KURL relURL = baseURL;
relURL.setPath(QExtFileInfo::toRelative(url(), branch()->url()).path());
KURL url = QExtFileInfo::toAbsolute(relURL, baseURL);
if ( !Project::ref()->contains(url) )
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setItalic(true);
p->setFont(f);
int h, s, v;
p->pen().color().getHsv(&h, &s, &v);
v = (v < 155 ? v + 100 : 255);
- _cg.setColor(QColorGroup::Text, QColor(h, s, v, QColor::Hsv));
+ _cg.setColor(TQColorGroup::Text, TQColor(h, s, v, TQColor::Hsv));
};
BaseTreeViewItem::paintCell( p, _cg, column, width, align );
}
//ServerTreeBranch implementation
ServerTreeBranch::ServerTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden, KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
{
@@ -87,7 +87,7 @@ KFileTreeViewItem* ServerTreeBranch::createTreeViewItem(KFileTreeViewItem *paren
// ServerTreeView implementation
//
//
-ServerTreeView::ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name)
+ServerTreeView::ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name)
: BaseTreeView(parent, name)
{
setAcceptDrops(true);
@@ -100,37 +100,37 @@ ServerTreeView::ServerTreeView(KConfig *config, QWidget *parent, const KURL &url
m_fileMenu = new KPopupMenu();
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(i18n("Open &With..."), this, SLOT(slotOpenWith()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(i18n("Open &With..."), this, TQT_SLOT(slotOpenWith()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
-// m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
- m_fileMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+// m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
+ m_fileMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_folderMenu = new KPopupMenu();
-// m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
- m_renameId = m_folderMenu->insertItem(i18n("Re&name"), this, SLOT(slotStartRename()));
+// m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_menuDel = m_folderMenu->insertItem( SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
+ m_renameId = m_folderMenu->insertItem(i18n("Re&name"), this, TQT_SLOT(slotStartRename()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
addColumn(i18n("Upload Tree"), -1);
addColumn("");
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(Project::ref(), SIGNAL(reloadTree(ProjectList *, bool, const QStringList &)),
- this, SLOT(slotReloadTree(ProjectList *, bool, const QStringList &)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
+ connect(Project::ref(), TQT_SIGNAL(reloadTree(ProjectList *, bool, const TQStringList &)),
+ this, TQT_SLOT(slotReloadTree(ProjectList *, bool, const TQStringList &)));
restoreLayout(m_config, "UploadTreeView"); // a fixed name only for the tooltip configuration
// the restored size of the first column might be too large for the current content
@@ -156,7 +156,7 @@ KFileTreeBranch* ServerTreeView::newBranch(const KURL& url)
/** RMB pressed, bring up the menu */
-void ServerTreeView::slotMenu(KListView* listView, QListViewItem *item, const QPoint &point)
+void ServerTreeView::slotMenu(KListView* listView, TQListViewItem *item, const TQPoint &point)
{
Q_UNUSED(listView);
if (item)
@@ -179,13 +179,13 @@ void ServerTreeView::slotMenu(KListView* listView, QListViewItem *item, const QP
}
-void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen)
+void ServerTreeView::slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen)
{
Q_UNUSED(fileList);
Q_UNUSED(buildNewTree);
Q_UNUSED(folderToOpen);
- QListViewItemIterator iter(this);
+ TQListViewItemIterator iter(this);
for ( ; iter.current(); ++iter )
{
iter.current()->repaint();
diff --git a/quanta/treeviews/servertreeview.h b/quanta/treeviews/servertreeview.h
index c49b5a60..d0c9c3db 100644
--- a/quanta/treeviews/servertreeview.h
+++ b/quanta/treeviews/servertreeview.h
@@ -37,7 +37,7 @@ class ServerTreeViewItem : public BaseTreeViewItem {
public:
ServerTreeViewItem( KFileTreeViewItem *parent, KFileItem* item, KFileTreeBranch *brnch );
/** makes document not in project lighter */
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
};
/**
@@ -48,7 +48,7 @@ class ServerTreeBranch : public BaseTreeBranch {
public:
ServerTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** check for CVS and visible*/
@@ -61,15 +61,15 @@ class ServerTreeView : public BaseTreeView {
Q_OBJECT
public:
- ServerTreeView(KConfig *config, QWidget *parent, const KURL &url, const char *name = 0L);
+ ServerTreeView(KConfig *config, TQWidget *parent, const KURL &url, const char *name = 0L);
virtual ~ServerTreeView();
protected slots:
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/** repaints the treeview items, because they might be added to or removed from the project*/
- void slotReloadTree( ProjectList *fileList, bool buildNewTree, const QStringList &folderToOpen);
+ void slotReloadTree( ProjectList *fileList, bool buildNewTree, const TQStringList &folderToOpen);
protected:
KFileTreeBranch* newBranch(const KURL& url);
diff --git a/quanta/treeviews/structtreetag.cpp b/quanta/treeviews/structtreetag.cpp
index 2742bcea..596143d7 100644
--- a/quanta/treeviews/structtreetag.cpp
+++ b/quanta/treeviews/structtreetag.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
//qt include
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes
#include <kiconloader.h>
@@ -31,7 +31,7 @@
#include "document.h"
#include "resource.h"
-StructTreeTag::StructTreeTag(QListView *parent, QString a_title)
+StructTreeTag::StructTreeTag(TQListView *parent, TQString a_title)
: KListViewItem(parent, a_title)
{
node = 0L;
@@ -40,20 +40,20 @@ StructTreeTag::StructTreeTag(QListView *parent, QString a_title)
parentTree = static_cast<StructTreeView*>(parent);
}
-StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title,
- QListViewItem *after )
+StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString a_title,
+ TQListViewItem *after )
: KListViewItem(parent, after, a_title)
{
parentTree = parent->parentTree;
hasOpenFileMenu = false;
groupTag = 0L;
- static const QString space = " ";
- static const QRegExp nbspRx("&nbsp;|\\n");
+ static const TQString space = " ";
+ static const TQRegExp nbspRx("&nbsp;|\\n");
node = a_node;
if (node)
{
Tag *tag = node->tag;
- QString title = tag->name.lower();
+ TQString title = tag->name.lower();
if (a_title.isEmpty())
{
switch (tag->type)
@@ -108,17 +108,17 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
QTag *parentQTag = 0L;
if (node->parent)
parentQTag = QuantaCommon::tagFromDTD(node->parent);
- QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ TQString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
int line, col;
node->tag->beginPos(line, col);
if (parentQTag && !parentQTag->childTags.contains(qTagName) &&
!parentQTag->childTags.isEmpty())
{
node->tag->write()->setErrorMark(line);
- QString parentTagName = node->tag->dtd()->caseSensitive ? node->parent->tag->name : node->parent->tag->name.upper();
+ TQString parentTagName = node->tag->dtd()->caseSensitive ? node->parent->tag->name : node->parent->tag->name.upper();
parentTree->showMessage(i18n("Line %1: %2 is not a possible child of %3.\n").arg(line + 1).arg(qTagName).arg(parentTagName));
}
- QString nextTagName;
+ TQString nextTagName;
if (node->next)
{
nextTagName = node->tag->dtd()->caseSensitive ? node->next->tag->name : node->next->tag->name.upper();
@@ -175,8 +175,8 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
{
int line, col;
node->tag->beginPos(line, col);
- QString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
- QString qPrevTagName;
+ TQString qTagName = node->tag->dtd()->caseSensitive ? node->tag->name : node->tag->name.upper();
+ TQString qPrevTagName;
if (node->prev)
qPrevTagName = node->tag->dtd()->caseSensitive ? node->prev->tag->name : node->prev->tag->name.upper();
if (!node->prev || qTagName != "/" + qPrevTagName)
@@ -201,7 +201,7 @@ StructTreeTag::StructTreeTag(StructTreeTag *parent, Node *a_node, const QString
}
}
-StructTreeTag::StructTreeTag(StructTreeTag *parent, QString a_title )
+StructTreeTag::StructTreeTag(StructTreeTag *parent, TQString a_title )
: KListViewItem(parent, a_title)
{
node = 0L;
diff --git a/quanta/treeviews/structtreetag.h b/quanta/treeviews/structtreetag.h
index 0b365b0c..c49f07e8 100644
--- a/quanta/treeviews/structtreetag.h
+++ b/quanta/treeviews/structtreetag.h
@@ -30,15 +30,15 @@ class StructTreeView;
class StructTreeTag : public KListViewItem {
public:
- StructTreeTag(QListView *parent, const QString a_title = QString::null );
- StructTreeTag(StructTreeTag *parent, Node *a_node, const QString a_title = QString::null, QListViewItem *after = 0L);
- StructTreeTag(StructTreeTag *parent, const QString a_title = QString::null );
+ StructTreeTag(TQListView *parent, const TQString a_title = TQString::null );
+ StructTreeTag(StructTreeTag *parent, Node *a_node, const TQString a_title = TQString::null, TQListViewItem *after = 0L);
+ StructTreeTag(StructTreeTag *parent, const TQString a_title = TQString::null );
~StructTreeTag();
Node *node;
bool hasOpenFileMenu;
Tag* groupTag;
- QRegExp fileNameRx;
+ TQRegExp fileNameRx;
StructTreeView *parentTree;
};
diff --git a/quanta/treeviews/structtreeview.cpp b/quanta/treeviews/structtreeview.cpp
index f6f55b40..1f22e594 100644
--- a/quanta/treeviews/structtreeview.cpp
+++ b/quanta/treeviews/structtreeview.cpp
@@ -19,12 +19,12 @@
#include <assert.h>
// QT headers
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qdragobject.h>
-#include <qcursor.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqdragobject.h>
+#include <tqcursor.h>
// KDE headers
#include <kapplication.h>
@@ -57,7 +57,7 @@
#include "structtreeview.moc"
extern GroupElementMapList globalGroupMap;
-StructTreeView::StructTreeView(QWidget *parent, const char *name )
+StructTreeView::StructTreeView(TQWidget *parent, const char *name )
: KListView(parent,name), m_marker(0), m_draggedItem(0)/*, m_thisWidget(0)*/
{
for (int i = 0; i < 15; i++)
@@ -83,7 +83,7 @@ StructTreeView::StructTreeView(QWidget *parent, const char *name )
setLineWidth( 2 );
addColumn( i18n("Name"), -1 );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
dtdMenu = new KPopupMenu(this);
@@ -95,46 +95,46 @@ StructTreeView::StructTreeView(QWidget *parent, const char *name )
dtdMenu->insertItem(dtdList[i], i, -1);
}
- connect(dtdMenu, SIGNAL(activated(int)), this, SLOT(slotDTDChanged(int)));
+ connect(dtdMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotDTDChanged(int)));
- connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*, QListViewItem*)),
- SLOT(slotDropped(QDropEvent*, QListViewItem*, QListViewItem*)));
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)),
+ TQT_SLOT(slotDropped(TQDropEvent*, TQListViewItem*, TQListViewItem*)));
emptyAreaMenu = new KPopupMenu(this);
emptyAreaMenu->insertItem(i18n("Show Groups For"), dtdMenu);
- emptyAreaMenu->insertItem(SmallIcon("reload"), i18n("&Reparse"), this, SLOT(slotReparseMenuItem()));
+ emptyAreaMenu->insertItem(SmallIcon("reload"), i18n("&Reparse"), this, TQT_SLOT(slotReparseMenuItem()));
popupMenu = new KPopupMenu(this);
popupMenu -> insertItem( i18n("Show Groups For"), dtdMenu);
popupMenu -> insertSeparator();
- popupMenu -> insertItem( i18n("Select Tag Area"), this ,SLOT(slotSelectTag()));
- popupMenu -> insertItem( i18n("Go to End of Tag"), this ,SLOT(slotGotoClosingTag()));
- openFileMenuId = popupMenu -> insertItem( i18n("Open File"), this ,SLOT(slotOpenFile()));
+ popupMenu -> insertItem( i18n("Select Tag Area"), this ,TQT_SLOT(slotSelectTag()));
+ popupMenu -> insertItem( i18n("Go to End of Tag"), this ,TQT_SLOT(slotGotoClosingTag()));
+ openFileMenuId = popupMenu -> insertItem( i18n("Open File"), this ,TQT_SLOT(slotOpenFile()));
popupMenu -> insertSeparator();
- popupMenu -> insertItem( i18n("Open Subtrees"), this ,SLOT(slotOpenSubTree()));
- popupMenu -> insertItem( i18n("Close Subtrees"),this ,SLOT(slotCloseSubTree()));
+ popupMenu -> insertItem( i18n("Open Subtrees"), this ,TQT_SLOT(slotOpenSubTree()));
+ popupMenu -> insertItem( i18n("Close Subtrees"),this ,TQT_SLOT(slotCloseSubTree()));
popupMenu -> insertSeparator();
#if 0
- popupMenu -> insertItem( i18n("Remove"),this ,SLOT(slotRemoveTags()));
+ popupMenu -> insertItem( i18n("Remove"),this ,TQT_SLOT(slotRemoveTags()));
popupMenu -> insertSeparator();
#endif
- popupMenu -> insertItem( SmallIcon("reload"), i18n("&Reparse"), this ,SLOT(slotReparseMenuItem()));
- followCursorId = popupMenu -> insertItem( i18n("Follow Cursor"), this ,SLOT(changeFollowCursor()));
+ popupMenu -> insertItem( SmallIcon("reload"), i18n("&Reparse"), this ,TQT_SLOT(slotReparseMenuItem()));
+ followCursorId = popupMenu -> insertItem( i18n("Follow Cursor"), this ,TQT_SLOT(changeFollowCursor()));
popupMenu -> setItemChecked ( followCursorId, followCursor() );
- connect( this, SIGNAL(mouseButtonPressed(int, QListViewItem*, const QPoint&, int)),
- this, SLOT (slotMouseClicked(int, QListViewItem*, const QPoint&, int)));
+ connect( this, TQT_SIGNAL(mouseButtonPressed(int, TQListViewItem*, const TQPoint&, int)),
+ this, TQT_SLOT (slotMouseClicked(int, TQListViewItem*, const TQPoint&, int)));
- connect( this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+ connect( this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotDoubleClicked(TQListViewItem *)));
- connect(this, SIGNAL(expanded(QListViewItem *)), SLOT(slotExpanded(QListViewItem *)));
- connect(this, SIGNAL(collapsed(QListViewItem *)), SLOT(slotCollapsed(QListViewItem *)));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem *)), TQT_SLOT(slotExpanded(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem *)), TQT_SLOT(slotCollapsed(TQListViewItem *)));
write = 0L;
- timer = new QTime();
+ timer = new TQTime();
timer->start();
m_dirty = true;
}
@@ -161,9 +161,9 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
StructTreeTag *item = 0L;
StructTreeTag *parentItem = top; //under this
int level = 0;
- QString title;
- QString tagStr;
- QString tmpStr;
+ TQString title;
+ TQString tagStr;
+ TQString tmpStr;
int groupId = 0;
const DTDStruct* parsingDTD;
for (uint index = 0; index < m_parsingDTDList.count(); index++)
@@ -191,7 +191,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it;
+ TQMap<TQString, XMLStructGroup>::ConstIterator it;
for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
{
XMLStructGroup group = it.data();
@@ -212,8 +212,8 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
}
groupsCount = groupId;
- QMap<QString, QListViewItem*> lastItemInGroup;
- QMap<QString, QListViewItem*> groupItems;
+ TQMap<TQString, TQListViewItem*> lastItemInGroup;
+ TQMap<TQString, TQListViewItem*> groupItems;
while (currentNode)
{
if (!groupOnly)
@@ -233,14 +233,14 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
const DTDStruct *dtd = currentNode->tag->dtd();
//add all the group elements belonging to this node to the tree
- for (QValueList<GroupElement*>::ConstIterator it = currentNode->m_groupElements.constBegin(); it != currentNode->m_groupElements.constEnd(); ++it)
+ for (TQValueList<GroupElement*>::ConstIterator it = currentNode->m_groupElements.constBegin(); it != currentNode->m_groupElements.constEnd(); ++it)
{
GroupElement *groupElement = (*it);
if (!groupIds.contains(groupElement->group->name + dtd->name))
continue;
StructTreeTag *groupItem = groups[groupIds[groupElement->group->name + dtd->name]];
- QListViewItem* insertAfter = 0L;
- QListViewItem* insertUnder = groupItem;
+ TQListViewItem* insertAfter = 0L;
+ TQListViewItem* insertUnder = groupItem;
if (groupItems.contains(groupElement->group->name + groupElement->tag->name))
insertUnder = groupItems[groupElement->group->name + groupElement->tag->name];
if (lastItemInGroup.contains(groupElement->group->name))
@@ -312,9 +312,9 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
}
}
//add the externally found items to the tree
- QListViewItem *insertUnder;
- QListViewItem *insertAfter;
- QListViewItem *listItem;
+ TQListViewItem *insertUnder;
+ TQListViewItem *insertAfter;
+ TQListViewItem *listItem;
GroupElementMapList::Iterator it;
IncludedGroupElementsMap::Iterator externalIt;
for (uint index = 0; index < m_parsingDTDList.count(); index++)
@@ -328,7 +328,7 @@ void StructTreeView::buildTree(Node *baseNode, int openLevel, bool groupOnly)
{
group = parsingDTD->structTreeGroups[i];
groupId = groupIds[group.name + parsingDTD->name];
- QString name = group.name+"|";
+ TQString name = group.name+"|";
StructTreeTag *groupTag = groups[groupId];
for (externalIt = parser->includedMap.begin(); externalIt != parser->includedMap.end(); ++externalIt)
{
@@ -419,7 +419,7 @@ void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool gr
}
} else
{
- QMap<QString, XMLStructGroup>::ConstIterator it;
+ TQMap<TQString, XMLStructGroup>::ConstIterator it;
uint i = 0;
for (it = parsingDTD->xmlStructTreeGroups.begin(); it != parsingDTD->xmlStructTreeGroups.end(); ++it)
{
@@ -444,7 +444,7 @@ void StructTreeView::slotReparse(Document *w, Node* node, int openLevel, bool gr
m_dirty = false;
}
-void StructTreeView::slotGotoTag( QListViewItem *item )
+void StructTreeView::slotGotoTag( TQListViewItem *item )
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node && it->node->tag)
@@ -477,15 +477,15 @@ void StructTreeView::slotGotoTag( QListViewItem *item )
}
-void StructTreeView::slotMouseClicked(int button, QListViewItem *item, const QPoint& point, int dummy)
+void StructTreeView::slotMouseClicked(int button, TQListViewItem *item, const TQPoint& point, int dummy)
{
if (item)
{
config->setGroup("Parser options");
- QString handleMBM = config->readEntry("MBM", i18n("Select Tag Area"));
- QString handleLBM = config->readEntry("LBM", i18n("Find tag"));
- QString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
+ TQString handleMBM = config->readEntry("MBM", i18n("Select Tag Area"));
+ TQString handleLBM = config->readEntry("LBM", i18n("Find tag"));
+ TQString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area"));
setSelected(item, true);
@@ -542,7 +542,7 @@ void StructTreeView::slotMouseClicked(int button, QListViewItem *item, const QPo
}
-void StructTreeView::slotDoubleClicked( QListViewItem *item)
+void StructTreeView::slotDoubleClicked( TQListViewItem *item)
{
config->setGroup("Parser options");
@@ -565,7 +565,7 @@ void StructTreeView::slotReparseMenuItem()
void StructTreeView::slotGotoClosingTag()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
{
@@ -594,7 +594,7 @@ void StructTreeView::slotGotoClosingTag()
void StructTreeView::slotSelectTag()
{
bool newFileOpened = false;
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
{
@@ -642,7 +642,7 @@ void StructTreeView::slotSelectTag()
/** Do the recursive opening or closing of the trees */
-void StructTreeView::setOpenSubTree( QListViewItem *it, bool open)
+void StructTreeView::setOpenSubTree( TQListViewItem *it, bool open)
{
if (it)
{
@@ -655,7 +655,7 @@ void StructTreeView::setOpenSubTree( QListViewItem *it, bool open)
/** Recursively open the tree and all its subtrees */
void StructTreeView::slotOpenSubTree()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
item->setOpen( true );
@@ -667,7 +667,7 @@ void StructTreeView::slotOpenSubTree()
/** Recursively close the tree and all its subtrees */
void StructTreeView::slotCloseSubTree()
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item)
{
item->setOpen( false );
@@ -696,7 +696,7 @@ void StructTreeView::setFollowCursor(bool follow)
}
/** No descriptions */
-void StructTreeView::slotExpanded(QListViewItem *item)
+void StructTreeView::slotExpanded(TQListViewItem *item)
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
@@ -704,20 +704,20 @@ void StructTreeView::slotExpanded(QListViewItem *item)
}
/** No descriptions */
-void StructTreeView::slotCollapsed(QListViewItem *item)
+void StructTreeView::slotCollapsed(TQListViewItem *item)
{
StructTreeTag *it = dynamic_cast<StructTreeTag*>(item);
if (!m_dirty && it && it->node)
it->node->opened = false;
}
/** Do a reparse before showing. */
-void StructTreeView::showEvent(QShowEvent* /*ev*/)
+void StructTreeView::showEvent(TQShowEvent* /*ev*/)
{
slotReparseMenuItem();
}
/** Do a reparse before showing. */
-void StructTreeView::hideEvent(QHideEvent* /*ev*/)
+void StructTreeView::hideEvent(TQHideEvent* /*ev*/)
{
emit clearProblemOutput();
}
@@ -732,15 +732,15 @@ void StructTreeView::setContiguousSelectedItems()
{
kdDebug(25001) << "setContiguousSelectedItems" << endl;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
- QListViewItem* first = selected_items.getFirst();
- QListViewItem* last = selected_items.getLast();
+ TQListViewItem* first = selected_items.getFirst();
+ TQListViewItem* last = selected_items.getLast();
- QListViewItemIterator it(first);
+ TQListViewItemIterator it(first);
while(it.current() && it.current() != last)
{
- QListViewItem* item = it.current();
+ TQListViewItem* item = it.current();
if(!item->isSelected())
item->setSelected(true);
@@ -748,13 +748,13 @@ void StructTreeView::setContiguousSelectedItems()
}
}
-bool StructTreeView::acceptDrag(QDropEvent* e) const
+bool StructTreeView::acceptDrag(TQDropEvent* e) const
{
static int i = 0;
kdDebug(25001) << "acceptDrag: " << ++i << endl;
- QPoint p = contentsToViewport(e->pos());
- QListViewItem* current_item = itemAt(p);
+ TQPoint p = contentsToViewport(e->pos());
+ TQListViewItem* current_item = itemAt(p);
// assert(m_thisWidget);
@@ -775,7 +775,7 @@ bool StructTreeView::acceptDrag(QDropEvent* e) const
m_marker = current_item;
if(current_item == m_draggedItem ||
- !(e->provides("text/x-struct_tree_tag_item") || e->source() == (QWidget *)this) || !m_marker)
+ !(e->provides("text/x-struct_tree_tag_item") || e->source() == (TQWidget *)this) || !m_marker)
{
e->accept(false);
last_accept = false;
@@ -818,14 +818,14 @@ bool StructTreeView::acceptDrag(QDropEvent* e) const
return is_child;
}
-void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after)
+void StructTreeView::slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after)
{
if(!e)
return;
if (e->source() != this)
return; // Only internal drags are supported atm
- if(!QTextDrag::canDecode(e))
+ if(!TQTextDrag::canDecode(e))
return;
KPopupMenu *menu = new KPopupMenu( this );
@@ -833,7 +833,7 @@ void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListView
menu->insertItem( SmallIcon("editcopy"), i18n("&Copy Here"), DRAG_COPY, 1 );
menu->insertSeparator();
menu->insertItem( SmallIcon("cancel"), i18n("C&ancel"), DRAG_CANCEL, 3 );
- int id = menu->exec(QCursor::pos(), 0);
+ int id = menu->exec(TQCursor::pos(), 0);
switch(id) {
case DRAG_COPY:
@@ -856,7 +856,7 @@ void StructTreeView::slotDropped(QDropEvent* e, QListViewItem* parent, QListView
void StructTreeView::startDrag()
{
// This a dummy drag object. Decode is made by the objects selected on the tree.
- QTextDrag* drag = new QTextDrag(this);
+ TQTextDrag* drag = new TQTextDrag(this);
// m_thisWidget = drag->source();
drag->setSubtype("x-struct_tree_tag_item");
drag->setPixmap(SmallIcon("node"));
@@ -864,27 +864,27 @@ void StructTreeView::startDrag()
}
-void StructTreeView::contentsMousePressEvent(QMouseEvent* e)
+void StructTreeView::contentsMousePressEvent(TQMouseEvent* e)
{
if(e->button() == LeftButton)
{
- QPoint p = contentsToViewport(e->pos());
+ TQPoint p = contentsToViewport(e->pos());
m_draggedItem = itemAt(p);
m_marker = m_draggedItem;
}
KListView::contentsMousePressEvent(e);
}
-void StructTreeView::copySelectedItems(QListViewItem* parent, QListViewItem* after)
+void StructTreeView::copySelectedItems(TQListViewItem* parent, TQListViewItem* after)
{
StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
if(!parent_item/* || !after_item*/) // can happen if the element is inserted as the first child
return;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
- QListViewItem* first_item = selected_items.getFirst();
- QListViewItem* last_item = selected_items.getLast();
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
+ TQListViewItem* first_item = selected_items.getFirst();
+ TQListViewItem* last_item = selected_items.getLast();
Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
@@ -913,16 +913,16 @@ void StructTreeView::copySelectedItems(QListViewItem* parent, QListViewItem* aft
write->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif, 0, false);
}
-void StructTreeView::moveSelectedItems(QListViewItem* parent, QListViewItem* after)
+void StructTreeView::moveSelectedItems(TQListViewItem* parent, TQListViewItem* after)
{
StructTreeTag* parent_item = dynamic_cast<StructTreeTag*> (parent);
StructTreeTag* after_item = dynamic_cast<StructTreeTag*> (after);
if(!parent_item || !after_item)
return;
- QPtrList<QListViewItem> selected_items = selectedItems(false);
- QListViewItem* first_item = selected_items.getFirst();
- QListViewItem* last_item = selected_items.getLast();
+ TQPtrList<TQListViewItem> selected_items = selectedItems(false);
+ TQListViewItem* first_item = selected_items.getFirst();
+ TQListViewItem* last_item = selected_items.getLast();
Node* start_node = (dynamic_cast<StructTreeTag*> (first_item))->node;
Node* end_node = (dynamic_cast<StructTreeTag*> (last_item))->node;
@@ -954,24 +954,24 @@ void StructTreeView::moveSelectedItems(QListViewItem* parent, QListViewItem* aft
/** The treeview DTD has changed to id. */
void StructTreeView::slotDTDChanged(int id)
{
- QString text = dtdMenu->text(id);
+ TQString text = dtdMenu->text(id);
if (dtdMenu->indexOf(id) > 0)
{
- QString dtdName = DTDs::ref()->getDTDNameFromNickName(text);
+ TQString dtdName = DTDs::ref()->getDTDNameFromNickName(text);
emit showGroupsForDTEP(dtdName, !dtdMenu->isItemChecked(id));
} else
emit showGroupsForDTEP("clear", true);
}
-void StructTreeView::setParsingDTDs(const QStringList &parsingDTDList)
+void StructTreeView::setParsingDTDs(const TQStringList &parsingDTDList)
{
m_parsingDTDList.clear();
for (uint i = 0; i < dtdList.count(); i++)
{
dtdMenu->setItemChecked(i, false);
}
- QString dtdNickName;
- for (QStringList::ConstIterator it = parsingDTDList.constBegin(); it != parsingDTDList.constEnd(); ++it)
+ TQString dtdNickName;
+ for (TQStringList::ConstIterator it = parsingDTDList.constBegin(); it != parsingDTDList.constEnd(); ++it)
{
dtdNickName = DTDs::ref()->getDTDNickNameFromName(*it);
for (uint i = 0; i < dtdList.count(); i++)
@@ -988,7 +988,7 @@ void StructTreeView::slotOpenFile()
StructTreeTag *item = dynamic_cast<StructTreeTag*>(currentItem());
if (!m_dirty && item->node)
{
- QString text = item->groupTag->name;
+ TQString text = item->groupTag->name;
text.remove(item->fileNameRx);
KURL baseUrl = QExtFileInfo::path(write->url());
KURL url = baseUrl;
@@ -1014,16 +1014,16 @@ void StructTreeView::slotNodeTreeChanged()
m_dirty = true;
}
-void StructTreeView::showMessage(const QString& message)
+void StructTreeView::showMessage(const TQString& message)
{
emit showProblemMessage(message);
}
-void StructTreeView::slotMouseClickedVPL(int /*button*/, QListViewItem* item, const QPoint&, int)
+void StructTreeView::slotMouseClickedVPL(int /*button*/, TQListViewItem* item, const TQPoint&, int)
{
ViewManager::ref()->activeView()->setFocus();
- QPtrList<QListViewItem> selected_items = selectedItems(true);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(true);
if(selected_items.count() == 1)
{
StructTreeTag* tag_item = dynamic_cast<StructTreeTag*> (item);
@@ -1049,7 +1049,7 @@ void StructTreeView::slotMouseClickedVPL(int /*button*/, QListViewItem* item, co
void StructTreeView::slotRemoveTags()
{
- QPtrList<QListViewItem> selected_items = selectedItems(true);
+ TQPtrList<TQListViewItem> selected_items = selectedItems(true);
Node* start_node = (dynamic_cast<StructTreeTag*> (selected_items.getFirst()))->node;
Node* end_node = start_node;
diff --git a/quanta/treeviews/structtreeview.h b/quanta/treeviews/structtreeview.h
index 4f59e7d3..2d87f038 100644
--- a/quanta/treeviews/structtreeview.h
+++ b/quanta/treeviews/structtreeview.h
@@ -18,8 +18,8 @@
#ifndef STRUCTTREEVIEW_H
#define STRUCTTREEVIEW_H
-#include <qmap.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqvaluelist.h>
#include <klistview.h>
@@ -48,7 +48,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static StructTreeView* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static StructTreeView* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static StructTreeView *m_ref;
if (!m_ref) m_ref = new StructTreeView (parent, name);
@@ -64,8 +64,8 @@ public:
void showTagAtPos(Node *node);
/** Delete the items */
void deleteList(bool groupOnly);
- void setParsingDTDs(const QStringList &parsingDTDList);
- void showMessage(const QString& message);
+ void setParsingDTDs(const TQStringList &parsingDTDList);
+ void showMessage(const TQString& message);
bool useOpenLevelSetting;
@@ -73,13 +73,13 @@ public:
public slots: // Public slots
/** repaint document structure */
void slotReparse(Document *w, Node* node, int openLevel = 3,bool groupOnly=false);
- void slotMouseClicked(int button, QListViewItem*, const QPoint&, int);
- void slotDoubleClicked( QListViewItem * );
+ void slotMouseClicked(int button, TQListViewItem*, const TQPoint&, int);
+ void slotDoubleClicked( TQListViewItem * );
// slots for RBM menu
void slotReparseMenuItem();
void slotSelectTag();
- void slotGotoTag( QListViewItem *item );
+ void slotGotoTag( TQListViewItem *item );
void slotGotoClosingTag();
/** Recursively open the tree and all its subtrees */
void slotOpenSubTree();
@@ -87,9 +87,9 @@ public slots: // Public slots
void slotCloseSubTree();
void changeFollowCursor() { setFollowCursor(!followCursorFlag); }
/** No descriptions */
- void slotCollapsed(QListViewItem *item);
+ void slotCollapsed(TQListViewItem *item);
/** No descriptions */
- void slotExpanded(QListViewItem *);
+ void slotExpanded(TQListViewItem *);
void slotOpenFile();
void slotNodeTreeChanged();
void slotRemoveTags();
@@ -99,11 +99,11 @@ signals:
void selectTagArea(Node* node);
void selectArea(int col1, int row1, int col2, int row2 );
void needReparse();
- void onTag( const QString &tag );
- void showGroupsForDTEP(const QString& dtep, bool show);
+ void onTag( const TQString &tag );
+ void showGroupsForDTEP(const TQString& dtep, bool show);
void openFile(const KURL&);
void openImage(const KURL&);
- void showProblemMessage(const QString&);
+ void showProblemMessage(const TQString&);
void clearProblemOutput();
private:
@@ -112,17 +112,17 @@ private:
* If you need the class use StructTreeView::ref() for
* construction and reference
*/
- StructTreeView(QWidget *parent=0, const char *name=0);
+ StructTreeView(TQWidget *parent=0, const char *name=0);
/** builds the structure tree */
void buildTree(Node *baseNode, int openLevel, bool groupOnly);
/** Do the recursive opening or closing of the trees */
- void setOpenSubTree(QListViewItem *it, bool open);
+ void setOpenSubTree(TQListViewItem *it, bool open);
/** Make ctrl have the same behavior has shift */
void setContiguousSelectedItems();
- void copySelectedItems(QListViewItem* parent, QListViewItem* after);
- void moveSelectedItems(QListViewItem* parent, QListViewItem* after);
+ void copySelectedItems(TQListViewItem* parent, TQListViewItem* after);
+ void moveSelectedItems(TQListViewItem* parent, TQListViewItem* after);
private:
@@ -134,43 +134,43 @@ private:
KPopupMenu *dtdMenu;
StructTreeTag *lastTag;
KConfig *config;
- QStringList dtdList;
- QValueList<const DTDStruct*> m_parsingDTDList;
+ TQStringList dtdList;
+ TQValueList<const DTDStruct*> m_parsingDTDList;
int openFileMenuId;
- QMap<QString, uint> groupIds;
+ TQMap<TQString, uint> groupIds;
bool m_dirty;
StructTreeTag *top;
- QValueList<StructTreeTag*> groups;
+ TQValueList<StructTreeTag*> groups;
uint groupsCount;
bool topOpened;
- QValueList<bool> groupOpened;
+ TQValueList<bool> groupOpened;
- mutable QListViewItem* m_marker; //track that has the drag/drop marker under it
- QListViewItem* m_draggedItem;
-// mutable QWidget* m_thisWidget; // non const this hack for acceptDrag
+ mutable TQListViewItem* m_marker; //track that has the drag/drop marker under it
+ TQListViewItem* m_draggedItem;
+// mutable TQWidget* m_thisWidget; // non const this hack for acceptDrag
protected: // Protected methods
/** Do a reparse before showing. */
- virtual void showEvent(QShowEvent*);
+ virtual void showEvent(TQShowEvent*);
/** Clear the problem output when hiding. */
- virtual void hideEvent(QHideEvent*);
+ virtual void hideEvent(TQHideEvent*);
// drag functions
- virtual bool acceptDrag(QDropEvent* e) const;
+ virtual bool acceptDrag(TQDropEvent* e) const;
virtual void startDrag();
- virtual void contentsMousePressEvent(QMouseEvent* e);
+ virtual void contentsMousePressEvent(TQMouseEvent* e);
protected slots: // Protected slots
/** The treeview DTD has changed to id. */
void slotDTDChanged(int id);
- void slotMouseClickedVPL(int button, QListViewItem*, const QPoint&, int);
- virtual void slotDropped(QDropEvent* e, QListViewItem* parent, QListViewItem* after);
+ void slotMouseClickedVPL(int button, TQListViewItem*, const TQPoint&, int);
+ virtual void slotDropped(TQDropEvent* e, TQListViewItem* parent, TQListViewItem* after);
protected: // Protected attributes
Document *write;
- QTime *timer;
+ TQTime *timer;
};
#endif
diff --git a/quanta/treeviews/tagattributeitems.cpp b/quanta/treeviews/tagattributeitems.cpp
index 4b74217d..176928c0 100644
--- a/quanta/treeviews/tagattributeitems.cpp
+++ b/quanta/treeviews/tagattributeitems.cpp
@@ -13,12 +13,12 @@
***************************************************************************/
//qt includes
-#include <qcombobox.h>
-#include <qheader.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqcombobox.h>
+#include <tqheader.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
//kde includes
#include <dcopref.h>
@@ -40,12 +40,12 @@
#include "qextfileinfo.h"
#include "styleeditor.h"
-TopLevelItem::TopLevelItem(KListView* parent, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, const TQString &title)
: KListViewItem(parent, title)
{
}
-TopLevelItem::TopLevelItem(KListView* parent, QListViewItem* after, const QString &title)
+TopLevelItem::TopLevelItem(KListView* parent, TQListViewItem* after, const TQString &title)
: KListViewItem(parent, after, title)
{
}
@@ -55,7 +55,7 @@ TopLevelItem::~TopLevelItem()
}
-void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
+void TopLevelItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -64,24 +64,24 @@ void TopLevelItem::paintCell(QPainter *p, const QColorGroup &cg,
// make toplevel item names bold
if (column == 0 && !parent())
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setBold(true);
p->setFont(f);
}
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
+ParentItem::ParentItem(TagAttributeTree *listView, TQListViewItem* parent)
: KListViewItem(parent)
{
m_listView = listView;
- comboBox = new QComboBox(false, m_listView->viewport() );
- QRect r = m_listView->itemRect( this );
+ comboBox = new TQComboBox(false, m_listView->viewport() );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -89,7 +89,7 @@ ParentItem::ParentItem(TagAttributeTree *listView, QListViewItem* parent)
}
r.setX( m_listView->header()->sectionPos( 0 ) + 20);
r.setWidth( m_listView->header()->sectionSize( 0 ) - 20);
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
comboBox->resize( r.size() );
m_listView->moveChild( comboBox, r.x(), r.y() );
}
@@ -100,7 +100,7 @@ ParentItem::~ParentItem()
}
-void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
+void ParentItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -109,7 +109,7 @@ void ParentItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
@@ -133,57 +133,57 @@ void ParentItem::showList(bool show)
if (show)
{
comboBox->show();
- QObject::connect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::connect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
else
{
comboBox->hide();
- QObject::disconnect(comboBox, SIGNAL(activated(int)), m_listView, SLOT(slotParentSelected(int)));
+ TQObject::disconnect(comboBox, TQT_SIGNAL(activated(int)), m_listView, TQT_SLOT(slotParentSelected(int)));
}
}
//Generic attribute item
-AttributeItem::AttributeItem(QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
lin = 0L;
lin2 = 0L;
}
-AttributeItem::AttributeItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: KListViewItem(parent, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2)
: KListViewItem(listView, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
-AttributeItem::AttributeItem(EditableTree *listView, const QString& title, const QString& title2,
- QListViewItem* after)
+AttributeItem::AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2,
+ TQListViewItem* after)
: KListViewItem(listView, after, title, title2)
{
m_listView = listView;
- lin = new QLineEdit( m_listView->viewport() );
- lin2 = new QLineEdit( m_listView->viewport() );
+ lin = new TQLineEdit( m_listView->viewport() );
+ lin2 = new TQLineEdit( m_listView->viewport() );
lin2->setText(title);
lin->setText(title2);
- QObject::connect( lin, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( lin, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
lin->hide();
lin2->hide();
}
@@ -194,7 +194,7 @@ AttributeItem::~AttributeItem()
delete lin2;
}
-void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
+void AttributeItem::paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int align)
{
if ( !p )
@@ -202,12 +202,12 @@ void AttributeItem::paintCell(QPainter *p, const QColorGroup &cg,
KListViewItem::paintCell( p, cg, column, width, align );
if (column == 0)
{
- p->setPen(QPen(QColor(0,0,0)));
+ p->setPen(TQPen(TQColor(0,0,0)));
p->drawLine( width - 1, 0, width - 1, height());
}
}
-QString AttributeItem::editorText(int column)
+TQString AttributeItem::editorText(int column)
{
if(column == 1)
return lin->text();
@@ -260,9 +260,9 @@ void AttributeItem::hideEditor(int column)
}
}
-void AttributeItem::placeEditor( QWidget *w, int column)
+void AttributeItem::placeEditor( TQWidget *w, int column)
{
- QRect r = m_listView->itemRect( this );
+ TQRect r = m_listView->itemRect( this );
if ( !r.size().isValid() )
{
m_listView->ensureItemVisible( this );
@@ -278,21 +278,21 @@ void AttributeItem::placeEditor( QWidget *w, int column)
r.setX( m_listView->header()->sectionPos( 0 ) );
r.setWidth( m_listView->header()->sectionSize( 0 ) - 1 );
}
- r = QRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
+ r = TQRect( m_listView->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
m_listView->moveChild( w, r.x(), r.y() );
}
//Boolean attribute item
-AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeBoolItem::AttributeBoolItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanTrue);
combo->insertItem((static_cast<TagAttributeTree *>(m_listView))->node()->tag->dtd()->booleanFalse);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeBoolItem::~AttributeBoolItem()
@@ -300,7 +300,7 @@ AttributeBoolItem::~AttributeBoolItem()
delete combo;
}
-QString AttributeBoolItem::editorText(int)
+TQString AttributeBoolItem::editorText(int)
{
return combo->currentText();
}
@@ -324,14 +324,14 @@ void AttributeBoolItem::hideEditor(int)
}
//Boolean attribute item
-AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeUrlItem::AttributeUrlItem(TagAttributeTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
urlRequester = new KURLRequester( m_listView->viewport() );
urlRequester->setMode(KFile::File | KFile::ExistingOnly );
urlRequester->hide();
- QObject::connect( urlRequester, SIGNAL( returnPressed() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( urlRequester, TQT_SIGNAL( returnPressed() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeUrlItem::~AttributeUrlItem()
@@ -339,14 +339,14 @@ AttributeUrlItem::~AttributeUrlItem()
delete urlRequester;
}
-QString AttributeUrlItem::editorText(int)
+TQString AttributeUrlItem::editorText(int)
{
KURL url, baseURL;
QuantaCommon::setUrl(url, urlRequester->url());
baseURL = (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url();
baseURL.setPath(baseURL.directory());
url = QExtFileInfo::toRelative(url, baseURL);
- QString s = url.url();
+ TQString s = url.url();
if (url.protocol() == (static_cast<TagAttributeTree *>(m_listView))->node()->tag->write()->url().protocol())
s.remove(0, url.protocol().length() + 3);
return s;
@@ -375,11 +375,11 @@ void AttributeUrlItem::hideEditor(int)
//editable listbox
//Boolean attribute item
-AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2, Attribute *attr)
+AttributeListItem::AttributeListItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2, Attribute *attr)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
- combo = new QComboBox( m_listView->viewport() );
+ combo = new TQComboBox( m_listView->viewport() );
Node *node = (static_cast<TagAttributeTree *>(m_listView))->node();
QTag *qTag = QuantaCommon::tagFromDTD(node);
if (qTag)
@@ -391,15 +391,15 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->insertStringList(attr->values);
if (attr->source == "dcop") //fill the list with a result of a DCOP call
{
- QString interface = "QuantaIf";
+ TQString interface = "QuantaIf";
if (!attr->interface.isEmpty())
interface = attr->interface;
- QString arguments = attr->arguments;
+ TQString arguments = attr->arguments;
arguments.replace("%tagname%", node->tag->name);
DCOPReply reply = QuantaCommon::callDCOPMethod(interface, attr->method, arguments);
if (reply.isValid())
{
- QStringList list = reply;
+ TQStringList list = reply;
combo->insertStringList(list);
}
}
@@ -409,7 +409,7 @@ AttributeListItem::AttributeListItem(EditableTree* listView, QListViewItem* pare
combo->setEditable(true);
}
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeListItem::~AttributeListItem()
@@ -417,7 +417,7 @@ AttributeListItem::~AttributeListItem()
delete combo;
}
-QString AttributeListItem::editorText(int)
+TQString AttributeListItem::editorText(int)
{
return combo->currentText();
}
@@ -455,14 +455,14 @@ void AttributeListItem::hideEditor(int)
}
//editable color combobox
-AttributeColorItem::AttributeColorItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeColorItem::AttributeColorItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
combo = new KColorCombo( m_listView->viewport() );
combo->setEditable(true);
combo->hide();
- QObject::connect( combo, SIGNAL( activated(int) ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( combo, TQT_SIGNAL( activated(int) ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeColorItem::~AttributeColorItem()
@@ -470,9 +470,9 @@ AttributeColorItem::~AttributeColorItem()
delete combo;
}
-QString AttributeColorItem::editorText(int)
+TQString AttributeColorItem::editorText(int)
{
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
combo->setCurrentText(name);
@@ -491,7 +491,7 @@ void AttributeColorItem::showEditor(int)
void AttributeColorItem::hideEditor(int)
{
m_listView->editorContentChanged();
- QString name = combo->color().name();
+ TQString name = combo->color().name();
if (name == "#000000")
name = "";
setText(1, name);
@@ -499,7 +499,7 @@ void AttributeColorItem::hideEditor(int)
}
//editable style combobox
-AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* parent, const QString &title, const QString& title2)
+AttributeStyleItem::AttributeStyleItem(EditableTree* listView, TQListViewItem* parent, const TQString &title, const TQString& title2)
: AttributeItem(parent, title, title2)
{
m_listView = listView;
@@ -508,7 +508,7 @@ AttributeStyleItem::AttributeStyleItem(EditableTree* listView, QListViewItem* pa
//combo->setEditable(true);
m_se->hide();
- QObject::connect( m_se->button(), SIGNAL( clicked() ), m_listView, SLOT( editorContentChanged() ) );
+ TQObject::connect( m_se->button(), TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( editorContentChanged() ) );
}
AttributeStyleItem::~AttributeStyleItem()
@@ -516,7 +516,7 @@ AttributeStyleItem::~AttributeStyleItem()
delete m_se;
}
-QString AttributeStyleItem::editorText(int)
+TQString AttributeStyleItem::editorText(int)
{
return m_se->lineEdit()->text();
}
diff --git a/quanta/treeviews/tagattributeitems.h b/quanta/treeviews/tagattributeitems.h
index 8d603529..2ff774d9 100644
--- a/quanta/treeviews/tagattributeitems.h
+++ b/quanta/treeviews/tagattributeitems.h
@@ -15,7 +15,7 @@
#ifndef TAGATTRIBUTEITEM_H
#define TAGATTRIBUTEITEM_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
class KColorCombo;
class KURLRequester;
@@ -35,14 +35,14 @@ class TopLevelItem : public KListViewItem
{
public:
- TopLevelItem(KListView *parent, const QString& title);
- TopLevelItem(KListView *parent, QListViewItem* after, const QString& title);
+ TopLevelItem(KListView *parent, const TQString& title);
+ TopLevelItem(KListView *parent, TQListViewItem* after, const TQString& title);
virtual ~TopLevelItem();
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
};
@@ -50,7 +50,7 @@ class ParentItem : public KListViewItem
{
public:
- ParentItem(TagAttributeTree *listView, QListViewItem *parent);
+ ParentItem(TagAttributeTree *listView, TQListViewItem *parent);
virtual ~ParentItem();
Node *node(int index);
@@ -59,36 +59,36 @@ public:
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
private:
- QPtrList<Node> m_nodeList;
- QComboBox *comboBox;
+ TQPtrList<Node> m_nodeList;
+ TQComboBox *comboBox;
TagAttributeTree *m_listView;
};
class AttributeItem : public KListViewItem
{
public:
- AttributeItem(QListViewItem* parent, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, const QString& title, const QString& title2);
- AttributeItem(EditableTree *listView, const QString& title, const QString& title2, QListViewItem* after);
+ AttributeItem(TQListViewItem* parent, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2);
+ AttributeItem(EditableTree *listView, const TQString& title, const TQString& title2, TQListViewItem* after);
virtual ~AttributeItem();
virtual void replaceCurrentEditor();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual void placeEditor(QWidget *w, int column = 1);
- virtual QString editorText(int column = 1);
+ virtual void placeEditor(TQWidget *w, int column = 1);
+ virtual TQString editorText(int column = 1);
//I'm not sane... lin is the right editor, lin2 is the left one.
- QLineEdit *lin, *lin2;
+ TQLineEdit *lin, *lin2;
protected:
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int align );
EditableTree *m_listView;
@@ -97,8 +97,8 @@ protected:
class AttributeNameSpaceItem:public AttributeItem
{
public:
- AttributeNameSpaceItem(QListViewItem* parent, const QString& title, const QString& title2): AttributeItem(parent, title, title2){};
- AttributeNameSpaceItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2):AttributeItem(listView, parent, title, title2){};
+ AttributeNameSpaceItem(TQListViewItem* parent, const TQString& title, const TQString& title2): AttributeItem(parent, title, title2){};
+ AttributeNameSpaceItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2):AttributeItem(listView, parent, title, title2){};
virtual ~AttributeNameSpaceItem(){};
};
@@ -106,26 +106,26 @@ public:
class AttributeBoolItem : public AttributeItem
{
public:
- AttributeBoolItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeBoolItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeBoolItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
- QComboBox* combo;
+ TQComboBox* combo;
};
class AttributeUrlItem : public AttributeItem
{
public:
- AttributeUrlItem(TagAttributeTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeUrlItem(TagAttributeTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeUrlItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
KURLRequester* urlRequester;
@@ -134,26 +134,26 @@ private:
class AttributeListItem : public AttributeItem
{
public:
- AttributeListItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2, Attribute *attr = 0L);
+ AttributeListItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2, Attribute *attr = 0L);
virtual ~AttributeListItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
- QComboBox* combo;
+ TQComboBox* combo;
};
class AttributeColorItem : public AttributeItem
{
public:
- AttributeColorItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeColorItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeColorItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
KColorCombo* combo;
@@ -162,12 +162,12 @@ private:
class AttributeStyleItem : public AttributeItem
{
public:
- AttributeStyleItem(EditableTree *listView, QListViewItem* parent, const QString& title, const QString& title2);
+ AttributeStyleItem(EditableTree *listView, TQListViewItem* parent, const TQString& title, const TQString& title2);
virtual ~AttributeStyleItem();
virtual void showEditor(int column = 1);
virtual void hideEditor(int column = 1);
- virtual QString editorText(int column = 1);
+ virtual TQString editorText(int column = 1);
private:
diff --git a/quanta/treeviews/tagattributetree.cpp b/quanta/treeviews/tagattributetree.cpp
index a8e4406b..565c5a4c 100644
--- a/quanta/treeviews/tagattributetree.cpp
+++ b/quanta/treeviews/tagattributetree.cpp
@@ -13,13 +13,13 @@
***************************************************************************/
//qt includes
-#include <qfont.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqlineedit.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
//kde includes
#include <kaction.h>
@@ -50,7 +50,7 @@
#include "viewmanager.h"
-EditableTree::EditableTree(QWidget *parent, const char *name)
+EditableTree::EditableTree(TQWidget *parent, const char *name)
: KListView(parent, name)
{
m_editable = true;
@@ -61,11 +61,11 @@ EditableTree::~EditableTree()
}
-void EditableTree::setCurrentItem( QListViewItem *item)
+void EditableTree::setCurrentItem( TQListViewItem *item)
{
if ( item && m_editable)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
static_cast<AttributeItem*>(it)->hideEditor();
@@ -81,9 +81,9 @@ void EditableTree::editorContentChanged()
}
-void EditableTree::focusInEvent(QFocusEvent *)
+void EditableTree::focusInEvent(TQFocusEvent *)
{
- /**QListViewItem *it = currentItem();
+ /**TQListViewItem *it = currentItem();
if( dynamic_cast<AttributeItem*>(it))
{
static_cast<AttributeItem *>(it)->showEditor();
@@ -91,23 +91,23 @@ void EditableTree::focusInEvent(QFocusEvent *)
}*/
}
-void EditableTree::focusOutEvent(QFocusEvent *)
+void EditableTree::focusOutEvent(TQFocusEvent *)
{
- /**QListViewItem *it = currentItem();
+ /**TQListViewItem *it = currentItem();
if( dynamic_cast<AttributeItem*>(it))
{
static_cast<AttributeItem *>(it)->hideEditor();
}*/
}
-DualEditableTree::DualEditableTree(QWidget *parent, const char *name)
+DualEditableTree::DualEditableTree(TQWidget *parent, const char *name)
: EditableTree(parent, name)
{
curCol = 0;
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
this->installEventFilter(this);
- connect(this, SIGNAL(clicked(QListViewItem *, const QPoint &, int )),
- this, SLOT(itemClicked(QListViewItem *, const QPoint &, int )));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *, const TQPoint &, int )),
+ this, TQT_SLOT(itemClicked(TQListViewItem *, const TQPoint &, int )));
}
DualEditableTree::~DualEditableTree()
@@ -115,7 +115,7 @@ DualEditableTree::~DualEditableTree()
}
-bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
+bool DualEditableTree::eventFilter(TQObject *object, TQEvent *event)
{
AttributeItem *it = dynamic_cast<AttributeItem*>(currentItem());
AttributeItem *up = 0L, *down = 0L;
@@ -126,9 +126,9 @@ bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
if(currentItem()->itemBelow())
down = dynamic_cast<AttributeItem *>(currentItem()->itemBelow());
- if(event->type() == QEvent::KeyPress && m_editable)
+ if(event->type() == TQEvent::KeyPress && m_editable)
{
- QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event);
switch(keyevent->key())
{
case Key_Left:
@@ -171,7 +171,7 @@ bool DualEditableTree::eventFilter(QObject *object, QEvent *event)
return KListView::eventFilter(object, event);;
}
-void DualEditableTree::resizeEvent(QResizeEvent *ev)
+void DualEditableTree::resizeEvent(TQResizeEvent *ev)
{
KListView::resizeEvent(ev);
if(!currentItem()) return;
@@ -183,11 +183,11 @@ void DualEditableTree::resizeEvent(QResizeEvent *ev)
}
}
-void DualEditableTree::setCurrentItem(QListViewItem *item)
+void DualEditableTree::setCurrentItem(TQListViewItem *item)
{
if ( item && m_editable)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
{
static_cast<AttributeItem*>(it)->hideEditor(0);
@@ -206,7 +206,7 @@ void DualEditableTree::editorContentChanged()
emit itemModified(dynamic_cast<AttributeItem*>(currentItem()));
}
-void DualEditableTree::itemClicked(QListViewItem *item, const QPoint &, int column)
+void DualEditableTree::itemClicked(TQListViewItem *item, const TQPoint &, int column)
{
if(item)
{
@@ -216,17 +216,17 @@ void DualEditableTree::itemClicked(QListViewItem *item, const QPoint &, int colu
}
}
-TagAttributeTree::TagAttributeTree(QWidget *parent, const char *name)
+TagAttributeTree::TagAttributeTree(TQWidget *parent, const char *name)
: EditableTree(parent, name)
{
setRootIsDecorated( true );
setSorting(-1);
setFrameStyle( Panel | Sunken );
setLineWidth( 2 );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
addColumn(i18n("Attribute Name"));
addColumn(i18n("Value"));
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
m_node = 0L;
m_newNode = 0L;
m_parentItem = 0L;
@@ -258,7 +258,7 @@ void TagAttributeTree::setCurrentNode(Node *node)
#endif
AttributeItem *item = 0L;
TopLevelItem *group = 0L;
- QString attrName;
+ TQString attrName;
QTag *qTag = QuantaCommon::tagFromDTD(node);
Node *n = node->parent;
while (n)
@@ -283,7 +283,7 @@ void TagAttributeTree::setCurrentNode(Node *node)
if(node->tag->type == Tag::XmlTag || node->tag->type == Tag::XmlTagEnd)
{
- QString nameSpace = node->tag->nameSpace;
+ TQString nameSpace = node->tag->nameSpace;
if (node->tag->type == Tag::XmlTagEnd)
nameSpace.remove('/');
group = new TopLevelItem(this, group, i18n("Namespace"));
@@ -293,13 +293,13 @@ void TagAttributeTree::setCurrentNode(Node *node)
if (qTag)
{
group = new TopLevelItem(this, group, i18n("Attributes"));
- QStringList list;
+ TQStringList list;
for (int i = 0; i < qTag->attributeCount(); i++)
{
list += qTag->attributeAt(i)->name;
}
list.sort();
- QStringList::Iterator it = list.end();
+ TQStringList::Iterator it = list.end();
--it;
while (it != list.end())
{
@@ -367,8 +367,8 @@ void TagAttributeTree::setCurrentNode(Node *node)
}
}
- connect(this, SIGNAL(collapsed(QListViewItem*)), SLOT(slotCollapsed(QListViewItem*)));
- connect(this, SIGNAL(expanded(QListViewItem*)), SLOT(slotExpanded(QListViewItem*)));
+ connect(this, TQT_SIGNAL(collapsed(TQListViewItem*)), TQT_SLOT(slotCollapsed(TQListViewItem*)));
+ connect(this, TQT_SIGNAL(expanded(TQListViewItem*)), TQT_SLOT(slotExpanded(TQListViewItem*)));
}
void TagAttributeTree::editorContentChanged()
@@ -379,7 +379,7 @@ void TagAttributeTree::editorContentChanged()
rebuildEnabled = false;
if (dynamic_cast<AttributeNameSpaceItem*>(item))
{
- QString nameSpace = item->editorText();
+ TQString nameSpace = item->editorText();
m_node->tag->write()->changeTagNamespace(m_node->tag, nameSpace);
} else
{
@@ -403,11 +403,11 @@ void TagAttributeTree::editorContentChanged()
}
}
-/**void TagAttributeTree::setCurrentItem( QListViewItem *item )
+/**void TagAttributeTree::setCurrentItem( TQListViewItem *item )
{
if ( item )
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( dynamic_cast<AttributeItem*>(it) )
static_cast<AttributeItem*>(it)->hideEditor();
@@ -423,17 +423,17 @@ void TagAttributeTree::slotParentSelected(int index)
if (m_parentItem)
{
m_newNode = m_parentItem->node(index);
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCurrentNode()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCurrentNode()));
}
}
-void TagAttributeTree::slotCollapsed(QListViewItem *item)
+void TagAttributeTree::slotCollapsed(TQListViewItem *item)
{
if (m_parentItem && item == m_parentItem->parent())
m_parentItem->showList(false);
}
-void TagAttributeTree::slotExpanded(QListViewItem *item)
+void TagAttributeTree::slotExpanded(TQListViewItem *item)
{
if (m_parentItem && item == m_parentItem->parent())
m_parentItem->showList(true);
@@ -451,39 +451,39 @@ void TagAttributeTree::slotDelayedSetCurrentNode()
}
}
-EnhancedTagAttributeTree::EnhancedTagAttributeTree(QWidget *parent, const char *name)
-: QWidget(parent, name)
+EnhancedTagAttributeTree::EnhancedTagAttributeTree(TQWidget *parent, const char *name)
+: TQWidget(parent, name)
{
- widgetLayout = new QGridLayout( this, 1, 1, 11, 6, "MainLayout");
+ widgetLayout = new TQGridLayout( this, 1, 1, 11, 6, "MainLayout");
attrTree = new TagAttributeTree(this, "TagAttributeTree");
- attrTree->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
+ attrTree->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
widgetLayout->addMultiCellWidget( attrTree, 1, 1, 0, 3 );
- nodeName = new QLabel(this, i18n( "Node Name" ));
- nodeName->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );
+ nodeName = new TQLabel(this, i18n( "Node Name" ));
+ nodeName->setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed, 0, 0, nodeName->sizePolicy().hasHeightForWidth() ) );
widgetLayout->addWidget( nodeName, 0, 0 );
deleteTag = new KPushButton(this, i18n( "Delete Tag" ));
deleteTag->setPixmap(SmallIcon("editdelete"));
deleteTag->setMaximumHeight(32);
deleteTag->setMaximumWidth(32);
- QToolTip::add(deleteTag, i18n("Delete the current tag only."));
+ TQToolTip::add(deleteTag, i18n("Delete the current tag only."));
deleteAll = new KPushButton(this, i18n( "Delete All" ));
deleteAll->setPixmap(SmallIcon("editdelete"));
deleteAll->setMaximumHeight(32);
deleteAll->setMaximumWidth(32);
- QToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));
+ TQToolTip::add(deleteAll, i18n("Delete the current tag and all its children."));
widgetLayout->addWidget( deleteTag, 0, 2 );
widgetLayout->addWidget( deleteAll, 0, 3 );
clearWState( WState_Polished );
- connect(attrTree, SIGNAL(newNodeSelected(Node *)), this, SLOT(NodeSelected(Node *)));
- connect(deleteTag, SIGNAL(clicked()), this, SLOT(deleteNode()));
- connect(deleteAll, SIGNAL(clicked()), this, SLOT(deleteSubTree()));
+ connect(attrTree, TQT_SIGNAL(newNodeSelected(Node *)), this, TQT_SLOT(NodeSelected(Node *)));
+ connect(deleteTag, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteNode()));
+ connect(deleteAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSubTree()));
}
EnhancedTagAttributeTree::~EnhancedTagAttributeTree()
@@ -515,7 +515,7 @@ void EnhancedTagAttributeTree::showCaption()
if(curNode->tag->type == Tag::XmlTag || curNode->tag->type == Tag::XmlTagEnd ||
curNode->tag->type == Tag::ScriptTag)
{
- QString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name);
+ TQString s = i18n("Current tag: <b>%1</b>").arg(curNode->tag->name);
nodeName->setText(KStringHandler::rPixelSqueeze(s, nodeName->fontMetrics(), attrTree->width()- 50));
}
else if(curNode->tag->type == Tag::Text)
@@ -537,7 +537,7 @@ void EnhancedTagAttributeTree::deleteSubTree()
int curLine, curCol;
long offset;
DOM::Node domNode;
- QValueList<int> loc;
+ TQValueList<int> loc;
//Save the cursor position in kafka/quanta
if(view->hadLastFocus() == QuantaView::SourceFocus)
@@ -590,7 +590,7 @@ void EnhancedTagAttributeTree::deleteNode()
int curLine, curCol;
long offset;
DOM::Node domNode;
- QValueList<int> loc;
+ TQValueList<int> loc;
NodeModifsSet *modifs;
//Save the cursor position in kafka/quanta
diff --git a/quanta/treeviews/tagattributetree.h b/quanta/treeviews/tagattributetree.h
index bae0f3ff..c07db51b 100644
--- a/quanta/treeviews/tagattributetree.h
+++ b/quanta/treeviews/tagattributetree.h
@@ -16,7 +16,7 @@
#define TAGATTRIBUTETREE_H
//qt includes
-#include <qwidget.h>
+#include <tqwidget.h>
//kde includes
#include <klistview.h>
@@ -35,17 +35,17 @@ class EditableTree : public KListView {
Q_OBJECT
public:
- EditableTree(QWidget *parent = 0, const char *name = 0);
+ EditableTree(TQWidget *parent = 0, const char *name = 0);
virtual ~EditableTree();
- virtual void setCurrentItem( QListViewItem *i);
+ virtual void setCurrentItem( TQListViewItem *i);
void setEditable(bool b) {m_editable = b;}
bool isEditable() {return m_editable;}
public slots:
virtual void editorContentChanged();
- virtual void focusInEvent(QFocusEvent *);
- virtual void focusOutEvent(QFocusEvent *);
+ virtual void focusInEvent(TQFocusEvent *);
+ virtual void focusOutEvent(TQFocusEvent *);
protected:
bool m_editable;
@@ -56,24 +56,24 @@ class DualEditableTree : public EditableTree
{
Q_OBJECT
public:
- DualEditableTree(QWidget *parent = 0, const char *name = 0);
+ DualEditableTree(TQWidget *parent = 0, const char *name = 0);
virtual ~DualEditableTree();
- virtual void setCurrentItem ( QListViewItem *i);
+ virtual void setCurrentItem ( TQListViewItem *i);
int currentColumn() {return curCol;}
protected:
- virtual bool eventFilter(QObject *object, QEvent *event);
- virtual void resizeEvent(QResizeEvent *);
+ virtual bool eventFilter(TQObject *object, TQEvent *event);
+ virtual void resizeEvent(TQResizeEvent *);
signals:
- void itemModified( QListViewItem *);
+ void itemModified( TQListViewItem *);
public slots:
virtual void editorContentChanged();
private slots:
- void itemClicked(QListViewItem *i, const QPoint &point, int col);
+ void itemClicked(TQListViewItem *i, const TQPoint &point, int col);
private:
int curCol;
@@ -83,11 +83,11 @@ class TagAttributeTree : public EditableTree {
Q_OBJECT
public:
- TagAttributeTree(QWidget *parent=0, const char *name=0);
+ TagAttributeTree(TQWidget *parent=0, const char *name=0);
virtual ~TagAttributeTree();
void setCurrentNode(Node *node);
- //virtual void setCurrentItem( QListViewItem *i );
+ //virtual void setCurrentItem( TQListViewItem *i );
Node *node() const {return m_node;}
public slots:
@@ -96,8 +96,8 @@ public slots:
virtual void editorContentChanged();
private slots:
- void slotCollapsed(QListViewItem *item);
- void slotExpanded(QListViewItem *item);
+ void slotCollapsed(TQListViewItem *item);
+ void slotExpanded(TQListViewItem *item);
signals:
void newNodeSelected(Node *node);
@@ -114,7 +114,7 @@ class EnhancedTagAttributeTree : public QWidget
{
Q_OBJECT
public:
- EnhancedTagAttributeTree(QWidget *parent = 0, const char *name = 0);
+ EnhancedTagAttributeTree(TQWidget *parent = 0, const char *name = 0);
virtual ~EnhancedTagAttributeTree();
void setCurrentNode(Node *node);
@@ -131,11 +131,11 @@ private slots:
private:
void showCaption();
- QLabel *nodeName;
+ TQLabel *nodeName;
KPushButton* deleteAll;
KPushButton* deleteTag;
TagAttributeTree *attrTree;
- QGridLayout *widgetLayout;
+ TQGridLayout *widgetLayout;
Node *curNode;
};
diff --git a/quanta/treeviews/templatestreeview.cpp b/quanta/treeviews/templatestreeview.cpp
index e87e2428..0b9973e8 100644
--- a/quanta/treeviews/templatestreeview.cpp
+++ b/quanta/treeviews/templatestreeview.cpp
@@ -19,19 +19,19 @@
#include <sys/types.h>
// QT includes
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qheader.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtextedit.h>
-#include <qregexp.h>
-#include <qlabel.h>
-#include <qmap.h>
-#include <qwidgetstack.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
+#include <tqregexp.h>
+#include <tqlabel.h>
+#include <tqmap.h>
+#include <tqwidgetstack.h>
// KDE includes
#include <kapplication.h>
@@ -70,17 +70,17 @@
#define NONE "None"
-const QString textMenu = I18N_NOOP("Insert as &Text");
-const QString binaryMenu = I18N_NOOP("Insert &Link to File");
-const QString docMenu = I18N_NOOP("&New Document Based on This");
-const QString siteMenu = I18N_NOOP("&Extract Site Template To...");
-QMap<QString, QString> typeToi18n;
-QMap<QString, QString> i18nToType;
+const TQString textMenu = I18N_NOOP("Insert as &Text");
+const TQString binaryMenu = I18N_NOOP("Insert &Link to File");
+const TQString docMenu = I18N_NOOP("&New Document Based on This");
+const TQString siteMenu = I18N_NOOP("&Extract Site Template To...");
+TQMap<TQString, TQString> typeToi18n;
+TQMap<TQString, TQString> i18nToType;
//TemplatesTreeBranch implementation
TemplatesTreeBranch::TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden,
KFileTreeViewItem *branchRoot)
: BaseTreeBranch(parent, url, name, pix, showHidden, branchRoot)
@@ -99,7 +99,7 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa
{
if (url.isLocalFile())
{
- QDir dir (url.path(), "", QDir::All);
+ TQDir dir (url.path(), "", TQDir::All);
tvi->setExpandable(dir.count() != 2); // . and .. are always there
} else {
tvi->setExpandable(true); // we assume there is something
@@ -108,15 +108,15 @@ KFileTreeViewItem* TemplatesTreeBranch::createTreeViewItem(KFileTreeViewItem *pa
{
url = static_cast<BaseTreeViewItem*>(parent)->url();
}
- QFileInfo dotFileInfo(url.path() + "/.dirinfo");
+ TQFileInfo dotFileInfo(url.path() + "/.dirinfo");
while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
{
- dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ dotFileInfo.setFile(TQFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
}
if (dotFileInfo.exists())
{
KConfig *config = new KConfig(dotFileInfo.filePath());
- QString s = config->readEntry("Type");
+ TQString s = config->readEntry("Type");
tvi->setText(1, typeToi18n[s]);
delete config;
}
@@ -143,35 +143,35 @@ TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name )
m_fileMenu = new KPopupMenu(this);
- m_openId = m_fileMenu->insertItem(i18n("Open"), this ,SLOT(slotInsert()));
- m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,SLOT(slotOpen()));
- m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
- m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
- m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertInProject()));
- m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, SLOT(slotClose()));
+ m_openId = m_fileMenu->insertItem(i18n("Open"), this ,TQT_SLOT(slotInsert()));
+ m_fileMenu->insertItem(SmallIcon("fileopen"), i18n("&Open"), this ,TQT_SLOT(slotOpen()));
+ m_fileMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, TQT_SLOT(slotSendInMail()));
+ m_fileMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, TQT_SLOT(slotUploadTemplate()));
+ m_insertFileInProject = m_fileMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertInProject()));
+ m_menuClose = m_fileMenu->insertItem(SmallIcon("fileclose"), i18n("Clos&e"), this, TQT_SLOT(slotClose()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_fileMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_fileMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_fileMenu->insertSeparator();
- m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
+ m_fileMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
m_folderMenu = new KPopupMenu(this);
- m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("&New Folder..."), this, SLOT(slotNewDir()));
- m_folderMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, SLOT(slotSendInMail()));
- m_folderMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, SLOT(slotUploadTemplate()));
- m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
- m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, SLOT(slotInsertDirInProject()));
+ m_folderMenu->insertItem(SmallIcon("folder_new"), i18n("&New Folder..."), this, TQT_SLOT(slotNewDir()));
+ m_folderMenu->insertItem(SmallIcon("mail_send"), i18n("Send in E&mail..."), this, TQT_SLOT(slotSendInMail()));
+ m_folderMenu->insertItem(SmallIcon("network"), i18n("&Upload Template..."), this, TQT_SLOT(slotUploadTemplate()));
+ m_downloadMenuId = m_folderMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, TQT_SIGNAL(downloadTemplate()));
+ m_insertFolderInProject = m_folderMenu->insertItem(i18n("&Insert in Project..."), this, TQT_SLOT(slotInsertDirInProject()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, SLOT(slotCopy()));
- m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, SLOT(slotPaste()));
- m_deleteMenuId = m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, SLOT(slotDelete()));
+ m_folderMenu->insertItem(SmallIcon("editcopy"), i18n("&Copy"), this, TQT_SLOT(slotCopy()));
+ m_menuPasteFolder = m_folderMenu->insertItem(SmallIcon("editpaste"), i18n("&Paste"), this, TQT_SLOT(slotPaste()));
+ m_deleteMenuId = m_folderMenu->insertItem(SmallIcon("editdelete"), i18n("&Delete"), this, TQT_SLOT(slotDelete()));
m_folderMenu->insertSeparator();
- m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, SLOT(slotProperties()));
- m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, SLOT(slotReload()));
+ m_folderMenu->insertItem(SmallIcon("info"), i18n("&Properties"), this, TQT_SLOT(slotProperties()));
+ m_reloadMenuId = m_folderMenu->insertItem(SmallIcon("revert"), i18n("&Reload"), this, TQT_SLOT(slotReload()));
m_emptyAreaMenu = new KPopupMenu(this);
- m_emptyAreaMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, SIGNAL(downloadTemplate()));
+ m_emptyAreaMenu->insertItem(SmallIcon("network"), i18n("&Download Template..."), this, TQT_SIGNAL(downloadTemplate()));
addColumn(i18n("Templates"), -1);
addColumn(i18n("Group"), -1);
@@ -182,14 +182,14 @@ TemplatesTreeView::TemplatesTreeView(KMainWindow *parent, const char *name )
localURL.setPath(locateLocal("data", resourceDir + "templates/"));
newBranch(localURL);
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
- connect(this, SIGNAL(open(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect(this, TQT_SIGNAL(open(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
setAcceptDrops(true);
- setSelectionMode(QListView::Single);
+ setSelectionMode(TQListView::Single);
setDragEnabled(true);
setSaveOpenFolder(true);
restoreLayout( kapp->config(), className() );
@@ -223,7 +223,7 @@ KFileTreeBranch* TemplatesTreeView::newBranch(const KURL& url)
addBranch(newBrnch);
if (url.isLocalFile())
{
- QDir dir (url.path(), "", QDir::All);
+ TQDir dir (url.path(), "", TQDir::All);
newBrnch->root()->setExpandable(dir.count() != 2); // . and .. are always there
} else {
newBrnch->root()->setExpandable(true); // we assume there is something
@@ -251,7 +251,7 @@ void TemplatesTreeView::slotInsertInDocument()
}
-void TemplatesTreeView::slotMenu(KListView*, QListViewItem *item, const QPoint &point)
+void TemplatesTreeView::slotMenu(KListView*, TQListViewItem *item, const TQPoint &point)
{
if (!item)
{
@@ -283,7 +283,7 @@ void TemplatesTreeView::slotMenu(KListView*, QListViewItem *item, const QPoint &
{
m_dirInfo = readDirInfo();
- QString menuText = "";
+ TQString menuText = "";
if (m_dirInfo.mimeType.upper().contains("TEXT"))
menuText = i18n(textMenu.utf8());
@@ -313,7 +313,7 @@ void TemplatesTreeView::slotNewDocument()
KURL url = filterTemplate();
if (QuantaCommon::checkMimeGroup(url, "text") || QuantaCommon::denyBinaryInsert(this) == KMessageBox::Yes)
{
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if (item )
{
if ( currentKFileTreeViewItem() != currentKFileTreeViewItem()->branch()->root())
@@ -328,7 +328,7 @@ void TemplatesTreeView::slotNewDocument()
/** Insert the template as text, image, new document. */
void TemplatesTreeView::slotInsert()
{
- QString menuText = m_fileMenu->text(m_openId);
+ TQString menuText = m_fileMenu->text(m_openId);
if (menuText == i18n(textMenu.utf8()))
slotInsertInDocument();
@@ -340,7 +340,7 @@ void TemplatesTreeView::slotInsert()
slotExtractSiteTemplate();
}
-void TemplatesTreeView::slotSelectFile(QListViewItem *item)
+void TemplatesTreeView::slotSelectFile(TQListViewItem *item)
{
if ( !item ) return;
@@ -390,9 +390,9 @@ void TemplatesTreeView::slotNewDir()
}
if (createDirDlg->exec())
{
- QDir dir;
+ TQDir dir;
- QString startDir = "";
+ TQString startDir = "";
if ( !currentKFileTreeViewItem()->isDir() )
{
startDir = currentURL().path();
@@ -400,7 +400,7 @@ void TemplatesTreeView::slotNewDir()
{
startDir = currentURL().path() + "/dummy_file";
}
- startDir = QFileInfo(startDir).dirPath();
+ startDir = TQFileInfo(startDir).dirPath();
if (!dir.mkdir(startDir+"/"+createDirDlg->dirName->text()))
{
KMessageBox::error(this,i18n("Error while creating the new folder.\n \
@@ -418,7 +418,7 @@ void TemplatesTreeView::slotNewDir()
}
/** No descriptions */
-QDragObject * TemplatesTreeView::dragObject ()
+TQDragObject * TemplatesTreeView::dragObject ()
{
// don't drag folders
if ( ! currentKFileTreeViewItem() || currentKFileTreeViewItem()->isDir() ) return 0;
@@ -433,7 +433,7 @@ QDragObject * TemplatesTreeView::dragObject ()
}
/** No descriptions */
-void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
+void TemplatesTreeView::contentsDropEvent(TQDropEvent *e)
{
if (KURLDrag::canDecode(e))
{
@@ -441,9 +441,9 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
BaseTreeView::contentsDropEvent(e);
return;
}
- if (QTextDrag::canDecode(e))
+ if (TQTextDrag::canDecode(e))
{
- QListViewItem *item = itemAt(contentsToViewport(e->pos()));
+ TQListViewItem *item = itemAt(contentsToViewport(e->pos()));
if (item)
{
KURL dest;
@@ -452,8 +452,8 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
else
dest = currentURL().directory(false);
dest.adjustPath(+1);
- QString content;
- QTextDrag::decode(e, content);
+ TQString content;
+ TQTextDrag::decode(e, content);
KURL url =KURLRequesterDlg::getURL( dest.path() + "template.txt",
this, i18n("Save selection as template file:"));
if ( !url.isEmpty() )
@@ -461,7 +461,7 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
//now save the file
KTempFile* tempFile = new KTempFile(tmpDir);
tempFile->setAutoDelete(true);
- tempFile->textStream()->setEncoding(QTextStream::UnicodeUTF8);
+ tempFile->textStream()->setEncoding(TQTextStream::UnicodeUTF8);
*(tempFile->textStream()) << content;
tempFile->close();
bool proceed = true;
@@ -485,10 +485,10 @@ void TemplatesTreeView::contentsDropEvent(QDropEvent *e)
}
/** Reads a .dirinfo file from the selected item's path */
-DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
+DirInfo TemplatesTreeView::readDirInfo(const TQString& dir)
{
DirInfo dirInfo;
- QString startDir = dir;
+ TQString startDir = dir;
if (startDir.isEmpty())
{
@@ -501,11 +501,11 @@ DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
}
}
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
while ((!dotFileInfo.exists()) && (dotFileInfo.dirPath() != "/"))
{
- dotFileInfo.setFile(QFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
+ dotFileInfo.setFile(TQFileInfo(dotFileInfo.dirPath()).dirPath()+"/.dirinfo");
}
KConfig *config = new KConfig(dotFileInfo.filePath());
@@ -519,9 +519,9 @@ DirInfo TemplatesTreeView::readDirInfo(const QString& dir)
}
/** Writes a .dirinfo file from the selected item's path */
-bool TemplatesTreeView::writeDirInfo(const QString& m_dirInfoFile)
+bool TemplatesTreeView::writeDirInfo(const TQString& m_dirInfoFile)
{
- QString startDir = "";
+ TQString startDir = "";
if (m_dirInfoFile.isEmpty())
{
@@ -537,7 +537,7 @@ bool TemplatesTreeView::writeDirInfo(const QString& m_dirInfoFile)
startDir = m_dirInfoFile;
}
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
bool success = false;
KConfig *config = new KConfig(dotFileInfo.filePath());
@@ -562,8 +562,8 @@ void TemplatesTreeView::slotProperties()
KPropertiesDialog *propDlg = new KPropertiesDialog( url, this, 0L, false, false); //autodeletes itself
//Always add the Quanta directory page
- QFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template"));
- QVBoxLayout *topLayout = new QVBoxLayout( quantaDirPage);
+ TQFrame *quantaDirPage = propDlg->addPage(i18n("Quanta Template"));
+ TQVBoxLayout *topLayout = new TQVBoxLayout( quantaDirPage);
m_quantaProperties = new QuantaPropertiesPage( quantaDirPage, i18n("Quanta") );
m_quantaProperties->typesCombo->insertItem(typeToi18n["text/all"]);
@@ -578,17 +578,17 @@ void TemplatesTreeView::slotProperties()
KIO::UDSEntry entry;
KIO::NetAccess::stat(url, entry, this);
KFileItem fItem(entry, url);
- QString permissions = fItem.permissionsString();
- QString userName;
+ TQString permissions = fItem.permissionsString();
+ TQString userName;
struct passwd *user = getpwuid(getuid());
if (user)
- userName = QString::fromLocal8Bit(user->pw_name);
- QString groupName;
+ userName = TQString::fromLocal8Bit(user->pw_name);
+ TQString groupName;
gid_t gid = getgid();
struct group *ge = getgrgid(gid);
if (ge)
{
- groupName = QString::fromLocal8Bit(ge->gr_name);
+ groupName = TQString::fromLocal8Bit(ge->gr_name);
if (groupName.isEmpty())
groupName.sprintf("%d", ge->gr_gid);
} else
@@ -597,7 +597,7 @@ void TemplatesTreeView::slotProperties()
if (permissions[8] == 'w' || (permissions[2] == 'w' && userName == fItem.user()) || (permissions[5] == 'w' && groupName == fItem.group()))
writable = true;
- QString startDir = "";
+ TQString startDir = "";
if (!currentKFileTreeViewItem()->isDir())
{
startDir = url.path();
@@ -608,7 +608,7 @@ void TemplatesTreeView::slotProperties()
m_quantaProperties->typeStack->raiseWidget(0);
}
m_quantaProperties->setEnabled(writable);
- QFileInfo dotFileInfo(QFileInfo(startDir).dirPath()+"/.dirinfo");
+ TQFileInfo dotFileInfo(TQFileInfo(startDir).dirPath()+"/.dirinfo");
m_parentDirInfo = readDirInfo(dotFileInfo.dirPath());
if (!dotFileInfo.exists() || m_dirInfo.mimeType == m_parentDirInfo.mimeType)
{
@@ -629,9 +629,9 @@ void TemplatesTreeView::slotProperties()
}
topLayout->addWidget( m_quantaProperties );
- connect( propDlg, SIGNAL( applied() ), this , SLOT( slotPropertiesApplied()) );
+ connect( propDlg, TQT_SIGNAL( applied() ), this , TQT_SLOT( slotPropertiesApplied()) );
- QString name = url.path() + TMPL;
+ TQString name = url.path() + TMPL;
KConfig config(name);
config.setGroup("Filtering");
name = config.readEntry("Action", NONE);
@@ -640,7 +640,7 @@ void TemplatesTreeView::slotProperties()
uint pos = 0;
uint j = 1;
m_quantaProperties->actionCombo->insertItem(i18n(NONE));
- QString tmpStr;
+ TQString tmpStr;
KActionCollection *ac = m_mainWindow->actionCollection();
uint acCount = ac->count();
for (uint i = 0; i < acCount; i++)
@@ -648,11 +648,11 @@ void TemplatesTreeView::slotProperties()
TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
if (action)
{
- QDomElement el = action->data();
- QString type = el.attribute("type", "tag");
+ TQDomElement el = action->data();
+ TQString type = el.attribute("type", "tag");
if (type == "script")
{
- tmpStr = action->text().replace(QRegExp("\\&(?!\\&)"),"");
+ tmpStr = action->text().replace(TQRegExp("\\&(?!\\&)"),"");
m_quantaProperties->actionCombo->insertItem(tmpStr);
if (tmpStr == name)
pos = j;
@@ -664,7 +664,7 @@ void TemplatesTreeView::slotProperties()
//If the item is a file, add the Quanta file info page
addFileInfoPage(propDlg);
- if (propDlg->exec() == QDialog::Accepted)
+ if (propDlg->exec() == TQDialog::Accepted)
{
//TODO: move to slotPropertiesApplied
if (url != propDlg->kurl())
@@ -679,7 +679,7 @@ void TemplatesTreeView::slotProperties()
void TemplatesTreeView::slotPropertiesApplied()
{
DirInfo m_localDirInfo;
- QString typeString = "";
+ TQString typeString = "";
if (!m_quantaProperties->parentAttr->isChecked())
{
@@ -721,7 +721,7 @@ void TemplatesTreeView::slotPropertiesApplied()
writeTemplateInfo();
}
-void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const QString &typeString)
+void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const TQString &typeString)
{
if (item->parent() && item->isDir())
item->setText(1, typeString);
@@ -733,7 +733,7 @@ void TemplatesTreeView::updateTypeDescription(KFileTreeViewItem *item, const QSt
curItem->setText(1, typeString);
} else
{
- QFileInfo dotFileInfo(curItem->url().path() + "/.dirinfo");
+ TQFileInfo dotFileInfo(curItem->url().path() + "/.dirinfo");
if (!dotFileInfo.exists())
updateTypeDescription(curItem, typeString);
}
@@ -754,7 +754,7 @@ void TemplatesTreeView::slotInsertTag()
/*
Attention, this is called whenever a drop on a kate window happens!
*/
-void TemplatesTreeView::slotDragInsert(QDropEvent *e)
+void TemplatesTreeView::slotDragInsert(TQDropEvent *e)
{
if (KURLDrag::canDecode(e))
{
@@ -766,13 +766,13 @@ void TemplatesTreeView::slotDragInsert(QDropEvent *e)
KURL url = fileList.front();
- QString localFileName;
+ TQString localFileName;
if (url.isLocalFile())
{
localFileName = url.path();
m_dirInfo = readDirInfo(localFileName);
}
- QString mimeType = KMimeType::findByURL(url)->name();
+ TQString mimeType = KMimeType::findByURL(url)->name();
/* First, see if the type of the file is specified in the .dirinfo file */
if(m_dirInfo.mimeType.isEmpty())
@@ -807,15 +807,15 @@ void TemplatesTreeView::slotDragInsert(QDropEvent *e)
}
}
} else
- if (QTextDrag::canDecode(e))
+ if (TQTextDrag::canDecode(e))
{
- QString s;
- QTextDrag::decode(e, s);
+ TQString s;
+ TQTextDrag::decode(e, s);
KMessageBox::information(this,s, "Decode");
}
}
-void TemplatesTreeView::slotNewProjectLoaded(const QString &projectName, const KURL &baseURL, const KURL &templateURL)
+void TemplatesTreeView::slotNewProjectLoaded(const TQString &projectName, const KURL &baseURL, const KURL &templateURL)
{
BaseTreeView::slotNewProjectLoaded(projectName, baseURL, templateURL); // set m_projectName and m_projectBaseURL
if (m_projectDir)
@@ -832,7 +832,7 @@ void TemplatesTreeView::slotNewProjectLoaded(const QString &projectName, const K
*/
void TemplatesTreeView::writeTemplateInfo()
{
- QString fileName = currentURL().path() + TMPL;
+ TQString fileName = currentURL().path() + TMPL;
KConfig config(fileName);
config.setGroup("Filtering");
if ( m_quantaProperties->actionCombo->currentText() == i18n(NONE) )
@@ -846,8 +846,8 @@ void TemplatesTreeView::slotPaste()
{
if (currentItem())
{
- QClipboard *cb = QApplication::clipboard();
- KURL::List list( QStringList::split( QChar('\n'), cb->text() ) );
+ QClipboard *cb = TQApplication::clipboard();
+ KURL::List list( TQStringList::split( TQChar('\n'), cb->text() ) );
KURL url;
uint j = list.count();
@@ -855,14 +855,14 @@ void TemplatesTreeView::slotPaste()
{
url = list[i];
url.setFileName(url.fileName() + TMPL);
- if (url.isLocalFile() && QFileInfo(url.path()).exists())
+ if (url.isLocalFile() && TQFileInfo(url.path()).exists())
list += url;
}
url = currentURL();
if ( ! currentKFileTreeViewItem()->isDir() )
url.setFileName(""); // don't paste on files but in dirs
KIO::Job *job = KIO::copy( list, url);
- connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
}
}
@@ -871,20 +871,20 @@ void TemplatesTreeView::slotDelete()
if (currentItem())
{
KURL url = currentURL();
- QString msg;
+ TQString msg;
if ( currentKFileTreeViewItem()->isDir() )
msg = i18n("Do you really want to delete folder \n%1 ?\n").arg(url.path());
else
msg = i18n("Do you really want to delete file \n%1 ?\n").arg(url.path());
- if ( KMessageBox::warningContinueCancel(this, msg, QString::null, KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, msg, TQString::null, KStdGuiItem::del()) == KMessageBox::Continue )
{
KIO::Job *job = KIO::del(url);
- connect( job, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
url.setFileName(url.fileName()+ TMPL);
- if ( QFileInfo(url.path()).exists() ) {
+ if ( TQFileInfo(url.path()).exists() ) {
KIO::Job *job2 = KIO::del(url);
- connect( job2, SIGNAL( result( KIO::Job *) ), this , SLOT( slotJobFinished( KIO::Job *) ) );
+ connect( job2, TQT_SIGNAL( result( KIO::Job *) ), this , TQT_SLOT( slotJobFinished( KIO::Job *) ) );
};
}
}
@@ -895,23 +895,23 @@ template file */
KURL TemplatesTreeView::filterTemplate()
{
KURL url = currentURL();
- QString name = url.path() + TMPL;
+ TQString name = url.path() + TMPL;
KConfig config(name);
config.setGroup("Filtering");
name = config.readEntry("Action", NONE);
TagAction *filterAction = 0L;
KActionCollection *ac = m_mainWindow->actionCollection();
uint acCount = ac->count();
- QString tmpStr;
+ TQString tmpStr;
for (uint i = 0; i < acCount; i++)
{
TagAction *action = dynamic_cast<TagAction*>(ac->action(i));
if (action)
{
- QDomElement el = action->data();
- QString type = el.attribute("type", "tag");
+ TQDomElement el = action->data();
+ TQString type = el.attribute("type", "tag");
tmpStr = action->text();
- tmpStr.replace(QRegExp("\\&(?!\\&)"),"");
+ tmpStr.replace(TQRegExp("\\&(?!\\&)"),"");
if (type == "script" && tmpStr == name)
{
filterAction = action;
@@ -925,7 +925,7 @@ KURL TemplatesTreeView::filterTemplate()
filterAction->setInputFileName(url.path());
filterAction->execute(true);
filterAction->setOutputFile(0L);
- filterAction->setInputFileName(QString::null);
+ filterAction->setInputFileName(TQString::null);
tempFile->close();
tempFileList.append(tempFile);
url.setPath(tempFile->name());
@@ -933,7 +933,7 @@ KURL TemplatesTreeView::filterTemplate()
return url;
}
-QString TemplatesTreeView::createTemplateTarball()
+TQString TemplatesTreeView::createTemplateTarball()
{
KURL url = currentURL();
KURL dirURL (url);
@@ -943,7 +943,7 @@ QString TemplatesTreeView::createTemplateTarball()
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
tempDirList.append(tempDir);
- QString tempFileName=tempDir->name() + url.fileName() + ".tgz";
+ TQString tempFileName=tempDir->name() + url.fileName() + ".tgz";
//pack the files into a .tgz file
KTar tar(tempFileName, "application/x-gzip");
tar.open(IO_WriteOnly);
@@ -962,9 +962,9 @@ QString TemplatesTreeView::createTemplateTarball()
if (!(*it_f).fileName(false).isEmpty()) {
url = QExtFileInfo::toRelative( (*it_f), dirURL) ;
- QFile file((*it_f).path());
+ TQFile file((*it_f).path());
file.open(IO_ReadOnly);
- QByteArray bArray = file.readAll();
+ TQByteArray bArray = file.readAll();
tar.writeFile(url.path(), "user", "group", bArray.size(), bArray.data());
file.close();
};
@@ -979,19 +979,19 @@ void TemplatesTreeView::slotSendInMail()
if ( ! currentKFileTreeViewItem() ) return;
- QStringList attachmentFile;
+ TQStringList attachmentFile;
attachmentFile += createTemplateTarball();
TagMailDlg *mailDlg = new TagMailDlg( this, i18n("Send template in email"));
- QString toStr;
- QString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n");
- QString titleStr;
- QString subjectStr;
+ TQString toStr;
+ TQString message = i18n("Hi,\n This is a Quanta Plus [http://quanta.kdewebdev.org] template tarball.\n\nHave fun.\n");
+ TQString titleStr;
+ TQString subjectStr;
mailDlg->TitleLabel->setText(i18n("Content:"));
/* mailDlg->titleEdit->setFixedHeight(60);
- mailDlg->titleEdit->setVScrollBarMode(QTextEdit::Auto);
- mailDlg->titleEdit->setHScrollBarMode(QTextEdit::Auto);*/
+ mailDlg->titleEdit->setVScrollBarMode(TQTextEdit::Auto);
+ mailDlg->titleEdit->setHScrollBarMode(TQTextEdit::Auto);*/
if ( mailDlg->exec() )
{
if ( !mailDlg->lineEmail->text().isEmpty())
@@ -1006,7 +1006,7 @@ void TemplatesTreeView::slotSendInMail()
delete mailDlg;
return;
}
- kapp->invokeMailer(toStr, QString::null, QString::null, subjectStr, message, QString::null, attachmentFile);
+ kapp->invokeMailer(toStr, TQString::null, TQString::null, subjectStr, message, TQString::null, attachmentFile);
}
delete mailDlg;
}
@@ -1017,16 +1017,16 @@ void TemplatesTreeView::slotUploadTemplate()
emit uploadTemplate(createTemplateTarball());
}
-bool TemplatesTreeView::acceptDrag(QDropEvent* e ) const
+bool TemplatesTreeView::acceptDrag(TQDropEvent* e ) const
{
- return (BaseTreeView::acceptDrag(e) || QTextDrag::canDecode(e));
+ return (BaseTreeView::acceptDrag(e) || TQTextDrag::canDecode(e));
}
void TemplatesTreeView::slotExtractSiteTemplate()
{
- QString startDir = m_projectBaseURL.url();
+ TQString startDir = m_projectBaseURL.url();
if (startDir.isEmpty())
- startDir = QDir::homeDirPath();
+ startDir = TQDir::homeDirPath();
bool error = false;
KURLRequesterDlg urlRequester(startDir, i18n("Target folder"), this, "req", true);
urlRequester.urlRequester()->setMode(KFile::Directory);
@@ -1034,7 +1034,7 @@ void TemplatesTreeView::slotExtractSiteTemplate()
{
KURL targetURL = urlRequester.selectedURL();
KURL url = currentURL();
- QString tempFile;
+ TQString tempFile;
if (KIO::NetAccess::download(url, tempFile, this))
{
KTar tar(tempFile);
@@ -1047,11 +1047,11 @@ void TemplatesTreeView::slotExtractSiteTemplate()
{
KTempDir* tempDir = new KTempDir(tmpDir);
tempDir->setAutoDelete(true);
- QString tempDirName = tempDir->name();
+ TQString tempDirName = tempDir->name();
directory->copyTo(tempDirName, true);
- QStringList entries = directory->entries();
+ TQStringList entries = directory->entries();
KURL::List fileList;
- for (QStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
+ for (TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it)
fileList.append(KURL::fromPathOrURL(tempDirName + "/" + *it));
if (!KIO::NetAccess::dircopy(fileList, targetURL, this))
error = true;
@@ -1064,7 +1064,7 @@ void TemplatesTreeView::slotExtractSiteTemplate()
KIO::NetAccess::removeTempFile(tempFile);
if (!m_projectBaseURL.isEmpty() && !QExtFileInfo::toRelative(targetURL, m_projectBaseURL).url().startsWith("."))
{
- if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), QString::null, i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this, i18n("You have extracted the site template to a folder which is not under your main project folder.\nDo you want to copy the folder into the main project folder?"), TQString::null, i18n("Copy Folder"), i18n("Do Not Copy")) == KMessageBox::Yes)
{
emit insertDirInProject(targetURL);
}
diff --git a/quanta/treeviews/templatestreeview.h b/quanta/treeviews/templatestreeview.h
index c0df69e5..7816cffd 100644
--- a/quanta/treeviews/templatestreeview.h
+++ b/quanta/treeviews/templatestreeview.h
@@ -28,7 +28,7 @@ class TemplatesTreeBranch : public BaseTreeBranch {
public:
TemplatesTreeBranch(KFileTreeView *parent, const KURL& url,
- const QString& name, const QPixmap& pix,
+ const TQString& name, const TQPixmap& pix,
bool showHidden = false, KFileTreeViewItem *branchRoot = 0L);
/** read the mimetype */
@@ -57,9 +57,9 @@ public:
~TemplatesTreeView();
/** Writes a .dirinfo file from the selected item's path */
- bool writeDirInfo(const QString& dirInfoFile = QString::null);
+ bool writeDirInfo(const TQString& dirInfoFile = TQString::null);
/** Reads a .dirinfo file from the selected item's path */
- DirInfo readDirInfo(const QString& dir = QString::null);
+ DirInfo readDirInfo(const TQString& dir = TQString::null);
public slots:
@@ -75,12 +75,12 @@ public slots:
*
* @param listView KListView where the event comes from
*
- * @param item QListViewItem where the mousepointer is hovering
+ * @param item TQListViewItem where the mousepointer is hovering
*
- * @param point QPoint coordinates of the event
+ * @param point TQPoint coordinates of the event
*
*/
- void slotMenu(KListView *listView, QListViewItem *item, const QPoint &point);
+ void slotMenu(KListView *listView, TQListViewItem *item, const TQPoint &point);
/** Creates a new document based in the selected template. */
void slotNewDocument();
/** Insert the template as text, image, new document. */
@@ -90,7 +90,7 @@ public slots:
/** No descriptions */
void slotNewDir();
/** Handles dropping on the document from the template tree */
- void slotDragInsert(QDropEvent *);
+ void slotDragInsert(TQDropEvent *);
/**
* slot for the RBM
@@ -99,7 +99,7 @@ public slots:
*/
void slotSendInMail();
void slotUploadTemplate();
- virtual void slotSelectFile(QListViewItem *item);
+ virtual void slotSelectFile(TQListViewItem *item);
void slotOpen();
void slotPaste();
void slotDelete();
@@ -110,7 +110,7 @@ public slots:
void slotInsertTag();
/** Sets the project template directory */
- void slotNewProjectLoaded(const QString &, const KURL &, const KURL &);
+ void slotNewProjectLoaded(const TQString &, const KURL &, const KURL &);
private:
@@ -123,7 +123,7 @@ private:
template file */
KURL filterTemplate();
void writeTemplateInfo();
- void updateTypeDescription(KFileTreeViewItem *item, const QString &typeString);
+ void updateTypeDescription(KFileTreeViewItem *item, const TQString &typeString);
BaseTreeBranch *m_projectDir;
int m_deleteMenuId;
@@ -131,7 +131,7 @@ private:
int m_reloadMenuId;
int m_downloadMenuId;
QuantaPropertiesPage *m_quantaProperties;
- QString m_projectName;
+ TQString m_projectName;
KURL localURL;
KURL globalURL;
KPopupMenu *m_fileMenu;
@@ -148,15 +148,15 @@ private:
signals: // Signals
void insertFile(const KURL &);
void downloadTemplate();
- void uploadTemplate(const QString&);
+ void uploadTemplate(const TQString&);
protected: // Protected methods
KFileTreeBranch* newBranch(const KURL& url);
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
// virtual void startDrag();
- void contentsDropEvent(QDropEvent *event);
- bool acceptDrag(QDropEvent* e ) const;
- QString createTemplateTarball();
+ void contentsDropEvent(TQDropEvent *event);
+ bool acceptDrag(TQDropEvent* e ) const;
+ TQString createTemplateTarball();
};
#endif
diff --git a/quanta/treeviews/uploadtreefile.cpp b/quanta/treeviews/uploadtreefile.cpp
index 2df61f3f..9c055424 100644
--- a/quanta/treeviews/uploadtreefile.cpp
+++ b/quanta/treeviews/uploadtreefile.cpp
@@ -14,9 +14,9 @@
***************************************************************************/
// QT includes
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qfileinfo.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqfileinfo.h>
// KDE includes
#include <kfileitem.h>
@@ -28,7 +28,7 @@
#include "resource.h"
UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem)
- : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+ : KListViewItem( parent, a_url.fileName(), "", TQString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
{
m_url = a_url;
isDir = false;
@@ -40,8 +40,8 @@ UploadTreeFile::UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, con
setText(0, m_url.fileName());
}
-UploadTreeFile::UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem)
- : KListViewItem( parent, a_url.fileName(), "", QString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
+UploadTreeFile::UploadTreeFile( TQListView *parent, const KURL &a_url, const KFileItem &a_fileItem)
+ : KListViewItem( parent, a_url.fileName(), "", TQString("%1").arg( (long int)a_fileItem.size() ), a_fileItem.timeString())
{
m_url = a_url;
isDir = false;
@@ -69,15 +69,15 @@ int UploadTreeFile::permissions()
}
/** used for sorting */
-QString UploadTreeFile::key ( int, bool ) const
+TQString UploadTreeFile::key ( int, bool ) const
{
- static QString key;
- key = QString( "1" + text(0) );
+ static TQString key;
+ key = TQString( "1" + text(0) );
return key;
-// return QFileInfo(key).extension()+key;
+// return TQFileInfo(key).extension()+key;
}
-void UploadTreeFile::setWhichPixmap(const QString& pixmap )
+void UploadTreeFile::setWhichPixmap(const TQString& pixmap )
{
setPixmap( 1, SmallIcon(pixmap) );
}
diff --git a/quanta/treeviews/uploadtreefile.h b/quanta/treeviews/uploadtreefile.h
index 54c8ce01..736a3a88 100644
--- a/quanta/treeviews/uploadtreefile.h
+++ b/quanta/treeviews/uploadtreefile.h
@@ -29,14 +29,14 @@ class KFileItem;
class UploadTreeFile : public KListViewItem {
public:
UploadTreeFile( UploadTreeFolder *parent, const KURL &a_url, const KFileItem &a_fileItem);
- UploadTreeFile( QListView *parent, const KURL &a_url, const KFileItem &a_fileItem);
+ UploadTreeFile( TQListView *parent, const KURL &a_url, const KFileItem &a_fileItem);
~UploadTreeFile();
- void setWhichPixmap(const QString& pixmap);
+ void setWhichPixmap(const TQString& pixmap);
int permissions();
/** used for sorting */
- virtual QString key ( int column, bool ascending ) const;
+ virtual TQString key ( int column, bool ascending ) const;
/** No descriptions */
KURL url();
void setConfirmUpload(bool confirm) {m_confirm = confirm;}
diff --git a/quanta/treeviews/uploadtreefolder.cpp b/quanta/treeviews/uploadtreefolder.cpp
index f38e648c..123eaf35 100644
--- a/quanta/treeviews/uploadtreefolder.cpp
+++ b/quanta/treeviews/uploadtreefolder.cpp
@@ -14,10 +14,10 @@
***************************************************************************/
// QT includes
-#include <qdir.h>
-#include <qdragobject.h>
-#include <qevent.h>
-#include <qpixmap.h>
+#include <tqdir.h>
+#include <tqdragobject.h>
+#include <tqevent.h>
+#include <tqpixmap.h>
// KDE includes
#include <kiconloader.h>
@@ -40,7 +40,7 @@ UploadTreeFolder::UploadTreeFolder(const KURL &a_url, UploadTreeFolder * parent,
}
-UploadTreeFolder::UploadTreeFolder(const KURL &a_url, QListView * parent, const char * name )
+UploadTreeFolder::UploadTreeFolder(const KURL &a_url, TQListView * parent, const char * name )
: KListViewItem( parent, name, "", "", "" )
{
parentFolder = 0L;
@@ -55,14 +55,14 @@ UploadTreeFolder::UploadTreeFolder(const KURL &a_url, QListView * parent, const
void UploadTreeFolder::setOpen( bool open )
{
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
/** retun full name of the folder */
//TODO: This should go away. Use url() instead.
-QString UploadTreeFolder::fullName()
+TQString UploadTreeFolder::fullName()
{
- QString s="";
+ TQString s="";
if ( parentFolder )
{
@@ -80,7 +80,7 @@ QString UploadTreeFolder::fullName()
void UploadTreeFolder::setup()
{
setExpandable( true );
- QListViewItem::setup();
+ TQListViewItem::setup();
}
/** reload file list */
@@ -88,7 +88,7 @@ void UploadTreeFolder::reloadList()
{
setOpen( false );
- QListViewItem *child;
+ TQListViewItem *child;
while ( (child = firstChild()) )
removeItem( child );
@@ -96,11 +96,11 @@ void UploadTreeFolder::reloadList()
}
/** need for sorting */
-QString UploadTreeFolder::key ( int, bool ) const
+TQString UploadTreeFolder::key ( int, bool ) const
{
- static QString key;
+ static TQString key;
- key = QString("0") + text(0);
+ key = TQString("0") + text(0);
return key;
}
@@ -109,7 +109,7 @@ UploadTreeFolder::~UploadTreeFolder()
{
}
-void UploadTreeFolder::setWhichPixmap(const QString& pixmap )
+void UploadTreeFolder::setWhichPixmap(const TQString& pixmap )
{
setPixmap( 1, SmallIcon(pixmap) );
}
diff --git a/quanta/treeviews/uploadtreefolder.h b/quanta/treeviews/uploadtreefolder.h
index 1ef77279..d6959ab3 100644
--- a/quanta/treeviews/uploadtreefolder.h
+++ b/quanta/treeviews/uploadtreefolder.h
@@ -16,10 +16,10 @@
#ifndef UPLOADTREEFOLDER_H
#define UPLOADTREEFOLDER_H
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <klistview.h>
#include <kurl.h>
@@ -32,18 +32,18 @@ class KURL;
class UploadTreeFolder : public KListViewItem {
public:
- UploadTreeFolder( const KURL &a_url, QListView * parent, const char * name);
+ UploadTreeFolder( const KURL &a_url, TQListView * parent, const char * name);
UploadTreeFolder( const KURL &a_url, UploadTreeFolder * parent, const char * name );
virtual ~UploadTreeFolder();
/** used for sorting */
- virtual QString key ( int column, bool ascending ) const;
- QString fullName();
+ virtual TQString key ( int column, bool ascending ) const;
+ TQString fullName();
KURL url() {return m_url;}
virtual void setOpen( bool );
void setup();
- void setWhichPixmap(const QString& pixmap );
+ void setWhichPixmap(const TQString& pixmap );
public:
UploadTreeFolder * parentFolder;
diff --git a/quanta/treeviews/uploadtreeview.cpp b/quanta/treeviews/uploadtreeview.cpp
index 75d0fa0c..486a6156 100644
--- a/quanta/treeviews/uploadtreeview.cpp
+++ b/quanta/treeviews/uploadtreeview.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kcursor.h>
#include <klocale.h>
@@ -23,7 +23,7 @@
#include "uploadtreeview.h"
#include "quantacommon.h"
-UploadTreeView::UploadTreeView( QWidget *parent, const char *name ) :
+UploadTreeView::UploadTreeView( TQWidget *parent, const char *name ) :
KListView(parent, name)
{
setRootIsDecorated( true );
@@ -37,24 +37,24 @@ UploadTreeView::UploadTreeView( QWidget *parent, const char *name ) :
addColumn( i18n("Size") );
addColumn( i18n("Date") );
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect( this, SIGNAL(selectionChanged()), SLOT(slotSelectFile()));
- connect( this, SIGNAL(selectionChanged(QListViewItem *)),
- this, SLOT(slotSelectFile(QListViewItem *)));
+ connect( this, TQT_SIGNAL(selectionChanged()), TQT_SLOT(slotSelectFile()));
+ connect( this, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotSelectFile(TQListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int )), SLOT(slotDoubleClicked(QListViewItem *, const QPoint &, int )));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int )), TQT_SLOT(slotDoubleClicked(TQListViewItem *, const TQPoint &, int )));
}
UploadTreeView::~UploadTreeView()
{
}
-int UploadTreeView::checkboxTree( QListViewItem *it )
+int UploadTreeView::checkboxTree( TQListViewItem *it )
{
parentWidget()->setCursor(KCursor::workingCursor());
- QListViewItem *itIter = it ? it->firstChild() : firstChild();
+ TQListViewItem *itIter = it ? it->firstChild() : firstChild();
// bitFlag structure: (0/1)all children exist (0/1)no children exist.
// We don't need some children as a bit flag, because that's implied if the bits are "00".
@@ -132,9 +132,9 @@ int UploadTreeView::checkboxTree( QListViewItem *it )
return retVal;
}
-void UploadTreeView::selectAllUnderNode( QListViewItem* it, bool select )
+void UploadTreeView::selectAllUnderNode( TQListViewItem* it, bool select )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -147,7 +147,7 @@ void UploadTreeView::selectAllUnderNode( QListViewItem* it, bool select )
}
}
-void UploadTreeView::slotSelectFile( QListViewItem *it )
+void UploadTreeView::slotSelectFile( TQListViewItem *it )
{
UploadTreeFolder *itF = dynamic_cast<UploadTreeFolder *>(it);
// This need a bit of special behavior for clicking on directories.
@@ -200,7 +200,7 @@ void UploadTreeView::slotSelectFile( QListViewItem *it )
bool hasSelected = false;
bool allSelected = true;
//check if the item has any children's selected
- QListViewItemIterator iter(itF->firstChild());
+ TQListViewItemIterator iter(itF->firstChild());
while ( iter.current() && iter.current() != itF->nextSibling())
{
if ( iter.current()->isSelected() )
@@ -237,9 +237,9 @@ void UploadTreeView::slotSelectFile( )
}
//TODO: This should search based on url's rather than on text(0)
-UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const QString& folderName )
+UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const TQString& folderName )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -253,9 +253,9 @@ UploadTreeFolder* UploadTreeView::findFolder( UploadTreeFolder *it, const QStrin
return 0;
}
-UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const QString& indent = QString::null )
+UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const TQString& indent = TQString::null )
{
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -271,9 +271,9 @@ UploadTreeFolder* UploadTreeView::printTree( UploadTreeFolder *it = 0,const QStr
// :NOTE: AFAIK, safe to use only if you are sure the item searched for
// is already in here. It might be safe otherwise, but use at your own
// peril.
-QListViewItem* UploadTreeView::findItem(const QString& path )
+TQListViewItem* UploadTreeView::findItem(const TQString& path )
{
- QString item = path;
+ TQString item = path;
UploadTreeFolder *it = 0;
int i;
while ( ( i = item.find('/') ) >= 0 )
@@ -284,7 +284,7 @@ QListViewItem* UploadTreeView::findItem(const QString& path )
item.remove(0,i+1);
}
- QListViewItem *itIter = 0;
+ TQListViewItem *itIter = 0;
if ( it == 0 ) itIter = firstChild();
else itIter = it->firstChild();
@@ -300,8 +300,8 @@ QListViewItem* UploadTreeView::findItem(const QString& path )
UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fileItem)
{
- QString item = a_url.path(); //TODO: do with real KURL's
- QString fname = item;
+ TQString item = a_url.path(); //TODO: do with real KURL's
+ TQString fname = item;
int i;
uint col = 0;
UploadTreeFolder *it = 0;
@@ -345,9 +345,9 @@ UploadTreeFile* UploadTreeView::addItem(const KURL &a_url, const KFileItem& a_fi
return file;
}
-void UploadTreeView::expandAll( QListViewItem *it )
+void UploadTreeView::expandAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -361,9 +361,9 @@ void UploadTreeView::expandAll( QListViewItem *it )
}
}
-void UploadTreeView::collapseAll( QListViewItem *it )
+void UploadTreeView::collapseAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -377,9 +377,9 @@ void UploadTreeView::collapseAll( QListViewItem *it )
}
}
-void UploadTreeView::invertAll( QListViewItem *it )
+void UploadTreeView::invertAll( TQListViewItem *it )
{
- QListViewItem *itIter = it;
+ TQListViewItem *itIter = it;
if (it == 0) itIter = firstChild();
else itIter = it->firstChild();
@@ -400,7 +400,7 @@ void UploadTreeView::invertAll( QListViewItem *it )
void UploadTreeView::selectAll( bool select )
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
for ( ; it.current(); ++it )
{
@@ -418,9 +418,9 @@ void UploadTreeView::selectAll( bool select )
/** No descriptions */
-QListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
+TQListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
UploadTreeFile *fileItem;
UploadTreeFolder *folderItem;
KURL url;
@@ -443,7 +443,7 @@ QListViewItem* UploadTreeView::itemByUrl(const KURL& a_url)
return 0L;
}
-void UploadTreeView::slotDoubleClicked(QListViewItem *item, const QPoint &, int )
+void UploadTreeView::slotDoubleClicked(TQListViewItem *item, const TQPoint &, int )
{
item->setOpen(!item->isOpen());
}
diff --git a/quanta/treeviews/uploadtreeview.h b/quanta/treeviews/uploadtreeview.h
index 85676e41..629f728d 100644
--- a/quanta/treeviews/uploadtreeview.h
+++ b/quanta/treeviews/uploadtreeview.h
@@ -16,9 +16,9 @@
#ifndef UPLOADTREEVIEW_H
#define UPLOADTREEVIEW_H
-#include <qdir.h>
-#include <qpixmap.h>
-#include <qheader.h>
+#include <tqdir.h>
+#include <tqpixmap.h>
+#include <tqheader.h>
#include "uploadtreefolder.h"
#include "uploadtreefile.h"
@@ -32,29 +32,29 @@ class KFileItem;
class UploadTreeView : public KListView {
Q_OBJECT
public:
- UploadTreeView( QWidget *parent, const char *name=0L );
+ UploadTreeView( TQWidget *parent, const char *name=0L );
~UploadTreeView();
UploadTreeFile* addItem( const KURL &a_url, const KFileItem &a_fileItem);
- QListViewItem* findItem( const QString& );
- int checkboxTree( QListViewItem *it = 0);
- void expandAll( QListViewItem * = 0 );
- void collapseAll( QListViewItem * = 0 );
- void invertAll( QListViewItem * = 0 );
+ TQListViewItem* findItem( const TQString& );
+ int checkboxTree( TQListViewItem *it = 0);
+ void expandAll( TQListViewItem * = 0 );
+ void collapseAll( TQListViewItem * = 0 );
+ void invertAll( TQListViewItem * = 0 );
virtual void selectAll( bool select);
/** No descriptions */
- QListViewItem* itemByUrl(const KURL& a_url);
+ TQListViewItem* itemByUrl(const KURL& a_url);
public slots:
- void slotSelectFile( QListViewItem * );
+ void slotSelectFile( TQListViewItem * );
void slotSelectFile( );
- void selectAllUnderNode( QListViewItem *it, bool select );
+ void selectAllUnderNode( TQListViewItem *it, bool select );
private slots:
- void slotDoubleClicked(QListViewItem *, const QPoint &, int );
+ void slotDoubleClicked(TQListViewItem *, const TQPoint &, int );
private:
- UploadTreeFolder* findFolder( UploadTreeFolder *, const QString&);
- UploadTreeFolder* printTree( UploadTreeFolder *, const QString&);
+ UploadTreeFolder* findFolder( UploadTreeFolder *, const TQString&);
+ UploadTreeFolder* printTree( UploadTreeFolder *, const TQString&);
};
#endif
diff --git a/quanta/utility/newstuff.cpp b/quanta/utility/newstuff.cpp
index f6cbf397..bc3a052f 100644
--- a/quanta/utility/newstuff.cpp
+++ b/quanta/utility/newstuff.cpp
@@ -13,7 +13,7 @@
* *
***************************************************************************/
//qt includes
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
//kde includes
#include <kglobal.h>
@@ -36,8 +36,8 @@ void QNewDTEPStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString dtepDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
- QString dtdName = (*directory->entries().at(0));
+ TQString dtepDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "dtep/";
+ TQString dtdName = (*directory->entries().at(0));
if (dtdName.isEmpty())
{
ok = false;
@@ -53,16 +53,16 @@ void QNewDTEPStuff::installResource()
KMessageBox::error(parentWidget(), i18n("There was an error with the downloaded DTEP tarball file. Possible causes are damaged archive or invalid directory structure in the archive."), i18n("DTEP Installation Error"));
}
-QNewToolbarStuff::QNewToolbarStuff(const QString &type, QWidget *parentWidget)
+QNewToolbarStuff::QNewToolbarStuff(const TQString &type, TQWidget *parentWidget)
:KNewStuffSecure(type, parentWidget)
{
- connect(this, SIGNAL(loadToolbarFile(const KURL&)), parentWidget, SLOT(slotLoadToolbarFile(const KURL&)));
+ connect(this, TQT_SIGNAL(loadToolbarFile(const KURL&)), parentWidget, TQT_SLOT(slotLoadToolbarFile(const KURL&)));
}
void QNewToolbarStuff::installResource()
{
- KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + QFileInfo(m_tarName).fileName());
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "toolbars/" + TQFileInfo(m_tarName).fileName());
bool ok = true;
if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
{
@@ -80,16 +80,16 @@ void QNewToolbarStuff::installResource()
}
}
-QNewTemplateStuff::QNewTemplateStuff(const QString &type, QWidget *parentWidget)
+QNewTemplateStuff::QNewTemplateStuff(const TQString &type, TQWidget *parentWidget)
:KNewStuffSecure(type, parentWidget)
{
- connect(this, SIGNAL(openFile(const KURL&)), parentWidget, SLOT(slotFileOpen(const KURL&)));
+ connect(this, TQT_SIGNAL(openFile(const KURL&)), parentWidget, TQT_SLOT(slotFileOpen(const KURL&)));
}
void QNewTemplateStuff::installResource()
{
- KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + QFileInfo(m_tarName).fileName());
+ KURL destURL = KURL::fromPathOrURL(KGlobal::dirs()->saveLocation("data") + resourceDir + "templates/" + TQFileInfo(m_tarName).fileName());
bool ok = true;
if (QuantaCommon::checkOverwrite(destURL, parentWidget()))
{
@@ -114,7 +114,7 @@ void QNewScriptStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString scriptsDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "scripts/";
+ TQString scriptsDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "scripts/";
directory->copyTo(scriptsDir, true);
tar.close();
} else
@@ -131,7 +131,7 @@ void QNewDocStuff::installResource()
if (tar.open(IO_ReadOnly))
{
const KArchiveDirectory *directory = tar.directory();
- QString docDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "doc/";
+ TQString docDir =KGlobal::dirs()->saveLocation("data") + resourceDir + "doc/";
directory->copyTo(docDir, true);
tar.close();
} else
diff --git a/quanta/utility/newstuff.h b/quanta/utility/newstuff.h
index dd2ad104..bdd49a50 100644
--- a/quanta/utility/newstuff.h
+++ b/quanta/utility/newstuff.h
@@ -17,7 +17,7 @@
#define NEWSTUFF_H
//qt includes
-#include <qobject.h>
+#include <tqobject.h>
//kde includes
#include <knewstuff/knewstuffsecure.h>
@@ -34,7 +34,7 @@ class QNewDTEPStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewDTEPStuff(const QString &type, QWidget *parentWidget=0)
+ QNewDTEPStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewDTEPStuff() {};
@@ -52,7 +52,7 @@ class QNewToolbarStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewToolbarStuff(const QString &type, QWidget *parentWidget=0);
+ QNewToolbarStuff(const TQString &type, TQWidget *parentWidget=0);
~QNewToolbarStuff() {};
signals:
@@ -72,7 +72,7 @@ class QNewTemplateStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewTemplateStuff(const QString &type, QWidget *parentWidget=0);
+ QNewTemplateStuff(const TQString &type, TQWidget *parentWidget=0);
~QNewTemplateStuff() {};
signals:
@@ -92,7 +92,7 @@ class QNewScriptStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewScriptStuff(const QString &type, QWidget *parentWidget=0)
+ QNewScriptStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewScriptStuff() {};
@@ -110,7 +110,7 @@ class QNewDocStuff: public KNewStuffSecure
Q_OBJECT
public:
- QNewDocStuff(const QString &type, QWidget *parentWidget=0)
+ QNewDocStuff(const TQString &type, TQWidget *parentWidget=0)
:KNewStuffSecure(type, parentWidget){};
~QNewDocStuff() {};
diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp
index bb0d5db4..7bad8715 100644
--- a/quanta/utility/qpevents.cpp
+++ b/quanta/utility/qpevents.cpp
@@ -15,9 +15,9 @@
***************************************************************************/
//qt includes
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
//kde includes
#include <kapplication.h>
@@ -36,8 +36,8 @@
#include "tagaction.h"
//TODO: Better create a class for each internal event action
-QPEvents::QPEvents(QObject *parent, const char *name)
- : QObject(parent, name)
+QPEvents::QPEvents(TQObject *parent, const char *name)
+ : TQObject(parent, name)
{
m_eventNames["before_save"] = i18n("Before Document Save");
m_eventNames["after_save"] = i18n("After Document Save");
@@ -70,7 +70,7 @@ QPEvents::~QPEvents()
{
}
-void QPEvents::slotEventHappened(const QString& name, const QString& argument1, const QString& argument2)
+void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2)
{
if (!quantaApp || !Project::ref()->eventsEnabled())
return;
@@ -79,8 +79,8 @@ void QPEvents::slotEventHappened(const QString& name, const QString& argument1,
if (events->contains(name))
{
m_eventName = name;
- QValueList<EventAction> evList = (*events)[name];
- for (QValueList<EventAction>::Iterator it = evList.begin(); it != evList.end(); ++it)
+ TQValueList<EventAction> evList = (*events)[name];
+ for (TQValueList<EventAction>::Iterator it = evList.begin(); it != evList.end(); ++it)
{
EventAction ev = *it;
if (ev.type == EventAction::Internal)
@@ -131,7 +131,7 @@ void QPEvents::slotEventHappened(const QString& name, const QString& argument1,
}
} else
{
- QString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path();
+ TQString relativePath = QExtFileInfo::toRelative(url, Project::ref()->projectBaseURL()).path();
if (inProject && name == "after_save")
{
ev.arguments << i18n("Document saved");
@@ -230,16 +230,16 @@ bool QPEvents::handleEvent(const EventAction& ev)
{
if (ev.action == "email")
{
- QString receiver = ev.arguments[0];
+ TQString receiver = ev.arguments[0];
TeamMember member;
if (receiver == "teamleader")
member = Project::ref()->teamLeader();
else if (receiver.startsWith("subprojectleader-"))
{
- QString s = receiver.remove("subprojectleader-");
+ TQString s = receiver.remove("subprojectleader-");
member = Project::ref()->subprojectLeader(s);
SubProject subProject;
- QValueList<SubProject> *subprojects = Project::ref()->subprojects();
+ TQValueList<SubProject> *subprojects = Project::ref()->subprojects();
for (uint i = 0 ; i < subprojects->count(); i++)
{
if ((*subprojects)[i].name == s)
@@ -257,16 +257,16 @@ bool QPEvents::handleEvent(const EventAction& ev)
else if (receiver.startsWith("taskleader-"))
member = Project::ref()->taskLeader(receiver.remove("taskleader-"));
- QString body;
+ TQString body;
for (uint i = 2; i < ev.arguments.count(); i++)
body += ev.arguments[i] + "\n";
- kapp->invokeMailer(member.name + "<" + member.email + ">", "", "", ev.arguments[1], body, "", QStringList(), "");
+ kapp->invokeMailer(member.name + "<" + member.email + ">", "", "", ev.arguments[1], body, "", TQStringList(), "");
return true;
}
if (ev.action == "log")
{
- QString logFile = ev.arguments[0];
+ TQString logFile = ev.arguments[0];
KURL url = KURL::fromPathOrURL(logFile);
if (url.isValid() && !url.isLocalFile())
{
@@ -283,7 +283,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
return false;
}
}
- QFile file(url.path());
+ TQFile file(url.path());
bool result;
if (ev.arguments[2] == "create_new")
result = file.open(IO_WriteOnly);
@@ -291,10 +291,10 @@ bool QPEvents::handleEvent(const EventAction& ev)
result = file.open(IO_WriteOnly | IO_Append);
if (result)
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
//Note: the log text should not be translated.
- QString s = QDateTime::currentDateTime().toString(Qt::ISODate) + ": ";
+ TQString s = TQDateTime::currentDateTime().toString(Qt::ISODate) + ": ";
s.append( "Event : " + m_eventName + " : ");
s.append( "Action: " + ev.action + " : ");
if (ev.arguments[1] == "full")
@@ -320,7 +320,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
//KMessageBox::sorry(0L, i18n("External event actions are not yet supported."));
if (ev.action == "script" || ev.action =="action")
{
- QString name = ev.arguments[0];
+ TQString name = ev.arguments[0];
KAction *action = quantaApp->actionCollection()->action(name);
TagAction *tagAction = dynamic_cast<TagAction*>(action);
if (tagAction)
@@ -344,7 +344,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
return false;
}
-QString QPEvents::fullEventName(const QString &name)
+TQString QPEvents::fullEventName(const TQString &name)
{
if (m_eventNames.contains(name))
return m_eventNames[name];
@@ -352,7 +352,7 @@ QString QPEvents::fullEventName(const QString &name)
return name;
}
-QString QPEvents::fullActionName(const QString& name)
+TQString QPEvents::fullActionName(const TQString& name)
{
if (m_actionNames.contains(name))
return m_actionNames[name];
@@ -360,9 +360,9 @@ QString QPEvents::fullActionName(const QString& name)
return name;
}
-QString QPEvents::eventName(const QString &fullName)
+TQString QPEvents::eventName(const TQString &fullName)
{
- for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
{
if (fullName == it.data())
return it.key();
@@ -370,9 +370,9 @@ QString QPEvents::eventName(const QString &fullName)
return fullName;
}
-QString QPEvents::actionName(const QString &fullName)
+TQString QPEvents::actionName(const TQString &fullName)
{
- for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ for (TQMap<TQString, TQString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
{
if (fullName == it.data())
return it.key();
@@ -380,20 +380,20 @@ QString QPEvents::actionName(const QString &fullName)
return fullName;
}
-QStringList QPEvents::eventNames()
+TQStringList QPEvents::eventNames()
{
- QStringList names;
- for (QMap<QString, QString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
+ TQStringList names;
+ for (TQMap<TQString, TQString>::ConstIterator it = m_eventNames.constBegin(); it != m_eventNames.constEnd(); ++it)
{
names << it.data();
}
return names;
}
-QStringList QPEvents::actionNames()
+TQStringList QPEvents::actionNames()
{
- QStringList names;
- for (QMap<QString, QString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
+ TQStringList names;
+ for (TQMap<TQString, TQString>::ConstIterator it = m_actionNames.constBegin(); it != m_actionNames.constEnd(); ++it)
{
names << it.data();
}
diff --git a/quanta/utility/qpevents.h b/quanta/utility/qpevents.h
index 83f6d37b..373ae089 100644
--- a/quanta/utility/qpevents.h
+++ b/quanta/utility/qpevents.h
@@ -17,7 +17,7 @@
#ifndef QPEVENTS_H
#define QPEVENTS_H
-#include <qobject.h>
+#include <tqobject.h>
/**
@author Andras Mantia
@@ -36,10 +36,10 @@ struct EventAction {
this is the name of the script, in case of internal events it can be one of the
following: "email"
*/
- QString action;
+ TQString action;
/** The arguments for the event action. It is different for each action.
*/
- QStringList arguments;
+ TQStringList arguments;
};
/** The configured events. The key is the event name, the data is the event description.
@@ -48,32 +48,32 @@ before a file is saved. Possible key names are: before_save, after_save, after_o
after_project_open, after_project_save, before_upload, after_upload, after_project_add,
after_project_remove, after_commit
*/
-typedef QMap<QString, QValueList<EventAction> > EventActions;
+typedef TQMap<TQString, TQValueList<EventAction> > EventActions;
class QPEvents : public QObject
{
Q_OBJECT
public:
- static QPEvents* const ref(QObject *parent = 0L)
+ static QPEvents* const ref(TQObject *parent = 0L)
{
static QPEvents *m_ref;
if (!m_ref) m_ref = new QPEvents(parent);
return m_ref;
}
~QPEvents();
- QString fullEventName(const QString &name);
- QString fullActionName(const QString &name);
- QString eventName(const QString &fullName);
- QString actionName(const QString &fullName);
- QStringList eventNames();
- QStringList actionNames();
+ TQString fullEventName(const TQString &name);
+ TQString fullActionName(const TQString &name);
+ TQString eventName(const TQString &fullName);
+ TQString actionName(const TQString &fullName);
+ TQStringList eventNames();
+ TQStringList actionNames();
public slots:
/** Called when an event has happened */
- void slotEventHappened(const QString& name, const QString& argument1, const QString& argument2);
+ void slotEventHappened(const TQString& name, const TQString& argument1, const TQString& argument2);
private:
- QPEvents(QObject *parent = 0, const char *name = 0);
+ QPEvents(TQObject *parent = 0, const char *name = 0);
/** Calls the action associated with an event. Returns true if the call succeeded, false
otherwise. The call might fail if:
- the action type is unknown
@@ -82,9 +82,9 @@ private:
*/
bool handleEvent(const EventAction& ev);
- QMap<QString, QString> m_eventNames;
- QMap<QString, QString> m_actionNames;
- QString m_eventName;
+ TQMap<TQString, TQString> m_eventNames;
+ TQMap<TQString, TQString> m_actionNames;
+ TQString m_eventName;
};
#endif
diff --git a/quanta/utility/quantabookmarks.cpp b/quanta/utility/quantabookmarks.cpp
index ebca5843..12ba69c5 100644
--- a/quanta/utility/quantabookmarks.cpp
+++ b/quanta/utility/quantabookmarks.cpp
@@ -31,21 +31,21 @@
#include <ktexteditor/editinterface.h>
#include <ktexteditor/viewcursorinterface.h>
-#include <qregexp.h>
-#include <qmemarray.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqmemarray.h>
+#include <tqevent.h>
#include "viewmanager.h"
#include "document.h"
/**
Utility: selection sort
- sort a QMemArray<uint> in ascending order.
+ sort a TQMemArray<uint> in ascending order.
max it the largest (zerobased) index to sort.
To sort the entire array: ssort( *array, array.size() -1 );
This is only efficient if ran only once.
*/
-static void ssort( QMemArray<uint> &a, int max )
+static void ssort( TQMemArray<uint> &a, int max )
{
uint tmp, j, maxpos;
for ( uint h = max; h >= 1; h-- )
@@ -62,7 +62,7 @@ static void ssort( QMemArray<uint> &a, int max )
// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ?
QuantaBookmarks::QuantaBookmarks(ViewManager *parent,Sorting sort, bool onlyFromActualDocument )
- : QObject( parent, "bookmarks" )
+ : TQObject( parent, "bookmarks" )
, m_sorting(sort)
, m_onlyFromActualDocument(onlyFromActualDocument)
{
@@ -86,38 +86,38 @@ void QuantaBookmarks::init(KActionCollection* ac)
{
m_bookmarkToggle = new KToggleAction(
i18n("Set &Bookmark"), "bookmark", CTRL+Key_B,
- this, SLOT(toggleBookmark()),
+ this, TQT_SLOT(toggleBookmark()),
ac, "bookmarks_toggle" );
m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it."));
m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") );
m_bookmarkClear = new KAction(
i18n("Clear &All Bookmarks"), 0,
- this, SLOT(clearBookmarks()),
+ this, TQT_SLOT(clearBookmarks()),
ac, "bookmarks_clear");
m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document."));
m_goNext = new KAction(
i18n("Next Bookmark"), "next", ALT + Key_PageDown,
- this, SLOT(goNext()),
+ this, TQT_SLOT(goNext()),
ac, "bookmarks_next");
m_goNext->setWhatsThis(i18n("Go to the next bookmark."));
m_goPrevious = new KAction(
i18n("Previous Bookmark"), "previous", ALT + Key_PageUp,
- this, SLOT(goPrevious()),
+ this, TQT_SLOT(goPrevious()),
ac, "bookmarks_previous");
m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark."));
//connect the aboutToShow() and aboutToHide() signals with
//the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots
- connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow()));
- connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) );
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(bookmarkMenuAboutToShow()));
+ connect( m_bookmarksMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(bookmarkMenuAboutToHide()) );
marksChanged ();
}
-void QuantaBookmarks::setBookmarksMenu(QPopupMenu* bookmarksMenu)
+void QuantaBookmarks::setBookmarksMenu(TQPopupMenu* bookmarksMenu)
{
m_bookmarksMenu = bookmarksMenu;
@@ -147,7 +147,7 @@ void QuantaBookmarks::clearBookmarks ()
Document *doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
for (uint i=0; i < m.count(); i++)
doc->markIf->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 );
@@ -156,21 +156,21 @@ void QuantaBookmarks::clearBookmarks ()
}
}
-int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems )
+int QuantaBookmarks::insertBookmarks(TQPopupMenu& menu, Document *doc, bool insertNavigationItems )
{
int insertedItems = 0;
if (doc->markIf)
{
uint line = doc->viewCursorIf->cursorLine();
- const QRegExp re("&(?!&)");
+ const TQRegExp re("&(?!&)");
int idx( -1 );
int old_menu_count = menu.count();
KTextEditor::Mark *next = 0;
KTextEditor::Mark *prev = 0;
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
- QMemArray<uint> sortArray( m.count() );
- QPtrListIterator<KTextEditor::Mark> it( m );
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQMemArray<uint> sortArray( m.count() );
+ TQPtrListIterator<KTextEditor::Mark> it( m );
if ( it.count() > 0 && insertNavigationItems)
menu.insertSeparator();
@@ -179,7 +179,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
{
if( (*it)->type & KTextEditor::MarkInterface::markType01 )
{
- QString bText = KStringHandler::rEmSqueeze
+ TQString bText = KStringHandler::rEmSqueeze
( doc->editIf->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
bText.replace(re, "&&"); // kill undesired accellerators!
@@ -196,7 +196,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
}
menu.insertItem(
- QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
+ TQString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ),
0, (*it)->line, idx );
insertedItems++;
@@ -234,7 +234,7 @@ int QuantaBookmarks::insertBookmarks(QPopupMenu& menu, Document *doc, bool inser
if ( next || prev )
menu.insertSeparator( idx );
}
- connect(&menu, SIGNAL(activated(int)), this, SLOT(gotoLineNumber(int)));
+ connect(&menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(gotoLineNumber(int)));
}
return insertedItems;
}
@@ -259,10 +259,10 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- QValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
+ TQValueList<Document*> openedDocuments = m_viewManager->openedDocuments();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (!m_onlyFromActualDocument)
{
@@ -279,11 +279,11 @@ void QuantaBookmarks::bookmarkMenuAboutToShow()
if (!m_onlyFromActualDocument)
{
int i = 0;
- for (QValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
+ for (TQValueList<Document*>::Iterator it = openedDocuments.begin(); it != openedDocuments.end(); ++it)
{
if (*it != doc)
{
- QPopupMenu *menu = new QPopupMenu(m_bookmarksMenu);
+ TQPopupMenu *menu = new TQPopupMenu(m_bookmarksMenu);
m_bookmarksMenu->insertItem((*it)->url().fileName(), menu);
if (insertBookmarks(*menu, *it, false) > 0)
{
@@ -317,7 +317,7 @@ void QuantaBookmarks::goNext()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -340,7 +340,7 @@ void QuantaBookmarks::goPrevious()
doc = m_viewManager->activeDocument();
if (doc && doc->markIf)
{
- QPtrList<KTextEditor::Mark> m = doc->markIf->marks();
+ TQPtrList<KTextEditor::Mark> m = doc->markIf->marks();
if (m.isEmpty())
return;
@@ -361,7 +361,7 @@ void QuantaBookmarks::gotoLineNumber(int line)
Document *doc = m_doc;
if (!doc)
doc = m_viewManager->activeDocument();
- const QObject *s = sender();
+ const TQObject *s = sender();
for (uint i = 0; i < m_othersMenuList.count(); i++)
{
if (s == m_othersMenuList[i])
diff --git a/quanta/utility/quantabookmarks.h b/quanta/utility/quantabookmarks.h
index 10c0aad4..5170a774 100644
--- a/quanta/utility/quantabookmarks.h
+++ b/quanta/utility/quantabookmarks.h
@@ -24,8 +24,8 @@ Quanta, so it works over multiple document */
#ifndef QUANTABOOKMARKS_H
#define QUANTABOOKMARKS_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
namespace KTextEditor { class Mark; }
@@ -50,14 +50,14 @@ class QuantaBookmarks : public QObject
virtual ~QuantaBookmarks();
void createActions( KActionCollection* );
- void setBookmarksMenu(QPopupMenu* bookmarksMenu);
+ void setBookmarksMenu(TQPopupMenu* bookmarksMenu);
QuantaBookmarks::Sorting sorting() { return m_sorting; };
void setSorting( Sorting s ) { m_sorting = s; };
void setDocument(Document *doc) {m_doc = doc;}
protected:
- int insertBookmarks(QPopupMenu& menu, Document *doc, bool insertNavigationItems = true);
+ int insertBookmarks(TQPopupMenu& menu, Document *doc, bool insertNavigationItems = true);
void init(KActionCollection* ac = 0L);
private slots:
@@ -74,7 +74,7 @@ class QuantaBookmarks : public QObject
void marksChanged ();
signals:
- void gotoFileAndLine(const QString&, int, int);
+ void gotoFileAndLine(const TQString&, int, int);
private:
KToggleAction* m_bookmarkToggle;
@@ -83,9 +83,9 @@ class QuantaBookmarks : public QObject
KAction* m_goPrevious;
Sorting m_sorting;
- QPopupMenu* m_bookmarksMenu;
- QValueList<QPopupMenu*> m_othersMenuList;
- QValueList<Document*> m_others;
+ TQPopupMenu* m_bookmarksMenu;
+ TQValueList<TQPopupMenu*> m_othersMenuList;
+ TQValueList<Document*> m_others;
ViewManager* m_viewManager;
Document *m_doc;
bool m_onlyFromActualDocument;
diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp
index 7cc7fb1b..93421764 100644
--- a/quanta/utility/quantacommon.cpp
+++ b/quanta/utility/quantacommon.cpp
@@ -18,13 +18,13 @@
#include <unistd.h>
//qt includes
-#include <qstringlist.h>
-#include <qdict.h>
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qwidget.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqwidget.h>
//kde includes
#include <kapplication.h>
@@ -48,10 +48,10 @@
#include <ktoolbar.h>
#include <ktoolbarbutton.h>
#include <kstringhandler.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
-#include <qclipboard.h>
-#include <qdatastream.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
+#include <tqclipboard.h>
+#include <tqdatastream.h>
#include "qextfileinfo.h"
#include "quantacommon.h"
@@ -61,22 +61,22 @@
QConfig qConfig; //holds the main configuration settings
-QString tmpDir;
+TQString tmpDir;
-QRegExp scriptBeginRx;
-QRegExp scriptEndRx;
+TQRegExp scriptBeginRx;
+TQRegExp scriptEndRx;
Node *baseNode;
Parser *parser;
KDirWatch *fileWatcher;
KProgress *progressBar;
-QString toolbarExtension = ".toolbar.tgz";
-QRegExp newLineRx("\\n");
-QStringList charList; //hold the list of the &char; chars. See the data/chars file.
-QMap<int, QString> replacementMap;
-QPtrList<KTempFile> tempFileList;
-QPtrList<KTempDir> tempDirList;
+TQString toolbarExtension = ".toolbar.tgz";
+TQRegExp newLineRx("\\n");
+TQStringList charList; //hold the list of the &char; chars. See the data/chars file.
+TQMap<int, TQString> replacementMap;
+TQPtrList<KTempFile> tempFileList;
+TQPtrList<KTempDir> tempDirList;
bool typingInProgress;
QuantaCommon::QuantaCommon(){
@@ -86,9 +86,9 @@ QuantaCommon::~QuantaCommon(){
}
/** convert tag to upper or lower case */
-QString QuantaCommon::tagCase( const QString& tag)
+TQString QuantaCommon::tagCase( const TQString& tag)
{
- QString sTag = tag;
+ TQString sTag = tag;
switch (qConfig.tagCase)
{
@@ -100,9 +100,9 @@ QString QuantaCommon::tagCase( const QString& tag)
}
/** convert attr of tag to upper or lower case */
-QString QuantaCommon::attrCase( const QString& attr)
+TQString QuantaCommon::attrCase( const TQString& attr)
{
- QString sAttr = attr;
+ TQString sAttr = attr;
switch (qConfig.attrCase)
{
@@ -115,14 +115,14 @@ QString QuantaCommon::attrCase( const QString& attr)
/** returns the attribute value in quoted form, by taking care of the
quotation setting*/
-QString QuantaCommon::quoteAttributeValue(const QString& value)
+TQString QuantaCommon::quoteAttributeValue(const TQString& value)
{
- QString quote = qConfig.attrValueQuotation;
+ TQString quote = qConfig.attrValueQuotation;
return quote + value + quote;
}
/** Set's up the url correctly from urlString. */
-void QuantaCommon::setUrl(KURL &url, const QString& urlString)
+void QuantaCommon::setUrl(KURL &url, const TQString& urlString)
{
KURL oldUrl = url;
url = urlString;
@@ -136,7 +136,7 @@ void QuantaCommon::setUrl(KURL &url, const QString& urlString)
}
/** No descriptions */
-bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isSingleTag(const TQString& dtdName, const TQString& tag)
{
bool single = false;
@@ -147,7 +147,7 @@ bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
single = qtag->isSingle();
@@ -157,14 +157,14 @@ bool QuantaCommon::isSingleTag(const QString& dtdName, const QString& tag)
}
/** No descriptions */
-bool QuantaCommon::isOptionalTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isOptionalTag(const TQString& dtdName, const TQString& tag)
{
bool optional = false;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
optional = qtag->isOptional();
@@ -173,14 +173,14 @@ bool QuantaCommon::isOptionalTag(const QString& dtdName, const QString& tag)
return optional;
}
/** No descriptions */
-bool QuantaCommon::isKnownTag(const QString& dtdName, const QString& tag)
+bool QuantaCommon::isKnownTag(const TQString& dtdName, const TQString& tag)
{
bool known = false;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
if (dtd->tagsList->find(searchForTag))
known = true;
}
@@ -188,14 +188,14 @@ bool QuantaCommon::isKnownTag(const QString& dtdName, const QString& tag)
return known;
}
-AttributeList* QuantaCommon::tagAttributes(const QString& dtdName, const QString& tag)
+AttributeList* QuantaCommon::tagAttributes(const TQString& dtdName, const TQString& tag)
{
AttributeList* attrs = 0L;
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
QTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
attrs = qtag->attributes();
@@ -205,19 +205,19 @@ AttributeList* QuantaCommon::tagAttributes(const QString& dtdName, const QString
}
/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
-QTag* QuantaCommon::tagFromDTD(const QString& dtdName, const QString& tag)
+QTag* QuantaCommon::tagFromDTD(const TQString& dtdName, const TQString& tag)
{
const DTDStruct* dtd = DTDs::ref()->find(dtdName);
return tagFromDTD(dtd, tag);
}
/** Returns the QTag object for the tag "tag" from the DTD. */
-QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const QString& tag)
+QTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const TQString& tag)
{
QTag *qtag = 0;
if (dtd && !tag.isEmpty())
{
- QString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
+ TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
qtag = dtd->tagsList->find(searchForTag);
}
@@ -234,18 +234,18 @@ QTag* QuantaCommon::tagFromDTD(Node *node)
}
/** Returns an XML style string containing the GUI for attributes. */
-QString QuantaCommon::xmlFromAttributes(AttributeList* attributes)
+TQString QuantaCommon::xmlFromAttributes(AttributeList* attributes)
{
- QString xmlStr;
- QTextStream stream( &xmlStr, IO_WriteOnly );
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQString xmlStr;
+ TQTextStream stream( &xmlStr, IO_WriteOnly );
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
if (attributes)
{
int row = 0;
for ( uint i = 0; i< attributes->count();i++)
{
Attribute *attribute = attributes->at(i);
- QString name = attribute->name.left(1).upper()+attribute->name.right(attribute->name.length()-1);
+ TQString name = attribute->name.left(1).upper()+attribute->name.right(attribute->name.length()-1);
stream << " <attr name=\"" + attribute->name +"\" type=\""+attribute->type+"\"";
if (!attribute->defaultValue.isEmpty())
stream << " defaultValue=\"" + attribute->defaultValue + "\"";
@@ -301,13 +301,13 @@ KStandardDirs* QuantaCommon::pluginDirs(const char *type)
return dirs;
}
/** Return true, if the url belong to the mimetype group. */
-bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
+bool QuantaCommon::checkMimeGroup(const KURL& url, const TQString& group)
{
KMimeType::List list = KMimeType::allMimeTypes();
KMimeType::List::iterator it;
bool status = false;
KMimeType::Ptr mime = KMimeType::findByURL(url);
- QString mimetype = mime->name();
+ TQString mimetype = mime->name();
mimetype = mimetype.section('/',-1);
for ( it = list.begin(); it != list.end(); ++it )
{
@@ -327,7 +327,7 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
status = true;
} else
{
- QVariant v = mime->property("X-KDE-text");
+ TQVariant v = mime->property("X-KDE-text");
if (v.isValid())
status = v.toBool();
}
@@ -339,10 +339,10 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const QString& group)
}
/** Return true, if the url has the mimetype type. */
-bool QuantaCommon::checkMimeType(const KURL& url, const QString& type)
+bool QuantaCommon::checkMimeType(const KURL& url, const TQString& type)
{
bool status = false;
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
mimetype = mimetype.section('/',-1);
if (mimetype == type) status = true;
@@ -350,10 +350,10 @@ bool QuantaCommon::checkMimeType(const KURL& url, const QString& type)
}
/** Return true, if the url has exactly the mimetype type. */
-bool QuantaCommon::checkExactMimeType(const KURL& url, const QString& type)
+bool QuantaCommon::checkExactMimeType(const KURL& url, const TQString& type)
{
bool status = false;
- QString mimetype = KMimeType::findByURL(url)->name();
+ TQString mimetype = KMimeType::findByURL(url)->name();
if (mimetype == type) status = true;
return status;
@@ -371,15 +371,15 @@ KURL QuantaCommon::convertToPath(const KURL& url)
/** Return a string to be used when an url is saved to the project file.
Returns url.url() if it's an absolute url and
url.path() if the url is relative */
-QString QuantaCommon::qUrl(const KURL &url)
+TQString QuantaCommon::qUrl(const KURL &url)
{
- QString result = url.path();
+ TQString result = url.path();
if (url.path().startsWith("/")) result = url.url();
return result;
}
/** No descriptions */
-void QuantaCommon::dirCreationError(QWidget *widget, const KURL& url)
+void QuantaCommon::dirCreationError(TQWidget *widget, const KURL& url)
{
KMessageBox::error(widget, i18n("<qt>Cannot create folder<br><b>%1</b>.<br>Check that you have write permission in the parent folder or that the connection to<br><b>%2</b><br> is valid.</qt>")
.arg(url.prettyURL(0, KURL::StripFileProtocol))
@@ -388,26 +388,26 @@ void QuantaCommon::dirCreationError(QWidget *widget, const KURL& url)
/**
Adds the backslash before the special chars (like ?, *, . ) so the returned
string can be used in regular expressions.*/
-QString QuantaCommon::makeRxCompatible(const QString& s)
+TQString QuantaCommon::makeRxCompatible(const TQString& s)
{
const uint max = 7;
- const QRegExp rxs[max]={QRegExp("\\?"),
- QRegExp("\\*"),
- QRegExp("\\."),
- QRegExp("\\^"),
- QRegExp("\\$"),
- QRegExp("\\{"),
- QRegExp("\\}")
+ const TQRegExp rxs[max]={TQRegExp("\\?"),
+ TQRegExp("\\*"),
+ TQRegExp("\\."),
+ TQRegExp("\\^"),
+ TQRegExp("\\$"),
+ TQRegExp("\\{"),
+ TQRegExp("\\}")
};
- const QString strs[max]={QString("\\?"),
- QString("\\*"),
- QString("\\."),
- QString("\\^"),
- QString("\\$"),
- QString("\\{"),
- QString("\\}")
+ const TQString strs[max]={TQString("\\?"),
+ TQString("\\*"),
+ TQString("\\."),
+ TQString("\\^"),
+ TQString("\\$"),
+ TQString("\\{"),
+ TQString("\\}")
};
- QString str = s;
+ TQString str = s;
for (uint i = 0; i < max - 1; i++)
{
str.replace(rxs[i], strs[i]);
@@ -417,11 +417,11 @@ QString QuantaCommon::makeRxCompatible(const QString& s)
}
/** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
-QString QuantaCommon::i18n2normal(const QString& a_str)
+TQString QuantaCommon::i18n2normal(const TQString& a_str)
{
-//TODO: a QMap lookup would be faster, but we need a pre-built QMap<QString,QString>
+//TODO: a TQMap lookup would be faster, but we need a pre-built TQMap<TQString,TQString>
const int keywordNum = 15 *5;
- const QString keywords[keywordNum] =
+ const TQString keywords[keywordNum] =
{"normal", "italic", "oblique", "serif", "sans-serif",
"cursive", "fantasy", "monospace", "small-caps", "lighter",
"bold", "bolder", "xx-small", "x-small", "small",
@@ -437,7 +437,7 @@ QString QuantaCommon::i18n2normal(const QString& a_str)
"none", "pre", "nowrap", "disc", "circle",
"square", "decimal", "lower-roman","upper-roman","lower-alpha",
"upper-alpha","inside","outside", "auto", "both" };
- QString str = a_str;
+ TQString str = a_str;
if (!a_str.isEmpty())
{
for (int i = 0; i < keywordNum; i++)
@@ -452,15 +452,15 @@ QString QuantaCommon::i18n2normal(const QString& a_str)
return str;
}
-static const QChar space(' ');
+static const TQChar space(' ');
-void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
+void QuantaCommon::removeCommentsAndQuotes(TQString &str, const DTDStruct *dtd)
{
//Replace all the commented strings and the escaped quotation marks (\", \')
// with spaces so they will not mess up our parsing
int pos = 0;
int l;
- QString s;
+ TQString s;
while (pos != -1)
{
pos = dtd->commentsStartRx.search(str, pos);
@@ -500,7 +500,7 @@ void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
}
//Now replace the quoted strings with spaces
- QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ TQRegExp strRx("(\"[^\"]*\"|'[^']*')");
pos = 0;
while (pos != -1)
{
@@ -518,13 +518,13 @@ void QuantaCommon::removeCommentsAndQuotes(QString &str, const DTDStruct *dtd)
}
-bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd)
+bool QuantaCommon::insideCommentsOrQuotes(int position, const TQString &string, const DTDStruct *dtd)
{
//Return true if position is inside a commented or quoted string
- QString str = string;
+ TQString str = string;
int pos = 0;
int l;
- QString s;
+ TQString s;
while (pos != -1)
{
pos = dtd->commentsStartRx.search(str, pos);
@@ -568,7 +568,7 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, c
}
//Now replace the quoted strings with spaces
- const QRegExp strRx("(\"[^\"]*\"|'[^']*')");
+ const TQRegExp strRx("(\"[^\"]*\"|'[^']*')");
pos = 0;
while (pos != -1)
{
@@ -589,14 +589,14 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const QString &string, c
return false;
}
-DCOPReply QuantaCommon::callDCOPMethod(const QString& interface, const QString& method, const QString& arguments)
+DCOPReply QuantaCommon::callDCOPMethod(const TQString& interface, const TQString& method, const TQString& arguments)
{
- QStringList argumentList = QStringList::split(",", arguments, true);
- QString app = "quanta";
+ TQStringList argumentList = TQStringList::split(",", arguments, true);
+ TQString app = "quanta";
if (!kapp->inherits("KUniqueApplication"))
{
pid_t pid = ::getpid();
- app += QString("-%1").arg(pid);
+ app += TQString("-%1").arg(pid);
}
DCOPRef quantaRef(app.utf8(), interface.utf8());
DCOPReply reply;
@@ -627,7 +627,7 @@ DCOPReply QuantaCommon::callDCOPMethod(const QString& interface, const QString&
return reply;
}
-void QuantaCommon::normalizeStructure(QString f,QStringList& l)
+void QuantaCommon::normalizeStructure(TQString f,TQStringList& l)
{
f.remove("\t");
f.remove("\n");
@@ -635,7 +635,7 @@ void QuantaCommon::normalizeStructure(QString f,QStringList& l)
while(f.contains("<"))
{
- QString z(f);
+ TQString z(f);
z.truncate(z.find(">")+1);
z.remove(0,z.find("<"));
f.remove(0,f.find(">")+1);
@@ -649,26 +649,26 @@ bool QuantaCommon::closesTag(Tag *tag1, Tag *tag2)
{
if (!tag2->nameSpace.isEmpty())
return false; //namespace missmatch
- QString tag1Name = tag1->dtd()->caseSensitive ? tag1->name : tag1->name.upper();
- QString tag2Name = tag2->dtd()->caseSensitive ? tag2->name : tag2->name.upper();
+ TQString tag1Name = tag1->dtd()->caseSensitive ? tag1->name : tag1->name.upper();
+ TQString tag2Name = tag2->dtd()->caseSensitive ? tag2->name : tag2->name.upper();
if ("/" + tag1Name != tag2Name)
return false; //not the closing tag
} else
{
if (tag2->nameSpace.isEmpty())
return false; //namespace missmatch
- QString tag1Name = tag1->dtd()->caseSensitive ? (tag1->nameSpace + tag1->name) : (tag1->nameSpace.upper() + tag1->name.upper());
- QString tag2Name = tag2->dtd()->caseSensitive ? (tag2->nameSpace + tag2->name) : (tag2->nameSpace.upper() + tag2->name.upper());
+ TQString tag1Name = tag1->dtd()->caseSensitive ? (tag1->nameSpace + tag1->name) : (tag1->nameSpace.upper() + tag1->name.upper());
+ TQString tag2Name = tag2->dtd()->caseSensitive ? (tag2->nameSpace + tag2->name) : (tag2->nameSpace.upper() + tag2->name.upper());
if ("/" + tag1Name != tag2Name)
return false; //namespace missmatch or not the closing tag
}
return true;
}
-bool QuantaCommon::closesTag(QString namespaceName, QString tagName, bool caseSensitive,
- QString namespaceName2, QString tagName2, bool caseSensitive2)
+bool QuantaCommon::closesTag(TQString namespaceName, TQString tagName, bool caseSensitive,
+ TQString namespaceName2, TQString tagName2, bool caseSensitive2)
{
- QString tag1Name, tag2Name;
+ TQString tag1Name, tag2Name;
if(namespaceName.isEmpty())
{
if(!namespaceName.isEmpty())
@@ -692,7 +692,7 @@ bool QuantaCommon::closesTag(QString namespaceName, QString tagName, bool caseSe
return true;
}
-int QuantaCommon::denyBinaryInsert(QWidget *window)
+int QuantaCommon::denyBinaryInsert(TQWidget *window)
{
int result = KMessageBox::questionYesNo(window, i18n("The file type is not recognized. \
Opening binary files may confuse Quanta.\n Are you sure you want to open this file?"),
@@ -700,25 +700,25 @@ int QuantaCommon::denyBinaryInsert(QWidget *window)
return result;
}
-bool QuantaCommon::checkOverwrite(const KURL& url, QWidget *window)
+bool QuantaCommon::checkOverwrite(const KURL& url, TQWidget *window)
{
bool result = true;
if (QExtFileInfo::exists(url, false, window))
{
if (KMessageBox::warningContinueCancel(window,
- i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), QString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ i18n( "<qt>The file <b>%1</b> already exists.<br>Do you want to overwrite it?</qt>" ).arg(url.prettyURL(0, KURL::StripFileProtocol)), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
result = false;
}
return result;
}
-QStringList QuantaCommon::readPathListEntry(KConfig *config, const QString &pKey)
+TQStringList QuantaCommon::readPathListEntry(KConfig *config, const TQString &pKey)
{
- QStringList list = config->readPathListEntry(pKey);
- QStringList::Iterator end = list.end();
- for (QStringList::Iterator it = list.begin(); it != end; ++it)
+ TQStringList list = config->readPathListEntry(pKey);
+ TQStringList::Iterator end = list.end();
+ for (TQStringList::Iterator it = list.begin(); it != end; ++it)
{
KURL u = KURL::fromPathOrURL(*it);
if (u.isValid() && u.isLocalFile())
@@ -730,9 +730,9 @@ QStringList QuantaCommon::readPathListEntry(KConfig *config, const QString &pKey
return list;
}
-QString QuantaCommon::readPathEntry(KConfig *config, const QString &pKey)
+TQString QuantaCommon::readPathEntry(KConfig *config, const TQString &pKey)
{
- QString path = config->readPathEntry(pKey);
+ TQString path = config->readPathEntry(pKey);
KURL u = KURL::fromPathOrURL(path);
if (u.isValid() && u.isLocalFile())
{
@@ -742,12 +742,12 @@ QString QuantaCommon::readPathEntry(KConfig *config, const QString &pKey)
return path;
}
-QString QuantaCommon::encodedChar(uint code)
+TQString QuantaCommon::encodedChar(uint code)
{
if (replacementMap.contains(code))
- return QString("%1;").arg(replacementMap[code]);
+ return TQString("%1;").arg(replacementMap[code]);
else
- return QString("&#%1;").arg(code);
+ return TQString("&#%1;").arg(code);
}
diff --git a/quanta/utility/quantacommon.h b/quanta/utility/quantacommon.h
index a88276b7..c9e283fa 100644
--- a/quanta/utility/quantacommon.h
+++ b/quanta/utility/quantacommon.h
@@ -26,7 +26,7 @@
*@author Andras Mantia
*/
-#define DEFAULT_DTD QString("-//W3C//DTD HTML 4.01 Transitional//EN")
+#define DEFAULT_DTD TQString("-//W3C//DTD HTML 4.01 Transitional//EN")
class QString;
class DCOPReply;
@@ -42,8 +42,8 @@ class KPopupMenu;
class Abbreviation{
public:
/*A list with abbreviations in the for of: <template templatename, code> */
- QMap<QString, QString> abbreviations;
- QStringList dteps;
+ TQMap<TQString, TQString> abbreviations;
+ TQStringList dteps;
};
@@ -53,7 +53,7 @@ public:
//Tag style options
uint tagCase;
uint attrCase;
- QChar attrValueQuotation;
+ TQChar attrValueQuotation;
bool closeOptionalTags;
bool closeTags;
bool updateClosingTags;
@@ -61,17 +61,17 @@ public:
//editor settings
bool useAutoCompletion;
bool enableDTDToolbar;
- QString defaultEncoding;
+ TQString defaultEncoding;
//parser options
bool instantUpdate;
bool showEmptyNodes;
bool showClosingTags;
uint refreshFrequency;
- QString defaultDocType;
+ TQString defaultDocType;
uint expandLevel;
bool showDTDSelectDialog;
- QString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed
+ TQString showCloseButtons; ///< can be Disabled, ShowAlways or ShowDelayed
uint toolviewTabs; ///< how does the toolview tabs look like
//kafka sync options
@@ -84,30 +84,30 @@ public:
bool inlineNodeIndentation;
//environment options
- QString globalDataDir; //not stored, initialized on app startup
- QStringList pluginSearchPaths; //global but read from plugins.rc
- QString markupMimeTypes;
- QString scriptMimeTypes;
- QString imageMimeTypes;
- QString textMimeTypes;
- QString previewPosition;
- QString docPosition;
- QString windowLayout;
+ TQString globalDataDir; //not stored, initialized on app startup
+ TQStringList pluginSearchPaths; //global but read from plugins.rc
+ TQString markupMimeTypes;
+ TQString scriptMimeTypes;
+ TQString imageMimeTypes;
+ TQString textMimeTypes;
+ TQString previewPosition;
+ TQString docPosition;
+ TQString windowLayout;
uint autosaveInterval;
- QString backupDirPath;
- QString quantaPID;
+ TQString backupDirPath;
+ TQString quantaPID;
bool showHiddenFiles; ///< show hidden files in files treeview?
bool saveTrees; ///< save tree status for local trees?
- QMap<QString, Abbreviation> abbreviations; ///< the abbreviation groups
+ TQMap<TQString, Abbreviation> abbreviations; ///< the abbreviation groups
bool replaceAccented; ///< replace or not the accented characters
bool replaceNotInEncoding; ///< replace characters with their entity number if they cannot be saved in the current encoding of the document.
bool smartTagInsertion; //enable/disable smartTagInsertion
};
typedef struct DirInfo{
- QString mimeType;
- QString preText;
- QString postText;
+ TQString mimeType;
+ TQString preText;
+ TQString postText;
bool usePrePostText;
};
@@ -121,30 +121,30 @@ public:
~QuantaCommon();
/** convert tag to upper or lower case */
- static QString tagCase( const QString& tag);
+ static TQString tagCase( const TQString& tag);
/** convert tag to upper or lower case */
- static QString attrCase( const QString& attr);
+ static TQString attrCase( const TQString& attr);
/** returns the attribute value in quoted form, by taking care of the
quotation setting*/
- static QString quoteAttributeValue(const QString& value);
+ static TQString quoteAttributeValue(const TQString& value);
/** Set's up the url correctly from urlString. */
- static void setUrl(KURL &url, const QString& urlString);
+ static void setUrl(KURL &url, const TQString& urlString);
/** No descriptions */
- static bool isSingleTag(const QString& dtdName, const QString& tag);
+ static bool isSingleTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static bool isOptionalTag(const QString& dtdName, const QString& tag);
+ static bool isOptionalTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static bool isKnownTag(const QString& dtdName, const QString& tag);
+ static bool isKnownTag(const TQString& dtdName, const TQString& tag);
/** No descriptions */
- static AttributeList* tagAttributes(const QString& dtdName, const QString& tag);
+ static AttributeList* tagAttributes(const TQString& dtdName, const TQString& tag);
/** Returns the QTag object for the tag "tag" from the DTD named "dtdname". */
- static QTag* tagFromDTD(const QString& dtdName, const QString& tag);
+ static QTag* tagFromDTD(const TQString& dtdName, const TQString& tag);
/** Returns the QTag object for the tag "tag" from the DTD. */
- static QTag* tagFromDTD(const DTDStruct* dtd, const QString& tag);
+ static QTag* tagFromDTD(const DTDStruct* dtd, const TQString& tag);
/** Returns the QTag object for the node "node" from node's DTD. */
static QTag* tagFromDTD(Node *node);
/** Returns an XML style string containing the GUI for attributes. */
- static QString xmlFromAttributes(AttributeList* attributes);
+ static TQString xmlFromAttributes(AttributeList* attributes);
/** Returns 0 if the (line,col) is inside the area specified by the other arguments,
-1 if it is before the area and 1 if it is after. */
static int isBetween(int line, int col, int bLine, int bCol, int eLine, int eCol);
@@ -153,47 +153,47 @@ pointer must be deleted by the caller!! */
static KStandardDirs* pluginDirs(const char *type);
/** Return true, if the url has the mimetype starting with type. */
- static bool checkMimeGroup(const KURL& url, const QString& type);
+ static bool checkMimeGroup(const KURL& url, const TQString& type);
/** Return true, if the url has the mimetype type. */
- static bool checkMimeType(const KURL& url, const QString& type);
+ static bool checkMimeType(const KURL& url, const TQString& type);
/** Return true, if the url has exactly the mimetype type. */
- static bool checkExactMimeType(const KURL& url, const QString& type);
+ static bool checkExactMimeType(const KURL& url, const TQString& type);
/** Returns the url without the filename. */
static KURL convertToPath(const KURL& url);
/** Return a string to be used when an url is saved to the project file.
Returns url.url() if it's an absolute url and
url.path() if the url is relative */
- static QString qUrl(const KURL& url);
+ static TQString qUrl(const KURL& url);
/** No descriptions */
- static void dirCreationError(QWidget *widget, const KURL& url);
+ static void dirCreationError(TQWidget *widget, const KURL& url);
/**
Adds the backslash before the special chars (like ?, *, . ) so the returned string can be used in regular expressions.
*/
- static QString makeRxCompatible(const QString& s);
+ static TQString makeRxCompatible(const TQString& s);
/** Returns the translated a_str in English. A "back-translation" useful e.g in case of CSS elements selected from a listbox. */
- static QString i18n2normal(const QString& a_str);
+ static TQString i18n2normal(const TQString& a_str);
/** No descriptions */
- static void normalizeStructure(QString f,QStringList& l);
+ static void normalizeStructure(TQString f,TQStringList& l);
/**Returns true if tag2 is the closing pair of tag1. It's namespace aware.*/
static bool closesTag(Tag *tag1, Tag *tag2);
- static bool closesTag(QString namespaceName, QString tagName, bool caseSensitive,
- QString namespaceName2, QString tagName2, bool caseSensitive2);
- static int denyBinaryInsert(QWidget *window);
- static void removeCommentsAndQuotes(QString& str, const DTDStruct* dtd);
- static bool insideCommentsOrQuotes(int position, const QString &string, const DTDStruct *dtd);
+ static bool closesTag(TQString namespaceName, TQString tagName, bool caseSensitive,
+ TQString namespaceName2, TQString tagName2, bool caseSensitive2);
+ static int denyBinaryInsert(TQWidget *window);
+ static void removeCommentsAndQuotes(TQString& str, const DTDStruct* dtd);
+ static bool insideCommentsOrQuotes(int position, const TQString &string, const DTDStruct *dtd);
/** Calls a Quanta DCOP method.
* @param interface the DCOP interface the method belongs to
* @param method the DCOP method name (with the argument types)
* @param arguments comma separated list of argument
* @return the return value of the DCOP caller
*/
- static DCOPReply callDCOPMethod(const QString& interface, const QString& method, const QString& arguments);
+ static DCOPReply callDCOPMethod(const TQString& interface, const TQString& method, const TQString& arguments);
/** Checks if url exists and shows a question about overwriting it.
* @param url the url to check
* @return true if the user answered yes, false otherwise.
*/
- static bool checkOverwrite(const KURL& url, QWidget *window);
+ static bool checkOverwrite(const KURL& url, TQWidget *window);
/**
* Same as KConfigBase::readPathListEntry, but resolves symlinks
@@ -201,7 +201,7 @@ pointer must be deleted by the caller!! */
* @param pKey
* @return
*/
- static QStringList readPathListEntry(KConfig *config, const QString &pKey);
+ static TQStringList readPathListEntry(KConfig *config, const TQString &pKey);
/**
* Same as KConfigBase::readPathEntry, but resolves symlinks
@@ -209,7 +209,7 @@ pointer must be deleted by the caller!! */
* @param pKey
* @return
*/
- static QString readPathEntry(KConfig *config, const QString &pKey);
+ static TQString readPathEntry(KConfig *config, const TQString &pKey);
/**
* Returns the HTML encoding string for character with the specified code.
@@ -218,7 +218,7 @@ pointer must be deleted by the caller!! */
* @param code the numeric code of the character
* @return the encoded string
*/
- static QString encodedChar(uint code);
+ static TQString encodedChar(uint code);
};
diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp
index 095f9e08..dbaf1ce3 100644
--- a/quanta/utility/quantanetaccess.cpp
+++ b/quanta/utility/quantanetaccess.cpp
@@ -13,9 +13,9 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qwidget.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqdir.h>
#include <kio/netaccess.h>
#include <kurl.h>
@@ -28,7 +28,7 @@
#include "quantanetaccess.h"
#include "project.h"
-bool QuantaNetAccess::upload(const QString& src, const KURL& target, QWidget* window, bool confirm)
+bool QuantaNetAccess::upload(const TQString& src, const KURL& target, TQWidget* window, bool confirm)
{
bool ok = KIO::NetAccess::upload(src, target, window);
if (ok) {
@@ -42,7 +42,7 @@ bool QuantaNetAccess::upload(const QString& src, const KURL& target, QWidget* wi
bool QuantaNetAccess::file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm)
+ bool overwrite, bool resume, TQWidget* window, bool confirm)
{
bool ok = KIO::NetAccess::file_copy( src, target, permissions, overwrite, resume, window );
if (ok) {
@@ -56,7 +56,7 @@ bool QuantaNetAccess::file_copy( const KURL& src, const KURL& target, int permis
bool QuantaNetAccess::file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm)
+ bool overwrite, bool resume, TQWidget* window, bool confirm)
{
// don't ask if move is inside of the project
bool oldConfirm = confirm;
@@ -79,7 +79,7 @@ bool QuantaNetAccess::file_move( const KURL& src, const KURL& target, int permis
}
-bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm )
+bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window, bool confirm )
{
bool ok = KIO::NetAccess::dircopy( srcList, target, window );
if (ok) {
@@ -98,7 +98,7 @@ bool QuantaNetAccess::dircopy( const KURL::List & srcList, const KURL & target,
}
-bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm )
+bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, TQWidget* window, bool confirm )
{
KURL targetURL = adjustURL(target);
bool oldConfirm = confirm;
@@ -142,7 +142,7 @@ bool QuantaNetAccess::move( const KURL::List& srcList, const KURL& target, QWidg
}
-bool QuantaNetAccess::del( const KURL & url, QWidget* window, bool confirm )
+bool QuantaNetAccess::del( const KURL & url, TQWidget* window, bool confirm )
{
if ( !checkProjectDel(url, window, confirm)) {
return false;
@@ -156,7 +156,7 @@ bool QuantaNetAccess::del( const KURL & url, QWidget* window, bool confirm )
}
-bool QuantaNetAccess::mkdir( const KURL & url, QWidget* window, int permissions, bool confirm )
+bool QuantaNetAccess::mkdir( const KURL & url, TQWidget* window, int permissions, bool confirm )
{
KURL u = url;
u.adjustPath(-1); //some servers refuse to create directories ending with a slash
@@ -171,7 +171,7 @@ bool QuantaNetAccess::mkdir( const KURL & url, QWidget* window, int permissions,
}
-void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bool confirm)
+void QuantaNetAccess::checkProjectInsert(const KURL& target, TQWidget* window, bool confirm)
{
if ( !Project::ref()->hasProject()) return;
KURL saveUrl = adjustURL(target);
@@ -180,7 +180,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bo
{
if (confirm)
{
- QString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path();
+ TQString nice = QExtFileInfo::toRelative(saveUrl, baseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( KMessageBox::Yes != KMessageBox::questionYesNo(window, i18n("<qt>Do you want to add <br><b>%1</b><br> to the project?</qt>").arg(nice), i18n("Add to Project"), KStdGuiItem::add(), i18n("Do Not Add"), "AddToProject") )
{
@@ -196,7 +196,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, QWidget* window, bo
}
-bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool confirm, bool remove)
+bool QuantaNetAccess::checkProjectRemove(const KURL& src, TQWidget* window, bool confirm, bool remove)
{
if ( !Project::ref()->hasProject() ) return true;
KURL url = adjustURL(src);
@@ -205,7 +205,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool
{
if (confirm)
{
- QString nice = QExtFileInfo::toRelative(url, baseURL).path();
+ TQString nice = QExtFileInfo::toRelative(url, baseURL).path();
nice = KStringHandler::lsqueeze(nice, 60);
if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to remove <br><b>%1</b><br> from the project?</qt>").arg(nice), i18n("Remove From Project"), KStdGuiItem::remove(), "RemoveFromProject") )
{
@@ -219,7 +219,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, QWidget* window, bool
}
-bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool confirm)
+bool QuantaNetAccess::checkProjectDel(const KURL& src, TQWidget* window, bool confirm)
{
KURL url = adjustURL(src);
if ( Project::ref()->hasProject() )
@@ -228,7 +228,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool con
{
if (confirm)
{
- QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ TQString nice = url.prettyURL(0, KURL::StripFileProtocol);
nice = KStringHandler::csqueeze(nice, 60);
if ( KMessageBox::Continue != KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b><br> and remove it from the project?</qt>").arg(nice), i18n("Delete & Remove From Project"), KStdGuiItem::del(), "DeleteAndRemoveFromProject") )
{
@@ -241,7 +241,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, QWidget* window, bool con
}
// confirm normal delete if wanted
if (confirm) {
- QString nice = url.prettyURL(0, KURL::StripFileProtocol);
+ TQString nice = url.prettyURL(0, KURL::StripFileProtocol);
nice = KStringHandler::csqueeze(nice, 60);
return (KMessageBox::Continue == KMessageBox::warningContinueCancel(window, i18n("<qt>Do you really want to delete <br><b>%1</b>?</qt>").arg(nice), i18n("Delete File or Folder"), KStdGuiItem::del(), "DeleteFileOrFolder") );
}
@@ -253,16 +253,16 @@ KURL QuantaNetAccess::adjustURL(const KURL &url)
KURL u = url;
if ( u.isLocalFile() )
{
- QDir dir(u.path());
+ TQDir dir(u.path());
u.setPath(dir.canonicalPath());
}
return u;
}
-void QuantaNetAccess::errorMsg(QWidget* window)
+void QuantaNetAccess::errorMsg(TQWidget* window)
{
- QString msg = KIO::NetAccess::lastErrorString();
+ TQString msg = KIO::NetAccess::lastErrorString();
if ( !msg.isEmpty())
KMessageBox::sorry(window, msg);
}
diff --git a/quanta/utility/quantanetaccess.h b/quanta/utility/quantanetaccess.h
index abdedc86..244b92ae 100644
--- a/quanta/utility/quantanetaccess.h
+++ b/quanta/utility/quantanetaccess.h
@@ -32,50 +32,50 @@ class QuantaNetAccess
{
public:
- static bool upload(const QString& src, const KURL& target, QWidget* window, bool confirm = true);
+ static bool upload(const TQString& src, const KURL& target, TQWidget* window, bool confirm = true);
- static bool copy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ static bool copy( const KURL & src, const KURL & target, TQWidget* window, bool confirm = true )
{
return file_copy( src, target, -1, false /*not overwrite*/, false, window, confirm );
}
static bool file_copy( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm = true );
+ bool overwrite, bool resume, TQWidget* window, bool confirm = true );
static bool file_move( const KURL& src, const KURL& target, int permissions,
- bool overwrite, bool resume, QWidget* window, bool confirm = true );
+ bool overwrite, bool resume, TQWidget* window, bool confirm = true );
- static bool dircopy( const KURL & src, const KURL & target, QWidget* window, bool confirm = true )
+ static bool dircopy( const KURL & src, const KURL & target, TQWidget* window, bool confirm = true )
{
KURL::List srcList;
srcList.append( src );
return dircopy( srcList, target, window, confirm );
};
- static bool dircopy( const KURL::List & srcList, const KURL & target, QWidget* window, bool confirm = true );
+ static bool dircopy( const KURL::List & srcList, const KURL & target, TQWidget* window, bool confirm = true );
- static bool move( const KURL& src, const KURL& target, QWidget* window, bool confirm = true )
+ static bool move( const KURL& src, const KURL& target, TQWidget* window, bool confirm = true )
{
KURL::List srcList;
srcList.append( src );
return move( srcList, target, window, confirm );
}
- static bool move( const KURL::List& srcList, const KURL& target, QWidget* window, bool confirm = true );
+ static bool move( const KURL::List& srcList, const KURL& target, TQWidget* window, bool confirm = true );
- static bool del( const KURL & url, QWidget* window, bool confirm = true );
+ static bool del( const KURL & url, TQWidget* window, bool confirm = true );
- static bool mkdir( const KURL & url, QWidget* window, int permissions, bool confirm = true );
+ static bool mkdir( const KURL & url, TQWidget* window, int permissions, bool confirm = true );
- static void checkProjectInsert(const KURL& target, QWidget* window, bool confirm = true);
+ static void checkProjectInsert(const KURL& target, TQWidget* window, bool confirm = true);
- static bool checkProjectRemove(const KURL& target, QWidget* window, bool confirm = true, bool remove = true);
+ static bool checkProjectRemove(const KURL& target, TQWidget* window, bool confirm = true, bool remove = true);
- static bool checkProjectDel(const KURL& target, QWidget* window, bool confirm = true);
+ static bool checkProjectDel(const KURL& target, TQWidget* window, bool confirm = true);
static KURL adjustURL(const KURL &url);
- static void errorMsg(QWidget* window = 0);
+ static void errorMsg(TQWidget* window = 0);
private:
QuantaNetAccess() {};
diff --git a/quanta/utility/resource.h b/quanta/utility/resource.h
index 3f09946e..72160dac 100644
--- a/quanta/utility/resource.h
+++ b/quanta/utility/resource.h
@@ -33,25 +33,25 @@ struct DTDStruct;
extern QConfig qConfig;
-extern QString tmpDir;
+extern TQString tmpDir;
-extern QRegExp scriptBeginRx;
-extern QRegExp scriptEndRx;
+extern TQRegExp scriptBeginRx;
+extern TQRegExp scriptEndRx;
extern Node *baseNode;
extern Parser *parser;
extern KDirWatch *fileWatcher;
-extern QString toolbarExtension;
-extern QRegExp newLineRx;
-extern QStringList charList; //hold the list of the &char; chars. See the data/chars file.
-extern QPtrList<KTempFile> tempFileList;
-extern QPtrList<KTempDir> tempDirList;
+extern TQString toolbarExtension;
+extern TQRegExp newLineRx;
+extern TQStringList charList; //hold the list of the &char; chars. See the data/chars file.
+extern TQPtrList<KTempFile> tempFileList;
+extern TQPtrList<KTempDir> tempDirList;
extern KProgress *progressBar;
extern QuantaApp *quantaApp;
-extern const QString resourceDir;
+extern const TQString resourceDir;
extern bool typingInProgress;
extern int nodeNum;
diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp
index 98bcf87c..28d37450 100644
--- a/quanta/utility/tagaction.cpp
+++ b/quanta/utility/tagaction.cpp
@@ -21,10 +21,10 @@
//qt includes
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtimer.h>
//kde includes
#include <kapplication.h>
@@ -72,8 +72,8 @@ int MyProcess::commSetupDoneC()
return KProcess::commSetupDoneC();
}
-TagAction::TagAction( QDomElement *element, KMainWindow *parentMainWindow, bool toggle)
- : KToggleAction(element->attribute("text").isEmpty() ? QString("") : i18n(element->attribute("text").utf8()),
+TagAction::TagAction( TQDomElement *element, KMainWindow *parentMainWindow, bool toggle)
+ : KToggleAction(element->attribute("text").isEmpty() ? TQString("") : i18n(element->attribute("text").utf8()),
KShortcut(element->attribute("shortcut")), 0, 0, parentMainWindow->actionCollection(), element->attribute("name")),
//disable toggle now m_toggle(toggle)
m_toggle(false)
@@ -84,31 +84,31 @@ TagAction::TagAction( QDomElement *element, KMainWindow *parentMainWindow, bool
m_useInputFile = false;
m_useOutputFile = false;
tag = element->cloneNode().toElement();
- QString s = tag.attribute("icon");
- if (!QFileInfo(s).exists())
+ TQString s = tag.attribute("icon");
+ if (!TQFileInfo(s).exists())
{
- s = QFileInfo(s).fileName();
+ s = TQFileInfo(s).fileName();
}
setIcon(s);
m_file = 0L;
loopStarted = false;
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
- connect(this, SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)),
- SLOT(slotActionActivated(KAction::ActivationReason, Qt::ButtonState)));
+ connect(this, TQT_SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)),
+ TQT_SLOT(slotActionActivated(KAction::ActivationReason, Qt::ButtonState)));
#else
- connect(this, SIGNAL(activated()), SLOT(slotActionActivated()));
+ connect(this, TQT_SIGNAL(activated()), TQT_SLOT(slotActionActivated()));
#endif
- connect(this, SIGNAL(showMessage(const QString&, bool)), m_parentMainWindow, SIGNAL(showMessage(const QString&, bool)));
- connect(this, SIGNAL(clearMessages()), m_parentMainWindow, SIGNAL(clearMessages()));
- connect(this, SIGNAL(showMessagesView()), m_parentMainWindow, SLOT(slotShowMessagesView()));
- connect(this, SIGNAL(createNewFile()), m_parentMainWindow, SLOT(slotFileNew()));
+ connect(this, TQT_SIGNAL(showMessage(const TQString&, bool)), m_parentMainWindow, TQT_SIGNAL(showMessage(const TQString&, bool)));
+ connect(this, TQT_SIGNAL(clearMessages()), m_parentMainWindow, TQT_SIGNAL(clearMessages()));
+ connect(this, TQT_SIGNAL(showMessagesView()), m_parentMainWindow, TQT_SLOT(slotShowMessagesView()));
+ connect(this, TQT_SIGNAL(createNewFile()), m_parentMainWindow, TQT_SLOT(slotFileNew()));
}
TagAction::~TagAction()
{
}
-QString TagAction::type()
+TQString TagAction::type()
{
return tag.attribute("type","");
}
@@ -125,22 +125,22 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
w->viewCursorIf->cursorPositionReal(&line, &col);
NodeModifsSet* modifs = new NodeModifsSet();
- QString space;
+ TQString space;
space.fill( ' ', col);
- QString type = tag.attribute("type","");
+ TQString type = tag.attribute("type","");
if ( type == "tag" && view->hadLastFocus() == QuantaView::VPLFocus && toggable())
{
KafkaWidget* kafka_widget = KafkaDocument::ref()->getKafkaWidget();
- QString tag_name = XMLTagName();
+ TQString tag_name = XMLTagName();
NodeSelectionInd selection;
selection.fillWithVPLCursorSelection();
Node* start_node = 0, *end_node = 0, *current_node = 0;
int start_offset = 0, end_offset = 0, current_offset = 0;
- QString scope;
+ TQString scope;
if(kafka_widget->hasSelection())
{
// get selection
@@ -217,8 +217,8 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
else if(inside_tag == 1)
{
- QString attribute_name(tag.attribute("attribute_name", QString()));
- QString attribute_value(tag.attribute("attribute_value", QString()));
+ TQString attribute_name(tag.attribute("attribute_name", TQString()));
+ TQString attribute_value(tag.attribute("attribute_value", TQString()));
// special case
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
@@ -235,7 +235,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
if(aux1 == tag_parent && aux2 == tag_parent->getClosingNode())
{
if(tag_parent->tag->attributeValue(attribute_name, true) == attribute_value)
- kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, TQString(), modifs);
else
kafkaCommon::editNodeAttribute(tag_parent, attribute_name, attribute_value, modifs);
}
@@ -255,10 +255,10 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
if ( type == "tag" ) {
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -266,7 +266,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
attr = attr.stripWhiteSpace();
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
attr = attr.remove(0,i).stripWhiteSpace();
if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
@@ -275,7 +275,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
}
else
{
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -292,7 +292,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
s1.append(">");
}
- QString s2;
+ TQString s2;
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -324,12 +324,12 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
proc = new MyProcess();
proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
- QDomElement script = tag.namedItem("script").toElement();
- QString command = script.text();
+ TQDomElement script = tag.namedItem("script").toElement();
+ TQString command = script.text();
if ( !w->isUntitled() ) {
- QString fname = w->url().url();
+ TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
command.replace("%f", fname );
@@ -338,13 +338,13 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.replace("%pid", QString("unique %1").arg(pid));
+ command.replace("%pid", TQString("unique %1").arg(pid));
} else
{
- command.replace("%pid", QString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").arg(pid));
}
- QString buffer;
- QString inputType = script.attribute("input","none");
+ TQString buffer;
+ TQString inputType = script.attribute("input","none");
if ( inputType == "current" ) {
buffer = w->editIf->text();
@@ -355,7 +355,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
command.replace("%input", buffer);
command = command.stripWhiteSpace();
int pos = command.find(' ');
- QString args;
+ TQString args;
if (pos != -1)
{
args = command.mid(pos+1);
@@ -364,7 +364,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
if (command.startsWith("~"))
{
command = command.mid(1);
- command.prepend(QDir::homeDirPath());
+ command.prepend(TQDir::homeDirPath());
}
*proc << command.stripWhiteSpace();
@@ -375,7 +375,7 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
while (pos != -1 )
{
pos = args.find("%scriptdir");
- QString scriptname;
+ TQString scriptname;
if (pos != -1)
{
int begin = args.findRev('"', pos);
@@ -410,13 +410,13 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
int pos = args.find("%projectbase");
if (pos != -1)
{
- QString s;
+ TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
args.replace("%projectbase", s);
}
- QStringList argsList1 = QStringList::split(' ', args);
- QStringList argsList;
+ TQStringList argsList1 = TQStringList::split(' ', args);
+ TQStringList argsList;
for (uint i = 0; i < argsList1.count(); i++)
{
if (argsList1[i] == "%userarguments")
@@ -434,12 +434,12 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, Qt::Button
firstOutput = true;
firstError = true;
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetScriptOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetScriptError(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess*)), this,
- SLOT( slotProcessExited(KProcess*)));
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptError(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(processExited( KProcess*)), this,
+ TQT_SLOT( slotProcessExited(KProcess*)));
@@ -498,21 +498,21 @@ bool TagAction::slotActionActivated()
if ( !view || !view->document())
return false;
- QString space="";
- QString output;
+ TQString space="";
+ TQString output;
unsigned int line, col;
Document *w = view->document();
w->viewCursorIf->cursorPositionReal(&line, &col);
space.fill( ' ', col);
- QString type = tag.attribute("type","");
+ TQString type = tag.attribute("type","");
if ( type == "tag" ) {
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -520,7 +520,7 @@ bool TagAction::slotActionActivated()
attr = attr.stripWhiteSpace();
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() ) i++;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
attr = attr.remove(0,i).stripWhiteSpace();
if (otag.attribute("useDialog","false") == "true" && QuantaCommon::isKnownTag(w->defaultDTD()->name, name))
@@ -529,7 +529,7 @@ bool TagAction::slotActionActivated()
}
else
{
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -546,7 +546,7 @@ bool TagAction::slotActionActivated()
s1.append(">");
}
- QString s2;
+ TQString s2;
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -578,12 +578,12 @@ bool TagAction::slotActionActivated()
proc = new MyProcess();
proc->setWorkingDirectory(quantaApp->projectBaseURL().path());
- QDomElement script = tag.namedItem("script").toElement();
- QString command = script.text();
+ TQDomElement script = tag.namedItem("script").toElement();
+ TQString command = script.text();
if ( !w->isUntitled() ) {
- QString fname = w->url().url();
+ TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
command.replace("%f", fname );
@@ -592,13 +592,13 @@ bool TagAction::slotActionActivated()
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.replace("%pid", QString("unique %1").arg(pid));
+ command.replace("%pid", TQString("unique %1").arg(pid));
} else
{
- command.replace("%pid", QString("%1").arg(pid));
+ command.replace("%pid", TQString("%1").arg(pid));
}
- QString buffer;
- QString inputType = script.attribute("input","none");
+ TQString buffer;
+ TQString inputType = script.attribute("input","none");
if ( inputType == "current" ) {
buffer = w->editIf->text();
@@ -609,7 +609,7 @@ bool TagAction::slotActionActivated()
command.replace("%input", buffer);
command = command.stripWhiteSpace();
int pos = command.find(' ');
- QString args;
+ TQString args;
if (pos != -1)
{
args = command.mid(pos+1);
@@ -618,7 +618,7 @@ bool TagAction::slotActionActivated()
if (command.startsWith("~"))
{
command = command.mid(1);
- command.prepend(QDir::homeDirPath());
+ command.prepend(TQDir::homeDirPath());
}
*proc << command.stripWhiteSpace();
@@ -629,7 +629,7 @@ bool TagAction::slotActionActivated()
while (pos != -1 )
{
pos = args.find("%scriptdir");
- QString scriptname;
+ TQString scriptname;
if (pos != -1)
{
int begin = args.findRev('"', pos);
@@ -664,13 +664,13 @@ bool TagAction::slotActionActivated()
int pos = args.find("%projectbase");
if (pos != -1)
{
- QString s;
+ TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
args.replace("%projectbase", s);
}
- QStringList argsList1 = QStringList::split(' ', args);
- QStringList argsList;
+ TQStringList argsList1 = TQStringList::split(' ', args);
+ TQStringList argsList;
for (uint i = 0; i < argsList1.count(); i++)
{
if (argsList1[i] == "%userarguments")
@@ -688,12 +688,12 @@ bool TagAction::slotActionActivated()
firstOutput = true;
firstError = true;
- connect( proc, SIGNAL(receivedStdout( KProcess*,char*,int)), this,
- SLOT( slotGetScriptOutput(KProcess*,char*,int)));
- connect( proc, SIGNAL(receivedStderr( KProcess*,char*,int)), this,
- SLOT( slotGetScriptError(KProcess*,char*,int)));
- connect( proc, SIGNAL(processExited( KProcess*)), this,
- SLOT( slotProcessExited(KProcess*)));
+ connect( proc, TQT_SIGNAL(receivedStdout( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptOutput(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(receivedStderr( KProcess*,char*,int)), this,
+ TQT_SLOT( slotGetScriptError(KProcess*,char*,int)));
+ connect( proc, TQT_SIGNAL(processExited( KProcess*)), this,
+ TQT_SLOT( slotProcessExited(KProcess*)));
@@ -742,8 +742,8 @@ bool TagAction::slotActionActivated()
void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
{
- QCString tmp( buffer, buflen + 1 );
- QString text( QString::fromLocal8Bit(tmp) );
+ TQCString tmp( buffer, buflen + 1 );
+ TQString text( TQString::fromLocal8Bit(tmp) );
// kdDebug(24000) << "Script output received: |" << text << "|" << endl;
Document *w = ViewManager::ref()->activeDocument();
if (!w)
@@ -804,8 +804,8 @@ void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
void TagAction::slotGetScriptError( KProcess *, char *buffer, int buflen )
{
Document *w = ViewManager::ref()->activeDocument();
- QCString tmp( buffer, buflen + 1 );
- QString text( QString::fromLocal8Bit(tmp) );
+ TQCString tmp( buffer, buflen + 1 );
+ TQString text( TQString::fromLocal8Bit(tmp) );
if ( scriptErrorDest == "merge" )
{
@@ -861,19 +861,19 @@ void TagAction::scriptDone()
proc = 0;
}
-void TagAction::setOutputFile(QFile* file)
+void TagAction::setOutputFile(TQFile* file)
{
m_file = file;
}
-void TagAction::setInputFileName(const QString& fileName)
+void TagAction::setInputFileName(const TQString& fileName)
{
m_inputFileName = fileName;
}
-QString TagAction::actionText()
+TQString TagAction::actionText()
{
- QString t = tag.attribute("text");
+ TQString t = tag.attribute("text");
int pos = t.find('&');
if (pos < (int)t.length()-1 && t[pos+1] != '&')
return t.remove(pos, 1);
@@ -881,15 +881,15 @@ QString TagAction::actionText()
return t;
}
-QString TagAction::XMLTagName() const
+TQString TagAction::XMLTagName() const
{
if(tag.attribute("type","").lower() != "tag")
- return QString();
+ return TQString();
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -898,19 +898,19 @@ QString TagAction::XMLTagName() const
int i = 0;
while ( !attr[i].isSpace() && !attr[i].isNull() )
++i;
- QString name = attr.left(i);
+ TQString name = attr.left(i);
return name;
}
-QString TagAction::openXMLTagString() const
+TQString TagAction::openXMLTagString() const
{
- QString name = XMLTagName();
+ TQString name = XMLTagName();
- QDomElement otag = (tag.namedItem("tag")).toElement();
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQDomElement otag = (tag.namedItem("tag")).toElement();
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
- QString attr = otag.text();
+ TQString attr = otag.text();
if ( attr[0] == '<' )
attr.remove(0,1);
if ( attr.right(1) == ">" )
@@ -918,7 +918,7 @@ QString TagAction::openXMLTagString() const
attr = attr.stripWhiteSpace();
attr.remove(0, name.length());
- QString s1 = QuantaCommon::tagCase(name);
+ TQString s1 = QuantaCommon::tagCase(name);
if (otag.text().left(1) == "<") s1 = "<"+s1;
if (!attr.isEmpty())
s1 += " "+QuantaCommon::attrCase(attr);
@@ -939,10 +939,10 @@ QString TagAction::openXMLTagString() const
return s1;
}
-QString TagAction::closeXMLTagString() const
+TQString TagAction::closeXMLTagString() const
{
- QString s2;
- QDomElement xtag = (tag.namedItem("xtag")).toElement();
+ TQString s2;
+ TQDomElement xtag = (tag.namedItem("xtag")).toElement();
if ( xtag.attribute("use","false") == "true" )
{
if (qConfig.closeTags)
@@ -974,7 +974,7 @@ void TagAction::slotProcessExited(KProcess *process)
delete process;
}
-void TagAction::addArguments(const QStringList &arguments)
+void TagAction::addArguments(const TQStringList &arguments)
{
m_argsList = arguments;
}
@@ -990,8 +990,8 @@ void TagAction::execute(bool blocking)
if (slotActionActivated())
{
//To avoid lock-ups, start a timer.
- timer = new QTimer(this);
- connect(timer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ timer = new TQTimer(this);
+ connect(timer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
timer->start(180*1000, true);
QExtFileInfo internalFileInfo;
loopStarted = true;
@@ -1038,10 +1038,10 @@ void TagAction::applyTagInSelection(Node* start_node, int start_offset, Node* en
Q_ASSERT(view->hadLastFocus() == QuantaView::VPLFocus);
Q_ASSERT(toggable());
- QString tag_name = XMLTagName();
+ TQString tag_name = XMLTagName();
Q_ASSERT(kafkaCommon::isInsideTag(start_node, end_node, tag_name) == -1);
- QString open_tag = openXMLTagString();
+ TQString open_tag = openXMLTagString();
//We build the node from the tag name
Node* node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
@@ -1066,7 +1066,7 @@ void TagAction::applyTagInSelection(Node* start_node, int start_offset, Node* en
if (!nodeQTag) return;
bool specialTagInsertion = false;
- QPtrList<QTag> qTagList = nodeQTag->parents();
+ TQPtrList<QTag> qTagList = nodeQTag->parents();
QTag* qTag = 0;
for (qTag = qTagList.first(); qTag; qTag = qTagList.next())
{
@@ -1128,7 +1128,7 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
{
Q_ASSERT(start_node != end_node);
- QString const tag_name = XMLTagName();
+ TQString const tag_name = XMLTagName();
// FIXME o pai pode ser do endNode. nao sei se esta merda eh precisa
/* Node* tag_parent = kafkaCommon::hasParent(start_node, tag_name);
@@ -1142,8 +1142,8 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
if(!commonParent) return;
@@ -1159,7 +1159,7 @@ void TagAction::applyTagInMixedSelection(Node* start_node, int start_offset, Nod
// kafkaCommon::coutTree(baseNode, 3);
//We build the node from the tag name
- QString const open_tag_string = openXMLTagString();
+ TQString const open_tag_string = openXMLTagString();
Node* new_node = kafkaCommon::createNode("", "", Tag::XmlTag, w);
new_node->tag->parse(open_tag_string, w);
new_node->tag->name = QuantaCommon::tagCase(new_node->tag->name);
@@ -1211,15 +1211,15 @@ void TagAction::deapplyTagInSelection(Node* start_node, int start_offset, Node*
// QuantaView *view = ViewManager::ref()->activeView();
// Document* w = view->document();
- QString const tag_name = XMLTagName();
+ TQString const tag_name = XMLTagName();
// Set start and end nodes to the correct node
start_node = kafkaCommon::getCorrectStartNode(start_node, start_offset);
end_node = kafkaCommon::getCorrectEndNode(end_node, end_offset);
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = kafkaCommon::DTDGetCommonParent(start_node, end_node, commonParentStartChildLocation, commonParentEndChildLocation, 0);
if(!commonParent) return;
@@ -1235,12 +1235,12 @@ void TagAction::deapplyTagInSelection(Node* start_node, int start_offset, Node*
Node* tag_parent = kafkaCommon::hasParent(start_node, end_node, tag_name);
Q_ASSERT(tag_parent);
- QString attribute_name(tag.attribute("attribute_name", QString()));
- QString attribute_value(tag.attribute("attribute_value", QString()));
+ TQString attribute_name(tag.attribute("attribute_name", TQString()));
+ TQString attribute_value(tag.attribute("attribute_value", TQString()));
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
{
- kafkaCommon::editNodeAttribute(tag_parent, attribute_name, QString(), modifs);
+ kafkaCommon::editNodeAttribute(tag_parent, attribute_name, TQString(), modifs);
}
else
diff --git a/quanta/utility/tagaction.h b/quanta/utility/tagaction.h
index addb35cf..56fcde0e 100644
--- a/quanta/utility/tagaction.h
+++ b/quanta/utility/tagaction.h
@@ -22,8 +22,8 @@
#include <kaction.h>
#include <kactioncollection.h>
-#include <qstring.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqdom.h>
class KMainWindow;
class QuantaView;
@@ -54,15 +54,15 @@ public:
* @param toggle If set to true, the class behaves like a KToggleAction;
* Else it behaves like a KAction. This avoids the multi-inheritance problem.
*/
- TagAction(QDomElement *element, KMainWindow *parentMainWindow, bool toggle = false);
+ TagAction(TQDomElement *element, KMainWindow *parentMainWindow, bool toggle = false);
virtual ~TagAction();
- QDomElement data() const { return tag; }
+ TQDomElement data() const { return tag; }
void setModified(bool modified) { m_modified = modified;}
bool isModified() const {return m_modified;}
- void setOutputFile(QFile* file);
- void setInputFileName(const QString& fileName);
- void addArguments(const QStringList& arguments);
+ void setOutputFile(TQFile* file);
+ void setInputFileName(const TQString& fileName);
+ void addArguments(const TQStringList& arguments);
bool toggable() const {return tag.attribute("toggable") == "true";}
bool toggled() const {return isChecked();}
@@ -70,18 +70,18 @@ public:
@param blocking in case of script actions, the script is run in blocking mode, if this argument is true
*/
void execute(bool blocking);
- QString type();
+ TQString type();
/**
* Remove accelerator from tag action name *
*/
- QString actionText();
+ TQString actionText();
- QString XMLTagName() const;
- QString openXMLTagString() const;
- QString closeXMLTagString() const;
+ TQString XMLTagName() const;
+ TQString openXMLTagString() const;
+ TQString closeXMLTagString() const;
signals:
- void showMessage(const QString& msg, bool append);
+ void showMessage(const TQString& msg, bool append);
void clearMessages();
void showMessagesView();
void createNewFile();
@@ -121,14 +121,14 @@ private:
bool loopStarted;
bool m_useInputFile;
bool m_useOutputFile;
- QString scriptOutputDest;
- QString scriptErrorDest;
- QTimer* timer;
- QDomElement tag;
- QFile* m_file;
+ TQString scriptOutputDest;
+ TQString scriptErrorDest;
+ TQTimer* timer;
+ TQDomElement tag;
+ TQFile* m_file;
KMainWindow *m_parentMainWindow;
- QString m_inputFileName;
- QStringList m_argsList;
+ TQString m_inputFileName;
+ TQStringList m_argsList;
uint m_killCount;
bool const m_toggle;
};
diff --git a/quanta/utility/tagactionmanager.cpp b/quanta/utility/tagactionmanager.cpp
index 21183073..3733aaaf 100644
--- a/quanta/utility/tagactionmanager.cpp
+++ b/quanta/utility/tagactionmanager.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
#include <dom/dom_node.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "tagactionmanager.h"
#include "tagactionset.h"
@@ -54,7 +54,7 @@ TagActionManager* TagActionManager::self()
return s_mSelf;
}
-void TagActionManager::initActions(QWidget* parent)
+void TagActionManager::initActions(TQWidget* parent)
{
Q_ASSERT(parent);
@@ -69,14 +69,14 @@ void TagActionManager::initActions(QWidget* parent)
m_tagActionSets.append(table);
}
-void TagActionManager::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+void TagActionManager::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
TagActionSetAbstract* tagActionSet = 0;
for(tagActionSet = m_tagActionSets.first(); tagActionSet; tagActionSet = m_tagActionSets.next())
tagActionSet->fillWithTagActions(widget, node);
}
-bool TagActionManager::canIndentDTD(QString const& dtd)
+bool TagActionManager::canIndentDTD(TQString const& dtd)
{
return (dtd.contains("HTML", false) ||
dtd.contains("XML", false));
diff --git a/quanta/utility/tagactionmanager.h b/quanta/utility/tagactionmanager.h
index 533c3b39..6f5968c8 100644
--- a/quanta/utility/tagactionmanager.h
+++ b/quanta/utility/tagactionmanager.h
@@ -24,7 +24,7 @@ namespace DOM
class Node;
}
-#include <qptrlist.h>
+#include <tqptrlist.h>
class QWidget;
class TagActionSetAbstract;
@@ -48,9 +48,9 @@ public:
* @param widget The widget in wich the actions will be pluged.
* @param node The context/current node.
*/
- void fillWithTagActions(QWidget* widget, DOM::Node const& node);
+ void fillWithTagActions(TQWidget* widget, DOM::Node const& node);
- static bool canIndentDTD(QString const& dtd);
+ static bool canIndentDTD(TQString const& dtd);
KActionCollection* actionCollection() const
{
@@ -62,13 +62,13 @@ private:
TagActionManager(TagActionManager const&)
{}
- void initActions(QWidget* parent);
+ void initActions(TQWidget* parent);
private:
static TagActionManager* s_mSelf;
KActionCollection* m_actionCollection;
- QPtrList<TagActionSetAbstract> m_tagActionSets;
+ TQPtrList<TagActionSetAbstract> m_tagActionSets;
};
#endif
diff --git a/quanta/utility/tagactionset.cpp b/quanta/utility/tagactionset.cpp
index 691ad182..a74df537 100644
--- a/quanta/utility/tagactionset.cpp
+++ b/quanta/utility/tagactionset.cpp
@@ -23,7 +23,7 @@
#include <dom/dom_string.h>
#include <klocale.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "tagactionset.h"
#include "tagactionmanager.h"
@@ -40,14 +40,14 @@
#include "resource.h"
-TagActionSetAbstract::TagActionSetAbstract(QObject *parent, const char *name)
- : QObject(parent, name), m_currentNode(0)
+TagActionSetAbstract::TagActionSetAbstract(TQObject *parent, const char *name)
+ : TQObject(parent, name), m_currentNode(0)
{}
TagActionSetAbstract::~TagActionSetAbstract()
{}
-Node* TagActionSetAbstract::parentTag(Node* node, QString const& tagName)
+Node* TagActionSetAbstract::parentTag(Node* node, TQString const& tagName)
{
Q_ASSERT(node);
@@ -58,7 +58,7 @@ Node* TagActionSetAbstract::parentTag(Node* node, QString const& tagName)
return aux;
}
-Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, QString const& tagName)
+Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, TQString const& tagName)
{
Node* aux = startParentNode;
while(aux && aux->nodeName().lower() != tagName)
@@ -71,7 +71,7 @@ Node* TagActionSetAbstract::firstChildTag(Node* startParentNode, QString const&
return aux;
}
-bool TagActionSetAbstract::fillWithTagActions(QWidget* /*widget*/, DOM::Node const& node)
+bool TagActionSetAbstract::fillWithTagActions(TQWidget* /*widget*/, DOM::Node const& node)
{
m_currentDomNode = node;
m_currentNode = KafkaDocument::ref()->getNode(m_currentDomNode);
@@ -81,7 +81,7 @@ bool TagActionSetAbstract::fillWithTagActions(QWidget* /*widget*/, DOM::Node con
//_____________________________________________________________________________
-TagActionSet::TagActionSet(QObject *parent, const char *name)
+TagActionSet::TagActionSet(TQObject *parent, const char *name)
: TagActionSetAbstract(parent, name), m_separator(0)
{
m_separator = new KActionSeparator();
@@ -92,31 +92,31 @@ bool TagActionSet::isInTagContext() const
return true;
}
-void TagActionSet::initActionMenus(QWidget* /*widget*/)
+void TagActionSet::initActionMenus(TQWidget* /*widget*/)
{
}
-void TagActionSet::initActions(QWidget* /*parent*/)
+void TagActionSet::initActions(TQWidget* /*parent*/)
{
KActionCollection* ac(TagActionManager::self()->actionCollection());
- QString actionName = "apply_source_indentation";
+ TQString actionName = "apply_source_indentation";
new KAction(i18n("Apply Source Indentation"), 0, this,
- SLOT(slotApplySourceIndentation()),
+ TQT_SLOT(slotApplySourceIndentation()),
ac, actionName);
actionName = "copy_div_element";
new KAction(i18n("Copy DIV Area"), 0, this,
- SLOT(slotCopyDivElement()),
+ TQT_SLOT(slotCopyDivElement()),
ac, actionName);
actionName = "cut_div_element";
new KAction(i18n("Cut DIV Area"), 0, this,
- SLOT(slotCutDivElement()),
+ TQT_SLOT(slotCutDivElement()),
ac, actionName);
}
-bool TagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+bool TagActionSet::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
@@ -162,7 +162,7 @@ bool TagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
return true;
}
-void TagActionSet::unplugAllActions(QWidget* widget) const
+void TagActionSet::unplugAllActions(TQWidget* widget) const
{
KActionCollection* ac(TagActionManager::self()->actionCollection());
@@ -238,7 +238,7 @@ void TagActionSet::slotCopyDivElement()
return;
}
- KafkaDocument::ref()->slotCopy(divNode, 0, divClosingNode, 0, QString());
+ KafkaDocument::ref()->slotCopy(divNode, 0, divClosingNode, 0, TQString());
}
void TagActionSet::slotCutDivElement()
@@ -260,13 +260,13 @@ void TagActionSet::slotCutDivElement()
int cursorOffset = selection_ind.cursorOffset();
- KafkaDocument::ref()->slotCut(divNode, 0, divClosingNode, 0, &m_currentNode, cursorOffset, QString());
+ KafkaDocument::ref()->slotCut(divNode, 0, divClosingNode, 0, &m_currentNode, cursorOffset, TQString());
}
//_____________________________________________________________________________
-TableTagActionSet::TableTagActionSet(QObject *parent, const char *name)
+TableTagActionSet::TableTagActionSet(TQObject *parent, const char *name)
: TagActionSetAbstract(parent, name), m_separator(0), m_tableActionMenu_0(0), m_insertActionMenu_1(0)
{
m_separator = new KActionSeparator();
@@ -277,7 +277,7 @@ bool TableTagActionSet::isInTagContext() const
return parentTag(m_currentNode, "table");
}
-void TableTagActionSet::initActionMenus(QWidget* widget)
+void TableTagActionSet::initActionMenus(TQWidget* widget)
{
Q_ASSERT(!m_tableActionMenu_0);
@@ -287,7 +287,7 @@ void TableTagActionSet::initActionMenus(QWidget* widget)
}
-void TableTagActionSet::initActions(QWidget* parent)
+void TableTagActionSet::initActions(TQWidget* parent)
{
if(!m_tableActionMenu_0)
initActionMenus(parent);
@@ -296,34 +296,34 @@ void TableTagActionSet::initActions(QWidget* parent)
// Insert___________________________________________________________________________
- QString actionName = "insert_table";
+ TQString actionName = "insert_table";
//m_actionNames += actionName;
new KAction(i18n("Table..."), 0, this,
- SLOT(slotInsertTable()),
+ TQT_SLOT(slotInsertTable()),
ac, actionName);
actionName = "insert_row_above";
//m_actionNames += actionName;
new KAction(i18n("Row Above"), 0, this,
- SLOT(slotInsertRowAbove()),
+ TQT_SLOT(slotInsertRowAbove()),
ac, actionName);
actionName = "insert_row_below";
//m_actionNames += actionName;
new KAction(i18n("Row Below"), 0, this,
- SLOT(slotInsertRowBelow()),
+ TQT_SLOT(slotInsertRowBelow()),
ac, actionName);
actionName = "insert_column_left";
//m_actionNames += actionName;
new KAction(i18n("Column Left"), 0, this,
- SLOT(slotInsertColumnLeft()),
+ TQT_SLOT(slotInsertColumnLeft()),
ac, actionName);
actionName = "insert_column_right";
//m_actionNames += actionName;
new KAction(i18n("Column Right"), 0, this,
- SLOT(slotInsertColumnRight()),
+ TQT_SLOT(slotInsertColumnRight()),
ac, actionName);
// Remove___________________________________________________________________________
@@ -331,31 +331,31 @@ void TableTagActionSet::initActions(QWidget* parent)
actionName = "remove_table";
//m_actionNames += actionName;
new KAction(i18n("Table"), 0, this,
- SLOT(slotRemoveTable()),
+ TQT_SLOT(slotRemoveTable()),
ac, actionName);
actionName = "remove_rows";
//m_actionNames += actionName;
new KAction(i18n("Row(s)"), 0, this,
- SLOT(slotRemoveRows()),
+ TQT_SLOT(slotRemoveRows()),
ac, actionName);
actionName = "remove_columns";
//m_actionNames += actionName;
new KAction(i18n("Column(s)"), 0, this,
- SLOT(slotRemoveColumns()),
+ TQT_SLOT(slotRemoveColumns()),
ac, actionName);
actionName = "remove_cells";
//m_actionNames += actionName;
new KAction(i18n("Cell(s)"), 0, this,
- SLOT(slotRemoveCells()),
+ TQT_SLOT(slotRemoveCells()),
ac, actionName);
actionName = "remove_cells_content";
//m_actionNames += actionName;
new KAction(i18n("Cell(s) Content"), 0, this,
- SLOT(slotRemoveCellsContent()),
+ TQT_SLOT(slotRemoveCellsContent()),
ac, actionName);
// Merge___________________________________________________________________________
@@ -363,11 +363,11 @@ void TableTagActionSet::initActions(QWidget* parent)
actionName = "merge_selected_cells";
//m_actionNames += actionName;
new KAction(i18n("Merge Selected Cells"), 0, this,
- SLOT(slotMergeSelectedCells()),
+ TQT_SLOT(slotMergeSelectedCells()),
ac, actionName);
}
-bool TableTagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& node)
+bool TableTagActionSet::fillWithTagActions(TQWidget* widget, DOM::Node const& node)
{
bool validNode = TagActionSetAbstract::fillWithTagActions(widget, node);
@@ -553,7 +553,7 @@ bool TableTagActionSet::fillWithTagActions(QWidget* widget, DOM::Node const& nod
return true;
}
-void TableTagActionSet::unplugAllActions(QWidget* widget) const
+void TableTagActionSet::unplugAllActions(TQWidget* widget) const
{
m_separator->unplugAll();
m_tableActionMenu_0->unplug(widget);
@@ -912,8 +912,8 @@ bool TableTagActionSet::canMergeSelectedCells() const
NodeSelectionInd selection;
selection.fillWithVPLCursorSelection();
- QValueList<int> start = selection.cursorNode();
- QValueList<int> end = selection.cursorNodeEndSel();
+ TQValueList<int> start = selection.cursorNode();
+ TQValueList<int> end = selection.cursorNodeEndSel();
return start != end;
}
@@ -960,7 +960,7 @@ void TableTagActionSet::slotMergeSelectedCells()
if(count == 1)
return;
- kafkaCommon::editNodeAttribute(startTd, "colspan", QString::number(count), modifs);
+ kafkaCommon::editNodeAttribute(startTd, "colspan", TQString::number(count), modifs);
kafkaCommon::editNodeAttribute(startTd, "rowspan", "1", modifs);
view->document()->docUndoRedo->addNewModifsSet(modifs, undoRedo::NodeTreeModif);
diff --git a/quanta/utility/tagactionset.h b/quanta/utility/tagactionset.h
index 6bb2448f..b5a962c5 100644
--- a/quanta/utility/tagactionset.h
+++ b/quanta/utility/tagactionset.h
@@ -24,7 +24,7 @@ class Node;
}
class KActionSeparator;
-#include <qobject.h>
+#include <tqobject.h>
class QWidget;
class KActionSet;
class KActionMenu;
@@ -39,21 +39,21 @@ class TagActionSetAbstract : public QObject
{
Q_OBJECT
public:
- TagActionSetAbstract(QObject *parent = 0, const char *name = 0);
+ TagActionSetAbstract(TQObject *parent = 0, const char *name = 0);
virtual ~TagActionSetAbstract();
DOM::Node const& currentDomNode() const {return m_currentDomNode;}
- static Node* parentTag(Node* node, QString const& tagName);
- static Node* firstChildTag(Node* node, QString const& tagName);
+ static Node* parentTag(Node* node, TQString const& tagName);
+ static Node* firstChildTag(Node* node, TQString const& tagName);
virtual bool isInTagContext(/*DOM::Node const& node*/) const = 0;
- virtual void initActions(QWidget* parent) = 0;
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const = 0;
+ virtual void initActions(TQWidget* parent) = 0;
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const = 0;
protected:
- virtual void initActionMenus(QWidget* widget) = 0;
+ virtual void initActionMenus(TQWidget* widget) = 0;
protected:
Node* m_currentNode;
@@ -67,13 +67,13 @@ class TagActionSet : public TagActionSetAbstract
{
Q_OBJECT
public:
- TagActionSet(QObject *parent = 0, const char *name = 0);
+ TagActionSet(TQObject *parent = 0, const char *name = 0);
virtual ~TagActionSet() {}
virtual bool isInTagContext() const;
- virtual void initActions(QWidget* parent);
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const;
+ virtual void initActions(TQWidget* parent);
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const;
public slots:
void slotApplySourceIndentation();
@@ -81,7 +81,7 @@ public slots:
void slotCutDivElement();
protected:
- virtual void initActionMenus(QWidget* widget);
+ virtual void initActionMenus(TQWidget* widget);
private:
bool isInDivArea() const;
@@ -95,14 +95,14 @@ class TableTagActionSet : public TagActionSetAbstract
{
Q_OBJECT
public:
- TableTagActionSet(QObject *parent = 0, const char *name = 0);
+ TableTagActionSet(TQObject *parent = 0, const char *name = 0);
virtual ~TableTagActionSet()
{}
virtual bool isInTagContext(/*DOM::Node const& node*/) const;
- virtual void initActions(QWidget* parent);
- virtual bool fillWithTagActions(QWidget* widget, DOM::Node const& node);
- virtual void unplugAllActions(QWidget* widget) const;
+ virtual void initActions(TQWidget* parent);
+ virtual bool fillWithTagActions(TQWidget* widget, DOM::Node const& node);
+ virtual void unplugAllActions(TQWidget* widget) const;
public slots:
// Insert
@@ -121,7 +121,7 @@ public slots:
void slotMergeSelectedCells();
protected:
- virtual void initActionMenus(QWidget* widget);
+ virtual void initActionMenus(TQWidget* widget);
private:
// Insert
diff --git a/quanta/utility/toolbartabwidget.cpp b/quanta/utility/toolbartabwidget.cpp
index 03c6e86b..29c7cfa9 100644
--- a/quanta/utility/toolbartabwidget.cpp
+++ b/quanta/utility/toolbartabwidget.cpp
@@ -13,14 +13,14 @@
***************************************************************************/
//qt includes
-#include <qevent.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpoint.h>
-#include <qtabbar.h>
-#include <qwidgetstack.h>
-#include <qtabwidget.h>
-#include <qfontmetrics.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpoint.h>
+#include <tqtabbar.h>
+#include <tqwidgetstack.h>
+#include <tqtabwidget.h>
+#include <tqfontmetrics.h>
//kde includes
#include <kaction.h>
@@ -38,45 +38,45 @@
//app includes
#include "toolbartabwidget.h"
-ToolbarTabWidget::ToolbarTabWidget(QWidget * parent, const char * name, WFlags f)
-:QTabWidget(parent, name, f)
+ToolbarTabWidget::ToolbarTabWidget(TQWidget * parent, const char * name, WFlags f)
+:TQTabWidget(parent, name, f)
{
m_popupMenu = new KPopupMenu(this);
m_popupMenu->insertTitle(i18n("Toolbar Menu"), 1);
- m_popupMenu->insertItem(i18n("New Action..."), parent, SLOT(slotNewAction()));
+ m_popupMenu->insertItem(i18n("New Action..."), parent, TQT_SLOT(slotNewAction()));
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(i18n("New Toolbar..."), parent, SLOT(slotAddToolbar()));
- m_popupMenu->insertItem(i18n("Remove Toolbar"), this, SLOT(slotRemoveToolbar()));
- m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, SLOT(slotRenameToolbar()));
- m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, SLOT(slotEditToolbar()));
+ m_popupMenu->insertItem(i18n("New Toolbar..."), parent, TQT_SLOT(slotAddToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), this, TQT_SLOT(slotRenameToolbar()));
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), this, TQT_SLOT(slotEditToolbar()));
- connect(this, SIGNAL(removeToolbar(const QString&)),
- parent, SLOT(slotRemoveToolbar(const QString&)));
- connect(this, SIGNAL(renameToolbar(const QString&)),
- parent, SLOT(slotRenameToolbar(const QString&)));
- connect(this, SIGNAL(editToolbar(const QString&)),
- parent, SLOT(slotConfigureToolbars(const QString&)));
- connect(this, SIGNAL(newAction()),
- parent, SLOT(slotNewAction()));
- connect(this, SIGNAL(addToolbar()),
- parent, SLOT(slotAddToolbar()));
+ connect(this, TQT_SIGNAL(removeToolbar(const TQString&)),
+ parent, TQT_SLOT(slotRemoveToolbar(const TQString&)));
+ connect(this, TQT_SIGNAL(renameToolbar(const TQString&)),
+ parent, TQT_SLOT(slotRenameToolbar(const TQString&)));
+ connect(this, TQT_SIGNAL(editToolbar(const TQString&)),
+ parent, TQT_SLOT(slotConfigureToolbars(const TQString&)));
+ connect(this, TQT_SIGNAL(newAction()),
+ parent, TQT_SLOT(slotNewAction()));
+ connect(this, TQT_SIGNAL(addToolbar()),
+ parent, TQT_SLOT(slotAddToolbar()));
KAcceleratorManager::setNoAccel(this);
}
-void ToolbarTabWidget::insertTab(QWidget *child, const QString &label, const QString &id)
+void ToolbarTabWidget::insertTab(TQWidget *child, const TQString &label, const TQString &id)
{
if (child->inherits("KToolBar") && child->parentWidget())
{
- QTabWidget::insertTab(child->parentWidget(), label);
+ TQTabWidget::insertTab(child->parentWidget(), label);
toolbarList.insert(id, child);
}
}
-QWidget* ToolbarTabWidget::page(int index)
+TQWidget* ToolbarTabWidget::page(int index)
{
- QWidget *w = QTabWidget::page(index);
+ TQWidget *w = TQTabWidget::page(index);
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -87,10 +87,10 @@ QWidget* ToolbarTabWidget::page(int index)
return w;
}
-QString ToolbarTabWidget::id(QWidget *w) const
+TQString ToolbarTabWidget::id(TQWidget *w) const
{
- QString idStr;
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQString idStr;
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -101,11 +101,11 @@ QString ToolbarTabWidget::id(QWidget *w) const
return idStr;
}
-QString ToolbarTabWidget::id(int index) const
+TQString ToolbarTabWidget::id(int index) const
{
- QWidget *w = QTabWidget::page(index);
- QString idStr;
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQWidget *w = TQTabWidget::page(index);
+ TQString idStr;
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data()->parentWidget() == w)
{
@@ -116,19 +116,19 @@ QString ToolbarTabWidget::id(int index) const
return idStr;
}
-QWidget* ToolbarTabWidget::page(const QString& id)
+TQWidget* ToolbarTabWidget::page(const TQString& id)
{
- QWidget *w = toolbarList.find(id).data();
+ TQWidget *w = toolbarList.find(id).data();
return w;
}
-void ToolbarTabWidget::removePage(QWidget * w)
+void ToolbarTabWidget::removePage(TQWidget * w)
{
- QWidget *parent = w->parentWidget();
+ TQWidget *parent = w->parentWidget();
if (w->inherits("KToolBar") && parent)
{
- QTabWidget::removePage(parent);
- for (QMap<QString, QWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
+ TQTabWidget::removePage(parent);
+ for (TQMap<TQString, TQWidget*>::ConstIterator it = toolbarList.constBegin(); it != toolbarList.constEnd(); ++it)
{
if (it.data() == w)
{
@@ -155,21 +155,21 @@ void ToolbarTabWidget::slotEditToolbar()
emit editToolbar(tabUnderMouseLabel + " <quanta>");
}
-void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
+void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e )
{
if (e->button() == Qt::RightButton)
{
- QPoint p = e->globalPos();
- QTab *tab = 0L;
- QWidget *pageW = 0L;
+ TQPoint p = e->globalPos();
+ TQTab *tab = 0L;
+ TQWidget *pageW = 0L;
for (int i =0; i < tabBar()->count(); i++)
{
tab = tabBar()->tabAt(i);
pageW = page(i);
- QRect r = tab->rect();
- QPoint p1 = mapToGlobal(r.topLeft());
- QPoint p2 = mapToGlobal(r.bottomRight());
- if (QRect(p1, p2).contains(p))
+ TQRect r = tab->rect();
+ TQPoint p1 = mapToGlobal(r.topLeft());
+ TQPoint p2 = mapToGlobal(r.bottomRight());
+ if (TQRect(p1, p2).contains(p))
break;
else
tab = 0L;
@@ -177,7 +177,7 @@ void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
tabUnderMouseLabel = tab ? tab->text() : label(currentPageIndex());
if (!pageW)
pageW = currentPage();
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
if (it.data()->parentWidget() == pageW)
{
@@ -191,14 +191,14 @@ void ToolbarTabWidget::mousePressEvent ( QMouseEvent * e )
}
-void ToolbarTabWidget::resizeEvent(QResizeEvent *e)
+void ToolbarTabWidget::resizeEvent(TQResizeEvent *e)
{
- QWidget::resizeEvent(e);
- QWidget *tb;
- for (QMap<QString, QWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
+ TQWidget::resizeEvent(e);
+ TQWidget *tb;
+ for (TQMap<TQString, TQWidget*>::Iterator it = toolbarList.begin(); it != toolbarList.end(); ++it)
{
tb = it.data();
- tb->resize(QSize(width(), tb->height()));
+ tb->resize(TQSize(width(), tb->height()));
}
int i = currentPageIndex();
if (i > 0)
@@ -217,13 +217,13 @@ int ToolbarTabWidget::tabHeight() const
int height = tabBar()->height();
if (height < 2)
{
- height = QFontMetrics(KGlobalSettings::generalFont()).height() + 12;
+ height = TQFontMetrics(KGlobalSettings::generalFont()).height() + 12;
}
return height;
}
-QuantaToolBar::QuantaToolBar(QWidget *parent, const char *name, bool honor_style, bool readConfig)
+QuantaToolBar::QuantaToolBar(TQWidget *parent, const char *name, bool honor_style, bool readConfig)
:KToolBar (parent, name=0, honor_style, readConfig)
{
m_popupMenu = new KPopupMenu(this);
@@ -235,8 +235,8 @@ QuantaToolBar::QuantaToolBar(QWidget *parent, const char *name, bool honor_style
m_iconTextMenu->insertItem(i18n("Text Only"), 1);
m_iconTextMenu->insertItem(i18n("Text Alongside Icons"), 2);
m_iconTextMenu->insertItem(i18n("Text Under Icons"), 3);
- connect(m_iconTextMenu, SIGNAL(activated(int)), SLOT(slotIconTextChanged(int)));
- connect(m_iconTextMenu, SIGNAL(aboutToShow()), SLOT(slotIconTextMenuAboutToShow()));
+ connect(m_iconTextMenu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotIconTextChanged(int)));
+ connect(m_iconTextMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotIconTextMenuAboutToShow()));
setIconText(ToolbarTabWidget::ref()->iconText(), false);
}
@@ -263,7 +263,7 @@ void QuantaToolBar::slotIconTextChanged(int id)
{
ToolbarTabWidget *toolbarTab = ToolbarTabWidget::ref();
int width = toolbarTab->width();
- int bigHeight = iconSize() + QFontMetrics(KGlobalSettings::toolBarFont()).height() + 10;
+ int bigHeight = iconSize() + TQFontMetrics(KGlobalSettings::toolBarFont()).height() + 10;
int normalHeight = iconSize() + 10;
for (int i = 0; i < toolbarTab->count(); i++)
{
@@ -294,41 +294,41 @@ void QuantaToolBar::slotIconTextChanged(int id)
}
}
-void QuantaToolBar::mousePressEvent(QMouseEvent *e)
+void QuantaToolBar::mousePressEvent(TQMouseEvent *e)
{
if (e->button() == Qt::RightButton)
{
m_popupMenu->clear();
- QPoint p = e->globalPos();
+ TQPoint p = e->globalPos();
if (m_toolbarTab)
{
m_toolbarTab->tabUnderMouse = m_toolbarTab->id(m_toolbarTab->currentPageIndex());
m_toolbarTab->tabUnderMouseLabel = m_toolbarTab->label(m_toolbarTab->currentPageIndex());
m_popupMenu->insertTitle(i18n("Toolbar Menu") + " - "
+ i18n(m_toolbarTab->tabUnderMouseLabel.utf8()));
- m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, SIGNAL(newAction()));
- QObjectList* childrenList = queryList("KToolBarButton");
+ m_popupMenu->insertItem(i18n("New Action..."), m_toolbarTab, TQT_SIGNAL(newAction()));
+ TQObjectList* childrenList = queryList("KToolBarButton");
for (uint i = 0; i < childrenList->count(); i++)
{
KToolBarButton *w = static_cast<KToolBarButton*>(childrenList->at(i));
- QPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
- QPoint p2 = QPoint(p1.x() + w->width(), p1.y()+w->height());
- if (QRect(p1, p2).contains(p))
+ TQPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
+ TQPoint p2 = TQPoint(p1.x() + w->width(), p1.y()+w->height());
+ if (TQRect(p1, p2).contains(p))
{
currentActionName = w->textLabel();
- QString actionName = currentActionName;
- m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, SLOT(slotRemoveAction()));
- m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, SLOT(slotEditAction()));
+ TQString actionName = currentActionName;
+ m_popupMenu->insertItem(i18n("Remove Action - %1").arg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
+ m_popupMenu->insertItem(i18n("Edit Action - %1").arg(actionName), this, TQT_SLOT(slotEditAction()));
break;
}
}
m_popupMenu->insertSeparator();
- m_popupMenu->insertItem(i18n("New Toolbar..."), m_toolbarTab, SIGNAL(addToolbar()));
- m_popupMenu->insertItem(i18n("Remove Toolbar"), m_toolbarTab, SLOT(slotRemoveToolbar()));
- m_popupMenu->insertItem(i18n("Rename Toolbar..."), m_toolbarTab, SLOT(slotRenameToolbar()));
+ m_popupMenu->insertItem(i18n("New Toolbar..."), m_toolbarTab, TQT_SIGNAL(addToolbar()));
+ m_popupMenu->insertItem(i18n("Remove Toolbar"), m_toolbarTab, TQT_SLOT(slotRemoveToolbar()));
+ m_popupMenu->insertItem(i18n("Rename Toolbar..."), m_toolbarTab, TQT_SLOT(slotRenameToolbar()));
m_popupMenu->insertSeparator();
m_popupMenu->insertItem( i18n("Text Position"), m_iconTextMenu);
- m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), m_toolbarTab, SLOT(slotEditToolbar()));
+ m_popupMenu->insertItem(SmallIconSet("configure_toolbars"), i18n("Configure Toolbars..."), m_toolbarTab, TQT_SLOT(slotEditToolbar()));
}
m_popupMenu->popup(p);
}
@@ -341,7 +341,7 @@ void QuantaToolBar::slotEditAction()
void QuantaToolBar::slotRemoveAction()
{
- if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),QString::null,KStdGuiItem::del()) == KMessageBox::Continue )
+ if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Are you sure you want to remove the <b>%1</b> action?</qt>").arg(currentActionName),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue )
{
emit removeAction(m_toolbarTab->tabUnderMouse, currentActionName);
}
diff --git a/quanta/utility/toolbartabwidget.h b/quanta/utility/toolbartabwidget.h
index aa800ae6..2fcc6718 100644
--- a/quanta/utility/toolbartabwidget.h
+++ b/quanta/utility/toolbartabwidget.h
@@ -15,8 +15,8 @@
#ifndef TOOLBARTABWIDGET_H
#define TOOLBARTABWIDGET_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
class QTabWidget;
class KPopupMenu;
@@ -28,9 +28,9 @@ class ToolbarTabWidget: public QTabWidget
{
Q_OBJECT
public:
- QWidgetStack *m_widgetStack;
+ TQWidgetStack *m_widgetStack;
- static ToolbarTabWidget* const ref(QWidget *parent = 0L, const char *name = 0L)
+ static ToolbarTabWidget* const ref(TQWidget *parent = 0L, const char *name = 0L)
{
static ToolbarTabWidget *m_ref;
if (!m_ref) m_ref = new ToolbarTabWidget (parent, name);
@@ -38,18 +38,18 @@ public:
}
virtual ~ToolbarTabWidget(){};
- virtual void insertTab(QWidget *child, const QString &label, const QString &id);
- virtual QWidget* page(int index);
- virtual QWidget* page(const QString& id);
+ virtual void insertTab(TQWidget *child, const TQString &label, const TQString &id);
+ virtual TQWidget* page(int index);
+ virtual TQWidget* page(const TQString& id);
int tabHeight() const;
- QString id(QWidget *w) const;
- QString id(int index) const;
+ TQString id(TQWidget *w) const;
+ TQString id(int index) const;
KToolBar::IconText iconText() const {return m_iconText;}
void setIconText(KToolBar::IconText mode) {m_iconText = mode; emit iconTextModeChanged();}
public slots:
- virtual void removePage(QWidget * w );
- virtual void resizeEvent(QResizeEvent *);
+ virtual void removePage(TQWidget * w );
+ virtual void resizeEvent(TQResizeEvent *);
private slots:
void slotRemoveToolbar();
@@ -57,26 +57,26 @@ private slots:
void slotEditToolbar();
signals:
- void removeToolbar(const QString&);
- void renameToolbar(const QString&);
- void editToolbar(const QString&);
+ void removeToolbar(const TQString&);
+ void renameToolbar(const TQString&);
+ void editToolbar(const TQString&);
void newAction();
void addToolbar();
void iconTextModeChanged();
public:
- QString tabUnderMouse;
- QString tabUnderMouseLabel;
+ TQString tabUnderMouse;
+ TQString tabUnderMouseLabel;
protected:
- virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
KPopupMenu *m_popupMenu;
- QTabBar *m_tabBar;
- QMap<QString, QWidget*> toolbarList;
+ TQTabBar *m_tabBar;
+ TQMap<TQString, TQWidget*> toolbarList;
private:
- ToolbarTabWidget(QWidget * parent = 0, const char * name = 0, WFlags f = 0);
+ ToolbarTabWidget(TQWidget * parent = 0, const char * name = 0, WFlags f = 0);
KToolBar::IconText m_iconText;
};
@@ -86,7 +86,7 @@ class QuantaToolBar: public KToolBar
Q_OBJECT
public:
- QuantaToolBar (QWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE);
+ QuantaToolBar (TQWidget *parent, const char *name=0, bool honor_style=FALSE, bool readConfig=TRUE);
virtual ~QuantaToolBar() {};
private slots:
@@ -96,16 +96,16 @@ private slots:
void slotIconTextMenuAboutToShow();
signals:
- void removeAction(const QString&, const QString&);
- void editAction(const QString&);
+ void removeAction(const TQString&, const TQString&);
+ void editAction(const TQString&);
protected:
- virtual void mousePressEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
KPopupMenu *m_popupMenu;
KPopupMenu *m_iconTextMenu;
ToolbarTabWidget *m_toolbarTab;
- QString currentActionName;
+ TQString currentActionName;
};
#endif
diff --git a/quanta/utility/toolbarxmlgui.cpp b/quanta/utility/toolbarxmlgui.cpp
index 1d7d1558..0292e188 100644
--- a/quanta/utility/toolbarxmlgui.cpp
+++ b/quanta/utility/toolbarxmlgui.cpp
@@ -15,7 +15,7 @@
#include "toolbarxmlgui.h"
-ToolbarXMLGUI::ToolbarXMLGUI(const QString& xmlFile)
+ToolbarXMLGUI::ToolbarXMLGUI(const TQString& xmlFile)
: KXMLGUIClient()
{
setLocalXMLFile(xmlFile);
diff --git a/quanta/utility/toolbarxmlgui.h b/quanta/utility/toolbarxmlgui.h
index 74ac04cf..3043424a 100644
--- a/quanta/utility/toolbarxmlgui.h
+++ b/quanta/utility/toolbarxmlgui.h
@@ -25,7 +25,7 @@
class ToolbarXMLGUI : public KXMLGUIClient {
public:
- ToolbarXMLGUI(const QString& xmlFile);
+ ToolbarXMLGUI(const TQString& xmlFile);
~ToolbarXMLGUI();
};