diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
commit | 04766b207afba7961d4d802313e426f5a2fbef63 (patch) | |
tree | c888ea1027c793e2d0386a7e5a1a0cd077b03cb3 /kexi/formeditor | |
parent | b6edfe41c9395f2e20784cbf0e630af6426950a3 (diff) | |
download | koffice-04766b207afba7961d4d802313e426f5a2fbef63.tar.gz koffice-04766b207afba7961d4d802313e426f5a2fbef63.zip |
rename the following methods:
tqparent parent
tqmask mask
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/formeditor')
46 files changed, 388 insertions, 388 deletions
diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp index c2319069..e7a5ad8e 100644 --- a/kexi/formeditor/commands.cpp +++ b/kexi/formeditor/commands.cpp @@ -869,8 +869,8 @@ CreateLayoutCommand::CreateLayoutCommand(int layoutType, WidgetList &list, Form for(TQWidget *w = m_list->first(); w; w = m_list->next()) m_pos.insert(w->name(), w->tqgeometry()); ObjectTreeItem *item = form->objectTree()->lookup(m_list->first()->name()); - if(item && item->tqparent()->container()) - m_containername = item->tqparent()->name(); + if(item && item->parent()->container()) + m_containername = item->parent()->name(); delete m_list; } @@ -948,9 +948,9 @@ CreateLayoutCommand::execute() void CreateLayoutCommand::unexecute() { - ObjectTreeItem *tqparent = m_form->objectTree()->lookup(m_containername); - if(!tqparent) - tqparent = m_form->objectTree(); + ObjectTreeItem *parent = m_form->objectTree()->lookup(m_containername); + if(!parent) + parent = m_form->objectTree(); // We reparent every widget to the Container and take them out of the tqlayout TQMap<TQCString,TQRect>::ConstIterator endIt = m_pos.constEnd(); @@ -959,21 +959,21 @@ CreateLayoutCommand::unexecute() ObjectTreeItem *item = m_form->objectTree()->lookup(it.key()); if(item && item->widget()) { - item->widget()->reparent(tqparent->widget(), TQPoint(0,0), true); - item->eventEater()->setContainer(tqparent->container()); + item->widget()->reparent(parent->widget(), TQPoint(0,0), true); + item->eventEater()->setContainer(parent->container()); if(m_pos[it.key()].isValid()) item->widget()->setGeometry(m_pos[it.key()]); m_form->objectTree()->reparent(item->name(), m_containername); } } - if(!tqparent->container()) + if(!parent->container()) return; ObjectTreeItem* titem = m_form->objectTree()->lookup(m_name); if (!titem) return; //better this than a crash TQWidget *w = titem->widget(); - tqparent->container()->deleteWidget(w); // delete the tqlayout widget + parent->container()->deleteWidget(w); // delete the tqlayout widget FormManager::self()->windowChanged(m_form->widget()); // to reload ObjectTreeView } @@ -1378,7 +1378,7 @@ DeleteWidgetCommand::DeleteWidgetCommand(WidgetList &list, Form *form) m_domDoc = TQDomDocument("UI"); m_domDoc.appendChild(m_domDoc.createElement("UI")); - TQDomElement tqparent = m_domDoc.namedItem("UI").toElement(); + TQDomElement parent = m_domDoc.namedItem("UI").toElement(); //for(TQWidget *w = list.first(); w; w = list.next()) /*for(WidgetListIterator it(list); it.current() != 0; ++it) @@ -1401,12 +1401,12 @@ DeleteWidgetCommand::DeleteWidgetCommand(WidgetList &list, Form *form) // We need to store both parentContainer and parentWidget as they may be different (eg for TabWidget page) m_containers.insert(item->name().latin1(), m_form->parentContainer(item->widget())->widget()->name()); - m_parents.insert(item->name().latin1(), item->tqparent()->name().latin1()); - FormIO::saveWidget(item, tqparent, m_domDoc); + m_parents.insert(item->name().latin1(), item->parent()->name().latin1()); + FormIO::saveWidget(item, parent, m_domDoc); form->connectionBuffer()->saveAllConnectionsForWidget(item->widget()->name(), m_domDoc); } - FormIO::cleanClipboard(tqparent); + FormIO::cleanClipboard(parent); } void @@ -1426,7 +1426,7 @@ DeleteWidgetCommand::execute() containerToSelect = cont; cont->deleteWidget(item->widget()); } - //now we've nothing selecte: select tqparent container + //now we've nothing selecte: select parent container if (containerToSelect) m_form->setSelectedWidget( containerToSelect->widget() ); } @@ -1456,10 +1456,10 @@ DeleteWidgetCommand::unexecute() if (!titem) return; //better this than a crash Container *cont = titem->container(); - ObjectTreeItem *tqparent = m_form->objectTree()->lookup(m_parents[wname]); + ObjectTreeItem *parent = m_form->objectTree()->lookup(m_parents[wname]); TQDomElement widg = n.toElement(); - if(tqparent) - FormIO::loadWidget(cont, widg, tqparent->widget()); + if(parent) + FormIO::loadWidget(cont, widg, parent->widget()); else FormIO::loadWidget(cont, widg); } diff --git a/kexi/formeditor/commands.h b/kexi/formeditor/commands.h index d998ad36..64e5a253 100644 --- a/kexi/formeditor/commands.h +++ b/kexi/formeditor/commands.h @@ -169,7 +169,7 @@ class KFORMEDITOR_EXPORT LayoutPropertyCommand : public PropertyCommand }; /*! This command is used when inserting a widger using toolbar or menu. You only need to give -the tqparent Container and the widget pos. +the parent Container and the widget pos. The other information is taken from FormManager. */ class KFORMEDITOR_EXPORT InsertWidgetCommand : public Command { diff --git a/kexi/formeditor/connectiondialog.cpp b/kexi/formeditor/connectiondialog.cpp index fff9a47c..f683ce74 100644 --- a/kexi/formeditor/connectiondialog.cpp +++ b/kexi/formeditor/connectiondialog.cpp @@ -45,8 +45,8 @@ namespace KFormDesigner { ///////////////////////////////////////////////////////////////////////////////// ///////////// The dialog to edit or add/remove connections ////////////////////// ///////////////////////////////////////////////////////////////////////////////// -ConnectionDialog::ConnectionDialog(TQWidget *tqparent) -: KDialogBase(tqparent, "connections_dialog", true, i18n("Edit Form Connections"), +ConnectionDialog::ConnectionDialog(TQWidget *parent) +: KDialogBase(parent, "connections_dialog", true, i18n("Edit Form Connections"), Ok|Cancel|Details, Ok, false) , m_buffer(0) { diff --git a/kexi/formeditor/connectiondialog.h b/kexi/formeditor/connectiondialog.h index 4f1a9a28..d2ecb097 100644 --- a/kexi/formeditor/connectiondialog.h +++ b/kexi/formeditor/connectiondialog.h @@ -49,7 +49,7 @@ class KFORMEDITOR_EXPORT ConnectionDialog : public KDialogBase TQ_OBJECT public: - ConnectionDialog(TQWidget *tqparent); + ConnectionDialog(TQWidget *parent); ~ConnectionDialog() {;} /*! Displays as modal dialog, to edit connections in Form::connectionBuffer(). */ diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp index 2b6d5eb7..d1275adc 100644 --- a/kexi/formeditor/container.cpp +++ b/kexi/formeditor/container.cpp @@ -88,8 +88,8 @@ EventEater::~EventEater() // Container itself -Container::Container(Container *toplevel, TQWidget *container, TQObject *tqparent, const char *name) -: TQObject(tqparent, name) +Container::Container(Container *toplevel, TQWidget *container, TQObject *parent, const char *name) +: TQObject(parent, name) , m_insertBegin(-1,-1) , m_mousePressEventReceived(false) , m_mouseReleaseEvent(TQEvent::None, TQPoint(), 0, 0) @@ -118,11 +118,11 @@ Container::Container(Container *toplevel, TQWidget *container, TQObject *tqparen widget()->name(), widget(), this, this); setObjectTree(it); - if(tqparent->isWidgetType()) + if(parent->isWidgetType()) { - TQString n = tqparent->name(); - ObjectTreeItem *tqparent = m_form->objectTree()->lookup(n); - m_form->objectTree()->addItem(tqparent, it); + TQString n = parent->name(); + ObjectTreeItem *parent = m_form->objectTree()->lookup(n); + m_form->objectTree()->addItem(parent, it); } else m_form->objectTree()->addItem(toplevel->objectTree(), it); @@ -406,9 +406,9 @@ Container::eventFilter(TQObject *s, TQEvent *e) } else if((kev->key() == Key_Tab) || (kev->key() == Key_BackTab)){ ObjectTreeItem *item = form()->objectTree()->lookup(form()->selectedWidgets()->first()->name()); - if(!item || !item->tqparent()) + if(!item || !item->parent()) return true; - ObjectTreeList *list = item->tqparent()->tqchildren(); + ObjectTreeList *list = item->parent()->tqchildren(); if(list->count() == 1) return true; int index = list->findRef(item); @@ -1107,7 +1107,7 @@ Container::moveSelectedWidgetsBy(int realdx, int realdy, TQMouseEvent *mev) for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next()) { - if(!w || !w->tqparent() || w->tqparent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->tqparent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING)) + if(!w || !w->parent() || w->parent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->parent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING)) continue; if(w->parentWidget() && w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING)) @@ -1133,7 +1133,7 @@ Container::moveSelectedWidgetsBy(int realdx, int realdy, TQMouseEvent *mev) for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next()) { // Don't move tab widget pages (or widget stack pages) - if(!w || !w->tqparent() || w->tqparent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->tqparent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING)) + if(!w || !w->parent() || w->parent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->parent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING)) continue; if(w->parentWidget() && w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING)) diff --git a/kexi/formeditor/container.h b/kexi/formeditor/container.h index f2ae1f14..36f35e82 100644 --- a/kexi/formeditor/container.h +++ b/kexi/formeditor/container.h @@ -51,7 +51,7 @@ class KFORMEDITOR_EXPORT EventEater : public TQObject public: /*! Constructs eater object. All events for \a widget and it's subwidgets - will be redirected to \a container. \a container will be also tqparent of eater object, + will be redirected to \a container. \a container will be also parent of eater object, so you don't need to care about deleting it. */ EventEater(TQWidget *widget, TQObject *container); ~EventEater(); @@ -80,8 +80,8 @@ class KFORMEDITOR_EXPORT Container : public TQObject /** * Creates a Container from the widget \a container, which have - \a toplevel as tqparent Container. */ - Container(Container *toplevel, TQWidget *container, TQObject *tqparent=0, const char *name=0); + \a toplevel as parent Container. */ + Container(Container *toplevel, TQWidget *container, TQObject *parent=0, const char *name=0); virtual ~Container(); //! \return a pointer to the toplevel Container, or 0 if this Container is toplevel @@ -147,7 +147,7 @@ class KFORMEDITOR_EXPORT Container : public TQObject (and so of the Form). If \a add is true, the formerly selected widget is still selected, and the new one is just added. If false, \a selected replace the actually selected widget. If \a dontRaise is true, then - the widget \a selected (and its tqparent) won't be raised (eg when you + the widget \a selected (and its parent) won't be raised (eg when you select widget in ObjectTreeView). \sa Form::setSelectedWidget() */ void setSelectedWidget(TQWidget *selected, bool add, bool dontRaise=false, diff --git a/kexi/formeditor/editlistviewdialog.cpp b/kexi/formeditor/editlistviewdialog.cpp index 020a7876..27878e7f 100644 --- a/kexi/formeditor/editlistviewdialog.cpp +++ b/kexi/formeditor/editlistviewdialog.cpp @@ -38,9 +38,9 @@ namespace KFormDesigner { /// A Dialog to edit the contents of a listview ///////////////////// ///////////////////////////////////////////////////////////////////////////////// -EditListViewDialog::EditListViewDialog(TQWidget *tqparent) -//js(kde3.2 dependent) : KDialogBase(Tabbed, 0/* WFlags */, tqparent, "editlistview_dialog", true, i18n("Edit listview contents"), Ok|Cancel, Ok, false) -: KDialogBase(Tabbed, i18n("Edit Listview Contents"), Ok|Cancel, Ok, tqparent, "editlistview_dialog", true /* modal */, false) +EditListViewDialog::EditListViewDialog(TQWidget *parent) +//js(kde3.2 dependent) : KDialogBase(Tabbed, 0/* WFlags */, parent, "editlistview_dialog", true, i18n("Edit listview contents"), Ok|Cancel, Ok, false) +: KDialogBase(Tabbed, i18n("Edit Listview Contents"), Ok|Cancel, Ok, parent, "editlistview_dialog", true /* modal */, false) { m_column = addPage(i18n("Columns")); m_contents = addPage(i18n("Contents")); @@ -356,33 +356,33 @@ EditListViewDialog::updateButtons(TQListViewItem *item) m_buttons[BNewChild]->setEnabled(true); m_buttons[BRemRow]->setEnabled(true); - m_buttons[BRowUp]->setEnabled( (item->itemAbove() && (item->itemAbove()->tqparent() == item->tqparent())) ); + m_buttons[BRowUp]->setEnabled( (item->itemAbove() && (item->itemAbove()->parent() == item->parent())) ); m_buttons[BRowDown]->setEnabled(item->nextSibling()); } void -EditListViewDialog::loadChildNodes(TQListView *listview, TQListViewItem *item, TQListViewItem *tqparent) +EditListViewDialog::loadChildNodes(TQListView *listview, TQListViewItem *item, TQListViewItem *parent) { TQListViewItem *newItem; if(listview->inherits("KListView")) { - if(tqparent) - newItem = new KListViewItem(tqparent); + if(parent) + newItem = new KListViewItem(parent); else newItem = new KListViewItem(listview); } else { - if(tqparent) - newItem = new TQListViewItem(tqparent); + if(parent) + newItem = new TQListViewItem(parent); else newItem = new TQListViewItem(listview); } // We need to move the item at the end, which is the expected behaviour (by default it is inserted at the beginning) TQListViewItem *last; - if(tqparent) - last = tqparent->firstChild(); + if(parent) + last = parent->firstChild(); else last = listview->firstChild(); @@ -406,12 +406,12 @@ EditListViewDialog::loadChildNodes(TQListView *listview, TQListViewItem *item, T void EditListViewDialog::newRow() { - KListViewItem *tqparent = (KListViewItem*)m_listview->selectedItem(); - if(tqparent) - tqparent = (KListViewItem*)tqparent->tqparent(); + KListViewItem *parent = (KListViewItem*)m_listview->selectedItem(); + if(parent) + parent = (KListViewItem*)parent->parent(); KListViewItem *item; - if(tqparent) - item = new KListViewItem(tqparent, m_listview->selectedItem()); + if(parent) + item = new KListViewItem(parent, m_listview->selectedItem()); else item = new KListViewItem(m_listview, m_listview->selectedItem()); item->setText(0, i18n("New Item")); @@ -421,16 +421,16 @@ EditListViewDialog::newRow() void EditListViewDialog::newChildRow() { - KListViewItem *tqparent = (KListViewItem*)m_listview->currentItem(); + KListViewItem *parent = (KListViewItem*)m_listview->currentItem(); KListViewItem *item; - if(tqparent) - item = new KListViewItem(tqparent); + if(parent) + item = new KListViewItem(parent); else item = new KListViewItem(m_listview, m_listview->currentItem()); item->setText(0, i18n("Sub Item")); m_listview->setCurrentItem(item); - tqparent->setOpen(true); + parent->setOpen(true); } void diff --git a/kexi/formeditor/editlistviewdialog.h b/kexi/formeditor/editlistviewdialog.h index be2ae106..b6386a97 100644 --- a/kexi/formeditor/editlistviewdialog.h +++ b/kexi/formeditor/editlistviewdialog.h @@ -52,7 +52,7 @@ class KFORMEDITOR_EXPORT EditListViewDialog : public KDialogBase TQ_OBJECT public: - EditListViewDialog(TQWidget *tqparent); + EditListViewDialog(TQWidget *parent); ~EditListViewDialog() {} int exec(TQListView *listview); @@ -75,9 +75,9 @@ class KFORMEDITOR_EXPORT EditListViewDialog : public KDialogBase void MoveRowDown(); protected: - /*! Loads all child items of \a item into \a listview (may be different from the \a items 's listview) as child of \a tqparent item. + /*! Loads all child items of \a item into \a listview (may be different from the \a items 's listview) as child of \a parent item. This is used to copy the contents of a listview into another listview. */ - void loadChildNodes(TQListView *listview, TQListViewItem *item, TQListViewItem *tqparent); + void loadChildNodes(TQListView *listview, TQListViewItem *item, TQListViewItem *parent); protected: enum { BNewRow = 10, BNewChild, BRemRow, BRowUp, BRowDown , BColAdd = 20, BColRem, BColUp, BColDown }; diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp index ff7a2562..2a38803a 100644 --- a/kexi/formeditor/factories/containerfactory.cpp +++ b/kexi/formeditor/factories/containerfactory.cpp @@ -64,8 +64,8 @@ # include <kinputdialog.h> #endif -ContainerWidget::ContainerWidget(TQWidget *tqparent, const char *name) - : TQWidget(tqparent, name) +ContainerWidget::ContainerWidget(TQWidget *parent, const char *name) + : TQWidget(parent, name) { } @@ -92,8 +92,8 @@ void ContainerWidget::dropEvent( TQDropEvent *e ) //////////////////////// -GroupBox::GroupBox(const TQString & title, TQWidget *tqparent, const char *name) - : TQGroupBox(title, tqparent, name) +GroupBox::GroupBox(const TQString & title, TQWidget *parent, const char *name) + : TQGroupBox(title, parent, name) { } @@ -115,8 +115,8 @@ void GroupBox::dropEvent( TQDropEvent *e ) //////////////////////// -KFDTabWidget::KFDTabWidget(TQWidget *tqparent, const char *name) - : KFormDesigner::TabWidget(tqparent, name) +KFDTabWidget::KFDTabWidget(TQWidget *parent, const char *name) + : KFormDesigner::TabWidget(parent, name) { } @@ -152,8 +152,8 @@ void KFDTabWidget::dropEvent( TQDropEvent *e ) /// Various tqlayout widgets /////////////////: -HBox::HBox(TQWidget *tqparent, const char *name) - : TQFrame(tqparent, name), m_preview(false) +HBox::HBox(TQWidget *parent, const char *name) + : TQFrame(parent, name), m_preview(false) {} void @@ -165,8 +165,8 @@ HBox::paintEvent(TQPaintEvent *) p.drawRect(1, 1, width()-1, height() - 1); } -VBox::VBox(TQWidget *tqparent, const char *name) - : TQFrame(tqparent, name), m_preview(false) +VBox::VBox(TQWidget *parent, const char *name) + : TQFrame(parent, name), m_preview(false) {} void @@ -178,8 +178,8 @@ VBox::paintEvent(TQPaintEvent *) p.drawRect(1, 1, width()-1, height() - 1); } -Grid::Grid(TQWidget *tqparent, const char *name) - : TQFrame(tqparent, name), m_preview(false) +Grid::Grid(TQWidget *parent, const char *name) + : TQFrame(parent, name), m_preview(false) {} void @@ -191,8 +191,8 @@ Grid::paintEvent(TQPaintEvent *) p.drawRect(1, 1, width()-1, height() - 1); } -HFlow::HFlow(TQWidget *tqparent, const char *name) - : TQFrame(tqparent, name), m_preview(false) +HFlow::HFlow(TQWidget *parent, const char *name) + : TQFrame(parent, name), m_preview(false) {} void @@ -204,8 +204,8 @@ HFlow::paintEvent(TQPaintEvent *) p.drawRect(1, 1, width()-1, height() - 1); } -VFlow::VFlow(TQWidget *tqparent, const char *name) - : TQFrame(tqparent, name), m_preview(false) +VFlow::VFlow(TQWidget *parent, const char *name) + : TQFrame(parent, name), m_preview(false) {} void @@ -228,12 +228,12 @@ VFlow::tqsizeHint() const /////// Tab related KCommand (to allow tab creation/deletion undoing) -InsertPageCommand::InsertPageCommand(KFormDesigner::Container *container, TQWidget *tqparent) +InsertPageCommand::InsertPageCommand(KFormDesigner::Container *container, TQWidget *parent) : KCommand() { m_containername = container->widget()->name(); m_form = container->form(); - m_parentname = tqparent->name(); + m_parentname = parent->name(); m_pageid = -1; } @@ -241,21 +241,21 @@ void InsertPageCommand::execute() { KFormDesigner::Container *container = m_form->objectTree()->lookup(m_containername)->container(); - TQWidget *tqparent = m_form->objectTree()->lookup(m_parentname)->widget(); + TQWidget *parent = m_form->objectTree()->lookup(m_parentname)->widget(); if(m_name.isEmpty()) { m_name = container->form()->objectTree()->generateUniqueName( container->form()->library()->displayName(TQWIDGET_OBJECT_NAME_STRING).latin1(), /*!numberSuffixRequired*/false); } - TQWidget *page = container->form()->library()->createWidget(TQWIDGET_OBJECT_NAME_STRING, tqparent, m_name.latin1(), container); -// TQWidget *page = new ContainerWidget(tqparent, m_name.latin1()); -// new KFormDesigner::Container(container, page, tqparent); + TQWidget *page = container->form()->library()->createWidget(TQWIDGET_OBJECT_NAME_STRING, parent, m_name.latin1(), container); +// TQWidget *page = new ContainerWidget(parent, m_name.latin1()); +// new KFormDesigner::Container(container, page, parent); - TQCString classname = tqparent->className(); + TQCString classname = parent->className(); if(classname == "KFDTabWidget") { - TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(tqparent); + TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(parent); TQString n = i18n("Page %1").tqarg(tab->count() + 1); tab->addTab(page, n); tab->showPage(page); @@ -265,7 +265,7 @@ InsertPageCommand::execute() } else if(classname == TQWIDGETSTACK_OBJECT_NAME_STRING) { - TQWidgetStack *stack = (TQWidgetStack*)tqparent; + TQWidgetStack *stack = (TQWidgetStack*)parent; stack->addWidget(page, m_pageid); stack->raiseWidget(page); m_pageid = stack->id(page); @@ -279,21 +279,21 @@ void InsertPageCommand::unexecute() { TQWidget *page = m_form->objectTree()->lookup(m_name)->widget(); - TQWidget *tqparent = m_form->objectTree()->lookup(m_parentname)->widget(); + TQWidget *parent = m_form->objectTree()->lookup(m_parentname)->widget(); KFormDesigner::WidgetList list; list.append(page); KCommand *com = new KFormDesigner::DeleteWidgetCommand(list, m_form); - TQCString classname = tqparent->className(); + TQCString classname = parent->className(); if(classname == "KFDTabWidget") { - TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(tqparent); + TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(parent); tab->removePage(page); } else if(classname == TQWIDGETSTACK_OBJECT_NAME_STRING) { - TQWidgetStack *stack = (TQWidgetStack*)tqparent; + TQWidgetStack *stack = (TQWidgetStack*)parent; int id = stack->id(page) - 1; while(!stack->widget(id)) id--; @@ -314,8 +314,8 @@ InsertPageCommand::name() const /////// Sub forms ////////////////////////: -SubForm::SubForm(TQWidget *tqparent, const char *name) -: TQScrollView(tqparent, name), m_form(0), m_widget(0) +SubForm::SubForm(TQWidget *parent, const char *name) +: TQScrollView(parent, name), m_form(0), m_widget(0) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); @@ -352,8 +352,8 @@ SubForm::setFormName(const TQString &name) ///// The factory ///////////////////////// -ContainerFactory::ContainerFactory(TQObject *tqparent, const char *, const TQStringList &) - : KFormDesigner::WidgetFactory(tqparent, "containers") +ContainerFactory::ContainerFactory(TQObject *parent, const char *, const TQStringList &) + : KFormDesigner::WidgetFactory(parent, "containers") { KFormDesigner::WidgetInfo *wBtnGroup = new KFormDesigner::WidgetInfo(this); wBtnGroup->setPixmap("frame"); @@ -674,10 +674,10 @@ ContainerFactory::createMenuActions(const TQCString &classname, TQWidget *w, TQP TQWidgetStack *stack = (TQWidgetStack*)w->parentWidget(); //m_widget; setWidget( w->parentWidget(), - container->form()->objectTree()->lookup(stack->name())->tqparent()->container() + container->form()->objectTree()->lookup(stack->name())->parent()->container() ); -// m_container = container->form()->objectTree()->lookup(m_widget->name())->tqparent()->container(); -// m_container = container->form()->objectTree()->lookup(stack->name())->tqparent()->container(); +// m_container = container->form()->objectTree()->lookup(m_widget->name())->parent()->container(); +// m_container = container->form()->objectTree()->lookup(stack->name())->parent()->container(); int id = menu->insertItem(SmallIconSet("tab_new"), i18n("Add Page"), this, TQT_SLOT(addStackPage()) ); @@ -720,17 +720,17 @@ ContainerFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDes } bool -ContainerFactory::saveSpecialProperty(const TQCString &, const TQString &name, const TQVariant &, TQWidget *w, TQDomElement &parentNode, TQDomDocument &tqparent) +ContainerFactory::saveSpecialProperty(const TQCString &, const TQString &name, const TQVariant &, TQWidget *w, TQDomElement &parentNode, TQDomDocument &parent) { if((name == "title") && (w->parentWidget()->parentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))) { TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->parentWidget()->parentWidget()); - KFormDesigner::FormIO::savePropertyElement(parentNode, tqparent, "attribute", "title", tab->tabLabel(w)); + KFormDesigner::FormIO::savePropertyElement(parentNode, parent, "attribute", "title", tab->tabLabel(w)); } else if((name == "id") && (w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))) { TQWidgetStack *stack = (TQWidgetStack*)w->parentWidget(); - KFormDesigner::FormIO::savePropertyElement(parentNode, tqparent, "attribute", "id", stack->id(w)); + KFormDesigner::FormIO::savePropertyElement(parentNode, parent, "attribute", "id", stack->id(w)); } else return false; @@ -741,7 +741,7 @@ bool ContainerFactory::readSpecialProperty(const TQCString &, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item) { TQString name = node.attribute("name"); - if((name == "title") && (item->tqparent()->widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))) + if((name == "title") && (item->parent()->widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))) { TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->parentWidget()); tab->addTab(w, node.firstChild().toElement().text()); diff --git a/kexi/formeditor/factories/containerfactory.h b/kexi/formeditor/factories/containerfactory.h index c8bdc1a6..b88b437f 100644 --- a/kexi/formeditor/factories/containerfactory.h +++ b/kexi/formeditor/factories/containerfactory.h @@ -58,7 +58,7 @@ class KFORMEDITOR_EXPORT HBox : public TQFrame TQ_OBJECT public: - HBox(TQWidget *tqparent, const char *name); + HBox(TQWidget *parent, const char *name); virtual ~HBox(){;} void setPreviewMode() {m_preview = true;} virtual void paintEvent(TQPaintEvent *ev); @@ -74,7 +74,7 @@ class KFORMEDITOR_EXPORT VBox : public TQFrame TQ_OBJECT public: - VBox(TQWidget *tqparent, const char *name); + VBox(TQWidget *parent, const char *name); virtual ~VBox(){;} void setPreviewMode() {m_preview = true;} virtual void paintEvent(TQPaintEvent *ev); @@ -90,7 +90,7 @@ class KFORMEDITOR_EXPORT Grid : public TQFrame TQ_OBJECT public: - Grid(TQWidget *tqparent, const char *name); + Grid(TQWidget *parent, const char *name); virtual ~Grid(){;} void setPreviewMode() {m_preview = true;} virtual void paintEvent(TQPaintEvent *ev); @@ -106,7 +106,7 @@ class KFORMEDITOR_EXPORT HFlow : public TQFrame TQ_OBJECT public: - HFlow(TQWidget *tqparent, const char *name); + HFlow(TQWidget *parent, const char *name); virtual ~HFlow(){;} void setPreviewMode() {m_preview = true;} virtual void paintEvent(TQPaintEvent *ev); @@ -122,7 +122,7 @@ class KFORMEDITOR_EXPORT VFlow : public TQFrame TQ_OBJECT public: - VFlow(TQWidget *tqparent, const char *name); + VFlow(TQWidget *parent, const char *name); virtual ~VFlow(){;} void setPreviewMode() {m_preview = true;} virtual void paintEvent(TQPaintEvent *ev); @@ -141,7 +141,7 @@ class KFORMEDITOR_EXPORT ContainerWidget : public TQWidget friend class KFDTabWidget; public: - ContainerWidget(TQWidget *tqparent, const char *name); + ContainerWidget(TQWidget *parent, const char *name); virtual ~ContainerWidget(); virtual TQSize tqsizeHint() const; @@ -167,7 +167,7 @@ class KFORMEDITOR_EXPORT KFDTabWidget : public KFormDesigner::TabWidget TQ_OBJECT public: - KFDTabWidget(TQWidget *tqparent, const char *name); + KFDTabWidget(TQWidget *parent, const char *name); virtual ~KFDTabWidget(); virtual TQSize tqsizeHint() const; @@ -193,7 +193,7 @@ class KFORMEDITOR_EXPORT GroupBox : public TQGroupBox TQ_OBJECT public: - GroupBox(const TQString & title, TQWidget *tqparent, const char *name); + GroupBox(const TQString & title, TQWidget *parent, const char *name); virtual ~GroupBox(); //! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface @@ -218,7 +218,7 @@ class KFORMEDITOR_EXPORT SubForm : public TQScrollView TQ_PROPERTY(TQString formName READ formName WRITE setFormName DESIGNABLE true) public: - SubForm(TQWidget *tqparent, const char *name); + SubForm(TQWidget *parent, const char *name); ~SubForm() {} //! \return the name of the subform inside the db @@ -239,10 +239,10 @@ class ContainerFactory : public KFormDesigner::WidgetFactory TQ_OBJECT public: - ContainerFactory(TQObject *tqparent, const char *name, const TQStringList &args); + ContainerFactory(TQObject *parent, const char *name, const TQStringList &args); virtual ~ContainerFactory(); - virtual TQWidget *createWidget(const TQCString & classname, TQWidget *tqparent, const char *name, KFormDesigner::Container *container, + virtual TQWidget *createWidget(const TQCString & classname, TQWidget *parent, const char *name, KFormDesigner::Container *container, int options = DefaultOptions); virtual bool createMenuActions(const TQCString& classname, TQWidget *w, TQPopupMenu *menu, KFormDesigner::Container *container); @@ -251,7 +251,7 @@ class ContainerFactory : public KFormDesigner::WidgetFactory virtual bool previewWidget(const TQCString &classname, TQWidget *widget, KFormDesigner::Container *container); virtual bool saveSpecialProperty(const TQCString &classname, const TQString &name, - const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &tqparent); + const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &parent); virtual bool readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item); virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname); diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp index 32c557b3..bfc9db63 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.cpp +++ b/kexi/formeditor/factories/stdwidgetfactory.cpp @@ -57,8 +57,8 @@ #include "stdwidgetfactory.h" // Some widgets subclass to allow event filtering and some other things -KexiPictureLabel::KexiPictureLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name) - : TQLabel(tqparent, name) +KexiPictureLabel::KexiPictureLabel(const TQPixmap &pix, TQWidget *parent, const char *name) + : TQLabel(parent, name) { setPixmap(pix); setScaledContents(false); @@ -72,8 +72,8 @@ KexiPictureLabel::setProperty(const char *name, const TQVariant &value) return TQLabel::setProperty(name, value); } -Line::Line(Qt::Orientation orient, TQWidget *tqparent, const char *name) - : TQFrame(tqparent, name) +Line::Line(Qt::Orientation orient, TQWidget *parent, const char *name) + : TQFrame(parent, name) { setFrameShadow(Sunken); if(orient ==Qt::Horizontal) @@ -102,8 +102,8 @@ Line::orientation() const // The factory itself -StdWidgetFactory::StdWidgetFactory(TQObject *tqparent, const char *, const TQStringList &) - : KFormDesigner::WidgetFactory(tqparent, "stdwidgets") +StdWidgetFactory::StdWidgetFactory(TQObject *parent, const char *, const TQStringList &) + : KFormDesigner::WidgetFactory(parent, "stdwidgets") { KFormDesigner::WidgetInfo *wFormWidget = new KFormDesigner::WidgetInfo(this); wFormWidget->setPixmap("form"); @@ -798,18 +798,18 @@ StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement & } void -StdWidgetFactory::readListItem(TQDomElement &node, TQListViewItem *tqparent, KListView *listview) +StdWidgetFactory::readListItem(TQDomElement &node, TQListViewItem *parent, KListView *listview) { TQListViewItem *item; - if(tqparent) - item = new KListViewItem(tqparent); + if(parent) + item = new KListViewItem(parent); else item = new KListViewItem(listview); // We need to move the item at the end of the list TQListViewItem *last; - if(tqparent) - last = tqparent->firstChild(); + if(parent) + last = parent->firstChild(); else last = listview->firstChild(); diff --git a/kexi/formeditor/factories/stdwidgetfactory.h b/kexi/formeditor/factories/stdwidgetfactory.h index 5d9032f0..e91f08b9 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.h +++ b/kexi/formeditor/factories/stdwidgetfactory.h @@ -31,7 +31,7 @@ class KFORMEDITOR_EXPORT KexiPictureLabel : public TQLabel TQ_OBJECT public: - KexiPictureLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name); + KexiPictureLabel(const TQPixmap &pix, TQWidget *parent, const char *name); ~KexiPictureLabel(){;} virtual bool setProperty(const char *name, const TQVariant &value); @@ -44,7 +44,7 @@ class KFORMEDITOR_EXPORT Line : public TQFrame TQ_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation) public: - Line(Qt::Orientation orient, TQWidget *tqparent, const char *name); + Line(Qt::Orientation orient, TQWidget *parent, const char *name); ~Line(){;} void setOrientation(Qt::Orientation orient); @@ -58,7 +58,7 @@ class StdWidgetFactory : public KFormDesigner::WidgetFactory TQ_OBJECT public: - StdWidgetFactory(TQObject *tqparent, const char *name, const TQStringList &args); + StdWidgetFactory(TQObject *parent, const char *name, const TQStringList &args); ~StdWidgetFactory(); virtual TQWidget *createWidget(const TQCString &c, TQWidget *p, const char *n, @@ -74,7 +74,7 @@ class StdWidgetFactory : public KFormDesigner::WidgetFactory virtual bool saveSpecialProperty(const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, - TQDomElement &parentNode, TQDomDocument &tqparent); + TQDomElement &parentNode, TQDomDocument &parent); virtual bool readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item); virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname); @@ -92,7 +92,7 @@ class StdWidgetFactory : public KFormDesigner::WidgetFactory virtual bool changeText(const TQString &newText); virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname); void saveListItem(TQListViewItem *item, TQDomNode &parentNode, TQDomDocument &domDoc); - void readListItem(TQDomElement &node, TQListViewItem *tqparent, KListView *listview); + void readListItem(TQDomElement &node, TQListViewItem *parent, KListView *listview); private: // KFormDesigner::Container *m_container; diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp index e8b25c84..b5b20936 100644 --- a/kexi/formeditor/form.cpp +++ b/kexi/formeditor/form.cpp @@ -164,7 +164,7 @@ Form::activeContainer() if(it->container()) return it->container(); else - return it->tqparent()->container(); + return it->parent()->container(); } ObjectTreeItem* @@ -202,10 +202,10 @@ Form::parentContainer(TQWidget *w) //else it = d->topTree->lookup(w->name()); - if(it->tqparent()->container()) - return it->tqparent()->container(); + if(it->parent()->container()) + return it->parent()->container(); else - return it->tqparent()->tqparent()->container(); + return it->parent()->parent()->container(); } @@ -267,7 +267,7 @@ Form::setSelectedWidget(TQWidget *w, bool add, bool dontRaise, bool moreWillBeSe emit selectionChanged(w, add, moreWillBeSelected); emitActionSignals(false); - // WidgetStack and TabWidget pages widgets shouldn't have resize handles, but their tqparent + // WidgetStack and TabWidget pages widgets shouldn't have resize handles, but their parent if(!FormManager::self()->isTopLevel(w) && w->parentWidget() && w->parentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING)) { w = w->parentWidget(); diff --git a/kexi/formeditor/form.h b/kexi/formeditor/form.h index d41d7a29..7df731c6 100644 --- a/kexi/formeditor/form.h +++ b/kexi/formeditor/form.h @@ -169,21 +169,21 @@ class KFORMEDITOR_EXPORT Form : public TQObject //! \return the form's toplevel widget, or 0 if designMode() == false. TQWidget* widget() const; -// //! \return the FormManager tqparent of this form. +// //! \return the FormManager parent of this form. // FormManager* manager() const { return d->manager; } - /*! \return A pointer to the currently active Container, ie the tqparent Container for a simple widget, + /*! \return A pointer to the currently active Container, ie the parent Container for a simple widget, and the widget's Container if it is itself a container. */ Container* activeContainer(); - /*! \return A pointer to the tqparent Container of the currently selected widget. + /*! \return A pointer to the parent Container of the currently selected widget. It is the same as activeContainer() for a simple widget, but unlike this function - it will also return the tqparent Container if the widget itself is a Container. + it will also return the parent Container if the widget itself is a Container. */ Container* parentContainer(TQWidget *w=0); - /*! \return The \ref Container which is a tqparent of all widgets in \a wlist. + /*! \return The \ref Container which is a parent of all widgets in \a wlist. Used by \ref activeContainer(), and to find where to paste widgets when multiple widgets are selected. */ ObjectTreeItem* commonParentContainer(WidgetList *wlist); @@ -289,7 +289,7 @@ class KFORMEDITOR_EXPORT Form : public TQObject (called for example before saving or displaying the tab order dialog). Automatically sorts widget from the top-left to bottom-right corner. Widget can be grouped with containers. In paticular, for tab widgets, - child widgets should ordered by tqparent tab's order. */ + child widgets should ordered by parent tab's order. */ void autoAssignTabStops(); #ifdef KEXI_DEBUG_GUI diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index 639b4a83..563d89fd 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -52,8 +52,8 @@ #include "formIO.h" /// A blank widget used when the class name is not supported -CustomWidget::CustomWidget(const TQCString &className, TQWidget *tqparent, const char *name) -: TQWidget(tqparent, name), m_className(className) +CustomWidget::CustomWidget(const TQCString &className, TQWidget *parent, const char *name) +: TQWidget(parent, name), m_className(className) { setBackgroundMode(TQt::PaletteDark); } @@ -398,7 +398,7 @@ FormIO::loadFormFromDom(Form *form, TQWidget *container, TQDomDocument &inBuf) ///////////////////////////////////////////////////////////////////////////// void -FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &tqparent, const char *name, +FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &parent, const char *name, const TQVariant &value, TQWidget *w, WidgetLibrary *lib) { // Widget specific properties and attributes /////////////// @@ -416,14 +416,14 @@ FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &tqparent, con { kdDebug() << "FormIO::savePropertyValue() The object doesn't have this property. Let's try the WidgetLibrary." << endl; if(lib) - lib->saveSpecialProperty(w->className(), name, value, w, parentNode, tqparent); + lib->saveSpecialProperty(w->className(), name, value, w, parentNode, parent); return; } const TQMetaProperty *meta = subwidget->tqmetaObject()->property(propertyId, true); if (!meta->stored( subwidget )) //not storable return; - TQDomElement propertyE = tqparent.createElement("property"); + TQDomElement propertyE = parent.createElement("property"); propertyE.setAttribute("name", name); if (addSubwidgetFlag) propertyE.setAttribute("subwidget", "true"); @@ -437,15 +437,15 @@ FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &tqparent, con if(meta->isSetType()) { TQStringList list = TQStringList::fromStrList(meta->valueToKeys(value.toInt())); - type = tqparent.createElement("set"); - valueE = tqparent.createTextNode(list.join("|")); + type = parent.createElement("set"); + valueE = parent.createTextNode(list.join("|")); type.appendChild(valueE); } else { TQString s = meta->valueToKey(value.toInt()); - type = tqparent.createElement("enum"); - valueE = tqparent.createTextNode(s); + type = parent.createElement("enum"); + valueE = parent.createTextNode(s); type.appendChild(valueE); } propertyE.appendChild(type); @@ -455,13 +455,13 @@ FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &tqparent, con if(value.type() == TQVariant::Pixmap) { TQDomText valueE; - TQDomElement type = tqparent.createElement("pixmap"); + TQDomElement type = parent.createElement("pixmap"); TQCString property = propertyE.attribute("name").latin1(); //todo TQCString pixmapName = m_currentItem->widget()->property("pixmapName").toCString(); if(m_savePixmapsInline /* (js)too risky: || m_currentItem->pixmapName(property).isNull() */) - valueE = tqparent.createTextNode(saveImage(tqparent, value.toPixmap())); + valueE = parent.createTextNode(saveImage(parent, value.toPixmap())); else - valueE = tqparent.createTextNode(m_currentItem->pixmapName(property)); + valueE = parent.createTextNode(m_currentItem->pixmapName(property)); type.appendChild(valueE); propertyE.appendChild(type); parentNode.appendChild(propertyE); @@ -469,12 +469,12 @@ FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &tqparent, con } // Saving a "normal" property - writeVariant(tqparent, propertyE, value); + writeVariant(parent, propertyE, value); parentNode.appendChild(propertyE); } void -FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVariant value) +FormIO::writeVariant(TQDomDocument &parent, TQDomElement &parentNode, TQVariant value) { TQDomElement type; TQDomText valueE; @@ -483,29 +483,29 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian { case TQVariant::String: { - type = tqparent.createElement("string"); - valueE = tqparent.createTextNode(value.toString()); + type = parent.createElement("string"); + valueE = parent.createTextNode(value.toString()); type.appendChild(valueE); break; } case TQVariant::CString: { - type = tqparent.createElement("cstring"); - valueE = tqparent.createTextNode(value.toString()); + type = parent.createElement("cstring"); + valueE = parent.createTextNode(value.toString()); type.appendChild(valueE); break; } case TQVariant::Rect: { - type = tqparent.createElement("rect"); - TQDomElement x = tqparent.createElement("x"); - TQDomElement y = tqparent.createElement("y"); - TQDomElement w = tqparent.createElement("width"); - TQDomElement h = tqparent.createElement("height"); - TQDomText valueX = tqparent.createTextNode(TQString::number(value.toRect().x())); - TQDomText valueY = tqparent.createTextNode(TQString::number(value.toRect().y())); - TQDomText valueW = tqparent.createTextNode(TQString::number(value.toRect().width())); - TQDomText valueH = tqparent.createTextNode(TQString::number(value.toRect().height())); + type = parent.createElement("rect"); + TQDomElement x = parent.createElement("x"); + TQDomElement y = parent.createElement("y"); + TQDomElement w = parent.createElement("width"); + TQDomElement h = parent.createElement("height"); + TQDomText valueX = parent.createTextNode(TQString::number(value.toRect().x())); + TQDomText valueY = parent.createTextNode(TQString::number(value.toRect().y())); + TQDomText valueW = parent.createTextNode(TQString::number(value.toRect().width())); + TQDomText valueH = parent.createTextNode(TQString::number(value.toRect().height())); x.appendChild(valueX); y.appendChild(valueY); @@ -520,13 +520,13 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::Color: { - type = tqparent.createElement("color"); - TQDomElement r = tqparent.createElement("red"); - TQDomElement g = tqparent.createElement("green"); - TQDomElement b = tqparent.createElement("blue"); - TQDomText valueR = tqparent.createTextNode(TQString::number(value.toColor().red())); - TQDomText valueG = tqparent.createTextNode(TQString::number(value.toColor().green())); - TQDomText valueB = tqparent.createTextNode(TQString::number(value.toColor().blue())); + type = parent.createElement("color"); + TQDomElement r = parent.createElement("red"); + TQDomElement g = parent.createElement("green"); + TQDomElement b = parent.createElement("blue"); + TQDomText valueR = parent.createTextNode(TQString::number(value.toColor().red())); + TQDomText valueG = parent.createTextNode(TQString::number(value.toColor().green())); + TQDomText valueB = parent.createTextNode(TQString::number(value.toColor().blue())); r.appendChild(valueR); g.appendChild(valueG); @@ -539,27 +539,27 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::Bool: { - type = tqparent.createElement("bool"); - //valueE = tqparent.createTextNode(TQString::number(value.toBool())); - valueE = tqparent.createTextNode(value.toBool() ? "true" : "false"); + type = parent.createElement("bool"); + //valueE = parent.createTextNode(TQString::number(value.toBool())); + valueE = parent.createTextNode(value.toBool() ? "true" : "false"); type.appendChild(valueE); break; } case TQVariant::Int: case TQVariant::UInt: { - type = tqparent.createElement("number"); - valueE = tqparent.createTextNode(TQString::number(value.toInt())); + type = parent.createElement("number"); + valueE = parent.createTextNode(TQString::number(value.toInt())); type.appendChild(valueE); break; } case TQVariant::Size: { - type = tqparent.createElement("size"); - TQDomElement w = tqparent.createElement("width"); - TQDomElement h = tqparent.createElement("height"); - TQDomText valueW = tqparent.createTextNode(TQString::number(value.toSize().width())); - TQDomText valueH = tqparent.createTextNode(TQString::number(value.toSize().height())); + type = parent.createElement("size"); + TQDomElement w = parent.createElement("width"); + TQDomElement h = parent.createElement("height"); + TQDomText valueW = parent.createTextNode(TQString::number(value.toSize().width())); + TQDomText valueH = parent.createTextNode(TQString::number(value.toSize().height())); w.appendChild(valueW); h.appendChild(valueH); @@ -570,11 +570,11 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::Point: { - type = tqparent.createElement("point"); - TQDomElement x = tqparent.createElement("x"); - TQDomElement y = tqparent.createElement("y"); - TQDomText valueX = tqparent.createTextNode(TQString::number(value.toPoint().x())); - TQDomText valueY = tqparent.createTextNode(TQString::number(value.toPoint().y())); + type = parent.createElement("point"); + TQDomElement x = parent.createElement("x"); + TQDomElement y = parent.createElement("y"); + TQDomText valueX = parent.createTextNode(TQString::number(value.toPoint().x())); + TQDomText valueY = parent.createTextNode(TQString::number(value.toPoint().y())); x.appendChild(valueX); y.appendChild(valueY); @@ -585,21 +585,21 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::Font: { - type = tqparent.createElement("font"); - TQDomElement f = tqparent.createElement("family"); - TQDomElement p = tqparent.createElement("pointsize"); - TQDomElement w = tqparent.createElement("weight"); - TQDomElement b = tqparent.createElement("bold"); - TQDomElement i = tqparent.createElement("italic"); - TQDomElement u = tqparent.createElement("underline"); - TQDomElement s = tqparent.createElement("strikeout"); - TQDomText valueF = tqparent.createTextNode(value.toFont().family()); - TQDomText valueP = tqparent.createTextNode(TQString::number(value.toFont().pointSize())); - TQDomText valueW = tqparent.createTextNode(TQString::number(value.toFont().weight())); - TQDomText valueB = tqparent.createTextNode(TQString::number(value.toFont().bold())); - TQDomText valueI = tqparent.createTextNode(TQString::number(value.toFont().italic())); - TQDomText valueU = tqparent.createTextNode(TQString::number(value.toFont().underline())); - TQDomText valueS = tqparent.createTextNode(TQString::number(value.toFont().strikeOut())); + type = parent.createElement("font"); + TQDomElement f = parent.createElement("family"); + TQDomElement p = parent.createElement("pointsize"); + TQDomElement w = parent.createElement("weight"); + TQDomElement b = parent.createElement("bold"); + TQDomElement i = parent.createElement("italic"); + TQDomElement u = parent.createElement("underline"); + TQDomElement s = parent.createElement("strikeout"); + TQDomText valueF = parent.createTextNode(value.toFont().family()); + TQDomText valueP = parent.createTextNode(TQString::number(value.toFont().pointSize())); + TQDomText valueW = parent.createTextNode(TQString::number(value.toFont().weight())); + TQDomText valueB = parent.createTextNode(TQString::number(value.toFont().bold())); + TQDomText valueI = parent.createTextNode(TQString::number(value.toFont().italic())); + TQDomText valueU = parent.createTextNode(TQString::number(value.toFont().underline())); + TQDomText valueS = parent.createTextNode(TQString::number(value.toFont().strikeOut())); f.appendChild(valueF); p.appendChild(valueP); @@ -620,22 +620,22 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::Cursor: { - type = tqparent.createElement("cursor"); - valueE = tqparent.createTextNode(TQString::number(value.toCursor().tqshape())); + type = parent.createElement("cursor"); + valueE = parent.createTextNode(TQString::number(value.toCursor().tqshape())); type.appendChild(valueE); break; } case TQVariant::SizePolicy: { - type = tqparent.createElement("sizepolicy"); - TQDomElement h = tqparent.createElement("hsizetype"); - TQDomElement v = tqparent.createElement("vsizetype"); - TQDomElement hs = tqparent.createElement("horstretch"); - TQDomElement vs = tqparent.createElement("verstretch"); - TQDomText valueH = tqparent.createTextNode(TQString::number(value.toSizePolicy().horData())); - TQDomText valueV = tqparent.createTextNode(TQString::number(value.toSizePolicy().verData())); - TQDomText valueHS = tqparent.createTextNode(TQString::number(value.toSizePolicy().horStretch())); - TQDomText valueVS = tqparent.createTextNode(TQString::number(value.toSizePolicy().verStretch())); + type = parent.createElement("sizepolicy"); + TQDomElement h = parent.createElement("hsizetype"); + TQDomElement v = parent.createElement("vsizetype"); + TQDomElement hs = parent.createElement("horstretch"); + TQDomElement vs = parent.createElement("verstretch"); + TQDomText valueH = parent.createTextNode(TQString::number(value.toSizePolicy().horData())); + TQDomText valueV = parent.createTextNode(TQString::number(value.toSizePolicy().verData())); + TQDomText valueHS = parent.createTextNode(TQString::number(value.toSizePolicy().horStretch())); + TQDomText valueVS = parent.createTextNode(TQString::number(value.toSizePolicy().verStretch())); h.appendChild(valueH); v.appendChild(valueV); @@ -650,13 +650,13 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::Time: { - type = tqparent.createElement("time"); - TQDomElement h = tqparent.createElement("hour"); - TQDomElement m = tqparent.createElement("minute"); - TQDomElement s = tqparent.createElement("second"); - TQDomText valueH = tqparent.createTextNode(TQString::number(value.toTime().hour())); - TQDomText valueM = tqparent.createTextNode(TQString::number(value.toTime().minute())); - TQDomText valueS = tqparent.createTextNode(TQString::number(value.toTime().second())); + type = parent.createElement("time"); + TQDomElement h = parent.createElement("hour"); + TQDomElement m = parent.createElement("minute"); + TQDomElement s = parent.createElement("second"); + TQDomText valueH = parent.createTextNode(TQString::number(value.toTime().hour())); + TQDomText valueM = parent.createTextNode(TQString::number(value.toTime().minute())); + TQDomText valueS = parent.createTextNode(TQString::number(value.toTime().second())); h.appendChild(valueH); m.appendChild(valueM); @@ -669,13 +669,13 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::Date: { - type = tqparent.createElement("date"); - TQDomElement y = tqparent.createElement("year"); - TQDomElement m = tqparent.createElement("month"); - TQDomElement d = tqparent.createElement("day"); - TQDomText valueY = tqparent.createTextNode(TQString::number(value.toDate().year())); - TQDomText valueM = tqparent.createTextNode(TQString::number(value.toDate().month())); - TQDomText valueD = tqparent.createTextNode(TQString::number(value.toDate().day())); + type = parent.createElement("date"); + TQDomElement y = parent.createElement("year"); + TQDomElement m = parent.createElement("month"); + TQDomElement d = parent.createElement("day"); + TQDomText valueY = parent.createTextNode(TQString::number(value.toDate().year())); + TQDomText valueM = parent.createTextNode(TQString::number(value.toDate().month())); + TQDomText valueD = parent.createTextNode(TQString::number(value.toDate().day())); y.appendChild(valueY); m.appendChild(valueM); @@ -688,19 +688,19 @@ FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVarian } case TQVariant::DateTime: { - type = tqparent.createElement("datetime"); - TQDomElement h = tqparent.createElement("hour"); - TQDomElement m = tqparent.createElement("minute"); - TQDomElement s = tqparent.createElement("second"); - TQDomElement y = tqparent.createElement("year"); - TQDomElement mo = tqparent.createElement("month"); - TQDomElement d = tqparent.createElement("day"); - TQDomText valueH = tqparent.createTextNode(TQString::number(value.toDateTime().time().hour())); - TQDomText valueM = tqparent.createTextNode(TQString::number(value.toDateTime().time().minute())); - TQDomText valueS = tqparent.createTextNode(TQString::number(value.toDateTime().time().second())); - TQDomText valueY = tqparent.createTextNode(TQString::number(value.toDateTime().date().year())); - TQDomText valueMo = tqparent.createTextNode(TQString::number(value.toDateTime().date().month())); - TQDomText valueD = tqparent.createTextNode(TQString::number(value.toDateTime().date().day())); + type = parent.createElement("datetime"); + TQDomElement h = parent.createElement("hour"); + TQDomElement m = parent.createElement("minute"); + TQDomElement s = parent.createElement("second"); + TQDomElement y = parent.createElement("year"); + TQDomElement mo = parent.createElement("month"); + TQDomElement d = parent.createElement("day"); + TQDomText valueH = parent.createTextNode(TQString::number(value.toDateTime().time().hour())); + TQDomText valueM = parent.createTextNode(TQString::number(value.toDateTime().time().minute())); + TQDomText valueS = parent.createTextNode(TQString::number(value.toDateTime().time().second())); + TQDomText valueY = parent.createTextNode(TQString::number(value.toDateTime().date().year())); + TQDomText valueMo = parent.createTextNode(TQString::number(value.toDateTime().date().month())); + TQDomText valueD = parent.createTextNode(TQString::number(value.toDateTime().date().day())); h.appendChild(valueH); m.appendChild(valueM); @@ -909,7 +909,7 @@ FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name) ///////////////////////////////////////////////////////////////////////////// void -FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument &domDoc, bool insideGridLayout) +FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &domDoc, bool insideGridLayout) { if (!item) return; @@ -917,7 +917,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument & // we let Spring class handle saving itself if(item->className() == "Spring") { - Spring::saveSpring(item, tqparent, domDoc, insideGridLayout); + Spring::saveSpring(item, parent, domDoc, insideGridLayout); return; } @@ -926,7 +926,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument & if(!m_currentForm) // copying widget { resetCurrentForm = true; - m_currentForm = item->container() ? item->container()->form() : item->tqparent()->container()->form(); + m_currentForm = item->container() ? item->container()->form() : item->parent()->container()->form(); } @@ -934,11 +934,11 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument & // if(item->container()) // lib = item->container()->form()->manager()->lib(); // else -// lib = item->tqparent()->container()->form()->manager()->lib(); +// lib = item->parent()->container()->form()->manager()->lib(); // We create the "widget" element TQDomElement tclass = domDoc.createElement("widget"); - tqparent.appendChild(tclass); + parent.appendChild(tclass); if(insideGridLayout) { @@ -951,7 +951,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument & } } - if(!item->tqparent()) // Toplevel widget + if(!item->parent()) // Toplevel widget tclass.setAttribute("class", TQWIDGET_OBJECT_NAME_STRING); // For compatibility, HBox, VBox and Grid are saved as TQLAYOUTWIDGET_OBJECT_NAME_STRING else if(item->widget()->isA("HBox") || item->widget()->isA("VBox") || item->widget()->isA("Grid") @@ -971,15 +971,15 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument & // if (-1 != item->widget()->tqmetaObject()->findProperty("dataSource")) // savePropertyValue(tclass, domDoc, "dataSource", item->widget()->property("dataSource"), item->widget()); - // We don't want to save the tqgeometry if the widget is inside a tqlayout (so tqparent.tagName() == "grid" for example) - if(item && !item->tqparent()) { + // We don't want to save the tqgeometry if the widget is inside a tqlayout (so parent.tagName() == "grid" for example) + if(item && !item->parent()) { // save form widget size, but not its position savePropertyValue(tclass, domDoc, "geometry", TQRect( TQPoint(0,0), item->widget()->size()), item->widget()); } // normal widget (if == "UI', it means we're copying widget) - else if(tqparent.tagName() == "widget" || tqparent.tagName() == "UI") + else if(parent.tagName() == "widget" || parent.tagName() == "UI") savePropertyValue(tclass, domDoc, "geometry", item->widget()->property("geometry"), item->widget()); // Save the buddy widget for a label @@ -1116,7 +1116,7 @@ FormIO::cleanClipboard(TQDomElement &uiElement) } void -FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *tqparent) +FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *parent) { bool resetCurrentForm = false; if(!m_currentForm) // pasting widget @@ -1187,11 +1187,11 @@ FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *tqpar widgetOptions ^= WidgetFactory::DesignViewMode; } - if(!tqparent) + if(!parent) w = container->form()->library()->createWidget(classname, container->widget(), wname.latin1(), container, widgetOptions); else - w = container->form()->library()->createWidget(classname, tqparent, wname.latin1(), + w = container->form()->library()->createWidget(classname, parent, wname.latin1(), container, widgetOptions); } @@ -1213,12 +1213,12 @@ FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *tqpar // not yet created item = new ObjectTreeItem(container->form()->library()->displayName(classname), wname, w, container); - if(tqparent) { - ObjectTreeItem *titem = container->form()->objectTree()->lookup(tqparent->name()); + if(parent) { + ObjectTreeItem *titem = container->form()->objectTree()->lookup(parent->name()); if(titem) container->form()->objectTree()->addItem(titem, item); else - kdDebug() << "FORMIO :: ERROR no tqparent widget " << endl; + kdDebug() << "FORMIO :: ERROR no parent widget " << endl; } else container->form()->objectTree()->addItem(container->objectTree(), item); diff --git a/kexi/formeditor/formIO.h b/kexi/formeditor/formIO.h index 5556b240..bb272a13 100644 --- a/kexi/formeditor/formIO.h +++ b/kexi/formeditor/formIO.h @@ -42,7 +42,7 @@ class KFORMEDITOR_EXPORT CustomWidget : public TQWidget TQ_OBJECT public: - CustomWidget(const TQCString &className, TQWidget *tqparent, const char *name); + CustomWidget(const TQCString &className, TQWidget *parent, const char *name); virtual ~CustomWidget(); virtual void paintEvent(TQPaintEvent *ev); @@ -127,13 +127,13 @@ class KFORMEDITOR_EXPORT FormIO : public TQObject static bool loadFormFromFile(Form *form, TQWidget *container, const TQString &filename=TQString()); /*! Saves the widget associated to the ObjectTreeItem \a item into DOM document \a domDoc, - with \a tqparent as tqparent node. + with \a parent as parent node. It calls readPropertyValue() for each object property, readAttribute() for each attribute and itself to save child widgets.\n \return true if saving succeeded. This is used to copy/paste widgets. */ - static void saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument &domDoc, + static void saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &domDoc, bool insideGridLayout=false); /*! Cleans the "UI" TQDomElement after saving widget. It deletes the "includes" element @@ -142,12 +142,12 @@ class KFORMEDITOR_EXPORT FormIO : public TQObject static void cleanClipboard(TQDomElement &uiElement); /*! Loads the widget associated to the TQDomElement \a el into the Container \a container, - with \a tqparent as tqparent widget. - If tqparent = 0, the Container::widget() is used as tqparent widget. + with \a parent as parent widget. + If parent = 0, the Container::widget() is used as parent widget. This is used to copy/paste widgets. */ static void loadWidget(Container *container, - const TQDomElement &el, TQWidget *tqparent=0); + const TQDomElement &el, TQWidget *parent=0); /*! Save an element in the \a domDoc as child of \a parentNode. The element will be saved like this : @@ -174,15 +174,15 @@ class KFORMEDITOR_EXPORT FormIO : public TQObject Properties of subwidget are saved with subwidget="true" arribute added to 'property' XML element. */ - static void savePropertyValue(TQDomElement &parentNode, TQDomDocument &tqparent, const char *name, + static void savePropertyValue(TQDomElement &parentNode, TQDomDocument &parent, const char *name, const TQVariant &value, TQWidget *w, WidgetLibrary *lib=0); protected: /*! Saves the TQVariant \a value as text to be included in an xml file, with \a parentNode.*/ - static void writeVariant(TQDomDocument &tqparent, TQDomElement &parentNode, TQVariant value); + static void writeVariant(TQDomDocument &parent, TQDomElement &parentNode, TQVariant value); /*! Creates a toplevel widget from the TQDomElement \a element in the Form \a form, - with \a tqparent as tqparent widget. + with \a parent as parent widget. It calls readPropertyValue() and loadWidget() to load child widgets. */ static void createToplevelWidget(Form *form, TQWidget *container, TQDomElement &element); diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp index 66948abb..ce25d710 100644 --- a/kexi/formeditor/formmanager.cpp +++ b/kexi/formeditor/formmanager.cpp @@ -83,8 +83,8 @@ namespace KFormDesigner { class PropertyFactory : public KoProperty::CustomPropertyFactory { public: - PropertyFactory(TQObject *tqparent) - : KoProperty::CustomPropertyFactory(tqparent) + PropertyFactory(TQObject *parent) + : KoProperty::CustomPropertyFactory(parent) // m_manager(manager) { } @@ -105,8 +105,8 @@ using namespace KFormDesigner; static KStaticDeleter<FormManager> m_managerDeleter; FormManager* FormManager::_self = 0L; -FormManager::FormManager(TQObject *tqparent, int options, const char *name) - : TQObject(tqparent, name) +FormManager::FormManager(TQObject *parent, int options, const char *name) + : TQObject(parent, name) #ifdef KEXI_DEBUG_GUI , m_uiCodeDialog(0) , m_options(options) @@ -698,7 +698,7 @@ FormManager::isTopLevel(TQWidget *w) if(!item) return true; - return (!item->tqparent()); + return (!item->parent()); } void @@ -734,8 +734,8 @@ FormManager::copyWidget() // We clear the current clipboard m_domDoc.setContent(TQString(), true); - TQDomElement tqparent = m_domDoc.createElement("UI"); - m_domDoc.appendChild(tqparent); + TQDomElement parent = m_domDoc.createElement("UI"); + m_domDoc.appendChild(parent); TQWidget *w; for(w = list->first(); w; w = list->next()) @@ -744,10 +744,10 @@ FormManager::copyWidget() if (!it) continue; - FormIO::saveWidget(it, tqparent, m_domDoc); + FormIO::saveWidget(it, parent, m_domDoc); } - FormIO::cleanClipboard(tqparent); + FormIO::cleanClipboard(parent); activeForm()->emitActionSignals(); // to update 'Paste' item state } @@ -845,7 +845,7 @@ FormManager::createContextMenu(TQWidget *w, Container *container, bool popupAtCu const uint widgetsCount = container->form()->selectedWidgets()->count(); const bool multiple = widgetsCount > 1; //const bool enableRemove = w != m_active->widget(); - // We only enabletqlayout creation if more than one widget with the same tqparent are selected + // We only enabletqlayout creation if more than one widget with the same parent are selected const bool enableLayout = multiple || w == container->widget(); m_menuWidget = w; @@ -1109,15 +1109,15 @@ FormManager::createLayout(int layoutType) return; } - TQWidget *tqparent = list->first()->parentWidget(); + TQWidget *parent = list->first()->parentWidget(); for(TQWidget *w = list->first(); w; w = list->next()) { - kdDebug() << "comparing widget " << w->name() << " whose tqparent is " << w->parentWidget()->name() << " insteaed of " << tqparent->name() << endl; - if(w->parentWidget() != tqparent) + kdDebug() << "comparing widget " << w->name() << " whose parent is " << w->parentWidget()->name() << " insteaed of " << parent->name() << endl; + if(w->parentWidget() != parent) { KMessageBox::sorry(m_active->widget()->tqtopLevelWidget(), i18n("<b>Cannot create the tqlayout.</b>\n" - "All selected widgets must have the same tqparent.")); - kdDebug() << "FormManager::createLayout() widgets don't have the same tqparent widget" << endl; + "All selected widgets must have the same parent.")); + kdDebug() << "FormManager::createLayout() widgets don't have the same parent widget" << endl; return; } } @@ -1250,7 +1250,7 @@ FormManager::alignWidgets(int type) { if(w->parentWidget() != parentWidget) { - kdDebug() << "FormManager::alignWidgets() type ==" << type << " widgets don't have the same tqparent widget" << endl; + kdDebug() << "FormManager::alignWidgets() type ==" << type << " widgets don't have the same parent widget" << endl; return; } } diff --git a/kexi/formeditor/formmanager.h b/kexi/formeditor/formmanager.h index e7934cc2..a43100ff 100644 --- a/kexi/formeditor/formmanager.h +++ b/kexi/formeditor/formmanager.h @@ -77,7 +77,7 @@ class KFORMEDITOR_EXPORT FormManager : public TQObject public: /*! Constructs FormManager object. Using \a options you can control manager's behaviour, see Options. */ - FormManager(TQObject *tqparent = 0, int options = 0, const char *name = 0); + FormManager(TQObject *parent = 0, int options = 0, const char *name = 0); virtual ~FormManager(); @@ -419,7 +419,7 @@ class KFORMEDITOR_EXPORT FormManager : public TQObject virtual bool saveFormToStringInternal(Form *form, TQString &dest, int indent = 0); #endif /*! Function called by the "Lay out in..." menu items. It creates a tqlayout from the - currently selected widgets (that must have the same tqparent). + currently selected widgets (that must have the same parent). Calls \ref CreateLayoutCommand. */ void createLayout(int layoutType); diff --git a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp index 8ab3ae0d..7166e7cc 100644 --- a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp +++ b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp @@ -123,8 +123,8 @@ class KFDPart_FormManager : public KFormDesigner::FormManager KFormDesigner::WidgetLibrary* KFormDesignerKDevPart::static_formsLibrary = 0L; -KFormDesignerKDevPart::KFormDesignerKDevPart(TQWidget *tqparent, const char *name, bool readOnly, const TQStringList &args) -: Designer(tqparent, name), m_count(0) +KFormDesignerKDevPart::KFormDesignerKDevPart(TQWidget *parent, const char *name, bool readOnly, const TQStringList &args) +: Designer(parent, name), m_count(0) { setInstance(KFDFactory::instance()); instance()->iconLoader()->addAppDir("kexi"); @@ -138,7 +138,7 @@ KFormDesignerKDevPart::KFormDesignerKDevPart(TQWidget *tqparent, const char *nam setUniqueFormMode(false); m_inShell = (!args.grep("shell").isEmpty()); - TQHBox *container = new TQHBox(tqparent, "kfd_container_widget"); + TQHBox *container = new TQHBox(parent, "kfd_container_widget"); container->setFocusPolicy(TQ_ClickFocus); m_workspace = new TQWorkspace(container, "kfd_workspace"); diff --git a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h index 72f2ef82..b6929e5c 100644 --- a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h +++ b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h @@ -45,7 +45,7 @@ class KFORMEDITOR_EXPORT KFDFactory : public KParts::Factory KFDFactory(); virtual ~KFDFactory(); - virtual KParts::Part* createPartObject(TQWidget *parentWidget=0, const char *widgetName=0, TQObject *tqparent=0, const char *name=0, + virtual KParts::Part* createPartObject(TQWidget *parentWidget=0, const char *widgetName=0, TQObject *parent=0, const char *name=0, const char *classname="KParts::Part", const TQStringList &args=TQStringList()); static KInstance *instance(); @@ -61,7 +61,7 @@ class KFORMEDITOR_EXPORT KFormDesignerKDevPart : public Designer TQ_OBJECT public: - KFormDesignerKDevPart(TQWidget *tqparent, const char *name, bool readOnly=true, const TQStringList &args=TQStringList()); + KFormDesignerKDevPart(TQWidget *parent, const char *name, bool readOnly=true, const TQStringList &args=TQStringList()); virtual ~KFormDesignerKDevPart(); virtual DesignerType designerType() { return TQtDesigner; } @@ -119,8 +119,8 @@ class KFORMEDITOR_EXPORT FormWidgetBase : public TQWidget, public KFormDesigner: TQ_OBJECT public: - FormWidgetBase(KFormDesignerKDevPart *part, TQWidget *tqparent = 0, const char *name = 0, int WFlags = WDestructiveClose) - : TQWidget(tqparent, name, WFlags), m_part(part) {} + FormWidgetBase(KFormDesignerKDevPart *part, TQWidget *parent = 0, const char *name = 0, int WFlags = WDestructiveClose) + : TQWidget(parent, name, WFlags), m_part(part) {} ~FormWidgetBase() {;} void drawRect(const TQRect& r, int type); diff --git a/kexi/formeditor/kfdpixmapedit.cpp b/kexi/formeditor/kfdpixmapedit.cpp index caadca85..db9a726e 100644 --- a/kexi/formeditor/kfdpixmapedit.cpp +++ b/kexi/formeditor/kfdpixmapedit.cpp @@ -29,8 +29,8 @@ using namespace KFormDesigner; -KFDPixmapEdit::KFDPixmapEdit(KoProperty::Property *property, TQWidget *tqparent, const char *name) - : KoProperty::PixmapEdit(property, tqparent, name) +KFDPixmapEdit::KFDPixmapEdit(KoProperty::Property *property, TQWidget *parent, const char *name) + : KoProperty::PixmapEdit(property, parent, name) { // m_manager = manager; } diff --git a/kexi/formeditor/kfdpixmapedit.h b/kexi/formeditor/kfdpixmapedit.h index 181ed043..cac2b751 100644 --- a/kexi/formeditor/kfdpixmapedit.h +++ b/kexi/formeditor/kfdpixmapedit.h @@ -30,7 +30,7 @@ class KFORMEDITOR_EXPORT KFDPixmapEdit : public KoProperty::PixmapEdit TQ_OBJECT public: - KFDPixmapEdit(KoProperty::Property *property, TQWidget *tqparent=0, const char *name=0); + KFDPixmapEdit(KoProperty::Property *property, TQWidget *parent=0, const char *name=0); virtual ~KFDPixmapEdit(); public slots: diff --git a/kexi/formeditor/objecttree.cpp b/kexi/formeditor/objecttree.cpp index a00fbcbb..e2ada714 100644 --- a/kexi/formeditor/objecttree.cpp +++ b/kexi/formeditor/objecttree.cpp @@ -169,15 +169,15 @@ ObjectTree::rename(const TQString &oldname, const TQString &newname) } bool -ObjectTree::reparent(const TQString &name, const TQString &newtqparent) +ObjectTree::reparent(const TQString &name, const TQString &newparent) { ObjectTreeItem *item = lookup(name); if(!item) return false; - ObjectTreeItem *tqparent = lookup(newtqparent); - if(!tqparent) return false; + ObjectTreeItem *parent = lookup(newparent); + if(!parent) return false; - item->tqparent()->removeChild(item); - tqparent->addChild(item); + item->parent()->removeChild(item); + parent->addChild(item); return true; } @@ -191,16 +191,16 @@ ObjectTree::lookup(const TQString &name) } void -ObjectTree::addItem(ObjectTreeItem *tqparent, ObjectTreeItem *c) +ObjectTree::addItem(ObjectTreeItem *parent, ObjectTreeItem *c) { m_treeDict.insert(c->name(), c); - if(!tqparent) - tqparent = this; - tqparent->addChild(c); + if(!parent) + parent = this; + parent->addChild(c); m_container->form()->emitChildAdded(c); - kdDebug() << "ObjectTree::addItem(): adding " << c->name() << " to " << tqparent->name() << endl; + kdDebug() << "ObjectTree::addItem(): adding " << c->name() << " to " << parent->name() << endl; } void @@ -220,7 +220,7 @@ ObjectTree::removeItem(ObjectTreeItem *c) removeItem(it->name()); m_treeDict.remove(c->name()); - c->tqparent()->removeChild(c); + c->parent()->removeChild(c); delete c; } diff --git a/kexi/formeditor/objecttree.h b/kexi/formeditor/objecttree.h index ae9b1e26..b37d7caa 100644 --- a/kexi/formeditor/objecttree.h +++ b/kexi/formeditor/objecttree.h @@ -58,7 +58,7 @@ typedef TQMapConstIterator<TQString, TQVariant> TQVariantMapConstIterator; /*! @short An item representing a widget - Holds the properties of a widget (classname, name, tqparent, tqchildren ..). + Holds the properties of a widget (classname, name, parent, tqchildren ..). @author Lucijan Busch <lucijan@kde.org> */ class KFORMEDITOR_EXPORT ObjectTreeItem @@ -71,7 +71,7 @@ class KFORMEDITOR_EXPORT ObjectTreeItem TQString className() const { return m_className; } TQWidget* widget() const { return m_widget; } EventEater* eventEater() const { return m_eater; } - ObjectTreeItem* tqparent() const { return m_parent; } + ObjectTreeItem* parent() const { return m_parent; } ObjectTreeList* tqchildren() { return &m_tqchildren; } /*! \return a TQMap<TQString, TQVariant> of all modified properties for this widget. @@ -82,7 +82,7 @@ class KFORMEDITOR_EXPORT ObjectTreeItem Container* container() const { return m_container;} void setWidget(TQWidget *w) { m_widget = w; } - void setParent(ObjectTreeItem *tqparent) { m_parent = tqparent;} + void setParent(ObjectTreeItem *parent) { m_parent = parent;} void debug(int ident); void rename(const TQString &name); @@ -152,8 +152,8 @@ class KFORMEDITOR_EXPORT ObjectTree : public ObjectTreeItem /*! Renames the item named \a oldname to \a newname. \return false if widget named \a newname already exists and renaming failed. */ bool rename(const TQString &oldname, const TQString &newname ); - /*! Sets \a newtqparent as new tqparent for the item whose name is \a name. */ - bool reparent(const TQString &name, const TQString &newtqparent); + /*! Sets \a newparent as new parent for the item whose name is \a name. */ + bool reparent(const TQString &name, const TQString &newparent); /*! \return the ObjectTreeItem named \a name, or 0 if doesn't exist. */ ObjectTreeItem* lookup(const TQString &name); @@ -162,7 +162,7 @@ class KFORMEDITOR_EXPORT ObjectTree : public ObjectTreeItem this dict, use ObjectTreeDictIterator. */ ObjectTreeDict* dict() { return &m_treeDict; } - void addItem(ObjectTreeItem *tqparent, ObjectTreeItem *c); + void addItem(ObjectTreeItem *parent, ObjectTreeItem *c); void removeItem(const TQString &name); void removeItem(ObjectTreeItem *c); diff --git a/kexi/formeditor/objecttreeview.cpp b/kexi/formeditor/objecttreeview.cpp index e6802d81..049df3a5 100644 --- a/kexi/formeditor/objecttreeview.cpp +++ b/kexi/formeditor/objecttreeview.cpp @@ -34,8 +34,8 @@ using namespace KFormDesigner; -ObjectTreeViewItem::ObjectTreeViewItem(ObjectTreeViewItem *tqparent, ObjectTreeItem *item) - : KListViewItem(tqparent, item->name(), item->className()) +ObjectTreeViewItem::ObjectTreeViewItem(ObjectTreeViewItem *parent, ObjectTreeItem *item) + : KListViewItem(parent, item->name(), item->className()) { m_item = item; } @@ -163,8 +163,8 @@ ObjectTreeViewItem::setOpen( bool o ) // ObjectTreeView itself ---------------- -ObjectTreeView::ObjectTreeView(TQWidget *tqparent, const char *name, bool tabStop) - : KListView(tqparent, name) +ObjectTreeView::ObjectTreeView(TQWidget *parent, const char *name, bool tabStop) + : KListView(parent, name) , m_form(0) { addColumn(i18n("Name"), 130); @@ -290,13 +290,13 @@ ObjectTreeView::slotSelectionChanged() void ObjectTreeView::addItem(ObjectTreeItem *item) { - ObjectTreeViewItem *tqparent=0; + ObjectTreeViewItem *parent=0; - tqparent = findItem(item->tqparent()->name()); - if(!tqparent) + parent = findItem(item->parent()->name()); + if(!parent) return; - loadTree(item, tqparent); + loadTree(item, parent); } void @@ -354,15 +354,15 @@ ObjectTreeView::slotBeforeFormDestroyed() } ObjectTreeViewItem* -ObjectTreeView::loadTree(ObjectTreeItem *item, ObjectTreeViewItem *tqparent) +ObjectTreeView::loadTree(ObjectTreeItem *item, ObjectTreeViewItem *parent) { if(!item) return 0; - ObjectTreeViewItem *treeItem = new ObjectTreeViewItem(tqparent, item); + ObjectTreeViewItem *treeItem = new ObjectTreeViewItem(parent, item); treeItem->setOpen(true); // The item is inserted by default at the beginning, but we want it to be at the end, so we move it - TQListViewItem *last = tqparent->firstChild(); + TQListViewItem *last = parent->firstChild(); while(last->nextSibling()) last = last->nextSibling(); treeItem->moveItem(last); diff --git a/kexi/formeditor/objecttreeview.h b/kexi/formeditor/objecttreeview.h index 46266144..b625c0ad 100644 --- a/kexi/formeditor/objecttreeview.h +++ b/kexi/formeditor/objecttreeview.h @@ -31,7 +31,7 @@ class Form; class KFORMEDITOR_EXPORT ObjectTreeViewItem : public KListViewItem { public: - ObjectTreeViewItem(ObjectTreeViewItem *tqparent, ObjectTreeItem *item); + ObjectTreeViewItem(ObjectTreeViewItem *parent, ObjectTreeItem *item); ObjectTreeViewItem(KListView *list, ObjectTreeItem *item=0); virtual ~ObjectTreeViewItem(); @@ -70,7 +70,7 @@ class KFORMEDITOR_EXPORT ObjectTreeView : public KListView TQ_OBJECT public: - ObjectTreeView(TQWidget *tqparent=0, const char *name=0, bool tabStop = false); + ObjectTreeView(TQWidget *parent=0, const char *name=0, bool tabStop = false); virtual ~ObjectTreeView(); virtual TQSize tqsizeHint() const; @@ -89,7 +89,7 @@ class KFORMEDITOR_EXPORT ObjectTreeView : public KListView It is added to current selection if \a add is true. */ void setSelectedWidget(TQWidget *w, bool add=false); - /*! Adds the ObjectTreeItem \a item in the list, with the appropriate tqparent. */ + /*! Adds the ObjectTreeItem \a item in the list, with the appropriate parent. */ void addItem(ObjectTreeItem *item); /*! Removess the ObjectTreeItem \a item from the list. */ @@ -113,7 +113,7 @@ class KFORMEDITOR_EXPORT ObjectTreeView : public KListView protected: //! Internal function to fill the list. - ObjectTreeViewItem* loadTree(ObjectTreeItem *item, ObjectTreeViewItem *tqparent); + ObjectTreeViewItem* loadTree(ObjectTreeItem *item, ObjectTreeViewItem *parent); //! \return The item whose name is \a name. ObjectTreeViewItem* findItem(const TQString &name); diff --git a/kexi/formeditor/resizehandle.cpp b/kexi/formeditor/resizehandle.cpp index c2448c6e..bdd0e3b0 100644 --- a/kexi/formeditor/resizehandle.cpp +++ b/kexi/formeditor/resizehandle.cpp @@ -220,7 +220,7 @@ void ResizeHandle::mouseMoveEvent(TQMouseEvent *ev) tmph = MINIMUM_HEIGHT; } - // Do not resize a widget outside of tqparent boundaries + // Do not resize a widget outside of parent boundaries if(tmpx < 0) { tmpw += tmpx; @@ -281,7 +281,7 @@ ResizeHandleSet::ResizeHandleSet(TQWidget *modify, Form *form, bool editing) : TQObject(modify->parentWidget()), /*m_widget(modify),*/ m_form(form) { m_widget = 0; - /*TQWidget *tqparent = modify->parentWidget(); + /*TQWidget *parent = modify->parentWidget(); handles[0] = new ResizeHandle( modify, ResizeHandle::TopLeft, editing); handles[1] = new ResizeHandle( modify, ResizeHandle::TopCenter, editing); diff --git a/kexi/formeditor/richtextdialog.cpp b/kexi/formeditor/richtextdialog.cpp index 74a31ab0..168102b0 100644 --- a/kexi/formeditor/richtextdialog.cpp +++ b/kexi/formeditor/richtextdialog.cpp @@ -33,8 +33,8 @@ namespace KFormDesigner { //////////////// A simple dialog to edit rich text //////////////////////////// ////////////////////////////////////////////////////////////////////////////////// -RichTextDialog::RichTextDialog(TQWidget *tqparent, const TQString &text) -: KDialogBase(tqparent, "richtext_dialog", true, i18n("Edit Rich Text"), Ok|Cancel, Ok, false) +RichTextDialog::RichTextDialog(TQWidget *parent, const TQString &text) +: KDialogBase(parent, "richtext_dialog", true, i18n("Edit Rich Text"), Ok|Cancel, Ok, false) { TQFrame *frame = makeMainWidget(); TQVBoxLayout *l = new TQVBoxLayout(frame); diff --git a/kexi/formeditor/richtextdialog.h b/kexi/formeditor/richtextdialog.h index 66a04e16..25150873 100644 --- a/kexi/formeditor/richtextdialog.h +++ b/kexi/formeditor/richtextdialog.h @@ -37,7 +37,7 @@ class KFORMEDITOR_EXPORT RichTextDialog : public KDialogBase TQ_OBJECT public: - RichTextDialog(TQWidget *tqparent, const TQString &text); + RichTextDialog(TQWidget *parent, const TQString &text); ~RichTextDialog(){;} TQString text(); diff --git a/kexi/formeditor/scripting/scriptmanager.cpp b/kexi/formeditor/scripting/scriptmanager.cpp index cfc5df04..73bf70e3 100644 --- a/kexi/formeditor/scripting/scriptmanager.cpp +++ b/kexi/formeditor/scripting/scriptmanager.cpp @@ -27,8 +27,8 @@ using KFormDesigner::Form; -ScriptManager::ScriptManager(TQObject *tqparent, const char *name) - : TQObject(tqparent, name) +ScriptManager::ScriptManager(TQObject *parent, const char *name) + : TQObject(parent, name) { m_manager = Kross::Api::Manager::scriptManager(); m_dict.setAutoDelete(true); diff --git a/kexi/formeditor/scripting/scriptmanager.h b/kexi/formeditor/scripting/scriptmanager.h index bc97ec3c..07cacbd0 100644 --- a/kexi/formeditor/scripting/scriptmanager.h +++ b/kexi/formeditor/scripting/scriptmanager.h @@ -44,7 +44,7 @@ class ScriptManager : public TQObject TQ_OBJECT public: - ScriptManager(TQObject *tqparent=0, const char *name=0); + ScriptManager(TQObject *parent=0, const char *name=0); ~ScriptManager(); /*! \return The FormScript object associated to this Form. */ diff --git a/kexi/formeditor/spring.cpp b/kexi/formeditor/spring.cpp index be8cfb4a..1ec9a2b4 100644 --- a/kexi/formeditor/spring.cpp +++ b/kexi/formeditor/spring.cpp @@ -33,8 +33,8 @@ #include "spring.h" -Spring::Spring(TQWidget *tqparent, const char *name) - : TQWidget(tqparent, name) +Spring::Spring(TQWidget *parent, const char *name) + : TQWidget(parent, name) { m_edit = true; m_orient =Qt::Horizontal; diff --git a/kexi/formeditor/spring.h b/kexi/formeditor/spring.h index b75249d9..2e139a3c 100644 --- a/kexi/formeditor/spring.h +++ b/kexi/formeditor/spring.h @@ -48,11 +48,11 @@ class KFORMEDITOR_EXPORT Spring : public TQWidget Expanding = MinimumExpanding|MayShrink }; public: - Spring(TQWidget *tqparent, const char *name); + Spring(TQWidget *parent, const char *name); ~Spring() {;} static bool isPropertyVisible(const TQCString &name); - static void saveSpring(KFormDesigner::ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument &domDoc, bool insideGridLayout); + static void saveSpring(KFormDesigner::ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &domDoc, bool insideGridLayout); void setOrientation(Qt::Orientation orient); Qt::Orientation orientation() const { return m_orient;} diff --git a/kexi/formeditor/tabstopdialog.cpp b/kexi/formeditor/tabstopdialog.cpp index 6de89b71..f28c8e2a 100644 --- a/kexi/formeditor/tabstopdialog.cpp +++ b/kexi/formeditor/tabstopdialog.cpp @@ -37,8 +37,8 @@ using namespace KFormDesigner; ////////// The Tab Stop Dialog to edit tab order /////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// -TabStopDialog::TabStopDialog(TQWidget *tqparent) -: KDialogBase(tqparent, "tabstop_dialog", true, i18n("Edit Tab Order"), Ok|Cancel, Ok, false) +TabStopDialog::TabStopDialog(TQWidget *parent) +: KDialogBase(parent, "tabstop_dialog", true, i18n("Edit Tab Order"), Ok|Cancel, Ok, false) { TQFrame *frame = makeMainWidget(); TQGridLayout *l = new TQGridLayout(frame, 2, 2, 0, 6); @@ -147,7 +147,7 @@ void TabStopDialog::updateButtons(TQListViewItem *item) { m_btnUp->setEnabled( item && (item->itemAbove() && m_treeview->isEnabled() - /*&& (item->itemAbove()->tqparent() == item->tqparent()))*/ )); + /*&& (item->itemAbove()->parent() == item->parent()))*/ )); m_btnDown->setEnabled( item && item->nextSibling() && m_treeview->isEnabled() ); } diff --git a/kexi/formeditor/tabstopdialog.h b/kexi/formeditor/tabstopdialog.h index 52b919be..d0829777 100644 --- a/kexi/formeditor/tabstopdialog.h +++ b/kexi/formeditor/tabstopdialog.h @@ -41,7 +41,7 @@ class KFORMEDITOR_EXPORT TabStopDialog : public KDialogBase TQ_OBJECT public: - TabStopDialog(TQWidget *tqparent); + TabStopDialog(TQWidget *parent); virtual ~TabStopDialog(); public slots: diff --git a/kexi/formeditor/test/kfd_part.cpp b/kexi/formeditor/test/kfd_part.cpp index d95e96ae..f309283f 100644 --- a/kexi/formeditor/test/kfd_part.cpp +++ b/kexi/formeditor/test/kfd_part.cpp @@ -123,8 +123,8 @@ KFDFactory::aboutData() KFormDesigner::WidgetLibrary* KFormDesignerPart::static_formsLibrary = 0L; -KFormDesignerPart::KFormDesignerPart(TQWidget *tqparent, const char *name, bool readOnly, const TQStringList &args) -: KParts::ReadWritePart(tqparent, name), m_count(0) +KFormDesignerPart::KFormDesignerPart(TQWidget *parent, const char *name, bool readOnly, const TQStringList &args) +: KParts::ReadWritePart(parent, name), m_count(0) { setInstance(KFDFactory::instance()); instance()->iconLoader()->addAppDir("kexi"); @@ -138,7 +138,7 @@ KFormDesignerPart::KFormDesignerPart(TQWidget *tqparent, const char *name, bool setUniqueFormMode(false); m_inShell = (!args.grep("shell").isEmpty()); - TQHBox *container = new TQHBox(tqparent, "kfd_container_widget"); + TQHBox *container = new TQHBox(parent, "kfd_container_widget"); m_workspace = new TQWorkspace(container, "kfd_workspace"); m_workspace->show(); diff --git a/kexi/formeditor/test/kfd_part.h b/kexi/formeditor/test/kfd_part.h index 5b264b03..cb2874ae 100644 --- a/kexi/formeditor/test/kfd_part.h +++ b/kexi/formeditor/test/kfd_part.h @@ -44,7 +44,7 @@ class KFORMEDITOR_EXPORT KFDFactory : public KParts::Factory KFDFactory(); virtual ~KFDFactory(); - virtual KParts::Part* createPartObject(TQWidget *parentWidget=0, const char *widgetName=0, TQObject *tqparent=0, const char *name=0, + virtual KParts::Part* createPartObject(TQWidget *parentWidget=0, const char *widgetName=0, TQObject *parent=0, const char *name=0, const char *classname="KParts::Part", const TQStringList &args=TQStringList()); static KInstance *instance(); @@ -60,7 +60,7 @@ class KFORMEDITOR_EXPORT KFormDesignerPart: public KParts::ReadWritePart TQ_OBJECT public: - KFormDesignerPart(TQWidget *tqparent, const char *name, bool readOnly=true, const TQStringList &args=TQStringList()); + KFormDesignerPart(TQWidget *parent, const char *name, bool readOnly=true, const TQStringList &args=TQStringList()); virtual ~KFormDesignerPart(); static KFormDesigner::WidgetLibrary* formsLibrary(); @@ -122,8 +122,8 @@ class KFORMEDITOR_EXPORT FormWidgetBase : public TQWidget, public KFormDesigner: TQ_OBJECT public: - FormWidgetBase(KFormDesignerPart *part, TQWidget *tqparent = 0, const char *name = 0, int WFlags = WDestructiveClose) - : TQWidget(tqparent, name, WFlags), m_part(part) {} + FormWidgetBase(KFormDesignerPart *part, TQWidget *parent = 0, const char *name = 0, int WFlags = WDestructiveClose) + : TQWidget(parent, name, WFlags), m_part(part) {} ~FormWidgetBase() {;} void drawRect(const TQRect& r, int type); diff --git a/kexi/formeditor/utils.h b/kexi/formeditor/utils.h index 30bbfdf3..3d078401 100644 --- a/kexi/formeditor/utils.h +++ b/kexi/formeditor/utils.h @@ -33,8 +33,8 @@ namespace KFormDesigner { class Form; -/*! \return tqparent object of \a o that inherits \a className or NULL if no such tqparent - If the tqparent is found, \a prevPrev is set to a child of child of the tqparent, +/*! \return parent object of \a o that inherits \a className or NULL if no such parent + If the parent is found, \a prevPrev is set to a child of child of the parent, what for TabWidget means the page widget. */ template<class type> type* findParent(TQT_BASE_OBJECT_NAME* o, const char* className, TQObject* &prevPrev) @@ -42,7 +42,7 @@ type* findParent(TQT_BASE_OBJECT_NAME* o, const char* className, TQObject* &prev if (!o || !className || className[0]=='\0') return 0; TQObject *prev = TQT_TQOBJECT(o); - while ( ((o=TQT_TQOBJECT(o)->tqparent())) && !TQT_TQOBJECT(o)->inherits(className) ) { + while ( ((o=TQT_TQOBJECT(o)->parent())) && !TQT_TQOBJECT(o)->inherits(className) ) { prevPrev = prev; prev = TQT_TQOBJECT(o); } @@ -55,8 +55,8 @@ class KFORMEDITOR_EXPORT TabWidget : public TabWidgetBase Q_OBJECT TQ_OBJECT public: - TabWidget(TQWidget *tqparent, const char *name) - : TabWidgetBase(tqparent, name) {} + TabWidget(TQWidget *parent, const char *name) + : TabWidgetBase(parent, name) {} virtual ~TabWidget() {} int tabBarHeight() const { return tabBar()->height(); } }; diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp index 3e0458b9..178e2b74 100644 --- a/kexi/formeditor/widgetfactory.cpp +++ b/kexi/formeditor/widgetfactory.cpp @@ -147,8 +147,8 @@ int WidgetInfo::customTypeForProperty(const char *propertyName) const ///// Widget Factory ////////////////////////// -WidgetFactory::WidgetFactory(TQObject *tqparent, const char *name) - : TQObject(tqparent, (const char*)(TQCString("kformdesigner_")+name)) +WidgetFactory::WidgetFactory(TQObject *parent, const char *name) + : TQObject(parent, (const char*)(TQCString("kformdesigner_")+name)) { m_showAdvancedProperties = true; m_classesByName.setAutoDelete(true); diff --git a/kexi/formeditor/widgetfactory.h b/kexi/formeditor/widgetfactory.h index eab422ce..9e585625 100644 --- a/kexi/formeditor/widgetfactory.h +++ b/kexi/formeditor/widgetfactory.h @@ -268,7 +268,7 @@ class KFORMEDITOR_EXPORT WidgetFactory : public TQObject DefaultOptions = AnyOrientation | DesignViewMode }; - WidgetFactory(TQObject *tqparent=0, const char *name=0); + WidgetFactory(TQObject *parent=0, const char *name=0); virtual ~WidgetFactory(); /*! Adds a new class described by \a w. */ @@ -289,12 +289,12 @@ class KFORMEDITOR_EXPORT WidgetFactory : public TQObject * Creates a widget (and if needed a KFormDesigner::Container) * \return the created widget * \param classname the classname of the widget, which should get created - * \param tqparent the tqparent for the created widget + * \param parent the parent for the created widget * \param name the name of the created widget * \param container the toplevel Container (if a container should get created) * \param options options for the created widget: orientation and view mode (see CreateWidgetOptions) */ - virtual TQWidget* createWidget(const TQCString &classname, TQWidget *tqparent, const char *name, + virtual TQWidget* createWidget(const TQCString &classname, TQWidget *parent, const char *name, KFormDesigner::Container *container, int options = DefaultOptions) = 0; @@ -310,7 +310,7 @@ class KFORMEDITOR_EXPORT WidgetFactory : public TQObject /*! Creates (if necessary) an editor to edit the contents of the widget directly in the Form (eg creates a line edit to change the text of a label). \a classname is the class the widget belongs to, \a w is the widget to edit - and \a container is the tqparent container of this widget (to access Form etc.). + and \a container is the parent container of this widget (to access Form etc.). */ virtual bool startEditing(const TQCString &classname, TQWidget *w, Container *container)=0; @@ -327,7 +327,7 @@ class KFORMEDITOR_EXPORT WidgetFactory : public TQObject */ virtual bool saveSpecialProperty(const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, - TQDomElement &parentNode, TQDomDocument &tqparent); + TQDomElement &parentNode, TQDomDocument &parent); /*! This function is called when FormIO finds a property or an unknown element in a .ui file. You can this way load a special property, for diff --git a/kexi/formeditor/widgetlibrary.cpp b/kexi/formeditor/widgetlibrary.cpp index 3d8607ba..c9f9bd9b 100644 --- a/kexi/formeditor/widgetlibrary.cpp +++ b/kexi/formeditor/widgetlibrary.cpp @@ -43,8 +43,8 @@ namespace KFormDesigner { class XMLGUIClient : public TQObject, public KXMLGUIClient { public: - XMLGUIClient(KXMLGUIClient* tqparent, const TQString& xmlFileName) - : TQObject(tqparent->actionCollection()), KXMLGUIClient(tqparent) + XMLGUIClient(KXMLGUIClient* parent, const TQString& xmlFileName) + : TQObject(parent->actionCollection()), KXMLGUIClient(parent) { setXMLFile( xmlFileName, true /*merge*/ ); } @@ -107,8 +107,8 @@ using namespace KFormDesigner; //------------------------------------------- -WidgetLibrary::WidgetLibrary(TQObject *tqparent, const TQStringList& supportedFactoryGroups) - : TQObject(tqparent) +WidgetLibrary::WidgetLibrary(TQObject *parent, const TQStringList& supportedFactoryGroups) + : TQObject(parent) , d(new WidgetLibraryPrivate()) { for (TQStringList::ConstIterator it = supportedFactoryGroups.constBegin(); @@ -138,7 +138,7 @@ WidgetLibrary::loadFactoryWidgets(WidgetFactory *f) WidgetFactory *parentFactory = d->factories[w->m_parentFactoryName]; if (!parentFactory) { kdWarning() << "WidgetLibrary::loadFactoryWidgets(): class '" << w->className() - << "' - no such tqparent factory '" << w->m_parentFactoryName << "'" << endl; + << "' - no such parent factory '" << w->m_parentFactoryName << "'" << endl; continue; } WidgetInfo* inheritedClass = parentFactory->m_classesByName[ w->m_inheritedClassName ]; @@ -319,7 +319,7 @@ WidgetLibrary::createXML() }*/ ActionList -WidgetLibrary::createWidgetActions(KXMLGUIClient* client, KActionCollection *tqparent, +WidgetLibrary::createWidgetActions(KXMLGUIClient* client, KActionCollection *parent, TQObject *receiver, const char *slot) { loadFactories(); @@ -340,7 +340,7 @@ WidgetLibrary::createWidgetActions(KXMLGUIClient* client, KActionCollection *tqp { LibActionWidget *a = new LibActionWidget(it.current(), it.current()->factory()->m_guiClient - ? it.current()->factory()->m_guiClient->actionCollection() : tqparent); + ? it.current()->factory()->m_guiClient->actionCollection() : parent); connect(a, TQT_SIGNAL(prepareInsert(const TQCString &)), receiver, slot); actions.append(a); } @@ -359,7 +359,7 @@ WidgetLibrary::addCustomWidgetActions(KActionCollection *col) } TQWidget* -WidgetLibrary::createWidget(const TQCString &classname, TQWidget *tqparent, const char *name, Container *c, +WidgetLibrary::createWidget(const TQCString &classname, TQWidget *parent, const char *name, Container *c, int options) { loadFactories(); @@ -367,12 +367,12 @@ WidgetLibrary::createWidget(const TQCString &classname, TQWidget *tqparent, cons if(!wclass) return 0; - TQWidget *widget = wclass->factory()->createWidget(wclass->className(), tqparent, name, c, options); + TQWidget *widget = wclass->factory()->createWidget(wclass->className(), parent, name, c, options); if (!widget) { //try to instantiate from inherited class if (wclass->inheritedClass()) widget = wclass->inheritedClass()->factory()->createWidget( - wclass->className(), tqparent, name, c, options); + wclass->className(), parent, name, c, options); if (!widget) return 0; } @@ -536,18 +536,18 @@ WidgetLibrary::iconName(const TQCString &classname) } bool -WidgetLibrary::saveSpecialProperty(const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &tqparent) +WidgetLibrary::saveSpecialProperty(const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &parent) { loadFactories(); WidgetInfo *wi = d->widgets.find(classname); if (!wi) return false; - if (wi->factory()->saveSpecialProperty(classname, name, value, w, parentNode, tqparent)) + if (wi->factory()->saveSpecialProperty(classname, name, value, w, parentNode, parent)) return true; //try from inherited class if (wi->inheritedClass()) - return wi->inheritedClass()->factory()->saveSpecialProperty(wi->className(), name, value, w, parentNode, tqparent); + return wi->inheritedClass()->factory()->saveSpecialProperty(wi->className(), name, value, w, parentNode, parent); return false; } @@ -648,7 +648,7 @@ TQString WidgetLibrary::propertyDescForName(WidgetInfo *winfo, const TQCString& if (winfo->m_parentFactoryName.isEmpty()) return TQString(); - //try in tqparent factory, if exists + //try in parent factory, if exists WidgetFactory *parentFactory = d->factories[winfo->m_parentFactoryName]; if (!parentFactory) return TQString(); @@ -666,7 +666,7 @@ TQString WidgetLibrary::propertyDescForValue(WidgetInfo *winfo, const TQCString& if (winfo->m_parentFactoryName.isEmpty()) return TQString(); - //try in tqparent factory, if exists + //try in parent factory, if exists WidgetFactory *parentFactory = d->factories[winfo->m_parentFactoryName]; if (!parentFactory) return TQString(); @@ -705,7 +705,7 @@ TQString WidgetLibrary::internalProperty(const TQCString& classname, const TQCSt } WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup( - const TQCString &classname, TQWidget* tqparent, const TQPoint& pos) + const TQCString &classname, TQWidget* parent, const TQPoint& pos) { loadFactories(); WidgetInfo *wclass = d->widgets[classname]; @@ -738,7 +738,7 @@ WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup( if (textVertical.isEmpty()) //default textVertical = i18n("InsertQt::Vertical Widget", "InsertQt::Vertical"); - KPopupMenu* popup = new KPopupMenu(tqparent, "orientationSelectionPopup"); + KPopupMenu* popup = new KPopupMenu(parent, "orientationSelectionPopup"); popup->insertTitle(SmallIcon(wclass->pixmap()), i18n("Insert Widget: %1").tqarg(wclass->name())); popup->insertItem(iconHorizontal, textHorizontal, 1); popup->insertItem(iconVertical, textVertical, 2); diff --git a/kexi/formeditor/widgetlibrary.h b/kexi/formeditor/widgetlibrary.h index 22d4c05f..1c4a77a0 100644 --- a/kexi/formeditor/widgetlibrary.h +++ b/kexi/formeditor/widgetlibrary.h @@ -66,14 +66,14 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public TQObject By default (when supportedFactoryGroups is empty) only factories having empty "X-KFormDesigner-FactoryGroup" field will be loaded. Factory group names are case-insensitive. */ - WidgetLibrary(TQObject *tqparent=0, const TQStringList& supportedFactoryGroups = TQStringList()); + WidgetLibrary(TQObject *parent=0, const TQStringList& supportedFactoryGroups = TQStringList()); virtual ~WidgetLibrary(); /** * creates actions for widget creating */ - ActionList createWidgetActions(KXMLGUIClient* client, KActionCollection *tqparent, + ActionList createWidgetActions(KXMLGUIClient* client, KActionCollection *parent, TQObject *receiver, const char *slot); void addCustomWidgetActions(KActionCollection *col); @@ -87,7 +87,7 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public TQObject * searches the right factory and creates a widget. * \return the widget or 0 if something falid */ - TQWidget *createWidget(const TQCString &classname, TQWidget *tqparent, const char *name, Container *c, + TQWidget *createWidget(const TQCString &classname, TQWidget *parent, const char *name, Container *c, int options = WidgetFactory::DefaultOptions); bool createMenuActions(const TQCString &c, TQWidget *w, TQPopupMenu *menu, @@ -101,7 +101,7 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public TQObject * - WidgetFactory::VerticalQt::Orientation */ WidgetFactory::CreateWidgetOptions showOrientationSelectionPopup( - const TQCString &classname, TQWidget* tqparent, const TQPoint& pos); + const TQCString &classname, TQWidget* parent, const TQPoint& pos); TQString internalProperty(const TQCString& classname, const TQCString& property); @@ -122,7 +122,7 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public TQObject bool clearWidgetContent(const TQCString &classname, TQWidget *w); bool saveSpecialProperty(const TQCString &classname, const TQString &name, - const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &tqparent); + const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &parent); bool readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, ObjectTreeItem *item); bool isPropertyVisible(const TQCString &classname, TQWidget *w, @@ -149,7 +149,7 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public TQObject for a class described by \a winfo. The name can be displayed in PropertyEditor. The name is retrieved from class' widget library. If this library doesn't define description for such property, - and there is a tqparent library for \a winfo defined, tqparent library + and there is a parent library for \a winfo defined, parent library is asked for returning description string. Eventually, if even this failed, empty string is returned. @see WidgetFactory::propertyDescForName() */ @@ -157,7 +157,7 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public TQObject /*! \return The i18n'ed name of the property's value whose name is \a name. Works in the same way as propertyDescForName(): if actual library - does not define a description we are looking for, tqparent factory is asked + does not define a description we are looking for, parent factory is asked to return such description. Eventually, if even this failed, empty string is returned. @see WidgetFactory::propertyDescForValue() */ diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index bd150e45..d06a5c2e 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -88,8 +88,8 @@ class WidgetPropertySetPrivate }; } -WidgetPropertySet::WidgetPropertySet(TQObject *tqparent) - : TQObject(tqparent, "kfd_widgetPropertySet") +WidgetPropertySet::WidgetPropertySet(TQObject *parent) + : TQObject(parent, "kfd_widgetPropertySet") { d = new WidgetPropertySetPrivate(); // d->manager = manager; @@ -1086,7 +1086,7 @@ WidgetPropertySet::createValueList(WidgetInfo *winfo, const TQStringList &list) TQStringList::ConstIterator endIt = list.end(); for(TQStringList::ConstIterator it = list.begin(); it != endIt; ++it) { TQString n( d->propValCaption[ (*it).latin1() ] ); - if (n.isEmpty()) { //try within factory and (maybe) tqparent factory + if (n.isEmpty()) { //try within factory and (maybe) parent factory if (winfo) n = KFormDesigner::FormManager::self()->activeForm()->library()->propertyDescForValue( winfo, (*it).latin1() ); if (n.isEmpty()) diff --git a/kexi/formeditor/widgetpropertyset.h b/kexi/formeditor/widgetpropertyset.h index cc403ef0..afb303d1 100644 --- a/kexi/formeditor/widgetpropertyset.h +++ b/kexi/formeditor/widgetpropertyset.h @@ -44,7 +44,7 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public TQObject TQ_OBJECT public: - WidgetPropertySet(TQObject *tqparent); + WidgetPropertySet(TQObject *parent); ~WidgetPropertySet(); // FormManager* manager(); diff --git a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp index 0bbb958c..aa84f831 100644 --- a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp +++ b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp @@ -40,7 +40,7 @@ void WidgetWithSubpropertiesInterface::setSubwidget(TQWidget *widget) m_subproperies.clear(); TQAsciiDict<char> addedSubproperies(1024); if (m_subwidget) { - //remember properties in the subwidget that are not present in the tqparent + //remember properties in the subwidget that are not present in the parent for( TQMetaObject *tqmetaObject = m_subwidget->tqmetaObject(); tqmetaObject; tqmetaObject = tqmetaObject->tqsuperClass()) { const int numProperties = tqmetaObject->numProperties(); for (int i = 0; i < numProperties; i++) { diff --git a/kexi/formeditor/widgetwithsubpropertiesinterface.h b/kexi/formeditor/widgetwithsubpropertiesinterface.h index b0d86710..dd6b0ddc 100644 --- a/kexi/formeditor/widgetwithsubpropertiesinterface.h +++ b/kexi/formeditor/widgetwithsubpropertiesinterface.h @@ -32,7 +32,7 @@ namespace KFormDesigner { /*! Currently used in KexiDBAutoField to allow editing specific properties of its internal editor. For example, if the autofield is of type Image Box, the Image Box widget has some specific properties like "lineWidth". - Such properties are provided by the tqparent KexiDBAutoField object as subproperties. */ + Such properties are provided by the parent KexiDBAutoField object as subproperties. */ class KFORMEDITOR_EXPORT WidgetWithSubpropertiesInterface { public: |