summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/resource.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /kdevdesigner/designer/resource.cpp
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/resource.cpp')
-rw-r--r--kdevdesigner/designer/resource.cpp851
1 files changed, 426 insertions, 425 deletions
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index eff7c84c..0e342060 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,7 +17,7 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
@@ -26,7 +26,7 @@
#include "actiondnd.h"
#include "command.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "database.h"
#endif
#include "formfile.h"
@@ -63,7 +63,7 @@
#include <tqobject.h>
#include <tqobjectlist.h>
#include <tqtabbar.h>
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include <tqtable.h>
#include <tqdatatable.h>
#endif
@@ -79,7 +79,7 @@
#include <tqworkspace.h>
#include <tqworkspace.h>
#include <tqsplitter.h>
-#include <private/qucom_p.h>
+#include <private/tqucom_p.h>
#include <kiconloader.h>
#include <kfiledialog.h>
@@ -97,109 +97,109 @@ static TQString makeIndent( int indent )
static TQString entitize( const TQString &s, bool attribute = FALSE )
{
TQString s2 = s;
- s2 = s2.replace( "&", "&amp;" );
- s2 = s2.replace( ">", "&gt;" );
- s2 = s2.replace( "<", "&lt;" );
+ s2 = s2.tqreplace( "&", "&amp;" );
+ s2 = s2.tqreplace( ">", "&gt;" );
+ s2 = s2.tqreplace( "<", "&lt;" );
if ( attribute ) {
- s2 = s2.replace( "\"", "&quot;" );
- s2 = s2.replace( "'", "&apos;" );
+ s2 = s2.tqreplace( "\"", "&quot;" );
+ s2 = s2.tqreplace( "'", "&apos;" );
}
return s2;
}
-#ifdef Q_WS_MACX
+#ifdef TQ_WS_MACX
static struct {
int key;
const char* name;
} keyname[] = {
- { Qt::Key_Space, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) },
- { Qt::Key_Escape, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) },
- { Qt::Key_Tab, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) },
- { Qt::Key_Backtab, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) },
- { Qt::Key_Backspace, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) },
- { Qt::Key_Return, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) },
- { Qt::Key_Enter, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) },
- { Qt::Key_Insert, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) },
- { Qt::Key_Delete, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) },
- { Qt::Key_Pause, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) },
- { Qt::Key_Print, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) },
- { Qt::Key_SysReq, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) },
- { Qt::Key_Home, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) },
- { Qt::Key_End, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) },
- { Qt::Key_Left, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) },
- { Qt::Key_Up, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) },
- { Qt::Key_Right, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) },
- { Qt::Key_Down, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) },
- { Qt::Key_Prior, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) },
- { Qt::Key_Next, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) },
- { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) },
- { Qt::Key_NumLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) },
- { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) },
- { Qt::Key_Menu, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) },
- { Qt::Key_Help, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) },
+ { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) },
+ { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) },
+ { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) },
+ { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) },
+ { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) },
+ { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) },
+ { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) },
+ { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) },
+ { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) },
+ { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) },
+ { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) },
+ { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) },
+ { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) },
+ { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) },
+ { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) },
+ { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) },
+ { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) },
+ { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) },
+ { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) },
+ { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) },
+ { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) },
+ { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) },
+ { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) },
+ { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) },
+ { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) },
// Multimedia keys
- { Qt::Key_Back, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) },
- { Qt::Key_Forward, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) },
- { Qt::Key_Stop, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) },
- { Qt::Key_Refresh, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) },
- { Qt::Key_VolumeDown, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) },
- { Qt::Key_VolumeMute, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) },
- { Qt::Key_VolumeUp, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) },
- { Qt::Key_BassBoost, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) },
- { Qt::Key_BassUp, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) },
- { Qt::Key_BassDown, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) },
- { Qt::Key_TrebleUp, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) },
- { Qt::Key_TrebleDown, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) },
- { Qt::Key_MediaPlay, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) },
- { Qt::Key_MediaStop, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) },
- { Qt::Key_MediaPrev, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) },
- { Qt::Key_MediaNext, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) },
- { Qt::Key_MediaRecord, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) },
- { Qt::Key_HomePage, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) },
- { Qt::Key_Favorites, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) },
- { Qt::Key_Search, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) },
- { Qt::Key_Standby, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) },
- { Qt::Key_OpenUrl, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) },
- { Qt::Key_LaunchMail, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) },
- { Qt::Key_LaunchMedia, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) },
- { Qt::Key_Launch0, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) },
- { Qt::Key_Launch1, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) },
- { Qt::Key_Launch2, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) },
- { Qt::Key_Launch3, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) },
- { Qt::Key_Launch4, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) },
- { Qt::Key_Launch5, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) },
- { Qt::Key_Launch6, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) },
- { Qt::Key_Launch7, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) },
- { Qt::Key_Launch8, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) },
- { Qt::Key_Launch9, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) },
- { Qt::Key_LaunchA, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) },
- { Qt::Key_LaunchB, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) },
- { Qt::Key_LaunchC, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) },
- { Qt::Key_LaunchD, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) },
- { Qt::Key_LaunchE, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) },
- { Qt::Key_LaunchF, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) },
+ { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) },
+ { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) },
+ { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) },
+ { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) },
+ { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) },
+ { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) },
+ { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) },
+ { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) },
+ { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) },
+ { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) },
+ { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) },
+ { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) },
+ { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) },
+ { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) },
+ { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) },
+ { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) },
+ { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) },
+ { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) },
+ { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) },
+ { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) },
+ { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) },
+ { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) },
+ { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) },
+ { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) },
+ { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) },
+ { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) },
+ { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) },
+ { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) },
+ { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) },
+ { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) },
+ { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) },
+ { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) },
+ { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) },
+ { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) },
+ { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) },
+ { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) },
+ { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) },
+ { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) },
+ { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) },
+ { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) },
// --------------------------------------------------------------
// More consistent namings
- { Qt::Key_Print, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) },
- { Qt::Key_Prior, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) },
- { Qt::Key_Next, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) },
- { Qt::Key_CapsLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) },
- { Qt::Key_NumLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) },
- { Qt::Key_NumLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) },
- { Qt::Key_ScrollLock, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) },
- { Qt::Key_Insert, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) },
- { Qt::Key_Delete, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) },
- { Qt::Key_Escape, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) },
- { Qt::Key_SysReq, QT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) },
+ { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) },
+ { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) },
+ { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) },
+ { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) },
+ { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) },
+ { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) },
+ { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) },
+ { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) },
+ { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) },
+ { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) },
+ { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) },
{ 0, 0 }
};
#endif
static TQString platformNeutralKeySequence(const TQKeySequence &ks)
{
-#ifndef Q_WS_MACX
+#ifndef TQ_WS_MACX
return TQString(ks);
#else
uint k;
@@ -207,26 +207,26 @@ static TQString platformNeutralKeySequence(const TQKeySequence &ks)
TQString p;
for (k = 0; k < ks.count(); ++k) {
int keycombo = ks[k];
- int basekey = keycombo & ~(Qt::SHIFT | Qt::CTRL | Qt::ALT | Qt::META);
- if (keycombo & Qt::CTRL)
+ int basekey = keycombo & ~(TQt::SHIFT | TQt::CTRL | TQt::ALT | TQt::META);
+ if (keycombo & TQt::CTRL)
str += "Ctrl+";
- if (keycombo & Qt::ALT)
+ if (keycombo & TQt::ALT)
str += "Alt+";
- if (keycombo & Qt::META)
+ if (keycombo & TQt::META)
str += "Meta+";
- if (keycombo & Qt::SHIFT)
+ if (keycombo & TQt::SHIFT)
str += "Shift+";
// begin copy and paste from TQKeySequence :(
- if (basekey & Qt::UNICODE_ACCEL) {
+ if (basekey & TQt::UNICODE_ACCEL) {
// Note: This character should NOT be upper()'ed, since
// the encoded string should indicate EXACTLY what the
// key represents! Hence a 'Ctrl+Shift+c' is posible to
// represent, but is clearly impossible to trigger...
p = TQChar(basekey & 0xffff);
- } else if ( basekey >= Qt::Key_F1 && basekey <= Qt::Key_F35 ) {
- p = TQAccel::tr( "F%1" ).arg(basekey - Qt::Key_F1 + 1);
- } else if ( basekey > Qt::Key_Space && basekey <= Qt::Key_AsciiTilde ) {
+ } else if ( basekey >= TQt::Key_F1 && basekey <= TQt::Key_F35 ) {
+ p = TQAccel::tr( "F%1" ).tqarg(basekey - TQt::Key_F1 + 1);
+ } else if ( basekey > TQt::Key_Space && basekey <= TQt::Key_AsciiTilde ) {
p.sprintf( "%c", basekey );
} else {
int i = 0;
@@ -238,7 +238,7 @@ static TQString platformNeutralKeySequence(const TQKeySequence &ks)
++i;
}
// If we can't find the actual translatable keyname,
- // fall back on the unicode representation of it...
+ // fall back on the tqunicode representation of it...
// Or else characters like Key_aring may not get displayed
// ( Really depends on you locale )
if ( !keyname[i].name )
@@ -319,7 +319,7 @@ bool Resource::load( FormFile *ff, Project *defProject )
TQFile f( ff->absFileName() );
f.open( IO_ReadOnly | IO_Translate );
- bool b = load( ff, &f, defProject );
+ bool b = load( ff, TQT_TQIODEVICE(&f), defProject );
f.close();
return b;
@@ -347,10 +347,10 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->setProject( MainWindow::self->currProject() );
if ( mainwindow )
formwindow->setMainWindow( mainwindow );
- MetaDataBase::addEntry( formwindow );
+ MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) );
if ( !langIface ) {
- TQString lang = "Qt Script";
+ TQString lang = "TQt Script";
if ( mainwindow )
lang = mainwindow->currProject()->language();
langIface = MetaDataBase::languageInterface( lang );
@@ -460,10 +460,10 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
}
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
- } else if ( e.tagName() == "layoutdefaults" ) {
- formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
- formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
- } else if ( e.tagName() == "layoutfunctions" ) {
+ } else if ( e.tagName() == "tqlayoutdefaults" ) {
+ formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->tqlayoutDefaultSpacing() ) ).toInt() );
+ formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->tqlayoutDefaultMargin() ) ).toInt() );
+ } else if ( e.tagName() == "tqlayoutfunctions" ) {
formwindow->setSpacingFunction( e.attribute( "spacing" ) );
formwindow->setMarginFunction( e.attribute( "margin" ) );
if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() )
@@ -478,13 +478,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
if ( !customWidgets.isNull() )
loadCustomWidgets( customWidgets, this );
-#if defined (QT_NON_COMMERCIAL)
+#if defined (TQT_NON_COMMERCIAL)
bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE;
TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self );
if ( !w )
return FALSE;
if ( previewMode )
- w->reparent( MainWindow::self, Qt::WType_TopLevel, w->pos(), TRUE );
+ w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE );
#else
if ( !createObject( widget, formwindow) )
return FALSE;
@@ -552,11 +552,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
function.returnType = "void";
function.type = "slot";
function.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
- MetaDataBase::addFunction( formwindow, function.function, function.specifier,
+ if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) )
+ MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier,
function.access, "slot", function.language, function.returnType );
else
- MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function,
+ MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function,
function.specifier, function.access,
"slot", function.language,
function.returnType );
@@ -580,12 +580,12 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
if ( function.returnType.isEmpty() )
function.returnType = "void";
function.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
- MetaDataBase::addFunction( formwindow, function.function, function.specifier,
+ if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) )
+ MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier,
function.access, function.type, function.language,
function.returnType );
else
- MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function,
+ MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function,
function.specifier, function.access,
function.type, function.language, function.returnType );
}
@@ -606,13 +606,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
loadTabOrder( tabOrder );
if ( formwindow ) {
- MetaDataBase::setIncludes( formwindow, metaIncludes );
- MetaDataBase::setForwards( formwindow, metaForwards );
- MetaDataBase::setVariables( formwindow, metaVariables );
- MetaDataBase::setSignalList( formwindow, metaSignals );
+ MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes );
+ MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards );
+ MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables );
+ MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals );
metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() );
- MetaDataBase::setMetaInfo( formwindow, metaInfo );
- MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
+ MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo );
+ MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro );
}
loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions );
@@ -621,14 +621,14 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
mainwindow->insertFormWindow( formwindow );
if ( formwindow ) {
- formwindow->killAccels( formwindow );
- if ( formwindow->layout() )
- formwindow->layout()->activate();
+ formwindow->killAccels( TQT_TQOBJECT(formwindow) );
+ if ( formwindow->tqlayout() )
+ formwindow->tqlayout()->activate();
if ( hadGeometry )
- formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize().
- expandedTo( formwindow->minimumSizeHint() ) ) );
+ formwindow->resize( formwindow->size().expandedTo( formwindow->tqminimumSize().
+ expandedTo( formwindow->tqminimumSizeHint() ) ) );
else
- formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) );
+ formwindow->resize( formwindow->size().expandedTo( formwindow->tqsizeHint() ) );
}
return TRUE;
@@ -650,7 +650,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
if ( !formwindow || filename.isEmpty() )
return FALSE;
if (!langIface) {
- TQString lang = "Qt Script";
+ TQString lang = "TQt Script";
if ( mainwindow )
lang = mainwindow->currProject()->language();
langIface = MetaDataBase::languageInterface( lang );
@@ -678,7 +678,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return FALSE;
- bool b = save( &f );
+ bool b = save( TQT_TQIODEVICE(&f) );
f.close();
return b;
}
@@ -702,19 +702,19 @@ bool Resource::save( TQIODevice* dev )
ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
- saveObject( formwindow->mainContainer(), 0, ts, 0 );
- if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
+ saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 );
+ if ( ::tqqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
- if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) )
+ if ( ::tqqt_cast<TQMainWindow*>(formwindow->mainContainer()) )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
- if ( !MetaDataBase::connections( formwindow ).isEmpty() ||
- !MetaDataBase::slotList( formwindow ).isEmpty() )
+ if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() ||
+ !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() )
saveConnections( ts, 0 );
saveTabOrder( ts, 0 );
saveMetaInfoAfter( ts, 0 );
@@ -729,7 +729,7 @@ bool Resource::save( TQIODevice* dev )
TQString Resource::copy()
{
if ( !formwindow )
- return TQString::null;
+ return TQString();
copying = TRUE;
TQString s;
@@ -739,17 +739,17 @@ TQString Resource::copy()
TQWidgetList widgets = formwindow->selectedWidgets();
TQWidgetList tmp( widgets );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
bool save = TRUE;
while ( p ) {
- if ( tmp.findRef( p ) != -1 ) {
+ if ( tmp.tqfindRef( p ) != -1 ) {
save = FALSE;
break;
}
- p = p->parentWidget();
+ p = p->tqparentWidget();
}
if ( save )
- saveObject( w, 0, ts, 0 );
+ saveObject( TQT_TQOBJECT(w), 0, ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
@@ -761,7 +761,7 @@ TQString Resource::copy()
}
-void Resource::paste( const TQString &cb, TQWidget *parent )
+void Resource::paste( const TQString &cb, TQWidget *tqparent )
{
if ( !formwindow )
return;
@@ -795,33 +795,33 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
formwindow->clearSelection( FALSE );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
- TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
+ TQWidget *w = (TQWidget*)createObject( firstWidget, tqparent, 0 );
if ( !w )
continue;
widgets.append( w );
int x = w->x() + formwindow->grid().x();
int y = w->y() + formwindow->grid().y();
- if ( w->x() + w->width() > parent->width() )
- x = QMAX( 0, parent->width() - w->width() );
- if ( w->y() + w->height() > parent->height() )
- y = QMAX( 0, parent->height() - w->height() );
+ if ( w->x() + w->width() > tqparent->width() )
+ x = TQMAX( 0, tqparent->width() - w->width() );
+ if ( w->y() + w->height() > tqparent->height() )
+ y = TQMAX( 0, tqparent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( w );
+ formwindow->selectWidget( TQT_TQOBJECT(w) );
} else if ( firstWidget.tagName() == "spacer" ) {
- TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
+ TQWidget *w = createSpacer( firstWidget, tqparent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
if ( !w )
continue;
widgets.append( w );
int x = w->x() + formwindow->grid().x();
int y = w->y() + formwindow->grid().y();
- if ( w->x() + w->width() > parent->width() )
- x = QMAX( 0, parent->width() - w->width() );
- if ( w->y() + w->height() > parent->height() )
- y = QMAX( 0, parent->height() - w->height() );
+ if ( w->x() + w->width() > tqparent->width() )
+ x = TQMAX( 0, tqparent->width() - w->width() );
+ if ( w->y() + w->height() > tqparent->height() )
+ y = TQMAX( 0, tqparent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( w );
+ formwindow->selectWidget( TQT_TQOBJECT(w) );
}
firstWidget = firstWidget.nextSibling().toElement();
}
@@ -832,7 +832,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
formwindow->commandHistory()->addCommand( cmd );
}
-void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent )
+void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent )
{
if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() )
return;
@@ -846,12 +846,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
includeHints << WidgetDatabase::includeFile( classID );
}
- if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
+ if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->tqfind( (TQWidget*)obj ) )
return; // we don't know anything about this thing
TQString attributes;
if ( grid ) {
- QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
+ TQDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
attributes += TQString(" row=\"") + TQString::number(item.row) + "\"";
attributes += TQString(" column=\"") + TQString::number(item.column) + "\"";
if ( item.rowspan * item.colspan != 1 ) {
@@ -877,13 +877,13 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
return;
}
- QDesignerWidgetStack* ws = 0;
+ TQDesignerWidgetStack* ws = 0;
- if ( ::qt_cast<TQTabWidget*>(obj) ) {
+ if ( ::tqqt_cast<TQTabWidget*>(obj) ) {
TQTabWidget* tw = (TQTabWidget*) obj;
TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
- TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
+ TQTabBar *tb = ( (TQDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
TQTab *t = tb->tabAt( i );
if ( !t )
@@ -891,9 +891,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = ws->widget( t->identifier() );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ) == -1 )
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
indent++;
@@ -906,19 +906,19 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
delete tmpl;
- } else if ( (ws = ::qt_cast<QDesignerWidgetStack*>(obj)) != 0 ) {
+ } else if ( (ws = ::tqqt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) {
for ( int i = 0; i < ws->count(); ++i ) {
TQWidget *w = ws->page( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
indent++;
@@ -930,19 +930,19 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<number>" << TQString::number(i) << "</number>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::qt_cast<TQToolBox*>(obj) ) {
+ } else if ( ::tqqt_cast<TQToolBox*>(obj) ) {
TQToolBox* tb = (TQToolBox*)obj;
for ( int i = 0; i < tb->count(); ++i ) {
TQWidget *w = tb->item( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
indent++;
@@ -951,7 +951,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
indent++;
- saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
+ saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
@@ -959,19 +959,19 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::qt_cast<TQWizard*>(obj) ) {
+ } else if ( ::tqqt_cast<TQWizard*>(obj) ) {
TQWizard* wiz = (TQWizard*)obj;
for ( int i = 0; i < wiz->pageCount(); ++i ) {
TQWidget *w = wiz->page( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
indent++;
@@ -984,21 +984,21 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::qt_cast<TQMainWindow*>(obj) ) {
- saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
+ } else if ( ::tqqt_cast<TQMainWindow*>(obj) ) {
+ saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent );
} else {
bool saved = FALSE;
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
if ( isPlugin ) {
WidgetInterface *iface = 0;
widgetManager()->queryInterface( className, &iface );
if ( iface ) {
- QWidgetContainerInterfacePrivate *iface2 = 0;
- iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );
+ TQWidgetContainerInterfacePrivate *iface2 = 0;
+ iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 );
if ( iface2 ) {
if ( iface2->supportsPages( className ) ) {
TQWidgetList containers = iface2->pages( className, (TQWidget*)obj );
@@ -1007,10 +1007,10 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
int i = 0;
for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) {
if ( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
+ idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 )
continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( w )
+ << WidgetFactory::classNameOf( TQT_TQOBJECT(w) )
<< "\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
@@ -1036,7 +1036,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj );
if ( obj != w ) {
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( w )
+ << WidgetFactory::classNameOf( TQT_TQOBJECT(w) )
<< "\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
@@ -1054,14 +1054,14 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget;
cw->className = className;
cw->includeFile = WidgetDatabase::includeFile( classID );
- TQStrList lst = w->metaObject()->signalNames( TRUE );
+ TQStrList lst = w->tqmetaObject()->signalNames( TRUE );
for ( TQPtrListIterator<char> it(lst); it.current(); ++it )
cw->lstSignals.append(it.current());
int i;
- int total = w->metaObject()->numProperties( TRUE );
+ int total = w->tqmetaObject()->numProperties( TRUE );
for ( i = 0; i < total; i++ ) {
- const TQMetaProperty *p = w->metaObject()->property( i, TRUE );
+ const TQMetaProperty *p = w->tqmetaObject()->property( i, TRUE );
if ( p->designable(w) ) {
MetaDataBase::Property prop;
prop.property = p->name();
@@ -1079,27 +1079,27 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
}
}
- total = w->metaObject()->numSlots( TRUE );
+ total = w->tqmetaObject()->numSlots( TRUE );
for ( i = 0; i < total; i++ ) {
- const QMetaData *md = w->metaObject()->slot( i, TRUE );
+ const TQMetaData *md = w->tqmetaObject()->slot( i, TRUE );
MetaDataBase::Function funky;
// Find out if we have a return type.
if ( md->method->count > 0 ) {
- const QUParameter p = md->method->parameters[0];
- if ( p.inOut == QUParameter::InOut )
+ const TQUParameter p = md->method->parameters[0];
+ if ( p.inOut == TQUParameter::InOut )
funky.returnType = p.type->desc();
}
funky.function = md->name;
funky.language = "C++";
switch ( md->access ) {
- case QMetaData::Public:
+ case TQMetaData::Public:
funky.access = "public";
break;
- case QMetaData::Protected:
+ case TQMetaData::Protected:
funky.access = "protected";
break;
- case QMetaData::Private:
+ case TQMetaData::Private:
funky.access = "private";
break;
}
@@ -1112,7 +1112,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
iface->release();
}
}
-#endif // QT_CONTAINER_CUSTOM_WIDGETS
+#endif // TQT_CONTAINER_CUSTOM_WIDGETS
if ( !saved )
saveChildrenOf( obj, ts, indent );
}
@@ -1123,9 +1123,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
{
- if ( ::qt_cast<TQListBox*>(obj) || ::qt_cast<TQComboBox*>(obj) ) {
+ if ( ::tqqt_cast<TQListBox*>(obj) || ::tqqt_cast<TQComboBox*>(obj) ) {
TQListBox *lb = 0;
- if ( ::qt_cast<TQListBox*>(obj) )
+ if ( ::tqqt_cast<TQListBox*>(obj) )
lb = (TQListBox*)obj;
else
lb = ( (TQComboBox*)obj )->listBox();
@@ -1143,7 +1143,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( ::qt_cast<TQIconView*>(obj) ) {
+ } else if ( ::tqqt_cast<TQIconView*>(obj) ) {
TQIconView *iv = (TQIconView*)obj;
TQIconViewItem *i = iv->firstItem();
@@ -1159,7 +1159,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( ::qt_cast<TQListView*>(obj) ) {
+ } else if ( ::tqqt_cast<TQListView*>(obj) ) {
TQListView *lv = (TQListView*)obj;
int i;
for ( i = 0; i < lv->header()->count(); ++i ) {
@@ -1187,13 +1187,13 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
}
saveItem( lv->firstChild(), ts, indent - 1 );
}
-#if !defined (QT_NO_TABLE)
- else if ( ::qt_cast<TQTable*>(obj) ) {
+#if !defined (TQT_NO_TABLE)
+ else if ( ::tqqt_cast<TQTable*>(obj) ) {
TQTable *table = (TQTable*)obj;
int i;
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
-# ifndef QT_NO_SQL
- bool isDataTable = ::qt_cast<TQDataTable*>(table);
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
+# ifndef TQT_NO_SQL
+ bool isDataTable = ::tqqt_cast<TQDataTable*>(table);
# else
bool isDataTable = false;
# endif
@@ -1214,7 +1214,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
if ( isDataTable && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
indent++;
- ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
+ ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.tqfind( l[ 0 ] ) ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
}
@@ -1277,10 +1277,10 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons
if ( formwindow && formwindow->savePixmapInline() )
ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "</" << tagname << ">" << endl;
else if ( formwindow && formwindow->savePixmapInProject() )
- ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() )
+ ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() )
<< "</" << tagname << ">" << endl;
else
- ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() )
+ ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() )
<< "</" << tagname << ">" << endl;
}
@@ -1292,7 +1292,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
TQImage img = loadFromCollection( arg );
TQPixmap pix;
pix.convertFromImage( img );
- MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
} else if ( formwindow && formwindow->savePixmapInProject() ) {
TQPixmap pix;
@@ -1304,13 +1304,13 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
pix.convertFromImage( pix.convertToImage() );
}
- MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() );
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( pix.convertToImage() );
- MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
@@ -1342,19 +1342,19 @@ void Resource::saveItem( const TQStringList &text,
void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
{
- const TQObjectList *l = obj->children();
- if ( !l )
- return; // no children to save
+ const TQObjectList l = obj->childrenListObject();
+ if ( l.isEmpty() )
+ return; // no tqchildren to save
TQString closeTag;
- // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
- TQLayout *layout = 0;
- QDesignerGridLayout* grid = 0;
- if ( !::qt_cast<TQSplitter*>(obj) &&
+ // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer
+ TQLayout *tqlayout = 0;
+ TQDesignerGridLayout* grid = 0;
+ if ( !::tqqt_cast<TQSplitter*>(obj) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
- WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
- WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout );
+ WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) {
+ WidgetFactory::LayoutType lay = WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout );
switch ( lay ) {
case WidgetFactory::HBox:
closeTag = makeIndent( indent ) + "</hbox>";
@@ -1370,20 +1370,20 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
closeTag = makeIndent( indent ) + "</grid>";
ts << makeIndent( indent ) << "<grid>" << endl;
++indent;
- grid = (QDesignerGridLayout*) layout;
+ grid = (TQDesignerGridLayout*) tqlayout;
break;
default:
break;
}
- // save properties of layout
+ // save properties of tqlayout
if ( lay != WidgetFactory::NoLayout )
- saveObjectProperties( layout, ts, indent );
+ saveObjectProperties( TQT_TQOBJECT(tqlayout), ts, indent );
}
TQObject *o = 0;
- for ( TQPtrListIterator<TQObject> it ( *l ); ( o = it.current() ); ++it )
+ for ( TQPtrListIterator<TQObject> it ( l ); ( o = it.current() ); ++it )
if ( !TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
saveObject( o, grid, ts, indent );
if ( !closeTag.isEmpty() ) {
@@ -1398,55 +1398,55 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
TQStringList changed;
changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) {
- if ( ::qt_cast<Spacer*>(w) ) {
- if ( !changed.contains( "sizeHint" ) )
- changed << "sizeHint";
- if ( !changed.contains( "geometry" ) )
+ if ( ::tqqt_cast<Spacer*>(w) ) {
+ if ( !changed.tqcontains( "tqsizeHint" ) )
+ changed << "tqsizeHint";
+ if ( !changed.tqcontains( "geometry" ) )
changed << "geometry";
} else {
- TQToolButton *tb = ::qt_cast<TQToolButton*>(w);
+ TQToolButton *tb = ::tqqt_cast<TQToolButton*>(w);
if ( tb && !tb->iconSet().isNull() ) {
changed << "iconSet";
}
}
- } else if ( ::qt_cast<TQLayout*>(w) ) {
- if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 )
+ } else if ( ::tqqt_cast<TQLayout*>(w) ) {
+ if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
changed << "spacing";
- if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 )
+ if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
changed << "margin";
- if ( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) != "Auto"
- && !MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ).isEmpty() )
+ if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) != "Auto"
+ && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() )
changed << "resizeMode";
}
- if ( w == formwindow->mainContainer() ) {
- if ( changed.findIndex( "geometry" ) == -1 )
+ if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
+ if ( changed.tqfindIndex( "geometry" ) == -1 )
changed << "geometry";
- if ( changed.findIndex( "caption" ) == -1 )
+ if ( changed.tqfindIndex( "caption" ) == -1 )
changed << "caption";
}
if ( changed.isEmpty() )
return;
- bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->tqparentWidget() &&
+ WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout;
- TQStrList lst = w->metaObject()->propertyNames( !::qt_cast<Spacer*>(w) );
+ TQStrList lst = w->tqmetaObject()->propertyNames( !::tqqt_cast<Spacer*>(w) );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
- if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() )
+ if ( changed.tqfind( TQString::tqfromLatin1( it.current() ) ) == changed.end() )
continue;
- if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() )
+ if ( saved.tqfind( TQString::tqfromLatin1( it.current() ) ) != saved.end() )
continue;
- saved << TQString::fromLatin1( it.current() );
- const TQMetaProperty* p = w->metaObject()->
- property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE );
+ saved << TQString::tqfromLatin1( it.current() );
+ const TQMetaProperty* p = w->tqmetaObject()->
+ property( w->tqmetaObject()->tqfindProperty( it.current(), TRUE ), TRUE );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
- if ( ::qt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
+ if ( ::tqqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
- if ( ::qt_cast<MenuBarEditor*>(w) &&
+ if ( ::tqqt_cast<MenuBarEditor*>(w) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
qstrcmp( p->name(), "itemText" ) == 0 ) )
continue;
@@ -1460,7 +1460,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
ts << " stdset=\"0\"";
ts << ">" << endl;
indent++;
- if ( strcmp( it.current(), "resizeMode" ) == 0 && ::qt_cast<TQLayout*>(w) ) {
+ if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_cast<TQLayout*>(w) ) {
saveProperty( w, it.current(), "", TQVariant::String, ts, indent );
} else if ( p->isSetType() ) {
saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent );
@@ -1496,7 +1496,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, TRUE ), TRUE );
TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
@@ -1509,25 +1509,25 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty
void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, TRUE ), TRUE );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent )
{
if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" ||
- name == "layoutMargin" || name =="layoutSpacing" )
+ name == "tqlayoutMargin" || name =="tqlayoutSpacing" )
return;
int num;
uint unum;
double dob;
TQString comment;
- if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) )
+ if ( w && formwindow->widgets()->tqfind( (TQWidget*)w ) || formwindow->actionList().tqfind( (TQAction*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
case TQVariant::String:
if ( name == "resizeMode" ) {
- TQString resmod = MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
+ TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) );
if ( !resmod.isNull() && resmod != "Auto" ) {
ts << makeIndent( indent ) << "<enum>";
ts << resmod;
@@ -1547,12 +1547,12 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl;
break;
case TQVariant::Int:
- if ( ::qt_cast<TQLayout*>(w) ) {
+ if ( ::tqqt_cast<TQLayout*>(w) ) {
num = -1;
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
+ num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
+ num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) );
if ( num != -1 )
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
} else {
@@ -1612,9 +1612,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
case TQVariant::Font: {
TQVariant v( value );
ts << makeIndent( indent ) << "<font>" << endl;
- TQFont f( qApp->font() );
- if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() )
- f = ((TQWidget*)w)->parentWidget()->font();
+ TQFont f( tqApp->font() );
+ if ( w && w->isWidgetType() && ((TQWidget*)w)->tqparentWidget() )
+ f = ((TQWidget*)w)->tqparentWidget()->font();
TQFont f2( v.toFont() );
indent++;
if ( f.family() != f2.family() )
@@ -1680,7 +1680,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
ts << makeIndent( indent ) << "</palette>" << endl;
} break;
case TQVariant::Cursor:
- ts << makeIndent( indent ) << "<cursor>" << value.toCursor().shape() << "</cursor>" << endl;
+ ts << makeIndent( indent ) << "<cursor>" << value.toCursor().tqshape() << "</cursor>" << endl;
break;
case TQVariant::StringList: {
TQStringList lst = value.toStringList();
@@ -1743,7 +1743,7 @@ void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup
saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) );
indent--;
ts << makeIndent( indent ) << "</color>" << endl;
- TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap();
+ TQPixmap* pm = cg.tqbrush( (TQColorGroup::ColorRole)r ).pixmap();
if ( pm && !pm->isNull() )
savePixmap( *pm, ts, indent );
}
@@ -1756,7 +1756,7 @@ void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c )
ts << makeIndent( indent ) << "<blue>" << TQString::number( c.blue() ) << "</blue>" << endl;
}
-TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout )
+TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout )
{
lastItem = 0;
TQDomElement n = e.firstChild().toElement();
@@ -1773,21 +1773,21 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
colspan = 1;
TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING );
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
- TQString parentClassName = WidgetFactory::classNameOf( parent );
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
+ TQString tqparentClassName = WidgetFactory::classNameOf( tqparent );
bool isPlugin =
- WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) );
+ WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( tqparentClassName ) );
if ( isPlugin )
qWarning( "####### loading custom container widgets without page support not implemented!" );
// ### TODO loading for custom container widgets without pages
#endif
if ( !className.isNull() ) {
- obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE );
+ obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), tqparent, 0, FALSE ));
if ( !obj ) {
TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ),
i18n( "Error loading %1.\n"
"The widget %2 could not be created." ).
- arg( currFileName ).arg( className ) );
+ tqarg( currFileName ).tqarg( className ) );
return 0;
}
if ( !mainContainerSet ) {
@@ -1796,18 +1796,18 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
mainContainerSet = TRUE;
}
w = (TQWidget*)obj;
- if ( ::qt_cast<TQMainWindow*>(w) )
+ if ( ::tqqt_cast<TQMainWindow*>(w) )
w = ( (TQMainWindow*)w )->centralWidget();
- if ( layout ) {
- switch ( WidgetFactory::layoutType( layout ) ) {
+ if ( tqlayout ) {
+ switch ( WidgetFactory::tqlayoutType( tqlayout ) ) {
case WidgetFactory::HBox:
- ( (TQHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)tqlayout )->addWidget( w );
break;
case WidgetFactory::VBox:
- ( (TQVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)tqlayout )->addWidget( w );
break;
case WidgetFactory::Grid:
- ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -1817,29 +1817,29 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( !toplevel )
toplevel = w;
- layout = 0;
+ tqlayout = 0;
if ( w && formwindow ) {
- if ( !parent ||
- ( !::qt_cast<TQTabWidget*>(parent) &&
- !::qt_cast<TQWidgetStack*>(parent) &&
- !::qt_cast<TQToolBox*>(parent) &&
- !::qt_cast<TQWizard*>(parent)
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
+ if ( !tqparent ||
+ ( !::tqqt_cast<TQTabWidget*>(tqparent) &&
+ !::tqqt_cast<TQWidgetStack*>(tqparent) &&
+ !::tqqt_cast<TQToolBox*>(tqparent) &&
+ !::tqqt_cast<TQWizard*>(tqparent)
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
&& !isPlugin
#endif
) )
formwindow->insertWidget( w, pasting );
- else if ( parent &&
- ( ::qt_cast<TQTabWidget*>(parent) ||
- ::qt_cast<TQWidgetStack*>(parent) ||
- ::qt_cast<TQToolBox*>(parent) ||
- ::qt_cast<TQWizard*>(parent)
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
+ else if ( tqparent &&
+ ( ::tqqt_cast<TQTabWidget*>(tqparent) ||
+ ::tqqt_cast<TQWidgetStack*>(tqparent) ||
+ ::tqqt_cast<TQToolBox*>(tqparent) ||
+ ::tqqt_cast<TQWizard*>(tqparent)
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
|| isPlugin
#endif
) )
- MetaDataBase::addEntry( w );
+ MetaDataBase::addEntry( TQT_TQOBJECT(w) );
}
}
@@ -1848,22 +1848,22 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
while ( !n.isNull() ) {
if ( n.tagName() == "spacer" ) {
- createSpacer( n, w, layout, Qt::Horizontal );
+ createSpacer( n, w, tqlayout, Qt::Horizontal );
} else if ( n.tagName() == "widget" ) {
- createObject( n, w, layout );
+ createObject( n, w, tqlayout );
} else if ( n.tagName() == "hbox" ) {
- layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox );
- obj = layout;
+ tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::HBox );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "grid" ) {
- layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid );
- obj = layout;
+ tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::Grid );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "vbox" ) {
- layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox );
- obj = layout;
+ tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::VBox );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "property" && obj ) {
@@ -1877,35 +1877,35 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
} else if ( n.tagName() == "attribute" && w ) {
TQString attrib = n.attribute( "name" );
TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
- if ( ::qt_cast<TQTabWidget*>(parent) ) {
+ if ( ::tqqt_cast<TQTabWidget*>(tqparent) ) {
if ( attrib == "title" )
- ( (TQTabWidget*)parent )->insertTab( w, v.toString() );
- } else if ( ::qt_cast<TQWidgetStack*>(parent) ) {
+ ( (TQTabWidget*)tqparent )->insertTab( w, v.toString() );
+ } else if ( ::tqqt_cast<TQWidgetStack*>(tqparent) ) {
if ( attrib == "id" )
- ( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() );
- } else if ( ::qt_cast<TQToolBox*>(parent) ) {
+ ( (TQDesignerWidgetStack*)tqparent )->insertPage( w, v.toInt() );
+ } else if ( ::tqqt_cast<TQToolBox*>(tqparent) ) {
if ( attrib == "label" )
- ( (TQToolBox*)parent )->addItem( w, v.toString() );
- } else if ( ::qt_cast<TQWizard*>(parent) ) {
+ ( (TQToolBox*)tqparent )->addItem( w, v.toString() );
+ } else if ( ::tqqt_cast<TQWizard*>(tqparent) ) {
if ( attrib == "title" )
- ( (TQWizard*)parent )->addPage( w, v.toString() );
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
+ ( (TQWizard*)tqparent )->addPage( w, v.toString() );
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( isPlugin ) {
if ( attrib == "label" ) {
WidgetInterface *iface = 0;
- widgetManager()->queryInterface( parentClassName, &iface );
+ widgetManager()->queryInterface( tqparentClassName, &iface );
if ( iface ) {
- QWidgetContainerInterfacePrivate *iface2 = 0;
- iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&iface2 );
+ TQWidgetContainerInterfacePrivate *iface2 = 0;
+ iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 );
if ( iface2 ) {
- iface2->insertPage( parentClassName,
- (TQWidget*)parent, v.toString(), -1, w );
+ iface2->insertPage( tqparentClassName,
+ (TQWidget*)tqparent, v.toString(), -1, w );
iface2->release();
}
iface->release();
}
}
-#endif // QT_CONTAINER_CUSTOM_WIDGETS
+#endif // TQT_CONTAINER_CUSTOM_WIDGETS
}
} else if ( n.tagName() == "item" ) {
createItem( n, w );
@@ -1926,7 +1926,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( w->isWidgetType() )
widgets.insert( w->name(), w );
- return w;
+ return TQT_TQOBJECT(w);
}
void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
@@ -1934,7 +1934,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
if ( !widget )
return;
- if ( ::qt_cast<TQListView*>(widget) && e.tagName() == "column" ) {
+ if ( ::tqqt_cast<TQListView*>(widget) && e.tagName() == "column" ) {
TQListView *lv = (TQListView*)widget;
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
@@ -1967,8 +1967,8 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
if ( !resizable )
lv->header()->setResizeEnabled( resizable, i );
}
-#ifndef QT_NO_TABLE
- else if ( ::qt_cast<TQTable*>(widget) ) {
+#ifndef TQT_NO_TABLE
+ else if ( ::tqqt_cast<TQTable*>(widget) ) {
TQTable *table = (TQTable*)widget;
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
@@ -1981,7 +1981,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
bool hasPixmap = FALSE;
TQString txt;
TQString field;
- TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
+ TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -2006,7 +2006,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
h->setLabel( i, txt );
if ( !isRow && !field.isEmpty() )
fieldMap.insert( txt, field );
- MetaDataBase::setColumnFields( table, fieldMap );
+ MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap );
}
#endif
}
@@ -2032,17 +2032,17 @@ void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bo
void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i )
{
- if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) )
+ if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) )
return;
- if ( ::qt_cast<TQListBox*>(widget) || ::qt_cast<TQComboBox*>(widget) ) {
+ if ( ::tqqt_cast<TQListBox*>(widget) || ::tqqt_cast<TQComboBox*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0;
- if ( ::qt_cast<TQListBox*>(widget) )
+ if ( ::tqqt_cast<TQListBox*>(widget) )
lb = (TQListBox*)widget;
else
lb = ( (TQComboBox*)widget)->listBox();
@@ -2051,7 +2051,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} else {
new TQListBoxText( lb, txt );
}
- } else if ( ::qt_cast<TQIconView*>(widget) ) {
+ } else if ( ::tqqt_cast<TQIconView*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
bool hasPixmap = FALSE;
@@ -2062,7 +2062,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
new TQIconViewItem( iv, txt, pix );
else
new TQIconViewItem( iv, txt );
- } else if ( ::qt_cast<TQListView*>(widget) ) {
+ } else if ( ::tqqt_cast<TQListView*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
TQValueList<TQPixmap> pixmaps;
@@ -2104,7 +2104,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
}
}
-TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o )
+TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQLayout *tqlayout, Qt::Orientation o )
{
TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt();
@@ -2117,23 +2117,23 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
colspan = 1;
Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"),
- parent, "spacer", FALSE);
+ tqparent, "spacer", FALSE);
spacer->setOrientation( o );
spacer->setInteraciveMode( FALSE );
while ( !n.isNull() ) {
if ( n.tagName() == "property" )
- setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() );
+ setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() );
n = n.nextSibling().toElement();
}
spacer->setInteraciveMode( TRUE );
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
- if ( layout ) {
- if ( ::qt_cast<TQBoxLayout*>(layout) )
- ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
+ if ( tqlayout ) {
+ if ( ::tqqt_cast<TQBoxLayout*>(tqlayout) )
+ ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->tqalignment() );
else
- ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
- spacer->alignment() );
+ ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
+ spacer->tqalignment() );
}
return spacer;
}
@@ -2143,9 +2143,9 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
*/
void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE );
+ const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, TRUE ), TRUE );
- if ( !::qt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
+ if ( !::tqqt_cast<TQLayout*>(obj) ) {// no tqlayouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
@@ -2156,9 +2156,9 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
TQVariant defVarient;
if ( e.tagName() == "font" ) {
- TQFont f( qApp->font() );
- if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
- f = ( (TQWidget*)obj )->parentWidget()->font();
+ TQFont f( tqApp->font() );
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->tqparentWidget() )
+ f = ( (TQWidget*)obj )->tqparentWidget()->font();
defVarient = TQVariant( f );
}
@@ -2187,7 +2187,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) {
- if ( prop == "database" && obj != toplevel ) {
+ if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) {
TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] );
@@ -2241,32 +2241,32 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
}
if ( prop == "icon" ) {
formwindow->setIcon( v.toPixmap() );
- TQString pmk = MetaDataBase::pixmapKey( formwindow, v.toPixmap().serialNumber() );
- MetaDataBase::setPixmapKey( formwindow,
+ TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() );
+ MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow),
formwindow->icon()->serialNumber(), pmk );
}
if ( prop == "geometry" ) {
- if ( obj == toplevel ) {
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) {
hadGeometry = TRUE;
toplevel->resize( v.toRect().size() );
return;
- } else if ( obj == formwindow->mainContainer() ) {
+ } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
hadGeometry = TRUE;
formwindow->resize( v.toRect().size() );
return;
}
}
- if ( ::qt_cast<TQLayout*>(obj) ) {
+ if ( ::tqqt_cast<TQLayout*>(obj) ) {
if ( prop == "spacing" ) {
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
return;
} else if ( prop == "margin" ) {
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
return;
} else if ( e.tagName() == "enum" && prop == "resizeMode" ) {
- MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toString() );
+ MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toString() );
return;
}
}
@@ -2274,10 +2274,10 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "name" ) {
if ( pasting ) {
TQString s = v.toString();
- formwindow->unify( (TQWidget*)obj, s, TRUE );
+ formwindow->unify( TQT_TQOBJECT(obj), s, TRUE );
obj->setName( s );
return;
- } else if ( formwindow && obj == formwindow->mainContainer() ) {
+ } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
formwindow->setName( v.toCString() );
}
}
@@ -2335,9 +2335,9 @@ void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent )
TQByteArray bazip = ba;
int i = 0;
if (compress) {
- bazip = qCompress( ba );
+ bazip = tqCompress( ba );
format += ".GZ";
- // The first 4 bytes in qCompress() are the length of the unzipped
+ // The first 4 bytes in tqCompress() are the length of the unzipped
// format. The XPM.GZ format does not use these.
i = 4;
}
@@ -2397,14 +2397,14 @@ static TQImage loadImageData( TQDomElement &n2 )
ulong len = n2.attribute( "length" ).toULong();
if ( len < data.length() * 5 )
len = data.length() * 5;
- // qUncompress() expects the first 4 bytes to be the expected length of
+ // tqUncompress() expects the first 4 bytes to be the expected length of
// the uncompressed data
ba[0] = ( len & 0xff000000 ) >> 24;
ba[1] = ( len & 0x00ff0000 ) >> 16;
ba[2] = ( len & 0x0000ff00 ) >> 8;
ba[3] = ( len & 0x000000ff );
- TQByteArray baunzip = qUncompress( ba, baSize );
- img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) );
+ TQByteArray baunzip = tqUncompress( ba, baSize );
+ img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.tqfind('.')) );
} else {
img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format );
}
@@ -2443,7 +2443,7 @@ TQImage Resource::loadFromCollection( const TQString &name )
void Resource::saveConnections( TQTextStream &ts, int indent )
{
- TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) );
if ( connections.isEmpty() )
return;
ts << makeIndent( indent ) << "<connections>" << endl;
@@ -2451,13 +2451,13 @@ void Resource::saveConnections( TQTextStream &ts, int indent )
TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
for ( ; it != connections.end(); ++it ) {
MetaDataBase::Connection conn = *it;
- if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 &&
+ if ( ( knownNames.tqfindIndex( TQString( conn.sender->name() ) ) == -1 &&
qstrcmp( conn.sender->name(), "this" ) != 0 ) ||
- ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 &&
+ ( knownNames.tqfindIndex( TQString( conn.receiver->name() ) ) == -1 &&
qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
continue;
- if ( formwindow->isMainContainer( (TQWidget*)(*it).receiver ) &&
- !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) )
+ if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) &&
+ !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) )
continue;
if ( conn.sender->inherits( "CustomWidget" ) ) {
@@ -2500,7 +2500,7 @@ void Resource::loadConnections( const TQDomElement &e )
conn.sender = 0;
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
- conn.sender = toplevel;
+ conn.sender = TQT_TQOBJECT(toplevel);
} else {
if ( name == "this" )
name = toplevel->name();
@@ -2520,7 +2520,7 @@ void Resource::loadConnections( const TQDomElement &e )
conn.receiver = 0;
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
- conn.receiver = toplevel;
+ conn.receiver = TQT_TQOBJECT(toplevel);
} else {
TQObjectList *l = toplevel->queryList( 0, name, FALSE );
if ( l ) {
@@ -2538,14 +2538,14 @@ void Resource::loadConnections( const TQDomElement &e )
n2 = n2.nextSibling().toElement();
}
if ( formwindow ) {
- if ( conn.sender == formwindow )
- conn.sender = formwindow->mainContainer();
- if ( conn.receiver == formwindow )
- conn.receiver = formwindow->mainContainer();
+ if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) )
+ conn.sender = TQT_TQOBJECT(formwindow->mainContainer());
+ if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) )
+ conn.receiver = TQT_TQOBJECT(formwindow->mainContainer());
}
if ( conn.sender && conn.receiver ) {
if ( lang == "C++" ) {
- MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
+ MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel),
conn.sender, conn.signal, conn.receiver, conn.slot );
}
}
@@ -2562,11 +2562,11 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) )
- MetaDataBase::addFunction( formwindow, slot.function, slot.specifier,
+ if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) )
+ MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier,
slot.access, "slot", slot.language, slot.returnType );
else
- MetaDataBase::changeFunctionAttributes( formwindow, slot.function, slot.function,
+ MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function,
slot.specifier, slot.access,
"slot", slot.language, slot.returnType );
}
@@ -2581,7 +2581,7 @@ void Resource::saveCustomWidgets( TQTextStream &ts, int indent )
TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- if ( usedCustomWidgets.findIndex( w->className ) == -1 )
+ if ( usedCustomWidgets.tqfindIndex( w->className ) == -1 )
continue;
ts << makeIndent( indent ) << "<customwidget>" << endl;
indent++;
@@ -2591,8 +2591,8 @@ void Resource::saveCustomWidgets( TQTextStream &ts, int indent )
<< "\">" << w->includeFile << "</header>" << endl;
ts << makeIndent( indent ) << "<sizehint>" << endl;
indent++;
- ts << makeIndent( indent ) << "<width>" << w->sizeHint.width() << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << w->sizeHint.height() << "</height>" << endl;
+ ts << makeIndent( indent ) << "<width>" << w->tqsizeHint.width() << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << w->tqsizeHint.height() << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</sizehint>" << endl;
ts << makeIndent( indent ) << "<container>" << (int)w->isContainer << "</container>" << endl;
@@ -2648,9 +2648,9 @@ void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r )
TQDomElement n3 = n2.firstChild().toElement();
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
- w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() );
+ w->tqsizeHint.setWidth( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "height" )
- w->sizeHint.setHeight( n3.firstChild().toText().data().toInt() );
+ w->tqsizeHint.setHeight( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
} else if ( n2.tagName() == "sizepolicy" ) {
@@ -2716,7 +2716,7 @@ void Resource::saveTabOrder( TQTextStream &ts, int indent )
indent++;
for ( TQWidget *w = l.first(); w; w = l.next() ) {
- if ( w->testWState( Qt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 )
+ if ( w->testWState( TQt::WState_ForceHide ) || knownNames.tqfindIndex( w->name() ) == -1 )
continue;
ts << makeIndent( indent ) << "<tabstop>" << w->name() << "</tabstop>" << endl;
}
@@ -2756,7 +2756,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) );
TQString cn;
if ( info.classNameChanged && !info.className.isEmpty() )
cn = info.className;
@@ -2771,9 +2771,9 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) );
if ( !langIface || formwindow->project()->isCpp() ) {
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) );
TQString extensionInclude;
bool needExtensionInclude = FALSE;
if ( langIface &&
@@ -2800,7 +2800,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</includes>" << endl;
}
- TQStringList forwards = MetaDataBase::forwards( formwindow );
+ TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) );
if ( !forwards.isEmpty() ) {
ts << makeIndent( indent ) << "<forwards>" << endl;
indent++;
@@ -2809,7 +2809,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</forwards>" << endl;
}
- TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formwindow );
+ TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) );
if ( !varLst.isEmpty() ) {
ts << makeIndent( indent ) << "<variables>" << endl;
indent++;
@@ -2825,7 +2825,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</variables>" << endl;
}
- TQStringList sigs = MetaDataBase::signalList( formwindow );
+ TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) );
if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << endl;
indent++;
@@ -2835,7 +2835,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</signals>" << endl;
}
- TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
@@ -2858,7 +2858,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</slots>" << endl;
}
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE );
if ( !functionList.isEmpty() ) {
ts << makeIndent( indent ) << "<functions>" << endl;
indent++;
@@ -2888,19 +2888,19 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "<pixmapinproject/>" << endl;
else
ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl;
- if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() )
+ if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() )
ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl;
if ( formwindow ) {
- ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing()
- << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl;
+ ts << makeIndent( indent ) << "<tqlayoutdefaults spacing=\"" << formwindow->tqlayoutDefaultSpacing()
+ << "\" margin=\"" << formwindow->tqlayoutDefaultMargin() << "\"/>" << endl;
if ( formwindow->hasLayoutFunctions() ) {
TQString s = "";
TQString m = "";
if ( !formwindow->spacingFunction().isEmpty() )
- s = TQString( " spacing=\"%1\"" ).arg( formwindow->spacingFunction() );
+ s = TQString( " spacing=\"%1\"" ).tqarg( formwindow->spacingFunction() );
if ( !formwindow->marginFunction().isEmpty() )
- m = TQString( " margin=\"%1\"" ).arg( formwindow->marginFunction() );
- ts << makeIndent( indent ) << "<layoutfunctions" << s << m << "/>" << endl;
+ m = TQString( " margin=\"%1\"" ).tqarg( formwindow->marginFunction() );
+ ts << makeIndent( indent ) << "<tqlayoutfunctions" << s << m << "/>" << endl;
}
}
}
@@ -2938,16 +2938,17 @@ TQColorGroup Resource::loadColorGroup( const TQDomElement &e )
void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent )
{
- if ( !a->children() )
+ TQObjectList clo = a->childrenListObject();
+ if ( clo.isEmpty() )
return;
- TQObjectListIt it( *a->children() );
+ TQObjectListIt it( clo );
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::qt_cast<TQAction*>(o) )
+ if ( !::tqqt_cast<TQAction*>(o) )
continue;
TQAction *ac = (TQAction*)o;
- bool isGroup = ::qt_cast<TQActionGroup*>(ac);
+ bool isGroup = ::tqqt_cast<TQActionGroup*>(ac);
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2976,7 +2977,7 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts
TQPtrListIterator<TQAction> it( actions );
while ( it.current() ) {
TQAction *a = it.current();
- bool isGroup = ::qt_cast<TQActionGroup*>(a);
+ bool isGroup = ::tqqt_cast<TQActionGroup*>(a);
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2999,12 +3000,12 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts
ts << makeIndent( indent ) << "</actions>" << endl;
}
-void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
+void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e )
{
TQDomElement n = e;
TQAction *a = 0;
if ( n.tagName() == "action" ) {
- a = new QDesignerAction( parent );
+ a = new TQDesignerAction( tqparent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
@@ -3021,10 +3022,10 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !::qt_cast<TQAction*>(parent) )
+ if ( !::tqqt_cast<TQAction*>(tqparent) )
formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new QDesignerActionGroup( parent );
+ a = new TQDesignerActionGroup( tqparent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
bool hasMenuText = FALSE;
@@ -3044,7 +3045,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !::qt_cast<TQAction*>(parent) )
+ if ( !::tqqt_cast<TQAction*>(tqparent) )
formwindow->actionList().append( a );
}
}
@@ -3054,9 +3055,9 @@ void Resource::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
- loadChildAction( formwindow, n );
+ loadChildAction( TQT_TQOBJECT(formwindow), n );
} else if ( n.tagName() == "actiongroup" ) {
- loadChildAction( formwindow, n );
+ loadChildAction( TQT_TQOBJECT(formwindow), n );
}
n = n.nextSibling().toElement();
}
@@ -3068,8 +3069,8 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
indent++;
TQPtrList<TQToolBar> tbList;
- for ( int i = 0; i <= (int)Qt::DockMinimized; ++i ) {
- tbList = mw->toolBars( (Qt::Dock)i );
+ for ( int i = 0; i <= (int)TQt::DockMinimized; ++i ) {
+ tbList = mw->toolBars( (TQt::Dock)i );
if ( tbList.isEmpty() )
continue;
for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) {
@@ -3077,23 +3078,23 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
continue;
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++;
- saveObjectProperties( tb, ts, indent );
- TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
+ saveObjectProperties( TQT_TQOBJECT(tb), ts, indent );
+ TQPtrList<TQAction> actionList = ( (TQDesignerToolBar*)tb )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( ::qt_cast<QSeparatorAction*>(a) ) {
+ if ( ::tqqt_cast<TQSeparatorAction*>(a) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
- if ( ::qt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) {
- TQWidget *w = ( (QDesignerAction*)a )->widget();
+ if ( ::tqqt_cast<TQDesignerAction*>(a) && !( (TQDesignerAction*)a )->supportsMenu() ) {
+ TQWidget *w = ( (TQDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( w ) << "\">" << endl;
+ << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl;
indent++;
- const char *className = WidgetFactory::classNameOf( w );
+ const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
if ( w->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
- if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), w ) )
- saveItems( w, ts, indent );
- saveObjectProperties( w, ts, indent );
+ if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) )
+ saveItems( TQT_TQOBJECT(w), ts, indent );
+ saveObjectProperties( TQT_TQOBJECT(w), ts, indent );
indent--;
ts << makeIndent( indent ) << "</widget>" << endl;
} else {
@@ -3116,8 +3117,8 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
- MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove
- saveObjectProperties( mb, ts, indent );
+ MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove
+ saveObjectProperties( TQT_TQOBJECT(mb), ts, indent );
for ( int i = 0; i < (int)mb->count(); ++i ) {
MenuBarEditorItem *m = mb->item( i );
@@ -3142,11 +3143,11 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStrea
{
for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) {
TQAction *a = i->action();
- if ( ::qt_cast<QSeparatorAction*>(a) )
+ if ( ::tqqt_cast<TQSeparatorAction*>(a) )
ts << makeIndent( indent ) << "<separator/>" << endl;
- else if ( ::qt_cast<QDesignerAction*>(a) )
+ else if ( ::tqqt_cast<TQDesignerAction*>(a) )
ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
- else if ( ::qt_cast<QDesignerActionGroup*>(a) )
+ else if ( ::tqqt_cast<TQDesignerActionGroup*>(a) )
ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl;
PopupMenuEditor *s = i->subMenu();
if ( s && s->count() ) {
@@ -3167,11 +3168,11 @@ void Resource::loadToolBars( const TQDomElement &e )
{
TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
- QDesignerToolBar *tb = 0;
+ TQDesignerToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
- Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
- tb = new QDesignerToolBar( mw, dock );
+ TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
+ tb = new TQDesignerToolBar( mw, dock );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
@@ -3181,17 +3182,17 @@ void Resource::loadToolBars( const TQDomElement &e )
tb->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- TQAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new TQSeparatorAction( 0 );
a->addTo( tb );
tb->addAction( a );
} else if ( n2.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( n2, tb );
- QDesignerAction *a = new QDesignerAction( w, tb );
+ TQDesignerAction *a = new TQDesignerAction( w, TQT_TQOBJECT(tb) );
a->addTo( tb );
tb->addAction( a );
tb->installEventFilters( w );
} else if ( n2.tagName() == "property" ) {
- setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
+ setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
}
@@ -3205,16 +3206,16 @@ void Resource::loadMenuBar( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer();
MenuBarEditor *mb = new MenuBarEditor( formwindow, mw );
- MetaDataBase::addEntry( mb );
+ MetaDataBase::addEntry( TQT_TQOBJECT(mb) );
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw );
loadPopupMenu( popup, n );
popup->setName( n.attribute( "name" ) );
mb->insertItem( n.attribute( "text" ), popup );
- MetaDataBase::addEntry( popup );
+ MetaDataBase::addEntry( TQT_TQOBJECT(popup) );
} else if ( n.tagName() == "property" ) {
- setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
+ setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "separator" ) {
mb->insertSeparator();
}
@@ -3224,7 +3225,7 @@ void Resource::loadMenuBar( const TQDomElement &e )
void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
{
- MetaDataBase::addEntry( p );
+ MetaDataBase::addEntry( TQT_TQOBJECT(p) );
TQDomElement n = e.firstChild().toElement();
TQAction *a = 0;
while ( !n.isNull() ) {
@@ -3234,7 +3235,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
p->insert( a );
}
if ( n.tagName() == "item" ) {
- PopupMenuEditorItem *i = p->at( p->find( a ) );
+ PopupMenuEditorItem *i = p->at( p->tqfind( a ) );
if ( i ) {
TQString name = n.attribute( "name" );
formwindow->unify( i, name, TRUE );
@@ -3243,7 +3244,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
loadPopupMenu( i->subMenu(), n );
}
} else if ( n.tagName() == "separator" ) {
- a = new QSeparatorAction( 0 );
+ a = new TQSeparatorAction( 0 );
p->insert( a );
}
n = n.nextSibling().toElement();
@@ -3265,7 +3266,7 @@ bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface
void Resource::loadExtraSource( FormFile *formfile, const TQString &currFileName,
LanguageInterface *langIface, bool hasFunctions )
{
- TQString lang = "Qt Script";
+ TQString lang = "TQt Script";
if ( MainWindow::self )
lang = MainWindow::self->currProject()->language();
LanguageInterface *iface = langIface;
@@ -3309,7 +3310,7 @@ void Resource::loadExtraSource( FormFile *formfile, const TQString &currFileName
(TQObject*)formfile,
(*fit).name,
(*fit).name,
- TQString::null );
+ TQString() );
} else {
TQString access = (*fit).access;
if ( access.isEmpty() )