diff options
Diffstat (limited to 'kexi/formeditor/container.cpp')
-rw-r--r-- | kexi/formeditor/container.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index 366f6a6d..d1275adc 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -23,7 +23,7 @@ #include <tqrect.h> #include <tqevent.h> #include <tqvaluevector.h> -#include <layout.h> +#include <tqlayout.h> #include <tqcursor.h> #include <kdebug.h> @@ -73,7 +73,7 @@ EventEater::eventFilter(TQObject *, TQEvent *ev) } } // else if(ev->type() == TQEvent::ChildInserted) { - // widget's children have changed, we need to reinstall filter + // widget's tqchildren have changed, we need to reinstall filter // installRecursiveEventFilter(m_widget, this); // } @@ -180,7 +180,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) unSelectWidget(m_moving); else // the widget is the only selected, so it means we want to copy it { - //m_copyRect = m_moving->geometry(); + //m_copyRect = m_moving->tqgeometry(); m_state = CopyingWidget; if(m_form->formWidget()) m_form->formWidget()->initBuffer(); @@ -333,7 +333,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) return false; } - case TQEvent::Resize: // we are resizing a widget, so we set m_move to true -> the layout will be reloaded when releasing mouse + case TQEvent::Resize: // we are resizing a widget, so we set m_move to true -> the tqlayout will be reloaded when releasing mouse { if(m_form->interactiveMode()) m_state = MovingWidget; @@ -408,7 +408,7 @@ Container::eventFilter(TQObject *s, TQEvent *e) ObjectTreeItem *item = form()->objectTree()->lookup(form()->selectedWidgets()->first()->name()); if(!item || !item->parent()) return true; - ObjectTreeList *list = item->parent()->children(); + ObjectTreeList *list = item->parent()->tqchildren(); if(list->count() == 1) return true; int index = list->findRef(item); @@ -525,7 +525,7 @@ Container::handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev) //m_initialPos = TQPoint(); } - else if(m_state == MovingWidget) // one widget has been moved, so we need to update the layout + else if(m_state == MovingWidget) // one widget has been moved, so we need to update the tqlayout reloadLayout(); // cancel copying as user released Ctrl before releasing mouse button @@ -639,7 +639,7 @@ Container::setLayout(LayoutType type) return; } } - m_container->setGeometry(m_container->geometry()); // just update layout + m_container->setGeometry(m_container->tqgeometry()); // just update tqlayout m_layout->activate(); } @@ -654,14 +654,14 @@ Container::reloadLayout() void Container::createBoxLayout(WidgetList *list) { - TQBoxLayout *layout = static_cast<TQBoxLayout*>(m_layout); + TQBoxLayout *tqlayout = static_cast<TQBoxLayout*>(m_layout); - for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) + for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) list->append( tree->widget()); list->sort(); for(TQWidget *obj = list->first(); obj; obj = list->next()) - layout->addWidget(obj); + tqlayout->addWidget(obj); delete list; } @@ -669,7 +669,7 @@ void Container::createFlowLayout() { KexiFlowLayout *flow = dynamic_cast<KexiFlowLayout*>(m_layout); - if(!flow || m_tree->children()->isEmpty()) + if(!flow || m_tree->tqchildren()->isEmpty()) return; const int offset = 15; @@ -684,7 +684,7 @@ Container::createFlowLayout() } // fill the list - for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) + for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) list->append( tree->widget()); list->sort(); @@ -741,11 +741,11 @@ Container::createGridLayout(bool testOnly) int end=-1000; bool same = false; - for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) + for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) vlist->append( tree->widget()); vlist->sort(); - for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next()) + for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next()) hlist->append( tree->widget()); hlist->sort(); @@ -759,30 +759,30 @@ Container::createGridLayout(bool testOnly) for(; it2.current() != 0; ++it2) { TQWidget *nextw = it2.current(); - if((w->y() >= nextw->y()) || (nextw->y() >= w->geometry().bottom())) + if((w->y() >= nextw->y()) || (nextw->y() >= w->tqgeometry().bottom())) break; - if(!w->geometry().intersects(nextw->geometry())) + if(!w->tqgeometry().intersects(nextw->tqgeometry())) break; // If the geometries of the two widgets intersect each other, // we move one of the widget to the rght or bottom of the other if((nextw->y() - w->y()) > abs(nextw->x() - w->x())) - nextw->move(nextw->x(), w->geometry().bottom()+1); + nextw->move(nextw->x(), w->tqgeometry().bottom()+1); else if(nextw->x() >= w->x()) - nextw->move(w->geometry().right()+1, nextw->y()); + nextw->move(w->tqgeometry().right()+1, nextw->y()); else - w->move(nextw->geometry().right()+1, nextw->y()); + w->move(nextw->tqgeometry().right()+1, nextw->y()); } } } - // Then we count the number of rows in the layout, and set their beginnings + // Then we count the number of rows in the tqlayout, and set their beginnings for(WidgetListIterator it(*vlist); it.current() != 0; ++it) { TQWidget *w = it.current(); WidgetListIterator it2 = it; if(!same) { // this widget will make a new row - end = w->geometry().bottom(); + end = w->tqgeometry().bottom(); rows.append(w->y()); } @@ -796,9 +796,9 @@ Container::createGridLayout(bool testOnly) if(nextw->y() >= end) same = false; else { - same = !(same && (nextw->y() >= w->geometry().bottom())); + same = !(same && (nextw->y() >= w->tqgeometry().bottom())); if(!same) - end = w->geometry().bottom(); + end = w->tqgeometry().bottom(); } } kdDebug() << "the new grid will have n rows: n == " << rows.size() << endl; @@ -811,7 +811,7 @@ Container::createGridLayout(bool testOnly) TQWidget *w = it.current(); WidgetListIterator it2 = it; if(!same) { - end = w->geometry().right(); + end = w->tqgeometry().right(); cols.append(w->x()); } @@ -823,25 +823,25 @@ Container::createGridLayout(bool testOnly) if(nextw->x() >= end) same = false; else { - same = !(same && (nextw->x() >= w->geometry().right())); + same = !(same && (nextw->x() >= w->tqgeometry().right())); if(!same) - end = w->geometry().right(); + end = w->tqgeometry().right(); } } kdDebug() << "the new grid will have n columns: n == " << cols.size() << endl; - // We create the layout .. - TQGridLayout *layout=0; + // We create the tqlayout .. + TQGridLayout *tqlayout=0; if(!testOnly) { - layout = new TQGridLayout(m_container, rows.size(), cols.size(), m_margin, m_spacing, "grid"); - m_layout = (TQLayout*)layout; + tqlayout = new TQGridLayout(m_container, rows.size(), cols.size(), m_margin, m_spacing, "grid"); + m_layout = (TQLayout*)tqlayout; } // .. and we fill it with widgets for(WidgetListIterator it(*vlist); it.current() != 0; ++it) { TQWidget *w = it.current(); - TQRect r = w->geometry(); + TQRect r = w->tqgeometry(); uint wcol=0, wrow=0, endrow=0, endcol=0; uint i = 0; @@ -901,14 +901,14 @@ Container::createGridLayout(bool testOnly) ObjectTreeItem *item = m_form->objectTree()->lookup(w->name()); if(!endrow && !endcol) { if(!testOnly) - layout->addWidget(w, wrow, wcol); + tqlayout->addWidget(w, wrow, wcol); item->setGridPos(wrow, wcol, 0, 0); } else { if(!endcol) endcol = wcol; if(!endrow) endrow = wrow; if(!testOnly) - layout->addMultiCellWidget(w, wrow, endrow, wcol, endcol); + tqlayout->addMultiCellWidget(w, wrow, endrow, wcol, endcol); item->setGridPos(wrow, wcol, endrow-wrow+1, endcol-wcol+1); } } @@ -971,7 +971,7 @@ Container::drawConnection(TQMouseEvent *mev) { FormManager::self()->createdConnection()->setReceiver(m_moving->name()); FormManager::self()->createSlotMenu(m_moving); - m_container->repaint(); + m_container->tqrepaint(); return; } // the user clicked outside the menu, we cancel the connection @@ -997,12 +997,12 @@ Container::drawSelectionRect(TQMouseEvent *mev) setSelectedWidget(m_container, false); TQWidget *widgetToSelect = 0; // We check which widgets are in the rect and select them - for(ObjectTreeItem *item = m_tree->children()->first(); item; item = m_tree->children()->next()) + for(ObjectTreeItem *item = m_tree->tqchildren()->first(); item; item = m_tree->tqchildren()->next()) { TQWidget *w = item->widget(); if(!w) continue; - if(w->geometry().intersects(r) && w != m_container) { + if(w->tqgeometry().intersects(r) && w != m_container) { if (widgetToSelect) setSelectedWidget(widgetToSelect, true/*add*/, false/*raise*/, true/*moreWillBeSelected*/); widgetToSelect = w; //select later @@ -1013,7 +1013,7 @@ Container::drawSelectionRect(TQMouseEvent *mev) m_insertRect = TQRect(); m_state = DoingNothing; - m_container->repaint(); + m_container->tqrepaint(); } void @@ -1070,7 +1070,7 @@ Container::drawCopiedWidgetRect(TQMouseEvent *mev) //FormManager::self()->undo(); // undo last moving //m_moving->move(m_initialPos); if(m_form->formWidget()) { - m_container->repaint(); + m_container->tqrepaint(); m_form->formWidget()->initBuffer(); } m_state = CopyingWidget; @@ -1081,7 +1081,7 @@ Container::drawCopiedWidgetRect(TQMouseEvent *mev) if(m_form->formWidget()) { TQValueList<TQRect> rectList; for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next()) { - TQRect drawRect = w->geometry(); + TQRect drawRect = w->tqgeometry(); TQPoint p = mev->pos() - m_grab; drawRect.moveBy(p.x(), p.y()); p = m_container->mapTo(m_form->widget(), TQPoint(0, 0)); |