summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/test
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/formeditor/test')
-rw-r--r--kexi/formeditor/test/kfd_part.cpp80
-rw-r--r--kexi/formeditor/test/kfd_part.h2
2 files changed, 41 insertions, 41 deletions
diff --git a/kexi/formeditor/test/kfd_part.cpp b/kexi/formeditor/test/kfd_part.cpp
index 0e1745dc..d95e96ae 100644
--- a/kexi/formeditor/test/kfd_part.cpp
+++ b/kexi/formeditor/test/kfd_part.cpp
@@ -98,11 +98,11 @@ KFDFactory::~KFDFactory()
}
KParts::Part*
-KFDFactory::createPartObject( TQWidget *tqparentWidget, const char *, TQObject *, const char *name,
+KFDFactory::createPartObject( TQWidget *parentWidget, const char *, TQObject *, const char *name,
const char *classname, const TQStringList &args)
{
bool readOnly = (classname == "KParts::ReadOnlyPart");
- KFormDesignerPart *part = new KFormDesignerPart(tqparentWidget, name, readOnly, args);
+ KFormDesignerPart *part = new KFormDesignerPart(parentWidget, name, readOnly, args);
return part;
}
@@ -219,22 +219,22 @@ KFormDesignerPart::setupActions()
new KAction(i18n("Edit Pixmap Collection"), "icons", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editFormPixmapCollection()), actionCollection(), "pixmap_collection");
new KAction(i18n("Edit Form Connections"), "connections", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editConnections()), actionCollection(), "form_connections");
- KActionMenu *tqlayoutMenu = new KActionMenu(i18n("Group Widgets"), "", actionCollection(), "tqlayout_menu");
- tqlayoutMenu->insert(new KAction(i18n("&Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()), actionCollection(), "tqlayout_hbox"));
- tqlayoutMenu->insert(new KAction(i18n("&Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()), actionCollection(), "tqlayout_vbox"));
- tqlayoutMenu->insert(new KAction(i18n("In &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()), actionCollection(), "tqlayout_grid"));
- tqlayoutMenu->insert(new KAction(i18n("By &Rows"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHFlow()), actionCollection(), "tqlayout_hflow"));
- tqlayoutMenu->insert(new KAction(i18n("By &Columns"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVFlow()), actionCollection(), "tqlayout_vflow"));
- tqlayoutMenu->insert(new KAction(i18n("Horizontally in &Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()), actionCollection(), "tqlayout_hsplitter"));
- tqlayoutMenu->insert(new KAction(i18n("Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()), actionCollection(), "tqlayout_vsplitter"));
+ KActionMenu *layoutMenu = new KActionMenu(i18n("Group Widgets"), "", actionCollection(), "layout_menu");
+ layoutMenu->insert(new KAction(i18n("&Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutHBox()), actionCollection(), "layout_hbox"));
+ layoutMenu->insert(new KAction(i18n("&Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutVBox()), actionCollection(), "layout_vbox"));
+ layoutMenu->insert(new KAction(i18n("In &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutGrid()), actionCollection(), "layout_grid"));
+ layoutMenu->insert(new KAction(i18n("By &Rows"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutHFlow()), actionCollection(), "layout_hflow"));
+ layoutMenu->insert(new KAction(i18n("By &Columns"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutVFlow()), actionCollection(), "layout_vflow"));
+ layoutMenu->insert(new KAction(i18n("Horizontally in &Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutHSplitter()), actionCollection(), "layout_hsplitter"));
+ layoutMenu->insert(new KAction(i18n("Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutVSplitter()), actionCollection(), "layout_vsplitter"));
new KAction(i18n("&Ungroup Widgets"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()), actionCollection(), "break_layout");
/*
- new KAction(i18n("Lay Out Widgets &Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()), actionCollection(), "tqlayout_hbox");
- new KAction(i18n("Lay Out Widgets &Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()), actionCollection(), "tqlayout_vbox");
- new KAction(i18n("Lay Out Widgets in &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()), actionCollection(), "tqlayout_grid");
- new KAction(i18n("Lay Out Widgets H&orizontally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()), actionCollection(), "tqlayout_hsplitter");
- new KAction(i18n("Lay Out Widgets Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()), actionCollection(), "tqlayout_vsplitter");
+ new KAction(i18n("Lay Out Widgets &Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutHBox()), actionCollection(), "layout_hbox");
+ new KAction(i18n("Lay Out Widgets &Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutVBox()), actionCollection(), "layout_vbox");
+ new KAction(i18n("Lay Out Widgets in &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutGrid()), actionCollection(), "layout_grid");
+ new KAction(i18n("Lay Out Widgets H&orizontally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutHSplitter()), actionCollection(), "layout_hsplitter");
+ new KAction(i18n("Lay Out Widgets Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(layoutVSplitter()), actionCollection(), "layout_vsplitter");
new KAction(i18n("&Break Layout"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()), actionCollection(), "break_layout");
*/
new KAction(i18n("Bring Widget to Front"), "raise", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()), actionCollection(), "format_raise");
@@ -433,15 +433,15 @@ KFormDesignerPart::slotWidgetSelected(Form *form, bool multiple)
}
const bool twoSelected = form->selectedWidgets()->count()==2;
// Layout actions
- ENABLE_ACTION("tqlayout_menu", multiple || containerSelected);
- ENABLE_ACTION("tqlayout_hbox", multiple || containerSelected);
- ENABLE_ACTION("tqlayout_vbox", multiple || containerSelected);
- ENABLE_ACTION("tqlayout_grid", multiple || containerSelected);
- ENABLE_ACTION("tqlayout_hsplitter", twoSelected);
- ENABLE_ACTION("tqlayout_vsplitter", twoSelected);
+ ENABLE_ACTION("layout_menu", multiple || containerSelected);
+ ENABLE_ACTION("layout_hbox", multiple || containerSelected);
+ ENABLE_ACTION("layout_vbox", multiple || containerSelected);
+ ENABLE_ACTION("layout_grid", multiple || containerSelected);
+ ENABLE_ACTION("layout_hsplitter", twoSelected);
+ ENABLE_ACTION("layout_vsplitter", twoSelected);
KFormDesigner::Container *container = KFormDesigner::FormManager::self()->activeForm()->activeContainer();
- ENABLE_ACTION("break_layout", (container->tqlayoutType() != KFormDesigner::Container::NoLayout));
+ ENABLE_ACTION("break_layout", (container->layoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -454,13 +454,13 @@ KFormDesignerPart::slotFormWidgetSelected(Form *form)
const bool hasChildren = !form->objectTree()->tqchildren()->isEmpty();
// Layout actions
- ENABLE_ACTION("tqlayout_menu", hasChildren);
- ENABLE_ACTION("tqlayout_hbox", hasChildren);
- ENABLE_ACTION("tqlayout_vbox", hasChildren);
- ENABLE_ACTION("tqlayout_grid", hasChildren);
- ENABLE_ACTION("tqlayout_hsplitter", twoSelected);
- ENABLE_ACTION("tqlayout_vsplitter", twoSelected);
- ENABLE_ACTION("break_layout", (form->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout));
+ ENABLE_ACTION("layout_menu", hasChildren);
+ ENABLE_ACTION("layout_hbox", hasChildren);
+ ENABLE_ACTION("layout_vbox", hasChildren);
+ ENABLE_ACTION("layout_grid", hasChildren);
+ ENABLE_ACTION("layout_hsplitter", twoSelected);
+ ENABLE_ACTION("layout_vsplitter", twoSelected);
+ ENABLE_ACTION("break_layout", (form->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -523,12 +523,12 @@ KFormDesignerPart::disableWidgetActions()
ENABLE_ACTION("format_raise", false);
ENABLE_ACTION("format_lower", false);
- ENABLE_ACTION("tqlayout_menu", false);
- ENABLE_ACTION("tqlayout_hbox", false);
- ENABLE_ACTION("tqlayout_vbox", false);
- ENABLE_ACTION("tqlayout_grid", false);
- ENABLE_ACTION("tqlayout_hsplitter", false);
- ENABLE_ACTION("tqlayout_vsplitter", false);
+ ENABLE_ACTION("layout_menu", false);
+ ENABLE_ACTION("layout_hbox", false);
+ ENABLE_ACTION("layout_vbox", false);
+ ENABLE_ACTION("layout_grid", false);
+ ENABLE_ACTION("layout_hsplitter", false);
+ ENABLE_ACTION("layout_vsplitter", false);
ENABLE_ACTION("break_layout", false);
}
#endif
@@ -640,10 +640,10 @@ void
FormWidgetBase::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point)
{
TQPoint fromPoint, toPoint;
- if(from && from->tqparentWidget() && (from != this))
- fromPoint = from->tqparentWidget()->mapTo(this, from->pos());
- if(to && to->tqparentWidget() && (to != this))
- toPoint = to->tqparentWidget()->mapTo(this, to->pos());
+ if(from && from->parentWidget() && (from != this))
+ fromPoint = from->parentWidget()->mapTo(this, from->pos());
+ if(to && to->parentWidget() && (to != this))
+ toPoint = to->parentWidget()->mapTo(this, to->pos());
TQPainter p;
p.begin(this, true);
@@ -663,7 +663,7 @@ FormWidgetBase::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint
TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) );
+ p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
diff --git a/kexi/formeditor/test/kfd_part.h b/kexi/formeditor/test/kfd_part.h
index 7ffb8705..5b264b03 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 *tqparentWidget=0, const char *widgetName=0, TQObject *tqparent=0, const char *name=0,
+ virtual KParts::Part* createPartObject(TQWidget *parentWidget=0, const char *widgetName=0, TQObject *tqparent=0, const char *name=0,
const char *classname="KParts::Part", const TQStringList &args=TQStringList());
static KInstance *instance();