diff options
Diffstat (limited to 'kexi/formeditor')
-rw-r--r-- | kexi/formeditor/container.cpp | 22 | ||||
-rw-r--r-- | kexi/formeditor/editlistviewdialog.cpp | 2 | ||||
-rw-r--r-- | kexi/formeditor/factories/containerfactory.cpp | 4 | ||||
-rw-r--r-- | kexi/formeditor/factories/stdwidgetfactory.cpp | 8 | ||||
-rw-r--r-- | kexi/formeditor/form.cpp | 6 | ||||
-rw-r--r-- | kexi/formeditor/formIO.cpp | 14 | ||||
-rw-r--r-- | kexi/formeditor/formmanager.cpp | 18 | ||||
-rw-r--r-- | kexi/formeditor/utils.cpp | 10 | ||||
-rw-r--r-- | kexi/formeditor/utils.h | 6 | ||||
-rw-r--r-- | kexi/formeditor/widgetpropertyset.cpp | 2 |
10 files changed, 46 insertions, 46 deletions
diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index ae75caa2..d1a4b1b6 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -50,7 +50,7 @@ EventEater::EventEater(TQWidget *widget, TQObject *container) m_widget = widget; m_container = container; - installRecursiveEventFilter(TQT_TQOBJECT(m_widget), this); + installRecursiveEventFilter(m_widget, this); } bool @@ -83,7 +83,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev) EventEater::~EventEater() { if(m_widget) - removeRecursiveEventFilter(TQT_TQOBJECT(m_widget), TQT_TQOBJECT(this)); + removeRecursiveEventFilter(m_widget, this); } // Container itself @@ -161,7 +161,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) << "of type " << s->className() << endl; kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl; - m_moving = TQT_TQWIDGET(s); + m_moving = static_cast<TQWidget*>(s); TQMouseEvent *mev = static_cast<TQMouseEvent*>(e); m_grab = TQPoint(mev->x(), mev->y()); @@ -217,7 +217,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) tmpy *= gridX; } - m_insertBegin = (TQT_TQWIDGET(s))->mapTo(m_container, TQPoint(tmpx, tmpy)); + m_insertBegin = (static_cast<TQWidget*>(s))->mapTo(m_container, TQPoint(tmpx, tmpy)); if(m_form->formWidget()) m_form->formWidget()->initBuffer(); @@ -268,7 +268,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) return true; if(m_form->formWidget() && (tree->widget() != s)) - m_form->formWidget()->highlightWidgets(tree->widget(), TQT_TQWIDGET(s)); + m_form->formWidget()->highlightWidgets(tree->widget(), static_cast<TQWidget*>(s)); } else if(m_insertBegin!=TQPoint(-1,-1) && s == m_container && !m_toplevel && (mev->state() != TQt::ControlButton) && !FormManager::self()->isCreatingConnection()) // draw the selection rect { @@ -379,7 +379,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) } else if(kev->key() == FormManager::self()->contextMenuKey()) { - FormManager::self()->createContextMenu(TQT_TQWIDGET(s), this, false); + FormManager::self()->createContextMenu(static_cast<TQWidget*>(s), this, false); return true; } else if (kev->key() == Key_Delete) @@ -448,7 +448,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) case TQEvent::MouseButtonDblClick: // editing { kdDebug() << "Container: Mouse dbl click for widget " << s->name() << endl; - TQWidget *w = TQT_TQWIDGET(s); + TQWidget *w = static_cast<TQWidget*>(s); if(!w) return false; @@ -494,7 +494,7 @@ Container::handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev) } if(mev->button() == TQt::RightButton) // Right-click -> context menu { - FormManager::self()->createContextMenu(TQT_TQWIDGET(s), this); + FormManager::self()->createContextMenu(static_cast<TQWidget*>(s), this); } else if(mev->state() == (TQt::LeftButton|TQt::ControlButton))// && (m_copyRect.isValid())) { @@ -519,7 +519,7 @@ Container::handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev) if(m_form->selectedWidgets()->count() > 1) FormManager::self()->setInsertPoint( mev->pos() ); else - FormManager::self()->setInsertPoint( TQT_TQWIDGET(s)->mapTo(m_container, mev->pos() - m_grab) ); + FormManager::self()->setInsertPoint( static_cast<TQWidget*>(s)->mapTo(m_container, mev->pos() - m_grab) ); FormManager::self()->pasteWidget(); m_form->setInteractiveMode(true); @@ -1020,7 +1020,7 @@ void Container::drawInsertRect(TQMouseEvent *mev, TQObject *s) { int tmpx, tmpy; - TQPoint pos = TQT_TQWIDGET(s)->mapTo(m_container, mev->pos()); + TQPoint pos = static_cast<TQWidget*>(s)->mapTo(m_container, mev->pos()); int gridX = m_form->gridSize(); int gridY = m_form->gridSize(); if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (TQt::LeftButton|TQt::ControlButton|TQt::AltButton)) ) @@ -1175,7 +1175,7 @@ void DesignTimeDynamicChildWidgetHandler::childWidgetAdded(TQWidget* w) { if (m_item) { - installRecursiveEventFilter(TQT_TQOBJECT(w), m_item->eventEater()); + installRecursiveEventFilter(w, m_item->eventEater()); } } diff --git a/kexi/formeditor/editlistviewdialog.cpp b/kexi/formeditor/editlistviewdialog.cpp index 5dfc176a..55bf34e1 100644 --- a/kexi/formeditor/editlistviewdialog.cpp +++ b/kexi/formeditor/editlistviewdialog.cpp @@ -106,7 +106,7 @@ EditListViewDialog::EditListViewDialog(TQWidget *parent) // The "item properties" field m_editor = new KoProperty::Editor(m_column, "editcolumn_propeditor"); - m_propSet = new KoProperty::Set(TQT_TQOBJECT(this), "columns"); + m_propSet = new KoProperty::Set(this, "columns"); m_propSet->addProperty(new KoProperty::Property("caption", "Caption", i18n("Caption"),i18n("Caption"))); m_propSet->addProperty(new KoProperty::Property("width", 100, i18n("Width"), i18n("Width"))); m_propSet->addProperty(new KoProperty::Property("clickable", TQVariant(true), i18n("Clickable"), i18n("Clickable") )); diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp index 164dea27..f2fde913 100644 --- a/kexi/formeditor/factories/containerfactory.cpp +++ b/kexi/formeditor/factories/containerfactory.cpp @@ -541,7 +541,7 @@ ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, else if(c == "TQWidget" || c=="ContainerWidget") { TQWidget *w = new ContainerWidget(p, n); - new KFormDesigner::Container(container, w, TQT_TQOBJECT(p)); + new KFormDesigner::Container(container, w, p); return w; } else if(c == "TQGroupBox" || c == "GroupBox") @@ -752,7 +752,7 @@ ContainerFactory::readSpecialProperty(const TQCString &, TQDomElement &node, TQW if((name == "id") && (w->parentWidget()->isA("TQWidgetStack"))) { TQWidgetStack *stack = (TQWidgetStack*)w->parentWidget(); - int id = KFormDesigner::FormIO::readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt(); + int id = KFormDesigner::FormIO::readPropertyValue(node.firstChild(), w, name).toInt(); stack->addWidget(w, id); stack->raiseWidget(w); item->addModifiedProperty("id", id); diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp index 10107333..89326c20 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.cpp +++ b/kexi/formeditor/factories/stdwidgetfactory.cpp @@ -747,7 +747,7 @@ StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement & if((tag == "item") && (classname == "KComboBox")) { KComboBox *combo = (KComboBox*)w; - TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), TQT_TQOBJECT(w), name); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), w, name); if(val.canCast(TQVariant::Pixmap)) combo->insertItem(val.toPixmap()); else @@ -758,7 +758,7 @@ StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement & if((tag == "item") && (classname == "TDEListBox")) { TDEListBox *listbox = (TDEListBox*)w; - TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), TQT_TQOBJECT(w), name); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), w, name); if(val.canCast(TQVariant::Pixmap)) listbox->insertItem(val.toPixmap()); else @@ -773,7 +773,7 @@ StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement & for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling()) { TQString prop = n.toElement().attribute("name"); - TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), TQT_TQOBJECT(w), name); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), w, name); if(prop == "text") id = listview->addColumn(val.toString()); else if(prop == "width") @@ -833,7 +833,7 @@ StdWidgetFactory::readListItem(TQDomElement &node, TQListViewItem *parent, TDELi // and column texts else if((tag == "property") && (prop == "text")) { - TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), TQT_TQOBJECT(listview), "item"); + TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), listview, "item"); item->setText(i, val.toString()); i++; } diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp index 58fdf6c0..349210f1 100644 --- a/kexi/formeditor/form.cpp +++ b/kexi/formeditor/form.cpp @@ -536,15 +536,15 @@ Form::autoAssignTabStops() ++it; TQWidget *nextw = it.current(); TQObject *page_w = 0; - KFormDesigner::TabWidget *tab_w = KFormDesigner::findParent<KFormDesigner::TabWidget>(TQT_TQOBJECT(w), "KFormDesigner::TabWidget", page_w); + KFormDesigner::TabWidget *tab_w = KFormDesigner::findParent<KFormDesigner::TabWidget>(w, "KFormDesigner::TabWidget", page_w); while (nextw) { - if (KexiUtils::hasParent(TQT_TQOBJECT(w), TQT_TQOBJECT(nextw))) // do not group (sort) widgets where on is a child of another + if (KexiUtils::hasParent(w, nextw)) // do not group (sort) widgets where on is a child of another break; if (nextw->y() >= (w->y() + 20)) break; if (tab_w) { TQObject *page_nextw = 0; - KFormDesigner::TabWidget *tab_nextw = KFormDesigner::findParent<KFormDesigner::TabWidget>(TQT_TQOBJECT(nextw), "KFormDesigner::TabWidget", page_nextw); + KFormDesigner::TabWidget *tab_nextw = KFormDesigner::findParent<KFormDesigner::TabWidget>(nextw, "KFormDesigner::TabWidget", page_nextw); if (tab_w == tab_nextw) { if (page_w != page_nextw) // 'nextw' widget within different tab page break; diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index 62402bfa..188238fd 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -879,7 +879,7 @@ FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name) else if(type == "set") { WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(obj); - TQObject *subobject = (subpropIface && subpropIface->subwidget()) ? TQT_TQOBJECT(subpropIface->subwidget()) : obj; + TQObject *subobject = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : obj; const int count = subobject->metaObject()->findProperty(name.latin1(), true); const TQMetaProperty *meta = count!=-1 ? subobject->metaObject()->property(count, true) : 0; @@ -1343,7 +1343,7 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl if (node.attribute("subwidget")=="true") { //this is property for subwidget: remember it for delayed setting //because now the subwidget could be not created yet (true e.g. for KexiDBAutoField) - const TQVariant val( readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name) ); + const TQVariant val( readPropertyValue(node.firstChild(), w, name) ); kdDebug() << val.toStringList() << endl; item->addSubproperty( name.latin1(), val ); //subwidget->setProperty(name.latin1(), val); @@ -1353,23 +1353,23 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl // We cannot assign the buddy now as the buddy widget may not be created yet if(name == "buddy") - m_buddies->insert(readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toString(), (TQLabel*)w); + m_buddies->insert(readPropertyValue(node.firstChild(), w, name).toString(), (TQLabel*)w); else if(((eltag == "grid") || (eltag == "hbox") || (eltag == "vbox")) && item->container() && item->container()->layout()) { // We load the margin of a Layout if(name == "margin") { - int margin = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt(); + int margin = readPropertyValue(node.firstChild(), w, name).toInt(); item->container()->setLayoutMargin(margin); item->container()->layout()->setMargin(margin); } // We load the spacing of a Layout else if(name == "spacing") { - int spacing = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt(); + int spacing = readPropertyValue(node.firstChild(), w, name).toInt(); item->container()->setLayoutSpacing(spacing); item->container()->layout()->setSpacing(spacing); } else if((name == "justify")){ - bool justify = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toBool(); + bool justify = readPropertyValue(node.firstChild(), w, name).toBool(); KexiFlowLayout *flow = static_cast<KexiFlowLayout*>(item->container()->layout()); if(flow) flow->setJustified(justify); @@ -1389,7 +1389,7 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl } else // we have a normal property, let's load it { - TQVariant val( readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name) ); + TQVariant val( readPropertyValue(node.firstChild(), w, name) ); if(name == "geometry" && dynamic_cast<FormWidget*>(w)) { //fix geometry if needed - this is top level form widget TQRect r( val.toRect() ); diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp index d502d5e8..14584e20 100644 --- a/kexi/formeditor/formmanager.cpp +++ b/kexi/formeditor/formmanager.cpp @@ -297,8 +297,8 @@ FormManager::insertWidget(const TQCString &classname) if( ((TQWidget*)o)->ownCursor() ) { // form->d->cursors->insert(o->name(), ((TQWidget*)o)->cursor()); - form->d->cursors.insert(o, TQT_TQWIDGET(o)->cursor()); - TQT_TQWIDGET(o)->setCursor(TQCursor(TQt::CrossCursor)); + form->d->cursors.insert(o, static_cast<TQWidget*>(o)->cursor()); + static_cast<TQWidget*>(o)->setCursor(TQCursor(TQt::CrossCursor)); } } @@ -325,12 +325,12 @@ FormManager::stopInsert() TQObjectList *l = form->widget()->queryList( "TQWidget" ); for(TQObject *o = l->first(); o; o = l->next()) { - TQT_TQWIDGET(o)->unsetCursor(); + static_cast<TQWidget*>(o)->unsetCursor(); #if 0 if( ((TQWidget*)o)->ownCursor()) { TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.find(o) ); if (curIt!=form->d->cursors.constEnd()) - TQT_TQWIDGET(o)->setCursor( *curIt ); + static_cast<TQWidget*>(o)->setCursor( *curIt ); // ((TQWidget*)o)->setCursor( (*(form->d->cursors))[o->name()] ) ; } #endif @@ -376,11 +376,11 @@ FormManager::startCreatingConnection() TQObjectList *l = form->widget()->queryList( "TQWidget" ); for(TQObject *o = l->first(); o; o = l->next()) { - TQWidget *w = TQT_TQWIDGET(o); + TQWidget *w = static_cast<TQWidget*>(o); if( w->ownCursor() ) { - form->d->cursors.insert(TQT_TQOBJECT(w), w->cursor()); -// form->d->cursors->insert(TQT_TQOBJECT(w)->name(), w->cursor()); + form->d->cursors.insert(w, w->cursor()); +// form->d->cursors->insert(w->name(), w->cursor()); w->setCursor(TQCursor(PointingHandCursor )); } if(w->hasMouseTracking()) @@ -439,7 +439,7 @@ FormManager::stopCreatingConnection() if( w->ownCursor()) { TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.find(o) ); if (curIt!=form->d->cursors.constEnd()) - TQT_TQWIDGET(o)->setCursor( *curIt ); + static_cast<TQWidget*>(o)->setCursor( *curIt ); } // w->setCursor( (*(form->d->cursors))[o->name()] ) ; w->setMouseTracking( !form->d->mouseTrackers->grep(w->name()).isEmpty() ); @@ -1212,7 +1212,7 @@ FormManager::slotStyle() TQObjectList *l = activeForm()->widget()->queryList( "TQWidget" ); for(TQObject *o = l->first(); o; o = l->next()) - (TQT_TQWIDGET(o))->setStyle( style ); + (static_cast<TQWidget*>(o))->setStyle( style ); delete l; } diff --git a/kexi/formeditor/utils.cpp b/kexi/formeditor/utils.cpp index b04222f3..a55f121d 100644 --- a/kexi/formeditor/utils.cpp +++ b/kexi/formeditor/utils.cpp @@ -131,8 +131,8 @@ HorWidgetList::~HorWidgetList() int HorWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { - TQWidget *w1 = TQT_TQWIDGET(item1); - TQWidget *w2 = TQT_TQWIDGET(item2); + TQWidget *w1 = static_cast<TQWidget*>(item1); + TQWidget *w2 = static_cast<TQWidget*>(item2); return w1->mapTo(m_topLevelWidget, TQPoint(0,0)).x() - w2->mapTo(m_topLevelWidget, TQPoint(0,0)).x(); } @@ -150,8 +150,8 @@ VerWidgetList::~VerWidgetList() int VerWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { - TQWidget *w1 = TQT_TQWIDGET(item1); - TQWidget *w2 = TQT_TQWIDGET(item2); + TQWidget *w1 = static_cast<TQWidget*>(item1); + TQWidget *w2 = static_cast<TQWidget*>(item2); int y1, y2; TQObject *page1 = 0; @@ -165,7 +165,7 @@ int VerWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::It TabWidget *tw2 = KFormDesigner::findParent<KFormDesigner::TabWidget>(w2, "KFormDesigner::TabWidget", page2); if (tw1 && tw2 && tw1 == tw2 && page1 != page2) { // this sorts widgets by tabs there're put in - return tw1->indexOf(TQT_TQWIDGET(page1)) - tw2->indexOf(TQT_TQWIDGET(page2)); + return tw1->indexOf(static_cast<TQWidget*>(page1)) - tw2->indexOf(static_cast<TQWidget*>(page2)); } if (tw2) // special case diff --git a/kexi/formeditor/utils.h b/kexi/formeditor/utils.h index d42a891f..1f325265 100644 --- a/kexi/formeditor/utils.h +++ b/kexi/formeditor/utils.h @@ -41,10 +41,10 @@ type* findParent(TQObject* o, const char* className, TQObject* &prevPrev) { if (!o || !className || className[0]=='\0') return 0; - TQObject *prev = TQT_TQOBJECT(o); - while ( ((o=TQT_TQOBJECT(o)->parent())) && !TQT_TQOBJECT(o)->inherits(className) ) { + TQObject *prev = o; + while ( ((o=o->parent())) && !o->inherits(className) ) { prevPrev = prev; - prev = TQT_TQOBJECT(o); + prev = o; } return static_cast<type*>(o); } diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index 5beed16b..9da235d2 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -740,7 +740,7 @@ WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev) if(d->set["geometry"].value() == o->property("geometry")) // to avoid infinite recursion return false; - d->set["geometry"] = TQT_TQWIDGET(o)->geometry(); + d->set["geometry"] = static_cast<TQWidget*>(o)->geometry(); } } else if(d->widgets.count() > 1 && ev->type() == TQEvent::Move) // the widget is being moved, we update the property |