summaryrefslogtreecommitdiffstats
path: root/kexi/formeditor/commands.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /kexi/formeditor/commands.cpp
parent94844816550ad672ccfcdc25659c625546239998 (diff)
downloadkoffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz
koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'kexi/formeditor/commands.cpp')
-rw-r--r--kexi/formeditor/commands.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp
index 9f6f4cfd..c9bad809 100644
--- a/kexi/formeditor/commands.cpp
+++ b/kexi/formeditor/commands.cpp
@@ -19,7 +19,7 @@
*/
#include <tqdom.h>
#include <tqwidget.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlabel.h>
#include <tqsplitter.h>
#include <tqmetaobject.h>
@@ -127,7 +127,7 @@ PropertyCommand::unexecute()
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(widg);
TQWidget *subWidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widg;
- if (-1!=subWidget->metaObject()->findProperty( m_property, true ))
+ if (-1!=subWidget->tqmetaObject()->findProperty( m_property, true ))
subWidget->setProperty(m_property, it.data());
}
@@ -139,9 +139,9 @@ TQString
PropertyCommand::name() const
{
if(m_oldvalues.count() >= 2)
- return i18n("Change \"%1\" property for multiple widgets" ).arg(TQString(m_property));
+ return i18n("Change \"%1\" property for multiple widgets" ).tqarg(TQString(m_property));
else
- return i18n("Change \"%1\" property for widget \"%2\"" ).arg(TQString(m_property)).arg(TQString(m_oldvalues.begin().key()));
+ return i18n("Change \"%1\" property for widget \"%2\"" ).tqarg(TQString(m_property)).tqarg(TQString(m_oldvalues.begin().key()));
}
void
@@ -435,10 +435,10 @@ AdjustSizeCommand::execute()
{
for(TQWidget *w = list.first(); w; w = list.next()) {
ObjectTreeItem *item = m_form->objectTree()->lookup(w->name());
- if(item && !item->children()->isEmpty()) { // container
+ if(item && !item->tqchildren()->isEmpty()) { // container
TQSize s;
- if(item->container() && item->container()->layout())
- s = w->sizeHint();
+ if(item->container() && item->container()->tqlayout())
+ s = w->tqsizeHint();
else
s = getSizeFromChildren(item);
// minimum size for containers
@@ -457,9 +457,9 @@ AdjustSizeCommand::execute()
else if(item && item->container()) // empty container
w->resize(item->container()->form()->gridSize() * 5, item->container()->form()->gridSize() * 5); // basic size
else {
- TQSize sizeHint(w->sizeHint());
- if (sizeHint.isValid())
- w->resize(sizeHint);
+ TQSize tqsizeHint(w->tqsizeHint());
+ if (tqsizeHint.isValid())
+ w->resize(tqsizeHint);
}
}
break;
@@ -545,17 +545,17 @@ AdjustSizeCommand::getSizeFromChildren(ObjectTreeItem *item)
{
TQSize s;
// get size for each container, and keep the biggest one
- for(ObjectTreeItem *tree = item->children()->first(); tree; tree = item->children()->next())
+ for(ObjectTreeItem *tree = item->tqchildren()->first(); tree; tree = item->tqchildren()->next())
s = s.expandedTo(getSizeFromChildren(tree));
return s;
}
int tmpw = 0, tmph = 0;
- for(ObjectTreeItem *tree = item->children()->first(); tree; tree = item->children()->next()) {
+ for(ObjectTreeItem *tree = item->tqchildren()->first(); tree; tree = item->tqchildren()->next()) {
if(!tree->widget())
continue;
- tmpw = TQMAX(tmpw, tree->widget()->geometry().right());
- tmph = TQMAX(tmph, tree->widget()->geometry().bottom());
+ tmpw = TQMAX(tmpw, tree->widget()->tqgeometry().right());
+ tmph = TQMAX(tmph, tree->widget()->tqgeometry().bottom());
}
return TQSize(tmpw, tmph) + TQSize(10, 10);
@@ -614,16 +614,16 @@ AdjustSizeCommand::debug()
LayoutPropertyCommand::LayoutPropertyCommand(WidgetPropertySet *buf, const TQCString &wname,
const TQVariant &oldValue, const TQVariant &value)
- : PropertyCommand(buf, wname, oldValue, value, "layout")
+ : PropertyCommand(buf, wname, oldValue, value, "tqlayout")
{
m_form = FormManager::self()->activeForm();
ObjectTreeItem* titem = m_form->objectTree()->lookup(wname);
if (!titem)
return; //better this than a crash
Container *m_container = titem->container();
- // We save the geometry of each wigdet
- for(ObjectTreeItem *it = m_container->objectTree()->children()->first(); it; it = m_container->objectTree()->children()->next())
- m_geometries.insert(it->name().latin1(), it->widget()->geometry());
+ // We save the tqgeometry of each wigdet
+ for(ObjectTreeItem *it = m_container->objectTree()->tqchildren()->first(); it; it = m_container->objectTree()->tqchildren()->next())
+ m_geometries.insert(it->name().latin1(), it->widget()->tqgeometry());
}
void
@@ -655,7 +655,7 @@ LayoutPropertyCommand::unexecute()
TQString
LayoutPropertyCommand::name() const
{
- return i18n("Change layout of widget \"%1\"").arg(TQString(m_oldvalues.begin().key()));
+ return i18n("Change tqlayout of widget \"%1\"").tqarg(TQString(m_oldvalues.begin().key()));
}
void
@@ -740,7 +740,7 @@ InsertWidgetCommand::execute()
WidgetInfo *winfo = m_container->form()->library()->widgetInfoForClassName(m_class);
KMessageBox::sorry(FormManager::self()->activeForm() ? FormManager::self()->activeForm()->widget() : 0,
i18n("Could not insert widget of type \"%1\". A problem with widget's creation encountered.")
- .arg(winfo ? winfo->name() : TQString()));
+ .tqarg(winfo ? winfo->name() : TQString()));
kdWarning() << "InsertWidgetCommand::execute() ERROR: widget creation failed" << endl;
return;
}
@@ -755,7 +755,7 @@ InsertWidgetCommand::execute()
// if the insertRect is invalid (ie only one point), we use widget' size hint
if(( (m_insertRect.width() < 21) && (m_insertRect.height() < 21)))
{
- TQSize s = w->sizeHint();
+ TQSize s = w->tqsizeHint();
if(s.isEmpty())
s = TQSize(20, 20); // Minimum size to avoid creating a (0,0) widget
@@ -802,7 +802,7 @@ InsertWidgetCommand::execute()
for(TQValueList<TQCString>::ConstIterator it = list.constBegin(); it != endIt; ++it)
item->addModifiedProperty(*it, w->property(*it));
- m_container->reloadLayout(); // reload the layout to take the new wigdet into account
+ m_container->reloadLayout(); // reload the tqlayout to take the new wigdet into account
m_container->setSelectedWidget(w, false);
if (m_container->form()->library()->internalProperty(w->className(),
@@ -830,7 +830,7 @@ TQString
InsertWidgetCommand::name() const
{
if(!m_name.isEmpty())
- return i18n("Insert widget \"%1\"").arg(TQString(m_name));
+ return i18n("Insert widget \"%1\"").tqarg(TQString(m_name));
else
return i18n("Insert widget");
}
@@ -864,10 +864,10 @@ CreateLayoutCommand::CreateLayoutCommand(int layoutType, WidgetList &list, Form
}
for(TQWidget *w = list.first(); w; w = list.next())
m_list->append(w);
- m_list->sort(); // we sort them now, before creating the layout
+ m_list->sort(); // we sort them now, before creating the tqlayout
for(TQWidget *w = m_list->first(); w; w = m_list->next())
- m_pos.insert(w->name(), w->geometry());
+ m_pos.insert(w->name(), w->tqgeometry());
ObjectTreeItem *item = form->objectTree()->lookup(m_list->first()->name());
if(item && item->parent()->container())
m_containername = item->parent()->name();
@@ -911,8 +911,8 @@ CreateLayoutCommand::execute()
return;
container->setSelectedWidget(0, false);
- w->move(m_pos.begin().data().topLeft()); // we move the layout at the position of the topleft widget
- // sizeHint of these widgets depends on geometry, so give them appropriate geometry
+ w->move(m_pos.begin().data().topLeft()); // we move the tqlayout at the position of the topleft widget
+ // tqsizeHint of these widgets depends on tqgeometry, so give them appropriate tqgeometry
if(m_type == Container::HFlow)
w->resize( TQSize(700, 20) );
else if(m_type == Container::VFlow)
@@ -938,7 +938,7 @@ CreateLayoutCommand::execute()
((TQSplitter*)w)->setOrientation(Qt::Vertical);
else if(tree->container()) {
tree->container()->setLayout((Container::LayoutType)m_type);
- w->resize(tree->container()->layout()->sizeHint()); // the layout doesn't have its own size
+ w->resize(tree->container()->tqlayout()->tqsizeHint()); // the tqlayout doesn't have its own size
}
container->setSelectedWidget(w, false);
@@ -952,7 +952,7 @@ CreateLayoutCommand::unexecute()
if(!parent)
parent = m_form->objectTree();
- // We reparent every widget to the Container and take them out of the layout
+ // We reparent every widget to the Container and take them out of the tqlayout
TQMap<TQCString,TQRect>::ConstIterator endIt = m_pos.constEnd();
for(TQMap<TQCString,TQRect>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
{
@@ -973,7 +973,7 @@ CreateLayoutCommand::unexecute()
if (!titem)
return; //better this than a crash
TQWidget *w = titem->widget();
- parent->container()->deleteWidget(w); // delete the layout widget
+ parent->container()->deleteWidget(w); // delete the tqlayout widget
FormManager::self()->windowChanged(m_form->widget()); // to reload ObjectTreeView
}
@@ -1019,7 +1019,7 @@ BreakLayoutCommand::BreakLayoutCommand(Container *container)
m_form = container->form();
m_type = container->layoutType();
- for(ObjectTreeItem *tree = container->objectTree()->children()->first(); tree; tree = container->objectTree()->children()->next())
+ for(ObjectTreeItem *tree = container->objectTree()->tqchildren()->first(); tree; tree = container->objectTree()->tqchildren()->next())
{
TQRect r(container->widget()->mapTo(container->widget()->parentWidget(), tree->widget()->pos()), tree->widget()->size());
m_pos.insert(tree->widget()->name(), r);
@@ -1041,7 +1041,7 @@ BreakLayoutCommand::unexecute()
TQString
BreakLayoutCommand::name() const
{
- return i18n("Break Layout: \"%1\"").arg(m_name);
+ return i18n("Break Layout: \"%1\"").tqarg(m_name);
}
void
@@ -1208,7 +1208,7 @@ PasteWidgetCommand::changePos(TQDomElement &el, const TQPoint &newpos)
{
//TQDomElement el = widg.cloneNode(true).toElement();
TQDomElement rect;
- // Find the widget geometry if there is one
+ // Find the widget tqgeometry if there is one
for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "geometry"))
@@ -1249,13 +1249,13 @@ PasteWidgetCommand::fixPos(TQDomElement &el, Container *container)
int rh = h.text().toInt();
TQRect r(rx, ry, rw, rh);
- TQWidget *w = m_form->widget()->childAt(r.x() + 6, r.y() + 6, false);
+ TQWidget *w = m_form->widget()->tqchildAt(r.x() + 6, r.y() + 6, false);
if(!w)
return;
- while((w->geometry() == r) && (w != 0))// there is already a widget there, with the same size
+ while((w->tqgeometry() == r) && (w != 0))// there is already a widget there, with the same size
{
- w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false);
+ w = m_form->widget()->tqchildAt(w->x() + 16, w->y() + 16, false);
r.moveBy(10,10);
}
@@ -1300,11 +1300,11 @@ PasteWidgetCommand::moveWidgetBy(TQDomElement &el, Container *container, const T
TQRect r(rx + p.x(), ry + p.y(), rw, rh);
kdDebug() << "Moving widget by " << p << " from " << rx << " " << ry << " to " << r.topLeft() << endl;
- TQWidget *w = m_form->widget()->childAt(r.x() + 6, r.y() + 6, false);
+ TQWidget *w = m_form->widget()->tqchildAt(r.x() + 6, r.y() + 6, false);
- while(w && (w->geometry() == r))// there is already a widget there, with the same size
+ while(w && (w->tqgeometry() == r))// there is already a widget there, with the same size
{
- w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false);
+ w = m_form->widget()->tqchildAt(w->x() + 16, w->y() + 16, false);
r.moveBy(10,10);
}