diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-14 16:45:05 +0000 |
commit | 48d4a26399959121f33d2bc3bfe51c7827b654fc (patch) | |
tree | 5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /lib/widgets/propeditor/propertyeditor.cpp | |
parent | 7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff) | |
download | tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip |
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/widgets/propeditor/propertyeditor.cpp')
-rw-r--r-- | lib/widgets/propeditor/propertyeditor.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/lib/widgets/propeditor/propertyeditor.cpp b/lib/widgets/propeditor/propertyeditor.cpp index 3cd974db..ce154236 100644 --- a/lib/widgets/propeditor/propertyeditor.cpp +++ b/lib/widgets/propeditor/propertyeditor.cpp @@ -42,14 +42,14 @@ namespace PropertyLib{ class PropertyItem: public KListViewItem{ public: - PropertyItem(PropertyEditor *parent, MultiProperty *property) - :KListViewItem(parent, property->description()), m_editor(parent), m_property(property), + PropertyItem(PropertyEditor *tqparent, MultiProperty *property) + :KListViewItem(tqparent, property->description()), m_editor(tqparent), m_property(property), m_changed(false) { } - PropertyItem(PropertyEditor *editor, KListViewItem *parent, MultiProperty *property) - :KListViewItem(parent, property->description()), m_editor(editor), + PropertyItem(PropertyEditor *editor, KListViewItem *tqparent, MultiProperty *property) + :KListViewItem(tqparent, property->description()), m_editor(editor), m_property(property), m_changed(false) { } @@ -120,13 +120,13 @@ private: class PropertyGroupItem: public KListViewItem{ public: - PropertyGroupItem(KListView *parent, const TQString &name) - :KListViewItem(parent, name) + PropertyGroupItem(KListView *tqparent, const TQString &name) + :KListViewItem(tqparent, name) { init(); } - PropertyGroupItem(KListViewItem *parent, const TQString &name) - :KListViewItem(parent, name) + PropertyGroupItem(KListViewItem *tqparent, const TQString &name) + :KListViewItem(tqparent, name) { init(); } @@ -158,14 +158,14 @@ private: class SeparatorItem: public KListViewItem{ public: - SeparatorItem(KListView *parent) - :KListViewItem(parent) + SeparatorItem(KListView *tqparent) + :KListViewItem(tqparent) { setSelectable(false); } }; -PropertyEditor::PropertyEditor(TQWidget *parent, const char *name) - :KListView(parent, name) +PropertyEditor::PropertyEditor(TQWidget *tqparent, const char *name) + :KListView(tqparent, name) { setSorting(-1); @@ -196,7 +196,7 @@ PropertyEditor::PropertyEditor(TQWidget *parent, const char *name) #else m_undoButton->setPixmap( TQPixmap("undo.xpm") ); #endif - m_undoButton->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); + m_undoButton->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); m_undoButton->resize(m_undoButton->height(), m_undoButton->height()); m_undoButton->hide(); connect(m_undoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(undo())); @@ -215,8 +215,8 @@ void PropertyEditor::populateProperties(PropertyList *list) return; m_list = list; connect(m_list, TQT_SIGNAL(propertyValueChanged(Property*)), this, TQT_SLOT(propertyValueChanged(Property*))); - const TQValueList<QPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup(); - for (TQValueList<QPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin(); + const TQValueList<TQPair<TQString, TQValueList<TQString> > >& groups = m_list->propertiesOfGroup(); + for (TQValueList<TQPair<TQString, TQValueList<TQString> > >::const_iterator it = groups.begin(); it != groups.end(); ++it) { // qWarning("PropertyEditor::populateProperties: adding group %s", (*it).first.ascii()); @@ -259,24 +259,24 @@ void PropertyEditor::addProperty(const TQString &name) addChildProperties(pitem); } -void PropertyEditor::addChildProperties(PropertyItem *parent) +void PropertyEditor::addChildProperties(PropertyItem *tqparent) { - MultiProperty *prop = parent->property(); + MultiProperty *prop = tqparent->property(); //force machine creation to get detailed properties appended to current multiproperty - if ( !m_registeredForType.contains(prop->name()) + if ( !m_registeredForType.tqcontains(prop->name()) && (PropertyMachineFactory::getInstance()->hasDetailedEditors(prop->type())) ) { //FIXME: find better solution machine(prop); } -// qWarning("seeking children: count: %d", prop->details.count()); +// qWarning("seeking tqchildren: count: %d", prop->details.count()); - parent->setOpen(true); + tqparent->setOpen(true); for (TQValueList<ChildProperty>::iterator it = prop->details.begin(); it != prop->details.end(); ++it) { // qWarning("found child %s", (*it).name().ascii()); - new PropertyItem(this, parent, new MultiProperty(&m_detailedList, &(*it))); + new PropertyItem(this, tqparent, new MultiProperty(&m_detailedList, &(*it))); } } @@ -301,11 +301,11 @@ void PropertyEditor::propertyValueChanged(Property *property) m_currentEditWidget->setValue(property->value(), false); else { -// repaint all items +// tqrepaint all items TQListViewItemIterator it(this); while (it.current()) { - repaintItem(it.current()); + tqrepaintItem(it.current()); ++it; } } @@ -323,15 +323,15 @@ void PropertyEditor::propertyChanged(MultiProperty *property, const TQVariant &v if (m_currentEditItem && (m_currentEditItem->property() == property)) { m_currentEditItem->setChanged(true); - repaintItem(m_currentEditItem); + tqrepaintItem(m_currentEditItem); } emit changed(); -/* if (m_list->contains(name)) +/* if (m_list->tqcontains(name)) { (*m_list)[name]->setValue(value, false); -// else if (m_detailedList->contains(*/ +// else if (m_detailedList->tqcontains(*/ } void PropertyEditor::hideEditor() @@ -360,11 +360,11 @@ void PropertyEditor::showEditor(PropertyItem *item) void PropertyEditor::placeEditor(PropertyItem *item) { - TQRect r = itemRect(item); + TQRect r = tqitemRect(item); if (!r.size().isValid()) { ensureItemVisible(item); - r = itemRect(item); + r = tqitemRect(item); } r.setX(header()->sectionPos(1)); @@ -386,7 +386,7 @@ void PropertyEditor::placeEditor(PropertyItem *item) m_currentEditLayout->addWidget(editor, 0, 0); m_currentEditLayout->addWidget(m_undoButton, 0, 1); m_currentEditArea->resize(r.size()); -// m_currentEditLayout->invalidate(); +// m_currentEditLayout->tqinvalidate(); moveChild(m_currentEditArea, r.x(), r.y()); m_currentEditWidget = editor; } @@ -447,7 +447,7 @@ Machine *PropertyEditor::machine(MultiProperty *property) m_registeredForType[name] = PropertyMachineFactory::getInstance()->machineForProperty(property); connect(m_registeredForType[name]->propertyEditor, TQT_SIGNAL(propertyChanged(MultiProperty*, const TQVariant&)), this, TQT_SLOT(propertyChanged(MultiProperty*, const TQVariant&))); - m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->childrenRect().topLeft()); + m_registeredForType[name]->propertyEditor->reparent(m_currentEditArea, 0, m_currentEditArea->tqchildrenRect().topLeft()); m_registeredForType[name]->propertyEditor->hide(); } return m_registeredForType[name]; @@ -470,7 +470,7 @@ void PropertyEditor::undo() m_currentEditWidget->undo(); m_currentEditItem->setChanged(false); - repaintItem(m_currentEditItem); + tqrepaintItem(m_currentEditItem); } } |