summaryrefslogtreecommitdiffstats
path: root/kommander/editor/connectioneditorimpl.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/connectioneditorimpl.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/connectioneditorimpl.cpp')
-rw-r--r--kommander/editor/connectioneditorimpl.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp
index a430290e..e6a48fde 100644
--- a/kommander/editor/connectioneditorimpl.cpp
+++ b/kommander/editor/connectioneditorimpl.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
This file may be distributed and/or modified under the terms of the
GNU General Public License version 2 as published by the Free Software
@@ -44,14 +44,14 @@ static const char *const ignore_slots[] = {
"update()",
"update(int,int,int,int)",
"update(const TQRect&)",
- "repaint()",
- "repaint(bool)",
- "repaint(int,int,int,int,bool)",
- "repaint(const TQRect&,bool)",
- "repaint(const TQRegion&,bool)",
- "repaint(int,int,int,int)",
- "repaint(const TQRect&)",
- "repaint(const TQRegion&)",
+ "tqrepaint()",
+ "tqrepaint(bool)",
+ "tqrepaint(int,int,int,int,bool)",
+ "tqrepaint(const TQRect&,bool)",
+ "tqrepaint(const TQRegion&,bool)",
+ "tqrepaint(int,int,int,int)",
+ "tqrepaint(const TQRect&)",
+ "tqrepaint(const TQRegion&)",
//"show()",
//"hide()",
"iconify()",
@@ -89,13 +89,13 @@ static const char *const ignore_signals[] = {
};
-ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* rcvr, FormWindow* fw)
- : ConnectionEditorBase(parent, 0, true), m_formWindow(fw)
+ConnectionEditor::ConnectionEditor(TQWidget* tqparent, TQObject* sndr, TQObject* rcvr, FormWindow* fw)
+ : ConnectionEditorBase(tqparent, 0, true), m_formWindow(fw)
{
- if (!rcvr || rcvr == m_formWindow)
- rcvr = m_formWindow->mainContainer();
- if (!sndr || sndr == m_formWindow)
- sndr = m_formWindow->mainContainer();
+ if (!rcvr || TQT_BASE_OBJECT(rcvr) == TQT_BASE_OBJECT(m_formWindow))
+ rcvr = TQT_TQOBJECT(m_formWindow->mainContainer());
+ if (!sndr || TQT_BASE_OBJECT(sndr) == TQT_BASE_OBJECT(m_formWindow))
+ sndr = TQT_TQOBJECT(m_formWindow->mainContainer());
m_sender = sndr;
m_receiver = rcvr;
@@ -105,11 +105,11 @@ ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* r
for (TQPtrDictIterator<TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
{
if (it.current()->isVisibleTo(this) &&
- !it.current()->inherits("QLayoutWidget") &&
+ !it.current()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) &&
!it.current()->inherits("Spacer") &&
qstrcmp(it.current()->name(), "central widget") &&
- !m_formWindow->isMainContainer(it.current()) &&
- !lst.contains(it.current()->name()))
+ !m_formWindow->isMainContainer(TQT_TQOBJECT(it.current())) &&
+ !lst.tqcontains(it.current()->name()))
lst << it.current()->name();
}
@@ -152,21 +152,21 @@ bool ConnectionEditor::isSignalIgnored(const char *signal) const
return false;
}
-bool ConnectionEditor::isSlotIgnored(const QMetaData* md)
+bool ConnectionEditor::isSlotIgnored(const TQMetaData* md)
{
- if (md->access != QMetaData::Public && (md->access != QMetaData::Protected ||
- !m_formWindow->isMainContainer((TQWidget*)m_receiver)))
+ if (md->tqt_mo_access != TQMetaData::Public && (md->tqt_mo_access != TQMetaData::Protected ||
+ !m_formWindow->isMainContainer(TQT_TQOBJECT(m_receiver))))
return true;
for (int i = 0; ignore_slots[i]; i++)
- if (!qstrcmp(md->name, ignore_slots[i]))
+ if (!qstrcmp(md->tqt_mo_ci_name, ignore_slots[i]))
return true;
- if (!m_formWindow->isMainContainer((TQWidget *)m_receiver) && !qstrcmp(md->name, "close()"))
+ if (!m_formWindow->isMainContainer(TQT_TQOBJECT(m_receiver)) && !qstrcmp(md->tqt_mo_ci_name, "close()"))
return true;
- if (!qstrcmp(md->name, "setFocus()") && m_receiver->isWidgetType() &&
- ((TQWidget*)m_receiver)->focusPolicy() == TQWidget::NoFocus)
+ if (!qstrcmp(md->tqt_mo_ci_name, "setFocus()") && m_receiver->isWidgetType() &&
+ ((TQWidget*)m_receiver)->focusPolicy() == TQ_NoFocus)
return true;
for (int i = 0; i<comboSender->count(); i++)
- if (checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->text(i)).latin1(), m_receiver, md->name))
+ if (checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->text(i)).latin1(), m_receiver, md->tqt_mo_ci_name))
return false;
return true;
}
@@ -175,11 +175,11 @@ TQObject* ConnectionEditor::objectByName(const TQString& s) const
{
for (TQPtrDictIterator <TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
if (TQString(it.current()->name()) == s)
- return it.current();
+ return TQT_TQOBJECT(it.current());
for (TQPtrListIterator<TQAction> it(m_formWindow->actionList()); it.current(); ++it)
if (TQString(it.current()->name()) == s)
- return it.current();
+ return TQT_TQOBJECT(it.current());
return 0;
}
@@ -213,7 +213,7 @@ void ConnectionEditor::disconnectClicked()
if (!p_item)
return;
- TQMap <TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.find(p_item);
+ TQMap <TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.tqfind(p_item);
if (it != m_connections.end())
m_connections.remove(it);
delete p_item;
@@ -226,7 +226,7 @@ void ConnectionEditor::disconnectClicked()
void ConnectionEditor::okClicked()
{
MacroCommand* rmConn = 0, *addConn = 0;
- TQString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").arg(m_sender->name()).
+ TQString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").tqarg(m_sender->name()).
arg(m_receiver->name());
TQValueList <MetaDataBase::Connection>::Iterator cit;
if (!m_oldConnections.isEmpty())
@@ -274,13 +274,13 @@ void ConnectionEditor::senderChanged(const TQString& s)
if (!p_object)
return;
m_sender = p_object;
- TQStrList p_sigs = m_sender->metaObject()->signalNames(true);
+ TQStrList p_sigs = m_sender->tqmetaObject()->signalNames(true);
signalBox->clear();
for (TQStrListIterator it(p_sigs); it.current(); ++it)
- if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), Qt::ExactMatch))
+ if (!isSignalIgnored(it.current()) && !signalBox->tqfindItem(it.current(), TQt::ExactMatch))
signalBox->insertItem(it.current());
- if (m_sender == m_formWindow->mainContainer())
- signalBox->insertStringList(MetaDataBase::signalList(m_formWindow));
+ if (TQT_BASE_OBJECT(m_sender) == TQT_BASE_OBJECT(m_formWindow->mainContainer()))
+ signalBox->insertStringList(MetaDataBase::signalList(TQT_TQOBJECT(m_formWindow)));
signalBox->sort();
signalBox->setCurrentItem(signalBox->firstItem());
// Update slots - some may (not) have their signal equivalents now.
@@ -293,13 +293,13 @@ void ConnectionEditor::receiverChanged(const TQString& s)
if (!p_object)
return;
m_receiver = p_object;
- int n = m_receiver->metaObject()->numSlots(true);
+ int n = m_receiver->tqmetaObject()->numSlots(true);
slotBox->clear();
for (int i = 0; i < n; ++i)
{
- const QMetaData* md = m_receiver->metaObject()->slot(i, true);
- if (!isSlotIgnored(md) && !slotBox->findItem(md->name, Qt::ExactMatch))
- slotBox->insertItem(md->name);
+ const TQMetaData* md = m_receiver->tqmetaObject()->slot(i, true);
+ if (!isSlotIgnored(md) && !slotBox->tqfindItem(md->tqt_mo_ci_name, TQt::ExactMatch))
+ slotBox->insertItem(md->tqt_mo_ci_name);
}
slotBox->sort();
slotBox->setCurrentItem(slotBox->firstItem());
@@ -336,14 +336,14 @@ void ConnectionEditor::fillConnectionsList()
{
connectionView->clear();
m_connections.clear();
- m_oldConnections = MetaDataBase::connections(m_formWindow);
+ m_oldConnections = MetaDataBase::connections(TQT_TQOBJECT(m_formWindow));
if (!m_oldConnections.isEmpty())
{
TQValueList <MetaDataBase::Connection>::Iterator it = m_oldConnections.begin();
for (; it != m_oldConnections.end(); ++it)
{
- if (m_formWindow->isMainContainer((TQWidget*)(*it).receiver) &&
- !MetaDataBase::hasSlot(m_formWindow, MetaDataBase::normalizeSlot((*it).slot).latin1()))
+ if (m_formWindow->isMainContainer(TQT_TQOBJECT((*it).receiver)) &&
+ !MetaDataBase::hasSlot(TQT_TQOBJECT(m_formWindow), MetaDataBase::normalizeSlot((*it).slot).latin1()))
continue;
MetaDataBase::Connection conn = *it;
KListViewItem *i = new KListViewItem(connectionView, conn.sender->name(), conn.signal,