summaryrefslogtreecommitdiffstats
path: root/kommander/editor/formwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/formwindow.cpp')
-rw-r--r--kommander/editor/formwindow.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp
index 8dd01453..f5f57dbb 100644
--- a/kommander/editor/formwindow.cpp
+++ b/kommander/editor/formwindow.cpp
@@ -24,12 +24,12 @@
#include <tqevent.h>
#include <tqfeatures.h>
#include <tqlabel.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqmap.h>
#include <tqmetaobject.h>
#include <tqobjectlist.h>
#include <tqpainter.h>
-#include <tqpalette.h>
+#include <palette.h>
#include <tqpen.h>
#include <tqpixmapcache.h>
#include <tqpopupmenu.h>
@@ -54,7 +54,7 @@
#include "sizehandle.h"
#include "metadatabase.h"
#include "resource.h"
-#include "tqlayout.h"
+#include "layout.h"
#include "connectioneditorimpl.h"
#include "widgetdatabase.h"
#include "pixmapchooser.h"
@@ -212,7 +212,7 @@ void FormWindow::paintGrid(TQWidget *w, TQPaintEvent *e)
grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y());
if(!TQPixmapCache::find(grid_name, grid)) {
grid = TQPixmap(350 + (350 % mainWindow()->grid().x()), 350 + (350 % mainWindow()->grid().y()));
- grid.fill(tqcolorGroup().color(TQColorGroup::Foreground));
+ grid.fill(colorGroup().color(TQColorGroup::Foreground));
TQBitmap mask(grid.width(), grid.height());
mask.fill(color0);
TQPainter p(&mask);
@@ -267,7 +267,7 @@ TQPoint FormWindow::gridPoint(const TQPoint &p)
void FormWindow::drawSizePreview(const TQPoint &pos, const TQString& text)
{
unclippedPainter->save();
- unclippedPainter->setPen(TQPen(tqcolorGroup().foreground(), 1 ));
+ unclippedPainter->setPen(TQPen(colorGroup().foreground(), 1 ));
unclippedPainter->setRasterOp(CopyROP);
if (!sizePreviewPixmap.isNull())
unclippedPainter->drawPixmap(sizePreviewPos, sizePreviewPixmap);
@@ -320,15 +320,15 @@ void FormWindow::insertWidget()
"properties as well as signals and slots to integrate custom widgets into "
"<i>TQt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
- .tqarg(WidgetDatabase::toolTip(id)));
- TQToolTip::add(w, i18n("A %1 (custom widget)").tqarg(WidgetDatabase::toolTip(id)));
+ .arg(WidgetDatabase::toolTip(id)));
+ TQToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id)));
}
else
{
TQString tt = WidgetDatabase::toolTip(id);
TQString wt = WidgetDatabase::whatsThis(id);
if (!wt.isEmpty() && !tt.isEmpty())
- TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").tqarg(tt).tqarg(wt));
+ TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
}
TQString s = w->name();
@@ -345,8 +345,8 @@ void FormWindow::insertWidget()
r = TQRect(p, r.size());
if (useSizeHint)
{
- r.setWidth(w->tqsizeHint().width());
- r.setHeight(w->tqsizeHint().height());
+ r.setWidth(w->sizeHint().width());
+ r.setHeight(w->sizeHint().height());
}
if (r.width() < 2 * grid().x())
@@ -387,13 +387,13 @@ void FormWindow::insertWidget()
else
setCursorToAll(CrossCursor, w);
- InsertCommand *cmd = new InsertCommand(i18n("Insert %1").tqarg(w->name()), this, w, r);
+ InsertCommand *cmd = new InsertCommand(i18n("Insert %1").arg(w->name()), this, w, r);
TQPtrList<Command> commands;
commands.append(mv);
commands.append(cmd);
- MacroCommand *mc = new MacroCommand(i18n("Insert %1").tqarg(w->name()), this, commands);
+ MacroCommand *mc = new MacroCommand(i18n("Insert %1").arg(w->name()), this, commands);
commandHistory()->addCommand(mc);
mc->execute();
}
@@ -404,7 +404,7 @@ void FormWindow::insertWidget()
else
setCursorToAll(CrossCursor, w);
- InsertCommand *cmd = new InsertCommand(i18n("Insert %1").tqarg(w->name()), this, w, r);
+ InsertCommand *cmd = new InsertCommand(i18n("Insert %1").arg(w->name()), this, w, r);
commandHistory()->addCommand(cmd);
cmd->execute();
}
@@ -428,15 +428,15 @@ void FormWindow::insertWidget(TQWidget *w, bool checkName)
"properties as well as signals and slots to integrate custom widgets into "
"<i>TQt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
- .tqarg(WidgetDatabase::toolTip(id)));
- TQToolTip::add(w, i18n("A %1 (custom widget)").tqarg(WidgetDatabase::toolTip(id)));
+ .arg(WidgetDatabase::toolTip(id)));
+ TQToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id)));
}
else
{
TQString tt = WidgetDatabase::toolTip(id);
TQString wt = WidgetDatabase::whatsThis(id);
if (!wt.isEmpty() && !tt.isEmpty())
- TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").tqarg(tt).tqarg(wt));
+ TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
}
restoreCursors(w, this);
@@ -502,7 +502,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
case POINTER_TOOL:
if (!isMainContainer(TQT_TQOBJECT(w)) && qstrcmp(w->name(), "central widget") != 0)
{ // press on a child widget
- // if the clicked widget is not in a tqlayout, raise it
+ // if the clicked widget is not in a layout, raise it
if (!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout)
w->raise();
if ((e->state() & ControlButton))
@@ -520,7 +520,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
clearSelection(false);
else
{ // ...widget selected
- // only if widget has a tqlayout (it is a tqlayout meta widget or a laid out container!),
+ // only if widget has a layout (it is a layout meta widget or a laid out container!),
// unselect its childs
if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout)
{
@@ -556,7 +556,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
w = w->parentWidget();
if (e->button() == Qt::LeftButton)
- { // left button: store original tqgeometry and more as the widget might start moving
+ { // left button: store original geometry and more as the widget might start moving
widgetPressed = true;
widgetGeom = TQRect(w->pos(), w->size());
oldPressPos = w->mapFromGlobal(e->globalPos());
@@ -594,7 +594,7 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
if (e->button() != Qt::LeftButton)
break;
saveBackground();
- mainWindow()->statusBar()->message(i18n("Connect '%1' with...").tqarg(w->name()));
+ mainWindow()->statusBar()->message(i18n("Connect '%1' with...").arg(w->name()));
connectStartPos = mapFromGlobal(e->globalPos());
currentConnectPos = mapFromGlobal(e->globalPos());
connectSender = TQT_TQOBJECT(designerWidget(TQT_TQOBJECT(w)));
@@ -753,7 +753,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
targetContainer = wa;
hadOwnPalette = wa->ownPalette();
restorePalette = wa->palette();
- wa->setPaletteBackgroundColor(wa->tqcolorGroup().midlight());
+ wa->setPaletteBackgroundColor(wa->colorGroup().midlight());
}
}
else if (targetContainer)
@@ -767,7 +767,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
// finally move the selected widgets and show/update preview label
moveSelectedWidgets(x - p.x(), y - p.y());
- sizePreviewLabel->setText(TQString("%1/%2").tqarg(w->pos().x()).tqarg(w->pos().y()));
+ sizePreviewLabel->setText(TQString("%1/%2").arg(w->pos().x()).arg(w->pos().y()));
sizePreviewLabel->adjustSize();
TQRect lg(mapFromGlobal(e->globalPos()) + TQPoint(16, 16), sizePreviewLabel->size());
checkPreviewGeometry(lg);
@@ -803,7 +803,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
if (newReceiver && (isMainContainer(TQT_TQOBJECT(newReceiver))
|| insertedWidgets.find(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver)))
connectReceiver = connectableObject(TQT_TQOBJECT(newReceiver), TQT_TQOBJECT(connectReceiver));
- mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").tqarg(connectSender->name()).
+ mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").arg(connectSender->name()).
arg(connectReceiver->name()));
tqApp->processEvents();
if (drawRecRect)
@@ -861,17 +861,17 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
if (wa == ((TQWidget *) it.key())->parentWidget())
goto make_move_command;
- // break tqlayout if necessary
+ // break layout if necessary
if (WidgetFactory::layoutType(wa) != WidgetFactory::NoLayout)
{
if (KMessageBox::questionYesNo(mainWindow(),
i18n("You tried to insert a widget into the "
- "tqlayout Container Widget '%1'.\n"
+ "layout Container Widget '%1'.\n"
"This is not possible. "
- "In order to insert the widget, the tqlayout of '%1'\n"
+ "In order to insert the widget, the layout of '%1'\n"
"must first be broken.\n"
- "Break the tqlayout or cancel the operation?").
- tqarg(wa->name()).tqarg(wa->name()), i18n("Inserting Widget"),
+ "Break the layout or cancel the operation?").
+ arg(wa->name()).arg(wa->name()), i18n("Inserting Widget"),
i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::No)
goto make_move_command; // cancel
breakLayout(wa);
@@ -955,11 +955,11 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
{
if (KMessageBox::questionYesNo(mainWindow(),
i18n("You tried to insert a widget into the "
- "tqlayout Container Widget '%1'.\n"
+ "layout Container Widget '%1'.\n"
"This is not possible. "
- "In order to insert the widget, the tqlayout of '%1'\n"
+ "In order to insert the widget, the layout of '%1'\n"
"must first be broken.\n"
- "Break the tqlayout or cancel the operation?").
+ "Break the layout or cancel the operation?").
arg(insertParent->name()).
arg(insertParent->name()), i18n("Inserting Widget"),
i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::Yes)
@@ -1239,7 +1239,7 @@ void FormWindow::continueRectDraw(const TQPoint & p, const TQPoint & global, TQW
if (currRect == r)
{
TQString t("%1/%2");
- t = t.tqarg(r.width() - 1).tqarg(r.height() - 1);
+ t = t.arg(r.width() - 1).arg(r.height() - 1);
drawSizePreview(pos, t);
return;
}
@@ -1253,7 +1253,7 @@ void FormWindow::continueRectDraw(const TQPoint & p, const TQPoint & global, TQW
if (t == Insert)
{
TQString t("%1/%2");
- t = t.tqarg(r.width() - 1).tqarg(r.height() - 1);
+ t = t.arg(r.width() - 1).arg(r.height() - 1);
drawSizePreview(pos, t);
}
unclippedPainter->setClipRegion(TQRegion(rect()).subtract(TQRect(sizePreviewPos,
@@ -1431,13 +1431,13 @@ void FormWindow::editAdjustSize()
TQWidgetList widgets = selectedWidgets();
if (widgets.isEmpty())
{
- TQRect oldr = tqgeometry();
+ TQRect oldr = geometry();
mainContainer()->adjustSize();
resize(mainContainer()->size());
// check whether our own size constraint hit us
if (size() != mainContainer()->size())
mainContainer()->resize(size());
- TQRect nr = tqgeometry();
+ TQRect nr = geometry();
if (oldr != nr)
{
ResizeCommand *cmd = new ResizeCommand(i18n("Adjust Size"), this, this, oldr, nr);
@@ -1450,9 +1450,9 @@ void FormWindow::editAdjustSize()
if (w->parentWidget()
&& WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
continue;
- TQRect oldr = w->tqgeometry();
+ TQRect oldr = w->geometry();
w->adjustSize();
- TQRect nr = w->tqgeometry();
+ TQRect nr = w->geometry();
if (oldr != nr)
commands.append(new ResizeCommand(i18n("Adjust Size"), this, w, oldr, nr));
}
@@ -1820,11 +1820,11 @@ void FormWindow::checkAccels()
{
TQWidget *w = (TQWidget *) o;
const TQMetaProperty *text =
- w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true);
+ w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
const TQMetaProperty *title =
- w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true);
+ w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
const TQMetaProperty *pageTitle =
- w->tqmetaObject()->property(w->tqmetaObject()->findProperty("pageTitle", true), true);
+ w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true);
if (text)
find_accel(w->property("text").toString(), accels, w);
if (title)
@@ -1844,7 +1844,7 @@ void FormWindow::checkAccels()
{
ok = false;
if (KMessageBox::questionYesNo(mainWindow(),
- i18n("Accelerator '%1' is used %2 times.").tqarg(it.key().upper()).tqarg((*it).count()),
+ i18n("Accelerator '%1' is used %2 times.").arg(it.key().upper()).arg((*it).count()),
i18n("Check Accelerators"), i18n("&Select"), KStdGuiItem::cancel()) == KMessageBox::Yes)
{
clearSelection(false);
@@ -2502,7 +2502,7 @@ void FormWindow::setMainContainer(TQWidget *w)
delete mContainer;
mContainer = w;
insertedWidgets.insert(mContainer, mContainer);
- delete tqlayout();
+ delete layout();
TQHBoxLayout *l = new TQHBoxLayout(this);
l->addWidget(w);
if (resetPropertyWidget)