Automated update from qt3

pull/1/head
Timothy Pearson 12 years ago
parent ae8aba1e0f
commit eb1d1e0dec

@ -384,7 +384,7 @@
* src/kernel/qapplication_x11.cpp * src/kernel/qapplication_x11.cpp
- (create_im, close_im): Add #ifndef QT_NO_IM_EXTENSIONS - (create_im, close_im): Add #ifndef QT_NO_IM_EXTENSIONS
- (create_xim, close_xim): Merge functions for QT_NO_IM_EXTENSIONS - (create_xim, close_xim): Merge functions for QT_NO_IM_EXTENSIONS
- (qt_init_internal, qt_cleanup): Merge code fragments for - (tqt_init_internal, tqt_cleanup): Merge code fragments for
QT_NO_IM_EXTENSIONS QT_NO_IM_EXTENSIONS
* plugins/src/inputmethods/inputmethods.pro * plugins/src/inputmethods/inputmethods.pro

@ -2116,7 +2116,7 @@ tqAddPostRoutine:
<a href="ntqcstring.html#qstrncmp">TQCString</a><li>qstrncpy: <a href="ntqcstring.html#qstrncmp">TQCString</a><li>qstrncpy:
<a href="ntqcstring.html#qstrncpy">TQCString</a><li>qstrnicmp: <a href="ntqcstring.html#qstrncpy">TQCString</a><li>qstrnicmp:
<a href="ntqcstring.html#qstrnicmp">TQCString</a><li>qtHandler: <a href="ntqcstring.html#qstrnicmp">TQCString</a><li>qtHandler:
<a href="ntqerrormessage.html#qtHandler">TQErrorMessage</a><li>qt_find_obj_child: <a href="ntqerrormessage.html#qtHandler">TQErrorMessage</a><li>tqt_find_obj_child:
<a href="ntqobject.html#qt_find_obj_child">TQObject</a><li>qualifiedNames: <a href="ntqobject.html#qt_find_obj_child">TQObject</a><li>qualifiedNames:
<a href="ntqdns.html#qualifiedNames">TQDns</a><li>quality: <a href="ntqdns.html#qualifiedNames">TQDns</a><li>quality:
<a href="qimageio.html#quality">TQImageIO</a><li>query: <a href="qimageio.html#quality">TQImageIO</a><li>query:

@ -111,7 +111,7 @@ body { background: #ffffff; color: black; }
</ul> </ul>
<h2>Related Functions</h2> <h2>Related Functions</h2>
<ul> <ul>
<li class=fn>void * <a href="#qt_find_obj_child"><b>qt_find_obj_child</b></a> ( TQObject&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;type, const&nbsp;char&nbsp;*&nbsp;name )</li> <li class=fn>void * <a href="#qt_find_obj_child"><b>tqt_find_obj_child</b></a> ( TQObject&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;type, const&nbsp;char&nbsp;*&nbsp;name )</li>
</ul> </ul>
<hr><a name="details"></a><h2>Detailed Description</h2> <hr><a name="details"></a><h2>Detailed Description</h2>
@ -932,13 +932,13 @@ for unnamed objects, you can call name( 0 ).
<p>Set this property's value with <a href="#setName">setName</a>() and get this property's value with <a href="#name">name</a>(). <p>Set this property's value with <a href="#setName">setName</a>() and get this property's value with <a href="#name">name</a>().
<hr><h2>Related Functions</h2> <hr><h2>Related Functions</h2>
<h3 class=fn>void * <a name="qt_find_obj_child"></a>qt_find_obj_child ( <a href="ntqobject.html">TQObject</a>&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;type, const&nbsp;char&nbsp;*&nbsp;name ) <h3 class=fn>void * <a name="qt_find_obj_child"></a>tqt_find_obj_child ( <a href="ntqobject.html">TQObject</a>&nbsp;*&nbsp;parent, const&nbsp;char&nbsp;*&nbsp;type, const&nbsp;char&nbsp;*&nbsp;name )
</h3> </h3>
<p> Returns a pointer to the object named <em>name</em> that inherits <em>type</em> and with a given <em>parent</em>. <p> Returns a pointer to the object named <em>name</em> that inherits <em>type</em> and with a given <em>parent</em>.
<p> Returns 0 if there is no such child. <p> Returns 0 if there is no such child.
<p> <pre> <p> <pre>
<a href="ntqlistbox.html">TQListBox</a> *c = (TQListBox *) <a href="#qt_find_obj_child">qt_find_obj_child</a>( myWidget, "TQListBox", <a href="ntqlistbox.html">TQListBox</a> *c = (TQListBox *) <a href="#qt_find_obj_child">tqt_find_obj_child</a>( myWidget, "TQListBox",
"my list box" ); "my list box" );
if ( c ) if ( c )
c-&gt;<a href="ntqlistbox.html#insertItem">insertItem</a>( "another string" ); c-&gt;<a href="ntqlistbox.html#insertItem">insertItem</a>( "another string" );

@ -364,11 +364,11 @@ private:
friend void qt_mac_update_os_settings(); friend void qt_mac_update_os_settings();
friend bool qt_set_socket_handler( int, int, TQObject *, bool); friend bool qt_set_socket_handler( int, int, TQObject *, bool);
friend void qt_mac_destroy_widget(TQWidget *); friend void qt_mac_destroy_widget(TQWidget *);
friend void qt_init(int *, char **, TQApplication::Type); friend void tqt_init(int *, char **, TQApplication::Type);
#endif #endif
#ifdef QT_THREAD_SUPPORT #ifdef QT_THREAD_SUPPORT
static TQMutex *qt_mutex; static TQMutex *tqt_mutex;
#endif // QT_THREAD_SUPPORT #endif // QT_THREAD_SUPPORT
int app_argc; int app_argc;
@ -443,7 +443,7 @@ private:
friend class TQEvent; friend class TQEvent;
friend class TQTranslator; friend class TQTranslator;
friend class TQEventLoop; friend class TQEventLoop;
friend Q_EXPORT void qt_ucm_initialize( TQApplication * ); friend Q_EXPORT void tqt_ucm_initialize( TQApplication * );
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* ); friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* );
#endif #endif

@ -114,9 +114,9 @@ public:
const TQVariant &amp;v8 = TQVariant() ); const TQVariant &amp;v8 = TQVariant() );
virtual TQMetaObject *metaObject() const; virtual TQMetaObject *metaObject() const;
virtual bool qt_invoke( int, TQUObject* ); virtual bool tqt_invoke( int, TQUObject* );
virtual bool qt_property( int, int, TQVariant* ); virtual bool tqt_property( int, int, TQVariant* );
virtual bool qt_emit( int, TQUObject* ) = 0; virtual bool tqt_emit( int, TQUObject* ) = 0;
virtual const char *className() const = 0; virtual const char *className() const = 0;
virtual TQObject *qObject() = 0; virtual TQObject *qObject() = 0;

@ -77,10 +77,10 @@ class TQAxObject : public TQObject, public TQAxBase
public: public:
TQMetaObject *metaObject() const; TQMetaObject *metaObject() const;
const char *className() const; const char *className() const;
void* qt_cast( const char* ); void* tqt_cast( const char* );
bool qt_invoke( int, TQUObject* ); bool tqt_invoke( int, TQUObject* );
bool qt_emit( int, TQUObject* ); bool tqt_emit( int, TQUObject* );
bool qt_property( int, int, TQVariant* ); bool tqt_property( int, int, TQVariant* );
TQObject* qObject() { return (TQObject*)this; } TQObject* qObject() { return (TQObject*)this; }
TQAxObject( TQObject *parent = 0, const char *name = 0 ); TQAxObject( TQObject *parent = 0, const char *name = 0 );

@ -74,10 +74,10 @@ class TQAxWidget : public TQWidget, public TQAxBase
public: public:
TQMetaObject *metaObject() const; TQMetaObject *metaObject() const;
const char *className() const; const char *className() const;
void* qt_cast( const char* ); void* tqt_cast( const char* );
bool qt_invoke( int, TQUObject* ); bool tqt_invoke( int, TQUObject* );
bool qt_emit( int, TQUObject* ); bool tqt_emit( int, TQUObject* );
bool qt_property( int, int, TQVariant* ); bool tqt_property( int, int, TQVariant* );
TQObject* qObject() { return (TQObject*)this; } TQObject* qObject() { return (TQObject*)this; }
TQAxWidget( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); TQAxWidget( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );

@ -280,7 +280,7 @@ public:
virtual TQString name()=0; virtual TQString name()=0;
}; };
void qt_init_fonts(); void tqt_init_fonts();
extern TQFontManager * qt_fontmanager; extern TQFontManager * qt_fontmanager;

@ -193,7 +193,7 @@ public:
const TQMetaData * const signal_data, int n_signals, const TQMetaData * const signal_data, int n_signals,
const TQMetaProperty *const prop_data, int n_props, const TQMetaProperty *const prop_data, int n_props,
const TQMetaEnum *const enum_data, int n_enums, const TQMetaEnum *const enum_data, int n_enums,
bool (*qt_static_property)(TQObject*, int, int, TQVariant*), bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo *const class_info, int n_info ); const TQClassInfo *const class_info, int n_info );
#endif #endif
@ -254,7 +254,7 @@ public:
const TQMetaData *const, int, const TQMetaData *const, int,
const TQMetaProperty *const prop_data, int n_props, const TQMetaProperty *const prop_data, int n_props,
const TQMetaEnum *const enum_data, int n_enums, const TQMetaEnum *const enum_data, int n_enums,
bool (*qt_static_property)(TQObject*, int, int, TQVariant*), bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo *const class_info, int n_info ); const TQClassInfo *const class_info, int n_info );
TQStrList enumeratorNames( bool super = FALSE ) const; TQStrList enumeratorNames( bool super = FALSE ) const;
int numEnumerators( bool super = FALSE ) const; int numEnumerators( bool super = FALSE ) const;
@ -281,7 +281,7 @@ private:
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
int propertyoffset; int propertyoffset;
public: public:
bool qt_static_property( TQObject* o, int id, int f, TQVariant* v); bool tqt_static_property( TQObject* o, int id, int f, TQVariant* v);
private: private:
friend class TQMetaProperty; friend class TQMetaProperty;
#endif #endif

@ -290,8 +290,8 @@ protected:
int, int, int, int, TQt::RasterOp, bool ); int, int, int, int, TQt::RasterOp, bool );
#endif #endif
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
friend void qt_init_internal( int *, char **, Display *, TQt::HANDLE, TQt::HANDLE ); friend void tqt_init_internal( int *, char **, Display *, TQt::HANDLE, TQt::HANDLE );
friend void qt_cleanup(); friend void tqt_cleanup();
#endif #endif
private: private:

@ -5259,7 +5259,7 @@
<keyword ref="ntqobject.html#tr">tr</keyword> <keyword ref="ntqobject.html#tr">tr</keyword>
<keyword ref="ntqobject.html#trUtf8">trUtf8</keyword> <keyword ref="ntqobject.html#trUtf8">trUtf8</keyword>
<keyword ref="ntqobject.html#~QObject">~QObject</keyword> <keyword ref="ntqobject.html#~QObject">~QObject</keyword>
<keyword ref="ntqobject.html#qt_find_obj_child">qt_find_obj_child</keyword> <keyword ref="ntqobject.html#qt_find_obj_child">tqt_find_obj_child</keyword>
<section ref="qobject-members.html" title="List of All Member Functions"/> <section ref="qobject-members.html" title="List of All Member Functions"/>
<section ref="qobject-h.html" title="Header File"/> <section ref="qobject-h.html" title="Header File"/>
</section> </section>

@ -959,14 +959,14 @@ See also className(), child(), and queryList().
.PP .PP
Set this property's value with setName() and get this property's value with name(). Set this property's value with setName() and get this property's value with name().
.SH RELATED FUNCTION DOCUMENTATION .SH RELATED FUNCTION DOCUMENTATION
.SH "void * qt_find_obj_child ( QObject * parent, const char * type, const char * name )" .SH "void * tqt_find_obj_child ( QObject * parent, const char * type, const char * name )"
Returns a pointer to the object named \fIname\fR that inherits \fItype\fR and with a given \fIparent\fR. Returns a pointer to the object named \fIname\fR that inherits \fItype\fR and with a given \fIparent\fR.
.PP .PP
Returns 0 if there is no such child. Returns 0 if there is no such child.
.PP .PP
.nf .nf
.br .br
QListBox *c = (QListBox *) qt_find_obj_child( myWidget, "QListBox", QListBox *c = (QListBox *) tqt_find_obj_child( myWidget, "QListBox",
.br .br
"my list box" ); "my list box" );
.br .br

@ -23,7 +23,7 @@ void MainForm::init()
void MainForm::optionsDlg() void MainForm::optionsDlg()
{ {
DialogForm *dlg = new DialogForm( this, "dialog", TRUE ); DialogForm *dlg = new DialogForm( this, "dialog", TRUE );
Extension *ext = (Extension*)dlg->extension()->qt_cast( "Extension" ); Extension *ext = (Extension*)dlg->extension()->tqt_cast( "Extension" );
if ( !ext ) if ( !ext )
return; return;
dlg->sessionsCheckBox->setChecked( sessions ); dlg->sessionsCheckBox->setChecked( sessions );

@ -1680,7 +1680,7 @@ void TQNPXtPrivate::unhook()
appContext = ownContext = 0; appContext = ownContext = 0;
} }
extern bool qt_try_modal( TQWidget *, XEvent * ); // defined in qapplication_x11.cpp extern bool tqt_try_modal( TQWidget *, XEvent * ); // defined in qapplication_x11.cpp
Boolean qnpxt_event_dispatcher( XEvent *event ) Boolean qnpxt_event_dispatcher( XEvent *event )
{ {
static bool grabbed = FALSE; static bool grabbed = FALSE;
@ -1786,7 +1786,7 @@ Boolean qnpxt_event_dispatcher( XEvent *event )
if ( TQApplication::activeModalWidget() ) { if ( TQApplication::activeModalWidget() ) {
if ( qnpxt ) { if ( qnpxt ) {
// send event through TQt modality handling... // send event through TQt modality handling...
if ( !qt_try_modal( qnpxt, event ) ) { if ( !tqt_try_modal( qnpxt, event ) ) {
// tqDebug( "TQt: active modal widget discarded event" ); // tqDebug( "TQt: active modal widget discarded event" );
return True; return True;
} }

@ -327,7 +327,7 @@ void TQWellArray::setSelected( int row, int col )
if ( row >= 0 ) if ( row >= 0 )
emit selected( row, col ); emit selected( row, col );
if ( isVisible() && ::qt_cast<TQPopupMenu*>(parentWidget()) ) if ( isVisible() && ::tqt_cast<TQPopupMenu*>(parentWidget()) )
parentWidget()->close(); parentWidget()->close();
} }

@ -744,7 +744,7 @@ void TQDialog::show()
TQWidget *first = fd->next(); // Get first main widget TQWidget *first = fd->next(); // Get first main widget
if ( d->mainDef && if ( d->mainDef &&
first != d->mainDef && first != d->mainDef &&
::qt_cast<TQPushButton*>(first) ) ::tqt_cast<TQPushButton*>(first) )
d->mainDef->setFocus(); d->mainDef->setFocus();
} }
@ -759,7 +759,7 @@ void TQDialog::show()
TQWidget *candidate = home; TQWidget *candidate = home;
Q_ASSERT( candidate == fw ); Q_ASSERT( candidate == fw );
do { do {
TQPushButton *pb = ::qt_cast<TQPushButton*>(candidate); TQPushButton *pb = ::tqt_cast<TQPushButton*>(candidate);
if ( pb && pb->autoDefault() ) { if ( pb && pb->autoDefault() ) {
pb->setDefault( TRUE ); pb->setDefault( TRUE );
break; break;

@ -446,7 +446,7 @@ void TQWizard::help()
return; return;
#if 0 #if 0
TQWizardPage *wpage = ::qt_cast<TQWizardPage*>(page); TQWizardPage *wpage = ::tqt_cast<TQWizardPage*>(page);
if ( wpage ) if ( wpage )
emit wpage->helpClicked(); emit wpage->helpClicked();
#endif #endif

@ -342,7 +342,7 @@ private:
friend void qt_mac_update_os_settings(); friend void qt_mac_update_os_settings();
friend bool qt_set_socket_handler( int, int, TQObject *, bool); friend bool qt_set_socket_handler( int, int, TQObject *, bool);
friend void qt_mac_destroy_widget(TQWidget *); friend void qt_mac_destroy_widget(TQWidget *);
friend void qt_init(int *, char **, TQApplication::Type); friend void tqt_init(int *, char **, TQApplication::Type);
#endif #endif
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
@ -352,7 +352,7 @@ private slots:
private: private:
#ifdef QT_THREAD_SUPPORT #ifdef QT_THREAD_SUPPORT
static TQMutex *qt_mutex; static TQMutex *tqt_mutex;
#endif // QT_THREAD_SUPPORT #endif // QT_THREAD_SUPPORT
int app_argc; int app_argc;
@ -431,7 +431,7 @@ private:
friend class TQEvent; friend class TQEvent;
friend class TQTranslator; friend class TQTranslator;
friend class TQEventLoop; friend class TQEventLoop;
friend Q_EXPORT void qt_ucm_initialize( TQApplication * ); friend Q_EXPORT void tqt_ucm_initialize( TQApplication * );
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* ); friend bool qt_sendSpontaneousEvent( TQObject*, TQEvent* );
#endif #endif

@ -157,7 +157,7 @@ public:
const TQMetaData * const signal_data, int n_signals, const TQMetaData * const signal_data, int n_signals,
const TQMetaProperty *const prop_data, int n_props, const TQMetaProperty *const prop_data, int n_props,
const TQMetaEnum *const enum_data, int n_enums, const TQMetaEnum *const enum_data, int n_enums,
bool (*qt_static_property)(TQObject*, int, int, TQVariant*), bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo *const class_info, int n_info ); const TQClassInfo *const class_info, int n_info );
#endif #endif
@ -218,7 +218,7 @@ public:
const TQMetaData *const, int, const TQMetaData *const, int,
const TQMetaProperty *const prop_data, int n_props, const TQMetaProperty *const prop_data, int n_props,
const TQMetaEnum *const enum_data, int n_enums, const TQMetaEnum *const enum_data, int n_enums,
bool (*qt_static_property)(TQObject*, int, int, TQVariant*), bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo *const class_info, int n_info ); const TQClassInfo *const class_info, int n_info );
TQStrList enumeratorNames( bool super = FALSE ) const; TQStrList enumeratorNames( bool super = FALSE ) const;
int numEnumerators( bool super = FALSE ) const; int numEnumerators( bool super = FALSE ) const;
@ -245,7 +245,7 @@ private:
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
int propertyoffset; int propertyoffset;
public: public:
bool qt_static_property( TQObject* o, int id, int f, TQVariant* v); bool tqt_static_property( TQObject* o, int id, int f, TQVariant* v);
private: private:
friend class TQMetaProperty; friend class TQMetaProperty;
#endif #endif

@ -64,8 +64,8 @@
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
# define QT_PROP_FUNCTIONS \ # define QT_PROP_FUNCTIONS \
virtual bool qt_property( int id, int f, TQVariant* v); \ virtual bool tqt_property( int id, int f, TQVariant* v); \
static bool qt_static_property( TQObject* , int, int, TQVariant* ); static bool tqt_static_property( TQObject* , int, int, TQVariant* );
#else #else
# define QT_PROP_FUNCTIONS # define QT_PROP_FUNCTIONS
#endif #endif
@ -106,9 +106,9 @@ public: \
return staticMetaObject(); \ return staticMetaObject(); \
} \ } \
virtual const char *className() const; \ virtual const char *className() const; \
virtual void* qt_cast( const char* ); \ virtual void* tqt_cast( const char* ); \
virtual bool qt_invoke( int, TQUObject* ); \ virtual bool tqt_invoke( int, TQUObject* ); \
virtual bool qt_emit( int, TQUObject* ); \ virtual bool tqt_emit( int, TQUObject* ); \
QT_PROP_FUNCTIONS \ QT_PROP_FUNCTIONS \
static TQMetaObject* staticMetaObject(); \ static TQMetaObject* staticMetaObject(); \
TQObject* qObject() { return (TQObject*)this; } \ TQObject* qObject() { return (TQObject*)this; } \
@ -165,13 +165,13 @@ class TQObjectList;
class TQObjectListIt; class TQObjectListIt;
class TQMemberDict; class TQMemberDict;
Q_EXPORT void *qt_find_obj_child( TQObject *, const char *, const char * ); Q_EXPORT void *tqt_find_obj_child( TQObject *, const char *, const char * );
#define Q_CHILD(parent,type,name) \ #define Q_CHILD(parent,type,name) \
((type*)qt_find_obj_child(parent,#type,name)) ((type*)tqt_find_obj_child(parent,#type,name))
Q_EXPORT void *qt_inheritedBy( TQMetaObject *super, const TQObject *cls ); Q_EXPORT void *tqt_inheritedBy( TQMetaObject *super, const TQObject *cls );
template <typename T> template <typename T>
Q_INLINE_TEMPLATES T qt_cast(const TQObject *object) Q_INLINE_TEMPLATES T tqt_cast(const TQObject *object)
{ return (T)qt_inheritedBy( ((T)0)->staticMetaObject(), object ); } { return (T)tqt_inheritedBy( ((T)0)->staticMetaObject(), object ); }
#endif // TQOBJECTDEFS_H #endif // TQOBJECTDEFS_H

@ -254,8 +254,8 @@ protected:
int, int, int, int, TQt::RasterOp, bool ); int, int, int, int, TQt::RasterOp, bool );
#endif #endif
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
friend void qt_init_internal( int *, char **, Display *, TQt::HANDLE, TQt::HANDLE ); friend void tqt_init_internal( int *, char **, Display *, TQt::HANDLE, TQt::HANDLE );
friend void qt_cleanup(); friend void tqt_cleanup();
#endif #endif
private: private:

@ -771,7 +771,7 @@ TQWidget *TQLayout::mainWidget()
{ {
if ( !topLevel ) { if ( !topLevel ) {
if ( parent() ) { if ( parent() ) {
TQLayout *parentLayout = ::qt_cast<TQLayout*>(parent()); TQLayout *parentLayout = ::tqt_cast<TQLayout*>(parent());
Q_ASSERT(parentLayout); Q_ASSERT(parentLayout);
return parentLayout->mainWidget(); return parentLayout->mainWidget();
} else { } else {
@ -891,7 +891,7 @@ bool TQLayout::eventFilter( TQObject *o, TQEvent *e )
TQWidget *w = (TQWidget *)c->child(); TQWidget *w = (TQWidget *)c->child();
if ( !w->isTopLevel() ) { if ( !w->isTopLevel() ) {
#if !defined(QT_NO_MENUBAR) && !defined(QT_NO_TOOLBAR) #if !defined(QT_NO_MENUBAR) && !defined(QT_NO_TOOLBAR)
if ( ::qt_cast<TQMenuBar*>(w) && !::qt_cast<TQToolBar*>(w->parentWidget()) ) if ( ::tqt_cast<TQMenuBar*>(w) && !::tqt_cast<TQToolBar*>(w->parentWidget()) )
menubar = (TQMenuBar *)w; menubar = (TQMenuBar *)w;
else else
#endif #endif

@ -193,15 +193,15 @@ private:
}; };
TQAccelManager* TQAccelManager::self_ptr = 0; TQAccelManager* TQAccelManager::self_ptr = 0;
bool Q_EXPORT qt_tryAccelEvent( TQWidget* w, TQKeyEvent* e){ bool Q_EXPORT tqt_tryAccelEvent( TQWidget* w, TQKeyEvent* e){
return TQAccelManager::self()->tryAccelEvent( w, e ); return TQAccelManager::self()->tryAccelEvent( w, e );
} }
bool Q_EXPORT qt_dispatchAccelEvent( TQWidget* w, TQKeyEvent* e){ bool Q_EXPORT tqt_dispatchAccelEvent( TQWidget* w, TQKeyEvent* e){
return TQAccelManager::self()->dispatchAccelEvent( w, e ); return TQAccelManager::self()->dispatchAccelEvent( w, e );
} }
bool Q_EXPORT qt_tryComposeUnicode( TQWidget* w, TQKeyEvent* e){ bool Q_EXPORT tqt_tryComposeUnicode( TQWidget* w, TQKeyEvent* e){
return TQAccelManager::self()->tryComposeUnicode( w, e ); return TQAccelManager::self()->tryComposeUnicode( w, e );
} }
@ -229,7 +229,7 @@ bool TQAccelManager::correctSubWindow( TQWidget* w, TQAccelPrivate* d ) {
/* if we live in a floating dock window, keep our parent's /* if we live in a floating dock window, keep our parent's
* accelerators working */ * accelerators working */
#ifndef QT_NO_MAINWINDOW #ifndef QT_NO_MAINWINDOW
if ( tlw->isDialog() && tlw->parentWidget() && ::qt_cast<TQDockWindow*>(tlw) ) if ( tlw->isDialog() && tlw->parentWidget() && ::tqt_cast<TQDockWindow*>(tlw) )
return tlw->parentWidget()->topLevelWidget() == wtlw; return tlw->parentWidget()->topLevelWidget() == wtlw;
if ( wtlw != tlw ) if ( wtlw != tlw )

@ -312,28 +312,28 @@
*/ */
/* /*
The qt_init() and qt_cleanup() functions are implemented in the The tqt_init() and tqt_cleanup() functions are implemented in the
qapplication_xyz.cpp file. qapplication_xyz.cpp file.
*/ */
void qt_init( int *, char **, TQApplication::Type ); void tqt_init( int *, char **, TQApplication::Type );
void qt_cleanup(); void tqt_cleanup();
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
void qt_init( Display* dpy, TQt::HANDLE, TQt::HANDLE ); void tqt_init( Display* dpy, TQt::HANDLE, TQt::HANDLE );
#endif #endif
Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ); Q_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop );
TQApplication *tqApp = 0; // global application object TQApplication *tqApp = 0; // global application object
TQStyle *TQApplication::app_style = 0; // default application style TQStyle *TQApplication::app_style = 0; // default application style
bool qt_explicit_app_style = FALSE; // style explicitly set by programmer bool tqt_explicit_app_style = FALSE; // style explicitly set by programmer
int TQApplication::app_cspec = TQApplication::NormalColor; int TQApplication::app_cspec = TQApplication::NormalColor;
#ifndef QT_NO_PALETTE #ifndef QT_NO_PALETTE
TQPalette *TQApplication::app_pal = 0; // default application palette TQPalette *TQApplication::app_pal = 0; // default application palette
#endif #endif
TQFont *TQApplication::app_font = 0; // default application font TQFont *TQApplication::app_font = 0; // default application font
bool qt_app_has_font = FALSE; bool tqt_app_has_font = FALSE;
#ifndef QT_NO_CURSOR #ifndef QT_NO_CURSOR
TQCursor *TQApplication::app_cursor = 0; // default application cursor TQCursor *TQApplication::app_cursor = 0; // default application cursor
#endif #endif
@ -350,10 +350,10 @@ int TQApplication::mouse_double_click_time = 400; // mouse dbl click limit
#ifndef QT_NO_WHEELEVENT #ifndef QT_NO_WHEELEVENT
int TQApplication::wheel_scroll_lines = 3; // number of lines to scroll int TQApplication::wheel_scroll_lines = 3; // number of lines to scroll
#endif #endif
bool qt_is_gui_used; bool tqt_is_gui_used;
bool Q_EXPORT tqt_resolve_symlinks = TRUE; bool Q_EXPORT tqt_resolve_symlinks = TRUE;
bool Q_EXPORT tqt_tab_all_widgets = TRUE; bool Q_EXPORT tqt_tab_all_widgets = TRUE;
TQRect qt_maxWindowRect; TQRect tqt_maxWindowRect;
static int drag_time = 500; static int drag_time = 500;
static int drag_distance = 4; static int drag_distance = 4;
static bool reverse_layout = FALSE; static bool reverse_layout = FALSE;
@ -366,7 +366,7 @@ bool TQApplication::animate_tooltip = FALSE;
bool TQApplication::fade_tooltip = FALSE; bool TQApplication::fade_tooltip = FALSE;
bool TQApplication::animate_toolbox = FALSE; bool TQApplication::animate_toolbox = FALSE;
bool TQApplication::widgetCount = FALSE; bool TQApplication::widgetCount = FALSE;
TQApplication::Type qt_appType=TQApplication::Tty; TQApplication::Type tqt_appType=TQApplication::Tty;
#ifndef QT_NO_COMPONENT #ifndef QT_NO_COMPONENT
TQStringList *TQApplication::app_libpaths = 0; TQStringList *TQApplication::app_libpaths = 0;
#endif #endif
@ -374,29 +374,29 @@ bool TQApplication::metaComposeUnicode = FALSE;
int TQApplication::composedUnicode = 0; int TQApplication::composedUnicode = 0;
#ifdef QT_THREAD_SUPPORT #ifdef QT_THREAD_SUPPORT
TQMutex *TQApplication::qt_mutex = 0; TQMutex *TQApplication::tqt_mutex = 0;
static TQMutex *postevent_mutex = 0; static TQMutex *postevent_mutex = 0;
static TQt::HANDLE qt_application_thread_id = 0; static TQt::HANDLE tqt_application_thread_id = 0;
Q_EXPORT TQt::HANDLE tqt_get_application_thread_id() Q_EXPORT TQt::HANDLE tqt_get_application_thread_id()
{ {
return qt_application_thread_id; return tqt_application_thread_id;
} }
#endif // QT_THREAD_SUPPORT #endif // QT_THREAD_SUPPORT
TQEventLoop *TQApplication::eventloop = 0; // application event loop TQEventLoop *TQApplication::eventloop = 0; // application event loop
#ifndef QT_NO_ACCEL #ifndef QT_NO_ACCEL
extern bool qt_dispatchAccelEvent( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp extern bool tqt_dispatchAccelEvent( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp
extern bool qt_tryComposeUnicode( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp extern bool tqt_tryComposeUnicode( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp
#endif #endif
#if defined(QT_TABLET_SUPPORT) #if defined(QT_TABLET_SUPPORT)
bool chokeMouse = FALSE; bool chokeMouse = FALSE;
#endif #endif
void qt_setMaxWindowRect(const TQRect& r) void tqt_setMaxWindowRect(const TQRect& r)
{ {
qt_maxWindowRect = r; tqt_maxWindowRect = r;
// Re-resize any maximized windows // Re-resize any maximized windows
TQWidgetList* l = TQApplication::topLevelWidgets(); TQWidgetList* l = TQApplication::topLevelWidgets();
if ( l ) { if ( l ) {
@ -510,11 +510,11 @@ TQString *TQApplication::session_key = 0; // ## session key. Should be a member
#endif #endif
TQWidgetList *TQApplication::popupWidgets = 0; // has keyboard input focus TQWidgetList *TQApplication::popupWidgets = 0; // has keyboard input focus
TQDesktopWidget *qt_desktopWidget = 0; // root window widgets TQDesktopWidget *tqt_desktopWidget = 0; // root window widgets
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
TQClipboard *qt_clipboard = 0; // global clipboard object TQClipboard *tqt_clipboard = 0; // global clipboard object
#endif #endif
TQWidgetList * qt_modal_stack=0; // stack of modal widgets TQWidgetList * tqt_modal_stack=0; // stack of modal widgets
// Definitions for posted events // Definitions for posted events
struct TQPostEvent { struct TQPostEvent {
@ -553,12 +553,12 @@ uint qGlobalPostedEventsCount()
static TQSingleCleanupHandler<TQPostEventList> qapp_cleanup_events; static TQSingleCleanupHandler<TQPostEventList> qapp_cleanup_events;
#ifndef QT_NO_PALETTE #ifndef QT_NO_PALETTE
TQPalette *qt_std_pal = 0; TQPalette *tqt_std_pal = 0;
void qt_create_std_palette() void tqt_create_std_palette()
{ {
if ( qt_std_pal ) if ( tqt_std_pal )
delete qt_std_pal; delete tqt_std_pal;
TQColor standardLightGray( 192, 192, 192 ); TQColor standardLightGray( 192, 192, 192 );
TQColor light( 255, 255, 255 ); TQColor light( 255, 255, 255 );
@ -572,10 +572,10 @@ void qt_create_std_palette()
TQColorGroup std_inact( TQt::black, standardLightGray, TQColorGroup std_inact( TQt::black, standardLightGray,
light, dark, TQt::gray, light, dark, TQt::gray,
TQt::black, TQt::white ); TQt::black, TQt::white );
qt_std_pal = new TQPalette( std_act, std_dis, std_inact ); tqt_std_pal = new TQPalette( std_act, std_dis, std_inact );
} }
static void qt_fix_tooltips() static void tqt_fix_tooltips()
{ {
// No resources for this yet (unlike on Windows). // No resources for this yet (unlike on Windows).
TQColorGroup cg( TQt::black, TQColor(255,255,220), TQColorGroup cg( TQt::black, TQColor(255,255,220),
@ -589,7 +589,7 @@ static void qt_fix_tooltips()
void TQApplication::process_cmdline( int* argcptr, char ** argv ) void TQApplication::process_cmdline( int* argcptr, char ** argv )
{ {
// process platform-indep command line // process platform-indep command line
if ( !qt_is_gui_used || !*argcptr) if ( !tqt_is_gui_used || !*argcptr)
return; return;
int argc = *argcptr; int argc = *argcptr;
@ -789,7 +789,7 @@ TQApplication::TQApplication( int &argc, char **argv, Type type )
construct( argc, argv, type ); construct( argc, argv, type );
} }
Q_EXPORT void qt_ucm_initialize( TQApplication *theApp ) Q_EXPORT void tqt_ucm_initialize( TQApplication *theApp )
{ {
if ( tqApp ) if ( tqApp )
return; return;
@ -802,8 +802,8 @@ Q_EXPORT void qt_ucm_initialize( TQApplication *theApp )
void TQApplication::construct( int &argc, char **argv, Type type ) void TQApplication::construct( int &argc, char **argv, Type type )
{ {
qt_appType = type; tqt_appType = type;
qt_is_gui_used = (type != Tty); tqt_is_gui_used = (type != Tty);
init_precmdline(); init_precmdline();
static const char *empty = ""; static const char *empty = "";
if ( argc == 0 || argv == 0 ) { if ( argc == 0 || argv == 0 ) {
@ -813,11 +813,11 @@ void TQApplication::construct( int &argc, char **argv, Type type )
app_argc = argc; app_argc = argc;
app_argv = argv; app_argv = argv;
qt_init( &argc, argv, type ); // Must be called before initialize() tqt_init( &argc, argv, type ); // Must be called before initialize()
process_cmdline( &argc, argv ); process_cmdline( &argc, argv );
initialize( argc, argv ); initialize( argc, argv );
if ( qt_is_gui_used ) if ( tqt_is_gui_used )
qt_maxWindowRect = desktop()->rect(); tqt_maxWindowRect = desktop()->rect();
if ( eventloop ) if ( eventloop )
eventloop->appStartingUp(); eventloop->appStartingUp();
} }
@ -828,7 +828,7 @@ void TQApplication::construct( int &argc, char **argv, Type type )
TQApplication::Type TQApplication::type() const TQApplication::Type TQApplication::type() const
{ {
return qt_appType; return tqt_appType;
} }
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
@ -854,9 +854,9 @@ TQApplication::TQApplication( Display* dpy, HANDLE visual, HANDLE colormap )
app_argc = aargc; app_argc = aargc;
app_argv = aargv; app_argv = aargv;
qt_appType = GuiClient; tqt_appType = GuiClient;
qt_is_gui_used = TRUE; tqt_is_gui_used = TRUE;
qt_appType = GuiClient; tqt_appType = GuiClient;
init_precmdline(); init_precmdline();
// ... no command line. // ... no command line.
@ -865,15 +865,15 @@ TQApplication::TQApplication( Display* dpy, HANDLE visual, HANDLE colormap )
tqWarning( "TQApplication: invalid Display* argument." ); tqWarning( "TQApplication: invalid Display* argument." );
#endif // QT_CHECK_STATE #endif // QT_CHECK_STATE
qt_init( &aargc, aargv, GuiClient ); tqt_init( &aargc, aargv, GuiClient );
} else { } else {
qt_init( dpy, visual, colormap ); tqt_init( dpy, visual, colormap );
} }
initialize( aargc, aargv ); initialize( aargc, aargv );
if ( qt_is_gui_used ) if ( tqt_is_gui_used )
qt_maxWindowRect = desktop()->rect(); tqt_maxWindowRect = desktop()->rect();
if ( eventloop ) if ( eventloop )
eventloop->appStartingUp(); eventloop->appStartingUp();
} }
@ -893,9 +893,9 @@ TQApplication::TQApplication( Display* dpy, HANDLE visual, HANDLE colormap )
TQApplication::TQApplication(Display *dpy, int argc, char **argv, TQApplication::TQApplication(Display *dpy, int argc, char **argv,
HANDLE visual, HANDLE colormap) HANDLE visual, HANDLE colormap)
{ {
qt_appType = GuiClient; tqt_appType = GuiClient;
qt_is_gui_used = TRUE; tqt_is_gui_used = TRUE;
qt_appType = GuiClient; tqt_appType = GuiClient;
init_precmdline(); init_precmdline();
app_argc = argc; app_argc = argc;
@ -906,16 +906,16 @@ TQApplication::TQApplication(Display *dpy, int argc, char **argv,
tqWarning( "TQApplication: invalid Display* argument." ); tqWarning( "TQApplication: invalid Display* argument." );
#endif // QT_CHECK_STATE #endif // QT_CHECK_STATE
qt_init( &argc, argv, GuiClient ); tqt_init( &argc, argv, GuiClient );
} else { } else {
qt_init(dpy, visual, colormap); tqt_init(dpy, visual, colormap);
} }
process_cmdline( &argc, argv ); process_cmdline( &argc, argv );
initialize(argc, argv); initialize(argc, argv);
if ( qt_is_gui_used ) if ( tqt_is_gui_used )
qt_maxWindowRect = desktop()->rect(); tqt_maxWindowRect = desktop()->rect();
if ( eventloop ) if ( eventloop )
eventloop->appStartingUp(); eventloop->appStartingUp();
} }
@ -945,9 +945,9 @@ void TQApplication::init_precmdline()
void TQApplication::initialize( int argc, char **argv ) void TQApplication::initialize( int argc, char **argv )
{ {
#ifdef QT_THREAD_SUPPORT #ifdef QT_THREAD_SUPPORT
qt_mutex = new TQMutex( TRUE ); tqt_mutex = new TQMutex( TRUE );
postevent_mutex = new TQMutex( TRUE ); postevent_mutex = new TQMutex( TRUE );
qt_application_thread_id = TQThread::currentThread(); tqt_application_thread_id = TQThread::currentThread();
#endif // QT_THREAD_SUPPORT #endif // QT_THREAD_SUPPORT
app_argc = argc; app_argc = argc;
@ -1012,7 +1012,7 @@ TQWidget *TQApplication::activePopupWidget()
TQWidget *TQApplication::activeModalWidget() TQWidget *TQApplication::activeModalWidget()
{ {
return qt_modal_stack ? qt_modal_stack->getFirst() : 0; return tqt_modal_stack ? tqt_modal_stack->getFirst() : 0;
} }
/*! /*!
@ -1024,9 +1024,9 @@ TQApplication::~TQApplication()
{ {
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
// flush clipboard contents // flush clipboard contents
if ( qt_clipboard ) { if ( tqt_clipboard ) {
TQCustomEvent event( TQEvent::Clipboard ); TQCustomEvent event( TQEvent::Clipboard );
TQApplication::sendEvent( qt_clipboard, &event ); TQApplication::sendEvent( tqt_clipboard, &event );
} }
#endif #endif
@ -1046,18 +1046,18 @@ TQApplication::~TQApplication()
TQObject *tipmanager = child( "toolTipManager", "TQTipManager", FALSE ); TQObject *tipmanager = child( "toolTipManager", "TQTipManager", FALSE );
delete tipmanager; delete tipmanager;
delete qt_desktopWidget; delete tqt_desktopWidget;
qt_desktopWidget = 0; tqt_desktopWidget = 0;
is_app_closing = TRUE; is_app_closing = TRUE;
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
delete qt_clipboard; delete tqt_clipboard;
qt_clipboard = 0; tqt_clipboard = 0;
#endif #endif
TQWidget::destroyMapper(); TQWidget::destroyMapper();
#ifndef QT_NO_PALETTE #ifndef QT_NO_PALETTE
delete qt_std_pal; delete tqt_std_pal;
qt_std_pal = 0; tqt_std_pal = 0;
delete app_pal; delete app_pal;
app_pal = 0; app_pal = 0;
delete app_palettes; delete app_palettes;
@ -1084,7 +1084,7 @@ TQApplication::~TQApplication()
delete qt_dnd_manager; delete qt_dnd_manager;
#endif #endif
qt_cleanup(); tqt_cleanup();
#ifndef QT_NO_COMPONENT #ifndef QT_NO_COMPONENT
delete app_libpaths; delete app_libpaths;
@ -1092,8 +1092,8 @@ TQApplication::~TQApplication()
#endif #endif
#ifdef QT_THREAD_SUPPORT #ifdef QT_THREAD_SUPPORT
delete qt_mutex; delete tqt_mutex;
qt_mutex = 0; tqt_mutex = 0;
delete postevent_mutex; delete postevent_mutex;
postevent_mutex = 0; postevent_mutex = 0;
#endif // QT_THREAD_SUPPORT #endif // QT_THREAD_SUPPORT
@ -1115,8 +1115,8 @@ TQApplication::~TQApplication()
session_key = 0; session_key = 0;
#endif //QT_NO_SESSIONMANAGER #endif //QT_NO_SESSIONMANAGER
qt_explicit_app_style = FALSE; tqt_explicit_app_style = FALSE;
qt_app_has_font = FALSE; tqt_app_has_font = FALSE;
app_tracking = 0; app_tracking = 0;
obey_desktop_settings = TRUE; obey_desktop_settings = TRUE;
cursor_flash_time = 1000; cursor_flash_time = 1000;
@ -1213,7 +1213,7 @@ TQStyle& TQApplication::style()
#ifndef QT_NO_STYLE #ifndef QT_NO_STYLE
if ( app_style ) if ( app_style )
return *app_style; return *app_style;
if ( !qt_is_gui_used ) if ( !tqt_is_gui_used )
tqFatal( "No style available in non-gui applications!" ); tqFatal( "No style available in non-gui applications!" );
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
@ -1305,7 +1305,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* old = app_style; TQStyle* old = app_style;
app_style = style; app_style = style;
#ifdef Q_WS_X11 #ifdef Q_WS_X11
qt_explicit_app_style = TRUE; tqt_explicit_app_style = TRUE;
#endif // Q_WS_X11 #endif // Q_WS_X11
if ( startingUp() ) { if ( startingUp() ) {
@ -1332,9 +1332,9 @@ void TQApplication::setStyle( TQStyle *style )
// take care of possible palette requirements of certain gui // take care of possible palette requirements of certain gui
// styles. Do it before polishing the application since the style // styles. Do it before polishing the application since the style
// might call TQApplication::setStyle() itself // might call TQApplication::setStyle() itself
if ( !qt_std_pal ) if ( !tqt_std_pal )
qt_create_std_palette(); tqt_create_std_palette();
TQPalette tmpPal = *qt_std_pal; TQPalette tmpPal = *tqt_std_pal;
setPalette( tmpPal, TRUE ); setPalette( tmpPal, TRUE );
// initialize the application with the new style // initialize the application with the new style
@ -1381,7 +1381,7 @@ void TQApplication::setStyle( TQStyle *style )
TQStyle* TQApplication::setStyle( const TQString& style ) TQStyle* TQApplication::setStyle( const TQString& style )
{ {
#ifdef Q_WS_X11 #ifdef Q_WS_X11
qt_explicit_app_style = TRUE; tqt_explicit_app_style = TRUE;
#endif // Q_WS_X11 #endif // Q_WS_X11
if ( startingUp() ) { if ( startingUp() ) {
@ -1826,10 +1826,10 @@ TQPalette TQApplication::palette(const TQWidget* w)
"called after the TQApplication object has been created" ); "called after the TQApplication object has been created" );
#endif #endif
if ( !app_pal ) { if ( !app_pal ) {
if ( !qt_std_pal ) if ( !tqt_std_pal )
qt_create_std_palette(); tqt_create_std_palette();
app_pal = new TQPalette( *qt_std_pal ); app_pal = new TQPalette( *tqt_std_pal );
qt_fix_tooltips(); tqt_fix_tooltips();
} }
if ( w && app_palettes ) { if ( w && app_palettes ) {
@ -1885,7 +1885,7 @@ void TQApplication::setPalette( const TQPalette &palette, bool informWidgets,
all = app_palettes != 0; all = app_palettes != 0;
delete app_palettes; delete app_palettes;
app_palettes = 0; app_palettes = 0;
qt_fix_tooltips(); tqt_fix_tooltips();
} else { } else {
if ( !app_palettes ) { if ( !app_palettes ) {
app_palettes = new TQAsciiDict<TQPalette>; app_palettes = new TQAsciiDict<TQPalette>;
@ -1961,7 +1961,7 @@ void TQApplication::setFont( const TQFont &font, bool informWidgets,
{ {
bool all = FALSE; bool all = FALSE;
if ( !className ) { if ( !className ) {
qt_app_has_font = TRUE; tqt_app_has_font = TRUE;
if ( !app_font ) { if ( !app_font ) {
app_font = new TQFont( font ); app_font = new TQFont( font );
TQ_CHECK_PTR( app_font ); TQ_CHECK_PTR( app_font );
@ -2367,7 +2367,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
res = internalNotify( receiver, e ); res = internalNotify( receiver, e );
if ( !res && !key->isAccepted() ) if ( !res && !key->isAccepted() )
res = qt_dispatchAccelEvent( (TQWidget*)receiver, key ); res = tqt_dispatchAccelEvent( (TQWidget*)receiver, key );
// next lines are for compatibility with TQt <= 3.0.x: old // next lines are for compatibility with TQt <= 3.0.x: old
// TQAccel was listening on toplevel widgets // TQAccel was listening on toplevel widgets
@ -2383,7 +2383,7 @@ bool TQApplication::notify( TQObject *receiver, TQEvent *e )
TQWidget* w = (TQWidget*)receiver; TQWidget* w = (TQWidget*)receiver;
TQKeyEvent* key = (TQKeyEvent*) e; TQKeyEvent* key = (TQKeyEvent*) e;
#ifndef QT_NO_ACCEL #ifndef QT_NO_ACCEL
if ( qt_tryComposeUnicode( w, key ) ) if ( tqt_tryComposeUnicode( w, key ) )
break; break;
#endif #endif
bool def = key->isAccepted(); bool def = key->isAccepted();
@ -3596,7 +3596,7 @@ void TQApplication::setActiveWindow( TQWidget* act )
Creates the proper Enter/Leave event when widget \a enter is entered Creates the proper Enter/Leave event when widget \a enter is entered
and widget \a leave is left. and widget \a leave is left.
*/ */
Q_EXPORT void qt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) { Q_EXPORT void tqt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) {
#if 0 #if 0
if ( leave ) { if ( leave ) {
TQEvent e( TQEvent::Leave ); TQEvent e( TQEvent::Leave );
@ -3666,19 +3666,19 @@ Q_EXPORT void qt_dispatchEnterLeave( TQWidget* enter, TQWidget* leave ) {
TQEvent leaveEvent( TQEvent::Leave ); TQEvent leaveEvent( TQEvent::Leave );
for ( w = leaveList.first(); w; w = leaveList.next() ) { for ( w = leaveList.first(); w; w = leaveList.next() ) {
if ( !tqApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) if ( !tqApp->activeModalWidget() || tqt_tryModalHelper( w, 0 ))
TQApplication::sendEvent( w, &leaveEvent ); TQApplication::sendEvent( w, &leaveEvent );
} }
TQEvent enterEvent( TQEvent::Enter ); TQEvent enterEvent( TQEvent::Enter );
for ( w = enterList.first(); w; w = enterList.next() ) { for ( w = enterList.first(); w; w = enterList.next() ) {
if ( !tqApp->activeModalWidget() || qt_tryModalHelper( w, 0 )) if ( !tqApp->activeModalWidget() || tqt_tryModalHelper( w, 0 ))
TQApplication::sendEvent( w, &enterEvent ); TQApplication::sendEvent( w, &enterEvent );
} }
} }
#ifdef Q_WS_MACX #ifdef Q_WS_MACX
extern TQWidget *qt_tryModalHelperMac( TQWidget * top ); //qapplication_mac.cpp extern TQWidget *tqt_tryModalHelperMac( TQWidget * top ); //qapplication_mac.cpp
#endif #endif
@ -3687,7 +3687,7 @@ extern TQWidget *qt_tryModalHelperMac( TQWidget * top ); //qapplication_mac.cpp
Called from qapplication_<platform>.cpp, returns TRUE Called from qapplication_<platform>.cpp, returns TRUE
if the widget should accept the event. if the widget should accept the event.
*/ */
Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) { Q_EXPORT bool tqt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
TQWidget *modal=0, *top=TQApplication::activeModalWidget(); TQWidget *modal=0, *top=TQApplication::activeModalWidget();
if ( rettop ) *rettop = top; if ( rettop ) *rettop = top;
@ -3695,7 +3695,7 @@ Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
return TRUE; return TRUE;
#ifdef Q_WS_MACX #ifdef Q_WS_MACX
top = qt_tryModalHelperMac( top ); top = tqt_tryModalHelperMac( top );
if ( rettop ) *rettop = top; if ( rettop ) *rettop = top;
#endif #endif
@ -3718,15 +3718,15 @@ Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
groupLeader = groupLeader->parentWidget(); groupLeader = groupLeader->parentWidget();
if ( groupLeader ) { if ( groupLeader ) {
// Does groupLeader have a child in qt_modal_stack? // Does groupLeader have a child in tqt_modal_stack?
bool unrelated = TRUE; bool unrelated = TRUE;
modal = qt_modal_stack->first(); modal = tqt_modal_stack->first();
while (modal && unrelated) { while (modal && unrelated) {
TQWidget* p = modal->parentWidget(); TQWidget* p = modal->parentWidget();
while ( p && p != groupLeader && !p->testWFlags( TQt::WGroupLeader) ) { while ( p && p != groupLeader && !p->testWFlags( TQt::WGroupLeader) ) {
p = p->parentWidget(); p = p->parentWidget();
} }
modal = qt_modal_stack->next(); modal = tqt_modal_stack->next();
if ( p == groupLeader ) unrelated = FALSE; if ( p == groupLeader ) unrelated = FALSE;
} }
@ -3754,12 +3754,12 @@ Q_EXPORT bool qt_tryModalHelper( TQWidget *widget, TQWidget **rettop ) {
TQDesktopWidget *TQApplication::desktop() TQDesktopWidget *TQApplication::desktop()
{ {
if ( !qt_desktopWidget || // not created yet if ( !tqt_desktopWidget || // not created yet
!qt_desktopWidget->isDesktop() ) { // reparented away !tqt_desktopWidget->isDesktop() ) { // reparented away
qt_desktopWidget = new TQDesktopWidget(); tqt_desktopWidget = new TQDesktopWidget();
TQ_CHECK_PTR( qt_desktopWidget ); TQ_CHECK_PTR( tqt_desktopWidget );
} }
return qt_desktopWidget; return tqt_desktopWidget;
} }
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
@ -3768,11 +3768,11 @@ TQDesktopWidget *TQApplication::desktop()
*/ */
TQClipboard *TQApplication::clipboard() TQClipboard *TQApplication::clipboard()
{ {
if ( qt_clipboard == 0 ) { if ( tqt_clipboard == 0 ) {
qt_clipboard = new TQClipboard; tqt_clipboard = new TQClipboard;
TQ_CHECK_PTR( qt_clipboard ); TQ_CHECK_PTR( tqt_clipboard );
} }
return qt_clipboard; return tqt_clipboard;
} }
#endif // QT_NO_CLIPBOARD #endif // QT_NO_CLIPBOARD
@ -3859,12 +3859,12 @@ bool TQApplication::desktopSettingsAware()
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
void TQApplication::lock() void TQApplication::lock()
{ {
qt_mutex->lock(); tqt_mutex->lock();
} }
void TQApplication::unlock(bool wakeUpGui) void TQApplication::unlock(bool wakeUpGui)
{ {
qt_mutex->unlock(); tqt_mutex->unlock();
if (wakeUpGui) if (wakeUpGui)
wakeUpGuiThread(); wakeUpGuiThread();
@ -3872,12 +3872,12 @@ void TQApplication::unlock(bool wakeUpGui)
bool TQApplication::locked() bool TQApplication::locked()
{ {
return qt_mutex->locked(); return tqt_mutex->locked();
} }
bool TQApplication::tryLock() bool TQApplication::tryLock()
{ {
return qt_mutex->tryLock(); return tqt_mutex->tryLock();
} }
#endif #endif

@ -66,12 +66,12 @@ class TQMouseEvent;
class TQWheelEvent; class TQWheelEvent;
extern Q_EXPORT bool tqt_modal_state(); extern Q_EXPORT bool tqt_modal_state();
extern Q_EXPORT void qt_enter_modal( TQWidget* ); extern Q_EXPORT void tqt_enter_modal( TQWidget* );
extern Q_EXPORT void qt_leave_modal( TQWidget* ); extern Q_EXPORT void tqt_leave_modal( TQWidget* );
extern bool qt_is_gui_used; extern bool tqt_is_gui_used;
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
extern TQClipboard *qt_clipboard; extern TQClipboard *tqt_clipboard;
#endif #endif
#if defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN) #if defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN)
@ -89,7 +89,7 @@ extern int qt_ncols_option;
#endif #endif
extern void qt_dispatchEnterLeave( TQWidget*, TQWidget* ); extern void tqt_dispatchEnterLeave( TQWidget*, TQWidget* );
extern bool qt_tryModalHelper( TQWidget *, TQWidget ** = 0 ); extern bool tqt_tryModalHelper( TQWidget *, TQWidget ** = 0 );
#endif #endif

@ -228,7 +228,7 @@ Atom qt_net_wm_ping = 0; // _NET_WM_PING protocol
static Atom qt_xsetroot_id = 0; static Atom qt_xsetroot_id = 0;
Atom qt_xa_clipboard = 0; Atom qt_xa_clipboard = 0;
Atom qt_selection_property = 0; Atom qt_selection_property = 0;
Atom qt_clipboard_sentinel = 0; Atom tqt_clipboard_sentinel = 0;
Atom qt_selection_sentinel = 0; Atom qt_selection_sentinel = 0;
Q_EXPORT Atom tqt_wm_state = 0; Q_EXPORT Atom tqt_wm_state = 0;
Atom qt_wm_change_state = 0; Atom qt_wm_change_state = 0;
@ -359,7 +359,7 @@ static Time mouseButtonPressTime = 0; // when was a button pressed
static short mouseXPos, mouseYPos; // mouse pres position in act window static short mouseXPos, mouseYPos; // mouse pres position in act window
static short mouseGlobalXPos, mouseGlobalYPos; // global mouse press position static short mouseGlobalXPos, mouseGlobalYPos; // global mouse press position
extern TQWidgetList *qt_modal_stack; // stack of modal widgets extern TQWidgetList *tqt_modal_stack; // stack of modal widgets
static bool ignoreNextMouseReleaseEvent = FALSE; // ignore the next mouse release static bool ignoreNextMouseReleaseEvent = FALSE; // ignore the next mouse release
// event if return from a modal // event if return from a modal
// widget // widget
@ -442,14 +442,14 @@ extern bool qt_check_clipboard_sentinel(); //def in qclipboard_x11.cpp
extern bool qt_check_selection_sentinel(); //def in qclipboard_x11.cpp extern bool qt_check_selection_sentinel(); //def in qclipboard_x11.cpp
static void qt_save_rootinfo(); static void qt_save_rootinfo();
bool qt_try_modal( TQWidget *, XEvent * ); bool tqt_try_modal( TQWidget *, XEvent * );
int qt_ncols_option = 216; // used in qcolor_x11.cpp int qt_ncols_option = 216; // used in qcolor_x11.cpp
int qt_visual_option = -1; int qt_visual_option = -1;
bool qt_cmap_option = FALSE; bool qt_cmap_option = FALSE;
TQWidget *qt_button_down = 0; // widget got last button-down TQWidget *qt_button_down = 0; // widget got last button-down
extern bool qt_tryAccelEvent( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp extern bool tqt_tryAccelEvent( TQWidget*, TQKeyEvent* ); // def in qaccel.cpp
struct TQScrollInProgress { struct TQScrollInProgress {
static long serial; static long serial;
@ -491,8 +491,8 @@ extern Atom qt_xdnd_selection;
extern bool qt_xdnd_dragging; extern bool qt_xdnd_dragging;
// gui or non-gui from qapplication.cpp // gui or non-gui from qapplication.cpp
extern bool qt_is_gui_used; extern bool tqt_is_gui_used;
extern bool qt_app_has_font; extern bool tqt_app_has_font;
static bool qt_x11_cmdline_font = false; static bool qt_x11_cmdline_font = false;
@ -505,8 +505,8 @@ extern void qt_clear_paintevent_clipping();
// Palette handling // Palette handling
extern TQPalette *qt_std_pal; extern TQPalette *tqt_std_pal;
extern void qt_create_std_palette(); extern void tqt_create_std_palette();
void qt_x11_intern_atom( const char *, Atom * ); void qt_x11_intern_atom( const char *, Atom * );
@ -819,7 +819,7 @@ static int qt_xio_errhandler( Display * )
#endif #endif
// Memory leak: if the app exits before qt_init_internal(), this dict // Memory leak: if the app exits before tqt_init_internal(), this dict
// isn't released correctly. // isn't released correctly.
static TQAsciiDict<Atom> *atoms_to_be_created = 0; static TQAsciiDict<Atom> *atoms_to_be_created = 0;
static bool create_atoms_now = 0; static bool create_atoms_now = 0;
@ -828,7 +828,7 @@ static bool create_atoms_now = 0;
qt_x11_intern_atom() - efficiently interns an atom, now or later. qt_x11_intern_atom() - efficiently interns an atom, now or later.
If the application is being initialized, this function stores the If the application is being initialized, this function stores the
adddress of the atom and qt_init_internal will do the actual work adddress of the atom and tqt_init_internal will do the actual work
tquickly. If the application is running, the atom is created here. tquickly. If the application is running, the atom is created here.
Neither argument may point to temporary variables. Neither argument may point to temporary variables.
@ -902,8 +902,8 @@ static void qt_x11_process_intern_atoms()
*/ */
bool TQApplication::x11_apply_settings() bool TQApplication::x11_apply_settings()
{ {
if (! qt_std_pal) if (! tqt_std_pal)
qt_create_std_palette(); tqt_create_std_palette();
Atom type; Atom type;
int format; int format;
@ -1000,13 +1000,13 @@ bool TQApplication::x11_apply_settings()
pal.disabled().foreground() ); pal.disabled().foreground() );
} }
if (pal != *qt_std_pal && pal != TQApplication::palette()) { if (pal != *tqt_std_pal && pal != TQApplication::palette()) {
TQApplication::setPalette(pal, TRUE); TQApplication::setPalette(pal, TRUE);
*qt_std_pal = pal; *tqt_std_pal = pal;
} }
TQFont font(TQApplication::font()); TQFont font(TQApplication::font());
if ( !qt_app_has_font && !qt_x11_cmdline_font ) { if ( !tqt_app_has_font && !qt_x11_cmdline_font ) {
// read new font // read new font
str = settings.readEntry("/qt/font"); str = settings.readEntry("/qt/font");
if (! str.isNull() && ! str.isEmpty()) { if (! str.isNull() && ! str.isEmpty()) {
@ -1028,12 +1028,12 @@ bool TQApplication::x11_apply_settings()
} }
// read new TQStyle // read new TQStyle
extern bool qt_explicit_app_style; // defined in qapplication.cpp extern bool tqt_explicit_app_style; // defined in qapplication.cpp
TQString stylename = settings.readEntry( "/qt/style" ); TQString stylename = settings.readEntry( "/qt/style" );
if ( !stylename.isEmpty() && !qt_explicit_app_style ) { if ( !stylename.isEmpty() && !tqt_explicit_app_style ) {
TQApplication::setStyle( stylename ); TQApplication::setStyle( stylename );
// took the style from the user settings, so mark the explicit flag FALSE // took the style from the user settings, so mark the explicit flag FALSE
qt_explicit_app_style = FALSE; tqt_explicit_app_style = FALSE;
} }
num = num =
@ -1203,8 +1203,8 @@ static void qt_set_input_encoding()
static void qt_set_x11_resources( const char* font = 0, const char* fg = 0, static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
const char* bg = 0, const char* button = 0 ) const char* bg = 0, const char* button = 0 )
{ {
if ( !qt_std_pal ) if ( !tqt_std_pal )
qt_create_std_palette(); tqt_create_std_palette();
TQCString resFont, resFG, resBG, resEF, sysFont; TQCString resFont, resFG, resBG, resEF, sysFont;
@ -1303,7 +1303,7 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
resFG = fg; resFG = fg;
if ( resBG.isEmpty() ) if ( resBG.isEmpty() )
resBG = bg; resBG = bg;
if ( (!qt_app_has_font || qt_x11_cmdline_font) && !resFont.isEmpty() ) { // set application font if ( (!tqt_app_has_font || qt_x11_cmdline_font) && !resFont.isEmpty() ) { // set application font
TQFont fnt; TQFont fnt;
fnt.setRawName( resFont ); fnt.setRawName( resFont );
@ -1341,17 +1341,17 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
if ( !resBG.isEmpty() ) if ( !resBG.isEmpty() )
bg = TQColor(TQString(resBG)); bg = TQColor(TQString(resBG));
else else
bg = qt_std_pal->active().background(); bg = tqt_std_pal->active().background();
if ( !resFG.isEmpty() ) if ( !resFG.isEmpty() )
fg = TQColor(TQString(resFG)); fg = TQColor(TQString(resFG));
else else
fg = qt_std_pal->active().foreground(); fg = tqt_std_pal->active().foreground();
if ( button ) if ( button )
btn = TQColor( button ); btn = TQColor( button );
else if ( !resBG.isEmpty() ) else if ( !resBG.isEmpty() )
btn = bg; btn = bg;
else else
btn = qt_std_pal->active().button(); btn = tqt_std_pal->active().button();
int h,s,v; int h,s,v;
fg.hsv(&h,&s,&v); fg.hsv(&h,&s,&v);
@ -1384,9 +1384,9 @@ static void qt_set_x11_resources( const char* font = 0, const char* fg = 0,
dcg.setColor( TQColorGroup::Highlight, TQt::darkBlue ); dcg.setColor( TQColorGroup::Highlight, TQt::darkBlue );
} }
TQPalette pal( cg, dcg, cg ); TQPalette pal( cg, dcg, cg );
if ( pal != *qt_std_pal && pal != TQApplication::palette() ) if ( pal != *tqt_std_pal && pal != TQApplication::palette() )
TQApplication::setPalette( pal, TRUE ); TQApplication::setPalette( pal, TRUE );
*qt_std_pal = pal; *tqt_std_pal = pal;
} }
if ( !resEF.isEmpty() ) { if ( !resEF.isEmpty() ) {
@ -1626,7 +1626,7 @@ static Visual *find_truecolor_visual( Display *dpy, int scr, int *depth, int *nc
/***************************************************************************** /*****************************************************************************
qt_init() - initializes TQt for X11 tqt_init() - initializes TQt for X11
*****************************************************************************/ *****************************************************************************/
#define XK_MISCELLANY #define XK_MISCELLANY
@ -1639,14 +1639,14 @@ static Visual *find_truecolor_visual( Display *dpy, int scr, int *depth, int *nc
// ### in ntqpaintdevice.h which then should have a static too but can't have // ### in ntqpaintdevice.h which then should have a static too but can't have
// ### it because "storage class specifiers invalid in friend function // ### it because "storage class specifiers invalid in friend function
// ### declarations" :-) Ideas anyone? // ### declarations" :-) Ideas anyone?
void qt_init_internal( int *argcptr, char **argv, void tqt_init_internal( int *argcptr, char **argv,
Display *display, TQt::HANDLE visual, TQt::HANDLE colormap ) Display *display, TQt::HANDLE visual, TQt::HANDLE colormap )
{ {
setlocale( LC_ALL, "" ); // use correct char set mapping setlocale( LC_ALL, "" ); // use correct char set mapping
setlocale( LC_NUMERIC, "C" ); // make sprintf()/scanf() work setlocale( LC_NUMERIC, "C" ); // make sprintf()/scanf() work
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
if ( qt_is_gui_used ) { if ( tqt_is_gui_used ) {
XInitThreads(); XInitThreads();
} }
#endif #endif
@ -1804,7 +1804,7 @@ void qt_init_internal( int *argcptr, char **argv,
#endif #endif
// Connect to X server // Connect to X server
if( qt_is_gui_used ) { if( tqt_is_gui_used ) {
if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) { if ( ( appDpy = XOpenDisplay(appDpyName) ) == 0 ) {
tqWarning( "%s: cannot connect to X server %s", appName, tqWarning( "%s: cannot connect to X server %s", appName,
XDisplayName(appDpyName) ); XDisplayName(appDpyName) );
@ -1820,7 +1820,7 @@ void qt_init_internal( int *argcptr, char **argv,
// Get X parameters // Get X parameters
if( qt_is_gui_used ) { if( tqt_is_gui_used ) {
appScreen = DefaultScreen(appDpy); appScreen = DefaultScreen(appDpy);
appScreenCount = ScreenCount(appDpy); appScreenCount = ScreenCount(appDpy);
@ -1990,7 +1990,7 @@ void qt_init_internal( int *argcptr, char **argv,
qt_x11_intern_atom( "INCR", &qt_x_incr ); qt_x11_intern_atom( "INCR", &qt_x_incr );
qt_x11_intern_atom( "_XSETROOT_ID", &qt_xsetroot_id ); qt_x11_intern_atom( "_XSETROOT_ID", &qt_xsetroot_id );
qt_x11_intern_atom( "_QT_SELECTION", &qt_selection_property ); qt_x11_intern_atom( "_QT_SELECTION", &qt_selection_property );
qt_x11_intern_atom( "_QT_CLIPBOARD_SENTINEL", &qt_clipboard_sentinel ); qt_x11_intern_atom( "_QT_CLIPBOARD_SENTINEL", &tqt_clipboard_sentinel );
qt_x11_intern_atom( "_QT_SELECTION_SENTINEL", &qt_selection_sentinel ); qt_x11_intern_atom( "_QT_SELECTION_SENTINEL", &qt_selection_sentinel );
qt_x11_intern_atom( "_QT_SCROLL_DONE", &qt_qt_scrolldone ); qt_x11_intern_atom( "_QT_SCROLL_DONE", &qt_qt_scrolldone );
qt_x11_intern_atom( "_QT_INPUT_ENCODING", &qt_input_encoding ); qt_x11_intern_atom( "_QT_INPUT_ENCODING", &qt_input_encoding );
@ -2205,7 +2205,7 @@ void qt_init_internal( int *argcptr, char **argv,
TQThread::initialize(); TQThread::initialize();
#endif #endif
if( qt_is_gui_used ) { if( tqt_is_gui_used ) {
tqApp->setName( appName ); tqApp->setName( appName );
int screen; int screen;
@ -2221,7 +2221,7 @@ void qt_init_internal( int *argcptr, char **argv,
} }
} }
if ( qt_is_gui_used ) { if ( tqt_is_gui_used ) {
qt_set_input_encoding(); qt_set_input_encoding();
qt_set_x11_resources( appFont, appFGCol, appBGCol, appBTNCol); qt_set_x11_resources( appFont, appFGCol, appBGCol, appBTNCol);
@ -2235,7 +2235,7 @@ void qt_init_internal( int *argcptr, char **argv,
(int) ( ( ( TQPaintDevice::x11AppDpiY() >= 95 ? 17. : 12. ) * (int) ( ( ( TQPaintDevice::x11AppDpiY() >= 95 ? 17. : 12. ) *
72. / (float) TQPaintDevice::x11AppDpiY() ) + 0.5 ); 72. / (float) TQPaintDevice::x11AppDpiY() ) + 0.5 );
if ( !qt_app_has_font && !qt_x11_cmdline_font ) { if ( !tqt_app_has_font && !qt_x11_cmdline_font ) {
TQFont f( "Helvetica", ptsz ); TQFont f( "Helvetica", ptsz );
TQApplication::setFont( f ); TQApplication::setFont( f );
} }
@ -2454,29 +2454,29 @@ void TQApplication::x11_initialize_style()
} }
#endif #endif
void qt_init( int *argcptr, char **argv, TQApplication::Type ) void tqt_init( int *argcptr, char **argv, TQApplication::Type )
{ {
qt_init_internal( argcptr, argv, 0, 0, 0 ); tqt_init_internal( argcptr, argv, 0, 0, 0 );
} }
void qt_init( Display *display, TQt::HANDLE visual, TQt::HANDLE colormap ) void tqt_init( Display *display, TQt::HANDLE visual, TQt::HANDLE colormap )
{ {
qt_init_internal( 0, 0, display, visual, colormap ); tqt_init_internal( 0, 0, display, visual, colormap );
} }
/***************************************************************************** /*****************************************************************************
qt_cleanup() - cleans up when the application is finished tqt_cleanup() - cleans up when the application is finished
*****************************************************************************/ *****************************************************************************/
void qt_cleanup() void tqt_cleanup()
{ {
appliedstamp = 0; appliedstamp = 0;
if ( app_save_rootinfo ) // root window must keep state if ( app_save_rootinfo ) // root window must keep state
qt_save_rootinfo(); qt_save_rootinfo();
if ( qt_is_gui_used ) { if ( tqt_is_gui_used ) {
TQPixmapCache::clear(); TQPixmapCache::clear();
TQPainter::cleanup(); TQPainter::cleanup();
TQCursor::cleanup(); TQCursor::cleanup();
@ -2503,7 +2503,7 @@ void qt_cleanup()
#endif #endif
#endif #endif
if ( qt_is_gui_used ) { if ( tqt_is_gui_used ) {
int screen; int screen;
for ( screen = 0; screen < appScreenCount; screen++ ) { for ( screen = 0; screen < appScreenCount; screen++ ) {
if ( ! TQPaintDevice::x11AppDefaultColormap( screen ) ) if ( ! TQPaintDevice::x11AppDefaultColormap( screen ) )
@ -2526,7 +2526,7 @@ void qt_cleanup()
XSetErrorHandler( original_x_errhandler ); XSetErrorHandler( original_x_errhandler );
XSetIOErrorHandler( original_xio_errhandler ); XSetIOErrorHandler( original_xio_errhandler );
if ( qt_is_gui_used && !appForeignDpy ) if ( tqt_is_gui_used && !appForeignDpy )
XCloseDisplay( appDpy ); // close X display XCloseDisplay( appDpy ); // close X display
appDpy = 0; appDpy = 0;
@ -2820,7 +2820,7 @@ void TQApplication::setMainWidget( TQWidget *mainWidget )
TQApplication cursor stack TQApplication cursor stack
*****************************************************************************/ *****************************************************************************/
extern void qt_x11_enforce_cursor( TQWidget * w ); extern void tqt_x11_enforce_cursor( TQWidget * w );
typedef TQPtrList<TQCursor> TQCursorList; typedef TQPtrList<TQCursor> TQCursorList;
@ -2886,7 +2886,7 @@ void TQApplication::setOverrideCursor( const TQCursor &cursor, bool replace )
register TQWidget *w; register TQWidget *w;
while ( (w=it.current()) ) { // for all widgets that have while ( (w=it.current()) ) { // for all widgets that have
if ( w->testWState( WState_OwnCursor ) ) if ( w->testWState( WState_OwnCursor ) )
qt_x11_enforce_cursor( w ); tqt_x11_enforce_cursor( w );
++it; ++it;
} }
XFlush( appDpy ); // make X execute it NOW XFlush( appDpy ); // make X execute it NOW
@ -2914,7 +2914,7 @@ void TQApplication::restoreOverrideCursor()
register TQWidget *w; register TQWidget *w;
while ( (w=it.current()) ) { // set back to original cursors while ( (w=it.current()) ) { // set back to original cursors
if ( w->testWState( WState_OwnCursor ) ) if ( w->testWState( WState_OwnCursor ) )
qt_x11_enforce_cursor( w ); tqt_x11_enforce_cursor( w );
++it; ++it;
} }
XFlush( appDpy ); XFlush( appDpy );
@ -3429,7 +3429,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if ( event->type == PropertyNotify ) { // some properties changed if ( event->type == PropertyNotify ) { // some properties changed
if ( event->xproperty.window == TQPaintDevice::x11AppRootWindow( 0 ) ) { if ( event->xproperty.window == TQPaintDevice::x11AppRootWindow( 0 ) ) {
// root properties for the first screen // root properties for the first screen
if ( event->xproperty.atom == qt_clipboard_sentinel ) { if ( event->xproperty.atom == tqt_clipboard_sentinel ) {
if (qt_check_clipboard_sentinel() ) if (qt_check_clipboard_sentinel() )
emit clipboard()->dataChanged(); emit clipboard()->dataChanged();
} else if ( event->xproperty.atom == qt_selection_sentinel ) { } else if ( event->xproperty.atom == qt_selection_sentinel ) {
@ -3493,7 +3493,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
widget = keywidget; // send XKeyEvents through keywidget->x11Event() widget = keywidget; // send XKeyEvents through keywidget->x11Event()
if ( app_do_modal ) // modal event handling if ( app_do_modal ) // modal event handling
if ( !qt_try_modal(widget, event) ) { if ( !tqt_try_modal(widget, event) ) {
if ( event->type == ClientMessage ) if ( event->type == ClientMessage )
x11ClientMessage( widget, event, TRUE ); x11ClientMessage( widget, event, TRUE );
return 1; return 1;
@ -3638,7 +3638,7 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if ( qt_focus_model == FocusModel_PointerRoot ) // PointerRoot mode if ( qt_focus_model == FocusModel_PointerRoot ) // PointerRoot mode
setActiveWindow( widget ); setActiveWindow( widget );
} }
qt_dispatchEnterLeave( widget, TQWidget::find( curWin ) ); tqt_dispatchEnterLeave( widget, TQWidget::find( curWin ) );
curWin = widget->winId(); curWin = widget->winId();
widget->translateMouseEvent( event ); //we don't get MotionNotify, emulate it widget->translateMouseEvent( event ); //we don't get MotionNotify, emulate it
} }
@ -3689,9 +3689,9 @@ int TQApplication::x11ProcessEvent( XEvent* event )
} }
if ( !curWin ) if ( !curWin )
qt_dispatchEnterLeave( widget, 0 ); tqt_dispatchEnterLeave( widget, 0 );
qt_dispatchEnterLeave( enter, widget ); tqt_dispatchEnterLeave( enter, widget );
curWin = enter ? enter->winId() : 0; curWin = enter ? enter->winId() : 0;
} }
break; break;
@ -3761,9 +3761,9 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if ( qt_xdnd_selection && req->selection == qt_xdnd_selection ) { if ( qt_xdnd_selection && req->selection == qt_xdnd_selection ) {
qt_xdnd_handle_selection_request( req ); qt_xdnd_handle_selection_request( req );
} else if (qt_clipboard) { } else if (tqt_clipboard) {
TQCustomEvent e( TQEvent::Clipboard, event ); TQCustomEvent e( TQEvent::Clipboard, event );
TQApplication::sendSpontaneousEvent( qt_clipboard, &e ); TQApplication::sendSpontaneousEvent( tqt_clipboard, &e );
} }
break; break;
} }
@ -3773,9 +3773,9 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection) if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection)
break; break;
if (qt_clipboard) { if (tqt_clipboard) {
TQCustomEvent e( TQEvent::Clipboard, event ); TQCustomEvent e( TQEvent::Clipboard, event );
TQApplication::sendSpontaneousEvent( qt_clipboard, &e ); TQApplication::sendSpontaneousEvent( tqt_clipboard, &e );
} }
break; break;
} }
@ -3786,9 +3786,9 @@ int TQApplication::x11ProcessEvent( XEvent* event )
if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection) if (! req || qt_xdnd_selection && req->selection == qt_xdnd_selection)
break; break;
if (qt_clipboard) { if (tqt_clipboard) {
TQCustomEvent e( TQEvent::Clipboard, event ); TQCustomEvent e( TQEvent::Clipboard, event );
TQApplication::sendSpontaneousEvent( qt_clipboard, &e ); TQApplication::sendSpontaneousEvent( tqt_clipboard, &e );
} }
break; break;
} }
@ -3826,12 +3826,12 @@ bool TQApplication::x11EventFilter( XEvent * )
A modal widget without a parent becomes application-modal. A modal widget without a parent becomes application-modal.
A modal widget with a parent becomes modal to its parent and grandparents.. A modal widget with a parent becomes modal to its parent and grandparents..
qt_enter_modal() tqt_enter_modal()
Enters modal state Enters modal state
Arguments: Arguments:
TQWidget *widget A modal widget TQWidget *widget A modal widget
qt_leave_modal() tqt_leave_modal()
Leaves modal state for a widget Leaves modal state for a widget
Arguments: Arguments:
TQWidget *widget A modal widget TQWidget *widget A modal widget
@ -3842,38 +3842,38 @@ bool tqt_modal_state()
return app_do_modal; return app_do_modal;
} }
void qt_enter_modal( TQWidget *widget ) void tqt_enter_modal( TQWidget *widget )
{ {
if ( !qt_modal_stack ) { // create modal stack if ( !tqt_modal_stack ) { // create modal stack
qt_modal_stack = new TQWidgetList; tqt_modal_stack = new TQWidgetList;
TQ_CHECK_PTR( qt_modal_stack ); TQ_CHECK_PTR( tqt_modal_stack );
} }
if (widget->parentWidget()) { if (widget->parentWidget()) {
TQEvent e(TQEvent::WindowBlocked); TQEvent e(TQEvent::WindowBlocked);
TQApplication::sendEvent(widget->parentWidget(), &e); TQApplication::sendEvent(widget->parentWidget(), &e);
} }
qt_dispatchEnterLeave( 0, TQWidget::find((WId)curWin) ); tqt_dispatchEnterLeave( 0, TQWidget::find((WId)curWin) );
qt_modal_stack->insert( 0, widget ); tqt_modal_stack->insert( 0, widget );
app_do_modal = TRUE; app_do_modal = TRUE;
curWin = 0; curWin = 0;
ignoreNextMouseReleaseEvent = FALSE; ignoreNextMouseReleaseEvent = FALSE;
} }
void qt_leave_modal( TQWidget *widget ) void tqt_leave_modal( TQWidget *widget )
{ {
if ( qt_modal_stack && qt_modal_stack->removeRef(widget) ) { if ( tqt_modal_stack && tqt_modal_stack->removeRef(widget) ) {
if ( qt_modal_stack->isEmpty() ) { if ( tqt_modal_stack->isEmpty() ) {
delete qt_modal_stack; delete tqt_modal_stack;
qt_modal_stack = 0; tqt_modal_stack = 0;
TQPoint p( TQCursor::pos() ); TQPoint p( TQCursor::pos() );
TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), TRUE ); TQWidget* w = TQApplication::widgetAt( p.x(), p.y(), TRUE );
qt_dispatchEnterLeave( w, TQWidget::find( curWin ) ); // send synthetic enter event tqt_dispatchEnterLeave( w, TQWidget::find( curWin ) ); // send synthetic enter event
curWin = w? w->winId() : 0; curWin = w? w->winId() : 0;
} }
} }
app_do_modal = qt_modal_stack != 0; app_do_modal = tqt_modal_stack != 0;
ignoreNextMouseReleaseEvent = TRUE; ignoreNextMouseReleaseEvent = TRUE;
if (widget->parentWidget()) { if (widget->parentWidget()) {
@ -3883,7 +3883,7 @@ void qt_leave_modal( TQWidget *widget )
} }
Q_EXPORT bool qt_try_modal( TQWidget *widget, XEvent *event ) Q_EXPORT bool tqt_try_modal( TQWidget *widget, XEvent *event )
{ {
if (qt_xdnd_dragging) { if (qt_xdnd_dragging) {
// allow mouse events while DnD is active // allow mouse events while DnD is active
@ -3897,7 +3897,7 @@ Q_EXPORT bool qt_try_modal( TQWidget *widget, XEvent *event )
} }
} }
if ( qt_tryModalHelper( widget ) ) if ( tqt_tryModalHelper( widget ) )
return TRUE; return TRUE;
bool block_event = FALSE; bool block_event = FALSE;
@ -5571,7 +5571,7 @@ bool TQETWidget::translateKeyEvent( const XEvent *event, bool grab )
// send accel events if the keyboard is not grabbed // send accel events if the keyboard is not grabbed
TQKeyEvent a( type, code, ascii, state, text, autor, TQKeyEvent a( type, code, ascii, state, text, autor,
TQMAX( TQMAX(count,1), int(text.length())) ); TQMAX( TQMAX(count,1), int(text.length())) );
if ( qt_tryAccelEvent( this, &a ) ) if ( tqt_tryAccelEvent( this, &a ) )
return TRUE; return TRUE;
} }

@ -46,8 +46,8 @@
#include "ntqgif.h" #include "ntqgif.h"
#include <stdlib.h> #include <stdlib.h>
extern void qt_init_image_handlers(); extern void tqt_init_image_handlers();
extern void qt_init_image_plugins(); extern void tqt_init_image_plugins();
#define Q_TRANSPARENT 0x00ffffff #define Q_TRANSPARENT 0x00ffffff
@ -303,7 +303,7 @@ public:
#if defined(QT_BUILTIN_GIF_READER) && QT_BUILTIN_GIF_READER == 1 #if defined(QT_BUILTIN_GIF_READER) && QT_BUILTIN_GIF_READER == 1
gif_decoder_factory = new TQGIFFormatType; gif_decoder_factory = new TQGIFFormatType;
#endif #endif
qt_init_image_handlers(); tqt_init_image_handlers();
tqAddPostRoutine( cleanup ); tqAddPostRoutine( cleanup );
} }
} }
@ -344,7 +344,7 @@ void TQImageDecoderPrivate::cleanup()
*/ */
TQImageDecoder::TQImageDecoder(TQImageConsumer* c) TQImageDecoder::TQImageDecoder(TQImageConsumer* c)
{ {
qt_init_image_handlers(); tqt_init_image_handlers();
d = new TQImageDecoderPrivate; d = new TQImageDecoderPrivate;
TQ_CHECK_PTR(d); TQ_CHECK_PTR(d);
consumer = c; consumer = c;
@ -397,7 +397,7 @@ int TQImageDecoder::decode(const uchar* buffer, int length)
actual_decoder = f->decoderFor(d->header, d->count); actual_decoder = f->decoderFor(d->header, d->count);
} }
if ( !actual_decoder && !plugins_loaded) { if ( !actual_decoder && !plugins_loaded) {
qt_init_image_plugins(); tqt_init_image_plugins();
plugins_loaded = TRUE; plugins_loaded = TRUE;
for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first(); for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
@ -432,7 +432,7 @@ int TQImageDecoder::decode(const uchar* buffer, int length)
TQImageFormatType* TQImageDecoder::format( const char* name ) TQImageFormatType* TQImageDecoder::format( const char* name )
{ {
TQImageDecoderPrivate::ensureFactories(); TQImageDecoderPrivate::ensureFactories();
qt_init_image_plugins(); tqt_init_image_plugins();
for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first(); for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
f; f;
@ -467,7 +467,7 @@ const char* TQImageDecoder::formatName(const uchar* buffer, int length)
} }
} }
if ( !name && !plugins_loaded) { if ( !name && !plugins_loaded) {
qt_init_image_plugins(); tqt_init_image_plugins();
plugins_loaded = TRUE; plugins_loaded = TRUE;
for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first(); for (TQImageFormatType* f = TQImageDecoderPrivate::factories->first();
f && !name; f && !name;
@ -491,7 +491,7 @@ const char* TQImageDecoder::formatName(const uchar* buffer, int length)
TQStrList TQImageDecoder::inputFormats() TQStrList TQImageDecoder::inputFormats()
{ {
TQImageDecoderPrivate::ensureFactories(); TQImageDecoderPrivate::ensureFactories();
qt_init_image_plugins(); tqt_init_image_plugins();
TQStrList result; TQStrList result;

@ -91,7 +91,7 @@ extern Time tqt_x_time; // def. in qapplication_x11.cpp
extern Time qt_x_incr; // def. in qapplication_x11.cpp extern Time qt_x_incr; // def. in qapplication_x11.cpp
extern Atom qt_xa_clipboard; extern Atom qt_xa_clipboard;
extern Atom qt_selection_property; extern Atom qt_selection_property;
extern Atom qt_clipboard_sentinel; extern Atom tqt_clipboard_sentinel;
extern Atom qt_selection_sentinel; extern Atom qt_selection_sentinel;
extern Atom qt_utf8_string; extern Atom qt_utf8_string;
@ -244,7 +244,7 @@ static TQClipboardData *clipboardData()
return internalCbData; return internalCbData;
} }
void qt_clipboard_cleanup_mime_source(TQMimeSource *src) void tqt_clipboard_cleanup_mime_source(TQMimeSource *src)
{ {
if(internalCbData && internalCbData->source() == src) if(internalCbData && internalCbData->source() == src)
internalCbData->clear(FALSE); internalCbData->clear(FALSE);
@ -1520,7 +1520,7 @@ void TQClipboard::setData( TQMimeSource* src, Mode mode )
case Clipboard: case Clipboard:
atom = qt_xa_clipboard; atom = qt_xa_clipboard;
sentinel_atom = qt_clipboard_sentinel; sentinel_atom = tqt_clipboard_sentinel;
d = clipboardData(); d = clipboardData();
break; break;
@ -1644,7 +1644,7 @@ bool qt_check_clipboard_sentinel()
if (XGetWindowProperty(TQPaintDevice::x11AppDisplay(), if (XGetWindowProperty(TQPaintDevice::x11AppDisplay(),
TQApplication::desktop()->screen(0)->winId(), TQApplication::desktop()->screen(0)->winId(),
qt_clipboard_sentinel, 0, 2, False, XA_WINDOW, tqt_clipboard_sentinel, 0, 2, False, XA_WINDOW,
&actualType, &actualFormat, &nitems, &bytesLeft, &actualType, &actualFormat, &nitems, &bytesLeft,
(unsigned char **) &owners) == Success) { (unsigned char **) &owners) == Success) {
if (actualType == XA_WINDOW && actualFormat == 32 && nitems == 2) { if (actualType == XA_WINDOW && actualFormat == 32 && nitems == 2) {

@ -74,8 +74,8 @@ extern "C" {
extern void qt_ignore_badwindow(); extern void qt_ignore_badwindow();
extern bool qt_badwindow(); extern bool qt_badwindow();
extern void qt_enter_modal( TQWidget *widget ); extern void tqt_enter_modal( TQWidget *widget );
extern void qt_leave_modal( TQWidget *widget ); extern void tqt_leave_modal( TQWidget *widget );
#if defined(Q_C_CALLBACKS) #if defined(Q_C_CALLBACKS)
} }

@ -60,7 +60,7 @@ static const int XKeyRelease = KeyRelease;
#undef KeyRelease #undef KeyRelease
// from qapplication.cpp // from qapplication.cpp
extern bool qt_is_gui_used; extern bool tqt_is_gui_used;
// from qeventloop_unix.cpp // from qeventloop_unix.cpp
extern timeval *qt_wait_timer(); extern timeval *qt_wait_timer();
@ -117,7 +117,7 @@ void TQEventLoop::init()
// intitialize the X11 parts of the event loop // intitialize the X11 parts of the event loop
d->xfd = -1; d->xfd = -1;
if ( qt_is_gui_used ) if ( tqt_is_gui_used )
d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() ); d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() );
} }
@ -139,11 +139,11 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
int nevents = 0; int nevents = 0;
#if defined(QT_THREAD_SUPPORT) #if defined(QT_THREAD_SUPPORT)
TQMutexLocker locker( TQApplication::qt_mutex ); TQMutexLocker locker( TQApplication::tqt_mutex );
#endif #endif
// handle gui and posted events // handle gui and posted events
if ( qt_is_gui_used ) { if ( tqt_is_gui_used ) {
TQApplication::sendPostedEvents(); TQApplication::sendPostedEvents();
// Two loops so that posted events accumulate // Two loops so that posted events accumulate
@ -261,7 +261,7 @@ bool TQEventLoop::processEvents( ProcessEventsFlags flags )
FD_ZERO( &d->sn_vec[2].select_fds ); FD_ZERO( &d->sn_vec[2].select_fds );
} }
if ( qt_is_gui_used ) { if ( tqt_is_gui_used ) {
// select for events on the event socket - only on X11 // select for events on the event socket - only on X11
FD_SET( d->xfd, &d->sn_vec[0].select_fds ); FD_SET( d->xfd, &d->sn_vec[0].select_fds );
highest = TQMAX( highest, d->xfd ); highest = TQMAX( highest, d->xfd );
@ -407,7 +407,7 @@ bool TQEventLoop::hasPendingEvents() const
void TQEventLoop::appStartingUp() void TQEventLoop::appStartingUp()
{ {
if ( qt_is_gui_used ) if ( tqt_is_gui_used )
d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() ); d->xfd = XConnectionNumber( TQPaintDevice::x11AppDisplay() );
} }

@ -3861,7 +3861,7 @@ static TQPluginManager<TQImageFormatInterface> *plugin_manager = 0;
static void *plugin_manager = 0; static void *plugin_manager = 0;
#endif #endif
void qt_init_image_plugins() void tqt_init_image_plugins()
{ {
#ifndef QT_NO_COMPONENT #ifndef QT_NO_COMPONENT
if ( plugin_manager ) if ( plugin_manager )
@ -3893,7 +3893,7 @@ static void cleanup()
#endif #endif
} }
void qt_init_image_handlers() // initialize image handlers void tqt_init_image_handlers() // initialize image handlers
{ {
if ( !imageHandlers ) { if ( !imageHandlers ) {
imageHandlers = new TQIHList; imageHandlers = new TQIHList;
@ -3940,8 +3940,8 @@ void qt_init_image_handlers() // initialize image handlers
static TQImageHandler *get_image_handler( const char *format ) static TQImageHandler *get_image_handler( const char *format )
{ // get pointer to handler { // get pointer to handler
qt_init_image_handlers(); tqt_init_image_handlers();
qt_init_image_plugins(); tqt_init_image_plugins();
register TQImageHandler *p = imageHandlers->first(); register TQImageHandler *p = imageHandlers->first();
while ( p ) { // traverse list while ( p ) { // traverse list
if ( p->format == format ) if ( p->format == format )
@ -4012,7 +4012,7 @@ void TQImageIO::defineIOHandler( const char *format,
image_io_handler readImage, image_io_handler readImage,
image_io_handler writeImage ) image_io_handler writeImage )
{ {
qt_init_image_handlers(); tqt_init_image_handlers();
TQImageHandler *p; TQImageHandler *p;
p = new TQImageHandler( format, header, flags, p = new TQImageHandler( format, header, flags,
readImage, writeImage ); readImage, writeImage );
@ -4278,8 +4278,8 @@ const char *TQImageIO::imageFormat( TQIODevice *d )
char buf[buflen]; char buf[buflen];
char buf2[buflen]; char buf2[buflen];
qt_init_image_handlers(); tqt_init_image_handlers();
qt_init_image_plugins(); tqt_init_image_plugins();
int pos = d->at(); // save position int pos = d->at(); // save position
int rdlen = d->readBlock( buf, buflen ); // read a few bytes int rdlen = d->readBlock( buf, buflen ); // read a few bytes
@ -4326,8 +4326,8 @@ TQStrList TQImageIO::inputFormats()
{ {
TQStrList result; TQStrList result;
qt_init_image_handlers(); tqt_init_image_handlers();
qt_init_image_plugins(); tqt_init_image_plugins();
#ifndef QT_NO_ASYNC_IMAGE_IO #ifndef QT_NO_ASYNC_IMAGE_IO
// Include asynchronous loaders first. // Include asynchronous loaders first.
@ -4356,8 +4356,8 @@ TQStrList TQImageIO::outputFormats()
{ {
TQStrList result; TQStrList result;
qt_init_image_handlers(); tqt_init_image_handlers();
qt_init_image_plugins(); tqt_init_image_plugins();
// Include asynchronous writers (!) first. // Include asynchronous writers (!) first.
// (None) // (None)
@ -4497,7 +4497,7 @@ bool TQImageIO::write()
return FALSE; return FALSE;
TQImageHandler *h = get_image_handler( frmt ); TQImageHandler *h = get_image_handler( frmt );
if ( !h && !plugin_manager) { if ( !h && !plugin_manager) {
qt_init_image_plugins(); tqt_init_image_plugins();
h = get_image_handler( frmt ); h = get_image_handler( frmt );
} }
if ( !h || !h->write_image ) { if ( !h || !h->write_image ) {

@ -105,7 +105,7 @@ extern "C" {
#endif #endif
static static
void qt_init_source(j_decompress_ptr) void tqt_init_source(j_decompress_ptr)
{ {
} }
@ -168,7 +168,7 @@ void qt_term_source(j_decompress_ptr)
inline my_jpeg_source_mgr::my_jpeg_source_mgr(TQImageIO* iioptr) inline my_jpeg_source_mgr::my_jpeg_source_mgr(TQImageIO* iioptr)
{ {
jpeg_source_mgr::init_source = qt_init_source; jpeg_source_mgr::init_source = tqt_init_source;
jpeg_source_mgr::fill_input_buffer = qt_fill_input_buffer; jpeg_source_mgr::fill_input_buffer = qt_fill_input_buffer;
jpeg_source_mgr::skip_input_data = qt_skip_input_data; jpeg_source_mgr::skip_input_data = qt_skip_input_data;
jpeg_source_mgr::resync_to_restart = jpeg_resync_to_restart; jpeg_source_mgr::resync_to_restart = jpeg_resync_to_restart;
@ -376,7 +376,7 @@ extern "C" {
#endif #endif
static static
void qt_init_destination(j_compress_ptr) void tqt_init_destination(j_compress_ptr)
{ {
} }
@ -433,7 +433,7 @@ void qt_term_destination(j_compress_ptr cinfo)
inline inline
my_jpeg_destination_mgr::my_jpeg_destination_mgr(TQImageIO* iioptr) my_jpeg_destination_mgr::my_jpeg_destination_mgr(TQImageIO* iioptr)
{ {
jpeg_destination_mgr::init_destination = qt_init_destination; jpeg_destination_mgr::init_destination = tqt_init_destination;
jpeg_destination_mgr::empty_output_buffer = qt_empty_output_buffer; jpeg_destination_mgr::empty_output_buffer = qt_empty_output_buffer;
jpeg_destination_mgr::term_destination = qt_term_destination; jpeg_destination_mgr::term_destination = qt_term_destination;
iio = iioptr; iio = iioptr;

@ -145,7 +145,7 @@ public:
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
enumData(0), numEnumData(0), enumData(0), numEnumData(0),
propData(0),numPropData(0), propData(0),numPropData(0),
qt_static_property(0), tqt_static_property(0),
#endif #endif
classInfo(0), numClassInfo(0) {} classInfo(0), numClassInfo(0) {}
#ifndef QT_NO_PROPERTIES #ifndef QT_NO_PROPERTIES
@ -153,7 +153,7 @@ public:
int numEnumData; int numEnumData;
const TQMetaProperty *propData; const TQMetaProperty *propData;
int numPropData; int numPropData;
bool (*qt_static_property)(TQObject*, int, int, TQVariant*); bool (*tqt_static_property)(TQObject*, int, int, TQVariant*);
#endif #endif
const TQClassInfo *classInfo; const TQClassInfo *classInfo;
int numClassInfo; int numClassInfo;
@ -249,7 +249,7 @@ TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_cl
const TQMetaData *const signal_data, int n_signals, const TQMetaData *const signal_data, int n_signals,
const TQMetaProperty *const prop_data, int n_props, const TQMetaProperty *const prop_data, int n_props,
const TQMetaEnum *const enum_data, int n_enums, const TQMetaEnum *const enum_data, int n_enums,
bool (*qt_static_property)(TQObject*, int, int, TQVariant*), bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo *const class_info, int n_info ) const TQClassInfo *const class_info, int n_info )
{ {
classname = class_name; // set meta data classname = class_name; // set meta data
@ -265,7 +265,7 @@ TQMetaObject::TQMetaObject( const char *const class_name, TQMetaObject *super_cl
d->numPropData = n_props; d->numPropData = n_props;
d->enumData = enum_data; d->enumData = enum_data;
d->numEnumData = n_enums; d->numEnumData = n_enums;
d->qt_static_property = qt_static_property; d->tqt_static_property = tqt_static_property;
d->classInfo = class_info; d->classInfo = class_info;
d->numClassInfo = n_info; d->numClassInfo = n_info;
@ -492,14 +492,14 @@ TQMetaObject *TQMetaObject::new_metaobject( const char *classname,
const TQMetaData * const signal_data, int n_signals, const TQMetaData * const signal_data, int n_signals,
const TQMetaProperty * const prop_data, int n_props, const TQMetaProperty * const prop_data, int n_props,
const TQMetaEnum * const enum_data, int n_enums, const TQMetaEnum * const enum_data, int n_enums,
bool (*qt_static_property)(TQObject*, int, int, TQVariant*), bool (*tqt_static_property)(TQObject*, int, int, TQVariant*),
const TQClassInfo * const class_info, int n_info ) const TQClassInfo * const class_info, int n_info )
{ {
return new TQMetaObject( classname, superclassobject, slot_data, n_slots, return new TQMetaObject( classname, superclassobject, slot_data, n_slots,
signal_data, n_signals, signal_data, n_signals,
prop_data, n_props, prop_data, n_props,
enum_data, n_enums, enum_data, n_enums,
qt_static_property, tqt_static_property,
class_info, n_info ); class_info, n_info );
} }
#endif #endif
@ -827,14 +827,14 @@ bool TQMetaObject::hasMetaObject( const char *class_name )
### this functions will go away. It exists purely for the sake of meta ### this functions will go away. It exists purely for the sake of meta
### object code generated with TQt 3.1.0 ### object code generated with TQt 3.1.0
*/ */
bool TQMetaObject::qt_static_property( TQObject* o, int id, int f, TQVariant* v) bool TQMetaObject::tqt_static_property( TQObject* o, int id, int f, TQVariant* v)
{ {
if ( d->qt_static_property ) if ( d->tqt_static_property )
return d->qt_static_property( o, id, f, v ); return d->tqt_static_property( o, id, f, v );
else if ( o ) // compatibility else if ( o ) // compatibility
return o->qt_property( id, f, v ); return o->tqt_property( id, f, v );
else if ( superclass ) else if ( superclass )
return superclass->qt_static_property( o, id, f, v ); return superclass->tqt_static_property( o, id, f, v );
switch ( f ) { switch ( f ) {
case 3: case 4: case 5: case 3: case 4: case 5:
return TRUE; return TRUE;
@ -1116,7 +1116,7 @@ bool TQMetaProperty::designable( TQObject* o ) const
return FALSE; return FALSE;
if ( o ) { if ( o ) {
int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
return idx >= 0 && o->qt_property( idx, 3, 0 ); return idx >= 0 && o->tqt_property( idx, 3, 0 );
} }
if ( testFlags( DesignableOverride ) ) { if ( testFlags( DesignableOverride ) ) {
const TQMetaObject* mo = (*meta); const TQMetaObject* mo = (*meta);
@ -1137,7 +1137,7 @@ bool TQMetaProperty::scriptable( TQObject* o ) const
{ {
if ( o ) { if ( o ) {
int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
return idx >= 0 && o->qt_property( idx, 4, 0 ); return idx >= 0 && o->tqt_property( idx, 4, 0 );
} }
if ( testFlags( ScriptableOverride ) ) { if ( testFlags( ScriptableOverride ) ) {
const TQMetaObject* mo = (*meta); const TQMetaObject* mo = (*meta);
@ -1160,7 +1160,7 @@ bool TQMetaProperty::stored( TQObject* o ) const
return FALSE; return FALSE;
if ( o ) { if ( o ) {
int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
return idx >= 0 && o->qt_property( idx, 5, 0 ); return idx >= 0 && o->tqt_property( idx, 5, 0 );
} }
if ( testFlags( StoredOverride ) ) { if ( testFlags( StoredOverride ) ) {
const TQMetaObject* mo = (*meta); const TQMetaObject* mo = (*meta);
@ -1185,7 +1185,7 @@ bool TQMetaProperty::reset( TQObject* o ) const
int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE ); int idx = _id >= 0 ? _id : (*meta)->indexOfProperty( this, TRUE );
if ( idx < 0 ) if ( idx < 0 )
return 0; return 0;
return o->qt_property( idx, 2, 0 ); return o->tqt_property( idx, 2, 0 );
} }

@ -110,8 +110,8 @@ void TQMimeSource::clearCache()
TQMimeSource::~TQMimeSource() TQMimeSource::~TQMimeSource()
{ {
#ifndef QT_NO_CLIPBOARD #ifndef QT_NO_CLIPBOARD
extern void qt_clipboard_cleanup_mime_source(TQMimeSource *); extern void tqt_clipboard_cleanup_mime_source(TQMimeSource *);
qt_clipboard_cleanup_mime_source(this); tqt_clipboard_cleanup_mime_source(this);
#endif #endif
clearCache(); clearCache();
} }

@ -246,14 +246,14 @@ static void removeObjFromList( TQObjectList *objList, const TQObject *obj,
Returns 0 if there is no such child. Returns 0 if there is no such child.
\code \code
TQListBox *c = (TQListBox *) qt_find_obj_child( myWidget, "TQListBox", TQListBox *c = (TQListBox *) tqt_find_obj_child( myWidget, "TQListBox",
"my list box" ); "my list box" );
if ( c ) if ( c )
c->insertItem( "another string" ); c->insertItem( "another string" );
\endcode \endcode
*/ */
void *qt_find_obj_child( TQObject *parent, const char *type, const char *name ) void *tqt_find_obj_child( TQObject *parent, const char *type, const char *name )
{ {
const TQObjectList *list = parent->children(); const TQObjectList *list = parent->children();
if ( list ) { if ( list ) {
@ -303,7 +303,7 @@ static void qt_spy_signal( TQObject* sender, int signal, TQUObject* o )
TQObject* old_sender = qt_spy_signal_sender; TQObject* old_sender = qt_spy_signal_sender;
qt_spy_signal_sender = sender; qt_spy_signal_sender = sender;
tqt_preliminary_signal_spy->qt_invoke( slot, o ); tqt_preliminary_signal_spy->tqt_invoke( slot, o );
qt_spy_signal_sender = old_sender; qt_spy_signal_sender = old_sender;
break; break;
} }
@ -616,7 +616,7 @@ bool TQObject::inherits( const char *clname ) const
\sa inherits() \sa inherits()
*/ */
void *qt_inheritedBy( TQMetaObject *superClass, const TQObject *object ) void *tqt_inheritedBy( TQMetaObject *superClass, const TQObject *object )
{ {
if (!object) if (!object)
return 0; return 0;
@ -2378,9 +2378,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
sol->currentSender = this; sol->currentSender = this;
} }
if ( c->memberType() == TQSIGNAL_CODE ) if ( c->memberType() == TQSIGNAL_CODE )
object->qt_emit( c->member(), o ); object->tqt_emit( c->member(), o );
else else
object->qt_invoke( c->member(), o ); object->tqt_invoke( c->member(), o );
if ( sol ) { if ( sol ) {
sol->currentSender = oldSender; sol->currentSender = oldSender;
if ( sol->deref() ) if ( sol->deref() )
@ -2402,9 +2402,9 @@ void TQObject::activate_signal( TQConnectionList *clist, TQUObject *o )
sol->currentSender = this; sol->currentSender = this;
} }
if ( c->memberType() == TQSIGNAL_CODE ) if ( c->memberType() == TQSIGNAL_CODE )
object->qt_emit( c->member(), o ); object->tqt_emit( c->member(), o );
else else
object->qt_invoke( c->member(), o ); object->tqt_invoke( c->member(), o );
if (sol ) { if (sol ) {
sol->currentSender = oldSender; sol->currentSender = oldSender;
if ( sol->deref() ) if ( sol->deref() )
@ -2631,7 +2631,7 @@ bool TQObject::setProperty( const char *name, const TQVariant& value )
} else if ( v.type() != TQVariant::Int && v.type() != TQVariant::UInt ) { } else if ( v.type() != TQVariant::Int && v.type() != TQVariant::UInt ) {
return FALSE; return FALSE;
} }
return qt_property( id, 0, &v ); return tqt_property( id, 0, &v );
} }
TQVariant::Type type = (TQVariant::Type)(p->flags >> 24); TQVariant::Type type = (TQVariant::Type)(p->flags >> 24);
@ -2639,7 +2639,7 @@ bool TQObject::setProperty( const char *name, const TQVariant& value )
type = TQVariant::nameToType( p->type() ); type = TQVariant::nameToType( p->type() );
if ( type != TQVariant::Invalid && !v.canCast( type ) ) if ( type != TQVariant::Invalid && !v.canCast( type ) )
return FALSE; return FALSE;
return qt_property( id, 0, &v ); return tqt_property( id, 0, &v );
} }
/*! /*!
@ -2666,8 +2666,8 @@ TQVariant TQObject::property( const char *name ) const
className(), name ); className(), name );
return v; return v;
} }
TQObject* that = (TQObject*) this; // moc ensures constness for the qt_property call TQObject* that = (TQObject*) this; // moc ensures constness for the tqt_property call
that->qt_property( id, 1, &v ); that->tqt_property( id, 1, &v );
return v; return v;
} }

@ -112,7 +112,7 @@ static XShmSegmentInfo xshminfo;
static XImage *xshmimg = 0; static XImage *xshmimg = 0;
static Pixmap xshmpm = 0; static Pixmap xshmpm = 0;
static void qt_cleanup_mitshm() static void tqt_cleanup_mitshm()
{ {
if ( xshmimg == 0 ) if ( xshmimg == 0 )
return; return;
@ -137,11 +137,11 @@ static bool qt_create_mitshm_buffer( const TQPaintDevice* dev, int w, int h )
Visual *vis = (Visual*)dev->x11Visual(); Visual *vis = (Visual*)dev->x11Visual();
if ( xshminit ) { if ( xshminit ) {
qt_cleanup_mitshm(); tqt_cleanup_mitshm();
} else { } else {
if ( !XShmQueryVersion(dpy, &major, &minor, &pixmaps_ok) ) if ( !XShmQueryVersion(dpy, &major, &minor, &pixmaps_ok) )
return FALSE; // MIT Shm not supported return FALSE; // MIT Shm not supported
tqAddPostRoutine( qt_cleanup_mitshm ); tqAddPostRoutine( tqt_cleanup_mitshm );
xshminit = TRUE; xshminit = TRUE;
} }

@ -7219,7 +7219,7 @@ static const Entity entitylist [] = {
static TQMap<TQString, TQChar> *html_map = 0; static TQMap<TQString, TQChar> *html_map = 0;
static void qt_cleanup_html_map() static void tqt_cleanup_html_map()
{ {
delete html_map; delete html_map;
html_map = 0; html_map = 0;
@ -7229,7 +7229,7 @@ static TQMap<TQString, TQChar> *htmlMap()
{ {
if ( !html_map ) { if ( !html_map ) {
html_map = new TQMap<TQString, TQChar>; html_map = new TQMap<TQString, TQChar>;
tqAddPostRoutine( qt_cleanup_html_map ); tqAddPostRoutine( tqt_cleanup_html_map );
const Entity *ent = entitylist; const Entity *ent = entitylist;
while( ent->code ) { while( ent->code ) {

@ -1286,7 +1286,7 @@ void TQStyleSheet::init()
static TQStyleSheet* defaultsheet = 0; static TQStyleSheet* defaultsheet = 0;
static TQSingleCleanupHandler<TQStyleSheet> qt_cleanup_stylesheet; static TQSingleCleanupHandler<TQStyleSheet> tqt_cleanup_stylesheet;
/*! /*!
Returns the application-wide default style sheet. This style sheet Returns the application-wide default style sheet. This style sheet
@ -1302,7 +1302,7 @@ TQStyleSheet* TQStyleSheet::defaultSheet()
{ {
if (!defaultsheet) { if (!defaultsheet) {
defaultsheet = new TQStyleSheet(); defaultsheet = new TQStyleSheet();
qt_cleanup_stylesheet.set( &defaultsheet ); tqt_cleanup_stylesheet.set( &defaultsheet );
} }
return defaultsheet; return defaultsheet;
} }
@ -1318,12 +1318,12 @@ void TQStyleSheet::setDefaultSheet( TQStyleSheet* sheet)
{ {
if ( defaultsheet != sheet ) { if ( defaultsheet != sheet ) {
if ( defaultsheet ) if ( defaultsheet )
qt_cleanup_stylesheet.reset(); tqt_cleanup_stylesheet.reset();
delete defaultsheet; delete defaultsheet;
} }
defaultsheet = sheet; defaultsheet = sheet;
if ( defaultsheet ) if ( defaultsheet )
qt_cleanup_stylesheet.set( &defaultsheet ); tqt_cleanup_stylesheet.set( &defaultsheet );
} }
/*!\internal /*!\internal

@ -1760,8 +1760,8 @@ void TQWidget::setEnabled( bool enable )
// enforce the windows behavior of clearing the cursor on // enforce the windows behavior of clearing the cursor on
// disabled widgets // disabled widgets
extern void qt_x11_enforce_cursor( TQWidget * w ); // defined in qwidget_x11.cpp extern void tqt_x11_enforce_cursor( TQWidget * w ); // defined in qwidget_x11.cpp
qt_x11_enforce_cursor( this ); tqt_x11_enforce_cursor( this );
} }
#endif #endif
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
@ -4044,9 +4044,9 @@ void TQWidget::show()
TQApplication::sendEvent( this, &showEvent ); TQApplication::sendEvent( this, &showEvent );
if ( testWFlags(WShowModal) ) { if ( testWFlags(WShowModal) ) {
// qt_enter_modal *before* show, otherwise the initial // tqt_enter_modal *before* show, otherwise the initial
// stacking might be wrong // stacking might be wrong
qt_enter_modal( this ); tqt_enter_modal( this );
} }
// do not show the window directly, but post a show-window request // do not show the window directly, but post a show-window request
@ -4096,7 +4096,7 @@ void TQWidget::hide()
// destroyed and we lose all access to its parent because we haven't // destroyed and we lose all access to its parent because we haven't
// left modality. (Eg. modal Progress Dialog) // left modality. (Eg. modal Progress Dialog)
if ( testWFlags(WShowModal) ) if ( testWFlags(WShowModal) )
qt_leave_modal( this ); tqt_leave_modal( this );
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
if ( isTopLevel() && !isPopup() && parentWidget() && isActiveWindow() ) if ( isTopLevel() && !isPopup() && parentWidget() && isActiveWindow() )
@ -4940,7 +4940,7 @@ bool TQWidget::event( TQEvent *e )
if ( e->type() == TQEvent::LanguageChange ) { if ( e->type() == TQEvent::LanguageChange ) {
int index = metaObject()->findSlot( "languageChange()", TRUE ); int index = metaObject()->findSlot( "languageChange()", TRUE );
if ( index >= 0 ) if ( index >= 0 )
qt_invoke( index, 0 ); tqt_invoke( index, 0 );
} }
update(); update();
break; break;
@ -4985,7 +4985,7 @@ bool TQWidget::event( TQEvent *e )
TQObject *o; TQObject *o;
while( ( o = it.current() ) != 0 ) { while( ( o = it.current() ) != 0 ) {
++it; ++it;
TQWidget *w = ::qt_cast<TQWidget*>(o); TQWidget *w = ::tqt_cast<TQWidget*>(o);
if (w && !w->testWFlags(TQt::WShowModal)) if (w && !w->testWFlags(TQt::WShowModal))
TQApplication::sendEvent( o, e ); TQApplication::sendEvent( o, e );
} }

@ -207,7 +207,7 @@ Window qt_XCreateSimpleWindow( const TQWidget *creator,
void qt_XDestroyWindow( const TQWidget *destroyer, void qt_XDestroyWindow( const TQWidget *destroyer,
Display *display, Window window ); Display *display, Window window );
Q_EXPORT void qt_x11_enforce_cursor( TQWidget * w ) Q_EXPORT void tqt_x11_enforce_cursor( TQWidget * w )
{ {
if ( w->testWState( TQt::WState_OwnCursor ) ) { if ( w->testWState( TQt::WState_OwnCursor ) ) {
TQCursor * oc = TQApplication::overrideCursor(); TQCursor * oc = TQApplication::overrideCursor();
@ -225,7 +225,7 @@ Q_EXPORT void qt_x11_enforce_cursor( TQWidget * w )
} }
} }
Q_EXPORT void qt_wait_for_window_manager( TQWidget* w ) Q_EXPORT void tqt_wait_for_window_manager( TQWidget* w )
{ {
TQApplication::flushX(); TQApplication::flushX();
XEvent ev; XEvent ev;
@ -754,7 +754,7 @@ void TQWidget::create( WId window, bool initializeWindow, bool destroyOldWindow)
} else if ( topLevel ) { // set X cursor } else if ( topLevel ) { // set X cursor
setWState( WState_OwnCursor ); setWState( WState_OwnCursor );
if ( initializeWindow ) if ( initializeWindow )
qt_x11_enforce_cursor( this ); tqt_x11_enforce_cursor( this );
} }
if ( destroyw ) if ( destroyw )
@ -800,7 +800,7 @@ void TQWidget::destroy( bool destroyWindow, bool destroySubWindows )
if ( isTopLevel() ) if ( isTopLevel() )
qt_deferred_map_take( this ); qt_deferred_map_take( this );
if ( testWFlags(WShowModal) ) // just be sure we leave modal if ( testWFlags(WShowModal) ) // just be sure we leave modal
qt_leave_modal( this ); tqt_leave_modal( this );
else if ( testWFlags(WType_Popup) ) else if ( testWFlags(WType_Popup) )
tqApp->closePopup( this ); tqApp->closePopup( this );
@ -1210,7 +1210,7 @@ void TQWidget::setCursor( const TQCursor &cursor )
extra->curs = new TQCursor(cursor); extra->curs = new TQCursor(cursor);
} }
setWState( WState_OwnCursor ); setWState( WState_OwnCursor );
qt_x11_enforce_cursor( this ); tqt_x11_enforce_cursor( this );
XFlush( x11Display() ); XFlush( x11Display() );
} }
@ -1222,7 +1222,7 @@ void TQWidget::unsetCursor()
} }
if ( !isTopLevel() ) if ( !isTopLevel() )
clearWState( WState_OwnCursor ); clearWState( WState_OwnCursor );
qt_x11_enforce_cursor( this ); tqt_x11_enforce_cursor( this );
XFlush( x11Display() ); XFlush( x11Display() );
} }
@ -1932,7 +1932,7 @@ void TQWidget::showWindow()
&& !(qt_net_supports(qt_net_wm_state_max_h) && !(qt_net_supports(qt_net_wm_state_max_h)
&& qt_net_supports(qt_net_wm_state_max_v))) { && qt_net_supports(qt_net_wm_state_max_v))) {
XMapWindow( x11Display(), winId() ); XMapWindow( x11Display(), winId() );
qt_wait_for_window_manager(this); tqt_wait_for_window_manager(this);
// if the wm was not smart enough to adjust our size, do that manually // if the wm was not smart enough to adjust our size, do that manually
updateFrameStrut(); updateFrameStrut();
@ -1956,7 +1956,7 @@ void TQWidget::showWindow()
if (isFullScreen() && !qt_net_supports(qt_net_wm_state_fullscreen)) { if (isFullScreen() && !qt_net_supports(qt_net_wm_state_fullscreen)) {
XMapWindow(x11Display(), winId()); XMapWindow(x11Display(), winId());
qt_wait_for_window_manager(this); tqt_wait_for_window_manager(this);
return; return;
} }
} }

@ -1816,7 +1816,7 @@ int main( int argc, char **argv )
return ret; return ret;
} }
#else #else
bool qt_is_gui_used = FALSE; bool tqt_is_gui_used = FALSE;
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -2319,7 +2319,7 @@ char *straddSpc( const char *s1, const char *s2,
/* /*
We call B::qt_invoke() rather than A::B::qt_invoke() to We call B::tqt_invoke() rather than A::B::tqt_invoke() to
work around a bug in MSVC 6. The bug occurs if the work around a bug in MSVC 6. The bug occurs if the
super-class is in a namespace and the sub-class isn't. super-class is in a namespace and the sub-class isn't.
@ -3065,7 +3065,7 @@ void generateClass() // generate C++ source code for a class
// //
// Generate smart cast function // Generate smart cast function
// //
fprintf( out, "\nvoid* %s::qt_cast( const char* clname )\n{\n", fprintf( out, "\nvoid* %s::tqt_cast( const char* clname )\n{\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " if ( !qstrcmp( clname, \"%s\" ) )\n" fprintf( out, " if ( !qstrcmp( clname, \"%s\" ) )\n"
"\treturn this;\n", "\treturn this;\n",
@ -3078,7 +3078,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "\treturn (%s*)this;\n", fixed.data()); fprintf( out, "\treturn (%s*)this;\n", fixed.data());
} }
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_cast( clname );\n", fprintf( out, " return %s::tqt_cast( clname );\n",
(const char*)purestSuperClassName() ); (const char*)purestSuperClassName() );
else else
fprintf( out, " return 0;\n" ); fprintf( out, " return 0;\n" );
@ -3234,9 +3234,9 @@ void generateClass() // generate C++ source code for a class
// //
// Generate internal qt_invoke() function // Generate internal tqt_invoke() function
// //
fprintf( out, "\nbool %s::qt_invoke( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_invoke( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() );
if( !g->slots.isEmpty() ) { if( !g->slots.isEmpty() ) {
fprintf( out, " switch ( _id - staticMetaObject()->slotOffset() ) {\n" ); fprintf( out, " switch ( _id - staticMetaObject()->slotOffset() ) {\n" );
@ -3298,7 +3298,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " default:\n" ); fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject ) { if ( !g->superClassName.isEmpty() && !isTQObject ) {
fprintf( out, "\treturn %s::qt_invoke( _id, _o );\n", fprintf( out, "\treturn %s::tqt_invoke( _id, _o );\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
} else { } else {
fprintf( out, "\treturn FALSE;\n" ); fprintf( out, "\treturn FALSE;\n" );
@ -3307,7 +3307,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return TRUE;\n}\n" ); fprintf( out, " return TRUE;\n}\n" );
} else { } else {
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_invoke(_id,_o);\n}\n", fprintf( out, " return %s::tqt_invoke(_id,_o);\n}\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, " return FALSE;\n}\n" ); fprintf( out, " return FALSE;\n}\n" );
@ -3315,9 +3315,9 @@ void generateClass() // generate C++ source code for a class
// //
// Generate internal qt_emit() function // Generate internal tqt_emit() function
// //
fprintf( out, "\nbool %s::qt_emit( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_emit( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() );
if ( !g->signals.isEmpty() ) { if ( !g->signals.isEmpty() ) {
fprintf( out, " switch ( _id - staticMetaObject()->signalOffset() ) {\n" ); fprintf( out, " switch ( _id - staticMetaObject()->signalOffset() ) {\n" );
@ -3369,7 +3369,7 @@ void generateClass() // generate C++ source code for a class
} }
fprintf( out, " default:\n" ); fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, "\treturn %s::qt_emit(_id,_o);\n", fprintf( out, "\treturn %s::tqt_emit(_id,_o);\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, "\treturn FALSE;\n" ); fprintf( out, "\treturn FALSE;\n" );
@ -3377,7 +3377,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return TRUE;\n}\n" ); fprintf( out, " return TRUE;\n}\n" );
} else { } else {
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_emit(_id,_o);\n}\n", fprintf( out, " return %s::tqt_emit(_id,_o);\n}\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, " return FALSE;\n}\n" ); fprintf( out, " return FALSE;\n}\n" );
@ -3386,10 +3386,10 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "#ifndef QT_NO_PROPERTIES\n" ); fprintf( out, "#ifndef QT_NO_PROPERTIES\n" );
// //
// Generate internal qt_property() functions // Generate internal tqt_property() functions
// //
fprintf( out, "\nbool %s::qt_property( int id, int f, TQVariant* v)\n{\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_property( int id, int f, TQVariant* v)\n{\n", qualifiedClassName().data() );
if ( !g->props.isEmpty() ) { if ( !g->props.isEmpty() ) {
fprintf( out, " switch ( id - staticMetaObject()->propertyOffset() ) {\n" ); fprintf( out, " switch ( id - staticMetaObject()->propertyOffset() ) {\n" );
@ -3502,7 +3502,7 @@ void generateClass() // generate C++ source code for a class
} }
fprintf( out, " default:\n" ); fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, "\treturn %s::qt_property( id, f, v );\n", fprintf( out, "\treturn %s::tqt_property( id, f, v );\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, "\treturn FALSE;\n" ); fprintf( out, "\treturn FALSE;\n" );
@ -3510,18 +3510,18 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return TRUE;\n" ); fprintf( out, " return TRUE;\n" );
if ( need_resolve ) if ( need_resolve )
fprintf( out, "resolve:\n return %s::qt_property( staticMetaObject()->resolveProperty(id), f, v );\n", fprintf( out, "resolve:\n return %s::tqt_property( staticMetaObject()->resolveProperty(id), f, v );\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
fprintf( out, "}\n" ); fprintf( out, "}\n" );
} else { } else {
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_property( id, f, v);\n}\n", fprintf( out, " return %s::tqt_property( id, f, v);\n}\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, " return FALSE;\n}\n" ); fprintf( out, " return FALSE;\n}\n" );
} }
fprintf( out, "\nbool %s::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }\n", qualifiedClassName().data() );
fprintf( out, "#endif // QT_NO_PROPERTIES\n" ); fprintf( out, "#endif // QT_NO_PROPERTIES\n" );
} }

@ -4642,7 +4642,7 @@ int main( int argc, char **argv )
return ret; return ret;
} }
#else #else
bool qt_is_gui_used = FALSE; bool tqt_is_gui_used = FALSE;
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@ -5145,7 +5145,7 @@ char *straddSpc( const char *s1, const char *s2,
/* /*
We call B::qt_invoke() rather than A::B::qt_invoke() to We call B::tqt_invoke() rather than A::B::tqt_invoke() to
work around a bug in MSVC 6. The bug occurs if the work around a bug in MSVC 6. The bug occurs if the
super-class is in a namespace and the sub-class isn't. super-class is in a namespace and the sub-class isn't.
@ -5891,7 +5891,7 @@ void generateClass() // generate C++ source code for a class
// //
// Generate smart cast function // Generate smart cast function
// //
fprintf( out, "\nvoid* %s::qt_cast( const char* clname )\n{\n", fprintf( out, "\nvoid* %s::tqt_cast( const char* clname )\n{\n",
(const char*)qualifiedClassName() ); (const char*)qualifiedClassName() );
fprintf( out, " if ( !qstrcmp( clname, \"%s\" ) )\n" fprintf( out, " if ( !qstrcmp( clname, \"%s\" ) )\n"
"\treturn this;\n", "\treturn this;\n",
@ -5904,7 +5904,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "\treturn (%s*)this;\n", fixed.data()); fprintf( out, "\treturn (%s*)this;\n", fixed.data());
} }
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_cast( clname );\n", fprintf( out, " return %s::tqt_cast( clname );\n",
(const char*)purestSuperClassName() ); (const char*)purestSuperClassName() );
else else
fprintf( out, " return 0;\n" ); fprintf( out, " return 0;\n" );
@ -6060,9 +6060,9 @@ void generateClass() // generate C++ source code for a class
// //
// Generate internal qt_invoke() function // Generate internal tqt_invoke() function
// //
fprintf( out, "\nbool %s::qt_invoke( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_invoke( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() );
if( !g->slots.isEmpty() ) { if( !g->slots.isEmpty() ) {
fprintf( out, " switch ( _id - staticMetaObject()->slotOffset() ) {\n" ); fprintf( out, " switch ( _id - staticMetaObject()->slotOffset() ) {\n" );
@ -6124,7 +6124,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " default:\n" ); fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject ) { if ( !g->superClassName.isEmpty() && !isTQObject ) {
fprintf( out, "\treturn %s::qt_invoke( _id, _o );\n", fprintf( out, "\treturn %s::tqt_invoke( _id, _o );\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
} else { } else {
fprintf( out, "\treturn FALSE;\n" ); fprintf( out, "\treturn FALSE;\n" );
@ -6133,7 +6133,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return TRUE;\n}\n" ); fprintf( out, " return TRUE;\n}\n" );
} else { } else {
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_invoke(_id,_o);\n}\n", fprintf( out, " return %s::tqt_invoke(_id,_o);\n}\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, " return FALSE;\n}\n" ); fprintf( out, " return FALSE;\n}\n" );
@ -6141,9 +6141,9 @@ void generateClass() // generate C++ source code for a class
// //
// Generate internal qt_emit() function // Generate internal tqt_emit() function
// //
fprintf( out, "\nbool %s::qt_emit( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_emit( int _id, TQUObject* _o )\n{\n", qualifiedClassName().data() );
if ( !g->signals.isEmpty() ) { if ( !g->signals.isEmpty() ) {
fprintf( out, " switch ( _id - staticMetaObject()->signalOffset() ) {\n" ); fprintf( out, " switch ( _id - staticMetaObject()->signalOffset() ) {\n" );
@ -6195,7 +6195,7 @@ void generateClass() // generate C++ source code for a class
} }
fprintf( out, " default:\n" ); fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, "\treturn %s::qt_emit(_id,_o);\n", fprintf( out, "\treturn %s::tqt_emit(_id,_o);\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, "\treturn FALSE;\n" ); fprintf( out, "\treturn FALSE;\n" );
@ -6203,7 +6203,7 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return TRUE;\n}\n" ); fprintf( out, " return TRUE;\n}\n" );
} else { } else {
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_emit(_id,_o);\n}\n", fprintf( out, " return %s::tqt_emit(_id,_o);\n}\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, " return FALSE;\n}\n" ); fprintf( out, " return FALSE;\n}\n" );
@ -6212,10 +6212,10 @@ void generateClass() // generate C++ source code for a class
fprintf( out, "#ifndef QT_NO_PROPERTIES\n" ); fprintf( out, "#ifndef QT_NO_PROPERTIES\n" );
// //
// Generate internal qt_property() functions // Generate internal tqt_property() functions
// //
fprintf( out, "\nbool %s::qt_property( int id, int f, TQVariant* v)\n{\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_property( int id, int f, TQVariant* v)\n{\n", qualifiedClassName().data() );
if ( !g->props.isEmpty() ) { if ( !g->props.isEmpty() ) {
fprintf( out, " switch ( id - staticMetaObject()->propertyOffset() ) {\n" ); fprintf( out, " switch ( id - staticMetaObject()->propertyOffset() ) {\n" );
@ -6328,7 +6328,7 @@ void generateClass() // generate C++ source code for a class
} }
fprintf( out, " default:\n" ); fprintf( out, " default:\n" );
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, "\treturn %s::qt_property( id, f, v );\n", fprintf( out, "\treturn %s::tqt_property( id, f, v );\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, "\treturn FALSE;\n" ); fprintf( out, "\treturn FALSE;\n" );
@ -6336,18 +6336,18 @@ void generateClass() // generate C++ source code for a class
fprintf( out, " return TRUE;\n" ); fprintf( out, " return TRUE;\n" );
if ( need_resolve ) if ( need_resolve )
fprintf( out, "resolve:\n return %s::qt_property( staticMetaObject()->resolveProperty(id), f, v );\n", fprintf( out, "resolve:\n return %s::tqt_property( staticMetaObject()->resolveProperty(id), f, v );\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
fprintf( out, "}\n" ); fprintf( out, "}\n" );
} else { } else {
if ( !g->superClassName.isEmpty() && !isTQObject ) if ( !g->superClassName.isEmpty() && !isTQObject )
fprintf( out, " return %s::qt_property( id, f, v);\n}\n", fprintf( out, " return %s::tqt_property( id, f, v);\n}\n",
(const char *) purestSuperClassName() ); (const char *) purestSuperClassName() );
else else
fprintf( out, " return FALSE;\n}\n" ); fprintf( out, " return FALSE;\n}\n" );
} }
fprintf( out, "\nbool %s::qt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }\n", qualifiedClassName().data() ); fprintf( out, "\nbool %s::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; }\n", qualifiedClassName().data() );
fprintf( out, "#endif // QT_NO_PROPERTIES\n" ); fprintf( out, "#endif // QT_NO_PROPERTIES\n" );
} }

@ -1674,7 +1674,7 @@ void TQCommonStyle::drawComplexControl( ComplexControl control,
down = active & SC_TitleBarCloseButton; down = active & SC_TitleBarCloseButton;
if ( widget->testWFlags( WStyle_Tool ) if ( widget->testWFlags( WStyle_Tool )
#ifndef QT_NO_MAINWINDOW #ifndef QT_NO_MAINWINDOW
|| ::qt_cast<TQDockWindow*>(widget) || ::tqt_cast<TQDockWindow*>(widget)
#endif #endif
) )
pm = stylePixmap(SP_DockWindowCloseButton, widget); pm = stylePixmap(SP_DockWindowCloseButton, widget);
@ -2254,7 +2254,7 @@ int TQCommonStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
if ( widget->testWFlags( WStyle_Tool ) ) { if ( widget->testWFlags( WStyle_Tool ) ) {
ret = TQMAX( widget->fontMetrics().lineSpacing(), 16 ); ret = TQMAX( widget->fontMetrics().lineSpacing(), 16 );
#ifndef QT_NO_MAINWINDOW #ifndef QT_NO_MAINWINDOW
} else if ( ::qt_cast<TQDockWindow*>(widget) ) { } else if ( ::tqt_cast<TQDockWindow*>(widget) ) {
ret = TQMAX( widget->fontMetrics().lineSpacing(), 13 ); ret = TQMAX( widget->fontMetrics().lineSpacing(), 13 );
#endif #endif
} else { } else {

@ -179,24 +179,24 @@ void TQMotifPlusStyle::polish(TQPalette &)
void TQMotifPlusStyle::polish(TQWidget *widget) void TQMotifPlusStyle::polish(TQWidget *widget)
{ {
#ifndef QT_NO_FRAME #ifndef QT_NO_FRAME
if (::qt_cast<TQFrame*>(widget) && ((TQFrame *) widget)->frameStyle() == TQFrame::Panel) if (::tqt_cast<TQFrame*>(widget) && ((TQFrame *) widget)->frameStyle() == TQFrame::Panel)
((TQFrame *) widget)->setFrameStyle(TQFrame::WinPanel); ((TQFrame *) widget)->setFrameStyle(TQFrame::WinPanel);
#endif #endif
#ifndef QT_NO_MENUBAR #ifndef QT_NO_MENUBAR
if (::qt_cast<TQMenuBar*>(widget) && ((TQMenuBar *) widget)->frameStyle() != TQFrame::NoFrame) if (::tqt_cast<TQMenuBar*>(widget) && ((TQMenuBar *) widget)->frameStyle() != TQFrame::NoFrame)
((TQMenuBar *) widget)->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised); ((TQMenuBar *) widget)->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised);
#endif #endif
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
if (::qt_cast<TQToolBar*>(widget)) if (::tqt_cast<TQToolBar*>(widget))
widget->layout()->setMargin(2); widget->layout()->setMargin(2);
#endif #endif
if (useHoveringHighlight) { if (useHoveringHighlight) {
if (::qt_cast<TQButton*>(widget) || ::qt_cast<TQComboBox*>(widget)) if (::tqt_cast<TQButton*>(widget) || ::tqt_cast<TQComboBox*>(widget))
widget->installEventFilter(this); widget->installEventFilter(this);
if (::qt_cast<TQScrollBar*>(widget) || ::qt_cast<TQSlider*>(widget)) { if (::tqt_cast<TQScrollBar*>(widget) || ::tqt_cast<TQSlider*>(widget)) {
widget->setMouseTracking(TRUE); widget->setMouseTracking(TRUE);
widget->installEventFilter(this); widget->installEventFilter(this);
} }
@ -1493,7 +1493,7 @@ bool TQMotifPlusStyle::eventFilter(TQObject *object, TQEvent *event)
{ {
singleton->mousePressed = TRUE; singleton->mousePressed = TRUE;
if (!::qt_cast<TQSlider*>(object)) if (!::tqt_cast<TQSlider*>(object))
break; break;
singleton->sliderActive = TRUE; singleton->sliderActive = TRUE;
@ -1504,7 +1504,7 @@ bool TQMotifPlusStyle::eventFilter(TQObject *object, TQEvent *event)
{ {
singleton->mousePressed = FALSE; singleton->mousePressed = FALSE;
if (!::qt_cast<TQSlider*>(object)) if (!::tqt_cast<TQSlider*>(object))
break; break;
singleton->sliderActive = FALSE; singleton->sliderActive = FALSE;
@ -1541,7 +1541,7 @@ bool TQMotifPlusStyle::eventFilter(TQObject *object, TQEvent *event)
if (! object->isWidgetType() || object != singleton->hoverWidget) if (! object->isWidgetType() || object != singleton->hoverWidget)
break; break;
if (!::qt_cast<TQScrollBar*>(object) && ! ::qt_cast<TQSlider*>(object)) if (!::tqt_cast<TQScrollBar*>(object) && ! ::tqt_cast<TQSlider*>(object))
break; break;
singleton->mousePos = ((TQMouseEvent *) event)->pos(); singleton->mousePos = ((TQMouseEvent *) event)->pos();

@ -214,7 +214,7 @@ TQSGIStyle::polish( TQWidget* w )
sgiPal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, sgiPal.disabled().base() ); sgiPal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, sgiPal.disabled().base() );
} }
if ( ::qt_cast<TQLineEdit*>(w) || ::qt_cast<TQTextEdit*>(w) ) { if ( ::tqt_cast<TQLineEdit*>(w) || ::tqt_cast<TQTextEdit*>(w) ) {
// different basecolor and highlighting in Q(Multi)LineEdit // different basecolor and highlighting in Q(Multi)LineEdit
sgiPal.setColor( TQColorGroup::Base, TQColor(211,181,181) ); sgiPal.setColor( TQColorGroup::Base, TQColor(211,181,181) );
sgiPal.setColor( TQPalette::Active, TQColorGroup::Highlight, sgiPal.active().midlight() ); sgiPal.setColor( TQPalette::Active, TQColorGroup::Highlight, sgiPal.active().midlight() );
@ -224,27 +224,27 @@ TQSGIStyle::polish( TQWidget* w )
sgiPal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, sgiPal.disabled().midlight() ); sgiPal.setColor( TQPalette::Disabled, TQColorGroup::Highlight, sgiPal.disabled().midlight() );
sgiPal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, sgiPal.disabled().text() ); sgiPal.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, sgiPal.disabled().text() );
} else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQToolBar*>(w) ) { } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQToolBar*>(w) ) {
sgiPal.setColor( TQColorGroup::Button, sgiPal.active().midlight() ); sgiPal.setColor( TQColorGroup::Button, sgiPal.active().midlight() );
} }
w->setPalette( sgiPal ); w->setPalette( sgiPal );
} }
if ( ::qt_cast<TQButton*>(w) || ::qt_cast<TQSlider*>(w) || ::qt_cast<TQScrollBar*>(w) ) { if ( ::tqt_cast<TQButton*>(w) || ::tqt_cast<TQSlider*>(w) || ::tqt_cast<TQScrollBar*>(w) ) {
w->installEventFilter( this ); w->installEventFilter( this );
w->setMouseTracking( TRUE ); w->setMouseTracking( TRUE );
#ifndef QT_NO_SCROLLBAR #ifndef QT_NO_SCROLLBAR
if ( ::qt_cast<TQScrollBar*>(w) ) if ( ::tqt_cast<TQScrollBar*>(w) )
w->setBackgroundMode( TQWidget::NoBackground ); w->setBackgroundMode( TQWidget::NoBackground );
#endif #endif
} else if ( ::qt_cast<TQComboBox*>(w) ) { } else if ( ::tqt_cast<TQComboBox*>(w) ) {
TQFont f = TQApplication::font(); TQFont f = TQApplication::font();
f.setBold( TRUE ); f.setBold( TRUE );
f.setItalic( TRUE ); f.setItalic( TRUE );
w->setFont( f ); w->setFont( f );
#ifndef QT_NO_MENUBAR #ifndef QT_NO_MENUBAR
} else if ( ::qt_cast<TQMenuBar*>(w) ) { } else if ( ::tqt_cast<TQMenuBar*>(w) ) {
((TQFrame*) w)->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised); ((TQFrame*) w)->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised);
w->setBackgroundMode( TQWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
TQFont f = TQApplication::font(); TQFont f = TQApplication::font();
@ -253,14 +253,14 @@ TQSGIStyle::polish( TQWidget* w )
w->setFont( f ); w->setFont( f );
#endif #endif
#ifndef QT_NO_POPUPMENU #ifndef QT_NO_POPUPMENU
} else if ( ::qt_cast<TQPopupMenu*>(w) ) { } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
((TQFrame*) w)->setLineWidth( pixelMetric( PM_DefaultFrameWidth ) + 1 ); ((TQFrame*) w)->setLineWidth( pixelMetric( PM_DefaultFrameWidth ) + 1 );
TQFont f = TQApplication::font(); TQFont f = TQApplication::font();
f.setBold( TRUE ); f.setBold( TRUE );
f.setItalic( TRUE ); f.setItalic( TRUE );
w->setFont( f ); w->setFont( f );
#endif #endif
} else if ( ::qt_cast<TQToolBar*>(w) || w->inherits("TQToolBarSeparator") ) { } else if ( ::tqt_cast<TQToolBar*>(w) || w->inherits("TQToolBarSeparator") ) {
w->setBackgroundMode( TQWidget::PaletteBackground ); w->setBackgroundMode( TQWidget::PaletteBackground );
} }
} }
@ -269,15 +269,15 @@ TQSGIStyle::polish( TQWidget* w )
void void
TQSGIStyle::unPolish( TQWidget* w ) TQSGIStyle::unPolish( TQWidget* w )
{ {
if ( ::qt_cast<TQButton*>(w) || ::qt_cast<TQSlider*>(w) || ::qt_cast<TQScrollBar*>(w) ) { if ( ::tqt_cast<TQButton*>(w) || ::tqt_cast<TQSlider*>(w) || ::tqt_cast<TQScrollBar*>(w) ) {
w->removeEventFilter( this ); w->removeEventFilter( this );
#ifndef QT_NO_POPUPMENU #ifndef QT_NO_POPUPMENU
} else if ( ::qt_cast<TQPopupMenu*>(w) ) { } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
((TQFrame*)w)->setLineWidth( pixelMetric( PM_DefaultFrameWidth ) ); ((TQFrame*)w)->setLineWidth( pixelMetric( PM_DefaultFrameWidth ) );
w->setFont( TQApplication::font() ); w->setFont( TQApplication::font() );
#endif #endif
#if !defined(QT_NO_MENUBAR) || !defined(QT_NO_COMBOBOX) #if !defined(QT_NO_MENUBAR) || !defined(QT_NO_COMBOBOX)
} else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQComboBox*>(w) ) { } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQComboBox*>(w) ) {
w->setFont( TQApplication::font() ); w->setFont( TQApplication::font() );
#endif #endif
} }
@ -295,7 +295,7 @@ bool TQSGIStyle::eventFilter( TQObject* o, TQEvent* e )
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
{ {
#ifndef QT_NO_SCROLLBAR #ifndef QT_NO_SCROLLBAR
if ( ::qt_cast<TQScrollBar*>(widget) ) { if ( ::tqt_cast<TQScrollBar*>(widget) ) {
d->lastScrollbarRect.rect = ((TQScrollBar*)widget)->sliderRect(); d->lastScrollbarRect.rect = ((TQScrollBar*)widget)->sliderRect();
d->lastScrollbarRect.scrollbar = ((TQScrollBar*)widget); d->lastScrollbarRect.scrollbar = ((TQScrollBar*)widget);
widget->repaint( FALSE ); widget->repaint( FALSE );
@ -303,7 +303,7 @@ bool TQSGIStyle::eventFilter( TQObject* o, TQEvent* e )
#endif #endif
{ {
#ifndef QT_NO_SLIDER #ifndef QT_NO_SLIDER
if ( ::qt_cast<TQSlider*>(widget) ) { if ( ::tqt_cast<TQSlider*>(widget) ) {
d->lastSliderRect.rect = ((TQSlider*)widget)->sliderRect(); d->lastSliderRect.rect = ((TQSlider*)widget)->sliderRect();
d->lastSliderRect.slider = ((TQSlider*)widget); d->lastSliderRect.slider = ((TQSlider*)widget);
widget->repaint( FALSE ); widget->repaint( FALSE );
@ -317,13 +317,13 @@ bool TQSGIStyle::eventFilter( TQObject* o, TQEvent* e )
{ {
if ( 0 ) { if ( 0 ) {
#ifndef QT_NO_SCROLLBAR #ifndef QT_NO_SCROLLBAR
} else if ( ::qt_cast<TQScrollBar*>(widget) ) { } else if ( ::tqt_cast<TQScrollBar*>(widget) ) {
TQRect oldRect = d->lastScrollbarRect.rect; TQRect oldRect = d->lastScrollbarRect.rect;
d->lastScrollbarRect.rect = TQRect( 0, -1, 0, -1 ); d->lastScrollbarRect.rect = TQRect( 0, -1, 0, -1 );
widget->repaint( oldRect, FALSE ); widget->repaint( oldRect, FALSE );
#endif #endif
#ifndef QT_NO_SLIDER #ifndef QT_NO_SLIDER
} else if ( ::qt_cast<TQSlider*>(widget) ) { } else if ( ::tqt_cast<TQSlider*>(widget) ) {
TQRect oldRect = d->lastSliderRect.rect; TQRect oldRect = d->lastSliderRect.rect;
d->lastSliderRect.rect = TQRect( 0, -1, 0, -1 ); d->lastSliderRect.rect = TQRect( 0, -1, 0, -1 );
widget->repaint( oldRect, FALSE ); widget->repaint( oldRect, FALSE );

@ -129,7 +129,7 @@ bool TQWindowsStyle::Private::eventFilter(TQObject *o, TQEvent *e)
if (!o->isWidgetType()) if (!o->isWidgetType())
return TQObject::eventFilter(o, e); return TQObject::eventFilter(o, e);
TQWidget *widget = ::qt_cast<TQWidget*>(o); TQWidget *widget = ::tqt_cast<TQWidget*>(o);
switch(e->type()) { switch(e->type()) {
case TQEvent::KeyPress: case TQEvent::KeyPress:
@ -179,7 +179,7 @@ bool TQWindowsStyle::Private::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::FocusOut: case TQEvent::FocusOut:
{ {
// Menubars toggle based on focus // Menubars toggle based on focus
TQMenuBar *menuBar = ::qt_cast<TQMenuBar*>(o); TQMenuBar *menuBar = ::tqt_cast<TQMenuBar*>(o);
if (menuBar && !menuBarTimer) // delayed repaint to avoid flicker if (menuBar && !menuBarTimer) // delayed repaint to avoid flicker
menuBarTimer = menuBar->startTimer(0); menuBarTimer = menuBar->startTimer(0);
} }
@ -191,7 +191,7 @@ bool TQWindowsStyle::Private::eventFilter(TQObject *o, TQEvent *e)
break; break;
case TQEvent::Timer: case TQEvent::Timer:
{ {
TQMenuBar *menuBar = ::qt_cast<TQMenuBar*>(o); TQMenuBar *menuBar = ::tqt_cast<TQMenuBar*>(o);
TQTimerEvent *te = (TQTimerEvent*)e; TQTimerEvent *te = (TQTimerEvent*)e;
if (menuBar && te->timerId() == menuBarTimer) { if (menuBar && te->timerId() == menuBarTimer) {
menuBar->killTimer(te->timerId()); menuBar->killTimer(te->timerId());
@ -1116,7 +1116,7 @@ int TQWindowsStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) cons
#if defined(Q_WS_WIN) #if defined(Q_WS_WIN)
case PM_TitleBarHeight: case PM_TitleBarHeight:
if ( widget && ( widget->testWFlags( WStyle_Tool ) || ::qt_cast<TQDockWindow*>(widget) ) ) { if ( widget && ( widget->testWFlags( WStyle_Tool ) || ::tqt_cast<TQDockWindow*>(widget) ) ) {
// MS always use one less than they say // MS always use one less than they say
#if defined(Q_OS_TEMP) #if defined(Q_OS_TEMP)
ret = GetSystemMetrics( SM_CYCAPTION ) - 1; ret = GetSystemMetrics( SM_CYCAPTION ) - 1;
@ -2084,10 +2084,10 @@ int TQWindowsStyle::styleHint( StyleHint hint,
ret = cues ? 1 : 0; ret = cues ? 1 : 0;
// Do nothing if we always paint underlines // Do nothing if we always paint underlines
if (!ret && widget && d) { if (!ret && widget && d) {
TQMenuBar *menuBar = ::qt_cast<TQMenuBar*>(widget); TQMenuBar *menuBar = ::tqt_cast<TQMenuBar*>(widget);
TQPopupMenu *popupMenu = 0; TQPopupMenu *popupMenu = 0;
if (!menuBar) if (!menuBar)
popupMenu = ::qt_cast<TQPopupMenu*>(widget); popupMenu = ::tqt_cast<TQPopupMenu*>(widget);
// If we paint a menubar draw underlines if it has focus, or if alt is down, // If we paint a menubar draw underlines if it has focus, or if alt is down,
// or if a popup menu belonging to the menubar is active and paints underlines // or if a popup menu belonging to the menubar is active and paints underlines
@ -2097,8 +2097,8 @@ int TQWindowsStyle::styleHint( StyleHint hint,
} else if (d->altDown()) { } else if (d->altDown()) {
ret = 1; ret = 1;
} else if (tqApp->focusWidget() && tqApp->focusWidget()->isPopup()) { } else if (tqApp->focusWidget() && tqApp->focusWidget()->isPopup()) {
popupMenu = ::qt_cast<TQPopupMenu*>(tqApp->focusWidget()); popupMenu = ::tqt_cast<TQPopupMenu*>(tqApp->focusWidget());
TQMenuData *pm = popupMenu ? (TQMenuData*)popupMenu->qt_cast("TQMenuData") : 0; TQMenuData *pm = popupMenu ? (TQMenuData*)popupMenu->tqt_cast("TQMenuData") : 0;
if (pm && ((FriendlyMenuData*)pm)->parentMenu == menuBar) { if (pm && ((FriendlyMenuData*)pm)->parentMenu == menuBar) {
if (d->hasSeenAlt(menuBar)) if (d->hasSeenAlt(menuBar))
ret = 1; ret = 1;
@ -2106,7 +2106,7 @@ int TQWindowsStyle::styleHint( StyleHint hint,
} }
// If we paint a popup menu draw underlines if the respective menubar does // If we paint a popup menu draw underlines if the respective menubar does
} else if (popupMenu) { } else if (popupMenu) {
TQMenuData *pm = (TQMenuData*)popupMenu->qt_cast("TQMenuData"); TQMenuData *pm = (TQMenuData*)popupMenu->tqt_cast("TQMenuData");
while (pm) { while (pm) {
if (((FriendlyMenuData*)pm)->isMenuBar) { if (((FriendlyMenuData*)pm)->isMenuBar) {
menuBar = (TQMenuBar*)pm; menuBar = (TQMenuBar*)pm;

@ -819,7 +819,7 @@ a TQLineEdit you will need to reimplement this function.
void TQTableItem::setContentFromEditor( TQWidget *w ) void TQTableItem::setContentFromEditor( TQWidget *w )
{ {
TQLineEdit *le = ::qt_cast<TQLineEdit*>(w); TQLineEdit *le = ::tqt_cast<TQLineEdit*>(w);
if ( le ) { if ( le ) {
TQString input = le->text(); TQString input = le->text();
if ( le->validator() ) if ( le->validator() )
@ -1280,7 +1280,7 @@ TQWidget *TQComboTableItem::createEditor() const
void TQComboTableItem::setContentFromEditor( TQWidget *w ) void TQComboTableItem::setContentFromEditor( TQWidget *w )
{ {
TQComboBox *cb = ::qt_cast<TQComboBox*>(w); TQComboBox *cb = ::tqt_cast<TQComboBox*>(w);
if ( cb ) { if ( cb ) {
entries.clear(); entries.clear();
for ( int i = 0; i < cb->count(); ++i ) for ( int i = 0; i < cb->count(); ++i )
@ -1326,7 +1326,7 @@ void TQComboTableItem::paint( TQPainter *p, const TQColorGroup &cg,
void TQComboTableItem::setCurrentItem( int i ) void TQComboTableItem::setCurrentItem( int i )
{ {
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQComboBox *cb = ::qt_cast<TQComboBox*>(w); TQComboBox *cb = ::tqt_cast<TQComboBox*>(w);
if ( cb ) { if ( cb ) {
cb->setCurrentItem( i ); cb->setCurrentItem( i );
current = i; current = i;
@ -1363,7 +1363,7 @@ void TQComboTableItem::setCurrentItem( const TQString &s )
int TQComboTableItem::currentItem() const int TQComboTableItem::currentItem() const
{ {
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQComboBox *cb = ::qt_cast<TQComboBox*>(w); TQComboBox *cb = ::tqt_cast<TQComboBox*>(w);
if ( cb ) if ( cb )
return cb->currentItem(); return cb->currentItem();
return current; return current;
@ -1378,7 +1378,7 @@ int TQComboTableItem::currentItem() const
TQString TQComboTableItem::currentText() const TQString TQComboTableItem::currentText() const
{ {
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQComboBox *cb = ::qt_cast<TQComboBox*>(w); TQComboBox *cb = ::tqt_cast<TQComboBox*>(w);
if ( cb ) if ( cb )
return cb->currentText(); return cb->currentText();
return *entries.at( current ); return *entries.at( current );
@ -1391,7 +1391,7 @@ TQString TQComboTableItem::currentText() const
int TQComboTableItem::count() const int TQComboTableItem::count() const
{ {
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQComboBox *cb = ::qt_cast<TQComboBox*>(w); TQComboBox *cb = ::tqt_cast<TQComboBox*>(w);
if ( cb ) if ( cb )
return cb->count(); return cb->count();
return (int)entries.count(); //### size_t/int cast return (int)entries.count(); //### size_t/int cast
@ -1406,7 +1406,7 @@ int TQComboTableItem::count() const
TQString TQComboTableItem::text( int i ) const TQString TQComboTableItem::text( int i ) const
{ {
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQComboBox *cb = ::qt_cast<TQComboBox*>(w); TQComboBox *cb = ::tqt_cast<TQComboBox*>(w);
if ( cb ) if ( cb )
return cb->text( i ); return cb->text( i );
return *entries.at( i ); return *entries.at( i );
@ -1523,7 +1523,7 @@ void TQCheckTableItem::setText( const TQString &t )
{ {
TQTableItem::setText( t ); TQTableItem::setText( t );
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQCheckBox *cb = ::qt_cast<TQCheckBox*>(w); TQCheckBox *cb = ::tqt_cast<TQCheckBox*>(w);
if ( cb ) if ( cb )
cb->setText( t ); cb->setText( t );
} }
@ -1546,7 +1546,7 @@ TQWidget *TQCheckTableItem::createEditor() const
void TQCheckTableItem::setContentFromEditor( TQWidget *w ) void TQCheckTableItem::setContentFromEditor( TQWidget *w )
{ {
TQCheckBox *cb = ::qt_cast<TQCheckBox*>(w); TQCheckBox *cb = ::tqt_cast<TQCheckBox*>(w);
if ( cb ) if ( cb )
checked = cb->isChecked(); checked = cb->isChecked();
} }
@ -1599,7 +1599,7 @@ void TQCheckTableItem::setChecked( bool b )
checked = b; checked = b;
table()->updateCell( row(), col() ); table()->updateCell( row(), col() );
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQCheckBox *cb = ::qt_cast<TQCheckBox*>(w); TQCheckBox *cb = ::tqt_cast<TQCheckBox*>(w);
if ( cb ) if ( cb )
cb->setChecked( b ); cb->setChecked( b );
} }
@ -1618,7 +1618,7 @@ bool TQCheckTableItem::isChecked() const
// #### and end up in an infinite loop that way // #### and end up in an infinite loop that way
// table()->updateCell( row(), col() ); // table()->updateCell( row(), col() );
TQWidget *w = table()->cellWidget( row(), col() ); TQWidget *w = table()->cellWidget( row(), col() );
TQCheckBox *cb = ::qt_cast<TQCheckBox*>(w); TQCheckBox *cb = ::tqt_cast<TQCheckBox*>(w);
if ( cb ) if ( cb )
return cb->isChecked(); return cb->isChecked();
return checked; return checked;
@ -3591,7 +3591,7 @@ void TQTable::selectRow( int row )
return; return;
bool isDataTable = FALSE; bool isDataTable = FALSE;
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
isDataTable = ::qt_cast<TQDataTable*>(this) != 0; isDataTable = ::tqt_cast<TQDataTable*>(this) != 0;
#endif #endif
if ( isDataTable || selectionMode() == SingleRow ) { if ( isDataTable || selectionMode() == SingleRow ) {
setCurrentCell( row, currentColumn() ); setCurrentCell( row, currentColumn() );
@ -3701,7 +3701,7 @@ void TQTable::contentsMousePressEventEx( TQMouseEvent* e )
TQTableItem *itm = item( tmpRow, tmpCol ); TQTableItem *itm = item( tmpRow, tmpCol );
if ( itm && itm->editType() == TQTableItem::WhenCurrent ) { if ( itm && itm->editType() == TQTableItem::WhenCurrent ) {
TQWidget *w = cellWidget( tmpRow, tmpCol ); TQWidget *w = cellWidget( tmpRow, tmpCol );
if ( ::qt_cast<TQComboBox*>(w) || ::qt_cast<TQButton*>(w) ) { if ( ::tqt_cast<TQComboBox*>(w) || ::tqt_cast<TQButton*>(w) ) {
TQMouseEvent ev( e->type(), w->mapFromGlobal( e->globalPos() ), TQMouseEvent ev( e->type(), w->mapFromGlobal( e->globalPos() ),
e->globalPos(), e->button(), e->state() ); e->globalPos(), e->button(), e->state() );
TQApplication::sendPostedEvents( w, 0 ); TQApplication::sendPostedEvents( w, 0 );
@ -5210,7 +5210,7 @@ void TQTable::setCellContentFromEditor( int row, int col )
if ( i ) { if ( i ) {
i->setContentFromEditor( editor ); i->setContentFromEditor( editor );
} else { } else {
TQLineEdit *le = ::qt_cast<TQLineEdit*>(editor); TQLineEdit *le = ::tqt_cast<TQLineEdit*>(editor);
if ( le ) if ( le )
setText( row, col, le->text() ); setText( row, col, le->text() );
} }

@ -450,10 +450,10 @@ static const int QT_BUFFER_LENGTH = 8196; // internal buffer length
#include "qt_mac.h" #include "qt_mac.h"
extern bool qt_is_gui_used; extern bool tqt_is_gui_used;
static void mac_default_handler( const char *msg ) static void mac_default_handler( const char *msg )
{ {
if ( qt_is_gui_used ) { if ( tqt_is_gui_used ) {
const unsigned char *p = p_str(msg); const unsigned char *p = p_str(msg);
DebugStr(p); DebugStr(p);
free((void*)p); free((void*)p);

@ -220,18 +220,18 @@ TQActionPrivate::~TQActionPrivate()
++itci; ++itci;
TQComboBox* combo = ci->combo; TQComboBox* combo = ci->combo;
combo->clear(); combo->clear();
TQActionGroup *group = ::qt_cast<TQActionGroup*>(action->parent()); TQActionGroup *group = ::tqt_cast<TQActionGroup*>(action->parent());
TQObjectList *siblings = group ? group->queryList("TQAction") : 0; TQObjectList *siblings = group ? group->queryList("TQAction") : 0;
if (siblings) { if (siblings) {
TQObjectListIt it(*siblings); TQObjectListIt it(*siblings);
while (it.current()) { while (it.current()) {
TQAction *sib = ::qt_cast<TQAction*>(it.current()); TQAction *sib = ::tqt_cast<TQAction*>(it.current());
++it; ++it;
sib->removeFrom(combo); sib->removeFrom(combo);
} }
it = TQObjectListIt(*siblings); it = TQObjectListIt(*siblings);
while (it.current()) { while (it.current()) {
TQAction *sib = ::qt_cast<TQAction*>(it.current()); TQAction *sib = ::tqt_cast<TQAction*>(it.current());
++it; ++it;
if (sib == action) if (sib == action)
continue; continue;
@ -568,7 +568,7 @@ TQAction::TQAction( const TQString& text, const TQString& menuText, TQKeySequenc
*/ */
void TQAction::init() void TQAction::init()
{ {
if ( ::qt_cast<TQActionGroup*>(parent()) ) if ( ::tqt_cast<TQActionGroup*>(parent()) )
((TQActionGroup*) parent())->add( this ); // insert into action group ((TQActionGroup*) parent())->add( this ); // insert into action group
} }
@ -1008,7 +1008,7 @@ void TQAction::toolButtonToggled( bool on )
bool TQAction::addTo( TQWidget* w ) bool TQAction::addTo( TQWidget* w )
{ {
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
if ( ::qt_cast<TQToolBar*>(w) ) { if ( ::tqt_cast<TQToolBar*>(w) ) {
if ( !qstrcmp( name(), "qt_separator_action" ) ) { if ( !qstrcmp( name(), "qt_separator_action" ) ) {
((TQToolBar*)w)->addSeparator(); ((TQToolBar*)w)->addSeparator();
} else { } else {
@ -1030,7 +1030,7 @@ bool TQAction::addTo( TQWidget* w )
} }
} else } else
#endif #endif
if ( ::qt_cast<TQPopupMenu*>(w) ) { if ( ::tqt_cast<TQPopupMenu*>(w) ) {
TQActionPrivate::MenuItem* mi = new TQActionPrivate::MenuItem; TQActionPrivate::MenuItem* mi = new TQActionPrivate::MenuItem;
mi->popup = (TQPopupMenu*) w; mi->popup = (TQPopupMenu*) w;
TQIconSet* diconset = d->iconset; TQIconSet* diconset = d->iconset;
@ -1049,7 +1049,7 @@ bool TQAction::addTo( TQWidget* w )
connect( mi->popup, SIGNAL(aboutToHide()), this, SLOT(clearStatusText()) ); connect( mi->popup, SIGNAL(aboutToHide()), this, SLOT(clearStatusText()) );
connect( mi->popup, SIGNAL( destroyed() ), this, SLOT( objectDestroyed() ) ); connect( mi->popup, SIGNAL( destroyed() ), this, SLOT( objectDestroyed() ) );
// Makes only sense when called by TQActionGroup::addTo // Makes only sense when called by TQActionGroup::addTo
} else if ( ::qt_cast<TQComboBox*>(w) ) { } else if ( ::tqt_cast<TQComboBox*>(w) ) {
TQActionPrivate::ComboItem *ci = new TQActionPrivate::ComboItem; TQActionPrivate::ComboItem *ci = new TQActionPrivate::ComboItem;
ci->combo = (TQComboBox*)w; ci->combo = (TQComboBox*)w;
connect( ci->combo, SIGNAL( destroyed() ), this, SLOT( objectDestroyed() ) ); connect( ci->combo, SIGNAL( destroyed() ), this, SLOT( objectDestroyed() ) );
@ -1108,7 +1108,7 @@ void TQAction::showStatusText( const TQString& text )
static TQPopupMenu *lastmenu = 0; static TQPopupMenu *lastmenu = 0;
TQObject *s = (TQObject*)sender(); TQObject *s = (TQObject*)sender();
if ( s ) { if ( s ) {
TQPopupMenu *menu = (TQPopupMenu*)s->qt_cast( "TQPopupMenu" ); TQPopupMenu *menu = (TQPopupMenu*)s->tqt_cast( "TQPopupMenu" );
if ( menu && !!text ) if ( menu && !!text )
lastmenu = menu; lastmenu = menu;
else if ( menu && text.isEmpty() ) { else if ( menu && text.isEmpty() ) {
@ -1188,7 +1188,7 @@ void TQAction::clearStatusText()
bool TQAction::removeFrom( TQWidget* w ) bool TQAction::removeFrom( TQWidget* w )
{ {
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
if ( ::qt_cast<TQToolBar*>(w) ) { if ( ::tqt_cast<TQToolBar*>(w) ) {
TQPtrListIterator<TQToolButton> it( d->toolbuttons); TQPtrListIterator<TQToolButton> it( d->toolbuttons);
TQToolButton* btn; TQToolButton* btn;
while ( ( btn = it.current() ) ) { while ( ( btn = it.current() ) ) {
@ -1202,7 +1202,7 @@ bool TQAction::removeFrom( TQWidget* w )
} }
} else } else
#endif #endif
if ( ::qt_cast<TQPopupMenu*>(w) ) { if ( ::tqt_cast<TQPopupMenu*>(w) ) {
TQPtrListIterator<TQActionPrivate::MenuItem> it( d->menuitems); TQPtrListIterator<TQActionPrivate::MenuItem> it( d->menuitems);
TQActionPrivate::MenuItem* mi; TQActionPrivate::MenuItem* mi;
while ( ( mi = it.current() ) ) { while ( ( mi = it.current() ) ) {
@ -1215,7 +1215,7 @@ bool TQAction::removeFrom( TQWidget* w )
d->menuitems.removeRef( mi ); d->menuitems.removeRef( mi );
} }
} }
} else if ( ::qt_cast<TQComboBox*>(w) ) { } else if ( ::tqt_cast<TQComboBox*>(w) ) {
TQPtrListIterator<TQActionPrivate::ComboItem> it( d->comboitems ); TQPtrListIterator<TQActionPrivate::ComboItem> it( d->comboitems );
TQActionPrivate::ComboItem *ci; TQActionPrivate::ComboItem *ci;
while ( ( ci = it.current() ) ) { while ( ( ci = it.current() ) ) {
@ -1347,7 +1347,7 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
} }
for ( TQPtrListIterator<TQActionGroupPrivate::MenuItem> pu( menuitems ); pu.current(); ++pu ) { for ( TQPtrListIterator<TQActionGroupPrivate::MenuItem> pu( menuitems ); pu.current(); ++pu ) {
TQWidget* parent = pu.current()->popup->parentWidget(); TQWidget* parent = pu.current()->popup->parentWidget();
if ( ::qt_cast<TQPopupMenu*>(parent) ) { if ( ::tqt_cast<TQPopupMenu*>(parent) ) {
TQPopupMenu* ppopup = (TQPopupMenu*)parent; TQPopupMenu* ppopup = (TQPopupMenu*)parent;
ppopup->setItemEnabled( pu.current()->id, that->isEnabled() ); ppopup->setItemEnabled( pu.current()->id, that->isEnabled() );
ppopup->setItemVisible( pu.current()->id, that->isVisible() ); ppopup->setItemVisible( pu.current()->id, that->isVisible() );
@ -1357,7 +1357,7 @@ void TQActionGroupPrivate::update( const TQActionGroup* that )
} }
for ( TQPtrListIterator<TQPopupMenu> pm( popupmenus ); pm.current(); ++pm ) { for ( TQPtrListIterator<TQPopupMenu> pm( popupmenus ); pm.current(); ++pm ) {
TQPopupMenu *popup = pm.current(); TQPopupMenu *popup = pm.current();
TQPopupMenu *parent = ::qt_cast<TQPopupMenu*>(popup->parentWidget()); TQPopupMenu *parent = ::tqt_cast<TQPopupMenu*>(popup->parentWidget());
if ( !parent ) if ( !parent )
continue; continue;
@ -1654,7 +1654,7 @@ void TQActionGroup::addSeparator()
bool TQActionGroup::addTo( TQWidget* w ) bool TQActionGroup::addTo( TQWidget* w )
{ {
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
if ( ::qt_cast<TQToolBar*>(w) ) { if ( ::tqt_cast<TQToolBar*>(w) ) {
if ( d->dropdown ) { if ( d->dropdown ) {
if ( !d->exclusive ) { if ( !d->exclusive ) {
TQPtrListIterator<TQAction> it( d->actions); TQPtrListIterator<TQAction> it( d->actions);
@ -1737,7 +1737,7 @@ bool TQActionGroup::addTo( TQWidget* w )
} }
} else } else
#endif #endif
if ( ::qt_cast<TQPopupMenu*>(w) ) { if ( ::tqt_cast<TQPopupMenu*>(w) ) {
TQPopupMenu *popup; TQPopupMenu *popup;
if ( d->dropdown ) { if ( d->dropdown ) {
TQPopupMenu *menu = (TQPopupMenu*)w; TQPopupMenu *menu = (TQPopupMenu*)w;
@ -1791,7 +1791,7 @@ bool TQActionGroup::removeFrom( TQWidget* w )
} }
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
if ( ::qt_cast<TQToolBar*>(w) ) { if ( ::tqt_cast<TQToolBar*>(w) ) {
TQPtrListIterator<TQComboBox> cb( d->comboboxes ); TQPtrListIterator<TQComboBox> cb( d->comboboxes );
while( cb.current() ) { while( cb.current() ) {
TQComboBox *box = cb.current(); TQComboBox *box = cb.current();
@ -1808,7 +1808,7 @@ bool TQActionGroup::removeFrom( TQWidget* w )
} }
} else } else
#endif #endif
if ( ::qt_cast<TQPopupMenu*>(w) ) { if ( ::tqt_cast<TQPopupMenu*>(w) ) {
TQPtrListIterator<TQActionGroupPrivate::MenuItem> pu( d->menuitems ); TQPtrListIterator<TQActionGroupPrivate::MenuItem> pu( d->menuitems );
while ( pu.current() ) { while ( pu.current() ) {
TQActionGroupPrivate::MenuItem *mi = pu.current(); TQActionGroupPrivate::MenuItem *mi = pu.current();
@ -1959,7 +1959,7 @@ void TQActionGroup::childEvent( TQChildEvent *e )
if ( !e->removed() ) if ( !e->removed() )
return; return;
TQAction *action = ::qt_cast<TQAction*>(e->child()); TQAction *action = ::tqt_cast<TQAction*>(e->child());
if ( !action ) if ( !action )
return; return;

@ -391,7 +391,7 @@ TQButton::TQButton( TQWidget *parent, const char *name, WFlags f )
repeat = FALSE; // not in autorepeat mode repeat = FALSE; // not in autorepeat mode
d = 0; d = 0;
#ifndef QT_NO_BUTTONGROUP #ifndef QT_NO_BUTTONGROUP
if ( ::qt_cast<TQButtonGroup*>(parent) ) { if ( ::tqt_cast<TQButtonGroup*>(parent) ) {
setGroup((TQButtonGroup*)parent); setGroup((TQButtonGroup*)parent);
group()->insert( this ); // insert into button group group()->insert( this ); // insert into button group
} }
@ -705,7 +705,7 @@ void TQButton::keyPressEvent( TQKeyEvent *e )
case Key_Return: case Key_Return:
{ {
#ifndef QT_NO_PUSHBUTTON #ifndef QT_NO_PUSHBUTTON
TQPushButton *pb = (TQPushButton*)qt_cast( "TQPushButton" ); TQPushButton *pb = (TQPushButton*)tqt_cast( "TQPushButton" );
if ( pb && ( pb->autoDefault() || pb->isDefault() ) ) if ( pb && ( pb->autoDefault() || pb->isDefault() ) )
emit clicked(); emit clicked();
else else
@ -717,7 +717,7 @@ void TQButton::keyPressEvent( TQKeyEvent *e )
if ( !e->isAutoRepeat() ) { if ( !e->isAutoRepeat() ) {
setDown( TRUE ); setDown( TRUE );
#ifndef QT_NO_PUSHBUTTON #ifndef QT_NO_PUSHBUTTON
if ( ::qt_cast<TQPushButton*>(this) ) if ( ::tqt_cast<TQPushButton*>(this) )
emit pressed(); emit pressed();
else else
#endif #endif
@ -999,7 +999,7 @@ bool TQButton::isExclusiveToggle() const
#ifndef QT_NO_BUTTONGROUP #ifndef QT_NO_BUTTONGROUP
return group() && ( group()->isExclusive() || return group() && ( group()->isExclusive() ||
group()->isRadioButtonExclusive() && group()->isRadioButtonExclusive() &&
::qt_cast<TQRadioButton*>(this) ); ::tqt_cast<TQRadioButton*>(this) );
#else #else
return FALSE; return FALSE;
#endif #endif

@ -410,7 +410,7 @@ void TQButtonGroup::buttonClicked()
{ {
// introduce a TQButtonListIt if calling anything // introduce a TQButtonListIt if calling anything
int id = -1; int id = -1;
TQButton *bt = ::qt_cast<TQButton*>(sender()); // object that sent the signal TQButton *bt = ::tqt_cast<TQButton*>(sender()); // object that sent the signal
#if defined(QT_CHECK_NULL) #if defined(QT_CHECK_NULL)
Q_ASSERT( bt ); Q_ASSERT( bt );
#endif #endif
@ -436,19 +436,19 @@ void TQButtonGroup::buttonToggled( bool on )
// introduce a TQButtonListIt if calling anything // introduce a TQButtonListIt if calling anything
if ( !on || !excl_grp && !radio_excl ) if ( !on || !excl_grp && !radio_excl )
return; return;
TQButton *bt = ::qt_cast<TQButton*>(sender()); // object that sent the signal TQButton *bt = ::tqt_cast<TQButton*>(sender()); // object that sent the signal
#if defined(QT_CHECK_NULL) #if defined(QT_CHECK_NULL)
Q_ASSERT( bt ); Q_ASSERT( bt );
Q_ASSERT( bt->isToggleButton() ); Q_ASSERT( bt->isToggleButton() );
#endif #endif
if ( !excl_grp && !::qt_cast<TQRadioButton*>(bt) ) if ( !excl_grp && !::tqt_cast<TQRadioButton*>(bt) )
return; return;
TQButtonItem * i = buttons->first(); TQButtonItem * i = buttons->first();
bool hasTabFocus = FALSE; bool hasTabFocus = FALSE;
while( i != 0 && hasTabFocus == FALSE ) { while( i != 0 && hasTabFocus == FALSE ) {
if ( ( excl_grp || ::qt_cast<TQRadioButton*>(i->button) ) && if ( ( excl_grp || ::tqt_cast<TQRadioButton*>(i->button) ) &&
(i->button->focusPolicy() & TabFocus) ) (i->button->focusPolicy() & TabFocus) )
hasTabFocus = TRUE; hasTabFocus = TRUE;
i = buttons->next(); i = buttons->next();
@ -459,9 +459,9 @@ void TQButtonGroup::buttonToggled( bool on )
if ( bt != i->button && if ( bt != i->button &&
i->button->isToggleButton() && i->button->isToggleButton() &&
i->button->isOn() && i->button->isOn() &&
( excl_grp || ::qt_cast<TQRadioButton*>(i->button) ) ) ( excl_grp || ::tqt_cast<TQRadioButton*>(i->button) ) )
i->button->setOn( FALSE ); i->button->setOn( FALSE );
if ( ( excl_grp || ::qt_cast<TQRadioButton*>(i->button) ) && if ( ( excl_grp || ::tqt_cast<TQRadioButton*>(i->button) ) &&
i->button->isToggleButton() && i->button->isToggleButton() &&
hasTabFocus ) hasTabFocus )
i->button->setFocusPolicy( (FocusPolicy)(i->button->focusPolicy() & i->button->setFocusPolicy( (FocusPolicy)(i->button->focusPolicy() &
@ -572,12 +572,12 @@ void TQButtonGroup::moveFocus( int key )
i = buttons->next(); i = buttons->next();
} }
TQButton *buttoncand = ::qt_cast<TQButton*>(candidate); TQButton *buttoncand = ::tqt_cast<TQButton*>(candidate);
if ( buttoncand && ::qt_cast<TQButton*>(f) && if ( buttoncand && ::tqt_cast<TQButton*>(f) &&
((TQButton*)f)->isOn() && ((TQButton*)f)->isOn() &&
buttoncand->isToggleButton() && buttoncand->isToggleButton() &&
( isExclusive() || ( ::qt_cast<TQRadioButton*>(f) && ( isExclusive() || ( ::tqt_cast<TQRadioButton*>(f) &&
::qt_cast<TQRadioButton*>(candidate)))) { ::tqt_cast<TQRadioButton*>(candidate)))) {
if ( f->focusPolicy() & TabFocus ) { if ( f->focusPolicy() & TabFocus ) {
f->setFocusPolicy( (FocusPolicy)(f->focusPolicy() & ~TabFocus) ); f->setFocusPolicy( (FocusPolicy)(f->focusPolicy() & ~TabFocus) );
candidate->setFocusPolicy( (FocusPolicy)(candidate->focusPolicy()| candidate->setFocusPolicy( (FocusPolicy)(candidate->focusPolicy()|
@ -669,7 +669,7 @@ bool TQButtonGroup::event( TQEvent * e )
{ {
if ( e->type() == TQEvent::ChildInserted ) { if ( e->type() == TQEvent::ChildInserted ) {
TQChildEvent * ce = (TQChildEvent *) e; TQChildEvent * ce = (TQChildEvent *) e;
if ( radio_excl && ::qt_cast<TQRadioButton*>(ce->child()) ) { if ( radio_excl && ::tqt_cast<TQRadioButton*>(ce->child()) ) {
TQButton * button = (TQButton *) ce->child(); TQButton * button = (TQButton *) ce->child();
if ( button->isToggleButton() && !button->isOn() && if ( button->isToggleButton() && !button->isOn() &&
selected() && (selected()->focusPolicy() & TabFocus) != 0 ) selected() && (selected()->focusPolicy() & TabFocus) != 0 )

@ -423,7 +423,7 @@ public:
void enabledChange(bool notenabled) void enabledChange(bool notenabled)
{ {
TQDateEdit *de = ::qt_cast<TQDateEdit*>(parentWidget()); TQDateEdit *de = ::tqt_cast<TQDateEdit*>(parentWidget());
if (de && !notenabled) { if (de && !notenabled) {
setUpEnabled(de->date() < de->maxValue()); setUpEnabled(de->date() < de->maxValue());
setDownEnabled(de->date() > de->minValue()); setDownEnabled(de->date() > de->minValue());
@ -437,7 +437,7 @@ protected:
#ifndef QT_NO_WHEELEVENT #ifndef QT_NO_WHEELEVENT
void wheelEvent( TQWheelEvent *e ) void wheelEvent( TQWheelEvent *e )
{ {
TQDateTimeEditor *editor = (TQDateTimeEditor*)editWidget()->qt_cast( "TQDateTimeEditor" ); TQDateTimeEditor *editor = (TQDateTimeEditor*)editWidget()->tqt_cast( "TQDateTimeEditor" );
Q_ASSERT( editor ); Q_ASSERT( editor );
if ( !editor ) if ( !editor )
return; return;
@ -608,9 +608,9 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
cw->stepDown(); cw->stepDown();
return TRUE; return TRUE;
case Key_Backspace: case Key_Backspace:
if ( ::qt_cast<TQDateEdit*>(cw) ) if ( ::tqt_cast<TQDateEdit*>(cw) )
((TQDateEdit*)cw)->removeFirstNumber( d->focusSection() ); ((TQDateEdit*)cw)->removeFirstNumber( d->focusSection() );
else if ( ::qt_cast<TQTimeEdit*>(cw) ) else if ( ::tqt_cast<TQTimeEdit*>(cw) )
((TQTimeEdit*)cw)->removeFirstNumber( d->focusSection() ); ((TQTimeEdit*)cw)->removeFirstNumber( d->focusSection() );
return TRUE; return TRUE;
case Key_Delete: case Key_Delete:
@ -624,15 +624,15 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
TQWidget *w = this; TQWidget *w = this;
bool hadDateEdit = FALSE; bool hadDateEdit = FALSE;
while ( w ) { while ( w ) {
if ( ::qt_cast<TQDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 || if ( ::tqt_cast<TQDateTimeSpinWidget*>(w) && qstrcmp( w->name(), "qt_spin_widget" ) != 0 ||
::qt_cast<TQDateTimeEdit*>(w) ) ::tqt_cast<TQDateTimeEdit*>(w) )
break; break;
hadDateEdit = hadDateEdit || ::qt_cast<TQDateEdit*>(w); hadDateEdit = hadDateEdit || ::tqt_cast<TQDateEdit*>(w);
w = w->parentWidget(); w = w->parentWidget();
} }
if ( w ) { if ( w ) {
if ( !::qt_cast<TQDateTimeEdit*>(w) ) { if ( !::tqt_cast<TQDateTimeEdit*>(w) ) {
w = w->parentWidget(); w = w->parentWidget();
} else { } else {
TQDateTimeEdit *ed = (TQDateTimeEdit*)w; TQDateTimeEdit *ed = (TQDateTimeEdit*)w;
@ -643,7 +643,7 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
ed->dateEdit()->setFocus(); ed->dateEdit()->setFocus();
return TRUE; return TRUE;
} else { } else {
while ( w && !::qt_cast<TQDateTimeEdit*>(w) ) while ( w && !::tqt_cast<TQDateTimeEdit*>(w) )
w = w->parentWidget(); w = w->parentWidget();
} }
} }
@ -661,7 +661,7 @@ bool TQDateTimeEditor::eventFilter( TQObject *o, TQEvent *e )
repaint( rect(), FALSE ); repaint( rect(), FALSE );
} }
return TRUE; return TRUE;
} else if ( !txt.isEmpty() && ::qt_cast<TQTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) { } else if ( !txt.isEmpty() && ::tqt_cast<TQTimeEdit*>(cw) && focusSection() == (int) d->sectionCount()-1 ) {
// the first character of the AM/PM indicator toggles if the section has focus // the first character of the AM/PM indicator toggles if the section has focus
TQTimeEdit *te = (TQTimeEdit*)cw; TQTimeEdit *te = (TQTimeEdit*)cw;
TQTime time = te->time(); TQTime time = te->time();

@ -235,7 +235,7 @@ static int point_pos( const TQPoint &p, TQt::Orientation o, bool swap = FALSE )
static void shrink_extend( TQDockWindow *dw, int &dockExtend, int /*spaceLeft*/, TQt::Orientation o ) static void shrink_extend( TQDockWindow *dw, int &dockExtend, int /*spaceLeft*/, TQt::Orientation o )
{ {
TQToolBar *tb = ::qt_cast<TQToolBar*>(dw); TQToolBar *tb = ::tqt_cast<TQToolBar*>(dw);
if ( o == TQt::Horizontal ) { if ( o == TQt::Horizontal ) {
int mw = 0; int mw = 0;
if ( !tb ) if ( !tb )
@ -258,7 +258,7 @@ static void place_line( TQValueList<DockData> &lastLine, TQt::Orientation o, int
TQDockWindow *last = 0; TQDockWindow *last = 0;
TQRect lastRect; TQRect lastRect;
for ( TQValueList<DockData>::Iterator it = lastLine.begin(); it != lastLine.end(); ++it ) { for ( TQValueList<DockData>::Iterator it = lastLine.begin(); it != lastLine.end(); ++it ) {
if ( tbstrut != -1 && ::qt_cast<TQToolBar*>((*it).w) ) if ( tbstrut != -1 && ::tqt_cast<TQToolBar*>((*it).w) )
(*it).rect.setHeight( tbstrut ); (*it).rect.setHeight( tbstrut );
if ( !last ) { if ( !last ) {
last = (*it).w; last = (*it).w;
@ -391,7 +391,7 @@ int TQDockAreaLayout::layoutItems( const TQRect &rect, bool testonly )
// do some calculations and add the remember the rect which the docking widget requires for the placing // do some calculations and add the remember the rect which the docking widget requires for the placing
TQRect dwRect(pos, sectionpos, dockExtend, dock_strut( dw, orientation() ) ); TQRect dwRect(pos, sectionpos, dockExtend, dock_strut( dw, orientation() ) );
lastLine.append( DockData( dw, dwRect ) ); lastLine.append( DockData( dw, dwRect ) );
if ( ::qt_cast<TQToolBar*>(dw) ) if ( ::tqt_cast<TQToolBar*>(dw) )
tbstrut = TQMAX( tbstrut, dock_strut( dw, orientation() ) ); tbstrut = TQMAX( tbstrut, dock_strut( dw, orientation() ) );
linestrut = TQMAX( dock_strut( dw, orientation() ), linestrut ); linestrut = TQMAX( dock_strut( dw, orientation() ), linestrut );
add_size( dockExtend, pos, orientation() ); add_size( dockExtend, pos, orientation() );
@ -926,7 +926,7 @@ void TQDockArea::updateLayout()
bool TQDockArea::eventFilter( TQObject *o, TQEvent *e ) bool TQDockArea::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( e->type() == TQEvent::Close ) { if ( e->type() == TQEvent::Close ) {
if ( ::qt_cast<TQDockWindow*>(o) ) { if ( ::tqt_cast<TQDockWindow*>(o) ) {
o->removeEventFilter( this ); o->removeEventFilter( this );
TQApplication::sendEvent( o, e ); TQApplication::sendEvent( o, e );
if ( ( (TQCloseEvent*)e )->isAccepted() ) if ( ( (TQCloseEvent*)e )->isAccepted() )
@ -1087,7 +1087,7 @@ bool TQDockArea::isDockWindowAccepted( TQDockWindow *dw )
if ( forbiddenWidgets.findRef( dw ) != -1 ) if ( forbiddenWidgets.findRef( dw ) != -1 )
return FALSE; return FALSE;
TQMainWindow *mw = ::qt_cast<TQMainWindow*>(parentWidget()); TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(parentWidget());
if ( !mw ) if ( !mw )
return TRUE; return TRUE;
if ( !mw->hasDockWindow( dw ) ) if ( !mw->hasDockWindow( dw ) )
@ -1145,7 +1145,7 @@ int TQDockArea::maxSpace( int hint, TQDockWindow *dw )
return dw->height(); return dw->height();
} }
int min = 0; int min = 0;
TQToolBar *tb = ::qt_cast<TQToolBar*>(w); TQToolBar *tb = ::tqt_cast<TQToolBar*>(w);
if ( orientation() == Horizontal ) { if ( orientation() == Horizontal ) {
w->setFixedExtentWidth( -1 ); w->setFixedExtentWidth( -1 );
if ( !tb ) if ( !tb )

@ -493,7 +493,7 @@ void TQDockWindowHandle::minimize()
if ( !dockWindow->area() ) if ( !dockWindow->area() )
return; return;
TQMainWindow *mw = ::qt_cast<TQMainWindow*>(dockWindow->area()->parentWidget()); TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(dockWindow->area()->parentWidget());
if ( mw && mw->isDockEnabled( dockWindow, TQt::DockMinimized ) ) if ( mw && mw->isDockEnabled( dockWindow, TQt::DockMinimized ) )
mw->moveDockWindow( dockWindow, TQt::DockMinimized ); mw->moveDockWindow( dockWindow, TQt::DockMinimized );
} }
@ -1031,13 +1031,13 @@ void TQDockWindow::init()
if ( parentWidget() ) if ( parentWidget() )
parentWidget()->installEventFilter( this ); parentWidget()->installEventFilter( this );
TQWidget *mw = parentWidget(); TQWidget *mw = parentWidget();
TQDockArea *da = ::qt_cast<TQDockArea*>(parentWidget()); TQDockArea *da = ::tqt_cast<TQDockArea*>(parentWidget());
if ( da ) { if ( da ) {
if ( curPlace == InDock ) if ( curPlace == InDock )
da->moveDockWindow( this ); da->moveDockWindow( this );
mw = da->parentWidget(); mw = da->parentWidget();
} }
if ( ::qt_cast<TQMainWindow*>(mw) ) { if ( ::tqt_cast<TQMainWindow*>(mw) ) {
if ( place() == InDock ) { if ( place() == InDock ) {
Dock myDock = TQt::DockTop; Dock myDock = TQt::DockTop;
// make sure we put the window in the correct dock. // make sure we put the window in the correct dock.
@ -1123,7 +1123,7 @@ TQDockWindow::~TQDockWindow()
TQDockArea *a = area(); TQDockArea *a = area();
if ( !a && dockWindowData ) if ( !a && dockWindowData )
a = ( (TQDockArea::DockWindowData*)dockWindowData )->area; a = ( (TQDockArea::DockWindowData*)dockWindowData )->area;
TQMainWindow *mw = a ? ::qt_cast<TQMainWindow*>(a->parentWidget()) : 0; TQMainWindow *mw = a ? ::tqt_cast<TQMainWindow*>(a->parentWidget()) : 0;
if ( mw ) if ( mw )
mw->removeDockWindow( this ); mw->removeDockWindow( this );
@ -1164,12 +1164,12 @@ TQWidget *TQDockWindow::areaAt( const TQPoint &gp )
w = parentWidget()->childAt( parentWidget()->mapFromGlobal( gp ) ); w = parentWidget()->childAt( parentWidget()->mapFromGlobal( gp ) );
while ( w ) { while ( w ) {
if ( ::qt_cast<TQDockArea*>(w) ) { if ( ::tqt_cast<TQDockArea*>(w) ) {
TQDockArea *a = (TQDockArea*)w; TQDockArea *a = (TQDockArea*)w;
if ( a->isDockWindowAccepted( this ) ) if ( a->isDockWindowAccepted( this ) )
return w; return w;
} }
if ( ::qt_cast<TQMainWindow*>(w) ) { if ( ::tqt_cast<TQMainWindow*>(w) ) {
TQMainWindow *mw = (TQMainWindow*)w; TQMainWindow *mw = (TQMainWindow*)w;
TQDockArea *a = mw->dockingArea( mw->mapFromGlobal( gp ) ); TQDockArea *a = mw->dockingArea( mw->mapFromGlobal( gp ) );
if ( a && a->isDockWindowAccepted( this ) ) if ( a && a->isDockWindowAccepted( this ) )
@ -1197,8 +1197,8 @@ void TQDockWindow::handleMove( const TQPoint &pos, const TQPoint &gp, bool drawR
if ( titleBar->ctrlDown || horHandle->ctrlDown || verHandle->ctrlDown ) if ( titleBar->ctrlDown || horHandle->ctrlDown || verHandle->ctrlDown )
w = 0; w = 0;
currRect.moveBy( pos.x(), pos.y() ); currRect.moveBy( pos.x(), pos.y() );
if ( !::qt_cast<TQDockArea*>(w) ) { if ( !::tqt_cast<TQDockArea*>(w) ) {
if ( startOrientation != Horizontal && ::qt_cast<TQToolBar*>(this) ) if ( startOrientation != Horizontal && ::tqt_cast<TQToolBar*>(this) )
swapRect( currRect, Horizontal, startOffset, (TQDockArea*)w ); swapRect( currRect, Horizontal, startOffset, (TQDockArea*)w );
if ( drawRect ) { if ( drawRect ) {
unclippedPainter->setPen( TQPen( gray, 3 ) ); unclippedPainter->setPen( TQPen( gray, 3 ) );
@ -1396,14 +1396,14 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
} else { } else {
if ( dockArea ) { if ( dockArea ) {
TQMainWindow *mw = (TQMainWindow*)dockArea->parentWidget(); TQMainWindow *mw = (TQMainWindow*)dockArea->parentWidget();
if ( ::qt_cast<TQMainWindow*>(mw) && if ( ::tqt_cast<TQMainWindow*>(mw) &&
( !mw->isDockEnabled( TQMainWindow::DockTornOff ) || ( !mw->isDockEnabled( TQMainWindow::DockTornOff ) ||
!mw->isDockEnabled( this, TQMainWindow::DockTornOff ) ) ) !mw->isDockEnabled( this, TQMainWindow::DockTornOff ) ) )
return; return;
delete (TQDockArea::DockWindowData*)dockWindowData; delete (TQDockArea::DockWindowData*)dockWindowData;
dockWindowData = dockArea->dockWindowData( this ); dockWindowData = dockArea->dockWindowData( this );
dockArea->removeDockWindow( this, TRUE, dockArea->removeDockWindow( this, TRUE,
startOrientation != Horizontal && ::qt_cast<TQToolBar*>(this) ); startOrientation != Horizontal && ::tqt_cast<TQToolBar*>(this) );
} }
dockArea = 0; dockArea = 0;
TQPoint topLeft = currRect.topLeft(); TQPoint topLeft = currRect.topLeft();
@ -1417,7 +1417,7 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
move( topLeft ); move( topLeft );
} }
if ( curPlace == InDock && state == OutsideDock && !::qt_cast<TQToolBar*>(this) ) { if ( curPlace == InDock && state == OutsideDock && !::tqt_cast<TQToolBar*>(this) ) {
if ( lastSize != TQSize( -1, -1 ) ) if ( lastSize != TQSize( -1, -1 ) )
resize( lastSize ); resize( lastSize );
} }
@ -1431,7 +1431,7 @@ void TQDockWindow::updatePosition( const TQPoint &globalPos )
tmpDockArea = 0; tmpDockArea = 0;
if ( doAdjustSize ) { if ( doAdjustSize ) {
TQApplication::sendPostedEvents( this, TQEvent::LayoutHint ); TQApplication::sendPostedEvents( this, TQEvent::LayoutHint );
if ( ::qt_cast<TQToolBar*>(this) ) if ( ::tqt_cast<TQToolBar*>(this) )
adjustSize(); adjustSize();
if (lastSize == TQSize(-1, -1)) if (lastSize == TQSize(-1, -1))
clearWState(WState_Resized); // Ensures size is recalculated (non-opaque). clearWState(WState_Resized); // Ensures size is recalculated (non-opaque).
@ -1706,7 +1706,7 @@ TQt::Orientation TQDockWindow::orientation() const
{ {
if ( dockArea ) if ( dockArea )
return dockArea->orientation(); return dockArea->orientation();
if ( ::qt_cast<TQToolBar*>(this) ) if ( ::tqt_cast<TQToolBar*>(this) )
return Horizontal; return Horizontal;
return ( ((TQDockWindow*)this)->boxLayout()->direction() == TQBoxLayout::LeftToRight || return ( ((TQDockWindow*)this)->boxLayout()->direction() == TQBoxLayout::LeftToRight ||
((TQDockWindow*)this)->boxLayout()->direction() == TQBoxLayout::RightToLeft ? ((TQDockWindow*)this)->boxLayout()->direction() == TQBoxLayout::RightToLeft ?
@ -1861,7 +1861,7 @@ void TQDockWindow::undock( TQWidget *w )
{ {
TQMainWindow *mw = 0; TQMainWindow *mw = 0;
if ( area() ) if ( area() )
mw = ::qt_cast<TQMainWindow*>(area()->parentWidget()); mw = ::tqt_cast<TQMainWindow*>(area()->parentWidget());
if ( mw && !mw->isDockEnabled( this, DockTornOff ) ) if ( mw && !mw->isDockEnabled( this, DockTornOff ) )
return; return;
if ( (place() == OutsideDock && !w) ) if ( (place() == OutsideDock && !w) )
@ -1873,7 +1873,7 @@ void TQDockWindow::undock( TQWidget *w )
if ( dockArea ) { if ( dockArea ) {
delete (TQDockArea::DockWindowData*)dockWindowData; delete (TQDockArea::DockWindowData*)dockWindowData;
dockWindowData = dockArea->dockWindowData( this ); dockWindowData = dockArea->dockWindowData( this );
dockArea->removeDockWindow( this, TRUE, orientation() != Horizontal && ::qt_cast<TQToolBar*>(this) ); dockArea->removeDockWindow( this, TRUE, orientation() != Horizontal && ::tqt_cast<TQToolBar*>(this) );
} }
dockArea = 0; dockArea = 0;
if ( lastPos != TQPoint( -1, -1 ) && lastPos.x() > 0 && lastPos.y() > 0 ) if ( lastPos != TQPoint( -1, -1 ) && lastPos.x() > 0 && lastPos.y() > 0 )
@ -1886,7 +1886,7 @@ void TQDockWindow::undock( TQWidget *w )
updateGui(); updateGui();
emit orientationChanged( orientation() ); emit orientationChanged( orientation() );
TQApplication::sendPostedEvents( this, TQEvent::LayoutHint ); TQApplication::sendPostedEvents( this, TQEvent::LayoutHint );
if ( ::qt_cast<TQToolBar*>(this) ) if ( ::tqt_cast<TQToolBar*>(this) )
adjustSize(); adjustSize();
if ( !w ) { if ( !w ) {
if ( !parentWidget() || parentWidget()->isVisible() ) { if ( !parentWidget() || parentWidget()->isVisible() ) {
@ -2110,7 +2110,7 @@ void TQDockWindow::contextMenuEvent( TQContextMenuEvent *e )
{ {
TQObject *o = this; TQObject *o = this;
while ( o ) { while ( o ) {
if ( ::qt_cast<TQMainWindow*>(o) ) if ( ::tqt_cast<TQMainWindow*>(o) )
break; break;
o = o->parent(); o = o->parent();
} }

@ -192,7 +192,7 @@ bool TQAlphaWidget::eventFilter( TQObject* o, TQEvent* e )
break; break;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
#ifndef QT_NO_SCROLLVIEW #ifndef QT_NO_SCROLLVIEW
if ( ::qt_cast<TQScrollView*>(o) ) if ( ::tqt_cast<TQScrollView*>(o) )
break; break;
#endif #endif
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
@ -444,7 +444,7 @@ bool TQRollEffect::eventFilter( TQObject* o, TQEvent* e )
break; break;
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
#ifndef QT_NO_SCROLLVIEW #ifndef QT_NO_SCROLLVIEW
if ( ::qt_cast<TQScrollView*>(o) ) if ( ::tqt_cast<TQScrollView*>(o) )
break; break;
#endif #endif
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:

@ -677,7 +677,7 @@ void TQGroupBox::fixFocus()
&& w->isVisibleTo(this) ) { && w->isVisibleTo(this) ) {
if ( w->hasFocus() if ( w->hasFocus()
#ifndef QT_NO_RADIOBUTTON #ifndef QT_NO_RADIOBUTTON
|| ( !best && ::qt_cast<TQRadioButton*>(w) || ( !best && ::tqt_cast<TQRadioButton*>(w)
&& ((TQRadioButton*)w)->isChecked() ) && ((TQRadioButton*)w)->isChecked() )
#endif #endif
) )
@ -841,7 +841,7 @@ void TQGroupBox::setCheckable( bool b )
if ( b ) { if ( b ) {
if ( !d->checkbox ) { if ( !d->checkbox ) {
d->checkbox = new TQCheckBox( title(), this, "qt_groupbox_checkbox" ); d->checkbox = new TQCheckBox( title(), this, "qt_groupbox_checkbox" );
if (TQButtonGroup *meAsButtonGroup = ::qt_cast<TQButtonGroup*>(this)) if (TQButtonGroup *meAsButtonGroup = ::tqt_cast<TQButtonGroup*>(this))
meAsButtonGroup->remove(d->checkbox); meAsButtonGroup->remove(d->checkbox);
setChecked( TRUE ); setChecked( TRUE );
setChildrenEnabled( TRUE ); setChildrenEnabled( TRUE );

@ -3839,7 +3839,7 @@ bool TQListView::eventFilter( TQObject * o, TQEvent * e )
// nothing // nothing
break; break;
} }
} else if ( ::qt_cast<TQLineEdit*>(o) ) { } else if ( ::tqt_cast<TQLineEdit*>(o) ) {
if ( currentItem() && currentItem()->renameBox ) { if ( currentItem() && currentItem()->renameBox ) {
if ( e->type() == TQEvent::KeyPress ) { if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e; TQKeyEvent *ke = (TQKeyEvent*)e;

@ -335,7 +335,7 @@ protected:
while ( ( o = it.current() ) ) { while ( ( o = it.current() ) ) {
++it; ++it;
++i; ++i;
TQDockWindow *dw = ::qt_cast<TQDockWindow*>(o); TQDockWindow *dw = ::tqt_cast<TQDockWindow*>(o);
if ( !dw || !dw->isVisible() ) if ( !dw || !dw->isVisible() )
continue; continue;
@ -377,7 +377,7 @@ protected:
while ( ( o = it.current() ) ) { while ( ( o = it.current() ) ) {
++it; ++it;
++i; ++i;
TQDockWindow *dw = ::qt_cast<TQDockWindow*>(o); TQDockWindow *dw = ::tqt_cast<TQDockWindow*>(o);
if ( !dw || !dw->isVisible() ) if ( !dw || !dw->isVisible() )
continue; continue;
@ -406,7 +406,7 @@ protected:
if ( e->button() == LeftButton ) { if ( e->button() == LeftButton ) {
if ( e->y() >= 0 && e->y() <= height() ) { if ( e->y() >= 0 && e->y() <= height() ) {
TQObject *o = ( (TQObjectList*)children() )->at( pressedHandle ); TQObject *o = ( (TQObjectList*)children() )->at( pressedHandle );
TQDockWindow *dw = ::qt_cast<TQDockWindow*>(o); TQDockWindow *dw = ::tqt_cast<TQDockWindow*>(o);
if ( dw ) { if ( dw ) {
dw->show(); dw->show();
dw->dock(); dw->dock();
@ -436,7 +436,7 @@ protected:
TQObject *o; TQObject *o;
while ( ( o = it.current() ) ) { while ( ( o = it.current() ) ) {
++it; ++it;
TQDockWindow *dw = ::qt_cast<TQDockWindow*>(o); TQDockWindow *dw = ::tqt_cast<TQDockWindow*>(o);
if ( !dw ) if ( !dw )
continue; continue;
if ( dw->isHidden() ) { if ( dw->isHidden() ) {
@ -491,7 +491,7 @@ void TQHideToolTip::maybeTip( const TQPoint &pos )
int x = 0; int x = 0;
while ( ( o = it.current() ) ) { while ( ( o = it.current() ) ) {
++it; ++it;
TQDockWindow *dw = ::qt_cast<TQDockWindow*>(o); TQDockWindow *dw = ::tqt_cast<TQDockWindow*>(o);
if ( !dw || !dw->isVisible() ) if ( !dw || !dw->isVisible() )
continue; continue;
@ -1276,7 +1276,7 @@ void TQMainWindow::addDockWindow( TQDockWindow * dockWindow, const TQString &lab
{ {
addDockWindow( dockWindow, edge, newLine ); addDockWindow( dockWindow, edge, newLine );
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
TQToolBar *tb = ::qt_cast<TQToolBar*>(dockWindow); TQToolBar *tb = ::tqt_cast<TQToolBar*>(dockWindow);
if ( tb ) if ( tb )
tb->setLabel( label ); tb->setLabel( label );
#endif #endif
@ -1608,7 +1608,7 @@ bool TQMainWindow::dockMainWindow( TQObject *dock )
while ( dock ) { while ( dock ) {
if ( dock->parent() && dock->parent() == this ) if ( dock->parent() && dock->parent() == this )
return TRUE; return TRUE;
if ( ::qt_cast<TQMainWindow*>(dock->parent()) ) if ( ::tqt_cast<TQMainWindow*>(dock->parent()) )
return FALSE; return FALSE;
dock = dock->parent(); dock = dock->parent();
} }
@ -1626,7 +1626,7 @@ bool TQMainWindow::eventFilter( TQObject* o, TQEvent *e )
setUpLayout(); setUpLayout();
d->tll->activate(); d->tll->activate();
} else if ( e->type() == TQEvent::ContextMenu && d->dockMenu && } else if ( e->type() == TQEvent::ContextMenu && d->dockMenu &&
( ::qt_cast<TQDockArea*>(o) && dockMainWindow( o ) || o == d->hideDock || o == d->mb ) ) { ( ::tqt_cast<TQDockArea*>(o) && dockMainWindow( o ) || o == d->hideDock || o == d->mb ) ) {
if ( showDockMenu( ( (TQMouseEvent*)e )->globalPos() ) ) { if ( showDockMenu( ( (TQMouseEvent*)e )->globalPos() ) ) {
( (TQContextMenuEvent*)e )->accept(); ( (TQContextMenuEvent*)e )->accept();
return TRUE; return TRUE;
@ -1657,13 +1657,13 @@ void TQMainWindow::childEvent( TQChildEvent* e)
d->mc = 0; d->mc = 0;
d->mwl->setCentralWidget( 0 ); d->mwl->setCentralWidget( 0 );
triggerLayout(); triggerLayout();
} else if ( ::qt_cast<TQDockWindow*>(e->child()) ) { } else if ( ::tqt_cast<TQDockWindow*>(e->child()) ) {
removeDockWindow( (TQDockWindow *)(e->child()) ); removeDockWindow( (TQDockWindow *)(e->child()) );
d->appropriate.remove( (TQDockWindow*)e->child() ); d->appropriate.remove( (TQDockWindow*)e->child() );
triggerLayout(); triggerLayout();
} }
} else if ( e->type() == TQEvent::ChildInserted && !d->sb ) { } else if ( e->type() == TQEvent::ChildInserted && !d->sb ) {
d->sb = ::qt_cast<TQStatusBar*>(e->child()); d->sb = ::tqt_cast<TQStatusBar*>(e->child());
if ( d->sb ) { if ( d->sb ) {
if ( d->tll ) { if ( d->tll ) {
if ( !d->tll->findWidget( d->sb ) ) if ( !d->tll->findWidget( d->sb ) )
@ -1923,7 +1923,7 @@ TQPtrList<TQToolBar> TQMainWindow::toolBars( Dock dock ) const
TQPtrList<TQDockWindow> lst = dockWindows( dock ); TQPtrList<TQDockWindow> lst = dockWindows( dock );
TQPtrList<TQToolBar> tbl; TQPtrList<TQToolBar> tbl;
for ( TQDockWindow *w = lst.first(); w; w = lst.next() ) { for ( TQDockWindow *w = lst.first(); w; w = lst.next() ) {
TQToolBar *tb = ::qt_cast<TQToolBar*>(w); TQToolBar *tb = ::tqt_cast<TQToolBar*>(w);
if ( tb ) if ( tb )
tbl.append( tb ); tbl.append( tb );
} }
@ -1965,7 +1965,7 @@ TQPtrList<TQDockWindow> TQMainWindow::dockWindows( Dock dock ) const
TQObject *o; TQObject *o;
while ( ( o = it.current() ) ) { while ( ( o = it.current() ) ) {
++it; ++it;
TQDockWindow *dw = ::qt_cast<TQDockWindow*>(o); TQDockWindow *dw = ::tqt_cast<TQDockWindow*>(o);
if ( !dw ) if ( !dw )
continue; continue;
lst.append( dw ); lst.append( dw );
@ -2199,7 +2199,7 @@ void TQMainWindow::menuAboutToShow()
if ( dockWindows == AllDockWindows || dockWindows == NoToolBars ) { if ( dockWindows == AllDockWindows || dockWindows == NoToolBars ) {
for ( o = l->first(); o; o = l->next() ) { for ( o = l->first(); o; o = l->next() ) {
TQDockWindow *dw = (TQDockWindow*)o; TQDockWindow *dw = (TQDockWindow*)o;
if ( !appropriate( dw ) || ::qt_cast<TQToolBar*>(dw) || !dockMainWindow( dw ) ) if ( !appropriate( dw ) || ::tqt_cast<TQToolBar*>(dw) || !dockMainWindow( dw ) )
continue; continue;
TQString label = dw->caption(); TQString label = dw->caption();
if ( !label.isEmpty() ) { if ( !label.isEmpty() ) {
@ -2217,7 +2217,7 @@ void TQMainWindow::menuAboutToShow()
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
if ( dockWindows == AllDockWindows || dockWindows == OnlyToolBars ) { if ( dockWindows == AllDockWindows || dockWindows == OnlyToolBars ) {
for ( o = l->first(); o; o = l->next() ) { for ( o = l->first(); o; o = l->next() ) {
TQToolBar *tb = ::qt_cast<TQToolBar*>(o); TQToolBar *tb = ::tqt_cast<TQToolBar*>(o);
if ( !tb || !appropriate(tb) || !dockMainWindow(tb) ) if ( !tb || !appropriate(tb) || !dockMainWindow(tb) )
continue; continue;
TQString label = tb->label(); TQString label = tb->label();
@ -2277,11 +2277,11 @@ bool TQMainWindow::showDockMenu( const TQPoint &globalPos )
void TQMainWindow::slotPlaceChanged() void TQMainWindow::slotPlaceChanged()
{ {
TQObject* obj = (TQObject*)sender(); TQObject* obj = (TQObject*)sender();
TQDockWindow *dw = ::qt_cast<TQDockWindow*>(obj); TQDockWindow *dw = ::tqt_cast<TQDockWindow*>(obj);
if ( dw ) if ( dw )
emit dockWindowPositionChanged( dw ); emit dockWindowPositionChanged( dw );
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
TQToolBar *tb = ::qt_cast<TQToolBar*>(obj); TQToolBar *tb = ::tqt_cast<TQToolBar*>(obj);
if ( tb ) if ( tb )
emit toolBarPositionChanged( tb ); emit toolBarPositionChanged( tb );
#endif #endif
@ -2532,7 +2532,7 @@ static void loadDockArea( const TQStringList &names, TQDockArea *a, TQt::Dock d,
if ( state == Visible && c == ']' ) { if ( state == Visible && c == ']' ) {
for ( TQDockWindow *dw = l.first(); dw; dw = l.next() ) { for ( TQDockWindow *dw = l.first(); dw; dw = l.next() ) {
if ( TQString( dw->caption() ) == name ) { if ( TQString( dw->caption() ) == name ) {
if ( !::qt_cast<TQToolBar*>(dw) ) if ( !::tqt_cast<TQToolBar*>(dw) )
dw->setGeometry( x.toInt(), y.toInt(), w.toInt(), h.toInt() ); dw->setGeometry( x.toInt(), y.toInt(), w.toInt(), h.toInt() );
else else
dw->setGeometry( x.toInt(), y.toInt(), dw->width(), dw->height() ); dw->setGeometry( x.toInt(), y.toInt(), dw->width(), dw->height() );

@ -392,7 +392,7 @@ void TQMenuBar::performDelayedContentsChanged()
if ( isVisible() ) { if ( isVisible() ) {
update(); update();
#ifndef QT_NO_MAINWINDOW #ifndef QT_NO_MAINWINDOW
TQMainWindow *mw = ::qt_cast<TQMainWindow*>(parent()); TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(parent());
if ( mw ) { if ( mw ) {
mw->triggerLayout(); mw->triggerLayout();
mw->update(); mw->update();
@ -515,7 +515,7 @@ bool TQMenuBar::eventFilter( TQObject *object, TQEvent *event )
{ {
if ( object == parent() && object if ( object == parent() && object
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
&& !::qt_cast<TQToolBar*>(object) && !::tqt_cast<TQToolBar*>(object)
#endif #endif
&& event->type() == TQEvent::Resize ) { && event->type() == TQEvent::Resize ) {
TQResizeEvent *e = (TQResizeEvent *)event; TQResizeEvent *e = (TQResizeEvent *)event;
@ -843,7 +843,7 @@ void TQMenuBar::show()
#endif #endif
#ifndef QT_NO_MAINWINDOW #ifndef QT_NO_MAINWINDOW
TQMainWindow *mw = ::qt_cast<TQMainWindow*>(parent()); TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(parent());
if ( mw ) //### ugly workaround if ( mw ) //### ugly workaround
mw->triggerLayout(); mw->triggerLayout();
#endif #endif
@ -861,7 +861,7 @@ void TQMenuBar::hide()
setAltMode( FALSE ); setAltMode( FALSE );
hidePopups(); hidePopups();
#ifndef QT_NO_MAINWINDOW #ifndef QT_NO_MAINWINDOW
TQMainWindow *mw = ::qt_cast<TQMainWindow*>(parent()); TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(parent());
if ( mw ) //### ugly workaround if ( mw ) //### ugly workaround
mw->triggerLayout(); mw->triggerLayout();
#endif #endif
@ -1630,7 +1630,7 @@ TQSize TQMenuBar::sizeHint() const
TQSize TQMenuBar::minimumSize() const TQSize TQMenuBar::minimumSize() const
{ {
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
TQToolBar *tb = ::qt_cast<TQToolBar*>(parent()); TQToolBar *tb = ::tqt_cast<TQToolBar*>(parent());
if ( tb ) if ( tb )
return sizeHint(); return sizeHint();
#endif #endif

@ -293,7 +293,7 @@ int TQMenuData::insertAny( const TQString *text, const TQPixmap *pixmap,
} }
mitems->insert( index, mi ); mitems->insert( index, mi );
TQPopupMenu* p = ::qt_cast<TQPopupMenu*>(TQMenuData::d->aWidget); TQPopupMenu* p = ::tqt_cast<TQPopupMenu*>(TQMenuData::d->aWidget);
if (p && p->isVisible() && p->mitems) { if (p && p->isVisible() && p->mitems) {
p->mitems->clear(); p->mitems->clear();
for ( TQMenuItemListIt it( *mitems ); it.current(); ++it ) { for ( TQMenuItemListIt it( *mitems ); it.current(); ++it ) {
@ -821,7 +821,7 @@ void TQMenuData::removeItemAt( int index )
if ( mi->popup_menu ) if ( mi->popup_menu )
menuDelPopup( mi->popup_menu ); menuDelPopup( mi->popup_menu );
mitems->remove(); mitems->remove();
TQPopupMenu* p = ::qt_cast<TQPopupMenu*>(TQMenuData::d->aWidget); TQPopupMenu* p = ::tqt_cast<TQPopupMenu*>(TQMenuData::d->aWidget);
if (p && p->isVisible() && p->mitems) { if (p && p->isVisible() && p->mitems) {
p->mitems->clear(); p->mitems->clear();
for ( TQMenuItemListIt it( *mitems ); it.current(); ++it ) { for ( TQMenuItemListIt it( *mitems ); it.current(); ++it ) {
@ -849,7 +849,7 @@ void TQMenuData::clear()
mitems->remove(); mitems->remove();
mi = mitems->current(); mi = mitems->current();
} }
TQPopupMenu* p = ::qt_cast<TQPopupMenu*>(TQMenuData::d->aWidget); TQPopupMenu* p = ::tqt_cast<TQPopupMenu*>(TQMenuData::d->aWidget);
if (p && p->isVisible() && p->mitems) { if (p && p->isVisible() && p->mitems) {
p->mitems->clear(); p->mitems->clear();
} }

@ -335,7 +335,7 @@ void TQPushButton::init()
hasMenuArrow = FALSE; hasMenuArrow = FALSE;
flt = FALSE; flt = FALSE;
#ifndef QT_NO_DIALOG #ifndef QT_NO_DIALOG
autoDefButton = ::qt_cast<TQDialog*>(topLevelWidget()) != 0; autoDefButton = ::tqt_cast<TQDialog*>(topLevelWidget()) != 0;
#else #else
autoDefButton = FALSE; autoDefButton = FALSE;
#endif #endif
@ -389,7 +389,7 @@ void TQPushButton::setDefault( bool enable )
return; // no change return; // no change
defButton = enable; defButton = enable;
#ifndef QT_NO_DIALOG #ifndef QT_NO_DIALOG
if ( defButton && ::qt_cast<TQDialog*>(topLevelWidget()) ) if ( defButton && ::tqt_cast<TQDialog*>(topLevelWidget()) )
((TQDialog*)topLevelWidget())->setMainDefault( this ); ((TQDialog*)topLevelWidget())->setMainDefault( this );
#endif #endif
update(); update();
@ -613,7 +613,7 @@ void TQPushButton::focusInEvent( TQFocusEvent *e )
if (autoDefButton && !defButton) { if (autoDefButton && !defButton) {
defButton = TRUE; defButton = TRUE;
#ifndef QT_NO_DIALOG #ifndef QT_NO_DIALOG
if ( defButton && ::qt_cast<TQDialog*>(topLevelWidget()) ) if ( defButton && ::tqt_cast<TQDialog*>(topLevelWidget()) )
((TQDialog*)topLevelWidget())->setDefault( this ); ((TQDialog*)topLevelWidget())->setDefault( this );
#endif #endif
} }
@ -627,7 +627,7 @@ void TQPushButton::focusOutEvent( TQFocusEvent *e )
{ {
#ifndef QT_NO_DIALOG #ifndef QT_NO_DIALOG
if ( defButton && autoDefButton ) { if ( defButton && autoDefButton ) {
if ( ::qt_cast<TQDialog*>(topLevelWidget()) ) if ( ::tqt_cast<TQDialog*>(topLevelWidget()) )
((TQDialog*)topLevelWidget())->setDefault( 0 ); ((TQDialog*)topLevelWidget())->setDefault( 0 );
} }
#endif #endif
@ -706,7 +706,7 @@ void TQPushButton::popupPressed()
bool horizontal = TRUE; bool horizontal = TRUE;
bool topLeft = TRUE; // ### always TRUE bool topLeft = TRUE; // ### always TRUE
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
TQToolBar *tb = ::qt_cast<TQToolBar*>(parentWidget()); TQToolBar *tb = ::tqt_cast<TQToolBar*>(parentWidget());
if ( tb && tb->orientation() == Vertical ) if ( tb && tb->orientation() == Vertical )
horizontal = FALSE; horizontal = FALSE;
#endif #endif

@ -139,7 +139,7 @@ void TQRadioButton::init()
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) ); setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
setToggleButton( TRUE ); setToggleButton( TRUE );
#ifndef QT_NO_BUTTONGROUP #ifndef QT_NO_BUTTONGROUP
TQButtonGroup *bgrp = ::qt_cast<TQButtonGroup*>(parentWidget()); TQButtonGroup *bgrp = ::tqt_cast<TQButtonGroup*>(parentWidget());
if ( bgrp ) if ( bgrp )
bgrp->setRadioButtonExclusive( TRUE ); bgrp->setRadioButtonExclusive( TRUE );
#endif #endif

@ -2385,7 +2385,7 @@ void TQScrollView::frameChanged()
{ {
// slight ugle-hack - the listview header needs readjusting when // slight ugle-hack - the listview header needs readjusting when
// changing the frame // changing the frame
if (TQListView *lv = ::qt_cast<TQListView *>(this)) if (TQListView *lv = ::tqt_cast<TQListView *>(this))
lv->triggerUpdate(); lv->triggerUpdate();
TQFrame::frameChanged(); TQFrame::frameChanged();
updateScrollBars(); updateScrollBars();

@ -214,8 +214,8 @@ void TQSplashScreen::finish( TQWidget *mainWin )
{ {
if ( mainWin ) { if ( mainWin ) {
#if defined(Q_WS_X11) #if defined(Q_WS_X11)
extern void qt_wait_for_window_manager( TQWidget *mainWin ); extern void tqt_wait_for_window_manager( TQWidget *mainWin );
qt_wait_for_window_manager( mainWin ); tqt_wait_for_window_manager( mainWin );
#endif #endif
} }
close(); close();

@ -901,7 +901,7 @@ void TQSplitter::recalc( bool update )
} }
} }
if ( empty ) { if ( empty ) {
if ( ::qt_cast<TQSplitter*>(parentWidget()) ) { if ( ::tqt_cast<TQSplitter*>(parentWidget()) ) {
// nested splitters; be nice // nested splitters; be nice
maxl = maxt = 0; maxl = maxt = 0;
} else { } else {

@ -614,7 +614,7 @@ void TQTabBar::paint( TQPainter * p, TQTab * t, bool selected ) const
int h = TQMAX(fm.height() + 4, ih ); int h = TQMAX(fm.height() + 4, ih );
int offset = 3; int offset = 3;
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
if (::qt_cast<TQMacStyle *>(&style())) if (::tqt_cast<TQMacStyle *>(&style()))
offset = 0; offset = 0;
#endif #endif
paintLabel( p, TQRect( r.left() + (r.width()-w)/2 - offset, paintLabel( p, TQRect( r.left() + (r.width()-w)/2 - offset,

@ -243,7 +243,7 @@ TQTabWidget::TQTabWidget( TQWidget *parent, const char *name, WFlags f )
installEventFilter( this ); installEventFilter( this );
#ifdef Q_OS_MACX #ifdef Q_OS_MACX
if (::qt_cast<TQMacStyle*>(&style())) if (::tqt_cast<TQMacStyle*>(&style()))
setMargin(10); // According to HIGuidelines at least. setMargin(10); // According to HIGuidelines at least.
#endif #endif
} }

@ -2503,7 +2503,7 @@ void TQTextEdit::contentsMouseReleaseEvent( TQMouseEvent * e )
TQUrl u( doc->context(), onLink, TRUE ); TQUrl u( doc->context(), onLink, TRUE );
emitLinkClicked( u.toString( FALSE, FALSE ) ); emitLinkClicked( u.toString( FALSE, FALSE ) );
} }
if (::qt_cast<TQTextBrowser*>(this)) { // change for 4.0 if (::tqt_cast<TQTextBrowser*>(this)) { // change for 4.0
TQConnectionList *clist = receivers( TQConnectionList *clist = receivers(
"anchorClicked(const TQString&,const TQString&)"); "anchorClicked(const TQString&,const TQString&)");
if (!signalsBlocked() && clist) { if (!signalsBlocked() && clist) {
@ -4907,7 +4907,7 @@ bool TQTextEdit::handleReadOnlyKeyEvent( TQKeyEvent *e )
emitLinkClicked( u.toString( FALSE, FALSE ) ); emitLinkClicked( u.toString( FALSE, FALSE ) );
} }
if (!doc->focusIndicator.name.isEmpty()) { if (!doc->focusIndicator.name.isEmpty()) {
if (::qt_cast<TQTextBrowser*>(this)) { // change for 4.0 if (::tqt_cast<TQTextBrowser*>(this)) { // change for 4.0
TQConnectionList *clist = receivers( TQConnectionList *clist = receivers(
"anchorClicked(const TQString&,const TQString&)"); "anchorClicked(const TQString&,const TQString&)");
if (!signalsBlocked() && clist) { if (!signalsBlocked() && clist) {

@ -70,7 +70,7 @@ public:
void maybeTip( const TQPoint &pos ) void maybeTip( const TQPoint &pos )
{ {
if ( !::qt_cast<TQTitleBar*>(parentWidget()) ) if ( !::tqt_cast<TQTitleBar*>(parentWidget()) )
return; return;
TQTitleBar *t = (TQTitleBar *)parentWidget(); TQTitleBar *t = (TQTitleBar *)parentWidget();
@ -404,7 +404,7 @@ void TQTitleBar::mouseMoveEvent( TQMouseEvent * e)
TQPoint p = mapFromGlobal(e->globalPos()); TQPoint p = mapFromGlobal(e->globalPos());
#ifndef QT_NO_WORKSPACE #ifndef QT_NO_WORKSPACE
if(d->window && d->window->parentWidget()->inherits("TQWorkspaceChild")) { if(d->window && d->window->parentWidget()->inherits("TQWorkspaceChild")) {
TQWorkspace *workspace = ::qt_cast<TQWorkspace*>(d->window->parentWidget()->parentWidget()); TQWorkspace *workspace = ::tqt_cast<TQWorkspace*>(d->window->parentWidget()->parentWidget());
if(workspace) { if(workspace) {
p = workspace->mapFromGlobal( e->globalPos() ); p = workspace->mapFromGlobal( e->globalPos() );
if ( !workspace->rect().contains(p) ) { if ( !workspace->rect().contains(p) ) {

@ -435,7 +435,7 @@ void TQToolBar::styleChange( TQStyle& )
TQObject *ob = 0; TQObject *ob = 0;
for ( ob = childs->first(); ob; ob = childs->next() ) { for ( ob = childs->first(); ob; ob = childs->next() ) {
TQWidget *w = (TQWidget*)ob; TQWidget *w = (TQWidget*)ob;
if ( ::qt_cast<TQToolButton*>(w) || ::qt_cast<TQToolBarSeparator*>(w) ) if ( ::tqt_cast<TQToolButton*>(w) || ::tqt_cast<TQToolBarSeparator*>(w) )
w->setStyle( &style() ); w->setStyle( &style() );
} }
} }
@ -632,7 +632,7 @@ void TQToolBar::createPopup()
} }
TQWidget *w = (TQWidget*)it.current(); TQWidget *w = (TQWidget*)it.current();
#ifndef QT_NO_COMBOBOX #ifndef QT_NO_COMBOBOX
if ( ::qt_cast<TQComboBox*>(w) ) if ( ::tqt_cast<TQComboBox*>(w) )
j = 1; j = 1;
#endif #endif
hide = FALSE; hide = FALSE;
@ -646,7 +646,7 @@ void TQToolBar::createPopup()
} }
if ( hide && w->isVisible() ) { if ( hide && w->isVisible() ) {
doHide = TRUE; doHide = TRUE;
if ( ::qt_cast<TQToolButton*>(w) ) { if ( ::tqt_cast<TQToolButton*>(w) ) {
TQToolButton *b = (TQToolButton*)w; TQToolButton *b = (TQToolButton*)w;
TQString s = b->textLabel(); TQString s = b->textLabel();
if ( s.isEmpty() ) if ( s.isEmpty() )
@ -659,7 +659,7 @@ void TQToolBar::createPopup()
d->extensionPopup->setItemChecked( id, b->isOn() ); d->extensionPopup->setItemChecked( id, b->isOn() );
if ( !b->isEnabled() ) if ( !b->isEnabled() )
d->extensionPopup->setItemEnabled( id, FALSE ); d->extensionPopup->setItemEnabled( id, FALSE );
} else if ( ::qt_cast<TQButton*>(w) ) { } else if ( ::tqt_cast<TQButton*>(w) ) {
TQButton *b = (TQButton*)w; TQButton *b = (TQButton*)w;
TQString s = b->text(); TQString s = b->text();
if ( s.isEmpty() ) if ( s.isEmpty() )
@ -673,7 +673,7 @@ void TQToolBar::createPopup()
if ( !b->isEnabled() ) if ( !b->isEnabled() )
d->extensionPopup->setItemEnabled( id, FALSE ); d->extensionPopup->setItemEnabled( id, FALSE );
#ifndef QT_NO_COMBOBOX #ifndef QT_NO_COMBOBOX
} else if ( ::qt_cast<TQComboBox*>(w) ) { } else if ( ::tqt_cast<TQComboBox*>(w) ) {
TQComboBox *c = (TQComboBox*)w; TQComboBox *c = (TQComboBox*)w;
if ( c->count() != 0 ) { if ( c->count() != 0 ) {
#ifndef QT_NO_WIDGET_TOPEXTRA #ifndef QT_NO_WIDGET_TOPEXTRA

@ -393,7 +393,7 @@ int TQToolBox::insertItem( int index, TQWidget *item, const TQIconSet &iconSet,
void TQToolBox::buttonClicked() void TQToolBox::buttonClicked()
{ {
TQToolBoxButton *tb = ::qt_cast<TQToolBoxButton*>(sender()); TQToolBoxButton *tb = ::tqt_cast<TQToolBoxButton*>(sender());
TQWidget* item = 0; TQWidget* item = 0;
for ( TQToolBoxPrivate::PageList::ConstIterator i = d->pageList.constBegin(); i != d->pageList.constEnd(); ++i ) for ( TQToolBoxPrivate::PageList::ConstIterator i = d->pageList.constBegin(); i != d->pageList.constEnd(); ++i )
if ( (*i).button == tb ) { if ( (*i).button == tb ) {

@ -144,7 +144,7 @@ TQToolButton::TQToolButton( TQWidget * parent, const char *name )
{ {
init(); init();
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
TQToolBar* tb = ::qt_cast<TQToolBar*>(parent); TQToolBar* tb = ::tqt_cast<TQToolBar*>(parent);
if ( tb ) { if ( tb ) {
setAutoRaise( TRUE ); setAutoRaise( TRUE );
if ( tb->mainWindow() ) { if ( tb->mainWindow() ) {
@ -910,7 +910,7 @@ void TQToolButton::popupTimerDone()
setAutoRepeat( FALSE ); setAutoRepeat( FALSE );
bool horizontal = TRUE; bool horizontal = TRUE;
#ifndef QT_NO_TOOLBAR #ifndef QT_NO_TOOLBAR
TQToolBar *tb = ::qt_cast<TQToolBar*>(parentWidget()); TQToolBar *tb = ::tqt_cast<TQToolBar*>(parentWidget());
if ( tb && tb->orientation() == Vertical ) if ( tb && tb->orientation() == Vertical )
horizontal = FALSE; horizontal = FALSE;
#endif #endif

@ -237,7 +237,7 @@ bool TQWidgetPluginPrivate::canUnload() const
#ifdef QT_CONTAINER_CUSTOM_WIDGETS #ifdef QT_CONTAINER_CUSTOM_WIDGETS
TQWidget* TQWidgetPluginPrivate::containerOfWidget( const TQString &key, TQWidget *widget ) const TQWidget* TQWidgetPluginPrivate::containerOfWidget( const TQString &key, TQWidget *widget ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->containerOfWidget( key, widget ); return p->containerOfWidget( key, widget );
return widget; return widget;
@ -245,7 +245,7 @@ TQWidget* TQWidgetPluginPrivate::containerOfWidget( const TQString &key, TQWidge
int TQWidgetPluginPrivate::count( const TQString &key, TQWidget *container ) const int TQWidgetPluginPrivate::count( const TQString &key, TQWidget *container ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->count( key, container ); return p->count( key, container );
return 0; return 0;
@ -253,7 +253,7 @@ int TQWidgetPluginPrivate::count( const TQString &key, TQWidget *container ) con
int TQWidgetPluginPrivate::currentIndex( const TQString &key, TQWidget *container ) const int TQWidgetPluginPrivate::currentIndex( const TQString &key, TQWidget *container ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->currentIndex( key, container ); return p->currentIndex( key, container );
return -1; return -1;
@ -261,7 +261,7 @@ int TQWidgetPluginPrivate::currentIndex( const TQString &key, TQWidget *containe
TQString TQWidgetPluginPrivate::pageLabel( const TQString &key, TQWidget *container, int index ) const TQString TQWidgetPluginPrivate::pageLabel( const TQString &key, TQWidget *container, int index ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->pageLabel( key, container, index ); return p->pageLabel( key, container, index );
return TQString::null; return TQString::null;
@ -269,7 +269,7 @@ TQString TQWidgetPluginPrivate::pageLabel( const TQString &key, TQWidget *contai
TQWidget *TQWidgetPluginPrivate::page( const TQString &key, TQWidget *container, int index ) const TQWidget *TQWidgetPluginPrivate::page( const TQString &key, TQWidget *container, int index ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->page( key, container, index ); return p->page( key, container, index );
return 0; return 0;
@ -277,7 +277,7 @@ TQWidget *TQWidgetPluginPrivate::page( const TQString &key, TQWidget *container,
bool TQWidgetPluginPrivate::isPassiveInteractor( const TQString &key, TQWidget *widget ) const bool TQWidgetPluginPrivate::isPassiveInteractor( const TQString &key, TQWidget *widget ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->isPassiveInteractor( key, widget ); return p->isPassiveInteractor( key, widget );
return FALSE; return FALSE;
@ -285,7 +285,7 @@ bool TQWidgetPluginPrivate::isPassiveInteractor( const TQString &key, TQWidget *
bool TQWidgetPluginPrivate::supportsPages( const TQString &key ) const bool TQWidgetPluginPrivate::supportsPages( const TQString &key ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->supportsPages( key ); return p->supportsPages( key );
return 0; return 0;
@ -294,7 +294,7 @@ bool TQWidgetPluginPrivate::supportsPages( const TQString &key ) const
TQWidget *TQWidgetPluginPrivate::addPage( const TQString &key, TQWidget *container, TQWidget *TQWidgetPluginPrivate::addPage( const TQString &key, TQWidget *container,
const TQString &name, int index ) const const TQString &name, int index ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->addPage( key, container, name, index ); return p->addPage( key, container, name, index );
return 0; return 0;
@ -303,14 +303,14 @@ TQWidget *TQWidgetPluginPrivate::addPage( const TQString &key, TQWidget *contain
void TQWidgetPluginPrivate::insertPage( const TQString &key, TQWidget *container, void TQWidgetPluginPrivate::insertPage( const TQString &key, TQWidget *container,
const TQString &name, int index, TQWidget *page ) const const TQString &name, int index, TQWidget *page ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
p->insertPage( key, container, name, index, page ); p->insertPage( key, container, name, index, page );
} }
void TQWidgetPluginPrivate::removePage( const TQString &key, TQWidget *container, int index ) const void TQWidgetPluginPrivate::removePage( const TQString &key, TQWidget *container, int index ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
p->removePage( key, container, index ); p->removePage( key, container, index );
} }
@ -318,7 +318,7 @@ void TQWidgetPluginPrivate::removePage( const TQString &key, TQWidget *container
void TQWidgetPluginPrivate::movePage( const TQString &key, TQWidget *container, void TQWidgetPluginPrivate::movePage( const TQString &key, TQWidget *container,
int fromIndex, int toIndex ) const int fromIndex, int toIndex ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
p->movePage( key, container, fromIndex, toIndex ); p->movePage( key, container, fromIndex, toIndex );
} }
@ -326,14 +326,14 @@ void TQWidgetPluginPrivate::movePage( const TQString &key, TQWidget *container,
void TQWidgetPluginPrivate::renamePage( const TQString &key, TQWidget *container, void TQWidgetPluginPrivate::renamePage( const TQString &key, TQWidget *container,
int index, const TQString &newName ) const int index, const TQString &newName ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
p->renamePage( key, container, index, newName ); p->renamePage( key, container, index, newName );
} }
TQWidgetList TQWidgetPluginPrivate::pages( const TQString &key, TQWidget *container ) const TQWidgetList TQWidgetPluginPrivate::pages( const TQString &key, TQWidget *container ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->pages( key, container ); return p->pages( key, container );
return TQWidgetList(); return TQWidgetList();
@ -342,7 +342,7 @@ TQWidgetList TQWidgetPluginPrivate::pages( const TQString &key, TQWidget *contai
TQString TQWidgetPluginPrivate::createCode( const TQString &key, const TQString &container, TQString TQWidgetPluginPrivate::createCode( const TQString &key, const TQString &container,
const TQString &page, const TQString &pageName ) const const TQString &page, const TQString &pageName ) const
{ {
TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->qt_cast( "TQWidgetContainerPlugin" ); TQWidgetContainerPlugin *p = (TQWidgetContainerPlugin*)plugin->tqt_cast( "TQWidgetContainerPlugin" );
if ( p ) if ( p )
return p->createCode( key, container, page, pageName ); return p->createCode( key, container, page, pageName );
return TQString::null; return TQString::null;

@ -60,7 +60,7 @@ TQWidgetResizeHandler::TQWidgetResizeHandler( TQWidget *parent, TQWidget *cw, co
{ {
mode = Nowhere; mode = Nowhere;
widget->setMouseTracking( TRUE ); widget->setMouseTracking( TRUE );
TQFrame *frame = ::qt_cast<TQFrame*>(widget); TQFrame *frame = ::tqt_cast<TQFrame*>(widget);
range = frame ? frame->frameWidth() : RANGE; range = frame ? frame->frameWidth() : RANGE;
range = TQMAX( RANGE, range ); range = TQMAX( RANGE, range );
activeForMove = activeForResize = TRUE; activeForMove = activeForResize = TRUE;
@ -114,7 +114,7 @@ bool TQWidgetResizeHandler::eventFilter( TQObject *o, TQEvent *ee )
TQWidget *w = childOf( widget, (TQWidget*)o ); TQWidget *w = childOf( widget, (TQWidget*)o );
if ( !w if ( !w
#ifndef QT_NO_SIZEGRIP #ifndef QT_NO_SIZEGRIP
|| ::qt_cast<TQSizeGrip*>(o) || ::tqt_cast<TQSizeGrip*>(o)
#endif #endif
|| tqApp->activePopupWidget() ) { || tqApp->activePopupWidget() ) {
if ( buttonDown && ee->type() == TQEvent::MouseButtonRelease ) if ( buttonDown && ee->type() == TQEvent::MouseButtonRelease )
@ -234,7 +234,7 @@ void TQWidgetResizeHandler::mouseMoveEvent( TQMouseEvent *e )
int mh = TQMAX( childWidget->minimumSizeHint().height(), int mh = TQMAX( childWidget->minimumSizeHint().height(),
childWidget->minimumHeight() ); childWidget->minimumHeight() );
if ( childWidget != widget ) { if ( childWidget != widget ) {
TQFrame *frame = ::qt_cast<TQFrame*>(widget); TQFrame *frame = ::tqt_cast<TQFrame*>(widget);
if ( frame ) if ( frame )
fw = frame->frameWidth(); fw = frame->frameWidth();
mw += 2 * fw; mw += 2 * fw;

@ -804,7 +804,7 @@ void TQWorkspace::handleUndock(TQDockWindow *w)
TQRect maxRect = dw->availableGeometry(dw->screenNumber(d->mainwindow)); TQRect maxRect = dw->availableGeometry(dw->screenNumber(d->mainwindow));
TQPoint wpos(maxRect.left(), maxRect.top()); TQPoint wpos(maxRect.left(), maxRect.top());
int possible = 0; int possible = 0;
if(!::qt_cast<TQToolBar*>(w)) { if(!::tqt_cast<TQToolBar*>(w)) {
struct place_score { int o, x, y; } score = {0, 0, 0}; struct place_score { int o, x, y; } score = {0, 0, 0};
int left = 1, x = wpos.x(), y = wpos.y(); int left = 1, x = wpos.x(), y = wpos.y();
TQPtrListIterator<TQDockWindow> it( d->dockwindows ); TQPtrListIterator<TQDockWindow> it( d->dockwindows );
@ -937,15 +937,15 @@ void TQWorkspace::showEvent( TQShowEvent *e )
if(d->wmode == AutoDetect) { if(d->wmode == AutoDetect) {
d->wmode = MDI; d->wmode = MDI;
TQWidget *o = topLevelWidget(); TQWidget *o = topLevelWidget();
if(::qt_cast<TQMainWindow*>(o)) { if(::tqt_cast<TQMainWindow*>(o)) {
d->wmode = TopLevel; d->wmode = TopLevel;
const TQObjectList *c = o->children(); const TQObjectList *c = o->children();
for(TQObjectListIt it(*c); it; ++it) { for(TQObjectListIt it(*c); it; ++it) {
if((*it)->isWidgetType() && !((TQWidget *)(*it))->isTopLevel() && if((*it)->isWidgetType() && !((TQWidget *)(*it))->isTopLevel() &&
!::qt_cast<TQHBox*>(*it) && !::qt_cast<TQVBox*>(*it) && !::tqt_cast<TQHBox*>(*it) && !::tqt_cast<TQVBox*>(*it) &&
!::qt_cast<TQWorkspaceChild*>(*it) && !(*it)->inherits("TQHideDock") && !::tqt_cast<TQWorkspaceChild*>(*it) && !(*it)->inherits("TQHideDock") &&
!::qt_cast<TQDockArea*>(*it) && !::qt_cast<TQWorkspace*>(*it) && !::tqt_cast<TQDockArea*>(*it) && !::tqt_cast<TQWorkspace*>(*it) &&
!::qt_cast<TQMenuBar*>(*it) && !::qt_cast<TQStatusBar*>(*it)) { !::tqt_cast<TQMenuBar*>(*it) && !::tqt_cast<TQStatusBar*>(*it)) {
d->wmode = MDI; d->wmode = MDI;
break; break;
} }
@ -954,7 +954,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
} }
if(d->wmode == TopLevel) { if(d->wmode == TopLevel) {
TQWidget *o = topLevelWidget(); TQWidget *o = topLevelWidget();
d->mainwindow = ::qt_cast<TQMainWindow*>(o); d->mainwindow = ::tqt_cast<TQMainWindow*>(o);
const TQObjectList children = *o->children(); const TQObjectList children = *o->children();
for(TQObjectListIt it(children); it; ++it) { for(TQObjectListIt it(children); it; ++it) {
if(!(*it)->isWidgetType()) if(!(*it)->isWidgetType())
@ -962,16 +962,16 @@ void TQWorkspace::showEvent( TQShowEvent *e )
TQWidget *w = (TQWidget *)(*it); TQWidget *w = (TQWidget *)(*it);
if(w->isTopLevel()) if(w->isTopLevel())
continue; continue;
if(::qt_cast<TQDockArea*>(w)) { if(::tqt_cast<TQDockArea*>(w)) {
const TQObjectList *dock_c = w->children(); const TQObjectList *dock_c = w->children();
if(dock_c) { if(dock_c) {
TQPtrList<TQToolBar> tb_list; TQPtrList<TQToolBar> tb_list;
for(TQObjectListIt dock_it(*dock_c); dock_it; ++dock_it) { for(TQObjectListIt dock_it(*dock_c); dock_it; ++dock_it) {
if(!(*dock_it)->isWidgetType()) if(!(*dock_it)->isWidgetType())
continue; continue;
if(::qt_cast<TQToolBar*>(*dock_it)) { if(::tqt_cast<TQToolBar*>(*dock_it)) {
tb_list.append((TQToolBar *)(*dock_it)); tb_list.append((TQToolBar *)(*dock_it));
} else if (::qt_cast<TQDockWindow*>(*dock_it)) { } else if (::tqt_cast<TQDockWindow*>(*dock_it)) {
TQDockWindow *dw = (TQDockWindow*)(*dock_it); TQDockWindow *dw = (TQDockWindow*)(*dock_it);
dw->move(dw->mapToGlobal(TQPoint(0, 0))); dw->move(dw->mapToGlobal(TQPoint(0, 0)));
d->newdocks.append(dw); d->newdocks.append(dw);
@ -1012,13 +1012,13 @@ void TQWorkspace::showEvent( TQShowEvent *e )
} }
} }
w->installEventFilter(this); w->installEventFilter(this);
} else if(::qt_cast<TQStatusBar*>(w)) { } else if(::tqt_cast<TQStatusBar*>(w)) {
if(activeWindow()) { if(activeWindow()) {
TQWorkspaceChild *c; TQWorkspaceChild *c;
if ( ( c = findChild(activeWindow()) ) ) if ( ( c = findChild(activeWindow()) ) )
c->setStatusBar((TQStatusBar*)w); c->setStatusBar((TQStatusBar*)w);
} }
} else if(::qt_cast<TQWorkspaceChild*>(w)) { } else if(::tqt_cast<TQWorkspaceChild*>(w)) {
w->reparent(this, w->testWFlags(~(0)) | WType_TopLevel, w->pos()); w->reparent(this, w->testWFlags(~(0)) | WType_TopLevel, w->pos());
} }
} }
@ -1033,7 +1033,7 @@ void TQWorkspace::showEvent( TQShowEvent *e )
o->reparent(w, TQPoint(0, 0), TRUE); o->reparent(w, TQPoint(0, 0), TRUE);
{ {
TQMenuBar *mb = 0; TQMenuBar *mb = 0;
if(::qt_cast<TQMainWindow*>(o)) if(::tqt_cast<TQMainWindow*>(o))
mb = ((TQMainWindow *)o)->menuBar(); mb = ((TQMainWindow *)o)->menuBar();
if(!mb) if(!mb)
mb = (TQMenuBar*)o->child(NULL, "TQMenuBar"); mb = (TQMenuBar*)o->child(NULL, "TQMenuBar");
@ -1291,7 +1291,7 @@ TQWidgetList TQWorkspace::windowList( WindowOrder order ) const
while (it.current()) { while (it.current()) {
TQObject *o = it.current(); TQObject *o = it.current();
++it; ++it;
TQWorkspaceChild *c = ::qt_cast<TQWorkspaceChild*>(o); TQWorkspaceChild *c = ::tqt_cast<TQWorkspaceChild*>(o);
if (c && c->windowWidget()) if (c && c->windowWidget())
windows.append(c->windowWidget()); windows.append(c->windowWidget());
} }
@ -1313,15 +1313,15 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
{ {
if(d->wmode == TopLevel && d->mainwindow && o->parent() == d->mainwindow) { if(d->wmode == TopLevel && d->mainwindow && o->parent() == d->mainwindow) {
if((e->type() == TQEvent::ChildInserted || e->type() == TQEvent::Reparent) && if((e->type() == TQEvent::ChildInserted || e->type() == TQEvent::Reparent) &&
::qt_cast<TQDockArea*>(o) && !((TQWidget*)o)->isVisible()) { ::tqt_cast<TQDockArea*>(o) && !((TQWidget*)o)->isVisible()) {
TQChildEvent *ce = (TQChildEvent*)e; TQChildEvent *ce = (TQChildEvent*)e;
if(!::qt_cast<TQDockWindow*>(ce->child())) { if(!::tqt_cast<TQDockWindow*>(ce->child())) {
tqDebug("No idea what to do.."); tqDebug("No idea what to do..");
return FALSE; return FALSE;
} }
TQDockWindow *w = (TQDockWindow*)ce->child(); TQDockWindow *w = (TQDockWindow*)ce->child();
if(d->newdocks.find(w) == -1 && d->dockwindows.find(w) == -1) { if(d->newdocks.find(w) == -1 && d->dockwindows.find(w) == -1) {
if(::qt_cast<TQToolBar*>(w)) if(::tqt_cast<TQToolBar*>(w))
d->newdocks.prepend(w); d->newdocks.prepend(w);
else else
d->newdocks.append(w); d->newdocks.append(w);
@ -1451,7 +1451,7 @@ bool TQWorkspace::eventFilter( TQObject *o, TQEvent * e)
if ( c->shademode ) if ( c->shademode )
c->showShaded(); c->showShaded();
} }
} else if ( ::qt_cast<TQWorkspaceChild*>(o) ) { } else if ( ::tqt_cast<TQWorkspaceChild*>(o) ) {
d->popup->hide(); d->popup->hide();
} }
updateWorkspace(); updateWorkspace();
@ -2148,7 +2148,7 @@ TQWorkspaceChild::~TQWorkspaceChild()
{ {
if ( iconw ) if ( iconw )
delete iconw->parentWidget(); delete iconw->parentWidget();
TQWorkspace *workspace = ::qt_cast<TQWorkspace*>(parentWidget()); TQWorkspace *workspace = ::tqt_cast<TQWorkspace*>(parentWidget());
if ( workspace ) { if ( workspace ) {
workspace->d->focus.removeRef(this); workspace->d->focus.removeRef(this);
if ( workspace->d->active == this ) { if ( workspace->d->active == this ) {
@ -2536,7 +2536,7 @@ void TQWorkspaceChild::styleChange( TQStyle & )
{ {
resizeEvent( 0 ); resizeEvent( 0 );
if ( iconw ) { if ( iconw ) {
TQVBox *vbox = (TQVBox*)iconw->parentWidget()->qt_cast( "TQVBox" ); TQVBox *vbox = (TQVBox*)iconw->parentWidget()->tqt_cast( "TQVBox" );
Q_ASSERT(vbox); Q_ASSERT(vbox);
if ( !style().styleHint( TQStyle::SH_TitleBar_NoBorder ) ) { if ( !style().styleHint( TQStyle::SH_TitleBar_NoBorder ) ) {
vbox->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised ); vbox->setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );

@ -322,15 +322,15 @@ TQPtrList<HelpWindow> TabbedBrowser::browsers() const
{ {
TQPtrList<HelpWindow> list; TQPtrList<HelpWindow> list;
for (int i=0; i<tab->count(); ++i) { for (int i=0; i<tab->count(); ++i) {
Q_ASSERT(::qt_cast<HelpWindow*>(tab->page(i))); Q_ASSERT(::tqt_cast<HelpWindow*>(tab->page(i)));
list.append(::qt_cast<HelpWindow*>(tab->page(i))); list.append(::tqt_cast<HelpWindow*>(tab->page(i)));
} }
return list; return list;
} }
void TabbedBrowser::sourceChanged() void TabbedBrowser::sourceChanged()
{ {
HelpWindow *win = ::qt_cast<HelpWindow *>( TQObject::sender() ); HelpWindow *win = ::tqt_cast<HelpWindow *>( TQObject::sender() );
Q_ASSERT( win ); Q_ASSERT( win );
TQString docTitle(win->documentTitle()); TQString docTitle(win->documentTitle());
if (docTitle.isEmpty()) if (docTitle.isEmpty())

@ -110,7 +110,7 @@ bool TQDesignerAction::addTo( TQWidget *w )
if ( !widgetToInsert ) if ( !widgetToInsert )
return TQAction::addTo( w ); return TQAction::addTo( w );
if ( ::qt_cast<TQPopupMenu*>(w) ) if ( ::tqt_cast<TQPopupMenu*>(w) )
return FALSE; return FALSE;
widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE ); widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE );
@ -201,11 +201,11 @@ TQSeparatorAction::TQSeparatorAction( TQObject *parent )
bool TQSeparatorAction::addTo( TQWidget *w ) bool TQSeparatorAction::addTo( TQWidget *w )
{ {
if ( ::qt_cast<TQToolBar*>(w) ) { if ( ::tqt_cast<TQToolBar*>(w) ) {
TQToolBar *tb = (TQToolBar*)w; TQToolBar *tb = (TQToolBar*)w;
wid = new TQDesignerToolBarSeparator( tb->orientation(), tb ); wid = new TQDesignerToolBarSeparator( tb->orientation(), tb );
return TRUE; return TRUE;
} else if ( ::qt_cast<TQPopupMenu*>(w) ) { } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
idx = ( (TQPopupMenu*)w )->count(); idx = ( (TQPopupMenu*)w )->count();
( (TQPopupMenu*)w )->insertSeparator( idx ); ( (TQPopupMenu*)w )->insertSeparator( idx );
return TRUE; return TRUE;
@ -215,10 +215,10 @@ bool TQSeparatorAction::addTo( TQWidget *w )
bool TQSeparatorAction::removeFrom( TQWidget *w ) bool TQSeparatorAction::removeFrom( TQWidget *w )
{ {
if ( ::qt_cast<TQToolBar*>(w) ) { if ( ::tqt_cast<TQToolBar*>(w) ) {
delete wid; delete wid;
return TRUE; return TRUE;
} else if ( ::qt_cast<TQPopupMenu*>(w) ) { } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
( (TQPopupMenu*)w )->removeItemAt( idx ); ( (TQPopupMenu*)w )->removeItemAt( idx );
return TRUE; return TRUE;
} }
@ -267,7 +267,7 @@ void TQDesignerToolBar::findFormWindow()
{ {
TQWidget *w = this; TQWidget *w = this;
while ( w ) { while ( w ) {
formWindow = ::qt_cast<FormWindow*>(w); formWindow = ::tqt_cast<FormWindow*>(w);
if ( formWindow ) if ( formWindow )
break; break;
w = w->parentWidget(); w = w->parentWidget();
@ -278,10 +278,10 @@ void TQDesignerToolBar::addAction( TQAction *a )
{ {
actionList.append( a ); actionList.append( a );
connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) ); connect( a, SIGNAL( destroyed() ), this, SLOT( actionRemoved() ) );
if ( ::qt_cast<TQActionGroup*>(a) ) { if ( ::tqt_cast<TQActionGroup*>(a) ) {
( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this );
actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a );
} else if ( ::qt_cast<TQSeparatorAction*>(a) ) { } else if ( ::tqt_cast<TQSeparatorAction*>(a) ) {
( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); ( (TQSeparatorAction*)a )->widget()->installEventFilter( this );
actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a );
} else { } else {
@ -292,7 +292,7 @@ void TQDesignerToolBar::addAction( TQAction *a )
static void fixObject( TQObject *&o ) static void fixObject( TQObject *&o )
{ {
while ( o && o->parent() && !::qt_cast<TQDesignerToolBar*>(o->parent()) ) while ( o && o->parent() && !::tqt_cast<TQDesignerToolBar*>(o->parent()) )
o = o->parent(); o = o->parent();
} }
@ -410,7 +410,7 @@ void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject
const int ID_SEP = 2; const int ID_SEP = 2;
const int ID_DELTOOLBAR = 3; const int ID_DELTOOLBAR = 3;
TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o ); TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
if ( it != actionMap.end() && ::qt_cast<TQSeparatorAction*>(*it) ) if ( it != actionMap.end() && ::tqt_cast<TQSeparatorAction*>(*it) )
menu.insertItem( tr( "Delete Separator" ), ID_DELETE ); menu.insertItem( tr( "Delete Separator" ), ID_DELETE );
else else
menu.insertItem( tr( "Delete Item" ), ID_DELETE ); menu.insertItem( tr( "Delete Item" ), ID_DELETE );
@ -511,11 +511,11 @@ void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
TQApplication::sendPostedEvents(); TQApplication::sendPostedEvents();
adjustSize(); adjustSize();
TQString type = ::qt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) : TQString type = ::tqt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) :
::qt_cast<TQSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" ); ::tqt_cast<TQSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
TQStoredDrag *drag = new ActionDrag( type, a, this ); TQStoredDrag *drag = new ActionDrag( type, a, this );
drag->setPixmap( a->iconSet().pixmap() ); drag->setPixmap( a->iconSet().pixmap() );
if ( ::qt_cast<TQDesignerAction*>(a) ) { if ( ::tqt_cast<TQDesignerAction*>(a) ) {
if ( formWindow->widgets()->find( ( (TQDesignerAction*)a )->widget() ) ) if ( formWindow->widgets()->find( ( (TQDesignerAction*)a )->widget() ) )
formWindow->selectWidget( ( (TQDesignerAction*)a )->widget(), FALSE ); formWindow->selectWidget( ( (TQDesignerAction*)a )->widget(), FALSE );
} }
@ -572,11 +572,11 @@ void TQDesignerToolBar::dropEvent( TQDropEvent *e )
if ( e->provides( "application/x-designer-actions" ) || if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-separator" ) ) { e->provides( "application/x-designer-separator" ) ) {
if ( e->provides( "application/x-designer-actions" ) ) if ( e->provides( "application/x-designer-actions" ) )
a = ::qt_cast<TQDesignerAction*>(ActionDrag::action()); a = ::tqt_cast<TQDesignerAction*>(ActionDrag::action());
else else
a = ::qt_cast<TQSeparatorAction*>(ActionDrag::action()); a = ::tqt_cast<TQSeparatorAction*>(ActionDrag::action());
} else { } else {
a = ::qt_cast<TQDesignerActionGroup*>(ActionDrag::action()); a = ::tqt_cast<TQDesignerActionGroup*>(ActionDrag::action());
} }
if ( actionList.findRef( a ) != -1 ) { if ( actionList.findRef( a ) != -1 ) {
@ -605,14 +605,14 @@ void TQDesignerToolBar::reInsert()
clear(); clear();
for ( a = actionList.first(); a; a = actionList.next() ) { for ( a = actionList.first(); a; a = actionList.next() ) {
a->addTo( this ); a->addTo( this );
if ( ::qt_cast<TQActionGroup*>(a) ) { if ( ::tqt_cast<TQActionGroup*>(a) ) {
actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a ); actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a );
if ( ( (TQDesignerActionGroup*)a )->widget() ) if ( ( (TQDesignerActionGroup*)a )->widget() )
( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this ); ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this );
} else if ( ::qt_cast<TQDesignerAction*>(a) ) { } else if ( ::tqt_cast<TQDesignerAction*>(a) ) {
actionMap.insert( ( (TQDesignerAction*)a )->widget(), a ); actionMap.insert( ( (TQDesignerAction*)a )->widget(), a );
( (TQDesignerAction*)a )->widget()->installEventFilter( this ); ( (TQDesignerAction*)a )->widget()->installEventFilter( this );
} else if ( ::qt_cast<TQSeparatorAction*>(a) ) { } else if ( ::tqt_cast<TQSeparatorAction*>(a) ) {
actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a ); actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a );
( (TQSeparatorAction*)a )->widget()->installEventFilter( this ); ( (TQSeparatorAction*)a )->widget()->installEventFilter( this );
} }
@ -724,7 +724,7 @@ void TQDesignerToolBar::doInsertWidget( const TQPoint &p )
void TQDesignerToolBar::clear() void TQDesignerToolBar::clear()
{ {
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( ::qt_cast<TQDesignerAction*>(a) ) if ( ::tqt_cast<TQDesignerAction*>(a) )
( (TQDesignerAction*)a )->remove(); ( (TQDesignerAction*)a )->remove();
} }
TQToolBar::clear(); TQToolBar::clear();

@ -78,7 +78,7 @@ class TQDesignerActionGroup : public TQActionGroup
public: public:
TQDesignerActionGroup( TQObject *parent ) TQDesignerActionGroup( TQObject *parent )
: TQActionGroup( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); } : TQActionGroup( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
void init(); void init();
@ -113,9 +113,9 @@ class TQDesignerAction : public TQAction
public: public:
TQDesignerAction( TQObject *parent ) TQDesignerAction( TQObject *parent )
: TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); } : TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
TQDesignerAction( TQWidget *w, TQObject *parent ) TQDesignerAction( TQWidget *w, TQObject *parent )
: TQAction( ::qt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); } : TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
void init(); void init();

@ -154,7 +154,7 @@ void ActionEditor::newAction()
{ {
ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) { if ( actionParent ) {
if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) ) if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent(); actionParent = (ActionItem*)actionParent->parent();
} }
@ -190,7 +190,7 @@ void ActionEditor::newActionGroup()
{ {
ActionItem *actionParent = (ActionItem*)listActions->selectedItem(); ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) { if ( actionParent ) {
if ( !::qt_cast<TQActionGroup*>(actionParent->actionGroup()) ) if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent(); actionParent = (ActionItem*)actionParent->parent();
} }
@ -230,13 +230,13 @@ void ActionEditor::setFormWindow( FormWindow *fw )
listActions->clear(); listActions->clear();
formWindow = fw; formWindow = fw;
if ( !formWindow || if ( !formWindow ||
!::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) { !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
setEnabled( FALSE ); setEnabled( FALSE );
} else { } else {
setEnabled( TRUE ); setEnabled( TRUE );
for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) { for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0; ActionItem *i = 0;
if ( ::qt_cast<TQAction*>(a->parent()) ) if ( ::tqt_cast<TQAction*>(a->parent()) )
continue; continue;
i = new ActionItem( listActions, a ); i = new ActionItem( listActions, a );
i->setText( 0, a->name() ); i->setText( 0, a->name() );
@ -246,7 +246,7 @@ void ActionEditor::setFormWindow( FormWindow *fw )
this, SLOT( removeConnections( TQObject * ) ) ); this, SLOT( removeConnections( TQObject * ) ) );
TQObject::connect( a, SIGNAL( destroyed( TQObject * ) ), TQObject::connect( a, SIGNAL( destroyed( TQObject * ) ),
this, SLOT( removeConnections( TQObject* ) ) ); this, SLOT( removeConnections( TQObject* ) ) );
if ( ::qt_cast<TQActionGroup*>(a) ) { if ( ::tqt_cast<TQActionGroup*>(a) ) {
insertChildActions( i ); insertChildActions( i );
} }
} }
@ -265,7 +265,7 @@ void ActionEditor::insertChildActions( ActionItem *i )
while ( it.current() ) { while ( it.current() ) {
TQObject *o = it.current(); TQObject *o = it.current();
++it; ++it;
if ( !::qt_cast<TQAction*>(o) ) if ( !::tqt_cast<TQAction*>(o) )
continue; continue;
TQAction *a = (TQAction*)o; TQAction *a = (TQAction*)o;
ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a ); ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a );
@ -277,7 +277,7 @@ void ActionEditor::insertChildActions( ActionItem *i )
this, SLOT( removeConnections( TQObject * ) ) ); this, SLOT( removeConnections( TQObject * ) ) );
TQObject::connect( o, SIGNAL( destroyed( TQObject * ) ), TQObject::connect( o, SIGNAL( destroyed( TQObject * ) ),
this, SLOT( removeConnections( TQObject * ) ) ); this, SLOT( removeConnections( TQObject * ) ) );
if ( ::qt_cast<TQActionGroup*>(a) ) if ( ::tqt_cast<TQActionGroup*>(a) )
insertChildActions( i2 ); insertChildActions( i2 );
} }
} }

@ -48,18 +48,18 @@ ActionListView::ActionListView( TQWidget *parent, const char *name )
ActionItem::ActionItem( TQListView *lv, TQAction *ac ) ActionItem::ActionItem( TQListView *lv, TQAction *ac )
: TQListViewItem( lv ), a( 0 ), g( 0 ) : TQListViewItem( lv ), a( 0 ), g( 0 )
{ {
g = ::qt_cast<TQDesignerActionGroup*>(ac); g = ::tqt_cast<TQDesignerActionGroup*>(ac);
if ( !g ) if ( !g )
a = ::qt_cast<TQDesignerAction*>(ac); a = ::tqt_cast<TQDesignerAction*>(ac);
setDragEnabled( TRUE ); setDragEnabled( TRUE );
} }
ActionItem::ActionItem( TQListViewItem *i, TQAction *ac ) ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
: TQListViewItem( i ), a( 0 ), g( 0 ) : TQListViewItem( i ), a( 0 ), g( 0 )
{ {
g = ::qt_cast<TQDesignerActionGroup*>(ac); g = ::tqt_cast<TQDesignerActionGroup*>(ac);
if ( !g ) if ( !g )
a = ::qt_cast<TQDesignerAction*>(ac); a = ::tqt_cast<TQDesignerAction*>(ac);
setDragEnabled( TRUE ); setDragEnabled( TRUE );
moveToEnd(); moveToEnd();
} }

@ -497,7 +497,7 @@ bool SetPropertyCommand::canMerge( Command *c )
if ( !p ) { if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" ) if ( propName == "toolTip" || propName == "whatsThis" )
return TRUE; return TRUE;
if ( ::qt_cast<CustomWidget*>((TQObject *)widget) ) { if ( ::tqt_cast<CustomWidget*>((TQObject *)widget) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget();
if ( !cw ) if ( !cw )
return FALSE; return FALSE;
@ -548,7 +548,7 @@ bool SetPropertyCommand::checkProperty()
return FALSE; return FALSE;
} }
if ( ::qt_cast<FormWindow*>(widget->parent()) ) if ( ::tqt_cast<FormWindow*>(widget->parent()) )
formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() );
} }
return TRUE; return TRUE;
@ -600,7 +600,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), currentItemText ); MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), currentItemText );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v ); MetaDataBase::setFakeProperty( editor->widget(), propName, v );
} else if ( ::qt_cast<CustomWidget*>(editor->widget()) ) { } else if ( ::tqt_cast<CustomWidget*>(editor->widget()) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget(); MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget();
if ( cw ) { if ( cw ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v ); MetaDataBase::setFakeProperty( editor->widget(), propName, v );
@ -648,10 +648,10 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
if ( formWindow()->isMainContainer( widget ) ) if ( formWindow()->isMainContainer( widget ) )
formWindow()->setName( v.toCString() ); formWindow()->setName( v.toCString() );
} }
if ( propName == "name" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) { if ( propName == "name" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget ); formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget );
} }
if ( propName == "iconSet" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) { if ( propName == "iconSet" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget ); formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget );
} }
if ( propName == "caption" ) { if ( propName == "caption" ) {
@ -798,9 +798,9 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
margin = MetaDataBase::margin( layoutBase ); margin = MetaDataBase::margin( layoutBase );
layout = 0; layout = 0;
if ( lay == WidgetFactory::HBox ) if ( lay == WidgetFactory::HBox )
layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 ); layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::VBox ) else if ( lay == WidgetFactory::VBox )
layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 ); layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::Grid ) else if ( lay == WidgetFactory::Grid )
layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE );
} }
@ -1786,7 +1786,7 @@ void AddActionToToolBarCommand::execute()
{ {
action->addTo( toolBar ); action->addTo( toolBar );
if ( ::qt_cast<TQDesignerAction*>(action) ) { if ( ::tqt_cast<TQDesignerAction*>(action) ) {
TQString s = ( (TQDesignerAction*)action )->widget()->name(); TQString s = ( (TQDesignerAction*)action )->widget()->name();
if ( s.startsWith( "qt_dead_widget_" ) ) { if ( s.startsWith( "qt_dead_widget_" ) ) {
s.remove( 0, TQString( "qt_dead_widget_" ).length() ); s.remove( 0, TQString( "qt_dead_widget_" ).length() );
@ -1794,16 +1794,16 @@ void AddActionToToolBarCommand::execute()
} }
toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action ); toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action );
( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar ); ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar );
} else if ( ::qt_cast<TQDesignerActionGroup*>(action) ) { } else if ( ::tqt_cast<TQDesignerActionGroup*>(action) ) {
if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) { if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) {
toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action ); toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action );
( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
} }
} else if ( ::qt_cast<TQSeparatorAction*>(action) ) { } else if ( ::tqt_cast<TQSeparatorAction*>(action) ) {
toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action ); toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action );
( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar ); ( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar );
} }
if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 ) if ( index == -1 )
toolBar->appendAction( action ); toolBar->appendAction( action );
else else
@ -1817,10 +1817,10 @@ void AddActionToToolBarCommand::execute()
while ( it.current() ) { while ( it.current() ) {
TQObject *o = it.current(); TQObject *o = it.current();
++it; ++it;
if ( !::qt_cast<TQAction*>(o) ) if ( !::tqt_cast<TQAction*>(o) )
continue; continue;
// ### fix it for nested actiongroups // ### fix it for nested actiongroups
if ( ::qt_cast<TQDesignerAction*>(o) ) { if ( ::tqt_cast<TQDesignerAction*>(o) ) {
TQDesignerAction *ac = (TQDesignerAction*)o; TQDesignerAction *ac = (TQDesignerAction*)o;
toolBar->insertAction( ac->widget(), ac ); toolBar->insertAction( ac->widget(), ac );
ac->widget()->installEventFilter( toolBar ); ac->widget()->installEventFilter( toolBar );
@ -1840,7 +1840,7 @@ void AddActionToToolBarCommand::execute()
void AddActionToToolBarCommand::unexecute() void AddActionToToolBarCommand::unexecute()
{ {
if ( ::qt_cast<TQDesignerAction*>(action) ) { if ( ::tqt_cast<TQDesignerAction*>(action) ) {
TQString s = ( (TQDesignerAction*)action )->widget()->name(); TQString s = ( (TQDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" ); s.prepend( "qt_dead_widget_" );
( (TQDesignerAction*)action )->widget()->setName( s ); ( (TQDesignerAction*)action )->widget()->setName( s );
@ -1849,7 +1849,7 @@ void AddActionToToolBarCommand::unexecute()
toolBar->removeAction( action ); toolBar->removeAction( action );
action->removeFrom( toolBar ); action->removeFrom( toolBar );
TQObject::disconnect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) ); TQObject::disconnect( action, SIGNAL( destroyed() ), toolBar, SLOT( actionRemoved() ) );
if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) { if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( toolBar ); action->removeEventFilter( toolBar );
} else { } else {
if ( action->children() ) { if ( action->children() ) {
@ -1857,9 +1857,9 @@ void AddActionToToolBarCommand::unexecute()
while ( it.current() ) { while ( it.current() ) {
TQObject *o = it.current(); TQObject *o = it.current();
++it; ++it;
if ( !::qt_cast<TQAction*>(o) ) if ( !::tqt_cast<TQAction*>(o) )
continue; continue;
if ( ::qt_cast<TQDesignerAction*>(o) ) { if ( ::tqt_cast<TQDesignerAction*>(o) ) {
o->removeEventFilter( toolBar ); o->removeEventFilter( toolBar );
toolBar->removeAction( (TQAction*)o ); toolBar->removeAction( (TQAction*)o );
} }

@ -194,10 +194,10 @@ static void appendChildActions( TQAction *action, TQStringList &lst )
while ( it.current() ) { while ( it.current() ) {
TQObject *o = it.current(); TQObject *o = it.current();
++it; ++it;
if ( !::qt_cast<TQAction*>(o) ) if ( !::tqt_cast<TQAction*>(o) )
continue; continue;
lst << o->name(); lst << o->name();
if ( o->children() && ::qt_cast<TQActionGroup*>(o) ) if ( o->children() && ::tqt_cast<TQActionGroup*>(o) )
appendChildActions( (TQAction*)o, lst ); appendChildActions( (TQAction*)o, lst );
} }
} }
@ -210,7 +210,7 @@ static TQStringList flatActions( const TQPtrList<TQAction> &l )
while ( it.current() ) { while ( it.current() ) {
TQAction *action = it.current(); TQAction *action = it.current();
lst << action->name(); lst << action->name();
if ( action->children() && ::qt_cast<TQActionGroup*>(action) ) if ( action->children() && ::tqt_cast<TQActionGroup*>(action) )
appendChildActions( action, lst ); appendChildActions( action, lst );
++it; ++it;
} }
@ -232,9 +232,9 @@ SenderItem::SenderItem( TQTable *table, FormWindow *fw )
continue; continue;
} }
if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
!::qt_cast<TQLayoutWidget*>(it.current()) && !::tqt_cast<TQLayoutWidget*>(it.current()) &&
!::qt_cast<Spacer*>(it.current()) && !::tqt_cast<Spacer*>(it.current()) &&
!::qt_cast<SizeHandle*>(it.current()) && !::tqt_cast<SizeHandle*>(it.current()) &&
qstrcmp( it.current()->name(), "central widget" ) != 0 ) { qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
lst << it.current()->name(); lst << it.current()->name();
} }
@ -289,9 +289,9 @@ ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw )
continue; continue;
} }
if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) && if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
!::qt_cast<TQLayoutWidget*>(it.current()) && !::tqt_cast<TQLayoutWidget*>(it.current()) &&
!::qt_cast<Spacer*>(it.current()) && !::tqt_cast<Spacer*>(it.current()) &&
!::qt_cast<SizeHandle*>(it.current()) && !::tqt_cast<SizeHandle*>(it.current()) &&
qstrcmp( it.current()->name(), "central widget" ) != 0 ) { qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
lst << it.current()->name(); lst << it.current()->name();
} }
@ -353,7 +353,7 @@ void SignalItem::senderChanged( TQObject *sender )
TQStringList lst = TQStringList::fromStrList( sigs ); TQStringList lst = TQStringList::fromStrList( sigs );
if ( ::qt_cast<CustomWidget*>(sender) ) { if ( ::tqt_cast<CustomWidget*>(sender) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget(); MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget();
for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin(); for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin();
it != w->lstSignals.end(); ++it ) it != w->lstSignals.end(); ++it )
@ -415,7 +415,7 @@ bool SlotItem::ignoreSlot( const char* slot ) const
{ {
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
if ( qstrcmp( slot, "update()" ) == 0 && if ( qstrcmp( slot, "update()" ) == 0 &&
::qt_cast<TQDataBrowser*>(lastReceiver) ) ::tqt_cast<TQDataBrowser*>(lastReceiver) )
return FALSE; return FALSE;
#endif #endif
@ -485,7 +485,7 @@ void SlotItem::updateSlotList()
} }
} }
if ( ::qt_cast<CustomWidget*>(lastReceiver) ) { if ( ::tqt_cast<CustomWidget*>(lastReceiver) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget(); MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget();
for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin(); for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin();
it != w->lstSlots.end(); ++it ) { it != w->lstSlots.end(); ++it ) {

@ -197,7 +197,7 @@ TQPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const
while ( it.current() ) { while ( it.current() ) {
TQObject *obj = it.current(); TQObject *obj = it.current();
++it; ++it;
TQWidget *par = ::qt_cast<FormWindow*>(obj->parent()); TQWidget *par = ::tqt_cast<FormWindow*>(obj->parent());
if ( !obj->isWidgetType() || !par ) if ( !obj->isWidgetType() || !par )
continue; continue;
@ -964,7 +964,7 @@ void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const cha
void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name ) void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name )
{ {
if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
@ -984,7 +984,7 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name
void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a ) void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
{ {
if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) ) if ( !mw->child( 0, "MenuBarEditor" ) )
@ -997,7 +997,7 @@ void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu ) void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
{ {
if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) ) if ( !mw->child( 0, "MenuBarEditor" ) )
@ -1011,7 +1011,7 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name ) void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name )
{ {
if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQToolBar *tb = new TQDesignerToolBar( mw ); TQToolBar *tb = new TQDesignerToolBar( mw );
@ -1023,7 +1023,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n
void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a ) void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a )
{ {
if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" ); TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" );
@ -1035,7 +1035,7 @@ void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a
void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn ) void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn )
{ {
if ( !::qt_cast<TQMainWindow*>(formWindow->mainContainer()) ) if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return; return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer(); TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" ); TQDesignerToolBar *tb = (TQDesignerToolBar*)mw->child( tbn, "TQDesignerToolBar" );

@ -90,7 +90,7 @@ static void setCursorToAll( const TQCursor &c, TQWidget *start )
TQObjectList *l = (TQObjectList*)start->children(); TQObjectList *l = (TQObjectList*)start->children();
if ( l ) { if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) { for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() && !::qt_cast<SizeHandle*>(o) ) if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) )
setCursorToAll( c, ( (TQWidget*)o ) ); setCursorToAll( c, ( (TQWidget*)o ) );
} }
} }
@ -105,7 +105,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw )
TQObjectList *l = (TQObjectList*)start->children(); TQObjectList *l = (TQObjectList*)start->children();
if ( l ) { if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) { for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() && !::qt_cast<SizeHandle*>(o) ) if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) )
restoreCursors( ( (TQWidget*)o ), fw ); restoreCursors( ( (TQWidget*)o ), fw );
} }
} }
@ -544,7 +544,7 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w )
( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout ||
!insertedWidgets.find(w) ) ) !insertedWidgets.find(w) ) )
w = w->parentWidget(); w = w->parentWidget();
if ( ::qt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) {
e->accept(); e->accept();
mainwindow->popupFormWindowMenu( e->globalPos(), this ); mainwindow->popupFormWindowMenu( e->globalPos(), this );
} else { } else {
@ -656,7 +656,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
break; break;
validForBuddy = FALSE; validForBuddy = FALSE;
if ( currTool == BUDDY_TOOL ) { if ( currTool == BUDDY_TOOL ) {
if ( !::qt_cast<TQLabel*>(w) ) if ( !::tqt_cast<TQLabel*>(w) )
break; break;
clearSelection( FALSE ); clearSelection( FALSE );
validForBuddy = TRUE; validForBuddy = TRUE;
@ -698,7 +698,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
for (;;) { for (;;) {
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) ); int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) );
if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) &&
!::qt_cast<TQLayoutWidget*>(wid) && !::qt_cast<TQSplitter*>(wid) ) { !::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) {
insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it
break; break;
} else { } else {
@ -865,7 +865,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
wid = designerWidget( wid ); wid = designerWidget( wid );
if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
newendWidget = wid; newendWidget = wid;
if ( ::qt_cast<TQLayoutWidget*>(newendWidget) || ::qt_cast<Spacer*>(newendWidget) ) if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) )
newendWidget = (TQWidget*)endWidget; newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget; drawRecRect = newendWidget != endWidget;
if ( newendWidget && if ( newendWidget &&
@ -891,7 +891,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
newendWidget = wid; newendWidget = wid;
else else
newendWidget = 0; newendWidget = 0;
if ( ::qt_cast<TQLayoutWidget*>(newendWidget) || ::qt_cast<Spacer*>(newendWidget) ) if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) )
newendWidget = (TQWidget*)endWidget; newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget; drawRecRect = newendWidget != endWidget;
if ( !newendWidget ) if ( !newendWidget )
@ -977,12 +977,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
bool emitSelChanged = FALSE; bool emitSelChanged = FALSE;
for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) { for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) {
TQWidget *i = it.key(); TQWidget *i = it.key();
if ( !emitSelChanged && ::qt_cast<TQButton*>(i) ) { if ( !emitSelChanged && ::tqt_cast<TQButton*>(i) ) {
if ( ::qt_cast<TQButtonGroup*>(i->parentWidget()) || ::qt_cast<TQButtonGroup*>(wa) ) if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) )
emitSelChanged = TRUE; emitSelChanged = TRUE;
if ( !::qt_cast<TQButtonGroup*>(wa) ) { if ( !::tqt_cast<TQButtonGroup*>(wa) ) {
MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE ); MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE );
if ( ::qt_cast<TQButtonGroup*>(i->parentWidget()) ) if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) )
( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i );
} }
} }
@ -1194,7 +1194,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
return; return;
} }
if ( ::qt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) {
TQObject *opw = propertyWidget; TQObject *opw = propertyWidget;
propertyWidget = mainContainer(); propertyWidget = mainContainer();
if ( opw->isWidgetType() ) if ( opw->isWidgetType() )
@ -1203,7 +1203,7 @@ void FormWindow::selectWidget( TQObject *o, bool select )
return; return;
} }
if ( ::qt_cast<TQDesignerToolBar*>(o) ) if ( ::tqt_cast<TQDesignerToolBar*>(o) )
return; return;
if ( select ) { if ( select ) {
@ -1920,7 +1920,7 @@ void FormWindow::checkAccels()
find_accel( w->property( "title" ).toString(), accels, w ); find_accel( w->property( "title" ).toString(), accels, w );
if ( pageTitle ) if ( pageTitle )
find_accel( w->property( "pageTitle" ).toString(), accels, w ); find_accel( w->property( "pageTitle" ).toString(), accels, w );
} else if ( ::qt_cast<MenuBarEditor*>(o) ) { } else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
((MenuBarEditor *)o)->checkAccels( accels ); ((MenuBarEditor *)o)->checkAccels( accels );
} }
} }
@ -2129,7 +2129,7 @@ void FormWindow::breakLayout( TQWidget *w )
Command *cmd = breakLayoutCommand( w ); Command *cmd = breakLayoutCommand( w );
if ( cmd ) if ( cmd )
commands.insert( 0, cmd ); commands.insert( 0, cmd );
if ( !::qt_cast<TQLayoutWidget*>(w) && !::qt_cast<TQSplitter*>(w) ) if ( !::tqt_cast<TQLayoutWidget*>(w) && !::tqt_cast<TQSplitter*>(w) )
break; break;
} }
w = w->parentWidget(); w = w->parentWidget();
@ -2392,7 +2392,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
} }
} }
} }
if ( ::qt_cast<TQMainWindow*>(mainContainer()) && !found ) { if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && !found ) {
TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" ); TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" );
for ( TQObject *o = l->first(); o; o = l->next() ) { for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o != w && if ( o != w &&
@ -2406,7 +2406,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
} }
delete l; delete l;
} }
if ( ::qt_cast<TQMainWindow*>(mainContainer()) ) { if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) {
if ( !found ) { if ( !found ) {
TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE ); TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, TRUE );
for ( TQObject *o = l->first(); o; o = l->next() ) { for ( TQObject *o = l->first(); o; o = l->next() ) {
@ -2530,8 +2530,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
} }
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
if ( ::qt_cast<TQLayoutWidget*>(it.current()) if ( ::tqt_cast<TQLayoutWidget*>(it.current())
|| ::qt_cast<TQSplitter*>(it.current()) ) || ::tqt_cast<TQSplitter*>(it.current()) )
continue; continue;
if ( !it.current()->isVisibleTo( this ) ) if ( !it.current()->isVisibleTo( this ) )
continue; continue;
@ -2688,7 +2688,7 @@ DesignerFormWindow *FormWindow::iFace()
bool FormWindow::isCentralWidget( TQObject *w ) const bool FormWindow::isCentralWidget( TQObject *w ) const
{ {
if ( !::qt_cast<TQMainWindow*>(mainContainer()) ) if ( !::tqt_cast<TQMainWindow*>(mainContainer()) )
return FALSE; return FALSE;
return w == ( (TQMainWindow*)mainContainer() )->centralWidget(); return w == ( (TQMainWindow*)mainContainer() )->centralWidget();
} }

@ -256,12 +256,12 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( o->isWidgetType() ) { if ( o->isWidgetType() ) {
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
if ( !formWindow->widgets()->find( w ) ) { if ( !formWindow->widgets()->find( w ) ) {
if ( ::qt_cast<TQWidgetStack*>(w->parent()) ) { if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) {
if (::qt_cast<TQTabWidget*>(w->parent()->parent()) ) { if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
((TQTabWidget*)w->parent()->parent())->showPage( w ); ((TQTabWidget*)w->parent()->parent())->showPage( w );
o = (TQWidget*)w->parent()->parent(); o = (TQWidget*)w->parent()->parent();
formWindow->emitUpdateProperties( formWindow->currentWidget() ); formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else if ( ::qt_cast<TQWizard*>(w->parent()->parent()) ) { } else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) {
((TQDesignerWizard*)w->parent()->parent())-> ((TQDesignerWizard*)w->parent()->parent())->
setCurrentPage( ( (TQDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); setCurrentPage( ( (TQDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
o = (TQWidget*)w->parent()->parent(); o = (TQWidget*)w->parent()->parent();
@ -271,15 +271,15 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
if ( (TQWidgetStack*)w->parent()->isA( "TQDesignerWidgetStack" ) ) if ( (TQWidgetStack*)w->parent()->isA( "TQDesignerWidgetStack" ) )
( (TQDesignerWidgetStack*)w->parent() )->updateButtons(); ( (TQDesignerWidgetStack*)w->parent() )->updateButtons();
} }
} else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQDockWindow*>(w) ) { } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) {
formWindow->setActiveObject( w ); formWindow->setActiveObject( w );
} else if ( ::qt_cast<TQPopupMenu*>(w) ) { } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
return 0; // ### we could try to find our menu bar and change the currentMenu to our index return 0; // ### we could try to find our menu bar and change the currentMenu to our index
} else { } else {
return 0; return 0;
} }
} }
} else if ( ::qt_cast<TQAction*>(o) ) { } else if ( ::tqt_cast<TQAction*>(o) ) {
MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o );
deselect = TRUE; deselect = TRUE;
} }
@ -400,7 +400,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
return; return;
bool fakeMainWindow = FALSE; bool fakeMainWindow = FALSE;
if ( ::qt_cast<TQMainWindow*>(o) ) { if ( ::tqt_cast<TQMainWindow*>(o) ) {
TQObject *cw = ( (TQMainWindow*)o )->centralWidget(); TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
if ( cw ) { if ( cw ) {
o = cw; o = cw;
@ -409,7 +409,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
} }
TQListViewItem *item = 0; TQListViewItem *item = 0;
TQString className = WidgetFactory::classNameOf( o ); TQString className = WidgetFactory::classNameOf( o );
if ( ::qt_cast<TQLayoutWidget*>(o) ) { if ( ::tqt_cast<TQLayoutWidget*>(o) ) {
switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
case WidgetFactory::HBox: case WidgetFactory::HBox:
className = "HBox"; className = "HBox";
@ -431,16 +431,16 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
#endif #endif
TQString name = o->name(); TQString name = o->name();
if ( ::qt_cast<TQWidgetStack*>(o->parent()) ) { if ( ::tqt_cast<TQWidgetStack*>(o->parent()) ) {
if ( ::qt_cast<TQTabWidget*>(o->parent()->parent()) ) if ( ::tqt_cast<TQTabWidget*>(o->parent()->parent()) )
name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
else if ( ::qt_cast<TQWizard*>(o->parent()->parent()) ) else if ( ::tqt_cast<TQWizard*>(o->parent()->parent()) )
name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o );
} }
TQToolBox *tb; TQToolBox *tb;
if ( o->parent() && o->parent()->parent() && if ( o->parent() && o->parent()->parent() &&
(tb = ::qt_cast<TQToolBox*>(o->parent()->parent()->parent())) ) (tb = ::tqt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); name = tb->itemLabel( tb->indexOf((TQWidget*)o) );
if ( fakeMainWindow ) { if ( fakeMainWindow ) {
@ -455,18 +455,18 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
item->setOpen( TRUE ); item->setOpen( TRUE );
if ( !parent ) if ( !parent )
item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_form.png" ) ); item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_form.png" ) );
else if ( ::qt_cast<TQLayoutWidget*>(o) ) else if ( ::tqt_cast<TQLayoutWidget*>(o) )
item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_layout.png" )); item->setPixmap( 0, TQPixmap::fromMimeSource( "designer_layout.png" ));
else else
item->setPixmap( 0, WidgetDatabase::iconSet( item->setPixmap( 0, WidgetDatabase::iconSet(
WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
pixmap( TQIconSet::Small, TQIconSet::Normal ) ); pixmap( TQIconSet::Small, TQIconSet::Normal ) );
if ( ::qt_cast<TQAction*>(o) ) if ( ::tqt_cast<TQAction*>(o) )
item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() );
( (HierarchyItem*)item )->setObject( o ); ( (HierarchyItem*)item )->setObject( o );
const TQObjectList *l = o->children(); const TQObjectList *l = o->children();
if ( ::qt_cast<TQDesignerToolBar*>(o) ) if ( ::tqt_cast<TQDesignerToolBar*>(o) )
l = 0; l = 0;
if ( l ) { if ( l ) {
TQObjectListIt it( *l ); TQObjectListIt it( *l );
@ -476,13 +476,13 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
( (TQWidget*)it.current() )->isHidden() ) ( (TQWidget*)it.current() )->isHidden() )
continue; continue;
if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
if ( ::qt_cast<TQWidgetStack*>(it.current()->parent()) || if ( ::tqt_cast<TQWidgetStack*>(it.current()->parent()) ||
::qt_cast<TQWidgetStack*>(it.current()) ) { ::tqt_cast<TQWidgetStack*>(it.current()) ) {
TQObject *obj = it.current(); TQObject *obj = it.current();
TQDesignerTabWidget *tw = ::qt_cast<TQDesignerTabWidget*>(it.current()->parent()); TQDesignerTabWidget *tw = ::tqt_cast<TQDesignerTabWidget*>(it.current()->parent());
TQDesignerWizard *dw = ::qt_cast<TQDesignerWizard*>(it.current()->parent()); TQDesignerWizard *dw = ::tqt_cast<TQDesignerWizard*>(it.current()->parent());
TQWidgetStack *stack = 0; TQWidgetStack *stack = 0;
if ( dw || tw || ::qt_cast<TQWidgetStack*>(obj) ) if ( dw || tw || ::tqt_cast<TQWidgetStack*>(obj) )
stack = (TQWidgetStack*)obj; stack = (TQWidgetStack*)obj;
else else
stack = (TQWidgetStack*)obj->parent(); stack = (TQWidgetStack*)obj->parent();
@ -503,8 +503,8 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
insertObject( obj, item ); insertObject( obj, item );
} }
delete l2; delete l2;
} else if ( ::qt_cast<TQToolBox*>(it.current()->parent()) ) { } else if ( ::tqt_cast<TQToolBox*>(it.current()->parent()) ) {
if ( !::qt_cast<TQScrollView*>(it.current()) ) if ( !::tqt_cast<TQScrollView*>(it.current()) )
continue; continue;
TQToolBox *tb = (TQToolBox*)it.current()->parent(); TQToolBox *tb = (TQToolBox*)it.current()->parent();
for ( int i = tb->count() - 1; i >= 0; --i ) for ( int i = tb->count() - 1; i >= 0; --i )
@ -526,9 +526,9 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
for ( obj = l->first(); obj; obj = l->next() ) for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item ); insertObject( obj, item );
delete l; delete l;
} else if ( ::qt_cast<TQDesignerToolBar*>(o) || ::qt_cast<PopupMenuEditor*>(o) ) { } else if ( ::tqt_cast<TQDesignerToolBar*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ) {
TQPtrList<TQAction> actions; TQPtrList<TQAction> actions;
if ( ::qt_cast<TQDesignerToolBar*>(o) ) if ( ::tqt_cast<TQDesignerToolBar*>(o) )
actions = ( (TQDesignerToolBar*)o )->insertedActions(); actions = ( (TQDesignerToolBar*)o )->insertedActions();
else else
( (PopupMenuEditor*)o )->insertedActions( actions ); ( (PopupMenuEditor*)o )->insertedActions( actions );
@ -537,31 +537,31 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
it.toLast(); it.toLast();
while ( it.current() ) { while ( it.current() ) {
TQAction *a = it.current(); TQAction *a = it.current();
if ( ::qt_cast<TQDesignerAction*>(a) ) { if ( ::tqt_cast<TQDesignerAction*>(a) ) {
TQDesignerAction *da = (TQDesignerAction*)a; TQDesignerAction *da = (TQDesignerAction*)a;
if ( da->supportsMenu() ) if ( da->supportsMenu() )
insertObject( da, item ); insertObject( da, item );
else else
insertObject( da->widget(), item ); insertObject( da->widget(), item );
} else if ( ::qt_cast<TQDesignerActionGroup*>(a) ) { } else if ( ::tqt_cast<TQDesignerActionGroup*>(a) ) {
insertObject( a, item ); insertObject( a, item );
} }
--it; --it;
} }
} else if ( ::qt_cast<TQDesignerActionGroup*>(o) && o->children() ) { } else if ( ::tqt_cast<TQDesignerActionGroup*>(o) && o->children() ) {
TQObjectList *l = (TQObjectList*)o->children(); TQObjectList *l = (TQObjectList*)o->children();
for ( TQObject *obj = l->last(); obj; obj = l->prev() ) { for ( TQObject *obj = l->last(); obj; obj = l->prev() ) {
if ( ::qt_cast<TQDesignerAction*>(obj) ) { if ( ::tqt_cast<TQDesignerAction*>(obj) ) {
TQDesignerAction *da = (TQDesignerAction*)obj; TQDesignerAction *da = (TQDesignerAction*)obj;
if ( da->supportsMenu() ) if ( da->supportsMenu() )
insertObject( da, item ); insertObject( da, item );
else else
insertObject( da->widget(), item ); insertObject( da->widget(), item );
} else if ( ::qt_cast<TQDesignerActionGroup*>(obj) ) { } else if ( ::tqt_cast<TQDesignerActionGroup*>(obj) ) {
insertObject( obj, item ); insertObject( obj, item );
} }
} }
} else if ( ::qt_cast<MenuBarEditor*>(o) ) { } else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
MenuBarEditor *mb = (MenuBarEditor*)o; MenuBarEditor *mb = (MenuBarEditor*)o;
for ( int i = mb->count() -1; i >= 0; --i ) { for ( int i = mb->count() -1; i >= 0; --i ) {
MenuBarEditorItem *md = mb->item( i ); MenuBarEditorItem *md = mb->item( i );
@ -602,7 +602,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
if ( w->isVisibleTo( formWindow ) ) { if ( w->isVisibleTo( formWindow ) ) {
if ( !::qt_cast<TQTabWidget*>(w) && !::qt_cast<TQWizard*>(w) ) { if ( !::tqt_cast<TQTabWidget*>(w) && !::tqt_cast<TQWizard*>(w) ) {
if ( !normalMenu ) if ( !normalMenu )
normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this );
normalMenu->popup( p ); normalMenu->popup( p );
@ -623,14 +623,14 @@ void HierarchyList::addTabPage()
if ( !o || !o->isWidgetType() ) if ( !o || !o->isWidgetType() )
return; return;
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
if ( ::qt_cast<TQTabWidget*>(w) ) { if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w; TQTabWidget *tw = (TQTabWidget*)w;
AddTabPageCommand *cmd = new AddTabPageCommand( tr( "Add Page to %1" ). AddTabPageCommand *cmd = new AddTabPageCommand( tr( "Add Page to %1" ).
arg( tw->name() ), formWindow, arg( tw->name() ), formWindow,
tw, "Tab" ); tw, "Tab" );
formWindow->commandHistory()->addCommand( cmd ); formWindow->commandHistory()->addCommand( cmd );
cmd->execute(); cmd->execute();
} else if ( ::qt_cast<TQWizard*>(w) ) { } else if ( ::tqt_cast<TQWizard*>(w) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
AddWizardPageCommand *cmd = new AddWizardPageCommand( tr( "Add Page to %1" ). AddWizardPageCommand *cmd = new AddWizardPageCommand( tr( "Add Page to %1" ).
arg( wiz->name() ), formWindow, arg( wiz->name() ), formWindow,
@ -646,7 +646,7 @@ void HierarchyList::removeTabPage()
if ( !o || !o->isWidgetType() ) if ( !o || !o->isWidgetType() )
return; return;
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
if ( ::qt_cast<TQTabWidget*>(w) ) { if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w; TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) { if ( tw->currentPage() ) {
TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw; TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw;
@ -657,7 +657,7 @@ void HierarchyList::removeTabPage()
formWindow->commandHistory()->addCommand( cmd ); formWindow->commandHistory()->addCommand( cmd );
cmd->execute(); cmd->execute();
} }
} else if ( ::qt_cast<TQWizard*>(w) ) { } else if ( ::tqt_cast<TQWizard*>(w) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) { if ( wiz->currentPage() ) {
TQDesignerWizard *dw = (TQDesignerWizard*)wiz; TQDesignerWizard *dw = (TQDesignerWizard*)wiz;
@ -1437,7 +1437,7 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & )
void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
{ {
TQWidget *w2 = w; TQWidget *w2 = w;
if ( ::qt_cast<TQMainWindow*>(w) ) if ( ::tqt_cast<TQMainWindow*>(w) )
w2 = ( (TQMainWindow*)w )->centralWidget(); w2 = ( (TQMainWindow*)w )->centralWidget();
listview->changeNameOf( w2, w->name() ); listview->changeNameOf( w2, w->name() );
} }

@ -174,7 +174,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent )
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->raise(); w->raise();
needMove = !layoutBase; needMove = !layoutBase;
needReparent = needMove || ::qt_cast<TQLayoutWidget*>(layoutBase) || ::qt_cast<TQSplitter*>(layoutBase); needReparent = needMove || ::tqt_cast<TQLayoutWidget*>(layoutBase) || ::tqt_cast<TQSplitter*>(layoutBase);
if ( !layoutBase ) { if ( !layoutBase ) {
if ( !useSplitter ) if ( !useSplitter )
layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ), layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ),
@ -223,7 +223,7 @@ void Layout::undoLayout()
} }
formWindow->selectWidget( layoutBase, FALSE ); formWindow->selectWidget( layoutBase, FALSE );
WidgetFactory::deleteLayout( layoutBase ); WidgetFactory::deleteLayout( layoutBase );
if ( parent != layoutBase && !::qt_cast<TQMainWindow*>(layoutBase) ) { if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) {
layoutBase->hide(); layoutBase->hide();
TQString n = layoutBase->name(); TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" ); n.prepend( "qt_dead_widget_" );
@ -328,13 +328,13 @@ void HorizontalLayout::doLayout()
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
else else
layout->addWidget( w ); layout->addWidget( w );
if ( ::qt_cast<TQLayoutWidget*>(w) ) if ( ::tqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy(); ( (TQLayoutWidget*)w )->updateSizePolicy();
} }
w->show(); w->show();
} }
if ( ::qt_cast<TQSplitter*>(layoutBase) ) if ( ::tqt_cast<TQSplitter*>(layoutBase) )
( (TQSplitter*)layoutBase )->setOrientation( TQt::Horizontal ); ( (TQSplitter*)layoutBase )->setOrientation( TQt::Horizontal );
finishLayout( needMove, layout ); finishLayout( needMove, layout );
@ -392,13 +392,13 @@ void VerticalLayout::doLayout()
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() ); layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
else else
layout->addWidget( w ); layout->addWidget( w );
if ( ::qt_cast<TQLayoutWidget*>(w) ) if ( ::tqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy(); ( (TQLayoutWidget*)w )->updateSizePolicy();
} }
w->show(); w->show();
} }
if ( ::qt_cast<TQSplitter*>(layoutBase) ) if ( ::tqt_cast<TQSplitter*>(layoutBase) )
( (TQSplitter*)layoutBase )->setOrientation( TQt::Vertical ); ( (TQSplitter*)layoutBase )->setOrientation( TQt::Vertical );
finishLayout( needMove, layout ); finishLayout( needMove, layout );
@ -766,11 +766,11 @@ void GridLayout::doLayout()
if ( needReparent && w->parent() != layoutBase ) if ( needReparent && w->parent() != layoutBase )
w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
if ( rs * cs == 1 ) { if ( rs * cs == 1 ) {
layout->addWidget( w, r, c, ::qt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 ); layout->addWidget( w, r, c, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
} else { } else {
layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::qt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 ); layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
} }
if ( ::qt_cast<TQLayoutWidget*>(w) ) if ( ::tqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy(); ( (TQLayoutWidget*)w )->updateSizePolicy();
w->show(); w->show();
} else { } else {

@ -911,7 +911,7 @@ void MainWindow::showProperties( TQObject *o )
} }
if ( currentTool() == POINTER_TOOL && fw && if ( currentTool() == POINTER_TOOL && fw &&
( !qworkspace->activeWindow() || !::qt_cast<SourceEditor*>(qworkspace->activeWindow()) ) ) ( !qworkspace->activeWindow() || !::tqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) )
fw->setFocus(); fw->setFocus();
} }
@ -928,21 +928,21 @@ void MainWindow::updateProperties( TQObject * )
bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( ::qt_cast<MenuBarEditor*>(o) || ::qt_cast<PopupMenuEditor*>(o) || if ( ::tqt_cast<MenuBarEditor*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ||
( o && ( o &&
( ::qt_cast<MenuBarEditor*>(o->parent()) || ( ::tqt_cast<MenuBarEditor*>(o->parent()) ||
::qt_cast<PopupMenuEditor*>(o->parent()) ) ) ) { ::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
if ( e->type() == TQEvent::Accel && ::qt_cast<PopupMenuEditor*>(o) ) { if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) {
return TRUE; // consume accel events return TRUE; // consume accel events
} else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<MenuBarEditor*>(o) ) { } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) {
TQPoint pos = ((TQMouseEvent*)e)->pos(); TQPoint pos = ((TQMouseEvent*)e)->pos();
MenuBarEditor *m = ::qt_cast<MenuBarEditor*>(o); MenuBarEditor *m = ::tqt_cast<MenuBarEditor*>(o);
showProperties( o ); showProperties( o );
if ( m->findItem( pos ) >= m->count() ) if ( m->findItem( pos ) >= m->count() )
m->setFocus(); m->setFocus();
} else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<PopupMenuEditor*>(o) ) { } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<PopupMenuEditor*>(o) ) {
PopupMenuEditor *m = ::qt_cast<PopupMenuEditor*>(o); PopupMenuEditor *m = ::tqt_cast<PopupMenuEditor*>(o);
PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() );
if ( m->find( i->action() ) != -1 && !i->isSeparator() ) if ( m->find( i->action() ) != -1 && !i->isSeparator() )
showProperties( i->action() ); showProperties( i->action() );
@ -961,7 +961,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) {
w = (TQWidget*)o; w = (TQWidget*)o;
while ( w ) { while ( w ) {
if ( ::qt_cast<PropertyList*>(w) ) if ( ::tqt_cast<PropertyList*>(w) )
break; break;
w = w->parentWidget( TRUE ); w = w->parentWidget( TRUE );
} }
@ -977,7 +977,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
( (TQKeyEvent*)e )->key() == Key_E ) && ( (TQKeyEvent*)e )->key() == Key_E ) &&
( (TQKeyEvent*)e )->state() & ControlButton ) { ( (TQKeyEvent*)e )->state() & ControlButton ) {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (TQKeyEvent*)e )->ignore(); ( (TQKeyEvent*)e )->ignore();
return TRUE; return TRUE;
} }
@ -986,44 +986,44 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::ContextMenu: case TQEvent::ContextMenu:
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
if ( o && currentTool() == POINTER_TOOL && if ( o && currentTool() == POINTER_TOOL &&
( ::qt_cast<MenuBarEditor*>(o) || ( ::tqt_cast<MenuBarEditor*>(o) ||
::qt_cast<PopupMenuEditor*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ||
::qt_cast<TQDesignerToolBar*>(o) || ::tqt_cast<TQDesignerToolBar*>(o) ||
( ::qt_cast<TQComboBox*>(o) || ( ::tqt_cast<TQComboBox*>(o) ||
::qt_cast<TQToolButton*>(o) || ::tqt_cast<TQToolButton*>(o) ||
::qt_cast<TQDesignerToolBarSeparator*>(o) ) && ::tqt_cast<TQDesignerToolBarSeparator*>(o) ) &&
o->parent() o->parent()
&& ( ::qt_cast<TQDesignerToolBar*>(o->parent()) && ( ::tqt_cast<TQDesignerToolBar*>(o->parent())
|| ::qt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) { || ::tqt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) {
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
if ( ::qt_cast<TQToolButton*>(w) || if ( ::tqt_cast<TQToolButton*>(w) ||
::qt_cast<TQComboBox*>(w) || ::tqt_cast<TQComboBox*>(w) ||
::qt_cast<PopupMenuEditor*>(w) || ::tqt_cast<PopupMenuEditor*>(w) ||
::qt_cast<TQDesignerToolBarSeparator*>(w) ) ::tqt_cast<TQDesignerToolBarSeparator*>(w) )
w = w->parentWidget(); w = w->parentWidget();
TQWidget *pw = w->parentWidget(); TQWidget *pw = w->parentWidget();
while ( pw ) { while ( pw ) {
if ( ::qt_cast<FormWindow*>(pw) ) { if ( ::tqt_cast<FormWindow*>(pw) ) {
( (FormWindow*)pw )->emitShowProperties( w ); ( (FormWindow*)pw )->emitShowProperties( w );
if ( !::qt_cast<TQDesignerToolBar*>(o) ) if ( !::tqt_cast<TQDesignerToolBar*>(o) )
return ( !::qt_cast<TQToolButton*>(o) && return ( !::tqt_cast<TQToolButton*>(o) &&
!::qt_cast<MenuBarEditor*>(o) && !::tqt_cast<MenuBarEditor*>(o) &&
!::qt_cast<TQComboBox*>(o) && !::tqt_cast<TQComboBox*>(o) &&
!::qt_cast<TQDesignerToolBarSeparator*>(o) ); !::tqt_cast<TQDesignerToolBarSeparator*>(o) );
} }
pw = pw->parentWidget(); pw = pw->parentWidget();
} }
} }
if ( o && ( ::qt_cast<TQDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") ) if ( o && ( ::tqt_cast<TQDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") )
&& e->type() == TQEvent::ContextMenu ) && e->type() == TQEvent::ContextMenu )
break; break;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break; break;
if ( ::qt_cast<TQSizeGrip*>(o) ) if ( ::tqt_cast<TQSizeGrip*>(o) )
break; break;
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
if ( !w->hasFocus() ) if ( !w->hasFocus() )
w->setFocus(); w->setFocus();
@ -1048,11 +1048,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
lastPressWidget = 0; lastPressWidget = 0;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break; break;
if ( ::qt_cast<TQSizeGrip*>(o) ) if ( ::tqt_cast<TQSizeGrip*>(o) )
break; break;
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o ); passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor ) if ( !passiveInteractor )
@ -1068,15 +1068,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
break; break;
w = isAFormWindowChild( o ); w = isAFormWindowChild( o );
if ( lastPressWidget != (TQWidget*)o && w && if ( lastPressWidget != (TQWidget*)o && w &&
!::qt_cast<SizeHandle*>(o) && !::qt_cast<OrderIndicator*>(o) && !::tqt_cast<SizeHandle*>(o) && !::tqt_cast<OrderIndicator*>(o) &&
!::qt_cast<PopupMenuEditor*>(o) && !::qt_cast<TQMenuBar*>(o) && !::tqt_cast<PopupMenuEditor*>(o) && !::tqt_cast<TQMenuBar*>(o) &&
!::qt_cast<TQSizeGrip*>(o) ) !::tqt_cast<TQSizeGrip*>(o) )
return TRUE; return TRUE;
if ( o && ::qt_cast<TQSizeGrip*>(o) ) if ( o && ::tqt_cast<TQSizeGrip*>(o) )
break; break;
if ( lastPressWidget != (TQWidget*)o || if ( lastPressWidget != (TQWidget*)o ||
( !w || ::qt_cast<SizeHandle*>(o) ) || ( !w || ::tqt_cast<SizeHandle*>(o) ) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o ); passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor ) if ( !passiveInteractor )
@ -1089,14 +1089,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
return FALSE; return FALSE;
} }
if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) {
if ( ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
qWorkspace()->activeWindow()->setFocus(); qWorkspace()->activeWindow()->setFocus();
return TRUE; return TRUE;
} }
} }
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
if ( ((TQKeyEvent*)e)->isAccepted() ) if ( ((TQKeyEvent*)e)->isAccepted() )
@ -1104,10 +1104,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
break; break;
case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonDblClick:
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) { ::tqt_cast<OrderIndicator*>(o) ) {
if ( ::qt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() && if ( ::tqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() &&
o->parent() && ::qt_cast<TQToolBar*>(o->parent()) && formWindow() ) o->parent() && ::tqt_cast<TQToolBar*>(o->parent()) && formWindow() )
formWindow()->setToolFixed(); formWindow()->setToolFixed();
break; break;
} }
@ -1121,8 +1121,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
return TRUE; return TRUE;
case TQEvent::KeyRelease: case TQEvent::KeyRelease:
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
if ( ((TQKeyEvent*)e)->isAccepted() ) if ( ((TQKeyEvent*)e)->isAccepted() )
@ -1130,8 +1130,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
break; break;
case TQEvent::Hide: case TQEvent::Hide:
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
if ( ( (FormWindow*)w )->isWidgetSelected( (TQWidget*)o ) ) if ( ( (FormWindow*)w )->isWidgetSelected( (TQWidget*)o ) )
( (FormWindow*)w )->selectWidget( (TQWidget*)o, FALSE ); ( (FormWindow*)w )->selectWidget( (TQWidget*)o, FALSE );
@ -1139,16 +1139,16 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::Enter: case TQEvent::Enter:
case TQEvent::Leave: case TQEvent::Leave:
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) || ::tqt_cast<OrderIndicator*>(o) ||
::qt_cast<MenuBarEditor*>(o) ) ::tqt_cast<MenuBarEditor*>(o) )
break; break;
return TRUE; return TRUE;
case TQEvent::Resize: case TQEvent::Resize:
case TQEvent::Move: case TQEvent::Move:
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) {
( (FormWindow*)w )->updateSelection( (TQWidget*)o ); ( (FormWindow*)w )->updateSelection( (TQWidget*)o );
@ -1194,33 +1194,33 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
return TRUE; return TRUE;
case TQEvent::Wheel: case TQEvent::Wheel:
if ( !( w = isAFormWindowChild( o ) ) || if ( !( w = isAFormWindowChild( o ) ) ||
::qt_cast<SizeHandle*>(o) || ::tqt_cast<SizeHandle*>(o) ||
::qt_cast<OrderIndicator*>(o) ) ::tqt_cast<OrderIndicator*>(o) )
break; break;
return TRUE; return TRUE;
case TQEvent::FocusIn: case TQEvent::FocusIn:
if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
return TRUE; //FIXME return TRUE; //FIXME
if ( hierarchyView->formDefinitionView()->isRenaming() if ( hierarchyView->formDefinitionView()->isRenaming()
&& ( o->inherits( "Editor" ) || ::qt_cast<FormWindow*>(o) ) ) && ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) )
TQApplication::sendPostedEvents(); TQApplication::sendPostedEvents();
if ( o->inherits( "Editor" ) ) { if ( o->inherits( "Editor" ) ) {
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
while ( w ) { while ( w ) {
if ( ::qt_cast<SourceEditor*>(w) ) if ( ::tqt_cast<SourceEditor*>(w) )
break; break;
w = w->parentWidget( TRUE ); w = w->parentWidget( TRUE );
} }
if ( ::qt_cast<SourceEditor*>(w) ) if ( ::tqt_cast<SourceEditor*>(w) )
( (SourceEditor*)w )->checkTimeStamp(); ( (SourceEditor*)w )->checkTimeStamp();
} else if ( ::qt_cast<FormWindow*>(o) ) { } else if ( ::tqt_cast<FormWindow*>(o) ) {
FormWindow *fw = (FormWindow*)o; FormWindow *fw = (FormWindow*)o;
if ( fw->formFile() && fw->formFile()->editor() ) if ( fw->formFile() && fw->formFile()->editor() )
fw->formFile()->editor()->checkTimeStamp(); fw->formFile()->editor()->checkTimeStamp();
} }
break; break;
case TQEvent::FocusOut: case TQEvent::FocusOut:
if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) ) if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
return TRUE; return TRUE;
break; break;
default: default:
@ -1232,10 +1232,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
{ {
if ( ::qt_cast<TQWizard*>(o->parent()) && !::qt_cast<TQPushButton*>(o) ) if ( ::tqt_cast<TQWizard*>(o->parent()) && !::tqt_cast<TQPushButton*>(o) )
return 0; return 0;
while ( o ) { while ( o ) {
if ( ::qt_cast<FormWindow*>(o) ) if ( ::tqt_cast<FormWindow*>(o) )
return (TQWidget*)o; return (TQWidget*)o;
o = o->parent(); o = o->parent();
} }
@ -1245,9 +1245,9 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const
{ {
while ( o ) { while ( o ) {
if ( ::qt_cast<TQDesignerToolBar*>(o) ) if ( ::tqt_cast<TQDesignerToolBar*>(o) )
return (TQWidget*)o; return (TQWidget*)o;
if ( ::qt_cast<FormWindow*>(o) ) if ( ::tqt_cast<FormWindow*>(o) )
return 0; return 0;
o = o->parent(); o = o->parent();
} }
@ -1258,7 +1258,7 @@ FormWindow *MainWindow::formWindow()
{ {
if ( qworkspace->activeWindow() ) { if ( qworkspace->activeWindow() ) {
FormWindow *fw = 0; FormWindow *fw = 0;
if ( ::qt_cast<FormWindow*>(qworkspace->activeWindow()) ) if ( ::tqt_cast<FormWindow*>(qworkspace->activeWindow()) )
fw = (FormWindow*)qworkspace->activeWindow(); fw = (FormWindow*)qworkspace->activeWindow();
else if ( lastActiveFormWindow && else if ( lastActiveFormWindow &&
qworkspace->windowList().find( lastActiveFormWindow ) != -1) qworkspace->windowList().find( lastActiveFormWindow ) != -1)
@ -1370,7 +1370,7 @@ bool MainWindow::unregisterClient( FormWindow *w )
void MainWindow::activeWindowChanged( TQWidget *w ) void MainWindow::activeWindowChanged( TQWidget *w )
{ {
TQWidget *old = formWindow(); TQWidget *old = formWindow();
if ( ::qt_cast<FormWindow*>(w) ) { if ( ::tqt_cast<FormWindow*>(w) ) {
FormWindow *fw = (FormWindow*)w; FormWindow *fw = (FormWindow*)w;
FormWindow *ofw = lastActiveFormWindow; FormWindow *ofw = lastActiveFormWindow;
lastActiveFormWindow = fw; lastActiveFormWindow = fw;
@ -1384,13 +1384,13 @@ void MainWindow::activeWindowChanged( TQWidget *w )
} }
workspace()->activeFormChanged( fw ); workspace()->activeFormChanged( fw );
setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), setAppropriate( (TQDockWindow*)actionEditor->parentWidget(),
::qt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) ); ::tqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) );
if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) {
if ( actionEditor->wantToBeShown() ) if ( actionEditor->wantToBeShown() )
actionEditor->parentWidget()->show(); actionEditor->parentWidget()->show();
} else { } else {
TQWidget *mc = 0; TQWidget *mc = 0;
if ( ofw && (mc = ofw->mainContainer()) && ::qt_cast<TQMainWindow*>(mc) ) if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast<TQMainWindow*>(mc) )
actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() );
actionEditor->parentWidget()->hide(); actionEditor->parentWidget()->hide();
} }
@ -1425,7 +1425,7 @@ void MainWindow::activeWindowChanged( TQWidget *w )
selectionChanged(); selectionChanged();
if ( ::qt_cast<SourceEditor*>(w) ) { if ( ::tqt_cast<SourceEditor*>(w) ) {
SourceEditor *se = (SourceEditor*)w; SourceEditor *se = (SourceEditor*)w;
TQGuardedPtr<FormWindow> fw = se->formWindow(); TQGuardedPtr<FormWindow> fw = se->formWindow();
if ( se->formWindow() && if ( se->formWindow() &&
@ -1480,7 +1480,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
const TQString &undoCmd, const TQString &redoCmd ) const TQString &undoCmd, const TQString &redoCmd )
{ {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; // do not set a formWindow related command return; // do not set a formWindow related command
actionEditUndo->setEnabled( undoAvailable ); actionEditUndo->setEnabled( undoAvailable );
actionEditRedo->setEnabled( redoAvailable ); actionEditRedo->setEnabled( redoAvailable );
@ -1505,7 +1505,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
void MainWindow::updateEditorUndoRedo() void MainWindow::updateEditorUndoRedo()
{ {
if ( !qWorkspace()->activeWindow() || if ( !qWorkspace()->activeWindow() ||
!::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow();
actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); actionEditUndo->setEnabled( editor->editIsUndoAvailable() );
@ -1581,7 +1581,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
ids << ( id = rmbWidgets->insertItem( tr("Choose Pixmap..."), -1, 0) ); ids << ( id = rmbWidgets->insertItem( tr("Choose Pixmap..."), -1, 0) );
props.insert( "pixmap", id ); props.insert( "pixmap", id );
} }
if ( text && text->designable(w) && !::qt_cast<TQTextEdit*>(w) ) { if ( text && text->designable(w) && !::tqt_cast<TQTextEdit*>(w) ) {
ids << ( id = rmbWidgets->insertItem( tr("Edit Text..."), -1, 0) ); ids << ( id = rmbWidgets->insertItem( tr("Edit Text..."), -1, 0) );
props.insert( "text", id ); props.insert( "text", id );
} }
@ -1617,7 +1617,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
{ {
int id; int id;
if ( ::qt_cast<TQTabWidget*>(w) ) { if ( ::tqt_cast<TQTabWidget*>(w) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 ); ids << rmbWidgets->insertSeparator( 0 );
if ( ( (TQDesignerTabWidget*)w )->count() > 1) { if ( ( (TQDesignerTabWidget*)w )->count() > 1) {
@ -1626,7 +1626,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
} }
ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) );
commands.insert( "add", id ); commands.insert( "add", id );
} else if ( ::qt_cast<TQDesignerWidgetStack*>(w) ) { } else if ( ::tqt_cast<TQDesignerWidgetStack*>(w) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 ); ids << rmbWidgets->insertSeparator( 0 );
if ( ( (TQDesignerWidgetStack*)w )->count() > 1) { if ( ( (TQDesignerWidgetStack*)w )->count() > 1) {
@ -1640,7 +1640,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
} }
ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) ); ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) );
commands.insert( "add", id ); commands.insert( "add", id );
} else if ( ::qt_cast<TQToolBox*>(w) ) { } else if ( ::tqt_cast<TQToolBox*>(w) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 ); ids << rmbWidgets->insertSeparator( 0 );
if ( ( (TQToolBox*)w )->count() > 1 ) { if ( ( (TQToolBox*)w )->count() > 1 ) {
@ -1688,7 +1688,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
{ {
int id; int id;
if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) { if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 ); ids << rmbFormWindow->insertSeparator( 0 );
@ -1706,7 +1706,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
ids << ( id = rmbFormWindow->insertItem( tr("Edit Pages..."), -1, 0 ) ); ids << ( id = rmbFormWindow->insertItem( tr("Edit Pages..."), -1, 0 ) );
commands.insert( "edit", id ); commands.insert( "edit", id );
} else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) { } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
if ( ids.isEmpty() ) if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 ); ids << rmbFormWindow->insertSeparator( 0 );
ids << ( id = rmbFormWindow->insertItem( tr( "Add Menu Item" ), -1, 0 ) ); ids << ( id = rmbFormWindow->insertItem( tr( "Add Menu Item" ), -1, 0 ) );
@ -1721,7 +1721,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
if ( id == props[ "text" ] ) { if ( id == props[ "text" ] ) {
bool ok = FALSE; bool ok = FALSE;
bool oldDoWrap = FALSE; bool oldDoWrap = FALSE;
if ( ::qt_cast<TQLabel*>(w) ) { if ( ::tqt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt(); int align = w->property( "alignment" ).toInt();
if ( align & WordBreak ) if ( align & WordBreak )
oldDoWrap = TRUE; oldDoWrap = TRUE;
@ -1729,8 +1729,8 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
bool doWrap = oldDoWrap; bool doWrap = oldDoWrap;
TQString text; TQString text;
if ( ::qt_cast<TQTextView*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) { if ( ::tqt_cast<TQTextView*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) {
text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::qt_cast<TQButton*>(w), &doWrap ); text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqt_cast<TQButton*>(w), &doWrap );
ok = !text.isNull(); ok = !text.isNull();
} else { } else {
text = TQInputDialog::getText( tr("Text"), tr( "New text" ), text = TQInputDialog::getText( tr("Text"), tr( "New text" ),
@ -1799,7 +1799,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w ) void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w )
{ {
if ( ::qt_cast<TQTabWidget*>(w) ) { if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w; TQTabWidget *tw = (TQTabWidget*)w;
if ( id == commands[ "add" ] ) { if ( id == commands[ "add" ] ) {
AddTabPageCommand *cmd = AddTabPageCommand *cmd =
@ -1818,7 +1818,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute(); cmd->execute();
} }
} }
} else if ( ::qt_cast<TQToolBox*>(w) ) { } else if ( ::tqt_cast<TQToolBox*>(w) ) {
TQToolBox *tb = (TQToolBox*)w; TQToolBox *tb = (TQToolBox*)w;
if ( id == commands[ "add" ] ) { if ( id == commands[ "add" ] ) {
AddToolBoxPageCommand *cmd = AddToolBoxPageCommand *cmd =
@ -1838,7 +1838,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute(); cmd->execute();
} }
} }
} else if ( ::qt_cast<TQWidgetStack*>(w) ) { } else if ( ::tqt_cast<TQWidgetStack*>(w) ) {
TQDesignerWidgetStack *ws = (TQDesignerWidgetStack*)w; TQDesignerWidgetStack *ws = (TQDesignerWidgetStack*)w;
if ( id == commands[ "add" ] ) { if ( id == commands[ "add" ] ) {
AddWidgetStackPageCommand *cmd = AddWidgetStackPageCommand *cmd =
@ -1939,7 +1939,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw ) void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw )
{ {
if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) { if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
TQWizard *wiz = (TQWizard*)fw->mainContainer(); TQWizard *wiz = (TQWizard*)fw->mainContainer();
if ( id == commands[ "add" ] ) { if ( id == commands[ "add" ] ) {
AddWizardPageCommand *cmd = AddWizardPageCommand *cmd =
@ -1977,7 +1977,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute(); cmd->execute();
} }
} }
} else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) { } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
if ( id == commands[ "add_toolbar" ] ) { if ( id == commands[ "add_toolbar" ] ) {
AddToolBarCommand *cmd = AddToolBarCommand *cmd =
@ -1998,7 +1998,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
void MainWindow::clipboardChanged() void MainWindow::clipboardChanged()
{ {
TQString text( tqApp->clipboard()->text() ); TQString text( tqApp->clipboard()->text() );
if (qWorkspace()->activeWindow() && ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow())) { if (qWorkspace()->activeWindow() && ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow())) {
actionEditPaste->setEnabled(!text.isEmpty()); actionEditPaste->setEnabled(!text.isEmpty());
} else { } else {
TQString start( "<!DOCTYPE UI-SELECTION>" ); TQString start( "<!DOCTYPE UI-SELECTION>" );
@ -2494,7 +2494,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
while ( wit.current() ) { while ( wit.current() ) {
TQWidget *w = wit.current(); TQWidget *w = wit.current();
++wit; ++wit;
if ( ::qt_cast<FormWindow*>(w) ) { if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->formFile()->editor() ) if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
if ( ( (FormWindow*)w )->formFile()->formWindow() ) if ( ( (FormWindow*)w )->formFile()->formWindow() )
@ -2503,7 +2503,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
e->ignore(); e->ignore();
return; return;
} }
} else if ( ::qt_cast<SourceEditor*>(w) ) { } else if ( ::tqt_cast<SourceEditor*>(w) ) {
if ( !( (SourceEditor*)w )->close() ) { if ( !( (SourceEditor*)w )->close() ) {
e->ignore(); e->ignore();
return; return;
@ -2627,7 +2627,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
if ( text && text->designable(w) ) { if ( text && text->designable(w) ) {
bool ok = FALSE; bool ok = FALSE;
bool oldDoWrap = FALSE; bool oldDoWrap = FALSE;
if ( ::qt_cast<TQLabel*>(w) ) { if ( ::tqt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt(); int align = w->property( "alignment" ).toInt();
if ( align & WordBreak ) if ( align & WordBreak )
oldDoWrap = TRUE; oldDoWrap = TRUE;
@ -2635,9 +2635,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
bool doWrap = oldDoWrap; bool doWrap = oldDoWrap;
TQString text; TQString text;
if ( ::qt_cast<TQTextEdit*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) { if ( ::tqt_cast<TQTextEdit*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) {
text = MultiLineEditor::getText( this, w->property( "text" ).toString(), text = MultiLineEditor::getText( this, w->property( "text" ).toString(),
!::qt_cast<TQButton*>(w), &doWrap ); !::tqt_cast<TQButton*>(w), &doWrap );
ok = !text.isNull(); ok = !text.isNull();
} else { } else {
text = TQInputDialog::getText( tr("Text"), tr( "New text" ), text = TQInputDialog::getText( tr("Text"), tr( "New text" ),
@ -2751,7 +2751,7 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid )
{ {
TQWidgetList windows = qWorkspace()->windowList(); TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( ::qt_cast<FormWindow*>(w) ) { if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) )
return TRUE; return TRUE;
} }
@ -2766,7 +2766,7 @@ void MainWindow::setGrid( const TQPoint &p )
grd = p; grd = p;
TQWidgetList windows = qWorkspace()->windowList(); TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( !::qt_cast<FormWindow*>(w) ) if ( !::tqt_cast<FormWindow*>(w) )
continue; continue;
( (FormWindow*)w )->mainContainer()->update(); ( (FormWindow*)w )->mainContainer()->update();
} }
@ -2779,7 +2779,7 @@ void MainWindow::setShowGrid( bool b )
sGrid = b; sGrid = b;
TQWidgetList windows = qWorkspace()->windowList(); TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( !::qt_cast<FormWindow*>(w) ) if ( !::tqt_cast<FormWindow*>(w) )
continue; continue;
( (FormWindow*)w )->mainContainer()->update(); ( (FormWindow*)w )->mainContainer()->update();
} }
@ -2865,48 +2865,48 @@ void MainWindow::showDialogHelp()
TQString link = documentationPath() + "/designer-manual-13.html#"; TQString link = documentationPath() + "/designer-manual-13.html#";
if ( ::qt_cast<NewFormBase*>(w) || ::qt_cast<StartDialogBase*>(w) ) // own doc for startdialog? if ( ::tqt_cast<NewFormBase*>(w) || ::tqt_cast<StartDialogBase*>(w) ) // own doc for startdialog?
link += "dialog-file-new"; link += "dialog-file-new";
else if ( ::qt_cast<CreateTemplate*>(w) ) else if ( ::tqt_cast<CreateTemplate*>(w) )
link += "dialog-file-create-template"; link += "dialog-file-create-template";
else if ( ::qt_cast<EditFunctionsBase*>(w) ) else if ( ::tqt_cast<EditFunctionsBase*>(w) )
link += "dialog-edit-functions"; link += "dialog-edit-functions";
// else if ( ::qt_cast<ConnectionViewerBase*>(w) ) // else if ( ::tqt_cast<ConnectionViewerBase*>(w) )
else if ( w->inherits("ConnectionViewerBase") ) else if ( w->inherits("ConnectionViewerBase") )
link += "dialog-view-connections"; link += "dialog-view-connections";
else if ( ::qt_cast<FormSettingsBase*>(w) ) else if ( ::tqt_cast<FormSettingsBase*>(w) )
link += "dialog-edit-form-settings"; link += "dialog-edit-form-settings";
else if ( ::qt_cast<Preferences*>(w) ) else if ( ::tqt_cast<Preferences*>(w) )
link += "dialog-edit-preferences"; link += "dialog-edit-preferences";
else if ( ::qt_cast<PixmapCollectionEditor*>(w) ) else if ( ::tqt_cast<PixmapCollectionEditor*>(w) )
link += "dialog-image-collection"; link += "dialog-image-collection";
// else if ( ::qt_cast<DatabaseConnectionBase*>(w) ) // else if ( ::tqt_cast<DatabaseConnectionBase*>(w) )
else if ( w->inherits( "DatabaseConnectionBase" ) ) else if ( w->inherits( "DatabaseConnectionBase" ) )
link += "dialog-edit-database-connections"; link += "dialog-edit-database-connections";
else if ( ::qt_cast<ProjectSettingsBase*>(w) ) else if ( ::tqt_cast<ProjectSettingsBase*>(w) )
link += "dialog-project-settings"; link += "dialog-project-settings";
else if ( ::qt_cast<FindDialog*>(w) ) else if ( ::tqt_cast<FindDialog*>(w) )
link += "dialog-find-text"; link += "dialog-find-text";
else if ( ::qt_cast<ReplaceDialog*>(w) ) else if ( ::tqt_cast<ReplaceDialog*>(w) )
link += "dialog-replace-text"; link += "dialog-replace-text";
else if ( ::qt_cast<GotoLineDialog*>(w) ) else if ( ::tqt_cast<GotoLineDialog*>(w) )
link += "dialog-go-to-line"; link += "dialog-go-to-line";
// else if ( ::qt_cast<ConnectionEditorBase*>(w) ) // else if ( ::tqt_cast<ConnectionEditorBase*>(w) )
else if ( w->inherits("ConnectionEditorBase") ) else if ( w->inherits("ConnectionEditorBase") )
link += "dialog-edit-connections"; link += "dialog-edit-connections";
else if ( ::qt_cast<CustomWidgetEditorBase*>(w) ) else if ( ::tqt_cast<CustomWidgetEditorBase*>(w) )
link += "dialog-edit-custom-widgets"; link += "dialog-edit-custom-widgets";
else if ( ::qt_cast<PaletteEditorBase*>(w) ) else if ( ::tqt_cast<PaletteEditorBase*>(w) )
link += "dialog-edit-palette"; link += "dialog-edit-palette";
else if ( ::qt_cast<ListBoxEditorBase*>(w) ) else if ( ::tqt_cast<ListBoxEditorBase*>(w) )
link += "dialog-edit-listbox"; link += "dialog-edit-listbox";
else if ( ::qt_cast<ListViewEditorBase*>(w) ) else if ( ::tqt_cast<ListViewEditorBase*>(w) )
link += "dialog-edit-listview"; link += "dialog-edit-listview";
else if ( ::qt_cast<IconViewEditorBase*>(w) ) else if ( ::tqt_cast<IconViewEditorBase*>(w) )
link += "dialog-edit-iconview"; link += "dialog-edit-iconview";
else if ( ::qt_cast<TableEditorBase*>(w) ) else if ( ::tqt_cast<TableEditorBase*>(w) )
link += "dialog-edit-table"; link += "dialog-edit-table";
else if ( ::qt_cast<MultiLineEditor*>(w) ) else if ( ::tqt_cast<MultiLineEditor*>(w) )
link += "dialog-text"; link += "dialog-text";
else { else {
@ -3194,10 +3194,10 @@ void MainWindow::setModified( bool b, TQWidget *window )
{ {
TQWidget *w = window; TQWidget *w = window;
while ( w ) { while ( w ) {
if ( ::qt_cast<FormWindow*>(w) ) { if ( ::tqt_cast<FormWindow*>(w) ) {
( (FormWindow*)w )->modificationChanged( b ); ( (FormWindow*)w )->modificationChanged( b );
return; return;
} else if ( ::qt_cast<SourceEditor*>(w) ) { } else if ( ::tqt_cast<SourceEditor*>(w) ) {
FormWindow *fw = ( (SourceEditor*)w )->formWindow(); FormWindow *fw = ( (SourceEditor*)w )->formWindow();
if ( fw && !fw->isFake() ) { if ( fw && !fw->isFake() ) {
//fw->commandHistory()->setModified( b ); //fw->commandHistory()->setModified( b );
@ -3232,7 +3232,7 @@ void MainWindow::doFunctionsChanged()
void MainWindow::updateFunctionList() void MainWindow::updateFunctionList()
{ {
if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow();
se->save(); se->save();
@ -3321,9 +3321,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
FormWindow *fw = 0; FormWindow *fw = 0;
SourceEditor *se = 0; SourceEditor *se = 0;
SourceFile *sf = 0; SourceFile *sf = 0;
if ( ::qt_cast<FormWindow*>(w) ) { if ( ::tqt_cast<FormWindow*>(w) ) {
fw = (FormWindow*)w; fw = (FormWindow*)w;
} else if ( ::qt_cast<SourceEditor*>(w) ) { } else if ( ::tqt_cast<SourceEditor*>(w) ) {
se = (SourceEditor*)w; se = (SourceEditor*)w;
if ( !se->object() ) if ( !se->object() )
continue; continue;
@ -3391,7 +3391,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
} }
} }
if ( ::qt_cast<SourceFile*>(o) ) { if ( ::tqt_cast<SourceFile*>(o) ) {
for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles(); for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles();
sources.current(); ++sources ) { sources.current(); ++sources ) {
SourceFile* f = sources.current(); SourceFile* f = sources.current();
@ -3453,12 +3453,12 @@ TQObject *MainWindow::findRealObject( TQObject *o )
{ {
TQWidgetList windows = qWorkspace()->windowList(); TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( ::qt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) ) if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
return w; return w;
else if ( ::qt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() && else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) )
return w; return w;
else if ( ::qt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() && else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
( (SourceEditor*)w )->sourceFile() == o ) ( (SourceEditor*)w )->sourceFile() == o )
return o; return o;
} }
@ -3479,7 +3479,7 @@ void MainWindow::breakPointsChanged()
{ {
if ( !inDebugMode ) if ( !inDebugMode )
return; return;
if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow();
if ( !e->object() || !e->project() ) if ( !e->object() || !e->project() )
@ -3646,13 +3646,13 @@ void MainWindow::setSingleProject( Project *pro )
while ( wit.current() ) { while ( wit.current() ) {
TQWidget *w = wit.current(); TQWidget *w = wit.current();
++wit; ++wit;
if ( ::qt_cast<FormWindow*>(w) ) { if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->project() == pro ) { if ( ( (FormWindow*)w )->project() == pro ) {
if ( ( (FormWindow*)w )->formFile()->editor() ) if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
( (FormWindow*)w )->formFile()->close(); ( (FormWindow*)w )->formFile()->close();
} }
} else if ( ::qt_cast<SourceEditor*>(w) ) { } else if ( ::tqt_cast<SourceEditor*>(w) ) {
( (SourceEditor*)w )->close(); ( (SourceEditor*)w )->close();
} }
} }

@ -952,15 +952,15 @@ void MainWindow::setupWindowActions()
int j = 0; int j = 0;
for ( int i = 0; i < int( windows.count() ); ++i ) { for ( int i = 0; i < int( windows.count() ); ++i ) {
TQWidget *w = windows.at( i ); TQWidget *w = windows.at( i );
if ( !::qt_cast<FormWindow*>(w) && !::qt_cast<SourceEditor*>(w) ) if ( !::tqt_cast<FormWindow*>(w) && !::tqt_cast<SourceEditor*>(w) )
continue; continue;
if ( ::qt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) ) if ( ::tqt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) )
continue; continue;
j++; j++;
TQString itemText; TQString itemText;
if ( j < 10 ) if ( j < 10 )
itemText = TQString("&%1 ").arg( j ); itemText = TQString("&%1 ").arg( j );
if ( ::qt_cast<FormWindow*>(w) ) if ( ::tqt_cast<FormWindow*>(w) )
itemText += w->name(); itemText += w->name();
else else
itemText += w->caption(); itemText += w->caption();
@ -1092,9 +1092,9 @@ void MainWindow::fileClose()
} else { } else {
TQWidget *w = qworkspace->activeWindow(); TQWidget *w = qworkspace->activeWindow();
if ( w ) { if ( w ) {
if ( ::qt_cast<FormWindow*>(w) ) if ( ::tqt_cast<FormWindow*>(w) )
( (FormWindow*)w )->formFile()->close(); ( (FormWindow*)w )->formFile()->close();
else if ( ::qt_cast<SourceEditor*>(w) ) else if ( ::tqt_cast<SourceEditor*>(w) )
( (SourceEditor*)w )->close(); ( (SourceEditor*)w )->close();
} }
} }
@ -1139,14 +1139,14 @@ void MainWindow::fileCloseProject()
while ( wit.current() ) { while ( wit.current() ) {
TQWidget *w = wit.current(); TQWidget *w = wit.current();
++wit; ++wit;
if ( ::qt_cast<FormWindow*>(w) ) { if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->project() == pro ) { if ( ( (FormWindow*)w )->project() == pro ) {
if ( ( (FormWindow*)w )->formFile()->editor() ) if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
if ( !( (FormWindow*)w )->formFile()->close() ) if ( !( (FormWindow*)w )->formFile()->close() )
return; return;
} }
} else if ( ::qt_cast<SourceEditor*>(w) ) { } else if ( ::tqt_cast<SourceEditor*>(w) ) {
if ( !( (SourceEditor*)w )->close() ) if ( !( (SourceEditor*)w )->close() )
return; return;
} }
@ -1164,7 +1164,7 @@ void MainWindow::fileCloseProject()
} }
if ( !windows.isEmpty() ) { if ( !windows.isEmpty() ) {
for ( TQWidget *w = windows.first(); w; w = windows.next() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if (!::qt_cast<FormWindow*>(w) || w->isHidden()) if (!::tqt_cast<FormWindow*>(w) || w->isHidden())
continue; continue;
w->setFocus(); w->setFocus();
activeWindowChanged( w ); activeWindowChanged( w );
@ -1361,7 +1361,7 @@ bool MainWindow::fileSaveForm()
TQWidget *w = qWorkspace()->activeWindow(); TQWidget *w = qWorkspace()->activeWindow();
if ( w ) { if ( w ) {
if ( ::qt_cast<SourceEditor*>(w) ) { if ( ::tqt_cast<SourceEditor*>(w) ) {
SourceEditor *se = (SourceEditor*)w; SourceEditor *se = (SourceEditor*)w;
if ( se->formWindow() ) if ( se->formWindow() )
fw = se->formWindow(); fw = se->formWindow();
@ -1394,9 +1394,9 @@ bool MainWindow::fileSaveAs()
TQWidget *w = qworkspace->activeWindow(); TQWidget *w = qworkspace->activeWindow();
if ( !w ) if ( !w )
return TRUE; return TRUE;
if ( ::qt_cast<FormWindow*>(w) ) if ( ::tqt_cast<FormWindow*>(w) )
return ( (FormWindow*)w )->formFile()->saveAs(); return ( (FormWindow*)w )->formFile()->saveAs();
else if ( ::qt_cast<SourceEditor*>(w) ) else if ( ::tqt_cast<SourceEditor*>(w) )
return ( (SourceEditor*)w )->saveAs(); return ( (SourceEditor*)w )->saveAs();
return FALSE; return FALSE;
} }
@ -1493,7 +1493,7 @@ void MainWindow::createNewTemplate()
void MainWindow::editUndo() void MainWindow::editUndo()
{ {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo();
return; return;
} }
@ -1504,7 +1504,7 @@ void MainWindow::editUndo()
void MainWindow::editRedo() void MainWindow::editRedo()
{ {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo();
return; return;
} }
@ -1515,7 +1515,7 @@ void MainWindow::editRedo()
void MainWindow::editCut() void MainWindow::editCut()
{ {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut();
return; return;
} }
@ -1526,7 +1526,7 @@ void MainWindow::editCut()
void MainWindow::editCopy() void MainWindow::editCopy()
{ {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy();
return; return;
} }
@ -1537,7 +1537,7 @@ void MainWindow::editCopy()
void MainWindow::editPaste() void MainWindow::editPaste()
{ {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste();
return; return;
} }
@ -1576,7 +1576,7 @@ void MainWindow::editDelete()
void MainWindow::editSelectAll() void MainWindow::editSelectAll()
{ {
if ( qWorkspace()->activeWindow() && if ( qWorkspace()->activeWindow() &&
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll();
return; return;
} }
@ -1955,7 +1955,7 @@ void MainWindow::editPreferences()
void MainWindow::searchFind() void MainWindow::searchFind()
{ {
if ( !qWorkspace()->activeWindow() || if ( !qWorkspace()->activeWindow() ||
!::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
if ( !findDialog ) if ( !findDialog )
@ -1977,7 +1977,7 @@ void MainWindow::searchIncremetalFindMenu()
void MainWindow::searchIncremetalFind() void MainWindow::searchIncremetalFind()
{ {
if ( !qWorkspace()->activeWindow() || if ( !qWorkspace()->activeWindow() ||
!::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
@ -1987,7 +1987,7 @@ void MainWindow::searchIncremetalFind()
void MainWindow::searchIncremetalFindNext() void MainWindow::searchIncremetalFindNext()
{ {
if ( !qWorkspace()->activeWindow() || if ( !qWorkspace()->activeWindow() ||
!::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
@ -1997,7 +1997,7 @@ void MainWindow::searchIncremetalFindNext()
void MainWindow::searchReplace() void MainWindow::searchReplace()
{ {
if ( !qWorkspace()->activeWindow() || if ( !qWorkspace()->activeWindow() ||
!::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
if ( !replaceDialog ) if ( !replaceDialog )
@ -2013,7 +2013,7 @@ void MainWindow::searchReplace()
void MainWindow::searchGotoLine() void MainWindow::searchGotoLine()
{ {
if ( !qWorkspace()->activeWindow() || if ( !qWorkspace()->activeWindow() ||
!::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; return;
if ( !gotoLineDialog ) if ( !gotoLineDialog )

@ -823,7 +823,7 @@ void MenuBarEditor::keyPressEvent( TQKeyEvent * e )
void MenuBarEditor::focusOutEvent( TQFocusEvent * e ) void MenuBarEditor::focusOutEvent( TQFocusEvent * e )
{ {
TQWidget * fw = tqApp->focusWidget(); TQWidget * fw = tqApp->focusWidget();
if ( e->lostFocus() && !::qt_cast<PopupMenuEditor*>(fw) ) if ( e->lostFocus() && !::tqt_cast<PopupMenuEditor*>(fw) )
hideItem(); hideItem();
update(); update();
} }

@ -322,7 +322,7 @@ int MetaDataBase::spacing( TQObject *o )
if ( !o ) if ( !o )
return -1; return -1;
setupDataBase(); setupDataBase();
if ( ::qt_cast<TQMainWindow*>(o) ) if ( ::tqt_cast<TQMainWindow*>(o) )
o = ( (TQMainWindow*)o )->centralWidget(); o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o ); MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) { if ( !r || !o->isWidgetType() ) {
@ -353,9 +353,9 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
bool isInnerLayout = TRUE; bool isInnerLayout = TRUE;
TQWidget *widget = (TQWidget*)o; TQWidget *widget = (TQWidget*)o;
if ( widget && !::qt_cast<TQLayoutWidget*>(widget) && if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
isInnerLayout = FALSE; isInnerLayout = FALSE;
@ -379,7 +379,7 @@ int MetaDataBase::margin( TQObject *o )
if ( !o ) if ( !o )
return -1; return -1;
setupDataBase(); setupDataBase();
if ( ::qt_cast<TQMainWindow*>(o) ) if ( ::tqt_cast<TQMainWindow*>(o) )
o = ( (TQMainWindow*)o )->centralWidget(); o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o ); MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) { if ( !r || !o->isWidgetType() ) {
@ -410,7 +410,7 @@ TQString MetaDataBase::resizeMode( TQObject *o )
if ( !o ) if ( !o )
return TQString::null; return TQString::null;
setupDataBase(); setupDataBase();
if ( ::qt_cast<TQMainWindow*>(o) ) if ( ::tqt_cast<TQMainWindow*>(o) )
o = ( (TQMainWindow*)o )->centralWidget(); o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o ); MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) { if ( !r || !o->isWidgetType() ) {
@ -441,15 +441,15 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString
r->connections.append( conn ); r->connections.append( conn );
if ( addCode ) { if ( addCode ) {
TQString rec = receiver->name(); TQString rec = receiver->name();
if ( ::qt_cast<FormWindow*>(o) && receiver == ( (FormWindow*)o )->mainContainer() ) if ( ::tqt_cast<FormWindow*>(o) && receiver == ( (FormWindow*)o )->mainContainer() )
rec = "this"; rec = "this";
TQString sen = sender->name(); TQString sen = sender->name();
if ( ::qt_cast<FormWindow*>(o) && sender == ( (FormWindow*)o )->mainContainer() ) if ( ::tqt_cast<FormWindow*>(o) && sender == ( (FormWindow*)o )->mainContainer() )
sen = "this"; sen = "this";
FormFile *ff = 0; FormFile *ff = 0;
if ( ::qt_cast<FormFile*>(o) ) if ( ::tqt_cast<FormFile*>(o) )
ff = (FormFile*)o; ff = (FormFile*)o;
else if ( ::qt_cast<FormWindow*>(o) ) else if ( ::tqt_cast<FormWindow*>(o) )
ff = ( (FormWindow*)o )->formFile(); ff = ( (FormWindow*)o )->formFile();
ff->addConnection( sen, signal, rec, slot ); ff->addConnection( sen, signal, rec, slot );
} }
@ -477,7 +477,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr
break; break;
} }
} }
if ( ::qt_cast<FormWindow*>(o) ) { if ( ::tqt_cast<FormWindow*>(o) ) {
TQString rec = receiver->name(); TQString rec = receiver->name();
if ( receiver == ( (FormWindow*)o )->mainContainer() ) if ( receiver == ( (FormWindow*)o )->mainContainer() )
rec = "this"; rec = "this";
@ -495,7 +495,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
return; return;
} }
if ( !::qt_cast<FormFile*>(o) ) if ( !::tqt_cast<FormFile*>(o) )
return; return;
FormFile *formfile = (FormFile*)o; FormFile *formfile = (FormFile*)o;
@ -680,14 +680,14 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
if ( slotList.find( slot ) != -1 ) if ( slotList.find( slot ) != -1 )
return TRUE; return TRUE;
if ( ::qt_cast<FormWindow*>(o) ) { if ( ::tqt_cast<FormWindow*>(o) ) {
o = ( (FormWindow*)o )->mainContainer(); o = ( (FormWindow*)o )->mainContainer();
slotList = o->metaObject()->slotNames( TRUE ); slotList = o->metaObject()->slotNames( TRUE );
if ( slotList.find( slot ) != -1 ) if ( slotList.find( slot ) != -1 )
return TRUE; return TRUE;
} }
//if ( ::qt_cast<CustomWidget*>(o) ) { //if ( ::tqt_cast<CustomWidget*>(o) ) {
if ( o->inherits( "CustomWidget" ) ) { if ( o->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
@ -910,14 +910,14 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
if ( functionList.find( function ) != -1 ) if ( functionList.find( function ) != -1 )
return TRUE; return TRUE;
if ( ::qt_cast<FormWindow*>(o) ) { if ( ::tqt_cast<FormWindow*>(o) ) {
o = ( (FormWindow*)o )->mainContainer(); o = ( (FormWindow*)o )->mainContainer();
functionList = o->metaObject()->slotNames( TRUE ); functionList = o->metaObject()->slotNames( TRUE );
if ( functionList.find( function ) != -1 ) if ( functionList.find( function ) != -1 )
return TRUE; return TRUE;
} }
//if ( ::qt_cast<CustomWidget*>(o) ) { //if ( ::tqt_cast<CustomWidget*>(o) ) {
if ( o->inherits( "CustomWidget" ) ) { if ( o->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {

@ -229,7 +229,7 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
textEdit->document()->setUseFormatCollection( FALSE ); textEdit->document()->setUseFormatCollection( FALSE );
textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML );
if ( !callStatic && ::qt_cast<TQTextEdit*>(editWidget) ) { if ( !callStatic && ::tqt_cast<TQTextEdit*>(editWidget) ) {
mlined = (TQTextEdit*)editWidget; mlined = (TQTextEdit*)editWidget;
mlined->setReadOnly( TRUE ); mlined->setReadOnly( TRUE );

@ -124,7 +124,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m
removable( TRUE ) removable( TRUE )
{ {
init(); init();
if ( /*a->name() == "qt_separator_action" ||*/ ::qt_cast<TQSeparatorAction*>(a) ) if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast<TQSeparatorAction*>(a) )
separator = TRUE; separator = TRUE;
if ( a && a->children() ) if ( a && a->children() )
a->installEventFilter( this ); a->installEventFilter( this );
@ -140,7 +140,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuE
removable( item->removable ) removable( item->removable )
{ {
init(); init();
if ( ::qt_cast<TQActionGroup*>(a) ) if ( ::tqt_cast<TQActionGroup*>(a) )
a->installEventFilter( this ); a->installEventFilter( this );
} }
@ -180,7 +180,7 @@ void PopupMenuEditorItem::setVisible( bool enable )
bool PopupMenuEditorItem::isVisible() const bool PopupMenuEditorItem::isVisible() const
{ {
TQActionGroup *g = ::qt_cast<TQActionGroup*>(a); TQActionGroup *g = ::tqt_cast<TQActionGroup*>(a);
if ( g ) if ( g )
return ( g->isVisible() && g->usesDropDown() ); return ( g->isVisible() && g->usesDropDown() );
else if ( a ) else if ( a )
@ -217,7 +217,7 @@ int PopupMenuEditorItem::count() const
{ {
if ( s ) { if ( s ) {
return s->count(); return s->count();
} else if ( ::qt_cast<TQActionGroup*>(a) ) { } else if ( ::tqt_cast<TQActionGroup*>(a) ) {
const TQObjectList * l = a->children(); const TQObjectList * l = a->children();
if ( l ) if ( l )
return l->count(); return l->count();
@ -227,15 +227,15 @@ int PopupMenuEditorItem::count() const
bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event ) bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event )
{ {
if ( ! ::qt_cast<TQActionGroup*>( o ) ) if ( ! ::tqt_cast<TQActionGroup*>( o ) )
return FALSE; return FALSE;
if ( event->type() == TQEvent::ChildInserted ) { if ( event->type() == TQEvent::ChildInserted ) {
TQChildEvent * ce = ( TQChildEvent * ) event; TQChildEvent * ce = ( TQChildEvent * ) event;
TQObject * c = ce->child(); TQObject * c = ce->child();
TQAction * action = ::qt_cast<TQAction*>( c ); TQAction * action = ::tqt_cast<TQAction*>( c );
if ( s->find( action ) != -1 ) // avoid duplicates if ( s->find( action ) != -1 ) // avoid duplicates
return FALSE; return FALSE;
TQActionGroup * actionGroup = ::qt_cast<TQActionGroup*>( c ); TQActionGroup * actionGroup = ::tqt_cast<TQActionGroup*>( c );
if ( actionGroup ) if ( actionGroup )
s->insert( actionGroup ); s->insert( actionGroup );
else if ( action ) else if ( action )
@ -367,7 +367,7 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index )
TQObjectListIterator it( *l ); TQObjectListIterator it( *l );
insert( i, index ); insert( i, index );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
g = ::qt_cast<TQActionGroup*>(it.current()); g = ::tqt_cast<TQActionGroup*>(it.current());
if ( g ) { if ( g ) {
if ( dropdown ) if ( dropdown )
i->s->insert( g ); i->s->insert( g );
@ -857,7 +857,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
PopupMenuEditorItemPtrDrag::decode( e, &i ); PopupMenuEditorItemPtrDrag::decode( e, &i );
} else { } else {
if ( e->provides( "application/x-designer-actiongroup" ) ) { if ( e->provides( "application/x-designer-actiongroup" ) ) {
TQActionGroup * g = ::qt_cast<TQDesignerActionGroup*>(ActionDrag::action()); TQActionGroup * g = ::tqt_cast<TQDesignerActionGroup*>(ActionDrag::action());
if ( g->usesDropDown() ) { if ( g->usesDropDown() ) {
i = new PopupMenuEditorItem( g, this ); i = new PopupMenuEditorItem( g, this );
TQString n = TQString( g->name() ) + "Item"; TQString n = TQString( g->name() ) + "Item";
@ -866,7 +866,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE ); TQObjectList *l = g->queryList( "TQAction", 0, FALSE, FALSE );
TQObjectListIterator it( *l ); TQObjectListIterator it( *l );
for ( ; it.current(); ++it ) { for ( ; it.current(); ++it ) {
g = ::qt_cast<TQActionGroup*>(it.current()); g = ::tqt_cast<TQActionGroup*>(it.current());
if ( g ) if ( g )
i->s->insert( g ); i->s->insert( g );
else else
@ -877,7 +877,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
dropInPlace( g, e->pos().y() ); dropInPlace( g, e->pos().y() );
} }
} else if ( e->provides( "application/x-designer-actions" ) ) { } else if ( e->provides( "application/x-designer-actions" ) ) {
TQAction *a = ::qt_cast<TQDesignerAction*>(ActionDrag::action()); TQAction *a = ::tqt_cast<TQDesignerAction*>(ActionDrag::action());
i = new PopupMenuEditorItem( a, this ); i = new PopupMenuEditorItem( a, this );
} }
} }
@ -1012,12 +1012,12 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * )
void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) void PopupMenuEditor::focusOutEvent( TQFocusEvent * )
{ {
TQWidget * fw = tqApp->focusWidget(); TQWidget * fw = tqApp->focusWidget();
if ( !fw || ( !::qt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) { if ( !fw || ( !::tqt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) {
hideSubMenu(); hideSubMenu();
if ( fw && ::qt_cast<MenuBarEditor*>(fw) ) if ( fw && ::tqt_cast<MenuBarEditor*>(fw) )
return; return;
TQWidget * w = this; TQWidget * w = this;
while ( w && w != fw && ::qt_cast<PopupMenuEditor*>(w) ) { // hide all popups while ( w && w != fw && ::tqt_cast<PopupMenuEditor*>(w) ) { // hide all popups
w->hide(); w->hide();
w = ((PopupMenuEditor *)w)->parentEditor(); w = ((PopupMenuEditor *)w)->parentEditor();
} }
@ -1243,8 +1243,8 @@ void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y )
return; return;
TQObjectList l = *g->children(); TQObjectList l = *g->children();
for ( int i = 0; i < (int)l.count(); ++i ) { for ( int i = 0; i < (int)l.count(); ++i ) {
TQAction *a = ::qt_cast<TQAction*>(l.at(i)); TQAction *a = ::tqt_cast<TQAction*>(l.at(i));
TQActionGroup *g = ::qt_cast<TQActionGroup*>(l.at(i)); TQActionGroup *g = ::tqt_cast<TQActionGroup*>(l.at(i));
if ( g ) if ( g )
dropInPlace( g, y ); dropInPlace( g, y );
else if ( a ) else if ( a )
@ -1449,13 +1449,13 @@ TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item )
TQString s; TQString s;
TQString name = item->action()->menuText(); TQString name = item->action()->menuText();
TQWidget *e = parentEditor(); TQWidget *e = parentEditor();
PopupMenuEditor *p = ::qt_cast<PopupMenuEditor*>(e); PopupMenuEditor *p = ::tqt_cast<PopupMenuEditor*>(e);
if ( p ) { if ( p ) {
int idx = p->find( item->m ); int idx = p->find( item->m );
PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 ); PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 );
s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) ); s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) );
} else { } else {
MenuBarEditor *b = ::qt_cast<MenuBarEditor*>(e); MenuBarEditor *b = ::tqt_cast<MenuBarEditor*>(e);
if ( b ) { if ( b ) {
int idx = b->findItem( item->m ); int idx = b->findItem( item->m );
MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 ); MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 );

@ -1554,8 +1554,8 @@ TQString Project::locationOfObject( TQObject *o )
if ( MainWindow::self ) { if ( MainWindow::self ) {
TQWidgetList windows = MainWindow::self->qWorkspace()->windowList(); TQWidgetList windows = MainWindow::self->qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
FormWindow *fw = ::qt_cast<FormWindow*>(w); FormWindow *fw = ::tqt_cast<FormWindow*>(w);
SourceEditor *se = ::qt_cast<SourceEditor*>(w); SourceEditor *se = ::tqt_cast<SourceEditor*>(w);
if ( fw ) { if ( fw ) {
if ( fw->isFake() ) if ( fw->isFake() )
return objectForFakeForm( fw )->name() + TQString( " [Source]" ); return objectForFakeForm( fw )->name() + TQString( " [Source]" );
@ -1572,7 +1572,7 @@ TQString Project::locationOfObject( TQObject *o )
} }
} }
if ( ::qt_cast<SourceFile*>(o) ) { if ( ::tqt_cast<SourceFile*>(o) ) {
for ( TQPtrListIterator<SourceFile> sources = sourceFiles(); for ( TQPtrListIterator<SourceFile> sources = sourceFiles();
sources.current(); ++sources ) { sources.current(); ++sources ) {
SourceFile* f = sources.current(); SourceFile* f = sources.current();

@ -752,7 +752,7 @@ void PropertyTextItem::setValue()
void PropertyTextItem::getText() void PropertyTextItem::getText()
{ {
bool richText = !::qt_cast<TQButton*>(listview->propertyEditor()->widget()) || bool richText = !::tqt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
( text( 0 ) == "whatsThis" ); ( text( 0 ) == "whatsThis" );
bool doWrap = FALSE; bool doWrap = FALSE;
TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
@ -2306,7 +2306,7 @@ void PropertyPaletteItem::getPalette()
return; return;
bool ok = FALSE; bool ok = FALSE;
TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
if ( ::qt_cast<TQScrollView*>(w) ) if ( ::tqt_cast<TQScrollView*>(w) )
w = ( (TQScrollView*)w )->viewport(); w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
#if defined(QT_NON_COMMERCIAL) #if defined(QT_NON_COMMERCIAL)
@ -3013,7 +3013,7 @@ static bool parent_is_data_aware( TQWidget *w )
{ {
TQWidget *p = w ? w->parentWidget() : 0; TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) { while ( p && !p->isTopLevel() ) {
if ( ::qt_cast<TQDesignerDataBrowser*>(p) || ::qt_cast<TQDesignerDataView*>(p) ) if ( ::tqt_cast<TQDesignerDataBrowser*>(p) || ::tqt_cast<TQDesignerDataView*>(p) )
return TRUE; return TRUE;
p = p->parentWidget(); p = p->parentWidget();
} }
@ -3029,7 +3029,7 @@ void PropertyList::setupProperties()
{ {
if ( !editor->widget() ) if ( !editor->widget() )
return; return;
bool allProperties = !::qt_cast<Spacer*>(editor->widget()); bool allProperties = !::tqt_cast<Spacer*>(editor->widget());
TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
PropertyItem *item = 0; PropertyItem *item = 0;
TQMap<TQString, bool> unique; TQMap<TQString, bool> unique;
@ -3047,8 +3047,8 @@ void PropertyList::setupProperties()
continue; continue;
if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
continue; continue;
if ( ::qt_cast<TQDesignerToolBar*>(editor->widget()) || if ( ::tqt_cast<TQDesignerToolBar*>(editor->widget()) ||
::qt_cast<MenuBarEditor*>(editor->widget()) ) { ::tqt_cast<MenuBarEditor*>(editor->widget()) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
continue; continue;
if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
@ -3084,7 +3084,7 @@ void PropertyList::setupProperties()
continue; continue;
if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue; continue;
if ( ::qt_cast<TQLayoutWidget*>(w) || ::qt_cast<Spacer*>(w) ) { if ( ::tqt_cast<TQLayoutWidget*>(w) || ::tqt_cast<Spacer*>(w) ) {
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue; continue;
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
@ -3127,7 +3127,7 @@ void PropertyList::setupProperties()
continue; continue;
} }
} }
if ( ::qt_cast<TQActionGroup*>(w) ) { if ( ::tqt_cast<TQActionGroup*>(w) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue; continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@ -3144,7 +3144,7 @@ void PropertyList::setupProperties()
if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case) if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case)
if ( !editor->widget()->isWidgetType() || if ( !editor->widget()->isWidgetType() ||
!editor->widget()->parent() || !editor->widget()->parent() ||
!::qt_cast<TQButtonGroup*>(editor->widget()->parent()) ) !::tqt_cast<TQButtonGroup*>(editor->widget()->parent()) )
continue; continue;
} }
@ -3166,7 +3166,7 @@ void PropertyList::setupProperties()
setPropertyValue( item ); setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
item->setChanged( TRUE, FALSE ); item->setChanged( TRUE, FALSE );
if ( !::qt_cast<TQMultiLineEdit*>(editor->widget()) ) { if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) {
lst.clear(); lst.clear();
lst << p->valueToKey( AlignTop ) lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter ) << p->valueToKey( AlignVCenter )
@ -3177,7 +3177,7 @@ void PropertyList::setupProperties()
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
item->setChanged( TRUE, FALSE ); item->setChanged( TRUE, FALSE );
item = new PropertyBoolItem( this, item, 0, "wordwrap" ); item = new PropertyBoolItem( this, item, 0, "wordwrap" );
if ( ::qt_cast<TQGroupBox*>(w) ) if ( ::tqt_cast<TQGroupBox*>(w) )
item->setVisible( FALSE ); item->setVisible( FALSE );
setPropertyValue( item ); setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
@ -3225,7 +3225,7 @@ void PropertyList::setupProperties()
} }
} }
if ( !::qt_cast<TQSplitter*>(w) && !::qt_cast<MenuBarEditor*>(w) && !::qt_cast<TQDesignerToolBar*>(w) && if ( !::tqt_cast<TQSplitter*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) &&
w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
setPropertyValue( item ); setPropertyValue( item );
@ -3242,8 +3242,8 @@ void PropertyList::setupProperties()
else else
layoutInitValue( item ); layoutInitValue( item );
TQWidget *widget = (TQWidget*)w; TQWidget *widget = (TQWidget*)w;
if ( ( !::qt_cast<TQLayoutWidget*>(widget) && if ( ( !::tqt_cast<TQLayoutWidget*>(widget) &&
widget->parentWidget() && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) { widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
TQStringList lst; TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
@ -3258,8 +3258,8 @@ void PropertyList::setupProperties()
} }
} }
if ( !::qt_cast<Spacer*>(w) && !::qt_cast<TQLayoutWidget*>(w) && if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) &&
!::qt_cast<MenuBarEditor*>(w) && !::qt_cast<TQDesignerToolBar*>(w) ) { !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<TQDesignerToolBar*>(w) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE );
setPropertyValue( item ); setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
@ -3271,16 +3271,16 @@ void PropertyList::setupProperties()
} }
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
if ( !::qt_cast<TQDataTable*>(editor->widget()) && !::qt_cast<TQDataBrowser*>(editor->widget()) && if ( !::tqt_cast<TQDataTable*>(editor->widget()) && !::tqt_cast<TQDataBrowser*>(editor->widget()) &&
!::qt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::qt_cast<TQWidget*>(editor->widget()) ) ) { !::tqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqt_cast<TQWidget*>(editor->widget()) ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w ); item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
setPropertyValue( item ); setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
item->setChanged( TRUE, FALSE ); item->setChanged( TRUE, FALSE );
} }
if ( ::qt_cast<TQDataTable*>(editor->widget()) || ::qt_cast<TQDataBrowser*>(editor->widget()) || if ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) ||
::qt_cast<TQDataView*>(editor->widget()) ) { ::tqt_cast<TQDataView*>(editor->widget()) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); item = new PropertyDatabaseItem( this, item, 0, "database", FALSE );
setPropertyValue( item ); setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@ -3363,9 +3363,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
switch ( t ) { switch ( t ) {
case TQVariant::String: case TQVariant::String:
item = new PropertyTextItem( this, item, 0, name, TRUE, item = new PropertyTextItem( this, item, 0, name, TRUE,
::qt_cast<TQLabel*>(editor->widget()) || ::tqt_cast<TQLabel*>(editor->widget()) ||
::qt_cast<TQTextView*>(editor->widget()) || ::tqt_cast<TQTextView*>(editor->widget()) ||
::qt_cast<TQButton*>(editor->widget()) ); ::tqt_cast<TQButton*>(editor->widget()) );
break; break;
case TQVariant::CString: case TQVariant::CString:
item = new PropertyTextItem( this, item, 0, item = new PropertyTextItem( this, item, 0,
@ -3543,8 +3543,8 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
!( ke->state() & ControlButton ) ) { !( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e ); TQApplication::sendEvent( this, (TQKeyEvent*)e );
return TRUE; return TRUE;
} else if ( ( !::qt_cast<TQLineEdit*>(o) || } else if ( ( !::tqt_cast<TQLineEdit*>(o) ||
( ::qt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && ( ::tqt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) { i && i->hasSubItems() ) {
if ( !i->isOpen() && if ( !i->isOpen() &&
( ke->key() == Key_Plus || ( ke->key() == Key_Plus ||
@ -3554,12 +3554,12 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
( ke->key() == Key_Minus || ( ke->key() == Key_Minus ||
ke->key() == Key_Left ) ) ke->key() == Key_Left ) )
i->setOpen( FALSE ); i->setOpen( FALSE );
} else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::qt_cast<TQComboBox*>(o) ) { } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqt_cast<TQComboBox*>(o) ) {
TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
TQApplication::sendEvent( o, &ke2 ); TQApplication::sendEvent( o, &ke2 );
return TRUE; return TRUE;
} }
} else if ( e->type() == TQEvent::FocusOut && ::qt_cast<TQLineEdit*>(o) && editor->formWindow() ) { } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) ); TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), SLOT( checkCompressedCommand() ) );
} else if ( o == viewport() ) { } else if ( o == viewport() ) {
TQMouseEvent *me; TQMouseEvent *me;
@ -3568,7 +3568,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
me = (TQMouseEvent*)e; me = (TQMouseEvent*)e;
i = (PropertyListItem*) itemAt( me->pos() ); i = (PropertyListItem*) itemAt( me->pos() );
if ( i && ( ::qt_cast<PropertyColorItem*>(i) || ::qt_cast<PropertyPixmapItem*>(i) ) ) { if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i; pressItem = i;
pressPos = me->pos(); pressPos = me->pos();
mousePressed = TRUE; mousePressed = TRUE;
@ -3582,7 +3582,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
if ( i && i == pressItem ) { if ( i && i == pressItem ) {
if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){
if ( ::qt_cast<PropertyColorItem*>(i) ) { if ( ::tqt_cast<PropertyColorItem*>(i) ) {
TQColor col = i->value().asColor(); TQColor col = i->value().asColor();
TQColorDrag *drg = new TQColorDrag( col, this ); TQColorDrag *drg = new TQColorDrag( col, this );
TQPixmap pix( 25, 25 ); TQPixmap pix( 25, 25 );
@ -3594,7 +3594,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
mousePressed = FALSE; mousePressed = FALSE;
drg->dragCopy(); drg->dragCopy();
} }
else if ( ::qt_cast<PropertyPixmapItem*>(i) ) { else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) {
TQPixmap pix = i->value().asPixmap(); TQPixmap pix = i->value().asPixmap();
if( !pix.isNull() ) { if( !pix.isNull() ) {
TQImage img = pix.convertToImage(); TQImage img = pix.convertToImage();
@ -3780,9 +3780,9 @@ void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e )
return; return;
} }
if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept(); e->accept();
else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept(); e->accept();
else else
e->ignore(); e->ignore();
@ -3796,9 +3796,9 @@ void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e )
return; return;
} }
if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept(); e->accept();
else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept(); e->accept();
else else
e->ignore(); e->ignore();
@ -3812,14 +3812,14 @@ void PropertyList::viewportDropEvent ( TQDropEvent *e )
return; return;
} }
if ( ::qt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) { if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) {
TQColor color; TQColor color;
TQColorDrag::decode( e, color ); TQColorDrag::decode( e, color );
i->setValue( TQVariant( color ) ); i->setValue( TQVariant( color ) );
valueChanged( i ); valueChanged( i );
e->accept(); e->accept();
} }
else if ( ::qt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) { else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
TQImage img; TQImage img;
TQImageDrag::decode( e, img ); TQImageDrag::decode( e, img );
TQPixmap pm; TQPixmap pm;

@ -704,13 +704,13 @@ bool Resource::save( TQIODevice* dev )
ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl; ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 ); saveMetaInfoBefore( ts, 0 );
saveObject( formwindow->mainContainer(), 0, ts, 0 ); saveObject( formwindow->mainContainer(), 0, ts, 0 );
if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) ) { if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
} }
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 ); saveCustomWidgets( ts, 0 );
if ( ::qt_cast<TQMainWindow*>(formwindow->mainContainer()) ) if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) )
saveActions( formwindow->actionList(), ts, 0 ); saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() ) if ( !images.isEmpty() )
saveImageCollection( ts, 0 ); saveImageCollection( ts, 0 );
@ -880,7 +880,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
TQDesignerWidgetStack* ws = 0; TQDesignerWidgetStack* ws = 0;
if ( ::qt_cast<TQTabWidget*>(obj) ) { if ( ::tqt_cast<TQTabWidget*>(obj) ) {
TQTabWidget* tw = (TQTabWidget*) obj; TQTabWidget* tw = (TQTabWidget*) obj;
TQObjectList* tmpl = tw->queryList( "TQWidgetStack" ); TQObjectList* tmpl = tw->queryList( "TQWidgetStack" );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
@ -912,7 +912,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
delete tmpl; delete tmpl;
} else if ( (ws = ::qt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) { } else if ( (ws = ::tqt_cast<TQDesignerWidgetStack*>(obj)) != 0 ) {
for ( int i = 0; i < ws->count(); ++i ) { for ( int i = 0; i < ws->count(); ++i ) {
TQWidget *w = ws->page( i ); TQWidget *w = ws->page( i );
if ( !w ) if ( !w )
@ -935,7 +935,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
--indent; --indent;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
} else if ( ::qt_cast<TQToolBox*>(obj) ) { } else if ( ::tqt_cast<TQToolBox*>(obj) ) {
TQToolBox* tb = (TQToolBox*)obj; TQToolBox* tb = (TQToolBox*)obj;
for ( int i = 0; i < tb->count(); ++i ) { for ( int i = 0; i < tb->count(); ++i ) {
TQWidget *w = tb->item( i ); TQWidget *w = tb->item( i );
@ -964,7 +964,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
--indent; --indent;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
} else if ( ::qt_cast<TQWizard*>(obj) ) { } else if ( ::tqt_cast<TQWizard*>(obj) ) {
TQWizard* wiz = (TQWizard*)obj; TQWizard* wiz = (TQWizard*)obj;
for ( int i = 0; i < wiz->pageCount(); ++i ) { for ( int i = 0; i < wiz->pageCount(); ++i ) {
TQWidget *w = wiz->page( i ); TQWidget *w = wiz->page( i );
@ -989,7 +989,7 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
--indent; --indent;
ts << makeIndent( indent ) << "</widget>" << endl; ts << makeIndent( indent ) << "</widget>" << endl;
} }
} else if ( ::qt_cast<TQMainWindow*>(obj) ) { } else if ( ::tqt_cast<TQMainWindow*>(obj) ) {
saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent ); saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else { } else {
bool saved = FALSE; bool saved = FALSE;
@ -1124,9 +1124,9 @@ void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStre
void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
{ {
if ( ::qt_cast<TQListBox*>(obj) || ::qt_cast<TQComboBox*>(obj) ) { if ( ::tqt_cast<TQListBox*>(obj) || ::tqt_cast<TQComboBox*>(obj) ) {
TQListBox *lb = 0; TQListBox *lb = 0;
if ( ::qt_cast<TQListBox*>(obj) ) { if ( ::tqt_cast<TQListBox*>(obj) ) {
lb = (TQListBox*)obj; lb = (TQListBox*)obj;
} else { } else {
TQComboBox *cb = (TQComboBox*)obj; TQComboBox *cb = (TQComboBox*)obj;
@ -1165,7 +1165,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
} }
} }
} else if ( ::qt_cast<TQIconView*>(obj) ) { } else if ( ::tqt_cast<TQIconView*>(obj) ) {
TQIconView *iv = (TQIconView*)obj; TQIconView *iv = (TQIconView*)obj;
TQIconViewItem *i = iv->firstItem(); TQIconViewItem *i = iv->firstItem();
@ -1181,7 +1181,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--; indent--;
ts << makeIndent( indent ) << "</item>" << endl; ts << makeIndent( indent ) << "</item>" << endl;
} }
} else if ( ::qt_cast<TQListView*>(obj) ) { } else if ( ::tqt_cast<TQListView*>(obj) ) {
TQListView *lv = (TQListView*)obj; TQListView *lv = (TQListView*)obj;
int i; int i;
for ( i = 0; i < lv->header()->count(); ++i ) { for ( i = 0; i < lv->header()->count(); ++i ) {
@ -1210,12 +1210,12 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
saveItem( lv->firstChild(), ts, indent - 1 ); saveItem( lv->firstChild(), ts, indent - 1 );
} }
#if !defined (QT_NO_TABLE) #if !defined (QT_NO_TABLE)
else if ( ::qt_cast<TQTable*>(obj) ) { else if ( ::tqt_cast<TQTable*>(obj) ) {
TQTable *table = (TQTable*)obj; TQTable *table = (TQTable*)obj;
int i; int i;
TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table ); TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
# ifndef QT_NO_SQL # ifndef QT_NO_SQL
bool isDataTable = ::qt_cast<TQDataTable*>(table); bool isDataTable = ::tqt_cast<TQDataTable*>(table);
# else # else
bool isDataTable = false; bool isDataTable = false;
# endif # endif
@ -1372,7 +1372,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
// if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer // 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; TQLayout *layout = 0;
TQDesignerGridLayout* grid = 0; TQDesignerGridLayout* grid = 0;
if ( !::qt_cast<TQSplitter*>(obj) && if ( !::tqt_cast<TQSplitter*>(obj) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() && obj->isWidgetType() &&
WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
@ -1420,18 +1420,18 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
TQStringList changed; TQStringList changed;
changed = MetaDataBase::changedProperties( w ); changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) { if ( w->isWidgetType() ) {
if ( ::qt_cast<Spacer*>(w) ) { if ( ::tqt_cast<Spacer*>(w) ) {
if ( !changed.contains( "sizeHint" ) ) if ( !changed.contains( "sizeHint" ) )
changed << "sizeHint"; changed << "sizeHint";
if ( !changed.contains( "geometry" ) ) if ( !changed.contains( "geometry" ) )
changed << "geometry"; changed << "geometry";
} else { } else {
TQToolButton *tb = ::qt_cast<TQToolButton*>(w); TQToolButton *tb = ::tqt_cast<TQToolButton*>(w);
if ( tb && !tb->iconSet().isNull() ) { if ( tb && !tb->iconSet().isNull() ) {
changed << "iconSet"; changed << "iconSet";
} }
} }
} else if ( ::qt_cast<TQLayout*>(w) ) { } else if ( ::tqt_cast<TQLayout*>(w) ) {
if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 ) if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 )
changed << "spacing"; changed << "spacing";
if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 ) if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ) > -1 )
@ -1454,7 +1454,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
TQStrList lst = w->metaObject()->propertyNames( !::qt_cast<Spacer*>(w) ); TQStrList lst = w->metaObject()->propertyNames( !::tqt_cast<Spacer*>(w) );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() )
continue; continue;
@ -1465,10 +1465,10 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue; continue;
if ( ::qt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 && if ( ::tqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue; continue;
if ( ::qt_cast<MenuBarEditor*>(w) && if ( ::tqt_cast<MenuBarEditor*>(w) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
qstrcmp( p->name(), "itemText" ) == 0 ) ) qstrcmp( p->name(), "itemText" ) == 0 ) )
continue; continue;
@ -1482,7 +1482,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
ts << " stdset=\"0\""; ts << " stdset=\"0\"";
ts << ">" << endl; ts << ">" << endl;
indent++; indent++;
if ( strcmp( it.current(), "resizeMode" ) == 0 && ::qt_cast<TQLayout*>(w) ) { if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqt_cast<TQLayout*>(w) ) {
saveProperty( w, it.current(), "", TQVariant::String, ts, indent ); saveProperty( w, it.current(), "", TQVariant::String, ts, indent );
} else if ( p->isSetType() ) { } else if ( p->isSetType() ) {
saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent );
@ -1572,7 +1572,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl; ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl;
break; break;
case TQVariant::Int: case TQVariant::Int:
if ( ::qt_cast<TQLayout*>(w) ) { if ( ::tqt_cast<TQLayout*>(w) ) {
num = -1; num = -1;
if ( name == "spacing" ) if ( name == "spacing" )
num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) ); num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
@ -1822,7 +1822,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
mainContainerSet = TRUE; mainContainerSet = TRUE;
} }
w = (TQWidget*)obj; w = (TQWidget*)obj;
if ( ::qt_cast<TQMainWindow*>(w) ) if ( ::tqt_cast<TQMainWindow*>(w) )
w = ( (TQMainWindow*)w )->centralWidget(); w = ( (TQMainWindow*)w )->centralWidget();
if ( layout ) { if ( layout ) {
switch ( WidgetFactory::layoutType( layout ) ) { switch ( WidgetFactory::layoutType( layout ) ) {
@ -1847,20 +1847,20 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( w && formwindow ) { if ( w && formwindow ) {
if ( !parent || if ( !parent ||
( !::qt_cast<TQTabWidget*>(parent) && ( !::tqt_cast<TQTabWidget*>(parent) &&
!::qt_cast<TQWidgetStack*>(parent) && !::tqt_cast<TQWidgetStack*>(parent) &&
!::qt_cast<TQToolBox*>(parent) && !::tqt_cast<TQToolBox*>(parent) &&
!::qt_cast<TQWizard*>(parent) !::tqt_cast<TQWizard*>(parent)
#ifdef QT_CONTAINER_CUSTOM_WIDGETS #ifdef QT_CONTAINER_CUSTOM_WIDGETS
&& !isPlugin && !isPlugin
#endif #endif
) ) ) )
formwindow->insertWidget( w, pasting ); formwindow->insertWidget( w, pasting );
else if ( parent && else if ( parent &&
( ::qt_cast<TQTabWidget*>(parent) || ( ::tqt_cast<TQTabWidget*>(parent) ||
::qt_cast<TQWidgetStack*>(parent) || ::tqt_cast<TQWidgetStack*>(parent) ||
::qt_cast<TQToolBox*>(parent) || ::tqt_cast<TQToolBox*>(parent) ||
::qt_cast<TQWizard*>(parent) ::tqt_cast<TQWizard*>(parent)
#ifdef QT_CONTAINER_CUSTOM_WIDGETS #ifdef QT_CONTAINER_CUSTOM_WIDGETS
|| isPlugin || isPlugin
#endif #endif
@ -1903,16 +1903,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
} else if ( n.tagName() == "attribute" && w ) { } else if ( n.tagName() == "attribute" && w ) {
TQString attrib = n.attribute( "name" ); TQString attrib = n.attribute( "name" );
TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
if ( ::qt_cast<TQTabWidget*>(parent) ) { if ( ::tqt_cast<TQTabWidget*>(parent) ) {
if ( attrib == "title" ) if ( attrib == "title" )
( (TQTabWidget*)parent )->insertTab( w, v.toString() ); ( (TQTabWidget*)parent )->insertTab( w, v.toString() );
} else if ( ::qt_cast<TQWidgetStack*>(parent) ) { } else if ( ::tqt_cast<TQWidgetStack*>(parent) ) {
if ( attrib == "id" ) if ( attrib == "id" )
( (TQDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); ( (TQDesignerWidgetStack*)parent )->insertPage( w, v.toInt() );
} else if ( ::qt_cast<TQToolBox*>(parent) ) { } else if ( ::tqt_cast<TQToolBox*>(parent) ) {
if ( attrib == "label" ) if ( attrib == "label" )
( (TQToolBox*)parent )->addItem( w, v.toString() ); ( (TQToolBox*)parent )->addItem( w, v.toString() );
} else if ( ::qt_cast<TQWizard*>(parent) ) { } else if ( ::tqt_cast<TQWizard*>(parent) ) {
if ( attrib == "title" ) if ( attrib == "title" )
( (TQWizard*)parent )->addPage( w, v.toString() ); ( (TQWizard*)parent )->addPage( w, v.toString() );
#ifdef QT_CONTAINER_CUSTOM_WIDGETS #ifdef QT_CONTAINER_CUSTOM_WIDGETS
@ -1960,7 +1960,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
if ( !widget ) if ( !widget )
return; return;
if ( ::qt_cast<TQListView*>(widget) && e.tagName() == "column" ) { if ( ::tqt_cast<TQListView*>(widget) && e.tagName() == "column" ) {
TQListView *lv = (TQListView*)widget; TQListView *lv = (TQListView*)widget;
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
TQPixmap pix; TQPixmap pix;
@ -1994,7 +1994,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
lv->header()->setResizeEnabled( resizable, i ); lv->header()->setResizeEnabled( resizable, i );
} }
#ifndef QT_NO_TABLE #ifndef QT_NO_TABLE
else if ( ::qt_cast<TQTable*>(widget) ) { else if ( ::tqt_cast<TQTable*>(widget) ) {
TQTable *table = (TQTable*)widget; TQTable *table = (TQTable*)widget;
bool isRow; bool isRow;
if ( ( isRow = e.tagName() == "row" ) ) if ( ( isRow = e.tagName() == "row" ) )
@ -2061,14 +2061,14 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) ) if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) )
return; return;
if ( ::qt_cast<TQListBox*>(widget) || ::qt_cast<TQComboBox*>(widget) ) { if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) {
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
TQPixmap pix; TQPixmap pix;
bool hasPixmap = FALSE; bool hasPixmap = FALSE;
TQString txt; TQString txt;
loadItem( n, pix, txt, hasPixmap ); loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0; TQListBox *lb = 0;
if ( ::qt_cast<TQListBox*>(widget) ) { if ( ::tqt_cast<TQListBox*>(widget) ) {
lb = (TQListBox*)widget; lb = (TQListBox*)widget;
} else { } else {
TQComboBox *cb = (TQComboBox*)widget; TQComboBox *cb = (TQComboBox*)widget;
@ -2083,7 +2083,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} else { } else {
new TQListBoxText( lb, txt ); new TQListBoxText( lb, txt );
} }
} else if ( ::qt_cast<TQIconView*>(widget) ) { } else if ( ::tqt_cast<TQIconView*>(widget) ) {
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
TQPixmap pix; TQPixmap pix;
bool hasPixmap = FALSE; bool hasPixmap = FALSE;
@ -2094,7 +2094,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
new TQIconViewItem( iv, txt, pix ); new TQIconViewItem( iv, txt, pix );
else else
new TQIconViewItem( iv, txt ); new TQIconViewItem( iv, txt );
} else if ( ::qt_cast<TQListView*>(widget) ) { } else if ( ::tqt_cast<TQListView*>(widget) ) {
TQDomElement n = e.firstChild().toElement(); TQDomElement n = e.firstChild().toElement();
TQPixmap pix; TQPixmap pix;
TQValueList<TQPixmap> pixmaps; TQValueList<TQPixmap> pixmaps;
@ -2161,7 +2161,7 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
if ( formwindow ) if ( formwindow )
formwindow->insertWidget( spacer, pasting ); formwindow->insertWidget( spacer, pasting );
if ( layout ) { if ( layout ) {
if ( ::qt_cast<TQBoxLayout*>(layout) ) if ( ::tqt_cast<TQBoxLayout*>(layout) )
( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
else else
( (TQDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, ( (TQDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
@ -2177,7 +2177,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
{ {
const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE );
if ( !::qt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS) if ( !::tqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) { if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
@ -2290,7 +2290,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
} }
} }
if ( ::qt_cast<TQLayout*>(obj) ) { if ( ::tqt_cast<TQLayout*>(obj) ) {
if ( prop == "spacing" ) { if ( prop == "spacing" ) {
MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() ); MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
return; return;
@ -2976,10 +2976,10 @@ void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent )
while ( it.current() ) { while ( it.current() ) {
TQObject *o = it.current(); TQObject *o = it.current();
++it; ++it;
if ( !::qt_cast<TQAction*>(o) ) if ( !::tqt_cast<TQAction*>(o) )
continue; continue;
TQAction *ac = (TQAction*)o; TQAction *ac = (TQAction*)o;
bool isGroup = ::qt_cast<TQActionGroup*>(ac); bool isGroup = ::tqt_cast<TQActionGroup*>(ac);
if ( isGroup ) if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl; ts << makeIndent( indent ) << "<actiongroup>" << endl;
else else
@ -3008,7 +3008,7 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts
TQPtrListIterator<TQAction> it( actions ); TQPtrListIterator<TQAction> it( actions );
while ( it.current() ) { while ( it.current() ) {
TQAction *a = it.current(); TQAction *a = it.current();
bool isGroup = ::qt_cast<TQActionGroup*>(a); bool isGroup = ::tqt_cast<TQActionGroup*>(a);
if ( isGroup ) if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl; ts << makeIndent( indent ) << "<actiongroup>" << endl;
else else
@ -3053,7 +3053,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
} }
n2 = n2.nextSibling().toElement(); n2 = n2.nextSibling().toElement();
} }
if ( !::qt_cast<TQAction*>(parent) ) if ( !::tqt_cast<TQAction*>(parent) )
formwindow->actionList().append( a ); formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) { } else if ( n.tagName() == "actiongroup" ) {
a = new TQDesignerActionGroup( parent ); a = new TQDesignerActionGroup( parent );
@ -3076,7 +3076,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
} }
n2 = n2.nextSibling().toElement(); n2 = n2.nextSibling().toElement();
} }
if ( !::qt_cast<TQAction*>(parent) ) if ( !::tqt_cast<TQAction*>(parent) )
formwindow->actionList().append( a ); formwindow->actionList().append( a );
} }
} }
@ -3112,10 +3112,10 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
saveObjectProperties( tb, ts, indent ); saveObjectProperties( tb, ts, indent );
TQPtrList<TQAction> actionList = ( (TQDesignerToolBar*)tb )->insertedActions(); TQPtrList<TQAction> actionList = ( (TQDesignerToolBar*)tb )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
if ( ::qt_cast<TQSeparatorAction*>(a) ) { if ( ::tqt_cast<TQSeparatorAction*>(a) ) {
ts << makeIndent( indent ) << "<separator/>" << endl; ts << makeIndent( indent ) << "<separator/>" << endl;
} else { } else {
if ( ::qt_cast<TQDesignerAction*>(a) && !( (TQDesignerAction*)a )->supportsMenu() ) { if ( ::tqt_cast<TQDesignerAction*>(a) && !( (TQDesignerAction*)a )->supportsMenu() ) {
TQWidget *w = ( (TQDesignerAction*)a )->widget(); TQWidget *w = ( (TQDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\"" ts << makeIndent( indent ) << "<widget class=\""
<< WidgetFactory::classNameOf( w ) << "\">" << endl; << WidgetFactory::classNameOf( w ) << "\">" << endl;
@ -3174,11 +3174,11 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStrea
{ {
for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) {
TQAction *a = i->action(); TQAction *a = i->action();
if ( ::qt_cast<TQSeparatorAction*>(a) ) if ( ::tqt_cast<TQSeparatorAction*>(a) )
ts << makeIndent( indent ) << "<separator/>" << endl; ts << makeIndent( indent ) << "<separator/>" << endl;
else if ( ::qt_cast<TQDesignerAction*>(a) ) else if ( ::tqt_cast<TQDesignerAction*>(a) )
ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl; ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
else if ( ::qt_cast<TQDesignerActionGroup*>(a) ) else if ( ::tqt_cast<TQDesignerActionGroup*>(a) )
ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl; ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl;
PopupMenuEditor *s = i->subMenu(); PopupMenuEditor *s = i->subMenu();
if ( s && s->count() ) { if ( s && s->count() ) {

@ -82,7 +82,7 @@ void SourceEditor::setObject( TQObject *o, Project *p )
formWindow()->formFile()->setCodeEdited( FALSE ); formWindow()->formFile()->setCodeEdited( FALSE );
formWindow()->formFile()->setEditor( 0 ); formWindow()->formFile()->setEditor( 0 );
} }
if ( ::qt_cast<FormWindow*>(o) ) if ( ::tqt_cast<FormWindow*>(o) )
( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE );
save(); save();
bool changed = FALSE; bool changed = FALSE;
@ -124,9 +124,9 @@ TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &,
TQString txt; TQString txt;
if ( !o ) if ( !o )
return txt; return txt;
if ( ::qt_cast<FormWindow*>(o) ) if ( ::tqt_cast<FormWindow*>(o) )
txt = ( (FormWindow*)o )->formFile()->code(); txt = ( (FormWindow*)o )->formFile()->code();
else if ( ::qt_cast<SourceFile*>(o) ) else if ( ::tqt_cast<SourceFile*>(o) )
txt = ( (SourceFile*)o )->text(); txt = ( (SourceFile*)o )->text();
return txt; return txt;
} }
@ -312,14 +312,14 @@ bool SourceEditor::saveAs()
SourceFile *SourceEditor::sourceFile() const SourceFile *SourceEditor::sourceFile() const
{ {
if ( !::qt_cast<SourceFile*>((TQObject *)obj) ) if ( !::tqt_cast<SourceFile*>((TQObject *)obj) )
return 0; return 0;
return (SourceFile*)(TQObject*)obj; return (SourceFile*)(TQObject*)obj;
} }
FormWindow *SourceEditor::formWindow() const FormWindow *SourceEditor::formWindow() const
{ {
if ( !::qt_cast<FormWindow*>((TQObject *)obj) ) if ( !::tqt_cast<FormWindow*>((TQObject *)obj) )
return 0; return 0;
return (FormWindow*)(TQObject*)obj; return (FormWindow*)(TQObject*)obj;
} }

@ -64,7 +64,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
labelRowPixmap->setText( "" ); labelRowPixmap->setText( "" );
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
if ( !::qt_cast<TQDataTable*>(editTable) ) if ( !::tqt_cast<TQDataTable*>(editTable) )
#endif #endif
{ {
labelFields->hide(); labelFields->hide();
@ -73,7 +73,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
labelTableValue->hide(); labelTableValue->hide();
} }
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
if ( ::qt_cast<TQDataTable*>(editTable) ) { if ( ::tqt_cast<TQDataTable*>(editTable) ) {
// ## why does this behave weird? // ## why does this behave weird?
// TabWidget->removePage( rows_tab ); // TabWidget->removePage( rows_tab );
// rows_tab->hide(); // rows_tab->hide();
@ -81,7 +81,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
TabWidget->setTabEnabled( rows_tab, FALSE ); TabWidget->setTabEnabled( rows_tab, FALSE );
} }
if ( formWindow->project() && ::qt_cast<TQDataTable*>(editTable) ) { if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) {
TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList(); TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) { if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
TQStringList fields; TQStringList fields;
@ -164,7 +164,7 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i )
editColumnText->blockSignals( FALSE ); editColumnText->blockSignals( FALSE );
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
if ( ::qt_cast<TQDataTable*>(editTable) ) { if ( ::tqt_cast<TQDataTable*>(editTable) ) {
TQString s = *fieldMap.find( listColumns->index( i ) ); TQString s = *fieldMap.find( listColumns->index( i ) );
if ( s.isEmpty() ) if ( s.isEmpty() )
comboFields->setCurrentItem( 0 ); comboFields->setCurrentItem( 0 );
@ -249,7 +249,7 @@ void TableEditor::newColumnClicked()
listColumns->setCurrentItem( item ); listColumns->setCurrentItem( item );
listColumns->setSelected( item, TRUE ); listColumns->setSelected( item, TRUE );
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
if ( ::qt_cast<TQDataTable*>(editTable) ) { if ( ::tqt_cast<TQDataTable*>(editTable) ) {
comboFields->setFocus(); comboFields->setFocus();
} else } else
#endif #endif

@ -42,7 +42,7 @@ static TQStyle *windowsStyle = 0;
void WidgetAction::addedTo( TQWidget *w, TQWidget *container ) void WidgetAction::addedTo( TQWidget *w, TQWidget *container )
{ {
if ( ::qt_cast<TQToolButton*>(w) && ::qt_cast<TQScrollView*>(container->parent()->parent()) ) { if ( ::tqt_cast<TQToolButton*>(w) && ::tqt_cast<TQScrollView*>(container->parent()->parent()) ) {
if ( !windowsStyle ) if ( !windowsStyle )
windowsStyle = TQStyleFactory::create( "windows" ); windowsStyle = TQStyleFactory::create( "windows" );
w->setStyle( windowsStyle ); w->setStyle( windowsStyle );

@ -108,7 +108,7 @@ FormWindow *find_formwindow( TQWidget *w )
if ( !w ) if ( !w )
return 0; return 0;
for (;;) { for (;;) {
if ( ::qt_cast<FormWindow*>(w) ) if ( ::tqt_cast<FormWindow*>(w) )
return (FormWindow*)w; return (FormWindow*)w;
if ( !w->parentWidget() ) if ( !w->parentWidget() )
return 0; return 0;
@ -538,7 +538,7 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo
TQString str = WidgetDatabase::createWidgetName( id ); TQString str = WidgetDatabase::createWidgetName( id );
const char *s = str.latin1(); const char *s = str.latin1();
w = createWidget( n, parent, name ? name : s, init, r, orient ); w = createWidget( n, parent, name ? name : s, init, r, orient );
if ( ::qt_cast<TQScrollView*>(w) ) if ( ::tqt_cast<TQScrollView*>(w) )
( (TQScrollView*)w )->disableSizeHintCaching(); ( (TQScrollView*)w )->disableSizeHintCaching();
if ( !w && WidgetDatabase::isCustomWidget( id ) ) if ( !w && WidgetDatabase::isCustomWidget( id ) )
w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) );
@ -566,31 +566,31 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
int metaspacing = MetaDataBase::spacing( widget ); int metaspacing = MetaDataBase::spacing( widget );
int metamargin = MetaDataBase::margin( widget ); int metamargin = MetaDataBase::margin( widget );
if ( ::qt_cast<TQLayoutWidget*>(widget) && if ( ::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) || ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && ::qt_cast<FormWindow*>(widget->parentWidget()) ) ) widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
margin = MainWindow::self->currentLayoutDefaultMargin(); margin = MainWindow::self->currentLayoutDefaultMargin();
if ( !layout && ::qt_cast<TQTabWidget*>(widget) ) if ( !layout && ::tqt_cast<TQTabWidget*>(widget) )
widget = ((TQTabWidget*)widget)->currentPage(); widget = ((TQTabWidget*)widget)->currentPage();
if ( !layout && ::qt_cast<TQWizard*>(widget) ) if ( !layout && ::tqt_cast<TQWizard*>(widget) )
widget = ((TQWizard*)widget)->currentPage(); widget = ((TQWizard*)widget)->currentPage();
if ( !layout && ::qt_cast<TQMainWindow*>(widget) ) if ( !layout && ::tqt_cast<TQMainWindow*>(widget) )
widget = ((TQMainWindow*)widget)->centralWidget(); widget = ((TQMainWindow*)widget)->centralWidget();
if ( !layout && ::qt_cast<TQWidgetStack*>(widget) ) if ( !layout && ::tqt_cast<TQWidgetStack*>(widget) )
widget = ((TQWidgetStack*)widget)->visibleWidget(); widget = ((TQWidgetStack*)widget)->visibleWidget();
if ( !layout && ::qt_cast<TQToolBox*>(widget) ) if ( !layout && ::tqt_cast<TQToolBox*>(widget) )
widget = ((TQToolBox*)widget)->currentItem(); widget = ((TQToolBox*)widget)->currentItem();
MetaDataBase::addEntry( widget ); MetaDataBase::addEntry( widget );
TQLayout *l = 0; TQLayout *l = 0;
int align = 0; int align = 0;
if ( !layout && ::qt_cast<TQGroupBox*>(widget) ) { if ( !layout && ::tqt_cast<TQGroupBox*>(widget) ) {
TQGroupBox *gb = (TQGroupBox*)widget; TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, TQt::Vertical ); gb->setColumnLayout( 0, TQt::Vertical );
layout = gb->layout(); layout = gb->layout();
@ -664,15 +664,15 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
if ( !widget ) if ( !widget )
return; return;
if ( ::qt_cast<TQTabWidget*>(widget) ) if ( ::tqt_cast<TQTabWidget*>(widget) )
widget = ((TQTabWidget*)widget)->currentPage(); widget = ((TQTabWidget*)widget)->currentPage();
if ( ::qt_cast<TQWizard*>(widget) ) if ( ::tqt_cast<TQWizard*>(widget) )
widget = ((TQWizard*)widget)->currentPage(); widget = ((TQWizard*)widget)->currentPage();
if ( ::qt_cast<TQMainWindow*>(widget) ) if ( ::tqt_cast<TQMainWindow*>(widget) )
widget = ((TQMainWindow*)widget)->centralWidget(); widget = ((TQMainWindow*)widget)->centralWidget();
if ( ::qt_cast<TQWidgetStack*>(widget) ) if ( ::tqt_cast<TQWidgetStack*>(widget) )
widget = ((TQWidgetStack*)widget)->visibleWidget(); widget = ((TQWidgetStack*)widget)->visibleWidget();
if ( ::qt_cast<TQToolBox*>(widget) ) if ( ::tqt_cast<TQToolBox*>(widget) )
widget = ((TQToolBox*)widget)->currentItem(); widget = ((TQToolBox*)widget)->currentItem();
delete widget->layout(); delete widget->layout();
} }
@ -696,12 +696,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
b = new TQDesignerPushButton( parent, name ); b = new TQDesignerPushButton( parent, name );
} }
TQWidget *w = find_formwindow( b ); TQWidget *w = find_formwindow( b );
b->setAutoDefault( w && ::qt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); b->setAutoDefault( w && ::tqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) );
return b; return b;
} else if ( className == "TQToolButton" ) { } else if ( className == "TQToolButton" ) {
if ( init ) { if ( init ) {
TQDesignerToolButton *tb = new TQDesignerToolButton( parent, name ); TQDesignerToolButton *tb = new TQDesignerToolButton( parent, name );
if ( ::qt_cast<TQToolBox*>(widgetOfContainer(parent))) { if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) {
tb->setUsesTextLabel(TRUE); tb->setUsesTextLabel(TRUE);
tb->setTextLabel("..."); tb->setTextLabel("...");
tb->setAutoRaise(TRUE); tb->setAutoRaise(TRUE);
@ -834,12 +834,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return new TQComboBox( FALSE, parent, name ); return new TQComboBox( FALSE, parent, name );
} else if ( className == "TQWidget" ) { } else if ( className == "TQWidget" ) {
if ( parent && if ( parent &&
( ::qt_cast<FormWindow*>(parent) || ( ::tqt_cast<FormWindow*>(parent) ||
::qt_cast<TQWizard*>(parent) || ::tqt_cast<TQWizard*>(parent) ||
::qt_cast<TQTabWidget*>(parent) || ::tqt_cast<TQTabWidget*>(parent) ||
::qt_cast<TQWidgetStack*>(parent) || ::tqt_cast<TQWidgetStack*>(parent) ||
::qt_cast<TQToolBox*>(parent) || ::tqt_cast<TQToolBox*>(parent) ||
::qt_cast<TQMainWindow*>(parent) ) ) { ::tqt_cast<TQMainWindow*>(parent) ) ) {
FormWindow *fw = find_formwindow( parent ); FormWindow *fw = find_formwindow( parent );
if ( fw ) { if ( fw ) {
TQDesignerWidget *dw = new TQDesignerWidget( fw, parent, name ); TQDesignerWidget *dw = new TQDesignerWidget( fw, parent, name );
@ -850,12 +850,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return new TQWidget( parent, name ); return new TQWidget( parent, name );
} else if ( className == "TQDialog" ) { } else if ( className == "TQDialog" ) {
TQDialog *dia = 0; TQDialog *dia = 0;
if ( ::qt_cast<FormWindow*>(parent) ) if ( ::tqt_cast<FormWindow*>(parent) )
dia = new TQDesignerDialog( (FormWindow*)parent, parent, name ); dia = new TQDesignerDialog( (FormWindow*)parent, parent, name );
else else
dia = new TQDialog( parent, name ); dia = new TQDialog( parent, name );
#if defined(QT_NON_COMMERCIAL) #if defined(QT_NON_COMMERCIAL)
if ( ::qt_cast<MainWindow*>(parent) ) if ( ::tqt_cast<MainWindow*>(parent) )
#else #else
if ( parent ) if ( parent )
#endif #endif
@ -864,12 +864,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} else if ( className == "TQWizard" ) { } else if ( className == "TQWizard" ) {
TQWizard *wiz = new TQDesignerWizard( parent, name ); TQWizard *wiz = new TQDesignerWizard( parent, name );
#if defined(QT_NON_COMMERCIAL) #if defined(QT_NON_COMMERCIAL)
if ( ::qt_cast<MainWindow*>(parent) ) if ( ::tqt_cast<MainWindow*>(parent) )
#else #else
if ( parent ) if ( parent )
#endif #endif
wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); wiz->reparent( parent, TQPoint( 0, 0 ), TRUE );
if ( init && ::qt_cast<FormWindow*>(parent) ) { if ( init && ::tqt_cast<FormWindow*>(parent) ) {
TQDesignerWidget *dw = new TQDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); TQDesignerWidget *dw = new TQDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" );
MetaDataBase::addEntry( dw ); MetaDataBase::addEntry( dw );
wiz->addPage( dw, FormWindow::tr( "Page" ) ); wiz->addPage( dw, FormWindow::tr( "Page" ) );
@ -1011,25 +1011,25 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
{ {
layout = 0; layout = 0;
if ( ::qt_cast<TQTabWidget*>(w) ) if ( ::tqt_cast<TQTabWidget*>(w) )
w = ((TQTabWidget*)w)->currentPage(); w = ((TQTabWidget*)w)->currentPage();
if ( ::qt_cast<TQWizard*>(w) ) if ( ::tqt_cast<TQWizard*>(w) )
w = ((TQWizard*)w)->currentPage(); w = ((TQWizard*)w)->currentPage();
if ( ::qt_cast<TQMainWindow*>(w) ) if ( ::tqt_cast<TQMainWindow*>(w) )
w = ((TQMainWindow*)w)->centralWidget(); w = ((TQMainWindow*)w)->centralWidget();
if ( ::qt_cast<TQWidgetStack*>(w) ) if ( ::tqt_cast<TQWidgetStack*>(w) )
w = ((TQWidgetStack*)w)->visibleWidget(); w = ((TQWidgetStack*)w)->visibleWidget();
if ( ::qt_cast<TQToolBox*>(w) ) if ( ::tqt_cast<TQToolBox*>(w) )
w = ((TQToolBox*)w)->currentItem(); w = ((TQToolBox*)w)->currentItem();
if ( ::qt_cast<TQSplitter*>(w) ) if ( ::tqt_cast<TQSplitter*>(w) )
return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox; return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
if ( !w || !w->layout() ) if ( !w || !w->layout() )
return NoLayout; return NoLayout;
TQLayout *lay = w->layout(); TQLayout *lay = w->layout();
if ( ::qt_cast<TQGroupBox*>(w) ) { if ( ::tqt_cast<TQGroupBox*>(w) ) {
TQObjectList *l = lay->queryList( "TQLayout" ); TQObjectList *l = lay->queryList( "TQLayout" );
if ( l && l->first() ) if ( l && l->first() )
lay = (TQLayout*)l->first(); lay = (TQLayout*)l->first();
@ -1037,11 +1037,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
} }
layout = lay; layout = lay;
if ( ::qt_cast<TQHBoxLayout*>(lay) ) if ( ::tqt_cast<TQHBoxLayout*>(lay) )
return HBox; return HBox;
else if ( ::qt_cast<TQVBoxLayout*>(lay) ) else if ( ::tqt_cast<TQVBoxLayout*>(lay) )
return VBox; return VBox;
else if ( ::qt_cast<TQGridLayout*>(lay) ) else if ( ::tqt_cast<TQGridLayout*>(lay) )
return Grid; return Grid;
return NoLayout; return NoLayout;
} }
@ -1051,11 +1051,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
*/ */
WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
{ {
if ( ::qt_cast<TQHBoxLayout*>(layout) ) if ( ::tqt_cast<TQHBoxLayout*>(layout) )
return HBox; return HBox;
else if ( ::qt_cast<TQVBoxLayout*>(layout) ) else if ( ::tqt_cast<TQVBoxLayout*>(layout) )
return VBox; return VBox;
else if ( ::qt_cast<TQGridLayout*>(layout) ) else if ( ::tqt_cast<TQGridLayout*>(layout) )
return Grid; return Grid;
return NoLayout; return NoLayout;
} }
@ -1094,15 +1094,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
{ {
if ( !w ) if ( !w )
return w; return w;
if ( ::qt_cast<TQTabWidget*>(w) ) if ( ::tqt_cast<TQTabWidget*>(w) )
return ((TQTabWidget*)w)->currentPage(); return ((TQTabWidget*)w)->currentPage();
if ( ::qt_cast<TQWizard*>(w) ) if ( ::tqt_cast<TQWizard*>(w) )
return ((TQWizard*)w)->currentPage(); return ((TQWizard*)w)->currentPage();
if ( ::qt_cast<TQWidgetStack*>(w) ) if ( ::tqt_cast<TQWidgetStack*>(w) )
return ((TQWidgetStack*)w)->visibleWidget(); return ((TQWidgetStack*)w)->visibleWidget();
if ( ::qt_cast<TQToolBox*>(w) ) if ( ::tqt_cast<TQToolBox*>(w) )
return ((TQToolBox*)w)->currentItem(); return ((TQToolBox*)w)->currentItem();
if ( ::qt_cast<TQMainWindow*>(w) ) if ( ::tqt_cast<TQMainWindow*>(w) )
return ((TQMainWindow*)w)->centralWidget(); return ((TQMainWindow*)w)->centralWidget();
#ifdef QT_CONTAINER_CUSTOM_WIDGETS #ifdef QT_CONTAINER_CUSTOM_WIDGETS
if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) )
@ -1134,16 +1134,16 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
{ {
if ( w && ::qt_cast<TQWidgetStack*>(w->parentWidget()) ) if ( w && ::tqt_cast<TQWidgetStack*>(w->parentWidget()) )
w = w->parentWidget(); w = w->parentWidget();
if ( w->parentWidget() && w->parentWidget()->parentWidget() && if ( w->parentWidget() && w->parentWidget()->parentWidget() &&
w->parentWidget()->parentWidget()->parentWidget() && w->parentWidget()->parentWidget()->parentWidget() &&
::qt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) ::tqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) )
return w->parentWidget()->parentWidget()->parentWidget(); return w->parentWidget()->parentWidget()->parentWidget();
while ( w ) { while ( w ) {
int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ); int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) );
if ( WidgetDatabase::isContainer( id ) || if ( WidgetDatabase::isContainer( id ) ||
w && ::qt_cast<FormWindow*>(w->parentWidget()) ) w && ::tqt_cast<FormWindow*>(w->parentWidget()) )
return w; return w;
w = w->parentWidget(); w = w->parentWidget();
} }
@ -1166,21 +1166,21 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
if ( ::qt_cast<TQTabBar*>(o) ) if ( ::tqt_cast<TQTabBar*>(o) )
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
else if ( ::qt_cast<TQSizeGrip*>(o) ) else if ( ::tqt_cast<TQSizeGrip*>(o) )
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
else if ( ::qt_cast<TQButton*>(o) && else if ( ::tqt_cast<TQButton*>(o) &&
( ::qt_cast<TQTabBar*>(o->parent()) || ::qt_cast<TQToolBox*>(o->parent()) ) ) ( ::tqt_cast<TQTabBar*>(o->parent()) || ::tqt_cast<TQToolBox*>(o->parent()) ) )
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
else if ( ::qt_cast<TQPushButton*>(o) && ::qt_cast<TQWizard*>(o->parent()) ) else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) )
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
else if ( ::qt_cast<TQMenuBar*>(o) && ::qt_cast<TQMainWindow*>(o->parent()) ) else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) )
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
// else if ( ::qt_cast<TQDockWindowHandle*>(o) ) // else if ( ::tqt_cast<TQDockWindowHandle*>(o) )
else if ( o->inherits( "TQDockWindowHandle" ) ) else if ( o->inherits( "TQDockWindowHandle" ) )
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
// else if ( ::qt_cast<TQHideDock*>(o) ) // else if ( ::tqt_cast<TQHideDock*>(o) )
else if ( o->inherits( "TQHideDock" ) ) else if ( o->inherits( "TQHideDock" ) )
return ( lastWasAPassiveInteractor = TRUE ); return ( lastWasAPassiveInteractor = TRUE );
else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 )
@ -1190,7 +1190,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
return ( lastWasAPassiveInteractor = FALSE ); return ( lastWasAPassiveInteractor = FALSE );
WidgetInterface *iface = 0; WidgetInterface *iface = 0;
TQWidget *w = (TQWidget*)o; TQWidget *w = (TQWidget*)o;
while ( !iface && w && !::qt_cast<FormWindow*>(w) ) { while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) {
widgetManager()->queryInterface( classNameOf( w ), &iface ); widgetManager()->queryInterface( classNameOf( w ), &iface );
w = w->parentWidget(); w = w->parentWidget();
} }
@ -1223,46 +1223,46 @@ const char* WidgetFactory::classNameOf( TQObject* o )
return o->className(); return o->className();
if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className())))
return o->className(); return o->className();
else if ( ::qt_cast<TQDesignerTabWidget*>(o) ) else if ( ::tqt_cast<TQDesignerTabWidget*>(o) )
return "TQTabWidget"; return "TQTabWidget";
else if ( ::qt_cast<TQDesignerWidgetStack*>(o) ) else if ( ::tqt_cast<TQDesignerWidgetStack*>(o) )
return "TQWidgetStack"; return "TQWidgetStack";
else if ( ::qt_cast<TQWidgetStack*>(o) ) else if ( ::tqt_cast<TQWidgetStack*>(o) )
return "TQWeDoNotWantToBreakTabWidget"; return "TQWeDoNotWantToBreakTabWidget";
else if ( ::qt_cast<TQDesignerDialog*>(o) ) else if ( ::tqt_cast<TQDesignerDialog*>(o) )
return "TQDialog"; return "TQDialog";
else if ( ::qt_cast<TQDesignerWidget*>(o) ) else if ( ::tqt_cast<TQDesignerWidget*>(o) )
return "TQWidget"; return "TQWidget";
else if ( o->inherits( "CustomWidget" ) ) else if ( o->inherits( "CustomWidget" ) )
return ( (CustomWidget*)o )->realClassName().latin1(); return ( (CustomWidget*)o )->realClassName().latin1();
else if ( ::qt_cast<TQDesignerLabel*>(o) ) else if ( ::tqt_cast<TQDesignerLabel*>(o) )
return "TQLabel"; return "TQLabel";
else if ( ::qt_cast<TQDesignerWizard*>(o) ) else if ( ::tqt_cast<TQDesignerWizard*>(o) )
return "TQWizard"; return "TQWizard";
else if ( ::qt_cast<TQDesignerPushButton*>(o) ) else if ( ::tqt_cast<TQDesignerPushButton*>(o) )
return "TQPushButton"; return "TQPushButton";
else if ( ::qt_cast<TQDesignerToolButton*>(o) ) else if ( ::tqt_cast<TQDesignerToolButton*>(o) )
return "TQToolButton"; return "TQToolButton";
else if ( ::qt_cast<TQDesignerRadioButton*>(o) ) else if ( ::tqt_cast<TQDesignerRadioButton*>(o) )
return "TQRadioButton"; return "TQRadioButton";
else if ( ::qt_cast<TQDesignerCheckBox*>(o) ) else if ( ::tqt_cast<TQDesignerCheckBox*>(o) )
return "TQCheckBox"; return "TQCheckBox";
else if ( ::qt_cast<MenuBarEditor*>(o) ) else if ( ::tqt_cast<MenuBarEditor*>(o) )
return "TQMenuBar"; return "TQMenuBar";
else if ( ::qt_cast<TQDesignerToolBar*>(o) ) else if ( ::tqt_cast<TQDesignerToolBar*>(o) )
return "TQToolBar"; return "TQToolBar";
else if ( ::qt_cast<TQDesignerAction*>(o) ) else if ( ::tqt_cast<TQDesignerAction*>(o) )
return "TQAction"; return "TQAction";
else if ( ::qt_cast<TQDesignerActionGroup*>(o) ) else if ( ::tqt_cast<TQDesignerActionGroup*>(o) )
return "TQActionGroup"; return "TQActionGroup";
else if ( ::qt_cast<PopupMenuEditor*>(o) ) else if ( ::tqt_cast<PopupMenuEditor*>(o) )
return "TQPopupMenu"; return "TQPopupMenu";
else if ( ::qt_cast<TQDesignerToolBox*>(o) ) else if ( ::tqt_cast<TQDesignerToolBox*>(o) )
return "TQToolBox"; return "TQToolBox";
#ifndef QT_NO_SQL #ifndef QT_NO_SQL
else if ( ::qt_cast<TQDesignerDataBrowser*>(o) ) else if ( ::tqt_cast<TQDesignerDataBrowser*>(o) )
return "TQDataBrowser"; return "TQDataBrowser";
else if ( ::qt_cast<TQDesignerDataView*>(o) ) else if ( ::tqt_cast<TQDesignerDataView*>(o) )
return "TQDataView"; return "TQDataView";
#endif #endif
return o->className(); return o->className();
@ -1270,29 +1270,29 @@ const char* WidgetFactory::classNameOf( TQObject* o )
TQString WidgetFactory::defaultSignal( TQObject *w ) TQString WidgetFactory::defaultSignal( TQObject *w )
{ {
if ( ::qt_cast<TQRadioButton*>(w) || ::qt_cast<TQCheckBox*>(w) ) if ( ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQCheckBox*>(w) )
return "toggled"; return "toggled";
else if ( ::qt_cast<TQButton*>(w) || ::qt_cast<TQButtonGroup*>(w) ) else if ( ::tqt_cast<TQButton*>(w) || ::tqt_cast<TQButtonGroup*>(w) )
return "clicked"; return "clicked";
else if ( ::qt_cast<TQTextBrowser*>(w) ) else if ( ::tqt_cast<TQTextBrowser*>(w) )
return "linkClicked"; return "linkClicked";
else if ( ::qt_cast<TQLineEdit*>(w) || ::qt_cast<TQTextEdit*>(w) ) else if ( ::tqt_cast<TQLineEdit*>(w) || ::tqt_cast<TQTextEdit*>(w) )
return "textChanged"; return "textChanged";
else if ( ::qt_cast<TQListView*>(w) || ::qt_cast<TQIconView*>(w) || else if ( ::tqt_cast<TQListView*>(w) || ::tqt_cast<TQIconView*>(w) ||
::qt_cast<TQListBox*>(w) || ::qt_cast<TQTable*>(w) ) ::tqt_cast<TQListBox*>(w) || ::tqt_cast<TQTable*>(w) )
return "selectionChanged"; return "selectionChanged";
else if ( ::qt_cast<TQTabWidget*>(w) ) else if ( ::tqt_cast<TQTabWidget*>(w) )
return "selected"; return "selected";
else if ( ::qt_cast<TQToolBox*>(w) ) else if ( ::tqt_cast<TQToolBox*>(w) )
return "currentChanged"; return "currentChanged";
else if ( ::qt_cast<TQWidgetStack*>(w) ) else if ( ::tqt_cast<TQWidgetStack*>(w) )
return "aboutToShow"; return "aboutToShow";
else if ( ::qt_cast<TQSpinBox*>(w) || ::qt_cast<TQSlider*>(w) || else if ( ::tqt_cast<TQSpinBox*>(w) || ::tqt_cast<TQSlider*>(w) ||
::qt_cast<TQScrollBar*>(w) || ::qt_cast<TQDateEdit*>(w) || ::tqt_cast<TQScrollBar*>(w) || ::tqt_cast<TQDateEdit*>(w) ||
::qt_cast<TQTimeEdit*>(w) || ::qt_cast<TQDateTimeEdit*>(w) || ::tqt_cast<TQTimeEdit*>(w) || ::tqt_cast<TQDateTimeEdit*>(w) ||
::qt_cast<TQDial*>(w) ) ::tqt_cast<TQDial*>(w) )
return "valueChanged"; return "valueChanged";
else if ( ::qt_cast<TQComboBox*>(w) ) else if ( ::tqt_cast<TQComboBox*>(w) )
return "activated"; return "activated";
return TQString::null; return TQString::null;
} }
@ -1308,14 +1308,14 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MainWindow::self->currProject()->fakeFormFileFor( o ) ) MainWindow::self->currProject()->fakeFormFileFor( o ) )
return; return;
MetaDataBase::setPropertyChanged( o, "name", TRUE ); MetaDataBase::setPropertyChanged( o, "name", TRUE );
if ( !::qt_cast<TQDesignerToolBar*>(o) && !::qt_cast<MenuBarEditor*>(o) ) if ( !::tqt_cast<TQDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) )
MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); MetaDataBase::setPropertyChanged( o, "geometry", TRUE );
if ( ::qt_cast<TQPushButton*>(o) || if ( ::tqt_cast<TQPushButton*>(o) ||
::qt_cast<TQRadioButton*>(o) || ::tqt_cast<TQRadioButton*>(o) ||
::qt_cast<TQCheckBox*>(o) || ::tqt_cast<TQCheckBox*>(o) ||
::qt_cast<TQToolButton*>(o) ) { ::tqt_cast<TQToolButton*>(o) ) {
if (::qt_cast<TQToolButton*>(o) && ::qt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) { if (::tqt_cast<TQToolButton*>(o) && ::tqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
@ -1324,19 +1324,19 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MetaDataBase::setPropertyChanged( o, "text", TRUE ); MetaDataBase::setPropertyChanged( o, "text", TRUE );
} }
} }
else if ( ::qt_cast<TQGroupBox*>(o) ) else if ( ::tqt_cast<TQGroupBox*>(o) )
MetaDataBase::setPropertyChanged( o, "title", TRUE ); MetaDataBase::setPropertyChanged( o, "title", TRUE );
else if ( o->isA( "TQFrame" ) ) { else if ( o->isA( "TQFrame" ) ) {
MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE );
MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShape", TRUE );
} else if ( ::qt_cast<TQTabWidget*>(o) || ::qt_cast<TQWizard*>(o) ) { } else if ( ::tqt_cast<TQTabWidget*>(o) || ::tqt_cast<TQWizard*>(o) ) {
MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE );
MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
} else if ( ::qt_cast<TQWidgetStack*>(o) ) { } else if ( ::tqt_cast<TQWidgetStack*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
} else if ( ::qt_cast<TQToolBox*>(o) ) { } else if ( ::tqt_cast<TQToolBox*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE );
MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemName", TRUE );
MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE );
@ -1344,9 +1344,9 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE );
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE );
#ifndef QT_NO_TABLE #ifndef QT_NO_TABLE
} else if ( ::qt_cast<TQTable*>(o) ) { } else if ( ::tqt_cast<TQTable*>(o) ) {
# ifndef QT_NO_SQL # ifndef QT_NO_SQL
if (!::qt_cast<TQDataTable*>(o) ) if (!::tqt_cast<TQDataTable*>(o) )
# endif # endif
{ {
MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); MetaDataBase::setPropertyChanged( o, "numRows", TRUE );
@ -1358,11 +1358,11 @@ void WidgetFactory::initChangedProperties( TQObject *o )
} }
} }
#endif #endif
} else if ( ::qt_cast<TQSplitter*>(o) ) { } else if ( ::tqt_cast<TQSplitter*>(o) ) {
MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); MetaDataBase::setPropertyChanged( o, "orientation", TRUE );
} else if ( ::qt_cast<TQDesignerToolBar*>(o) ) { } else if ( ::tqt_cast<TQDesignerToolBar*>(o) ) {
MetaDataBase::setPropertyChanged( o, "label", TRUE ); MetaDataBase::setPropertyChanged( o, "label", TRUE );
} else if ( ::qt_cast<MenuBarEditor*>(o) ) { } else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemName", TRUE );
MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE );
MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); MetaDataBase::setPropertyChanged( o, "itemText", TRUE );
@ -1383,7 +1383,7 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget )
return TRUE; return TRUE;
if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) if ( className == "TQTextEdit" || className == "TQMultiLineEdit" )
return TRUE; return TRUE;
if ( ::qt_cast<TQTable*>(editorWidget) != 0 ) if ( ::tqt_cast<TQTable*>(editorWidget) != 0 )
return TRUE; return TRUE;
return FALSE; return FALSE;
@ -1395,7 +1395,7 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||
className.contains( "IconView" ) || className.contains( "ComboBox" ) || className.contains( "IconView" ) || className.contains( "ComboBox" ) ||
::qt_cast<TQTable*>(editorWidget) != 0 ) ::tqt_cast<TQTable*>(editorWidget) != 0 )
return TRUE; return TRUE;
return FALSE; return FALSE;
@ -1406,7 +1406,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
TQString className = WidgetDatabase::className( id ); TQString className = WidgetDatabase::className( id );
if ( className.contains( "ListBox" ) ) { if ( className.contains( "ListBox" ) ) {
if ( !::qt_cast<TQListBox*>(editWidget) ) if ( !::tqt_cast<TQListBox*>(editWidget) )
return; return;
ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw );
e->exec(); e->exec();
@ -1415,7 +1415,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
} }
if ( className.contains( "ComboBox" ) ) { if ( className.contains( "ComboBox" ) ) {
if ( !::qt_cast<TQComboBox*>(editWidget) ) if ( !::tqt_cast<TQComboBox*>(editWidget) )
return; return;
TQComboBox *cb = (TQComboBox*)editWidget; TQComboBox *cb = (TQComboBox*)editWidget;
TQListBox *lb = cb->listBox(); TQListBox *lb = cb->listBox();
@ -1431,7 +1431,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
} }
if ( className.contains( "ListView" ) ) { if ( className.contains( "ListView" ) ) {
if ( !::qt_cast<TQListView*>(editWidget) ) if ( !::tqt_cast<TQListView*>(editWidget) )
return; return;
TQListView *lv = (TQListView*)editWidget; TQListView *lv = (TQListView*)editWidget;
ListViewEditor *e = new ListViewEditor( parent, lv, fw ); ListViewEditor *e = new ListViewEditor( parent, lv, fw );
@ -1441,7 +1441,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
} }
if ( className.contains( "IconView" ) ) { if ( className.contains( "IconView" ) ) {
if ( !::qt_cast<TQIconView*>(editWidget) ) if ( !::tqt_cast<TQIconView*>(editWidget) )
return; return;
IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); IconViewEditor *e = new IconViewEditor( parent, editWidget, fw );
e->exec(); e->exec();
@ -1456,7 +1456,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
return; return;
} }
#ifndef QT_NO_TABLE #ifndef QT_NO_TABLE
if (::qt_cast<TQTable*>(editWidget) != 0) { if (::tqt_cast<TQTable*>(editWidget) != 0) {
TableEditor *e = new TableEditor( parent, editWidget, fw ); TableEditor *e = new TableEditor( parent, editWidget, fw );
e->exec(); e->exec();
delete e; delete e;
@ -1639,15 +1639,15 @@ void TQLayoutWidget::updateSizePolicy()
if ( parent() && parent()->isWidgetType() ) { if ( parent() && parent()->isWidgetType() ) {
parentLayout = ((TQWidget *)parent())->layout(); parentLayout = ((TQWidget *)parent())->layout();
if ( parentLayout && if ( parentLayout &&
::qt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) ::tqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) )
parentLayout = 0; parentLayout = 0;
} }
TQObjectListIt it( *children() ); TQObjectListIt it( *children() );
TQObject *o; TQObject *o;
if ( ::qt_cast<TQVBoxLayout*>(layout()) ) { if ( ::tqt_cast<TQVBoxLayout*>(layout()) ) {
if ( ::qt_cast<TQHBoxLayout*>(parentLayout) ) if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) )
vt = TQSizePolicy::Minimum; vt = TQSizePolicy::Minimum;
else else
vt = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed;
@ -1667,8 +1667,8 @@ void TQLayoutWidget::updateSizePolicy()
if ( w->sizePolicy().mayShrinkVertically() ) if ( w->sizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum; vt |= TQSizePolicy::Maximum;
} }
} else if ( ::qt_cast<TQHBoxLayout*>(layout()) ) { } else if ( ::tqt_cast<TQHBoxLayout*>(layout()) ) {
if ( ::qt_cast<TQVBoxLayout*>(parentLayout) ) if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) )
ht = TQSizePolicy::Minimum; ht = TQSizePolicy::Minimum;
else else
ht = TQSizePolicy::Fixed; ht = TQSizePolicy::Fixed;
@ -1688,13 +1688,13 @@ void TQLayoutWidget::updateSizePolicy()
if ( !w->sizePolicy().mayShrinkVertically() ) if ( !w->sizePolicy().mayShrinkVertically() )
vt &= ~TQSizePolicy::Maximum; vt &= ~TQSizePolicy::Maximum;
} }
} else if ( ::qt_cast<TQGridLayout*>(layout()) ) { } else if ( ::tqt_cast<TQGridLayout*>(layout()) ) {
ht = TQSizePolicy::Fixed; ht = TQSizePolicy::Fixed;
vt = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed;
if ( parentLayout ) { if ( parentLayout ) {
if ( ::qt_cast<TQVBoxLayout*>(parentLayout) ) if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) )
ht = TQSizePolicy::Minimum; ht = TQSizePolicy::Minimum;
else if ( ::qt_cast<TQHBoxLayout*>(parentLayout) ) else if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) )
vt = TQSizePolicy::Minimum; vt = TQSizePolicy::Minimum;
} }
@ -1728,7 +1728,7 @@ void TQLayoutWidget::updateSizePolicy()
void CustomWidget::paintEvent( TQPaintEvent *e ) void CustomWidget::paintEvent( TQPaintEvent *e )
{ {
if ( ::qt_cast<FormWindow*>(parentWidget()) ) { if ( ::tqt_cast<FormWindow*>(parentWidget()) ) {
( (FormWindow*)parentWidget() )->paintGrid( this, e ); ( (FormWindow*)parentWidget() )->paintGrid( this, e );
} else { } else {
TQPainter p( this ); TQPainter p( this );

@ -57,7 +57,7 @@ EditorBrowser::~EditorBrowser()
bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e ) bool EditorBrowser::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( ::qt_cast<Editor*>(o->parent()) || ::qt_cast<Editor*>(o) ) { if ( ::tqt_cast<Editor*>(o->parent()) || ::tqt_cast<Editor*>(o) ) {
TQMouseEvent *me; TQMouseEvent *me;
TQKeyEvent *ke; TQKeyEvent *ke;
switch ( e->type() ) { switch ( e->type() ) {

@ -327,7 +327,7 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e )
{ {
if ( !enabled ) if ( !enabled )
return FALSE; return FALSE;
if ( e->type() == TQEvent::KeyPress && ::qt_cast<Editor*>(o)) { if ( e->type() == TQEvent::KeyPress && ::tqt_cast<Editor*>(o)) {
curEditor = (Editor*)o; curEditor = (Editor*)o;
TQKeyEvent *ke = (TQKeyEvent*)e; TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Tab ) { if ( ke->key() == Key_Tab ) {
@ -423,7 +423,7 @@ bool EditorCompletion::eventFilter( TQObject *o, TQEvent *e )
return TRUE; return TRUE;
} }
} }
if ( o == functionLabel || ::qt_cast<Editor*>(o) && functionLabel->isVisible() ) { if ( o == functionLabel || ::tqt_cast<Editor*>(o) && functionLabel->isVisible() ) {
if ( e->type() == TQEvent::KeyPress ) { if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e; TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Escape ) { if ( ke->key() == Key_Escape ) {

@ -97,7 +97,7 @@ TQWidget *ViewManager::currentView() const
void ViewManager::childEvent( TQChildEvent *e ) void ViewManager::childEvent( TQChildEvent *e )
{ {
if ( e->type() == TQEvent::ChildInserted && ::qt_cast<Editor*>(e->child()) ) if ( e->type() == TQEvent::ChildInserted && ::tqt_cast<Editor*>(e->child()) )
addView( (TQWidget*)e->child() ); addView( (TQWidget*)e->child() );
TQWidget::childEvent( e ); TQWidget::childEvent( e );
} }

@ -72,7 +72,7 @@ void CppEditorBrowser::showHelp( const TQString &w )
} }
} }
TQMainWindow *mw = ::qt_cast<TQMainWindow*>(curEditor->topLevelWidget()); TQMainWindow *mw = ::tqt_cast<TQMainWindow*>(curEditor->topLevelWidget());
if ( mw ) if ( mw )
mw->statusBar()->message( tr( "Nothing available for '%1'" ).arg( w ), 1500 ); mw->statusBar()->message( tr( "Nothing available for '%1'" ).arg( w ), 1500 );
} }

@ -69,18 +69,18 @@ SqlFormWizard::SqlFormWizard( TQUnknownInterface *aIface, TQWidget *w,
setFinishEnabled( finishPage, TRUE ); setFinishEnabled( finishPage, TRUE );
/* set mode of operation */ /* set mode of operation */
if ( ::qt_cast<TQDataTable*>(widget) ) { if ( ::tqt_cast<TQDataTable*>(widget) ) {
setCaption( "Data Table Wizard" ); setCaption( "Data Table Wizard" );
mode = Table; mode = Table;
setAppropriate( navigPage, FALSE ); setAppropriate( navigPage, FALSE );
setAppropriate( layoutPage, FALSE ); setAppropriate( layoutPage, FALSE );
checkBoxAutoEdit->setChecked( FALSE ); checkBoxAutoEdit->setChecked( FALSE );
} else if ( ::qt_cast<TQDataBrowser*>(widget) ) { } else if ( ::tqt_cast<TQDataBrowser*>(widget) ) {
setCaption( "Data Browser Wizard" ); setCaption( "Data Browser Wizard" );
setAppropriate( tablePropertiesPage, FALSE ); setAppropriate( tablePropertiesPage, FALSE );
mode = Browser; mode = Browser;
checkBoxAutoEdit->setChecked( TRUE ); checkBoxAutoEdit->setChecked( TRUE );
} else if ( ::qt_cast<TQDataView*>(widget) ) { } else if ( ::tqt_cast<TQDataView*>(widget) ) {
setCaption( "Data View Wizard" ); setCaption( "Data View Wizard" );
setAppropriate( tablePropertiesPage, FALSE ); setAppropriate( tablePropertiesPage, FALSE );
setAppropriate( navigPage, FALSE ); setAppropriate( navigPage, FALSE );
@ -450,7 +450,7 @@ void SqlFormWizard::accept()
((TQLineEdit*)editor)->setAlignment( TQt::AlignRight ); ((TQLineEdit*)editor)->setAlignment( TQt::AlignRight );
formWindow->setPropertyChanged( editor, "alignment", TRUE ); formWindow->setPropertyChanged( editor, "alignment", TRUE );
} }
if ( ::qt_cast<TQSpinBox*>(editor) ) { if ( ::tqt_cast<TQSpinBox*>(editor) ) {
( (TQSpinBox*)editor )->setMaxValue( INT_MAX ); ( (TQSpinBox*)editor )->setMaxValue( INT_MAX );
formWindow->setPropertyChanged( editor, "maxValue", TRUE ); formWindow->setPropertyChanged( editor, "maxValue", TRUE );
} }

@ -861,7 +861,7 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in,
if ( parent != 0 ) { if ( parent != 0 ) {
if ( parent->inherits("TQComboBox") || if ( parent->inherits("TQComboBox") ||
parent->inherits("TQListBox") ) { parent->inherits("TQListBox") ) {
TQListBox *listBox = (TQListBox *) parent->qt_cast( "TQListBox" ); TQListBox *listBox = (TQListBox *) parent->tqt_cast( "TQListBox" );
if ( listBox == 0 ) if ( listBox == 0 )
listBox = ((TQComboBox *) parent)->listBox(); listBox = ((TQComboBox *) parent)->listBox();
@ -1230,7 +1230,7 @@ TQWidget *TQWidgetFactory::createFromUibFile( TQDataStream& in,
unpackUInt16( in, labelNo ); unpackUInt16( in, labelNo );
unpackUInt16( in, buddyNo ); unpackUInt16( in, buddyNo );
TQLabel *label = TQLabel *label =
(TQLabel *) objects[labelNo]->qt_cast( "TQLabel" ); (TQLabel *) objects[labelNo]->tqt_cast( "TQLabel" );
if ( label != 0 ) if ( label != 0 )
label->setBuddy( (TQWidget *) objects[buddyNo] ); label->setBuddy( (TQWidget *) objects[buddyNo] );
} while ( !END_OF_BLOCK() ); } while ( !END_OF_BLOCK() );

@ -552,7 +552,7 @@ bool MessageEditor::eventFilter( TQObject *o, TQEvent *e )
TQKeyEvent * ke = (TQKeyEvent*)e; TQKeyEvent * ke = (TQKeyEvent*)e;
const int k = ke->key(); const int k = ke->key();
if ( ::qt_cast<TQTextEdit*>(o) ) { if ( ::tqt_cast<TQTextEdit*>(o) ) {
if ( e->type() == TQEvent::KeyPress ) { if ( e->type() == TQEvent::KeyPress ) {
// Hardcode the Tab key to do focus changes when pressed // Hardcode the Tab key to do focus changes when pressed
// inside the editor // inside the editor
@ -588,7 +588,7 @@ bool MessageEditor::eventFilter( TQObject *o, TQEvent *e )
break; break;
} }
} }
} else if ( ::qt_cast<TQListView*>(o) ) { } else if ( ::tqt_cast<TQListView*>(o) ) {
// handle the ESC key in the list views // handle the ESC key in the list views
if ( e->type() == TQEvent::KeyRelease && k == Key_Escape ) if ( e->type() == TQEvent::KeyRelease && k == Key_Escape )
editorPage->translationMed->setFocus(); editorPage->translationMed->setFocus();

Loading…
Cancel
Save