diff options
Diffstat (limited to 'quanta/dialogs')
44 files changed, 767 insertions, 767 deletions
diff --git a/quanta/dialogs/actionconfigdialog.cpp b/quanta/dialogs/actionconfigdialog.cpp index 9a4cfb3d..a66f7499 100644 --- a/quanta/dialogs/actionconfigdialog.cpp +++ b/quanta/dialogs/actionconfigdialog.cpp @@ -13,16 +13,16 @@ ***************************************************************************/ //qt includes -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qdom.h> -#include <qfileinfo.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qmultilineedit.h> -#include <qradiobutton.h> -#include <qtabwidget.h> -#include <qregexp.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqdom.h> +#include <tqfileinfo.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqmultilineedit.h> +#include <tqradiobutton.h> +#include <tqtabwidget.h> +#include <tqregexp.h> //kde includes #include <kapplication.h> @@ -50,7 +50,7 @@ #include "tagaction.h" #include "toolbartabwidget.h" -ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const QString& defaultAction ) +ActionConfigDialog::ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, KMainWindow* parent, const char* name, bool modal, WFlags fl, const TQString& defaultAction ) :ActionConfigDialogS( parent, name, modal, fl ) { m_mainWindow = parent; @@ -63,28 +63,28 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K currentAction = 0L; m_toolbarItem = 0L; - connect(actionTreeView, SIGNAL(contextMenu(KListView *,QListViewItem *,const QPoint &)), - SLOT(slotContextMenu(KListView *,QListViewItem *,const QPoint &))); - connect(actionTreeView, SIGNAL(selectionChanged(QListViewItem *)), - SLOT(slotSelectionChanged(QListViewItem *))); - connect(shortcutKeyButton, SIGNAL(capturedShortcut(const KShortcut &)), - SLOT(slotShortcutCaptured(const KShortcut &))); - connect(scriptPath, SIGNAL(activated(const QString&)), - SLOT(slotTextChanged(const QString&))); - connect(this, SIGNAL(addToolbar()), m_mainWindow, SLOT(slotAddToolbar())); - connect(this, SIGNAL(removeToolbar(const QString&)), m_mainWindow, SLOT(slotRemoveToolbar(const QString&))); - connect(this, SIGNAL(deleteUserAction(KAction*)), m_mainWindow, SLOT(slotDeleteAction(KAction*))); - connect(this, SIGNAL(configureToolbars(const QString&)), m_mainWindow, SLOT(slotConfigureToolbars(const QString&))); + connect(actionTreeView, TQT_SIGNAL(contextMenu(KListView *,TQListViewItem *,const TQPoint &)), + TQT_SLOT(slotContextMenu(KListView *,TQListViewItem *,const TQPoint &))); + connect(actionTreeView, TQT_SIGNAL(selectionChanged(TQListViewItem *)), + TQT_SLOT(slotSelectionChanged(TQListViewItem *))); + connect(shortcutKeyButton, TQT_SIGNAL(capturedShortcut(const KShortcut &)), + TQT_SLOT(slotShortcutCaptured(const KShortcut &))); + connect(scriptPath, TQT_SIGNAL(activated(const TQString&)), + TQT_SLOT(slotTextChanged(const TQString&))); + connect(this, TQT_SIGNAL(addToolbar()), m_mainWindow, TQT_SLOT(slotAddToolbar())); + connect(this, TQT_SIGNAL(removeToolbar(const TQString&)), m_mainWindow, TQT_SLOT(slotRemoveToolbar(const TQString&))); + connect(this, TQT_SIGNAL(deleteUserAction(KAction*)), m_mainWindow, TQT_SLOT(slotDeleteAction(KAction*))); + connect(this, TQT_SIGNAL(configureToolbars(const TQString&)), m_mainWindow, TQT_SLOT(slotConfigureToolbars(const TQString&))); //fill up the tree view with the toolbars and actions actionTreeView->setSorting(-1); allActionsItem = new KListViewItem(actionTreeView, i18n("All")); actionTreeView->insertItem(allActionsItem); - QListViewItem *item, *oldItem = allActionsItem; + TQListViewItem *item, *oldItem = allActionsItem; KAction *action; - QString toolbarName; - QString toolbarId; + TQString toolbarName; + TQString toolbarId; ToolbarTabWidget *tb = ToolbarTabWidget::ref(); - QRegExp r("\\&(?!\\&)"); + TQRegExp r("\\&(?!\\&)"); KActionCollection *ac = m_mainWindow->actionCollection(); for (int i = 0; i < tb->count(); i++) { @@ -94,11 +94,11 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K actionTreeView->insertItem(item); toolbarId = tb->id(i); - QListViewItem *oldActionItem = 0L; + TQListViewItem *oldActionItem = 0L; ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; if (p_toolbar) { - QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); while (!node.isNull()) { if (node.nodeName() == "Action") @@ -122,7 +122,7 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K actionTreeView->setCurrentItem(item->firstChild()); } else { - QListViewItem *actionItem = item->firstChild(); + TQListViewItem *actionItem = item->firstChild(); while (actionItem && actionItem->depth() > 0) { if (actionItem->text(0) == defaultAction || actionItem->text(0) == defaultAction + "...") @@ -148,9 +148,9 @@ ActionConfigDialog::ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, K allActionsItem->sortChildItems(0, true); treeMenu = new KPopupMenu(actionTreeView); - treeMenu->insertItem(i18n("&Add New Toolbar"), this, SLOT(slotAddToolbar())); - treeMenu->insertItem(i18n("&Remove Toolbar"), this, SLOT(slotRemoveToolbar())); - treeMenu->insertItem(i18n("&Edit Toolbar"), this, SLOT(slotEditToolbar())); + treeMenu->insertItem(i18n("&Add New Toolbar"), this, TQT_SLOT(slotAddToolbar())); + treeMenu->insertItem(i18n("&Remove Toolbar"), this, TQT_SLOT(slotRemoveToolbar())); + treeMenu->insertItem(i18n("&Edit Toolbar"), this, TQT_SLOT(slotEditToolbar())); globalShortcuts = KGlobal::config()->entryMap( "Global Shortcuts" ); } @@ -162,8 +162,8 @@ ActionConfigDialog::~ActionConfigDialog() void ActionConfigDialog::slotAddToolbar() { emit addToolbar(); - QString toolbarName; - QListViewItem *item; + TQString toolbarName; + TQListViewItem *item; ToolbarTabWidget *tb = ToolbarTabWidget::ref(); for (int i = 0; i < tb->count(); i++) { @@ -181,8 +181,8 @@ void ActionConfigDialog::slotAddToolbar() void ActionConfigDialog::slotRemoveToolbar() { - QListViewItem *item = actionTreeView->currentItem(); - QString s = item->text(0); + TQListViewItem *item = actionTreeView->currentItem(); + TQString s = item->text(0); if (item->parent()) { item = item->parent(); @@ -190,29 +190,29 @@ void ActionConfigDialog::slotRemoveToolbar() } if (s != i18n("All")) { - if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").arg(s),QString::null,KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, i18n("Do you really want to remove the \"%1\" toolbar?").arg(s),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue ) { m_toolbarItem = item; - connect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), SLOT(slotToolbarRemoved(const QString&))); + connect(m_mainWindow, TQT_SIGNAL(toolbarRemoved(const TQString&)), TQT_SLOT(slotToolbarRemoved(const TQString&))); emit removeToolbar(s.lower()); } } } -void ActionConfigDialog::slotToolbarRemoved(const QString &/*name*/) +void ActionConfigDialog::slotToolbarRemoved(const TQString &/*name*/) { actionTreeView->setCurrentItem(allActionsItem); delete m_toolbarItem; m_toolbarItem = 0L; - disconnect(m_mainWindow, SIGNAL(toolbarRemoved(const QString&)), this, SLOT(slotToolbarRemoved(const QString&))); + disconnect(m_mainWindow, TQT_SIGNAL(toolbarRemoved(const TQString&)), this, TQT_SLOT(slotToolbarRemoved(const TQString&))); } void ActionConfigDialog::slotEditToolbar() { - QString toolbarName; - QString toolbarId; - QListViewItem *oldItem; - QListViewItem *item = actionTreeView->currentItem(); + TQString toolbarName; + TQString toolbarId; + TQListViewItem *oldItem; + TQListViewItem *item = actionTreeView->currentItem(); if (item->parent()) item = item->parent(); toolbarName = item->text(0); @@ -235,7 +235,7 @@ void ActionConfigDialog::slotEditToolbar() item = new KListViewItem(actionTreeView, oldItem, toolbarName); item->setOpen(oldItem->isOpen()); delete oldItem; - QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); while (!node.isNull()) { if (node.nodeName() == "Action") @@ -243,7 +243,7 @@ void ActionConfigDialog::slotEditToolbar() action = ac->action(node.toElement().attribute("name")); if (action) { - oldItem = new KListViewItem(item, oldItem, action->text().replace(QRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); + oldItem = new KListViewItem(item, oldItem, action->text().replace(TQRegExp("\\&(?!\\&)"),""), action->shortcut().toString(), action->name()); oldItem->setPixmap(0, SmallIcon(action->icon())); } } @@ -256,17 +256,17 @@ void ActionConfigDialog::slotEditToolbar() } } -void ActionConfigDialog::slotContextMenu(KListView *,QListViewItem *,const QPoint &point) +void ActionConfigDialog::slotContextMenu(KListView *,TQListViewItem *,const TQPoint &point) { treeMenu->popup(point); } -void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) +void ActionConfigDialog::slotSelectionChanged(TQListViewItem *item) { if (currentAction && currentAction->inherits("TagAction")) { if ( buttonApply->isEnabled() && - KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) + KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) { saveCurrentAction(); } @@ -282,7 +282,7 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) for (uint i = 0; i < acCount; i++) { KAction *a = ac->action(i); - QString actionName = a->name(); + TQString actionName = a->name(); if (a && actionName == item->text(2) && a->inherits("TagAction")) { action = static_cast<TagAction*>(a); @@ -300,20 +300,20 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) if (action) { currentAction = action; - QDomElement el = action->data(); + TQDomElement el = action->data(); if ( el.hasAttribute("icon") ) { - QString s = el.attribute("icon"); - if (!QFileInfo(s).exists()) - s = QFileInfo(s).fileName(); + TQString s = el.attribute("icon"); + if (!TQFileInfo(s).exists()) + s = TQFileInfo(s).fileName(); actionIcon->setIcon(s); } - QString actionText = el.attribute("text"); - actionText.replace(QRegExp("\\&(?!\\&)"),""); + TQString actionText = el.attribute("text"); + actionText.replace(TQRegExp("\\&(?!\\&)"),""); lineText->setText(actionText); lineToolTip->setText( el.attribute("tooltip") ); selectedShortcut = action->shortcut(); - QString shortcutText = action->shortcut().toString(); + TQString shortcutText = action->shortcut().toString(); if (shortcutText.isEmpty()) { noShortcut->setChecked(true); @@ -332,12 +332,12 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) ToolbarTabWidget *tb = ToolbarTabWidget::ref(); for (int i = 0; i < tb->count(); i++) { - QString toolbarName = tb->label(i); - QString toolbarId = tb->id(i); + TQString toolbarName = tb->label(i); + TQString toolbarId = tb->id(i); ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; if (p_toolbar) { - QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); while (!node.isNull()) { if (node.nodeName() == "Action" && @@ -367,10 +367,10 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) errorBox->setCurrentItem(5); textEdit->clear(); //set the detailed settings according to the type of the action - QString type = el.attribute("type", "tag"); + TQString type = el.attribute("type", "tag"); if (type == "tag") { - QDomElement eltag = el.namedItem("tag").toElement(); + TQDomElement eltag = el.namedItem("tag").toElement(); lineTag->setText( eltag.text() ); useActionDialog->setChecked(eltag.attribute("useDialog","false") == "true"); eltag = el.namedItem("xtag").toElement(); @@ -380,10 +380,10 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) } else if (type == "script") { - QDomElement elScript = el.namedItem("script").toElement(); + TQDomElement elScript = el.namedItem("script").toElement(); scriptPath->setText( elScript.text() ); - QString s; + TQString s; s = elScript.attribute("input","none"); if (s == "current") { @@ -465,12 +465,12 @@ void ActionConfigDialog::slotSelectionChanged(QListViewItem *item) void ActionConfigDialog::saveCurrentAction() { static_cast<TagAction *>(currentAction)->setModified(true); - QString s; - QDomElement el = static_cast<TagAction *>(currentAction)->data(); + TQString s; + TQDomElement el = static_cast<TagAction *>(currentAction)->data(); s = actionIcon->icon(); el.setAttribute("icon", s); currentAction->setIcon(s); - QString oldText = el.attribute("text"); + TQString oldText = el.attribute("text"); s = lineText->text(); s.replace('&', "&&"); el.setAttribute("text", s); @@ -491,8 +491,8 @@ void ActionConfigDialog::saveCurrentAction() //update the tree view - QListViewItem *listItem; - QListViewItemIterator it(actionTreeView); + TQListViewItem *listItem; + TQListViewItemIterator it(actionTreeView); while (it.current()) { listItem = it.current(); @@ -506,7 +506,7 @@ void ActionConfigDialog::saveCurrentAction() } //remove all the detailed settings - QDomElement item = el.namedItem("tag").toElement(); + TQDomElement item = el.namedItem("tag").toElement(); if ( !item.isNull() ) el.removeChild(item); item = el.namedItem("tag").toElement(); @@ -522,7 +522,7 @@ void ActionConfigDialog::saveCurrentAction() if ( !item.isNull() ) el.removeChild(item); //add the new detailed settings - QDomDocument document = QDomDocument(); + TQDomDocument document = TQDomDocument(); int type = typeCombo->currentItem(); switch (type) { @@ -611,13 +611,13 @@ void ActionConfigDialog::saveCurrentAction() ToolbarTabWidget *tb = ToolbarTabWidget::ref(); for (int i = 0; i < tb->count(); i++) { - QString toolbarName = tb->label(i); - QString toolbarId = tb->id(i); + TQString toolbarName = tb->label(i); + TQString toolbarId = tb->id(i); ToolbarEntry *p_toolbar = m_toolbarList[toolbarId]; bool isOnToolbar = false; if (p_toolbar) { - QDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); + TQDomNode node = p_toolbar->guiClient->domDocument().firstChild().firstChild().firstChild(); bool placeOnToolbar = toolbarListBox->findItem(toolbarName, Qt::ExactMatch); while (!node.isNull()) { @@ -631,7 +631,7 @@ void ActionConfigDialog::saveCurrentAction() currentAction->unplug(tb->page(i)); currentAction->unplug(p_toolbar->menu); node.parentNode().removeChild(node); - QListViewItemIterator iter(actionTreeView); + TQListViewItemIterator iter(actionTreeView); while (iter.current()) { listItem = iter.current(); @@ -661,7 +661,7 @@ void ActionConfigDialog::saveCurrentAction() listItem = actionTreeView->findItem(toolbarName, 0); if (listItem) { - QListViewItem *after = listItem->firstChild(); + TQListViewItem *after = listItem->firstChild(); while ( after && (!after->nextSibling() || (after->nextSibling() && after->nextSibling()->depth()!=0 ) )) { if (after->text(2) == currentAction->name()) @@ -681,7 +681,7 @@ void ActionConfigDialog::saveCurrentAction() KXMLGUIFactory::saveConfigFile(p_toolbar->guiClient->domDocument(), p_toolbar->guiClient->xmlFile(), p_toolbar->guiClient->instance()); } - QWidget *toolBar = tb->page(i); + TQWidget *toolBar = tb->page(i); if (toolBar->minimumSizeHint().height() > 20) { toolBar->adjustSize(); @@ -696,23 +696,23 @@ void ActionConfigDialog::saveCurrentAction() void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) { - QString shortcutText = shortcut.toString(); - QString shortcutText2; + TQString shortcutText = shortcut.toString(); + TQString shortcutText2; int pos = shortcutText.find(';'); if (pos != -1) { shortcutText2 = shortcutText.mid(pos + 1); shortcutText = shortcutText.left(pos); } - QString s = shortcutText; + TQString s = shortcutText; s.replace('+', "\\+"); - QRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";"); + TQRegExp shortcutRx("\\(" + s + "\\)|" + s + "$|" + s + ";"); s = shortcutText2; s.replace('+', "\\+"); - QRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";"); - QString global; + TQRegExp shortcutRx2("\\(" + s + "\\)|" + s + "$|" + s + ";"); + TQString global; //check for conflicting global shortcuts - QMap<QString, QString>::Iterator it; + TQMap<TQString, TQString>::Iterator it; for ( it = globalShortcuts.begin(); it != globalShortcuts.end(); ++it ) { if (it.data().contains(shortcutRx)) @@ -730,8 +730,8 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) if (global.isEmpty()) { - QPtrList<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients(); - for( QPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) + TQPtrList<KXMLGUIClient> clients = m_mainWindow->guiFactory()->clients(); + for( TQPtrListIterator<KXMLGUIClient> it( clients ); it.current(); ++it ) { KActionCollection *ac = (*it)->actionCollection(); for (uint i = 0; i < ac->count(); i++) @@ -762,7 +762,7 @@ void ActionConfigDialog::slotShortcutCaptured(const KShortcut &shortcut) } else { global.replace('&',""); - QString s = i18n("The '%1' key combination has already been allocated " + TQString s = i18n("The '%1' key combination has already been allocated " "to the \"%2\" action.\n" "Please choose a unique key combination."). arg(shortcutText).arg(global); @@ -779,22 +779,22 @@ void ActionConfigDialog::accept() void ActionConfigDialog::reject() { - if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), QString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) + if (buttonApply->isEnabled() && KMessageBox::questionYesNo(this, i18n("Do you want to save the changes made to this action?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) == KMessageBox::Yes ) saveCurrentAction(); ActionConfigDialogS::reject(); } void ActionConfigDialog::slotNewAction() { - QDomDocument doc; - QDomElement el = doc.createElement("action"); + TQDomDocument doc; + TQDomElement el = doc.createElement("action"); el.setAttribute( "name", "user_"+KApplication::randomString(10) ); el.setAttribute( "icon", "ball" ); currentAction = new TagAction(&el, m_mainWindow); //add the actions to every toolbar xmlguiclient - QDictIterator<ToolbarEntry> it(m_toolbarList); + TQDictIterator<ToolbarEntry> it(m_toolbarList); while (it.current()) { it.current()->guiClient->actionCollection()->insert(currentAction); @@ -803,9 +803,9 @@ void ActionConfigDialog::slotNewAction() selectedShortcut = KShortcut(); static_cast<TagAction*>(currentAction)->setModified(true); - QListViewItem *currentItem = actionTreeView->currentItem(); - QListViewItem *item = new KListViewItem(allActionsItem); - QString actionText = QString("Action_%1").arg(m_mainWindow->actionCollection()->count()); + TQListViewItem *currentItem = actionTreeView->currentItem(); + TQListViewItem *item = new KListViewItem(allActionsItem); + TQString actionText = TQString("Action_%1").arg(m_mainWindow->actionCollection()->count()); currentAction->setText(actionText); item->setText(2, currentAction->name()); item->setText(0, actionText); @@ -816,7 +816,7 @@ void ActionConfigDialog::slotNewAction() actionTreeView->setCurrentItem(item); } else { - QListViewItem *parentItem = currentItem->parent(); + TQListViewItem *parentItem = currentItem->parent(); if (!parentItem) parentItem = currentItem; @@ -838,14 +838,14 @@ void ActionConfigDialog::slotNewAction() void ActionConfigDialog::slotDeleteAction() { - if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").arg(currentAction->text()),QString::null,KStdGuiItem::del()) == KMessageBox::Continue ) + if ( KMessageBox::warningContinueCancel(this, i18n("<qt>Removing the action removes all the references to it.\nAre you sure you want to remove the <b>%1</b> action?</qt>").arg(currentAction->text()),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue ) { - QString actionName = currentAction->name(); + TQString actionName = currentAction->name(); emit deleteUserAction(currentAction); currentAction = 0L; //update the tree view - QListViewItem *listItem; - QListViewItemIterator it(actionTreeView); + TQListViewItem *listItem; + TQListViewItemIterator it(actionTreeView); while (it.current()) { listItem = it.current(); @@ -873,7 +873,7 @@ void ActionConfigDialog::slotAddContainerToolbar() ToolbarTabWidget *tb = ToolbarTabWidget::ref(); int i; - QStringList lst; + TQStringList lst; for (i = 0; i < tb->count(); i++) { if (!toolbarListBox->findItem(tb->label(i), Qt::ExactMatch)) @@ -883,7 +883,7 @@ void ActionConfigDialog::slotAddContainerToolbar() if (lst.count() > 0) { bool ok = false; - QString res = KInputDialog::getItem( + TQString res = KInputDialog::getItem( i18n( "Add Action to Toolbar" ), i18n( "Please select a toolbar:" ), lst, 0, false, &ok, this ); @@ -916,12 +916,12 @@ void ActionConfigDialog::slotTextChanged() buttonApply->setEnabled(true); } -void ActionConfigDialog::slotTextChanged(const QString&) +void ActionConfigDialog::slotTextChanged(const TQString&) { buttonApply->setEnabled(true); } -void ActionConfigDialog::createScriptAction(const QString& a_name, const QString& a_script) +void ActionConfigDialog::createScriptAction(const TQString& a_name, const TQString& a_script) { actionTreeView->setCurrentItem(allActionsItem); slotNewAction(); diff --git a/quanta/dialogs/actionconfigdialog.h b/quanta/dialogs/actionconfigdialog.h index f94ba67e..d58567ee 100644 --- a/quanta/dialogs/actionconfigdialog.h +++ b/quanta/dialogs/actionconfigdialog.h @@ -15,7 +15,7 @@ #ifndef ACTIONCONFIGDIALOG_H #define ACTIONCONFIGDIALOG_H -#include <qmap.h> +#include <tqmap.h> #include "actionconfigdialogs.h" class QDomDocument; @@ -29,11 +29,11 @@ class KXMLGUIClient; typedef struct ToolbarEntry{ KXMLGUIClient *guiClient; - QDomDocument *dom; - QPopupMenu *menu; + TQDomDocument *dom; + TQPopupMenu *menu; KURL url; - QString name; - QString id; + TQString name; + TQString id; bool user; bool visible; bool nameModified; ///< True if the name of the toolbar was modified by Quanta on loading:" (n)" was added @@ -45,48 +45,48 @@ class ActionConfigDialog: public ActionConfigDialogS public: - ActionConfigDialog(const QDict<ToolbarEntry> &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const QString& defaultAction = QString::null); + ActionConfigDialog(const TQDict<ToolbarEntry> &toolbarList, KMainWindow* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0 , const TQString& defaultAction = TQString::null); ~ActionConfigDialog(); - void createScriptAction(const QString& a_name, const QString& a_script); + void createScriptAction(const TQString& a_name, const TQString& a_script); public slots: virtual void accept(); virtual void reject(); void slotToggled(bool); void slotTextChanged(); - void slotTextChanged(const QString&); + void slotTextChanged(const TQString&); void slotNewAction(); private slots: void slotAddToolbar(); void slotRemoveToolbar(); void slotEditToolbar(); - void slotContextMenu(KListView *,QListViewItem *,const QPoint &); - void slotSelectionChanged(QListViewItem *); + void slotContextMenu(KListView *,TQListViewItem *,const TQPoint &); + void slotSelectionChanged(TQListViewItem *); void slotShortcutCaptured(const KShortcut&); void slotDeleteAction(); void slotApply(); void slotAddContainerToolbar(); void slotRemoveContainerToolbar(); - void slotToolbarRemoved(const QString& toolbarName); + void slotToolbarRemoved(const TQString& toolbarName); signals: void addToolbar(); - void removeToolbar(const QString&); + void removeToolbar(const TQString&); void deleteUserAction(KAction *); - void configureToolbars(const QString&); + void configureToolbars(const TQString&); private: void saveCurrentAction(); KPopupMenu *treeMenu; KAction *currentAction; - QListViewItem *allActionsItem; - QMap<QString, QString> globalShortcuts; + TQListViewItem *allActionsItem; + TQMap<TQString, TQString> globalShortcuts; KShortcut selectedShortcut; KMainWindow *m_mainWindow; - QDict<ToolbarEntry> m_toolbarList; - QListViewItem *m_toolbarItem; + TQDict<ToolbarEntry> m_toolbarList; + TQListViewItem *m_toolbarItem; }; #endif diff --git a/quanta/dialogs/copyto.cpp b/quanta/dialogs/copyto.cpp index 429fa457..9f66cb11 100644 --- a/quanta/dialogs/copyto.cpp +++ b/quanta/dialogs/copyto.cpp @@ -63,10 +63,10 @@ KURL CopyTo::copy(const KURL& urlToCopy, const KURL& destination) destURL.adjustPath(1); KIO::CopyJob *job = KIO::copy(urlToCopy, destURL, true); - connect( job, SIGNAL(result( KIO::Job *)), - SLOT (slotResult( KIO::Job *))); + connect( job, TQT_SIGNAL(result( KIO::Job *)), + TQT_SLOT (slotResult( KIO::Job *))); - QString path = destURL.path(); + TQString path = destURL.path(); if (path != "." && path != "..") m_destList.append(destURL); } @@ -101,7 +101,7 @@ KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination ) KIO::UDSEntry entry; if (doCopy) { - QString path; + TQString path; for (uint i = 0; i < sourceList.count(); i++) { KURL srcURL = sourceList[i]; @@ -117,8 +117,8 @@ KURL::List CopyTo::copy(const KURL::List& sourceList, const KURL& destination ) } KIO::CopyJob *job = KIO::copy(sourceList, targetDirURL, true); - connect( job, SIGNAL(result( KIO::Job *)), - SLOT (slotResult( KIO::Job *))); + connect( job, TQT_SIGNAL(result( KIO::Job *)), + TQT_SLOT (slotResult( KIO::Job *))); } return m_destList; diff --git a/quanta/dialogs/dirtydlg.cpp b/quanta/dialogs/dirtydlg.cpp index ad9e408b..70d06c86 100644 --- a/quanta/dialogs/dirtydlg.cpp +++ b/quanta/dialogs/dirtydlg.cpp @@ -14,10 +14,10 @@ ***************************************************************************/ //qt includes -#include <qevent.h> -#include <qlabel.h> -#include <qradiobutton.h> -#include <qpushbutton.h> +#include <tqevent.h> +#include <tqlabel.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> //kde includes #include <kdialogbase.h> @@ -34,7 +34,7 @@ #include "resource.h" #include "qextfileinfo.h" -DirtyDlg::DirtyDlg(const QString& srcName, const QString& destName, bool createBackup, QWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n("File Changed"), KDialogBase::Ok) +DirtyDlg::DirtyDlg(const TQString& srcName, const TQString& destName, bool createBackup, TQWidget *parent, const char *name ) : KDialogBase(parent, name, true, i18n("File Changed"), KDialogBase::Ok) { m_src.setPath(srcName); m_dest.setPath(destName); @@ -56,7 +56,7 @@ void DirtyDlg::slotOk() KProcess *proc = new KProcess(); *proc << "kompare" << m_src.path() << m_dest.path(); proc->start(); - connect(proc, SIGNAL(processExited(KProcess*)),SLOT(slotCompareDone(KProcess*))); + connect(proc, TQT_SIGNAL(processExited(KProcess*)),TQT_SLOT(slotCompareDone(KProcess*))); enableButton(KDialogBase::Ok, false); enableButton(KDialogBase::Cancel, false); } else @@ -88,8 +88,8 @@ void DirtyDlg::slotCompareDone(KProcess* proc) //TODO: Replace with KIO::NetAccess::file_move, when KDE 3.1 support //is dropped KIO::FileCopyJob *job = KIO::file_move(m_dest, m_src, m_permissions, true, false,false ); - connect( job, SIGNAL(result( KIO::Job *)), - SLOT (slotResult( KIO::Job *))); + connect( job, TQT_SIGNAL(result( KIO::Job *)), + TQT_SLOT (slotResult( KIO::Job *))); } @@ -101,7 +101,7 @@ void DirtyDlg::slotResult(KIO::Job *) } /** No descriptions */ -void DirtyDlg::closeEvent(QCloseEvent* ev) +void DirtyDlg::closeEvent(TQCloseEvent* ev) { if (m_busy) ev->ignore(); diff --git a/quanta/dialogs/dirtydlg.h b/quanta/dialogs/dirtydlg.h index 83d05339..4f71f64e 100644 --- a/quanta/dialogs/dirtydlg.h +++ b/quanta/dialogs/dirtydlg.h @@ -30,7 +30,7 @@ class DirtyDlg : public KDialogBase { Q_OBJECT public: - DirtyDlg(const QString& srcName, const QString& destName, bool createBackup = false, QWidget *parent=0, const char *name=0); + DirtyDlg(const TQString& srcName, const TQString& destName, bool createBackup = false, TQWidget *parent=0, const char *name=0); ~DirtyDlg(); protected slots: // Protected slots @@ -41,7 +41,7 @@ protected slots: // Protected slots /** No descriptions */ void slotResult(KIO::Job *); /** No descriptions */ - virtual void closeEvent(QCloseEvent* ev); + virtual void closeEvent(TQCloseEvent* ev); protected: // Protected attributes KURL m_src; diff --git a/quanta/dialogs/dtepeditdlg.cpp b/quanta/dialogs/dtepeditdlg.cpp index c0bf4797..c2595716 100644 --- a/quanta/dialogs/dtepeditdlg.cpp +++ b/quanta/dialogs/dtepeditdlg.cpp @@ -13,13 +13,13 @@ * * ***************************************************************************/ -#include <qcheckbox.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qgroupbox.h> -#include <qradiobutton.h> -#include <qtabwidget.h> -#include <qwidgetstack.h> +#include <tqcheckbox.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqgroupbox.h> +#include <tqradiobutton.h> +#include <tqtabwidget.h> +#include <tqwidgetstack.h> //kde includes @@ -40,7 +40,7 @@ #include "resource.h" #include "quantacommon.h" -DTEPEditDlg::DTEPEditDlg(const QString& descriptionFile, QWidget *parent, const char *name) +DTEPEditDlg::DTEPEditDlg(const TQString& descriptionFile, TQWidget *parent, const char *name) : DTEPEditDlgS(parent, name) { nameEdit->setFocus(); @@ -91,8 +91,8 @@ void DTEPEditDlg::readGeneral() rulesWidgetStack->raiseWidget(m_family); generalWidgetStack->raiseWidget(m_family); caseSensitive->setChecked(m_config->readBoolEntry("CaseSensitive", false)); - QString inherits = m_config->readEntry("Inherits"); - QStringList lst(DTDs::ref()->nameList()); + TQString inherits = m_config->readEntry("Inherits"); + TQStringList lst(DTDs::ref()->nameList()); inheritsCombo->insertStringList(lst); int idx = lst.findIndex(inherits); if (idx == -1) @@ -113,11 +113,11 @@ void DTEPEditDlg::readGeneral() void DTEPEditDlg::readPages() { int i = 1; - while (m_config->hasGroup(QString("Page%1").arg(i)) && i < 6) + while (m_config->hasGroup(TQString("Page%1").arg(i)) && i < 6) { - m_config->setGroup(QString("Page%1").arg(i)); - QString title = m_config->readEntry("Title"); - QString groups = m_config->readEntry("Groups"); + m_config->setGroup(TQString("Page%1").arg(i)); + TQString title = m_config->readEntry("Title"); + TQString groups = m_config->readEntry("Groups"); if (i == 1) { enablePage1->setChecked(true); @@ -197,8 +197,8 @@ void DTEPEditDlg::readParserRules() void DTEPEditDlg::saveResult() { - QString targetFile = m_descriptionFile; - QFileInfo f(targetFile); + TQString targetFile = m_descriptionFile; + TQFileInfo f(targetFile); if (!f.isWritable()) { if (f.exists()) @@ -212,7 +212,7 @@ void DTEPEditDlg::saveResult() } if (!targetFile.isEmpty()) { - QFile f(targetFile); + TQFile f(targetFile); if (f.exists()) f.remove(); KConfig* newConfig = m_config->copyTo(targetFile); @@ -255,35 +255,35 @@ void DTEPEditDlg::writePages(KConfig *config) if (enablePage1->isChecked()) { num++; - config->setGroup(QString("Page%1").arg(num)); + config->setGroup(TQString("Page%1").arg(num)); writeEntry(config, "Title", pageTitleEdit1->text()); writeEntry(config, "Groups", groupsEdit1->text()); } if (enablePage2->isChecked()) { num++; - config->setGroup(QString("Page%1").arg(num)); + config->setGroup(TQString("Page%1").arg(num)); writeEntry(config, "Title", pageTitleEdit2->text()); writeEntry(config, "Groups", groupsEdit2->text()); } if (enablePage3->isChecked()) { num++; - config->setGroup(QString("Page%1").arg(num)); + config->setGroup(TQString("Page%1").arg(num)); writeEntry(config, "Title", pageTitleEdit3->text()); writeEntry(config, "Groups", groupsEdit3->text()); } if (enablePage4->isChecked()) { num++; - config->setGroup(QString("Page%1").arg(num)); + config->setGroup(TQString("Page%1").arg(num)); writeEntry(config, "Title", pageTitleEdit4->text()); writeEntry(config, "Groups", groupsEdit4->text()); } if (enablePage5->isChecked()) { num++; - config->setGroup(QString("Page%1").arg(num)); + config->setGroup(TQString("Page%1").arg(num)); writeEntry(config, "Title", pageTitleEdit5->text()); writeEntry(config, "Groups", groupsEdit5->text()); } @@ -343,10 +343,10 @@ void DTEPEditDlg::readStructures() int objectGroupId = m_config->readNumEntry("ObjectGroupIndex", -1); int i = 1; - while (m_config->hasGroup(QString("StructGroup_%1").arg(i))) + while (m_config->hasGroup(TQString("StructGroup_%1").arg(i))) { StructGroup group; - m_config->setGroup(QString("StructGroup_%1").arg(i)); + m_config->setGroup(TQString("StructGroup_%1").arg(i)); group.name = m_config->readEntry("Name"); group.noName = m_config->readEntry("No_Name"); group.icon = m_config->readEntry("Icon"); @@ -372,7 +372,7 @@ void DTEPEditDlg::readStructures() m_structGroups.append(group); i++; } - for (QValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + for (TQValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) { structuresList->insertItem((*it).name); } @@ -384,10 +384,10 @@ void DTEPEditDlg::writeStructures(KConfig *config) config->writeEntry("StructGroupsCount", m_structGroups.count()); int i = 1; - for (QValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + for (TQValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) { StructGroup group = *it; - config->setGroup(QString("StructGroup_%1").arg(i)); + config->setGroup(TQString("StructGroup_%1").arg(i)); writeEntry(config, "Name", group.name); writeEntry(config, "No_Name", group.noName); writeEntry(config, "Icon", group.icon); @@ -430,7 +430,7 @@ void DTEPEditDlg::writeStructures(KConfig *config) i++; } - for (QValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) + for (TQValueList<StructGroup>::ConstIterator it = m_structGroups.constBegin(); it != m_structGroups.constEnd(); ++it) { structuresList->insertItem((*it).name); } @@ -544,7 +544,7 @@ void DTEPEditDlg::slotDeleteStructGroup() } } -void DTEPEditDlg::writeEntry(KConfig *config, const QString &key, const QString &value) +void DTEPEditDlg::writeEntry(KConfig *config, const TQString &key, const TQString &value) { if (value.isEmpty()) config->deleteEntry(key); diff --git a/quanta/dialogs/dtepeditdlg.h b/quanta/dialogs/dtepeditdlg.h index 45bd3d6d..ed921a5a 100644 --- a/quanta/dialogs/dtepeditdlg.h +++ b/quanta/dialogs/dtepeditdlg.h @@ -17,7 +17,7 @@ #define DTEPEDITDLG_H //qt includes -#include <qvaluelist.h> +#include <tqvaluelist.h> //own includes #include "dtepeditdlgs.h" @@ -30,22 +30,22 @@ class KConfig; class DTEPStructureEditDlgS; struct StructGroup { - QString name; ///<the name of the group - QString noName; ///<the text when there are no elements in the group - QString icon; ///<the icon of the group - QString tag; + TQString name; ///<the name of the group + TQString noName; ///<the text when there are no elements in the group + TQString icon; ///<the icon of the group + TQString tag; bool hasFileName; - QString fileNameRx; + TQString fileNameRx; bool appendToTags; - QString parentGroup; - QString definitionRx; + TQString parentGroup; + TQString definitionRx; bool definitionRxMinimal; - QString usageRx; - QString typeRx; - QString tagType; + TQString usageRx; + TQString typeRx; + TQString tagType; bool parseFile; - QString completeAfterRx; - QString removeRx; + TQString completeAfterRx; + TQString removeRx; bool simpleGroup; bool variableGroup; bool functionGroup; @@ -57,7 +57,7 @@ class DTEPEditDlg : public DTEPEditDlgS { Q_OBJECT public: - DTEPEditDlg(const QString& descriptionFile, QWidget *parent = 0, const char *name = 0); + DTEPEditDlg(const TQString& descriptionFile, TQWidget *parent = 0, const char *name = 0); ~DTEPEditDlg(); void saveResult(); void slotFamilyChanged(int family); @@ -77,13 +77,13 @@ class DTEPEditDlg : public DTEPEditDlgS void writePages(KConfig *config); void writeParserRules(KConfig *config); void writeStructures(KConfig *config); - void writeEntry(KConfig *config, const QString &key, const QString &value); + void writeEntry(KConfig *config, const TQString &key, const TQString &value); - QString m_descriptionFile; + TQString m_descriptionFile; KConfig *m_config; int m_family; - QWidget *m_pagesWidget; - QValueList<StructGroup> m_structGroups; + TQWidget *m_pagesWidget; + TQValueList<StructGroup> m_structGroups; }; #endif diff --git a/quanta/dialogs/filecombo.cpp b/quanta/dialogs/filecombo.cpp index 40415757..63fd1e58 100644 --- a/quanta/dialogs/filecombo.cpp +++ b/quanta/dialogs/filecombo.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // QT includes -#include <qlayout.h> -#include <qcombobox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> // KDE includes #include <klocale.h> @@ -29,17 +29,17 @@ #include "filecombo.h" #include "qextfileinfo.h" -FileCombo::FileCombo(const KURL& a_baseURL, QWidget *parent, const char *name ) - :QWidget(parent,name) +FileCombo::FileCombo(const KURL& a_baseURL, TQWidget *parent, const char *name ) + :TQWidget(parent,name) { baseURL = a_baseURL; m_absolutePath = false; - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); - combo = new QComboBox(true,this); + combo = new TQComboBox(true,this); combo->setEditable(true); - button = new QPushButton(this); + button = new TQPushButton(this); button ->setFixedSize(35,25); button ->setText(i18n("...")); @@ -47,21 +47,21 @@ FileCombo::FileCombo(const KURL& a_baseURL, QWidget *parent, const char *name ) layout ->addWidget( combo ); layout ->addWidget( button ); - connect( button, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); - connect( combo, SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&))); - connect( combo, SIGNAL(textChanged(const QString&)), SLOT(slotComboActivated(const QString&))); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) ); + connect( combo, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); + connect( combo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); setFocusProxy(combo); } -FileCombo::FileCombo( QWidget *parent, const char *name ) - :QWidget( parent, name ) +FileCombo::FileCombo( TQWidget *parent, const char *name ) + :TQWidget( parent, name ) { baseURL.setPath("."); - QHBoxLayout *layout = new QHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); - combo = new QComboBox(true,this); - button = new QPushButton(this); + combo = new TQComboBox(true,this); + button = new TQPushButton(this); button ->setFixedSize(35,25); button ->setText(i18n("...")); @@ -69,21 +69,21 @@ FileCombo::FileCombo( QWidget *parent, const char *name ) layout ->addWidget( combo ); layout ->addWidget( button ); - connect( button, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); - connect( combo, SIGNAL(activated(const QString&)), SLOT(slotComboActivated(const QString&))); - connect( combo, SIGNAL(textChanged(const QString&)), SLOT(slotComboActivated(const QString&))); + connect( button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) ); + connect( combo, TQT_SIGNAL(activated(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); + connect( combo, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotComboActivated(const TQString&))); setFocusProxy(combo); } FileCombo::~FileCombo(){ } -QString FileCombo::text() const +TQString FileCombo::text() const { return combo->currentText(); } -void FileCombo::setText( const QString &_txt ) +void FileCombo::setText( const TQString &_txt ) { combo ->setEditText( _txt ); } @@ -114,7 +114,7 @@ void FileCombo::setReturnAbsolutePath(bool absolutePath) m_absolutePath = absolutePath; } -void FileCombo::slotComboActivated(const QString&s) +void FileCombo::slotComboActivated(const TQString&s) { emit activated(s); } diff --git a/quanta/dialogs/filecombo.h b/quanta/dialogs/filecombo.h index 9403b808..9ec8198c 100644 --- a/quanta/dialogs/filecombo.h +++ b/quanta/dialogs/filecombo.h @@ -18,7 +18,7 @@ #ifndef FILECOMBO_H #define FILECOMBO_H -#include <qwidget.h> +#include <tqwidget.h> #include <kurl.h> /** @@ -29,15 +29,15 @@ class QComboBox; class QPushButton; class KURL; -class FileCombo : public QWidget { +class FileCombo : public TQWidget { Q_OBJECT public: - FileCombo(const KURL& a_baseURL, QWidget *parent=0, const char *name=0); - FileCombo(QWidget *parent=0, const char *name=0); + FileCombo(const KURL& a_baseURL, TQWidget *parent=0, const char *name=0); + FileCombo(TQWidget *parent=0, const char *name=0); ~FileCombo(); - QString text() const; - void setText( const QString &); + TQString text() const; + void setText( const TQString &); /** The select URL dialogs shows this URL, and the returned value is relative to this */ void setBaseURL(const KURL& a_baseURL); /** The selected URL will be stored with absolute path if absolutePath is true */ @@ -45,17 +45,17 @@ public: public slots: void slotFileSelect(); - void slotComboActivated(const QString&); + void slotComboActivated(const TQString&); signals: - void activated(const QString&); + void activated(const TQString&); protected: KURL baseURL; bool m_absolutePath; - QComboBox *combo; - QPushButton *button; + TQComboBox *combo; + TQPushButton *button; }; diff --git a/quanta/dialogs/settings/abbreviation.cpp b/quanta/dialogs/settings/abbreviation.cpp index 56f81c0e..79dc4bc1 100644 --- a/quanta/dialogs/settings/abbreviation.cpp +++ b/quanta/dialogs/settings/abbreviation.cpp @@ -13,13 +13,13 @@ ***************************************************************************/ //qt includes -#include <qdom.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qtextstream.h> -#include <qtimer.h> +#include <tqdom.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqtextstream.h> +#include <tqtimer.h> //kde includes #include <kcombobox.h> @@ -41,13 +41,13 @@ #include "dtds.h" -AbbreviationDlg::AbbreviationDlg(QWidget *parent, const char *name): +AbbreviationDlg::AbbreviationDlg(TQWidget *parent, const char *name): AbbreviationDlgS(parent, name) { m_oldItem = 0L; m_currentAbbrev = 0L; - QMapConstIterator<QString, Abbreviation> it; + TQMapConstIterator<TQString, Abbreviation> it; for (it = qConfig.abbreviations.constBegin(); it != qConfig.abbreviations.constEnd(); ++it) { groupCombo->insertItem(it.key()); @@ -59,10 +59,10 @@ AbbreviationDlg::~AbbreviationDlg() { } -void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) +void AbbreviationDlg::slotGroupChanged(const TQString& newGroupName) { //save the current template - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (item && m_currentAbbrev) m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text()); dtepList->clear(); @@ -70,9 +70,9 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) codeEdit->clear(); m_oldItem = 0L; m_currentAbbrev = &qConfig.abbreviations[newGroupName]; - QString templateStr; - QString templateName; - QMap<QString, QString>::ConstIterator it; + TQString templateStr; + TQString templateName; + TQMap<TQString, TQString>::ConstIterator it; for ( it = m_currentAbbrev->abbreviations.constBegin(); it != m_currentAbbrev->abbreviations.constEnd(); ++it ) { templateStr = it.key(); @@ -80,7 +80,7 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) templateStr = templateStr.left(templateStr.find(' ')); new KListViewItem(templatesList, templateStr, templateName); } - for ( QStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit ) + for ( TQStringList::ConstIterator dtepit = m_currentAbbrev->dteps.constBegin(); dtepit != m_currentAbbrev->dteps.constEnd(); ++dtepit ) { dtepList->insertItem(DTDs::ref()->getDTDNickNameFromName(*dtepit)); } @@ -92,13 +92,13 @@ void AbbreviationDlg::slotGroupChanged(const QString& newGroupName) void AbbreviationDlg::slotNewGroup() { bool ok; - QString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this); + TQString groupName = KInputDialog::getText(i18n("New Abbreviation Group"), i18n("Group name:"), "", &ok, this); if (ok && !groupName.isEmpty()) { if (qConfig.abbreviations.contains(groupName)) { KMessageBox::error(this, i18n("<qt>There is already an abbreviation group called <b>%1</b>. Choose an unique name for the new group.</qt>").arg(groupName), i18n("Group already exists")); - QTimer::singleShot(0, this, SLOT(slotNewGroup())); + TQTimer::singleShot(0, this, TQT_SLOT(slotNewGroup())); } else { groupCombo->insertItem(groupName); @@ -110,17 +110,17 @@ void AbbreviationDlg::slotNewGroup() void AbbreviationDlg::slotAddDTEP() { - QStringList lst = DTDs::ref()->nickNameList(false); + TQStringList lst = DTDs::ref()->nickNameList(false); for (uint i = 0; i < dtepList->count(); i++) lst.remove(dtepList->text(i)); bool ok = false; - QStringList res = KInputDialog::getItemList( + TQStringList res = KInputDialog::getItemList( i18n( "Add DTEP" ), i18n( "Select a DTEP:" ), lst, 0, true, &ok, this ); if (ok) { dtepList->insertStringList(res); - for (QStringList::ConstIterator it = res.constBegin(); it != res.constEnd(); ++it) + for (TQStringList::ConstIterator it = res.constBegin(); it != res.constEnd(); ++it) { m_currentAbbrev->dteps.append(DTDs::ref()->getDTDNameFromNickName(*it)); } @@ -146,18 +146,18 @@ void AbbreviationDlg::slotRemoveDTEP() } } -void AbbreviationDlg::slotTemplateSelectionChanged(QListViewItem* item) +void AbbreviationDlg::slotTemplateSelectionChanged(TQListViewItem* item) { if (!item) return; - //QListViewItem *m_oldItem = templatesList->currentItem(); + //TQListViewItem *m_oldItem = templatesList->currentItem(); if (m_oldItem) { - QString key = m_oldItem->text(0)+" " +m_oldItem->text(1); + TQString key = m_oldItem->text(0)+" " +m_oldItem->text(1); m_currentAbbrev->abbreviations.insert(key, codeEdit->text()); } - QString code = m_currentAbbrev->abbreviations[item->text(0)+" " +item->text(1)]; + TQString code = m_currentAbbrev->abbreviations[item->text(0)+" " +item->text(1)]; codeEdit->setText(code); m_oldItem = item; } @@ -170,11 +170,11 @@ void AbbreviationDlg::slotAddTemplate() w.templateEdit->setFocus(); if (dlg.exec()) { - QString templateName = w.templateEdit->text(); - QString description = w.descriptionEdit->text(); + TQString templateName = w.templateEdit->text(); + TQString description = w.descriptionEdit->text(); if (!templateName.isEmpty()) { - QListViewItem *item = new KListViewItem(templatesList, templateName, description); + TQListViewItem *item = new KListViewItem(templatesList, templateName, description); templatesList->setCurrentItem(item); templatesList->setSelected(item, true); templatesList->ensureItemVisible(item); @@ -185,9 +185,9 @@ void AbbreviationDlg::slotAddTemplate() void AbbreviationDlg::slotRemoveTemplate() { - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (item && - KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> template?</qt>").arg(item->text(1)),QString::null,KStdGuiItem::del()) == KMessageBox::Continue) + KMessageBox::warningContinueCancel(this, i18n("<qt>Do you really want to remove the <b>%1</b> template?</qt>").arg(item->text(1)),TQString::null,KStdGuiItem::del()) == KMessageBox::Continue) { m_currentAbbrev->abbreviations.remove(item->text(0)+" "+item->text(1)); delete item; @@ -198,7 +198,7 @@ void AbbreviationDlg::slotRemoveTemplate() void AbbreviationDlg::slotEditTemplate() { - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (!item) return; KDialogBase dlg(this, 0, true, i18n("Edit Code Template"), KDialogBase::Ok | KDialogBase::Cancel); @@ -218,33 +218,33 @@ void AbbreviationDlg::slotEditTemplate() void AbbreviationDlg::saveTemplates() { - QListViewItem *item = templatesList->currentItem(); + TQListViewItem *item = templatesList->currentItem(); if (item && m_currentAbbrev) m_currentAbbrev->abbreviations.insert(item->text(0) + " " + item->text(1), codeEdit->text()); - QString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml"; - QString s = "<!DOCTYPE Templates>\n<Templates>\n</Templates>\n"; - QString s2; - QDomDocument doc; + TQString abbrevFile = KGlobal::dirs()->saveLocation("data") + resourceDir + "abbreviations.xml"; + TQString s = "<!DOCTYPE Templates>\n<Templates>\n</Templates>\n"; + TQString s2; + TQDomDocument doc; doc.setContent(s); - QDomNode firstNode = doc.firstChild(); + TQDomNode firstNode = doc.firstChild(); Abbreviation abbrev; - QMap<QString, Abbreviation>::ConstIterator abbrevIt; + TQMap<TQString, Abbreviation>::ConstIterator abbrevIt; for (abbrevIt = qConfig.abbreviations.constBegin(); abbrevIt != qConfig.abbreviations.constEnd(); ++abbrevIt) { - QDomElement groupEl = doc.createElement("Group"); + TQDomElement groupEl = doc.createElement("Group"); groupEl.setAttribute("name", abbrevIt.key()); abbrev = abbrevIt.data(); - for (QStringList::ConstIterator dtepIt = abbrev.dteps.constBegin(); dtepIt != abbrev.dteps.constEnd(); ++dtepIt) + for (TQStringList::ConstIterator dtepIt = abbrev.dteps.constBegin(); dtepIt != abbrev.dteps.constEnd(); ++dtepIt) { - QDomElement el = doc.createElement("DTEP"); + TQDomElement el = doc.createElement("DTEP"); el.setAttribute("name", *dtepIt); groupEl.appendChild(el); } int pos; - QMap<QString,QString>::ConstIterator it; + TQMap<TQString,TQString>::ConstIterator it; for (it = abbrev.abbreviations.constBegin(); it != abbrev.abbreviations.constEnd(); ++it) { - QDomElement el = doc.createElement("Template"); + TQDomElement el = doc.createElement("Template"); el.setAttribute("code", it.data()); s = it.key(); s2 = ""; @@ -261,11 +261,11 @@ void AbbreviationDlg::saveTemplates() firstNode.appendChild(groupEl); } - QFile f(abbrevFile); + TQFile f(abbrevFile); if (f.open(IO_WriteOnly | IO_Truncate)) { - QTextStream str(&f); - str.setEncoding(QTextStream::UnicodeUTF8); + TQTextStream str(&f); + str.setEncoding(TQTextStream::UnicodeUTF8); str << doc.toString(); f.close(); } else diff --git a/quanta/dialogs/settings/abbreviation.h b/quanta/dialogs/settings/abbreviation.h index 0e2a34c6..24db8e3b 100644 --- a/quanta/dialogs/settings/abbreviation.h +++ b/quanta/dialogs/settings/abbreviation.h @@ -15,8 +15,8 @@ #ifndef ABBREVIATION_H #define ABBREVIATION_H -#include <qmap.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqstringlist.h> #include <abbreviations.h> @@ -28,25 +28,25 @@ class AbbreviationDlg : public AbbreviationDlgS { Q_OBJECT public: - AbbreviationDlg(QWidget *parent, const char *name = 0); + AbbreviationDlg(TQWidget *parent, const char *name = 0); ~AbbreviationDlg(); void saveTemplates(); public slots: - void slotGroupChanged(const QString& newGroupName); + void slotGroupChanged(const TQString& newGroupName); private slots: void slotNewGroup(); void slotAddDTEP(); void slotRemoveDTEP(); - void slotTemplateSelectionChanged(QListViewItem*); + void slotTemplateSelectionChanged(TQListViewItem*); void slotAddTemplate(); void slotRemoveTemplate(); void slotEditTemplate(); private: - QListViewItem *m_oldItem; + TQListViewItem *m_oldItem; Abbreviation *m_currentAbbrev; }; diff --git a/quanta/dialogs/settings/filemasks.cpp b/quanta/dialogs/settings/filemasks.cpp index 14e824c1..fee135f8 100644 --- a/quanta/dialogs/settings/filemasks.cpp +++ b/quanta/dialogs/settings/filemasks.cpp @@ -17,16 +17,16 @@ #include "filemasks.h" #include "filemasks.moc" // qt includes -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> //kde includes #include <kmimetype.h> -FileMasks::FileMasks(QWidget *parent, const char *name) +FileMasks::FileMasks(TQWidget *parent, const char *name) :FileMasksS(parent,name) { - connect(buttonDefault, SIGNAL(clicked()), this, SLOT(setToDefault())); + connect(buttonDefault, TQT_SIGNAL(clicked()), this, TQT_SLOT(setToDefault())); } FileMasks::~FileMasks(){ @@ -36,10 +36,10 @@ void FileMasks::setToDefault() { KMimeType::List list = KMimeType::allMimeTypes(); KMimeType::List::iterator it; - QString markup, script, image, text; + TQString markup, script, image, text; markup = "text/css; text/html; text/sgml; text/xml; "; script = "text/x-perl; text/x-python; text/x-php; text/x-java; text/x-asp; "; - QString name; + TQString name; for ( it = list.begin(); it != list.end(); ++it ) { name = (*it)->name(); diff --git a/quanta/dialogs/settings/filemasks.h b/quanta/dialogs/settings/filemasks.h index 2d13c1f5..965eb190 100644 --- a/quanta/dialogs/settings/filemasks.h +++ b/quanta/dialogs/settings/filemasks.h @@ -25,7 +25,7 @@ class FileMasks : public FileMasksS { Q_OBJECT public: - FileMasks(QWidget *parent=0, const char *name=0); + FileMasks(TQWidget *parent=0, const char *name=0); ~FileMasks(); public slots: diff --git a/quanta/dialogs/settings/parseroptions.cpp b/quanta/dialogs/settings/parseroptions.cpp index 0ad00d73..24e3c6a6 100644 --- a/quanta/dialogs/settings/parseroptions.cpp +++ b/quanta/dialogs/settings/parseroptions.cpp @@ -15,8 +15,8 @@ #include "parseroptions.h" #include "parseroptions.moc" -#include <qcombobox.h> -#include <qspinbox.h> +#include <tqcombobox.h> +#include <tqspinbox.h> #include <klocale.h> #include <kconfig.h> @@ -25,16 +25,16 @@ * Constructs a ParserOptions which is a child of 'parent', with the * name 'name' and widget flags set to 'f' */ -ParserOptions::ParserOptions( KConfig *a_config, QWidget* parent, const char* name ) +ParserOptions::ParserOptions( KConfig *a_config, TQWidget* parent, const char* name ) : ParserOptionsUI( parent, name ) { config = a_config; config->setGroup("Parser options"); - QString handleLBM = config->readEntry("LBM", i18n("Find Tag & Open Tree")); - QString handleMBM = config->readEntry("MBM", i18n("Nothing")); - QString handleRBM = config->readEntry("RBM", i18n("Popup Menu")); - QString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area")); + TQString handleLBM = config->readEntry("LBM", i18n("Find Tag & Open Tree")); + TQString handleMBM = config->readEntry("MBM", i18n("Nothing")); + TQString handleRBM = config->readEntry("RBM", i18n("Popup Menu")); + TQString handleDoubleClick = config->readEntry("Double click", i18n("Select Tag Area")); if ( !name ) diff --git a/quanta/dialogs/settings/parseroptions.h b/quanta/dialogs/settings/parseroptions.h index a4bdd0f5..a4c5f6f3 100644 --- a/quanta/dialogs/settings/parseroptions.h +++ b/quanta/dialogs/settings/parseroptions.h @@ -25,7 +25,7 @@ class ParserOptions : public ParserOptionsUI Q_OBJECT public: - ParserOptions( KConfig *config, QWidget* parent = 0, const char* name = 0); + ParserOptions( KConfig *config, TQWidget* parent = 0, const char* name = 0); ~ParserOptions(); void updateConfig(); diff --git a/quanta/dialogs/settings/previewoptions.cpp b/quanta/dialogs/settings/previewoptions.cpp index c445c52d..2df03ea9 100644 --- a/quanta/dialogs/settings/previewoptions.cpp +++ b/quanta/dialogs/settings/previewoptions.cpp @@ -17,13 +17,13 @@ #include "previewoptions.h" #include "previewoptions.moc" // qt includes -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> // kde includes #include <klocale.h> #include <kmessagebox.h> -PreviewOptions::PreviewOptions(QWidget *parent, const char *name) +PreviewOptions::PreviewOptions(TQWidget *parent, const char *name) : PreviewOptionsS(parent,name) { } @@ -31,50 +31,50 @@ PreviewOptions::PreviewOptions(QWidget *parent, const char *name) PreviewOptions::~PreviewOptions(){ } -void PreviewOptions::setWindowLayout(const QString& layout ) +void PreviewOptions::setWindowLayout(const TQString& layout ) { if ( layout == "Default") resetLayout->setChecked(true); else resetLayout->setChecked(false); } -void PreviewOptions::setPosition(const QString& position ) +void PreviewOptions::setPosition(const TQString& position ) { radioEditor->setChecked(true); if ( position == "Toolview" ) radioToolview->setChecked(true); } -QString PreviewOptions::position() +TQString PreviewOptions::position() { - QString position = "Editor"; + TQString position = "Editor"; if ( radioToolview->isChecked() ) position = "Toolview"; return position; } -void PreviewOptions::setDocPosition(const QString &position) +void PreviewOptions::setDocPosition(const TQString &position) { radioNewDocTab->setChecked(true); if (position == "Toolview") radioSeparateDocView->setChecked(true); } -QString PreviewOptions::docPosition() +TQString PreviewOptions::docPosition() { - QString position = "Tab"; + TQString position = "Tab"; if (radioSeparateDocView->isChecked()) position = "Toolview"; return position; } -QString PreviewOptions::layout() +TQString PreviewOptions::layout() { - QString layout = "Custom"; + TQString layout = "Custom"; if ( resetLayout->isChecked() ) layout = "Default"; return layout; } -QString PreviewOptions::closeButtons() +TQString PreviewOptions::closeButtons() { - QString closeButtonState = "ShowAlways"; + TQString closeButtonState = "ShowAlways"; if (radioDelayedCloseButtons->isChecked()) closeButtonState = "ShowDelayed"; if (radioNoCloseButtons->isChecked()) @@ -82,7 +82,7 @@ QString PreviewOptions::closeButtons() return closeButtonState; } -void PreviewOptions::setCloseButtons(const QString &state) +void PreviewOptions::setCloseButtons(const TQString &state) { if (state == "ShowAlways") radioShowCloseButtons->setChecked(true); if (state == "ShowDelayed") radioDelayedCloseButtons->setChecked(true); diff --git a/quanta/dialogs/settings/previewoptions.h b/quanta/dialogs/settings/previewoptions.h index cb1f6719..3cc5b820 100644 --- a/quanta/dialogs/settings/previewoptions.h +++ b/quanta/dialogs/settings/previewoptions.h @@ -25,21 +25,21 @@ class KConfig; class PreviewOptions : public PreviewOptionsS { Q_OBJECT public: - PreviewOptions(QWidget *parent=0, const char *name=0); + PreviewOptions(TQWidget *parent=0, const char *name=0); ~PreviewOptions(); - QString position(); - QString layout(); - QString closeButtons(); - QString docPosition(); + TQString position(); + TQString layout(); + TQString closeButtons(); + TQString docPosition(); uint toolviewTabs(); bool hiddenFiles(); bool saveTrees(); - void setPosition(const QString&); - void setWindowLayout(const QString&); - void setCloseButtons(const QString&); + void setPosition(const TQString&); + void setWindowLayout(const TQString&); + void setCloseButtons(const TQString&); void setToolviewTabs(uint); - void setDocPosition(const QString&); + void setDocPosition(const TQString&); void setHiddenFiles(bool show); void setSaveTrees(bool show); diff --git a/quanta/dialogs/specialchardialog.cpp b/quanta/dialogs/specialchardialog.cpp index e8f662ea..200b5afe 100644 --- a/quanta/dialogs/specialchardialog.cpp +++ b/quanta/dialogs/specialchardialog.cpp @@ -15,10 +15,10 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qpushbutton.h> -#include <qtextstream.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqpushbutton.h> +#include <tqtextstream.h> +#include <tqregexp.h> #include <klocale.h> #include <kstandarddirs.h> @@ -28,16 +28,16 @@ #include "specialchardialog.h" #include "resource.h" -SpecialCharDialog::SpecialCharDialog( QWidget* parent, const char* name, bool modal, WFlags fl) +SpecialCharDialog::SpecialCharDialog( TQWidget* parent, const char* name, bool modal, WFlags fl) :SpecialCharDialogS( parent, name, modal, fl ) { - connect ( FilterLineEdit, SIGNAL(textChanged(const QString&)), - SLOT(filterChars(const QString&)) ); - connect ( CharsListBox, SIGNAL(doubleClicked(QListBoxItem*)), - SLOT(insertCode()) ); - connect (buttonOk, SIGNAL(clicked()), SLOT(insertCode())); - connect (buttonChar, SIGNAL(clicked()), SLOT(insertChar())); - connect (buttonCancel, SIGNAL(clicked()), SLOT(cancel())); + connect ( FilterLineEdit, TQT_SIGNAL(textChanged(const TQString&)), + TQT_SLOT(filterChars(const TQString&)) ); + connect ( CharsListBox, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), + TQT_SLOT(insertCode()) ); + connect (buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(insertCode())); + connect (buttonChar, TQT_SIGNAL(clicked()), TQT_SLOT(insertChar())); + connect (buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(cancel())); filterChars(""); } @@ -45,13 +45,13 @@ SpecialCharDialog::~SpecialCharDialog() { } -void SpecialCharDialog::filterChars(const QString& filter) +void SpecialCharDialog::filterChars(const TQString& filter) { CharsListBox->clear(); if (filter.isEmpty()) CharsListBox->insertStringList(charList); else { - for (QStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it) + for (TQStringList::ConstIterator it = charList.begin(); it != charList.end(); ++it) if ( (*it).contains(filter, false) ) CharsListBox->insertItem(*it); } @@ -59,30 +59,30 @@ void SpecialCharDialog::filterChars(const QString& filter) CharsListBox->setCurrentItem(0); } -QString SpecialCharDialog::selection() +TQString SpecialCharDialog::selection() { return m_selection; } void SpecialCharDialog::insertCode() { - QString selected = CharsListBox->text(CharsListBox->currentItem()); + TQString selected = CharsListBox->text(CharsListBox->currentItem()); int begin = selected.find("(&")+1; int length = selected.find(";)") - begin + 1; m_selection = selected.mid(begin, length); - done(QDialog::Accepted); + done(TQDialog::Accepted); } void SpecialCharDialog::insertChar() { m_selection = CharsListBox->text(CharsListBox->currentItem()).left(1); - done(QDialog::Accepted); + done(TQDialog::Accepted); } void SpecialCharDialog::cancel() { m_selection = ""; - done(QDialog::Rejected); + done(TQDialog::Rejected); } #include "specialchardialog.moc" diff --git a/quanta/dialogs/specialchardialog.h b/quanta/dialogs/specialchardialog.h index 23e5dc8d..4155e081 100644 --- a/quanta/dialogs/specialchardialog.h +++ b/quanta/dialogs/specialchardialog.h @@ -18,7 +18,7 @@ #ifndef SPECIALCHARDIALOG_H #define SPECIALCHARDIALOG_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "specialchardialogs.h" class SpecialCharDialog : public SpecialCharDialogS @@ -27,12 +27,12 @@ class SpecialCharDialog : public SpecialCharDialogS public: - SpecialCharDialog( QWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0); + SpecialCharDialog( TQWidget* parent = 0, const char* name = 0, bool modal = true, WFlags fl = 0); ~SpecialCharDialog(); - QString selection(); + TQString selection(); public slots: - void filterChars(const QString&); + void filterChars(const TQString&); void insertChar(); void insertCode(); void cancel(); @@ -40,7 +40,7 @@ public slots: private slots: private: - QString m_selection; + TQString m_selection; }; #endif diff --git a/quanta/dialogs/tagdialogs/colorcombo.cpp b/quanta/dialogs/tagdialogs/colorcombo.cpp index 2dcb6aa2..878216e3 100644 --- a/quanta/dialogs/tagdialogs/colorcombo.cpp +++ b/quanta/dialogs/tagdialogs/colorcombo.cpp @@ -32,17 +32,17 @@ #include <stdio.h> #include <stdlib.h> -#include <qdrawutil.h> -#include <qevent.h> -#include <qfile.h> -#include <qimage.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqdrawutil.h> +#include <tqevent.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qvalidator.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qtimer.h> +#include <tqvalidator.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqtimer.h> #include <kcolordialog.h> #include <kconfig.h> @@ -66,8 +66,8 @@ #define STANDARD_PAL_SIZE 17 -ColorCombo::ColorCombo( QWidget *parent, const char *name ) - : QComboBox( parent, name ) +ColorCombo::ColorCombo( TQWidget *parent, const char *name ) + : TQComboBox( parent, name ) { customColor.setRgb( 255, 255, 255 ); internalcolor.setRgb( 255, 255, 255 ); @@ -78,8 +78,8 @@ ColorCombo::ColorCombo( QWidget *parent, const char *name ) addColors(); - connect( this, SIGNAL( activated(int) ), SLOT( slotActivated(int) ) ); - connect( this, SIGNAL( highlighted(int) ), SLOT( slotHighlighted(int) ) ); + connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) ); + connect( this, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotHighlighted(int) ) ); } ColorCombo::~ColorCombo() @@ -91,7 +91,7 @@ ColorCombo::~ColorCombo() /** Sets the current color */ -void ColorCombo::setColor( const QColor &col ) +void ColorCombo::setColor( const TQColor &col ) { internalcolor = col; hascolor = true; @@ -103,7 +103,7 @@ void ColorCombo::setColor( const QColor &col ) /** Returns the currently selected color */ -QColor ColorCombo::color() const { +TQColor ColorCombo::color() const { return internalcolor; } @@ -113,10 +113,10 @@ bool ColorCombo::hasColor() const{ } -void ColorCombo::setColorName( const QString &color ) +void ColorCombo::setColorName( const TQString &color ) { - QColor c(color); + TQColor c(color); if ( c.isValid() && !color.isEmpty() ) { setColor( c ); @@ -128,7 +128,7 @@ void ColorCombo::setColorName( const QString &color ) } -QString ColorCombo::colorName() +TQString ColorCombo::colorName() { if ( hascolor ) { int i; @@ -145,9 +145,9 @@ QString ColorCombo::colorName() } -void ColorCombo::resizeEvent( QResizeEvent *re ) +void ColorCombo::resizeEvent( TQResizeEvent *re ) { - QComboBox::resizeEvent( re ); + TQComboBox::resizeEvent( re ); addColors(); } @@ -158,12 +158,12 @@ void ColorCombo::slotActivated( int index ) if ( index == 1 ) { - if ( KColorDialog::getColor( customColor ) == QDialog::Accepted ) + if ( KColorDialog::getColor( customColor ) == TQDialog::Accepted ) { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; if ( qGray( customColor.rgb() ) < 128 ) pen.setColor( white ); @@ -171,7 +171,7 @@ void ColorCombo::slotActivated( int index ) pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); painter.drawText( 2, painter.fontMetrics().height(), @@ -203,10 +203,10 @@ void ColorCombo::slotHighlighted( int index ) void ColorCombo::addColors() { - QRect rect( 0, 0, width(), 20 ); - QPixmap pixmap( rect.width(), rect.height() ); - QPainter painter; - QPen pen; + TQRect rect( 0, 0, width(), 20 ); + TQPixmap pixmap( rect.width(), rect.height() ); + TQPainter painter; + TQPen pen; int i; clear(); @@ -225,7 +225,7 @@ void ColorCombo::addColors() pen.setColor( black ); painter.begin( &pixmap ); - QBrush brush( customColor ); + TQBrush brush( customColor ); painter.fillRect( rect, brush ); painter.setPen( pen ); @@ -240,7 +240,7 @@ void ColorCombo::addColors() for ( i = 0; i < STANDARD_PAL_SIZE; i++ ) { painter.begin( &pixmap ); - QBrush brush( standardPalette[i] ); + TQBrush brush( standardPalette[i] ); painter.fillRect( rect, brush ); painter.end(); @@ -266,7 +266,7 @@ void ColorCombo::addColors() void ColorCombo::createStandardPalette() { - standardPalette = new QColor [STANDARD_PAL_SIZE]; + standardPalette = new TQColor [STANDARD_PAL_SIZE]; int i = 0; @@ -289,7 +289,7 @@ void ColorCombo::createStandardPalette() standardPalette[i++] = Qt::black; - standardPaletteNames = new QString [STANDARD_PAL_SIZE]; + standardPaletteNames = new TQString [STANDARD_PAL_SIZE]; i = 0; diff --git a/quanta/dialogs/tagdialogs/colorcombo.h b/quanta/dialogs/tagdialogs/colorcombo.h index 35eae54a..b6f851e0 100644 --- a/quanta/dialogs/tagdialogs/colorcombo.h +++ b/quanta/dialogs/tagdialogs/colorcombo.h @@ -26,10 +26,10 @@ #ifndef COLORCOMBO_H #define COLORCOMBO_H -#include <qcombobox.h> +#include <tqcombobox.h> #include <kdialogbase.h> -#include <qframe.h> -#include <qpixmap.h> +#include <tqframe.h> +#include <tqpixmap.h> #include <kcolordialog.h> #include "kselect.h" @@ -41,16 +41,16 @@ class ColorCombo : public QComboBox { Q_OBJECT public: - ColorCombo( QWidget *parent = 0L, const char *name = 0L ); + ColorCombo( TQWidget *parent = 0L, const char *name = 0L ); ~ColorCombo(); - void setColor( const QColor &col ); - void setColorName(const QString &color); - QString colorName(); + void setColor( const TQColor &col ); + void setColorName(const TQString &color); + TQString colorName(); /** * Retrieve the currently selected color. **/ - QColor color() const; + TQColor color() const; bool hasColor() const; @@ -59,25 +59,25 @@ public slots: void slotHighlighted( int index ); signals: - void activated( const QColor &col ); - void highlighted( const QColor &col ); + void activated( const TQColor &col ); + void highlighted( const TQColor &col ); protected: /** * @reimplemented */ - virtual void resizeEvent( QResizeEvent *re ); + virtual void resizeEvent( TQResizeEvent *re ); private: void createStandardPalette(); void addColors(); - QColor customColor; - QColor internalcolor; + TQColor customColor; + TQColor internalcolor; bool hascolor; - QColor *standardPalette; - QString *standardPaletteNames; + TQColor *standardPalette; + TQString *standardPaletteNames; }; diff --git a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp index 13a488e5..8e52ae01 100644 --- a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp +++ b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp @@ -18,10 +18,10 @@ #include "corewidgetdlg.moc" #include "tagwidget.h" -#include <qdict.h> -#include <qlineedit.h> +#include <tqdict.h> +#include <tqlineedit.h> -CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name) +CoreWidgetDlg::CoreWidgetDlg(TQWidget *parent, const char *name) :CoreWidgetDlgS(parent,name), TagWidget(parent,name) { } @@ -29,7 +29,7 @@ CoreWidgetDlg::CoreWidgetDlg(QWidget *parent, const char *name) CoreWidgetDlg::~CoreWidgetDlg(){ } -void CoreWidgetDlg::readAttributes( QDict<QString> *d ) +void CoreWidgetDlg::readAttributes( TQDict<TQString> *d ) { dict = d; @@ -43,10 +43,10 @@ void CoreWidgetDlg::readAttributes( QDict<QString> *d ) } -void CoreWidgetDlg::writeAttributes( QDict<QString> *d ) +void CoreWidgetDlg::writeAttributes( TQDict<TQString> *d ) { dict = d; - QString *t; // value of attr. + TQString *t; // value of attr. if (( t=d->find("id") )) setValue(*t, lineId); if (( t=d->find("class") )) setValue(*t, lineClass); diff --git a/quanta/dialogs/tagdialogs/listdlg.cpp b/quanta/dialogs/tagdialogs/listdlg.cpp index 396143c2..713ccf2c 100644 --- a/quanta/dialogs/tagdialogs/listdlg.cpp +++ b/quanta/dialogs/tagdialogs/listdlg.cpp @@ -20,11 +20,11 @@ #include <klocale.h> //qt includes -#include <qpushbutton.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqstringlist.h> -ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) +ListDlg::ListDlg(TQStringList &entryList,TQWidget* parent, const char *name ) :KDialogBase(parent,name), listbox(new KListBox(this)) { Q_CHECK_PTR(listbox); @@ -42,13 +42,13 @@ ListDlg::ListDlg(QStringList &entryList,QWidget* parent, const char *name ) adjustSize(); resize(sizeHint()); - connect(listbox,SIGNAL(doubleClicked( QListBoxItem * )), SLOT(slotOk())); + connect(listbox,TQT_SIGNAL(doubleClicked( TQListBoxItem * )), TQT_SLOT(slotOk())); } ListDlg::~ListDlg(){ } -QString ListDlg::getEntry() +TQString ListDlg::getEntry() { return listbox->currentText(); } diff --git a/quanta/dialogs/tagdialogs/listdlg.h b/quanta/dialogs/tagdialogs/listdlg.h index be1605f2..7b84e032 100644 --- a/quanta/dialogs/tagdialogs/listdlg.h +++ b/quanta/dialogs/tagdialogs/listdlg.h @@ -33,9 +33,9 @@ selected item with the getEntry() method. class ListDlg : public KDialogBase { Q_OBJECT public: - ListDlg(QStringList &entryList,QWidget* parent=0, const char *name =0); + ListDlg(TQStringList &entryList,TQWidget* parent=0, const char *name =0); ~ListDlg(); - QString getEntry(); + TQString getEntry(); int getEntryNum(); private: // Private attributes /** */ diff --git a/quanta/dialogs/tagdialogs/pictureview.cpp b/quanta/dialogs/tagdialogs/pictureview.cpp index 0082d379..65102ba8 100644 --- a/quanta/dialogs/tagdialogs/pictureview.cpp +++ b/quanta/dialogs/tagdialogs/pictureview.cpp @@ -17,20 +17,20 @@ #include "pictureview.h" #include "pictureview.moc" -#include "qpainter.h" -#include <qimage.h> +#include "tqpainter.h" +#include <tqimage.h> -PictureView::PictureView(QWidget *parent, char *file, const char *name ) : QFrame(parent,name) +PictureView::PictureView(TQWidget *parent, char *file, const char *name ) : TQFrame(parent,name) { if ( file ) { - pix = new QImage(file); + pix = new TQImage(file); picwidth = pix->width(); picheight = pix->height(); x_of = 0; y_of = 0; scale(); } else { - pix = new QImage(); + pix = new TQImage(); picwidth = 0; picheight = 0; x_of = 0; @@ -45,24 +45,24 @@ PictureView::~PictureView() { } -void PictureView::paintEvent( QPaintEvent * e ) +void PictureView::paintEvent( TQPaintEvent * e ) { - QPainter p; + TQPainter p; p.begin( this ); p.drawImage( x_of, y_of, *pix ); p.end(); - QFrame::paintEvent(e); + TQFrame::paintEvent(e); } -void PictureView::resizeEvent ( QResizeEvent * e){ +void PictureView::resizeEvent ( TQResizeEvent * e){ scale(); - QFrame::resizeEvent(e); + TQFrame::resizeEvent(e); } /** set image */ -void PictureView::slotSetImage(const QString& file) +void PictureView::slotSetImage(const TQString& file) { pix->load( file ); picwidth = pix->width(); diff --git a/quanta/dialogs/tagdialogs/pictureview.h b/quanta/dialogs/tagdialogs/pictureview.h index aaf9186e..1688314d 100644 --- a/quanta/dialogs/tagdialogs/pictureview.h +++ b/quanta/dialogs/tagdialogs/pictureview.h @@ -18,8 +18,8 @@ #ifndef PICTUREVIEW_H #define PICTUREVIEW_H -#include <qwidget.h> -#include <qframe.h> +#include <tqwidget.h> +#include <tqframe.h> class QImage; /**Class for images preview @@ -27,22 +27,22 @@ used by TagImgDlg *@author Dmitry Poplavsky & Yacovlev Alexander */ -class PictureView : public QFrame { +class PictureView : public TQFrame { Q_OBJECT public: - PictureView(QWidget *parent=0, char *file=0, const char *name=0); + PictureView(TQWidget *parent=0, char *file=0, const char *name=0); /** try scale image */ void scale(); public slots: // Public slots /** set image */ - void slotSetImage(const QString& file); + void slotSetImage(const TQString& file); protected: // Protected methods /** */ - virtual void resizeEvent ( QResizeEvent * e); + virtual void resizeEvent ( TQResizeEvent * e); ~PictureView(); protected: - virtual void paintEvent( QPaintEvent * ); + virtual void paintEvent( TQPaintEvent * ); private: // Private attributes /** height of image */ @@ -53,7 +53,7 @@ private: // Private attributes int picwidth; int y_of; - QImage *pix; + TQImage *pix; }; #endif diff --git a/quanta/dialogs/tagdialogs/tagattr.cpp b/quanta/dialogs/tagdialogs/tagattr.cpp index 772da4fb..251c4b8b 100644 --- a/quanta/dialogs/tagdialogs/tagattr.cpp +++ b/quanta/dialogs/tagdialogs/tagattr.cpp @@ -23,8 +23,8 @@ #include <klineedit.h> //qt includes -#include <qdom.h> -#include <qtextstream.h> +#include <tqdom.h> +#include <tqtextstream.h> //app includes #include "tagattr.h" @@ -33,35 +33,35 @@ #include "qtag.h" #include "quantacommon.h" -QString Attr::attrName() const +TQString Attr::attrName() const { return name; } -Attr_list::Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ) +Attr_list::Attr_list( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) { - combo = (QComboBox *)w; + combo = (TQComboBox *)w; - QString source = el.attribute("source"); + TQString source = el.attribute("source"); if (source == "dcop") //fill the list with a result of a DCOP call { - QString method = el.attribute("method"); - QString interface = el.attribute("interface", "QuantaIf"); - QString arguments = el.attribute("arguments"); + TQString method = el.attribute("method"); + TQString interface = el.attribute("interface", "QuantaIf"); + TQString arguments = el.attribute("arguments"); arguments.replace("%tagname%", m_dtdTag->name()); DCOPReply reply = QuantaCommon::callDCOPMethod(interface, method, arguments); if (reply.isValid()) { - QStringList list = reply; + TQStringList list = reply; combo->insertStringList(list); } } - for ( QDomElement n = el.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + for ( TQDomElement n = el.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { if ( n.tagName() == "items" ) { - QDomElement item = n.firstChild().toElement(); + TQDomElement item = n.firstChild().toElement(); while ( !item.isNull() ) { combo->insertItem( item.text() ); item = item.nextSibling().toElement(); @@ -72,7 +72,7 @@ Attr_list::Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ) setValue(""); } -void Attr_list::setValue(const QString &value) +void Attr_list::setValue(const TQString &value) { for ( int i=0; i<combo->count(); i++ ) @@ -87,11 +87,11 @@ void Attr_list::setValue(const QString &value) } -QDomNode findChild( QDomNode &parent, const QString &name ) +TQDomNode findChild( TQDomNode &parent, const TQString &name ) { - for ( QDomNode n = parent.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = parent.firstChild(); !n.isNull(); n = n.nextSibling() ) if ( n.nodeName() == name ) return n; - return QDomNode(); + return TQDomNode(); } diff --git a/quanta/dialogs/tagdialogs/tagattr.h b/quanta/dialogs/tagdialogs/tagattr.h index 30b5220d..2741a10c 100644 --- a/quanta/dialogs/tagdialogs/tagattr.h +++ b/quanta/dialogs/tagdialogs/tagattr.h @@ -19,10 +19,10 @@ #define TAGATTR_H //qt includes -#include <qstring.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdom.h> //kde includes #include <klineedit.h> @@ -37,26 +37,26 @@ class QWidget; class QTag; -QDomNode findChild( QDomNode &parent, const QString &name ); +TQDomNode findChild( TQDomNode &parent, const TQString &name ); class Attr { public: - Attr( QDomElement const& el, QWidget *, QTag *dtdTag ) + Attr( TQDomElement const& el, TQWidget *, QTag *dtdTag ) : domEl(el), name(domEl.attribute("name","")), m_dtdTag(dtdTag) {} //{ domEl = el; name = domEl->attribute("name",""); m_dtdTag = dtdTag;} virtual ~Attr(){} - virtual QString value()=0; - virtual void setValue(const QString &value)=0; + virtual TQString value()=0; + virtual void setValue(const TQString &value)=0; - QString attrName() const; - QDomElement const& domElement() const { return domEl; } + TQString attrName() const; + TQDomElement const& domElement() const { return domEl; } protected: - QDomElement domEl; - QString name; + TQDomElement domEl; + TQString name; QTag *m_dtdTag; }; @@ -64,15 +64,15 @@ class Attr class Attr_line : public Attr { protected: - QLineEdit *line; + TQLineEdit *line; public: - Attr_line( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) - { line = (QLineEdit *)w; } + Attr_line( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { line = (TQLineEdit *)w; } virtual ~Attr_line(){}; - virtual QString value() { return line->text(); } - virtual void setValue(const QString &value) { line->setText(value); } + virtual TQString value() { return line->text(); } + virtual void setValue(const TQString &value) { line->setText(value); } }; @@ -82,12 +82,12 @@ class Attr_color : public Attr ColorCombo *color; public: - Attr_color( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + Attr_color( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) { color = (ColorCombo *)w; } virtual ~Attr_color(){}; - virtual QString value() { return color->colorName(); } - virtual void setValue(const QString &value) { color->setColorName(value); } + virtual TQString value() { return color->colorName(); } + virtual void setValue(const TQString &value) { color->setColorName(value); } }; class Attr_file : public Attr @@ -96,40 +96,40 @@ class Attr_file : public Attr FileCombo *file; public: - Attr_file( QDomElement const& el, QWidget *w , QTag * dtdTag ) : Attr(el, w, dtdTag) + Attr_file( TQDomElement const& el, TQWidget *w , QTag * dtdTag ) : Attr(el, w, dtdTag) { file = (FileCombo *)w; } virtual ~Attr_file(){}; - virtual QString value() { return file->text(); } - virtual void setValue(const QString &value) { file->setText(value); } + virtual TQString value() { return file->text(); } + virtual void setValue(const TQString &value) { file->setText(value); } }; class Attr_list : public Attr { protected: - QComboBox *combo; + TQComboBox *combo; public: - Attr_list( QDomElement const& el, QWidget *w, QTag *dtdTag ); + Attr_list( TQDomElement const& el, TQWidget *w, QTag *dtdTag ); virtual ~Attr_list(){}; - virtual QString value() { return combo->currentText(); } - virtual void setValue(const QString &value); + virtual TQString value() { return combo->currentText(); } + virtual void setValue(const TQString &value); }; class Attr_check : public Attr { protected: - QCheckBox *check; + TQCheckBox *check; public: - Attr_check( QDomElement const& el, QWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) - { check = (QCheckBox *)w; } + Attr_check( TQDomElement const& el, TQWidget *w, QTag *dtdTag ) : Attr(el, w, dtdTag) + { check = (TQCheckBox *)w; } virtual ~Attr_check(){}; - virtual QString value() { return check->isChecked() ? "checked" : "unchecked" ; } - virtual void setValue(const QString &value) { check->setChecked( !value.isEmpty() ); } + virtual TQString value() { return check->isChecked() ? "checked" : "unchecked" ; } + virtual void setValue(const TQString &value) { check->setChecked( !value.isEmpty() ); } }; diff --git a/quanta/dialogs/tagdialogs/tagdialog.cpp b/quanta/dialogs/tagdialogs/tagdialog.cpp index b0da2f8b..bc5800ae 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.cpp +++ b/quanta/dialogs/tagdialogs/tagdialog.cpp @@ -16,9 +16,9 @@ ***************************************************************************/ // include qt headers -#include <qdir.h> -#include <qfileinfo.h> -#include <qevent.h> +#include <tqdir.h> +#include <tqfileinfo.h> +#include <tqevent.h> // include kde headers #include <klocale.h> @@ -43,7 +43,7 @@ #include "kafkacommon.h" TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true) + : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); @@ -52,7 +52,7 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) { for (int i = 0; i < m_tag->attrCount(); i++) { - dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + dict->insert(m_tag->attribute(i), new TQString(m_tag->attributeValue(i))); } } mainDlg = 0L; @@ -60,8 +60,8 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, KURL a_baseURL) } -TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const QString& selection, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const TQString& selection, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); @@ -70,15 +70,15 @@ TagDialog::TagDialog(QTag* dtdTag, Tag *tag, const QString& selection, KURL a_ba { for (int i = 0; i < m_tag->attrCount(); i++) { - dict->insert(m_tag->attribute(i), new QString(m_tag->attributeValue(i))); + dict->insert(m_tag->attribute(i), new TQString(m_tag->attributeValue(i))); } } mainDlg = 0L; parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, QString attrs, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true) +TagDialog::TagDialog(QTag* dtdTag, TQString attrs, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true) { init(dtdTag, a_baseURL); if ( !attrs.isNull() ) @@ -90,8 +90,8 @@ TagDialog::TagDialog(QTag* dtdTag, QString attrs, KURL a_baseURL) parseTag(); } -TagDialog::TagDialog(QTag* dtdTag, const QString& selection, QString attrs, KURL a_baseURL) - : QTabDialog( 0L, "tagdialog", true), m_selection(selection) +TagDialog::TagDialog(QTag* dtdTag, const TQString& selection, TQString attrs, KURL a_baseURL) + : TQTabDialog( 0L, "tagdialog", true), m_selection(selection) { init(dtdTag, a_baseURL); if ( !attrs.isNull() ) @@ -118,8 +118,8 @@ void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) setOkButton(KStdGuiItem::ok().text()); setCancelButton(KStdGuiItem::cancel().text()); - connect( this, SIGNAL(applyButtonPressed()), SLOT(slotAccept()) ); - connect( this, SIGNAL(cancelButtonPressed()), SLOT(reject()) ); + connect( this, TQT_SIGNAL(applyButtonPressed()), TQT_SLOT(slotAccept()) ); + connect( this, TQT_SIGNAL(cancelButtonPressed()), TQT_SLOT(reject()) ); if (!a_dtdTag) //the tag is invalid, let's create a default one { @@ -131,11 +131,11 @@ void TagDialog::init(QTag *a_dtdTag, KURL a_baseURL) dtdTag = a_dtdTag; deleteTag = false; } - dict = new QDict<QString>(1,false); + dict = new TQDict<TQString>(1,false); dict->setAutoDelete(true); m_baseURL = a_baseURL; - QString caption = i18n("Tag Properties: "); + TQString caption = i18n("Tag Properties: "); caption += dtdTag->name(); setCaption( caption); resize(420,400); @@ -145,25 +145,25 @@ void TagDialog::parseTag() { if (dtdTag->name() != i18n("Unknown tag")) //read from the extra tags { - QDomDocument doc; + TQDomDocument doc; if (dtdTag->name().lower() == "img") //NOTE: HTML specific code! { mainDlg = new TagImgDlg(dtdTag->parentDTD, this); ((TagImgDlg *)mainDlg)->writeAttributes( dict ); } //read the tag file it is available - else if (QFileInfo(dtdTag->fileName()).exists()) + else if (TQFileInfo(dtdTag->fileName()).exists()) { - QFile f( dtdTag->fileName() ); + TQFile f( dtdTag->fileName() ); f.open( IO_ReadOnly ); if ( doc.setContent( &f ) ) { - QString tagName = dtdTag->name(); - QDomNodeList nodeList = doc.elementsByTagName("tag"); + TQString tagName = dtdTag->name(); + TQDomNodeList nodeList = doc.elementsByTagName("tag"); for ( uint i = 0; i < nodeList.count(); i++) { - QDomNode n = nodeList.item(i); - QString nodeTagName = n.toElement().attribute("name"); + TQDomNode n = nodeList.item(i); + TQString nodeTagName = n.toElement().attribute("name"); if (!dtdTag->parentDTD->caseSensitive) nodeTagName = nodeTagName.upper(); if (nodeTagName == tagName && n.toElement().elementsByTagName("attr").count() > 0) //read a tag @@ -178,12 +178,12 @@ void TagDialog::parseTag() } else { - QString docString = "<!DOCTYPE TAGS>\n<TAGS>\n"; - docString += QString("<tag name=\"%1\">\n").arg(dtdTag->name()); + TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n"; + docString += TQString("<tag name=\"%1\">\n").arg(dtdTag->name()); docString += QuantaCommon::xmlFromAttributes(dtdTag->attributes()); docString += "</tag>\n</TAGS>\n"; doc.setContent(docString); - QDomNode domNode2 = doc.firstChild().firstChild(); + TQDomNode domNode2 = doc.firstChild().firstChild(); mainDlg = new Tagxml( domNode2, dtdTag, m_selection, this ); } @@ -195,48 +195,48 @@ void TagDialog::parseTag() KConfig *dtdConfig = new KConfig(dtdTag->parentDTD->fileName); dtdConfig->setGroup("General"); int numOfPages = dtdConfig->readNumEntry("NumOfPages"); - extraPageList = new QPtrList<Tagxml>(); + extraPageList = new TQPtrList<Tagxml>(); extraPageList->setAutoDelete(true); for (int i = 1; i <= numOfPages; i++) { Tagxml *extraPage = 0L; - dtdConfig->setGroup(QString("Page%1").arg(i)); - QString title = dtdConfig->readEntry("Title"); - QStringList groupList; + dtdConfig->setGroup(TQString("Page%1").arg(i)); + TQString title = dtdConfig->readEntry("Title"); + TQStringList groupList; groupList = dtdConfig->readListEntry("Groups"); - QDomDocument extraDoc; //build an internal tag XML for the groups + TQDomDocument extraDoc; //build an internal tag XML for the groups bool addPage = false; - QString docString = "<!DOCTYPE TAGS>\n<TAGS>\n"; - docString += QString("<tag name=\"Page%1\">\n").arg(i); + TQString docString = "<!DOCTYPE TAGS>\n<TAGS>\n"; + docString += TQString("<tag name=\"Page%1\">\n").arg(i); for (uint j = 0; j < groupList.count(); j++) { groupList[j] = groupList[j].stripWhiteSpace(); } - QDomDocument commonDoc; - QString commonFileName = QFileInfo(dtdTag->fileName()).dirPath() + "/common.tag"; - if (QFile(commonFileName).exists()) + TQDomDocument commonDoc; + TQString commonFileName = TQFileInfo(dtdTag->fileName()).dirPath() + "/common.tag"; + if (TQFile(commonFileName).exists()) { - QFile commonFile(commonFileName); + TQFile commonFile(commonFileName); commonFile.open(IO_ReadOnly); if (doc.setContent(&commonFile)) { int row = 0; - QDomNodeList nodeList = doc.elementsByTagName("tag"); + TQDomNodeList nodeList = doc.elementsByTagName("tag"); for ( uint j = 0; j < nodeList.count(); j++) { - QDomNode node = nodeList.item(j); - QString nodeTagName = node.toElement().attribute("name"); + TQDomNode node = nodeList.item(j); + TQString nodeTagName = node.toElement().attribute("name"); if (groupList.contains(nodeTagName) && dtdTag->commonGroups.contains(nodeTagName)) //add the attributes of this common tag to a new tab { - QString s; - QTextStream str(&s, IO_ReadWrite); - QString s2; - QTextStream str2(&s2, IO_ReadWrite); - for ( QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) + TQString s; + TQTextStream str(&s, IO_ReadWrite); + TQString s2; + TQTextStream str2(&s2, IO_ReadWrite); + for ( TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling() ) { if (n.nodeName() == "attr") { - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); str.reset(); str << "<attr name=\"" << el.attribute("name") << "\" type=\"" << el.attribute("type", "input"); str << "\" source=\"" << el.attribute("source"); @@ -247,10 +247,10 @@ void TagDialog::parseTag() str << " <text>" << el.attribute("name") << "</text>" << endl; str << " <textlocation col=\"0\" row=\"" << row << "\" />" << endl; str << " <location col=\"1\" row=\"" << row << "\" />" << endl; - QDomNodeList childNodes = n.childNodes(); + TQDomNodeList childNodes = n.childNodes(); for ( uint k = 0; k < childNodes.count(); k++) { - QDomNode childNode = childNodes.item(j); + TQDomNode childNode = childNodes.item(j); childNode.save(str2, 2); str << s2; } @@ -271,7 +271,7 @@ void TagDialog::parseTag() if (addPage) { extraDoc.setContent(docString); - QDomNode domNode = extraDoc.firstChild().firstChild(); + TQDomNode domNode = extraDoc.firstChild().firstChild(); extraPage = new Tagxml( domNode, dtdTag, m_selection, this ); extraPage->writeAttributes( dict ); addTab( extraPage, i18n(title.utf8()) ); @@ -283,30 +283,30 @@ void TagDialog::parseTag() } /** Insert an attribute to dict*/ -void TagDialog::insertAttribute(QString *attr, QString *value) +void TagDialog::insertAttribute(TQString *attr, TQString *value) { dict->insert( *attr , value ); } -/** Return the attributes in QDict<QString> format*/ -QDict<QString> * TagDialog::getAttributes() +/** Return the attributes in TQDict<TQString> format*/ +TQDict<TQString> * TagDialog::getAttributes() { return dict; } /** Return all the attributes in one string*/ -QString TagDialog::getAttributeString() +TQString TagDialog::getAttributeString() { - QDictIterator<QString> it( *dict ); + TQDictIterator<TQString> it( *dict ); - QString attrStr; + TQString attrStr; while ( it.current() ) { - QString attr = QuantaCommon::attrCase(it.currentKey()); - QString val = *it.current(); + TQString attr = QuantaCommon::attrCase(it.currentKey()); + TQString val = *it.current(); - QString attrval = " "; // attr=value + TQString attrval = " "; // attr=value if ( val.isEmpty()) { attrval += attr; // for checkboxes dont print ="" @@ -322,9 +322,9 @@ QString TagDialog::getAttributeString() } /**Return the value of the attribute specified by attr. */ -QString TagDialog::getAttribute(const QString& attr) +TQString TagDialog::getAttribute(const TQString& attr) { - QString attrStr = getAttributeString()+" "; + TQString attrStr = getAttributeString()+" "; int pos = attrStr.upper().find(attr.upper()); if (pos != -1) { @@ -333,7 +333,7 @@ QString TagDialog::getAttribute(const QString& attr) } else { - return QString::null; + return TQString::null; } } @@ -362,9 +362,9 @@ KURL TagDialog::baseURL() } -void TagDialog::parseAttributes(const QString &attrs) +void TagDialog::parseAttributes(const TQString &attrs) { - QString t = attrs; + TQString t = attrs; t = t.stripWhiteSpace(); @@ -373,8 +373,8 @@ void TagDialog::parseAttributes(const QString &attrs) int i = 0; while ( !t[i].isSpace() && !t[i].isNull() && t[i] != '=' ) i++; - QString attr = t.left(i); - QString *value = new QString(); + TQString attr = t.left(i); + TQString *value = new TQString(); t = t.remove(0,i).stripWhiteSpace(); @@ -426,8 +426,8 @@ void TagDialog::insertTag(Document *w, bool insertInLine) { if (dtdTag->name() != i18n("Unknown tag")) { - QString newTag = getAttributeString(); - newTag = QString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; + TQString newTag = getAttributeString(); + newTag = TQString("<")+QuantaCommon::tagCase(dtdTag->name())+newTag; if ( dtdTag->parentDTD->singleTagStyle == "xml" && (dtdTag->isSingle() || (!qConfig.closeOptionalTags && dtdTag->isOptional())) @@ -437,11 +437,11 @@ void TagDialog::insertTag(Document *w, bool insertInLine) } newTag.append(">"); - QString secondPartOfTag = QString("</")+QuantaCommon::tagCase(dtdTag->name())+">"; + TQString secondPartOfTag = TQString("</")+QuantaCommon::tagCase(dtdTag->name())+">"; if ( !insertInLine ) { - QString space=""; + TQString space=""; space.fill( ' ',w->viewCursorIf->cursorColumnReal() ); newTag += "\n" + space + " "; secondPartOfTag = "\n" + space + secondPartOfTag; @@ -461,8 +461,8 @@ void TagDialog::insertTag(Document *w, bool insertInLine) Node *TagDialog::buildNode(Document *w) { Node *node; - QString attrStr(""); - QDictIterator<QString> it( *dict ); + TQString attrStr(""); + TQDictIterator<TQString> it( *dict ); node = kafkaCommon::createNode(dtdTag->name(), "", Tag::XmlTag, w); @@ -476,9 +476,9 @@ Node *TagDialog::buildNode(Document *w) return node; } -void TagDialog::showEvent(QShowEvent *ev) +void TagDialog::showEvent(TQShowEvent *ev) { - QTabDialog::showEvent(ev); + TQTabDialog::showEvent(ev); if (dynamic_cast<Tagxml*>(mainDlg)) static_cast<Tagxml*>(mainDlg)->focusToFirstItem(); } diff --git a/quanta/dialogs/tagdialogs/tagdialog.h b/quanta/dialogs/tagdialogs/tagdialog.h index 67809bb0..3575c8e5 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.h +++ b/quanta/dialogs/tagdialogs/tagdialog.h @@ -18,10 +18,10 @@ #ifndef TAGDIALOG_H #define TAGDIALOG_H -#include <qwidget.h> -#include <qtabdialog.h> -#include <qdict.h> -#include <qstrlist.h> +#include <tqwidget.h> +#include <tqtabdialog.h> +#include <tqdict.h> +#include <tqstrlist.h> #include "resource.h" @@ -37,7 +37,7 @@ class Tag; class KURL; class QShowEvent; -class TagDialog : public QTabDialog { +class TagDialog : public TQTabDialog { Q_OBJECT public: @@ -51,24 +51,24 @@ public: */ TagDialog(QTag* dtdTag, Tag* tag, KURL a_baseURL = KURL()); - TagDialog(QTag* dtdTag, Tag* tag, const QString& selection, KURL a_baseURL = KURL()); - TagDialog(QTag* dtdTag, QString attrs=QString::null, KURL a_baseURL = KURL()); - TagDialog(QTag* dtdTag, const QString& selection, QString attrs=QString::null, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, Tag* tag, const TQString& selection, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, TQString attrs=TQString::null, KURL a_baseURL = KURL()); + TagDialog(QTag* dtdTag, const TQString& selection, TQString attrs=TQString::null, KURL a_baseURL = KURL()); ~TagDialog(); /** Insert an attribute to dict*/ - void insertAttribute(QString *attr, QString *value); + void insertAttribute(TQString *attr, TQString *value); /** */ void parseTag(); /** returen doc path */ KURL baseURL(); - /** Return the attributes in QDict<QString> format*/ - QDict<QString> * getAttributes(); + /** Return the attributes in TQDict<TQString> format*/ + TQDict<TQString> * getAttributes(); /** Return all the attributes in one string*/ - QString getAttributeString(); + TQString getAttributeString(); /**Return the value of the attribute specified by attr. */ - QString getAttribute(const QString& attr); + TQString getAttribute(const TQString& attr); /** Insert the new tag into the Document*/ void insertTag(Document *w, bool insertInLine = true); /** build and return the new Node.*/ @@ -76,27 +76,27 @@ public: public: - QWidget *mainDlg; + TQWidget *mainDlg; - QDict<QString> *dict; + TQDict<TQString> *dict; KURL m_baseURL; public slots: // Public slots void slotAccept(); protected slots: - virtual void showEvent(QShowEvent *ev); + virtual void showEvent(TQShowEvent *ev); private: bool deleteTag; Tag *m_tag; QTag* dtdTag; - QString m_selection; + TQString m_selection; - QPtrList<Tagxml> *extraPageList; + TQPtrList<Tagxml> *extraPageList; void init(QTag* dtdTag, KURL a_baseURL); - void parseAttributes(const QString &attrs); + void parseAttributes(const TQString &attrs); }; #endif diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.cpp b/quanta/dialogs/tagdialogs/tagimgdlg.cpp index efacc768..9448f48d 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlg.cpp @@ -17,8 +17,8 @@ ***************************************************************************/ //qt includes -#include <qspinbox.h> -#include <qimage.h> +#include <tqspinbox.h> +#include <tqimage.h> //kde includes #include <kapplication.h> #include <klocale.h> @@ -35,8 +35,8 @@ #include "tagimgdlg.moc" -TagImgDlg::TagImgDlg(const DTDStruct *dtd, QWidget *parent, const char *name) - : QWidget(parent,name), TagWidget(parent,name) +TagImgDlg::TagImgDlg(const DTDStruct *dtd, TQWidget *parent, const char *name) + : TQWidget(parent,name), TagWidget(parent,name) { m_dtd = dtd; img = 0L; @@ -45,9 +45,9 @@ TagImgDlg::TagImgDlg(const DTDStruct *dtd, QWidget *parent, const char *name) initDialog(); - connect( buttonImgSource, SIGNAL(clicked()), this, SLOT(slotFileSelect()) ); - connect( buttonRecalcImgSize, SIGNAL(clicked()), this, SLOT(slotRecalcImgSize()) ); - connect( lineImgSource, SIGNAL( returnPressed()), this, SLOT(slotLineFileSelect()) ); + connect( buttonImgSource, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFileSelect()) ); + connect( buttonRecalcImgSize, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRecalcImgSize()) ); + connect( lineImgSource, TQT_SIGNAL( returnPressed()), this, TQT_SLOT(slotLineFileSelect()) ); } TagImgDlg::~TagImgDlg() @@ -77,10 +77,10 @@ void TagImgDlg::slotImageSet(const KURL& imageURL) } widgetImg->slotSetImage(imgFileName); - img = new QImage(imgFileName); + img = new TQImage(imgFileName); if (!img->isNull() && lineWidth && lineHeight) { - QString s; + TQString s; s.setNum(img->width()); lineWidth->setText(s); s.setNum(img->height()); @@ -92,7 +92,7 @@ void TagImgDlg::slotImageSet(const KURL& imageURL) void TagImgDlg::slotRecalcImgSize() { if (img && lineWidth && lineHeight) { - QString s; + TQString s; s.setNum( img->width() ); lineWidth->setText( s ); s.setNum( img->height() ); @@ -120,7 +120,7 @@ void TagImgDlg::slotLineFileSelect() slotImageSet(url); } -void TagImgDlg::readAttributes( QDict<QString> *d ) +void TagImgDlg::readAttributes( TQDict<TQString> *d ) { dict = d; @@ -140,10 +140,10 @@ void TagImgDlg::readAttributes( QDict<QString> *d ) updateDict("border",spinBorder ); } -void TagImgDlg::writeAttributes( QDict<QString> *d ) +void TagImgDlg::writeAttributes( TQDict<TQString> *d ) { dict = d; - QString *t; // value of attr. + TQString *t; // value of attr. if (( t=d->find("src") )) { diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.h b/quanta/dialogs/tagdialogs/tagimgdlg.h index f1229ee2..73730c84 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.h +++ b/quanta/dialogs/tagdialogs/tagimgdlg.h @@ -20,11 +20,11 @@ #define TAGIMGDLG_H //Generated area. DO NOT EDIT!!!(begin) -#include <qwidget.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqlabel.h> #include <klineedit.h> -#include <qpushbutton.h> -#include <qcombobox.h> +#include <tqpushbutton.h> +#include <tqcombobox.h> //Generated area. DO NOT EDIT!!!(end) #include "tagwidget.h" @@ -38,41 +38,41 @@ class QImage; *@author Dmitry Poplavsky & Yacovlev Alexander */ -class TagImgDlg : public QWidget, TagWidget { +class TagImgDlg : public TQWidget, TagWidget { Q_OBJECT public: - TagImgDlg(const DTDStruct *dtd, QWidget *parent=0, const char *name=0); + TagImgDlg(const DTDStruct *dtd, TQWidget *parent=0, const char *name=0); ~TagImgDlg(); public: void initDialog(); //Generated area. DO NOT EDIT!!!(begin) - QLabel *labelImgSource; + TQLabel *labelImgSource; KLineEdit *lineImgSource; - QPushButton *buttonImgSource; - QPushButton *buttonRecalcImgSize; - QLabel *QLabel_4; + TQPushButton *buttonImgSource; + TQPushButton *buttonRecalcImgSize; + TQLabel *QLabel_4; KLineEdit *lineWidth; - QLabel *QLabel_5; + TQLabel *QLabel_5; KLineEdit *lineHeight; - QLabel *QLabel_6; + TQLabel *QLabel_6; KLineEdit *lineHSpace; - QLabel *QLabel_7; + TQLabel *QLabel_7; KLineEdit *lineVSpace; - QLabel *QLabel_8; + TQLabel *QLabel_8; KLineEdit *lineAltText; - QLabel *QLabel_9; - QSpinBox *spinBorder; - QLabel *QLabel_10; - QComboBox *comboAlign; + TQLabel *QLabel_9; + TQSpinBox *spinBorder; + TQLabel *QLabel_10; + TQComboBox *comboAlign; PictureView *widgetImg; - QPushButton *buttonOk; - QPushButton *buttonCancel; + TQPushButton *buttonOk; + TQPushButton *buttonCancel; //Generated area. DO NOT EDIT!!!(end) private: - QImage *img; - QString imgFileName; + TQImage *img; + TQString imgFileName; bool isTmpFile; const DTDStruct *m_dtd; @@ -83,8 +83,8 @@ public slots: // Public slots void slotFileSelect(); void slotLineFileSelect(); - void readAttributes( QDict<QString> *d ); - void writeAttributes( QDict<QString> *d ); + void readAttributes( TQDict<TQString> *d ); + void writeAttributes( TQDict<TQString> *d ); /** recalculate image size */ void slotRecalcImgSize(); }; diff --git a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp index ec4a6a36..69d6a72e 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp @@ -13,24 +13,24 @@ #include <knumvalidator.h> #include <kiconloader.h> -#include <qlayout.h> -#include <qspinbox.h> +#include <tqlayout.h> +#include <tqspinbox.h> #include "pictureview.h" #include "tagimgdlg.h" void TagImgDlg::initDialog(){ - QGridLayout *grid = new QGridLayout( this ); + TQGridLayout *grid = new TQGridLayout( this ); grid->setSpacing( 13 ); grid->setMargin( 11 ); - labelImgSource= new QLabel(this,"labelImgSource"); + labelImgSource= new TQLabel(this,"labelImgSource"); labelImgSource->setText(i18n("Image source:")); grid->addMultiCellWidget(labelImgSource, 0, 0, 0, 0); lineImgSource= new KLineEdit(this,"lineImgSource"); grid->addMultiCellWidget(lineImgSource, 0, 0, 1, 3); - buttonImgSource= new QPushButton(this,"NoName"); + buttonImgSource= new TQPushButton(this,"NoName"); buttonImgSource->setText(i18n("...")); grid->addMultiCellWidget(buttonImgSource, 0, 0, 4, 4); @@ -42,7 +42,7 @@ void TagImgDlg::initDialog(){ lineWidth = 0L; if (imgTag->attribute("width")) { - QLabel_4= new QLabel(this,"NoName"); + QLabel_4= new TQLabel(this,"NoName"); QLabel_4->setText(i18n("Width:")); grid->addMultiCellWidget(QLabel_4, 1, 1, 0, 0); @@ -54,7 +54,7 @@ void TagImgDlg::initDialog(){ lineHeight = 0L; if (imgTag->attribute("height")) { - QLabel_5= new QLabel(this,"NoName"); + QLabel_5= new TQLabel(this,"NoName"); QLabel_5->setText(i18n("Height:")); grid->addMultiCellWidget(QLabel_5, 1, 1, 2, 2); @@ -63,14 +63,14 @@ void TagImgDlg::initDialog(){ grid->addMultiCellWidget(lineHeight, 1, 1, 3, 3); } - buttonRecalcImgSize= new QPushButton(this,"NoName"); + buttonRecalcImgSize= new TQPushButton(this,"NoName"); buttonRecalcImgSize->setText(i18n("...")); grid->addMultiCellWidget(buttonRecalcImgSize, 1, 1, 4, 4); lineHSpace = 0L; if (imgTag->attribute("hspace")) { - QLabel_6= new QLabel(this,"NoName"); + QLabel_6= new TQLabel(this,"NoName"); QLabel_6->setText(i18n("HSpace:")); grid->addMultiCellWidget(QLabel_6, 2, 2, 0, 0); @@ -81,7 +81,7 @@ void TagImgDlg::initDialog(){ lineVSpace = 0L; if (imgTag->attribute("vspace")) { - QLabel_7= new QLabel(this,"NoName"); + QLabel_7= new TQLabel(this,"NoName"); QLabel_7->setText(i18n("VSpace:")); grid->addMultiCellWidget(QLabel_7, 2, 2, 2, 2); @@ -89,7 +89,7 @@ void TagImgDlg::initDialog(){ grid->addMultiCellWidget(lineVSpace, 2, 2, 3, 3); } - QLabel_8= new QLabel(this,"NoName"); + QLabel_8= new TQLabel(this,"NoName"); QLabel_8->setText(i18n("Alternate text:")); grid->addMultiCellWidget(QLabel_8, 3, 3, 0, 0); @@ -99,11 +99,11 @@ void TagImgDlg::initDialog(){ spinBorder = 0L; if (imgTag->attribute("border")) { - QLabel_9= new QLabel(this,"NoName"); + QLabel_9= new TQLabel(this,"NoName"); QLabel_9->setText(i18n("Border:")); grid->addMultiCellWidget(QLabel_9, 4, 4, 0, 0); - spinBorder= new QSpinBox(this,"NoName"); + spinBorder= new TQSpinBox(this,"NoName"); spinBorder->setRange(0,20); grid->addMultiCellWidget(spinBorder, 4, 4, 1, 1); } @@ -111,11 +111,11 @@ void TagImgDlg::initDialog(){ comboAlign = 0L; if (imgTag->attribute("align")) { - QLabel_10= new QLabel(this,"NoName"); + QLabel_10= new TQLabel(this,"NoName"); QLabel_10->setText(i18n("Align:")); grid->addMultiCellWidget(QLabel_10, 4, 4, 2, 2); - comboAlign= new QComboBox(this,"NoName"); + comboAlign= new TQComboBox(this,"NoName"); grid->addMultiCellWidget(comboAlign, 4, 4, 3, 4); comboAlign->insertStringList(imgTag->attribute("align")->values); } diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.cpp b/quanta/dialogs/tagdialogs/tagmaildlg.cpp index 329ffd59..3ed62c57 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmaildlg.cpp @@ -28,21 +28,21 @@ #include <kabc/stdaddressbook.h> //qt includes -#include <qlineedit.h> +#include <tqlineedit.h> #include <kpushbutton.h> -#include <qstringlist.h> -#include <qregexp.h> +#include <tqstringlist.h> +#include <tqregexp.h> -TagMailDlg::TagMailDlg(QWidget *parent, const char *name) +TagMailDlg::TagMailDlg(TQWidget *parent, const char *name) :TagMail(parent, name) { setCaption(name); setModal(true); - connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); - connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); - connect( buttonAddressSelect, SIGNAL(clicked()), SLOT(slotSelectAddress()) ); + connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); + connect( buttonAddressSelect, TQT_SIGNAL(clicked()), TQT_SLOT(slotSelectAddress()) ); buttonOk->setIconSet(SmallIconSet("button_ok")); buttonCancel->setIconSet(SmallIconSet("button_cancel")); lineEmail->setFocus(); @@ -54,13 +54,13 @@ TagMailDlg::~TagMailDlg(){ void TagMailDlg::slotSelectAddress() { //Based on KMail - QString addr, email, emailString; - QStringList result; + TQString addr, email, emailString; + TQStringList result; KABC::AddressBook *addressBook = KABC::StdAddressBook::self(); KABC::AddressBook::Iterator it; for( it = addressBook->begin(); it != addressBook->end(); ++it ) { - QStringList emails = (*it).emails(); - QString n = (*it).prefix() + " " + + TQStringList emails = (*it).emails(); + TQString n = (*it).prefix() + " " + (*it).givenName() + " " + (*it).additionalName() + " " + (*it).familyName() + " " + @@ -71,7 +71,7 @@ void TagMailDlg::slotSelectAddress() if (n.isEmpty() || (emails[i].find( "<" ) != -1)) addr = ""; else { /* do we really need quotes around this name ? */ - if (n.find(QRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) + if (n.find(TQRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) addr = qConfig.attrValueQuotation + n + qConfig.attrValueQuotation + " "; else addr = n + " "; diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.h b/quanta/dialogs/tagdialogs/tagmaildlg.h index 590c646b..32dffaa5 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.h +++ b/quanta/dialogs/tagdialogs/tagmaildlg.h @@ -25,7 +25,7 @@ class TagMailDlg : public TagMail { Q_OBJECT public: - TagMailDlg(QWidget *parent=0, const char *name=0); + TagMailDlg(TQWidget *parent=0, const char *name=0); ~TagMailDlg(); private slots: // Private slots /** Select a mail address, using the KABC */ diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.cpp b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp index 13893a53..9313bb08 100644 --- a/quanta/dialogs/tagdialogs/tagmiscdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.cpp @@ -16,14 +16,14 @@ #include "tagmiscdlg.h" #include "tagmisc.h" #include <klocale.h> -#include <qlineedit.h> -#include <qcheckbox.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> -TagMiscDlg::TagMiscDlg( QWidget* parent, const char* name, bool addClosingTag, const QString &element ) +TagMiscDlg::TagMiscDlg( TQWidget* parent, const char* name, bool addClosingTag, const TQString &element ) :KDialogBase( parent, name, true, i18n("Misc. Tag"), KDialogBase::Ok | KDialogBase::Cancel ) { miscWidget = new TagMisc(this); - connect( miscWidget->elementName, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotMiscTagChanged(const QString & ) ) ); + connect( miscWidget->elementName, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotMiscTagChanged(const TQString & ) ) ); setMainWidget(miscWidget); miscWidget->addClosingTag->setChecked(addClosingTag); miscWidget->elementName->setText(element); @@ -35,13 +35,13 @@ TagMiscDlg::~TagMiscDlg() } -void TagMiscDlg::slotMiscTagChanged( const QString &_tag ) +void TagMiscDlg::slotMiscTagChanged( const TQString &_tag ) { enableButtonOK( !_tag.isEmpty() ); } -QString TagMiscDlg::elementTagName() const +TQString TagMiscDlg::elementTagName() const { return miscWidget->elementName->text(); } diff --git a/quanta/dialogs/tagdialogs/tagmiscdlg.h b/quanta/dialogs/tagdialogs/tagmiscdlg.h index 8e9ded91..e8d68c3d 100644 --- a/quanta/dialogs/tagdialogs/tagmiscdlg.h +++ b/quanta/dialogs/tagdialogs/tagmiscdlg.h @@ -26,14 +26,14 @@ class TagMiscDlg : public KDialogBase Q_OBJECT public: - TagMiscDlg( QWidget* parent = 0, const char* name = 0, bool addClosingTag=true, const QString &element=QString::null ); + TagMiscDlg( TQWidget* parent = 0, const char* name = 0, bool addClosingTag=true, const TQString &element=TQString::null ); ~TagMiscDlg(); - QString elementTagName() const; + TQString elementTagName() const; bool addClosingTag() const; protected slots: - void slotMiscTagChanged( const QString & ); + void slotMiscTagChanged( const TQString & ); private: TagMisc *miscWidget; diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp index ef971e83..7a9edbdb 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.cpp @@ -16,15 +16,15 @@ ***************************************************************************/ #include "tagquicklistdlg.h" #include "tagquicklistdlg.moc" -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qspinbox.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qgroupbox.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqspinbox.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqgroupbox.h> -TagQuickListDlg::TagQuickListDlg(QWidget *parent, const char *name) - : QDialog(parent,name,true) +TagQuickListDlg::TagQuickListDlg(TQWidget *parent, const char *name) + : TQDialog(parent,name,true) { setCaption(name); @@ -33,8 +33,8 @@ TagQuickListDlg::TagQuickListDlg(QWidget *parent, const char *name) groupBox->insert(radioOrdered); groupBox->insert(radioUnordered); - connect( buttonOk, SIGNAL(clicked()), SLOT(accept()) ); - connect( buttonCancel, SIGNAL(clicked()), SLOT(reject()) ); + connect( buttonOk, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) ); + connect( buttonCancel, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) ); } TagQuickListDlg::~TagQuickListDlg(){ diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlg.h b/quanta/dialogs/tagdialogs/tagquicklistdlg.h index f2426fb3..90ea666b 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlg.h +++ b/quanta/dialogs/tagdialogs/tagquicklistdlg.h @@ -18,9 +18,9 @@ #ifndef TAGQUICKLISTDLG_H #define TAGQUICKLISTDLG_H -#include <qwidget.h> +#include <tqwidget.h> -#include <qdialog.h> +#include <tqdialog.h> class QLabel; class QSpinBox; class QPushButton; @@ -31,22 +31,22 @@ class QButtonGroup; *@author Dmitry Poplavsky & Yacovlev Alexander */ -class TagQuickListDlg : public QDialog { +class TagQuickListDlg : public TQDialog { Q_OBJECT public: - TagQuickListDlg(QWidget *parent=0, const char *name=0); + TagQuickListDlg(TQWidget *parent=0, const char *name=0); ~TagQuickListDlg(); public: void initDialog(); - QLabel *QLabel_1; - QSpinBox *spinBoxRows; - QPushButton *buttonOk; - QLabel *QLabel_2; - QRadioButton *radioOrdered; - QRadioButton *radioUnordered; - QPushButton *buttonCancel; - QButtonGroup *groupBox; + TQLabel *QLabel_1; + TQSpinBox *spinBoxRows; + TQPushButton *buttonOk; + TQLabel *QLabel_2; + TQRadioButton *radioOrdered; + TQRadioButton *radioUnordered; + TQPushButton *buttonCancel; + TQButtonGroup *groupBox; private: }; diff --git a/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp index 331aefbb..f7e7b713 100644 --- a/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagquicklistdlgdata.cpp @@ -9,24 +9,24 @@ **********************************************************************/ #include <kapplication.h> #include <klocale.h> -#include <qbuttongroup.h> +#include <tqbuttongroup.h> #include "tagquicklistdlg.h" -#include <qspinbox.h> -#include <qlabel.h> +#include <tqspinbox.h> +#include <tqlabel.h> #include <kpushbutton.h> -#include <qradiobutton.h> +#include <tqradiobutton.h> #include <kstdguiitem.h> void TagQuickListDlg::initDialog() { resize(230,150); - QLabel_1= new QLabel(this,"NoName"); + QLabel_1= new TQLabel(this,"NoName"); QLabel_1->setGeometry(10,10,100,30); QLabel_1->setMinimumSize(0,0); QLabel_1->setText(i18n("Rows:")); - spinBoxRows= new QSpinBox(this,"NoName"); + spinBoxRows= new TQSpinBox(this,"NoName"); spinBoxRows->setGeometry(120,10,100,25); spinBoxRows->setMinimumSize(0,0); spinBoxRows->setRange(1,99); @@ -35,27 +35,27 @@ void TagQuickListDlg::initDialog() buttonOk->setGeometry(10,110,100,30); buttonOk->setMinimumSize(0,0); - QLabel_2= new QLabel(this,"NoName"); + QLabel_2= new TQLabel(this,"NoName"); QLabel_2->setGeometry(10,40,100,30); QLabel_2->setMinimumSize(0,0); QLabel_2->setText(i18n("Style:")); - buttonCancel= new QPushButton(this,"NoName"); + buttonCancel= new TQPushButton(this,"NoName"); buttonCancel->setGeometry(120,110,100,30); buttonCancel->setMinimumSize(0,0); buttonCancel->setText(KStdGuiItem::cancel().text()); - groupBox= new QButtonGroup(this,"NoName"); + groupBox= new TQButtonGroup(this,"NoName"); groupBox->setGeometry(120,40,100,60); groupBox->setMinimumSize(0,0); - radioOrdered= new QRadioButton(groupBox,"NoName"); + radioOrdered= new TQRadioButton(groupBox,"NoName"); radioOrdered->setGeometry(5,5,90,25); radioOrdered->setMinimumSize(0,0); radioOrdered->setText(i18n("Ordered")); radioOrdered->setChecked(true); - radioUnordered= new QRadioButton(groupBox,"NoName"); + radioUnordered= new TQRadioButton(groupBox,"NoName"); radioUnordered->setGeometry(5,30,90,25); radioUnordered->setMinimumSize(0,0); radioUnordered->setText(i18n("Unordered")); diff --git a/quanta/dialogs/tagdialogs/tagwidget.cpp b/quanta/dialogs/tagdialogs/tagwidget.cpp index 0d01f7a3..014549bc 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.cpp +++ b/quanta/dialogs/tagdialogs/tagwidget.cpp @@ -15,11 +15,11 @@ ***************************************************************************/ // QT files -#include <qcombobox.h> +#include <tqcombobox.h> #include <klineedit.h> -#include <qstring.h> -#include <qspinbox.h> -#include <qcheckbox.h> +#include <tqstring.h> +#include <tqspinbox.h> +#include <tqcheckbox.h> // KDE files #include <kcolorbutton.h> @@ -30,7 +30,7 @@ #include "tagdialog.h" #include "resource.h" -TagWidget::TagWidget(QObject *parent, const char *) +TagWidget::TagWidget(TQObject *parent, const char *) { baseURL = ((TagDialog *)parent)->baseURL(); } @@ -38,9 +38,9 @@ TagWidget::TagWidget(QObject *parent, const char *) TagWidget::~TagWidget(){ } -void TagWidget::updateDict(const QString &attr, QComboBox *combo ) +void TagWidget::updateDict(const TQString &attr, TQComboBox *combo ) { - QString *s = new QString(combo->currentText()); + TQString *s = new TQString(combo->currentText()); if (s->isEmpty()) { dict->remove(attr); @@ -50,7 +50,7 @@ void TagWidget::updateDict(const QString &attr, QComboBox *combo ) dict->replace(attr, s); } -void TagWidget::setValue(const QString &val, QComboBox *combo) +void TagWidget::setValue(const TQString &val, TQComboBox *combo) { bool found = false; int num = combo->count(); @@ -68,24 +68,24 @@ void TagWidget::setValue(const QString &val, QComboBox *combo) combo->setEditText(val); } -void TagWidget::setValue(const QString &val, QLineEdit *line) +void TagWidget::setValue(const TQString &val, TQLineEdit *line) { line->setText(val); } -void TagWidget::setValue(const QString &val, QSpinBox *spin) +void TagWidget::setValue(const TQString &val, TQSpinBox *spin) { spin->setValue(val.toInt()); } -void TagWidget::setValue(const QString &val, KColorButton *button) +void TagWidget::setValue(const TQString &val, KColorButton *button) { button->setColor(val); } -void TagWidget::updateDict(const QString &attr, QLineEdit *line ) +void TagWidget::updateDict(const TQString &attr, TQLineEdit *line ) { - QString *s = new QString(line->text()); + TQString *s = new TQString(line->text()); if (s->isEmpty()) { dict->remove(attr); @@ -95,9 +95,9 @@ void TagWidget::updateDict(const QString &attr, QLineEdit *line ) dict->replace(attr, s); } -void TagWidget::updateDict(const QString &attr, QSpinBox *spin ) +void TagWidget::updateDict(const TQString &attr, TQSpinBox *spin ) { - QString *s = new QString(spin->text()); + TQString *s = new TQString(spin->text()); if (s->isEmpty()) { dict->remove(attr); @@ -107,13 +107,13 @@ void TagWidget::updateDict(const QString &attr, QSpinBox *spin ) dict->replace(attr, s); } -void TagWidget::updateDict(const QString &attr, QCheckBox *check ) +void TagWidget::updateDict(const TQString &attr, TQCheckBox *check ) { if (!check->isChecked()) dict->remove(attr); else { if (!dict->find(attr)) - dict->insert(attr, new QString("")); + dict->insert(attr, new TQString("")); } } diff --git a/quanta/dialogs/tagdialogs/tagwidget.h b/quanta/dialogs/tagdialogs/tagwidget.h index 89f8e371..83508aab 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.h +++ b/quanta/dialogs/tagdialogs/tagwidget.h @@ -17,8 +17,8 @@ #ifndef TAGWIDGET_H #define TAGWIDGET_H -#include <qwidget.h> -#include <qdict.h> +#include <tqwidget.h> +#include <tqdict.h> class QComboBox; class QLineEdit; @@ -33,23 +33,23 @@ class KURL; class TagWidget { public: - TagWidget(QObject *parent=0, const char *name=0); + TagWidget(TQObject *parent=0, const char *name=0); virtual ~TagWidget(); - virtual void readAttributes(QDict<QString> *) {}; - virtual void writeAttributes(QDict<QString> *) {}; - void updateDict(const QString &attr, QComboBox *combo); - void updateDict(const QString &attr, QLineEdit *line); - void updateDict(const QString &attr, QSpinBox *spin); - void updateDict(const QString &attr, QCheckBox *check); + virtual void readAttributes(TQDict<TQString> *) {}; + virtual void writeAttributes(TQDict<TQString> *) {}; + void updateDict(const TQString &attr, TQComboBox *combo); + void updateDict(const TQString &attr, TQLineEdit *line); + void updateDict(const TQString &attr, TQSpinBox *spin); + void updateDict(const TQString &attr, TQCheckBox *check); - void setValue(const QString &val, QComboBox *combo); - void setValue(const QString &val, QLineEdit *line); - void setValue(const QString &val, QSpinBox *spin); - void setValue(const QString &val, KColorButton *button); + void setValue(const TQString &val, TQComboBox *combo); + void setValue(const TQString &val, TQLineEdit *line); + void setValue(const TQString &val, TQSpinBox *spin); + void setValue(const TQString &val, KColorButton *button); protected: - QDict<QString> *dict; // dictionary of attributes and values + TQDict<TQString> *dict; // dictionary of attributes and values KURL baseURL; }; diff --git a/quanta/dialogs/tagdialogs/tagxml.cpp b/quanta/dialogs/tagdialogs/tagxml.cpp index c9114d62..5c07b341 100644 --- a/quanta/dialogs/tagdialogs/tagxml.cpp +++ b/quanta/dialogs/tagdialogs/tagxml.cpp @@ -21,22 +21,22 @@ #include <kdebug.h> #include <klocale.h> -#include <qcheckbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include "styleeditor.h" -Tagxml::Tagxml( QDomNode &d, QTag *dtdTag, QWidget *parent, const char *name) - :QWidget(parent,name), TagWidget(parent,name), doc(d) +Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, TQWidget *parent, const char *name) + :TQWidget(parent,name), TagWidget(parent,name), doc(d) { initialize(d, dtdTag); } -Tagxml::Tagxml( QDomNode &d, QTag *dtdTag, const QString& selection, QWidget *parent, const char *name) - : QWidget(parent,name), TagWidget(parent,name), doc(d), m_selection(selection) +Tagxml::Tagxml( TQDomNode &d, QTag *dtdTag, const TQString& selection, TQWidget *parent, const char *name) + : TQWidget(parent,name), TagWidget(parent,name), doc(d), m_selection(selection) { initialize(d, dtdTag); } @@ -45,24 +45,24 @@ Tagxml::~Tagxml() { } -void Tagxml::initialize(QDomNode &d, QTag *dtdTag) +void Tagxml::initialize(TQDomNode &d, QTag *dtdTag) { m_dtd = dtdTag->parentDTD; m_dtdTag = dtdTag; - QGridLayout *grid = new QGridLayout( this ); + TQGridLayout *grid = new TQGridLayout( this ); grid->setSpacing( 13 ); grid->setMargin( 11 ); m_firstItem = 0L; //parse the tag XML file, in order to build up the dialog - for ( QDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) { - QDomNode location = findChild(n,"location"); + TQDomNode location = findChild(n,"location"); if ( location.isNull() ) continue; //debug( n.nodeName() ); - QDomElement el = location.toElement(); + TQDomElement el = location.toElement(); int row = el.attribute("row","0").toInt(); int col = el.attribute("col","0").toInt(); @@ -78,34 +78,34 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) // qDebug("%s col:%d row:%d cs:%d, rs:%d", n.nodeName().data(), col,row,colspan,rowspan ); - QString tip; - QDomNode tooltip = findChild( n ,"tooltip" ); + TQString tip; + TQDomNode tooltip = findChild( n ,"tooltip" ); if ( !tooltip.isNull() ) { if ( tooltip.firstChild().isText() ) { - QDomText text = tooltip.firstChild().toText(); + TQDomText text = tooltip.firstChild().toText(); tip = text.data(); } } - QString whatsThis; - QDomNode what = findChild( n ,"whatsthis" ); + TQString whatsThis; + TQDomNode what = findChild( n ,"whatsthis" ); if ( !what.isNull() ) { if ( what.firstChild().isText() ) { - QDomText text = what.firstChild().toText(); + TQDomText text = what.firstChild().toText(); whatsThis = text.data(); } } if ( n.nodeName() == "label" ) //a static label { - QLabel *label = new QLabel(this); - QDomElement ltext = findChild(n,"text").toElement(); + TQLabel *label = new TQLabel(this); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) - label->setText( ltext.text().isEmpty() ? QString("") : (ltext.text()+":") ); + label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); if ( !tip.isNull() ) - QToolTip::add( label, tip ); + TQToolTip::add( label, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); grid->addMultiCellWidget( label, row, row+rowspan, col, col+colspan ); } @@ -113,19 +113,19 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) if ( n.nodeName() == "attr" ) //an attribute { - QDomElement el(n.toElement()); - QString type = el.attribute("type","input"); + TQDomElement el(n.toElement()); + TQString type = el.attribute("type","input"); - QDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() && (type != "check") ) //if there is a text label for the attribute { - QLabel *label = new QLabel(this); - label->setText( ltext.text().isEmpty() ? QString("") : (ltext.text()+":") ); + TQLabel *label = new TQLabel(this); + label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); if ( !tip.isNull() ) - QToolTip::add( label, tip ); + TQToolTip::add( label, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( label, whatsThis ); + TQWhatsThis::add( label, whatsThis ); grid->addMultiCellWidget( label, textrow, textrow+textrowspan, textcol, textcol+textcolspan ); } @@ -137,9 +137,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_line *attr = new Attr_line(el, w, m_dtdTag); attributes.append(attr); @@ -149,16 +149,16 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) else if ( type == "check" ) { - QCheckBox *w = new QCheckBox(this); + TQCheckBox *w = new TQCheckBox(this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); - QDomElement ltext = findChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) w->setText( ltext.text() ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_check *attr = new Attr_check(el, w, m_dtdTag); attributes.append(attr); @@ -167,12 +167,12 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) } else if ( type == "list" ) { - QComboBox *w = new QComboBox(true, this); + TQComboBox *w = new TQComboBox(true, this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_list *attr = new Attr_list(el, w, dtdTag); attributes.append(attr); if (!m_firstItem) @@ -184,9 +184,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_color *attr = new Attr_color(el, w, m_dtdTag); attributes.append(attr); @@ -199,9 +199,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_file *attr = new Attr_file(el, w, m_dtdTag); attributes.append(attr); if (!m_firstItem) @@ -215,9 +215,9 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); if ( !tip.isNull() ) - QToolTip::add( w, tip ); + TQToolTip::add( w, tip ); if ( !whatsThis.isNull() ) - QWhatsThis::add( w, whatsThis ); + TQWhatsThis::add( w, whatsThis ); Attr_line *attr = new Attr_line(el, w->lineEdit(), m_dtdTag); attributes.append(attr); @@ -231,14 +231,14 @@ void Tagxml::initialize(QDomNode &d, QTag *dtdTag) if ( n.nodeName() == "spacer") { - QDomElement el = n.toElement(); + TQDomElement el = n.toElement(); - QSpacerItem* spacer; + TQSpacerItem* spacer; if ( el.attribute("orientation","v") == "v" ) - spacer = new QSpacerItem( 5, 10, QSizePolicy::Fixed, QSizePolicy::Expanding ); + spacer = new TQSpacerItem( 5, 10, TQSizePolicy::Fixed, TQSizePolicy::Expanding ); else - spacer = new QSpacerItem( 10, 5, QSizePolicy::Expanding, QSizePolicy::Fixed ); + spacer = new TQSpacerItem( 10, 5, TQSizePolicy::Expanding, TQSizePolicy::Fixed ); grid->addItem(spacer,row,col); } @@ -251,9 +251,9 @@ void Tagxml::focusToFirstItem() m_firstItem->setFocus(); } -void Tagxml::readAttributes( QDict<QString> *d ) +void Tagxml::readAttributes( TQDict<TQString> *d ) { - QString name,value; + TQString name,value; Attr * attr = attributes.first(); while ( attr ) { @@ -270,10 +270,10 @@ void Tagxml::readAttributes( QDict<QString> *d ) { if (m_dtd->booleanAttributes == "simple") { - d->replace(name, new QString("") ); + d->replace(name, new TQString("") ); } else { - d->replace(name, new QString(m_dtd->booleanTrue)); //it seems that browsers don't like <input disabled="false">, so if a checkbox is false, don't put in the tag at all + d->replace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like <input disabled="false">, so if a checkbox is false, don't put in the tag at all } } else @@ -283,16 +283,16 @@ void Tagxml::readAttributes( QDict<QString> *d ) /* } else { value = (value == "checked")?m_dtd->booleanTrue:m_dtd->booleanFalse; - d->replace(name, new QString(value)); + d->replace(name, new TQString(value)); } */ } else if (dynamic_cast<Attr_file *>(attr)) { // value = KURL::encode_string(value); - d->replace(name, new QString(value)); + d->replace(name, new TQString(value)); } else { - value.replace(QRegExp("&(?!amp;)"), "&"); - d->replace(name, new QString(value) ); + value.replace(TQRegExp("&(?!amp;)"), "&"); + d->replace(name, new TQString(value) ); } } @@ -302,9 +302,9 @@ void Tagxml::readAttributes( QDict<QString> *d ) } -void Tagxml::writeAttributes( QDict<QString> *d ) +void Tagxml::writeAttributes( TQDict<TQString> *d ) { - QString name,value; + TQString name,value; Attr * attr = attributes.first(); @@ -313,7 +313,7 @@ void Tagxml::writeAttributes( QDict<QString> *d ) name = attr->attrName(); - QString *v = d->find(name); + TQString *v = d->find(name); if ( v ) { v->replace("&","&"); if ( dynamic_cast<Attr_check *>(attr) ) // checkbox diff --git a/quanta/dialogs/tagdialogs/tagxml.h b/quanta/dialogs/tagdialogs/tagxml.h index 52c2973d..780b6b91 100644 --- a/quanta/dialogs/tagdialogs/tagxml.h +++ b/quanta/dialogs/tagdialogs/tagxml.h @@ -18,37 +18,37 @@ #ifndef TAGXML_H #define TAGXML_H -#include <qwidget.h> -#include <qdom.h> -#include <qptrlist.h> +#include <tqwidget.h> +#include <tqdom.h> +#include <tqptrlist.h> #include "tagattr.h" #include "tagwidget.h" #include "qtag.h" -class Tagxml : public QWidget, TagWidget { +class Tagxml : public TQWidget, TagWidget { Q_OBJECT public: /** construtor */ - Tagxml(QDomNode &d, QTag *dtdTag, QWidget* parent=0, const char *name=0); - Tagxml(QDomNode &d, QTag *dtdTag, const QString& selection, QWidget* parent=0, const char *name=0); + Tagxml(TQDomNode &d, QTag *dtdTag, TQWidget* parent=0, const char *name=0); + Tagxml(TQDomNode &d, QTag *dtdTag, const TQString& selection, TQWidget* parent=0, const char *name=0); /** destructor */ ~Tagxml(); - QPtrList<Attr> attributes; + TQPtrList<Attr> attributes; - void readAttributes( QDict<QString> *d); - void writeAttributes( QDict<QString> *d ); + void readAttributes( TQDict<TQString> *d); + void writeAttributes( TQDict<TQString> *d ); void focusToFirstItem(); private: - void initialize(QDomNode &d, QTag *dtdTag); + void initialize(TQDomNode &d, QTag *dtdTag); - QDomNode doc; + TQDomNode doc; const DTDStruct *m_dtd; - QWidget *m_firstItem; + TQWidget *m_firstItem; QTag *m_dtdTag; - QString m_selection; + TQString m_selection; }; |