summaryrefslogtreecommitdiffstats
path: root/kommander/editor/assoctexteditorimpl.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/editor/assoctexteditorimpl.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor/assoctexteditorimpl.cpp')
-rw-r--r--kommander/editor/assoctexteditorimpl.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp
index cb5502a2..76bf67f6 100644
--- a/kommander/editor/assoctexteditorimpl.cpp
+++ b/kommander/editor/assoctexteditorimpl.cpp
@@ -70,7 +70,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
// text editor
/* associatedTextEdit->setFont(KGlobalSettings::fixedFont());
associatedTextEdit->setTabStopWidth(associatedTextEdit->fontMetrics().maxWidth() * 3);
- associatedTextEdit->setTextFormat(Qt::PlainText);*/
+ associatedTextEdit->setTextFormat(TQt::PlainText);*/
// icon for non-empty scripts
scriptPixmap = KGlobal::iconLoader()->loadIcon("source", KIcon::Small);
@@ -89,10 +89,10 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
break;
}
- doc = KTextEditor::createDocument ("libkatepart", a_parent, "KTextEditor::Document");
- TQGridLayout *layout = new TQGridLayout(editorFrame, 1, 1);
+ doc = KTextEditor::createDocument ("libkatepart", TQT_TQOBJECT(a_parent), "KTextEditor::Document");
+ TQGridLayout *tqlayout = new TQGridLayout(editorFrame, 1, 1);
view = doc->createView(editorFrame);
- layout->addWidget(view, 1,1);
+ tqlayout->addWidget(view, 1,1);
partManager->addPart(doc, true);
//trick to import all the KatePart actions into the dialog
@@ -113,7 +113,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
if (a)
a->plug(popup);
popup->insertSeparator();
- a = view->actionCollection()->action("edit_find");
+ a = view->actionCollection()->action("edit_tqfind");
if (a)
a->plug(popup);
a = view->actionCollection()->action("edit_find_next");
@@ -122,7 +122,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
a = view->actionCollection()->action("edit_find_prev");
if (a)
a->plug(popup);
- a = view->actionCollection()->action("edit_replace");
+ a = view->actionCollection()->action("edit_tqreplace");
if (a)
a->plug(popup);
popup->insertSeparator();
@@ -208,7 +208,7 @@ void AssocTextEditor::setWidget(TQWidget *a_widget)
++at_it;
}
else
- m_atdict[(*s_it)] = TQString::null;
+ m_atdict[(*s_it)] = TQString();
}
m_populationText = a_atw->populationText();
@@ -246,7 +246,7 @@ void AssocTextEditor::setWidget(TQWidget *a_widget)
undoIf->clearUndo();
- if (openedWidgets.contains(m_widget))
+ if (openedWidgets.tqcontains(m_widget))
{
if (readOnlyAction && !readOnly)
readOnlyAction->activate();
@@ -268,23 +268,23 @@ void AssocTextEditor::save() const
if (atw->associatedText() != associatedText())
{
- TQString text = i18n("Set the \'text association\' of \'%1\'").arg(m_widget->name());
+ TQString text = i18n("Set the \'text association\' of \'%1\'").tqarg(m_widget->name());
SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow,
- m_widget, m_propertyEditor, "associations", atw->associatedText(),
- associatedText(), TQString::null, TQString::null, false);
+ TQT_TQOBJECT(m_widget), m_propertyEditor, "associations", atw->associatedText(),
+ associatedText(), TQString(), TQString(), false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(m_widget, "associations", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(m_widget), "associations", true);
}
if (atw->populationText() != populationText())
{
- TQString text = i18n("Set the \'population text\' of \'%1\'").arg(m_widget->name());
- SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, m_widget,
+ TQString text = i18n("Set the \'population text\' of \'%1\'").tqarg(m_widget->name());
+ SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, TQT_TQOBJECT(m_widget),
m_propertyEditor, "populationText", atw->populationText(),
- populationText(), TQString::null, TQString::null, false);
+ populationText(), TQString(), TQString(), false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(m_widget, "populationText", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(m_widget), "populationText", true);
}
}
@@ -305,7 +305,7 @@ TQString AssocTextEditor::populationText() const
TQStringList AssocTextEditor::buildWidgetList()
{
TQStringList widgetList;
- TQObject* thisObject = m_formWindow->mainContainer();
+ TQObject* thisObject = TQT_TQOBJECT(m_formWindow->mainContainer());
TQObjectList *objectList = thisObject->queryList();
objectList->prepend(thisObject);
@@ -314,10 +314,10 @@ TQStringList AssocTextEditor::buildWidgetList()
// There is a warning message with the property() function if it does not exist.
// Verify the property exists with the meta information first */
bool pExists = false;
- TQMetaObject *metaObj = it.current()->metaObject();
+ TQMetaObject *metaObj = it.current()->tqmetaObject();
if(metaObj)
{
- int id = metaObj->findProperty("KommanderWidget", true);
+ int id = metaObj->tqfindProperty("KommanderWidget", true);
const TQMetaProperty *metaProp = metaObj->property(id, true);
if(metaProp && metaProp->isValid())
pExists = true;
@@ -363,7 +363,7 @@ void AssocTextEditor::stateChanged(int a_index)
{
if (hlIf->hlModeSectionName(i) == "Scripts")
highlightPopup->insertItem(hlIf->hlModeName(i), i);
- if (hlIf->hlModeName(i).contains(hlType, false) > 0)
+ if (hlIf->hlModeName(i).tqcontains(hlType, false) > 0)
{
hlIf->setHlMode(i);
highlightPopup->setItemChecked(i, true);
@@ -427,7 +427,7 @@ void AssocTextEditor::insertFile()
TQFile insertFile(fileName);
if(!insertFile.open(IO_ReadOnly))
{
- KMessageBox::error( this, i18n("<qt>Cannot open file<br><b>%1</b></qt").arg( fileName ) );
+ KMessageBox::error( this, i18n("<qt>Cannot open file<br><b>%1</b></qt").tqarg( fileName ) );
return;
}
TQTextStream insertStream(&insertFile);
@@ -454,9 +454,9 @@ void AssocTextEditor::insertFunction()
TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted)
{
if (!widget)
- return TQString::null;
+ return TQString();
else if (formatted)
- return TQString("%1 (%2)").arg(widget->name()).arg(widget->className());
+ return TQString("%1 (%2)").tqarg(widget->name()).tqarg(widget->className());
else
return widget->name();
}
@@ -464,7 +464,7 @@ TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted)
TQWidget* AssocTextEditor::widgetFromString(const TQString& name)
{
TQString realname = name;
- int i = realname.find(' ');
+ int i = realname.tqfind(' ');
if (i != -1)
realname.truncate(i);
return m_widgetList[realname];