From e985f7e545f4739493965aad69bbecb136dc9346 Mon Sep 17 00:00:00 2001
From: tpearson
Date: Thu, 16 Jun 2011 19:02:47 +0000
Subject: TQt4 port kdewebdev This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
---
kommander/Kommander-TODO.kno | 24 +-
kommander/editor/actiondnd.cpp | 438 +++++------
kommander/editor/actiondnd.h | 86 ++-
kommander/editor/actioneditor.ui | 16 +-
kommander/editor/actioneditorimpl.cpp | 31 +-
kommander/editor/actioneditorimpl.h | 5 +-
kommander/editor/actionlistview.cpp | 14 +-
kommander/editor/actionlistview.h | 29 +-
kommander/editor/asciivalidator.cpp | 16 +-
kommander/editor/asciivalidator.h | 11 +-
kommander/editor/assistproc.cpp | 6 +-
kommander/editor/assistproc.h | 9 +-
kommander/editor/assoctexteditor.ui | 38 +-
kommander/editor/assoctexteditorimpl.cpp | 48 +-
kommander/editor/assoctexteditorimpl.h | 1 +
kommander/editor/choosewidget.ui | 24 +-
kommander/editor/choosewidgetimpl.cpp | 14 +-
kommander/editor/choosewidgetimpl.h | 3 +-
kommander/editor/command.cpp | 384 +++++-----
kommander/editor/command.h | 81 +-
kommander/editor/connectioneditor.ui | 42 +-
kommander/editor/connectioneditorimpl.cpp | 82 +-
kommander/editor/connectioneditorimpl.h | 10 +-
kommander/editor/createtemplate.ui | 22 +-
kommander/editor/defs.cpp | 2 +-
kommander/editor/defs.h | 2 +-
kommander/editor/filechooser.cpp | 14 +-
kommander/editor/filechooser.h | 9 +-
kommander/editor/formfile.cpp | 24 +-
kommander/editor/formfile.h | 5 +-
kommander/editor/formsettings.ui | 36 +-
kommander/editor/formsettingsimpl.cpp | 14 +-
kommander/editor/formsettingsimpl.h | 5 +-
kommander/editor/formwindow.cpp | 576 +++++++-------
kommander/editor/formwindow.h | 37 +-
kommander/editor/functions.ui | 100 +--
kommander/editor/functionsimpl.cpp | 40 +-
kommander/editor/functionsimpl.h | 1 +
kommander/editor/globaldefs.h | 2 +-
kommander/editor/hierarchyview.cpp | 144 ++--
kommander/editor/hierarchyview.h | 26 +-
kommander/editor/iconvieweditor.ui | 58 +-
kommander/editor/iconvieweditorimpl.cpp | 8 +-
kommander/editor/iconvieweditorimpl.h | 5 +-
kommander/editor/kommander-new.xml | 18 +-
kommander/editor/kommander.xml | 26 +-
kommander/editor/layout.cpp | 298 ++++----
kommander/editor/layout.h | 45 +-
kommander/editor/listboxeditor.ui | 56 +-
kommander/editor/listboxeditorimpl.cpp | 8 +-
kommander/editor/listboxeditorimpl.h | 5 +-
kommander/editor/listeditor.ui | 22 +-
kommander/editor/listvieweditor.ui | 120 +--
kommander/editor/listvieweditorimpl.cpp | 44 +-
kommander/editor/listvieweditorimpl.h | 7 +-
kommander/editor/main.cpp | 2 +-
kommander/editor/mainwindow.cpp | 290 ++++----
kommander/editor/mainwindow.h | 13 +-
kommander/editor/mainwindowactions.cpp | 288 +++----
kommander/editor/messagelog.cpp | 10 +-
kommander/editor/messagelog.h | 5 +-
kommander/editor/metadatabase.cpp | 206 +++---
kommander/editor/metadatabase.h | 6 +-
kommander/editor/multilineeditor.ui | 20 +-
kommander/editor/multilineeditorimpl.cpp | 20 +-
kommander/editor/multilineeditorimpl.h | 10 +-
kommander/editor/newform.ui | 32 +-
kommander/editor/newformimpl.cpp | 28 +-
kommander/editor/newformimpl.h | 7 +-
kommander/editor/orderindicator.cpp | 6 +-
kommander/editor/orderindicator.h | 5 +-
kommander/editor/paletteeditor.ui | 46 +-
kommander/editor/paletteeditoradvanced.ui | 62 +-
kommander/editor/paletteeditoradvancedimpl.cpp | 24 +-
kommander/editor/paletteeditoradvancedimpl.h | 7 +-
kommander/editor/paletteeditorimpl.cpp | 10 +-
kommander/editor/paletteeditorimpl.h | 7 +-
kommander/editor/parser.cpp | 16 +-
kommander/editor/parser.h | 2 +-
kommander/editor/pics/images.h | 58 +-
kommander/editor/pixmapchooser.cpp | 50 +-
kommander/editor/pixmapchooser.h | 16 +-
kommander/editor/pixmapfunction.ui | 32 +-
kommander/editor/preferences.ui | 62 +-
kommander/editor/previewframe.cpp | 8 +-
kommander/editor/previewframe.h | 14 +-
kommander/editor/previewwidget.ui | 44 +-
kommander/editor/previewwidgetimpl.cpp | 8 +-
kommander/editor/previewwidgetimpl.h | 5 +-
kommander/editor/propertyeditor.cpp | 350 ++++-----
kommander/editor/propertyeditor.h | 52 +-
kommander/editor/qcompletionedit.cpp | 16 +-
kommander/editor/qcompletionedit.h | 13 +-
kommander/editor/resource.cpp | 507 ++++++-------
kommander/editor/resource.h | 14 +-
kommander/editor/sizehandle.cpp | 62 +-
kommander/editor/sizehandle.h | 9 +-
kommander/editor/styledbutton.cpp | 42 +-
kommander/editor/styledbutton.h | 25 +-
kommander/editor/tableeditor.ui | 118 +--
kommander/editor/tableeditorimpl.cpp | 60 +-
kommander/editor/tableeditorimpl.h | 3 +-
kommander/editor/templates/Configuration_Dialog.ui | 22 +-
.../templates/Dialog_with_Buttons_(Bottom).ui | 14 +-
.../templates/Dialog_with_Buttons_(Right).ui | 14 +-
kommander/editor/templates/Tab_Dialog.ui | 20 +-
kommander/editor/timestamp.cpp | 6 +-
kommander/editor/timestamp.h | 7 +-
kommander/editor/widgetdatabase.cpp | 138 ++--
kommander/editor/widgetdatabase.h | 8 +-
kommander/editor/widgetfactory.cpp | 824 +++++++++++----------
kommander/editor/widgetfactory.h | 217 +++---
kommander/editor/widgetinterface.h | 8 +-
kommander/editor/wizardeditor.ui | 40 +-
kommander/editor/wizardeditorimpl.cpp | 20 +-
kommander/editor/wizardeditorimpl.h | 5 +-
kommander/editor/workspace.cpp | 54 +-
kommander/editor/workspace.h | 19 +-
kommander/examples/current/a1.kmdr | 16 +-
kommander/examples/current/b1.kmdr | 12 +-
kommander/examples/current/editor-poc.kmdr | 22 +-
kommander/examples/current/keyvaluecombo.kmdr | 12 +-
kommander/examples/current/kpartmwframe.kmdr | 8 +-
kommander/examples/current/kpartpart.kmdr | 18 +-
kommander/examples/current/passvariables.kmdr | 24 +-
kommander/examples/current/tableselect.kmdr | 10 +-
kommander/examples/old/checkmail.kmdr | 2 +-
kommander/examples/old/ex1.kmdr | 2 +-
kommander/examples/old/execprogram.kmdr | 8 +-
kommander/examples/old/firstform.kmdr.kmdr | 4 +-
kommander/examples/old/form1.kmdr | 2 +-
kommander/examples/old/form2.kmdr | 6 +-
kommander/examples/old/form3.kmdr | 2 +-
kommander/examples/old/form4.kmdr | 4 +-
kommander/examples/old/form5.kmdr | 6 +-
kommander/examples/old/newfile.kmdr | 6 +-
kommander/examples/old/populate.kmdr | 6 +-
kommander/examples/old/resize.kmdr | 20 +-
kommander/examples/old/selectedwidgettext.kmdr | 6 +-
kommander/examples/old/settings.kmdr | 16 +-
kommander/examples/old/simplelist.kmdr | 4 +-
kommander/examples/old/tar.kmdr | 24 +-
kommander/examples/old/tidy.kmdr | 26 +-
kommander/examples/old/widgetgenerator.kmdr | 32 +-
kommander/examples/old/wizard.kmdr | 10 +-
kommander/examples/tutorial/append.kmdr | 8 +-
kommander/examples/tutorial/arrays.kmdr | 10 +-
kommander/examples/tutorial/calc.kmdr | 28 +-
kommander/examples/tutorial/cmdline.kmdr | 6 +-
kommander/examples/tutorial/dcop.kmdr | 8 +-
kommander/examples/tutorial/dialogs.kmdr | 4 +-
kommander/examples/tutorial/globals.kmdr | 4 +-
kommander/examples/tutorial/initialize.kmdr | 12 +-
kommander/examples/tutorial/loop.kmdr | 6 +-
kommander/examples/tutorial/picview.kmdr | 10 +-
kommander/examples/tutorial/progressbar.kmdr | 10 +-
kommander/examples/tutorial/settings.kmdr | 16 +-
kommander/examples/tutorial/slots.kmdr | 16 +-
kommander/examples/tutorial/statusbar.kmdr | 2 +-
kommander/examples/tutorial/strings.kmdr | 18 +-
kommander/examples/tutorial/table.kmdr | 8 +-
kommander/examples/tutorial/tree.kmdr | 10 +-
kommander/examples/tutorial/widgets.kmdr | 8 +-
kommander/executor/dcopkommanderif.h | 2 +-
kommander/executor/instance.cpp | 26 +-
kommander/executor/instance.h | 7 +-
kommander/executor/main.cpp | 2 +-
kommander/executor/register.cpp | 8 +-
kommander/factory/domtool.cpp | 10 +-
kommander/factory/domtool.h | 4 +-
kommander/factory/kommanderfactory.cpp | 367 ++++-----
kommander/factory/kommanderfactory.h | 22 +-
kommander/kmdrtools/dcoptool-oldparser.kmdr | 74 +-
kommander/kmdrtools/examples.kmdr | 8 +-
kommander/part/kommander_part.cpp | 10 +-
kommander/part/kommander_part.h | 5 +-
kommander/plugin/kommanderplugin.h | 23 +-
kommander/plugin/specialinformation.cpp | 58 +-
kommander/plugin/specialinformation.h | 10 +-
kommander/plugin/specials.h | 10 +-
kommander/pluginmanager/main.cpp | 6 +-
kommander/pluginmanager/mainwindow.cpp | 6 +-
kommander/pluginmanager/mainwindow.h | 3 +-
kommander/pluginmanager/pluginmanager.cpp | 4 +-
kommander/widget/expression.cpp | 2 +-
kommander/widget/functionlib.cpp | 62 +-
kommander/widget/invokeclass.cpp | 10 +-
kommander/widget/invokeclass.h | 3 +-
kommander/widget/kmdrmainwindow.cpp | 4 +-
kommander/widget/kmdrmainwindow.h | 3 +-
kommander/widget/kommanderfunctions.cpp | 34 +-
kommander/widget/kommanderwidget.cpp | 90 +--
kommander/widget/kommanderwidget.h | 12 +-
kommander/widget/myprocess.cpp | 10 +-
kommander/widget/myprocess.h | 3 +-
kommander/widget/parsenode.cpp | 4 +-
kommander/widget/parser.cpp | 44 +-
kommander/widget/parser.h | 4 +-
kommander/widget/parserdata.cpp | 6 +-
kommander/widgets/aboutdialog.cpp | 4 +-
kommander/widgets/aboutdialog.h | 9 +-
kommander/widgets/buttongroup.cpp | 10 +-
kommander/widgets/buttongroup.h | 7 +-
kommander/widgets/checkbox.cpp | 6 +-
kommander/widgets/checkbox.h | 7 +-
kommander/widgets/closebutton.cpp | 12 +-
kommander/widgets/closebutton.h | 9 +-
kommander/widgets/combobox.cpp | 8 +-
kommander/widgets/combobox.h | 7 +-
kommander/widgets/datepicker.cpp | 6 +-
kommander/widgets/datepicker.h | 7 +-
kommander/widgets/dialog.cpp | 18 +-
kommander/widgets/dialog.h | 15 +-
kommander/widgets/execbutton.cpp | 16 +-
kommander/widgets/execbutton.h | 11 +-
kommander/widgets/fileselector.cpp | 12 +-
kommander/widgets/fileselector.h | 19 +-
kommander/widgets/fontdialog.cpp | 4 +-
kommander/widgets/fontdialog.h | 10 +-
kommander/widgets/groupbox.cpp | 10 +-
kommander/widgets/groupbox.h | 7 +-
kommander/widgets/konsole.cpp | 4 +-
kommander/widgets/konsole.h | 9 +-
kommander/widgets/label.cpp | 6 +-
kommander/widgets/label.h | 7 +-
kommander/widgets/lineedit.cpp | 6 +-
kommander/widgets/lineedit.h | 7 +-
kommander/widgets/listbox.cpp | 16 +-
kommander/widgets/listbox.h | 7 +-
kommander/widgets/pixmaplabel.cpp | 6 +-
kommander/widgets/pixmaplabel.h | 7 +-
kommander/widgets/plugin.cpp | 70 +-
kommander/widgets/popupmenu.cpp | 12 +-
kommander/widgets/popupmenu.h | 9 +-
kommander/widgets/progressbar.cpp | 10 +-
kommander/widgets/progressbar.h | 7 +-
kommander/widgets/radiobutton.cpp | 6 +-
kommander/widgets/radiobutton.h | 7 +-
kommander/widgets/richtexteditor.cpp | 30 +-
kommander/widgets/richtexteditor.h | 9 +-
kommander/widgets/scriptobject.cpp | 8 +-
kommander/widgets/scriptobject.h | 7 +-
kommander/widgets/slider.cpp | 2 +-
kommander/widgets/slider.h | 8 +-
kommander/widgets/spinboxint.cpp | 6 +-
kommander/widgets/spinboxint.h | 7 +-
kommander/widgets/statusbar.cpp | 6 +-
kommander/widgets/statusbar.h | 7 +-
kommander/widgets/subdialog.cpp | 2 +-
kommander/widgets/subdialog.h | 9 +-
kommander/widgets/table.cpp | 12 +-
kommander/widgets/table.h | 9 +-
kommander/widgets/tabwidget.cpp | 2 +-
kommander/widgets/tabwidget.h | 7 +-
kommander/widgets/textbrowser.cpp | 2 +-
kommander/widgets/textbrowser.h | 7 +-
kommander/widgets/textedit.cpp | 12 +-
kommander/widgets/textedit.h | 8 +-
kommander/widgets/timer.cpp | 2 +-
kommander/widgets/timer.h | 11 +-
kommander/widgets/toolbox.cpp | 8 +-
kommander/widgets/toolbox.h | 9 +-
kommander/widgets/treewidget.cpp | 56 +-
kommander/widgets/treewidget.h | 11 +-
kommander/widgets/wizard.cpp | 2 +-
kommander/widgets/wizard.h | 11 +-
kommander/working/plugintemplate/plugin.cpp | 6 +-
kommander/working/plugintemplate/src-Makefile.am | 2 +-
kommander/working/plugintemplate/widget.cpp | 10 +-
kommander/working/plugintemplate/widget.h | 9 +-
270 files changed, 4802 insertions(+), 4650 deletions(-)
(limited to 'kommander')
diff --git a/kommander/Kommander-TODO.kno b/kommander/Kommander-TODO.kno
index ebbe5651..d21460b5 100644
--- a/kommander/Kommander-TODO.kno
+++ b/kommander/Kommander-TODO.kno
@@ -16,10 +16,10 @@
\NewEntry 1 Editor
Layout of Edit Kommander Text dialog
Old ideas:
-- better layout
+- better tqlayout
- replace list of widgets with tree of widgets
- replace widget class with widget pixmap in combos
-- redesign layout
+- redesign tqlayout
- cleanup Connections, not it is unusable, may be obsolete
- find in scripts
- list of non-empty scripts for current dialog
@@ -37,7 +37,7 @@
- use KDE dialogs, not Qt ones if possible
- some widget information on mouseover
- review of event model
-- add more layout-handling commands (center selected widgets horizontally/vertically, fit to window width/height)
+- add more tqlayout-handling commands (center selected widgets horizontally/vertically, fit to window width/height)
- handle middle click
- carefully check defaults, choose most useful ones
- add wizards? (replace current New dialogs with Kommander-based ones?)
@@ -72,8 +72,8 @@
\NewEntry 1 Other
Other GUI-related issues
-- cleanup slots/signals/connections interface
-- find out why slots are shown only for current tab
+- cleanup Q_SLOTS/Q_SIGNALS/connections interface
+- find out why Q_SLOTS are shown only for current tab
KDE4 ideas:
- create a KDevelop plugin for the editor
- use KFormDesigner or the new Qt Designer
@@ -85,7 +85,7 @@
- Charset is sometimes incorrectly converted from/to local charset
- SubDialog crashes now
- Labels do not show up unless you edit their text
-- toolbox editing is ugly after group layout is applied. Goes back to normal if the dialog is reloaded.
+- toolbox editing is ugly after group tqlayout is applied. Goes back to normal if the dialog is reloaded.
@@ -147,7 +147,7 @@
- detect incorrect path at shebang, allow user to choose correct one and remeber that pair
-If we keep the old parser.
Make it possible to use any language with Kommander. The idea is to replace Kommander specials with language specific code in a way that it will not break conditions and loops, like now. example:
#!/bin/bash
array="1 2 3 4 5"
for i in $array do
@Label.setText($i)
done
This does not work now. The idea is to replace @Widget.method() with a language specific DCOP call.
If the language has DCOP bindings, use those bindings to execute the dcop call. If not, use the command line
DCOP application. This is slower, but always works. In the above case, Kommander would replace
@Label.setText($i)
with
dcop kmdr-executor-PID KommanderIf setText Label $i
Kommander will have description files for each supported language about how to execute DCOP calls.
If the language has DCOP bindings, this description tells the syntax of the bindings. If it doesn't have, the description gives a way how to execute external applications. This should always exists, as all languages can execute external applications.
In KDE4, of course use DBUS instead of DCOP.
+If we keep the old parser.
Make it possible to use any language with Kommander. The idea is to replace Kommander specials with language specific code in a way that it will not break conditions and loops, like now. example:
#!/bin/bash
array="1 2 3 4 5"
for i in $array do
@Label.setText($i)
done
This does not work now. The idea is to tqreplace @Widget.method() with a language specific DCOP call.
If the language has DCOP bindings, use those bindings to execute the dcop call. If not, use the command line
DCOP application. This is slower, but always works. In the above case, Kommander would tqreplace
@Label.setText($i)
with
dcop kmdr-executor-PID KommanderIf setText Label $i
Kommander will have description files for each supported language about how to execute DCOP calls.
If the language has DCOP bindings, this description tells the syntax of the bindings. If it doesn't have, the description gives a way how to execute external applications. This should always exists, as all languages can execute external applications.
In KDE4, of course use DBUS instead of DCOP.
\NewEntry 1 Aliases
@@ -160,8 +160,8 @@
\NewEntry 1 Signals
-New signals for existing widgets
-- add signals for D&D
Requires dragContent and dragType, perhaps dragSource to be set.
+New Q_SIGNALS for existing widgets
+- add Q_SIGNALS for D&D
Requires dragContent and dragType, perhaps dragSource to be set.
@@ -218,7 +218,7 @@
\NewEntry 1 Done
-New widgets include the DatePicker, Popup Menu and Toolbox. New functions inlcude widget creation, hooking and unhooking signals and slots and full slot access as well as passing and returning parameters in scripts. WooHoo! Take that do list!
+New widgets include the DatePicker, Popup Menu and Toolbox. New functions inlcude widget creation, hooking and unhooking Q_SIGNALS and Q_SLOTS and full slot access as well as passing and returning parameters in scripts. WooHoo! Take that do list!
"
"The columns can be resized by dragging the separator in the list's header.
"
"The second tab shows all the form's slots, class variables, includes, etc.
"));
}
@@ -300,7 +300,7 @@ void MainWindow::setupActionEditor()
{
KDockWidget *dw = createDockWidget("Action Editor", TQPixmap(), 0, i18n("Actions"));
actionEditor = new ActionEditor(dw, "ActionEditor");
- //addToolBar(dw, Qt::DockLeft);
+ //addToolBar(dw, TQt::DockLeft);
dw->setWidget(actionEditor);
dw->setCaption(i18n("Action Editor"));
TQWhatsThis::add(actionEditor, i18n("The Action Editor"
@@ -368,7 +368,7 @@ int MainWindow::currentTool() const
{
if (!actionCurrentTool)
return POINTER_TOOL;
- return TQString::fromLatin1(actionCurrentTool->name()).toInt();
+ return TQString::tqfromLatin1(actionCurrentTool->name()).toInt();
}
void MainWindow::slotCreateBackups()
@@ -392,7 +392,7 @@ void MainWindow::slotCreateBackups()
form->formFile()->setModified(true);
if (!form->formFile()->save(false))
{
- KMessageBox::error(this, i18n("Cannot create backup file %1.").arg(backupName));
+ KMessageBox::error(this, i18n("Cannot create backup file %1.").tqarg(backupName));
}
form->formFile()->setFileName(fileName);
form->formFile()->setModified(modified);
@@ -417,7 +417,7 @@ void MainWindow::runForm()
while ((editor = it.current()) != 0L)
{
++it;
- static_cast(editor)->save();
+ static_cast(TQT_TQWIDGET(editor))->save();
}
delete editors;
@@ -436,7 +436,7 @@ void MainWindow::runForm()
::stat(m_fileName.local8Bit(), &statbuf);
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("Cannot create temporary file %1.").arg(m_backupName));
+ KMessageBox::error(this, i18n("Cannot create temporary file %1.").tqarg(m_backupName));
return;
}
form->formFile()->setFileName(m_fileName);
@@ -446,12 +446,12 @@ void MainWindow::runForm()
{
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("Cannot create backup file %1.").arg(m_fileName + ".backup"));
+ KMessageBox::error(this, i18n("Cannot create backup file %1.").tqarg(m_fileName + ".backup"));
}
::chmod(m_fileName.local8Bit(), S_IRWXU);
KProcess* process = new KProcess;
process->setUseShell(true);
- (*process) << "kmdr-executor" << TQString("\"%1\"").arg(form->formFile()->fileName());
+ (*process) << "kmdr-executor" << TQString("\"%1\"").tqarg(form->formFile()->fileName());
connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
TQT_SLOT(receivedStdout(KProcess*, char*, int)));
connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
@@ -481,7 +481,7 @@ void MainWindow::runForm4()
while ((editor = it.current()) != 0L)
{
++it;
- static_cast(editor)->save();
+ static_cast(TQT_TQWIDGET(editor))->save();
}
delete editors;
@@ -500,7 +500,7 @@ void MainWindow::runForm4()
::stat(m_fileName.local8Bit(), &statbuf);
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("Cannot create temporary file %1.").arg(m_backupName));
+ KMessageBox::error(this, i18n("Cannot create temporary file %1.").tqarg(m_backupName));
return;
}
form->formFile()->setFileName(m_fileName);
@@ -510,12 +510,12 @@ void MainWindow::runForm4()
{
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("Cannot create backup file %1.").arg(m_fileName + ".backup"));
+ KMessageBox::error(this, i18n("Cannot create backup file %1.").tqarg(m_fileName + ".backup"));
}
::chmod(m_fileName.local8Bit(), S_IRWXU);
KProcess* process = new KProcess;
process->setUseShell(true);
- (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName());
+ (*process) << "kommander" << TQString("\"%1\"").tqarg(form->formFile()->fileName());
connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
TQT_SLOT(receivedStdout(KProcess*, char*, int)));
connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
@@ -554,9 +554,9 @@ void MainWindow::showProperties(TQObject *o)
}
TQWidget *w = (TQWidget*)o;
setupHierarchyView();
- FormWindow *fw = (FormWindow*)isAFormWindowChild(w);
+ FormWindow *fw = (FormWindow*)isAFormWindowChild(TQT_TQOBJECT(w));
if (fw) {
- propertyEditor->setWidget(w, fw);
+ propertyEditor->setWidget(TQT_TQOBJECT(w), fw);
hierarchyView->setFormWindow(fw, w);
} else {
propertyEditor->setWidget(0, 0);
@@ -596,7 +596,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
while (w) {
if (w->inherits("PropertyList"))
break;
- w = w->parentWidget(true);
+ w = w->tqparentWidget(true);
}
if (w) {
propertyEditor->propertyList()->showCurrentWhatsThis();
@@ -617,7 +617,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
}
break;
case TQEvent::MouseButtonPress:
- if (((TQMouseEvent*)e)->button() == MidButton && dynamic_cast(o))
+ if (((TQMouseEvent*)e)->button() == Qt::MidButton && dynamic_cast(o))
{
AssocTextEditor *editor = new AssocTextEditor((TQWidget*)o, formWindow(), propertyEditor, m_partManager,
this, "AssocTextEditor", false); //deletes itself!
@@ -626,27 +626,27 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
return true;
}
case TQEvent::ContextMenu:
- if (o->inherits("QDesignerPopupMenu"))
+ if (o->inherits("TQDesignerPopupMenu"))
break;
- if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") ||
- o->inherits("QDesignerToolBar") ||
- (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("QDesignerToolBarSeparator")) &&
- o->parent() && o->parent()->inherits("QDesignerToolBar"))) {
+ if (o && currentTool() == POINTER_TOOL && (o->inherits("TQDesignerMenuBar") ||
+ o->inherits("TQDesignerToolBar") ||
+ (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("TQDesignerToolBarSeparator")) &&
+ o->tqparent() && o->tqparent()->inherits("TQDesignerToolBar"))) {
TQWidget *w = (TQWidget*)o;
- if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("QDesignerToolBarSeparator"))
- w = w->parentWidget();
- TQWidget *pw = w->parentWidget();
+ if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("TQDesignerToolBarSeparator"))
+ w = w->tqparentWidget();
+ TQWidget *pw = w->tqparentWidget();
while (pw) {
if (pw->inherits("FormWindow")) {
- ((FormWindow*)pw)->emitShowProperties(w);
- if (!o->inherits("QDesignerToolBar"))
+ ((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w));
+ if (!o->inherits("TQDesignerToolBar"))
return !o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !o->inherits(TQMENUBAR_OBJECT_NAME_STRING) &&
- !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("QDesignerToolBarSeparator");
+ !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("TQDesignerToolBarSeparator");
}
- pw = pw->parentWidget();
+ pw = pw->tqparentWidget();
}
}
- if (o && (o->inherits("QDesignerToolBar") || o->inherits("QDockWindowHandle"))
+ if (o && (o->inherits("TQDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING))
&& e->type() == TQEvent::ContextMenu)
break;
if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
@@ -719,7 +719,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::MouseButtonDblClick:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) {
if (o && o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && ((TQToolButton*)o)->isOn() &&
- o->parent() && o->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) && formWindow())
+ o->tqparent() && o->tqparent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) && formWindow())
formWindow()->setToolFixed();
break;
}
@@ -740,19 +740,19 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Hide:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
- if (((FormWindow*)w)->isWidgetSelected((TQWidget*)o))
- ((FormWindow*)w)->selectWidget((TQWidget*)o, false);
+ if (((FormWindow*)w)->isWidgetSelected(TQT_TQOBJECT(o)))
+ ((FormWindow*)w)->selectWidget(TQT_TQOBJECT(o), false);
break;
case TQEvent::Enter:
case TQEvent::Leave:
- if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar"))
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("TQDesignerMenuBar"))
break;
return true;
case TQEvent::Resize:
case TQEvent::Move:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
- if (WidgetFactory::layoutType((TQWidget*)o->parent()) != WidgetFactory::NoLayout) {
+ if (WidgetFactory::tqlayoutType((TQWidget*)o->tqparent()) != WidgetFactory::NoLayout) {
((FormWindow*)w)->updateSelection((TQWidget*)o);
if (e->type() != TQEvent::Resize)
((FormWindow*)w)->updateChildSelections((TQWidget*)o);
@@ -761,25 +761,25 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Close:
break;
case TQEvent::DragEnter:
- if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
workspace()->contentsDragEnterEvent((TQDragEnterEvent*)e);
return true;
}
break;
case TQEvent::DragMove:
- if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
workspace()->contentsDragMoveEvent((TQDragMoveEvent*)e);
return true;
}
break;
case TQEvent::Drop:
- if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
workspace()->contentsDropEvent((TQDropEvent*)e);
return true;
}
break;
case TQEvent::Show:
- if (o != this)
+ if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this))
break;
if (((TQShowEvent*)e)->spontaneous())
break;
@@ -808,12 +808,12 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const
{
- if (o->parent() && o->parent()->inherits(TQWIZARD_OBJECT_NAME_STRING) && !o->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
+ if (o->tqparent() && o->tqparent()->inherits(TQWIZARD_OBJECT_NAME_STRING) && !o->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
return 0;
while (o) {
if (o->inherits("FormWindow"))
return (TQWidget*)o;
- o = o->parent();
+ o = o->tqparent();
}
return 0;
}
@@ -821,11 +821,11 @@ TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const
TQWidget *MainWindow::isAToolBarChild(TQObject *o) const
{
while (o) {
- if (o->inherits("QDesignerToolBar"))
+ if (o->inherits("TQDesignerToolBar"))
return (TQWidget*)o;
if (o->inherits("FormWindow"))
return 0;
- o = o->parent();
+ o = o->tqparent();
}
return 0;
}
@@ -837,7 +837,7 @@ FormWindow *MainWindow::formWindow()
if (qworkspace->activeWindow()->inherits("FormWindow"))
fw = (FormWindow*)qworkspace->activeWindow();
else if (lastActiveFormWindow &&
- qworkspace->windowList().find(lastActiveFormWindow) != -1)
+ qworkspace->windowList().tqfind(lastActiveFormWindow) != -1)
fw = lastActiveFormWindow;
return fw;
}
@@ -848,7 +848,7 @@ void MainWindow::insertFormWindow(FormWindow *fw)
{
if (fw)
TQWhatsThis::add(fw, i18n("The Form Window"
- "Use the various tools to add widgets or to change the layout "
+ "
Use the various tools to add widgets or to change the tqlayout "
"and behavior of the components in the form. Select one or multiple "
"widgets to move them or lay them out. If a single widget is chosen it can "
"be resized using the resize handles.
"
@@ -872,12 +872,12 @@ void MainWindow::insertFormWindow(FormWindow *fw)
fw->show();
fw->currentToolChanged();
- if (fw->caption().isEmpty() && qstrlen(fw->name()) )
+ if (fw->caption().isEmpty() && tqstrlen(fw->name()) )
fw->setCaption(fw->name());
fw->mainContainer()->setCaption(fw->caption());
WidgetFactory::saveDefaultProperties(fw->mainContainer(),
WidgetDatabase::
- idFromClassName(WidgetFactory::classNameOf(fw->mainContainer())));
+ idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(fw->mainContainer()))));
activeWindowChanged(fw);
emit formWindowsChanged();
}
@@ -934,7 +934,7 @@ void MainWindow::activeWindowChanged(TQWidget *w)
emit hasActiveForm(false);
propertyEditor->clear();
hierarchyView->clear();
- updateUndoRedo(false, false, TQString::null, TQString::null);
+ updateUndoRedo(false, false, TQString(), TQString());
}
selectionChanged();
@@ -952,11 +952,11 @@ void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable,
actionEditUndo->setEnabled(undoAvailable);
actionEditRedo->setEnabled(redoAvailable);
if (!undoCmd.isEmpty())
- actionEditUndo->setText(i18n("&Undo: %1").arg(undoCmd));
+ actionEditUndo->setText(i18n("&Undo: %1").tqarg(undoCmd));
else
actionEditUndo->setText(i18n("&Undo: Not Available"));
if (!redoCmd.isEmpty())
- actionEditRedo->setText(i18n("&Redo: %1").arg(redoCmd));
+ actionEditRedo->setText(i18n("&Redo: %1").tqarg(redoCmd));
else
actionEditRedo->setText(i18n("&Redo: Not Available"));
@@ -1012,18 +1012,18 @@ void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidge
void MainWindow::setupRMBProperties(TQValueList &ids, TQMap &props, TQWidget *w)
{
- const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
+ const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true);
if (text && qstrcmp(text->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
text = 0;
- const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true);
if (title && qstrcmp(title->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
title = 0;
const TQMetaProperty* pagetitle =
- w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pageTitle", true), true);
if (pagetitle && qstrcmp(pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
pagetitle = 0;
const TQMetaProperty* pixmap =
- w->metaObject()->property(w->metaObject()->findProperty("pixmap", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pixmap", true), true);
if (pixmap && qstrcmp(pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0)
pixmap = 0;
@@ -1056,7 +1056,7 @@ void MainWindow::setupRMBProperties(TQValueList &ids, TQMap
void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMap &commands, TQWidget *w)
{
int id;
- // KommanderWidget doesn't derive from QObject
+ // KommanderWidget doesn't derive from TQObject
KommanderWidget *atw = dynamic_cast(w);
if(atw)
{
@@ -1071,7 +1071,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMapinherits(TQTABWIDGET_OBJECT_NAME_STRING)) {
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
- if (((QDesignerTabWidget*)w)->count() > 1) {
+ if (((TQDesignerTabWidget*)w)->count() > 1) {
ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0));
commands.insert("remove", id);
}
@@ -1088,7 +1088,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMapinsertItem(i18n("Add Page"), -1, 0));
commands.insert("add", id);
}
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))))
{
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
@@ -1101,7 +1101,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList &ids, TQMap(fw->mainContainer());
if(atw)
{
@@ -1153,49 +1153,49 @@ void MainWindow::handleRMBProperties(int id, TQMap &props, TQWidg
text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
}
if (ok) {
- TQString pn(i18n("Set the 'text' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'text' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"text", w->property("text"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "text", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "text", true);
}
} else if (id == props[ "title" ]) {
bool ok = false;
TQString title = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
if (ok) {
- TQString pn(i18n("Set the 'title' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'title' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"title", w->property("title"),
- title, TQString::null, TQString::null);
+ title, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "title", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "title", true);
}
} else if (id == props[ "pagetitle" ]) {
bool ok = false;
TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this);
if (ok) {
- TQString pn(i18n("Set the 'pageTitle' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'pageTitle' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"pageTitle", w->property("pageTitle"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "pageTitle", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "pageTitle", true);
}
} else if (id == props[ "pixmap" ]) {
- TQPixmap oldPix = w->property("pixmap").toPixmap();
+ TQPixmap oldPix = TQVariant(w->property("pixmap")).toPixmap();
TQPixmap pix = qChoosePixmap(this, formWindow(), oldPix);
if (!pix.isNull()) {
- TQString pn(i18n("Set the 'pixmap' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'pixmap' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"pixmap", w->property("pixmap"),
- pix, TQString::null, TQString::null);
+ pix, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "pixmap", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "pixmap", true);
}
}
}
@@ -1214,15 +1214,15 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands
if (w->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) {
TQTabWidget *tw = (TQTabWidget*)w;
if (id == commands[ "add" ]) {
- AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
+ AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(),
tw, "Tab");
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
} else if (id == commands[ "remove" ]) {
if (tw->currentPage()) {
- QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
+ TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2").
- arg(dtw->pageTitle()).arg(tw->name()),
+ tqarg(dtw->pageTitle()).tqarg(tw->name()),
formWindow(), tw, tw->currentPage());
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
@@ -1232,7 +1232,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands
if (w->inherits(TQTOOLBOX_OBJECT_NAME_STRING)) {
TQToolBox *tw = (TQToolBox*)w;
if (id == commands[ "add" ]) {
- AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
+ AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(),
tw, "Page");
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
@@ -1240,16 +1240,16 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands
if (tw->currentItem()) {
EditorToolBox *dtw = (EditorToolBox*)tw;
DeleteToolBoxPageCommand *cmd = new DeleteToolBoxPageCommand(i18n("Delete Page %1 of %2").
- arg(dtw->pageTitle()).arg(tw->name()),
+ tqarg(dtw->pageTitle()).tqarg(tw->name()),
formWindow(), tw, tw->currentItem());
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
}
}
}
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) {
if (id == commands[ "edit" ])
- WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow());
}
}
@@ -1267,15 +1267,15 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands
if (fw->mainContainer()->inherits(TQWIZARD_OBJECT_NAME_STRING)) {
TQWizard *wiz = (TQWizard*)fw->mainContainer();
if (id == commands[ "add" ]) {
- AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(),
+ AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").tqarg(wiz->name()), formWindow(),
wiz, "Page");
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
} else if (id == commands[ "remove" ]) {
if (wiz->currentPage()) {
- QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ TQDesignerWizard *dw = (TQDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2").
- arg(dw->pageTitle()).arg(wiz->name()),
+ tqarg(dw->pageTitle()).tqarg(wiz->name()),
formWindow(), wiz, wiz->indexOf(wiz->currentPage()));
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
@@ -1287,10 +1287,10 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands
} else if (id == commands[ "rename" ]) {
bool ok = false;
- QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ TQDesignerWizard *dw = (TQDesignerWizard*)wiz;
TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this);
if (ok) {
- TQString pn(i18n("Rename page %1 of %2").arg(dw->pageTitle()).arg(wiz->name()));
+ TQString pn(i18n("Rename page %1 of %2").tqarg(dw->pageTitle()).tqarg(wiz->name()));
RenameWizardPageCommand *cmd = new RenameWizardPageCommand(pn, formWindow()
, wiz, wiz->indexOf(wiz->currentPage()), text);
formWindow()->commandHistory()->addCommand(cmd);
@@ -1300,11 +1300,11 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap &commands
} else if (fw->mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) {
TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
if (id == commands[ "add_toolbar" ]) {
- AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").arg(formWindow()->name()), formWindow(), mw);
+ AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").tqarg(formWindow()->name()), formWindow(), mw);
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
} else if (id == commands[ "add_menu_item" ]) {
- AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").arg(formWindow()->name()), formWindow(), mw);
+ AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").tqarg(formWindow()->name()), formWindow(), mw);
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
}
@@ -1320,8 +1320,8 @@ void MainWindow::clipboardChanged()
void MainWindow::selectionChanged()
{
- layoutChilds = false;
- layoutSelected = false;
+ tqlayoutChilds = false;
+ tqlayoutSelected = false;
breakLayout = false;
if (!formWindow()) {
actionEditCut->setEnabled(false);
@@ -1358,7 +1358,7 @@ void MainWindow::selectionChanged()
int unlaidout = 0;
int laidout = 0;
for (TQWidget *w = widgets.first(); w; w = widgets.next()) {
- if (!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout)
+ if (!w->tqparentWidget() || WidgetFactory::tqlayoutType(w->tqparentWidget()) == WidgetFactory::NoLayout)
unlaidout++;
else
laidout++;
@@ -1370,27 +1370,27 @@ void MainWindow::selectionChanged()
actionEditGridLayout->setEnabled(unlaidout > 1);
actionEditBreakLayout->setEnabled(laidout > 0);
actionEditAdjustSize->setEnabled(laidout > 0);
- layoutSelected = unlaidout > 1;
+ tqlayoutSelected = unlaidout > 1;
breakLayout = laidout > 0;
} else if (selectedWidgets == 1) {
TQWidget *w = widgets.first();
- bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))) ||
+ bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))) ||
w == formWindow()->mainContainer();
- actionEditAdjustSize->setEnabled(!w->parentWidget() ||
- WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout);
+ actionEditAdjustSize->setEnabled(!w->tqparentWidget() ||
+ WidgetFactory::tqlayoutType(w->tqparentWidget()) == WidgetFactory::NoLayout);
if (!isContainer) {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
actionEditGridLayout->setEnabled(false);
- if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) {
- actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ if (w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout) {
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w)));
breakLayout = true;
} else {
actionEditBreakLayout->setEnabled(false);
}
} else {
- if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) {
+ if (WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout) {
if (!formWindow()->hasInsertedChildren(w)) {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
@@ -1401,24 +1401,24 @@ void MainWindow::selectionChanged()
actionEditVLayout->setEnabled(true);
actionEditGridLayout->setEnabled(true);
actionEditBreakLayout->setEnabled(false);
- layoutChilds = true;
+ tqlayoutChilds = true;
}
- if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) {
- actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ if (w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout) {
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w)));
breakLayout = true;
}
} else {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
actionEditGridLayout->setEnabled(false);
- actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w)));
breakLayout = true;
}
}
} else if (selectedWidgets == 0 && formWindow()) {
actionEditAdjustSize->setEnabled(true);
TQWidget *w = formWindow()->mainContainer();
- if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) {
+ if (WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout) {
if (!formWindow()->hasInsertedChildren(w)) {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
@@ -1429,7 +1429,7 @@ void MainWindow::selectionChanged()
actionEditVLayout->setEnabled(true);
actionEditGridLayout->setEnabled(true);
actionEditBreakLayout->setEnabled(false);
- layoutChilds = true;
+ tqlayoutChilds = true;
}
} else {
actionEditHLayout->setEnabled(false);
@@ -1464,7 +1464,7 @@ void MainWindow::writeConfig()
config->setGroup("Background");
config->writeEntry("UsePixmap", backPix);
- config->writeEntry("Color", qworkspace->backgroundColor().name());
+ config->writeEntry("Color", TQString(qworkspace->backgroundColor().name()));
/*
config->setGroup("Geometry");
@@ -1491,7 +1491,7 @@ void MainWindow::readConfig()
restoreConfig = config->readBoolEntry("RestoreWorkspace", true);
splashScreen = config->readBoolEntry("SplashScreen", true);
docPath = config->readEntry("DocPath", docPath);
- templPath = config->readEntry("TemplatePath", TQString::null);
+ templPath = config->readEntry("TemplatePath", TQString());
config->setGroup("Grid");
sGrid = config->readBoolEntry("Snap", true);
@@ -1541,9 +1541,9 @@ HierarchyView *MainWindow::objectHierarchy() const
return hierarchyView;
}
-TQPopupMenu *MainWindow::setupNormalHierarchyMenu(TQWidget *parent)
+TQPopupMenu *MainWindow::setupNormalHierarchyMenu(TQWidget *tqparent)
{
- TQPopupMenu *menu = new TQPopupMenu(parent);
+ TQPopupMenu *menu = new TQPopupMenu(tqparent);
actionEditCut->plug(menu);
actionEditCopy->plug(menu);
@@ -1553,12 +1553,12 @@ TQPopupMenu *MainWindow::setupNormalHierarchyMenu(TQWidget *parent)
return menu;
}
-TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(TQWidget *parent, const char *addSlot, const char *removeSlot)
+TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(TQWidget *tqparent, const char *addSlot, const char *removeSlot)
{
- TQPopupMenu *menu = new TQPopupMenu(parent);
+ TQPopupMenu *menu = new TQPopupMenu(tqparent);
- menu->insertItem(i18n("Add Page"), parent, addSlot);
- menu->insertItem(i18n("Delete Page"), parent, removeSlot);
+ menu->insertItem(i18n("Add Page"), tqparent, addSlot);
+ menu->insertItem(i18n("Delete Page"), tqparent, removeSlot);
menu->insertSeparator();
actionEditCut->plug(menu);
actionEditCopy->plug(menu);
@@ -1620,15 +1620,15 @@ ActionEditor *MainWindow::actioneditor() const
bool MainWindow::openEditor(TQWidget* w, FormWindow*)
{
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
- statusBar()->message(i18n("Edit %1...").arg(w->className()));
- WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) {
+ statusBar()->message(i18n("Edit %1...").tqarg(w->className()));
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow());
statusBar()->clear();
return true;
}
- const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
- const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true);
+ const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true);
if (text && text->designable(w)) {
bool ok = false;
TQString text;
@@ -1639,13 +1639,13 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*)
text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
}
if (ok) {
- TQString pn(i18n("Set the 'text' of '%2'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'text' of '%2'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"text", w->property("text"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "text", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "text", true);
}
return true;
}
@@ -1654,13 +1654,13 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*)
TQString text;
text = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
if (ok) {
- TQString pn(i18n("Set the 'title' of '%2'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'title' of '%2'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"title", w->property("title"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "title", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "title", true);
}
return true;
}
@@ -1706,9 +1706,9 @@ TQString MainWindow::documentationPath() const
TQString result = docPath;
if (docPath[0] == '$') {
- int fs = docPath.find('/');
+ int fs = docPath.tqfind('/');
if (fs == -1)
- fs = docPath.find('\\');
+ fs = docPath.tqfind('\\');
if (fs > -1) {
result = docPath.mid(1, fs-1);
@@ -1756,7 +1756,7 @@ void MainWindow::checkTempFiles()
void MainWindow::showDialogHelp()
{
TQWidget *w = (TQWidget*)sender();
- w = w->topLevelWidget();
+ w = w->tqtopLevelWidget();
TQString link = "designer-manual-12.html#";
@@ -1777,9 +1777,9 @@ void MainWindow::showDialogHelp()
else if (w->inherits("DatabaseConnectionBase"))
link += "dialog-edit-database-connections";
else if (w->inherits("FindDialog"))
- link += "dialog-find-text";
+ link += "dialog-tqfind-text";
else if (w->inherits("ReplaceDialog"))
- link += "dialog-replace-text";
+ link += "dialog-tqreplace-text";
else if (w->inherits("GotoLineDialog"))
link += "dialog-go-to-line";
else if (w->inherits("ConnectionEditorBase"))
@@ -1836,13 +1836,13 @@ void MainWindow::setModified(bool b, TQWidget *window)
((FormWindow *) w)->modificationChanged(b);
return;
}
- w = w->parentWidget(true);
+ w = w->tqparentWidget(true);
if (w->inherits("FormWindow"))
{
((FormWindow *) w)->modificationChanged(b);
return;
}
- w = w->parentWidget(true);
+ w = w->tqparentWidget(true);
}
}
@@ -1869,20 +1869,20 @@ void MainWindow::formNameChanged(FormWindow*)
int MainWindow::currentLayoutDefaultSpacing() const
{
if (((MainWindow*)this)->formWindow())
- return ((MainWindow*)this)->formWindow()->layoutDefaultSpacing();
+ return ((MainWindow*)this)->formWindow()->tqlayoutDefaultSpacing();
return BOXLAYOUT_DEFAULT_SPACING;
}
int MainWindow::currentLayoutDefaultMargin() const
{
if (((MainWindow*)this)->formWindow())
- return ((MainWindow*)this)->formWindow()->layoutDefaultMargin();
+ return ((MainWindow*)this)->formWindow()->tqlayoutDefaultMargin();
return BOXLAYOUT_DEFAULT_MARGIN;
}
TQString MainWindow::whatsThisFrom(const TQString&)
{
- return TQString::null;
+ return TQString();
}
void MainWindow::slotActivePartChanged(KParts::Part * part)
diff --git a/kommander/editor/mainwindow.h b/kommander/editor/mainwindow.h
index 1f4a9346..a8ac770e 100644
--- a/kommander/editor/mainwindow.h
+++ b/kommander/editor/mainwindow.h
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -53,7 +53,7 @@ class MessageLog;
class ReplaceDialog;
class Workspace;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
#include
#else
class TQToolBar;
@@ -68,6 +68,7 @@ namespace KParts {
class MainWindow : public KParts::DockMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
MainWindow( bool asClient );
@@ -93,8 +94,8 @@ public:
void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw );
void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w );
- TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent );
- TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot );
+ TQPopupMenu *setupNormalHierarchyMenu( TQWidget *tqparent );
+ TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *tqparent, const char *addSlot, const char *removeSlot );
FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
@@ -255,7 +256,7 @@ private:
TQWorkspace *qworkspace;
KMenuBar *menubar;
FormWindow *lastActiveFormWindow;
- bool breakLayout, layoutChilds, layoutSelected;
+ bool breakLayout, tqlayoutChilds, tqlayoutSelected;
TQPoint grd;
bool sGrid, snGrid;
bool restoreConfig;
@@ -279,7 +280,7 @@ private:
TQPopupMenu *rmbFormWindow;
TQPopupMenu *windowMenu, *fileMenu;
- TQToolBar *layoutToolBar;
+ TQToolBar *tqlayoutToolBar;
KToolBar *fileTb;
Preferences *prefDia;
diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp
index a4d4c430..f57afd72 100644
--- a/kommander/editor/mainwindowactions.cpp
+++ b/kommander/editor/mainwindowactions.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -19,6 +19,10 @@
#include "mainwindow.h"
+#ifdef QT_NO_SQL
+#define TQT_NO_SQL
+#endif // QT_NO_SQL
+
#include
#include
#include
@@ -26,7 +30,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -47,7 +51,7 @@
#include "connectioneditorimpl.h"
#include "actioneditorimpl.h"
#include "formfile.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "dbconnectionsimpl.h"
#include "dbconnectionimpl.h"
#endif
@@ -92,81 +96,81 @@ int forms = 0;
void MainWindow::setupEditActions()
{
- actionEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
+ actionEditUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(editUndo()), actionCollection());
actionEditUndo->setText(i18n("&Undo: Not Available"));
actionEditUndo->setToolTip(i18n("Undoes the last action"));
actionEditUndo->setWhatsThis(whatsThisFrom("Edit|Undo"));
actionEditUndo->setEnabled(false);
- actionEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
+ actionEditRedo = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(editRedo()), actionCollection());
actionEditRedo->setText(i18n("&Redo: Not Available"));
actionEditRedo->setToolTip(i18n("Redoes the last undone operation"));
actionEditRedo->setWhatsThis(whatsThisFrom("Edit|Redo"));
actionEditRedo->setEnabled(false);
- actionEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
+ actionEditCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(editCut()), actionCollection());
actionEditCut->setToolTip(i18n("Cuts the selected widgets and puts them on the clipboard"));
actionEditCut->setWhatsThis(whatsThisFrom("Edit|Cut"));
actionEditCut->setEnabled(false);
- actionEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
+ actionEditCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(editCopy()), actionCollection());
actionEditCopy->setToolTip(i18n("Copies the selected widgets to the clipboard"));
actionEditCopy->setWhatsThis(whatsThisFrom("Edit|Copy"));
actionEditCopy->setEnabled(false);
- actionEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
+ actionEditPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(editPaste()), actionCollection());
actionEditPaste->setToolTip(i18n("Pastes the clipboard's contents"));
actionEditPaste->setWhatsThis(whatsThisFrom("Edit|Paste"));
actionEditPaste->setEnabled(false);
- actionEditDelete = new KAction(i18n("Delete"), Key_Delete, this, TQT_SLOT(editDelete()),
+ actionEditDelete = new KAction(i18n("Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(editDelete()),
actionCollection(), "edit_delete");
actionEditDelete->setToolTip(i18n("Deletes the selected widgets"));
actionEditDelete->setWhatsThis(whatsThisFrom("Edit|Delete"));
actionEditDelete->setEnabled(false);
- actionEditSelectAll = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
+ actionEditSelectAll = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(editSelectAll()), actionCollection());
actionEditSelectAll->setToolTip(i18n("Selects all widgets"));
actionEditSelectAll->setWhatsThis(whatsThisFrom("Edit|Select All"));
actionEditRaise = new KAction(i18n("Bring to Front"), createIconSet("editraise.xpm"),
- KShortcut::null(), this, TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
actionEditRaise->setToolTip(i18n("Raises the selected widgets"));
actionEditRaise->setEnabled(false);
actionEditLower = new KAction(i18n("Send to Back"), createIconSet("editlower.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLower()), actionCollection(), "edit_lower");
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLower()), actionCollection(), "edit_lower");
actionEditLower->setToolTip(i18n("Lowers the selected widgets"));
actionEditLower->setWhatsThis(i18n("Lowers the selected widgets"));
actionEditLower->setEnabled(false);
- actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
+ actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, TQT_TQOBJECT(this), TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
actionEditFindGlobal->setToolTip(i18n("Search for a text in the whole form."));
actionEditFindGlobal->setWhatsThis(whatsThisFrom("Edit|Find in Form"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, TQT_SLOT(setEnabled(bool)));
- actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()),
+ actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, TQT_TQOBJECT(this), TQT_SLOT(editAccels()),
actionCollection(), "edit_check_accel");
actionEditAccels->setToolTip(i18n("Checks if the accelerators used in the form are unique"));
actionEditAccels->setWhatsThis(whatsThisFrom("Edit|Check Accelerator"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditAccels, TQT_SLOT(setEnabled(bool)));
actionEditConnections = new KAction(i18n("Connections"), createIconSet("connecttool.xpm"),
- KShortcut::null(), this, TQT_SLOT(editConnections()), actionCollection(),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editConnections()), actionCollection(),
"edit_connections");
actionEditConnections->setToolTip(i18n("Opens a dialog for editing connections"));
actionEditConnections->setWhatsThis(whatsThisFrom("Edit|Connections"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditConnections, TQT_SLOT(setEnabled(bool)));
actionEditFormSettings = new KAction(i18n("Form Settings..."), KShortcut::null(),
- this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
+ TQT_TQOBJECT(this), TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
actionEditFormSettings->setToolTip(i18n("Opens a dialog to change the form's settings"));
actionEditFormSettings->setWhatsThis(whatsThisFrom("Edit|Form Settings"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFormSettings, TQT_SLOT(setEnabled(bool)));
KToolBar *tb = new KToolBar(this, "Edit");
tb->setFullSize(false);
- TQWhatsThis::add(tb, i18n("The Edit toolbar%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("The Edit toolbar%1").tqarg(toolbarHelp));
addToolBar(tb, i18n("Edit"));
actionEditUndo->plug(tb);
actionEditRedo->plug(tb);
@@ -198,70 +202,70 @@ void MainWindow::setupEditActions()
void MainWindow::setupLayoutActions()
{
actionEditAdjustSize = new KAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"),
- CTRL + Key_J, this, TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
+ CTRL + Key_J, TQT_TQOBJECT(this), TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
actionEditAdjustSize->setToolTip(i18n("Adjusts the size of the selected widget"));
actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size"));
actionEditAdjustSize->setEnabled(false);
- actionEditHLayout = new KAction(i18n("Lay Out Horizontally"), createIconSet("edithlayout.xpm"),
- CTRL + Key_H, this, TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
+ actionEditHLayout = new KAction(i18n("Lay OutQt::Horizontally"), createIconSet("edithtqlayout.xpm"),
+ CTRL + Key_H, TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally"));
- actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally"));
+ actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally"));
actionEditHLayout->setEnabled(false);
- actionEditVLayout = new KAction(i18n("Lay Out Vertically"), createIconSet("editvlayout.xpm"),
- CTRL + Key_L, this, TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
+ actionEditVLayout = new KAction(i18n("Lay OutQt::Vertically"), createIconSet("editvtqlayout.xpm"),
+ CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically"));
- actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically"));
+ actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically"));
actionEditVLayout->setEnabled(false);
actionEditGridLayout = new KAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"),
- CTRL + Key_G, this, TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
+ CTRL + Key_G, TQT_TQOBJECT(this), TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
actionEditGridLayout->setToolTip(i18n("Lays out the selected widgets in a grid"));
actionEditGridLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out in a Grid"));
actionEditGridLayout->setEnabled(false);
- actionEditSplitHorizontal = new KAction(i18n("Lay Out Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
+ actionEditSplitHorizontal = new KAction(i18n("Lay OutQt::Horizontally in Splitter"), createIconSet("editvtqlayoutsplit.xpm"),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
"edit_split_h");
actionEditSplitHorizontal->setToolTip(i18n("Lays out the selected widgets horizontally in a splitter"));
- actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally in Splitter"));
+ actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally in Splitter"));
actionEditSplitHorizontal->setEnabled(false);
- actionEditSplitVertical = new KAction(i18n("Lay Out Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
+ actionEditSplitVertical = new KAction(i18n("Lay OutQt::Vertically in Splitter"), createIconSet("edithtqlayoutsplit.xpm"),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
"edit_split_v");
actionEditSplitVertical->setToolTip(i18n("Lays out the selected widgets vertically in a splitter"));
- actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically (in Splitter)"));
+ actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically (in Splitter)"));
actionEditSplitVertical->setEnabled(false);
actionEditBreakLayout = new KAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"),
- CTRL + Key_B, this, TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
- actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout"));
+ CTRL + Key_B, TQT_TQOBJECT(this), TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
+ actionEditBreakLayout->setToolTip(i18n("Breaks the selected tqlayout"));
actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout"));
int id = WidgetDatabase::idFromClassName("Spacer");
- KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), this, TQT_SLOT(toolSelected()),
+ KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(toolSelected()),
actionCollection(), TQString::number(id).latin1());
a->setExclusiveGroup("tool");
a->setText(i18n("Add ") + WidgetDatabase::className(id));
- a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::toolTip(id)));
+ a->setToolTip(i18n("Insert a %1").tqarg(WidgetDatabase::toolTip(id)));
a->setWhatsThis(i18n("A %1%2
"
"Click to insert a single %3,"
- "or double click to keep the tool selected.").arg(WidgetDatabase::toolTip(id)).
- arg(WidgetDatabase::whatsThis(id)).arg(WidgetDatabase::toolTip(id)));
-
- TQWhatsThis::add(layoutToolBar, i18n("The Layout toolbar%1").arg(toolbarHelp));
- actionEditAdjustSize->plug(layoutToolBar);
- layoutToolBar->addSeparator();
- actionEditHLayout->plug(layoutToolBar);
- actionEditVLayout->plug(layoutToolBar);
- actionEditGridLayout->plug(layoutToolBar);
- actionEditSplitHorizontal->plug(layoutToolBar);
- actionEditSplitVertical->plug(layoutToolBar);
- actionEditBreakLayout->plug(layoutToolBar);
- layoutToolBar->addSeparator();
- a->plug(layoutToolBar);
+ "or double click to keep the tool selected.").tqarg(WidgetDatabase::toolTip(id)).
+ tqarg(WidgetDatabase::whatsThis(id)).tqarg(WidgetDatabase::toolTip(id)));
+
+ TQWhatsThis::add(tqlayoutToolBar, i18n("The Layout toolbar%1").tqarg(toolbarHelp));
+ actionEditAdjustSize->plug(tqlayoutToolBar);
+ tqlayoutToolBar->addSeparator();
+ actionEditHLayout->plug(tqlayoutToolBar);
+ actionEditVLayout->plug(tqlayoutToolBar);
+ actionEditGridLayout->plug(tqlayoutToolBar);
+ actionEditSplitHorizontal->plug(tqlayoutToolBar);
+ actionEditSplitVertical->plug(tqlayoutToolBar);
+ actionEditBreakLayout->plug(tqlayoutToolBar);
+ tqlayoutToolBar->addSeparator();
+ a->plug(tqlayoutToolBar);
TQPopupMenu *menu = new TQPopupMenu(this, "Layout");
menuBar()->insertItem(i18n("&Layout"), menu);
@@ -280,21 +284,21 @@ void MainWindow::setupLayoutActions()
void MainWindow::setupToolActions()
{
actionPointerTool = new KToggleAction(i18n("Pointer"), "arrow", Key_F2,
- this, TQT_SLOT(toolSelected()), actionCollection(),
+ TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(POINTER_TOOL).latin1());
actionPointerTool->setToolTip(i18n("Selects the pointer tool"));
actionPointerTool->setWhatsThis(whatsThisFrom("Tools|Pointer"));
actionPointerTool->setExclusiveGroup("tool");
actionConnectTool = new KToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"),
- Key_F3, this, TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F3, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(CONNECT_TOOL).latin1());
actionConnectTool->setToolTip(i18n("Selects the connection tool"));
actionConnectTool->setWhatsThis(whatsThisFrom("Tools|Connect Signals and Slots"));
actionConnectTool->setExclusiveGroup("tool");
actionOrderTool = new KToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"),
- Key_F4, this, TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F4, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(ORDER_TOOL).latin1());
actionOrderTool->setToolTip(i18n("Selects the tab order tool"));
actionOrderTool->setWhatsThis(whatsThisFrom("Tools|Tab Order"));
@@ -302,7 +306,7 @@ void MainWindow::setupToolActions()
KToolBar *tb = new KToolBar(this, "Tools");
tb->setFullSize(false);
- TQWhatsThis::add(tb, i18n("The Tools toolbar%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("The Tools toolbar%1").tqarg(toolbarHelp));
addToolBar(tb, i18n("Tools"), TQMainWindow::DockTop, true);
actionPointerTool->plug(tb);
@@ -326,14 +330,14 @@ void MainWindow::setupToolActions()
bool plural = grp[(int) grp.length() - 1] == 's';
if (plural)
{
- TQWhatsThis::add(tb, i18n("The %1%2").arg(grp).arg(toolbarHelp).
- arg(i18n(" Click on a button to insert a single widget, "
- "or double click to insert multiple %1.")).arg(grp));
+ TQWhatsThis::add(tb, i18n("The %1%2").tqarg(grp).tqarg(toolbarHelp).
+ tqarg(i18n(" Click on a button to insert a single widget, "
+ "or double click to insert multiple %1.")).tqarg(grp));
} else
{
- TQWhatsThis::add(tb, i18n("The %1 Widgets%2").arg(grp).arg(toolbarHelp).
- arg(i18n(" Click on a button to insert a single %1 widget, "
- "or double click to insert multiple widgets.")).arg(grp));
+ TQWhatsThis::add(tb, i18n("The %1 Widgets%2").tqarg(grp).tqarg(toolbarHelp).
+ tqarg(i18n(" Click on a button to insert a single %1 widget, "
+ "or double click to insert multiple widgets.")).tqarg(grp));
}
addToolBar(tb, grp);
TQPopupMenu *menu = new TQPopupMenu(this, grp.latin1());
@@ -344,7 +348,7 @@ void MainWindow::setupToolActions()
if (WidgetDatabase::group(i) != grp)
continue; // only widgets, i.e. not forms and temp stuff
KToggleAction *a = new KToggleAction(WidgetDatabase::className(i), KShortcut::null(),
- this, TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
+ TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
a->setExclusiveGroup("tool");
TQString atext = WidgetDatabase::className(i);
if (atext[0] == 'Q')
@@ -359,11 +363,11 @@ void MainWindow::setupToolActions()
a->setToolTip(ttip);
if (!WidgetDatabase::isWhatsThisLoaded())
WidgetDatabase::loadWhatsThis(documentationPath());
- a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::className(i)));
+ a->setToolTip(i18n("Insert a %1").tqarg(WidgetDatabase::className(i)));
- TQString whats = i18n("A %1").arg(WidgetDatabase::className(i));
+ TQString whats = i18n("A %1").tqarg(WidgetDatabase::className(i));
if (!WidgetDatabase::whatsThis(i).isEmpty())
- whats += TQString("
%1
").arg(WidgetDatabase::whatsThis(i));
+ whats += TQString("%1
").tqarg(WidgetDatabase::whatsThis(i));
a->setWhatsThis(whats + i18n("Double click on this tool to keep it selected.
"));
if (grp != "KDE")
@@ -381,16 +385,16 @@ void MainWindow::setupToolActions()
if (!TQFile::exists(*it))
continue;
TQDir dir(*it);
- const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
+ const TQFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
if (fileList)
- for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
+ for (TQFileInfoListIterator fit(*fileList); fit.current(); ++fit)
{
TQFileInfo* fi = fit.current();
if (!fi->isFile() || fi->extension() != "kmdr")
continue;
TQString name = fi->baseName();
- name = name.replace("_", " ");
- editMenu->insertItem(name, this, TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
+ name = name.tqreplace("_", " ");
+ editMenu->insertItem(name, TQT_TQOBJECT(this), TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
m_editorTools.append(fi->filePath());
}
}
@@ -405,29 +409,29 @@ void MainWindow::setupFileActions()
fileTb = new KToolBar(this, "File");
fileTb->setFullSize(false);
- TQWhatsThis::add(fileTb, i18n("The File toolbar%1").arg(toolbarHelp));
+ TQWhatsThis::add(fileTb, i18n("The File toolbar%1").tqarg(toolbarHelp));
addToolBar(fileTb, i18n("File"));
fileMenu = new TQPopupMenu(this, "File");
menuBar()->insertItem(i18n("&File"), fileMenu);
- KAction *a = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection());
a->setToolTip(i18n("Creates a new dialog"));
a->setWhatsThis(whatsThisFrom("File|New"));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ a = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());
a->setToolTip(i18n("Opens an existing dialog"));
a->setWhatsThis(whatsThisFrom("File|Open"));
a->plug(fileTb);
a->plug(fileMenu);
- actionRecent = KStdAction::openRecent(this, TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
+ actionRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
actionRecent->setToolTip(i18n("Opens recently open file"));
actionRecent->plug(fileMenu);
fileMenu->insertSeparator();
- a = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
+ a = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(fileClose()), actionCollection());
a->setToolTip(i18n("Closes the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Close"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -435,20 +439,20 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ a = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(fileSave()), actionCollection());
a->setToolTip(i18n("Saves the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Save"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ a = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(fileSaveAs()), actionCollection());
a->setToolTip(i18n("Saves the current dialog with a new filename"));
a->setWhatsThis(whatsThisFrom("File|Save As"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileMenu);
- a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, TQT_SLOT(fileSaveAll()),
+ a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(fileSaveAll()),
actionCollection(), "file_close_all");
a->setToolTip(i18n("Saves all open dialogs"));
a->setWhatsThis(whatsThisFrom("File|Save All"));
@@ -457,7 +461,7 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
+ a = KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection());
a->setToolTip(i18n("Quits the application and prompts to save any changed dialogs"));
a->setWhatsThis(whatsThisFrom("File|Exit"));
a->plug(fileMenu);
@@ -470,7 +474,7 @@ void MainWindow::setupRunActions()
menuBar()->insertItem(i18n("&Run"), menu);
KAction* a = new KAction(i18n("Run Dialog"), "run", CTRL + Key_R,
- this, TQT_SLOT(runForm()), actionCollection(), "run");
+ TQT_TQOBJECT(this), TQT_SLOT(runForm()), actionCollection(), "run");
a->setToolTip(i18n("Executes dialog"));
a->setWhatsThis(whatsThisFrom("Run|Run dialog"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -478,8 +482,8 @@ void MainWindow::setupRunActions()
a->plug(menu);
// add KDE4 executor
- KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + Qt::Key_R,
- this, TQT_SLOT(runForm4()), actionCollection(), "run4");
+ KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + TQt::Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT(runForm4()), actionCollection(), "run4");
b->setToolTip(i18n("Executes dialog in KDE4"));
b->setWhatsThis(whatsThisFrom("Run|Run dialog"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), b, TQT_SLOT(setEnabled(bool)));
@@ -493,39 +497,39 @@ void MainWindow::setupWindowActions()
{
windowActionsSetup = true;
- KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, TQT_SLOT(tile()),
+ KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(tile()),
actionCollection(), "window_tile");
actionWindowTile->setToolTip(i18n("Tiles the windows so that they are all visible"));
actionWindowTile->setWhatsThis(whatsThisFrom("Window|Tile"));
- KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(cascade()),
+ KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(cascade()),
actionCollection(), "window_cascade");
actionWindowCascade->setToolTip(i18n("Cascades the windows so that all their title bars are visible"));
actionWindowCascade->setWhatsThis(whatsThisFrom("Window|Cascade"));
- KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(closeActiveWindow()),
+ KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(closeActiveWindow()),
actionCollection(), "window_close");
actionWindowClose->setToolTip(i18n("Closes the active window"));
actionWindowClose->setWhatsThis(whatsThisFrom("Window|Close"));
- KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), qworkspace,
+ KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), TQT_TQOBJECT(qworkspace),
TQT_SLOT(closeAllWindows()), actionCollection(), "window_close_all");
actionWindowCloseAll->setToolTip(i18n("Closes all form windows"));
actionWindowCloseAll->setWhatsThis(whatsThisFrom("Window|Close All"));
- KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, qworkspace,
+ KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, TQT_TQOBJECT(qworkspace),
TQT_SLOT(activateNextWindow()), actionCollection(), "window_next");
actionWindowNext->setToolTip(i18n("Activates the next window"));
actionWindowNext->setWhatsThis(whatsThisFrom("Window|Next"));
- KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, qworkspace,
+ KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(qworkspace),
TQT_SLOT(activatePreviousWindow()), actionCollection(), "window_prev");
actionWindowPrevious->setToolTip(i18n("Activates the previous window"));
actionWindowPrevious->setWhatsThis(whatsThisFrom("Window|Previous"));
windowMenu = new KPopupMenu(this, "Window");
menuBar()->insertItem(i18n("&Window"), windowMenu);
- connect(windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(setupWindowActions()));
+ connect(windowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(setupWindowActions()));
actionWindowClose->plug(windowMenu);
actionWindowCloseAll->plug(windowMenu);
@@ -556,13 +560,13 @@ void MainWindow::setupWindowActions()
j++;
TQString itemText;
if (j < 10)
- itemText = TQString("&%1 ").arg(j);
+ itemText = TQString("&%1 ").tqarg(j);
if (w->inherits("FormWindow"))
itemText += w->name();
else
itemText += w->caption();
- int id = windowMenu->insertItem(itemText, this, TQT_SLOT(windowsMenuActivated(int)));
+ int id = windowMenu->insertItem(itemText, TQT_TQOBJECT(this), TQT_SLOT(windowsMenuActivated(int)));
windowMenu->setItemParameter(id, i);
windowMenu->setItemChecked(id, qworkspace->activeWindow() == windows.at(i));
}
@@ -572,21 +576,21 @@ void MainWindow::setupWindowActions()
void MainWindow::setupSettingsActions()
{
KPopupMenu *settings = new KPopupMenu(this, "Settings");
- KAction* a = KStdAction::keyBindings(this, TQT_SLOT(editShortcuts()), actionCollection());
+ KAction* a = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(editShortcuts()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change shortcuts"));
a->plug(settings);
- a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), this, TQT_SLOT(editPlugins()),
+ a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editPlugins()),
actionCollection(), "configure_plugins");
a->setToolTip(i18n("Opens a dialog to configure plugins"));
a->plug(settings);
- a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), this, TQT_SLOT(configureEditor()),
+ a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(configureEditor()),
actionCollection(), "configure_editor");
a->setToolTip(i18n("Configure various aspects of this editor."));
a->plug(settings);
- a = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
+ a = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(editPreferences()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change preferences"));
a->setWhatsThis(whatsThisFrom("Edit|Preferences"));
a->plug(settings);
@@ -604,7 +608,7 @@ void MainWindow::setupHelpActions()
void MainWindow::fileNew()
{
statusBar()->message(i18n("Create a new dialog..."));
- NewForm dlg(this, TQString::null);
+ NewForm dlg(this, TQString());
dlg.exec();
statusBar()->clear();
}
@@ -631,7 +635,7 @@ void MainWindow::fileOpen(const TQString & fn)
TQStringList filenames;
if (fn.isEmpty())
- filenames = KFileDialog::getOpenFileNames(TQString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
+ filenames = KFileDialog::getOpenFileNames(TQString(), i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
else
filenames << fn;
for (TQStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit)
@@ -667,7 +671,7 @@ FormWindow *MainWindow::openFormWindow(const TQString &filename, bool validFileN
}
if (!makeNew)
{
- statusBar()->message(i18n("Reading file '%1'...").arg(filename));
+ statusBar()->message(i18n("Reading file '%1'...").tqarg(filename));
if (TQFile::exists(filename))
{
TQApplication::setOverrideCursor(WaitCursor);
@@ -676,18 +680,18 @@ FormWindow *MainWindow::openFormWindow(const TQString &filename, bool validFileN
ff = new FormFile(filename, false);
bool b = resource.load(ff) && (FormWindow *) resource.widget();
if (!validFileName && resource.widget())
- ((FormWindow *) resource.widget())->setFileName(TQString::null);
+ ((FormWindow *) resource.widget())->setFileName(TQString());
TQApplication::restoreOverrideCursor();
if (b)
{
- statusBar()->message(i18n("Loaded file '%1'").arg(filename), 3000);
+ statusBar()->message(i18n("Loaded file '%1'").tqarg(filename), 3000);
} else
{
emit removedFormFile(ff);
ff->close();
delete ff;
- statusBar()->message(i18n("Could not load file '%1'").arg(filename), 5000);
- KMessageBox::information(this, i18n("Could not load file '%1'").arg(filename), i18n("Load File"));
+ statusBar()->message(i18n("Could not load file '%1'").tqarg(filename), 5000);
+ KMessageBox::information(this, i18n("Could not load file '%1'").tqarg(filename), i18n("Load File"));
}
return (FormWindow *) resource.widget();
} else
@@ -750,7 +754,7 @@ void MainWindow::saveAllTemp()
if (inSaveAllTemp)
return;
inSaveAllTemp = true;
- statusBar()->message(i18n("Qt Designer is crashing. Attempting to save files..."));
+ statusBar()->message(i18n("TQt Designer is crashing. Attempting to save files..."));
TQWidgetList windows = qWorkspace()->windowList();
TQString baseName = TQDir::homeDirPath() + "/.designer/saved-form-";
int i = 1;
@@ -781,20 +785,20 @@ void MainWindow::fileCreateTemplate()
for (i = 0; i < WidgetDatabase::count(); ++i)
{
if (WidgetDatabase::isContainer(i) && !WidgetDatabase::isForm(i) &&
- WidgetDatabase::className(i) != "TQTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp")
+ WidgetDatabase::className(i) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::widgetGroup(i) != "Temp")
{
dia.listClass->insertItem(WidgetDatabase::className(i));
}
}
dia.editName->setText(i18n("NewTemplate"));
- connect(dia.buttonCreate, TQT_SIGNAL(clicked()), this, TQT_SLOT(createNewTemplate()));
+ connect(dia.buttonCreate, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(createNewTemplate()));
dia.exec();
}
void MainWindow::createNewTemplate()
{
- CreateTemplate *dia = (CreateTemplate *) sender()->parent();
+ CreateTemplate *dia = (CreateTemplate *) TQT_TQOBJECT(const_cast(sender()))->tqparent();
TQString fn = dia->editName->text();
TQString cn = dia->listClass->currentText();
if (fn.isEmpty() || cn.isEmpty())
@@ -804,14 +808,14 @@ void MainWindow::createNewTemplate()
}
TQStringList templRoots;
- const char *qtdir = getenv("QTDIR");
+ const char *qtdir = getenv("TQTDIR");
if (qtdir)
templRoots << qtdir;
-#ifdef QT_INSTALL_PREFIX
- templRoots << QT_INSTALL_PREFIX;
+#ifdef TQT_INSTALL_PREFIX
+ templRoots << TQT_INSTALL_PREFIX;
#endif
-#ifdef QT_INSTALL_DATA
- templRoots << QT_INSTALL_DATA;
+#ifdef TQT_INSTALL_DATA
+ templRoots << TQT_INSTALL_DATA;
#endif
if (qtdir) //try the tools/designer directory last!
templRoots << TQString(qtdir) + "/tools/designer";
@@ -841,7 +845,7 @@ void MainWindow::createNewTemplate()
ts << " " << cn << "Form" << endl;
ts << "" << endl;
ts << "" << endl;
- ts << " geometry" << endl;
+ ts << " tqgeometry" << endl;
ts << " " << endl;
ts << " 300" << endl;
ts << " 400" << endl;
@@ -876,7 +880,7 @@ void MainWindow::editCut()
void MainWindow::editCopy()
{
if (formWindow())
- qApp->clipboard()->setText(formWindow()->copy());
+ tqApp->clipboard()->setText(formWindow()->copy());
}
void MainWindow::editPaste()
@@ -889,21 +893,21 @@ void MainWindow::editPaste()
if (l.count() == 1)
{
w = l.first();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
(!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::
- classNameOf(w))) && w != formWindow()->mainContainer()))
+ classNameOf(TQT_TQOBJECT(w)))) && w != formWindow()->mainContainer()))
w = formWindow()->mainContainer();
}
- if (w && WidgetFactory::layoutType(w) == WidgetFactory::NoLayout)
+ if (w && WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout)
{
- formWindow()->paste(qApp->clipboard()->text(), WidgetFactory::containerOfWidget(w));
+ formWindow()->paste(tqApp->clipboard()->text(), WidgetFactory::containerOfWidget(w));
hierarchyView->widgetInserted(0);
formWindow()->commandHistory()->setModified(true);
} else
{
KMessageBox::information(this, i18n("Cannot paste widgets. Designer could not find a container\n"
- "to paste into which does not contain a layout. Break the layout\n"
+ "to paste into which does not contain a tqlayout. Break the tqlayout\n"
"of the container you want to paste into and select this container\n"
"and then paste again."), i18n("Paste Error"));
}
@@ -941,42 +945,42 @@ void MainWindow::editAdjustSize()
void MainWindow::editLayoutHorizontal()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerHorizontal();
- else if (layoutSelected && formWindow())
- formWindow()->layoutHorizontal();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutHorizontal();
}
void MainWindow::editLayoutVertical()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerVertical();
- else if (layoutSelected && formWindow())
- formWindow()->layoutVertical();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutVertical();
}
void MainWindow::editLayoutHorizontalSplit()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
; // no way to do that
- else if (layoutSelected && formWindow())
- formWindow()->layoutHorizontalSplit();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutHorizontalSplit();
}
void MainWindow::editLayoutVerticalSplit()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
; // no way to do that
- else if (layoutSelected && formWindow())
- formWindow()->layoutVerticalSplit();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutVerticalSplit();
}
void MainWindow::editLayoutGrid()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerGrid();
- else if (layoutSelected && formWindow())
- formWindow()->layoutGrid();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutGrid();
}
void MainWindow::editLayoutContainerVertical()
@@ -988,7 +992,7 @@ void MainWindow::editLayoutContainerVertical()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutVerticalContainer(w);
+ formWindow()->tqlayoutVerticalContainer(w);
}
void MainWindow::editLayoutContainerHorizontal()
@@ -1000,7 +1004,7 @@ void MainWindow::editLayoutContainerHorizontal()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutHorizontalContainer(w);
+ formWindow()->tqlayoutHorizontalContainer(w);
}
void MainWindow::editLayoutContainerGrid()
@@ -1012,7 +1016,7 @@ void MainWindow::editLayoutContainerGrid()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutGridContainer(w);
+ formWindow()->tqlayoutGridContainer(w);
}
@@ -1025,8 +1029,8 @@ void MainWindow::editBreakLayout()
TQWidget *w = formWindow()->mainContainer();
if (formWindow()->currentWidget())
w = formWindow()->currentWidget();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
{
formWindow()->breakLayout(w);
return;
@@ -1036,9 +1040,9 @@ void MainWindow::editBreakLayout()
TQWidgetList widgets = formWindow()->selectedWidgets();
for (w = widgets.first(); w; w = widgets.next())
{
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget()
- && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget()
+ && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
break;
}
if (w)
@@ -1049,8 +1053,8 @@ void MainWindow::editBreakLayout()
}
w = formWindow()->mainContainer();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
{
formWindow()->breakLayout(w);
}
@@ -1119,7 +1123,7 @@ void MainWindow::editPreferences()
dia->checkBoxSplash->setChecked(splashScreen);
dia->editDocPath->setText(docPath);
dia->checkAutoEdit->setChecked(!databaseAutoEdit);
- connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseDocPath()));
+ connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(chooseDocPath()));
if (dia->exec() == TQDialog::Accepted)
{
@@ -1193,7 +1197,7 @@ void MainWindow::chooseDocPath()
{
if (!prefDia)
return;
- TQString fn = KFileDialog::getExistingDirectory(TQString::null, this);
+ TQString fn = KFileDialog::getExistingDirectory(TQString(), this);
if (!fn.isEmpty())
prefDia->editDocPath->setText(fn);
}
diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp
index ecaed31a..aeddb1e1 100644
--- a/kommander/editor/messagelog.cpp
+++ b/kommander/editor/messagelog.cpp
@@ -28,7 +28,7 @@
#include
#include
-MessageLog::MessageLog(TQWidget* parent, const char* name) : TQTabWidget(parent, name)
+MessageLog::MessageLog(TQWidget* tqparent, const char* name) : TQTabWidget(tqparent, name)
{
m_popupMenu = new KPopupMenu(this);
m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, TQT_SLOT(copyLine()));
@@ -108,12 +108,12 @@ void MessageLog::clearContent()
void MessageLog::copyLine()
{
if (m_lists[currentPageIndex()]->count())
- kapp->clipboard()->setText(m_lists[currentPageIndex()]->currentText(), QClipboard::Clipboard);
+ kapp->tqclipboard()->setText(m_lists[currentPageIndex()]->currentText(), TQClipboard::Clipboard);
}
void MessageLog::copyContent()
{
- kapp->clipboard()->setText(content(), QClipboard::Clipboard);
+ kapp->tqclipboard()->setText(content(), TQClipboard::Clipboard);
}
void MessageLog::saveToFile()
@@ -125,12 +125,12 @@ void MessageLog::saveToFile()
TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::warningContinueCancel(0,
i18n("File
%1
already exists. Overwrite it?")
- .arg(url.path()), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ .tqarg(url.path()), TQString(), i18n("Overwrite")) == KMessageBox::Cancel)
return;
TQFile file(url.path());
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("Cannot save log file
%1")
- .arg(url.url()));
+ .tqarg(url.url()));
return;
}
TQTextStream textfile(&file);
diff --git a/kommander/editor/messagelog.h b/kommander/editor/messagelog.h
index ef7c8638..bf1508b6 100644
--- a/kommander/editor/messagelog.h
+++ b/kommander/editor/messagelog.h
@@ -26,12 +26,13 @@ class KProcess;
class KPopupMenu;
class TQListBoxItem;
-class MessageLog : public QTabWidget
+class MessageLog : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum InfoType {Stdout, Stderr, All};
- MessageLog(TQWidget* parent = 0, const char* name = 0);
+ MessageLog(TQWidget* tqparent = 0, const char* name = 0);
~MessageLog();
virtual void insertItem(InfoType i, TQString text);
virtual void clear(InfoType i = All);
diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp
index 3a8316b8..d8cdb32c 100644
--- a/kommander/editor/metadatabase.cpp
+++ b/kommander/editor/metadatabase.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -34,7 +34,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -110,7 +110,7 @@ void MetaDataBase::addEntry( TQObject *o )
if ( !o )
return;
setupDataBase();
- if ( db->find( o ) )
+ if ( db->tqfind( o ) )
return;
MetaDataBaseRecord *r = new MetaDataBaseRecord;
r->object = o;
@@ -129,7 +129,7 @@ void MetaDataBase::removeEntry( TQObject *o )
void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -137,24 +137,24 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo
}
if ( changed ) {
- if ( r->changedProperties.findIndex( property ) == -1 )
+ if ( r->changedProperties.tqfindIndex( property ) == -1 )
r->changedProperties.append( property );
} else {
- if ( r->changedProperties.findIndex( property ) != -1 )
+ if ( r->changedProperties.tqfindIndex( property ) != -1 )
r->changedProperties.remove( property );
}
if ( doUpdate &&
( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) {
doUpdate = false;
- setPropertyChanged( o, "alignment", changed ||
+ setPropertyChanged( o, "tqalignment", changed ||
isPropertyChanged( o, "hAlign" ) ||
isPropertyChanged( o, "vAlign" ) ||
isPropertyChanged( o, "wordwrap" ) );
doUpdate = true;
}
- if ( doUpdate && property == "alignment" ) {
+ if ( doUpdate && property == "tqalignment" ) {
doUpdate = false;
setPropertyChanged( o, "hAlign", changed );
setPropertyChanged( o, "vAlign", changed );
@@ -166,20 +166,20 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo
bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return false;
}
- return r->changedProperties.findIndex( property ) != -1;
+ return r->changedProperties.tqfindIndex( property ) != -1;
}
TQStringList MetaDataBase::changedProperties( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -193,7 +193,7 @@ TQStringList MetaDataBase::changedProperties( TQObject *o )
void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -206,20 +206,20 @@ void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, co
TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
- return *r->propertyComments.find( property );
+ return *r->propertyComments.tqfind( property );
}
void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -231,13 +231,13 @@ void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const
TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property)
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return TQVariant();
}
- TQMap::Iterator it = r->fakeProperties.find( property );
+ TQMap::Iterator it = r->fakeProperties.tqfind( property );
if ( it != r->fakeProperties.end() )
return r->fakeProperties[property];
return WidgetFactory::defaultValue( o, property );
@@ -247,7 +247,7 @@ TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property)
TQMap* MetaDataBase::fakeProperties( TQObject* o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -261,7 +261,7 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -269,10 +269,10 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing )
}
r->spacing = spacing;
- TQLayout * layout = 0;
- WidgetFactory::layoutType( (TQWidget*)o, layout );
- if ( layout )
- layout->setSpacing( spacing );
+ TQLayout * tqlayout = 0;
+ WidgetFactory::tqlayoutType( (TQWidget*)o, tqlayout );
+ if ( tqlayout )
+ tqlayout->setSpacing( spacing );
}
int MetaDataBase::spacing( TQObject *o )
@@ -281,8 +281,8 @@ int MetaDataBase::spacing( TQObject *o )
return -1;
setupDataBase();
if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
- o = ( (TQMainWindow*)o )->centralWidget();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ MetaDataBaseRecord *r = db->tqfind( TQT_TQOBJECT(o) );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -297,7 +297,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -305,12 +305,12 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
}
r->margin = margin;
- TQLayout * layout = 0;
- WidgetFactory::layoutType( (TQWidget*)o, layout );
+ TQLayout * tqlayout = 0;
+ WidgetFactory::tqlayoutType( (TQWidget*)o, tqlayout );
if ( margin < 1 )
margin = 1;
- if ( layout )
- layout->setMargin( margin );
+ if ( tqlayout )
+ tqlayout->setMargin( margin );
}
int MetaDataBase::margin( TQObject *o )
@@ -319,8 +319,8 @@ int MetaDataBase::margin( TQObject *o )
return -1;
setupDataBase();
if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
- o = ( (TQMainWindow*)o )->centralWidget();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -334,7 +334,7 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString
TQObject *receiver, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -352,7 +352,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr
TQObject *receiver, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -374,7 +374,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr
TQValueList MetaDataBase::connections( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -387,7 +387,7 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ
TQObject *receiver )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -409,7 +409,7 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ
TQValueList MetaDataBase::connections( TQObject *o, TQObject *object )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -430,7 +430,7 @@ TQValueList MetaDataBase::connections( TQObject *o, TQ
void MetaDataBase::doConnections( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -465,16 +465,16 @@ void MetaDataBase::doConnections( TQObject *o )
delete l;
}
TQString s = "2""%1";
- s = s.arg( conn.signal );
+ s = s.tqarg( conn.signal.data() );
TQString s2 = "1""%1";
- s2 = s2.arg( conn.slot );
+ s2 = s2.tqarg( conn.slot.data() );
- TQStrList signalList = sender->metaObject()->signalNames( true );
- TQStrList slotList = receiver->metaObject()->slotNames( true );
+ TQStrList signalList = sender->tqmetaObject()->signalNames( true );
+ TQStrList slotList = receiver->tqmetaObject()->slotNames( true );
// avoid warnings
- if ( signalList.find( conn.signal ) == -1 ||
- slotList.find( conn.slot ) == -1 )
+ if ( signalList.tqfind( conn.signal ) == -1 ||
+ slotList.tqfind( conn.slot ) == -1 )
continue;
TQObject::connect( sender, s, receiver, s2 );
@@ -485,7 +485,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString&
const TQString &access, const TQString &language, const TQString &returnType )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -498,7 +498,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString&
s.access = access;
s.language = language;
s.returnType = returnType;
- TQValueList::Iterator it = r->slotList.find( s );
+ TQValueList::Iterator it = r->slotList.tqfind( s );
if ( it != r->slotList.end() )
r->slotList.remove( it );
r->slotList.append( s );
@@ -510,7 +510,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString&
void MetaDataBase::setSlotList( TQObject *o, const TQValueList &slotList )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -523,7 +523,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin
const TQString &access, const TQString &language, const TQString &returnType )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -546,7 +546,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin
void MetaDataBase::removeSlot( TQObject *o, const TQString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -565,7 +565,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQString &slot )
TQValueList MetaDataBase::slotList( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -578,7 +578,7 @@ TQValueList MetaDataBase::slotList( TQObject *o )
bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -596,7 +596,7 @@ bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
void MetaDataBase::changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -617,7 +617,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot,
const TQString &language, const TQString &returnType )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -639,7 +639,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot,
bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -647,14 +647,14 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
}
if ( !onlyCustom ) {
- TQStrList slotList = o->metaObject()->slotNames( true );
- if ( slotList.find( slot ) != -1 )
+ TQStrList slotList = o->tqmetaObject()->slotNames( true );
+ if ( slotList.tqfind( slot ) != -1 )
return true;
if ( o->inherits( "FormWindow" ) ) {
- o = ( (FormWindow*)o )->mainContainer();
- slotList = o->metaObject()->slotNames( true );
- if ( slotList.find( slot ) != -1 )
+ o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer());
+ slotList = o->tqmetaObject()->slotNames( true );
+ if ( slotList.tqfind( slot ) != -1 )
return true;
}
@@ -682,11 +682,11 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
TQString sl = slot;
@@ -698,7 +698,7 @@ TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &slot )
if ( sl == sl2 )
return s.language;
}
- return TQString::null;
+ return TQString();
}
bool MetaDataBase::addCustomWidget( CustomWidget *wid )
@@ -779,7 +779,7 @@ bool MetaDataBase::hasCustomWidget( const TQString &className )
void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*) w );
+ MetaDataBaseRecord *r = db->tqfind( (void*) w );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
w, w->name(), w->className() );
@@ -792,7 +792,7 @@ void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order )
TQWidgetList MetaDataBase::tabOrder( TQWidget *w )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*) w );
+ MetaDataBaseRecord *r = db->tqfind( (void*) w );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
w, w->name(), w->className() );
@@ -805,7 +805,7 @@ TQWidgetList MetaDataBase::tabOrder( TQWidget *w )
void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -818,7 +818,7 @@ void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs )
TQValueList MetaDataBase::includes( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -831,7 +831,7 @@ TQValueList MetaDataBase::includes( TQObject *o )
void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -844,7 +844,7 @@ void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds )
TQStringList MetaDataBase::forwards( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -857,7 +857,7 @@ TQStringList MetaDataBase::forwards( TQObject *o )
void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -871,10 +871,10 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
bool hasSemicolon = s.endsWith( ";" );
if ( hasSemicolon )
s = s.left( s.length() - 1 );
- int p = s.find( '(' );
+ int p = s.tqfind( '(' );
if ( p < 0 )
p = s.length();
- int sp = s.find( ' ' );
+ int sp = s.tqfind( ' ' );
if ( sp >= 0 && sp < p ) {
s = s.mid( sp+1 );
p -= sp + 1;
@@ -890,7 +890,7 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
TQStringList MetaDataBase::signalList( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -903,7 +903,7 @@ TQStringList MetaDataBase::signalList( TQObject *o )
void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -916,7 +916,7 @@ void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi )
MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -934,7 +934,7 @@ MetaDataBase::CustomWidget::CustomWidget()
className = "MyCustomWidget";
includeFile = "mywidget.h";
includePolicy = Local;
- sizeHint = TQSize( -1, -1 );
+ tqsizeHint = TQSize( -1, -1 );
pixmap = new TQPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) );
id = -1;
sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
@@ -946,7 +946,7 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
className = w.className;
includeFile = w.includeFile;
includePolicy = w.includePolicy;
- sizeHint = w.sizeHint;
+ tqsizeHint = w.tqsizeHint;
if ( w.pixmap )
pixmap = new TQPixmap( *w.pixmap );
else
@@ -958,7 +958,7 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)w );
+ MetaDataBaseRecord *r = db->tqfind( (void*)w );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
w, w->name(), w->className() );
@@ -971,7 +971,7 @@ void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c )
TQCursor MetaDataBase::cursor( TQWidget *w )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)w );
+ MetaDataBaseRecord *r = db->tqfind( (void*)w );
if ( !r ) {
w->unsetCursor();
return w->cursor();
@@ -991,7 +991,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
className = w.className;
includeFile = w.includeFile;
includePolicy = w.includePolicy;
- sizeHint = w.sizeHint;
+ tqsizeHint = w.tqsizeHint;
if ( w.pixmap )
pixmap = new TQPixmap( *w.pixmap );
else
@@ -1006,8 +1006,8 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const
{
- TQStrList sigList = TQWidget::staticMetaObject()->signalNames( true );
- if ( sigList.find( signal ) != -1 )
+ TQStrList sigList = TQWidget::tqstaticMetaObject()->signalNames( true );
+ if ( sigList.tqfind( signal ) != -1 )
return true;
for ( TQValueList::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
if ( normalizeSlot( *it ) == normalizeSlot( signal ) )
@@ -1018,8 +1018,8 @@ bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const
bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const
{
- TQStrList slotList = TQWidget::staticMetaObject()->slotNames( true );
- if ( slotList.find( normalizeSlot( slot ) ) != -1 )
+ TQStrList slotList = TQWidget::tqstaticMetaObject()->slotNames( true );
+ if ( slotList.tqfind( normalizeSlot( slot ) ) != -1 )
return true;
for ( TQValueList::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
@@ -1031,8 +1031,8 @@ bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const
bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const
{
- TQStrList propList = TQWidget::staticMetaObject()->propertyNames( true );
- if ( propList.find( prop ) != -1 )
+ TQStrList propList = TQWidget::tqstaticMetaObject()->propertyNames( true );
+ if ( propList.tqfind( prop ) != -1 )
return true;
for ( TQValueList::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
@@ -1047,7 +1047,7 @@ void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &a
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1061,16 +1061,16 @@ void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &a
TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap )
{
if ( !o )
- return TQString::null;
+ return TQString();
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
- return *r->pixmapArguments.find( pixmap );
+ return *r->pixmapArguments.tqfind( pixmap );
}
void MetaDataBase::clearPixmapArguments( TQObject *o )
@@ -1078,7 +1078,7 @@ void MetaDataBase::clearPixmapArguments( TQObject *o )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1094,7 +1094,7 @@ void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1108,16 +1108,16 @@ void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg )
TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap )
{
if ( !o )
- return TQString::null;
+ return TQString();
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
- return *r->pixmapKeys.find( pixmap );
+ return *r->pixmapKeys.tqfind( pixmap );
}
void MetaDataBase::clearPixmapKeys( TQObject *o )
@@ -1125,7 +1125,7 @@ void MetaDataBase::clearPixmapKeys( TQObject *o )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1142,7 +1142,7 @@ void MetaDataBase::setColumnFields( TQObject *o, const TQMap
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1157,7 +1157,7 @@ TQMap MetaDataBase::columnFields( TQObject *o )
if ( !o )
return TQMap();
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1187,7 +1187,7 @@ void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1202,7 +1202,7 @@ TQString MetaDataBase::exportMacro( TQObject *o )
if ( !o )
return "";
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1214,6 +1214,6 @@ TQString MetaDataBase::exportMacro( TQObject *o )
bool MetaDataBase::hasObject( TQObject *o )
{
- return !!db->find( o );
+ return !!db->tqfind( o );
}
diff --git a/kommander/editor/metadatabase.h b/kommander/editor/metadatabase.h
index d5aceff5..5251e793 100644
--- a/kommander/editor/metadatabase.h
+++ b/kommander/editor/metadatabase.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -92,7 +92,7 @@ public:
TQString className;
TQString includeFile;
IncludePolicy includePolicy;
- TQSize sizeHint;
+ TQSize tqsizeHint;
TQSizePolicy sizePolicy;
TQPixmap *pixmap;
TQValueList lstSignals;
@@ -125,7 +125,7 @@ public:
{
TQString name;
TQStringList args;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const EventDescription& ) const { return FALSE; }
#endif
};
diff --git a/kommander/editor/multilineeditor.ui b/kommander/editor/multilineeditor.ui
index 9b9cbe9f..47ce1172 100644
--- a/kommander/editor/multilineeditor.ui
+++ b/kommander/editor/multilineeditor.ui
@@ -19,13 +19,13 @@
**
*********************************************************************
- QDialog
+ TQDialog
name
MultiLineEditorBase
- geometry
+ tqgeometry
0
0
@@ -55,7 +55,7 @@
6
- QLabel
+ TQLabel
name
TextLabel1
@@ -70,7 +70,7 @@
- QMultiLineEdit
+ TQMultiLineEdit
name
preview
@@ -85,7 +85,7 @@
- QLayoutWidget
+ TQLayoutWidget
name
Layout1
@@ -100,7 +100,7 @@
6
- QPushButton
+ TQPushButton
name
buttonHelp
@@ -128,7 +128,7 @@
Expanding
- sizeHint
+ tqsizeHint
20
20
@@ -136,7 +136,7 @@
- QPushButton
+ TQPushButton
name
buttonOk
@@ -159,7 +159,7 @@
- QPushButton
+ TQPushButton
name
buttonApply
@@ -178,7 +178,7 @@
- QPushButton
+ TQPushButton
name
buttonCancel
diff --git a/kommander/editor/multilineeditorimpl.cpp b/kommander/editor/multilineeditorimpl.cpp
index 2a0ec9b7..98ad65d6 100644
--- a/kommander/editor/multilineeditorimpl.cpp
+++ b/kommander/editor/multilineeditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -28,13 +28,13 @@
#include
-MultiLineEditor::MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
- : MultiLineEditorBase( parent, 0, true ), formwindow( fw )
+MultiLineEditor::MultiLineEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw )
+ : MultiLineEditorBase( tqparent, 0, true ), formwindow( fw )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
mlined = (TQMultiLineEdit*)editWidget;
// #### complete list of properties here
- preview->setAlignment( mlined->alignment() );
+ preview->tqsetAlignment( mlined->tqalignment() );
preview->setMaxLines( mlined->maxLines() );
preview->setWordWrap( mlined->wordWrap() );
preview->setWrapColumnOrWidth( mlined->wrapColumnOrWidth() );
@@ -53,7 +53,7 @@ void MultiLineEditor::okClicked()
void MultiLineEditor::applyClicked()
{
- PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n("Set Text of '%1'" ).arg( mlined->name() ),
+ PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n("Set Text of '%1'" ).tqarg( mlined->name() ),
formwindow, mlined, preview->text() );
cmd->execute();
formwindow->commandHistory()->addCommand( cmd );
@@ -61,8 +61,8 @@ void MultiLineEditor::applyClicked()
}
-TextEditor::TextEditor( TQWidget *parent, const TQString &text )
- : MultiLineEditorBase( parent, 0, true )
+TextEditor::TextEditor( TQWidget *tqparent, const TQString &text )
+ : MultiLineEditorBase( tqparent, 0, true )
{
buttonApply->hide();
setCaption( i18n("Text" ) );
@@ -71,9 +71,9 @@ TextEditor::TextEditor( TQWidget *parent, const TQString &text )
preview->selectAll();
}
-TQString TextEditor::getText( TQWidget *parent, const TQString &text )
+TQString TextEditor::getText( TQWidget *tqparent, const TQString &text )
{
- TextEditor dlg( parent, text );
+ TextEditor dlg( tqparent, text );
if ( dlg.exec() == TQDialog::Accepted ) {
TQString txt = dlg.preview->text();
int i = txt.length() - 1;
@@ -84,7 +84,7 @@ TQString TextEditor::getText( TQWidget *parent, const TQString &text )
}
return txt;
}
- return TQString::null;
+ return TQString();
}
void TextEditor::okClicked()
diff --git a/kommander/editor/multilineeditorimpl.h b/kommander/editor/multilineeditorimpl.h
index d26c7f78..a5d48479 100644
--- a/kommander/editor/multilineeditorimpl.h
+++ b/kommander/editor/multilineeditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -29,9 +29,10 @@ class TQMultiLineEdit;
class MultiLineEditor : public MultiLineEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
+ MultiLineEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw );
protected slots:
void okClicked();
@@ -46,11 +47,12 @@ private:
class TextEditor : public MultiLineEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- TextEditor( TQWidget *parent, const TQString &text );
+ TextEditor( TQWidget *tqparent, const TQString &text );
- static TQString getText( TQWidget *parent, const TQString &text );
+ static TQString getText( TQWidget *tqparent, const TQString &text );
protected slots:
void okClicked();
diff --git a/kommander/editor/newform.ui b/kommander/editor/newform.ui
index 16bb0365..c1e14bd6 100644
--- a/kommander/editor/newform.ui
+++ b/kommander/editor/newform.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************
-
+
NewFormBase
@@ -50,7 +50,7 @@
6
-
+
Layout1
@@ -64,7 +64,7 @@
6
-
+
helpButton
@@ -85,14 +85,14 @@
Expanding
-
+
20
0
-
+
buttonOk
@@ -109,7 +109,7 @@
Create a new form using the selected template.
-
+
buttonCancel
@@ -125,7 +125,7 @@
-
+
templateView
@@ -155,7 +155,7 @@
Expanding
-
+
20
0
@@ -179,19 +179,19 @@
templateView
- currentChanged(QIconViewItem*)
+ currentChanged(TQIconViewItem*)
NewFormBase
- itemChanged(QIconViewItem*)
+ itemChanged(TQIconViewItem*)
templateView
- doubleClicked(QIconViewItem*)
+ doubleClicked(TQIconViewItem*)
NewFormBase
accept()
templateView
- returnPressed(QIconViewItem*)
+ returnPressed(TQIconViewItem*)
NewFormBase
accept()
@@ -202,9 +202,9 @@
buttonOk
buttonCancel
-
- itemChanged( QIconViewItem * )
+
+ itemChanged( TQIconViewItem * )
projectChanged( const QString & )
-
-
+
+
diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp
index ee623e48..e1ef5662 100644
--- a/kommander/editor/newformimpl.cpp
+++ b/kommander/editor/newformimpl.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -57,7 +57,7 @@ void FormItem::insert()
FormWindow *fw = 0;
FormFile *ff = new FormFile(FormFile::createUnnamedFileName(), true);
fw = new FormWindow(ff, MainWindow::self, MainWindow::self->qWorkspace(), n);
- MetaDataBase::addEntry(fw);
+ MetaDataBase::addEntry(TQT_TQOBJECT(fw));
TQWidget *w = 0L;
if (fType == Dialog)
{
@@ -72,7 +72,7 @@ void FormItem::insert()
if (w)
{
w->setProperty("useInternalParser", true);
- MetaDataBase::setPropertyChanged(w, "useInternalParser", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "useInternalParser", true);
}
fw->setCaption(n);
fw->resize(600, 480);
@@ -81,7 +81,7 @@ void FormItem::insert()
// the wizard might have changed a lot, lets update everything
MainWindow::self->actioneditor()->setFormWindow(fw);
MainWindow::self->objectHierarchy()->setFormWindow(fw, fw);
- fw->killAccels(fw);
+ fw->killAccels(TQT_TQOBJECT(fw));
fw->setFocus();
}
@@ -100,12 +100,12 @@ static void unifyFormName(FormWindow *fw, TQWorkspace *qworkspace)
if (w != fw)
lst << w->name();
- if (lst.findIndex(fw->name()) == -1)
+ if (lst.tqfindIndex(fw->name()) == -1)
return;
TQString origName = fw->name();
TQString n = origName;
int i = 1;
- while (lst.findIndex(n) != -1)
+ while (lst.tqfindIndex(n) != -1)
n = origName + TQString::number(i++);
fw->setName(n);
fw->setCaption(n);
@@ -121,22 +121,22 @@ void CustomFormItem::insert()
if (!resource.load(ff))
{
TQMessageBox::information(MainWindow::self, i18n("Load Template"),
- i18n("Could not load form description from template '%1'").arg(filename));
+ i18n("Could not load form description from template '%1'").tqarg(filename));
delete ff;
return;
}
- ff->setFileName(TQString::null);
+ ff->setFileName(TQString());
if (MainWindow::self->formWindow())
{
- MainWindow::self->formWindow()->setFileName(TQString::null);
+ MainWindow::self->formWindow()->setFileName(TQString());
unifyFormName(MainWindow::self->formWindow(), MainWindow::self->qWorkspace());
}
}
}
-NewForm::NewForm(TQWidget *parent, const TQString &templatePath)
- : NewFormBase(parent, 0, true)
+NewForm::NewForm(TQWidget *tqparent, const TQString &templatePath)
+ : NewFormBase(tqparent, 0, true)
{
connect(helpButton, TQT_SIGNAL(clicked()), MainWindow::self, TQT_SLOT(showDialogHelp()));
@@ -165,15 +165,15 @@ NewForm::NewForm(TQWidget *parent, const TQString &templatePath)
if (!TQFile::exists(*it))
continue;
TQDir dir(*it);
- const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
+ const TQFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
if (fileList)
- for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
+ for (TQFileInfoListIterator fit(*fileList); fit.current(); ++fit)
{
TQFileInfo* fi = fit.current();
if (!fi->isFile() || fi->extension() != "kmdr")
continue;
TQString name = fi->baseName();
- name = name.replace("_", " ");
+ name = name.tqreplace("_", " ");
CustomFormItem *ci = new CustomFormItem(templateView, name);
allItems.append(ci);
ci->setDragEnabled(false);
diff --git a/kommander/editor/newformimpl.h b/kommander/editor/newformimpl.h
index 9aad4155..6b28a631 100644
--- a/kommander/editor/newformimpl.h
+++ b/kommander/editor/newformimpl.h
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -25,7 +25,7 @@
class FormFile;
-class NewItem : public QIconViewItem
+class NewItem : public TQIconViewItem
{
public:
enum Type {Form, CustomForm};
@@ -61,8 +61,9 @@ private:
class NewForm : public NewFormBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NewForm( TQWidget *parent, const TQString &templatePath );
+ NewForm( TQWidget *tqparent, const TQString &templatePath );
void accept();
protected slots:
void itemChanged(TQIconViewItem *item);
diff --git a/kommander/editor/orderindicator.cpp b/kommander/editor/orderindicator.cpp
index fee29150..056601b8 100644
--- a/kommander/editor/orderindicator.cpp
+++ b/kommander/editor/orderindicator.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -63,7 +63,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid )
TQFont f( font() );
f.setBold( true );
setFont( f );
- resize( QMAX( w, h ), h );
+ resize( TQMAX( w, h ), h );
update(); // in case the size didn't change
reposition();
show();
@@ -72,7 +72,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid )
void OrderIndicator::reposition()
{
- TQPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) );
+ TQPoint p =tqparentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) );
move( p - TQPoint( width()/3, height()/3 ) );
}
diff --git a/kommander/editor/orderindicator.h b/kommander/editor/orderindicator.h
index 24cae185..ae696c95 100644
--- a/kommander/editor/orderindicator.h
+++ b/kommander/editor/orderindicator.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -25,9 +25,10 @@
class FormWindow;
-class OrderIndicator : public QWidget
+class OrderIndicator : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
OrderIndicator( int i, TQWidget* w, FormWindow* fw );
diff --git a/kommander/editor/paletteeditor.ui b/kommander/editor/paletteeditor.ui
index 31a4cd8a..814785dd 100644
--- a/kommander/editor/paletteeditor.ui
+++ b/kommander/editor/paletteeditor.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************
-
+
PaletteEditorBase
@@ -52,7 +52,7 @@
6
-
+
groupAutoPalette
@@ -67,7 +67,7 @@
Build Palette
-
+
AlignAuto
@@ -80,7 +80,7 @@
6
-
+
labelMainColor
@@ -92,7 +92,7 @@
0
-
+
50
0
@@ -110,7 +110,7 @@
&3D effects:
-
+
AlignVCenter
@@ -142,7 +142,7 @@
Choose the effect-color for the generated palette.
-
+
labelMainColor2
@@ -154,7 +154,7 @@
0
-
+
50
0
@@ -172,7 +172,7 @@
Back&ground:
-
+
AlignVCenter
@@ -214,14 +214,14 @@
Expanding
-
+
20
20
-
+
btnAdvanced
@@ -231,7 +231,7 @@
-
+
GroupBox126
@@ -256,7 +256,7 @@
6
-
+
Layout2
@@ -270,7 +270,7 @@
6
-
+
TextLabel1
@@ -281,7 +281,7 @@
paletteCombo
-
+
-
Active Palette
@@ -318,7 +318,7 @@
-
+
Layout3
@@ -332,7 +332,7 @@
6
-
+
buttonHelp
@@ -353,14 +353,14 @@
Expanding
-
+
20
20
-
+
buttonOk
@@ -377,7 +377,7 @@
Close the dialog and apply all the changes.
-
+
buttonCancel
@@ -501,15 +501,15 @@
paletteCombo
buttonHelp
-
+
init()
destroy()
onTune()
onChoose2ndMainColor()
onChooseMainColor()
paletteSelected(int)
-
-
+
+
styledbutton.h
styledbutton.h
diff --git a/kommander/editor/paletteeditoradvanced.ui b/kommander/editor/paletteeditoradvanced.ui
index cf868b69..5d2c41af 100644
--- a/kommander/editor/paletteeditoradvanced.ui
+++ b/kommander/editor/paletteeditoradvanced.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************
-
+
PaletteEditorAdvancedBase
@@ -41,7 +41,7 @@
true
- <b>Edit Palette</b><p>Change the current widget or form's palette.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p>
+ <b>Edit Palette</b><p>Change the current widget or form's palette.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget tqlayouts in the preview section.</p>
@@ -53,7 +53,7 @@
6
-
+
Layout14
@@ -67,7 +67,7 @@
6
-
+
TextLabel1
@@ -84,7 +84,7 @@
paletteCombo
-
+
-
Active Palette
@@ -106,7 +106,7 @@
-
+
ButtonGroup1
@@ -131,7 +131,7 @@
6
-
+
checkBuildInactive
@@ -142,7 +142,7 @@
true
-
+
checkBuildDisabled
@@ -155,7 +155,7 @@
-
+
groupCentral
@@ -172,7 +172,7 @@
6
-
+
-
Background
@@ -238,7 +238,7 @@
<b>Select a color role.</b><p>Available central color roles are: <ul> <li>Background - general background color.</li> <li>Foreground - general foreground color. </li> <li>Base - used as the background color for example, for text entry widgets; it is usually white or another light color. </li> <li>Text - the forground color used with Base. Usually this is the same as the Foreground, in which case it must provide good contrast both with the Background and with the Base. </li> <li>Button - general button background color; useful where buttons need a background different from Background, as in the Macintosh style. </li> <li>ButtonText - a foreground color used with the Button color. </li> <li>Highlight - a color used to indicate a selected or highlighted item. </li> <li>HighlightedText - a text color that contrasts to Highlight. </li> <li>BrightText - a text color that is very different from Foreground and contrasts well with, for example, black. </li> </ul> </p>
-
+
Layout32_2
@@ -262,14 +262,14 @@
Expanding
-
+
20
20
-
+
labelPixmap
@@ -313,7 +313,7 @@
Choose a pixmap file for the selected central color role.
-
+
labelCentral
@@ -325,7 +325,7 @@
0
-
+
0
0
@@ -367,7 +367,7 @@
-
+
groupEffect
@@ -384,7 +384,7 @@
6
-
+
Layout32_3
@@ -398,7 +398,7 @@
6
-
+
checkBuildEffect
@@ -415,7 +415,7 @@
Check to let 3D-effect colors be calculated from the button-color.
-
+
-
Light
@@ -453,7 +453,7 @@
-
+
Layout31_2
@@ -477,14 +477,14 @@
Expanding
-
+
20
20
-
+
labelEffect
@@ -496,7 +496,7 @@
0
-
+
0
0
@@ -538,7 +538,7 @@
-
+
Layout3
@@ -552,7 +552,7 @@
6
-
+
buttonHelp
@@ -573,14 +573,14 @@
Expanding
-
+
20
20
-
+
buttonOk
@@ -597,7 +597,7 @@
Close the dialog and apply all the changes.
-
+
buttonCancel
@@ -743,7 +743,7 @@
buttonEffect
buttonHelp
-
+
init()
destroy()
onToggleBuildDisabled(bool)
@@ -756,8 +756,8 @@
onToggleBuildInactive(bool)
paletteSelected(int)
showHelp()
-
-
+
+
styledbutton.h
styledbutton.h
diff --git a/kommander/editor/paletteeditoradvancedimpl.cpp b/kommander/editor/paletteeditoradvancedimpl.cpp
index 69c90c33..243576c2 100644
--- a/kommander/editor/paletteeditoradvancedimpl.cpp
+++ b/kommander/editor/paletteeditoradvancedimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -35,7 +35,7 @@
Class used by PaletteEditor for bold combobox items
*/
-class BoldListBoxText : public QListBoxText
+class BoldListBoxText : public TQListBoxText
{
public:
BoldListBoxText( TQString text, TQListBox* lb = 0 );
@@ -59,9 +59,9 @@ void BoldListBoxText::paint( TQPainter* painter )
TQListBoxText::paint( painter );
}
-PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent,
+PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * tqparent,
const char * name, bool modal, WFlags f )
- : PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0)
+ : PaletteEditorAdvancedBase( tqparent, name, modal, f ), formWindow( fw ), selectedPalette(0)
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
@@ -244,15 +244,15 @@ void PaletteEditorAdvanced::onCentral( int item )
case 0:
default:
c = editPalette.active().color( centralFromItem(item) );
- p = editPalette.active().brush( centralFromItem(item) ).pixmap();
+ p = editPalette.active().tqbrush( centralFromItem(item) ).pixmap();
break;
case 1:
c = editPalette.inactive().color( centralFromItem(item) );
- p = editPalette.inactive().brush( centralFromItem(item) ).pixmap();
+ p = editPalette.inactive().tqbrush( centralFromItem(item) ).pixmap();
break;
case 2:
c = editPalette.disabled().color( centralFromItem(item) );
- p = editPalette.disabled().brush( centralFromItem(item) ).pixmap();
+ p = editPalette.disabled().tqbrush( centralFromItem(item) ).pixmap();
break;
}
@@ -508,17 +508,17 @@ void PaletteEditorAdvanced::updateStyledButtons()
default:
central = editPalette.active().color( centralFromItem( comboCentral->currentItem() ) );
effect = editPalette.active().color( effectFromItem( comboEffect->currentItem() ) );
- pm = editPalette.active().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ pm = editPalette.active().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
break;
case 1:
central = editPalette.inactive().color( centralFromItem( comboCentral->currentItem() ) );
effect = editPalette.inactive().color( effectFromItem( comboEffect->currentItem() ) );
- pm = editPalette.inactive().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ pm = editPalette.inactive().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
break;
case 2:
central = editPalette.disabled().color( centralFromItem( comboCentral->currentItem() ) );
effect = editPalette.disabled().color( effectFromItem( comboEffect->currentItem() ) );
- pm = editPalette.disabled().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ pm = editPalette.disabled().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
break;
}
@@ -613,10 +613,10 @@ void PaletteEditorAdvanced::setupBackgroundMode( BackgroundMode mode )
}
TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init,
- BackgroundMode mode, TQWidget* parent,
+ BackgroundMode mode, TQWidget* tqparent,
const char* name, FormWindow *fw )
{
- PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, true );
+ PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, tqparent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
diff --git a/kommander/editor/paletteeditoradvancedimpl.h b/kommander/editor/paletteeditoradvancedimpl.h
index b9c378dd..ed0bcc39 100644
--- a/kommander/editor/paletteeditoradvancedimpl.h
+++ b/kommander/editor/paletteeditoradvancedimpl.h
@@ -4,7 +4,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -28,13 +28,14 @@ class FormWindow;
class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0,
+ PaletteEditorAdvanced( FormWindow *fw, TQWidget * tqparent=0, const char * name=0,
bool modal=FALSE, WFlags f=0 );
~PaletteEditorAdvanced();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
- TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+ TQWidget* tqparent = 0, const char* name = 0, FormWindow *fw = 0 );
protected slots:
void paletteSelected(int);
diff --git a/kommander/editor/paletteeditorimpl.cpp b/kommander/editor/paletteeditorimpl.cpp
index bc3877f4..89d1f624 100644
--- a/kommander/editor/paletteeditorimpl.cpp
+++ b/kommander/editor/paletteeditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -30,8 +30,8 @@
#include
#include
-PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f )
- : PaletteEditorBase( parent, name, modal, f ), formWindow( fw )
+PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * tqparent, const char * name, bool modal, WFlags f )
+ : PaletteEditorBase( tqparent, name, modal, f ), formWindow( fw )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
@@ -275,9 +275,9 @@ TQPalette PaletteEditor::pal() const
}
TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode,
- TQWidget* parent, const char* name, FormWindow *fw )
+ TQWidget* tqparent, const char* name, FormWindow *fw )
{
- PaletteEditor* dlg = new PaletteEditor( fw, parent, name, true );
+ PaletteEditor* dlg = new PaletteEditor( fw, tqparent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
diff --git a/kommander/editor/paletteeditorimpl.h b/kommander/editor/paletteeditorimpl.h
index abd68dfc..54e45612 100644
--- a/kommander/editor/paletteeditorimpl.h
+++ b/kommander/editor/paletteeditorimpl.h
@@ -4,7 +4,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -28,13 +28,14 @@ class FormWindow;
class PaletteEditor : public PaletteEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
+ PaletteEditor( FormWindow *fw, TQWidget * tqparent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
~PaletteEditor();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
- TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+ TQWidget* tqparent = 0, const char* name = 0, FormWindow *fw = 0 );
protected slots:
void onChooseMainColor();
diff --git a/kommander/editor/parser.cpp b/kommander/editor/parser.cpp
index 15374aa5..cbd3946a 100644
--- a/kommander/editor/parser.cpp
+++ b/kommander/editor/parser.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -22,7 +22,7 @@
#include
#include
-class NormalizeObject : public QObject
+class NormalizeObject : public TQObject
{
public:
NormalizeObject() : TQObject() {}
@@ -32,9 +32,9 @@ public:
TQString Parser::cleanArgs( const TQString &func )
{
TQString slot( func );
- int begin = slot.find( "(" ) + 1;
+ int begin = slot.tqfind( "(" ) + 1;
TQString args = slot.mid( begin );
- args = args.left( args.find( ")" ) );
+ args = args.left( args.tqfind( ")" ) );
TQStringList lst = TQStringList::split( ',', args );
TQString res = slot.left( begin );
for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
@@ -42,13 +42,13 @@ TQString Parser::cleanArgs( const TQString &func )
res += ",";
TQString arg = *it;
int pos = 0;
- if ( ( pos = arg.find( "&" ) ) != -1 ) {
+ if ( ( pos = arg.tqfind( "&" ) ) != -1 ) {
arg = arg.left( pos + 1 );
- } else if ( ( pos = arg.find( "*" ) ) != -1 ) {
+ } else if ( ( pos = arg.tqfind( "*" ) ) != -1 ) {
arg = arg.left( pos + 1 );
} else {
arg = arg.simplifyWhiteSpace();
- if ( ( pos = arg.find( ':' ) ) != -1 )
+ if ( ( pos = arg.tqfind( ':' ) ) != -1 )
arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace();
TQStringList l = TQStringList::split( ' ', arg );
if ( l.count() == 2 ) {
@@ -62,5 +62,5 @@ TQString Parser::cleanArgs( const TQString &func )
}
res += ")";
- return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
+ return TQString::tqfromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
}
diff --git a/kommander/editor/parser.h b/kommander/editor/parser.h
index ace96d9e..5fdbdc2b 100644
--- a/kommander/editor/parser.h
+++ b/kommander/editor/parser.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
diff --git a/kommander/editor/pics/images.h b/kommander/editor/pics/images.h
index 92094bdb..5850acd1 100644
--- a/kommander/editor/pics/images.h
+++ b/kommander/editor/pics/images.h
@@ -1,5 +1,5 @@
-#ifndef _QEMBED_1804289383
-#define _QEMBED_1804289383
+#ifndef _TQEMBED_1804289383
+#define _TQEMBED_1804289383
static const unsigned int arrow_xbm_len = 601;
static const unsigned char arrow_xbm_data[] = {
0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x61,0x72,0x72,0x6f,0x77,0x5f,
@@ -4717,8 +4717,8 @@ static const unsigned char small_editgrid_png_data[] = {
0x60,0x82
};
-static const unsigned int small_edithlayout_png_len = 706;
-static const unsigned char small_edithlayout_png_data[] = {
+static const unsigned int small_edithtqlayout_png_len = 706;
+static const unsigned char small_edithtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -4772,8 +4772,8 @@ static const unsigned char small_edithlayout_png_data[] = {
0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_edithlayoutsplit_png_len = 809;
-static const unsigned char small_edithlayoutsplit_png_data[] = {
+static const unsigned int small_edithtqlayoutsplit_png_len = 809;
+static const unsigned char small_edithtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -4957,8 +4957,8 @@ static const unsigned char small_editslots_png_data[] = {
0xae,0x42,0x60,0x82
};
-static const unsigned int small_editvlayout_png_len = 289;
-static const unsigned char small_editvlayout_png_data[] = {
+static const unsigned int small_editvtqlayout_png_len = 289;
+static const unsigned char small_editvtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -4982,8 +4982,8 @@ static const unsigned char small_editvlayout_png_data[] = {
0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_editvlayoutsplit_png_len = 355;
-static const unsigned char small_editvlayoutsplit_png_data[] = {
+static const unsigned int small_editvtqlayoutsplit_png_len = 355;
+static const unsigned char small_editvtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -7784,8 +7784,8 @@ static const unsigned char small_disabled_editgrid_png_data[] = {
0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_disabled_edithlayout_png_len = 601;
-static const unsigned char small_disabled_edithlayout_png_data[] = {
+static const unsigned int small_disabled_edithtqlayout_png_len = 601;
+static const unsigned char small_disabled_edithtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -7831,8 +7831,8 @@ static const unsigned char small_disabled_edithlayout_png_data[] = {
0x35,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_disabled_edithlayoutsplit_png_len = 754;
-static const unsigned char small_disabled_edithlayoutsplit_png_data[] = {
+static const unsigned int small_disabled_edithtqlayoutsplit_png_len = 754;
+static const unsigned char small_disabled_edithtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -7958,8 +7958,8 @@ static const unsigned char small_disabled_editpaste_png_data[] = {
0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_disabled_editvlayout_png_len = 617;
-static const unsigned char small_disabled_editvlayout_png_data[] = {
+static const unsigned int small_disabled_editvtqlayout_png_len = 617;
+static const unsigned char small_disabled_editvtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -8007,8 +8007,8 @@ static const unsigned char small_disabled_editvlayout_png_data[] = {
0x82
};
-static const unsigned int small_disabled_editvlayoutsplit_png_len = 752;
-static const unsigned char small_disabled_editvlayoutsplit_png_data[] = {
+static const unsigned int small_disabled_editvtqlayoutsplit_png_len = 752;
+static const unsigned char small_disabled_editvtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -10857,7 +10857,7 @@ static struct Embed {
{ 1483, small_form_xpm_data, "small/form.xpm" },
{ 3981, small_home_xpm_data, "small/home.xpm" },
{ 5406, small_image_xpm_data, "small/image.xpm" },
- { 3179, small_layout_xpm_data, "small/layout.xpm" },
+ { 3179, small_layout_xpm_data, "small/tqlayout.xpm" },
{ 3621, small_left_xpm_data, "small/left.xpm" },
{ 1131, small_newform_xpm_data, "small/newform.xpm" },
{ 2434, small_print_xpm_data, "small/print.xpm" },
@@ -10877,12 +10877,12 @@ static struct Embed {
{ 485, small_editcopy_png_data, "small/editcopy.png" },
{ 649, small_editcut_png_data, "small/editcut.png" },
{ 520, small_editgrid_png_data, "small/editgrid.png" },
- { 706, small_edithlayout_png_data, "small/edithlayout.png" },
- { 809, small_edithlayoutsplit_png_data, "small/edithlayoutsplit.png" },
+ { 706, small_edithtqlayout_png_data, "small/edithtqlayout.png" },
+ { 809, small_edithtqlayoutsplit_png_data, "small/edithtqlayoutsplit.png" },
{ 902, small_editpaste_png_data, "small/editpaste.png" },
{ 690, small_editslots_png_data, "small/editslots.png" },
- { 289, small_editvlayout_png_data, "small/editvlayout.png" },
- { 355, small_editvlayoutsplit_png_data, "small/editvlayoutsplit.png" },
+ { 289, small_editvtqlayout_png_data, "small/editvtqlayout.png" },
+ { 355, small_editvtqlayoutsplit_png_data, "small/editvtqlayoutsplit.png" },
{ 1408, small_exec_png_data, "small/exec.png" },
{ 313, small_filenew_png_data, "small/filenew.png" },
{ 681, small_fileopen_png_data, "small/fileopen.png" },
@@ -10925,7 +10925,7 @@ static struct Embed {
{ 572, small_undo_png_data, "small/undo.png" },
{ 733, small_disabled_editcut_xpm_data, "small/disabled/editcut.xpm" },
{ 899, small_disabled_editslots_xpm_data, "small/disabled/editslots.xpm" },
- { 931, small_disabled_layout_xpm_data, "small/disabled/layout.xpm" },
+ { 931, small_disabled_layout_xpm_data, "small/disabled/tqlayout.xpm" },
{ 733, small_disabled_left_xpm_data, "small/disabled/left.xpm" },
{ 733, small_disabled_right_xpm_data, "small/disabled/right.xpm" },
{ 659, small_disabled_adjustsize_png_data, "small/disabled/adjustsize.png" },
@@ -10933,11 +10933,11 @@ static struct Embed {
{ 1126, small_disabled_editbreaklayout_png_data, "small/disabled/editbreaklayout.png" },
{ 931, small_disabled_editcopy_png_data, "small/disabled/editcopy.png" },
{ 735, small_disabled_editgrid_png_data, "small/disabled/editgrid.png" },
- { 601, small_disabled_edithlayout_png_data, "small/disabled/edithlayout.png" },
- { 754, small_disabled_edithlayoutsplit_png_data, "small/disabled/edithlayoutsplit.png" },
+ { 601, small_disabled_edithtqlayout_png_data, "small/disabled/edithtqlayout.png" },
+ { 754, small_disabled_edithtqlayoutsplit_png_data, "small/disabled/edithtqlayoutsplit.png" },
{ 901, small_disabled_editpaste_png_data, "small/disabled/editpaste.png" },
- { 617, small_disabled_editvlayout_png_data, "small/disabled/editvlayout.png" },
- { 752, small_disabled_editvlayoutsplit_png_data, "small/disabled/editvlayoutsplit.png" },
+ { 617, small_disabled_editvtqlayout_png_data, "small/disabled/editvtqlayout.png" },
+ { 752, small_disabled_editvtqlayoutsplit_png_data, "small/disabled/editvtqlayoutsplit.png" },
{ 587, small_disabled_filesave_png_data, "small/disabled/filesave.png" },
{ 531, small_disabled_redo_png_data, "small/disabled/redo.png" },
{ 1013, small_disabled_searchfind_png_data, "small/disabled/searchfind.png" },
@@ -10957,7 +10957,7 @@ static struct Embed {
static const TQByteArray& qembed_findData( const char* name )
{
static TQDict dict;
- TQByteArray* ba = dict.find( name );
+ TQByteArray* ba = dict.tqfind( name );
if ( !ba ) {
for ( int i = 0; embed_vec[i].data; i++ ) {
if ( strcmp(embed_vec[i].name, name) == 0 ) {
diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp
index 92512c68..f0e8ab3a 100644
--- a/kommander/editor/pixmapchooser.cpp
+++ b/kommander/editor/pixmapchooser.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -50,8 +50,8 @@
#if defined(DESIGNER)
#include "pics/images.h"
-#ifdef Q_WS_MACX
-//logo is 40x40 on the mac, if it changes - please notify the Qt/Mac team
+#ifdef TQ_WS_MACX
+//logo is 40x40 on the mac, if it changes - please notify the TQt/Mac team
static const char * const logo_xpm[] = {
"40 40 543 2",
" c None",
@@ -876,8 +876,8 @@ static ImageIconProvider *imageIconProvider = 0;
static PixmapChooser *pixmapChooser = 0;
#endif
-PixmapView::PixmapView( TQWidget *parent )
- : TQScrollView( parent )
+PixmapView::PixmapView( TQWidget *tqparent )
+ : TQScrollView( tqparent )
{
viewport()->setBackgroundMode( PaletteBase );
}
@@ -886,12 +886,12 @@ void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
- viewport()->repaint( false );
+ viewport()->tqrepaint( false );
}
void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
{
- p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) );
+ p->fillRect( cx, cy, cw, ch, tqcolorGroup().brush( TQColorGroup::Base ) );
p->drawPixmap( 0, 0, pixmap );
}
@@ -907,36 +907,36 @@ void PixmapView::previewUrl( const TQUrl &u )
}
}
-TQStringList qChoosePixmaps( TQWidget *parent )
+TQStringList qChoosePixmaps( TQWidget *tqparent )
{
if ( !imageIconProvider && !TQFileDialog::iconProvider() )
TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
TQString filter;
- TQString all = qApp->translate( "qChoosePixmap", "All Pixmaps (" );
+ TQString all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" );
for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
- filter += qApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ).
+ filter += tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ).
arg( TQImageIO::outputFormats().at( i ) ).
arg( "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() );
all += "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() + ";";
}
- filter.prepend( all + qApp->translate( "qChoosePixmap", ")\n" ) );
- filter += qApp->translate( "qChoosePixmap", "All Files (*)" );
+ filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) );
+ filter += tqApp->translate( "qChoosePixmap", "All Files (*)" );
- TQFileDialog fd( TQString::null, filter, parent, 0, true );
+ TQFileDialog fd( TQString(), filter, tqparent, 0, true );
fd.setMode( TQFileDialog::ExistingFiles );
fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List );
fd.setPreviewMode( TQFileDialog::Contents );
- fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Images" ) );
+ fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images" ) );
if ( fd.exec() == TQDialog::Accepted )
return fd.selectedFiles();
return TQStringList();
}
-TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn )
+TQPixmap qChoosePixmap( TQWidget *tqparent, FormWindow *fw, const TQPixmap &old, TQString *fn )
{
#if defined(DESIGNER)
if ( !fw || fw->savePixmapInline() ) {
@@ -955,7 +955,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
filter.prepend( all + ")\n" );
filter += i18n( "All Files (*)" );
- TQFileDialog fd( TQString::null, filter, parent, 0, true );
+ TQFileDialog fd( TQString(), filter, tqparent, 0, true );
fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
@@ -966,13 +966,13 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQPixmap pix( fd.selectedFile() );
if ( fn )
*fn = fd.selectedFile();
- MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), fd.selectedFile() );
return pix;
}
}
#ifndef KOMMANDER
else if ( fw && fw->savePixmapInProject() ) {
- PixmapCollectionEditor dia( parent, 0, true );
+ PixmapCollectionEditor dia( tqparent, 0, true );
dia.setProject( fw->project() );
dia.setChooserMode( true );
dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
@@ -984,27 +984,27 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
}
#endif
else {
- PixmapFunction dia( parent, 0, true );
+ PixmapFunction dia( tqparent, 0, true );
TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
- dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );
+ dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) );
dia.editArguments->setFocus();
if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix( PixmapChooser::loadPixmap( "image.xpm" ) );
- MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() );
return pix;
}
}
#else
- Q_UNUSED( parent );
+ Q_UNUSED( tqparent );
Q_UNUSED( fw );
Q_UNUSED( old );
#endif
return TQPixmap();
}
-ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name )
- : TQFileIconProvider( parent, name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
+ImageIconProvider::ImageIconProvider( TQWidget *tqparent, const char *name )
+ : TQFileIconProvider( TQT_TQOBJECT(tqparent), name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
{
fmts = TQImage::inputFormats();
}
@@ -1016,7 +1016,7 @@ ImageIconProvider::~ImageIconProvider()
const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi )
{
TQString ext = fi.extension().upper();
- if ( fmts.contains( ext ) ) {
+ if ( fmts.tqcontains( ext ) ) {
return &imagepm;
} else {
return TQFileIconProvider::pixmap( fi );
diff --git a/kommander/editor/pixmapchooser.h b/kommander/editor/pixmapchooser.h
index fe54942e..48c947a7 100644
--- a/kommander/editor/pixmapchooser.h
+++ b/kommander/editor/pixmapchooser.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -29,12 +29,13 @@
class FormWindow;
class PixmapView : public TQScrollView,
- public QFilePreview
+ public TQFilePreview
{
Q_OBJECT
+ TQ_OBJECT
public:
- PixmapView( TQWidget *parent );
+ PixmapView( TQWidget *tqparent );
void setPixmap( const TQPixmap &pix );
void drawContents( TQPainter *p, int, int, int, int );
void previewUrl( const TQUrl &u );
@@ -44,12 +45,13 @@ private:
};
-class ImageIconProvider : public QFileIconProvider
+class ImageIconProvider : public TQFileIconProvider
{
Q_OBJECT
+ TQ_OBJECT
public:
- ImageIconProvider( TQWidget *parent = 0, const char *name = 0 );
+ ImageIconProvider( TQWidget *tqparent = 0, const char *name = 0 );
~ImageIconProvider();
const TQPixmap *pixmap( const TQFileInfo &fi );
@@ -60,8 +62,8 @@ private:
};
-TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 );
-TQStringList qChoosePixmaps( TQWidget *parent );
+TQPixmap qChoosePixmap( TQWidget *tqparent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 );
+TQStringList qChoosePixmaps( TQWidget *tqparent );
class PixmapChooser
diff --git a/kommander/editor/pixmapfunction.ui b/kommander/editor/pixmapfunction.ui
index a75869dc..fb2043d2 100644
--- a/kommander/editor/pixmapfunction.ui
+++ b/kommander/editor/pixmapfunction.ui
@@ -19,13 +19,13 @@
**
*********************************************************************
- QDialog
+ TQDialog
name
PixmapFunction
- geometry
+ tqgeometry
0
0
@@ -51,7 +51,7 @@
6
- QLabel
+ TQLabel
name
TextLabel3
@@ -66,7 +66,7 @@
- QFrame
+ TQFrame
name
Frame9
@@ -84,10 +84,10 @@
2
- layoutMargin
+ tqlayoutMargin
- layoutSpacing
+ tqlayoutSpacing
@@ -99,14 +99,14 @@
0
- QLabel
+ TQLabel
name
labelFunction
text
- QPixmap(
+ TQPixmap(
palette
@@ -331,7 +331,7 @@
- QLineEdit
+ TQLineEdit
name
editArguments
@@ -563,7 +563,7 @@
- QLabel
+ TQLabel
name
TextLabel5
@@ -810,7 +810,7 @@
Expanding
- sizeHint
+ tqsizeHint
20
20
@@ -818,7 +818,7 @@
- QLayoutWidget
+ TQLayoutWidget
name
Layout3
@@ -833,7 +833,7 @@
6
- QPushButton
+ TQPushButton
name
helpButton
@@ -861,7 +861,7 @@
Expanding
- sizeHint
+ tqsizeHint
20
20
@@ -869,7 +869,7 @@
- QPushButton
+ TQPushButton
name
buttonOk
@@ -888,7 +888,7 @@
- QPushButton
+ TQPushButton
name
buttonCancel
diff --git a/kommander/editor/preferences.ui b/kommander/editor/preferences.ui
index 6bd5dac3..63ac1bb3 100644
--- a/kommander/editor/preferences.ui
+++ b/kommander/editor/preferences.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************
-
+
Preferences
@@ -50,11 +50,11 @@
6
-
+
tabWidget
-
+
pageGeneral
@@ -71,7 +71,7 @@
6
-
+
ButtonGroup1
@@ -114,7 +114,7 @@
Select a color in the color dialog.
-
+
radioColor
@@ -131,7 +131,7 @@
Use a background color.
-
+
radioPixmap
@@ -173,7 +173,7 @@
-
+
checkBoxShowGrid
@@ -190,7 +190,7 @@
<b>Customize the grid appearance for all forms.</b><p>When <b>Show Grid</b> is checked, all forms show a grid.</p>
-
+
GroupBox1
@@ -210,7 +210,7 @@
6
-
+
checkBoxGrid
@@ -227,7 +227,7 @@
<b>Customize the grid-settings for all forms.</b><p>When <b>Snap to Grid</b> is checked, the widgets snap to the grid using the the X/Y resolution.</p>
-
+
Layout4
@@ -241,7 +241,7 @@
6
-
+
spinGridX
@@ -261,7 +261,7 @@
<b>Customize the grid-settings for all forms.</b><p>When <b>Show Grid</b> is checked, a grid is shown on all forms using the X/Y resolution.</p>
-
+
spinGridY
@@ -281,7 +281,7 @@
<b>Customize the grid-settings for all forms.</b><p>When <b>Show Grid</b> is checked, a grid is shown on all forms using the X/Y resolution.</p>
-
+
Label1
@@ -292,7 +292,7 @@
spinGridX
-
+
Label1_2
@@ -317,7 +317,7 @@
Expanding
-
+
20
20
@@ -327,7 +327,7 @@
A splash screen is displayed when starting Qt Designer if this option is checked.
-
+
GroupBox5
@@ -344,7 +344,7 @@
6
-
+
checkBoxWorkspace
@@ -361,7 +361,7 @@
The current workspace settings will be restored the next time you start Qt Designer if this option is checked.
-
+
checkBoxSplash
@@ -378,7 +378,7 @@
A splash screen is displayed when starting Qt Designer if this option is checked.
-
+
checkAutoEdit
@@ -389,7 +389,7 @@
true
-
+
Label3
@@ -400,7 +400,7 @@
editDocPath
-
+
Layout6
@@ -414,7 +414,7 @@
6
-
+
editDocPath
@@ -422,7 +422,7 @@
<b>Enter the path to the documentation.</b><p>You may provide an $environment variable as the first part of the pathname.</p>
-
+
buttonDocPath
@@ -443,7 +443,7 @@
-
+
GroupBox3
@@ -460,7 +460,7 @@
6
-
+
checkBoxBigIcons
@@ -474,7 +474,7 @@
Big icons will be used in the toolbars if this is checked.
-
+
checkBoxTextLabels
@@ -493,7 +493,7 @@
-
+
Layout6
@@ -507,7 +507,7 @@
6
-
+
helpButton
@@ -528,14 +528,14 @@
Expanding
-
+
20
20
-
+
buttonOk
@@ -552,7 +552,7 @@
Close the dialog and apply all the changes.
-
+
buttonCancel
diff --git a/kommander/editor/previewframe.cpp b/kommander/editor/previewframe.cpp
index 3be0c2ae..53f35670 100644
--- a/kommander/editor/previewframe.cpp
+++ b/kommander/editor/previewframe.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -23,15 +23,15 @@
#include "previewframe.h"
-PreviewFrame::PreviewFrame( TQWidget *parent, const char *name )
- : TQVBox( parent, name )
+PreviewFrame::PreviewFrame( TQWidget *tqparent, const char *name )
+ : TQVBox( tqparent, name )
{
setMinimumSize(200, 200);
setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
setLineWidth(1);
PreviewWorkspace * w = new PreviewWorkspace( this );
- w->setEraseColor(colorGroup().dark());
+ w->setEraseColor(tqcolorGroup().dark());
previewWidget = new PreviewWidget( w );
previewWidget->move( 10, 10 );
}
diff --git a/kommander/editor/previewframe.h b/kommander/editor/previewframe.h
index 21ecd9a7..6447f005 100644
--- a/kommander/editor/previewframe.h
+++ b/kommander/editor/previewframe.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -26,24 +26,26 @@
#include "previewwidgetimpl.h"
-class PreviewWorkspace : public QWorkspace
+class PreviewWorkspace : public TQWorkspace
{
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 )
- : TQWorkspace( parent, name ) {}
+ PreviewWorkspace( TQWidget* tqparent = 0, const char* name = 0 )
+ : TQWorkspace( tqparent, name ) {}
~PreviewWorkspace() {}
protected:
void paintEvent( TQPaintEvent* );
};
-class PreviewFrame : public QVBox
+class PreviewFrame : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewFrame( TQWidget *parent = 0, const char *name = 0 );
+ PreviewFrame( TQWidget *tqparent = 0, const char *name = 0 );
void setPreviewPalette(TQPalette);
private:
diff --git a/kommander/editor/previewwidget.ui b/kommander/editor/previewwidget.ui
index 317313cf..6c93d75d 100644
--- a/kommander/editor/previewwidget.ui
+++ b/kommander/editor/previewwidget.ui
@@ -1,6 +1,6 @@
PreviewWidgetBase
-
+
PreviewWidgetBase
@@ -31,7 +31,7 @@
6
-
+
Layout6
@@ -45,7 +45,7 @@
6
-
+
Layout17
@@ -59,7 +59,7 @@
6
-
+
ButtonGroup1
@@ -76,7 +76,7 @@
6
-
+
RadioButton1
@@ -87,7 +87,7 @@
true
-
+
RadioButton2
@@ -95,7 +95,7 @@
RadioButton2
-
+
RadioButton3
@@ -105,7 +105,7 @@
-
+
ButtonGroup2
@@ -122,7 +122,7 @@
6
-
+
CheckBox1
@@ -133,7 +133,7 @@
true
-
+
CheckBox2
@@ -143,7 +143,7 @@
-
+
ProgressBar1
@@ -153,7 +153,7 @@
-
+
Layout5
@@ -167,7 +167,7 @@
6
-
+
LineEdit1
@@ -175,7 +175,7 @@
LineEdit
-
+
-
ComboBox
@@ -185,7 +185,7 @@
ComboBox1
-
+
Layout13
@@ -199,12 +199,12 @@
6
-
+
SpinBox1
-
+
PushButton1
@@ -214,7 +214,7 @@
-
+
ScrollBar1
@@ -222,7 +222,7 @@
Horizontal
-
+
Slider1
@@ -230,11 +230,11 @@
Horizontal
-
+
textView
-
+
32767
50
@@ -263,7 +263,7 @@
Expanding
-
+
20
20
diff --git a/kommander/editor/previewwidgetimpl.cpp b/kommander/editor/previewwidgetimpl.cpp
index 6e9672be..1c6ab9cd 100644
--- a/kommander/editor/previewwidgetimpl.cpp
+++ b/kommander/editor/previewwidgetimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -21,8 +21,8 @@
#include "tqobjectlist.h"
#include "previewwidgetimpl.h"
-PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
- : PreviewWidgetBase( parent, name )
+PreviewWidget::PreviewWidget( TQWidget *tqparent, const char *name )
+ : PreviewWidgetBase( tqparent, name )
{
// install event filter on child widgets
TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
@@ -31,7 +31,7 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
while ((obj = it.current()) != 0) {
++it;
obj->installEventFilter(this);
- ((TQWidget*)obj)->setFocusPolicy(NoFocus);
+ ((TQWidget*)obj)->setFocusPolicy(TQ_NoFocus);
}
}
diff --git a/kommander/editor/previewwidgetimpl.h b/kommander/editor/previewwidgetimpl.h
index 37080916..a2b0ef7a 100644
--- a/kommander/editor/previewwidgetimpl.h
+++ b/kommander/editor/previewwidgetimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -26,9 +26,10 @@
class PreviewWidget : public PreviewWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewWidget( TQWidget *parent = 0, const char *name = 0 );
+ PreviewWidget( TQWidget *tqparent = 0, const char *name = 0 );
void closeEvent(TQCloseEvent *);
bool eventFilter(TQObject *, TQEvent *);
diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp
index aeeaecb1..b0c71147 100644
--- a/kommander/editor/propertyeditor.cpp
+++ b/kommander/editor/propertyeditor.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -105,11 +105,11 @@ static TQStringList getFontList()
fontDataBase = new TQFontDatabase;
qAddPostRoutine( cleanupFontDatabase );
}
- return fontDataBase->families();
+ return fontDataBase->tqfamilies();
}
-class PropertyWhatsThis : public QWhatsThis
+class PropertyWhatsThis : public TQWhatsThis
{
public:
PropertyWhatsThis( PropertyList *l );
@@ -155,7 +155,7 @@ bool PropertyWhatsThis::clicked( const TQString& href )
*/
/*! If this item should be a child of another property item, specify
- \a prop as the parent item.
+ \a prop as the tqparent item.
*/
PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
@@ -172,7 +172,7 @@ PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *
PropertyItem::~PropertyItem()
{
if ( resetButton )
- delete resetButton->parentWidget();
+ delete resetButton->tqparentWidget();
resetButton = 0;
}
@@ -222,8 +222,8 @@ void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
{
TQColorGroup g( cg );
g.setColor( TQColorGroup::Base, backgroundColor() );
- g.setColor( TQColorGroup::Foreground, Qt::black );
- g.setColor( TQColorGroup::Text, Qt::black );
+ g.setColor( TQColorGroup::Foreground, TQt::black );
+ g.setColor( TQColorGroup::Text, TQt::black );
int indent = 0;
if ( column == 0 ) {
indent = 20 + ( property ? 20 : 0 );
@@ -282,7 +282,7 @@ void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg,
void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r )
{
p->save();
- TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg,
+ TQApplication::tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg,
TQStyle::Style_Sunken, TQStyleOption(1,1) );
p->restore();
}
@@ -296,7 +296,7 @@ bool PropertyItem::hasSubItems() const
return false;
}
-/*! Returns the parent property item here if this is a child or 0
+/*! Returns the tqparent property item here if this is a child or 0
otherwise.
*/
@@ -317,17 +317,17 @@ void PropertyItem::setOpen( bool b )
open = b;
if ( !open ) {
- children.setAutoDelete( true );
- children.clear();
- children.setAutoDelete( false );
- qApp->processEvents();
+ tqchildren.setAutoDelete( true );
+ tqchildren.clear();
+ tqchildren.setAutoDelete( false );
+ tqApp->processEvents();
listview->updateEditorSize();
return;
}
createChildren();
initChildren();
- qApp->processEvents();
+ tqApp->processEvents();
listview->updateEditorSize();
}
@@ -337,7 +337,7 @@ void PropertyItem::setOpen( bool b )
void PropertyItem::showEditor()
{
createResetButton();
- resetButton->parentWidget()->show();
+ resetButton->tqparentWidget()->show();
}
/*! Subclasses have to hide the editor of the item here
@@ -346,7 +346,7 @@ void PropertyItem::showEditor()
void PropertyItem::hideEditor()
{
createResetButton();
- resetButton->parentWidget()->hide();
+ resetButton->tqparentWidget()->hide();
}
/*! This is called to init the value of the item. Reimplement in
@@ -375,7 +375,7 @@ void PropertyItem::setChanged( bool b, bool updateDb )
if ( changed == b )
return;
changed = b;
- repaint();
+ tqrepaint();
if ( updateDb )
MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed );
updateResetButtonState();
@@ -389,7 +389,7 @@ TQString PropertyItem::name() const
void PropertyItem::createResetButton()
{
if ( resetButton ) {
- resetButton->parentWidget()->lower();
+ resetButton->tqparentWidget()->lower();
return;
}
TQHBox *hbox = new TQHBox( listview->viewport() );
@@ -397,8 +397,8 @@ void PropertyItem::createResetButton()
hbox->setLineWidth( 1 );
resetButton = new TQPushButton( hbox );
resetButton->setPixmap( PixmapChooser::loadPixmap( "resetproperty.xpm", PixmapChooser::Mini ) );
- resetButton->setFixedWidth( resetButton->sizeHint().width() );
- hbox->layout()->setAlignment( Qt::AlignRight );
+ resetButton->setFixedWidth( resetButton->tqsizeHint().width() );
+ hbox->tqlayout()->tqsetAlignment( TQt::AlignRight );
listview->addChild( hbox );
hbox->hide();
TQObject::connect( resetButton, TQT_SIGNAL( clicked() ),
@@ -425,13 +425,13 @@ void PropertyItem::updateResetButtonState()
void PropertyItem::placeEditor( TQWidget *w )
{
createResetButton();
- TQRect r = listview->itemRect( this );
+ TQRect r = listview->tqitemRect( this );
if ( !r.size().isValid() ) {
listview->ensureItemVisible( this );
-#if defined(Q_WS_WIN)
- listview->repaintContents( false );
+#if defined(TQ_WS_WIN)
+ listview->tqrepaintContents( false );
#endif
- r = listview->itemRect( this );
+ r = listview->tqitemRect( this );
}
r.setX( listview->header()->sectionPos( 1 ) );
r.setWidth( listview->header()->sectionSize( 1 ) - 1 );
@@ -439,8 +439,8 @@ void PropertyItem::placeEditor( TQWidget *w )
r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
listview->moveChild( w, r.x(), r.y() );
- resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() );
- listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() );
+ resetButton->tqparentWidget()->resize( resetButton->tqsizeHint().width() + 10, r.height() );
+ listview->moveChild( resetButton->tqparentWidget(), r.x() + r.width() - 8, r.y() );
resetButton->setFixedHeight( r.height() - 3 );
}
@@ -475,18 +475,18 @@ void PropertyItem::childValueChanged( PropertyItem * )
void PropertyItem::addChild( PropertyItem *i )
{
- children.append( i );
+ tqchildren.append( i );
}
int PropertyItem::childCount() const
{
- return children.count();
+ return tqchildren.count();
}
PropertyItem *PropertyItem::child( int i ) const
{
// ARRRRRRRRG
- return ( (PropertyItem*)this )->children.at( i );
+ return ( (PropertyItem*)this )->tqchildren.at( i );
}
/*! If the contents of the item is not displayable with a text, but
@@ -509,7 +509,7 @@ void PropertyItem::drawCustomContents( TQPainter *, const TQRect & )
TQString PropertyItem::currentItem() const
{
- return TQString::null;
+ return TQString();
}
int PropertyItem::currentIntItem() const
@@ -532,15 +532,15 @@ int PropertyItem::currentIntItemFromObject() const
TQString PropertyItem::currentItemFromObject() const
{
- return TQString::null;
+ return TQString();
}
void PropertyItem::setFocus( TQWidget *w )
{
- if ( !qApp->focusWidget() ||
+ if ( !tqApp->tqfocusWidget() ||
listview->propertyEditor()->formWindow() &&
- ( !MainWindow::self->isAFormWindowChild( qApp->focusWidget() ) &&
- !qApp->focusWidget()->inherits( "Editor" ) ) )
+ ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->tqfocusWidget()) ) &&
+ !tqApp->tqfocusWidget()->inherits( "Editor" ) ) )
w->setFocus();
}
@@ -548,7 +548,7 @@ void PropertyItem::setText( int col, const TQString &t )
{
TQString txt( t );
if ( col == 1 )
- txt = txt.replace( TQRegExp( "\n" ), " " );
+ txt = txt.tqreplace( TQRegExp( "\n" ), " " );
TQListViewItem::setText( col, txt );
}
@@ -582,13 +582,13 @@ TQLineEdit *PropertyTextItem::lined()
if ( asciiOnly ) {
if ( PropertyItem::name() == "name" )
- lin->setValidator( new AsciiValidator( lin, "ascii_validator" ) );
+ lin->setValidator( new AsciiValidator( TQT_TQOBJECT(lin), "ascii_validator" ) );
else
lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
"\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
"\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3"
"\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc"
- "\xbd\xbe\xbf"), lin, "ascii_validator" ) );
+ "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) );
} if ( !hasMultiLines ) {
lin->hide();
} else {
@@ -762,7 +762,7 @@ TQLineEdit *PropertyDoubleItem::lined()
if ( lin )
return lin;
lin = new TQLineEdit( listview->viewport() );
- lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) );
+ lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) );
connect( lin, TQT_SIGNAL( returnPressed() ),
this, TQT_SLOT( setValue() ) );
@@ -837,11 +837,11 @@ PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, Proper
lin = 0;
}
-QDateEdit *PropertyDateItem::lined()
+TQDateEdit *PropertyDateItem::lined()
{
if ( lin )
return lin;
- lin = new QDateEdit( listview->viewport() );
+ lin = new TQDateEdit( listview->viewport() );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
@@ -853,7 +853,7 @@ QDateEdit *PropertyDateItem::lined()
PropertyDateItem::~PropertyDateItem()
{
- delete (QDateEdit*)lin;
+ delete (TQDateEdit*)lin;
lin = 0;
}
@@ -912,11 +912,11 @@ PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, Proper
lin = 0;
}
-QTimeEdit *PropertyTimeItem::lined()
+TQTimeEdit *PropertyTimeItem::lined()
{
if ( lin )
return lin;
- lin = new QTimeEdit( listview->viewport() );
+ lin = new TQTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ),
this, TQT_SLOT( setValue() ) );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
@@ -928,7 +928,7 @@ QTimeEdit *PropertyTimeItem::lined()
PropertyTimeItem::~PropertyTimeItem()
{
- delete (QTimeEdit*)lin;
+ delete (TQTimeEdit*)lin;
lin = 0;
}
@@ -987,11 +987,11 @@ PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after
lin = 0;
}
-QDateTimeEdit *PropertyDateTimeItem::lined()
+TQDateTimeEdit *PropertyDateTimeItem::lined()
{
if ( lin )
return lin;
- lin = new QDateTimeEdit( listview->viewport() );
+ lin = new TQDateTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ),
this, TQT_SLOT( setValue() ) );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
@@ -1003,7 +1003,7 @@ QDateTimeEdit *PropertyDateTimeItem::lined()
PropertyDateTimeItem::~PropertyDateTimeItem()
{
- delete (QDateTimeEdit*)lin;
+ delete (TQDateTimeEdit*)lin;
lin = 0;
}
@@ -1540,8 +1540,8 @@ PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, Pr
box = new TQHBox( listview->viewport() );
box->hide();
pixPrev = new TQLabel( box );
- pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) );
- pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) );
+ pixPrev->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) );
+ pixPrev->setBackgroundColor( pixPrev->tqcolorGroup().color( TQColorGroup::Base ) );
button = new TQPushButton( "...", box );
button->setFixedWidth( 20 );
box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
@@ -1580,7 +1580,7 @@ void PropertyPixmapItem::setValue( const TQVariant &v )
else
pixPrev->setPixmap( v.toIconSet().pixmap() );
PropertyItem::setValue( v );
- repaint();
+ tqrepaint();
}
void PropertyPixmapItem::getPixmap()
@@ -1605,8 +1605,8 @@ void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
TQPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) );
if ( !pix.isNull() ) {
p->save();
- p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
- (int)(p->worldMatrix().dy() + r.y()) ),
+ p->setClipRect( TQRect( TQPoint( (int)(p->tqworldMatrix().dx() + r.x()),
+ (int)(p->tqworldMatrix().dy() + r.y()) ),
r.size() ) );
p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix );
p->restore();
@@ -1617,8 +1617,8 @@ void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
// --------------------------------------------------------------
PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const TQString &propName, bool children )
- : PropertyItem( l, after, prop, propName ), withChildren( children )
+ const TQString &propName, bool tqchildren )
+ : PropertyItem( l, after, prop, propName ), withChildren( tqchildren )
{
box = new TQHBox( listview->viewport() );
box->hide();
@@ -1834,7 +1834,7 @@ void PropertyFontItem::setValue( const TQVariant &v )
void PropertyFontItem::getFont()
{
bool ok = false;
- TQFont f = QFontDialog::getFont( &ok, val.toFont(), listview );
+ TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview );
if ( ok && f != val.toFont() ) {
setValue( f );
notifyValueChange();
@@ -1901,7 +1901,7 @@ void PropertyDatabaseItem::createChildren()
void PropertyDatabaseItem::initChildren()
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
PropertyItem *item = 0;
TQStringList lst = value().toStringList();
TQString conn, table;
@@ -2003,7 +2003,7 @@ bool PropertyDatabaseItem::hasSubItems() const
void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
TQStringList lst;
lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem()
<< ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem();
@@ -2112,7 +2112,7 @@ void PropertySizePolicyItem::setValue( const TQVariant &v )
return;
TQString s = TQString( "%1/%2/%2/%2" );
- s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ).
+ s = s.tqarg( size_type_to_string( v.toSizePolicy().horData() ) ).
arg( size_type_to_string( v.toSizePolicy().verData() ) ).
arg( v.toSizePolicy().horStretch() ).
arg( v.toSizePolicy().verStretch() );
@@ -2185,7 +2185,7 @@ void PropertyPaletteItem::setValue( const TQVariant &v )
TQString s;
palettePrev->setPalette( v.toPalette() );
PropertyItem::setValue( v );
- repaint();
+ tqrepaint();
}
void PropertyPaletteItem::getPalette()
@@ -2197,8 +2197,8 @@ void PropertyPaletteItem::getPalette()
if ( w->inherits( TQSCROLLVIEW_OBJECT_NAME_STRING ) )
w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
-#if defined(QT_NON_COMMERCIAL)
- w->backgroundMode(), listview->topLevelWidget(),
+#if defined(TQT_NON_COMMERCIAL)
+ w->backgroundMode(), listview->tqtopLevelWidget(),
#else
w->backgroundMode(), listview,
#endif
@@ -2218,8 +2218,8 @@ void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
TQPalette pal( value().toPalette() );
p->save();
- p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
- (int)(p->worldMatrix().dy() + r.y()) ),
+ p->setClipRect( TQRect( TQPoint( (int)(p->tqworldMatrix().dx() + r.x()),
+ (int)(p->tqworldMatrix().dy() + r.y()) ),
r.size() ) );
TQRect r2( r );
r2.setX( r2.x() + 2 );
@@ -2271,11 +2271,11 @@ TQComboBox *PropertyCursorItem::combo()
cur = TQBitmap(sizev_width, sizev_height, sizev_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Vertical"), TQObject::SizeVerCursor );
+ comb->insertItem( cur, i18n("SizeQt::Vertical"), TQObject::SizeVerCursor );
cur = TQBitmap(sizeh_width, sizeh_height, sizeh_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Horizontal"), TQObject::SizeHorCursor );
+ comb->insertItem( cur, i18n("SizeQt::Horizontal"), TQObject::SizeHorCursor );
cur = TQBitmap(sizef_width, sizef_height, sizef_bits, true);
cur.setMask( cur );
@@ -2295,11 +2295,11 @@ TQComboBox *PropertyCursorItem::combo()
cur = TQBitmap(vsplit_width, vsplit_height, vsplit_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Split Vertical"), TQObject::SplitVCursor );
+ comb->insertItem( cur, i18n("SplitQt::Vertical"), TQObject::SplitVCursor );
cur = TQBitmap(hsplit_width, hsplit_height, hsplit_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Split Horizontal"), TQObject::SplitHCursor );
+ comb->insertItem( cur, i18n("SplitQt::Horizontal"), TQObject::SplitHCursor );
cur = TQBitmap(hand_width, hand_height, hand_bits, true);
cur.setMask( cur );
@@ -2325,7 +2325,7 @@ void PropertyCursorItem::showEditor()
PropertyItem::showEditor();
if ( !comb ) {
combo()->blockSignals( true );
- combo()->setCurrentItem( (int)value().toCursor().shape() );
+ combo()->setCurrentItem( (int)value().toCursor().tqshape() );
combo()->blockSignals( false );
}
placeEditor( combo() );
@@ -2348,7 +2348,7 @@ void PropertyCursorItem::setValue( const TQVariant &v )
return;
combo()->blockSignals( true );
- combo()->setCurrentItem( (int)v.toCursor().shape() );
+ combo()->setCurrentItem( (int)v.toCursor().tqshape() );
combo()->blockSignals( false );
setText( 1, combo()->currentText() );
PropertyItem::setValue( v );
@@ -2461,9 +2461,9 @@ static TQVariant::Type type_to_variant( const TQString &s )
if ( s == "Palette" )
return TQVariant::Palette;
if ( s == "ColorGroup" )
- return TQVariant::ColorGroup;
+ return (QVariant::Type)TQVariant::ColorGroup;
if ( s == "IconSet" )
- return TQVariant::IconSet;
+ return (QVariant::Type)TQVariant::IconSet;
if ( s == "Point" )
return TQVariant::Point;
if ( s == "Image" )
@@ -2477,11 +2477,11 @@ static TQVariant::Type type_to_variant( const TQString &s )
if ( s == "Double" )
return TQVariant::Double;
if ( s == "CString" )
- return TQVariant::CString;
+ return (QVariant::Type)TQVariant::CString;
if ( s == "PointArray" )
- return TQVariant::PointArray;
+ return (QVariant::Type)TQVariant::PointArray;
if ( s == "Region" )
- return TQVariant::Region;
+ return (QVariant::Type)TQVariant::Region;
if ( s == "Bitmap" )
return TQVariant::Bitmap;
if ( s == "Cursor" )
@@ -2497,17 +2497,17 @@ static TQVariant::Type type_to_variant( const TQString &s )
return TQVariant::Invalid;
}
-#ifndef QT_NO_SQL
-static bool parent_is_data_aware( TQObject *o )
+#ifndef TQT_NO_SQL
+static bool tqparent_is_data_aware( TQObject *o )
{
if ( !o->inherits( TQWIDGET_OBJECT_NAME_STRING ) )
return false;
TQWidget *w = (TQWidget*)o;
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
while ( p && !p->isTopLevel() ) {
- if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) )
+ if ( p->inherits( "TQDesignerDataBrowser" ) || p->inherits( "TQDesignerDataView" ) )
return true;
- p = p->parentWidget();
+ p = p->tqparentWidget();
}
return false;
}
@@ -2522,24 +2522,24 @@ void PropertyList::setupProperties()
if ( !editor->widget() )
return;
bool allProperties = !editor->widget()->inherits( "Spacer" );
- TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
+ TQStrList lst = editor->widget()->tqmetaObject()->propertyNames( allProperties );
PropertyItem *item = 0;
TQMap unique;
TQObject *w = editor->widget();
TQStringList valueSet;
- bool parentHasLayout =
+ bool tqparentHasLayout =
w->isWidgetType() &&
- !editor->formWindow()->isMainContainer( (TQWidget*)w ) && ( (TQWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ !editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)w) ) && ( (TQWidget*)w )->tqparentWidget() &&
+ WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout;
for ( TQPtrListIterator it( lst ); it.current(); ++it ) {
const TQMetaProperty* p =
- editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties );
+ editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( it.current(), allProperties), allProperties );
if ( !p )
continue;
- if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
+ if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) )
continue;
- if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) {
+ if ( editor->widget()->inherits( "TQDesignerToolBar" ) || editor->widget()->inherits( "TQDesignerMenuBar" ) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
@@ -2552,14 +2552,14 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "minimumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqminimumSize" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqmaximumSize" ) == 0 )
continue;
}
- unique.insert( TQString::fromLatin1( it.current() ), true );
+ unique.insert( TQString::tqfromLatin1( it.current() ), true );
if ( editor->widget()->isWidgetType() &&
- editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) {
+ editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)editor->widget()) ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
} else { // hide some toplevel-only stuff
@@ -2573,9 +2573,9 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "baseSize" ) == 0 )
continue;
- if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
+ if ( tqparentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue;
- if ( w->inherits( "QLayoutWidget" ) || w->inherits( "Spacer" ) ) {
+ if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) || w->inherits( "Spacer" ) ) {
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
@@ -2588,9 +2588,9 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "minimumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqminimumSize" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqmaximumSize" ) == 0 )
continue;
if ( qstrcmp( p->name(), "enabled" ) == 0 )
continue;
@@ -2632,17 +2632,17 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "maximumWidth" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case)
+ if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case)
if ( !editor->widget()->isWidgetType() ||
- !editor->widget()->parent() ||
- !editor->widget()->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
+ !editor->widget()->tqparent() ||
+ !editor->widget()->tqparent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
continue;
}
if ( p->designable(w) ) {
if ( p->isSetType() ) {
- if ( TQString( p->name() ) == "alignment" ) {
+ if ( TQString( p->name() ) == "tqalignment" ) {
TQStringList lst;
lst << p->valueToKey( AlignAuto )
<< p->valueToKey( AlignLeft )
@@ -2672,14 +2672,14 @@ void PropertyList::setupProperties()
item->setChanged( true, false );
}
} else {
- qWarning( "Sets except 'alignment' not supported yet.... %s.", p->name() );
+ qWarning( "Sets except 'tqalignment' not supported yet.... %s.", p->name() );
}
} else if ( p->isEnumType() ) {
TQStrList l = p->enumKeys();
TQStringList lst;
for ( uint i = 0; i < l.count(); ++i ) {
TQString k = l.at( i );
- // filter out enum-masks
+ // filter out enum-tqmasks
if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase )
continue;
lst << l.at( i );
@@ -2693,7 +2693,7 @@ void PropertyList::setupProperties()
}
}
if ( item && !p->isSetType() ) {
- if ( valueSet.findIndex( item->name() ) == -1 ) {
+ if ( valueSet.tqfindIndex( item->name() ) == -1 ) {
setPropertyValue( item );
valueSet << item->name();
}
@@ -2702,19 +2702,19 @@ void PropertyList::setupProperties()
}
}
- if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
- w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
- item = new PropertyIntItem( this, item, 0, "layoutSpacing", true );
+ if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) &&
+ w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
+ item = new PropertyIntItem( this, item, 0, "tqlayoutSpacing", true );
setPropertyValue( item );
item->setChanged( true );
- item = new PropertyIntItem( this, item, 0, "layoutMargin", true );
+ item = new PropertyIntItem( this, item, 0, "tqlayoutMargin", true );
setPropertyValue( item );
item->setChanged( true );
}
- if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) &&
- !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) {
+ if ( !w->inherits( "Spacer" ) && !w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) &&
+ !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
@@ -2725,9 +2725,9 @@ void PropertyList::setupProperties()
item->setChanged( true, false );
}
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( !editor->widget()->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !editor->widget()->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) &&
- !editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) && parent_is_data_aware( editor->widget() ) ) {
+ !editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) && tqparent_is_data_aware( editor->widget() ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -2750,7 +2750,7 @@ void PropertyList::setupProperties()
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget();
if ( cw ) {
for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( unique.contains( TQString( (*it).property ) ) )
+ if ( unique.tqcontains( TQString( (*it).property ) ) )
continue;
unique.insert( TQString( (*it).property ), true );
addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) );
@@ -2768,7 +2768,7 @@ void PropertyList::setupProperties()
sort();
setSorting( -1 );
setCurrentItem( firstChild() );
- qApp->processEvents();
+ tqApp->processEvents();
}
updateEditorSize();
@@ -2785,7 +2785,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
- editor->widget() == editor->formWindow()->mainContainer(),
+ TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()),
false, true );
break;
case TQVariant::Bool:
@@ -2882,7 +2882,7 @@ void PropertyList::valueChanged( PropertyItem *i )
{
if ( !editor->widget() )
return;
- TQString pn( i18n("Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n("Set '%1' of '%2'" ).tqarg( i->name() ).tqarg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), WidgetFactory::property( editor->widget(), i->name() ),
@@ -2921,10 +2921,10 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
return true;
PropertyItem *i = (PropertyItem*)currentItem();
- if ( o != this &&e->type() == TQEvent::KeyPress ) {
+ if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) &&
- ( o != this || o != viewport() ) &&
+ ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) &&
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
return true;
@@ -2946,7 +2946,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
}
} else if ( e->type() == TQEvent::FocusOut && o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
- } else if ( o == viewport() ) {
+ } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) {
TQMouseEvent *me;
PropertyListItem* i;
switch ( e->type() ) {
@@ -2961,7 +2961,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
break;
case TQEvent::MouseMove:
me = (TQMouseEvent*)e;
- if ( me && me->state() & LeftButton && mousePressed) {
+ if ( me && me->state() & Qt::LeftButton && mousePressed) {
i = (PropertyListItem*) itemAt( me->pos() );
if( i && i == pressItem ) {
@@ -2996,7 +2996,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
default:
break;
}
- } else if ( o == header() ) {
+ } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) {
if ( e->type() == TQEvent::ContextMenu ) {
((TQContextMenuEvent *)e)->accept();
TQPopupMenu menu( 0 );
@@ -3048,9 +3048,9 @@ static void clearAlignList( TQStrList &l )
{
if ( l.count() == 1 )
return;
- if ( l.find( "AlignAuto" ) != -1 )
+ if ( l.tqfind( "AlignAuto" ) != -1 )
l.remove( "AlignAuto" );
- if ( l.find( "WordBreak" ) != -1 )
+ if ( l.tqfind( "WordBreak" ) != -1 )
l.remove( "WordBreak" );
}
@@ -3061,33 +3061,33 @@ static void clearAlignList( TQStrList &l )
void PropertyList::setPropertyValue( PropertyItem *i )
{
const TQMetaProperty *p =
- editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( i->name(), true), true );
+ editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( i->name(), true), true );
if ( !p ) {
if ( i->name() == "hAlign" ) {
- int align = editor->widget()->property( "alignment" ).toInt();
- p = editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
+ int align = editor->widget()->property( "tqalignment" ).toInt();
+ p = editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true );
align &= ~AlignVertical_Mask;
TQStrList l = p->valueToKeys( align );
clearAlignList( l );
( (PropertyListItem*)i )->setCurrentItem( l.last() );
} else if ( i->name() == "vAlign" ) {
- int align = editor->widget()->property( "alignment" ).toInt();
- p = editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
+ int align = editor->widget()->property( "tqalignment" ).toInt();
+ p = editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true );
align &= ~AlignHorizontal_Mask;
( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() );
} else if ( i->name() == "wordwrap" ) {
- int align = editor->widget()->property( "alignment" ).toInt();
+ int align = editor->widget()->property( "tqalignment" ).toInt();
if ( align & WordBreak )
i->setValue( TQVariant( true, 0 ) );
else
i->setValue( TQVariant( false, 0 ) );
- } else if ( i->name() == "layoutSpacing" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
- } else if ( i->name() == "layoutMargin" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
+ } else if ( i->name() == "tqlayoutSpacing" ) {
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) );
+ } else if ( i->name() == "tqlayoutMargin" ) {
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) );
} else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) {
i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@@ -3134,7 +3134,7 @@ void PropertyList::resetProperty()
PropertyItem *i = (PropertyItem*)currentItem();
if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) )
return;
- TQString pn( i18n("Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n("Reset '%1' of '%2'" ).tqarg( i->name() ).tqarg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), i->value(),
@@ -3224,24 +3224,24 @@ void PropertyList::showCurrentWhatsThis()
TQString PropertyList::whatsThisText( TQListViewItem *i )
{
if ( !i || !editor->widget() )
- return TQString::null;
+ return TQString();
readPropertyDocs();
if ( ( (PropertyItem*)i )->propertyParent() )
i = ( (PropertyItem*)i )->propertyParent();
- const TQMetaObject *mo = editor->widget()->metaObject();
+ const TQMetaObject *mo = editor->widget()->tqmetaObject();
TQString prop = ( (PropertyItem*)i )->name();
while ( mo ) {
TQString s;
s = TQString( mo->className() ) + "::" + prop;
TQMap::Iterator it;
- if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) {
+ if ( ( it = propertyDocs.tqfind( s ) ) != propertyDocs.end() ) {
return *it;
}
- mo = mo->superClass();
+ mo = mo->tqsuperClass();
}
- return i18n("TQWidget::%1
There is no documentation available for this property.
" ).arg( prop );
+ return i18n("TQWidget::%1
There is no documentation available for this property.
" ).tqarg( prop );
}
void PropertyList::readPropertyDocs()
@@ -3278,8 +3278,8 @@ void PropertyList::readPropertyDocs()
// ------------------------------------------------------------
#ifndef KOMMANDER
-EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e )
- : HierarchyList( parent, fw, true ), editor( e )
+EventList::EventList( TQWidget *tqparent, FormWindow *fw, PropertyEditor *e )
+ : HierarchyList( tqparent, fw, true ), editor( e )
{
header()->hide();
removeColumn( 1 );
@@ -3307,7 +3307,7 @@ void EventList::setup()
return;
for ( TQValueList::Iterator it = events.begin(); it != events.end(); ++it ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (*it).name,
- TQString::null, TQString::null );
+ TQString(), TQString() );
eventItem->setOpen( true );
TQStringList funcs = MetaDataBase::eventFunctions( editor->widget(),
(*it).name,
@@ -3318,7 +3318,7 @@ void EventList::setup()
#endif
for ( TQStringList::Iterator fit = funcs.begin(); fit != funcs.end(); ++fit ) {
HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
- *fit, TQString::null, TQString::null );
+ *fit, TQString(), TQString() );
item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
}
#if 0 // ### for conversation from old to new
@@ -3327,12 +3327,12 @@ void EventList::setup()
#endif
}
} else {
- TQStrList sigs = editor->widget()->metaObject()->signalNames( true );
+ TQStrList sigs = editor->widget()->tqmetaObject()->signalNames( true );
sigs.remove( "destroyed()" );
TQStrListIterator it( sigs );
while ( it.current() ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this,
- it.current(), TQString::null, TQString::null );
+ it.current(), TQString(), TQString() );
eventItem->setOpen( true );
TQValueList conns =
MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
@@ -3341,7 +3341,7 @@ void EventList::setup()
MetaDataBase::normalizeSlot( TQString( it.current() ) ) )
continue;
HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
- (*cit).slot, TQString::null, TQString::null );
+ (*cit).slot, TQString(), TQString() );
item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
}
++it;
@@ -3354,7 +3354,7 @@ extern TQListViewItem *newItem;
void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
- if ( !i || i->parent() )
+ if ( !i || i->tqparent() )
return;
TQString s;
#ifndef KOMMANDER
@@ -3363,7 +3363,7 @@ void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e )
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
TQString s1 = i->text( 0 );
- int pt = s1.find( "(" );
+ int pt = s1.tqfind( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
s = TQString( editor->widget()->name() ) + "_" + s1;
@@ -3380,7 +3380,7 @@ void EventList::setCurrent( TQWidget * )
void EventList::objectClicked( TQListViewItem *i )
{
- if ( !i || !i->parent() )
+ if ( !i || !i->tqparent() )
return;
formWindow->mainWindow()->editFunction( i->text( 0 ) );
}
@@ -3402,29 +3402,29 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 );
- int pt = s1.find( "(" );
+ TQString s1 = ( i->tqparent() ? i->tqparent() : i )->text( 0 );
+ int pt = s1.tqfind( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
s = TQString( editor->widget()->name() ) + "_" + s1;
} else {
- s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 );
+ s = TQString( editor->widget()->name() ) + "_" + ( i->tqparent() ? i->tqparent() : i )->text( 0 );
}
- insertEntry( i->parent() ? i->parent() : i, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
- } else if ( res == DEL_ITEM && i->parent() ) {
+ insertEntry( i->tqparent() ? i->tqparent() : i, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
+ } else if ( res == DEL_ITEM && i->tqparent() ) {
#ifndef KOMMANDER
if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- TQListViewItem *p = i->parent();
+ TQListViewItem *p = i->tqparent();
delete i;
save( p );
} else {
MetaDataBase::Connection conn;
conn.sender = editor->widget();
conn.receiver = formWindow->mainContainer();
- conn.signal = i->parent()->text( 0 );
+ conn.signal = i->tqparent()->text( 0 );
conn.slot = i->text( 0 );
delete i;
RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n("Remove Connection" ),
@@ -3443,9 +3443,9 @@ void EventList::renamed( TQListViewItem *i )
{
if ( newItem == i )
newItem = 0;
- if ( !i->parent() )
+ if ( !i->tqparent() )
return;
- TQListViewItem *itm = i->parent()->firstChild();
+ TQListViewItem *itm = i->tqparent()->firstChild();
bool del = false;
while ( itm ) {
if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) {
@@ -3464,7 +3464,7 @@ void EventList::renamed( TQListViewItem *i )
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- save( i->parent() );
+ save( i->tqparent() );
editor->formWindow()->mainWindow()->
#ifndef KOMMANDER
editFunction( i->text( 0 ), editor->formWindow()->project()->language(), true );
@@ -3475,7 +3475,7 @@ void EventList::renamed( TQListViewItem *i )
MetaDataBase::Connection conn;
conn.sender = editor->widget();
conn.receiver = formWindow->mainContainer();
- conn.signal = i->parent()->text( 0 );
+ conn.signal = i->tqparent()->text( 0 );
conn.slot = i->text( 0 );
AddConnectionCommand *cmd = new AddConnectionCommand( i18n("Add Connection" ),
formWindow,
@@ -3491,7 +3491,7 @@ void EventList::renamed( TQListViewItem *i )
"C++", "void" );
#endif
editor->formWindow()->mainWindow()->
- editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ),
+ editFunction( i->text( 0 ).left( i->text( 0 ).tqfind( "(" ) ),
#ifndef KOMMANDER
editor->formWindow()->project()->language(), true );
#else
@@ -3535,8 +3535,8 @@ void EventList::save( TQListViewItem *p )
listview for editing properties.
*/
-PropertyEditor::PropertyEditor( TQWidget *parent )
- : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+PropertyEditor::PropertyEditor( TQWidget *tqparent )
+ : TQTabWidget( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
{
setCaption( i18n("Property Editor" ) );
@@ -3563,11 +3563,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
#endif
if ( w && w == wid ) {
bool ret = true;
- if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
+ if ( wid->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
TQListViewItemIterator it( listview );
ret = false;
while ( it.current() ) {
- if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
+ if ( it.current()->text( 0 ) == "tqlayoutSpacing" || it.current()->text( 0 ) == "tqlayoutMargin" ) {
ret = true;
break;
}
@@ -3588,7 +3588,7 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
wid = w;
formwindow = fw;
- setCaption( i18n("Property Editor (%1)" ).arg( formwindow->name() ) );
+ setCaption( i18n("Property Editor (%1)" ).tqarg( formwindow->name() ) );
listview->viewport()->setUpdatesEnabled( false );
listview->setUpdatesEnabled( false );
clear();
@@ -3662,7 +3662,7 @@ FormWindow *PropertyEditor::formWindow() const
TQString PropertyEditor::currentProperty() const
{
if ( !wid )
- return TQString::null;
+ return TQString();
if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() )
return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name();
return ( (PropertyItem*)listview->currentItem() )->name();
@@ -3671,24 +3671,24 @@ TQString PropertyEditor::currentProperty() const
TQString PropertyEditor::classOfCurrentProperty() const
{
if ( !wid )
- return TQString::null;
+ return TQString();
TQObject *o = wid;
TQString curr = currentProperty();
- TQMetaObject *mo = o->metaObject();
+ TQMetaObject *mo = o->tqmetaObject();
while ( mo ) {
TQStrList props = mo->propertyNames( false );
- if ( props.find( curr.latin1() ) != -1 )
+ if ( props.tqfind( curr.latin1() ) != -1 )
return mo->className();
- mo = mo->superClass();
+ mo = mo->tqsuperClass();
}
- return TQString::null;
+ return TQString();
}
-TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
+TQMetaObject* PropertyEditor::tqmetaObjectOfCurrentProperty() const
{
if ( !wid )
return 0;
- return wid->metaObject();
+ return wid->tqmetaObject();
}
void PropertyEditor::resetFocus()
diff --git a/kommander/editor/propertyeditor.h b/kommander/editor/propertyeditor.h
index 42e64e3e..262f0376 100644
--- a/kommander/editor/propertyeditor.h
+++ b/kommander/editor/propertyeditor.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -44,11 +44,11 @@ class FormWindow;
class TQCloseEvent;
class TQResizeEvent;
class PropertyWhatsThis;
-class QDateEdit;
-class QTimeEdit;
-class QDateTimeEdit;
+class TQDateEdit;
+class TQTimeEdit;
+class TQDateTimeEdit;
-class PropertyItem : public QListViewItem
+class PropertyItem : public TQListViewItem
{
public:
PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -118,7 +118,7 @@ private:
bool open, changed;
PropertyItem *property;
TQString propertyName;
- TQPtrList children;
+ TQPtrList tqchildren;
TQColor backColor;
TQPushButton *resetButton;
@@ -128,6 +128,7 @@ class PropertyTextItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -164,6 +165,7 @@ class PropertyBoolItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -188,6 +190,7 @@ class PropertyIntItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -213,6 +216,7 @@ class PropertyDoubleItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -236,6 +240,7 @@ class PropertyListItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -271,6 +276,7 @@ class PropertyFontItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -300,6 +306,7 @@ class PropertyCoordItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { Rect, Size, Point };
@@ -329,10 +336,11 @@ class PropertyColorItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const TQString &propName, bool children );
+ const TQString &propName, bool tqchildren );
~PropertyColorItem();
virtual void createChildren();
@@ -363,6 +371,7 @@ class PropertyPixmapItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -393,6 +402,7 @@ class PropertySizePolicyItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -419,6 +429,7 @@ class PropertyPaletteItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -447,6 +458,7 @@ class PropertyCursorItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -472,6 +484,7 @@ class PropertyDatabaseItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName, bool wField );
@@ -495,9 +508,10 @@ private:
};
-class PropertyList : public QListView
+class PropertyList : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyList( PropertyEditor *e );
@@ -550,12 +564,13 @@ private:
};
-class PropertyEditor : public QTabWidget
+class PropertyEditor : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PropertyEditor( TQWidget *parent );
+ PropertyEditor( TQWidget *tqparent );
TQObject *widget() const;
@@ -575,7 +590,7 @@ public:
TQString currentProperty() const;
TQString classOfCurrentProperty() const;
- TQMetaObject* metaObjectOfCurrentProperty() const;
+ TQMetaObject* tqmetaObjectOfCurrentProperty() const;
void resetFocus();
@@ -602,6 +617,7 @@ class PropertyDateItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -616,8 +632,8 @@ private slots:
void setValue();
private:
- QDateEdit *lined();
- TQGuardedPtr lin;
+ TQDateEdit *lined();
+ TQGuardedPtr lin;
};
@@ -625,6 +641,7 @@ class PropertyTimeItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -639,8 +656,8 @@ private slots:
void setValue();
private:
- QTimeEdit *lined();
- TQGuardedPtr lin;
+ TQTimeEdit *lined();
+ TQGuardedPtr lin;
};
@@ -648,6 +665,7 @@ class PropertyDateTimeItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -662,8 +680,8 @@ private slots:
void setValue();
private:
- QDateTimeEdit *lined();
- TQGuardedPtr lin;
+ TQDateTimeEdit *lined();
+ TQGuardedPtr lin;
};
diff --git a/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp
index 4ba5e366..61d0407e 100644
--- a/kommander/editor/qcompletionedit.cpp
+++ b/kommander/editor/qcompletionedit.cpp
@@ -4,8 +4,8 @@
#include
#include
-QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
- : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false )
+QCompletionEdit::QCompletionEdit( TQWidget *tqparent, const char *name )
+ : TQLineEdit( tqparent, name ), aAdd( false ), caseSensitive( false )
{
popup = new TQVBox( 0, 0, WType_Popup );
popup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
@@ -62,8 +62,8 @@ void QCompletionEdit::placeListBox()
return;
}
- popup->resize( QMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
- listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
+ popup->resize( TQMAX( listbox->tqsizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
+ listbox->tqsizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) );
if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() )
@@ -90,7 +90,7 @@ void QCompletionEdit::updateListBox()
bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == popup || o == listbox || o == listbox->viewport() ) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) {
@@ -133,7 +133,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
emit chosen( text() );
return true;
}
- } else if ( o == this ) {
+ } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Up ||
@@ -154,7 +154,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
void QCompletionEdit::addCompletionEntry( const TQString &entry )
{
- if ( compList.find( entry ) == compList.end() ) {
+ if ( compList.tqfind( entry ) == compList.end() ) {
compList << entry;
compList.sort();
}
@@ -162,7 +162,7 @@ void QCompletionEdit::addCompletionEntry( const TQString &entry )
void QCompletionEdit::removeCompletionEntry( const TQString &entry )
{
- TQStringList::Iterator it = compList.find( entry );
+ TQStringList::Iterator it = compList.tqfind( entry );
if ( it != compList.end() )
compList.remove( it );
}
diff --git a/kommander/editor/qcompletionedit.h b/kommander/editor/qcompletionedit.h
index 169dacb5..4dee6ba5 100644
--- a/kommander/editor/qcompletionedit.h
+++ b/kommander/editor/qcompletionedit.h
@@ -1,5 +1,5 @@
-#ifndef QCOMPLETIONEDIT_H
-#define QCOMPLETIONEDIT_H
+#ifndef TQCOMPLETIONEDIT_H
+#define TQCOMPLETIONEDIT_H
#include
#include
@@ -7,14 +7,15 @@
class TQListBox;
class TQVBox;
-class QCompletionEdit : public QLineEdit
+class QCompletionEdit : public TQLineEdit
{
Q_OBJECT
- Q_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd )
- Q_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
+ TQ_OBJECT
+ TQ_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd )
+ TQ_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
public:
- QCompletionEdit( TQWidget *parent = 0, const char *name = 0 );
+ QCompletionEdit( TQWidget *tqparent = 0, const char *name = 0 );
bool autoAdd() const;
TQStringList completionList() const;
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp
index d1c93cea..02cd1eec 100644
--- a/kommander/editor/resource.cpp
+++ b/kommander/editor/resource.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -27,11 +27,11 @@
#include "tqdom.h"
#include "widgetdatabase.h"
#include "widgetfactory.h"
-#include "layout.h"
+#include "tqlayout.h"
#include "domtool.h"
#include "command.h"
#include "pixmapchooser.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "database.h"
#endif
#include "actiondnd.h"
@@ -68,7 +68,7 @@
#include
#include
#include
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include
#endif
@@ -84,12 +84,12 @@ static TQString makeIndent( int indent )
static TQString entitize( const TQString &s, bool attribute = false )
{
TQString s2 = s;
- s2 = s2.replace( TQRegExp( "&" ), "&" );
- s2 = s2.replace( TQRegExp( ">" ), ">" );
- s2 = s2.replace( TQRegExp( "<" ), "<" );
+ s2 = s2.tqreplace( TQRegExp( "&" ), "&" );
+ s2 = s2.tqreplace( TQRegExp( ">" ), ">" );
+ s2 = s2.tqreplace( TQRegExp( "<" ), "<" );
if ( attribute ) {
- s2 = s2.replace( TQRegExp( "\"" ), """ );
- s2 = s2.replace( TQRegExp( "'" ), "'" );
+ s2 = s2.tqreplace( TQRegExp( "\"" ), """ );
+ s2 = s2.tqreplace( TQRegExp( "'" ), "'" );
}
return s2;
}
@@ -166,7 +166,7 @@ bool Resource::load( FormFile *ff )
TQFile f( ff->absFileName() );
f.open( IO_ReadOnly );
- bool b = load( ff, &f );
+ bool b = load( ff, TQT_TQIODEVICE(&f) );
f.close();
return b;
@@ -181,7 +181,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
TQString content = stream.read();
if (content.startsWith("#!"))
{
- content = content.mid(content.find('\n'));
+ content = content.mid(content.tqfind('\n'));
}
if ( !doc.setContent( content) ) {
// qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
@@ -195,7 +195,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
formwindow->setProject( MainWindow::self->currProject() );
#endif
formwindow->setMainWindow( mainwindow );
- MetaDataBase::addEntry( formwindow );
+ MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) );
#ifndef KOMMANDER
if (!langIface) {
@@ -290,9 +290,9 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
metaInfo.license = e.firstChild().toText().data();
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
- } else if ( e.tagName() == "layoutdefaults" ) {
- formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
- formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
+ } else if ( e.tagName() == "tqlayoutdefaults" ) {
+ formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->tqlayoutDefaultSpacing() ) ).toInt() );
+ formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->tqlayoutDefaultMargin() ) ).toInt() );
}
e = e.nextSibling().toElement();
@@ -303,13 +303,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
if ( !customWidgets.isNull() )
loadCustomWidgets( customWidgets, this );
-#if defined (QT_NON_COMMERCIAL)
+#if defined (TQT_NON_COMMERCIAL)
bool previewMode = MainWindow::self->isPreviewing();
TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self);
if ( !w )
return false;
if ( previewMode )
- w->reparent( MainWindow::self, Qt::WType_TopLevel, w->pos(), true );
+ w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), true );
#else
if ( !createObject( widget, formwindow) )
return false;
@@ -364,11 +364,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.slot = n.firstChild().toText().data();
- if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) )
- MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier,
+ if ( !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), slot.slot, true ) )
+ MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), slot.slot, slot.specifier,
slot.access, slot.language, slot.returnType );
else
- MetaDataBase::changeSlotAttributes( formwindow, slot.slot,
+ MetaDataBase::changeSlotAttributes( TQT_TQOBJECT(formwindow), slot.slot,
slot.specifier, slot.access,
slot.language, slot.returnType );
}
@@ -386,11 +386,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
loadTabOrder( tabOrder );
if ( formwindow ) {
- MetaDataBase::setIncludes( formwindow, metaIncludes );
- MetaDataBase::setForwards( formwindow, metaForwards );
- MetaDataBase::setSignalList( formwindow, metaSignals );
- MetaDataBase::setMetaInfo( formwindow, metaInfo );
- MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
+ MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes );
+ MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards );
+ MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals );
+ MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo );
+ MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro );
}
@@ -400,14 +400,14 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
}
if ( formwindow ) {
- formwindow->killAccels( formwindow );
- if ( formwindow->layout() )
- formwindow->layout()->activate();
+ formwindow->killAccels( TQT_TQOBJECT(formwindow) );
+ if ( formwindow->tqlayout() )
+ formwindow->tqlayout()->activate();
if ( hadGeometry )
- formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize().
- expandedTo( formwindow->minimumSizeHint() ) ) );
+ formwindow->resize( formwindow->size().expandedTo( formwindow->tqminimumSize().
+ expandedTo( formwindow->tqminimumSizeHint() ) ) );
else
- formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) );
+ formwindow->resize( formwindow->size().expandedTo( formwindow->tqsizeHint() ) );
}
return true;
@@ -422,7 +422,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return false;
- bool b = save( &f );
+ bool b = save( TQT_TQIODEVICE(&f) );
f.close();
return b;
}
@@ -439,7 +439,7 @@ bool Resource::save( TQIODevice* dev )
ts << formwindow->mainContainer()->property("shebang").toString() << endl;
ts << "" << endl;
saveMetaInfoBefore( ts, 0 );
- saveObject( formwindow->mainContainer(), 0, ts, 0 );
+ saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 );
if ( formwindow->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
@@ -450,7 +450,7 @@ bool Resource::save( TQIODevice* dev )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
- if ( !MetaDataBase::connections( formwindow ).isEmpty() || !MetaDataBase::slotList( formwindow ).isEmpty() )
+ if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() )
saveConnections( ts, 0 );
saveTabOrder( ts, 0 );
saveMetaInfoAfter( ts, 0 );
@@ -463,7 +463,7 @@ bool Resource::save( TQIODevice* dev )
TQString Resource::copy()
{
if ( !formwindow )
- return TQString::null;
+ return TQString();
copying = true;
TQString s;
@@ -473,17 +473,17 @@ TQString Resource::copy()
TQWidgetList widgets = formwindow->selectedWidgets();
TQWidgetList tmp( widgets );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
bool save = true;
while ( p ) {
- if ( tmp.findRef( p ) != -1 ) {
+ if ( tmp.tqfindRef( p ) != -1 ) {
save = false;
break;
}
- p = p->parentWidget();
+ p = p->tqparentWidget();
}
if ( save )
- saveObject( w, 0, ts, 0 );
+ saveObject( TQT_TQOBJECT(w), 0, ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
@@ -495,7 +495,7 @@ TQString Resource::copy()
}
-void Resource::paste( const TQString &cb, TQWidget *parent )
+void Resource::paste( const TQString &cb, TQWidget *tqparent )
{
if ( !formwindow )
return;
@@ -533,33 +533,33 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
formwindow->clearSelection( false );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
- TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
+ TQWidget *w = (TQWidget*)createObject( firstWidget, tqparent, 0 );
if ( !w )
continue;
widgets.append( w );
int x = w->x() + formwindow->grid().x();
int y = w->y() + formwindow->grid().y();
- if ( w->x() + w->width() > parent->width() )
- x = QMAX( 0, parent->width() - w->width() );
- if ( w->y() + w->height() > parent->height() )
- y = QMAX( 0, parent->height() - w->height() );
+ if ( w->x() + w->width() > tqparent->width() )
+ x = TQMAX( 0, tqparent->width() - w->width() );
+ if ( w->y() + w->height() > tqparent->height() )
+ y = TQMAX( 0, tqparent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( w );
+ formwindow->selectWidget( TQT_TQOBJECT(w) );
} else if ( firstWidget.tagName() == "spacer" ) {
- TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
+ TQWidget *w = createSpacer( firstWidget, tqparent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
if ( !w )
continue;
widgets.append( w );
int x = w->x() + formwindow->grid().x();
int y = w->y() + formwindow->grid().y();
- if ( w->x() + w->width() > parent->width() )
- x = QMAX( 0, parent->width() - w->width() );
- if ( w->y() + w->height() > parent->height() )
- y = QMAX( 0, parent->height() - w->height() );
+ if ( w->x() + w->width() > tqparent->width() )
+ x = TQMAX( 0, tqparent->width() - w->width() );
+ if ( w->y() + w->height() > tqparent->height() )
+ y = TQMAX( 0, tqparent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( w );
+ formwindow->selectWidget( TQT_TQOBJECT(w) );
}
firstWidget = firstWidget.nextSibling().toElement();
}
@@ -571,7 +571,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
formwindow->commandHistory()->addCommand( cmd );
}
-void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent )
+void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent )
{
if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) )
return;
@@ -580,12 +580,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
const char* className = WidgetFactory::classNameOf( obj );
if ( obj->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
- if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
+ if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->tqfind( (TQWidget*)obj ) )
return; // we don't know anything about this thing
TQString attributes;
if ( grid ) {
- QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
+ TQDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
attributes += TQString(" row=\"") + TQString::number(item.row) + "\"";
attributes += TQString(" column=\"") + TQString::number(item.column) + "\"";
if ( item.rowspan * item.colspan != 1 ) {
@@ -601,7 +601,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
} else {
closeTag = makeIndent( indent ) + "\n";
if ( qstrcmp( className, "KmdrMainWindow" ) == 0 ) {
- ts << makeIndent( indent ) << "" << endl;
+ ts << makeIndent( indent ) << "" << endl;
} else {
ts << makeIndent( indent ) << "" << endl;
}
@@ -619,7 +619,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQTabWidget* tw = (TQTabWidget*) obj;
TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
- TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
+ TQTabBar *tb = ( (TQDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
TQTab *t = tb->tabAt( i );
if ( !t )
@@ -627,9 +627,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = ws->widget( t->identifier() );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "" << endl;
+ ts << makeIndent( indent ) << "" << endl;
++indent;
ts << makeIndent( indent ) << "" << endl;
indent++;
@@ -642,21 +642,21 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "" << entitize( t->text() ) << "" << endl;
indent--;
ts << makeIndent( indent ) << "" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "" << endl;
}
delete tmpl;
} else
- if ( ::qt_cast(obj) ) {
+ if ( ::tqqt_cast(obj) ) {
TQToolBox* tb = (TQToolBox*)obj;
for ( int i = 0; i < tb->count(); ++i ) {
TQWidget *w = tb->item( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "" << endl;
+ ts << makeIndent( indent ) << "" << endl;
++indent;
ts << makeIndent( indent ) << "" << endl;
indent++;
@@ -665,7 +665,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "" << endl;
ts << makeIndent( indent ) << "" << endl;
indent++;
- saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
+ saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent );
indent--;
ts << makeIndent( indent ) << "" << endl;
ts << makeIndent( indent ) << "" << endl;
@@ -673,7 +673,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "" << endl;
indent--;
ts << makeIndent( indent ) << "" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "" << endl;
}
@@ -683,9 +683,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = wiz->page( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "" << endl;
+ ts << makeIndent( indent ) << "" << endl;
++indent;
ts << makeIndent( indent ) << "" << endl;
indent++;
@@ -698,12 +698,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "" << entitize( wiz->title( w ) ) << "" << endl;
indent--;
ts << makeIndent( indent ) << "" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "" << endl;
}
} else if ( obj->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
- saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent );
} else {
saveChildrenOf( obj, ts, indent );
}
@@ -778,11 +778,11 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
}
saveItem( lv->firstChild(), ts, indent - 1 );
}
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
else if ( obj->inherits( TQTABLE_OBJECT_NAME_STRING ) ) {
TQTable *table = (TQTable*)obj;
int i;
- TQMap columnFields = MetaDataBase::columnFields( table );
+ TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
bool isDataTable = table->inherits( TQDATATABLE_OBJECT_NAME_STRING );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
if ( !table->horizontalHeader()->label( i ).isNull() &&
@@ -801,7 +801,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
if ( table->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "" << endl;
indent++;
- ts << makeIndent( indent ) << "" << entitize( *columnFields.find( l[ 0 ] ) ) << "" << endl;
+ ts << makeIndent( indent ) << "" << entitize( *columnFields.tqfind( l[ 0 ] ) ) << "" << endl;
indent--;
ts << makeIndent( indent ) << "" << endl;
}
@@ -865,11 +865,11 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons
ts << makeIndent( indent ) << "<" + tagname + ">" << saveInCollection( p ) << "" + tagname + ">" << endl;
#ifndef KOMMANDER
else if ( formwindow && formwindow->savePixmapInProject() )
- ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() )
+ ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() )
<< "" + tagname + ">" << endl;
#endif
else
- ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() )
+ ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() )
<< "" + tagname + ">" << endl;
}
@@ -881,7 +881,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
TQImage img = loadFromCollection( arg );
TQPixmap pix;
pix.convertFromImage( img );
- MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
#ifndef KOMMANDER
@@ -895,11 +895,11 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
{
TQPixmap pix;
pix = PixmapChooser::loadPixmap( "image.xpm" );
- MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
TQPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
- MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
@@ -929,19 +929,19 @@ void Resource::saveItem( const TQStringList &text, const TQPtrList &pi
void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
{
- const TQObjectList *l = obj->children();
- if ( !l )
- return; // no children to save
+ const TQObjectList l = obj->childrenListObject();
+ if ( l.isEmpty() )
+ return; // no tqchildren to save
TQString closeTag;
- // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
- TQLayout *layout = 0;
- QDesignerGridLayout* grid = 0;
+ // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer
+ TQLayout *tqlayout = 0;
+ TQDesignerGridLayout* grid = 0;
if ( !obj->inherits( TQSPLITTER_OBJECT_NAME_STRING ) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
- WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
- WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout );
+ WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) {
+ WidgetFactory::LayoutType lay = WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout );
switch ( lay ) {
case WidgetFactory::HBox:
closeTag = makeIndent( indent ) + "";
@@ -957,19 +957,19 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
closeTag = makeIndent( indent ) + "";
ts << makeIndent( indent ) << "" << endl;
++indent;
- grid = (QDesignerGridLayout*) layout;
+ grid = (TQDesignerGridLayout*) tqlayout;
break;
default:
break;
}
- // save properties of layout
+ // save properties of tqlayout
if ( lay != WidgetFactory::NoLayout )
- saveObjectProperties( layout, ts, indent );
+ saveObjectProperties( TQT_TQOBJECT(tqlayout), ts, indent );
}
- for ( TQPtrListIterator it ( *l ); it.current(); ++it )
+ for ( TQPtrListIterator it ( l ); it.current(); ++it )
saveObject( it.current(), grid, ts, indent );
if ( !closeTag.isEmpty() ) {
indent--;
@@ -984,43 +984,43 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) {
if ( w->inherits( "Spacer" ) ) {
- if ( !changed.contains( "sizeHint" ) )
- changed << "sizeHint";
- if ( !changed.contains( "geometry" ) )
+ if ( !changed.tqcontains( "tqsizeHint" ) )
+ changed << "tqsizeHint";
+ if ( !changed.tqcontains( "geometry" ) )
changed << "geometry";
}
} else if ( w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) { // #### should be cleaner (RS)
changed << "margin" << "spacing";
}
- if ( w == formwindow->mainContainer() ) {
- if ( changed.findIndex( "geometry" ) == -1 )
+ if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
+ if ( changed.tqfindIndex( "geometry" ) == -1 )
changed << "geometry";
- if ( changed.findIndex( "caption" ) == -1 )
+ if ( changed.tqfindIndex( "caption" ) == -1 )
changed << "caption";
}
if ( changed.isEmpty() )
return;
- bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->tqparentWidget() &&
+ WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout;
- TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
+ TQStrList lst = w->tqmetaObject()->propertyNames( !w->inherits( "Spacer" ) );
for ( TQPtrListIterator it( lst ); it.current(); ++it ) {
- if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() )
+ if ( changed.tqfind( TQString::tqfromLatin1( it.current() ) ) == changed.end() )
continue;
- if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() )
+ if ( saved.tqfind( TQString::tqfromLatin1( it.current() ) ) != saved.end() )
continue;
- saved << TQString::fromLatin1( it.current() );
- const TQMetaProperty* p = w->metaObject()->
- property( w->metaObject()->findProperty( it.current(), true ), true );
+ saved << TQString::tqfromLatin1( it.current() );
+ const TQMetaProperty* p = w->tqmetaObject()->
+ property( w->tqmetaObject()->tqfindProperty( it.current(), true ), true );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
if ( w->inherits( TQLABEL_OBJECT_NAME_STRING ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
- if ( w->inherits( "QDesignerMenuBar" ) &&
+ if ( w->inherits( "TQDesignerMenuBar" ) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
qstrcmp( p->name(), "itemText" ) == 0 ) )
continue;
@@ -1066,7 +1066,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, true ), true );
TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
@@ -1079,18 +1079,18 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty
void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, true ), true );
ts << makeIndent( indent ) << "" << p->valueToKey( w->property( name ).toInt() ) << "" << endl;
}
void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent )
{
- if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || name == "layoutMargin" || name =="layoutSpacing" )
+ if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || name == "tqlayoutMargin" || name =="tqlayoutSpacing" )
return;
int num, unum;
double dob;
TQString comment;
- if ( w && formwindow->widgets()->find( (TQWidget*)w ) )
+ if ( w && formwindow->widgets()->tqfind( (TQWidget*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
case TQVariant::String:
@@ -1108,9 +1108,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
num = value.toInt();
if ( w && w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
+ num = MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) )) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
+ num = MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) )) );
}
ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl;
break;
@@ -1126,9 +1126,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
unum = value.toUInt();
if ( w && w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::layoutParent( (TQLayout*)w ) );
+ num = MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) )) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::layoutParent( (TQLayout*)w ) );
+ num = MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) )) );
}
ts << makeIndent( indent ) << "" << TQString::number( unum ) << "" << endl;
break;
@@ -1172,9 +1172,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
case TQVariant::Font: {
TQVariant v( value );
ts << makeIndent( indent ) << "" << endl;
- TQFont f( qApp->font() );
- if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() )
- f = ((TQWidget*)w)->parentWidget()->font();
+ TQFont f( tqApp->font() );
+ if ( w && w->isWidgetType() && ((TQWidget*)w)->tqparentWidget() )
+ f = ((TQWidget*)w)->tqparentWidget()->font();
TQFont f2( v.toFont() );
indent++;
if ( f.family() != f2.family() )
@@ -1240,7 +1240,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
ts << makeIndent( indent ) << "" << endl;
} break;
case TQVariant::Cursor:
- ts << makeIndent( indent ) << "" << value.toCursor().shape() << "" << endl;
+ ts << makeIndent( indent ) << "" << value.toCursor().tqshape() << "" << endl;
break;
case TQVariant::StringList: {
TQStringList lst = value.toStringList();
@@ -1303,7 +1303,7 @@ void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup
saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) );
indent--;
ts << makeIndent( indent ) << "" << endl;
- TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap();
+ TQPixmap* pm = cg.tqbrush( (TQColorGroup::ColorRole)r ).pixmap();
if ( pm && !pm->isNull() )
savePixmap( *pm, ts, indent );
}
@@ -1316,7 +1316,7 @@ void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c )
ts << makeIndent( indent ) << "" << TQString::number( c.blue() ) << "" << endl;
}
-TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout )
+TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout )
{
lastItem = 0;
TQDomElement n = e.firstChild().toElement();
@@ -1335,7 +1335,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING );
if ( !className.isNull() ) {
- obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
+ obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), tqparent, 0, false ));
if ( !obj )
return 0;
if ( !mainContainerSet ) {
@@ -1346,16 +1346,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
w = (TQWidget*)obj;
if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
w = ( (TQMainWindow*)w )->centralWidget();
- if ( layout ) {
- switch ( WidgetFactory::layoutType( layout ) ) {
+ if ( tqlayout ) {
+ switch ( WidgetFactory::tqlayoutType( tqlayout ) ) {
case WidgetFactory::HBox:
- ( (TQHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)tqlayout )->addWidget( w );
break;
case WidgetFactory::VBox:
- ( (TQVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)tqlayout )->addWidget( w );
break;
case WidgetFactory::Grid:
- ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -1365,13 +1365,13 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( !toplevel )
toplevel = w;
- layout = 0;
+ tqlayout = 0;
if ( w && formwindow ) {
- if ( !parent || ( !parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) && !parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
+ if ( !tqparent || ( !tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) && !tqparent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
formwindow->insertWidget( w, pasting );
- else if ( parent && ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) || parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
- MetaDataBase::addEntry( w );
+ else if ( tqparent && ( tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) || tqparent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
+ MetaDataBase::addEntry( TQT_TQOBJECT(w) );
if (w->inherits("Dialog"))
dynamic_cast
-
+
rows_tab
@@ -425,14 +425,14 @@
Expanding
-
+
20
20
-
+
buttonRowUp
@@ -449,12 +449,12 @@
<b>Move the selected item up.</b><p>The top-most column will be the first column of the list.</p>
-
+
listRows
-
+
buttonRowDown
@@ -481,14 +481,14 @@
Expanding
-
+
20
20
-
+
buttonNewRow
@@ -496,7 +496,7 @@
&New Row
-
+
buttonDeleteRow
@@ -504,7 +504,7 @@
&Delete Row
-
+
Layout7_2
@@ -518,7 +518,7 @@
6
-
+
TextLabel2_3
@@ -529,7 +529,7 @@
editRowText
-
+
Label2_2
@@ -540,7 +540,7 @@
itemChoosePixmap
-
+
Layout2_2
@@ -554,7 +554,7 @@
6
-
+
labelRowPixmap
@@ -562,11 +562,11 @@
Label4
-
+
buttonDeleteRowPixmap
-
+
30
22
@@ -585,11 +585,11 @@
<b>Delete the selected item's pixmap.</b><p>The pixmap in the current column of the selected item will be deleted.</p>
-
+
buttonChooseRowPixmap
-
+
30
22
@@ -607,7 +607,7 @@
-
+
editRowText
@@ -645,15 +645,15 @@
listColumns
- currentChanged(QListBoxItem*)
+ currentChanged(TQListBoxItem*)
TableEditorBase
- currentColumnChanged(QListBoxItem*)
+ currentColumnChanged(TQListBoxItem*)
listColumns
- selectionChanged(QListBoxItem*)
+ selectionChanged(TQListBoxItem*)
TableEditorBase
- currentColumnChanged(QListBoxItem*)
+ currentColumnChanged(TQListBoxItem*)
editColumnText
@@ -693,15 +693,15 @@
listRows
- selectionChanged(QListBoxItem*)
+ selectionChanged(TQListBoxItem*)
TableEditorBase
- currentRowChanged(QListBoxItem*)
+ currentRowChanged(TQListBoxItem*)
listRows
- currentChanged(QListBoxItem*)
+ currentChanged(TQListBoxItem*)
TableEditorBase
- currentRowChanged(QListBoxItem*)
+ currentRowChanged(TQListBoxItem*)
buttonNewRow
@@ -769,9 +769,9 @@
chooseRowPixmapClicked()
columnTextChanged( const QString & )
columnUpClicked()
- currentColumnChanged( QListBoxItem * )
+ currentColumnChanged( TQListBoxItem * )
currentFieldChanged( const QString & )
- currentRowChanged( QListBoxItem * )
+ currentRowChanged( TQListBoxItem * )
deleteColPixmapClicked()
deleteColumnClicked()
deleteRowClicked()
diff --git a/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp
index 58cc554d..e5b39340 100644
--- a/kommander/editor/tableeditorimpl.cpp
+++ b/kommander/editor/tableeditorimpl.cpp
@@ -1,5 +1,5 @@
#include "tableeditorimpl.h"
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include
#endif
#include "formwindow.h"
@@ -21,15 +21,15 @@
#include
-TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
- : TableEditorBase( parent, name, modal, fl ),
-#ifndef QT_NO_TABLE
+TableEditor::TableEditor( TQWidget* tqparent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
+ : TableEditorBase( tqparent, name, modal, fl ),
+#ifndef TQT_NO_TABLE
editTable( (TQTable*)editWidget ),
#endif
formWindow( fw )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
labelColumnPixmap->setText( "" );
labelRowPixmap->setText( "" );
@@ -39,7 +39,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
labelTable->hide();
labelTableValue->hide();
}
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
// ## why does this behave weird?
// TabWidget->removePage( rows_tab );
@@ -93,7 +93,7 @@ void TableEditor::columnTextChanged( const TQString &s )
listColumns->blockSignals( true );
listColumns->changeItem( s, listColumns->currentItem() );
listColumns->blockSignals( false );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) )
table->horizontalHeader()->setLabel( listColumns->currentItem(),
*table->horizontalHeader()->iconSet( listColumns->currentItem() ), s );
@@ -130,13 +130,13 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i )
labelColumnPixmap->setText( "" );
editColumnText->blockSignals( false );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
- TQString s = *fieldMap.find( listColumns->index( i ) );
+ TQString s = *fieldMap.tqfind( listColumns->index( i ) );
if ( s.isEmpty() )
comboFields->setCurrentItem( 0 );
- else if ( comboFields->listBox()->findItem( s ) )
- comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->findItem( s ) ) );
+ else if ( comboFields->listBox()->tqfindItem( s ) )
+ comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->tqfindItem( s ) ) );
else
comboFields->lineEdit()->setText( s );
}
@@ -173,7 +173,7 @@ void TableEditor::deleteColumnClicked()
{
if ( listColumns->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumCols( table->numCols() - 1 );
delete listColumns->item( listColumns->currentItem() );
readColumns();
@@ -188,7 +188,7 @@ void TableEditor::deleteRowClicked()
{
if ( listRows->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumRows( table->numRows() - 1 );
delete listRows->item( listRows->currentItem() );
readRows();
@@ -201,14 +201,14 @@ void TableEditor::deleteRowClicked()
void TableEditor::newColumnClicked()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumCols( table->numCols() + 1 );
TQMap m;
for ( int i = 0; i < table->numCols() - 1; ++i )
m.insert( table->horizontalHeader()->label( i ), true );
int n = table->numCols() - 1;
TQString t = TQString::number( n );
- while ( m.find( t ) != m.end() )
+ while ( m.tqfind( t ) != m.end() )
t = TQString::number( ++n );
table->horizontalHeader()->setLabel( table->numCols() - 1, t );
listColumns->insertItem( t );
@@ -226,14 +226,14 @@ void TableEditor::newColumnClicked()
void TableEditor::newRowClicked()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumRows( table->numRows() + 1 );
TQMap m;
for ( int i = 0; i < table->numRows() - 1; ++i )
m.insert( table->verticalHeader()->label( i ), true );
int n = table->numRows() - 1;
TQString t = TQString::number( n );
- while ( m.find( t ) != m.end() )
+ while ( m.tqfind( t ) != m.end() )
t = TQString::number( ++n );
table->verticalHeader()->setLabel( table->numRows() - 1, t );
listRows->insertItem( t );
@@ -267,7 +267,7 @@ void TableEditor::rowTextChanged( const TQString &s )
{
if ( listRows->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
listRows->changeItem( s, listRows->currentItem() );
if ( table->verticalHeader()->iconSet( listRows->currentItem() ) )
table->verticalHeader()->setLabel( listRows->currentItem(),
@@ -296,13 +296,13 @@ void TableEditor::applyClicked()
TQValueList cols;
int i = 0;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
PopulateTableCommand::Column col;
col.text = table->horizontalHeader()->label( i );
if ( table->horizontalHeader()->iconSet( i ) )
col.pix = table->horizontalHeader()->iconSet( i )->pixmap();
- col.field = *fieldMap.find( i );
+ col.field = *fieldMap.tqfind( i );
cols.append( col );
}
for ( i = 0; i < table->verticalHeader()->count(); ++i ) {
@@ -312,7 +312,7 @@ void TableEditor::applyClicked()
row.pix = table->verticalHeader()->iconSet( i )->pixmap();
rows.append( row );
}
- PopulateTableCommand *cmd = new PopulateTableCommand( i18n("Edit Rows and Columns of '%1' " ).arg( editTable->name() ),
+ PopulateTableCommand *cmd = new PopulateTableCommand( i18n("Edit Rows and Columns of '%1' " ).tqarg( editTable->name() ),
formWindow, editTable, rows, cols );
cmd->execute();
formWindow->commandHistory()->addCommand( cmd );
@@ -332,7 +332,7 @@ void TableEditor::chooseRowPixmapClicked()
if ( pix.isNull() )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->verticalHeader()->setLabel( listRows->currentItem(), pix, table->verticalHeader()->label( listRows->currentItem() ) );
listRows->changeItem( pix, listRows->currentText(), listRows->currentItem() );
#endif
@@ -342,7 +342,7 @@ void TableEditor::deleteRowPixmapClicked()
{
if ( listRows->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->verticalHeader()->setLabel( listRows->currentItem(), TQPixmap(), table->verticalHeader()->label( listRows->currentItem() ) );
listRows->changeItem( listRows->currentText(), listRows->currentItem() );
#endif
@@ -360,7 +360,7 @@ void TableEditor::chooseColPixmapClicked()
if ( pix.isNull() )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->horizontalHeader()->setLabel( listColumns->currentItem(), pix, table->horizontalHeader()->label( listColumns->currentItem() ) );
listColumns->changeItem( pix, listColumns->currentText(), listColumns->currentItem() );
#endif
@@ -370,7 +370,7 @@ void TableEditor::deleteColPixmapClicked()
{
if ( listColumns->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->horizontalHeader()->setLabel( listColumns->currentItem(), TQPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) );
listColumns->changeItem( listColumns->currentText(), listColumns->currentItem() );
#endif
@@ -378,10 +378,10 @@ void TableEditor::deleteColPixmapClicked()
void TableEditor::readFromTable()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
TQHeader *cols = editTable->horizontalHeader();
table->setNumCols( cols->count() );
- TQMap columnFields = MetaDataBase::columnFields( editTable );
+ TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) );
for ( int i = 0; i < cols->count(); ++i ) {
if ( editTable->horizontalHeader()->iconSet( i ) ) {
table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ),
@@ -392,7 +392,7 @@ void TableEditor::readFromTable()
table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) );
listColumns->insertItem( editTable->horizontalHeader()->label( i ) );
}
- TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) );
+ TQString cf = *columnFields.tqfind( editTable->horizontalHeader()->label( i ) );
fieldMap.insert( i, cf );
}
@@ -425,7 +425,7 @@ void TableEditor::readFromTable()
void TableEditor::readColumns()
{
int j = 0;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
for ( TQListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) {
if ( i->pixmap() )
table->horizontalHeader()->setLabel( j, *i->pixmap(), i->text() );
@@ -438,7 +438,7 @@ void TableEditor::readColumns()
void TableEditor::readRows()
{
int j = 0;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
for ( TQListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) {
if ( i->pixmap() )
table->verticalHeader()->setLabel( j, *i->pixmap(), i->text() );
diff --git a/kommander/editor/tableeditorimpl.h b/kommander/editor/tableeditorimpl.h
index 5fb1ccc4..c0b8ce85 100644
--- a/kommander/editor/tableeditorimpl.h
+++ b/kommander/editor/tableeditorimpl.h
@@ -11,9 +11,10 @@ class FormWindow;
class TableEditor : public TableEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
+ TableEditor( TQWidget* tqparent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~TableEditor();
diff --git a/kommander/editor/templates/Configuration_Dialog.ui b/kommander/editor/templates/Configuration_Dialog.ui
index 199f5b90..4724398b 100644
--- a/kommander/editor/templates/Configuration_Dialog.ui
+++ b/kommander/editor/templates/Configuration_Dialog.ui
@@ -1,6 +1,6 @@
MyDialog2
-
+
MyDialog2
@@ -25,7 +25,7 @@
6
-
+
-
New Item
@@ -43,11 +43,11 @@
-
+
tabWidget
-
+
Widget2
@@ -55,7 +55,7 @@
Tab
-
+
Widget3
@@ -64,7 +64,7 @@
-
+
Layout1
@@ -78,7 +78,7 @@
6
-
+
buttonHelp
@@ -102,14 +102,14 @@
Expanding
-
+
20
20
-
+
buttonOk
@@ -123,7 +123,7 @@
true
-
+
buttonCancel
@@ -152,5 +152,5 @@
reject()
-
+
diff --git a/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui b/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
index 77d77cb3..6d9edca0 100644
--- a/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
+++ b/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
@@ -1,6 +1,6 @@
MyDialog
-
+
MyDialog
@@ -15,7 +15,7 @@
true
-
+
Layout1
@@ -37,7 +37,7 @@
6
-
+
buttonHelp
@@ -61,14 +61,14 @@
Expanding
-
+
20
20
-
+
buttonOk
@@ -82,7 +82,7 @@
true
-
+
buttonCancel
@@ -110,5 +110,5 @@
reject()
-
+
diff --git a/kommander/editor/templates/Dialog_with_Buttons_(Right).ui b/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
index fd2c01f0..93650a87 100644
--- a/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
+++ b/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
@@ -1,6 +1,6 @@
MyDialog
-
+
MyDialog
@@ -15,7 +15,7 @@
true
-
+
Layout5
@@ -37,7 +37,7 @@
6
-
+
buttonOk
@@ -51,7 +51,7 @@
true
-
+
buttonCancel
@@ -62,7 +62,7 @@
true
-
+
buttonHelp
@@ -86,7 +86,7 @@
Expanding
-
+
20
20
@@ -110,5 +110,5 @@
reject()
-
+
diff --git a/kommander/editor/templates/Tab_Dialog.ui b/kommander/editor/templates/Tab_Dialog.ui
index a2ad9315..4e0a7124 100644
--- a/kommander/editor/templates/Tab_Dialog.ui
+++ b/kommander/editor/templates/Tab_Dialog.ui
@@ -1,6 +1,6 @@
MyDialog1
-
+
MyDialog1
@@ -25,11 +25,11 @@
6
-
+
tabWidget
-
+
Widget8
@@ -37,7 +37,7 @@
Tab
-
+
Widget9
@@ -46,7 +46,7 @@
-
+
Layout1
@@ -60,7 +60,7 @@
6
-
+
buttonHelp
@@ -84,14 +84,14 @@
Expanding
-
+
20
20
-
+
buttonOk
@@ -105,7 +105,7 @@
true
-
+
buttonCancel
@@ -134,5 +134,5 @@
reject()
-
+
diff --git a/kommander/editor/timestamp.cpp b/kommander/editor/timestamp.cpp
index e92fc78f..62cac72d 100644
--- a/kommander/editor/timestamp.cpp
+++ b/kommander/editor/timestamp.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -24,8 +24,8 @@
class TQTimer;
-TimeStamp::TimeStamp( TQObject *parent, const TQString &f )
- : TQObject( parent ), filename( f ), autoCheck( false )
+TimeStamp::TimeStamp( TQObject *tqparent, const TQString &f )
+ : TQObject( tqparent ), filename( f ), autoCheck( false )
{
timer = new TQTimer( this );
connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) );
diff --git a/kommander/editor/timestamp.h b/kommander/editor/timestamp.h
index d3e061f9..1df9f916 100644
--- a/kommander/editor/timestamp.h
+++ b/kommander/editor/timestamp.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -25,12 +25,13 @@
#include
#include
-class TimeStamp : public QObject
+class TimeStamp : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- TimeStamp( TQObject *parent, const TQString &f );
+ TimeStamp( TQObject *tqparent, const TQString &f );
void setFileName( const TQString &f );
TQString fileName() const;
diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp
index 3661f700..73349c3b 100644
--- a/kommander/editor/widgetdatabase.cpp
+++ b/kommander/editor/widgetdatabase.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -53,13 +53,13 @@ static TQStrList *wGroups;
static TQStrList *invisibleGroups;
static bool whatsThisLoaded = false;
#ifndef KOMMANDER
-static QPluginManager *widgetPluginManager = 0;
+static TQPluginManager *widgetPluginManager = 0;
#endif
static bool plugins_set_up = false;
static bool was_in_setup = false;
#ifndef KOMMANDER
-TQCleanupHandler > cleanup_manager;
+TQCleanupHandler > cleanup_manager;
#endif
WidgetDatabaseRecord::WidgetDatabaseRecord()
@@ -89,7 +89,7 @@ WidgetDatabaseRecord::~WidgetDatabaseRecord()
one application doesn't make sense anyway and so you don't need more
than an instance of the widgetdatabase.
- For creating widgets, layouts, etc. see WidgetFactory.
+ For creating widgets, tqlayouts, etc. see WidgetFactory.
*/
/*!
@@ -134,35 +134,35 @@ void WidgetDatabase::setupDataBase( int id )
/* Designer widgets */
r = new WidgetDatabaseRecord;
r->iconName = "pushbutton.xpm";
- r->name = "TQPushButton";
+ r->name = TQPUSHBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Push Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "toolbutton.xpm";
- r->name = "TQToolButton";
+ r->name = TQTOOLBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Tool Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "radiobutton.xpm";
- r->name = "TQRadioButton";
+ r->name = TQRADIOBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Radio Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "checkbox.xpm";
- r->name = "TQCheckBox";
+ r->name = TQCHECKBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Check Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "groupbox.xpm";
- r->name = "TQGroupBox";
+ r->name = TQGROUPBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Group Box");
r->isContainer = true;
@@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "buttongroup.xpm";
- r->name = "TQButtonGroup";
+ r->name = TQBUTTONGROUP_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Button Group");
r->isContainer = true;
@@ -178,7 +178,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "frame.xpm";
- r->name = "TQFrame";
+ r->name = TQFRAME_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Frame");
r->isContainer = true;
@@ -186,7 +186,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "TQTabWidget";
+ r->name = TQTABWIDGET_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Tabwidget");
r->isContainer = true;
@@ -194,41 +194,41 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "listbox.xpm";
- r->name = "TQListBox";
+ r->name = TQLISTBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("List Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "listview.xpm";
- r->name = "TQListView";
+ r->name = TQLISTVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("List View");
append(r);
-#if !defined(QT_NO_ICONVIEW) || defined(UIC)
+#if !defined(TQT_NO_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconName = "iconview.xpm";
- r->name = "TQIconView";
+ r->name = TQICONVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("Icon View");
append(r);
#endif
-#if !defined(QT_NO_TABLE)
+#if !defined(TQT_NO_TABLE)
r = new WidgetDatabaseRecord;
r->iconName = "table.xpm";
- r->name = "TQTable";
+ r->name = TQTABLE_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("Table");
append(r);
#endif
-#if !defined(QT_NO_SQL)
+#if !defined(TQT_NO_SQL)
r = new WidgetDatabaseRecord;
r->iconName = "datatable.xpm";
r->includeFile = "tqdatatable.h";
- r->name = "TQDataTable";
+ r->name = TQDATATABLE_OBJECT_NAME_STRING;
r->group = widgetGroup("Database");
r->toolTip = i18n("Data Table");
append(r);
@@ -236,21 +236,21 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "lineedit.xpm";
- r->name = "TQLineEdit";
+ r->name = TQLINEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "spinbox.xpm";
- r->name = "TQSpinBox";
+ r->name = TQSPINBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Spin Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "dateedit.xpm";
- r->name = "QDateEdit";
+ r->name = TQDATEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Date Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -258,7 +258,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "timeedit.xpm";
- r->name = "QTimeEdit";
+ r->name = TQTIMEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Time Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -266,7 +266,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "datetimeedit.xpm";
- r->name = "QDateTimeEdit";
+ r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Date-Time Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -274,77 +274,77 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "multilineedit.xpm";
- r->name = "TQMultiLineEdit";
+ r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Multi Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "richtextedit.xpm";
- r->name = "TQTextEdit";
+ r->name = TQTEXTEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Rich Text Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "combobox.xpm";
- r->name = "TQComboBox";
+ r->name = TQCOMBOBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Combo Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "slider.xpm";
- r->name = "TQSlider";
+ r->name = TQSLIDER_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Slider");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "scrollbar.xpm";
- r->name = "TQScrollBar";
+ r->name = TQSCROLLBAR_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Scrollbar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "dial.xpm";
- r->name = "TQDial";
+ r->name = TQDIAL_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Dial");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "label.xpm";
- r->name = "TQLabel";
+ r->name = TQLABEL_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Label");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "lcdnumber.xpm";
- r->name = "TQLCDNumber";
+ r->name = TQLCDNUMBER_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("LCD Number");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "progress.xpm";
- r->name = "TQProgressBar";
+ r->name = TQPROGRESSBAR_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("Progress Bar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textview.xpm";
- r->name = "TQTextView";
+ r->name = TQTEXTVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Text View");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textbrowser.xpm";
- r->name = "TQTextBrowser";
+ r->name = TQTEXTBROWSER_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("Text Browser");
append(r);
@@ -355,42 +355,42 @@ void WidgetDatabase::setupDataBase( int id )
r->group = widgetGroup("Temp");
r->toolTip = i18n("Spacer");
r->whatsThis =
- i18n("The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts.");
+ i18n("The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of tqlayouts.");
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQWidget";
+ r->name = TQWIDGET_OBJECT_NAME_STRING;
r->isForm = true;
r->group = widgetGroup("Forms");
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQDialog";
+ r->name = TQDIALOG_OBJECT_NAME_STRING;
r->group = widgetGroup("Forms");
r->isForm = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQWizard";
+ r->name = TQWIZARD_OBJECT_NAME_STRING;
r->group = widgetGroup("Forms");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QDesignerWizard";
+ r->name = "TQDesignerWizard";
r->group = widgetGroup("Forms");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QLayoutWidget";
+ r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->includeFile = "";
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQSplitter";
+ r->name = TQSPLITTER_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->includeFile = "tqsplitter.h";
r->isContainer = true;
@@ -398,36 +398,36 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerTabWidget";
+ r->name = "TQDesignerTabWidget";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerWidget";
+ r->name = "TQDesignerWidget";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerDialog";
+ r->name = "TQDesignerDialog";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "";
- r->name = "TQMainWindow";
+ r->name = TQMAINWINDOW_OBJECT_NAME_STRING;
r->includeFile = "tqmainwindow.h";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
r = new WidgetDatabaseRecord;
- r->name = "TQDataBrowser";
+ r->name = TQDATABROWSER_OBJECT_NAME_STRING;
r->includeFile = "tqdatabrowser.h";
r->group = widgetGroup("Database");
r->toolTip = "Data Browser";
@@ -436,7 +436,7 @@ void WidgetDatabase::setupDataBase( int id )
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQDataView";
+ r->name = TQDATAVIEW_OBJECT_NAME_STRING;
r->includeFile = "tqdataview.h";
r->group = widgetGroup("Database");
r->toolTip = "Data View";
@@ -764,7 +764,7 @@ TQString WidgetDatabase::className( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->name;
}
@@ -777,7 +777,7 @@ TQString WidgetDatabase::group( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->group;
}
@@ -790,7 +790,7 @@ TQString WidgetDatabase::toolTip( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->toolTip;
}
@@ -803,7 +803,7 @@ TQString WidgetDatabase::whatsThis( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->whatsThis;
}
@@ -816,7 +816,7 @@ TQString WidgetDatabase::includeFile( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -833,7 +833,7 @@ bool WidgetDatabase::isForm( int id )
return r->isForm;
}
-/*! Returns whether the widget registered as \a id can have children.
+/*! Returns whether the widget registered as \a id can have tqchildren.
*/
bool WidgetDatabase::isContainer( int id )
@@ -849,7 +849,7 @@ TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase( id );
TQString n = className( id );
- if ( n == "QLayoutWidget" )
+ if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
n = "Layout";
if ( n[ 0 ] == 'Q' )
n = n.mid( 1 );
@@ -867,14 +867,14 @@ int WidgetDatabase::idFromClassName( const TQString &name )
setupDataBase( -1 );
if ( name.isEmpty() )
return 0;
- int *i = className2Id->find( name );
+ int *i = className2Id->tqfind( name );
if ( i )
return *i;
if ( name == "FormWindow" )
- return idFromClassName( "QLayoutWidget" );
+ return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING );
#ifdef UIC
setupDataBase( -2 );
- i = className2Id->find( name );
+ i = className2Id->tqfind( name );
if ( i )
return *i;
#endif
@@ -883,7 +883,7 @@ int WidgetDatabase::idFromClassName( const TQString &name )
bool WidgetDatabase::hasWidget( const TQString &name )
{
- return className2Id->find( name ) != 0;
+ return className2Id->tqfind( name ) != 0;
}
WidgetDatabaseRecord *WidgetDatabase::at( int index )
@@ -904,7 +904,7 @@ void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r )
widget_db[ index ] = r;
className2Id->insert( r->name, new int( index ) );
if ( index < dbcustom )
- dbcount = QMAX( dbcount, index );
+ dbcount = TQMAX( dbcount, index );
}
void WidgetDatabase::append( WidgetDatabaseRecord *r )
@@ -916,7 +916,7 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
TQString WidgetDatabase::widgetGroup( const TQString &g )
{
- if ( wGroups->find( g ) == -1 )
+ if ( wGroups->tqfind( g ) == -1 )
wGroups->append( g );
return g;
}
@@ -945,7 +945,7 @@ TQString WidgetDatabase::widgetGroup( int i )
setupDataBase( -1 );
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return TQString::null;
+ return TQString();
}
int WidgetDatabase::numWidgetGroups()
@@ -957,7 +957,7 @@ int WidgetDatabase::numWidgetGroups()
bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase( -1 );
- return invisibleGroups->find( g ) == -1;
+ return invisibleGroups->tqfind( g ) == -1;
}
int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r )
@@ -997,20 +997,20 @@ void WidgetDatabase::loadWhatsThis( const TQString &docPath )
}
-// ### Qt 3.1: make these publically accessible via QWidgetDatabase API
+// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API
#ifndef KOMMANDER
#if defined(UIC)
bool dbnounload = false;
TQStringList *dbpaths = 0;
#endif
-QPluginManager *widgetManager()
+TQPluginManager *widgetManager()
{
if ( !widgetPluginManager ) {
#ifndef KOMMANDER
- widgetPluginManager = new QPluginManager( IID_Widget, TQApplication::libraryPaths(), "/designer" );
+ widgetPluginManager = new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), "/designer" );
#else
- widgetPluginManager = new QPluginManager( IID_Widget, TQApplication::libraryPaths(), "" );
+ widgetPluginManager = new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), "" );
#endif
cleanup_manager.add( &widgetPluginManager );
diff --git a/kommander/editor/widgetdatabase.h b/kommander/editor/widgetdatabase.h
index 3e4078c5..24b14530 100644
--- a/kommander/editor/widgetdatabase.h
+++ b/kommander/editor/widgetdatabase.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -25,10 +25,10 @@
#include
#ifndef KOMMANDER
#include "widgetinterface.h" // up here for GCC 2.7.* compatibility
-#include
+#include
-extern QPluginManager *widgetManager();
+extern TQPluginManager *widgetManager();
#endif
struct WidgetDatabaseRecord
@@ -42,7 +42,7 @@ struct WidgetDatabaseRecord
int nameCounter;
};
-class WidgetDatabase : public Qt
+class WidgetDatabase : public TQt
{
public:
WidgetDatabase();
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index 2becbd33..920a3605 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -29,7 +29,7 @@
#include "mainwindow.h"
#include "formwindow.h"
#include "pixmapchooser.h"
-#include "layout.h"
+#include "tqlayout.h"
#include "listboxeditorimpl.h"
#include "listvieweditorimpl.h"
#include "iconvieweditorimpl.h"
@@ -37,7 +37,7 @@
#ifndef KOMMANDER
#include "widgetinterface.h"
#endif
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include "tableeditorimpl.h"
#endif
@@ -46,10 +46,10 @@
#include
#include
#include
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include
#endif
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include
#endif
#include
@@ -81,7 +81,7 @@
#include
#include
#include
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "database.h"
#endif
@@ -123,13 +123,13 @@ FormWindow *find_formwindow( TQWidget *w )
for (;;) {
if ( w->inherits( "FormWindow" ) )
return (FormWindow*)w;
- if ( !w->parentWidget() )
+ if ( !w->tqparentWidget() )
return 0;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
}
-void QLayoutWidget::paintEvent( TQPaintEvent* )
+void TQLayoutWidget::paintEvent( TQPaintEvent* )
{
TQPainter p ( this );
p.setPen( red );
@@ -137,54 +137,54 @@ void QLayoutWidget::paintEvent( TQPaintEvent* )
}
-QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name )
- : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+TQDesignerTabWidget::TQDesignerTabWidget( TQWidget *tqparent, const char *name )
+ : TQTabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
}
-int QDesignerTabWidget::currentPage() const
+int TQDesignerTabWidget::currentPage() const
{
return tabBar()->currentTab();
}
-void QDesignerTabWidget::setCurrentPage( int i )
+void TQDesignerTabWidget::setCurrentPage( int i )
{
tabBar()->setCurrentTab( i );
}
-TQString QDesignerTabWidget::pageTitle() const
+TQString TQDesignerTabWidget::pageTitle() const
{
return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() );
}
-void QDesignerTabWidget::setPageTitle( const TQString& title )
+void TQDesignerTabWidget::setPageTitle( const TQString& title )
{
changeTab( TQTabWidget::currentPage(), title );
}
-void QDesignerTabWidget::setPageName( const TQCString& name )
+void TQDesignerTabWidget::setPageName( const TQCString& name )
{
if ( TQTabWidget::currentPage() )
TQTabWidget::currentPage()->setName( name );
}
-TQCString QDesignerTabWidget::pageName() const
+TQCString TQDesignerTabWidget::pageName() const
{
if ( !TQTabWidget::currentPage() )
return 0;
return TQTabWidget::currentPage()->name();
}
-int QDesignerTabWidget::count() const
+int TQDesignerTabWidget::count() const
{
return tabBar()->count();
}
-bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
+bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o != tabBar() ) return false;
+ if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {
@@ -232,7 +232,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
int index = 0;
TQRect rect;
for ( ; index < tabBar()->count(); index++ ) {
- if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
+ if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) {
rect = tabBar()->tabAt( index )->rect();
break;
}
@@ -241,7 +241,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
if ( index == tabBar()->count() -1 ) {
TQRect rect2 = rect;
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
index++;
}
@@ -269,20 +269,20 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
int newIndex = 0;
for ( ; newIndex < tabBar()->count(); newIndex++ ) {
- if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) )
+ if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) )
break;
}
if ( newIndex == tabBar()->count() -1 ) {
TQRect rect2 = tabBar()->tabAt( newIndex )->rect();
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
newIndex++;
}
int oldIndex = 0;
for ( ; oldIndex < tabBar()->count(); oldIndex++ ) {
- if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) )
+ if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) )
break;
}
@@ -303,7 +303,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
return false;
}
-int QDesignerWizard::currentPageNum() const
+int TQDesignerWizard::currentPageNum() const
{
for ( int i = 0; i < pageCount(); ++i ) {
if ( page( i ) == currentPage() )
@@ -312,7 +312,7 @@ int QDesignerWizard::currentPageNum() const
return 0;
}
-void QDesignerWizard::setCurrentPage( int i )
+void TQDesignerWizard::setCurrentPage( int i )
{
if ( i < currentPageNum() ) {
while ( i < currentPageNum() ) {
@@ -330,30 +330,30 @@ void QDesignerWizard::setCurrentPage( int i )
}
}
-TQString QDesignerWizard::pageTitle() const
+TQString TQDesignerWizard::pageTitle() const
{
return title( currentPage() );
}
-void QDesignerWizard::setPageTitle( const TQString& title )
+void TQDesignerWizard::setPageTitle( const TQString& title )
{
setTitle( currentPage(), title );
}
-void QDesignerWizard::setPageName( const TQCString& name )
+void TQDesignerWizard::setPageName( const TQCString& name )
{
if ( TQWizard::currentPage() )
TQWizard::currentPage()->setName( name );
}
-TQCString QDesignerWizard::pageName() const
+TQCString TQDesignerWizard::pageName() const
{
if ( !TQWizard::currentPage() )
return 0;
return TQWizard::currentPage()->name();
}
-int QDesignerWizard::pageNum( TQWidget *p )
+int TQDesignerWizard::pageNum( TQWidget *p )
{
for ( int i = 0; i < pageCount(); ++i ) {
if ( page( i ) == p )
@@ -362,23 +362,23 @@ int QDesignerWizard::pageNum( TQWidget *p )
return -1;
}
-void QDesignerWizard::addPage( TQWidget *p, const TQString &t )
+void TQDesignerWizard::addPage( TQWidget *p, const TQString &t )
{
TQWizard::addPage( p, t );
- if ( removedPages.find( p ) )
+ if ( removedPages.tqfind( p ) )
removedPages.remove( p );
}
-void QDesignerWizard::removePage( TQWidget *p )
+void TQDesignerWizard::removePage( TQWidget *p )
{
TQWizard::removePage( p );
removedPages.insert( p, p );
}
-void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
+void TQDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
{
TQWizard::insertPage( p, t, index );
- if ( removedPages.find( p ) )
+ if ( removedPages.tqfind( p ) )
removedPages.remove( p );
}
@@ -387,10 +387,10 @@ TQMap< int, TQStringList > *changedProperties = 0;
/*!
\class WidgetFactory widgetfactory.h
- \brief Set of static functions for creating widgets, layouts and do other stuff
+ \brief Set of static functions for creating widgets, tqlayouts and do other stuff
The widget factory offers functions to create widgets, create and
- delete layouts find out other details - all based on the
+ delete tqlayouts find out other details - all based on the
WidgetDatabase's data. So the functions that use ids use the same
ids as in the WidgetDatabase.
*/
@@ -399,26 +399,26 @@ TQMap< int, TQStringList > *changedProperties = 0;
void WidgetFactory::saveDefaultProperties( TQWidget *w, int id )
{
TQMap< TQString, TQVariant> propMap;
- TQStrList lst = w->metaObject()->propertyNames( true );
+ TQStrList lst = w->tqmetaObject()->propertyNames( true );
for ( uint i = 0; i < lst.count(); ++i ) {
TQVariant var = w->property( lst.at( i ) );
if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 )
var = TQVariant( TQPixmap() );
else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 )
var = TQVariant( TQIconSet() );
- propMap.replace( lst.at( i ), var );
+ propMap.tqreplace( lst.at( i ), var );
}
- defaultProperties->replace( id, propMap );
+ defaultProperties->tqreplace( id, propMap );
}
static void saveChangedProperties( TQWidget *w, int id )
{
- TQStringList l = MetaDataBase::changedProperties( w );
+ TQStringList l = MetaDataBase::changedProperties( TQT_TQOBJECT(w) );
changedProperties->insert( id, l );
}
-EditorTabWidget::EditorTabWidget( TQWidget *parent, const char *name )
- : TabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+EditorTabWidget::EditorTabWidget( TQWidget *tqparent, const char *name )
+ : TabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
@@ -464,7 +464,7 @@ int EditorTabWidget::count() const
bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o != tabBar() ) return false;
+ if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {
@@ -512,7 +512,7 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
int index = 0;
TQRect rect;
for ( ; index < tabBar()->count(); index++ ) {
- if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
+ if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) {
rect = tabBar()->tabAt( index )->rect();
break;
}
@@ -521,7 +521,7 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
if ( index == tabBar()->count() -1 ) {
TQRect rect2 = rect;
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
index++;
}
@@ -549,20 +549,20 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
int newIndex = 0;
for ( ; newIndex < tabBar()->count(); newIndex++ ) {
- if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) )
+ if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) )
break;
}
if ( newIndex == tabBar()->count() -1 ) {
TQRect rect2 = tabBar()->tabAt( newIndex )->rect();
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
newIndex++;
}
int oldIndex = 0;
for ( ; oldIndex < tabBar()->count(); oldIndex++ ) {
- if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) )
+ if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) )
break;
}
@@ -584,8 +584,8 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
}
-EditorToolBox::EditorToolBox( TQWidget *parent, const char *name )
- : ToolBox( parent, name )
+EditorToolBox::EditorToolBox( TQWidget *tqparent, const char *name )
+ : ToolBox( tqparent, name )
{
setAcceptDrops( true );
}
@@ -631,12 +631,12 @@ int EditorToolBox::count() const
/*! Creates a widget of the type which is registered as \a id as
- child of \a parent. The \a name is optional. If \a init is true, the
+ child of \a tqparent. The \a name is optional. If \a init is true, the
widget is initialized with some defaults, else the plain widget is
created.
*/
-TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )
+TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )
{
TQString n = WidgetDatabase::className(id);
//qDebug("Trying to create '%s'", n.latin1());
@@ -652,108 +652,108 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo
TQWidget *w = 0;
TQString str = WidgetDatabase::createWidgetName(id);
const char *s = str.latin1();
- w = createWidget(n, parent, name ? name : s, init, r, orient);
+ w = createWidget(n, tqparent, name ? name : s, init, r, orient);
//qDebug("Trying to create '%s', widget (id=%d) - %s", s, id, w ? "successful" : "failure");
if (!w && WidgetDatabase::isCustomWidget(id))
- w = createCustomWidget(parent, name ? name : s, MetaDataBase::customWidget(id));
+ w = createCustomWidget(tqparent, name ? name : s, MetaDataBase::customWidget(id));
if (!w)
return 0;
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
- if (!defaultProperties->contains(id))
+ if (!defaultProperties->tqcontains(id))
saveDefaultProperties(w, id);
- if (!changedProperties->contains(id))
+ if (!changedProperties->tqcontains(id))
saveChangedProperties(w, id);
return w;
}
-/*! Creates a layout on the widget \a widget of the type \a type
+/*! Creates a tqlayout on the widget \a widget of the type \a type
which can be \c HBox, \c VBox or \c Grid.
*/
-TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type )
+TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, LayoutType type )
{
int spacing = MainWindow::self->currentLayoutDefaultSpacing();
int margin = 0;
if ( widget && !widget->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) &&
- ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
- widget && widget->parentWidget() && widget->parentWidget()->inherits( "FormWindow" ) ) )
+ ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) ||
+ widget && widget->tqparentWidget() && widget->tqparentWidget()->inherits( "FormWindow" ) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
- if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
widget = ((TQToolBox*)widget)->currentItem();
- if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
widget = ((TQMainWindow*)widget)->centralWidget();
- if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- MetaDataBase::addEntry( widget );
+ MetaDataBase::addEntry( TQT_TQOBJECT(widget) );
- if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
+ if ( !tqlayout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
- gb->layout()->setMargin( 0 );
- gb->layout()->setSpacing( 0 );
+ gb->tqlayout()->setMargin( 0 );
+ gb->tqlayout()->setSpacing( 0 );
TQLayout *l;
switch ( type ) {
case HBox:
- l = new TQHBoxLayout( gb->layout() );
- MetaDataBase::setMargin( gb, margin );
- MetaDataBase::setSpacing( gb, spacing );
- l->setAlignment( AlignTop );
- MetaDataBase::addEntry( l );
+ l = new TQHBoxLayout( gb->tqlayout() );
+ MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ l->tqsetAlignment( AlignTop );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case VBox:
- l = new TQVBoxLayout( gb->layout(), spacing );
- MetaDataBase::setMargin( gb, margin );
- MetaDataBase::setSpacing( gb, spacing );
- l->setAlignment( AlignTop );
- MetaDataBase::addEntry( l );
+ l = new TQVBoxLayout( gb->tqlayout(), spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ l->tqsetAlignment( AlignTop );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid:
- l = new QDesignerGridLayout( gb->layout() );
- MetaDataBase::setMargin( gb, margin );
- MetaDataBase::setSpacing( gb, spacing );
- l->setAlignment( AlignTop );
- MetaDataBase::addEntry( l );
+ l = new TQDesignerGridLayout( gb->tqlayout() );
+ MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ l->tqsetAlignment( AlignTop );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
default:
return 0;
}
} else {
- if ( layout ) {
+ if ( tqlayout ) {
TQLayout *l;
switch ( type ) {
case HBox:
- l = new TQHBoxLayout( layout );
- MetaDataBase::addEntry( l );
+ l = new TQHBoxLayout( tqlayout );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case VBox:
- l = new TQVBoxLayout( layout );
- MetaDataBase::addEntry( l );
+ l = new TQVBoxLayout( tqlayout );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid: {
- l = new QDesignerGridLayout( layout );
- MetaDataBase::addEntry( l );
+ l = new TQDesignerGridLayout( tqlayout );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
}
default:
@@ -764,39 +764,39 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
switch ( type ) {
case HBox:
l = new TQHBoxLayout( widget );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
if ( widget ) {
- MetaDataBase::setMargin( widget, margin );
- MetaDataBase::setSpacing( widget, spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case VBox:
l = new TQVBoxLayout( widget );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
if ( widget ) {
- MetaDataBase::setMargin( widget, margin );
- MetaDataBase::setSpacing( widget, spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid: {
- l = new QDesignerGridLayout( widget );
- MetaDataBase::addEntry( l );
+ l = new TQDesignerGridLayout( widget );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
if ( widget ) {
- MetaDataBase::setMargin( widget, margin );
- MetaDataBase::setSpacing( widget, spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
}
default:
@@ -819,17 +819,17 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
widget = ((TQMainWindow*)widget)->centralWidget();
if ( widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- delete widget->layout();
+ delete widget->tqlayout();
}
/*! Factory functions for creating a widget of the type \a className
- as child of \a parent with the name \a name.
+ as child of \a tqparent with the name \a name.
If \a init is true, some initial default properties are set. This
has to be in sync with the initChangedProperties() function!
*/
-TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
+TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqparent, const char *name, bool init,
const TQRect *r, Qt::Orientation orient )
{
if (className == TQPUSHBUTTON_OBJECT_NAME_STRING)
@@ -837,11 +837,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
TQPushButton *b = 0;
if (init)
{
- b = new QDesignerPushButton(parent, name);
- b->setText(TQString::fromLatin1(name));
+ b = new TQDesignerPushButton(tqparent, name);
+ b->setText(TQString::tqfromLatin1(name));
} else
{
- b = new QDesignerPushButton(parent, name);
+ b = new TQDesignerPushButton(tqparent, name);
}
TQWidget *w = find_formwindow(b);
b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits(TQDIALOG_OBJECT_NAME_STRING));
@@ -850,43 +850,43 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
{
if (init)
{
- QDesignerToolButton *tb = new QDesignerToolButton(parent, name);
+ TQDesignerToolButton *tb = new TQDesignerToolButton(tqparent, name);
tb->setText("...");
return tb;
}
- return new QDesignerToolButton(parent, name);
+ return new TQDesignerToolButton(tqparent, name);
} else if (className == TQCHECKBOX_OBJECT_NAME_STRING)
{
if (init)
{
- QDesignerCheckBox *cb = new QDesignerCheckBox(parent, name);
- cb->setText(TQString::fromLatin1(name));
+ TQDesignerCheckBox *cb = new TQDesignerCheckBox(tqparent, name);
+ cb->setText(TQString::tqfromLatin1(name));
return cb;
}
- return new QDesignerCheckBox(parent, name);
+ return new TQDesignerCheckBox(tqparent, name);
} else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING)
{
if (init)
{
- QDesignerRadioButton *rb = new QDesignerRadioButton(parent, name);
- rb->setText(TQString::fromLatin1(name));
+ TQDesignerRadioButton *rb = new TQDesignerRadioButton(tqparent, name);
+ rb->setText(TQString::tqfromLatin1(name));
return rb;
}
- return new QDesignerRadioButton(parent, name);
+ return new TQDesignerRadioButton(tqparent, name);
} else if (className == TQGROUPBOX_OBJECT_NAME_STRING)
{
if (init)
- return new TQGroupBox(TQString::fromLatin1(name), parent, name);
- return new TQGroupBox(parent, name);
+ return new TQGroupBox(TQString::tqfromLatin1(name), tqparent, name);
+ return new TQGroupBox(tqparent, name);
} else if (className == TQBUTTONGROUP_OBJECT_NAME_STRING)
{
if (init)
- return new TQButtonGroup(TQString::fromLatin1(name), parent, name);
- return new TQButtonGroup(parent, name);
+ return new TQButtonGroup(TQString::tqfromLatin1(name), tqparent, name);
+ return new TQButtonGroup(tqparent, name);
} else if (className == TQICONVIEW_OBJECT_NAME_STRING)
{
-#if !defined(QT_NO_ICONVIEW)
- TQIconView *iv = new TQIconView(parent, name);
+#if !defined(TQT_NO_ICONVIEW)
+ TQIconView *iv = new TQIconView(tqparent, name);
if (init)
(void) new TQIconViewItem(iv, i18n("New Item"));
return iv;
@@ -895,30 +895,30 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
#endif
} else if (className == TQTABLE_OBJECT_NAME_STRING)
{
-#if !defined(QT_NO_TABLE)
+#if !defined(TQT_NO_TABLE)
if (init)
- return new TQTable(3, 3, parent, name);
- return new TQTable(parent, name);
+ return new TQTable(3, 3, tqparent, name);
+ return new TQTable(tqparent, name);
#else
return 0;
#endif
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
} else if (className == TQDATATABLE_OBJECT_NAME_STRING)
{
- return new TQDataTable(parent, name);
-#endif //QT_NO_SQL
+ return new TQDataTable(tqparent, name);
+#endif //TQT_NO_SQL
} else if (className == TQDATEEDIT_OBJECT_NAME_STRING)
{
- return new QDateEdit(parent, name);
+ return new TQDateEdit(tqparent, name);
} else if (className == TQTIMEEDIT_OBJECT_NAME_STRING)
{
- return new QTimeEdit(parent, name);
+ return new TQTimeEdit(tqparent, name);
} else if (className == TQDATETIMEEDIT_OBJECT_NAME_STRING)
{
- return new QDateTimeEdit(parent, name);
+ return new TQDateTimeEdit(tqparent, name);
} else if (className == TQLISTBOX_OBJECT_NAME_STRING)
{
- TQListBox *lb = new TQListBox(parent, name);
+ TQListBox *lb = new TQListBox(tqparent, name);
if (init)
{
lb->insertItem(i18n("New Item"));
@@ -927,7 +927,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return lb;
} else if (className == TQLISTVIEW_OBJECT_NAME_STRING)
{
- TQListView *lv = new TQListView(parent, name);
+ TQListView *lv = new TQListView(tqparent, name);
lv->setSorting(-1);
if (init)
{
@@ -936,91 +936,91 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
return lv;
} else if (className == TQLINEEDIT_OBJECT_NAME_STRING)
- return new TQLineEdit(parent, name);
+ return new TQLineEdit(tqparent, name);
else if (className == TQSPINBOX_OBJECT_NAME_STRING)
- return new TQSpinBox(parent, name);
+ return new TQSpinBox(tqparent, name);
else if (className == TQSPLITTER_OBJECT_NAME_STRING)
- return new TQSplitter(parent, name);
+ return new TQSplitter(tqparent, name);
else if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
- return new TQMultiLineEdit(parent, name);
+ return new TQMultiLineEdit(tqparent, name);
else if (className == TQTEXTEDIT_OBJECT_NAME_STRING)
- return new TQTextEdit(parent, name);
+ return new TQTextEdit(tqparent, name);
else if (className == TQLABEL_OBJECT_NAME_STRING)
{
- QDesignerLabel *l = new QDesignerLabel(parent, name);
+ TQDesignerLabel *l = new TQDesignerLabel(tqparent, name);
if (init)
{
- l->setText(TQString::fromLatin1(name));
- MetaDataBase::addEntry(l);
- MetaDataBase::setPropertyChanged(l, "text", true);
+ l->setText(TQString::tqfromLatin1(name));
+ MetaDataBase::addEntry(TQT_TQOBJECT(l));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "text", true);
}
return l;
} else if (className == TQLAYOUTWIDGET_OBJECT_NAME_STRING)
- return new QLayoutWidget(parent, name);
+ return new TQLayoutWidget(tqparent, name);
else if (className == TQTABWIDGET_OBJECT_NAME_STRING)
{
- TQTabWidget *tw = new QDesignerTabWidget(parent, name);
+ TQTabWidget *tw = new TQDesignerTabWidget(tqparent, name);
if (init)
{
- FormWindow *fw = find_formwindow(parent);
- TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ FormWindow *fw = find_formwindow(tqparent);
+ TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
- MetaDataBase::addEntry(w);
- w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 2"));
- MetaDataBase::addEntry(tw);
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(tw));
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
}
return tw;
} else if (className == TQCOMBOBOX_OBJECT_NAME_STRING)
{
- return new TQComboBox(false, parent, name);
+ return new TQComboBox(false, tqparent, name);
} else if (className == TQWIDGET_OBJECT_NAME_STRING)
{
- if (parent &&
- (parent->inherits("FormWindow") || parent->inherits(TQWIZARD_OBJECT_NAME_STRING)
- || parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || parent->inherits(TQTOOLBOX_OBJECT_NAME_STRING) || parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)))
+ if (tqparent &&
+ (tqparent->inherits("FormWindow") || tqparent->inherits(TQWIZARD_OBJECT_NAME_STRING)
+ || tqparent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || tqparent->inherits(TQTOOLBOX_OBJECT_NAME_STRING) || tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)))
{
- FormWindow *fw = find_formwindow(parent);
+ FormWindow *fw = find_formwindow(tqparent);
if (fw)
{
- QDesignerWidget *dw = new QDesignerWidget(fw, parent, name);
- MetaDataBase::addEntry(dw);
+ TQDesignerWidget *dw = new TQDesignerWidget(fw, tqparent, name);
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
return dw;
}
}
- return new TQWidget(parent, name);
+ return new TQWidget(tqparent, name);
} else if (className == TQDIALOG_OBJECT_NAME_STRING)
{
TQDialog *dia = 0;
- if (parent && parent->inherits("FormWindow"))
- dia = new QDesignerDialog((FormWindow *) parent, parent, name);
+ if (tqparent && tqparent->inherits("FormWindow"))
+ dia = new TQDesignerDialog((FormWindow *) tqparent, tqparent, name);
else
- dia = new TQDialog(parent, name);
- if (parent && !parent->inherits("MainWindow"))
- dia->reparent(parent, TQPoint(0, 0), true);
+ dia = new TQDialog(tqparent, name);
+ if (tqparent && !tqparent->inherits("MainWindow"))
+ dia->reparent(tqparent, TQPoint(0, 0), true);
return dia;
} else if (className == TQWIZARD_OBJECT_NAME_STRING)
{
- TQWizard *wiz = new QDesignerWizard(parent, name);
- if (parent && !parent->inherits("MainWindow"))
+ TQWizard *wiz = new TQDesignerWizard(tqparent, name);
+ if (tqparent && !tqparent->inherits("MainWindow"))
{
- wiz->reparent(parent, TQPoint(0, 0), true);
+ wiz->reparent(tqparent, TQPoint(0, 0), true);
}
- if (init && parent && parent->inherits("FormWindow"))
+ if (init && tqparent && tqparent->inherits("FormWindow"))
{
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
- MetaDataBase::addEntry(dw);
+ TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
}
return wiz;
} else if (className == "Spacer")
{
- Spacer *s = new Spacer(parent, name);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
- MetaDataBase::setPropertyChanged(s, "sizeType", true);
+ Spacer *s = new Spacer(tqparent, name);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "sizeType", true);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1031,53 +1031,53 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
s->setOrientation(Qt::Horizontal);
return s;
} else if (className == TQLCDNUMBER_OBJECT_NAME_STRING)
- return new TQLCDNumber(parent, name);
+ return new TQLCDNumber(tqparent, name);
else if (className == TQPROGRESSBAR_OBJECT_NAME_STRING)
- return new TQProgressBar(parent, name);
+ return new TQProgressBar(tqparent, name);
else if (className == TQTEXTVIEW_OBJECT_NAME_STRING)
- return new TQTextView(parent, name);
+ return new TQTextView(tqparent, name);
else if (className == TQTEXTBROWSER_OBJECT_NAME_STRING)
- return new TQTextBrowser(parent, name);
+ return new TQTextBrowser(tqparent, name);
else if (className == TQDIAL_OBJECT_NAME_STRING)
- return new TQDial(parent, name);
+ return new TQDial(tqparent, name);
else if (className == TQSLIDER_OBJECT_NAME_STRING)
{
- TQSlider *s = new TQSlider(parent, name);
+ TQSlider *s = new TQSlider(tqparent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
} else if (className == TQSCROLLBAR_OBJECT_NAME_STRING)
{
- TQScrollBar *s = new TQScrollBar(parent, name);
+ TQScrollBar *s = new TQScrollBar(tqparent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
} else if (className == TQFRAME_OBJECT_NAME_STRING)
{
if (!init)
- return new TQFrame(parent, name);
- TQFrame *f = new TQFrame(parent, name);
+ return new TQFrame(tqparent, name);
+ TQFrame *f = new TQFrame(tqparent, name);
f->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised);
return f;
} else if (className == "Line")
{
- Line *l = new Line(parent, name);
- MetaDataBase::addEntry(l);
- MetaDataBase::setPropertyChanged(l, "orientation", true);
- MetaDataBase::setPropertyChanged(l, "frameShadow", true);
- MetaDataBase::setPropertyChanged(l, "frameShape", true);
+ Line *l = new Line(tqparent, name);
+ MetaDataBase::addEntry(TQT_TQOBJECT(l));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "orientation", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "frameShadow", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "frameShape", true);
if (!r)
return l;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1087,38 +1087,38 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return l;
} else if (className == TQMAINWINDOW_OBJECT_NAME_STRING)
{
- TQMainWindow *mw = new KmdrMainWindow(parent, name, 0);
- mw->setDockEnabled(Qt::DockMinimized, false);
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, mw, "central widget");
+ TQMainWindow *mw = new KmdrMainWindow(tqparent, name, 0);
+ mw->setDockEnabled(TQt::DockMinimized, false);
+ TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, mw, "central widget");
mw->setDockMenuEnabled(false);
- MetaDataBase::addEntry(dw);
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
mw->setCentralWidget(dw);
(void) mw->statusBar();
dw->show();
return mw;
}
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
else if (className == TQDATABROWSER_OBJECT_NAME_STRING)
{
- TQWidget *w = new QDesignerDataBrowser(parent, name);
- if (parent)
- w->reparent(parent, TQPoint(0, 0), true);
+ TQWidget *w = new TQDesignerDataBrowser(tqparent, name);
+ if (tqparent)
+ w->reparent(tqparent, TQPoint(0, 0), true);
return w;
} else if (className == TQDATAVIEW_OBJECT_NAME_STRING)
{
- TQWidget *w = new QDesignerDataView(parent, name);
- if (parent)
- w->reparent(parent, TQPoint(0, 0), true);
+ TQWidget *w = new TQDesignerDataView(tqparent, name);
+ if (tqparent)
+ w->reparent(tqparent, TQPoint(0, 0), true);
return w;
}
#endif
#ifdef KOMMANDER
if (className == "LineEdit")
- return new LineEdit(parent, name);
+ return new LineEdit(tqparent, name);
else if (className == "ListView")
{
- TQListView *lv = new TQListView(parent, name);
+ TQListView *lv = new TQListView(tqparent, name);
lv->setSorting(-1);
if (init)
{
@@ -1130,29 +1130,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if (className == "Dialog")
{
TQDialog *dia = 0;
- if (parent && parent->inherits("FormWindow"))
- dia = new EditorDialog((FormWindow *) parent, parent, name);
+ if (tqparent && tqparent->inherits("FormWindow"))
+ dia = new EditorDialog((FormWindow *) tqparent, tqparent, name);
else
- dia = new Dialog(parent, name, false);
+ dia = new Dialog(tqparent, name, false);
- if (parent)
- dia->reparent(parent, TQPoint(0, 0), true);
+ if (tqparent)
+ dia->reparent(tqparent, TQPoint(0, 0), true);
return dia;
}
else if (className == "Wizard")
{
//qDebug("Creating Wizard...");
TQWizard *wiz;
- if (parent && parent->inherits("FormWindow"))
- wiz = new QDesignerWizard(parent, name);
+ if (tqparent && tqparent->inherits("FormWindow"))
+ wiz = new TQDesignerWizard(tqparent, name);
else
- wiz = new Wizard(parent, name);
- if (parent)
- wiz->reparent(parent, TQPoint(0, 0), true);
- if (init && parent && parent->inherits("FormWindow"))
+ wiz = new Wizard(tqparent, name);
+ if (tqparent)
+ wiz->reparent(tqparent, TQPoint(0, 0), true);
+ if (init && tqparent && tqparent->inherits("FormWindow"))
{
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
- MetaDataBase::addEntry(dw);
+ TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page 1"));
wiz->addPage(dw, i18n("Page 2"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
@@ -1161,74 +1161,74 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
else if (className == "TabWidget")
{
- TQTabWidget *tw = new EditorTabWidget(parent, name);
+ TQTabWidget *tw = new EditorTabWidget(tqparent, name);
if (init)
{
- FormWindow *fw = find_formwindow(parent);
- TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ FormWindow *fw = find_formwindow(tqparent);
+ TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
- MetaDataBase::addEntry(w);
- w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 2"));
- MetaDataBase::addEntry(tw);
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(tw));
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
}
return tw;
} else if (className == "ToolBox")
{
- TQToolBox *tw = new EditorToolBox(parent, name);
+ TQToolBox *tw = new EditorToolBox(tqparent, name);
if (init)
{
- FormWindow *fw = find_formwindow(parent);
- TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
+ FormWindow *fw = find_formwindow(tqparent);
+ TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 1"));
- MetaDataBase::addEntry(w);
- w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 2"));
- MetaDataBase::addEntry(tw);
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(tw));
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
}
return tw;
}
else if (className == "ExecButton")
- return new ExecButton(parent, name);
+ return new ExecButton(tqparent, name);
else if (className == "CloseButton")
- return new CloseButton(parent, name);
+ return new CloseButton(tqparent, name);
else if (className == "SubDialog")
- return new SubDialog(parent, name);
+ return new SubDialog(tqparent, name);
else if (className == "FileSelector")
- return new FileSelector(parent, name);
+ return new FileSelector(tqparent, name);
else if (className == "TextEdit")
- return new TextEdit(parent, name);
+ return new TextEdit(tqparent, name);
else if (className == "RadioButton")
- return new RadioButton(parent, name);
+ return new RadioButton(tqparent, name);
else if (className == "ButtonGroup")
- return new ButtonGroup(parent, name);
+ return new ButtonGroup(tqparent, name);
else if (className == "GroupBox")
- return new GroupBox(parent, name);
+ return new GroupBox(tqparent, name);
else if (className == "CheckBox")
- return new CheckBox(parent, name);
+ return new CheckBox(tqparent, name);
else if (className == "ComboBox")
- return new ComboBox(parent, name);
+ return new ComboBox(tqparent, name);
else if (className == "SpinBoxInt")
- return new SpinBoxInt(parent, name);
+ return new SpinBoxInt(tqparent, name);
else if (className == "ListBox")
- return new ListBox(parent, name);
+ return new ListBox(tqparent, name);
else if (className == "ScriptObject")
- return new ScriptObject(parent, name);
+ return new ScriptObject(tqparent, name);
else if (className == "RichTextEditor")
- return new RichTextEditor(parent, name);
+ return new RichTextEditor(tqparent, name);
else if (className == "DatePicker")
- return new DatePicker(parent, name);
+ return new DatePicker(tqparent, name);
else if (className == "PopupMenu")
- return new PopupMenu(parent, name);
+ return new PopupMenu(tqparent, name);
else if (className == "FontDialog")
- return new FontDialog(parent, name);
+ return new FontDialog(tqparent, name);
else if (className == "AboutDialog")
- return new AboutDialog(parent, name);
+ return new AboutDialog(tqparent, name);
else if (className == "TreeWidget")
{
- TQListView *lv = new TreeWidget(parent, name);
+ TQListView *lv = new TreeWidget(tqparent, name);
lv->setSorting(-1);
if (init)
{
@@ -1238,33 +1238,33 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return lv;
} else if (className == "Slider")
{
- Slider *s = new Slider(parent, name);
+ Slider *s = new Slider(tqparent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
}
#endif
- TQWidget *w = KommanderFactory::createWidget(className, parent, name);
+ TQWidget *w = KommanderFactory::createWidget(className, tqparent, name);
return w;
}
-/*! Find out which type the layout of the widget is. Returns \c HBox,
- \c VBox, \c Grid or \c NoLayout. \a layout points to this
- TQWidget::layout() of \a w or to 0 after the function call.
+/*! Find out which type the tqlayout of the widget is. Returns \c HBox,
+ \c VBox, \c Grid or \c NoLayout. \a tqlayout points to this
+ TQWidget::tqlayout() of \a w or to 0 after the function call.
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout )
+WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQWidget *w, TQLayout *&tqlayout )
{
- layout = 0;
+ tqlayout = 0;
if ( w && w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
w = ((TQTabWidget*)w)->currentPage();
@@ -1278,19 +1278,19 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
w = ((TQWidgetStack*)w)->visibleWidget();
if ( w && w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
- return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
+ return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox;
- if ( !w || !w->layout() )
+ if ( !w || !w->tqlayout() )
return NoLayout;
- TQLayout *lay = w->layout();
+ TQLayout *lay = w->tqlayout();
if ( w->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
- TQObjectList *l = lay->queryList( TQLAYOUT_OBJECT_NAME_STRING );
+ TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING );
if ( l && l->first() )
lay = (TQLayout*)l->first();
delete l;
}
- layout = lay;
+ tqlayout = lay;
if ( lay->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
@@ -1304,13 +1304,13 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
/*!
\overload
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
+WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQLayout *tqlayout )
{
- if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
+ if ( tqlayout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
- else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox;
- else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid;
return NoLayout;
}
@@ -1318,25 +1318,25 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
/*!
\overload
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w )
+WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQWidget *w )
{
TQLayout *l = 0;
- return layoutType( w, l );
+ return tqlayoutType( w, l );
}
-TQWidget *WidgetFactory::layoutParent( TQLayout *layout )
+TQWidget *WidgetFactory::tqlayoutParent( TQLayout *tqlayout )
{
- TQObject *o = layout;
+ TQObject *o = TQT_TQOBJECT(tqlayout);
while ( o ) {
if ( o->isWidgetType() )
return (TQWidget*)o;
- o = o->parent();
+ o = o->tqparent();
}
return 0;
}
-/*! Returns the widget into which children should be inserted when \a
+/*! Returns the widget into which tqchildren should be inserted when \a
w is a container known to the designer.
Usually that is \a w itself, sometimes it is different (e.g. a
@@ -1363,22 +1363,22 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
}
/*! Returns the actual designer widget of the container \a w. This is
- normally \a w itself, but might be a parent or grand parent of \a w
+ normally \a w itself, but might be a tqparent or grand tqparent of \a w
(e.g. when working with a tabwidget and \a w is the container which
- contains and layouts childs, but the actual widget known to the
- designer is the tabwidget which is the parent of \a w. So this
+ contains and tqlayouts childs, but the actual widget known to the
+ designer is the tabwidget which is the tqparent of \a w. So this
function returns the tabwidget then.)
*/
TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
{
- if ( w->parentWidget() && w->parentWidget()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
- w = w->parentWidget();
+ if ( w->tqparentWidget() && w->tqparentWidget()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
+ w = w->tqparentWidget();
while ( w ) {
- if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
- w && w->parentWidget() && w->parentWidget()->inherits( "FormWindow" ) )
+ if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ||
+ w && w->tqparentWidget() && w->tqparentWidget()->inherits( "FormWindow" ) )
return w;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
return w;
}
@@ -1391,15 +1391,15 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
return true;
- if ( o->inherits( TQTABBAR_OBJECT_NAME_STRING ) || ::qt_cast(o->parent()) )
+ if ( o->inherits( TQTABBAR_OBJECT_NAME_STRING ) || ::tqqt_cast(o->tqparent()) )
return true;
else if ( o->inherits( TQSIZEGRIP_OBJECT_NAME_STRING ) )
return true;
- else if ( o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) && o->parent() && o->parent()->inherits( TQTABBAR_OBJECT_NAME_STRING ) )
+ else if ( o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) && o->tqparent() && o->tqparent()->inherits( TQTABBAR_OBJECT_NAME_STRING ) )
return true;
- else if ( o->parent() && o->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) && o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
+ else if ( o->tqparent() && o->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) && o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
return true;
- else if ( o->parent() && o->parent()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) && o->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
+ else if ( o->tqparent() && o->tqparent()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) && o->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
return true;
else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) )
return true;
@@ -1415,43 +1415,43 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
*/
const char* WidgetFactory::classNameOf( TQObject* o )
{
- if (o->inherits("QDesignerTabWidget"))
- return "TQTabWidget";
+ if (o->inherits("TQDesignerTabWidget"))
+ return TQTABWIDGET_OBJECT_NAME_STRING;
#ifdef KOMMANDER
else if (o->inherits("EditorTabWidget"))
return "TabWidget";
else if (o->inherits("EditorToolBox"))
return "ToolBox";
#endif
- else if (o->inherits("QDesignerDialog"))
- return "TQDialog";
- else if (o->inherits("QDesignerWidget"))
- return "TQWidget";
+ else if (o->inherits("TQDesignerDialog"))
+ return TQDIALOG_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerWidget"))
+ return TQWIDGET_OBJECT_NAME_STRING;
else if (o->inherits("CustomWidget"))
return ((CustomWidget *) o)->realClassName().latin1();
- else if (o->inherits("QDesignerLabel"))
- return "TQLabel";
- else if (o->inherits("QDesignerWizard"))
- return "TQWizard";
+ else if (o->inherits("TQDesignerLabel"))
+ return TQLABEL_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerWizard"))
+ return TQWIZARD_OBJECT_NAME_STRING;
else if (o->inherits("EditorWizard"))
return "Wizard";
- else if (o->inherits("QDesignerPushButton"))
- return "TQPushButton";
- else if (o->inherits("QDesignerToolButton"))
- return "TQToolButton";
- else if (o->inherits("QDesignerRadioButton"))
- return "TQRadioButton";
- else if (o->inherits("QDesignerCheckBox"))
- return "TQCheckBox";
- else if (o->inherits("QDesignerMenuBar"))
- return "TQMenuBar";
- else if (o->inherits("QDesignerToolBar"))
- return "TQToolBar";
-#ifndef QT_NO_SQL
- else if (o->inherits("QDesignerDataBrowser"))
- return "TQDataBrowser";
- else if (o->inherits("QDesignerDataView"))
- return "TQDataView";
+ else if (o->inherits("TQDesignerPushButton"))
+ return TQPUSHBUTTON_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerToolButton"))
+ return TQTOOLBUTTON_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerRadioButton"))
+ return TQRADIOBUTTON_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerCheckBox"))
+ return TQCHECKBOX_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerMenuBar"))
+ return TQMENUBAR_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerToolBar"))
+ return TQTOOLBAR_OBJECT_NAME_STRING;
+#ifndef TQT_NO_SQL
+ else if (o->inherits("TQDesignerDataBrowser"))
+ return TQDATABROWSER_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerDataView"))
+ return TQDATAVIEW_OBJECT_NAME_STRING;
#endif
else if (o->inherits("EditorDialog"))
return "Dialog";
@@ -1466,12 +1466,12 @@ const char* WidgetFactory::classNameOf( TQObject* o )
void WidgetFactory::initChangedProperties( TQObject *o )
{
MetaDataBase::setPropertyChanged( o, "name", true );
- if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) )
+ if ( !o->inherits( "TQDesignerToolBar" ) && !o->inherits( "TQDesignerMenuBar" ) )
MetaDataBase::setPropertyChanged( o, "geometry", true );
if ( o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || o->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || o->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) || o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) )
MetaDataBase::setPropertyChanged( o, "text", true );
- else if (::qt_cast(o) && ::qt_cast(widgetOfContainer((TQWidget*)o->parent()))) {
+ else if (::tqqt_cast(o) && ::tqqt_cast(widgetOfContainer((TQWidget*)o->tqparent()))) {
MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
@@ -1484,7 +1484,7 @@ void WidgetFactory::initChangedProperties( TQObject *o )
} else if ( o->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || o->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "pageTitle", true );
MetaDataBase::setPropertyChanged( o, "pageName", true );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
} else if ( o->inherits( TQTABLE_OBJECT_NAME_STRING ) && !o->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "numRows", true );
MetaDataBase::setPropertyChanged( o, "numCols", true );
@@ -1494,7 +1494,7 @@ void WidgetFactory::initChangedProperties( TQObject *o )
t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) );
}
#endif
- } else if ( ::qt_cast(o) ) {
+ } else if ( ::tqqt_cast(o) ) {
MetaDataBase::setPropertyChanged( o, "currentIndex", true );
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemLabel", true );
@@ -1503,9 +1503,9 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
} else if ( o->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "orientation", true );
- } else if ( o->inherits( "QDesignerToolBar" ) ) {
+ } else if ( o->inherits( "TQDesignerToolBar" ) ) {
MetaDataBase::setPropertyChanged( o, "label", true );
- } else if ( o->inherits( "QDesignerMenuBar" ) ) {
+ } else if ( o->inherits( "TQDesignerMenuBar" ) ) {
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemNumber", true );
MetaDataBase::setPropertyChanged( o, "itemText", true );
@@ -1530,7 +1530,7 @@ bool WidgetFactory::hasSpecialEditor( int id )
return true;
if (className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
return true;
- if (className.contains("Table"))
+ if (className.tqcontains("Table"))
return true;
return false;
@@ -1544,13 +1544,13 @@ bool WidgetFactory::hasItems( int id )
return true;
if (className.mid(1) == "ListBox" || className.mid(1) == "ListView" ||
className.mid(1) == "IconView" || className.mid(1) == "ComboBox" ||
- className.contains("Table"))
+ className.tqcontains("Table"))
return true;
return false;
}
-void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
+void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw )
{
TQString className = WidgetDatabase::className(id);
@@ -1562,7 +1562,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
TQComboBox *cb = (TQComboBox *) editWidget;
- ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, cb->listBox(), fw);
e->exec();
delete e;
@@ -1572,7 +1572,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if (className == "TextEdit" || className == "TextBrowser")
{
- MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
+ MultiLineEditor *e = new MultiLineEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1582,7 +1582,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
- ListViewEditor *e = new ListViewEditor(parent, lv, fw);
+ ListViewEditor *e = new ListViewEditor(tqparent, lv, fw);
e->exec();
delete e;
return;
@@ -1591,7 +1591,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
{
if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
- ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1601,7 +1601,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
{
if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
- ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1612,7 +1612,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (!editWidget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING))
return;
TQComboBox *cb = (TQComboBox *) editWidget;
- ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, cb->listBox(), fw);
e->exec();
delete e;
cb->update();
@@ -1624,7 +1624,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
- ListViewEditor *e = new ListViewEditor(parent, lv, fw);
+ ListViewEditor *e = new ListViewEditor(tqparent, lv, fw);
e->exec();
delete e;
return;
@@ -1634,7 +1634,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
{
if (!editWidget->inherits(TQICONVIEW_OBJECT_NAME_STRING))
return;
- IconViewEditor *e = new IconViewEditor(parent, editWidget, fw);
+ IconViewEditor *e = new IconViewEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1642,15 +1642,15 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING)
{
- MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
+ MultiLineEditor *e = new MultiLineEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
}
-#ifndef QT_NO_TABLE
- if (className.contains("Table"))
+#ifndef TQT_NO_TABLE
+ if (className.tqcontains("Table"))
{
- TableEditor *e = new TableEditor(parent, editWidget, fw);
+ TableEditor *e = new TableEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1662,14 +1662,14 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
{
if ( propName == "name" || propName == "geometry" )
return false;
- TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
- return l.findIndex( propName ) == -1;
+ TQStringList l = *changedProperties->tqfind( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
+ return l.tqfindIndex( propName ) == -1;
}
bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->
- findProperty( propName, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->
+ tqfindProperty( propName, true ), true );
if (!p )
return false;
return p->reset( w );
@@ -1678,33 +1678,33 @@ bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
{
if ( propName == "wordwrap" ) {
- int v = defaultValue( w, "alignment" ).toInt();
+ int v = defaultValue( w, "tqalignment" ).toInt();
return TQVariant( ( v & WordBreak ) == WordBreak, 0 );
} else if ( propName == "toolTip" || propName == "whatsThis" ) {
- return TQVariant( TQString::fromLatin1( "" ) );
+ return TQVariant( TQString::tqfromLatin1( "" ) );
} else if ( w->inherits( "CustomWidget" ) ) {
return TQVariant();
} else if ( propName == "frameworkCode" ) {
return TQVariant( true, 0 );
- } else if ( propName == "layoutMargin" ) {
- if ( w->inherits( "QLayoutWidget" ) )
+ } else if ( propName == "tqlayoutMargin" ) {
+ if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
return TQVariant( 0 );
else if ( MainWindow::self->formWindow() )
- return TQVariant( MainWindow::self->formWindow()->layoutDefaultMargin() );
- } else if ( propName == "layoutSpacing" ) {
+ return TQVariant( MainWindow::self->formWindow()->tqlayoutDefaultMargin() );
+ } else if ( propName == "tqlayoutSpacing" ) {
if ( MainWindow::self->formWindow() )
- return TQVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() );
+ return TQVariant( MainWindow::self->formWindow()->tqlayoutDefaultSpacing() );
}
- return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName );
+ return *( *defaultProperties->tqfind( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).tqfind( propName );
}
TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )
{
- const TQMetaProperty *p = w->metaObject()->
- property( w->metaObject()->findProperty( propName, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->
+ property( w->tqmetaObject()->tqfindProperty( propName, true ), true );
if ( !p ) {
- int v = defaultValue( w, "alignment" ).toInt();
+ int v = defaultValue( w, "tqalignment" ).toInt();
if ( propName == "hAlign" ) {
if ( ( v & AlignAuto ) == AlignAuto )
return "AlignAuto";
@@ -1724,17 +1724,17 @@ TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propNam
if ( ( v & AlignBottom ) == AlignBottom )
return "AlignBottom";
}
- return TQString::null;
+ return TQString();
}
return p->valueToKey( defaultValue( w, propName ).toInt() );
}
-TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w )
+TQWidget *WidgetFactory::createCustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *w )
{
if ( !w )
return 0;
- return new CustomWidget( parent, name, w );
+ return new CustomWidget( tqparent, name, w );
}
TQVariant WidgetFactory::property( TQObject *w, const char *name )
@@ -1745,13 +1745,13 @@ TQVariant WidgetFactory::property( TQObject *w, const char *name )
return MetaDataBase::fakeProperty( w, name );
}
-void QDesignerLabel::updateBuddy()
+void TQDesignerLabel::updateBuddy()
{
if ( myBuddy.isEmpty() )
return;
- TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, false, true );
+ TQObjectList *l = tqtopLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, false, true );
if ( !l || !l->first() ) {
delete l;
return;
@@ -1761,12 +1761,12 @@ void QDesignerLabel::updateBuddy()
delete l;
}
-void QDesignerWidget::paintEvent( TQPaintEvent *e )
+void TQDesignerWidget::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
-void QDesignerDialog::paintEvent( TQPaintEvent *e )
+void TQDesignerDialog::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
@@ -1776,12 +1776,12 @@ void EditorDialog::paintEvent( TQPaintEvent *e )
formwindow->paintGrid( this, e );
}
-TQSizePolicy QLayoutWidget::sizePolicy() const
+TQSizePolicy TQLayoutWidget::sizePolicy() const
{
return sp;
}
-bool QLayoutWidget::event( TQEvent *e )
+bool TQLayoutWidget::event( TQEvent *e )
{
if ( e && ( e->type() == TQEvent::ChildInserted ||
e->type() == TQEvent::ChildRemoved ||
@@ -1792,14 +1792,15 @@ bool QLayoutWidget::event( TQEvent *e )
}
/*
- This function must be called on QLayoutWidget creation and whenever
- the QLayoutWidget's parent layout changes (e.g., from a QHBoxLayout
- to a TQVBoxLayout), because of the (illogical) way layouting works.
+ This function must be called on TQLayoutWidget creation and whenever
+ the TQLayoutWidget's tqparent tqlayout changes (e.g., from a TQHBoxLayout
+ to a TQVBoxLayout), because of the (illogical) way tqlayouting works.
*/
-void QLayoutWidget::updateSizePolicy()
+void TQLayoutWidget::updateSizePolicy()
{
- if ( !children() || children()->count() == 0 ) {
- sp = TQWidget::sizePolicy();
+ TQObjectList clo = childrenListObject();
+ if ( clo.isEmpty() || clo.count() == 0 ) {
+ sp = TQWidget::tqsizePolicy();
return;
}
@@ -1816,23 +1817,23 @@ void QLayoutWidget::updateSizePolicy()
int ht = (int) TQSizePolicy::Preferred;
int vt = (int) TQSizePolicy::Preferred;
- if ( layout() ) {
+ if ( tqlayout() ) {
/*
- parentLayout is set to the parent layout if there is one and if it is
- top level, in which case layouting is illogical.
+ tqparentLayout is set to the tqparent tqlayout if there is one and if it is
+ top level, in which case tqlayouting is illogical.
*/
- TQLayout *parentLayout = 0;
- if ( parent() && parent()->isWidgetType() ) {
- parentLayout = ((TQWidget *)parent())->layout();
- if ( parentLayout && parentLayout->mainWidget()->inherits("QLayoutWidget") )
- parentLayout = 0;
+ TQLayout *tqparentLayout = 0;
+ if ( tqparent() && tqparent()->isWidgetType() ) {
+ tqparentLayout = ((TQWidget *)tqparent())->tqlayout();
+ if ( tqparentLayout && tqparentLayout->mainWidget()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) )
+ tqparentLayout = 0;
}
- TQObjectListIt it( *children() );
+ TQObjectListIt it( childrenListObject() );
TQObject *o;
- if ( layout()->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) {
- if ( parentLayout && parentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
+ if ( tqlayout()->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) {
+ if ( tqparentLayout && tqparentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
vt = TQSizePolicy::Minimum;
else
vt = TQSizePolicy::Fixed;
@@ -1843,17 +1844,17 @@ void QLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( !w->sizePolicy().mayGrowHorizontally() )
+ if ( !w->tqsizePolicy().mayGrowHorizontally() )
ht &= ~TQSizePolicy::Minimum;
- if ( !w->sizePolicy().mayShrinkHorizontally() )
+ if ( !w->tqsizePolicy().mayShrinkHorizontally() )
ht &= ~TQSizePolicy::Maximum;
- if ( w->sizePolicy().mayGrowVertically() )
+ if ( w->tqsizePolicy().mayGrowVertically() )
vt |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkVertically() )
+ if ( w->tqsizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
- } else if ( layout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) {
- if ( parentLayout && parentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
+ } else if ( tqlayout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) {
+ if ( tqparentLayout && tqparentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
ht = TQSizePolicy::Minimum;
else
ht = TQSizePolicy::Fixed;
@@ -1864,22 +1865,22 @@ void QLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( w->sizePolicy().mayGrowHorizontally() )
+ if ( w->tqsizePolicy().mayGrowHorizontally() )
ht |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkHorizontally() )
+ if ( w->tqsizePolicy().mayShrinkHorizontally() )
ht |= TQSizePolicy::Maximum;
- if ( !w->sizePolicy().mayGrowVertically() )
+ if ( !w->tqsizePolicy().mayGrowVertically() )
vt &= ~TQSizePolicy::Minimum;
- if ( !w->sizePolicy().mayShrinkVertically() )
+ if ( !w->tqsizePolicy().mayShrinkVertically() )
vt &= ~TQSizePolicy::Maximum;
}
- } else if ( layout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
+ } else if ( tqlayout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
ht = TQSizePolicy::Fixed;
vt = TQSizePolicy::Fixed;
- if ( parentLayout ) {
- if ( parentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
+ if ( tqparentLayout ) {
+ if ( tqparentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
ht = TQSizePolicy::Minimum;
- else if ( parentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
+ else if ( tqparentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
vt = TQSizePolicy::Minimum;
}
@@ -1889,22 +1890,29 @@ void QLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( w->sizePolicy().mayGrowHorizontally() )
+ if ( w->tqsizePolicy().mayGrowHorizontally() )
ht |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkHorizontally() )
+ if ( w->tqsizePolicy().mayShrinkHorizontally() )
ht |= TQSizePolicy::Maximum;
- if ( w->sizePolicy().mayGrowVertically() )
+ if ( w->tqsizePolicy().mayGrowVertically() )
vt |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkVertically() )
+ if ( w->tqsizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
}
- if ( layout()->expanding() & TQSizePolicy::Horizontally )
+#ifdef USE_QT4
+ if ( tqlayout()->expandingDirections() & TQSizePolicy::Horizontally )
ht = TQSizePolicy::Expanding;
- if ( layout()->expanding() & TQSizePolicy::Vertically )
+ if ( tqlayout()->expandingDirections() & TQSizePolicy::Vertically )
vt = TQSizePolicy::Expanding;
+#else // USE_QT4
+ if ( tqlayout()->expanding() & TQSizePolicy::Horizontally )
+ ht = TQSizePolicy::Expanding;
+ if ( tqlayout()->expanding() & TQSizePolicy::Vertically )
+ vt = TQSizePolicy::Expanding;
+#endif // USE_QT4
- layout()->invalidate();
+ tqlayout()->tqinvalidate();
}
sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt );
@@ -1913,11 +1921,11 @@ void QLayoutWidget::updateSizePolicy()
void CustomWidget::paintEvent( TQPaintEvent *e )
{
- if ( parentWidget() && parentWidget()->inherits( "FormWindow" ) ) {
- ( (FormWindow*)parentWidget() )->paintGrid( this, e );
+ if ( tqparentWidget() && tqparentWidget()->inherits( "FormWindow" ) ) {
+ ( (FormWindow*)tqparentWidget() )->paintGrid( this, e );
} else {
TQPainter p( this );
- p.fillRect( rect(), colorGroup().dark() );
+ p.fillRect( rect(), tqcolorGroup().dark() );
p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2,
( height() - cusw->pixmap->height() ) / 2,
*cusw->pixmap );
diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h
index 74713544..bfde50ec 100644
--- a/kommander/editor/widgetfactory.h
+++ b/kommander/editor/widgetfactory.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -58,7 +58,7 @@ class TQWidget;
class TQLayout;
class FormWindow;
-class WidgetFactory : public Qt
+class WidgetFactory : public TQt
{
friend class CustomWidgetFactory;
@@ -70,15 +70,15 @@ public:
NoLayout
};
- static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE,
+ static TQWidget *create( int id, TQWidget *tqparent, const char *name = 0, bool init = TRUE,
const TQRect *rect = 0, Qt::Orientation orient = Qt::Horizontal );
- static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
+ static TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type );
static void deleteLayout( TQWidget *widget );
- static LayoutType layoutType( TQWidget *w );
- static LayoutType layoutType( TQWidget *w, TQLayout *&layout );
- static LayoutType layoutType( TQLayout *layout );
- static TQWidget *layoutParent( TQLayout *layout );
+ static LayoutType tqlayoutType( TQWidget *w );
+ static LayoutType tqlayoutType( TQWidget *w, TQLayout *&tqlayout );
+ static LayoutType tqlayoutType( TQLayout *tqlayout );
+ static TQWidget *tqlayoutParent( TQLayout *tqlayout );
static TQWidget* containerOfWidget( TQWidget *w );
static TQWidget* widgetOfContainer( TQWidget *w );
@@ -90,7 +90,7 @@ public:
static bool hasSpecialEditor( int id );
static bool hasItems( int id );
- static void editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
+ static void editWidget( int id, TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw );
static bool canResetProperty( TQObject *w, const TQString &propName );
static bool resetProperty( TQObject *w, const TQString &propName );
@@ -101,21 +101,22 @@ public:
static void saveDefaultProperties( TQWidget *w, int id );
private:
- static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
+ static TQWidget *createWidget( const TQString &className, TQWidget *tqparent, const char *name, bool init,
const TQRect *r = 0, Qt::Orientation orient = Qt::Horizontal );
- static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
+ static TQWidget *createCustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *w );
};
-class QDesignerTabWidget : public QTabWidget
+class TQDesignerTabWidget : public TQTabWidget
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerTabWidget( TQWidget *parent, const char *name );
+ TQDesignerTabWidget( TQWidget *tqparent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
@@ -140,11 +141,12 @@ private:
class EditorTabWidget : public TabWidget
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- EditorTabWidget( TQWidget *parent, const char *name );
+ EditorTabWidget( TQWidget *tqparent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
@@ -169,11 +171,12 @@ private:
class EditorToolBox : public ToolBox
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- EditorToolBox( TQWidget *parent, const char *name );
+ EditorToolBox( TQWidget *tqparent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
@@ -185,14 +188,15 @@ public:
int count() const;
};
-class QDesignerWizard : public QWizard
+class TQDesignerWizard : public TQWizard
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerWizard( TQWidget *parent, const char *name ) : TQWizard( parent, name ) {}
+ TQDesignerWizard( TQWidget *tqparent, const char *name ) : TQWizard( tqparent, name ) {}
int currentPageNum() const;
void setCurrentPage( int i );
@@ -204,7 +208,7 @@ public:
void addPage( TQWidget *p, const TQString & );
void removePage( TQWidget *p );
void insertPage( TQWidget *p, const TQString &t, int index );
- bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); }
+ bool isPageRemoved( TQWidget *p ) { return (removedPages.tqfind( p ) != 0); }
void reject() {}
@@ -212,7 +216,7 @@ private:
struct Page
{
Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {}
- Page() : p( 0 ), t( TQString::null ) {}
+ Page() : p( 0 ), t( TQString() ) {}
TQWidget *p;
TQString t;
};
@@ -220,12 +224,13 @@ private:
};
-class QLayoutWidget : public QWidget
+class TQLayoutWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QLayoutWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ), sp( TQWidget::sizePolicy() ) {}
+ TQLayoutWidget( TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ), sp( TQWidget::tqsizePolicy() ) {}
TQSizePolicy sizePolicy() const;
void updateSizePolicy();
@@ -238,24 +243,25 @@ protected:
};
-class CustomWidget : public QWidget
+class CustomWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *cw )
- : TQWidget( parent, name ), cusw( cw ) {
- alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" );
- setSizePolicy( cw->sizePolicy );
+ CustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *cw )
+ : TQWidget( tqparent, name ), cusw( cw ) {
+ alwaysExpand = tqparentWidget() && tqparentWidget()->inherits( "FormWindow" );
+ tqsetSizePolicy( cw->sizePolicy );
if ( !alwaysExpand )
setBackgroundMode( PaletteDark );
}
- TQSize sizeHint() const {
- TQSize sh = cusw->sizeHint;
+ TQSize tqsizeHint() const {
+ TQSize sh = cusw->tqsizeHint;
if ( sh.isValid() )
return sh;
- return TQWidget::sizeHint();
+ return TQWidget::tqsizeHint();
}
TQString realClassName() { return cusw->className; }
@@ -270,41 +276,43 @@ protected:
};
-class Line : public QFrame
+class Line : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
- Q_OVERRIDE( int frameWidth DESIGNABLE false )
- Q_OVERRIDE( Shape frameShape DESIGNABLE false )
- Q_OVERRIDE( TQRect frameRect DESIGNABLE false )
- Q_OVERRIDE( TQRect contentsRect DESIGNABLE false )
+ TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation )
+ TQ_OVERRIDE( int frameWidth DESIGNABLE false )
+ TQ_OVERRIDE( Shape frameShape DESIGNABLE false )
+ TQ_OVERRIDE( TQRect frameRect DESIGNABLE false )
+ TQ_OVERRIDE( TQRect contentsRect DESIGNABLE false )
public:
- Line( TQWidget *parent, const char *name )
- : TQFrame( parent, name, WMouseNoMask ) {
+ Line( TQWidget *tqparent, const char *name )
+ : TQFrame( tqparent, name, WMouseNoMask ) {
setFrameStyle( HLine | Sunken );
}
- void setOrientation( Orientation orient ) {
- if ( orient == Horizontal )
+ void setOrientation( Qt::Orientation orient ) {
+ if ( orient ==Qt::Horizontal )
setFrameShape( HLine );
else
setFrameShape( VLine );
}
- Orientation orientation() const {
- return frameShape() == HLine ? Horizontal : Vertical;
+ Qt::Orientation orientation() const {
+ return frameShape() == HLine ?Qt::Horizontal :Qt::Vertical;
}
};
-class QDesignerLabel : public QLabel
+class TQDesignerLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
+ TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
public:
- QDesignerLabel( TQWidget *parent = 0, const char *name = 0 )
- : TQLabel( parent, name ) { myBuddy = 0; }
+ TQDesignerLabel( TQWidget *tqparent = 0, const char *name = 0 )
+ : TQLabel( tqparent, name ) { myBuddy = 0; }
void setBuddyWidget( const TQCString &b ) {
myBuddy = b;
@@ -328,13 +336,14 @@ private:
};
-class QDesignerWidget : public QWidget
+class TQDesignerWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerWidget( FormWindow *fw, TQWidget *parent, const char *name )
- : TQWidget( parent, name, WResizeNoErase ), formwindow( fw ) {}
+ TQDesignerWidget( FormWindow *fw, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name, WResizeNoErase ), formwindow( fw ) {}
protected:
void paintEvent( TQPaintEvent *e );
@@ -344,13 +353,14 @@ private:
};
-class QDesignerDialog : public QDialog
+class TQDesignerDialog : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name )
- : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
+ TQDesignerDialog( FormWindow *fw, TQWidget *tqparent, const char *name )
+ : TQDialog( tqparent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
protected:
void paintEvent( TQPaintEvent *e );
@@ -360,96 +370,100 @@ private:
};
-class QDesignerToolButton : public QToolButton
+class TQDesignerToolButton : public TQToolButton
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerToolButton( TQWidget *parent, const char *name )
- : TQToolButton( parent, name ) {}
+ TQDesignerToolButton( TQWidget *tqparent, const char *name )
+ : TQToolButton( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
};
-class QDesignerRadioButton : public QRadioButton
+class TQDesignerRadioButton : public TQRadioButton
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerRadioButton( TQWidget *parent, const char *name )
- : TQRadioButton( parent, name ) {}
+ TQDesignerRadioButton( TQWidget *tqparent, const char *name )
+ : TQRadioButton( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
};
-class QDesignerPushButton : public QPushButton
+class TQDesignerPushButton : public TQPushButton
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerPushButton( TQWidget *parent, const char *name )
- : TQPushButton( parent, name ) {}
+ TQDesignerPushButton( TQWidget *tqparent, const char *name )
+ : TQPushButton( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
};
-class QDesignerCheckBox : public QCheckBox
+class TQDesignerCheckBox : public TQCheckBox
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerCheckBox( TQWidget *parent, const char *name )
- : TQCheckBox( parent, name ) {}
+ TQDesignerCheckBox( TQWidget *tqparent, const char *name )
+ : TQCheckBox( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
@@ -458,10 +472,11 @@ public:
class EditorDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditorDialog( FormWindow *fw, TQWidget *parent, const char *name )
- : Dialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) { }
+ EditorDialog( FormWindow *fw, TQWidget *tqparent, const char *name )
+ : Dialog( tqparent, name, FALSE, WResizeNoErase ), formwindow( fw ) { }
protected:
void paintEvent( TQPaintEvent *e );
diff --git a/kommander/editor/widgetinterface.h b/kommander/editor/widgetinterface.h
index bf6bcd55..364e9871 100644
--- a/kommander/editor/widgetinterface.h
+++ b/kommander/editor/widgetinterface.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -21,9 +21,9 @@
#ifndef WIDGETINTERFACE_H
#define WIDGETINTERFACE_H
-#include
+#include
-#define WidgetInterface QWidgetFactoryInterface
-#define IID_Widget IID_QWidgetFactory
+#define WidgetInterface TQWidgetFactoryInterface
+#define IID_Widget IID_TQWidgetFactory
#endif
diff --git a/kommander/editor/wizardeditor.ui b/kommander/editor/wizardeditor.ui
index c73e2628..f575a13a 100644
--- a/kommander/editor/wizardeditor.ui
+++ b/kommander/editor/wizardeditor.ui
@@ -1,6 +1,6 @@
WizardEditorBase
-
+
WizardEditorBase
@@ -25,7 +25,7 @@
6
-
+
Layout19
@@ -39,7 +39,7 @@
6
-
+
Layout14
@@ -53,7 +53,7 @@
2
-
+
pagesLabel
@@ -61,14 +61,14 @@
Wizard pages:
-
+
listBox
-
+
Layout18
@@ -82,7 +82,7 @@
6
-
+
buttonAdd
@@ -90,7 +90,7 @@
&Add
-
+
buttonRemove
@@ -108,14 +108,14 @@
Expanding
-
+
20
20
-
+
buttonUp
@@ -126,7 +126,7 @@
image0
-
+
buttonDown
@@ -141,7 +141,7 @@
-
+
Layout1
@@ -155,7 +155,7 @@
6
-
+
buttonHelp
@@ -176,14 +176,14 @@
Expanding
-
+
20
20
-
+
buttonOk
@@ -200,7 +200,7 @@
Close the dialog and apply all the changes.
-
+
buttonApply
@@ -214,7 +214,7 @@
Apply all changes.
-
+
buttonCancel
@@ -302,7 +302,7 @@
cancelClicked()
-
+
init()
destroy()
addClicked()
@@ -315,6 +315,6 @@
okClicked()
removeClicked()
upClicked()
-
-
+
+
diff --git a/kommander/editor/wizardeditorimpl.cpp b/kommander/editor/wizardeditorimpl.cpp
index dfed9a2f..602f8376 100644
--- a/kommander/editor/wizardeditorimpl.cpp
+++ b/kommander/editor/wizardeditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -31,8 +31,8 @@
#include
-WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw )
- : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w )
+WizardEditor::WizardEditor( TQWidget *tqparent, TQWizard *w, FormWindow *fw )
+ : WizardEditorBase( tqparent, 0 ), formwindow( fw ), wizard( w )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
fillListBox();
@@ -109,7 +109,7 @@ void WizardEditor::addClicked()
listBox->insertItem( i18n( "Page" ), index );
// schedule add command
- AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wizard->name() ),
+ AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).tqarg( wizard->name() ),
formwindow, wizard, "Page", index, false);
commands.append( cmd );
@@ -128,7 +128,7 @@ void WizardEditor::removeClicked()
// schedule remove command
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" )
- .arg( listBox->text( index ) ).arg( wizard->name() ),
+ .tqarg( listBox->text( index ) ).tqarg( wizard->name() ),
formwindow, wizard, index, false );
commands.append( cmd );
@@ -148,8 +148,8 @@ void WizardEditor::upClicked()
listBox->setCurrentItem( index2 );
// schedule swap command
- SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 )
- .arg( wizard->name() ), formwindow, wizard, index1, index2);
+ SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).tqarg( index1 ).tqarg( index2 )
+ .tqarg( wizard->name() ), formwindow, wizard, index1, index2);
commands.append( cmd );
// update buttons
@@ -168,8 +168,8 @@ void WizardEditor::downClicked()
listBox->setCurrentItem( index2 );
// schedule swap command
- SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 )
- .arg( wizard->name() ), formwindow, wizard, index2, index1);
+ SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).tqarg( index1 ).tqarg( index2 )
+ .tqarg( wizard->name() ), formwindow, wizard, index2, index1);
commands.append( cmd );
// update buttons
@@ -199,7 +199,7 @@ void WizardEditor::itemSelected( int index )
bool ok = false;
TQString text = KInputDialog::getText( i18n("Page Title"), i18n("New page title:" ), listBox->text( index ), &ok, this );
if ( ok ) {
- TQString pn( i18n("Rename page %1 of %2" ).arg( listBox->text( index ) ).arg( wizard->name() ) );
+ TQString pn( i18n("Rename page %1 of %2" ).tqarg( listBox->text( index ) ).tqarg( wizard->name() ) );
RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formwindow, wizard, index, text );
commands.append( cmd );
listBox->changeItem( text, index );
diff --git a/kommander/editor/wizardeditorimpl.h b/kommander/editor/wizardeditorimpl.h
index 128aa467..bc5f68bf 100644
--- a/kommander/editor/wizardeditorimpl.h
+++ b/kommander/editor/wizardeditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -32,9 +32,10 @@ class FormWindow;
class WizardEditor : public WizardEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- WizardEditor( TQWidget *parent, TQWizard *wizard, FormWindow *fw );
+ WizardEditor( TQWidget *tqparent, TQWizard *wizard, FormWindow *fw );
~WizardEditor();
protected slots:
diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp
index 90f0891d..ecccce3d 100644
--- a/kommander/editor/workspace.cpp
+++ b/kommander/editor/workspace.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2001 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -102,11 +102,11 @@ static TQPixmap *filePixmap = 0;
static TQPixmap* formPixmap = 0;
#ifndef KOMMANDER
-WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p )
+WorkspaceItem::WorkspaceItem( TQListView *tqparent, Project* p )
#else
-WorkspaceItem::WorkspaceItem( TQListView *parent )
+WorkspaceItem::WorkspaceItem( TQListView *tqparent )
#endif
- : TQListViewItem( parent )
+ : TQListViewItem( tqparent )
{
init();
#ifndef KOMMANDER
@@ -118,8 +118,8 @@ WorkspaceItem::WorkspaceItem( TQListView *parent )
}
#ifndef KOMMANDER
-WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
- : TQListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *tqparent, SourceFile* sf )
+ : TQListViewItem( tqparent )
{
init();
sourceFile = sf;
@@ -128,8 +128,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
}
#endif
-WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
- : TQListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *tqparent, FormFile* ff, Type type )
+ : TQListViewItem( tqparent )
{
init();
formFile = ff;
@@ -146,8 +146,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
}
}
-WorkspaceItem::WorkspaceItem( TQListView *parent, FormFile* ff, Type type )
- : TQListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListView *tqparent, FormFile* ff, Type type )
+ : TQListViewItem( tqparent )
{
init();
formFile = ff;
@@ -180,7 +180,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
{
TQColorGroup g( cg );
g.setColor( TQColorGroup::Base, backgroundColor() );
- g.setColor( TQColorGroup::Foreground, Qt::black );
+ g.setColor( TQColorGroup::Foreground, TQt::black );
#ifndef KOMMANDER
if ( type() == FormSourceType && !formFile->hasFormCode() ) {
@@ -188,7 +188,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) );
} else {
#endif
- g.setColor( TQColorGroup::Text, Qt::black );
+ g.setColor( TQColorGroup::Text, TQt::black );
#ifndef KOMMANDER
}
#endif
@@ -236,7 +236,7 @@ TQString WorkspaceItem::text( int column ) const
#endif
}
- return TQString::null; // shut up compiler
+ return TQString(); // shut up compiler
}
void WorkspaceItem::fillCompletionList( TQStringList& completion )
@@ -310,8 +310,8 @@ TQString WorkspaceItem::key( int column, bool ) const
TQColor WorkspaceItem::backgroundColor()
{
bool b = useOddColor;
- if ( t == FormSourceType && parent() )
- b = ( ( WorkspaceItem*)parent() )->useOddColor;
+ if ( t == FormSourceType && tqparent() )
+ b = ( ( WorkspaceItem*)tqparent() )->useOddColor;
return b ? *backColor2 : *backColor1;
}
@@ -328,8 +328,8 @@ void WorkspaceItem::setAutoOpen( bool b )
autoOpen = b;
}
-Workspace::Workspace( TQWidget *parent, MainWindow *mw )
- : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+Workspace::Workspace( TQWidget *tqparent, MainWindow *mw )
+ : TQListView( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ),
#ifndef KOMMANDER
project( 0 ), completionDirty( false )
@@ -485,9 +485,9 @@ void Workspace::update( FormFile* ff )
{
TQListViewItem* i = findItem( ff );
if ( i ) {
- i->repaint();
+ i->tqrepaint();
if ( (i = i->firstChild()) )
- i->repaint();
+ i->tqrepaint();
}
}
@@ -559,7 +559,7 @@ void Workspace::closeAutoOpenItems()
TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
WorkspaceItem* i = (WorkspaceItem*) it.current();
- WorkspaceItem* ip = (WorkspaceItem*) i->parent();
+ WorkspaceItem* ip = (WorkspaceItem*) i->tqparent();
if ( i->type() == WorkspaceItem::FormSourceType ) {
if ( !i->isSelected() && !ip->isSelected()
&& ip->isAutoOpen() ) {
@@ -583,7 +583,7 @@ void Workspace::itemDoubleClicked( TQListViewItem *i )
void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
{
- if ( !i || button != LeftButton )
+ if ( !i || button != Qt::LeftButton )
return;
closeAutoOpenItems();
@@ -699,7 +699,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
break;
#endif
case OPEN_SOURCE:
- itemClicked( LeftButton, i, pos );
+ itemClicked( Qt::LeftButton, i, pos );
break;
#ifndef KOMMANDER
case REMOVE_FORM: // FIXME
@@ -707,10 +707,10 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
break;
#endif
case OPEN_FORM:
- itemClicked( LeftButton, i, pos );
+ itemClicked( Qt::LeftButton, i, pos );
break;
case OPEN_FORM_SOURCE:
- itemClicked( LeftButton, i, pos );
+ itemClicked( Qt::LeftButton, i, pos );
break;
default:
break;
@@ -720,7 +720,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
bool Workspace::eventFilter( TQObject *o, TQEvent * e )
{
// Reggie, on what type of events do we have to execute updateBufferEdit()
- if ( o ==bufferEdit && e->type() != TQEvent::ChildRemoved )
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved )
updateBufferEdit();
return TQListView::eventFilter( o, e );
}
@@ -755,7 +755,7 @@ void Workspace::bufferChosen( const TQString &buffer )
bufferEdit->setText( "" );
#ifndef KOMMANDER
- if ( MainWindow::self->projectFileNames().contains( buffer ) ) {
+ if ( MainWindow::self->projectFileNames().tqcontains( buffer ) ) {
MainWindow::self->setCurrentProjectByFilename( buffer );
return;
}
@@ -764,7 +764,7 @@ void Workspace::bufferChosen( const TQString &buffer )
TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) {
- itemClicked( LeftButton, it.current(), TQPoint() );
+ itemClicked( Qt::LeftButton, it.current(), TQPoint() );
break;
}
++it;
diff --git a/kommander/editor/workspace.h b/kommander/editor/workspace.h
index 61f772dd..99470207 100644
--- a/kommander/editor/workspace.h
+++ b/kommander/editor/workspace.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -40,21 +40,21 @@ class QCompletionEdit;
class SourceEditor;
#endif
-class WorkspaceItem : public QListViewItem
+class WorkspaceItem : public TQListViewItem
{
public:
enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType };
#ifndef KOMMANDER
- //WorkspaceItem( TQListView *parent, Project* p );
+ //WorkspaceItem( TQListView *tqparent, Project* p );
#else
- WorkspaceItem(TQListView *parent);
+ WorkspaceItem(TQListView *tqparent);
#endif
#ifndef KOMMANDER
-// WorkspaceItem( TQListViewItem *parent, SourceFile* sf );
+// WorkspaceItem( TQListViewItem *tqparent, SourceFile* sf );
#endif
- WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type t = FormFileType );
- WorkspaceItem( TQListView *parent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( TQListViewItem *tqparent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( TQListView *tqparent, FormFile* ff, Type t = FormFileType );
void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
@@ -91,12 +91,13 @@ private:
Type t;
};
-class Workspace : public QListView
+class Workspace : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- Workspace( TQWidget *parent , MainWindow *mw );
+ Workspace( TQWidget *tqparent , MainWindow *mw );
#ifndef KOMMANDER
void setCurrentProject( Project *pro );
diff --git a/kommander/examples/current/a1.kmdr b/kommander/examples/current/a1.kmdr
index e8b99ac3..7399bc73 100755
--- a/kommander/examples/current/a1.kmdr
+++ b/kommander/examples/current/a1.kmdr
@@ -49,7 +49,7 @@ debug("pid="+pid)
StatusBar8
-
+
Layout37
@@ -121,7 +121,7 @@ debug("pid="+pid)
and again
-
+
Layout83
@@ -145,7 +145,7 @@ debug("pid="+pid)
Expanding
-
+
40
0
@@ -176,7 +176,7 @@ StatusBar8.setText("Returned: "+b)
Expanding
-
+
46
0
@@ -185,7 +185,7 @@ StatusBar8.setText("Returned: "+b)
-
+
Layout84
@@ -209,7 +209,7 @@ StatusBar8.setText("Returned: "+b)
Expanding
-
+
80
0
@@ -243,7 +243,7 @@ StatusBar8.setText("Returned: "+b)
Expanding
-
+
60
0
@@ -254,5 +254,5 @@ StatusBar8.setText("Returned: "+b)
-
+
diff --git a/kommander/examples/current/b1.kmdr b/kommander/examples/current/b1.kmdr
index 09725243..bc02ab80 100755
--- a/kommander/examples/current/b1.kmdr
+++ b/kommander/examples/current/b1.kmdr
@@ -26,7 +26,7 @@ else
StatusBar9.insertItem("ARG1="+_ARG1, 1)
StatusBar9.insertItem("ARG2="+_ARG2, 2)
endif
-//message_info(parentPid)
+//message_info(tqparentPid)
@@ -82,7 +82,7 @@ endif
Expanding
-
+
111
0
@@ -104,7 +104,7 @@ endif
Expanding
-
+
50
0
@@ -120,8 +120,8 @@ endif
- //message_info("parentPid = "+parentPid+"\npid = "+pid)
-dcop("kmdr-executor-"+parentPid, "KommanderIf", "setText(QString,QString)", "StatusBar8", "Hello")
+ //message_info("tqparentPid = "+tqparentPid+"\npid = "+pid)
+dcop("kmdr-executor-"+tqparentPid, "KommanderIf", "setText(QString,QString)", "StatusBar8", "Hello")
@@ -131,5 +131,5 @@ dcop("kmdr-executor-"+parentPid, "KommanderIf", "setText(QString,QString)", "Sta
-
+
diff --git a/kommander/examples/current/editor-poc.kmdr b/kommander/examples/current/editor-poc.kmdr
index d9b14fd1..6a084397 100755
--- a/kommander/examples/current/editor-poc.kmdr
+++ b/kommander/examples/current/editor-poc.kmdr
@@ -1,6 +1,6 @@
KEdemo
-
+
KEdemo
@@ -73,7 +73,7 @@ _file["dirty"] = true
- @Input.text("Kommander Edit", "Text to find", "")
+ @Input.text("Kommander Edit", "Text to tqfind", "")
@@ -179,16 +179,16 @@ while chrs < maxc do
//debug("link test = "+str_mid(a, ch, 2)+" pos="+ch)
if str_mid(a, ch, 2) == "<a" then
inlink = true
- lb = str_toint(str_find(a, "\"", ch)+1)
- le = str_toint(str_find(a, "\"", lb))
+ lb = str_toint(str_tqfind(a, "\"", ch)+1)
+ le = str_toint(str_tqfind(a, "\"", lb))
linkscript = str_mid(a, lb, le-lb)
//debug("link data - "+lb+" "+le+" "+linkscript)
elseif str_mid(a, ch, 3) == "<p>" then
lc = lc + 1
cc = 0
endif
- ck1 = str_toint(str_find(a, ">", ch))+1
- ck2 = str_find(a, "<", ck1)
+ ck1 = str_toint(str_tqfind(a, ">", ch))+1
+ ck2 = str_tqfind(a, "<", ck1)
if ck1 == -1 || ck2 == -1 then
break
endif
@@ -303,9 +303,9 @@ debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1))
<stringlist>
<string></string>
<string>@Array.setValue(help, "Proof of concept", "<center><h2>Kommander MainWindow frames!</h2></center><p>As Kommander took on functionality an attempt was made to make a MainWindow Kommander widget. Sadly it was a huge time loss for two developers who both gave up after days of trying. The problem was with the editor. However you can use a Qt Designer generated UI file renamed to a *.kmdr file. Into this frame you can place your widgets and make a working application where nearly everything works.</p>")
-@Array.setValue(help, "Known limitations", "<center><h2>Known limitations</h2></center><p>As of this writing what is known not to work on the Kommander side is the settings read and write. There is no Initialize or Destroy section as there is no Kommander Text, however there are signals for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any Actions as these are QActions from Designer and KActions are not derived from QActions in KDE 3x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Given that this is an unsupported use of Kommander it everything that does work makes it suitable for probably most small application uses.. </p>")
+@Array.setValue(help, "Known limitations", "<center><h2>Known limitations</h2></center><p>As of this writing what is known not to work on the Kommander side is the settings read and write. There is no Initialize or Destroy section as there is no Kommander Text, however there are Q_SIGNALS for this on the window, so the functionality is intact. On the MainWindow side it is not possible to talk to any Actions as these are QActions from Designer and KActions are not derived from QActions in KDE 3x. This means a DCOP call to list actions or set states will not work. It is also not possible to talk to the Statusbar. Also submenus on the menubar and dropdown actions on the Toolbar will not work. Given that this is an unsupported use of Kommander it everything that does work makes it suitable for probably most small application uses.. </p>")
@Array.setValue(help, "Rolling your own", "<center><h2>Rolling your own</h2></center><p>It is our intention to have a template in the 1.3 release of a MainWindow, but if you have Qt Designer for Qt 3x you can easily start a window design, save it, rename to *.kmdr and open in Kommander. Remember not to add widgets in Designer as Kommander will not recognize them.</p>")
-@Array.setValue(help, "Using Actions", "<center><h2>Using Actions</h2></center><p>If you want to get the goodies, menus, toolbars and accelerator keys, you need to use actions. Kommander has an Action editor on the window menu under Views. There you can add actions and there is a shortcut to connecting them with signals and slots. To get everything working select an Action and look in the properties menu for settings like name, text and icon. For menus and toolbars try right clicking on them for context menus. Now from the Action View drag an Action to the menu or toolbar. See the visual feedback? Just connect your Action to a script and you have three different ways to call it.</p>
+@Array.setValue(help, "Using Actions", "<center><h2>Using Actions</h2></center><p>If you want to get the goodies, menus, toolbars and accelerator keys, you need to use actions. Kommander has an Action editor on the window menu under Views. There you can add actions and there is a shortcut to connecting them with Q_SIGNALS and Q_SLOTS. To get everything working select an Action and look in the properties menu for settings like name, text and icon. For menus and toolbars try right clicking on them for context menus. Now from the Action View drag an Action to the menu or toolbar. See the visual feedback? Just connect your Action to a script and you have three different ways to call it.</p>
")
@Array.setValue(help, "Link examples", "<center><h2>Link examples</h2></center><p>This demo shows examples of linking. Links will show in the TextEdit widget, but they don't do anything. In the TextBrowser they open web pages and email links, but of course you can't edit in the TextBrowser. If you don't mind writing some script you can set up your own link handling, which I've done here. Note that it will follow links anywhere in the editor. If the link is a widget name it assumes it to be a script and calls it. If not it looks to see if it is a web link and calls that</p><p>It would be easy to extend this script to accept link parameters and process emails. You could also make a reference to other text objects, tab widget tabs, pretty much anything you can think of.</p>")
@Array.setValue(help, "How this help works", "<center><h2>How this help works</h2></center><p>Do you wonder where this help came from? It is possible to use KDE help if you write DocBook, make it and install it. This quick help is fast and can contain <i>rich text</i>. To look at the dialog copy the text in the hidden TextEdit (set to text mode so as not to muck things up with rich text interperting XML) and paste it to a text editor like KWrite. Save it as a Kommander file and open it in the Kommander Editor.</p>")
@@ -331,7 +331,7 @@ debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1))
<property name="spacing">
<number>6</number>
</property>
- <widget class="QSplitter" row="0" column="0" rowspan="2" colspan="2">
+ <widget class=TQSPLITTER_OBJECT_NAME_STRING row="0" column="0" rowspan="2" colspan="2">
<property name="name">
<cstring>Splitter5</cstring>
</property>
@@ -428,7 +428,7 @@ debug("Clicked at: "+Self.Item(0)+" "+Self.Item(1))
<slot>execute()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
@@ -1064,5 +1064,5 @@ TextEdit5.setColor(color)
setChecked(bool)
-
+
diff --git a/kommander/examples/current/keyvaluecombo.kmdr b/kommander/examples/current/keyvaluecombo.kmdr
index 9815c333..b4a35126 100644
--- a/kommander/examples/current/keyvaluecombo.kmdr
+++ b/kommander/examples/current/keyvaluecombo.kmdr
@@ -63,7 +63,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10)
6
-
+
Layout27
@@ -100,7 +100,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10)
-
+
Layout30
@@ -122,7 +122,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10)
Right click for menu
-
+
Layout24
@@ -164,7 +164,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10)
-
+
Layout23
@@ -227,7 +227,7 @@ PopupMenu1.insertMenuItem("Help About", "PopupMenu1", 10)
-
+
Layout31
@@ -384,5 +384,5 @@ endif
ComboBox10
ListBox1
-
+
diff --git a/kommander/examples/current/kpartmwframe.kmdr b/kommander/examples/current/kpartmwframe.kmdr
index 134f28af..6e334aa6 100755
--- a/kommander/examples/current/kpartmwframe.kmdr
+++ b/kommander/examples/current/kpartmwframe.kmdr
@@ -1,6 +1,6 @@
KKPdemo
-
+
KKPdemo
@@ -58,7 +58,7 @@
-
+
Layout5
@@ -95,7 +95,7 @@ _loadup = 2
#!kommander
if widgetExists("ScriptObject13") then
- TextBrowser1.setText("This text was written by a script on the parent frame window. It could have been a dialog, but we chose to illustrate with a MainWindow for this demo.")
+ TextBrowser1.setText("This text was written by a script on the tqparent frame window. It could have been a dialog, but we chose to illustrate with a MainWindow for this demo.")
ScriptObject13.execute
else
message_error("You do not have the KPart child dialog loaded")
@@ -614,5 +614,5 @@ endif
execute()
-
+
diff --git a/kommander/examples/current/kpartpart.kmdr b/kommander/examples/current/kpartpart.kmdr
index 928ecdc6..0763fada 100755
--- a/kommander/examples/current/kpartpart.kmdr
+++ b/kommander/examples/current/kpartpart.kmdr
@@ -42,16 +42,16 @@
You can click the test button to insert text
-If you are loaded in the parent frame you can click the rocket icon on the toolbar or use the function menu to select "Talk to KPart".
+If you are loaded in the tqparent frame you can click the rocket icon on the toolbar or use the function menu to select "Talk to KPart".
-Any Kommander program can be run as a KPart. You need the KPart plugin to load KParts. Note that running Kommander programs as KParts is not without risks. For one thing you loose DCOP in the parent and the old parser ceases to work. Additionally since all widgets are accecssible from the parent and duplicate widget name can cause a Kommander lock up.
+Any Kommander program can be run as a KPart. You need the KPart plugin to load KParts. Note that running Kommander programs as KParts is not without risks. For one thing you loose DCOP in the tqparent and the old parser ceases to work. Additionally since all widgets are accecssible from the tqparent and duplicate widget name can cause a Kommander lock up.
-Because of all this and the fact that the Actions on the unsupported MainWindow are incompatible it is impossible for the child to talk with the parent. On this dialog we use a timer on the parent polling the child for requests every 100 ms. It's a crude hack but it does yield acceptable behavior.
+Because of all this and the fact that the Actions on the unsupported MainWindow are incompatible it is impossible for the child to talk with the tqparent. On this dialog we use a timer on the tqparent polling the child for requests every 100 ms. It's a crude hack but it does yield acceptable behavior.
This demo is intended to run both kpartwmframe.kmdr and kpartpart.kmdr.
-
+
Layout70
@@ -75,7 +75,7 @@ This demo is intended to run both kpartwmframe.kmdr and kpartpart.kmdr.
Expanding
-
+
75
0
@@ -97,7 +97,7 @@ endif
if _LOADED == true then
kpmessage.setText("You have mail")
else
- message_info("this only works when loaded as a KPart in it's parent window")
+ message_info("this only works when loaded as a KPart in it's tqparent window")
endif
@@ -122,7 +122,7 @@ endif
- message_info("We just got a message from our parent frame!", "Parent called Child")
+ message_info("We just got a message from our tqparent frame!", "Parent called Child")
@@ -156,7 +156,7 @@ endif
Expanding
-
+
40
0
@@ -167,5 +167,5 @@ endif
-
+
diff --git a/kommander/examples/current/passvariables.kmdr b/kommander/examples/current/passvariables.kmdr
index 2d3b9e03..95270a83 100644
--- a/kommander/examples/current/passvariables.kmdr
+++ b/kommander/examples/current/passvariables.kmdr
@@ -90,7 +90,7 @@ LineEdit6.setText(ret)
Set
-
+
AlignVCenter|AlignRight
@@ -101,7 +101,7 @@ LineEdit6.setText(ret)
Pass back
-
+
AlignVCenter|AlignRight
@@ -124,7 +124,7 @@ LineEdit6.setText(ret)
// test for PHP
pt = exec("php --version")
-if str_contains(pt, "Zend") then
+if str_tqcontains(pt, "Zend") then
php = ScriptObjectPHP.execute(LineEdit7.text,LineEdit1.text,LineEdit2.text)
LineEdit4.setText(php)
else
@@ -140,7 +140,7 @@ endif
Pass back
-
+
AlignVCenter|AlignRight
@@ -151,7 +151,7 @@ endif
Set with @
-
+
AlignVCenter|AlignRight
@@ -162,7 +162,7 @@ endif
Return
-
+
AlignVCenter|AlignRight
@@ -178,7 +178,7 @@ endif
Return
-
+
AlignVCenter|AlignRight
@@ -272,14 +272,14 @@ echo round(@Self.Item(1)/@Self.Item(2),5)
Expanding
-
+
108
0
-
+
Layout1
@@ -303,7 +303,7 @@ echo round(@Self.Item(1)/@Self.Item(2),5)
Expanding
-
+
71
0
@@ -368,7 +368,7 @@ echo round(@Self.Item(1)/@Self.Item(2),5)
Expanding
-
+
71
0
@@ -412,5 +412,5 @@ echo round(@Self.Item(1)/@Self.Item(2),5)
popup(int,int)
-
+
diff --git a/kommander/examples/current/tableselect.kmdr b/kommander/examples/current/tableselect.kmdr
index 09dd6cd8..a8617103 100755
--- a/kommander/examples/current/tableselect.kmdr
+++ b/kommander/examples/current/tableselect.kmdr
@@ -51,7 +51,7 @@ AboutDialog9.setBugAddress("eric@kdewebdev.org")
6
-
+
Layout2
@@ -99,7 +99,7 @@ AboutDialog9.setBugAddress("eric@kdewebdev.org")
-
+
Layout1
@@ -348,7 +348,7 @@ TextBrowser1.setText(result)
0
-
+
24
24
@@ -407,7 +407,7 @@ end
0
-
+
24
24
@@ -498,5 +498,5 @@ end
popup(int,int)
-
+
diff --git a/kommander/examples/old/checkmail.kmdr b/kommander/examples/old/checkmail.kmdr
index d4fda432..75aff6d0 100644
--- a/kommander/examples/old/checkmail.kmdr
+++ b/kommander/examples/old/checkmail.kmdr
@@ -40,5 +40,5 @@
-
+
diff --git a/kommander/examples/old/ex1.kmdr b/kommander/examples/old/ex1.kmdr
index a916ee22..f2c53005 100644
--- a/kommander/examples/old/ex1.kmdr
+++ b/kommander/examples/old/ex1.kmdr
@@ -101,5 +101,5 @@
-
+
diff --git a/kommander/examples/old/execprogram.kmdr b/kommander/examples/old/execprogram.kmdr
index 1149a3e2..7dc9a07b 100644
--- a/kommander/examples/old/execprogram.kmdr
+++ b/kommander/examples/old/execprogram.kmdr
@@ -35,7 +35,7 @@
-
+
Layout2
@@ -59,7 +59,7 @@
Expanding
-
+
30
0
@@ -89,7 +89,7 @@
Expanding
-
+
30
0
@@ -100,5 +100,5 @@
-
+
diff --git a/kommander/examples/old/firstform.kmdr.kmdr b/kommander/examples/old/firstform.kmdr.kmdr
index 68993392..e01c228e 100644
--- a/kommander/examples/old/firstform.kmdr.kmdr
+++ b/kommander/examples/old/firstform.kmdr.kmdr
@@ -35,7 +35,7 @@
-
+
Layout1
@@ -84,5 +84,5 @@
-
+
diff --git a/kommander/examples/old/form1.kmdr b/kommander/examples/old/form1.kmdr
index e44b1e14..1d75334d 100644
--- a/kommander/examples/old/form1.kmdr
+++ b/kommander/examples/old/form1.kmdr
@@ -92,5 +92,5 @@
-
+
diff --git a/kommander/examples/old/form2.kmdr b/kommander/examples/old/form2.kmdr
index 060fda56..fa488f56 100644
--- a/kommander/examples/old/form2.kmdr
+++ b/kommander/examples/old/form2.kmdr
@@ -25,7 +25,7 @@
6
-
+
Layout3
@@ -73,7 +73,7 @@
-
+
Layout1
@@ -114,5 +114,5 @@
-
+
diff --git a/kommander/examples/old/form3.kmdr b/kommander/examples/old/form3.kmdr
index 2b1ffbb2..18eb8bae 100644
--- a/kommander/examples/old/form3.kmdr
+++ b/kommander/examples/old/form3.kmdr
@@ -58,5 +58,5 @@
-
+
diff --git a/kommander/examples/old/form4.kmdr b/kommander/examples/old/form4.kmdr
index 831c2878..672dbb51 100644
--- a/kommander/examples/old/form4.kmdr
+++ b/kommander/examples/old/form4.kmdr
@@ -25,7 +25,7 @@
6
-
+
Layout1
@@ -84,5 +84,5 @@
setWidgetText(const QString&)
-
+
diff --git a/kommander/examples/old/form5.kmdr b/kommander/examples/old/form5.kmdr
index 7efeafda..fd71919e 100644
--- a/kommander/examples/old/form5.kmdr
+++ b/kommander/examples/old/form5.kmdr
@@ -64,7 +64,7 @@
true
-
+
TextLabel1
@@ -152,7 +152,7 @@
true
-
+
TextLabel1_2
@@ -342,5 +342,5 @@ Ha ha. We got it all with Kommander!
setText(const QString&)
-
+
diff --git a/kommander/examples/old/newfile.kmdr b/kommander/examples/old/newfile.kmdr
index f02ca8e8..e753c6c0 100644
--- a/kommander/examples/old/newfile.kmdr
+++ b/kommander/examples/old/newfile.kmdr
@@ -15,7 +15,7 @@
Quick Start
-
+
TextLabel2
@@ -31,7 +31,7 @@
Title:
-
+
TextLabel1
@@ -930,5 +930,5 @@
setEnabled(bool)
-
+
diff --git a/kommander/examples/old/populate.kmdr b/kommander/examples/old/populate.kmdr
index a5c5090d..71b9cd3d 100644
--- a/kommander/examples/old/populate.kmdr
+++ b/kommander/examples/old/populate.kmdr
@@ -25,7 +25,7 @@
6
-
+
Layout2
@@ -39,7 +39,7 @@
6
-
+
Layout1
@@ -107,5 +107,5 @@
populate()
-
+
diff --git a/kommander/examples/old/resize.kmdr b/kommander/examples/old/resize.kmdr
index 27ff5309..869cce3b 100644
--- a/kommander/examples/old/resize.kmdr
+++ b/kommander/examples/old/resize.kmdr
@@ -25,7 +25,7 @@
6
-
+
Layout2
@@ -65,7 +65,7 @@
Directory
-
+
TextLabel1
@@ -73,7 +73,7 @@
Source directory:
-
+
TextLabel2
@@ -83,7 +83,7 @@
-
+
Layout3
@@ -97,7 +97,7 @@
6
-
+
TextLabel3
@@ -115,7 +115,7 @@
-
+
TextLabel4
@@ -143,7 +143,7 @@
Expanding
-
+
141
0
@@ -152,7 +152,7 @@
-
+
Layout4
@@ -176,7 +176,7 @@
Expanding
-
+
251
0
@@ -213,5 +213,5 @@ done
-
+
diff --git a/kommander/examples/old/selectedwidgettext.kmdr b/kommander/examples/old/selectedwidgettext.kmdr
index 058b6d86..60711066 100644
--- a/kommander/examples/old/selectedwidgettext.kmdr
+++ b/kommander/examples/old/selectedwidgettext.kmdr
@@ -50,7 +50,7 @@
-
+
Layout1
@@ -90,7 +90,7 @@
Expanding
-
+
0
30
@@ -101,5 +101,5 @@
-
+
diff --git a/kommander/examples/old/settings.kmdr b/kommander/examples/old/settings.kmdr
index 1e028434..f336d645 100644
--- a/kommander/examples/old/settings.kmdr
+++ b/kommander/examples/old/settings.kmdr
@@ -35,7 +35,7 @@
6
-
+
Layout7
@@ -49,7 +49,7 @@
6
-
+
TextLabel1
@@ -83,7 +83,7 @@
-
+
Layout6
@@ -97,7 +97,7 @@
6
-
+
Layout5
@@ -158,7 +158,7 @@ Items")
-
+
Layout2
@@ -182,7 +182,7 @@ Items")
Expanding
-
+
30
0
@@ -215,7 +215,7 @@ Items")
Expanding
-
+
30
0
@@ -260,5 +260,5 @@ Items")
populate()
-
+
diff --git a/kommander/examples/old/simplelist.kmdr b/kommander/examples/old/simplelist.kmdr
index 42a32323..2bb27af7 100644
--- a/kommander/examples/old/simplelist.kmdr
+++ b/kommander/examples/old/simplelist.kmdr
@@ -15,7 +15,7 @@
Form1
-
+
TextLabel1
@@ -210,5 +210,5 @@
-
+
diff --git a/kommander/examples/old/tar.kmdr b/kommander/examples/old/tar.kmdr
index 37fcd10d..35922292 100644
--- a/kommander/examples/old/tar.kmdr
+++ b/kommander/examples/old/tar.kmdr
@@ -131,7 +131,7 @@
-
+
Layout9
@@ -281,14 +281,14 @@
Fixed
-
+
30
16
-
+
Layout7
@@ -329,7 +329,7 @@
-
+
Layout5
@@ -343,7 +343,7 @@
6
-
+
TextLabel1
@@ -358,7 +358,7 @@
-
+
Layout6
@@ -372,7 +372,7 @@
6
-
+
TextLabel2
@@ -390,7 +390,7 @@
-
+
Layout7
@@ -414,7 +414,7 @@
Expanding
-
+
103
0
@@ -439,7 +439,7 @@
Expanding
-
+
104
0
@@ -464,7 +464,7 @@
Expanding
-
+
103
0
@@ -475,5 +475,5 @@
-
+
diff --git a/kommander/examples/old/tidy.kmdr b/kommander/examples/old/tidy.kmdr
index 096dec40..a96f5119 100644
--- a/kommander/examples/old/tidy.kmdr
+++ b/kommander/examples/old/tidy.kmdr
@@ -29,7 +29,7 @@
TabWidget1
-
+
tab
@@ -51,7 +51,7 @@
Non Tidy Option
-
+
TextLabel4
@@ -119,7 +119,7 @@ instances of Quanta running.
-
+
TextLabel1
@@ -356,7 +356,7 @@ instances of Quanta running.
-
+
tab
@@ -373,7 +373,7 @@ instances of Quanta running.
6
-
+
Layout1
@@ -477,7 +477,7 @@ instances of Quanta running.
-
+
TextLabel1_2
@@ -541,7 +541,7 @@ instances of Quanta running.
-
+
TextLabel2
@@ -613,7 +613,7 @@ instances of Quanta running.
-
+
tab
@@ -889,7 +889,7 @@ instances of Quanta running.
-
+
tab
@@ -1012,7 +1012,7 @@ escape-cdata Boolean y/n, yes/no, t/f, true/false, 1/0
language String -
ncr Boolean y/n, yes/no, t/f, true/false, 1/0
output-bom AutoBool auto, y/n, yes/no, t/f, true/false, 1/0
-replace-color Boolean y/n, yes/no, t/f, true/false, 1/0
+tqreplace-color Boolean y/n, yes/no, t/f, true/false, 1/0
css-prefix Name CSS1 selector
new-inline-tags Tag names tagX, tagY, ...
new-blocklevel-tags Tag names tagX, tagY, ...
@@ -1091,7 +1091,7 @@ fi
Expanding
-
+
131
0
@@ -1108,7 +1108,7 @@ fi
Expanding
-
+
121
0
@@ -1155,5 +1155,5 @@ fi
setWidgetText(const QString&)
-
+
diff --git a/kommander/examples/old/widgetgenerator.kmdr b/kommander/examples/old/widgetgenerator.kmdr
index 00ef6262..0c8da2e6 100644
--- a/kommander/examples/old/widgetgenerator.kmdr
+++ b/kommander/examples/old/widgetgenerator.kmdr
@@ -25,7 +25,7 @@
6
-
+
Layout12
@@ -49,7 +49,7 @@
Expanding
-
+
30
0
@@ -125,10 +125,10 @@ public:
virtual QString populationText() const;
virtual void setPopulationText(QString);
-public slots:
+public Q_SLOTS:
virtual void setWidgetText(const QString &);
virtual void populate();
-signals:
+Q_SIGNALS:
void widgetOpened();
void widgetTextChanged(const QString &);
protected:
@@ -236,7 +236,7 @@ void @className::showEvent( QShowEvent *e )
emit widgetOpened();
}
-#include \"$classNameLower.moc\"
+#include \"$classNameLower.tqmoc\"
"
echo "$headerContent" > @directory/$classNameLower.h
@@ -265,7 +265,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
Expanding
-
+
30
0
@@ -274,7 +274,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
-
+
Layout37
@@ -288,7 +288,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
6
-
+
TextLabel1
@@ -296,7 +296,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
Author:
-
+
TextLabel6
@@ -304,7 +304,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
Email:
-
+
TextLabel2
@@ -312,7 +312,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
Description:
-
+
TextLabel3
@@ -320,7 +320,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
Date started:
-
+
TextLabel4
@@ -328,7 +328,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
Class name:
-
+
TextLabel7
@@ -336,7 +336,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
Base class name:
-
+
TextLabel5
@@ -346,7 +346,7 @@ echo "$cppContent" > @directory/$classNameLower.cpp
-
+
Layout36
@@ -434,5 +434,5 @@ echo "$cppContent" > @directory/$classNameLower.cpp
-
+
diff --git a/kommander/examples/old/wizard.kmdr b/kommander/examples/old/wizard.kmdr
index 87f50c38..052cfc3a 100755
--- a/kommander/examples/old/wizard.kmdr
+++ b/kommander/examples/old/wizard.kmdr
@@ -1,6 +1,6 @@
Wizard1
-
+
Wizard1
@@ -15,7 +15,7 @@
Demo Wizard
-
+
page
@@ -132,7 +132,7 @@
-
+
page
@@ -189,7 +189,7 @@
-
+
page
@@ -297,5 +297,5 @@
execute()
-
+
diff --git a/kommander/examples/tutorial/append.kmdr b/kommander/examples/tutorial/append.kmdr
index fe22a4c3..51b24cde 100644
--- a/kommander/examples/tutorial/append.kmdr
+++ b/kommander/examples/tutorial/append.kmdr
@@ -40,7 +40,7 @@
-
+
Layout2
@@ -64,7 +64,7 @@
Expanding
-
+
30
0
@@ -100,7 +100,7 @@ dcop @dcopid KommanderIf changeWidgetText TextEdit1 "$TEXT"
Expanding
-
+
30
0
@@ -111,5 +111,5 @@ dcop @dcopid KommanderIf changeWidgetText TextEdit1 "$TEXT"
-
+
diff --git a/kommander/examples/tutorial/arrays.kmdr b/kommander/examples/tutorial/arrays.kmdr
index dd4b18c6..b884affc 100644
--- a/kommander/examples/tutorial/arrays.kmdr
+++ b/kommander/examples/tutorial/arrays.kmdr
@@ -36,7 +36,7 @@
6
-
+
TextLabel2
@@ -93,7 +93,7 @@
-
+
Layout4
@@ -117,7 +117,7 @@
Expanding
-
+
30
0
@@ -181,7 +181,7 @@
Expanding
-
+
30
0
@@ -200,5 +200,5 @@
populate()
-
+
diff --git a/kommander/examples/tutorial/calc.kmdr b/kommander/examples/tutorial/calc.kmdr
index 5e0082f4..21bddb4e 100644
--- a/kommander/examples/tutorial/calc.kmdr
+++ b/kommander/examples/tutorial/calc.kmdr
@@ -32,7 +32,7 @@
6
-
+
Layout7
@@ -46,7 +46,7 @@
6
-
+
TextLabel1
@@ -66,13 +66,13 @@
0
-
+
200
0
-
+
250
32767
@@ -91,7 +91,7 @@
0
-
+
250
32767
@@ -124,7 +124,7 @@
-
+
Layout4
@@ -138,7 +138,7 @@
6
-
+
TextLabel2
@@ -146,7 +146,7 @@
Expression:
-
+
Layout1
@@ -170,7 +170,7 @@
Expanding
-
+
30
0
@@ -194,7 +194,7 @@
@ListBox1.insertItem(@expr(@LineEdit1.text), -1)
@LineEdit1.clear
-@LineEdit2.setText("Sum: @expr(@String.replace(@ListBox1.text, "\n", "+"))")
+@LineEdit2.setText("Sum: @expr(@String.tqreplace(@ListBox1.text, "\n", "+"))")
@@ -209,7 +209,7 @@
Expanding
-
+
30
0
@@ -233,7 +233,7 @@
Expanding
-
+
0
91
@@ -250,7 +250,7 @@
Expanding
-
+
0
91
@@ -267,5 +267,5 @@
ExecButton2
ListBox1
-
+
diff --git a/kommander/examples/tutorial/cmdline.kmdr b/kommander/examples/tutorial/cmdline.kmdr
index 0db801d2..6d0cbbe1 100644
--- a/kommander/examples/tutorial/cmdline.kmdr
+++ b/kommander/examples/tutorial/cmdline.kmdr
@@ -50,7 +50,7 @@
Expanding
-
+
149
0
@@ -95,7 +95,7 @@ fi
Expanding
-
+
148
0
@@ -104,5 +104,5 @@ fi
-
+
diff --git a/kommander/examples/tutorial/dcop.kmdr b/kommander/examples/tutorial/dcop.kmdr
index 9ceae259..739bdae6 100644
--- a/kommander/examples/tutorial/dcop.kmdr
+++ b/kommander/examples/tutorial/dcop.kmdr
@@ -35,7 +35,7 @@
-
+
Layout2
@@ -59,7 +59,7 @@
Expanding
-
+
30
0
@@ -124,7 +124,7 @@ dcop kmail KMailIface checkAccount @AccountListBox
Expanding
-
+
30
0
@@ -135,5 +135,5 @@ dcop kmail KMailIface checkAccount @AccountListBox
-
+
diff --git a/kommander/examples/tutorial/dialogs.kmdr b/kommander/examples/tutorial/dialogs.kmdr
index 62c97bc0..421f0607 100644
--- a/kommander/examples/tutorial/dialogs.kmdr
+++ b/kommander/examples/tutorial/dialogs.kmdr
@@ -85,7 +85,7 @@ ListBox1.setText(a)
-
+
Layout1
@@ -194,5 +194,5 @@ ListBox1.setText(a)
-
+
diff --git a/kommander/examples/tutorial/globals.kmdr b/kommander/examples/tutorial/globals.kmdr
index 71cfad17..131c3a2a 100644
--- a/kommander/examples/tutorial/globals.kmdr
+++ b/kommander/examples/tutorial/globals.kmdr
@@ -32,7 +32,7 @@
6
-
+
Layout1
@@ -92,5 +92,5 @@
-
+
diff --git a/kommander/examples/tutorial/initialize.kmdr b/kommander/examples/tutorial/initialize.kmdr
index 16ed360d..5ca6bbc9 100644
--- a/kommander/examples/tutorial/initialize.kmdr
+++ b/kommander/examples/tutorial/initialize.kmdr
@@ -35,7 +35,7 @@ dcop @dcopid KommanderIf changeWidgetText CloseLabel "$CLOSE"
6
-
+
Layout1
@@ -59,7 +59,7 @@ dcop @dcopid KommanderIf changeWidgetText CloseLabel "$CLOSE"
Expanding
-
+
30
0
@@ -89,7 +89,7 @@ dcop @dcopid KommanderIf changeWidgetText CloseLabel "$CLOSE"
Expanding
-
+
30
0
@@ -98,7 +98,7 @@ dcop @dcopid KommanderIf changeWidgetText CloseLabel "$CLOSE"
-
+
OpenLabel
@@ -106,7 +106,7 @@ dcop @dcopid KommanderIf changeWidgetText CloseLabel "$CLOSE"
Opened:
-
+
CloseLabel
@@ -116,5 +116,5 @@ dcop @dcopid KommanderIf changeWidgetText CloseLabel "$CLOSE"
-
+
diff --git a/kommander/examples/tutorial/loop.kmdr b/kommander/examples/tutorial/loop.kmdr
index 4aa799f1..998fe1d0 100644
--- a/kommander/examples/tutorial/loop.kmdr
+++ b/kommander/examples/tutorial/loop.kmdr
@@ -79,7 +79,7 @@
-
+
Layout1
@@ -93,7 +93,7 @@
6
-
+
TextLabel1
@@ -110,5 +110,5 @@
-
+
diff --git a/kommander/examples/tutorial/picview.kmdr b/kommander/examples/tutorial/picview.kmdr
index be75af7b..bc1f923a 100644
--- a/kommander/examples/tutorial/picview.kmdr
+++ b/kommander/examples/tutorial/picview.kmdr
@@ -52,7 +52,7 @@
Directory
-
+
Layout2
@@ -78,20 +78,20 @@
0
-
+
200
0
-
+
200
32767
- @exec(cd @FileSelector1.text && find * -name "*.jpg" -o -name "*.png" -o -name "*.gif" -o -name "*.bmp")
+ @exec(cd @FileSelector1.text && tqfind * -name "*.jpg" -o -name "*.png" -o -name "*.gif" -o -name "*.bmp")
@@ -144,5 +144,5 @@
populate()
-
+
diff --git a/kommander/examples/tutorial/progressbar.kmdr b/kommander/examples/tutorial/progressbar.kmdr
index 397410cb..9e624b78 100644
--- a/kommander/examples/tutorial/progressbar.kmdr
+++ b/kommander/examples/tutorial/progressbar.kmdr
@@ -106,7 +106,7 @@
Expanding
-
+
191
0
@@ -123,7 +123,7 @@
Expanding
-
+
191
0
@@ -137,12 +137,12 @@
@# set up a loop using loop variable named "file"
-@forEach(file, @exec(cd @FileSelector1.text && find * -maxdepth 0))
+@forEach(file, @exec(cd @FileSelector1.text && tqfind * -maxdepth 0))
@# set the scale using the generated @[loopvar]_count
@ProgressBar1.setMaximum(@file_count)
@# show file name in statusbar
@StatusBar1.setText(@file)
- @TreeWidget1.insertItems(@exec(cd @FileSelector1.text && find @file -name "*"), -1)
+ @TreeWidget1.insertItems(@exec(cd @FileSelector1.text && tqfind @file -name "*"), -1)
@# use the generated @[loopvar]_index to update progressbar
@ProgressBar1.setText(@file_index)
@end
@@ -188,5 +188,5 @@
-
+
diff --git a/kommander/examples/tutorial/settings.kmdr b/kommander/examples/tutorial/settings.kmdr
index 3079d6f9..a280dff2 100644
--- a/kommander/examples/tutorial/settings.kmdr
+++ b/kommander/examples/tutorial/settings.kmdr
@@ -32,7 +32,7 @@
6
-
+
Layout1
@@ -46,7 +46,7 @@
6
-
+
TextLabel1
@@ -69,7 +69,7 @@
-
+
Layout5
@@ -93,7 +93,7 @@
Expanding
-
+
30
0
@@ -104,7 +104,7 @@
ExecButton1
-
+
60
0
@@ -129,7 +129,7 @@
CloseButton1
-
+
60
0
@@ -154,7 +154,7 @@
Expanding
-
+
30
0
@@ -173,5 +173,5 @@
populate()
-
+
diff --git a/kommander/examples/tutorial/slots.kmdr b/kommander/examples/tutorial/slots.kmdr
index 23ab2d09..ce54a3ba 100644
--- a/kommander/examples/tutorial/slots.kmdr
+++ b/kommander/examples/tutorial/slots.kmdr
@@ -30,7 +30,7 @@
6
-
+
Layout1
@@ -44,7 +44,7 @@
6
-
+
TextLabel1
@@ -68,7 +68,7 @@
-
+
Layout2
@@ -82,7 +82,7 @@
6
-
+
TextLabel2
@@ -105,7 +105,7 @@
-
+
Layout3
@@ -129,7 +129,7 @@
Expanding
-
+
30
0
@@ -171,7 +171,7 @@ fi
Expanding
-
+
30
0
@@ -196,5 +196,5 @@ fi
startProcess()
-
+
diff --git a/kommander/examples/tutorial/statusbar.kmdr b/kommander/examples/tutorial/statusbar.kmdr
index d4f96e05..8dd2b897 100644
--- a/kommander/examples/tutorial/statusbar.kmdr
+++ b/kommander/examples/tutorial/statusbar.kmdr
@@ -95,5 +95,5 @@
populate()
-
+
diff --git a/kommander/examples/tutorial/strings.kmdr b/kommander/examples/tutorial/strings.kmdr
index 1ef6a953..464f84ae 100644
--- a/kommander/examples/tutorial/strings.kmdr
+++ b/kommander/examples/tutorial/strings.kmdr
@@ -49,13 +49,13 @@
<b>Last 5 chars:</b> @String.right("@LineEdit1", 5)<br>
<b>Chars from 6th to 10th:</b> @String.mid("@LineEdit1", 6, 5)<br>
<b>Remove spaces:</b> @String.remove("@LineEdit1", " ")<br>
-<b>Replace spaces with *</b>: @String.replace("@LineEdit1", " ", *)<br>
+<b>Replace spaces with *</b>: @String.tqreplace("@LineEdit1", " ", *)<br>
<b>Uppercase:</b> @String.upper("@LineEdit1")<br>
<b>Lowercase:</b> @String.lower("@LineEdit1")<br>
<b>Is a number?:</b> @Array.value(Bool, @String.isNumber("@LineEdit1"))<br>
<b>Is empty?</b> @Array.value(Bool, @String.isEmpty("@LineEdit1"))<br>
-<b>Contains "Kommander"?:</b> @String.contains("@LineEdit1", "Kommander")<br>
-<b>Position of "Kommander":</b> @String.find("@LineEdit1", "Kommander")<br>
+<b>Contains "Kommander"?:</b> @String.tqcontains("@LineEdit1", "Kommander")<br>
+<b>Position of "Kommander":</b> @String.tqfind("@LineEdit1", "Kommander")<br>
<b>Compare with "Kommander":</b>
@execBegin
if [ @String.compare("@LineEdit1", "Kommander") -lt 0 ];then
@@ -81,7 +81,7 @@ fi
-
+
Layout1
@@ -95,7 +95,7 @@ fi
6
-
+
TextLabel1
@@ -121,7 +121,7 @@ fi
-
+
Layout2
@@ -145,7 +145,7 @@ fi
Expanding
-
+
30
0
@@ -178,7 +178,7 @@ fi
Expanding
-
+
30
0
@@ -202,5 +202,5 @@ fi
ExecButton1
TextEdit1
-
+
diff --git a/kommander/examples/tutorial/table.kmdr b/kommander/examples/tutorial/table.kmdr
index a2c5986b..d7ed3461 100644
--- a/kommander/examples/tutorial/table.kmdr
+++ b/kommander/examples/tutorial/table.kmdr
@@ -77,7 +77,7 @@
-
+
Layout3
@@ -161,7 +161,7 @@
Expanding
-
+
0
30
@@ -170,7 +170,7 @@
-
+
Layout4
@@ -254,5 +254,5 @@
-
+
diff --git a/kommander/examples/tutorial/tree.kmdr b/kommander/examples/tutorial/tree.kmdr
index bed87709..fcde8a28 100644
--- a/kommander/examples/tutorial/tree.kmdr
+++ b/kommander/examples/tutorial/tree.kmdr
@@ -33,7 +33,7 @@
6
-
+
Layout1
@@ -60,7 +60,7 @@
@TreeWidget1.clear
-@TreeWidget1.insertItems(@exec(cd @FileSelector1.text && find * -name "*.kmdr"), -1)
+@TreeWidget1.insertItems(@exec(cd @FileSelector1.text && tqfind * -name "*.kmdr"), -1)
@@ -109,7 +109,7 @@
-
+
TextLabel1
@@ -130,7 +130,7 @@
Directory
-
+
Layout3
@@ -166,5 +166,5 @@
-
+
diff --git a/kommander/examples/tutorial/widgets.kmdr b/kommander/examples/tutorial/widgets.kmdr
index 9e6781c6..912cded0 100644
--- a/kommander/examples/tutorial/widgets.kmdr
+++ b/kommander/examples/tutorial/widgets.kmdr
@@ -68,7 +68,7 @@
- @WidgetList.setText(@Form1.children(true))
+ @WidgetList.setText(@Form1.tqchildren(true))
@@ -82,7 +82,7 @@
-
+
Layout1
@@ -96,7 +96,7 @@
6
-
+
TextLabel1
@@ -129,5 +129,5 @@
populate()
-
+
diff --git a/kommander/executor/dcopkommanderif.h b/kommander/executor/dcopkommanderif.h
index 1ba67cbb..c756b059 100644
--- a/kommander/executor/dcopkommanderif.h
+++ b/kommander/executor/dcopkommanderif.h
@@ -58,7 +58,7 @@ virtual void setChecked(const TQString &widgetName, bool checked) = 0;
virtual void setAssociatedText(const TQString &widgetName, const TQString &text) = 0;
virtual TQStringList associatedText(const TQString &widgetName) = 0;
virtual TQString type(const TQString& widget) = 0;
-virtual TQStringList children(const TQString& parent, bool recursive) = 0;
+virtual TQStringList tqchildren(const TQString& tqparent, bool recursive) = 0;
virtual TQString global(const TQString& variableName) = 0;
virtual void setGlobal(const TQString& variableName, const TQString& value) = 0;
virtual void setMaximum(const TQString &widgetName, int value) = 0;
diff --git a/kommander/executor/instance.cpp b/kommander/executor/instance.cpp
index a8ff3400..d24e856a 100644
--- a/kommander/executor/instance.cpp
+++ b/kommander/executor/instance.cpp
@@ -67,7 +67,7 @@ void Instance::addCmdlineArguments(const TQStringList& args)
TQStringList stdArgs;
for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it)
{
- int pos = (*it).find('=');
+ int pos = (*it).tqfind('=');
if (pos != -1)
m_textInstance->setGlobal((*it).left(pos), (*it).mid(pos+1));
else
@@ -75,7 +75,7 @@ void Instance::addCmdlineArguments(const TQStringList& args)
}
int i = 0;
for (TQStringList::ConstIterator it = stdArgs.begin(); it != stdArgs.end(); ++it)
- m_textInstance->setGlobal(TQString("_ARG%1").arg(++i), *it);
+ m_textInstance->setGlobal(TQString("_ARG%1").tqarg(++i), *it);
m_textInstance->setGlobal("_ARGS", stdArgs.join(" "));
m_textInstance->setGlobal("_ARGCOUNT", TQString::number(stdArgs.count()));
}
@@ -97,16 +97,16 @@ bool Instance::build(const KURL& fname)
if (!fname.isValid() || !isFileValid(fname))
return false; // Check if file is correct
- // create the main instance, must inherit QDialog
+ // create the main instance, must inherit TQDialog
KommanderFactory::loadPlugins();
if (fname.isValid())
- m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast(parent()));
+ m_instance = KommanderFactory::create(fname.path(), 0L, dynamic_cast(tqparent()));
else
{
TQFile inputFile;
inputFile.open(IO_ReadOnly, stdin);
- m_instance = KommanderFactory::create(&inputFile);
+ m_instance = KommanderFactory::create(TQT_TQIODEVICE(&inputFile));
}
// check if build was successful
@@ -121,7 +121,7 @@ bool Instance::build(const KURL& fname)
window->setFileName(fname.path().local8Bit());
// FIXME : Should verify that all of the widgets in the dialog derive from KommanderWidget
- m_textInstance = kommanderWidget(m_instance);
+ m_textInstance = kommanderWidget(TQT_TQOBJECT(m_instance));
if (!m_textInstance) // Main dialog/window is not a Kommander widget - look for one
{
@@ -185,7 +185,7 @@ bool Instance::isFileValid(const KURL& fname) const
if (!TQFileInfo(fname.path()).exists())
{
KMessageBox::sorry(0, i18n("Kommander file
%1
does not "
- "exist.").arg(fname.path()));
+ "exist.").tqarg(fname.path()));
return false;
}
@@ -220,7 +220,7 @@ bool Instance::isFileValid(const KURL& fname) const
}
if (!TQFileInfo(fname.path()).isExecutable())
{
- if (KMessageBox::warningContinueCancel(0, i18n("The Kommander file %1 does not have the executable attribute set and could possibly contain dangerous exploits.If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.
Are you sure you want to continue?
").arg(fname.pathOrURL()), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
+ if (KMessageBox::warningContinueCancel(0, i18n("The Kommander file %1 does not have the executable attribute set and could possibly contain dangerous exploits.If you trust the scripting (viewable in kmdr-editor) in this program, make it executable to get rid of this warning.
Are you sure you want to continue?
").tqarg(fname.pathOrURL()), TQString(), i18n("Run Nevertheless")) == KMessageBox::Cancel)
return false;
}
return true;
@@ -431,13 +431,13 @@ TQString Instance::type(const TQString& widget)
return TQString();
}
-TQStringList Instance::children(const TQString& parent, bool recursive)
+TQStringList Instance::tqchildren(const TQString& tqparent, bool recursive)
{
TQStringList matching;
- TQObject* child = stringToWidget(parent);
+ TQObject* child = stringToWidget(tqparent);
TQObjectList* widgets;
if (!child)
- child = m_instance;
+ child = TQT_TQOBJECT(m_instance);
if (child->inherits(TQWIDGET_OBJECT_NAME_STRING))
{
widgets = child->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, recursive);
@@ -674,9 +674,9 @@ int Instance::getWinID()
void Instance::setBusyCursor(bool busy)
{
if (busy)
- m_instance->setCursor(TQCursor(Qt::WaitCursor));
+ m_instance->setCursor(TQCursor(TQt::WaitCursor));
else
- m_instance->setCursor(TQCursor(Qt::ArrowCursor));
+ m_instance->setCursor(TQCursor(TQt::ArrowCursor));
}
diff --git a/kommander/executor/instance.h b/kommander/executor/instance.h
index 95b52ead..469d7202 100644
--- a/kommander/executor/instance.h
+++ b/kommander/executor/instance.h
@@ -43,6 +43,7 @@ class KommanderWidget;
class Instance : public TQObject, virtual public DCOPKommanderIf
{
Q_OBJECT
+ TQ_OBJECT
public:
Instance();
@@ -89,7 +90,7 @@ public:
virtual void setAssociatedText(const TQString &widgetName, const TQString &text);
virtual TQStringList associatedText(const TQString &widgetName);
virtual TQString type(const TQString& widget);
- virtual TQStringList children(const TQString& parent, bool recursive);
+ virtual TQStringList tqchildren(const TQString& tqparent, bool recursive);
virtual TQString global(const TQString& variableName);
virtual void setGlobal(const TQString& variableName, const TQString& value);
virtual void setMaximum(const TQString &widgetName, int value);
@@ -111,7 +112,7 @@ public:
TQWidget *widget() { return m_instance;}
public slots:
- /** Sets the instance's parent */
+ /** Sets the instance's tqparent */
void setParent(TQWidget*);
/** Returns whether the instance is built */
bool isBuilt() const;
@@ -126,7 +127,7 @@ private:
TQGuardedPtr m_instance;
/* Associated Text Instance */
KommanderWidget *m_textInstance;
- /** The parent widget */
+ /** The tqparent widget */
TQWidget *m_parent;
/* Get object by name */
TQObject* stringToWidget(const TQString& name);
diff --git a/kommander/executor/main.cpp b/kommander/executor/main.cpp
index 00d7e509..d49dd373 100644
--- a/kommander/executor/main.cpp
+++ b/kommander/executor/main.cpp
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
{
char buf[200];
TQString baseFile = args->url(0).fileName();
- int ext = baseFile.findRev('.');
+ int ext = baseFile.tqfindRev('.');
if (ext != -1)
baseFile = baseFile.left(ext);
strcpy(buf, baseFile.latin1());
diff --git a/kommander/executor/register.cpp b/kommander/executor/register.cpp
index db794e25..f3d33799 100644
--- a/kommander/executor/register.cpp
+++ b/kommander/executor/register.cpp
@@ -49,7 +49,7 @@ void Instance::registerSpecials()
SpecialInformation::insert("null", 0, 0);
SpecialInformation::insert("pid", 0, 0);
SpecialInformation::insert("dcopid", 0, 0);
- SpecialInformation::insert("parentPid", 0, 0);
+ SpecialInformation::insert("tqparentPid", 0, 0);
SpecialInformation::insert("execBegin", 0, 1);
SpecialInformation::insert("env", 1, 1);
SpecialInformation::insert("exec", 1, 1);
@@ -80,15 +80,15 @@ void Instance::registerSpecials()
SpecialInformation::setCurrentObject("String");
SpecialInformation::insert("length", 1, 1, i18n( "Return number of chars in the string.") );
- SpecialInformation::insert("contains", 2, 2, i18n( "Check if the string contains given substring.") );
- SpecialInformation::insert("find", 2, 2, i18n( "Return position of a substring in the string, "
+ SpecialInformation::insert("tqcontains", 2, 2, i18n( "Check if the string contains given substring.") );
+ SpecialInformation::insert("tqfind", 2, 2, i18n( "Return position of a substring in the string, "
"or -1 if it isn't found.") );
SpecialInformation::insert("left", 2, 2, i18n( "Return first n chars of the string.") );
SpecialInformation::insert("right", 2, 2, i18n( "Return last n chars of the string.") );
SpecialInformation::insert("mid", 3, 3, i18n( "Return substring of the string, starting from "
"given position.") );
SpecialInformation::insert("remove", 2, 2, i18n( "Replace all occurencies of given substring.") );
- SpecialInformation::insert("replace", 3, 3, i18n( "Replace all occurencies of given substring "
+ SpecialInformation::insert("tqreplace", 3, 3, i18n( "Replace all occurencies of given substring "
"with given replacement.") );
SpecialInformation::insert("upper", 1, 1, i18n( "Convert the string to uppercase.") );
SpecialInformation::insert("lower", 1, 1, i18n( "Convert the string to lowercase.") );
diff --git a/kommander/factory/domtool.cpp b/kommander/factory/domtool.cpp
index 0bd7088c..e532dc10 100644
--- a/kommander/factory/domtool.cpp
+++ b/kommander/factory/domtool.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -328,7 +328,7 @@ static bool toBool( const TQString& s )
}
/*!
- Convert Qt 2.x format to Qt 3.0 format if necessary
+ Convert TQt 2.x format to TQt 3.0 format if necessary
*/
void DomTool::fixDocument( TQDomDocument& doc )
{
@@ -360,9 +360,9 @@ void DomTool::fixDocument( TQDomDocument& doc )
bool stdset = toBool( e.attribute( "stdset" ) );
if ( stdset || name == "toolTip" || name == "whatsThis" ||
name == "buddy" ||
- e.parentNode().toElement().tagName() == "item" ||
- e.parentNode().toElement().tagName() == "spacer" ||
- e.parentNode().toElement().tagName() == "column"
+ e.tqparentNode().toElement().tagName() == "item" ||
+ e.tqparentNode().toElement().tagName() == "spacer" ||
+ e.tqparentNode().toElement().tagName() == "column"
)
e.removeAttribute( "stdset" );
else
diff --git a/kommander/factory/domtool.h b/kommander/factory/domtool.h
index 034cb98e..30f26b51 100644
--- a/kommander/factory/domtool.h
+++ b/kommander/factory/domtool.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -27,7 +27,7 @@
class TQDomElement;
class TQDomDocument;
-class DomTool : public Qt
+class DomTool : public TQt
{
public:
static TQVariant readProperty( const TQDomElement& e, const TQString& name, const TQVariant& defValue );
diff --git a/kommander/factory/kommanderfactory.cpp b/kommander/factory/kommanderfactory.cpp
index ecfcb8cd..d5713bd0 100644
--- a/kommander/factory/kommanderfactory.cpp
+++ b/kommander/factory/kommanderfactory.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -25,10 +25,13 @@
#include "kommanderfactory.h"
#include
+#ifdef QT_NO_SQL
+#define TQT_NO_SQL
+#endif // QT_NO_SQL
#include
#include "config.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "database2.h"
#endif
#include
@@ -40,18 +43,18 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include
#include
#include
#endif
-// include all Qt widgets we support
+// include all TQt widgets we support
#include
#include
#include
@@ -60,7 +63,7 @@
#include
#include
#include
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include
#endif
#include
@@ -123,7 +126,7 @@ KommanderFactory::~KommanderFactory()
qwf_currFileName = 0L;
}
-TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector, TQWidget *parent, const char *name )
+TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector, TQWidget *tqparent, const char *name )
{
TQFile f( uiFile );
if ( !f.open( IO_ReadOnly ) )
@@ -132,14 +135,14 @@ TQWidget *KommanderFactory::create( const TQString &uiFile, TQObject *connector,
if (!qwf_currFileName)
qwf_currFileName = new TQString();
*qwf_currFileName = uiFile;
- TQWidget *w = KommanderFactory::create( &f, connector, parent, name );
+ TQWidget *w = KommanderFactory::create( TQT_TQIODEVICE(&f), connector, tqparent, name );
if ( !qwf_forms )
qwf_forms = new TQMap;
qwf_forms->insert( w, uiFile );
return w;
}
-TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *parent, const char *name )
+TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidget *tqparent, const char *name )
{
TQDomDocument doc;
TQString errMsg;
@@ -147,7 +150,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg
TQTextStream stream(dev);
TQString content = stream.read();
if (content.startsWith("#!"))
- content = content.mid(content.find('\n'));
+ content = content.mid(content.tqfind('\n'));
if ( !doc.setContent( content ) ) {
// qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
return 0;
@@ -204,7 +207,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg
widgetFactory->variables << e.firstChild().toText().data();
} else if ( e.tagName() == "pixmapinproject" ) {
widgetFactory->usePixmapCollection = true;
- } else if ( e.tagName() == "layoutdefaults" ) {
+ } else if ( e.tagName() == "tqlayoutdefaults" ) {
widgetFactory->defSpacing = e.attribute( "spacing", TQString::number( widgetFactory->defSpacing ) ).toInt();
widgetFactory->defMargin = e.attribute( "margin", TQString::number( widgetFactory->defMargin ) ).toInt();
}
@@ -214,7 +217,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg
if ( !imageCollection.isNull() )
widgetFactory->loadImageCollection( imageCollection );
- widgetFactory->createWidgetInternal( widget, parent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) );
+ widgetFactory->createWidgetInternal( widget, tqparent, 0, widget.attribute("class", TQWIDGET_OBJECT_NAME_STRING) );
TQWidget *w = widgetFactory->toplevel;
if ( !w ) {
delete widgetFactory;
@@ -230,7 +233,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg
for ( TQDomElement n = eltSlots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
if ( n.tagName() == "slot" ) {
TQString s = n.firstChild().toText().data();
- widgetFactory->languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language", "C++" ) );
+ widgetFactory->languageSlots.insert( s.left( s.tqfind( "(" ) ) , n.attribute( "language", "C++" ) );
}
}
@@ -243,7 +246,7 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg
if ( !connections.isNull() )
widgetFactory->loadConnections( connections, connector );
- if ( w && name && qstrlen( name ) > 0 )
+ if ( w && name && tqstrlen( name ) > 0 )
w->setName( name );
if ( !tabOrder.isNull() )
@@ -251,24 +254,24 @@ TQWidget *KommanderFactory::create( TQIODevice *dev, TQObject *connector, TQWidg
if ( widgetFactory->toplevel ) {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
TQMap::Iterator cit = widgetFactory->sqlWidgetConnections.begin();
for( ; cit != widgetFactory->sqlWidgetConnections.end(); ++cit ) {
- if ( widgetFactory->noDatabaseWidgets.find( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() )
+ if ( widgetFactory->noDatabaseWidgets.tqfind( cit.key()->name() ) != widgetFactory->noDatabaseWidgets.end() )
continue;
- if ( cit.key()->inherits( "QDesignerDataBrowser2" ) )
- ( (QDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
- else if ( cit.key()->inherits( "QDesignerDataView2" ) )
- ( (QDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
+ if ( cit.key()->inherits( "TQDesignerDataBrowser2" ) )
+ ( (TQDesignerDataBrowser2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
+ else if ( cit.key()->inherits( "TQDesignerDataView2" ) )
+ ( (TQDesignerDataView2*)cit.key() )->initPreview( (*cit).conn, (*cit).table, cit.key(), *(*cit).dbControls );
}
for ( TQMap::Iterator it = widgetFactory->dbTables.begin(); it != widgetFactory->dbTables.end(); ++it ) {
TQDataTable *table = (TQDataTable*)widgetFactory->toplevel->child( it.key(), TQDATATABLE_OBJECT_NAME_STRING );
if ( !table )
continue;
- if ( widgetFactory->noDatabaseWidgets.find( table->name() ) != widgetFactory->noDatabaseWidgets.end() )
+ if ( widgetFactory->noDatabaseWidgets.tqfind( table->name() ) != widgetFactory->noDatabaseWidgets.end() )
continue;
- TQValueList fieldMap = *widgetFactory->fieldMaps.find( table );
+ TQValueList fieldMap = *widgetFactory->fieldMaps.tqfind( table );
TQString conn = (*it)[ 0 ];
TQSqlCursor* c = 0;
TQSqlDatabase *db = 0;
@@ -307,129 +310,129 @@ void KommanderFactory::addPlugin( KommanderPlugin *plugin )
widgetPlugins.append( plugin );
}
-TQWidget *KommanderFactory::createWidget( const TQString &literalClassName, TQWidget *parent, const char *name )
+TQWidget *KommanderFactory::createWidget( const TQString &literalClassName, TQWidget *tqparent, const char *name )
{
TQString className = literalClassName;
// create widgets we know
if (className == TQPUSHBUTTON_OBJECT_NAME_STRING)
- return new TQPushButton(parent, name);
+ return new TQPushButton(tqparent, name);
else if (className == TQTOOLBUTTON_OBJECT_NAME_STRING)
- return new TQToolButton(parent, name);
+ return new TQToolButton(tqparent, name);
else if (className == TQCHECKBOX_OBJECT_NAME_STRING)
- return new TQCheckBox(parent, name);
+ return new TQCheckBox(tqparent, name);
else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING)
- return new TQRadioButton(parent, name);
+ return new TQRadioButton(tqparent, name);
else if (className == TQGROUPBOX_OBJECT_NAME_STRING)
- return new TQGroupBox(parent, name);
+ return new TQGroupBox(tqparent, name);
else if (className == TQBUTTONGROUP_OBJECT_NAME_STRING)
- return new TQButtonGroup(parent, name);
+ return new TQButtonGroup(tqparent, name);
else if (className == TQICONVIEW_OBJECT_NAME_STRING)
{
-#if !defined(QT_NO_ICONVIEW)
- return new TQIconView(parent, name);
+#if !defined(TQT_NO_ICONVIEW)
+ return new TQIconView(tqparent, name);
#endif
}
else if (className == TQTABLE_OBJECT_NAME_STRING)
{
-#if !defined(QT_NO_TABLE)
- return new TQTable(parent, name);
+#if !defined(TQT_NO_TABLE)
+ return new TQTable(tqparent, name);
#endif
}
else if (className == TQLISTBOX_OBJECT_NAME_STRING)
- return new TQListBox(parent, name);
+ return new TQListBox(tqparent, name);
else if (className == TQLISTVIEW_OBJECT_NAME_STRING)
- return new TQListView(parent, name);
+ return new TQListView(tqparent, name);
else if (className == TQLINEEDIT_OBJECT_NAME_STRING)
- return new TQLineEdit(parent, name);
+ return new TQLineEdit(tqparent, name);
else if (className == TQSPINBOX_OBJECT_NAME_STRING)
- return new TQSpinBox(parent, name);
+ return new TQSpinBox(tqparent, name);
else if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
- return new TQMultiLineEdit(parent, name);
+ return new TQMultiLineEdit(tqparent, name);
else if (className == TQLABEL_OBJECT_NAME_STRING)
- return new TQLabel(parent, name);
+ return new TQLabel(tqparent, name);
else if (className == TQLAYOUTWIDGET_OBJECT_NAME_STRING)
- return new TQWidget(parent, name);
+ return new TQWidget(tqparent, name);
else if (className == TQTABWIDGET_OBJECT_NAME_STRING)
- return new TQTabWidget(parent, name);
+ return new TQTabWidget(tqparent, name);
else if (className == TQCOMBOBOX_OBJECT_NAME_STRING)
- return new TQComboBox(false, parent, name);
+ return new TQComboBox(false, tqparent, name);
else if (className == TQWIDGET_OBJECT_NAME_STRING)
{
if (!qwf_stays_on_top)
- return new TQWidget(parent, name);
- return new TQWidget(parent, name, Qt::WStyle_StaysOnTop);
+ return new TQWidget(tqparent, name);
+ return new TQWidget(tqparent, name, TQt::WStyle_StaysOnTop);
}
else if (className == TQDIALOG_OBJECT_NAME_STRING)
{
if (!qwf_stays_on_top)
- return new TQDialog(parent, name);
- return new TQDialog(parent, name, false, Qt::WStyle_StaysOnTop);
+ return new TQDialog(tqparent, name);
+ return new TQDialog(tqparent, name, false, TQt::WStyle_StaysOnTop);
}
else if (className == TQWIZARD_OBJECT_NAME_STRING)
- return new TQWizard(parent, name);
+ return new TQWizard(tqparent, name);
else if (className == TQLCDNUMBER_OBJECT_NAME_STRING)
- return new TQLCDNumber(parent, name);
+ return new TQLCDNumber(tqparent, name);
else if (className == TQPROGRESSBAR_OBJECT_NAME_STRING)
- return new TQProgressBar(parent, name);
+ return new TQProgressBar(tqparent, name);
else if (className == TQTEXTVIEW_OBJECT_NAME_STRING)
- return new TQTextView(parent, name);
+ return new TQTextView(tqparent, name);
else if (className == TQTEXTBROWSER_OBJECT_NAME_STRING)
- return new TQTextBrowser(parent, name);
+ return new TQTextBrowser(tqparent, name);
else if (className == TQDIAL_OBJECT_NAME_STRING)
- return new TQDial(parent, name);
+ return new TQDial(tqparent, name);
else if (className == TQSLIDER_OBJECT_NAME_STRING)
- return new TQSlider(parent, name);
+ return new TQSlider(tqparent, name);
else if (className == TQFRAME_OBJECT_NAME_STRING)
- return new TQFrame(parent, name);
+ return new TQFrame(tqparent, name);
else if (className == TQSPLITTER_OBJECT_NAME_STRING)
- return new TQSplitter(parent, name);
+ return new TQSplitter(tqparent, name);
else if (className == "Line")
{
- TQFrame *f = new TQFrame(parent, name);
+ TQFrame *f = new TQFrame(tqparent, name);
f->setFrameStyle(TQFrame::HLine | TQFrame::Sunken);
return f;
}
else if (className == TQTEXTEDIT_OBJECT_NAME_STRING)
- return new TQTextEdit(parent, name);
+ return new TQTextEdit(tqparent, name);
else if (className == TQDATEEDIT_OBJECT_NAME_STRING)
- return new QDateEdit(parent, name);
+ return new TQDateEdit(tqparent, name);
else if (className == TQTIMEEDIT_OBJECT_NAME_STRING)
- return new QTimeEdit(parent, name);
+ return new TQTimeEdit(tqparent, name);
else if (className == TQDATETIMEEDIT_OBJECT_NAME_STRING)
- return new QDateTimeEdit(parent, name);
+ return new TQDateTimeEdit(tqparent, name);
else if (className == TQSCROLLBAR_OBJECT_NAME_STRING)
- return new TQScrollBar(parent, name);
+ return new TQScrollBar(tqparent, name);
else if (className == TQPOPUPMENU_OBJECT_NAME_STRING)
- return new TQPopupMenu(parent, name);
+ return new TQPopupMenu(tqparent, name);
else if (className == TQWIDGETSTACK_OBJECT_NAME_STRING)
- return new TQWidgetStack(parent, name);
+ return new TQWidgetStack(tqparent, name);
else if (className == TQMAINWINDOW_OBJECT_NAME_STRING)
{
TQMainWindow *mw = 0;
if (!qwf_stays_on_top)
- mw = new KmdrMainWindow(parent, name);
+ mw = new KmdrMainWindow(tqparent, name);
else
- mw = new KmdrMainWindow(parent, name, Qt::WType_TopLevel | Qt::WStyle_StaysOnTop);
+ mw = new KmdrMainWindow(tqparent, name, TQt::WType_TopLevel | TQt::WStyle_StaysOnTop);
mw->setCentralWidget(new TQWidget(mw, "qt_central_widget"));
mw->centralWidget()->show();
(void) mw->statusBar();
return mw;
}
-#if !defined(QT_NO_SQL)
+#if !defined(TQT_NO_SQL)
else if (className == TQDATATABLE_OBJECT_NAME_STRING)
- return new TQDataTable(parent, name);
+ return new TQDataTable(tqparent, name);
else if (className == TQDATABROWSER_OBJECT_NAME_STRING)
- return new QDesignerDataBrowser2(parent, name);
+ return new TQDesignerDataBrowser2(tqparent, name);
else if (className == TQDATAVIEW_OBJECT_NAME_STRING)
- return new QDesignerDataView2(parent, name);
+ return new TQDesignerDataView2(tqparent, name);
#endif
// try to create it using the loaded kommander widget plugins
//find the widget plugin which can create className
for (KommanderPlugin * p = widgetPlugins.first(); p; p = widgetPlugins.next())
{
- TQWidget *w = p->create(className, parent, name);
+ TQWidget *w = p->create(className, tqparent, name);
if (w)
return w;
}
@@ -494,7 +497,7 @@ FeatureList KommanderFactory::featureList()
//iterate through widgetPlugins, appending KommanderPlugin::widgets() to features
}
-TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg )
+TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout, const TQString &classNameArg )
{
lastItem = 0;
TQDomElement n = e.firstChild().toElement();
@@ -512,13 +515,13 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
if ( colspan < 1 )
colspan = 1;
if ( !className.isEmpty() ) {
- if ( !layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
+ if ( !tqlayout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
className = TQWIDGET_OBJECT_NAME_STRING;
- if ( layout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
- // hide layout widgets
- w = parent;
+ if ( tqlayout && className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) {
+ // hide tqlayout widgets
+ w = tqparent;
} else {
- obj = KommanderFactory::createWidget( className, parent, 0 );
+ obj = TQT_TQOBJECT(KommanderFactory::createWidget( className, tqparent, 0 ));
if ( !obj )
{
return 0;
@@ -528,16 +531,16 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
toplevel = w;
if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
w = ( (TQMainWindow*)w )->centralWidget();
- if ( layout ) {
- switch( layoutType( layout ) ) {
+ if ( tqlayout ) {
+ switch( tqlayoutType( tqlayout ) ) {
case HBox:
- ( (TQHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)tqlayout )->addWidget( w );
break;
case VBox:
- ( (TQVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)tqlayout )->addWidget( w );
break;
case Grid:
- ( (TQGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (TQGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -545,7 +548,7 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
}
}
- layout = 0;
+ tqlayout = 0;
}
}
if (className == "Dialog")
@@ -553,59 +556,59 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
while ( !n.isNull() ) {
if ( n.tagName() == "spacer" ) {
- createSpacer( n, layout );
+ createSpacer( n, tqlayout );
} else if ( n.tagName() == "widget" ) {
TQMap< TQString, TQString> *oldDbControls = dbControls;
- createWidgetInternal( n, w, layout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) );
+ createWidgetInternal( n, w, tqlayout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) );
dbControls = oldDbControls;
} else if ( n.tagName() == "hbox" ) {
- TQLayout *parentLayout = layout;
- if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- layout = createLayout( 0, 0, KommanderFactory::HBox );
+ TQLayout *tqparentLayout = tqlayout;
+ if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ tqlayout = createLayout( 0, 0, KommanderFactory::HBox );
else
- layout = createLayout( w, layout, KommanderFactory::HBox );
- obj = layout;
+ tqlayout = createLayout( w, tqlayout, KommanderFactory::HBox );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "grid" ) {
- TQLayout *parentLayout = layout;
- if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- layout = createLayout( 0, 0, KommanderFactory::Grid );
+ TQLayout *tqparentLayout = tqlayout;
+ if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ tqlayout = createLayout( 0, 0, KommanderFactory::Grid );
else
- layout = createLayout( w, layout, KommanderFactory::Grid );
- obj = layout;
+ tqlayout = createLayout( w, tqlayout, KommanderFactory::Grid );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "vbox" ) {
- TQLayout *parentLayout = layout;
- if ( layout && layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- layout = createLayout( 0, 0, KommanderFactory::VBox );
+ TQLayout *tqparentLayout = tqlayout;
+ if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ tqlayout = createLayout( 0, 0, KommanderFactory::VBox );
else
- layout = createLayout( w, layout, KommanderFactory::VBox );
- obj = layout;
+ tqlayout = createLayout( w, tqlayout, KommanderFactory::VBox );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
- if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQGridLayout*)parentLayout )->addMultiCellLayout( layout, row, row + rowspan - 1, col, col + colspan - 1 );
+ if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 );
continue;
} else if ( n.tagName() == "property" && obj ) {
setProperty( obj, n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "attribute" && w ) {
TQString attrib = n.attribute( "name" );
TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
- if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
+ if ( tqparent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( attrib == "title" )
- ( (TQTabWidget*)parent )->insertTab( w, translate(v.toString()) );
+ ( (TQTabWidget*)tqparent )->insertTab( w, translate(v.toString()) );
} else
- if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
+ if ( tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
if ( attrib == "label" )
- ( (TQToolBox*)parent )->addItem( w, translate(v.toString()) );
- }else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
+ ( (TQToolBox*)tqparent )->addItem( w, translate(v.toString()) );
+ }else if ( tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
if ( attrib == "title" )
- ( (TQWizard*)parent )->addPage( w, translate(v.toString()) );
+ ( (TQWizard*)tqparent )->addPage( w, translate(v.toString()) );
}
} else if ( n.tagName() == "item" ) {
createItem( n, w );
@@ -619,60 +622,60 @@ TQWidget *KommanderFactory::createWidgetInternal( const TQDomElement &e, TQWidge
return w;
}
-TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, LayoutType type )
+TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type )
{
int spacing = defSpacing;
int margin = defMargin;
- if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
widget = ((TQToolBox*)widget)->currentItem();
- if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
+ if ( !tqlayout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
- gb->layout()->setMargin( 0 );
- gb->layout()->setSpacing( 0 );
+ gb->tqlayout()->setMargin( 0 );
+ gb->tqlayout()->setSpacing( 0 );
TQLayout *l;
switch ( type ) {
case HBox:
- l = new TQHBoxLayout( gb->layout() );
- l->setAlignment( Qt::AlignTop );
+ l = new TQHBoxLayout( gb->tqlayout() );
+ l->tqsetAlignment( TQt::AlignTop );
return l;
case VBox:
- l = new TQVBoxLayout( gb->layout(), spacing );
- l->setAlignment( Qt::AlignTop );
+ l = new TQVBoxLayout( gb->tqlayout(), spacing );
+ l->tqsetAlignment( TQt::AlignTop );
return l;
case Grid:
- l = new TQGridLayout( gb->layout() );
- l->setAlignment( Qt::AlignTop );
+ l = new TQGridLayout( gb->tqlayout() );
+ l->tqsetAlignment( TQt::AlignTop );
return l;
default:
return 0;
}
} else {
- if ( layout ) {
+ if ( tqlayout ) {
TQLayout *l;
switch ( type ) {
case HBox:
- l = new TQHBoxLayout( layout );
+ l = new TQHBoxLayout( tqlayout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
case VBox:
- l = new TQVBoxLayout( layout );
+ l = new TQVBoxLayout( tqlayout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
case Grid: {
- l = new TQGridLayout( layout );
+ l = new TQGridLayout( tqlayout );
l->setSpacing( spacing );
l->setMargin( margin );
return l;
@@ -712,26 +715,26 @@ TQLayout *KommanderFactory::createLayout( TQWidget *widget, TQLayout* layout, L
}
}
-KommanderFactory::LayoutType KommanderFactory::layoutType( TQLayout *layout ) const
+KommanderFactory::LayoutType KommanderFactory::tqlayoutType( TQLayout *tqlayout ) const
{
- if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
+ if ( tqlayout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
- else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox;
- else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid;
return NoLayout;
}
void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
+ const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, true ), true );
TQVariant defVariant;
if ( e.tagName() == "font" ) {
- TQFont f( qApp->font() );
- if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
- f = ( (TQWidget*)obj )->parentWidget()->font();
+ TQFont f( tqApp->font() );
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->tqparentWidget() )
+ f = ( (TQWidget*)obj )->tqparentWidget()->font();
defVariant = TQVariant( f );
}
@@ -763,7 +766,7 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
if ( !v.toString().isEmpty() )
TQWhatsThis::add( (TQWidget*)obj, translate(v.toString()) );
}
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( prop == "database" && !obj->inherits( TQDATAVIEW_OBJECT_NAME_STRING )
&& !obj->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) ) {
TQStringList lst = DomTool::elementToVariant( e, TQVariant( TQStringList() ) ).toStringList();
@@ -789,8 +792,8 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
noDatabaseWidgets << obj->name();
}
} else if ( prop == "buttonGroupId" ) {
- if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
- ( (TQButtonGroup*)obj->parent() )->insert( (TQButton*)obj, v.toInt() );
+ if ( obj->inherits( TQBUTTON_OBJECT_NAME_STRING ) && obj->tqparent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
+ ( (TQButtonGroup*)obj->tqparent() )->insert( (TQButton*)obj, v.toInt() );
}
return;
@@ -828,7 +831,7 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
}
if ( prop == "geometry" ) {
- if ( obj == toplevel ) {
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) {
toplevel->resize( v.toRect().size() );
return;
}
@@ -837,7 +840,7 @@ void KommanderFactory::setProperty( TQObject* obj, const TQString &prop, const T
obj->setProperty( prop, v );
}
-void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
+void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *tqlayout )
{
TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt();
@@ -869,7 +872,7 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
sizeType = TQSizePolicy::MinimumExpanding;
else if ( n.firstChild().firstChild().toText().data() == "Expanding" )
sizeType = TQSizePolicy::Expanding;
- } else if ( prop == "sizeHint" ) {
+ } else if ( prop == "tqsizeHint" ) {
w = n.firstChild().firstChild().firstChild().toText().data().toInt();
h = n.firstChild().firstChild().nextSibling().firstChild().toText().data().toInt();
}
@@ -883,12 +886,12 @@ void KommanderFactory::createSpacer( const TQDomElement &e, TQLayout *layout )
colspan = 1;
TQSpacerItem *item = new TQSpacerItem( w, h, orient == Qt::Horizontal ? sizeType : TQSizePolicy::Minimum,
orient == Qt::Vertical ? sizeType : TQSizePolicy::Minimum );
- if ( layout ) {
- if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQBoxLayout*)layout )->addItem( item );
+ if ( tqlayout ) {
+ if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQBoxLayout*)tqlayout )->addItem( item );
else
- ( (TQGridLayout*)layout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
- orient == Qt::Horizontal ? Qt::AlignVCenter : Qt::AlignHCenter );
+ ( (TQGridLayout*)tqlayout )->addMultiCell( item, row, row + rowspan - 1, col, col + colspan - 1,
+ orient == Qt::Horizontal ? TQt::AlignVCenter : TQt::AlignHCenter );
}
}
@@ -1004,7 +1007,7 @@ struct Connection
}
};
-class NormalizeObject : public QObject
+class NormalizeObject : public TQObject
{
public:
NormalizeObject() : TQObject() {}
@@ -1023,7 +1026,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
if ( n2.tagName() == "sender" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
- conn.sender = toplevel;
+ conn.sender = TQT_TQOBJECT(toplevel);
} else {
if ( name == "this" )
name = toplevel->name();
@@ -1041,7 +1044,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
- conn.receiver = toplevel;
+ conn.receiver = TQT_TQOBJECT(toplevel);
} else {
TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
@@ -1062,7 +1065,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
TQObject *sender = 0, *receiver = 0;
TQObjectList *l = toplevel->queryList( 0, conn.sender->name(), false );
if ( qstrcmp( conn.sender->name(), toplevel->name() ) == 0 ) {
- sender = toplevel;
+ sender = TQT_TQOBJECT(toplevel);
} else {
if ( !l || !l->first() ) {
delete l;
@@ -1076,7 +1079,7 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
sender = findAction( conn.sender->name() );
if ( qstrcmp( conn.receiver->name(), toplevel->name() ) == 0 ) {
- receiver = toplevel;
+ receiver = TQT_TQOBJECT(toplevel);
} else {
l = toplevel->queryList( 0, conn.receiver->name(), false );
if ( !l || !l->first() ) {
@@ -1090,22 +1093,22 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
if ( lang == "C++" ) {
TQString s = "2""%1";
- s = s.arg( conn.signal );
+ s = s.tqarg( conn.signal.data() );
TQString s2 = "1""%1";
- s2 = s2.arg( conn.slot );
+ s2 = s2.tqarg( conn.slot.data() );
- TQStrList signalList = sender->metaObject()->signalNames( true );
- TQStrList slotList = receiver->metaObject()->slotNames( true );
+ TQStrList signalList = sender->tqmetaObject()->signalNames( true );
+ TQStrList slotList = receiver->tqmetaObject()->slotNames( true );
// if this is a connection to a custom slot and we have a connector, try this as receiver
- if ( slotList.find( conn.slot ) == -1 && receiver == toplevel && connector ) {
- slotList = connector->metaObject()->slotNames( true );
+ if ( slotList.tqfind( conn.slot ) == -1 && TQT_BASE_OBJECT(receiver) == TQT_BASE_OBJECT(toplevel) && connector ) {
+ slotList = connector->tqmetaObject()->slotNames( true );
receiver = connector;
}
// avoid warnings
- if ( signalList.find( conn.signal ) == -1 ||
- slotList.find( conn.slot ) == -1 ) {
+ if ( signalList.tqfind( conn.signal ) == -1 ||
+ slotList.tqfind( conn.slot ) == -1 ) {
n = n.nextSibling().toElement();
continue;
}
@@ -1114,11 +1117,11 @@ void KommanderFactory::loadConnections( const TQDomElement &e, TQObject *connect
EventFunction ef = eventMap[ conn.sender ];
ef.events.append( conn.signal );
ef.functions.append( TQStringList::split( ',', conn.slot ) );
- eventMap.replace( conn.sender, ef );
+ eventMap.tqreplace( conn.sender, ef );
}
} else if ( n.tagName() == "slot" ) {
TQString s = n.firstChild().toText().data();
- languageSlots.insert( s.left( s.find( "(" ) ) , n.attribute( "language" ) );
+ languageSlots.insert( s.left( s.tqfind( "(" ) ) , n.attribute( "language" ) );
}
n = n.nextSibling().toElement();
}
@@ -1181,17 +1184,17 @@ void KommanderFactory::createColumn( const TQDomElement &e, TQWidget *widget )
if ( !resizeable )
lv->header()->setResizeEnabled( resizeable, i );
}
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) {
TQTable *table = (TQTable*)widget;
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
bool isSql = (widget->inherits( TQDATATABLE_OBJECT_NAME_STRING ));
#endif
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
table->setNumRows( table->numRows() + 1 );
else {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( !isSql )
#endif
table->setNumCols( table->numCols() + 1 );
@@ -1203,8 +1206,8 @@ void KommanderFactory::createColumn( const TQDomElement &e, TQWidget *widget )
TQString txt;
TQString field;
TQValueList fieldMap;
- if ( fieldMaps.find( table ) != fieldMaps.end() ) {
- fieldMap = *fieldMaps.find( table );
+ if ( fieldMaps.tqfind( table ) != fieldMaps.end() ) {
+ fieldMap = *fieldMaps.tqfind( table );
fieldMaps.remove( table );
}
while ( !n.isNull() ) {
@@ -1226,14 +1229,14 @@ void KommanderFactory::createColumn( const TQDomElement &e, TQWidget *widget )
int i = isRow ? table->numRows() - 1 : table->numCols() - 1;
TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader();
if ( hasPixmap ) {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( isSql )
((TQDataTable*)table)->addColumn( field, txt, -1, pix );
else
#endif
h->setLabel( i, pix, txt );
} else {
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( isSql ) {
((TQDataTable*)table)->addColumn( field, txt );
}
@@ -1286,7 +1289,7 @@ void KommanderFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLi
} else {
new TQListBoxText( lb, txt );
}
-#ifndef QT_NO_ICONVIEW
+#ifndef TQT_NO_ICONVIEW
} else if ( widget->inherits( TQICONVIEW_OBJECT_NAME_STRING ) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
@@ -1341,13 +1344,13 @@ void KommanderFactory::createItem( const TQDomElement &e, TQWidget *widget, TQLi
-void KommanderFactory::loadChildAction( TQObject *parent, const TQDomElement &e )
+void KommanderFactory::loadChildAction( TQObject *tqparent, const TQDomElement &e )
{
TQDomElement n = e;
TQAction *a = 0;
EventFunction ef;
if ( n.tagName() == "action" ) {
- a = new TQAction( parent );
+ a = new TQAction( tqparent );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
@@ -1358,10 +1361,10 @@ void KommanderFactory::loadChildAction( TQObject *parent, const TQDomElement &e
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
actionList.append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new TQActionGroup( parent );
+ a = new TQActionGroup( tqparent );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
@@ -1375,7 +1378,7 @@ void KommanderFactory::loadChildAction( TQObject *parent, const TQDomElement &e
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
actionList.append( a );
}
if ( a )
@@ -1387,9 +1390,9 @@ void KommanderFactory::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
- loadChildAction( toplevel, n );
+ loadChildAction( TQT_TQOBJECT(toplevel), n );
} else if ( n.tagName() == "actiongroup" ) {
- loadChildAction( toplevel, n );
+ loadChildAction( TQT_TQOBJECT(toplevel), n );
}
n = n.nextSibling().toElement();
}
@@ -1402,8 +1405,8 @@ void KommanderFactory::loadToolBars( const TQDomElement &e )
TQToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
- Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
- tb = new TQToolBar( TQString::null, mw, dock );
+ TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
+ tb = new TQToolBar( TQString(), mw, dock );
tb->setLabel( n.attribute( "label" ) );
tb->setName( n.attribute( "name" ) );
TQDomElement n2 = n.firstChild().toElement();
@@ -1417,7 +1420,7 @@ void KommanderFactory::loadToolBars( const TQDomElement &e )
} else if ( n2.tagName() == "widget" ) {
(void)createWidgetInternal( n2, tb, 0, n2.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) );
} else if ( n2.tagName() == "property" ) {
- setProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
+ setProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
}
@@ -1448,7 +1451,7 @@ void KommanderFactory::loadMenuBar( const TQDomElement &e )
}
mb->insertItem( translate( n.attribute( "text" ) ), popup );
} else if ( n.tagName() == "property" ) {
- setProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
+ setProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
}
n = n.nextSibling().toElement();
}
diff --git a/kommander/factory/kommanderfactory.h b/kommander/factory/kommanderfactory.h
index ba3d7744..147749c2 100644
--- a/kommander/factory/kommanderfactory.h
+++ b/kommander/factory/kommanderfactory.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
@@ -42,7 +42,7 @@ class KommanderPlugin;
struct KommanderWidgetInfo
{
KommanderWidgetInfo() {}
- KommanderWidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = FALSE )
+ KommanderWidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString(), bool c = FALSE )
: group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c )
{
}
@@ -60,13 +60,13 @@ public:
KommanderFactory();
virtual ~KommanderFactory();
- static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
- static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *parent = 0, const char *name = 0 );
+ static TQWidget *create( const TQString &uiFile, TQObject *connector = 0, TQWidget *tqparent = 0, const char *name = 0 );
+ static TQWidget *create( TQIODevice *dev, TQObject *connector = 0, TQWidget *tqparent = 0, const char *name = 0 );
static int loadPlugins( bool force = FALSE );
static void addPlugin( KommanderPlugin *plugin );
static void loadImages( const TQString &dir );
- static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name );
+ static TQWidget *createWidget( const TQString &className, TQWidget *tqparent, const char *name );
static FeatureList featureList();
private:
@@ -74,18 +74,18 @@ private:
void loadImageCollection( const TQDomElement &e );
void loadConnections( const TQDomElement &e, TQObject *connector );
void loadTabOrder( const TQDomElement &e );
- TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *parent, TQLayout* layout, const TQString &classNameArg );
- TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
- LayoutType layoutType( TQLayout *l ) const;
+ TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout, const TQString &classNameArg );
+ TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type );
+ LayoutType tqlayoutType( TQLayout *l ) const;
void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e );
- void createSpacer( const TQDomElement &e, TQLayout *layout );
+ void createSpacer( const TQDomElement &e, TQLayout *tqlayout );
TQImage loadFromCollection( const TQString &name );
TQPixmap loadPixmap( const TQDomElement &e );
TQColorGroup loadColorGroup( const TQDomElement &e );
void createColumn( const TQDomElement &e, TQWidget *widget );
void loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap );
void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
- void loadChildAction( TQObject *parent, const TQDomElement &e );
+ void loadChildAction( TQObject *tqparent, const TQDomElement &e );
void loadActions( const TQDomElement &e );
void loadToolBars( const TQDomElement &e );
void loadMenuBar( const TQDomElement &e );
@@ -109,7 +109,7 @@ private:
TQString name;
TQPixmap pix;
TQString field;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Field& ) const { return FALSE; }
#endif
};
diff --git a/kommander/kmdrtools/dcoptool-oldparser.kmdr b/kommander/kmdrtools/dcoptool-oldparser.kmdr
index e6a8ec54..0cbf0f5d 100755
--- a/kommander/kmdrtools/dcoptool-oldparser.kmdr
+++ b/kommander/kmdrtools/dcoptool-oldparser.kmdr
@@ -61,7 +61,7 @@ openfiles(QString,QString,QString)")
associatedText(QString)
cellText(QString,int,int)
checked(QString)
-children(QString,bool)
+tqchildren(QString,bool)
clear(QString)
count(QString)
currentColumn(QString)
@@ -105,14 +105,14 @@ append(QString,QString)")
@setGlobal(KommanderMessage,"")
@setGlobal(String,"length(QString)
-contains(QString,QString)
-find(QString,QString,int)
-findRev(QString,QString,int)
+tqcontains(QString,QString)
+tqfind(QString,QString,int)
+tqfindRev(QString,QString,int)
left(QString,int)
right(QString,int)
mid(QString,int,int)
remove(QString,QString)
-replace(QString,QString,QString)
+tqreplace(QString,QString,QString)
upper(QString)
lower(QString)
compare(QString,QString)
@@ -131,7 +131,7 @@ args(QString,QString,QString,QString)")
-
+
Layout9
@@ -224,7 +224,7 @@ args(QString,QString,QString,QString)")
-
+
TextLabel4
@@ -247,7 +247,7 @@ args(QString,QString,QString,QString)")
-
+
Layout10
@@ -269,7 +269,7 @@ args(QString,QString,QString,QString)")
6
-
+
TextLabel3
@@ -326,7 +326,7 @@ args(QString,QString,QString,QString)")
-
+
Layout11
@@ -382,7 +382,7 @@ args(QString,QString,QString,QString)")
Expanding
-
+
80
0
@@ -400,9 +400,9 @@ args(QString,QString,QString,QString)")
@switch(@String.mid(@dcopstr.selection, 1, 4))
@case(dcop)
- @setGlobal("outstring","@dcopstr.selection @window.selection, @branch.selection, "@proto.selection", @String.mid(@wname.selection, 0, @String.find(@wname.selection, " ", ))@param1@param2@param3@param4)")
+ @setGlobal("outstring","@dcopstr.selection @window.selection, @branch.selection, "@proto.selection", @String.mid(@wname.selection, 0, @String.tqfind(@wname.selection, " ", ))@param1@param2@param3@param4)")
@case(cop)
- @setGlobal("outstring","@dcopstr.selection @window.selection @branch.selection @global(short) @String.mid(@wname.selection, 0, @String.find(@wname.selection, " ", ))@param1@param2@param3@param4")
+ @setGlobal("outstring","@dcopstr.selection @window.selection @branch.selection @global(short) @String.mid(@wname.selection, 0, @String.tqfind(@wname.selection, " ", ))@param1@param2@param3@param4")
@case(*)
@setGlobal("outstring","@dcopstr.selection - not found")
@end
@@ -443,7 +443,7 @@ args(QString,QString,QString,QString)")
Expanding
-
+
120
0
@@ -578,7 +578,7 @@ fi
-
+
TextLabel2
@@ -594,7 +594,7 @@ fi
-
- "kmdr-executor-"+parentPid
+ "kmdr-executor-"+tqparentPid
@@ -645,9 +645,9 @@ fi
@end
@setGlobal(pdlg,@exec(kdialog --menu "Select a dialog other than pid @pid to parse" @global(kdlg)))
@#@exec(kdialog --msgbox "@global(_KDDIR)\n")
-@# dcop kmdr-executor-32730 KommanderIf children kmdr-executor-32730 1
+@# dcop kmdr-executor-32730 KommanderIf tqchildren kmdr-executor-32730 1
@wname.clear
-@setGlobal(items,@dcop(@global(pdlg), KommanderIf, "children(QString,bool)", @global(pdlg), 1 ))
+@setGlobal(items,@dcop(@global(pdlg), KommanderIf, "tqchildren(QString,bool)", @global(pdlg), 1 ))
@setGlobal(iwd,"")
@forEach(i, @global(items))
@setGlobal(iwd, "@global(iwd)@i (@dcop(@global(pdlg), KommanderIf, "type(QString)", @i))\n")
@@ -731,7 +731,7 @@ fi
Expanding
-
+
111
0
@@ -789,14 +789,14 @@ fi
@setGlobal(PARM4,"")
@setGlobal(short,checked)
@setGlobal(DESC,"Returns 1 for checked boxes, 0 for unchecked.")
-@case(DCOP::children(QString,bool))
+@case(DCOP::tqchildren(QString,bool))
@setGlobal(enWidget,1)
@setGlobal(PARM1,"recursive")
@setGlobal(PARM2,"")
@setGlobal(PARM3,"")
@setGlobal(PARM4,"")
- @setGlobal(short,children)
- @setGlobal(DESC,"Returns the list of child widgets contained in the parent widget. Set the <i>recursive</i> parameter to <i>true</i> to include widgets contained by child widgets.")
+ @setGlobal(short,tqchildren)
+ @setGlobal(DESC,"Returns the list of child widgets contained in the tqparent widget. Set the <i>recursive</i> parameter to <i>true</i> to include widgets contained by child widgets.")
@case(DCOP::clear(QString))
@setGlobal(enWidget,1)
@setGlobal(PARM1,"")
@@ -1117,14 +1117,14 @@ fi
@setGlobal(PARM4,"")
@setGlobal(short,dcopid)
@setGlobal(DESC,"Returns DCOP identifier of current process. This is shorthand for <i>kmdr-executor-@pid</i>.")
-@case(Kommander::parentPid(QString,bool))
+@case(Kommander::tqparentPid(QString,bool))
@setGlobal(enWidget,1)
@setGlobal(PARM1,"editable")
@setGlobal(PARM2,"")
@setGlobal(PARM3,"")
@setGlobal(PARM4,"")
- @setGlobal(short,parentPid)
- @setGlobal(DESC,"Returns the pid of the parent Kommander window.")
+ @setGlobal(short,tqparentPid)
+ @setGlobal(DESC,"Returns the pid of the tqparent Kommander window.")
@case(Kommander::debug(QString))
@setGlobal(enWidget,0)
@setGlobal(PARM1,"text")
@@ -1276,7 +1276,7 @@ fi
@setGlobal(PARM3,"function")
@setGlobal(PARM4,"args")
@setGlobal(short,dcop)
- @setGlobal(DESC,"Creates a new widget with the specified type and as the child of parent.")
+ @setGlobal(DESC,"Creates a new widget with the specified type and as the child of tqparent.")
@case(Kommander::dcop(QString,QString,QString,QString))
@setGlobal(enWidget,0)
@setGlobal(PARM1,"id")
@@ -1445,29 +1445,29 @@ fi
@setGlobal(PARM4,"")
@setGlobal(short,length)
@setGlobal(DESC,"Returns number of chars in the string.")
-@case(String::contains(QString,QString))
+@case(String::tqcontains(QString,QString))
@setGlobal(enWidget,0)
@setGlobal(PARM1,"string")
@setGlobal(PARM2,"substring")
@setGlobal(PARM3,"")
@setGlobal(PARM4,"")
- @setGlobal(short,contains)
+ @setGlobal(short,tqcontains)
@setGlobal(DESC,"Checks if the the string contains the given substring.")
-@case(String::find(QString,QString,int))
+@case(String::tqfind(QString,QString,int))
@setGlobal(enWidget,0)
@setGlobal(PARM1,"string")
@setGlobal(PARM2,"sought")
@setGlobal(PARM3,"index")
@setGlobal(PARM4,"")
- @setGlobal(short,find)
+ @setGlobal(short,tqfind)
@setGlobal(DESC,"Returns the position of a substring in the string, or -1 if it is not found.")
-@case(String::findRev(QString,QString,int))
+@case(String::tqfindRev(QString,QString,int))
@setGlobal(enWidget,0)
@setGlobal(PARM1,"string")
@setGlobal(PARM2,"sought")
@setGlobal(PARM3,"index")
@setGlobal(PARM4,"")
- @setGlobal(short,findRev)
+ @setGlobal(short,tqfindRev)
@setGlobal(DESC,"Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards")
@case(String::left(QString,int))
@setGlobal(enWidget,0)
@@ -1501,13 +1501,13 @@ fi
@setGlobal(PARM4,"")
@setGlobal(short,remove)
@setGlobal(DESC,"Removes all occurrences of given substring.")
-@case(String::replace(QString,QString,QString))
+@case(String::tqreplace(QString,QString,QString))
@setGlobal(enWidget,0)
@setGlobal(PARM1,"string")
@setGlobal(PARM2,"substring")
@setGlobal(PARM3,"replacement")
@setGlobal(PARM4,"")
- @setGlobal(short,replace)
+ @setGlobal(short,tqreplace)
@setGlobal(DESC,"Replaces all occurrences of the given substring with the given replacement.")
@case(String::upper(QString))
@setGlobal(enWidget,0)
@@ -1820,7 +1820,7 @@ fi
associatedText(QString)
cellText(QString,int,int)
checked(QString)
-children(QString,bool)
+tqchildren(QString,bool)
clear(QString)
count(QString)
currentColumn(QString)
@@ -1879,7 +1879,7 @@ setEditable(QString,bool)")
@##### put the following in @wfilter checked #########
-@setGlobal(start,@expr(@String.find("@wname.selection", " ")+2))
+@setGlobal(start,@expr(@String.tqfind("@wname.selection", " ")+2))
@setGlobal(stop,@expr(@String.length("@wname.selection")-1))
@setGlobal(length,@expr(@global(stop)-@global(start)))
@setGlobal(teststr, @String.lower(@String.mid("@wname.selection", @global(start), @global(length))))
@@ -2121,5 +2121,5 @@ setColumnCaption(QString,int,QString)")
window
widgetName
-
+
diff --git a/kommander/kmdrtools/examples.kmdr b/kommander/kmdrtools/examples.kmdr
index 4e63e80f..5d32d858 100755
--- a/kommander/kmdrtools/examples.kmdr
+++ b/kommander/kmdrtools/examples.kmdr
@@ -75,7 +75,7 @@ end
0
-
+
Layout90
@@ -99,7 +99,7 @@ end
Expanding
-
+
71
0
@@ -134,7 +134,7 @@ endif
Expanding
-
+
71
0
@@ -150,5 +150,5 @@ endif
789ca598d94f1fc911c7dff7af40db6faba877a667baa747511e8c01e3030c06cc11e5a1aa7a86cbdc603051fef734f5ad9fed5d2952a4f521fba3beeaae1a7eff6de9606b63e9b7df7fb9bba7fb53599213ba5dfaad3c5c5c7cfbe7bffef1ef5f7e0d61a9fee9425e0abffeed975fb7ef976469f3ea727a013f56708dfe7a61597069b372068729f6cabbe0dcc8acbc622c4599c1a10dad72f1ca5d1370bfc77d5dcb01e70770176252de51eebb1c21df96720c6d87f51edcd3202fec5e29a7c01dee3b541e43dfa9b2ee4699dbd88e2a0f2997861a5d97040ed441dfa83c776d8ff5a3176e9b466cff6be5b6ded7aabe07ca5d37f6f4c2f400ee1bc84f1f95fb2859d7654f39a6766495c729a7b66d3a5dc77d431fa2ca2b9f9573ecb2ae975999dafa80ae5f1a0f0df6ef83fb79507bf927701e65d0f39372b507cef3837102fb2be3a1d1fd1efb4b65f87f193c3454f4fcaaf294a3e8ba6b5e3834ed88f3a528b72d352a0fef1b33e4f5df9443655d776aefd02d582e94fb568c3be3b9813ddf2a577b6695df6d1bf3a8f662514eed64fa7c521e6a38ea79867c39b48dfa9f8e95c705fb1f0c79d55f8142d7a8feee1a9cbaacfafb013c24d8c7df29f398912fee8db2c431e17d562ea137ff41be52eda9f2ca15784c05f10e7da7ba5fe5e3afc6b1d1789333f0200cff6e2acf21415f4fc643837cd5f8ace99971de6bfe756d65bc770aee52d0f8e77be550d7555efe0c4e09f1e95ae52e8c382fe7e0ae4680aeef832345e4eb2a788cd08f351fbb18b8d1fc70deb858bee1be983bc67b9aef55ba453c6d1b4b8b7a73094e7d823d37c15944f575b7ca43985ae4f7163813d6f98b71417c7bd82b6766c8ff9d8bbe479a9fdd1826e8ef173c9bfc199c02e4f167e09c08f1fb4e9916e749c0718c6a0f817e9ce70279b5fe75656c0bce6bfdeea6b1401e79569ec750903fa7c65dd1f749fdd7b75d84bd68cf3899bc1d38ce51f7b3c64f1f6a81837f37c0fdd4e9fb45e3b9efbb01f6a457c6638bf7efc07966c4eb9a721c09fef7e0347403de3b048f52501fd51ffdd091f94beb479fc75c50bfb5fef463c7886f5f8ca5457d5a07f78dc973021e479ca76cccd6dfde1897a2f92cd7df19f9f200e66e02639d3a8b57ff15cc11eb1c94b9ea83fc1fc1d4a27ffa4730e709f9a9fda697b117f873dd7886bd44fb5b5f16e759e3a79faa01105ff7604eb8af683cf573df427fd27c8c4ddfc05ea2fe8b6dead0cfbcde17bb61863fc4836998d05fb53ebdb4e309f5f69371467cb1d6c318fb8c7940b41fc594ad3e8bda230ebdc59fc3f9816982fce7606967f85bf329e6aa2fcedf1a0f93dadbad19cf13f255e3258e6326f81ffa513fb6e89fc7600a45f38b5be3cee23119cf13ea9dc67be47a5edff747e034637e21cdafda0c09eb0c798426d88b36c1dc9a7c9067ea6dde7207e03a5ea01fdc1bd714d3f31a4f351bfb80fe7e011ed3a8f672cf606a102facf1949a7ec67d740fe61efef26aff3a8d7419f553e33d853a70a1bf6b7ca5eaff84fa7c09e63a10eafe689c2dbe351f534fc4e87f9b6066cb8ff7c613e291d4be29d6fc80fe97c684fda4fd28a52a0fe6870b70951ff1a5f99e061a11ffe2c0dfe5db302e33fa81ceaf29c7087bf30c1e53863c03b8ca83fa087dc6d8e37dbf0c669970df0765926646bdd478484c05eb0c7b72f537e261c738435fdf8317e77d671c26d85ffb7d7a891f5d27e823d59ee8075a8f53a9fae2fd2be31efa5334a609fd17f217e9cc7eda4fd2944a07be06d7fbd0efcf8c05e7a9372e789fb51ea5991bab072acfd04446fcc83b6369e1ff67e3a9457e9d825313109f5bc66d40fdd1fe31b4291beb7b43a8e7f57eeac0d2c05e148c5bc48fcbc619f6259d67872ece013c82ebf8827ab307ce92d45fa4fd63e853ead01fb51e0fb1be8f7e7108ce39a1be607fa49170ff07f0c29feec27898314f6bbd1952b4fc746aef614813be47dc399832a17edc81a5b7fcb9361e511f59fd33e4dabe21df93710c88e7b7e0fa3ee4d37a338ca9833dbc185bbde1c9389abd9e8d5340fdb835ce01f322de1f47ca8807cdf781d380fa4f2b0b0e88cf2fe03aeec1deb65fac5f11e247aaffd01fb4df0ea59e473eed826b3d417d867da6349a7c37c6847ac94fc605eb04f9a76a3fdc8ff89917e769d7d8ced3155826f88f35bf7293d8d64f8ca780786fc143d3a17e1b2fdea31b63863f44e325b7f53eb59fc77dede2bc4ce04c09f6d57a9043ae21a8f2ec81ab3de0ff75b0c80c7be1fe2e31fce1ee8d05f9e4eec0436bf1cee05a2f50ff347e725fc73bc4db7be301f2b947b044f467a7f37dfd9a317b91379e218f837e491af45fa7f3681eaaff11af3a0fe43c04c4179f82c5fa0d69bdafd3fae23eed8f99eb38827eb40c9638213ebf804b67fb35de6b3a0c01f543f3af0e2f09f586b51ee56960e4a3877c53e94d9fcbef8cefd7c138ce9897609f3a3d05f8e7192cd6df58e51fdb41ccde6b6059f40fad7f6390d1ea19f6f7b9ef313fbc06978cf748eb6ffd5a0ce66f9d6fea746cf313a93feab8dbf69837b57fd66c8df6f31331ce3df245fd33723d8ff96ad378b07eba62cc33ea95c6d72839a19ed2b231c11f74042ec9eedb3266c8ef57bf33ecadf5b54ebb56df48e38b9a2c3de637adb7d48e8dfdfca50117abaf7edf58709f68fda0900bf4753be0ba8efea7f580fa3ce1e73f746e3cf78897042ec5f455fd292e5834fe285579b05ffb130d63077fc9a371847d49e7833abd14bcef3e1acf33fa81e63351b507f24feb35f1d4d8bafabf7eac36789f35bfa88cf58341d7b57ed15426bb7f024f2dce93f6a33add2e58e781fa315d2750dd1fc153b0f7745eaa5f3b61c63ca1f5f4659a34d678abd3d382757eaa5f1fc6dbf7ffffefbfb6df3b4ffa2f7bf1c54ff57fb33ffe5ffbfdb13ff1a7fecc9ffb2ffec25ffa2b7fed6ffcadbff3f7fec17ff58ffee90ffbbff967ffca2ffbd77ec5affa35ffc6affbb7fe9d7fef3ff80dbfe93ffaadc57ebfed3ff91dbfebf7fc67bfef0ffca13ff28d6f7df09def7df4c90f3efb11fb9d77ce916327aeb8c9cdeed89db85377e6cedd1777e12edd95bb76377e5cc8ef6edd9dbb770feeab7b744fee5bfdfbec5eb965f7daadb855b7e6deb875f7f6677ddd3bf7de7d701b6eb3defed16db96df7c9edb85db7e73ebb7d77e00eddd18ffdae71ad0bae73bd8b2eb9c1e55a1e3cd5982426a15207cb998e7feca7133aa5333aa72f7441977445d77443b77447f7f4405fe9919ee81b3dd3abeffb97e935add02aadd11b5aa7b7f48eded307daa04dfa485bb44d9f68877669effbfecfb44f07744847d4504b813aea2952a297196964cf8e8999e587beb5384d3cf3319ff0299ff1397fe10bbee42bbee61bbee53bbee7871ff2f3577ee427fec6cffc8a97f935aff02aaff11b5ee7b7fc8edff307dee0cd9ff67fe42ddee64fbcc3bbbcc79f799f0ff8908fea44d372e08e7bae9f873fdb9f07ae9fbfe2c509098b4891496639961339953339972f72f1f37eb9942bb9961bb9953bb99707f92a8ff224dfe4595ed513cbf2fa8ff12c2bb22a6bf246d6e52d277927efe5836cc8a67c942dd9964fb2f3a7fdbbb2279f655f0ee4508ea491568274527bb8241924cbf8e77cf1a31f8b2faed40c2b5c84e652eaffa632ffa5fcfdcfdf7ff92f64b3cec5
-
+
diff --git a/kommander/part/kommander_part.cpp b/kommander/part/kommander_part.cpp
index d8645bc9..58912dd9 100644
--- a/kommander/part/kommander_part.cpp
+++ b/kommander/part/kommander_part.cpp
@@ -33,13 +33,13 @@ typedef KParts::GenericFactory KommanderPartFactory;
K_EXPORT_COMPONENT_FACTORY( libkommander_part, KommanderPartFactory )
-KommanderPart::KommanderPart( TQWidget *parentWidget, const char * /*widgetName*/,
- TQObject *parent, const char *name, const TQStringList & /*args*/ )
- : KParts::ReadOnlyPart(parent, name)
+KommanderPart::KommanderPart( TQWidget *tqparentWidget, const char * /*widgetName*/,
+ TQObject *tqparent, const char *name, const TQStringList & /*args*/ )
+ : KParts::ReadOnlyPart(tqparent, name)
{
setInstance( KommanderPartFactory::instance() );
m_instance = 0L;
- m_widget = new TQWidget(parentWidget);
+ m_widget = new TQWidget(tqparentWidget);
setWidget(m_widget);
m_layout = new TQGridLayout(m_widget);
}
@@ -79,7 +79,7 @@ void KommanderPart::slotRun()
{
w->reparent(m_widget, 0, TQPoint(0,0));
m_layout->addWidget(w, 0, 0);
- w->show(); //show, not execute, so it doesn't block the parent
+ w->show(); //show, not execute, so it doesn't block the tqparent
}
}
diff --git a/kommander/part/kommander_part.h b/kommander/part/kommander_part.h
index 1519f6c3..5e9fc4f5 100644
--- a/kommander/part/kommander_part.h
+++ b/kommander/part/kommander_part.h
@@ -24,9 +24,10 @@ class TQGridLayout;
class KommanderPart : public KParts::ReadOnlyPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- KommanderPart(TQWidget *parentWidget, const char *widgetName,
- TQObject *parent, const char *name, const TQStringList &args);
+ KommanderPart(TQWidget *tqparentWidget, const char *widgetName,
+ TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KommanderPart();
diff --git a/kommander/plugin/kommanderplugin.h b/kommander/plugin/kommanderplugin.h
index d74abaa4..ae06fdc0 100644
--- a/kommander/plugin/kommanderplugin.h
+++ b/kommander/plugin/kommanderplugin.h
@@ -1,29 +1,29 @@
/****************************************************************************
- ** kommanderplugin.h - KommanderPlugin class definition created from QWidgetPlugin
+ ** kommanderplugin.h - KommanderPlugin class definition created from TQWidgetPlugin
** Copyright (C) 2001 Trolltech AS. All rights reserved.
** Copyright (C) 2003 Marc Britton
**
- ** This file is part of the widgets module of the Qt GUI Toolkit.
+ ** This file is part of the widgets module of the TQt GUI Toolkit.
**
** This file may be distributed under the terms of the Q Public License
** as defined by Trolltech AS of Norway and appearing in the file
- ** LICENSE.QPL included in the packaging of this file.
+ ** LICENSE.TQPL included in the packaging of this file.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
- ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
- ** licenses may use this file in accordance with the Qt Commercial License
+ ** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+ ** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
- ** information about Qt Commercial License Agreements.
- ** See http://www.trolltech.com/qpl/ for QPL licensing information.
+ ** information about TQt Commercial License Agreements.
+ ** See http://www.trolltech.com/qpl/ for TQPL licensing information.
** See http://www.trolltech.com/gpl/ for GPL licensing information.
**
** Contact info@trolltech.com if any conditions of this licensing are
@@ -45,15 +45,16 @@ class TQIconSet;
class KOMMANDER_EXPORT KommanderPlugin : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KommanderPlugin();
~KommanderPlugin();
- virtual void addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis = TQString::null, bool isContainer = false);
+ virtual void addWidget( const TQString &name, const TQString &group, const TQString &toolTip, TQIconSet *iconSet, const TQString &whatsThis = TQString(), bool isContainer = false);
virtual void removeWidget( const TQString &name );
virtual TQStringList widgets() const;
- virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 ) = 0;
+ virtual TQWidget *create( const TQString &key, TQWidget *tqparent = 0, const char *name = 0 ) = 0;
virtual TQString group( const TQString &key ) const;
virtual TQString toolTip( const TQString &key ) const;
virtual TQString whatsThis( const TQString &key ) const;
@@ -75,7 +76,7 @@ class KOMMANDER_EXPORT KommanderPlugin : public TQObject
* @param maxArgs maximum number of accepted arguments
* @return true if registration was successful
*/
- static bool registerFunction(int id, const TQString& function, const TQString description = TQString::null,
+ static bool registerFunction(int id, const TQString& function, const TQString description = TQString(),
int minArgs = -1, int maxArgs = -1);
@@ -84,7 +85,7 @@ private:
struct WidgetInfo
{
WidgetInfo() { }
- WidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString::null, bool c = false)
+ WidgetInfo( const TQString &g, const TQString &t, TQIconSet *i, const TQString &w = TQString(), bool c = false)
: group( g ), toolTip( t ), iconSet(i), whatsThis( w ), isContainer( c )
{}
diff --git a/kommander/plugin/specialinformation.cpp b/kommander/plugin/specialinformation.cpp
index d6ed318b..bbfe308e 100644
--- a/kommander/plugin/specialinformation.cpp
+++ b/kommander/plugin/specialinformation.cpp
@@ -22,8 +22,8 @@ SpecialFunction::SpecialFunction(const TQString& name, const TQString& descripti
int minArgs, int maxArgs)
{
m_parserTypes = AllParsers;
- int lbracket = name.find('(');
- int rbracket = name.find(')');
+ int lbracket = name.tqfind('(');
+ int rbracket = name.tqfind(')');
m_function = (lbracket != -1) ? name.left(lbracket) : name;
m_description = description;
if (lbracket != -1 && rbracket != -1)
@@ -44,8 +44,8 @@ SpecialFunction::SpecialFunction(ParserType p, const TQString& name, const TQStr
int minArgs, int maxArgs)
{
m_parserTypes = p;
- int lbracket = name.find('(');
- int rbracket = name.find(')');
+ int lbracket = name.tqfind('(');
+ int rbracket = name.tqfind(')');
m_function = (lbracket != -1) ? name.left(lbracket) : name;
m_description = description;
if (lbracket != -1 && rbracket != -1)
@@ -71,15 +71,15 @@ TQString SpecialFunction::prototype(uint prototypeFlags) const
TQStringList params;
for (uint i=start; irecursive parameter to true to include widgets contained by child widgets."), 2);
+ insert(DCOP::tqchildren, "tqchildren(TQString widget, bool recursive)",
+ i18n("Returns the list of child widgets contained in the tqparent widget. Set the recursive parameter to true to include widgets contained by child widgets."), 2);
insert(DCOP::clear, "clear(TQString widget)",
i18n("Removes all content from the widget."), 1);
insertAlias(DCOP::clear, "clearList");
@@ -375,8 +375,8 @@ void SpecialInformation::registerSpecials()
i18n("Returns type(class) of widget."), 1);
insert(DCOP::setEditable, "setEditable(TQString widget, bool editable)",
i18n("Makes the widget editable or read only, depending on the editable argument."), 2);
- insertInternal(DCOP::geometry, "geometry(TQString widget)",
- i18n("Return the widget's geometry as x y w h. This is useful for positioning a created widget."), 1);
+ insertInternal(DCOP::tqgeometry, "tqgeometry(TQString widget)",
+ i18n("Return the widget's tqgeometry as x y w h. This is useful for positioning a created widget."), 1);
insertInternal(DCOP::hasFocus, "hasFocus(TQString widget)",
i18n("Returns true if the widget has focus."), 1);
insertInternal(DCOP::getBackgroundColor, "getBackgroundColor(TQString widget)",
@@ -400,8 +400,8 @@ void SpecialInformation::registerSpecials()
insert(Kommander::dcopid, "dcopid",
i18n("Returns DCOP identifier of current process. This is shorthand for kmdr-executor-@pid."),
0);
- insert(Kommander::parentPid, "parentPid",
- i18n("Returns the pid of the parent Kommander window."), 0);
+ insert(Kommander::tqparentPid, "tqparentPid",
+ i18n("Returns the pid of the tqparent Kommander window."), 0);
insert(Kommander::debug, "debug(TQString text)",
i18n("Writes text on stderr."), 1);
insert(Kommander::echo, "echo(TQString text)",
@@ -440,8 +440,8 @@ void SpecialInformation::registerSpecials()
i18n("Executes an external DCOP call."), 3, 9);
insertMacro(Kommander::comment, "#",
i18n("Adds a comment to EOL that Kommander will not parse"), 0);
- insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString parent)",
- i18n("Creates a new widget with the specified type and as the child of parent."), 3);
+ insertInternal(Kommander::createWidget, "createWidget(TQString widgetName, TQString widgetType, TQString tqparent)",
+ i18n("Creates a new widget with the specified type and as the child of tqparent."), 3);
insertInternal(Kommander::widgetExists, "widgetExists(TQString widgetName)",
i18n("Returns true if there is a widget with the passed name, false otherwise."), 1);
insertInternal(Kommander::connect, "connect(TQString sender, TQString signal, TQString receiver, TQString slot)",
@@ -524,11 +524,11 @@ void SpecialInformation::registerSpecials()
insertGroup(Group::String, "String", "str");
insert(String::length, "length(TQString string)",
i18n("Returns number of chars in the string."), 1);
- insert(String::contains, "contains(TQString string, TQString substring)",
+ insert(String::tqcontains, "tqcontains(TQString string, TQString substring)",
i18n("Checks if the the string contains the given substring."), 2);
- insert(String::find, "find(TQString string, TQString sought, int index)",
+ insert(String::tqfind, "tqfind(TQString string, TQString sought, int index)",
i18n("Returns the position of a substring in the string, or -1 if it is not found."), 2);
- insert(String::findRev, "findRev(TQString string, TQString sought, int index)",
+ insert(String::tqfindRev, "tqfindRev(TQString string, TQString sought, int index)",
i18n("Returns the position of a substring in the string, or -1 if it is not found. String is searched backwards"), 2);
insertInternal(String::count, "count(TQString String, TQString substring)",
i18n("Returns the count of a given substring in the given string."), 2);
@@ -540,7 +540,7 @@ void SpecialInformation::registerSpecials()
i18n("Returns n chars of the string, starting from start."), 3);
insert(String::remove, "remove(TQString string, TQString substring)",
i18n("Removes all occurrences of given substring."), 2);
- insert(String::replace, "replace(TQString string, TQString substring, TQString replacement)",
+ insert(String::tqreplace, "tqreplace(TQString string, TQString substring, TQString replacement)",
i18n("Replaces all occurrences of the given substring with the given replacement."), 3);
insert(String::upper, "upper(TQString string)",
i18n("Converts the string to uppercase."), 1);
diff --git a/kommander/plugin/specialinformation.h b/kommander/plugin/specialinformation.h
index fa898620..1ff00a6c 100644
--- a/kommander/plugin/specialinformation.h
+++ b/kommander/plugin/specialinformation.h
@@ -36,9 +36,9 @@ public:
/* Flags describing which parser supports the function */
enum ParserType {MacroParser = 1, InternalParser = 2, AllParsers = 3};
SpecialFunction(const TQString& function, const TQString& description
- = TQString::null, int minArgs = -1, int maxArgs = -1);
+ = TQString(), int minArgs = -1, int maxArgs = -1);
SpecialFunction(ParserType p, const TQString& function, const TQString& description
- = TQString::null, int minArgs = -1, int maxArgs = -1);
+ = TQString(), int minArgs = -1, int maxArgs = -1);
SpecialFunction() {m_minArgs = m_maxArgs = 0;}
/* minimum number of arguments */
int minArg() const {return m_minArgs;}
@@ -90,13 +90,13 @@ public:
static TQString description(int gname, int fname);
static TQString prototype(int gname, int fname, uint prototypeFlags = 0);
/* Insert function supported by all parsers */
- static bool insert(int id, const TQString& function, const TQString description = TQString::null,
+ static bool insert(int id, const TQString& function, const TQString description = TQString(),
int minArgs = -1, int maxArgs = -1, SpecialFunction::ParserType = SpecialFunction::AllParsers);
/* Insert function supported by (old) macro parser */
- static bool insertMacro(int id, const TQString& function, const TQString description = TQString::null,
+ static bool insertMacro(int id, const TQString& function, const TQString description = TQString(),
int minArgs = -1, int maxArgs = -1);
/* Insert function supported by (new) internal parser */
- static bool insertInternal(int id, const TQString& function, const TQString description = TQString::null,
+ static bool insertInternal(int id, const TQString& function, const TQString description = TQString(),
int minArgs = -1, int maxArgs = -1);
static bool insertAlias(int id, const TQString& alias);
static void insertGroup(int id, const TQString& name, const TQString& parserName);
diff --git a/kommander/plugin/specials.h b/kommander/plugin/specials.h
index 2d46200a..f7db7b6d 100644
--- a/kommander/plugin/specials.h
+++ b/kommander/plugin/specials.h
@@ -28,19 +28,19 @@ namespace Group
namespace DCOP
{
- enum {addUniqueItem, associatedText, cancel, cellText, clear, checked, children, columnCount, count, currentColumn,
+ enum {addUniqueItem, associatedText, cancel, cellText, clear, checked, tqchildren, columnCount, count, currentColumn,
currentItem, currentRow, execute, findItem, global, insertColumn, insertItem, insertItems, insertRow,
item, itemDepth, itemPath, removeColumn, removeItem, removeRow, selection, setAssociatedText, setChecked,
setCellText, setCurrentItem, insertTab, setColumnCaption, setEnabled, setGlobal, setMaximum, setPixmap,
setRowCaption, setSelection, setText, getBackgroundColor, setBackgroundColor,
- setVisible, text, type, setCellWidget, cellWidget, setEditable, geometry, hasFocus, isModified};
+ setVisible, text, type, setCellWidget, cellWidget, setEditable, tqgeometry, hasFocus, isModified};
}
namespace Kommander
{
- enum {widgetText, selectedWidgetText, null, pid, dcopid, parentPid, debug,
+ enum {widgetText, selectedWidgetText, null, pid, dcopid, tqparentPid, debug,
echo, env, exec, expr, global, i18n, dialog, readSetting, setGlobal, writeSetting, dcop,
- switchBlock, execBegin, forBlock, forEachBlock, ifBlock, comment, createWidget, connect, disconnect, widgetExists, exit, Break, Continue, Return, execBackground, switchInternal}; //, focusWidget};
+ switchBlock, execBegin, forBlock, forEachBlock, ifBlock, comment, createWidget, connect, disconnect, widgetExists, exit, Break, Continue, Return, execBackground, switchInternal}; //, tqfocusWidget};
}
namespace Array
@@ -55,7 +55,7 @@ namespace Matrix
namespace String
{
- enum {length, contains, find, findRev, left, right, mid, remove, replace, upper, lower,
+ enum {length, tqcontains, tqfind, tqfindRev, left, right, mid, remove, tqreplace, upper, lower,
compare, isEmpty, isNumber, section, args, toInt, toDouble, round, sort, trim, padLeft, padRight, count};
}
diff --git a/kommander/pluginmanager/main.cpp b/kommander/pluginmanager/main.cpp
index 74561925..0e663476 100644
--- a/kommander/pluginmanager/main.cpp
+++ b/kommander/pluginmanager/main.cpp
@@ -77,18 +77,18 @@ int main(int argc, char *argv[])
QCStringList items = args->getOptionList("add");
for (QCStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
if (!P.add(*it))
- cerr << i18n("Error adding plugin '%1'").arg(*it).local8Bit();
+ cerr << i18n("Error adding plugin '%1'").tqarg((*it).data()).local8Bit().data();
items = args->getOptionList("remove");
for (QCStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
if (!P.remove(*it))
- cerr << i18n("Error removing plugin '%1'").arg(*it).local8Bit();
+ cerr << i18n("Error removing plugin '%1'").tqarg((*it).data()).local8Bit().data();
if (args->isSet("list"))
{
TQStringList plugins = P.items();
for (TQStringList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it)
- cout << (*it).local8Bit() << "\n";
+ cout << (*it).local8Bit().data() << "\n";
}
}
else
diff --git a/kommander/pluginmanager/mainwindow.cpp b/kommander/pluginmanager/mainwindow.cpp
index 94d365f5..c2947c5b 100644
--- a/kommander/pluginmanager/mainwindow.cpp
+++ b/kommander/pluginmanager/mainwindow.cpp
@@ -28,8 +28,8 @@
#include
#include
-MainWindow::MainWindow( TQWidget* parent, const char *name, WFlags f )
- : KMainWindow( parent, name, f )
+MainWindow::MainWindow( TQWidget* tqparent, const char *name, WFlags f )
+ : KMainWindow( tqparent, name, f )
{
KToolBar *toolBar = new KToolBar( this );
toolBar->insertButton("fileopen", Add, true, i18n("Add") );
@@ -77,7 +77,7 @@ void MainWindow::add(const TQString &plugin)
{
if (!m_pluginManager->add(plugin))
{
- TQString errMsg = i18n("Unable to load Kommander plugin
%1").arg(plugin);
+ TQString errMsg = i18n("Unable to load Kommander plugin
%1").tqarg(plugin);
KMessageBox::error(this, errMsg, i18n("Cannot add plugin"));
}
else
diff --git a/kommander/pluginmanager/mainwindow.h b/kommander/pluginmanager/mainwindow.h
index c774832f..ffc59ace 100644
--- a/kommander/pluginmanager/mainwindow.h
+++ b/kommander/pluginmanager/mainwindow.h
@@ -26,8 +26,9 @@ class PluginManager;
class MainWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- MainWindow( TQWidget* parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
+ MainWindow( TQWidget* tqparent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose );
~MainWindow();
protected slots:
diff --git a/kommander/pluginmanager/pluginmanager.cpp b/kommander/pluginmanager/pluginmanager.cpp
index 79da4d81..2bfbab89 100644
--- a/kommander/pluginmanager/pluginmanager.cpp
+++ b/kommander/pluginmanager/pluginmanager.cpp
@@ -47,7 +47,7 @@ bool PluginManager::add(const TQString& plugin, bool)
TQString plugName= libraryName(plugin);
if (plugName.isNull())
return false;
- if (m_list->contains(plugName))
+ if (m_list->tqcontains(plugName))
return false;
m_list->append(plugName);
return true;
@@ -55,7 +55,7 @@ bool PluginManager::add(const TQString& plugin, bool)
bool PluginManager::remove(const TQString& plugin)
{
- if (!m_list->contains(plugin))
+ if (!m_list->tqcontains(plugin))
return false;
m_list->remove(plugin);
return true;
diff --git a/kommander/widget/expression.cpp b/kommander/widget/expression.cpp
index d29d94e8..350646e1 100644
--- a/kommander/widget/expression.cpp
+++ b/kommander/widget/expression.cpp
@@ -57,7 +57,7 @@ Expression& Expression::operator=(const TQString& s)
m_parts.append(TQVariant(s.mid(start, i - start).toDouble()));
else
m_parts.append(TQVariant(s.mid(start, i - start).toInt()));
- } else if (single.contains(s[i]))
+ } else if (single.tqcontains(s[i]))
m_parts.append(TQVariant(TQString(s[i++])));
else if (s[i] == '\"')
{
diff --git a/kommander/widget/functionlib.cpp b/kommander/widget/functionlib.cpp
index 416207b7..81613785 100644
--- a/kommander/widget/functionlib.cpp
+++ b/kommander/widget/functionlib.cpp
@@ -52,7 +52,7 @@ static ParseNode f_stringLength(Parser*, const ParameterList& params)
static ParseNode f_stringContains(Parser*, const ParameterList& params)
{
- return params[0].toString().contains(params[1].toString());
+ return params[0].toString().tqcontains(params[1].toString());
}
static ParseNode f_stringCompare(Parser*, const ParameterList& params)
@@ -71,12 +71,12 @@ static ParseNode f_stringCompare(Parser*, const ParameterList& params)
static ParseNode f_stringFind(Parser*, const ParameterList& params)
{
- return params[0].toString().find(params[1].toString(), params.count() == 3 ? params[2].toInt() : 0);
+ return params[0].toString().tqfind(params[1].toString(), params.count() == 3 ? params[2].toInt() : 0);
}
static ParseNode f_stringFindRev(Parser*, const ParameterList& params)
{
- return params[0].toString().findRev(params[1].toString(),
+ return params[0].toString().tqfindRev(params[1].toString(),
params.count() == 3 ? params[2].toInt() : params[0].toString().length());
}
@@ -102,7 +102,7 @@ static ParseNode f_stringRemove(Parser*, const ParameterList& params)
static ParseNode f_stringReplace(Parser*, const ParameterList& params)
{
- return params[0].toString().replace(params[1].toString(), params[2].toString());
+ return params[0].toString().tqreplace(params[1].toString(), params[2].toString());
}
static ParseNode f_stringLower(Parser*, const ParameterList& params)
@@ -129,11 +129,11 @@ static ParseNode f_stringSection(Parser*, const ParameterList& params)
static ParseNode f_stringArgs(Parser*, const ParameterList& params)
{
if (params.count() == 2)
- return params[0].toString().arg(params[1].toString());
+ return params[0].toString().tqarg(params[1].toString());
else if (params.count() == 3)
- return params[0].toString().arg(params[1].toString()).arg(params[2].toString());
+ return params[0].toString().tqarg(params[1].toString()).tqarg(params[2].toString());
else
- return params[0].toString().arg(params[1].toString()).arg(params[2].toString()).arg(params[3].toString());
+ return params[0].toString().tqarg(params[1].toString()).tqarg(params[2].toString()).tqarg(params[3].toString());
}
static ParseNode f_stringIsNumber(Parser*, const ParameterList& params)
@@ -250,7 +250,7 @@ static ParseNode f_executeSlot(Parser* parser, const ParameterList& params)
TQObject *object = widget->object();
if (!object)
return ParseNode::error("unknown widget");
- TQStrList slotSignatures = object->metaObject()->slotNames(true);
+ TQStrList slotSignatures = object->tqmetaObject()->slotNames(true);
TQStringList slotNames = TQStringList::fromStrList(slotSignatures);
int slotNum = -1;
uint i = 0;
@@ -353,15 +353,15 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
byteDataStream << params[i++].toDouble();
else if (*it == "bool")
byteDataStream << (bool)params[i++].toInt();
- else if (*it == "TQStringList")
- if (params[i].toString().find('\n') != -1)
+ else if (*it == TQSTRINGLIST_OBJECT_NAME_STRING)
+ if (params[i].toString().tqfind('\n') != -1)
byteDataStream << TQStringList::split("\n", params[i++].toString(), true);
else
byteDataStream << TQStringList::split("\\n", params[i++].toString(), true);
else
byteDataStream << params[i++].toString();
}
- function.append(TQString("(%1)").arg(items.join(",")));
+ function.append(TQString("(%1)").tqarg(items.join(",")));
TQCString replyType, byteReply;
DCOPClient* cl = KApplication::dcopClient();
if (!cl || !cl->call(appId, object, function.latin1(),
@@ -371,7 +371,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
return ParseNode();
}
TQDataStream byteReplyStream(byteReply, IO_ReadOnly);
- if (replyType == "TQString")
+ if (replyType == TQSTRING_OBJECT_NAME_STRING)
{
TQString text;
byteReplyStream >> text;
@@ -389,7 +389,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
byteReplyStream >> b;
return b;
}
- else if (replyType == "TQStringList")
+ else if (replyType == TQSTRINGLIST_OBJECT_NAME_STRING)
{
TQStringList text;
byteReplyStream >> text;
@@ -397,7 +397,7 @@ static ParseNode f_dcop(Parser*, const ParameterList& params)
}
else if(replyType != "void")
{
- qDebug("%s", TQString("DCOP return type %1 is not yet implemented.").arg(replyType.data()).latin1());
+ qDebug("%s", TQString("DCOP return type %1 is not yet implemented.").tqarg(replyType.data()).latin1());
}
return ParseNode();
@@ -407,12 +407,12 @@ static ParseNode f_createWidget(Parser* p, const ParameterList& params)
{
TQString widgetName = params[0].toString();
TQString widgetType = params[1].toString();
- TQString parentName = params[2].toString();
- KommanderWidget *widget = p->currentWidget()->widgetByName(parentName);
+ TQString tqparentName = params[2].toString();
+ KommanderWidget *widget = p->currentWidget()->widgetByName(tqparentName);
if (!widget)
return ParseNode::error("unknown widget");
- TQWidget *parent = dynamic_cast(widget->object());
- TQWidget *w = KommanderFactory::createWidget(widgetType, parent, widgetName.latin1());
+ TQWidget *tqparent = dynamic_cast(widget->object());
+ TQWidget *w = KommanderFactory::createWidget(widgetType, tqparent, widgetName.latin1());
if (w)
w->adjustSize();
return ParseNode();
@@ -429,9 +429,9 @@ static ParseNode f_widgetExists(Parser* p, const ParameterList& params)
static ParseNode f_connect(Parser* p, const ParameterList& params)
{
TQString sender = params[0].toString();
- TQString signal = TQString::number(QSIGNAL_CODE) + params[1].toString();
+ TQString signal = TQString::number(TQSIGNAL_CODE) + params[1].toString();
TQString receiver = params[2].toString();
- TQString slot = TQString::number(QSLOT_CODE) + params[3].toString();
+ TQString slot = TQString::number(TQSLOT_CODE) + params[3].toString();
KommanderWidget *senderW = p->currentWidget()->widgetByName(sender);
if (!senderW)
return ParseNode::error("unknown widget");
@@ -445,9 +445,9 @@ static ParseNode f_connect(Parser* p, const ParameterList& params)
static ParseNode f_disconnect(Parser* p, const ParameterList& params)
{
TQString sender = params[0].toString();
- TQString signal = TQString::number(QSIGNAL_CODE) + params[1].toString();
+ TQString signal = TQString::number(TQSIGNAL_CODE) + params[1].toString();
TQString receiver = params[2].toString();
- TQString slot = TQString::number(QSLOT_CODE) + params[3].toString();
+ TQString slot = TQString::number(TQSLOT_CODE) + params[3].toString();
KommanderWidget *senderW = p->currentWidget()->widgetByName(sender);
if (!senderW)
return ParseNode::error("unknown widget");
@@ -499,7 +499,7 @@ static ParseNode f_dialog(Parser* P, const ParameterList& params)
return TQString();
}
TQString cmd = TQString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
- .arg(pFileName).arg(a_params).arg(getpid()).arg(getpid());
+ .tqarg(pFileName).tqarg(a_params).tqarg(getpid()).tqarg(getpid());
MyProcess proc(P->currentWidget());
TQString text;
@@ -571,7 +571,7 @@ static ParseNode f_arrayToString(Parser* P, const ParameterList& params)
TQValueList::Iterator itval = values.begin();
while (*it)
{
- array += TQString("%1\t%2\n").arg(*it).arg((*itval).toString());
+ array += TQString("%1\t%2\n").tqarg(*it).tqarg((*itval).toString());
++it;
++itval;
}
@@ -648,7 +648,7 @@ static ParseNode f_arrayIndexedRemoveElements(Parser* P, const ParameterList& pa
return ParseNode(); //out of index range
for (int i = 0; i < count; i++)
{
- if (keys.contains(TQString::number(i)) != 1)
+ if (keys.tqcontains(TQString::number(i)) != 1)
return ParseNode(); //array is not indexed
}
for (int i = key; i <= key + num; i++)
@@ -704,7 +704,7 @@ static ParseNode f_inputColor(Parser*, const ParameterList& params)
if (params.count())
color.setNamedColor(params[0].toString());
KColorDialog::getColor(color);
- return color.name();
+ return TQString(color.name());
}
static ParseNode f_inputText(Parser*, const ParameterList& params)
@@ -721,7 +721,7 @@ static ParseNode f_inputPassword(Parser*, const ParameterList& params)
if (params.count() > 1)
value = params[1].toString().local8Bit();
KPasswordDialog::getPassword(value, params[0].toString());
- return TQString::fromLocal8Bit(value);
+ return TQString(TQString::fromLocal8Bit(value));
}
static ParseNode f_inputValue(Parser*, const ParameterList& params)
@@ -910,15 +910,15 @@ static ParseNode f_write_setting(Parser* parser, const ParameterList& params)
void ParserData::registerStandardFunctions()
{
registerFunction("str_length", Function(&f_stringLength, ValueInt, ValueString));
- registerFunction("str_contains", Function(&f_stringContains, ValueInt, ValueString, ValueString));
+ registerFunction("str_tqcontains", Function(&f_stringContains, ValueInt, ValueString, ValueString));
registerFunction("str_compare", Function(&f_stringCompare, ValueInt, ValueString, ValueString));
- registerFunction("str_find", Function(&f_stringFind, ValueInt, ValueString, ValueString, ValueInt, 2));
+ registerFunction("str_tqfind", Function(&f_stringFind, ValueInt, ValueString, ValueString, ValueInt, 2));
registerFunction("str_findrev", Function(&f_stringFindRev, ValueInt, ValueString, ValueString, ValueInt, 2));
registerFunction("str_left", Function(&f_stringLeft, ValueString, ValueString, ValueInt));
registerFunction("str_right", Function(&f_stringRight, ValueString, ValueString, ValueInt));
registerFunction("str_mid", Function(&f_stringMid, ValueString, ValueString, ValueInt, ValueInt, 2));
registerFunction("str_remove", Function(&f_stringRemove, ValueString, ValueString, ValueString));
- registerFunction("str_replace", Function(&f_stringReplace, ValueString, ValueString, ValueString, ValueString));
+ registerFunction("str_tqreplace", Function(&f_stringReplace, ValueString, ValueString, ValueString, ValueString));
registerFunction("str_lower", Function(&f_stringLower, ValueString, ValueString));
registerFunction("str_upper", Function(&f_stringUpper, ValueString, ValueString));
registerFunction("str_section", Function(&f_stringSection, ValueString, ValueString, ValueString, ValueInt, ValueInt, 3));
@@ -944,7 +944,7 @@ void ParserData::registerStandardFunctions()
registerFunction("dcop", Function(&f_dcop, ValueString, ValueString, ValueString, 3, 100));
registerFunction("dcopid", Function(&f_dcopid, ValueString, ValueNone, 0, 0));
registerFunction("pid", Function(&f_pid, ValueString, ValueNone, 0, 0));
- registerFunction("parentPid", Function(&f_parentPid, ValueString, ValueNone, 0, 0));
+ registerFunction("tqparentPid", Function(&f_parentPid, ValueString, ValueNone, 0, 0));
registerFunction("dialog", Function(&f_dialog, ValueString, ValueString, ValueString, 1, 2));
registerFunction("exec", Function(&f_exec, ValueString, ValueString, ValueString, 1, 2));
registerFunction("execBackground", Function(&f_execBackground, ValueString, ValueString, ValueString, 1, 2));
diff --git a/kommander/widget/invokeclass.cpp b/kommander/widget/invokeclass.cpp
index 866f629b..ec08dfff 100644
--- a/kommander/widget/invokeclass.cpp
+++ b/kommander/widget/invokeclass.cpp
@@ -15,7 +15,7 @@
#include
#include
-InvokeClass::InvokeClass(TQObject *parent):TQObject(parent)
+InvokeClass::InvokeClass(TQObject *tqparent):TQObject(tqparent)
{
m_acceptedSlots = acceptedSlots();
}
@@ -23,9 +23,9 @@ InvokeClass::InvokeClass(TQObject *parent):TQObject(parent)
void InvokeClass::invokeSlot(TQObject *object, const TQString& slot, TQStringList args)
{
TQString invokeName = slot;
- invokeName = invokeName.mid(invokeName.find('('));
- invokeName.prepend(TQString::number(QSIGNAL_CODE) + "invoke");
- TQString slotName = TQString::number(QSLOT_CODE) + slot;
+ invokeName = invokeName.mid(invokeName.tqfind('('));
+ invokeName.prepend(TQString::number(TQSIGNAL_CODE) + "invoke");
+ TQString slotName = TQString::number(TQSLOT_CODE) + slot;
connect(this, invokeName.ascii(), object, slotName.ascii());
if (args.count() == 0)
@@ -33,7 +33,7 @@ void InvokeClass::invokeSlot(TQObject *object, const TQString& slot, TQStringLis
else
{
TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1);
- uint argNum = slotArgStr.contains(',') + 1;
+ uint argNum = slotArgStr.tqcontains(',') + 1;
for (uint i = args.count(); i < argNum; i++)
args << "";
//poor man's invokeMetaObject
diff --git a/kommander/widget/invokeclass.h b/kommander/widget/invokeclass.h
index 4b1a8c0b..043ba73b 100644
--- a/kommander/widget/invokeclass.h
+++ b/kommander/widget/invokeclass.h
@@ -18,8 +18,9 @@
class InvokeClass : public TQObject {
Q_OBJECT
+ TQ_OBJECT
public:
- InvokeClass(TQObject *parent);
+ InvokeClass(TQObject *tqparent);
void invokeSlot(TQObject *object, const TQString& slot, TQStringList args);
static TQStringList acceptedSlots()
diff --git a/kommander/widget/kmdrmainwindow.cpp b/kommander/widget/kmdrmainwindow.cpp
index e123a035..603c1326 100644
--- a/kommander/widget/kmdrmainwindow.cpp
+++ b/kommander/widget/kmdrmainwindow.cpp
@@ -13,8 +13,8 @@
#include
-KmdrMainWindow::KmdrMainWindow(TQWidget *parent, const char *name, WFlags f)
- : KMainWindow(parent, name, f)
+KmdrMainWindow::KmdrMainWindow(TQWidget *tqparent, const char *name, WFlags f)
+ : KMainWindow(tqparent, name, f)
{
TQTimer::singleShot(10, this, TQT_SIGNAL(initialize()));
}
diff --git a/kommander/widget/kmdrmainwindow.h b/kommander/widget/kmdrmainwindow.h
index 6637ffc8..4896db2b 100644
--- a/kommander/widget/kmdrmainwindow.h
+++ b/kommander/widget/kmdrmainwindow.h
@@ -20,8 +20,9 @@
class KmdrMainWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
- KmdrMainWindow(TQWidget *parent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose);
+ KmdrMainWindow(TQWidget *tqparent = 0, const char *name = 0, WFlags f = WType_TopLevel | WDestructiveClose);
~KmdrMainWindow();
diff --git a/kommander/widget/kommanderfunctions.cpp b/kommander/widget/kommanderfunctions.cpp
index 6ef6e6f0..7efe5b27 100644
--- a/kommander/widget/kommanderfunctions.cpp
+++ b/kommander/widget/kommanderfunctions.cpp
@@ -52,7 +52,7 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
return execCommand(args[0]);
case Kommander::dcop:
return DCOPQuery(args);
- case Kommander::parentPid:
+ case Kommander::tqparentPid:
return global("_PARENTPID").isEmpty() ? TQString().setNum(getppid()) : global("_PARENTPID");
case Kommander::env:
return TQString(getenv(args[0].latin1()));
@@ -66,12 +66,12 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
case Kommander::debug:
qDebug("%s", args[0].latin1());
fflush(stderr);
- return TQString::null;
+ return TQString();
case Kommander::echo:
for (uint i=0; i 1)
@@ -114,7 +114,7 @@ TQString KommanderWidget::evalFunction(const TQString& function, const TQStringL
TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString& s, int& pos)
{
- int f = s.find("@execEnd", pos);
+ int f = s.tqfind("@execEnd", pos);
if (f == -1)
{
printError(i18n("Unterminated @execBegin ... @execEnd block."));
@@ -131,7 +131,7 @@ TQString KommanderWidget::evalExecBlock(const TQStringList& args, const TQString
TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQString& s, int& pos)
{
- int f = s.find("@end", pos);
+ int f = s.tqfind("@end", pos);
//FIXME: better detection of block boundaries
if (f == -1)
{
@@ -145,9 +145,9 @@ TQString KommanderWidget::evalForEachBlock(const TQStringList& args, const TQStr
TQString var = args[0];
TQStringList loop = TQStringList::split("\n", args[1]);
TQString output;
- TQString block = substituteVariable(s.mid(start, f - start), TQString("%1_count").arg(var),
+ TQString block = substituteVariable(s.mid(start, f - start), TQString("%1_count").tqarg(var),
TQString::number(loop.count()));
- TQString varidx = TQString("%1_index").arg(var);
+ TQString varidx = TQString("%1_index").tqarg(var);
for (uint i=0; i map = parser.array(array);
TQString arraystring;
for (TQMap::ConstIterator it = map.begin(); it != map.end(); ++it)
- arraystring += TQString("%1\t%2\n").arg(it.key()).arg(it.data().toString());
+ arraystring += TQString("%1\t%2\n").tqarg(it.key()).tqarg(it.data().toString());
return arraystring;
}
default:
@@ -317,7 +317,7 @@ TQString KommanderWidget::evalWidgetFunction(const TQString& identifier, const T
KommanderWidget* pWidget = parseWidget(identifier);
if (!pWidget)
{
- printError(i18n("Unknown widget: @%1.").arg(identifier));
+ printError(i18n("Unknown widget: @%1.").tqarg(identifier));
return TQString();
}
if (s[pos] == '.')
@@ -335,13 +335,13 @@ TQString KommanderWidget::evalWidgetFunction(const TQString& identifier, const T
}
else if (pWidget == this)
{
- printError(i18n("Infinite loop: @%1 called inside @%2.").arg(pWidget->widgetName())
- .arg(pWidget->widgetName()));
+ printError(i18n("Infinite loop: @%1 called inside @%2.").tqarg(pWidget->widgetName())
+ .tqarg(pWidget->widgetName()));
return TQString();
}
else if (!pWidget->hasAssociatedText())
{
- printError(i18n("Script for @%1 is empty.").arg(pWidget->widgetName()));
+ printError(i18n("Script for @%1 is empty.").tqarg(pWidget->widgetName()));
return TQString();
}
return pWidget->evalAssociatedText();
diff --git a/kommander/widget/kommanderwidget.cpp b/kommander/widget/kommanderwidget.cpp
index 8f880c40..2fc867f7 100644
--- a/kommander/widget/kommanderwidget.cpp
+++ b/kommander/widget/kommanderwidget.cpp
@@ -74,7 +74,7 @@ TQStringList KommanderWidget::associatedText() const
bool KommanderWidget::hasAssociatedText()
{
- int index = states().findIndex(currentState());
+ int index = states().tqfindIndex(currentState());
if (index == -1 || m_associatedText[index].isEmpty())
return false;
return true;
@@ -113,7 +113,7 @@ void KommanderWidget::setDisplayStates(const TQStringList& a_displayStates)
TQString KommanderWidget::evalAssociatedText() // expands and returns associated text as a string
{
- int index = ( states().findIndex( currentState()) );
+ int index = ( states().tqfindIndex( currentState()) );
if (index == -1)
{
printError(i18n("Invalid state for associated text."));
@@ -131,7 +131,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text)
p.setWidget(this);
p.setString(a_text);
if (!p.setString(a_text) || !p.parse())
- printError(i18n("Line %1: %2.\n").arg(p.errorLine()+1).arg(p.errorMessage()));
+ printError(i18n("Line %1: %2.\n").tqarg(p.errorLine()+1).tqarg(p.errorMessage()));
return TQString();
}
/* Old macro-only parser is implemented below */
@@ -143,7 +143,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text)
int pos = 0, baseTextLength = a_text.length();
while (pos < baseTextLength)
{
- int ident = a_text.find(ESCCHAR, pos);
+ int ident = a_text.tqfind(ESCCHAR, pos);
if (ident == -1) {
evalText += a_text.mid(pos);
break;
@@ -164,7 +164,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text)
if (identifier.isEmpty())
{
if (pos < baseTextLength && a_text[pos] == '#') { // comment
- int newpos = a_text.find('\n', pos+1);
+ int newpos = a_text.tqfind('\n', pos+1);
if (newpos == -1)
newpos = a_text.length();
if (pos > 1 && a_text[pos-2] == '\n')
@@ -241,7 +241,7 @@ TQString KommanderWidget::evalAssociatedText(const TQString& a_text)
}
else
{
- printError(i18n("Unknown special: \'%1\'.").arg(identifier));
+ printError(i18n("Unknown special: \'%1\'.").tqarg(identifier));
return TQString();
}
}
@@ -260,7 +260,7 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
// parse function arguments
TQString function = a_query[2], pTypes;
function.remove(' ');
- int start = function.find('(');
+ int start = function.tqfind('(');
bool ok = false;
if (start != -1)
pTypes = parseBrackets(function, start, ok);
@@ -271,13 +271,13 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
}
if (!ok)
{
- printError(i18n("Unmatched parenthesis in DCOP call \'%1\'.").arg(a_query[2]));
+ printError(i18n("Unmatched tqparenthesis in DCOP call \'%1\'.").tqarg(a_query[2]));
return TQString();
}
const TQStringList argTypes = parseArgs(pTypes, ok);
if (!ok || argTypes.count() != a_query.count() - 3)
{
- printError(i18n("Incorrect arguments in DCOP call \'%1\'.").arg(a_query[2]));
+ printError(i18n("Incorrect arguments in DCOP call \'%1\'.").tqarg(a_query[2]));
return TQString();
}
@@ -295,8 +295,8 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
byteDataStream << a_query[i+3].toDouble();
else if (argTypes[i] == "bool")
byteDataStream << (bool)(a_query[i+3] != "false" && a_query[i+3] != "false" && a_query[i+3] != "0");
- else if (argTypes[i] == "TQStringList")
- if (a_query[i+3].find('\n') != -1)
+ else if (argTypes[i] == TQSTRINGLIST_OBJECT_NAME_STRING)
+ if (a_query[i+3].tqfind('\n') != -1)
byteDataStream << TQStringList::split("\n", a_query[i+3], true);
else
byteDataStream << TQStringList::split("\\n", a_query[i+3], true);
@@ -312,7 +312,7 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
}
TQDataStream byteReplyStream(byteReply, IO_ReadOnly);
- if (replyType == "TQString")
+ if (replyType == TQSTRING_OBJECT_NAME_STRING)
{
TQString text;
byteReplyStream >> text;
@@ -330,7 +330,7 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
byteReplyStream >> b;
return TQString::number(b);
}
- else if (replyType == "TQStringList")
+ else if (replyType == TQSTRINGLIST_OBJECT_NAME_STRING)
{
TQStringList text;
byteReplyStream >> text;
@@ -338,7 +338,7 @@ TQString KommanderWidget::DCOPQuery(const TQStringList& a_query)
}
else if(replyType != "void")
{
- printError(i18n("DCOP return type %1 is not yet implemented.").arg(replyType.data()));
+ printError(i18n("DCOP return type %1 is not yet implemented.").tqarg(replyType.data()));
}
return TQString();
@@ -392,7 +392,7 @@ TQString KommanderWidget::runDialog(const TQString& a_dialog, const TQString& a_
return TQString();
}
TQString cmd = TQString("kmdr-executor %1 %2 _PARENTPID=%3 _PARENTDCOPID=kmdr-executor-%4")
- .arg(pFileName).arg(a_params).arg(getpid()).arg(getpid());
+ .tqarg(pFileName).tqarg(a_params).tqarg(getpid()).tqarg(getpid());
return execCommand(cmd);
}
@@ -405,26 +405,26 @@ void KommanderWidget::printError(const TQString& a_error) const
KDialogBase::Yes, KDialogBase::No, 0, 0, true, false,
i18n("Continue"), i18n("Continue && Ignore Next Errors"), i18n("Stop"));
switch (KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning,
- i18n("Error in widget %1:%2
").arg(TQString(m_thisObject->name()))
- .arg(a_error), TQStringList(), TQString(), 0, 0))
+ i18n("Error in widget %1:%2
").tqarg(TQString(m_thisObject->name()))
+ .tqarg(a_error), TQStringList(), TQString(), 0, 0))
{
case KDialogBase::No:
showErrors = false;
case KDialogBase::Yes:
break;
case KDialogBase::Cancel:
- if (parentDialog()->inherits(TQDIALOG_OBJECT_NAME_STRING))
+ if (tqparentDialog()->inherits(TQDIALOG_OBJECT_NAME_STRING))
{
- parentDialog()->close();
+ tqparentDialog()->close();
exit(-1);
}
- else if (parentDialog()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
+ else if (tqparentDialog()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
kapp->quit();
}
}
else
{
- kdError() << i18n("Error in widget %1:\n %2\n").arg(m_thisObject->name()).arg(a_error);
+ kdError() << i18n("Error in widget %1:\n %2\n").tqarg(m_thisObject->name()).tqarg(a_error);
}
}
@@ -557,16 +557,16 @@ KommanderWidget* KommanderWidget::widgetByName(const TQString& a_name) const
KommanderWidget* KommanderWidget::parseWidget(const TQString& widgetName) const
{
- if (TQString(parentDialog()->name()) == widgetName)
- return dynamic_cast (parentDialog());
+ if (TQString(tqparentDialog()->name()) == widgetName)
+ return dynamic_cast (tqparentDialog());
TQCString s = widgetName.lower() == "self" ? m_thisObject->name() : widgetName.latin1();
- TQObject* childObj = parentDialog()->child(s);
+ TQObject* childObj = tqparentDialog()->child(s);
/* if (!childObj)
{
Parser parser(internalParserData());
TQString variableValue = parser.variable(widgetName).toString();
s = variableValue.lower() == "self" ? m_thisObject->name() : variableValue.latin1();
- childObj = parentDialog()->child(s);
+ childObj = tqparentDialog()->child(s);
}*/
return dynamic_cast (childObj);
}
@@ -579,7 +579,7 @@ TQStringList KommanderWidget::parseFunction(const TQString& group, const TQStrin
TQString arg = parseBrackets(s, from, ok);
if (!ok)
{
- printError(i18n("Unmatched parenthesis after \'%1\'.").arg(function));
+ printError(i18n("Unmatched tqparenthesis after \'%1\'.").tqarg(function));
return TQString();
}
const TQStringList args = parseArgs(arg, ok);
@@ -588,23 +588,23 @@ TQStringList KommanderWidget::parseFunction(const TQString& group, const TQStrin
bool extraArg = gname == Group::DCOP;
if (!ok)
- printError(i18n("Unmatched quotes in argument of \'%1\'.").arg(function));
+ printError(i18n("Unmatched quotes in argument of \'%1\'.").tqarg(function));
else if (gname == -1)
- printError(i18n("Unknown function group: \'%1\'.").arg(group));
+ printError(i18n("Unknown function group: \'%1\'.").tqarg(group));
else if (fname == -1 && !extraArg)
- printError(i18n("Unknown function: \'%1\' in group '%2'.").arg(function).arg(group));
+ printError(i18n("Unknown function: \'%1\' in group '%2'.").tqarg(function).tqarg(group));
else if (fname == -1 && extraArg)
- printError(i18n("Unknown widget function: \'%1\'.").arg(function));
+ printError(i18n("Unknown widget function: \'%1\'.").tqarg(function));
else if ((int)args.count() + extraArg < SpecialInformation::minArg(gname, fname))
printError(i18n("Not enough arguments for \'%1\' (%2 instead of %3)."
"Correct syntax is: %4")
- .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::minArg(gname, fname))
- .arg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
+ .tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::minArg(gname, fname))
+ .tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
else if ((int)args.count() + extraArg > SpecialInformation::maxArg(gname, fname))
printError(i18n("Too many arguments for \'%1\' (%2 instead of %3).
"
"Correct syntax is: %4")
- .arg(function).arg(args.count() + extraArg).arg(SpecialInformation::maxArg(gname, fname))
- .arg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
+ .tqarg(function).tqarg(args.count() + extraArg).tqarg(SpecialInformation::maxArg(gname, fname))
+ .tqarg(SpecialInformation::prototype(gname, fname, SpecialFunction::ShowArgumentNames)));
else
success = true;
ok = success;
@@ -616,7 +616,7 @@ int KommanderWidget::parseBlockBoundary(const TQString& s, int from, const TQStr
int shortest = -1;
for (uint i=0; i match || shortest == -1)
shortest = match;
}
@@ -627,12 +627,12 @@ int KommanderWidget::parseBlockBoundary(const TQString& s, int from, const TQStr
TQString KommanderWidget::substituteVariable(TQString text, TQString variable, TQString value) const
{
- TQString var = TQString("@%1").arg(variable);
+ TQString var = TQString("@%1").tqarg(variable);
TQString newtext;
int newpos, pos = 0;
while (true)
{
- newpos = text.find(var, pos);
+ newpos = text.tqfind(var, pos);
if (newpos != -1)
{
newtext += text.mid(pos, newpos-pos);
@@ -649,12 +649,12 @@ TQString KommanderWidget::substituteVariable(TQString text, TQString variable, T
-TQWidget* KommanderWidget::parentDialog() const
+TQWidget* KommanderWidget::tqparentDialog() const
{
TQObject *superParent = m_thisObject;
- while (superParent->parent())
+ while (superParent->tqparent())
{
- superParent = superParent->parent();
+ superParent = superParent->tqparent();
if (superParent->inherits(TQDIALOG_OBJECT_NAME_STRING) || superParent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
break;
}
@@ -692,7 +692,7 @@ TQString KommanderWidget::handleDCOP(const int function, const TQStringList& arg
break;
case DCOP::type:
return current->className();
- case DCOP::children:
+ case DCOP::tqchildren:
{
TQStringList matching;
TQObjectList* widgets = current->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, args.count() == 0 || args[0] != "false");
@@ -707,12 +707,12 @@ TQString KommanderWidget::handleDCOP(const int function, const TQStringList& arg
bool KommanderWidget::isFunctionSupported(int f)
{
- return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type;
+ return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::tqchildren || f == DCOP::type;
}
bool KommanderWidget::isCommonFunction(int f)
{
- return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::children || f == DCOP::type;
+ return f == DCOP::setEnabled || f == DCOP::setVisible || f == DCOP::tqchildren || f == DCOP::type;
}
ParserData* KommanderWidget::internalParserData() const
@@ -722,7 +722,7 @@ ParserData* KommanderWidget::internalParserData() const
TQString KommanderWidget::fileName()
{
- KommanderWindow* window = dynamic_cast(parentDialog());
+ KommanderWindow* window = dynamic_cast(tqparentDialog());
if (window)
return TQString(window->fileName());
else
@@ -732,7 +732,7 @@ TQString KommanderWidget::fileName()
TQString KommanderWidget::widgetName() const
{
if (m_thisObject)
- return TQString::fromLatin1(m_thisObject->name());
+ return TQString::tqfromLatin1(m_thisObject->name());
else
return TQString();
}
diff --git a/kommander/widget/kommanderwidget.h b/kommander/widget/kommanderwidget.h
index c9576010..2087d086 100644
--- a/kommander/widget/kommanderwidget.h
+++ b/kommander/widget/kommanderwidget.h
@@ -115,12 +115,12 @@ protected:
TQString DCOPQuery(const TQStringList& args);
TQString localDCOPQuery(const TQString function, const TQStringList& args = TQStringList());
TQString localDCOPQuery(const TQString function, const TQString& arg1,
- const TQString& arg2, const TQString& arg3 = TQString::null,
- const TQString& arg4 = TQString::null);
+ const TQString& arg2, const TQString& arg3 = TQString(),
+ const TQString& arg4 = TQString());
// Execute given command, return its result
- TQString execCommand(const TQString& a_command, const TQString& a_shell = TQString::null) const;
+ TQString execCommand(const TQString& a_command, const TQString& a_shell = TQString()) const;
// Find and run dialog (with optional parameters)
- TQString runDialog(const TQString& a_dialog, const TQString& a_params = TQString::null);
+ TQString runDialog(const TQString& a_dialog, const TQString& a_params = TQString());
// Display error message a_error; display current class name if no other is given
void printError(const TQString& a_error) const;
// Auxiliary functions for parser
@@ -140,8 +140,8 @@ protected:
// Parse given identifier as widget name
KommanderWidget* parseWidget(const TQString& name) const;
- // Return parent dialog of this widget
- TQWidget* parentDialog() const;
+ // Return tqparent dialog of this widget
+ TQWidget* tqparentDialog() const;
TQString substituteVariable(TQString text, TQString variable, TQString value) const;
ParserData* internalParserData() const;
diff --git a/kommander/widget/myprocess.cpp b/kommander/widget/myprocess.cpp
index 59eb67fb..4914a95a 100644
--- a/kommander/widget/myprocess.cpp
+++ b/kommander/widget/myprocess.cpp
@@ -74,7 +74,7 @@ TQString MyProcess::run(const TQString& a_command, const TQString& a_shell)
// Look for shell
if (at.startsWith("#!")) {
- int eol = at.find("\n");
+ int eol = at.tqfind("\n");
if (eol == -1)
eol = at.length();
shellName = at.mid(2, eol-1).stripWhiteSpace();
@@ -91,7 +91,7 @@ TQString MyProcess::run(const TQString& a_command, const TQString& a_shell)
if(!mProcess->start(KProcess::NotifyOnExit, KProcess::All))
{
- m_atw->printError(i18n("Failed to start shell process
%1").arg(shellName));
+ m_atw->printError(i18n("Failed to start shell process
%1").tqarg(shellName));
return TQString();
}
mProcess->writeStdin(m_input, m_input.length());
@@ -102,10 +102,10 @@ TQString MyProcess::run(const TQString& a_command, const TQString& a_shell)
else
{
TQWidget dummy(0, 0, WType_Dialog | WShowModal);
- dummy.setFocusPolicy(TQWidget::NoFocus);
+ dummy.setFocusPolicy(TQ_NoFocus);
m_loopStarted = true;
qt_enter_modal(&dummy);
- qApp->enter_loop();
+ tqApp->enter_loop();
qt_leave_modal(&dummy);
if (!m_output.isEmpty() && m_output[m_output.length()-1] == '\n')
@@ -125,7 +125,7 @@ void MyProcess::slotProcessExited(KProcess* process)
{
if (m_loopStarted)
{
- qApp->exit_loop();
+ tqApp->exit_loop();
m_loopStarted = false;
}
delete process;
diff --git a/kommander/widget/myprocess.h b/kommander/widget/myprocess.h
index 36af1b48..c22aa810 100644
--- a/kommander/widget/myprocess.h
+++ b/kommander/widget/myprocess.h
@@ -26,9 +26,10 @@
class KommanderWidget;
-class KOMMANDER_EXPORT MyProcess : public QObject
+class KOMMANDER_EXPORT MyProcess : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
MyProcess(const KommanderWidget *);
// Run given command, using a_shell as a shell (this can be overridden by shebang in the first line)
diff --git a/kommander/widget/parsenode.cpp b/kommander/widget/parsenode.cpp
index 492c00fb..407e0987 100644
--- a/kommander/widget/parsenode.cpp
+++ b/kommander/widget/parsenode.cpp
@@ -38,13 +38,13 @@ ParseNode::ParseNode(double d) : m_type(ValueDouble), m_double(d), m_context(-1)
{
}
-ParseNode::ParseNode(Keyword k) : m_type(ValueKeyword), m_keyword(k), m_string(TQString::null), m_context(-1)
+ParseNode::ParseNode(Keyword k) : m_type(ValueKeyword), m_keyword(k), m_string(TQString()), m_context(-1)
{
}
ParseNode::ParseNode(Keyword k, const TQString& name) : m_type(ValueKeyword), m_keyword(k), m_context(-1)
{
- m_string = (k == Variable) ? name : TQString::null;
+ m_string = (k == Variable) ? name : TQString();
}
ParseNode ParseNode::error(const TQString& s)
diff --git a/kommander/widget/parser.cpp b/kommander/widget/parser.cpp
index 04748e45..07ffb88c 100644
--- a/kommander/widget/parser.cpp
+++ b/kommander/widget/parser.cpp
@@ -24,16 +24,16 @@ using namespace Parse;
TQString unescape(TQString s)
{
- return s.replace("\\\"", "\"").replace("\\t", "\t").replace("\\n", "\n").replace("\\\\", "\\");
+ return s.tqreplace("\\\"", "\"").tqreplace("\\t", "\t").tqreplace("\\n", "\n").tqreplace("\\\\", "\\");
}
-Parser::Parser(ParserData* pData) : m_data(pData), m_start(0), m_error(TQString::null), m_errorPosition(0),
+Parser::Parser(ParserData* pData) : m_data(pData), m_start(0), m_error(TQString()), m_errorPosition(0),
m_widget(0)
{
}
Parser::Parser(ParserData* pData, const TQString& expr) : m_data(pData), m_start(0),
- m_error(TQString::null), m_errorPosition(0), m_widget(0)
+ m_error(TQString()), m_errorPosition(0), m_widget(0)
{
setString(expr);
}
@@ -113,7 +113,7 @@ bool Parser::setString(const TQString& s)
else // Bad character
{
insertNode(s.mid(start, 1), lines);
- setError(i18n("Invalid character: '%1'").arg(s[start]), m_parts.count()-1);
+ setError(i18n("Invalid character: '%1'").tqarg(s[start]), m_parts.count()-1);
return false;
}
}
@@ -220,7 +220,7 @@ ParseNode Parser::parseValue(Mode mode)
return parseWidget(mode, value);
}else if (mode == Execute)
{
- setError(i18n("'%1' (%2) is not a widget").arg(p.variableName()).arg(variable(p.variableName()).toString()));
+ setError(i18n("'%1' (%2) is not a widget").tqarg(p.variableName()).tqarg(variable(p.variableName()).toString()));
return ParseNode();
} else
{
@@ -232,7 +232,7 @@ ParseNode Parser::parseValue(Mode mode)
}
else if (tryKeyword(LeftParenthesis, CheckOnly))
{
- setError(i18n("'%1' is not a function").arg(p.variableName()));
+ setError(i18n("'%1' is not a function").tqarg(p.variableName()));
return ParseNode();
}
else
@@ -423,15 +423,15 @@ ParseNode Parser::parseFunction(Mode mode)
tryKeyword(RightParenthesis);
}
if (f.minArgs() > params.count())
- setError(i18n("in function '%1': %2").arg(name).arg(i18n("too few parameters")), pos);
+ setError(i18n("in function '%1': %2").tqarg(name).tqarg(i18n("too few parameters")), pos);
else if (f.maxArgs() < params.count())
- setError(i18n("in function '%1': %2").arg(name).arg(i18n("too many parameters")), pos);
+ setError(i18n("in function '%1': %2").tqarg(name).tqarg(i18n("too many parameters")), pos);
else if (mode == Execute)
{
ParseNode p = f.execute(this, params);
if (!p.isValid())
{
- setError(i18n("in function '%1': %2").arg(name).arg(p.errorMessage()), pos);
+ setError(i18n("in function '%1': %2").tqarg(name).tqarg(p.errorMessage()), pos);
return ParseNode();
}
else
@@ -471,7 +471,7 @@ ParseNode Parser::parseWidget(Mode mode, const TQString &widgetName)
ParseNode p = f.execute(this, params);
if (!p.isValid())
{
- setError(i18n("in widget function '%1.%2': %3").arg(widget).arg(var).arg(p.errorMessage()), pos);
+ setError(i18n("in widget function '%1.%2': %3").tqarg(widget).tqarg(var).tqarg(p.errorMessage()), pos);
return ParseNode();
}
else
@@ -514,12 +514,12 @@ ParseNode Parser::parseAssignment(Mode mode)
m_start = m_start - 2;
return parseWidget(mode);
} else
- setError(i18n("'%1' is not a widget").arg(var));
+ setError(i18n("'%1' is not a widget").tqarg(var));
}
else if (tryKeyword(LeftParenthesis, CheckOnly))
- setError(i18n("'%1' is not a function").arg(var));
+ setError(i18n("'%1' is not a function").tqarg(var));
else
- setError(i18n("Unexpected symbol after variable '%1'").arg(var));
+ setError(i18n("Unexpected symbol after variable '%1'").tqarg(var));
return ParseNode();
}
@@ -738,9 +738,9 @@ bool Parser::tryKeyword(Keyword k, Mode mode)
if (mode == Execute)
{
if (k == Dot)
- setError(i18n("Expected '%1'
Possible cause of the error is having a variable with the same name as a widget").arg(m_data->keywordToString(k)));
+ setError(i18n("Expected '%1'
Possible cause of the error is having a variable with the same name as a widget").tqarg(m_data->keywordToString(k)));
else
- setError(i18n("Expected '%1'").arg(m_data->keywordToString(k)));
+ setError(i18n("Expected '%1'").tqarg(m_data->keywordToString(k)));
}
return false;
}
@@ -785,7 +785,7 @@ bool Parser::isWidget() const
void Parser::reset()
{
m_start = 0;
- m_error = TQString::null;
+ m_error = TQString();
m_errorPosition = 0;
}
@@ -814,9 +814,9 @@ void Parser::setVariable(const TQString& name, ParseNode value)
ParseNode Parser::variable(const TQString& name) const
{
if (isGlobal(name))
- return m_globalVariables.contains(name) ? m_globalVariables[name] : ParseNode();
+ return m_globalVariables.tqcontains(name) ? m_globalVariables[name] : ParseNode();
else
- return m_variables.contains(name) ? m_variables[name] : ParseNode();
+ return m_variables.tqcontains(name) ? m_variables[name] : ParseNode();
}
bool Parser::isGlobal(const TQString& name) const
@@ -826,7 +826,7 @@ bool Parser::isGlobal(const TQString& name) const
bool Parser::isVariable(const TQString& name) const
{
- return m_variables.contains(name) || m_globalVariables.contains(name);
+ return m_variables.tqcontains(name) || m_globalVariables.tqcontains(name);
}
void Parser::unsetVariable(const TQString& key)
@@ -847,7 +847,7 @@ const TQMap& Parser::array(const TQString& name) const
bool Parser::isArray(const TQString& name) const
{
- return m_arrays.contains(name) || m_globalArrays.contains(name);
+ return m_arrays.tqcontains(name) || m_globalArrays.tqcontains(name);
}
void Parser::setArray(const TQString& name, const TQString& key, ParseNode value)
@@ -881,9 +881,9 @@ ParseNode Parser::arrayValue(const TQString& name, const TQString& key) const
if (!isArray(name))
return ParseNode();
if (isGlobal(name))
- return m_globalArrays[name].contains(key) ? m_globalArrays[name][key] : ParseNode();
+ return m_globalArrays[name].tqcontains(key) ? m_globalArrays[name][key] : ParseNode();
else
- return m_arrays[name].contains(key) ? m_arrays[name][key] : ParseNode();
+ return m_arrays[name].tqcontains(key) ? m_arrays[name][key] : ParseNode();
}
diff --git a/kommander/widget/parser.h b/kommander/widget/parser.h
index 3ad7d59c..b82188d2 100644
--- a/kommander/widget/parser.h
+++ b/kommander/widget/parser.h
@@ -65,7 +65,7 @@ public:
// set array key
void setArray(const TQString& name, const TQString& key, ParseNode value);
// unset array key or whole array
- void unsetArray(const TQString& name, const TQString& key = TQString::null);
+ void unsetArray(const TQString& name, const TQString& key = TQString());
// array value
ParseNode arrayValue(const TQString& name, const TQString& key) const;
// get associated widget
@@ -110,7 +110,7 @@ private:
// parse parameters
ParseNode parseFunction(Parse::Mode mode = Parse::Execute);
// parse widget function
- ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const TQString &widgetName = TQString::null);
+ ParseNode parseWidget(Parse::Mode mode = Parse::Execute, const TQString &widgetName = TQString());
// parse assignment
ParseNode parseAssignment(Parse::Mode mode = Parse::Execute);
diff --git a/kommander/widget/parserdata.cpp b/kommander/widget/parserdata.cpp
index 274d7220..b5346fd4 100644
--- a/kommander/widget/parserdata.cpp
+++ b/kommander/widget/parserdata.cpp
@@ -19,7 +19,7 @@ using namespace Parse;
KeywordGroup ParserData::keywordGroup(Keyword k) const
{
- if (m_groups.contains(k))
+ if (m_groups.tqcontains(k))
return m_groups[k];
else
return GroupMisc;
@@ -28,7 +28,7 @@ KeywordGroup ParserData::keywordGroup(Keyword k) const
Keyword ParserData::stringToKeyword(const TQString& s) const
{
TQString k = s.lower();
- if (m_keywords.contains(k))
+ if (m_keywords.tqcontains(k))
return m_keywords[k];
else
return Variable;
@@ -116,7 +116,7 @@ ParserData::ParserData()
bool ParserData::isFunction(const TQString& name) const
{
- return m_functions.contains(name.lower());
+ return m_functions.tqcontains(name.lower());
}
const Function& ParserData::function(const TQString& name) const
diff --git a/kommander/widgets/aboutdialog.cpp b/kommander/widgets/aboutdialog.cpp
index 9377b377..4425412c 100644
--- a/kommander/widgets/aboutdialog.cpp
+++ b/kommander/widgets/aboutdialog.cpp
@@ -36,8 +36,8 @@ enum Functions {
LastFunction
};
-AboutDialog::AboutDialog(TQWidget *parent, const char *name)
- : TQLabel(parent, name), KommanderWidget(this)
+AboutDialog::AboutDialog(TQWidget *tqparent, const char *name)
+ : TQLabel(tqparent, name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/aboutdialog.h b/kommander/widgets/aboutdialog.h
index 64d6c9ab..5837f355 100644
--- a/kommander/widgets/aboutdialog.h
+++ b/kommander/widgets/aboutdialog.h
@@ -24,11 +24,12 @@ class KAboutData;
class AboutDialog : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_OBJECT
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
public:
- AboutDialog(TQWidget *parent = 0, const char *name = 0);
+ AboutDialog(TQWidget *tqparent = 0, const char *name = 0);
~AboutDialog();
diff --git a/kommander/widgets/buttongroup.cpp b/kommander/widgets/buttongroup.cpp
index 751c8e5c..6b0feef3 100644
--- a/kommander/widgets/buttongroup.cpp
+++ b/kommander/widgets/buttongroup.cpp
@@ -39,7 +39,7 @@ enum Functions {
};
ButtonGroup::ButtonGroup(TQWidget *a_parent, const char *a_name)
- : TQButtonGroup(a_parent, a_name), KommanderWidget(this)
+ : TQButtonGroup(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "checked";
@@ -109,7 +109,7 @@ void ButtonGroup::contextMenuEvent( TQContextMenuEvent * e )
bool ButtonGroup::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+ return f == DCOP::text || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
@@ -120,8 +120,8 @@ TQString ButtonGroup::handleDCOP(int function, const TQStringList& args)
{
TQString text;
for (int i = 0; i < count(); i++)
- if (dynamic_cast(find(i)))
- text += (dynamic_cast(find(i)))->evalAssociatedText();
+ if (dynamic_cast(tqfind(i)))
+ text += (dynamic_cast(tqfind(i)))->evalAssociatedText();
return text;
}
case DCOP::checked:
@@ -133,7 +133,7 @@ TQString ButtonGroup::handleDCOP(int function, const TQStringList& args)
case BG_selectedId:
return TQString::number(this->selectedId() );
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/buttongroup.h b/kommander/widgets/buttongroup.h
index 67252a5c..ff7d5edb 100644
--- a/kommander/widgets/buttongroup.h
+++ b/kommander/widgets/buttongroup.h
@@ -34,10 +34,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT ButtonGroup : public TQButtonGroup, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget DESIGNABLE false)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget DESIGNABLE false)
public:
ButtonGroup(TQWidget *a_parent, const char *a_name);
~ButtonGroup();
diff --git a/kommander/widgets/checkbox.cpp b/kommander/widgets/checkbox.cpp
index f7fe20be..696a9b2b 100644
--- a/kommander/widgets/checkbox.cpp
+++ b/kommander/widgets/checkbox.cpp
@@ -29,7 +29,7 @@
#include "checkbox.h"
CheckBox::CheckBox(TQWidget *a_parent, const char *a_name)
- : TQCheckBox(a_parent, a_name), KommanderWidget(this)
+ : TQCheckBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "unchecked";
@@ -102,7 +102,7 @@ void CheckBox::showEvent(TQShowEvent* e)
bool CheckBox::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::checked || f == DCOP::setChecked || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
void CheckBox::contextMenuEvent( TQContextMenuEvent * e )
@@ -125,7 +125,7 @@ TQString CheckBox::handleDCOP(int function, const TQStringList& args)
case DCOP::setChecked:
setChecked(args[0] != "false" && args[0] != "0");
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/checkbox.h b/kommander/widgets/checkbox.h
index 4dde80de..acd2144f 100644
--- a/kommander/widgets/checkbox.h
+++ b/kommander/widgets/checkbox.h
@@ -34,10 +34,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT CheckBox : public TQCheckBox, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
CheckBox(TQWidget *a_parent, const char *a_name);
~CheckBox();
diff --git a/kommander/widgets/closebutton.cpp b/kommander/widgets/closebutton.cpp
index 9a9aa4f8..a8892d13 100644
--- a/kommander/widgets/closebutton.cpp
+++ b/kommander/widgets/closebutton.cpp
@@ -31,7 +31,7 @@
#include "closebutton.h"
CloseButton::CloseButton(TQWidget* a_parent, const char* a_name)
- : KPushButton(a_parent, a_name), KommanderWidget(this)
+ : KPushButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -41,14 +41,14 @@ CloseButton::CloseButton(TQWidget* a_parent, const char* a_name)
connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(startProcess()));
- TQObject *parent = this;
- while (parent->parent() != 0)
+ TQObject *tqparent = TQT_TQOBJECT(this);
+ while (tqparent->tqparent() != 0)
{
- parent = parent->parent();
- if (parent->inherits(TQDIALOG_OBJECT_NAME_STRING))
+ tqparent = tqparent->tqparent();
+ if (tqparent->inherits(TQDIALOG_OBJECT_NAME_STRING))
break;
}
- connect(this, TQT_SIGNAL(clicked()), parent, TQT_SLOT(reject()));
+ connect(this, TQT_SIGNAL(clicked()), tqparent, TQT_SLOT(reject()));
}
CloseButton::~CloseButton()
diff --git a/kommander/widgets/closebutton.h b/kommander/widgets/closebutton.h
index 42ff3627..c1971588 100644
--- a/kommander/widgets/closebutton.h
+++ b/kommander/widgets/closebutton.h
@@ -33,11 +33,12 @@ class TQShowEvent;
class KOMMANDER_EXPORT CloseButton : public KPushButton, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
public:
CloseButton(TQWidget* a_parent, const char* a_name);
~CloseButton();
diff --git a/kommander/widgets/combobox.cpp b/kommander/widgets/combobox.cpp
index cab29337..4efa3a2c 100644
--- a/kommander/widgets/combobox.cpp
+++ b/kommander/widgets/combobox.cpp
@@ -30,14 +30,14 @@
#include "combobox.h"
enum Functions {
- FirstFunction = 353, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!!
+ FirstFunction = 353, //CHANGE THIS NUMBER TO AN UNITQUE ONE!!!
popupList,
LastFunction
};
ComboBox::ComboBox(TQWidget *a_parent, const char *a_name)
- : KComboBox(a_parent, a_name), KommanderWidget(this)
+ : KComboBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -121,7 +121,7 @@ bool ComboBox::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::selection || f == DCOP::setSelection ||
f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::item ||
f == DCOP::removeItem || f == DCOP::insertItem || f == DCOP::insertItems ||
- f == DCOP::addUniqueItem || f == DCOP::clear || f == DCOP::count || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+ f == DCOP::addUniqueItem || f == DCOP::clear || f == DCOP::count || f == DCOP::setEditable || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
TQString ComboBox::handleDCOP(int function, const TQStringList& args)
@@ -192,7 +192,7 @@ TQString ComboBox::handleDCOP(int function, const TQStringList& args)
case popupList:
TQComboBox::popup();
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/combobox.h b/kommander/widgets/combobox.h
index 5fb5306d..4ba5393b 100644
--- a/kommander/widgets/combobox.h
+++ b/kommander/widgets/combobox.h
@@ -34,10 +34,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT ComboBox : public KComboBox, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
ComboBox(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/datepicker.cpp b/kommander/widgets/datepicker.cpp
index 928e1b81..1e321ed5 100644
--- a/kommander/widgets/datepicker.cpp
+++ b/kommander/widgets/datepicker.cpp
@@ -27,7 +27,7 @@
#include "datepicker.h"
DatePicker::DatePicker(TQWidget *a_parent, const char *a_name)
- : KDatePicker(a_parent, a_name), KommanderWidget(this)
+ : KDatePicker(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -101,7 +101,7 @@ void DatePicker::contextMenuEvent( TQContextMenuEvent * e )
bool DatePicker::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || f == DCOP::hasFocus ;
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::tqgeometry || f == DCOP::hasFocus ;
}
TQString DatePicker::handleDCOP(int function, const TQStringList& args)
@@ -112,7 +112,7 @@ TQString DatePicker::handleDCOP(int function, const TQStringList& args)
case DCOP::setText:
setDate(TQDate::fromString(args[0], Qt::ISODate));
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/datepicker.h b/kommander/widgets/datepicker.h
index 61644f92..ebf3a7da 100644
--- a/kommander/widgets/datepicker.h
+++ b/kommander/widgets/datepicker.h
@@ -34,10 +34,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT DatePicker : public KDatePicker, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
DatePicker(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/dialog.cpp b/kommander/widgets/dialog.cpp
index fd3b0b27..15dd7e30 100644
--- a/kommander/widgets/dialog.cpp
+++ b/kommander/widgets/dialog.cpp
@@ -34,14 +34,14 @@
enum Functions {
FirstFunction = 185,
- D_focusWidget,
+ D_tqfocusWidget,
D_waitCursor,
D_restoreCursor,
LastFunction
};
Dialog::Dialog(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
- : TQDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(this)
+ : TQDialog(a_parent, a_name, a_modal, a_flags), KommanderWindow(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -53,7 +53,7 @@ Dialog::Dialog(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags
m_shebang = "#!/usr/bin/kmdr-executor";
m_firstShow = true;
KommanderPlugin::setDefaultGroup(Group::DCOP);
- KommanderPlugin::registerFunction(D_focusWidget, "focusWidget(TQString widget)", i18n("The name of the widget having focus"), 1);
+ KommanderPlugin::registerFunction(D_tqfocusWidget, "tqfocusWidget(TQString widget)", i18n("The name of the widget having focus"), 1);
KommanderPlugin::registerFunction(D_waitCursor, "waitCursor(TQString widget)", i18n("Set a wait cursor. CAUTION: if set more than once an equal number of calls to restore must be made to clear it."), 1);
KommanderPlugin::registerFunction(D_restoreCursor, "restoreCursor(TQString widget)", i18n("Restore normal curser. NOTE: must be called as many times as wait was."), 1);
}
@@ -148,7 +148,7 @@ void Dialog::show()
{
//if the dialog is embedded in a KPart, the show can be called many times.
//to avoid re-init and sending signals we don't want, in that case call only the
-//QWidget's show method to show the widgets, but don't do any TQDialog specific
+//TQWidget's show method to show the widgets, but don't do any TQDialog specific
//task
if (!m_firstShow)
{
@@ -193,7 +193,7 @@ void Dialog::contextMenuEvent( TQContextMenuEvent * e )
bool Dialog::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || (f > FirstFunction && f < LastFunction);
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::tqgeometry || (f > FirstFunction && f < LastFunction);
}
TQString Dialog::handleDCOP(int function, const TQStringList& args)
@@ -204,14 +204,14 @@ TQString Dialog::handleDCOP(int function, const TQStringList& args)
case DCOP::setText:
setWidgetText(args[0]);
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
return TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
break;
- case D_focusWidget:
- return focusWidget()->name();
+ case D_tqfocusWidget:
+ return tqfocusWidget()->name();
break;
case D_waitCursor:
- TQApplication::setOverrideCursor(TQCursor(Qt::WaitCursor));
+ TQApplication::setOverrideCursor(TQCursor(TQt::WaitCursor));
break;
case D_restoreCursor:
TQApplication::restoreOverrideCursor();
diff --git a/kommander/widgets/dialog.h b/kommander/widgets/dialog.h
index 90fa11c1..1c8cf5d6 100644
--- a/kommander/widgets/dialog.h
+++ b/kommander/widgets/dialog.h
@@ -29,14 +29,15 @@ class TQShowEvent;
class KOMMANDER_EXPORT Dialog : public TQDialog, public KommanderWindow
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(bool useInternalParser READ useInternalParser WRITE setUseInternalParser)
- Q_PROPERTY(bool useShebang READ useShebang WRITE setUseShebang DESIGNABLE true)
- Q_PROPERTY(TQString shebang READ Shebang WRITE setShebang DESIGNABLE true)
- Q_OVERRIDE(bool modal DESIGNABLE false)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(bool useInternalParser READ useInternalParser WRITE setUseInternalParser)
+ TQ_PROPERTY(bool useShebang READ useShebang WRITE setUseShebang DESIGNABLE true)
+ TQ_PROPERTY(TQString shebang READ Shebang WRITE setShebang DESIGNABLE true)
+ TQ_OVERRIDE(bool modal DESIGNABLE false)
public:
Dialog(TQWidget *, const char *, bool = true, int=0);
diff --git a/kommander/widgets/execbutton.cpp b/kommander/widgets/execbutton.cpp
index eccfe306..be8f109d 100644
--- a/kommander/widgets/execbutton.cpp
+++ b/kommander/widgets/execbutton.cpp
@@ -40,7 +40,7 @@
using namespace std;
enum Functions {
- FirstFunction = 260, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!!
+ FirstFunction = 260, //CHANGE THIS NUMBER TO AN UNITQUE ONE!!!
EB_isOn,
EB_setPopup,
EB_setButtonText,
@@ -48,7 +48,7 @@ enum Functions {
};
ExecButton::ExecButton(TQWidget* a_parent, const char* a_name)
- : KPushButton(a_parent, a_name), KommanderWidget(this)
+ : KPushButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -113,11 +113,11 @@ void ExecButton::setWidgetText(const TQString& a_text)
void ExecButton::startProcess()
{
TQString at = evalAssociatedText().stripWhiteSpace();
- bool enabledStatus = isEnabled();
+ bool enabledtqStatus = isEnabled();
if (m_blockGUI != None)
setEnabled(false);
if (m_blockGUI == GUI)
- KApplication::setOverrideCursor(TQCursor(Qt::WaitCursor));
+ KApplication::setOverrideCursor(TQCursor(TQt::WaitCursor));
MyProcess* process = new MyProcess(this);
process->setBlocking(m_blockGUI == GUI);
connect(process, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*)));
@@ -128,7 +128,7 @@ void ExecButton::startProcess()
if (writeStdout())
cout << m_output << flush;
}
- setEnabled(enabledStatus);
+ setEnabled(enabledtqStatus);
}
@@ -180,7 +180,7 @@ void ExecButton::contextMenuEvent( TQContextMenuEvent * e )
bool ExecButton::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::execute || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::execute || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
TQString ExecButton::handleDCOP(int function, const TQStringList& args)
@@ -202,7 +202,7 @@ TQString ExecButton::handleDCOP(int function, const TQStringList& args)
break;
case EB_setPopup:
{
- TQWidgetList *list = TQApplication::allWidgets();
+ TQWidgetList *list = TQApplication::tqallWidgets();
TQWidgetListIt it( *list );
TQWidget * w;
while ( (w=it.current()) != 0 ) { // for each widget...
@@ -215,7 +215,7 @@ TQString ExecButton::handleDCOP(int function, const TQStringList& args)
}
break;
}
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/execbutton.h b/kommander/widgets/execbutton.h
index b646e5e7..6e8c478f 100644
--- a/kommander/widgets/execbutton.h
+++ b/kommander/widgets/execbutton.h
@@ -36,13 +36,14 @@ class TQShowEvent;
class KOMMANDER_EXPORT ExecButton : public KPushButton, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS(Blocking)
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
- Q_PROPERTY(Blocking blockGUI READ blockGUI WRITE setBlockGUI)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(bool writeStdout READ writeStdout WRITE setWriteStdout)
+ TQ_PROPERTY(Blocking blockGUI READ blockGUI WRITE setBlockGUI)
public:
ExecButton(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/fileselector.cpp b/kommander/widgets/fileselector.cpp
index a7c29673..f6806e5b 100644
--- a/kommander/widgets/fileselector.cpp
+++ b/kommander/widgets/fileselector.cpp
@@ -35,7 +35,7 @@
#include "fileselector.h"
FileSelector::FileSelector(TQWidget * a_parent, const char *a_name)
- : TQWidget(a_parent, a_name), KommanderWidget(this)
+ : TQWidget(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -50,9 +50,9 @@ FileSelector::FileSelector(TQWidget * a_parent, const char *a_name)
m_boxLayout->addWidget(m_lineEdit);
m_boxLayout->addWidget(m_selectButton);
- setSizePolicy(m_lineEdit->sizePolicy());
- m_lineEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
- m_selectButton->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding));
+ tqsetSizePolicy(m_lineEdit->sizePolicy());
+ m_lineEdit->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
+ m_selectButton->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding));
connect(m_selectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(makeSelection()));
@@ -222,13 +222,13 @@ TQString FileSelector::handleDCOP(int function, const TQStringList& args)
return m_lineEdit->selectedText();
case DCOP::setSelection:
{
- int f = m_lineEdit->text().find(args[0]);
+ int f = m_lineEdit->text().tqfind(args[0]);
if (f != -1)
m_lineEdit->setSelection(f, args[0].length());
break;
}
case DCOP::clear:
- setWidgetText(TQString::null);
+ setWidgetText(TQString());
break;
default:
return KommanderWidget::handleDCOP(function, args);
diff --git a/kommander/widgets/fileselector.h b/kommander/widgets/fileselector.h
index 44758131..fd254fd6 100644
--- a/kommander/widgets/fileselector.h
+++ b/kommander/widgets/fileselector.h
@@ -36,17 +36,18 @@ class TQShowEvent;
class KOMMANDER_EXPORT FileSelector : public TQWidget, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(bool showEditor READ showEditor WRITE setShowEditor)
- Q_PROPERTY(TQString buttonCaption READ caption WRITE setCaption)
- Q_PROPERTY(TQString selectionFilter READ selectionFilter WRITE setSelectionFilter)
- Q_PROPERTY(TQString selectionCaption READ selectionCaption WRITE setSelectionCaption)
- Q_PROPERTY(SelectionType selectionType READ selectionType WRITE setSelectionType)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(bool showEditor READ showEditor WRITE setShowEditor)
+ TQ_PROPERTY(TQString buttonCaption READ caption WRITE setCaption)
+ TQ_PROPERTY(TQString selectionFilter READ selectionFilter WRITE setSelectionFilter)
+ TQ_PROPERTY(TQString selectionCaption READ selectionCaption WRITE setSelectionCaption)
+ TQ_PROPERTY(SelectionType selectionType READ selectionType WRITE setSelectionType)
Q_ENUMS(SelectionType)
- Q_PROPERTY(bool selectionOpenMultiple READ selectionOpenMultiple WRITE setSelectionOpenMultiple)
+ TQ_PROPERTY(bool selectionOpenMultiple READ selectionOpenMultiple WRITE setSelectionOpenMultiple)
public:
FileSelector(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/fontdialog.cpp b/kommander/widgets/fontdialog.cpp
index 5fc17edc..3efde0f4 100644
--- a/kommander/widgets/fontdialog.cpp
+++ b/kommander/widgets/fontdialog.cpp
@@ -28,8 +28,8 @@ enum Functions {
LastFunction
};
-FontDialog::FontDialog(TQWidget *parent, const char *name)
- : TQLabel(parent, name), KommanderWidget(this)
+FontDialog::FontDialog(TQWidget *tqparent, const char *name)
+ : TQLabel(tqparent, name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/fontdialog.h b/kommander/widgets/fontdialog.h
index f7ccdf0f..46c828e2 100644
--- a/kommander/widgets/fontdialog.h
+++ b/kommander/widgets/fontdialog.h
@@ -23,11 +23,12 @@
class FontDialog : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- FontDialog(TQWidget *parent = 0, const char *name = 0);
+ FontDialog(TQWidget *tqparent = 0, const char *name = 0);
~FontDialog();
@@ -44,6 +45,7 @@ public slots:
virtual void setWidgetText(const TQString &);
virtual void populate();
+public:
TQFont m_font;
};
diff --git a/kommander/widgets/groupbox.cpp b/kommander/widgets/groupbox.cpp
index 7ca1c199..aef8042d 100644
--- a/kommander/widgets/groupbox.cpp
+++ b/kommander/widgets/groupbox.cpp
@@ -32,7 +32,7 @@
GroupBox::GroupBox(TQWidget *a_parent, const char *a_name)
- : TQGroupBox(a_parent, a_name), KommanderWidget(this)
+ : TQGroupBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -84,13 +84,13 @@ void GroupBox::populate()
void GroupBox::insertChild(TQObject *a_child)
{
m_childList.append(a_child);
- TQObject::insertChild(a_child);
+ TQT_TQOBJECT(this)->TQObject::insertChild(a_child);
}
void GroupBox::removeChild(TQObject *a_child)
{
m_childList.remove(a_child);
- TQObject::removeChild(a_child);
+ TQT_TQOBJECT(this)->TQObject::removeChild(a_child);
}
void GroupBox::showEvent( TQShowEvent *e )
@@ -108,7 +108,7 @@ void GroupBox::contextMenuEvent( TQContextMenuEvent * e )
bool GroupBox::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
// || (f >= FirstFunction && f <= LastFunction);
}
@@ -126,7 +126,7 @@ TQString GroupBox::handleDCOP(int function, const TQStringList& args)
case DCOP::setText:
setTitle(args[0]);
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/groupbox.h b/kommander/widgets/groupbox.h
index b624cd15..ebfd9a74 100644
--- a/kommander/widgets/groupbox.h
+++ b/kommander/widgets/groupbox.h
@@ -34,10 +34,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT GroupBox : public TQGroupBox, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
GroupBox(TQWidget *a_parent, const char *a_name);
~GroupBox();
diff --git a/kommander/widgets/konsole.cpp b/kommander/widgets/konsole.cpp
index c27cb8fe..728d9b1f 100644
--- a/kommander/widgets/konsole.cpp
+++ b/kommander/widgets/konsole.cpp
@@ -26,7 +26,7 @@
#include
Konsole::Konsole(TQWidget* a_parent, const char* a_name)
- : KTextEdit(a_parent, a_name), KommanderWidget(this), mSeenEOL(false), mProcess(false)
+ : KTextEdit(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)), mSeenEOL(false), mProcess(false)
{
TQStringList states;
states << "default";
@@ -89,7 +89,7 @@ void Konsole::execute()
mProcess->setBlocking(false);
connect(mProcess, TQT_SIGNAL(processExited(MyProcess*)), TQT_SLOT(processExited(MyProcess*)));
connect(mProcess, TQT_SIGNAL(processReceivedStdout(MyProcess*, char*, int)), TQT_SLOT(processReceivedStdout(MyProcess*, char*, int)));
- setCursor(TQCursor(Qt::WaitCursor));
+ setCursor(TQCursor(TQt::WaitCursor));
mProcess->run(at);
}
diff --git a/kommander/widgets/konsole.h b/kommander/widgets/konsole.h
index 894060f9..efd34042 100644
--- a/kommander/widgets/konsole.h
+++ b/kommander/widgets/konsole.h
@@ -32,11 +32,12 @@ class MyProcess;
class KOMMANDER_EXPORT Konsole : public KTextEdit, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_OVERRIDE(bool readOnly DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_OVERRIDE(bool readOnly DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
Konsole(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/label.cpp b/kommander/widgets/label.cpp
index ee422325..ce56b3c4 100644
--- a/kommander/widgets/label.cpp
+++ b/kommander/widgets/label.cpp
@@ -26,7 +26,7 @@
#include "label.h"
Label::Label(TQWidget *a_parent, const char *a_name)
- : TQLabel(a_parent, a_name), KommanderWidget(this)
+ : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -88,7 +88,7 @@ void Label::showEvent(TQShowEvent *e)
bool Label::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
TQString Label::handleDCOP(int function, const TQStringList& args)
@@ -102,7 +102,7 @@ TQString Label::handleDCOP(int function, const TQStringList& args)
case DCOP::clear:
setWidgetText("");
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/label.h b/kommander/widgets/label.h
index 70b8b248..31a25198 100644
--- a/kommander/widgets/label.h
+++ b/kommander/widgets/label.h
@@ -33,10 +33,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT Label : public TQLabel, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
Label(TQWidget *a_parent, const char *a_name);
~Label();
diff --git a/kommander/widgets/lineedit.cpp b/kommander/widgets/lineedit.cpp
index 08913b4e..2f4f9de6 100644
--- a/kommander/widgets/lineedit.cpp
+++ b/kommander/widgets/lineedit.cpp
@@ -31,7 +31,7 @@ enum functions {
};
LineEdit::LineEdit(TQWidget *a_parent, const char *a_name)
- : KLineEdit(a_parent, a_name), KommanderWidget((TQObject *)this)
+ : KLineEdit(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -124,7 +124,7 @@ void LineEdit::contextMenuEvent( TQContextMenuEvent * e )
bool LineEdit::isFunctionSupported(int f)
{
return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection ||
- f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction) ;
+ f == DCOP::clear || f == DCOP::setEditable || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction) ;
}
TQString LineEdit::handleDCOP(int function, const TQStringList& args)
@@ -146,7 +146,7 @@ TQString LineEdit::handleDCOP(int function, const TQStringList& args)
case DCOP::setEditable:
setReadOnly(args[0] == "false" || args[0] == "0");
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/lineedit.h b/kommander/widgets/lineedit.h
index d0ee32f5..654ff4dc 100644
--- a/kommander/widgets/lineedit.h
+++ b/kommander/widgets/lineedit.h
@@ -34,10 +34,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT LineEdit : public KLineEdit, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
LineEdit(TQWidget *, const char *);
virtual ~LineEdit();
diff --git a/kommander/widgets/listbox.cpp b/kommander/widgets/listbox.cpp
index 3dd36357..1135a540 100644
--- a/kommander/widgets/listbox.cpp
+++ b/kommander/widgets/listbox.cpp
@@ -30,7 +30,7 @@
#include "listbox.h"
ListBox::ListBox(TQWidget *a_parent, const char *a_name)
- : KListBox(a_parent, a_name), KommanderWidget(this)
+ : KListBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -96,7 +96,7 @@ bool ListBox::isFunctionSupported(int f)
return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection ||
f == DCOP::insertItems || f == DCOP::insertItem || f == DCOP::removeItem || f == DCOP::clear ||
f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::item || f == DCOP::addUniqueItem ||
- f == DCOP::findItem || f == DCOP::setPixmap || f == DCOP::count || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+ f == DCOP::findItem || f == DCOP::setPixmap || f == DCOP::count || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
void ListBox::contextMenuEvent( TQContextMenuEvent * e )
@@ -125,7 +125,7 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args)
}
case DCOP::setSelection:
{
- TQListBoxItem* found = findItem(args[0], Qt::ExactMatch);
+ TQListBoxItem* found = tqfindItem(args[0], TQt::ExactMatch);
if (found)
setCurrentItem(index(found));
break;
@@ -162,14 +162,14 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args)
return TQString();
}
case DCOP::addUniqueItem:
- if (!findItem(args[0], Qt::ExactMatch))
+ if (!tqfindItem(args[0], TQt::ExactMatch))
insertItem(args[0]);
break;
case DCOP::findItem:
{
- TQListBoxItem* found = findItem(args[0], Qt::ExactMatch);
- if (!found) found = findItem(args[0], Qt::BeginsWith);
- if (!found) found = findItem(args[0], Qt::Contains);
+ TQListBoxItem* found = tqfindItem(args[0], TQt::ExactMatch);
+ if (!found) found = tqfindItem(args[0], TQt::BeginsWith);
+ if (!found) found = tqfindItem(args[0], TQt::Contains);
if (found)
return TQString::number(index(found));
else return TQString::number(-1);
@@ -197,7 +197,7 @@ TQString ListBox::handleDCOP(int function, const TQStringList& args)
strings += item(i)->text();
return strings.join("\n");
}
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/listbox.h b/kommander/widgets/listbox.h
index dd59bc3b..84fff290 100644
--- a/kommander/widgets/listbox.h
+++ b/kommander/widgets/listbox.h
@@ -34,10 +34,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT ListBox : public KListBox, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
ListBox(TQWidget *a_parent, const char *a_name);
~ListBox();
diff --git a/kommander/widgets/pixmaplabel.cpp b/kommander/widgets/pixmaplabel.cpp
index 78077c5c..e8b013db 100644
--- a/kommander/widgets/pixmaplabel.cpp
+++ b/kommander/widgets/pixmaplabel.cpp
@@ -31,7 +31,7 @@
#include "pixmaplabel.h"
PixmapLabel::PixmapLabel(TQWidget *a_parent, const char *a_name)
- : TQLabel(a_parent, a_name), KommanderWidget(this)
+ : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -103,7 +103,7 @@ void PixmapLabel::contextMenuEvent( TQContextMenuEvent * e )
bool PixmapLabel::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::geometry;
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::tqgeometry;
}
TQString PixmapLabel::handleDCOP(int function, const TQStringList& args)
@@ -117,7 +117,7 @@ TQString PixmapLabel::handleDCOP(int function, const TQStringList& args)
break;
case DCOP::text:
return text();
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/pixmaplabel.h b/kommander/widgets/pixmaplabel.h
index dbc3e113..72f66077 100644
--- a/kommander/widgets/pixmaplabel.h
+++ b/kommander/widgets/pixmaplabel.h
@@ -34,9 +34,10 @@ class TQShowEvent;
class KOMMANDER_EXPORT PixmapLabel : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
PixmapLabel(TQWidget *a_parent, const char *a_name);
~PixmapLabel();
diff --git a/kommander/widgets/plugin.cpp b/kommander/widgets/plugin.cpp
index 020ae6da..009da398 100644
--- a/kommander/widgets/plugin.cpp
+++ b/kommander/widgets/plugin.cpp
@@ -57,7 +57,7 @@ class KomStdPlugin : public KommanderPlugin
{
public:
KomStdPlugin();
- virtual TQWidget *create( const TQString &key, TQWidget *parent = 0, const char *name = 0 );
+ virtual TQWidget *create( const TQString &key, TQWidget *tqparent = 0, const char *name = 0 );
};
KomStdPlugin::KomStdPlugin()
@@ -97,41 +97,41 @@ KomStdPlugin::KomStdPlugin()
addWidget("AboutDialog", group, "", new TQIconSet(KGlobal::iconLoader()->loadIcon("kommander", KIcon::NoGroup, KIcon::SizeMedium)));
}
-TQWidget *KomStdPlugin::create( const TQString &key, TQWidget *parent, const char *name )
+TQWidget *KomStdPlugin::create( const TQString &key, TQWidget *tqparent, const char *name )
{
- if (key == "ButtonGroup") return new ButtonGroup(parent, name);
- else if (key == "CheckBox") return new CheckBox(parent, name);
- else if (key == "CloseButton") return new CloseButton(parent, name);
- else if (key == "ComboBox") return new ComboBox(parent, name);
- else if (key == "Dialog") return new Dialog(parent, name);
- else if (key == "ExecButton") return new ExecButton(parent, name);
- else if (key == "FileSelector") return new FileSelector(parent, name);
- else if (key == "GroupBox") return new GroupBox(parent, name);
- else if (key == "Konsole") return new Konsole(parent, name);
- else if (key == "Label") return new Label(parent, name);
- else if (key == "LineEdit") return new LineEdit(parent, name);
- else if (key == "ListBox") return new ListBox(parent, name);
- else if (key == "PixmapLabel") return new PixmapLabel(parent, name);
- else if (key == "ProgressBar") return new ProgressBar(parent, name);
- else if (key == "RadioButton") return new RadioButton(parent, name);
- else if (key == "RichTextEditor") return new RichTextEditor(parent, name);
- else if (key == "ScriptObject") return new ScriptObject(parent, name);
- else if (key == "Slider") return new Slider(parent, name);
- else if (key == "SpinBoxInt") return new SpinBoxInt(parent, name);
- else if (key == "StatusBar") return new StatusBar(parent, name);
- else if (key == "SubDialog") return new SubDialog(parent, name);
- else if (key == "Table") return new Table(parent, name);
- else if (key == "TabWidget") return new TabWidget(parent, name);
- else if (key == "ToolBox") return new ToolBox(parent, name);
- else if (key == "TextBrowser") return new TextBrowser(parent, name);
- else if (key == "TextEdit") return new TextEdit(parent, name);
- else if (key == "Timer") return new Timer(parent, name);
- else if (key == "TreeWidget") return new TreeWidget(parent, name);
- else if (key == "Wizard") return new Wizard(parent, name);
- else if (key == "DatePicker") return new DatePicker(parent, name);
- else if (key == "PopupMenu") return new PopupMenu(parent, name);
- else if (key == "FontDialog") return new FontDialog(parent, name);
- else if (key == "AboutDialog") return new AboutDialog(parent, name);
+ if (key == "ButtonGroup") return new ButtonGroup(tqparent, name);
+ else if (key == "CheckBox") return new CheckBox(tqparent, name);
+ else if (key == "CloseButton") return new CloseButton(tqparent, name);
+ else if (key == "ComboBox") return new ComboBox(tqparent, name);
+ else if (key == "Dialog") return new Dialog(tqparent, name);
+ else if (key == "ExecButton") return new ExecButton(tqparent, name);
+ else if (key == "FileSelector") return new FileSelector(tqparent, name);
+ else if (key == "GroupBox") return new GroupBox(tqparent, name);
+ else if (key == "Konsole") return new Konsole(tqparent, name);
+ else if (key == "Label") return new Label(tqparent, name);
+ else if (key == "LineEdit") return new LineEdit(tqparent, name);
+ else if (key == "ListBox") return new ListBox(tqparent, name);
+ else if (key == "PixmapLabel") return new PixmapLabel(tqparent, name);
+ else if (key == "ProgressBar") return new ProgressBar(tqparent, name);
+ else if (key == "RadioButton") return new RadioButton(tqparent, name);
+ else if (key == "RichTextEditor") return new RichTextEditor(tqparent, name);
+ else if (key == "ScriptObject") return new ScriptObject(tqparent, name);
+ else if (key == "Slider") return new Slider(tqparent, name);
+ else if (key == "SpinBoxInt") return new SpinBoxInt(tqparent, name);
+ else if (key == "StatusBar") return new StatusBar(tqparent, name);
+ else if (key == "SubDialog") return new SubDialog(tqparent, name);
+ else if (key == "Table") return new Table(tqparent, name);
+ else if (key == "TabWidget") return new TabWidget(tqparent, name);
+ else if (key == "ToolBox") return new ToolBox(tqparent, name);
+ else if (key == "TextBrowser") return new TextBrowser(tqparent, name);
+ else if (key == "TextEdit") return new TextEdit(tqparent, name);
+ else if (key == "Timer") return new Timer(tqparent, name);
+ else if (key == "TreeWidget") return new TreeWidget(tqparent, name);
+ else if (key == "Wizard") return new Wizard(tqparent, name);
+ else if (key == "DatePicker") return new DatePicker(tqparent, name);
+ else if (key == "PopupMenu") return new PopupMenu(tqparent, name);
+ else if (key == "FontDialog") return new FontDialog(tqparent, name);
+ else if (key == "AboutDialog") return new AboutDialog(tqparent, name);
else return 0;
}
diff --git a/kommander/widgets/popupmenu.cpp b/kommander/widgets/popupmenu.cpp
index 48bb4474..e00ee485 100644
--- a/kommander/widgets/popupmenu.cpp
+++ b/kommander/widgets/popupmenu.cpp
@@ -32,8 +32,8 @@
#define INSERTSUBMENU 109
#define LAST_FUNCTION INSERTSUBMENU
-PopupMenu::PopupMenu(TQWidget *parent, const char *name)
- : TQLabel(parent, name), KommanderWidget(this)
+PopupMenu::PopupMenu(TQWidget *tqparent, const char *name)
+ : TQLabel(tqparent, name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -114,7 +114,7 @@ void PopupMenu::popup(int x, int y)
void PopupMenu::slotMenuItemActivated(int id)
{
TQString widget = m_associations[id];
- KommanderWidget::evalAssociatedText(TQString("#!kommander\n%1.execute(%2)").arg(widget).arg(id));
+ KommanderWidget::evalAssociatedText(TQString("#!kommander\n%1.execute(%2)").tqarg(widget).tqarg(id));
}
void PopupMenu::populate()
@@ -138,7 +138,7 @@ TQString PopupMenu::insertSubmenu(const TQString& title, const TQString &menuWid
bool PopupMenu::isFunctionSupported(int f)
{
- return f == DCOP::clear || f == DCOP::execute || f == DCOP::item || (f >= INSERTMENUITEM && f <= LAST_FUNCTION) || f == DCOP::count || f == DCOP::geometry;
+ return f == DCOP::clear || f == DCOP::execute || f == DCOP::item || (f >= INSERTMENUITEM && f <= LAST_FUNCTION) || f == DCOP::count || f == DCOP::tqgeometry;
}
TQString PopupMenu::handleDCOP(int function, const TQStringList& args)
@@ -223,13 +223,13 @@ TQString PopupMenu::handleDCOP(int function, const TQStringList& args)
case DCOP::item:
{
uint index = args[0].toInt();
- return index < m_params.count() ? m_params[index] : TQString::null;
+ return index < m_params.count() ? m_params[index] : TQString();
break;
}
case DCOP::count:
return TQString::number(m_menu->count());
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/popupmenu.h b/kommander/widgets/popupmenu.h
index dff28a86..9a0dc925 100644
--- a/kommander/widgets/popupmenu.h
+++ b/kommander/widgets/popupmenu.h
@@ -25,11 +25,12 @@ class KPopupMenu;
class PopupMenu : public TQLabel, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- PopupMenu(TQWidget *parent = 0, const char *name = 0);
+ PopupMenu(TQWidget *tqparent = 0, const char *name = 0);
~PopupMenu();
virtual bool isKommanderWidget() const;
diff --git a/kommander/widgets/progressbar.cpp b/kommander/widgets/progressbar.cpp
index 30d4f329..b010af91 100644
--- a/kommander/widgets/progressbar.cpp
+++ b/kommander/widgets/progressbar.cpp
@@ -36,7 +36,7 @@ enum Functions {
};
ProgressBar::ProgressBar(TQWidget *a_parent, const char *a_name)
- : KProgress(a_parent, a_name), KommanderWidget(this)
+ : KProgress(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -94,7 +94,7 @@ void ProgressBar::showEvent(TQShowEvent *e)
bool ProgressBar::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::geometry || (f > FirstFunction && f < LastFunction);
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || f == DCOP::setMaximum || f == DCOP::tqgeometry || (f > FirstFunction && f < LastFunction);
}
TQString ProgressBar::handleDCOP(int function, const TQStringList& args)
@@ -111,7 +111,7 @@ TQString ProgressBar::handleDCOP(int function, const TQStringList& args)
case DCOP::setMaximum:
setTotalSteps(args[0].toUInt());
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
@@ -123,7 +123,7 @@ TQString ProgressBar::handleDCOP(int function, const TQStringList& args)
color.setNamedColor(args[0]);
TQPalette p = this->palette();
p.setColor(TQPalette::Active, TQColorGroup::Highlight, color);
- this->setPalette( p, TRUE );
+ this->tqsetPalette( p, TRUE );
break;
}
case PB_setHightlightTextColor:
@@ -132,7 +132,7 @@ TQString ProgressBar::handleDCOP(int function, const TQStringList& args)
color.setNamedColor(args[0]);
TQPalette p = this->palette();
p.setColor(TQPalette::Active, TQColorGroup::HighlightedText, color);
- this->setPalette( p, TRUE );
+ this->tqsetPalette( p, TRUE );
break;
}
default:
diff --git a/kommander/widgets/progressbar.h b/kommander/widgets/progressbar.h
index ca5daf8c..182a2faa 100644
--- a/kommander/widgets/progressbar.h
+++ b/kommander/widgets/progressbar.h
@@ -33,10 +33,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT ProgressBar: public KProgress, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
ProgressBar(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/radiobutton.cpp b/kommander/widgets/radiobutton.cpp
index ba46248d..317263e4 100644
--- a/kommander/widgets/radiobutton.cpp
+++ b/kommander/widgets/radiobutton.cpp
@@ -28,7 +28,7 @@
#include "radiobutton.h"
RadioButton::RadioButton(TQWidget *a_parent, const char *a_name)
- : TQRadioButton(a_parent, a_name), KommanderWidget(this)
+ : TQRadioButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "unchecked";
@@ -101,7 +101,7 @@ void RadioButton::contextMenuEvent( TQContextMenuEvent * e )
bool RadioButton::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::setChecked || f == DCOP::checked || f == DCOP::geometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::setChecked || f == DCOP::checked || f == DCOP::tqgeometry || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
TQString RadioButton::handleDCOP(int function, const TQStringList& args)
@@ -117,7 +117,7 @@ TQString RadioButton::handleDCOP(int function, const TQStringList& args)
break;
case DCOP::checked:
return TQString::number(isOn());
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/radiobutton.h b/kommander/widgets/radiobutton.h
index e93a96af..328cb853 100644
--- a/kommander/widgets/radiobutton.h
+++ b/kommander/widgets/radiobutton.h
@@ -33,10 +33,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT RadioButton : public TQRadioButton, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
RadioButton(TQWidget *a_parent, const char *a_name);
~RadioButton();
diff --git a/kommander/widgets/richtexteditor.cpp b/kommander/widgets/richtexteditor.cpp
index 9e54f07c..e5de817b 100644
--- a/kommander/widgets/richtexteditor.cpp
+++ b/kommander/widgets/richtexteditor.cpp
@@ -43,7 +43,7 @@
#include "pixmaps/textright.xpm"
RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name)
- : TQWidget(a_parent, a_name), KommanderWidget((TQObject *)this)
+ : TQWidget(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
@@ -61,11 +61,11 @@ RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name)
m_textedit = new TQTextEdit(this, "editor");
m_textedit->setTextFormat(RichText);
- // layout the widgets
- TQVBoxLayout *layout = new TQVBoxLayout(this);
- layout->addWidget(m_toolbar);
- layout->addWidget(m_textedit);
- layout->setSpacing(1);
+ // tqlayout the widgets
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
+ tqlayout->addWidget(m_toolbar);
+ tqlayout->addWidget(m_textedit);
+ tqlayout->setSpacing(1);
// setup buttons
TQHBoxLayout *tbLayout = new TQHBoxLayout(m_toolbar);
@@ -106,7 +106,7 @@ RichTextEditor::RichTextEditor(TQWidget *a_parent, const char *a_name)
connect(m_alignGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(textAlign(int)));
connect(m_textedit, TQT_SIGNAL(currentFontChanged(const TQFont &)), this, TQT_SLOT(fontChanged(const TQFont &)));
- connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(alignmentChanged(int)));
+ connect(m_textedit, TQT_SIGNAL(currentAlignmentChanged(int)), this, TQT_SLOT(tqalignmentChanged(int)));
connect(m_textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(setTextChanged()));
@@ -180,13 +180,13 @@ void RichTextEditor::textItalic(bool a_isOn)
void RichTextEditor::textAlign(int a_id)
{
- TQToolButton *b = (TQToolButton *)m_alignGroup->find(a_id);
+ TQToolButton *b = (TQToolButton *)m_alignGroup->tqfind(a_id);
if(b == m_buttonTextLeft)
- m_textedit->setAlignment(Qt::AlignLeft);
+ m_textedit->tqsetAlignment(TQt::AlignLeft);
else if(b == m_buttonTextCenter)
- m_textedit->setAlignment(Qt::AlignCenter);
+ m_textedit->tqsetAlignment(TQt::AlignCenter);
else if(b == m_buttonTextRight)
- m_textedit->setAlignment(Qt::AlignRight);
+ m_textedit->tqsetAlignment(TQt::AlignRight);
}
void RichTextEditor::fontChanged(const TQFont &a_font)
@@ -196,13 +196,13 @@ void RichTextEditor::fontChanged(const TQFont &a_font)
m_buttonTextUnder->setOn(a_font.underline());
}
-void RichTextEditor::alignmentChanged(int a_alignment)
+void RichTextEditor::tqalignmentChanged(int a_tqalignment)
{
- if((a_alignment == AlignAuto) || (a_alignment & AlignLeft))
+ if((a_tqalignment == AlignAuto) || (a_tqalignment & AlignLeft))
m_buttonTextLeft->setOn(true);
- else if(a_alignment & AlignHCenter)
+ else if(a_tqalignment & AlignHCenter)
m_buttonTextCenter->setOn(true);
- else if(a_alignment & AlignRight)
+ else if(a_tqalignment & AlignRight)
m_buttonTextRight->setOn(true);
}
diff --git a/kommander/widgets/richtexteditor.h b/kommander/widgets/richtexteditor.h
index 17faf6b5..31347e96 100644
--- a/kommander/widgets/richtexteditor.h
+++ b/kommander/widgets/richtexteditor.h
@@ -37,10 +37,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT RichTextEditor : public TQWidget, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
RichTextEditor(TQWidget *, const char *);
virtual ~RichTextEditor();
@@ -62,7 +63,7 @@ public slots:
void textUnder(bool);
void textItalic(bool);
void fontChanged(const TQFont &);
- void alignmentChanged(int);
+ void tqalignmentChanged(int);
virtual void populate();
signals:
void widgetOpened();
diff --git a/kommander/widgets/scriptobject.cpp b/kommander/widgets/scriptobject.cpp
index 2824d81f..472bb98c 100644
--- a/kommander/widgets/scriptobject.cpp
+++ b/kommander/widgets/scriptobject.cpp
@@ -30,7 +30,7 @@
#include
ScriptObject::ScriptObject(TQWidget *a_parent, const char *a_name)
- : TQLabel(a_parent, a_name), KommanderWidget(this)
+ : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -93,7 +93,7 @@ void ScriptObject::populate()
TQString ScriptObject::executeProcess(bool blocking)
{
- int index = ( states().findIndex( currentState()) );
+ int index = ( states().tqfindIndex( currentState()) );
if (index == -1)
{
printError(i18n("Invalid state for associated text."));
@@ -169,7 +169,7 @@ TQString ScriptObject::handleDCOP(int function, const TQStringList& args)
setAssociatedText(args[0]);
break;
case DCOP::clear:
- setAssociatedText(TQString::null);
+ setAssociatedText(TQString());
break;
case DCOP::execute:
m_params = args;
@@ -178,7 +178,7 @@ TQString ScriptObject::handleDCOP(int function, const TQStringList& args)
case DCOP::item:
{
uint index = args[0].toInt();
- return index < m_params.count() ? m_params[index] : TQString::null;
+ return index < m_params.count() ? m_params[index] : TQString();
}
case DCOP::count:
return TQString::number(m_params.count());
diff --git a/kommander/widgets/scriptobject.h b/kommander/widgets/scriptobject.h
index 325903cc..8a50f97e 100644
--- a/kommander/widgets/scriptobject.h
+++ b/kommander/widgets/scriptobject.h
@@ -29,10 +29,11 @@
class KOMMANDER_EXPORT ScriptObject : public TQLabel, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
ScriptObject(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/slider.cpp b/kommander/widgets/slider.cpp
index b3bef6fc..b8068ede 100644
--- a/kommander/widgets/slider.cpp
+++ b/kommander/widgets/slider.cpp
@@ -23,7 +23,7 @@
#include "slider.h"
Slider::Slider(TQWidget * a_parent, const char *a_name)
- : TQSlider(a_parent, a_name), KommanderWidget((TQObject *) this)
+ : TQSlider(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/slider.h b/kommander/widgets/slider.h
index 1ed39a8b..e6324d50 100644
--- a/kommander/widgets/slider.h
+++ b/kommander/widgets/slider.h
@@ -29,9 +29,11 @@
class TQShowEvent;
class KOMMANDER_EXPORT Slider: public TQSlider, public KommanderWidget
{
- Q_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_OBJECT
+ TQ_OBJECT
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
Slider(TQWidget*, const char*);
virtual ~Slider();
diff --git a/kommander/widgets/spinboxint.cpp b/kommander/widgets/spinboxint.cpp
index a2b9af6a..cc264f34 100644
--- a/kommander/widgets/spinboxint.cpp
+++ b/kommander/widgets/spinboxint.cpp
@@ -28,7 +28,7 @@
#include "spinboxint.h"
SpinBoxInt::SpinBoxInt(TQWidget *a_parent, const char *a_name)
- : TQSpinBox(a_parent, a_name), KommanderWidget(this)
+ : TQSpinBox(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -101,7 +101,7 @@ void SpinBoxInt::focusInEvent( TQFocusEvent * e)
bool SpinBoxInt::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::setMaximum || f == DCOP::geometry|| f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::setMaximum || f == DCOP::tqgeometry|| f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor;
}
TQString SpinBoxInt::handleDCOP(int function, const TQStringList& args)
@@ -115,7 +115,7 @@ TQString SpinBoxInt::handleDCOP(int function, const TQStringList& args)
case DCOP::setMaximum:
setMaxValue(args[0].toUInt());
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/spinboxint.h b/kommander/widgets/spinboxint.h
index 214692fe..c92489c3 100644
--- a/kommander/widgets/spinboxint.h
+++ b/kommander/widgets/spinboxint.h
@@ -33,10 +33,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT SpinBoxInt : public TQSpinBox, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
SpinBoxInt(TQWidget *a_parent, const char *a_name);
~SpinBoxInt();
diff --git a/kommander/widgets/statusbar.cpp b/kommander/widgets/statusbar.cpp
index 59070884..3c5e76f5 100644
--- a/kommander/widgets/statusbar.cpp
+++ b/kommander/widgets/statusbar.cpp
@@ -27,14 +27,14 @@
#include "statusbar.h"
StatusBar::StatusBar(TQWidget *a_parent, const char *a_name)
- : KStatusBar(a_parent, a_name), KommanderWidget(this)
+ : KStatusBar(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
setStates(states);
setDisplayStates(states);
- insertItem(TQString::null, 0, 1);
- setItemAlignment(0, Qt::AlignLeft);
+ insertItem(TQString(), 0, 1);
+ setItemAlignment(0, TQt::AlignLeft);
}
StatusBar::~StatusBar()
diff --git a/kommander/widgets/statusbar.h b/kommander/widgets/statusbar.h
index 0971b1ce..616283fd 100644
--- a/kommander/widgets/statusbar.h
+++ b/kommander/widgets/statusbar.h
@@ -33,10 +33,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT StatusBar : public KStatusBar, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
StatusBar(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/subdialog.cpp b/kommander/widgets/subdialog.cpp
index 292ac541..47e4ec69 100644
--- a/kommander/widgets/subdialog.cpp
+++ b/kommander/widgets/subdialog.cpp
@@ -32,7 +32,7 @@
#include "subdialog.h"
SubDialog::SubDialog(TQWidget *a_parent, const char *a_name)
- : TQPushButton(a_parent, a_name), KommanderWidget(this), m_dialog(0)
+ : TQPushButton(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this)), m_dialog(0)
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/subdialog.h b/kommander/widgets/subdialog.h
index c61eda15..2e1120a3 100644
--- a/kommander/widgets/subdialog.h
+++ b/kommander/widgets/subdialog.h
@@ -34,11 +34,12 @@ class TQShowEvent;
class KOMMANDER_EXPORT SubDialog : public TQPushButton, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQString kmdrFile READ kmdrFile WRITE setKmdrFile)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQString kmdrFile READ kmdrFile WRITE setKmdrFile)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
SubDialog(TQWidget *a_parent, const char *a_name);
~SubDialog();
diff --git a/kommander/widgets/table.cpp b/kommander/widgets/table.cpp
index b7e2d68a..4056431e 100644
--- a/kommander/widgets/table.cpp
+++ b/kommander/widgets/table.cpp
@@ -48,7 +48,7 @@ enum Functions {
Table::Table(TQWidget *a_parent, const char *a_name)
- : TQTable(a_parent, a_name), KommanderWidget(this)
+ : TQTable(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -114,7 +114,7 @@ void Table::setWidgetText(const TQString&)
TQString Table::selectedArea()
{
TQTableSelection sel = selection(currentSelection());
- return TQString("%1,%2,%3,%4").arg(sel.topRow()).arg(sel.leftCol()).arg(sel.bottomRow()).arg(sel.rightCol());
+ return TQString("%1,%2,%3,%4").tqarg(sel.topRow()).tqarg(sel.leftCol()).tqarg(sel.bottomRow()).tqarg(sel.rightCol());
}
@@ -123,7 +123,7 @@ bool Table::isFunctionSupported(int f)
return f == DCOP::currentColumn || f == DCOP::currentRow || f == DCOP::insertColumn ||
f == DCOP::insertRow || f == DCOP::cellText || f == DCOP::setCellText || f == DCOP::setCellWidget || f == DCOP::cellWidget || f == DCOP::columnCount ||
f == DCOP::removeRow || f == DCOP::removeColumn || f == DCOP::setColumnCaption ||
- f == DCOP::setRowCaption || f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
+ f == DCOP::setRowCaption || f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f <= LastFunction);
}
void Table::setCellWidget(int row, int col, const TQString & _widgetName)
@@ -131,7 +131,7 @@ void Table::setCellWidget(int row, int col, const TQString & _widgetName)
KommanderWidget *w = widgetByName(_widgetName);
if (w)
{
- TQWidget *widget = static_cast(w->object());
+ TQWidget *widget = TQT_TQWIDGET(w->object());
if (TQTable::cellWidget(row, col) != widget)
{
setCurrentCell(-1, -1); //hack to not delete the cellwidget after clicking away to another cell.
@@ -167,7 +167,7 @@ void Table::setCellText(int row, int col, const TQString& text)
{
KommanderWidget *w = widgetByName(widget->name());
if (w)
- widget->reparent(parentDialog(), TQPoint(0,0));
+ widget->reparent(tqparentDialog(), TQPoint(0,0));
}
setText(row, col, text);
endEdit(row, col, false, false);
@@ -354,7 +354,7 @@ TQString Table::handleDCOP(int function, const TQStringList& args)
return "No row at index "+args[0];
break;
}
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/table.h b/kommander/widgets/table.h
index 1539597d..38cb9a33 100644
--- a/kommander/widgets/table.h
+++ b/kommander/widgets/table.h
@@ -31,11 +31,12 @@ class TQWidget;
class KOMMANDER_EXPORT Table : public TQTable, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_OVERRIDE(bool readOnly DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_OVERRIDE(bool readOnly DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
Table(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/tabwidget.cpp b/kommander/widgets/tabwidget.cpp
index 8ffc95b1..1574ba9e 100644
--- a/kommander/widgets/tabwidget.cpp
+++ b/kommander/widgets/tabwidget.cpp
@@ -44,7 +44,7 @@ enum Functions {
};
TabWidget::TabWidget(TQWidget *a_parent, const char *a_name, int a_flags)
- : TQTabWidget(a_parent, a_name, a_flags), KommanderWidget(this)
+ : TQTabWidget(a_parent, a_name, a_flags), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/tabwidget.h b/kommander/widgets/tabwidget.h
index 3bae4d0a..e848f402 100644
--- a/kommander/widgets/tabwidget.h
+++ b/kommander/widgets/tabwidget.h
@@ -28,10 +28,11 @@ class TQShowEvent;
class KOMMANDER_EXPORT TabWidget : public TQTabWidget, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
TabWidget(TQWidget *, const char *, int=0);
~TabWidget();
diff --git a/kommander/widgets/textbrowser.cpp b/kommander/widgets/textbrowser.cpp
index a2f9e744..f6b1330e 100644
--- a/kommander/widgets/textbrowser.cpp
+++ b/kommander/widgets/textbrowser.cpp
@@ -35,7 +35,7 @@ enum Functions {
};
TextBrowser::TextBrowser(TQWidget * a_parent, const char *a_name)
- : KTextBrowser(a_parent, a_name), KommanderWidget((TQObject *) this)
+ : KTextBrowser(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/textbrowser.h b/kommander/widgets/textbrowser.h
index 3a106fcf..27a5b1e2 100644
--- a/kommander/widgets/textbrowser.h
+++ b/kommander/widgets/textbrowser.h
@@ -30,9 +30,10 @@ class TQShowEvent;
class KOMMANDER_EXPORT TextBrowser: public KTextBrowser, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
TextBrowser(TQWidget*, const char*);
virtual ~TextBrowser();
diff --git a/kommander/widgets/textedit.cpp b/kommander/widgets/textedit.cpp
index 72f8c754..1ca2e167 100644
--- a/kommander/widgets/textedit.cpp
+++ b/kommander/widgets/textedit.cpp
@@ -28,7 +28,7 @@
#include
enum Functions {
- FirstFunction = 450, //CHANGE THIS NUMBER TO AN UNIQUE ONE!!!
+ FirstFunction = 450, //CHANGE THIS NUMBER TO AN UNITQUE ONE!!!
TE_setModified,
TE_selectText,
TE_paragraphs,
@@ -43,7 +43,7 @@ enum Functions {
};
TextEdit::TextEdit(TQWidget * a_parent, const char *a_name):KTextEdit(a_parent, a_name),
-KommanderWidget((TQObject *) this)
+KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -143,7 +143,7 @@ void TextEdit::contextMenuEvent( TQContextMenuEvent * e )
bool TextEdit::isFunctionSupported(int f)
{
- return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::setEditable || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction);
+ return f == DCOP::text || f == DCOP::setText || f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::setEditable || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || f == DCOP::isModified || (f >= FirstFunction && f <= LastFunction);
}
TQString TextEdit::handleDCOP(int function, const TQStringList& args)
@@ -200,8 +200,8 @@ TQString TextEdit::handleDCOP(int function, const TQStringList& args)
{
// int para = args[3].toInt();
// int idx = args[4].toInt();
-// return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx ));
- return TQString::number(TQTextEdit::find(args[0], args[1].toUInt(), false ));
+// return TQString::number(TQTextEdit::tqfind(args[0], args[1].toUInt(), false, args[2].toUInt(), para, idx ));
+ return TQString::number(TQTextEdit::tqfind(args[0], args[1].toUInt(), false ));
break;
}
case TE_VAsuperScript:
@@ -210,7 +210,7 @@ TQString TextEdit::handleDCOP(int function, const TQStringList& args)
case TE_VAnormalScript:
TQTextEdit::setVerticalAlignment(AlignNormal);
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/textedit.h b/kommander/widgets/textedit.h
index 3132e315..de040391 100644
--- a/kommander/widgets/textedit.h
+++ b/kommander/widgets/textedit.h
@@ -31,9 +31,11 @@
class TQShowEvent;
class KOMMANDER_EXPORT TextEdit: public KTextEdit, public KommanderWidget
{
- Q_OBJECT Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ Q_OBJECT
+ TQ_OBJECT
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
TextEdit(TQWidget *, const char *);
virtual ~TextEdit();
diff --git a/kommander/widgets/timer.cpp b/kommander/widgets/timer.cpp
index 5a7251f1..2bc934b0 100644
--- a/kommander/widgets/timer.cpp
+++ b/kommander/widgets/timer.cpp
@@ -38,7 +38,7 @@ enum Functions {
};
Timer::Timer(TQWidget *a_parent, const char *a_name)
- : TQLabel(a_parent, a_name), KommanderWidget(this)
+ : TQLabel(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/timer.h b/kommander/widgets/timer.h
index 095c7dac..6d14452d 100644
--- a/kommander/widgets/timer.h
+++ b/kommander/widgets/timer.h
@@ -27,12 +27,13 @@ class TQTimer;
class KOMMANDER_EXPORT Timer : public TQLabel, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(int interval READ interval WRITE setInterval)
- Q_PROPERTY(bool singleShot READ singleShot WRITE setSingleShot)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(int interval READ interval WRITE setInterval)
+ TQ_PROPERTY(bool singleShot READ singleShot WRITE setSingleShot)
public:
Timer(TQWidget *a_parent, const char *a_name);
diff --git a/kommander/widgets/toolbox.cpp b/kommander/widgets/toolbox.cpp
index a6340098..b2b57748 100644
--- a/kommander/widgets/toolbox.cpp
+++ b/kommander/widgets/toolbox.cpp
@@ -27,8 +27,8 @@
#define FIRST_FUNCTION ADDWIDGET
#define LAST_FUNCTION INDEXOF
-ToolBox::ToolBox(TQWidget *parent, const char *name)
- : TQToolBox(parent, name), KommanderWidget(this)
+ToolBox::ToolBox(TQWidget *tqparent, const char *name)
+ : TQToolBox(tqparent, name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -121,7 +121,7 @@ void ToolBox::contextMenuEvent( TQContextMenuEvent * e )
bool ToolBox::isFunctionSupported(int f)
{
- return f == DCOP::count || f == DCOP::geometry || (f >= FIRST_FUNCTION && f <= LAST_FUNCTION) ;
+ return f == DCOP::count || f == DCOP::tqgeometry || (f >= FIRST_FUNCTION && f <= LAST_FUNCTION) ;
}
TQString ToolBox::handleDCOP(int function, const TQStringList& args)
@@ -176,7 +176,7 @@ TQString ToolBox::handleDCOP(int function, const TQStringList& args)
}
case DCOP::count:
return TQString::number(count());
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/toolbox.h b/kommander/widgets/toolbox.h
index 12761df0..ab5375b0 100644
--- a/kommander/widgets/toolbox.h
+++ b/kommander/widgets/toolbox.h
@@ -21,11 +21,12 @@
class ToolBox : public TQToolBox, public KommanderWidget
{
Q_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- ToolBox(TQWidget *parent = 0, const char *name = 0);
+ ToolBox(TQWidget *tqparent = 0, const char *name = 0);
~ToolBox();
diff --git a/kommander/widgets/treewidget.cpp b/kommander/widgets/treewidget.cpp
index ef3b7e65..e04fe41d 100644
--- a/kommander/widgets/treewidget.cpp
+++ b/kommander/widgets/treewidget.cpp
@@ -55,7 +55,7 @@ enum Functions {
};
TreeWidget::TreeWidget(TQWidget *a_parent, const char *a_name)
- : KListView(a_parent, a_name), KommanderWidget(this)
+ : KListView(a_parent, a_name), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
@@ -95,7 +95,7 @@ void TreeWidget::addItemFromString(const TQString& s)
TQStringList elements = TQStringList::split(m_pathSeparator, s, true);
if (elements.count() > 1)
setRootIsDecorated(true);
- TQListViewItem* parent = 0;
+ TQListViewItem* tqparent = 0;
if (m_lastPath.size() < elements.count())
m_lastPath.resize(elements.count());
uint i = 0;
@@ -103,13 +103,13 @@ void TreeWidget::addItemFromString(const TQString& s)
{
if (m_lastPath[i] && m_lastPath[i]->text(0) == elements[i])
{
- parent = m_lastPath[i];
+ tqparent = m_lastPath[i];
i++;
continue;
}
else
{
- TQListViewItem* item = (i>0) ? parent->firstChild() : firstChild();
+ TQListViewItem* item = (i>0) ? tqparent->firstChild() : firstChild();
while (item)
{
if (item->text(0) == *it)
@@ -117,19 +117,19 @@ void TreeWidget::addItemFromString(const TQString& s)
item = item->nextSibling();
}
if (item)
- parent = item;
+ tqparent = item;
else
- parent = itemFromString(parent, *it);
- m_lastPath.insert(i, parent);
+ tqparent = itemFromString(tqparent, *it);
+ m_lastPath.insert(i, tqparent);
i++;
}
}
}
-TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQString& s)
+TQListViewItem* TreeWidget::itemFromString(TQListViewItem* tqparent, const TQString& s)
{
TQStringList elements;
- if (s.contains("\t"))
+ if (s.tqcontains("\t"))
elements = TQStringList::split("\t", s, true);
else
elements = TQStringList::split("\\t", s, true);
@@ -137,8 +137,8 @@ TQListViewItem* TreeWidget::itemFromString(TQListViewItem* parent, const TQStrin
if (cols >= columns())
cols = columns();
TQListViewItem* item;
- if (parent)
- item = new TQListViewItem(parent);
+ if (tqparent)
+ item = new TQListViewItem(tqparent);
else
item = new TQListViewItem(this);
int i = 0;
@@ -208,8 +208,8 @@ TQString TreeWidget::itemsText()
if (path.isEmpty())
items.append(itemText(it.current()));
else
- items.append(TQString("%1%2%3").arg(path).arg(m_pathSeparator)
- .arg(itemText(it.current())));
+ items.append(TQString("%1%2%3").tqarg(path).tqarg(m_pathSeparator)
+ .tqarg(itemText(it.current())));
++it;
}
return items.join("\n");
@@ -219,14 +219,14 @@ TQString TreeWidget::itemPath(TQListViewItem* item) const
{
if (!item)
return TQString();
- item = item->parent();
+ item = item->tqparent();
if (!item)
return TQString();
TQStringList path;
while (item)
{
path.prepend(item->text(0));
- item = item->parent();
+ item = item->tqparent();
}
return path.join(m_pathSeparator);
}
@@ -295,11 +295,11 @@ void TreeWidget::contextMenuEvent( TQContextMenuEvent * e )
void TreeWidget::setColAlign(int column, const TQString& align)
{
if (align.lower() == "left")
- setColumnAlignment (column, Qt::AlignLeft);
+ setColumnAlignment (column, TQt::AlignLeft);
else if (align.lower() == "right")
- setColumnAlignment (column, Qt::AlignRight);
+ setColumnAlignment (column, TQt::AlignRight);
else if (align.lower() == "center")
- setColumnAlignment (column, Qt::AlignCenter);
+ setColumnAlignment (column, TQt::AlignCenter);
}
bool TreeWidget::isFunctionSupported(int f)
@@ -307,7 +307,7 @@ bool TreeWidget::isFunctionSupported(int f)
return f == DCOP::insertItem || f == DCOP::text || f == DCOP::setText || f == DCOP::insertItems ||
f == DCOP::selection || f == DCOP::setSelection || f == DCOP::clear || f == DCOP::removeItem ||
f == DCOP::currentItem || f == DCOP::setCurrentItem || f == DCOP::findItem || f == DCOP::item ||
- f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::geometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION);
+ f == DCOP::itemPath || f == DCOP::itemDepth || f == DCOP::setPixmap || f == DCOP::setColumnCaption || f == DCOP::removeColumn || f == DCOP::columnCount || f == DCOP::tqgeometry || f == DCOP::hasFocus || f == DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f > FirstFunction && f < LastFunction) || (f >= TW_FUNCTION && f <= TW_LAST_FUNCTION);
}
TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
@@ -342,7 +342,7 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
{
if (it.current()->isSelected())
{
- selection.append(TQString("%1\n").arg(itemToIndexSafe(it.current())));
+ selection.append(TQString("%1\n").tqarg(itemToIndexSafe(it.current())));
}
++it;
}
@@ -368,14 +368,14 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
}
case DCOP::setSelection:
if (selectionModeExt() == Single || selectionModeExt() == NoSelection)
- setCurrentItem(findItem(args[0], 0));
+ setCurrentItem(tqfindItem(args[0], 0));
else
{
clearSelection();
TQStringList items(TQStringList::split("\n", args[0]));
for (TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it)
{
- TQListViewItem* item = findItem(*it, 0);
+ TQListViewItem* item = tqfindItem(*it, 0);
if (item)
{
item->setSelected(true);
@@ -405,17 +405,17 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
break;
case DCOP::findItem:
if (!args[1])
- return TQString::number(itemToIndexSafe(findItem(args[0], 0)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], 0)));
else
{
if (args[2].toUInt() && args[3].toUInt())
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt())));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt())));
else if (args[2].toUInt())
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::CaseSensitive | Qt::Contains)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::CaseSensitive | TQt::Contains)));
else if (args[3].toUInt())
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::ExactMatch)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::ExactMatch)));
else
- return TQString::number(itemToIndexSafe(findItem(args[0], args[1].toInt(), Qt::Contains)));
+ return TQString::number(itemToIndexSafe(tqfindItem(args[0], args[1].toInt(), TQt::Contains)));
}
break;
case DCOP::item:
@@ -494,7 +494,7 @@ TQString TreeWidget::handleDCOP(int function, const TQStringList& args)
case TW_childCount:
return TQString::number(childCount());
break;
- case DCOP::geometry:
+ case DCOP::tqgeometry:
{
TQString geo = TQString::number(this->x())+" "+TQString::number(this->y())+" "+TQString::number(this->width())+" "+TQString::number(this->height());
return geo;
diff --git a/kommander/widgets/treewidget.h b/kommander/widgets/treewidget.h
index 3988c9a8..df7440b1 100644
--- a/kommander/widgets/treewidget.h
+++ b/kommander/widgets/treewidget.h
@@ -35,11 +35,12 @@ class TQShowEvent;
class KOMMANDER_EXPORT TreeWidget : public KListView, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(TQString pathSeparator READ pathSeparator WRITE setPathSeparator)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString pathSeparator READ pathSeparator WRITE setPathSeparator)
public:
TreeWidget(TQWidget *a_parent, const char *a_name);
@@ -75,7 +76,7 @@ protected:
TQString itemPath(TQListViewItem* item) const;
private:
void addItemFromString(const TQString& s);
- TQListViewItem* itemFromString(TQListViewItem* parent, const TQString& s);
+ TQListViewItem* itemFromString(TQListViewItem* tqparent, const TQString& s);
TQPtrVector m_lastPath;
TQString m_pathSeparator;
int addColumnTree(const TQString & label, int width = -1 );
diff --git a/kommander/widgets/wizard.cpp b/kommander/widgets/wizard.cpp
index 8cc16933..b5fabc20 100644
--- a/kommander/widgets/wizard.cpp
+++ b/kommander/widgets/wizard.cpp
@@ -32,7 +32,7 @@
Wizard::Wizard(TQWidget *a_parent, const char *a_name, bool a_modal, int a_flags)
- : TQWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(this)
+ : TQWizard(a_parent, a_name, a_modal, a_flags), KommanderWidget(TQT_TQOBJECT(this))
{
TQStringList states;
states << "default";
diff --git a/kommander/widgets/wizard.h b/kommander/widgets/wizard.h
index 6852fc77..5104af9a 100644
--- a/kommander/widgets/wizard.h
+++ b/kommander/widgets/wizard.h
@@ -30,13 +30,14 @@ class TQShowEvent;
class KOMMANDER_EXPORT Wizard : public TQWizard, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
- Q_PROPERTY(HelpAction helpAction READ helpAction WRITE setHelpAction)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(HelpAction helpAction READ helpAction WRITE setHelpAction)
Q_ENUMS(HelpAction)
- Q_PROPERTY(TQString helpActionText READ helpActionText WRITE setHelpActionText)
+ TQ_PROPERTY(TQString helpActionText READ helpActionText WRITE setHelpActionText)
public:
Wizard(TQWidget *, const char *, bool = true, int = 0);
diff --git a/kommander/working/plugintemplate/plugin.cpp b/kommander/working/plugintemplate/plugin.cpp
index b6e1a0a0..bad414aa 100644
--- a/kommander/working/plugintemplate/plugin.cpp
+++ b/kommander/working/plugintemplate/plugin.cpp
@@ -11,7 +11,7 @@ class %{APPNAME}Plugin : public KommanderPlugin
{
public:
%{APPNAME}Plugin();
- virtual TQWidget *create( const TQString &className, TQWidget *parent = 0, const char *name = 0);
+ virtual TQWidget *create( const TQString &className, TQWidget *tqparent = 0, const char *name = 0);
};
%{APPNAME}Plugin::%{APPNAME}Plugin()
@@ -19,10 +19,10 @@ public:
addWidget( "%{APPNAME}", "Custom", i18n("Kommander %{APPNAME} plugin."), new TQIconSet(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium)) );
}
-TQWidget *%{APPNAME}Plugin::create( const TQString &className, TQWidget *parent, const char *name)
+TQWidget *%{APPNAME}Plugin::create( const TQString &className, TQWidget *tqparent, const char *name)
{
if (className == "%{APPNAME}")
- return new %{APPNAME}(parent, name);
+ return new %{APPNAME}(tqparent, name);
return 0;
}
diff --git a/kommander/working/plugintemplate/src-Makefile.am b/kommander/working/plugintemplate/src-Makefile.am
index eb7dbe9d..a7b2ee01 100644
--- a/kommander/working/plugintemplate/src-Makefile.am
+++ b/kommander/working/plugintemplate/src-Makefile.am
@@ -13,7 +13,7 @@ libkmdr%{APPNAMELC}_la_SOURCES = %{APPNAMELC}.cpp %{APPNAMELC}plugin.cpp
# these are the headers for your project that won't be installed
-# let automoc handle all of the meta source files (moc)
+# let autotqmoc handle all of the meta source files (tqmoc)
METASOURCES = AUTO
AM_CXXFLAGS= -DHAVE_SSTREAM
AM_CPPFLAGS= $(all_includes)
diff --git a/kommander/working/plugintemplate/widget.cpp b/kommander/working/plugintemplate/widget.cpp
index 2378e87a..7efd8526 100644
--- a/kommander/working/plugintemplate/widget.cpp
+++ b/kommander/working/plugintemplate/widget.cpp
@@ -10,14 +10,14 @@
enum Functions {
- FirstFunction = 11001, //CHANGE THIS NUMBE TO AN UNIQUE ONE!!!
+ FirstFunction = 11001, //CHANGE THIS NUMBE TO AN UNITQUE ONE!!!
Function1,
Function2,
LastFunction
};
-%{APPNAME}::%{APPNAME}(TQWidget *parent, const char *name)
- : TQWidget(parent, name), KommanderWidget(this)
+%{APPNAME}::%{APPNAME}(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name), KommanderWidget(this)
{
TQStringList states;
states << "default";
@@ -31,7 +31,7 @@ enum Functions {
setPixmap(KGlobal::iconLoader()->loadIcon("%{APPNAMELC}", KIcon::NoGroup, KIcon::SizeMedium));
setFrameStyle(TQFrame::Box | TQFrame::Plain);
setLineWidth(1);
- setAlignment(Qt::AlignCenter);
+ tqsetAlignment(TQt::AlignCenter);
}
else
setHidden(true);
@@ -110,7 +110,7 @@ TQString %{APPNAME}::handleDCOP(int function, const TQStringList& args)
default:
return KommanderWidget::handleDCOP(function, args);
}
- return TQString::null;
+ return TQString();
}
#include "%{APPNAMELC}.moc"
diff --git a/kommander/working/plugintemplate/widget.h b/kommander/working/plugintemplate/widget.h
index 22638875..ab6f042f 100644
--- a/kommander/working/plugintemplate/widget.h
+++ b/kommander/working/plugintemplate/widget.h
@@ -15,13 +15,14 @@ class TQStringList;
class %{APPNAME}: public TQWidget, public KommanderWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
- Q_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
- Q_PROPERTY(bool KommanderWidget READ isKommanderWidget)
+ TQ_PROPERTY(TQString populationText READ populationText WRITE setPopulationText DESIGNABLE false)
+ TQ_PROPERTY(TQStringList associations READ associatedText WRITE setAssociatedText DESIGNABLE false)
+ TQ_PROPERTY(bool KommanderWidget READ isKommanderWidget)
public:
- %{APPNAME}(TQWidget *parent, const char* name);
+ %{APPNAME}(TQWidget *tqparent, const char* name);
~%{APPNAME}();
virtual bool isKommanderWidget() const;
--
cgit v1.2.3