From 1fffbdafa12271a1a635caf46777fb8acfb6f31b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 10:00:36 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076. --- kommander/editor/formwindow.cpp | 84 ++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'kommander/editor/formwindow.cpp') diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp index f5f57dbb..8dd01453 100644 --- a/kommander/editor/formwindow.cpp +++ b/kommander/editor/formwindow.cpp @@ -24,12 +24,12 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -54,7 +54,7 @@ #include "sizehandle.h" #include "metadatabase.h" #include "resource.h" -#include "layout.h" +#include "tqlayout.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(colorGroup().color(TQColorGroup::Foreground)); + grid.fill(tqcolorGroup().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(colorGroup().foreground(), 1 )); + unclippedPainter->setPen(TQPen(tqcolorGroup().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 " "TQt Designer, and provide a pixmap which will be used to represent " "the widget on the form.

") - .arg(WidgetDatabase::toolTip(id))); - TQToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id))); + .tqarg(WidgetDatabase::toolTip(id))); + TQToolTip::add(w, i18n("A %1 (custom widget)").tqarg(WidgetDatabase::toolTip(id))); } else { TQString tt = WidgetDatabase::toolTip(id); TQString wt = WidgetDatabase::whatsThis(id); if (!wt.isEmpty() && !tt.isEmpty()) - TQWhatsThis::add(w, i18n("A %1

%2

").arg(tt).arg(wt)); + TQWhatsThis::add(w, i18n("A %1

%2

").tqarg(tt).tqarg(wt)); } TQString s = w->name(); @@ -345,8 +345,8 @@ void FormWindow::insertWidget() r = TQRect(p, r.size()); if (useSizeHint) { - r.setWidth(w->sizeHint().width()); - r.setHeight(w->sizeHint().height()); + r.setWidth(w->tqsizeHint().width()); + r.setHeight(w->tqsizeHint().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").arg(w->name()), this, w, r); + InsertCommand *cmd = new InsertCommand(i18n("Insert %1").tqarg(w->name()), this, w, r); TQPtrList commands; commands.append(mv); commands.append(cmd); - MacroCommand *mc = new MacroCommand(i18n("Insert %1").arg(w->name()), this, commands); + MacroCommand *mc = new MacroCommand(i18n("Insert %1").tqarg(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").arg(w->name()), this, w, r); + InsertCommand *cmd = new InsertCommand(i18n("Insert %1").tqarg(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 " "TQt Designer, and provide a pixmap which will be used to represent " "the widget on the form.

") - .arg(WidgetDatabase::toolTip(id))); - TQToolTip::add(w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip(id))); + .tqarg(WidgetDatabase::toolTip(id))); + TQToolTip::add(w, i18n("A %1 (custom widget)").tqarg(WidgetDatabase::toolTip(id))); } else { TQString tt = WidgetDatabase::toolTip(id); TQString wt = WidgetDatabase::whatsThis(id); if (!wt.isEmpty() && !tt.isEmpty()) - TQWhatsThis::add(w, i18n("A %1

%2

").arg(tt).arg(wt)); + TQWhatsThis::add(w, i18n("A %1

%2

").tqarg(tt).tqarg(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 layout, raise it + // if the clicked widget is not in a tqlayout, 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 layout (it is a layout meta widget or a laid out container!), + // only if widget has a tqlayout (it is a tqlayout 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 geometry and more as the widget might start moving + { // left button: store original tqgeometry 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...").arg(w->name())); + mainWindow()->statusBar()->message(i18n("Connect '%1' with...").tqarg(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->colorGroup().midlight()); + wa->setPaletteBackgroundColor(wa->tqcolorGroup().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").arg(w->pos().x()).arg(w->pos().y())); + sizePreviewLabel->setText(TQString("%1/%2").tqarg(w->pos().x()).tqarg(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'").arg(connectSender->name()). + mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").tqarg(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 layout if necessary + // break tqlayout if necessary if (WidgetFactory::layoutType(wa) != WidgetFactory::NoLayout) { if (KMessageBox::questionYesNo(mainWindow(), i18n("You tried to insert a widget into the " - "layout Container Widget '%1'.\n" + "tqlayout Container Widget '%1'.\n" "This is not possible. " - "In order to insert the widget, the layout of '%1'\n" + "In order to insert the widget, the tqlayout of '%1'\n" "must first be broken.\n" - "Break the layout or cancel the operation?"). - arg(wa->name()).arg(wa->name()), i18n("Inserting Widget"), + "Break the tqlayout or cancel the operation?"). + tqarg(wa->name()).tqarg(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 " - "layout Container Widget '%1'.\n" + "tqlayout Container Widget '%1'.\n" "This is not possible. " - "In order to insert the widget, the layout of '%1'\n" + "In order to insert the widget, the tqlayout of '%1'\n" "must first be broken.\n" - "Break the layout or cancel the operation?"). + "Break the tqlayout 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.arg(r.width() - 1).arg(r.height() - 1); + t = t.tqarg(r.width() - 1).tqarg(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.arg(r.width() - 1).arg(r.height() - 1); + t = t.tqarg(r.width() - 1).tqarg(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 = geometry(); + TQRect oldr = tqgeometry(); mainContainer()->adjustSize(); resize(mainContainer()->size()); // check whether our own size constraint hit us if (size() != mainContainer()->size()) mainContainer()->resize(size()); - TQRect nr = geometry(); + TQRect nr = tqgeometry(); 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->geometry(); + TQRect oldr = w->tqgeometry(); w->adjustSize(); - TQRect nr = w->geometry(); + TQRect nr = w->tqgeometry(); 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->metaObject()->property(w->metaObject()->findProperty("text", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("text", true), true); const TQMetaProperty *title = - w->metaObject()->property(w->metaObject()->findProperty("title", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->findProperty("title", true), true); const TQMetaProperty *pageTitle = - w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true); + w->tqmetaObject()->property(w->tqmetaObject()->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.").arg(it.key().upper()).arg((*it).count()), + i18n("Accelerator '%1' is used %2 times.").tqarg(it.key().upper()).tqarg((*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 layout(); + delete tqlayout(); TQHBoxLayout *l = new TQHBoxLayout(this); l->addWidget(w); if (resetPropertyWidget) -- cgit v1.2.1