diff options
Diffstat (limited to 'kexi')
187 files changed, 942 insertions, 942 deletions
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui index 325fe45e..07cced25 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui +++ b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui index b3bd7978..41246d84 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui +++ b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui @@ -61,7 +61,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>21</width> <height>20</height> @@ -136,7 +136,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>41</width> <height>20</height> @@ -187,7 +187,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp index 649f4c26..ce6f8f3b 100644 --- a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp +++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp @@ -159,9 +159,9 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayou // ------------- spacers ----------- TQWidget* spacer1 = new TQWidget( this ); TQWidget* spacer2 = new TQWidget( this ); - spacer1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + spacer1->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); - spacer2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + spacer2->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); grid1->addWidget( spacer1, 4, 0 ); grid1->addWidget( spacer2, 4, 1 ); diff --git a/kexi/3rdparty/kolibs/koGlobal.cc b/kexi/3rdparty/kolibs/koGlobal.cc index 3541e6ea..a88e3bcd 100644 --- a/kexi/3rdparty/kolibs/koGlobal.cc +++ b/kexi/3rdparty/kolibs/koGlobal.cc @@ -133,7 +133,7 @@ void KoGlobal::createListOfLanguages() // currently have en_GB or en_US etc. const TQStringList translationList = KGlobal::dirs()->findAllResources("locale", - TQString::tqfromLatin1("*/entry.desktop")); + TQString::fromLatin1("*/entry.desktop")); for ( TQStringList::ConstIterator it = translationList.begin(); it != translationList.end(); ++it ) { diff --git a/kexi/3rdparty/kolibs/koPageLayout.cpp b/kexi/3rdparty/kolibs/koPageLayout.cpp index 7888ba7d..682a26d6 100644 --- a/kexi/3rdparty/kolibs/koPageLayout.cpp +++ b/kexi/3rdparty/kolibs/koPageLayout.cpp @@ -200,15 +200,15 @@ KoFormat KoPageFormat::guessFormat( double width, double height ) TQString KoPageFormat::formatString( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) - return TQString::tqfromLatin1( pageFormatInfo[ format ].shortName ); - return TQString::tqfromLatin1( "A4" ); + return TQString::fromLatin1( pageFormatInfo[ format ].shortName ); + return TQString::fromLatin1( "A4" ); } KoFormat KoPageFormat::formatFromString( const TQString & string ) { for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { - if (string == TQString::tqfromLatin1( pageFormatInfo[ i ].shortName )) + if (string == TQString::fromLatin1( pageFormatInfo[ i ].shortName )) return pageFormatInfo[ i ].format; } // We do not know the format name, so we have a custom format diff --git a/kexi/3rdparty/kolibs/koUnit.cc b/kexi/3rdparty/kolibs/koUnit.cc index 506e24e1..e8dd16ff 100644 --- a/kexi/3rdparty/kolibs/koUnit.cc +++ b/kexi/3rdparty/kolibs/koUnit.cc @@ -185,15 +185,15 @@ KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) { if ( ok ) *ok = true; - if ( _unitName == TQString::tqfromLatin1( "mm" ) ) return U_MM; - if ( _unitName == TQString::tqfromLatin1( "cm" ) ) return U_CM; - if ( _unitName == TQString::tqfromLatin1( "dm" ) ) return U_DM; - if ( _unitName == TQString::tqfromLatin1( "in" ) - || _unitName == TQString::tqfromLatin1("inch") /*compat*/ ) return U_INCH; - if ( _unitName == TQString::tqfromLatin1( "pi" ) ) return U_PI; - if ( _unitName == TQString::tqfromLatin1( "dd" ) ) return U_DD; - if ( _unitName == TQString::tqfromLatin1( "cc" ) ) return U_CC; - if ( _unitName == TQString::tqfromLatin1( "pt" ) ) return U_PT; + if ( _unitName == TQString::fromLatin1( "mm" ) ) return U_MM; + if ( _unitName == TQString::fromLatin1( "cm" ) ) return U_CM; + if ( _unitName == TQString::fromLatin1( "dm" ) ) return U_DM; + if ( _unitName == TQString::fromLatin1( "in" ) + || _unitName == TQString::fromLatin1("inch") /*compat*/ ) return U_INCH; + if ( _unitName == TQString::fromLatin1( "pi" ) ) return U_PI; + if ( _unitName == TQString::fromLatin1( "dd" ) ) return U_DD; + if ( _unitName == TQString::fromLatin1( "cc" ) ) return U_CC; + if ( _unitName == TQString::fromLatin1( "pt" ) ) return U_PT; if ( ok ) *ok = false; return U_PT; @@ -201,14 +201,14 @@ KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) TQString KoUnit::unitName( Unit _unit ) { - if ( _unit == U_MM ) return TQString::tqfromLatin1( "mm" ); - if ( _unit == U_CM ) return TQString::tqfromLatin1( "cm" ); - if ( _unit == U_DM ) return TQString::tqfromLatin1( "dm" ); - if ( _unit == U_INCH ) return TQString::tqfromLatin1( "in" ); - if ( _unit == U_PI ) return TQString::tqfromLatin1( "pi" ); - if ( _unit == U_DD ) return TQString::tqfromLatin1( "dd" ); - if ( _unit == U_CC ) return TQString::tqfromLatin1( "cc" ); - return TQString::tqfromLatin1( "pt" ); + if ( _unit == U_MM ) return TQString::fromLatin1( "mm" ); + if ( _unit == U_CM ) return TQString::fromLatin1( "cm" ); + if ( _unit == U_DM ) return TQString::fromLatin1( "dm" ); + if ( _unit == U_INCH ) return TQString::fromLatin1( "in" ); + if ( _unit == U_PI ) return TQString::fromLatin1( "pi" ); + if ( _unit == U_DD ) return TQString::fromLatin1( "dd" ); + if ( _unit == U_CC ) return TQString::fromLatin1( "cc" ); + return TQString::fromLatin1( "pt" ); } #ifndef SIMPLE_KOLIBS diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.cc b/kexi/3rdparty/kolibs/koUnitWidgets.cc index 16ec9a55..2b4b76b7 100644 --- a/kexi/3rdparty/kolibs/koUnitWidgets.cc +++ b/kexi/3rdparty/kolibs/koUnitWidgets.cc @@ -222,7 +222,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, const char *name ) : KLineEdit( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - tqsetAlignment( TQt::AlignRight ); + setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( KoUnit::U_PT ); @@ -234,7 +234,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, double lower, doub : KLineEdit( parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - tqsetAlignment( TQt::AlignRight ); + setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); setValidator( m_validator ); setUnit( unit ); @@ -286,7 +286,7 @@ double KoUnitDoubleLineEdit::value( void ) const KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, const char *name ) : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - lineEdit()->tqsetAlignment( TQt::AlignRight ); + lineEdit()->setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( KoUnit::U_PT ); @@ -299,7 +299,7 @@ KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, double lower, doub : KComboBox( true, parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - lineEdit()->tqsetAlignment( TQt::AlignRight ); + lineEdit()->setAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, this ); lineEdit()->setValidator( m_validator ); setUnit( unit ); diff --git a/kexi/core/kexi.cpp b/kexi/core/kexi.cpp index 24cd08e8..d8be5249 100644 --- a/kexi/core/kexi.cpp +++ b/kexi/core/kexi.cpp @@ -172,47 +172,47 @@ TQString Kexi::msgYouCanImproveData() { //-------------------------------------------------------------------------------- -ObjecttqStatus::ObjecttqStatus() +ObjectStatus::ObjectStatus() : msgHandler(0) { } -ObjecttqStatus::ObjecttqStatus(const TQString& message, const TQString& description) +ObjectStatus::ObjectStatus(const TQString& message, const TQString& description) : msgHandler(0) { - settqStatus(message, description); + setStatus(message, description); } -ObjecttqStatus::ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) +ObjectStatus::ObjectStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) : msgHandler(0) { - settqStatus(dbObject, message, description); + setStatus(dbObject, message, description); } -ObjecttqStatus::~ObjecttqStatus() +ObjectStatus::~ObjectStatus() { delete msgHandler; } -const ObjecttqStatus& ObjecttqStatus::status() const +const ObjectStatus& ObjectStatus::status() const { return *this; } -bool ObjecttqStatus::error() const +bool ObjectStatus::error() const { return !message.isEmpty() || (dynamic_cast<KexiDB::Object*>((TQObject*)dbObj) && dynamic_cast<KexiDB::Object*>((TQObject*)dbObj)->error()); } -void ObjecttqStatus::settqStatus(const TQString& message, const TQString& description) +void ObjectStatus::setStatus(const TQString& message, const TQString& description) { this->dbObj=0; this->message=message; this->description=description; } -void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) +void ObjectStatus::setStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description) { if (dynamic_cast<TQObject*>(dbObject)) { dbObj = dynamic_cast<TQObject*>(dbObject); @@ -221,7 +221,7 @@ void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, const TQString& messa this->description=description; } -void ObjecttqStatus::settqStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description) +void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description) { if (result) { if (message.isEmpty()) @@ -235,41 +235,41 @@ void ObjecttqStatus::settqStatus(KexiDB::ResultInfo* result, const TQString& mes this->description = description + " " + result->desc; } else - cleartqStatus(); + clearStatus(); } -void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, +void ObjectStatus::setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, const TQString& message, const TQString& description) { if (!dbObject) - settqStatus(result, message, description); + setStatus(result, message, description); else if (!result) - settqStatus(dbObject, message, description); + setStatus(dbObject, message, description); else { - settqStatus(dbObject, message, description); - settqStatus(result, this->message, this->description); + setStatus(dbObject, message, description); + setStatus(result, this->message, this->description); } } -void ObjecttqStatus::cleartqStatus() +void ObjectStatus::clearStatus() { message=TQString(); description=TQString(); } -TQString ObjecttqStatus::singleStatusString() const { +TQString ObjectStatus::singleStatusString() const { if (message.isEmpty() || description.isEmpty()) return message; return message + " " + description; } -void ObjecttqStatus::append( const ObjecttqStatus& othertqStatus ) { +void ObjectStatus::append( const ObjectStatus& otherStatus ) { if (message.isEmpty()) { - message = othertqStatus.message; - description = othertqStatus.description; + message = otherStatus.message; + description = otherStatus.description; return; } - const TQString s( othertqStatus.singleStatusString() ); + const TQString s( otherStatus.singleStatusString() ); if (s.isEmpty()) return; if (description.isEmpty()) { @@ -283,7 +283,7 @@ void ObjecttqStatus::append( const ObjecttqStatus& othertqStatus ) { class ObjectStatusMessageHandler : public KexiDB::MessageHandler { public: - ObjectStatusMessageHandler(ObjecttqStatus *status) + ObjectStatusMessageHandler(ObjectStatus *status) : KexiDB::MessageHandler() , m_status(status) { @@ -295,18 +295,18 @@ class ObjectStatusMessageHandler : public KexiDB::MessageHandler virtual void showErrorMessage(const TQString &title, const TQString &details = TQString()) { - m_status->settqStatus(title, details); + m_status->setStatus(title, details); } virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString()) { - m_status->settqStatus(obj, msg); + m_status->setStatus(obj, msg); } - ObjecttqStatus *m_status; + ObjectStatus *m_status; }; -ObjecttqStatus::operator KexiDB::MessageHandler*() +ObjectStatus::operator KexiDB::MessageHandler*() { if (!msgHandler) msgHandler = new ObjectStatusMessageHandler(this); diff --git a/kexi/core/kexi.h b/kexi/core/kexi.h index 426854e6..5a6804a5 100644 --- a/kexi/core/kexi.h +++ b/kexi/core/kexi.h @@ -87,43 +87,43 @@ namespace Kexi KEXICORE_EXPORT TQFont smallFont(TQWidget *init = 0); /*! Helper class for storing object status. */ - class KEXICORE_EXPORT ObjecttqStatus + class KEXICORE_EXPORT ObjectStatus { public: - ObjecttqStatus(); + ObjectStatus(); - ObjecttqStatus(const TQString& message, const TQString& description); + ObjectStatus(const TQString& message, const TQString& description); - ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description); + ObjectStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description); - ~ObjecttqStatus(); + ~ObjectStatus(); - const ObjecttqStatus& status() const; + const ObjectStatus& status() const; bool error() const; - void settqStatus(const TQString& message, const TQString& description); + void setStatus(const TQString& message, const TQString& description); //! Note: for safety, \a dbObject needs to be derived from TQObject, //! otherwise it won't be assigned - void settqStatus(KexiDB::Object* dbObject, + void setStatus(KexiDB::Object* dbObject, const TQString& message = TQString(), const TQString& description = TQString()); - void settqStatus(KexiDB::ResultInfo* result, + void setStatus(KexiDB::ResultInfo* result, const TQString& message = TQString(), const TQString& description = TQString()); - void settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, + void setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result, const TQString& message = TQString(), const TQString& description = TQString()); - void cleartqStatus(); + void clearStatus(); TQString singleStatusString() const; - void append( const ObjecttqStatus& othertqStatus ); + void append( const ObjectStatus& otherStatus ); KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((TQObject*)dbObj); } - //! Helper returning pseudo handler that just updates this ObjecttqStatus object + //! Helper returning pseudo handler that just updates this ObjectStatus object //! by receiving a message operator KexiDB::MessageHandler*(); diff --git a/kexi/core/kexiblobbuffer.cpp b/kexi/core/kexiblobbuffer.cpp index a4c57791..aeb621c4 100644 --- a/kexi/core/kexiblobbuffer.cpp +++ b/kexi/core/kexiblobbuffer.cpp @@ -289,7 +289,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored) KexiDB::RowData rowData; tristate res = d->conn->querySingleRecord( schema, -// TQString::tqfromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=") +// TQString::fromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=") // +TQString::number(id), rowData); if (res!=true || rowData.size()<4) { diff --git a/kexi/core/kexidialogbase.cpp b/kexi/core/kexidialogbase.cpp index ff642741..14651f3f 100644 --- a/kexi/core/kexidialogbase.cpp +++ b/kexi/core/kexidialogbase.cpp @@ -117,20 +117,20 @@ void KexiDialogBase::removeView(int mode) m_openedViewModes ^= mode; } -TQSize KexiDialogBase::tqminimumSizeHint() const +TQSize KexiDialogBase::minimumSizeHint() const { KexiViewBase *v = selectedView(); if (!v) - return KMdiChildView::tqminimumSizeHint(); - return v->tqminimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0); + return KMdiChildView::minimumSizeHint(); + return v->minimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0); } -TQSize KexiDialogBase::tqsizeHint() const +TQSize KexiDialogBase::sizeHint() const { KexiViewBase *v = selectedView(); if (!v) - return KMdiChildView::tqsizeHint(); - return v->preferredSizeHint( v->tqsizeHint() ); + return KMdiChildView::sizeHint(); + return v->preferredSizeHint( v->sizeHint() ); } /* @@ -377,8 +377,8 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, TQMap<TQString,TQStr delete newView; kdDebug() << "Switching to mode " << newViewMode << " failed. Previous mode " << prevViewMode << " restored." << endl; - const Kexi::ObjecttqStatus status(*this); - settqStatus(mainWin()->project()->dbConnection(), + const Kexi::ObjectStatus status(*this); + setStatus(mainWin()->project()->dbConnection(), i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(newViewMode)),""); append( status ); m_currentViewMode = prevViewMode; @@ -517,7 +517,7 @@ tristate KexiDialogBase::storeNewData() if (cancel) return cancelled; if (!m_schemaData) { - settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),""); + setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),""); return false; } @@ -594,7 +594,7 @@ tristate KexiDialogBase::storeData(bool dontAsk) return false; #define storeData_ERR \ - settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),""); + setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),""); //save changes using transaction KexiDB::Transaction transaction = m_parentWindow->project()->dbConnection()->beginTransaction(); @@ -624,8 +624,8 @@ tristate KexiDialogBase::storeData(bool dontAsk) void KexiDialogBase::activate() { KexiViewBase *v = selectedView(); - //kdDebug() << "tqfocusWidget(): " << tqfocusWidget()->name() << endl; - if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//tqfocusWidget())) + //kdDebug() << "focusWidget(): " << focusWidget()->name() << endl; + if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//focusWidget())) KMdiChildView::activate(); else {//ah, focused widget is not in this view, move focus: if (v) diff --git a/kexi/core/kexidialogbase.h b/kexi/core/kexidialogbase.h index 6449004b..d98e9d04 100644 --- a/kexi/core/kexidialogbase.h +++ b/kexi/core/kexidialogbase.h @@ -75,7 +75,7 @@ class KEXICORE_EXPORT KexiDialogTempData : public TQObject class KEXICORE_EXPORT KexiDialogBase : public KMdiChildView, public KexiActionProxy, - public Kexi::ObjecttqStatus + public Kexi::ObjectStatus { Q_OBJECT TQ_OBJECT @@ -101,10 +101,10 @@ class KEXICORE_EXPORT KexiDialogBase : // virtual TQWidget* mainWidget() = 0; /*! reimplemented: minimum size hint is inherited from currently visible view. */ - virtual TQSize tqminimumSizeHint() const; + virtual TQSize minimumSizeHint() const; /*! reimplemented: size hint is inherited from currently visible view. */ - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; KexiMainWindow *mainWin() const { return m_parentWindow; } diff --git a/kexi/core/kexiguimsghandler.cpp b/kexi/core/kexiguimsghandler.cpp index 4121543e..5b2b2791 100644 --- a/kexi/core/kexiguimsghandler.cpp +++ b/kexi/core/kexiguimsghandler.cpp @@ -77,13 +77,13 @@ void KexiGUIMessageHandler::showErrorMessage(const TQString &msg, const TQString } void -KexiGUIMessageHandler::showErrorMessage(Kexi::ObjecttqStatus *status) +KexiGUIMessageHandler::showErrorMessage(Kexi::ObjectStatus *status) { showErrorMessage("", status); } void -KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status) +KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjectStatus *status) { if (status && status->error()) { TQString msg(message); @@ -106,7 +106,7 @@ KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjecttqS else { showErrorMessage(message); } - status->cleartqStatus(); + status->clearStatus(); } void diff --git a/kexi/core/kexiguimsghandler.h b/kexi/core/kexiguimsghandler.h index af407ab1..362884dc 100644 --- a/kexi/core/kexiguimsghandler.h +++ b/kexi/core/kexiguimsghandler.h @@ -32,8 +32,8 @@ class KEXICORE_EXPORT KexiGUIMessageHandler : public KexiDB::MessageHandler virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString()); void showErrorMessage(const TQString&,const TQString&,KexiDB::Object *obj); - void showErrorMessage(Kexi::ObjecttqStatus *status); - void showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status); + void showErrorMessage(Kexi::ObjectStatus *status); + void showErrorMessage(const TQString &message, Kexi::ObjectStatus *status); /*! Displays a "Sorry" message with \a title text and optional \a details. */ void showSorryMessage(const TQString &title, const TQString &details = TQString()); diff --git a/kexi/core/kexiinternalpart.cpp b/kexi/core/kexiinternalpart.cpp index 93d73cac..669039cc 100644 --- a/kexi/core/kexiinternalpart.cpp +++ b/kexi/core/kexiinternalpart.cpp @@ -118,8 +118,8 @@ KexiDialogBase* KexiInternalPart::findOrCreateKexiDialog( dlg->addView(view); dlg->setCaption( view->caption() ); dlg->setTabCaption( view->caption() ); - dlg->resize(view->tqsizeHint()); - dlg->setMinimumSize(view->tqminimumSizeHint().width(),view->tqminimumSizeHint().height()); + dlg->resize(view->sizeHint()); + dlg->setMinimumSize(view->minimumSizeHint().width(),view->minimumSizeHint().height()); dlg->setId( mainWin->generatePrivateID() ); dlg->registerDialog(); return dlg; diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp index ba54fea7..6671e168 100644 --- a/kexi/core/kexipart.cpp +++ b/kexi/core/kexipart.cpp @@ -242,7 +242,7 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in d->instanceActionsInitialized = true; } - m_status.cleartqStatus(); + m_status.clearStatus(); // KexiDialogBase *dlg = createInstance(win,item,viewMode); // if (!dlg) // return 0; @@ -289,10 +289,10 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in } if (!dlg->m_schemaData) { if (!m_status.error()) - m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(), + m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(), i18n("Could not load object's definition."), i18n("Object design may be corrupted.")); m_status.append( - Kexi::ObjecttqStatus(i18n("You can delete \"%1\" object and create it again.") + Kexi::ObjectStatus(i18n("You can delete \"%1\" object and create it again.") .tqarg(item.name()), TQString()) ); dlg->close(); @@ -339,9 +339,9 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in dlg->show(); if (dlg->mdiParent() && dlg->mdiParent()->state()==KMdiChildFrm::Normal) //only resize dialog if it is in normal state - dlg->resize(dlg->tqsizeHint()); + dlg->resize(dlg->sizeHint()); - dlg->setMinimumSize(dlg->tqminimumSizeHint().width(),dlg->tqminimumSizeHint().height()); + dlg->setMinimumSize(dlg->minimumSizeHint().width(),dlg->minimumSizeHint().height()); //dirty only if it's a new object if (dlg->selectedView()) @@ -366,7 +366,7 @@ KexiDB::SchemaData* Part::loadSchemaData(KexiDialogBase * /*dlg*/, const KexiDB: bool Part::loadDataBlock( KexiDialogBase *dlg, TQString &dataString, const TQString& dataID) { if (!dlg->mainWin()->project()->dbConnection()->loadDataBlock( dlg->id(), dataString, dataID )) { - m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(), + m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(), i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").tqarg(dataID) ); m_status.append( *dlg ); return false; @@ -435,7 +435,7 @@ GUIClient::GUIClient(KexiMainWindow *win, Part* part, bool partInstanceClient, c , KXMLGUIClient(win) { if(!win->project()->data()->userMode()) - setXMLFile(TQString::tqfromLatin1("kexi")+part->info()->objectName() + setXMLFile(TQString::fromLatin1("kexi")+part->info()->objectName() +"part"+(partInstanceClient?"inst":"")+"ui.rc"); // new KAction(part->m_names["new"], part->info()->itemIcon(), 0, this, diff --git a/kexi/core/kexipart.h b/kexi/core/kexipart.h index f1168fd4..c448b8bf 100644 --- a/kexi/core/kexipart.h +++ b/kexi/core/kexipart.h @@ -186,7 +186,7 @@ class KEXICORE_EXPORT Part : public TQObject /*! \return action collection for mode \a viewMode. */ KActionCollection* actionCollectionForMode(int viewMode) const; - const Kexi::ObjecttqStatus& lastOperationtqStatus() const { return m_status; } + const Kexi::ObjectStatus& lastOperationStatus() const { return m_status; } /*! \return i18n'd message translated from \a englishMessage. This method is useful for messages like: @@ -309,7 +309,7 @@ class KEXICORE_EXPORT Part : public TQObject GUIClient *m_guiClient; TQIntDict<GUIClient> m_instanceGuiClients; KexiMainWindow* m_mainWin; - Kexi::ObjecttqStatus m_status; + Kexi::ObjectStatus m_status; /*! If you're implementing a new part, set this to value >0 in your ctor if you have well known (ie registered ID) for your part. diff --git a/kexi/core/kexiproject.cpp b/kexi/core/kexiproject.cpp index 159de750..5b26cb39 100644 --- a/kexi/core/kexiproject.cpp +++ b/kexi/core/kexiproject.cpp @@ -381,10 +381,10 @@ bool KexiProject::createInternalStructures(bool insideTransaction) } // 2.1 copy data (insert 0's into o_folder_id column) if (!d->connection->executeSQL( - TQString::tqfromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) " + TQString::fromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) " "SELECT o_data, o_name, o_caption, o_mime, 0 FROM kexi__blobs") ) // 2.2 remove the original kexi__blobs - || !d->connection->executeSQL(TQString::tqfromLatin1("DROP TABLE kexi__blobs")) //lowlevel + || !d->connection->executeSQL(TQString::fromLatin1("DROP TABLE kexi__blobs")) //lowlevel // 2.3 rename the copy back into kexi__blobs || !d->connection->drv_alterTableName(*kexi__blobsCopy, "kexi__blobs") ) @@ -735,10 +735,10 @@ KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, KexiPart::Item& ite return 0; KexiDialogBase *dlg = part->openInstance(wnd, item, viewMode, staticObjectArgs); if (!dlg) { - if (part->lastOperationtqStatus().error()) + if (part->lastOperationStatus().error()) setError(i18n("Opening object \"%1\" failed.").tqarg(item.name())+"<br>" - +part->lastOperationtqStatus().message, - part->lastOperationtqStatus().description); + +part->lastOperationStatus().message, + part->lastOperationStatus().description); return 0; } return dlg; @@ -835,7 +835,7 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const return false; } if (!part->rename(wnd, item, newName)) { - setError(part->lastOperationtqStatus().message, part->lastOperationtqStatus().description); + setError(part->lastOperationStatus().message, part->lastOperationStatus().description); return false; } if (!d->connection->executeSQL( "update kexi__objects set o_name=" diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp index 6a696461..04197412 100644 --- a/kexi/core/kexisharedactionhost.cpp +++ b/kexi/core/kexisharedactionhost.cpp @@ -42,7 +42,7 @@ KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h void KexiSharedActionHostPrivate::slotAction(const TQString& act_id) { - TQWidget *w = host->focusWindow(); //tqfocusWidget(); + TQWidget *w = host->focusWindow(); //focusWidget(); // while (w && !w->inherits("KexiDialogBase") && !w->inherits("KexiDockBase")) // w = w->parentWidget(); @@ -111,7 +111,7 @@ void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool a }*/ if (!d) return; //sanity - TQWidget *fw = d->mainWin->tqfocusWidget(); + TQWidget *fw = d->mainWin->focusWidget(); while (fw && TQT_BASE_OBJECT(obj)!=TQT_BASE_OBJECT(fw)) fw = fw->parentWidget(); if (!fw) @@ -205,7 +205,7 @@ TQWidget* KexiSharedActionHost::focusWindow() TQWidget *aw = TQT_TQWIDGET(tqApp->activeWindow()); if (!aw) aw = d->mainWin; - fw = aw->tqfocusWidget(); + fw = aw->focusWidget(); } while (fw && !acceptsSharedActions(TQT_TQOBJECT(fw))) fw = fw->parentWidget(); diff --git a/kexi/core/kexisharedactionhost.h b/kexi/core/kexisharedactionhost.h index 91cc09f4..c7fcb181 100644 --- a/kexi/core/kexisharedactionhost.h +++ b/kexi/core/kexisharedactionhost.h @@ -69,7 +69,7 @@ class KEXICORE_EXPORT KexiSharedActionHost */ virtual bool acceptsSharedActions(TQObject *o); - /*! \return window widget that is currently focused (using TQWidget::tqfocusWidget()) + /*! \return window widget that is currently focused (using TQWidget::focusWidget()) and matches acceptsSharedActions(). If focused widget does not match, it's parent, grandparent, and so on is checked. If all this fails, or no widget has focus, NULL is returned. diff --git a/kexi/core/kexiviewbase.cpp b/kexi/core/kexiviewbase.cpp index e89f4a4e..45df1b0d 100644 --- a/kexi/core/kexiviewbase.cpp +++ b/kexi/core/kexiviewbase.cpp @@ -214,26 +214,26 @@ bool KexiViewBase::eventFilter( TQObject *o, TQEvent *e ) { if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) {// && o->inherits(TQWIDGET_OBJECT_NAME_STRING)) { // //hp==true if currently focused widget is a child of this table view -// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), tqfocusWidget()); +// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), focusWidget()); // kexidbg << "KexiViewBase::eventFilter(): " << o->name() << " " << e->type() << endl; if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(o))) { - if (e->type()==TQEvent::FocusOut && tqfocusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) { + if (e->type()==TQEvent::FocusOut && focusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(focusWidget()))) { //focus out: when currently focused widget is not a parent of this view emit focus(false); } else if (e->type()==TQEvent::FocusIn) { emit focus(true); } - if (e->type()==TQEvent::FocusOut) { // && tqfocusWidget() && Kexi::hasParent( this, tqfocusWidget())) { // && tqfocusWidget()->inherits("KexiViewBase")) { -// kdDebug() << tqfocusWidget()->className() << " " << tqfocusWidget()->name()<< endl; + if (e->type()==TQEvent::FocusOut) { // && focusWidget() && Kexi::hasParent( this, focusWidget())) { // && focusWidget()->inherits("KexiViewBase")) { +// kdDebug() << focusWidget()->className() << " " << focusWidget()->name()<< endl; // kdDebug() << o->className() << " " << o->name()<< endl; KexiViewBase *v = KexiUtils::findParent<KexiViewBase>(o, "KexiViewBase") ; -// TQWidget *www=v->tqfocusWidget(); +// TQWidget *www=v->focusWidget(); if (v) { while (v->m_parentView) v = v->m_parentView; - if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(v->tqfocusWidget()) )) - v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(v->tqfocusWidget()); -// v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(o); //tqfocusWidget(); + if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(v->focusWidget()) )) + v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(v->focusWidget()); +// v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(o); //focusWidget(); } } diff --git a/kexi/core/kexiviewbase.h b/kexi/core/kexiviewbase.h index 139f0b2d..1b2b6f38 100644 --- a/kexi/core/kexiviewbase.h +++ b/kexi/core/kexiviewbase.h @@ -71,7 +71,7 @@ class KEXICORE_EXPORT KexiViewBase : public TQWidget, public KexiActionProxy /*! \return preferred size hint, that can be used to resize the view. It is computed using maximum of (a) \a otherSize and (b) current KMDI dock area's size, - so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::tqsizeHint(). + so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::sizeHint(). If you reimplement this method, do not forget to return value of yoursize.boundedTo( KexiViewBase::preferredSizeHint(otherSize) ). */ virtual TQSize preferredSizeHint(const TQSize& otherSize); diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp index c9bad809..241a1291 100644 --- a/kexi/formeditor/commands.cpp +++ b/kexi/formeditor/commands.cpp @@ -127,7 +127,7 @@ PropertyCommand::unexecute() WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(widg); TQWidget *subWidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widg; - if (-1!=subWidget->tqmetaObject()->findProperty( m_property, true )) + if (-1!=subWidget->metaObject()->findProperty( m_property, true )) subWidget->setProperty(m_property, it.data()); } @@ -438,7 +438,7 @@ AdjustSizeCommand::execute() if(item && !item->tqchildren()->isEmpty()) { // container TQSize s; if(item->container() && item->container()->tqlayout()) - s = w->tqsizeHint(); + s = w->sizeHint(); else s = getSizeFromChildren(item); // minimum size for containers @@ -457,9 +457,9 @@ AdjustSizeCommand::execute() else if(item && item->container()) // empty container w->resize(item->container()->form()->gridSize() * 5, item->container()->form()->gridSize() * 5); // basic size else { - TQSize tqsizeHint(w->tqsizeHint()); - if (tqsizeHint.isValid()) - w->resize(tqsizeHint); + TQSize sizeHint(w->sizeHint()); + if (sizeHint.isValid()) + w->resize(sizeHint); } } break; @@ -755,7 +755,7 @@ InsertWidgetCommand::execute() // if the insertRect is invalid (ie only one point), we use widget' size hint if(( (m_insertRect.width() < 21) && (m_insertRect.height() < 21))) { - TQSize s = w->tqsizeHint(); + TQSize s = w->sizeHint(); if(s.isEmpty()) s = TQSize(20, 20); // Minimum size to avoid creating a (0,0) widget @@ -912,7 +912,7 @@ CreateLayoutCommand::execute() container->setSelectedWidget(0, false); w->move(m_pos.begin().data().topLeft()); // we move the tqlayout at the position of the topleft widget - // tqsizeHint of these widgets depends on tqgeometry, so give them appropriate tqgeometry + // sizeHint of these widgets depends on tqgeometry, so give them appropriate tqgeometry if(m_type == Container::HFlow) w->resize( TQSize(700, 20) ); else if(m_type == Container::VFlow) @@ -938,7 +938,7 @@ CreateLayoutCommand::execute() ((TQSplitter*)w)->setOrientation(Qt::Vertical); else if(tree->container()) { tree->container()->setLayout((Container::LayoutType)m_type); - w->resize(tree->container()->tqlayout()->tqsizeHint()); // the tqlayout doesn't have its own size + w->resize(tree->container()->tqlayout()->sizeHint()); // the tqlayout doesn't have its own size } container->setSelectedWidget(w, false); @@ -1249,13 +1249,13 @@ PasteWidgetCommand::fixPos(TQDomElement &el, Container *container) int rh = h.text().toInt(); TQRect r(rx, ry, rw, rh); - TQWidget *w = m_form->widget()->tqchildAt(r.x() + 6, r.y() + 6, false); + TQWidget *w = m_form->widget()->childAt(r.x() + 6, r.y() + 6, false); if(!w) return; while((w->tqgeometry() == r) && (w != 0))// there is already a widget there, with the same size { - w = m_form->widget()->tqchildAt(w->x() + 16, w->y() + 16, false); + w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false); r.moveBy(10,10); } @@ -1300,11 +1300,11 @@ PasteWidgetCommand::moveWidgetBy(TQDomElement &el, Container *container, const T TQRect r(rx + p.x(), ry + p.y(), rw, rh); kdDebug() << "Moving widget by " << p << " from " << rx << " " << ry << " to " << r.topLeft() << endl; - TQWidget *w = m_form->widget()->tqchildAt(r.x() + 6, r.y() + 6, false); + TQWidget *w = m_form->widget()->childAt(r.x() + 6, r.y() + 6, false); while(w && (w->tqgeometry() == r))// there is already a widget there, with the same size { - w = m_form->widget()->tqchildAt(w->x() + 16, w->y() + 16, false); + w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false); r.moveBy(10,10); } diff --git a/kexi/formeditor/connectiondialog.cpp b/kexi/formeditor/connectiondialog.cpp index f683ce74..38b6e08e 100644 --- a/kexi/formeditor/connectiondialog.cpp +++ b/kexi/formeditor/connectiondialog.cpp @@ -60,10 +60,10 @@ ConnectionDialog::ConnectionDialog(TQWidget *parent) m_pixmapLabel = new TQLabel(details); m_pixmapLabel->setFixedWidth( int(IconSize(KIcon::Desktop) * 1.5) ); - m_pixmapLabel->tqsetAlignment(AlignHCenter | AlignTop); + m_pixmapLabel->setAlignment(AlignHCenter | AlignTop); m_textLabel = new TQLabel(details); - m_textLabel->tqsetAlignment(AlignLeft | AlignTop); + m_textLabel->setAlignment(AlignLeft | AlignTop); //setStatusOk(); // And the KexiTableView //////// @@ -289,7 +289,7 @@ ConnectionDialog::updateSlotList(KexiTableItem *item) TQString signalArg(signal); signalArg = signalArg.remove( TQRegExp(".*[(]|[)]") ); - TQStrList slotList = tree->widget()->tqmetaObject()->slotNames(true); + TQStrList slotList = tree->widget()->metaObject()->slotNames(true); TQStrListIterator it(slotList); for(; it.current() != 0; ++it) { @@ -297,7 +297,7 @@ ConnectionDialog::updateSlotList(KexiTableItem *item) TQString slotArg(*it); slotArg = slotArg.remove( TQRegExp(".*[(]|[)]") ); - if(!signalArg.tqstartsWith(slotArg, true) && (!signal.isEmpty())) // args not compatible + if(!signalArg.startsWith(slotArg, true) && (!signal.isEmpty())) // args not compatible continue; KexiTableItem *item = m_slotsColumnData->createItem(); //new KexiTableItem(2); @@ -315,7 +315,7 @@ ConnectionDialog::updateSignalList(KexiTableItem *item) return; m_signalsColumnData->deleteAllRows(); - TQStrList signalList = tree->widget()->tqmetaObject()->signalNames(true); + TQStrList signalList = tree->widget()->metaObject()->signalNames(true); TQStrListIterator it(signalList); for(; it.current() != 0; ++it) { @@ -346,7 +346,7 @@ ConnectionDialog::checkConnection(KexiTableItem *item) TQString slot = (*item)[4].toString(); slot = slot.remove( TQRegExp(".*[(]|[)]") ); - if(!signal.tqstartsWith(slot, true)) + if(!signal.startsWith(slot, true)) { setStatusError( i18n("The signal/slot arguments are not compatible."), item); return; diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp index acc72c24..2e30d5f4 100644 --- a/kexi/formeditor/factories/containerfactory.cpp +++ b/kexi/formeditor/factories/containerfactory.cpp @@ -73,7 +73,7 @@ ContainerWidget::~ContainerWidget() { } -TQSize ContainerWidget::tqsizeHint() const +TQSize ContainerWidget::sizeHint() const { return TQSize(30,30); //default } @@ -125,7 +125,7 @@ KFDTabWidget::~KFDTabWidget() } TQSize -KFDTabWidget::tqsizeHint() const +KFDTabWidget::sizeHint() const { TQSize s(30,30); // default min size for(int i=0; i < count(); i++) @@ -218,10 +218,10 @@ VFlow::paintEvent(TQPaintEvent *) } TQSize -VFlow::tqsizeHint() const +VFlow::sizeHint() const { if(tqlayout()) - return tqlayout()->tqsizeHint(); + return tqlayout()->sizeHint(); else return TQSize(700, 50); // default } @@ -318,7 +318,7 @@ SubForm::SubForm(TQWidget *parent, const char *name) : TQScrollView(parent, name), m_form(0), m_widget(0) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); + viewport()->setPaletteBackgroundColor(colorGroup().mid()); } void @@ -860,7 +860,7 @@ void ContainerFactory::renameTabPage() #if TDE_VERSION < KDE_MAKE_VERSION(3,1,9) TQLineEdit::Normal, #endif - tab->tabLabel(w), &ok, w->tqtopLevelWidget()); + tab->tabLabel(w), &ok, w->topLevelWidget()); if(ok) tab->changeTab(w, name); } diff --git a/kexi/formeditor/factories/containerfactory.h b/kexi/formeditor/factories/containerfactory.h index b88b437f..6f013e9c 100644 --- a/kexi/formeditor/factories/containerfactory.h +++ b/kexi/formeditor/factories/containerfactory.h @@ -126,7 +126,7 @@ class KFORMEDITOR_EXPORT VFlow : public TQFrame virtual ~VFlow(){;} void setPreviewMode() {m_preview = true;} virtual void paintEvent(TQPaintEvent *ev); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; protected: bool m_preview; @@ -144,7 +144,7 @@ class KFORMEDITOR_EXPORT ContainerWidget : public TQWidget ContainerWidget(TQWidget *parent, const char *name); virtual ~ContainerWidget(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; //! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface virtual void dragMoveEvent( TQDragMoveEvent *e ); @@ -170,7 +170,7 @@ class KFORMEDITOR_EXPORT KFDTabWidget : public KFormDesigner::TabWidget KFDTabWidget(TQWidget *parent, const char *name); virtual ~KFDTabWidget(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; //! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface virtual void dragMoveEvent( TQDragMoveEvent *e ); diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp index 24827e13..afc37086 100644 --- a/kexi/formeditor/factories/stdwidgetfactory.cpp +++ b/kexi/formeditor/factories/stdwidgetfactory.cpp @@ -431,13 +431,13 @@ StdWidgetFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, w = new KProgress(p, n); else if(c == "KDateWidget") - w = new KDateWidget(TQDate::tqcurrentDate(), p, n); + w = new KDateWidget(TQDate::currentDate(), p, n); else if(c == "KTimeWidget") w = new KTimeWidget(TQTime::currentTime(), p, n); else if(c == "KDateTimeWidget") - w = new KDateTimeWidget(TQDateTime::tqcurrentDateTime(), p, n); + w = new KDateTimeWidget(TQDateTime::currentDateTime(), p, n); else if(c == "Line") w = new Line(options & WidgetFactory::VerticalOrientation ? Qt::Vertical : Qt::Horizontal, p, n); @@ -605,13 +605,13 @@ StdWidgetFactory::changeText(const TQString &text) else changeProperty("text", text, m_container->form()); - /* By-hand method not needed as tqsizeHint() can do that for us + /* By-hand method not needed as sizeHint() can do that for us TQFontMetrics fm = w->fontMetrics(); TQSize s(fm.width( text ), fm.height()); int width; if(n == TQLABEL_OBJECT_NAME_STRING) // labels are resized to fit the text { - w->resize(w->tqsizeHint()); + w->resize(w->sizeHint()); WidgetFactory::m_editor->resize(w->size()); return; } @@ -624,7 +624,7 @@ StdWidgetFactory::changeText(const TQString &text) width = w->style().sizeFromContents( TQStyle::CT_RadioButton, w, s).width(); else return; - int width = w->tqsizeHint().width();*/ + int width = w->sizeHint().width();*/ #if 0 //not needed here, size hint is used on creation in InsertWidgetCommand::execute() if(w->width() < width) @@ -956,7 +956,7 @@ StdWidgetFactory::editText() } if(classname == TQLABEL_OBJECT_NAME_STRING) - widget()->resize(widget()->tqsizeHint()); + widget()->resize(widget()->sizeHint()); } void diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp index b5b20936..237c7ec8 100644 --- a/kexi/formeditor/form.cpp +++ b/kexi/formeditor/form.cpp @@ -364,10 +364,10 @@ Form::changeName(const TQCString &oldname, const TQCString &newname) return; if(!d->topTree->rename(oldname, newname)) // rename failed { - KMessageBox::sorry(widget()->tqtopLevelWidget(), + KMessageBox::sorry(widget()->topLevelWidget(), i18n("Renaming widget \"%1\" to \"%2\" failed.").tqarg(TQString(oldname)).tqarg(TQString(newname))); //moved to WidgetPropertySet::slotChangeProperty() -// KMessageBox::sorry(widget()->tqtopLevelWidget(), +// KMessageBox::sorry(widget()->topLevelWidget(), // i18n("A widget with this name already exists. " // "Please choose another name or rename existing widget.")); kdDebug() << "Form::changeName() : ERROR : A widget named " << newname << " already exists" << endl; diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp index 2759fe98..24347c40 100644 --- a/kexi/formeditor/formIO.cpp +++ b/kexi/formeditor/formIO.cpp @@ -406,10 +406,10 @@ FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &parent, const WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w); TQWidget *subwidget = w; bool addSubwidgetFlag = false; - int propertyId = w->tqmetaObject()->findProperty(name, true); + int propertyId = w->metaObject()->findProperty(name, true); if (propertyId == -1 && subpropIface && subpropIface->subwidget()) { // try property from subwidget subwidget = subpropIface->subwidget(); - propertyId = subpropIface->subwidget()->tqmetaObject()->findProperty(name, true); + propertyId = subpropIface->subwidget()->metaObject()->findProperty(name, true); addSubwidgetFlag = true; } if(propertyId == -1) @@ -420,7 +420,7 @@ FormIO::savePropertyValue(TQDomElement &parentNode, TQDomDocument &parent, const return; } - const TQMetaProperty *meta = subwidget->tqmetaObject()->property(propertyId, true); + const TQMetaProperty *meta = subwidget->metaObject()->property(propertyId, true); if (!meta->stored( subwidget )) //not storable return; TQDomElement propertyE = parent.createElement("property"); @@ -880,8 +880,8 @@ FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name) { WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(obj); TQObject *subobject = (subpropIface && subpropIface->subwidget()) ? TQT_TQOBJECT(subpropIface->subwidget()) : obj; - const int count = subobject->tqmetaObject()->findProperty(name.latin1(), true); - const TQMetaProperty *meta = count!=-1 ? subobject->tqmetaObject()->property(count, true) : 0; + const int count = subobject->metaObject()->findProperty(name.latin1(), true); + const TQMetaProperty *meta = count!=-1 ? subobject->metaObject()->property(count, true) : 0; if (meta) { if (meta->isSetType()) { @@ -968,7 +968,7 @@ FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &parent, TQDomDocument &do // - needed when subproperties are defined after subwidget creation, and subwidget is created after setting "dataSource" // (this is the case for KexiDBAutoField) //! @todo more properties like "dataSource" may needed here... -// if (-1 != item->widget()->tqmetaObject()->findProperty("dataSource")) +// if (-1 != item->widget()->metaObject()->findProperty("dataSource")) // savePropertyValue(tclass, domDoc, "dataSource", item->widget()->property("dataSource"), item->widget()); // We don't want to save the tqgeometry if the widget is inside a tqlayout (so parent.tagName() == "grid" for example) @@ -1261,7 +1261,7 @@ FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *paren = dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>(w); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w; for(TQValueList<TQCString>::ConstIterator it = list.constBegin(); it != endIt; ++it) { - if(subwidget->tqmetaObject()->findProperty(*it, true) != -1) + if(subwidget->metaObject()->findProperty(*it, true) != -1) item->addModifiedProperty(*it, subwidget->property(*it)); } @@ -1376,9 +1376,9 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl } } // If the object doesn't have this property, we let the Factory handle it (maybe a special property) - else if(subwidget->tqmetaObject()->findProperty(name.latin1(), true) == -1) + else if(subwidget->metaObject()->findProperty(name.latin1(), true) == -1) { - if(w->className() == TQString::tqfromLatin1("CustomWidget")) + if(w->className() == TQString::fromLatin1("CustomWidget")) item->storeUnknownProperty(node); else { bool read = container->form()->library()->readSpecialProperty( @@ -1400,8 +1400,8 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl val = r; } subwidget->setProperty(name.latin1(), val); -// int count = w->tqmetaObject()->findProperty(name, true); -// const TQMetaProperty *meta = w->tqmetaObject()->property(count, true); +// int count = w->metaObject()->findProperty(name, true); +// const TQMetaProperty *meta = w->metaObject()->property(count, true); // if(meta && meta->isEnumType()) { // val = w->property(name.latin1()); //update: we want a numeric value of enum // } @@ -1460,7 +1460,7 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomEl readChildNodes(item, container, node, w); } else {// unknown tag, we let the Factory handle it - if(w->className() == TQString::tqfromLatin1("CustomWidget")) + if(w->className() == TQString::fromLatin1("CustomWidget")) item->storeUnknownProperty(node); else { bool read = container->form()->library()->readSpecialProperty( diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp index a2ed0dac..5fb76ca8 100644 --- a/kexi/formeditor/formmanager.cpp +++ b/kexi/formeditor/formmanager.cpp @@ -227,7 +227,7 @@ FormManager::createActions(WidgetLibrary *lib, KActionCollection* collection, KX m_style->setEditable(false); KGlobal::config()->setGroup("General"); - TQString currentStyle = TQString::tqfromLatin1(kapp->tqstyle().name()).lower(); + TQString currentStyle = TQString::fromLatin1(kapp->tqstyle().name()).lower(); const TQStringList styles = TQStyleFactory::keys(); m_style->setItems(styles); m_style->setCurrentItem(0); @@ -790,7 +790,7 @@ FormManager::createSignalMenu(TQWidget *w) m_sigSlotMenu = new KPopupMenu(); m_sigSlotMenu->insertTitle(SmallIcon("connection"), i18n("Signals")); - TQStrList list = w->tqmetaObject()->signalNames(true); + TQStrList list = w->metaObject()->signalNames(true); TQStrListIterator it(list); for(; it.current() != 0; ++it) m_sigSlotMenu->insertItem(*it); @@ -813,14 +813,14 @@ FormManager::createSlotMenu(TQWidget *w) TQString signalArg( m_connection->signal().remove( TQRegExp(".*[(]|[)]") ) ); - TQStrList list = w->tqmetaObject()->slotNames(true); + TQStrList list = w->metaObject()->slotNames(true); TQStrListIterator it(list); for(; it.current() != 0; ++it) { // we add the slot only if it is compatible with the signal TQString slotArg(*it); slotArg = slotArg.remove( TQRegExp(".*[(]|[)]") ); - if(!signalArg.tqstartsWith(slotArg, true)) // args not compatible + if(!signalArg.startsWith(slotArg, true)) // args not compatible continue; m_sigSlotMenu->insertItem(*it); @@ -937,7 +937,7 @@ FormManager::createContextMenu(TQWidget *w, Container *container, bool popupAtCu // We create the signals menu KPopupMenu *sigMenu = new KPopupMenu(); - TQStrList list = w->tqmetaObject()->signalNames(true); + TQStrList list = w->metaObject()->signalNames(true); TQStrListIterator it(list); for(; it.current() != 0; ++it) sigMenu->insertItem(*it); @@ -1115,7 +1115,7 @@ FormManager::createLayout(int layoutType) kdDebug() << "comparing widget " << w->name() << " whose parent is " << w->parentWidget()->name() << " insteaed of " << parent->name() << endl; if(w->parentWidget() != parent) { - KMessageBox::sorry(m_active->widget()->tqtopLevelWidget(), i18n("<b>Cannot create the tqlayout.</b>\n" + KMessageBox::sorry(m_active->widget()->topLevelWidget(), i18n("<b>Cannot create the tqlayout.</b>\n" "All selected widgets must have the same parent.")); kdDebug() << "FormManager::createLayout() widgets don't have the same parent widget" << endl; return; @@ -1188,7 +1188,7 @@ FormManager::editTabOrder() { if(!activeForm() || !activeForm()->objectTree()) return; - TQWidget *topLevel = m_active->widget()->tqtopLevelWidget(); + TQWidget *topLevel = m_active->widget()->topLevelWidget(); TabStopDialog dlg(topLevel); //const bool oldAutoTabStops = m_active->autoTabStops(); if (dlg.exec(m_active) == TQDialog::Accepted) { @@ -1222,7 +1222,7 @@ FormManager::editFormPixmapCollection() if(!activeForm() || !activeForm()->objectTree()) return; - PixmapCollectionEditor dialog(activeForm()->pixmapCollection(), activeForm()->widget()->tqtopLevelWidget()); + PixmapCollectionEditor dialog(activeForm()->pixmapCollection(), activeForm()->widget()->topLevelWidget()); dialog.exec(); } @@ -1234,7 +1234,7 @@ FormManager::editConnections() if(!activeForm() || !activeForm()->objectTree()) return; - ConnectionDialog dialog(activeForm()->widget()->tqtopLevelWidget()); + ConnectionDialog dialog(activeForm()->widget()->topLevelWidget()); dialog.exec(activeForm()); } @@ -1493,7 +1493,7 @@ FormManager::emitWidgetSelected( KFormDesigner::Form* form, bool multiple ) WidgetList *wlist = form->selectedWidgets(); bool fontEnabled = false; for (WidgetListIterator it(*wlist); it.current(); ++it) { - if (-1 != it.current()->tqmetaObject()->findProperty("font", true)) { + if (-1 != it.current()->metaObject()->findProperty("font", true)) { fontEnabled = true; break; } diff --git a/kexi/formeditor/kfdpixmapedit.cpp b/kexi/formeditor/kfdpixmapedit.cpp index db9a726e..64e65f1e 100644 --- a/kexi/formeditor/kfdpixmapedit.cpp +++ b/kexi/formeditor/kfdpixmapedit.cpp @@ -48,7 +48,7 @@ KFDPixmapEdit::selectPixmap() ObjectTreeItem *item = m_manager->activeForm()->objectTree()->lookup(m_manager->activeForm()->selectedWidget()->name()); TQString name = item ? item->pixmapName(property()->name()) : ""; - PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, tqtopLevelWidget() ); + PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, topLevelWidget() ); if(dialog.exec() == TQDialog::Accepted) { setValue(dialog.pixmap(), true); item->setPixmapName(property()->name(), dialog.pixmapName()); diff --git a/kexi/formeditor/objecttreeview.cpp b/kexi/formeditor/objecttreeview.cpp index 049df3a5..ba48214b 100644 --- a/kexi/formeditor/objecttreeview.cpp +++ b/kexi/formeditor/objecttreeview.cpp @@ -191,10 +191,10 @@ ObjectTreeView::~ObjectTreeView() } TQSize -ObjectTreeView::tqsizeHint() const +ObjectTreeView::sizeHint() const { return TQSize( TQFontMetrics(font()).width(columnText(0)+columnText(1)+" "), - KListView::tqsizeHint().height()); + KListView::sizeHint().height()); } TQString diff --git a/kexi/formeditor/objecttreeview.h b/kexi/formeditor/objecttreeview.h index b625c0ad..2ddf867c 100644 --- a/kexi/formeditor/objecttreeview.h +++ b/kexi/formeditor/objecttreeview.h @@ -73,7 +73,7 @@ class KFORMEDITOR_EXPORT ObjectTreeView : public KListView ObjectTreeView(TQWidget *parent=0, const char *name=0, bool tabStop = false); virtual ~ObjectTreeView(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; /*! Sets \a form as the current Form in the list. The list will automatically be filled with an item for each widget in the Form, and selection will be synced. diff --git a/kexi/formeditor/richtextdialog.cpp b/kexi/formeditor/richtextdialog.cpp index 168102b0..e3b73975 100644 --- a/kexi/formeditor/richtextdialog.cpp +++ b/kexi/formeditor/richtextdialog.cpp @@ -146,10 +146,10 @@ RichTextDialog::buttonToggled(int id) if(!isOn) break; switch(id) { - case TBLeft: m_edit->tqsetAlignment(TQt::AlignLeft); break; - case TBCenter: m_edit->tqsetAlignment(TQt::AlignCenter); break; - case TBRight: m_edit->tqsetAlignment(TQt::AlignRight); break; - case TBJustify: m_edit->tqsetAlignment(TQt::AlignJustify); break; + case TBLeft: m_edit->setAlignment(TQt::AlignLeft); break; + case TBCenter: m_edit->setAlignment(TQt::AlignCenter); break; + case TBRight: m_edit->setAlignment(TQt::AlignRight); break; + case TBJustify: m_edit->setAlignment(TQt::AlignJustify); break; default: break; } } diff --git a/kexi/formeditor/spring.cpp b/kexi/formeditor/spring.cpp index 1ec9a2b4..074b8810 100644 --- a/kexi/formeditor/spring.cpp +++ b/kexi/formeditor/spring.cpp @@ -54,18 +54,18 @@ Spring::SizeType Spring::sizeType() const { if(m_orient ==Qt::Vertical) - return (SizeType)tqsizePolicy().verData(); + return (SizeType)sizePolicy().verData(); else - return (SizeType)tqsizePolicy().horData(); + return (SizeType)sizePolicy().horData(); } void Spring::setSizeType(SizeType size) { if(m_orient ==Qt::Vertical) - tqsetSizePolicy(TQSizePolicy::Minimum, (TQSizePolicy::SizeType)size); + setSizePolicy(TQSizePolicy::Minimum, (TQSizePolicy::SizeType)size); else - tqsetSizePolicy( (TQSizePolicy::SizeType)size, TQSizePolicy::Minimum); + setSizePolicy( (TQSizePolicy::SizeType)size, TQSizePolicy::Minimum); } void @@ -144,10 +144,10 @@ Spring::saveSpring(KFormDesigner::ObjectTreeItem *item, TQDomElement &parentNode if(parentNode.tagName() == "widget") KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "geometry", item->widget()->property("geometry"), item->widget()); - if(!item->widget()->tqsizeHint().isValid()) - KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "tqsizeHint", item->widget()->property("size"), item->widget()); + if(!item->widget()->sizeHint().isValid()) + KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeHint", item->widget()->property("size"), item->widget()); else - KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "tqsizeHint", item->widget()->property("tqsizeHint"), item->widget()); + KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeHint", item->widget()->property("sizeHint"), item->widget()); KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "orientation", item->widget()->property("orientation"), item->widget()); KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeType", item->widget()->property("sizeType"), item->widget()); diff --git a/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp b/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp index 0cfe0483..09549ddc 100644 --- a/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp +++ b/kexi/formeditor/tdevelop_plugin/kfd_kdev_part.cpp @@ -276,7 +276,7 @@ void KFormDesignerKDevPart::open() { m_openingFile = true; - KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace->tqtopLevelWidget()); + KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace->topLevelWidget()); if(!url.isEmpty()) ReadWritePart::openURL(url); m_openingFile = false; @@ -321,7 +321,7 @@ KFormDesignerKDevPart::saveAs() bool KFormDesignerKDevPart::closeForm(Form *form) { - int res = KMessageBox::warningYesNoCancel( m_workspace->tqtopLevelWidget(), + int res = KMessageBox::warningYesNoCancel( m_workspace->topLevelWidget(), i18n( "The form \"%1\" has been modified.\n" "Do you want to save your changes or discard them?" ).tqarg( form->objectTree()->name() ), i18n( "Close Form" ), KStdGuiItem::save(), KStdGuiItem::discard() ); diff --git a/kexi/formeditor/test/kfd_part.cpp b/kexi/formeditor/test/kfd_part.cpp index cd51817a..386bdabf 100644 --- a/kexi/formeditor/test/kfd_part.cpp +++ b/kexi/formeditor/test/kfd_part.cpp @@ -296,7 +296,7 @@ void KFormDesignerPart::open() { m_openingFile = true; - KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace->tqtopLevelWidget()); + KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace->topLevelWidget()); if(!url.isEmpty()) ReadWritePart::openURL(url); m_openingFile = false; @@ -332,7 +332,7 @@ void KFormDesignerPart::saveAs() { KURL url = KFileDialog::getSaveURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), - m_workspace->tqtopLevelWidget()); + m_workspace->topLevelWidget()); if(url.isEmpty()) return; else @@ -342,7 +342,7 @@ KFormDesignerPart::saveAs() bool KFormDesignerPart::closeForm(Form *form) { - int res = KMessageBox::questionYesNoCancel( m_workspace->tqtopLevelWidget(), + int res = KMessageBox::questionYesNoCancel( m_workspace->topLevelWidget(), i18n( "The form \"%1\" has been modified.\n" "Do you want to save your changes or discard them?" ).tqarg( form->objectTree()->name() ), i18n( "Close Form" ), KStdGuiItem::save(), KStdGuiItem::discard() ); diff --git a/kexi/formeditor/utils.cpp b/kexi/formeditor/utils.cpp index 6ce4bcae..85e93204 100644 --- a/kexi/formeditor/utils.cpp +++ b/kexi/formeditor/utils.cpp @@ -119,9 +119,9 @@ KFormDesigner::getSizeFromChildren(TQWidget *w, const char *inheritClass) // ----------------- -HorWidgetList::HorWidgetList(TQWidget *tqtopLevelWidget) +HorWidgetList::HorWidgetList(TQWidget *topLevelWidget) : WidgetList() - , m_tqtopLevelWidget(tqtopLevelWidget) + , m_topLevelWidget(topLevelWidget) { } @@ -133,14 +133,14 @@ int HorWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::It { TQWidget *w1 = TQT_TQWIDGET(item1); TQWidget *w2 = TQT_TQWIDGET(item2); - return w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).x() - w2->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).x(); + return w1->mapTo(m_topLevelWidget, TQPoint(0,0)).x() - w2->mapTo(m_topLevelWidget, TQPoint(0,0)).x(); } // ----------------- -VerWidgetList::VerWidgetList(TQWidget *tqtopLevelWidget) +VerWidgetList::VerWidgetList(TQWidget *topLevelWidget) : WidgetList() - , m_tqtopLevelWidget(tqtopLevelWidget) + , m_topLevelWidget(topLevelWidget) { } @@ -157,9 +157,9 @@ int VerWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::It TQObject *page1 = 0; TabWidget *tw1 = KFormDesigner::findParent<KFormDesigner::TabWidget>(w1, "KFormDesigner::TabWidget", page1); if (tw1) // special case - y1 = w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y() + tw1->tabBarHeight() -2 -2; + y1 = w1->mapTo(m_topLevelWidget, TQPoint(0,0)).y() + tw1->tabBarHeight() -2 -2; else - y1 = w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y(); + y1 = w1->mapTo(m_topLevelWidget, TQPoint(0,0)).y(); TQObject *page2 = 0; TabWidget *tw2 = KFormDesigner::findParent<KFormDesigner::TabWidget>(w2, "KFormDesigner::TabWidget", page2); @@ -169,16 +169,16 @@ int VerWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::It } if (tw2) // special case - y2 = w2->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y() + tw2->tabBarHeight() -2 -2; + y2 = w2->mapTo(m_topLevelWidget, TQPoint(0,0)).y() + tw2->tabBarHeight() -2 -2; else - y2 = w2->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y(); + y2 = w2->mapTo(m_topLevelWidget, TQPoint(0,0)).y(); kdDebug() << w1->name() << ": " << y1 << " " << " | " << w2->name() << ": " << y2 << endl; - //kdDebug() << w1->name() << ": " << w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)) << " " << w1->y() - //<< " | " << w2->name() << ":" /*<< w2->mapFrom(m_tqtopLevelWidget, TQPoint(0,w2->y()))*/ << " " << w2->y() << endl; + //kdDebug() << w1->name() << ": " << w1->mapTo(m_topLevelWidget, TQPoint(0,0)) << " " << w1->y() + //<< " | " << w2->name() << ":" /*<< w2->mapFrom(m_topLevelWidget, TQPoint(0,w2->y()))*/ << " " << w2->y() << endl; return y1 - y2; } diff --git a/kexi/formeditor/utils.h b/kexi/formeditor/utils.h index 3d078401..5107b45c 100644 --- a/kexi/formeditor/utils.h +++ b/kexi/formeditor/utils.h @@ -71,22 +71,22 @@ typedef TQPtrListIterator<TQWidget> WidgetListIterator; class HorWidgetList : public WidgetList { public: - HorWidgetList(TQWidget *tqtopLevelWidget); + HorWidgetList(TQWidget *topLevelWidget); virtual ~HorWidgetList(); protected: virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2); - TQWidget *m_tqtopLevelWidget; + TQWidget *m_topLevelWidget; }; //! @short A helper for sorting widgets vertically class VerWidgetList : public WidgetList { public: - VerWidgetList(TQWidget *tqtopLevelWidget); + VerWidgetList(TQWidget *topLevelWidget); virtual ~VerWidgetList(); protected: virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2); - TQWidget *m_tqtopLevelWidget; + TQWidget *m_topLevelWidget; }; /*! This function is used to remove all the child widgets from a list, and @@ -105,7 +105,7 @@ KFORMEDITOR_EXPORT void removeRecursiveEventFilter(TQObject *object, TQObject *c KFORMEDITOR_EXPORT void setRecursiveCursor(TQWidget *w, Form *form); -/*! \return the size of \a w tqchildren. This can be used eg to get widget's tqsizeHint. */ +/*! \return the size of \a w tqchildren. This can be used eg to get widget's sizeHint. */ KFORMEDITOR_EXPORT TQSize getSizeFromChildren(TQWidget *widget, const char *inheritClass=TQWIDGET_OBJECT_NAME_STRING); } diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp index 178e2b74..61688ac6 100644 --- a/kexi/formeditor/widgetfactory.cpp +++ b/kexi/formeditor/widgetfactory.cpp @@ -190,7 +190,7 @@ WidgetFactory::createEditor(const TQCString &classname, const TQString &text, if (multiLine) { KTextEdit *textedit = new KTextEdit(text, TQString(), w->parentWidget()); textedit->setTextFormat(TQt::PlainText); - textedit->tqsetAlignment(align); + textedit->setAlignment(align); if (dynamic_cast<TQTextEdit*>(w)) { textedit->setWordWrap(dynamic_cast<TQTextEdit*>(w)->wordWrap()); textedit->setWrapPolicy(dynamic_cast<TQTextEdit*>(w)->wrapPolicy()); @@ -203,7 +203,7 @@ WidgetFactory::createEditor(const TQCString &classname, const TQString &text, textedit->setBackgroundMode(w->backgroundMode()); else textedit->setBackgroundMode(background); -// textedit->setPaletteBackgroundColor(textedit->tqcolorGroup().color( TQColorGroup::Base )); +// textedit->setPaletteBackgroundColor(textedit->colorGroup().color( TQColorGroup::Base )); textedit->setPaletteBackgroundColor(w->paletteBackgroundColor()); for(int i =0; i <= textedit->paragraphs(); i++) textedit->setParagraphBackgroundColor(i, w->paletteBackgroundColor()); @@ -229,7 +229,7 @@ WidgetFactory::createEditor(const TQCString &classname, const TQString &text, } else { KLineEdit *editor = new KLineEdit(text, w->parentWidget()); - editor->tqsetAlignment(align); + editor->setAlignment(align); editor->setPalette(w->palette()); editor->setFont(w->font()); editor->setGeometry(tqgeometry); @@ -253,7 +253,7 @@ WidgetFactory::createEditor(const TQCString &classname, const TQString &text, //copy properties if available WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w; - if (-1!=m_editor->tqmetaObject()->findProperty("margin", true) && -1!=subwidget->tqmetaObject()->findProperty("margin", true)) + if (-1!=m_editor->metaObject()->findProperty("margin", true) && -1!=subwidget->metaObject()->findProperty("margin", true)) m_editor->setProperty("margin", subwidget->property("margin")); //#endif //js m_handles = new ResizeHandleSet(w, container->form(), true); @@ -314,7 +314,7 @@ WidgetFactory::disableFilter(TQWidget *w, Container *container) bool WidgetFactory::editList(TQWidget *w, TQStringList &list) { - KDialogBase dialog(w->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), + KDialogBase dialog(w->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(w->name()), &dialog, "editlist"); @@ -345,7 +345,7 @@ WidgetFactory::editRichText(TQWidget *w, TQString &text) void WidgetFactory::editListView(TQListView *listview) { - EditListViewDialog dlg(((TQWidget*)listview)->tqtopLevelWidget()); + EditListViewDialog dlg(((TQWidget*)listview)->topLevelWidget()); //dlg.exec(listview); } @@ -376,7 +376,7 @@ WidgetFactory::eventFilter(TQObject *obj, TQEvent *ev) if(obj != (TQObject *)w) return false; - TQWidget *focus = w->tqtopLevelWidget()->tqfocusWidget(); + TQWidget *focus = w->topLevelWidget()->focusWidget(); if(focus && w != focus && !w->child(focus->name(), focus->className())) resetEditor(); } diff --git a/kexi/formeditor/widgetlibrary.cpp b/kexi/formeditor/widgetlibrary.cpp index c9f9bd9b..9a680db5 100644 --- a/kexi/formeditor/widgetlibrary.cpp +++ b/kexi/formeditor/widgetlibrary.cpp @@ -81,8 +81,8 @@ class WidgetLibraryPrivate advancedProperties.insert("backgroundMode", (char*)1);//this is rather useless advancedProperties.insert("tqlayout", (char*)1);// too large risk to break things // by providing this in propeditor - advancedProperties.insert("tqminimumSize", (char*)1); - advancedProperties.insert("tqmaximumSize", (char*)1); + advancedProperties.insert("minimumSize", (char*)1); + advancedProperties.insert("maximumSize", (char*)1); #ifdef KEXI_NO_UNFINISHED /*! @todo reenable */ advancedProperties.insert("paletteBackgroundPixmap", (char*)1); @@ -532,7 +532,7 @@ WidgetLibrary::iconName(const TQCString &classname) if(wi) return wi->pixmap(); - return TQString::tqfromLatin1("unknown_widget"); + return TQString::fromLatin1("unknown_widget"); } bool diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp index d06a5c2e..5ed8f96d 100644 --- a/kexi/formeditor/widgetpropertyset.cpp +++ b/kexi/formeditor/widgetpropertyset.cpp @@ -287,7 +287,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) return; } - TQStrList pList = w->tqmetaObject()->propertyNames(true); + TQStrList pList = w->metaObject()->propertyNames(true); TQStrListIterator it(pList); // add subproperties if available @@ -309,7 +309,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) const TQMetaProperty *subMeta = // special case - subproperty subpropIface ? subpropIface->findMetaSubproperty(it.current()) : 0; const TQMetaProperty *meta = subMeta ? subMeta - : w->tqmetaObject()->property( w->tqmetaObject()->findProperty(*it, true), true); + : w->metaObject()->property( w->metaObject()->findProperty(*it, true), true); if (!meta) continue; const char* propertyName = meta->name(); @@ -393,7 +393,7 @@ WidgetPropertySet::createPropertiesForWidget(TQWidget *w) /*! let's forget it for now, until we have new complete events editor if (m_manager->lib()->advancedPropertiesVisible()) { // add the signals property - TQStrList strlist = w->tqmetaObject()->signalNames(true); + TQStrList strlist = w->metaObject()->signalNames(true); TQStrListIterator strIt(strlist); TQStringList list; for(; strIt.current() != 0; ++strIt) @@ -621,7 +621,7 @@ WidgetPropertySet::createPropertyCommandsInDesignMode(TQWidget* widget, else { WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(widget); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widget; - if (-1 != subwidget->tqmetaObject()->findProperty(it.key(), true) && subwidget->property(it.key())!=it.data()) { + if (-1 != subwidget->metaObject()->findProperty(it.key(), true) && subwidget->property(it.key())!=it.data()) { ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(widget->name()); if (tree) tree->addModifiedProperty(it.key(), subwidget->property(it.key())); @@ -865,8 +865,8 @@ WidgetPropertySet::saveAlignProperty(const TQString &property) WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>( (TQWidget*)d->widgets.first() ); TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : (TQWidget*)d->widgets.first(); - int count = subwidget->tqmetaObject()->findProperty("tqalignment", true); - const TQMetaProperty *meta = subwidget->tqmetaObject()->property(count, true); + int count = subwidget->metaObject()->findProperty("tqalignment", true); + const TQMetaProperty *meta = subwidget->metaObject()->property(count, true); subwidget->setProperty("tqalignment", meta->keysToValue(list)); ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup( @@ -1000,8 +1000,8 @@ WidgetPropertySet::initPropertiesDescription() d->propCaption["enabled"] = i18n("Enabled"); d->propCaption["geometry"] = i18n("Geometry"); d->propCaption["sizePolicy"] = i18n("Size Policy"); - d->propCaption["tqminimumSize"] = i18n("Minimum Size"); - d->propCaption["tqmaximumSize"] = i18n("Maximum Size"); + d->propCaption["minimumSize"] = i18n("Minimum Size"); + d->propCaption["maximumSize"] = i18n("Maximum Size"); d->propCaption["font"] = i18n("Font"); d->propCaption["cursor"] = i18n("Cursor"); d->propCaption["paletteForegroundColor"] = i18n("Foreground Color"); diff --git a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp index aa84f831..362214a1 100644 --- a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp +++ b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp @@ -41,11 +41,11 @@ void WidgetWithSubpropertiesInterface::setSubwidget(TQWidget *widget) TQAsciiDict<char> addedSubproperies(1024); if (m_subwidget) { //remember properties in the subwidget that are not present in the parent - for( TQMetaObject *tqmetaObject = m_subwidget->tqmetaObject(); tqmetaObject; tqmetaObject = tqmetaObject->tqsuperClass()) { - const int numProperties = tqmetaObject->numProperties(); + for( TQMetaObject *metaObject = m_subwidget->metaObject(); metaObject; metaObject = metaObject->superClass()) { + const int numProperties = metaObject->numProperties(); for (int i = 0; i < numProperties; i++) { - const char *propertyName = tqmetaObject->property( i )->name(); - if (dynamic_cast<TQObject*>(this)->tqmetaObject()->findProperty( propertyName, true )==-1 + const char *propertyName = metaObject->property( i )->name(); + if (dynamic_cast<TQObject*>(this)->metaObject()->findProperty( propertyName, true )==-1 && !addedSubproperies.find( propertyName ) ) { m_subproperies.append( propertyName ); @@ -73,10 +73,10 @@ const TQMetaProperty *WidgetWithSubpropertiesInterface::findMetaSubproperty(cons if (!m_subwidget || m_subproperies.find(name) == m_subproperies.constEnd()) { return 0; } - const int index = m_subwidget->tqmetaObject()->findProperty( name, true ); + const int index = m_subwidget->metaObject()->findProperty( name, true ); if (index==-1) return 0; - return m_subwidget->tqmetaObject()->property( index, true ); + return m_subwidget->metaObject()->property( index, true ); } TQVariant WidgetWithSubpropertiesInterface::subproperty( const char * name, bool &ok ) const diff --git a/kexi/kexidb/connection.cpp b/kexi/kexidb/connection.cpp index 4af6cae6..34add49a 100644 --- a/kexi/kexidb/connection.cpp +++ b/kexi/kexidb/connection.cpp @@ -765,7 +765,7 @@ TQStringList Connection::objectNames(int objType, bool* ok) if (objType==KexiDB::AnyObjectType) sql = "SELECT o_name FROM kexi__objects"; else - sql = TQString::tqfromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType); + sql = TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType); Cursor *c = executeQuery(sql); if (!c) { @@ -852,7 +852,7 @@ TQValueList<int> Connection::objectIds(int objType) return list; Cursor *c = executeQuery( - TQString::tqfromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType)); + TQString::fromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType)); if (!c) return list; for (c->moveFirst(); !c->eof(); c->moveNext()) @@ -903,12 +903,12 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem if (field->isFPNumericType() && field->precision()>0) { if (field->scale()>0) - v += TQString::tqfromLatin1("(%1,%2)").tqarg(field->precision()).tqarg(field->scale()); + v += TQString::fromLatin1("(%1,%2)").tqarg(field->precision()).tqarg(field->scale()); else - v += TQString::tqfromLatin1("(%1)").tqarg(field->precision()); + v += TQString::fromLatin1("(%1)").tqarg(field->precision()); } else if (field->type()==Field::Text && field->length()>0) - v += TQString::tqfromLatin1("(%1)").tqarg(field->length()); + v += TQString::fromLatin1("(%1)").tqarg(field->length()); if (autoinc) v += (" " + @@ -925,7 +925,7 @@ TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchem if (field->defaultValue().isValid()) { TQString valToSQL( m_driver->valueToSQL( field, field->defaultValue() ) ); if (!valToSQL.isEmpty()) //for sanity - v += TQString::tqfromLatin1(" DEFAULT ") + valToSQL; + v += TQString::fromLatin1(" DEFAULT ") + valToSQL; } } sql += v; @@ -1106,14 +1106,14 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, for (Field::ListIterator it = querySchema.fieldsIterator(); (f = it.current()); ++it, number++) { if (querySchema.isColumnVisible(number)) { if (!sql.isEmpty()) - sql += TQString::tqfromLatin1(", "); + sql += TQString::fromLatin1(", "); if (f->isQueryAsterisk()) { if (!singleTable && static_cast<QueryAsterisk*>(f)->isSingleTableAsterisk()) //single-table * sql += escapeIdentifier(f->table()->name(), options.identifierEscaping) + - TQString::tqfromLatin1(".*"); + TQString::fromLatin1(".*"); else //all-tables * (or simplified table.* when there's only one table) - sql += TQString::tqfromLatin1("*"); + sql += TQString::fromLatin1("*"); } else { if (f->isExpression()) { @@ -1137,7 +1137,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, } TQString aliasString = TQString(querySchema.columnAlias(number)); if (!aliasString.isEmpty()) - sql += (TQString::tqfromLatin1(" AS ") + aliasString); + sql += (TQString::fromLatin1(" AS ") + aliasString); //! @todo add option that allows to omit "AS" keyword } LookupFieldSchema *lookupFieldSchema = (options.addVisibleLookupColumns && f->table()) @@ -1159,7 +1159,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, { //add LEFT OUTER JOIN if (!s_additional_joins.isEmpty()) - s_additional_joins += TQString::tqfromLatin1(" "); + s_additional_joins += TQString::fromLatin1(" "); TQString internalUniqueTableAlias( TQString("__kexidb_") + lookupTable->name() + "_" + TQString::number(internalUniqueTableAliasNumber++) ); s_additional_joins += TQString("LEFT OUTER JOIN %1 AS %2 ON %3.%4=%5.%6") @@ -1177,13 +1177,13 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, /* not true //table should be added after FROM if (!s_from_additional.isEmpty()) - s_from_additional += TQString::tqfromLatin1(", "); + s_from_additional += TQString::fromLatin1(", "); s_from_additional += escapeIdentifier(visibleField->table()->name(), options.identifierEscaping); */ } #endif if (!s_additional_fields.isEmpty()) - s_additional_fields += TQString::tqfromLatin1(", "); + s_additional_fields += TQString::fromLatin1(", "); // s_additional_fields += (internalUniqueTableAlias + "." //escapeIdentifier(visibleField->table()->name(), options.identifierEscaping) + "." // escapeIdentifier(visibleField->name(), options.identifierEscaping)); //! @todo Add lookup schema option for separator other than ' ' or even option for placeholders like "Name ? ?" @@ -1216,7 +1216,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, } //add LEFT OUTER JOIN if (!s_additional_joins.isEmpty()) - s_additional_joins += TQString::tqfromLatin1(" "); + s_additional_joins += TQString::fromLatin1(" "); TQString internalUniqueQueryAlias( kexidb_subquery_prefix + lookupQuery->name() + "_" + TQString::number(internalUniqueQueryAliasNumber++) ); @@ -1229,7 +1229,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, .tqarg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping)); if (!s_additional_fields.isEmpty()) - s_additional_fields += TQString::tqfromLatin1(", "); + s_additional_fields += TQString::fromLatin1(", "); const TQValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() ); TQString expression; foreach (TQValueList<uint>::ConstIterator, visibleColumnsIt, visibleColumns) { @@ -1260,12 +1260,12 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, //add lookup fields if (!s_additional_fields.isEmpty()) - sql += (TQString::tqfromLatin1(", ") + s_additional_fields); + sql += (TQString::fromLatin1(", ") + s_additional_fields); if (options.alsoRetrieveROWID) { //append rowid column TQString s; if (!sql.isEmpty()) - s = TQString::tqfromLatin1(", "); + s = TQString::fromLatin1(", "); if (querySchema.masterTable()) s += (escapeIdentifier(querySchema.masterTable()->name())+"."); s += m_driver->beh->ROW_ID_FIELD_NAME; @@ -1275,7 +1275,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, sql.prepend("SELECT "); TableSchema::List* tables = querySchema.tables(); if ((tables && !tables->isEmpty()) || !subqueries_for_lookup_data.isEmpty()) { - sql += TQString::tqfromLatin1(" FROM "); + sql += TQString::fromLatin1(" FROM "); TQString s_from; if (tables) { TableSchema *table; @@ -1284,15 +1284,15 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, ++it, number++) { if (!s_from.isEmpty()) - s_from += TQString::tqfromLatin1(", "); + s_from += TQString::fromLatin1(", "); s_from += escapeIdentifier(table->name(), options.identifierEscaping); TQString aliasString = TQString(querySchema.tableAlias(number)); if (!aliasString.isEmpty()) - s_from += (TQString::tqfromLatin1(" AS ") + aliasString); + s_from += (TQString::fromLatin1(" AS ") + aliasString); } /*unused if (!s_from_additional.isEmpty()) {//additional tables list needed for lookup fields if (!s_from.isEmpty()) - s_from += TQString::tqfromLatin1(", "); + s_from += TQString::fromLatin1(", "); s_from += s_from_additional; }*/ } @@ -1302,10 +1302,10 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, subqueries_for_lookup_data.current(); ++it, subqueries_for_lookup_data_counter++) { if (!s_from.isEmpty()) - s_from += TQString::tqfromLatin1(", "); - s_from += TQString::tqfromLatin1("("); + s_from += TQString::fromLatin1(", "); + s_from += TQString::fromLatin1("("); s_from += selectStatement( *it.current(), params, options ); - s_from += TQString::tqfromLatin1(") AS %1%2") + s_from += TQString::fromLatin1(") AS %1%2") .tqarg(kexidb_subquery_prefix).tqarg(subqueries_for_lookup_data_counter); } sql += s_from; @@ -1315,7 +1315,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, //JOINS if (!s_additional_joins.isEmpty()) { - sql += TQString::tqfromLatin1(" ") + s_additional_joins + TQString::tqfromLatin1(" "); + sql += TQString::fromLatin1(" ") + s_additional_joins + TQString::fromLatin1(" "); } //@todo: we're using WHERE for joins now; use INNER/LEFT/RIGHT JOIN later @@ -1328,24 +1328,24 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, wasWhere = true; } else - s_where += TQString::tqfromLatin1(" AND "); + s_where += TQString::fromLatin1(" AND "); Field::Pair *pair; TQString s_where_sub; for (TQPtrListIterator<Field::Pair> p_it(*rel->fieldPairs()); (pair = p_it.current()); ++p_it) { if (!s_where_sub.isEmpty()) - s_where_sub += TQString::tqfromLatin1(" AND "); + s_where_sub += TQString::fromLatin1(" AND "); s_where_sub += ( escapeIdentifier(pair->first->table()->name(), options.identifierEscaping) + - TQString::tqfromLatin1(".") + + TQString::fromLatin1(".") + escapeIdentifier(pair->first->name(), options.identifierEscaping) + - TQString::tqfromLatin1(" = ") + + TQString::fromLatin1(" = ") + escapeIdentifier(pair->second->table()->name(), options.identifierEscaping) + - TQString::tqfromLatin1(".") + + TQString::fromLatin1(".") + escapeIdentifier(pair->second->name(), options.identifierEscaping)); } if (rel->fieldPairs()->count()>1) { s_where_sub.prepend("("); - s_where_sub += TQString::tqfromLatin1(")"); + s_where_sub += TQString::fromLatin1(")"); } s_where += s_where_sub; } @@ -1362,7 +1362,7 @@ TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema, } } if (!s_where.isEmpty()) - sql += TQString::tqfromLatin1(" WHERE ") + s_where; + sql += TQString::fromLatin1(" WHERE ") + s_where; //! \todo (js) add other sql parts //(use wasWhere here) @@ -1424,8 +1424,8 @@ TQ_ULLONG Connection::lastInsertedAutoIncValue(const TQString& aiFieldName, cons } RowData rdata; if (row_id<=0 || true!=querySingleRecord( - TQString::tqfromLatin1("SELECT ") + tableName + TQString::tqfromLatin1(".") + aiFieldName + TQString::tqfromLatin1(" FROM ") + tableName - + TQString::tqfromLatin1(" WHERE ") + m_driver->beh->ROW_ID_FIELD_NAME + TQString::tqfromLatin1("=") + TQString::number(row_id), rdata)) + TQString::fromLatin1("SELECT ") + tableName + TQString::fromLatin1(".") + aiFieldName + TQString::fromLatin1(" FROM ") + tableName + + TQString::fromLatin1(" WHERE ") + m_driver->beh->ROW_ID_FIELD_NAME + TQString::fromLatin1("=") + TQString::number(row_id), rdata)) { // KexiDBDbg << "Connection::lastInsertedAutoIncValue(): row_id<=0 || true!=querySingleRecord()" << endl; return (TQ_ULLONG)-1; //ULL; @@ -1838,12 +1838,12 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam } // the new table owns the previous table's id: - if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__objects SET o_id=%1 WHERE o_id=%2 AND o_type=%3") + if (!executeSQL(TQString::fromLatin1("UPDATE kexi__objects SET o_id=%1 WHERE o_id=%2 AND o_type=%3") .tqarg(origID).tqarg(tableSchema.id()).tqarg((int)TableObjectType))) { return false; } - if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2") + if (!executeSQL(TQString::fromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2") .tqarg(origID).tqarg(tableSchema.id()))) { return false; @@ -1861,7 +1861,7 @@ bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newNam // Update kexi__objects //TODO - if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2") + if (!executeSQL(TQString::fromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2") .tqarg(m_driver->escapeString(tableSchema.name())).tqarg(tableSchema.id()))) { alterTableName_ERR; @@ -1889,7 +1889,7 @@ bool Connection::drv_alterTableName(TableSchema& tableSchema, const TQString& ne const TQString oldTableName = tableSchema.name(); tableSchema.setName(newName); - if (!executeSQL(TQString::tqfromLatin1("ALTER TABLE %1 RENAME TO %2") + if (!executeSQL(TQString::fromLatin1("ALTER TABLE %1 RENAME TO %2") .tqarg(escapeIdentifier(oldTableName)).tqarg(escapeIdentifier(newName)))) { tableSchema.setName(oldTableName); //restore old name @@ -2300,7 +2300,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata ) tristate Connection::loadObjectSchemaData( int objectID, SchemaData &sdata ) { RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1") .tqarg(objectID), data)) return cancelled; @@ -2310,7 +2310,7 @@ tristate Connection::loadObjectSchemaData( int objectID, SchemaData &sdata ) tristate Connection::loadObjectSchemaData( int objectType, const TQString& objectName, SchemaData &sdata ) { RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1("SELECT o_id, o_type, o_name, o_caption, o_desc " + if (true!=querySingleRecord(TQString::fromLatin1("SELECT o_id, o_type, o_name, o_caption, o_desc " "FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2") .tqarg(objectType).tqarg(m_driver->valueToSQL(Field::Text, objectName.lower())), data)) return cancelled; @@ -2324,7 +2324,7 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject ) return false; if (newObject) { int existingID; - if (true == querySingleNumber(TQString::tqfromLatin1( + if (true == querySingleNumber(TQString::fromLatin1( "SELECT o_id FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2") .tqarg(sdata.type()).tqarg(m_driver->valueToSQL(Field::Text, sdata.name().lower())), existingID)) { @@ -2807,7 +2807,7 @@ KexiDB::TableSchema* Connection::setupTableSchema( const RowData &data ) KexiDB::Cursor *cursor; if (!(cursor = executeQuery( - TQString::tqfromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, " + TQString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, " "f_options, f_default, f_order, f_caption, f_help" " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->m_id) ))) { @@ -2867,7 +2867,7 @@ TableSchema* Connection::tableSchema( const TQString& tableName ) return t; //not found: retrieve schema RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2") .tqarg(m_tableName).tqarg(KexiDB::TableObjectType), data)) return 0; @@ -2882,7 +2882,7 @@ TableSchema* Connection::tableSchema( int tableId ) return t; //not found: retrieve schema RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1") .tqarg(tableId), data)) return 0; @@ -2904,7 +2904,7 @@ bool Connection::storeDataBlock( int objectID, const TQString &dataString, const { if (objectID<=0) return false; - TQString sql(TQString::tqfromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").tqarg(objectID)); + TQString sql(TQString::fromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").tqarg(objectID)); TQString sql_sub( KexiDB::sqlWhere(m_driver, KexiDB::Field::Text, "o_sub_id", dataID) ); bool ok, exists; @@ -2917,7 +2917,7 @@ bool Connection::storeDataBlock( int objectID, const TQString &dataString, const + " WHERE o_id=" + TQString::number(objectID) + " AND " + sql_sub ); } return executeSQL( - TQString::tqfromLatin1("INSERT INTO kexi__objectdata (o_id, o_data, o_sub_id) VALUES (") + TQString::fromLatin1("INSERT INTO kexi__objectdata (o_id, o_data, o_sub_id) VALUES (") + TQString::number(objectID) +"," + m_driver->valueToSQL( KexiDB::Field::LongText, dataString ) + "," + m_driver->valueToSQL( KexiDB::Field::Text, dataID ) + ")" ); } @@ -2974,7 +2974,7 @@ QuerySchema* Connection::querySchema( const TQString& queryName ) return q; //not found: retrieve schema RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2") .tqarg(m_queryName).tqarg(KexiDB::QueryObjectType), data)) return 0; @@ -2990,7 +2990,7 @@ QuerySchema* Connection::querySchema( int queryId ) //not found: retrieve schema clearError(); RowData data; - if (true!=querySingleRecord(TQString::tqfromLatin1( + if (true!=querySingleRecord(TQString::fromLatin1( "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1").tqarg(queryId), data)) return 0; @@ -3351,11 +3351,11 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf return false; } RowData aif_data; - TQString getAutoIncForInsertedValue = TQString::tqfromLatin1("SELECT ") + TQString getAutoIncForInsertedValue = TQString::fromLatin1("SELECT ") + query.autoIncrementSQLFieldsList(m_driver) - + TQString::tqfromLatin1(" FROM ") + + TQString::fromLatin1(" FROM ") + escapeIdentifier(id_columnInfo->field->table()->name()) - + TQString::tqfromLatin1(" WHERE ") + + TQString::fromLatin1(" WHERE ") + escapeIdentifier(id_columnInfo->field->name()) + "=" + TQString::number(last_id); if (true!=querySingleRecord(getAutoIncForInsertedValue, aif_data)) { diff --git a/kexi/kexidb/dbproperties.cpp b/kexi/kexidb/dbproperties.cpp index 44b69192..27b6a5b2 100644 --- a/kexi/kexidb/dbproperties.cpp +++ b/kexi/kexidb/dbproperties.cpp @@ -38,7 +38,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value bool ok; //we need to know whether update or insert bool exists = m_conn->resultExists( - TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") + TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") .tqarg(m_conn->driver()->escapeString(name)), ok); if (!ok) { setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name)); @@ -47,7 +47,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value if (exists) { if (!m_conn->executeSQL( - TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") + TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") .tqarg(m_conn->driver()->escapeString(value.toString())) .tqarg(m_conn->driver()->escapeString(name)))) { @@ -58,7 +58,7 @@ bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value } if (!m_conn->executeSQL( - TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") + TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") .tqarg(m_conn->driver()->escapeString(name)) .tqarg(m_conn->driver()->escapeString(value.toString())))) { @@ -76,7 +76,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt bool ok; //we need to know whether update or insert bool exists = m_conn->resultExists( - TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") + TQString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1") .tqarg(m_conn->driver()->escapeString(name)), ok); if (!ok) { setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name)); @@ -85,7 +85,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt if (exists) { if (!m_conn->executeSQL( - TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") + TQString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2") .tqarg(m_conn->driver()->escapeString(caption)) .tqarg(m_conn->driver()->escapeString(name)))) { @@ -96,7 +96,7 @@ bool DatabaseProperties::setCaption( const TQString& _name, const TQString& capt } if (!m_conn->executeSQL( - TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") + TQString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)") .tqarg(m_conn->driver()->escapeString(name)) .tqarg(m_conn->driver()->escapeString(caption)))) { @@ -111,7 +111,7 @@ TQVariant DatabaseProperties::value( const TQString& _name ) TQString result; TQString name(_name.stripWhiteSpace()); if (true!=m_conn->querySingleString( - TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + m_conn->driver()->escapeString(name), result)) { m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").tqarg(name)); return TQVariant(); @@ -126,7 +126,7 @@ TQString DatabaseProperties::caption( const TQString& _name ) //captions have ' ' prefix name.prepend(" "); if (true!=m_conn->querySingleString( - TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=") + m_conn->driver()->escapeString(name), result)) { setError(m_conn, i18n("Could not read database property \"%1\".").tqarg(name)); return TQString(); @@ -138,8 +138,8 @@ TQStringList DatabaseProperties::names() { TQStringList result; if (true!=m_conn->queryStringList( - TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ") - + m_conn->driver()->escapeString(TQString::tqfromLatin1(" %%")), result, 0 /*0-th*/)) { + TQString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ") + + m_conn->driver()->escapeString(TQString::fromLatin1(" %%")), result, 0 /*0-th*/)) { // ^^ exclude captions setError(m_conn, i18n("Could not read database properties.")); return TQStringList(); diff --git a/kexi/kexidb/driver.cpp b/kexi/kexidb/driver.cpp index 4db1b400..5d8f8d48 100644 --- a/kexi/kexidb/driver.cpp +++ b/kexi/kexidb/driver.cpp @@ -135,7 +135,7 @@ TQString Driver::fileDBDriverMimeType() const { return d->fileDBDriverMimeType; } TQString Driver::defaultFileBasedDriverMimeType() -{ return TQString::tqfromLatin1("application/x-kexiproject-sqlite3"); } +{ return TQString::fromLatin1("application/x-kexiproject-sqlite3"); } TQString Driver::defaultFileBasedDriverName() { @@ -282,7 +282,7 @@ TQString Driver::valueToSQL( uint ftype, const TQVariant& v ) const return dateTimeToSQL( v.toDateTime() ); case Field::BLOB: { if (v.toByteArray().isEmpty()) - return TQString::tqfromLatin1("NULL"); + return TQString::fromLatin1("NULL"); if (v.type()==TQVariant::String) return escapeBLOB(v.toString().utf8()); return escapeBLOB(v.toByteArray()); diff --git a/kexi/kexidb/drivermanager.cpp b/kexi/kexidb/drivermanager.cpp index 0a7ff574..5abacc94 100644 --- a/kexi/kexidb/drivermanager.cpp +++ b/kexi/kexidb/drivermanager.cpp @@ -425,7 +425,7 @@ TQString DriverManager::possibleProblemsInfoMsg() const for (TQStringList::ConstIterator it = d_int->possibleProblems.constBegin(); it!=d_int->possibleProblems.constEnd(); ++it) { - str += (TQString::tqfromLatin1("<li>") + *it + TQString::tqfromLatin1("</li>")); + str += (TQString::fromLatin1("<li>") + *it + TQString::fromLatin1("</li>")); } str += "</ul>"; return str; diff --git a/kexi/kexidb/drivers/mySQL/mysqldriver.cpp b/kexi/kexidb/drivers/mySQL/mysqldriver.cpp index 01d326af..10654e7e 100644 --- a/kexi/kexidb/drivers/mySQL/mysqldriver.cpp +++ b/kexi/kexidb/drivers/mySQL/mysqldriver.cpp @@ -125,7 +125,7 @@ TQString MySqlDriver::escapeString(const TQString& str) const break; } if (i >= old_length) { //no characters to escape - return TQString::tqfromLatin1("'") + str + TQString::tqfromLatin1("'"); + return TQString::fromLatin1("'") + str + TQString::fromLatin1("'"); } TQChar *new_string = new TQChar[ old_length * 3 + 1 ]; // a worst case approximation diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp index c81f04ad..faa7b582 100644 --- a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp +++ b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp @@ -128,7 +128,7 @@ bool pqxxSqlConnection::drv_getDatabasesList( TQStringList &list ) // Read value of column 0 into a string N c[0].to(N); // Copy the result into the return list - list << TQString::tqfromLatin1 (N.c_str()); + list << TQString::fromLatin1 (N.c_str()); } return true; } @@ -190,15 +190,15 @@ bool pqxxSqlConnection::drv_useDatabase( const TQString &dbName, bool *cancelled if (data()->port == 0) data()->port = 5432; - conninfo += TQString::tqfromLatin1(" port='%1'").tqarg(data()->port); + conninfo += TQString::fromLatin1(" port='%1'").tqarg(data()->port); - conninfo += TQString::tqfromLatin1(" dbname='%1'").tqarg(dbName); + conninfo += TQString::fromLatin1(" dbname='%1'").tqarg(dbName); if (!data()->userName.isNull()) - conninfo += TQString::tqfromLatin1(" user='%1'").tqarg(data()->userName); + conninfo += TQString::fromLatin1(" user='%1'").tqarg(data()->userName); if (!data()->password.isNull()) - conninfo += TQString::tqfromLatin1(" password='%1'").tqarg(data()->password); + conninfo += TQString::fromLatin1(" password='%1'").tqarg(data()->password); try { diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.h b/kexi/kexidb/drivers/pqxx/pqxxcursor.h index 637a33f3..8a61978d 100644 --- a/kexi/kexidb/drivers/pqxx/pqxxcursor.h +++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.h @@ -79,7 +79,7 @@ inline TQVariant pgsqlCStrToVariant(const pqxx::result::field& r) switch(r.type()) { case BOOLOID: - return TQString::tqfromLatin1(r.c_str(), r.size())=="true"; //TODO check formatting + return TQString::fromLatin1(r.c_str(), r.size())=="true"; //TODO check formatting case INT2OID: case INT4OID: case INT8OID: diff --git a/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp b/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp index 333df590..8967bc5e 100644 --- a/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp +++ b/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp @@ -133,9 +133,9 @@ bool pqxxSqlDriver::isSystemDatabaseName( const TQString& n ) const // TQString pqxxSqlDriver::escapeString( const TQString& str) const { - return TQString::tqfromLatin1("'") + return TQString::fromLatin1("'") + TQString::fromAscii( pqxx::sqlesc(std::string(str.utf8())).c_str() ) - + TQString::tqfromLatin1("'"); + + TQString::fromLatin1("'"); } //================================================================================== @@ -172,7 +172,7 @@ TQString pqxxSqlDriver::valueToSQL( uint ftype, const TQVariant& v ) const // use SQL compliant TRUE or FALSE as described here // http://www.postgresql.org/docs/8.0/interactive/datatype-boolean.html // 1 or 0 does not work - return v.toInt()==0 ? TQString::tqfromLatin1("FALSE") : TQString::tqfromLatin1("TRUE"); + return v.toInt()==0 ? TQString::fromLatin1("FALSE") : TQString::fromLatin1("TRUE"); } return Driver::valueToSQL(ftype, v); } diff --git a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp index 631f3bc6..b10d5383 100644 --- a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp +++ b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp @@ -324,9 +324,9 @@ TQString SQLiteConnection::serverResultName() { TQString r = #ifdef SQLITE2 - TQString::tqfromLatin1( sqlite_error_string(d->res) ); + TQString::fromLatin1( sqlite_error_string(d->res) ); #else //SQLITE3 - TQString(); //tqfromLatin1( d->result_name ); + TQString(); //fromLatin1( d->result_name ); #endif return r.isEmpty() ? Connection::serverResultName() : r; } @@ -395,7 +395,7 @@ bool SQLiteConnection::drv_alterTableName(TableSchema& tableSchema, const TQStri //TODO indices, etc.??? // 3. copy all rows to the new table - if (!executeSQL(TQString::tqfromLatin1("INSERT INTO %1 SELECT * FROM %2") + if (!executeSQL(TQString::fromLatin1("INSERT INTO %1 SELECT * FROM %2") .tqarg(escapeIdentifier(tableSchema.name())).tqarg(escapeIdentifier(oldTableName)))) { drv_alterTableName_ERR; diff --git a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp index 5239127c..20d80f9c 100644 --- a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp +++ b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp @@ -476,19 +476,19 @@ void SQLiteCursor::storeCurrentRow(RowData &data) const case Field::Integer: data[i] = TQVariant( TQCString(*col).toInt() ); case Field::BigInteger: - data[i] = TQVariant( TQString::tqfromLatin1(*col).toLongLong() ); + data[i] = TQVariant( TQString::fromLatin1(*col).toLongLong() ); case Field::Boolean: - data[i] = TQVariant( sqliteStringToBool(TQString::tqfromLatin1(*col)), 1 ); + data[i] = TQVariant( sqliteStringToBool(TQString::fromLatin1(*col)), 1 ); break; case Field::Date: - data[i] = TQDate::fromString( TQString::tqfromLatin1(*col), Qt::ISODate ); + data[i] = TQDate::fromString( TQString::fromLatin1(*col), Qt::ISODate ); break; case Field::Time: //TQDateTime - a hack needed because TQVariant(TQTime) has broken isNull() - data[i] = KexiUtils::stringToHackedTQTime(TQString::tqfromLatin1(*col)); + data[i] = KexiUtils::stringToHackedTQTime(TQString::fromLatin1(*col)); break; case Field::DateTime: { - TQString tmp( TQString::tqfromLatin1(*col) ); + TQString tmp( TQString::fromLatin1(*col) ); tmp[10] = 'T'; data[i] = TQDateTime::fromString( tmp, Qt::ISODate ); break; @@ -548,9 +548,9 @@ int SQLiteCursor::serverResult() TQString SQLiteCursor::serverResultName() { #ifdef SQLITE2 - return TQString::tqfromLatin1( sqlite_error_string(d->res) ); + return TQString::fromLatin1( sqlite_error_string(d->res) ); #else //SQLITE3 - return TQString::tqfromLatin1( d->result_name ); + return TQString::fromLatin1( d->result_name ); #endif } diff --git a/kexi/kexidb/expression.cpp b/kexi/kexidb/expression.cpp index 35ab8d70..034154bf 100644 --- a/kexi/kexidb/expression.cpp +++ b/kexi/kexidb/expression.cpp @@ -601,13 +601,13 @@ void QueryParameterExpr::setType(Field::Type type) TQString QueryParameterExpr::debugString() { - return TQString("QueryParameterExpr('") + TQString::tqfromLatin1("[%2]").tqarg(value.toString()) + return TQString("QueryParameterExpr('") + TQString::fromLatin1("[%2]").tqarg(value.toString()) + TQString("',type=%1)").tqarg(Driver::defaultSQLTypeName(type())); } TQString QueryParameterExpr::toString(QuerySchemaParameterValueListIterator* params) { - return params ? params->getPreviousValueAsString(type()) : TQString::tqfromLatin1("[%2]").tqarg(value.toString()); + return params ? params->getPreviousValueAsString(type()) : TQString::fromLatin1("[%2]").tqarg(value.toString()); } void QueryParameterExpr::getQueryParameters(QuerySchemaParameterList& params) diff --git a/kexi/kexidb/field.cpp b/kexi/kexidb/field.cpp index 33e9e929..6666fcfd 100644 --- a/kexi/kexidb/field.cpp +++ b/kexi/kexidb/field.cpp @@ -589,12 +589,12 @@ TQString Field::debugString() const dbg += (conn && conn->driver()) ? conn->driver()->sqlTypeName(type()) : Driver::defaultSQLTypeName(type()); if (isFPNumericType() && m_precision>0) { if (scale()>0) - dbg += TQString::tqfromLatin1("(%1,%2)").tqarg(m_precision).tqarg(scale()); + dbg += TQString::fromLatin1("(%1,%2)").tqarg(m_precision).tqarg(scale()); else - dbg += TQString::tqfromLatin1("(%1)").tqarg(m_precision); + dbg += TQString::fromLatin1("(%1)").tqarg(m_precision); } else if (m_type==Field::Text && m_length>0) - dbg += TQString::tqfromLatin1("(%1)").tqarg(m_length); + dbg += TQString::fromLatin1("(%1)").tqarg(m_length); if (m_constraints & Field::AutoInc) dbg += " AUTOINC"; if (m_constraints & Field::Unique) @@ -664,10 +664,10 @@ void Field::setCustomProperty(const TQCString& propertyName, const TQVariant& va //------------------------------------------------------- #define ADDTYPE(type, i18, str) this->at(Field::type) = i18; \ this->at(Field::type+Field::LastType+1) = str; \ - str2num.insert(TQString::tqfromLatin1(str).lower(), type) + str2num.insert(TQString::fromLatin1(str).lower(), type) #define ADDGROUP(type, i18, str) this->at(Field::type) = i18; \ this->at(Field::type+Field::LastTypeGroup+1) = str; \ - str2num.insert(TQString::tqfromLatin1(str).lower(), type) + str2num.insert(TQString::fromLatin1(str).lower(), type) Field::FieldTypeNames::FieldTypeNames() : TQValueVector<TQString>() diff --git a/kexi/kexidb/fieldlist.h b/kexi/kexidb/fieldlist.h index fbf303a9..9db4f5a6 100644 --- a/kexi/kexidb/fieldlist.h +++ b/kexi/kexidb/fieldlist.h @@ -143,13 +143,13 @@ class KEXI_DB_EXPORT FieldList See @ref Connection::selectStatement() for example use. \a drvEscaping can be used to alter default escaping type. */ - TQString sqlFieldsList(Driver *driver, const TQString& separator = TQString::tqfromLatin1(","), + TQString sqlFieldsList(Driver *driver, const TQString& separator = TQString::fromLatin1(","), const TQString& tableAlias = TQString(), int drvEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary); /*! Like above, but this is convenient static function, so you can pass any \a list here. */ static TQString sqlFieldsList(Field::List* list, Driver *driver, - const TQString& separator = TQString::tqfromLatin1(","), const TQString& tableAlias = TQString(), + const TQString& separator = TQString::fromLatin1(","), const TQString& tableAlias = TQString(), int drvEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary); /*! @internal Renames field \a oldName to \a newName. diff --git a/kexi/kexidb/queryschema.cpp b/kexi/kexidb/queryschema.cpp index b77f76a3..cff98a31 100644 --- a/kexi/kexidb/queryschema.cpp +++ b/kexi/kexidb/queryschema.cpp @@ -53,7 +53,7 @@ TQString QueryColumnInfo::debugString() const { return field->name() + ( alias.isEmpty() ? TQString() - : (TQString::tqfromLatin1(" AS ") + TQString(alias)) ); + : (TQString::fromLatin1(" AS ") + TQString(alias)) ); } //======================================= @@ -816,7 +816,7 @@ TQString QuerySchema::debugString() if (tablePos>=0) { TQCString tAlias = tableAlias(tablePos); if (!tAlias.isEmpty()) { - dbg2 += (TQString::tqfromLatin1(" field \"") + FieldList::field(i)->name() + dbg2 += (TQString::fromLatin1(" field \"") + FieldList::field(i)->name() + "\" uses alias \"" + TQString(tAlias) + "\" of table \"" + d->tables.at(tablePos)->name() + "\"\n"); } @@ -1291,7 +1291,7 @@ void QuerySchema::computeFieldsExpanded() // (the expression object will be owned by column info) visibleColumn = new Field(); visibleColumn->setName( - TQString::tqfromLatin1("[multiple_visible_fields_%1]") + TQString::fromLatin1("[multiple_visible_fields_%1]") .tqarg( ++numberOfColumnsWithMultipleVisibleFields )); visibleColumn->setExpression( new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/)); @@ -1310,7 +1310,7 @@ void QuerySchema::computeFieldsExpanded() if (!table( visibleField->table()->name() )) { } if (!sql.isEmpty()) - sql += TQString::tqfromLatin1(", "); + sql += TQString::fromLatin1(", "); sql += (escapeIdentifier(visibleField->table()->name(), drvEscaping) + "." + escapeIdentifier(visibleField->name(), drvEscaping)); }*/ @@ -1351,7 +1351,7 @@ void QuerySchema::computeFieldsExpanded() // (the expression object will be owned by column info) visibleColumn = new Field(); visibleColumn->setName( - TQString::tqfromLatin1("[multiple_visible_fields_%1]") + TQString::fromLatin1("[multiple_visible_fields_%1]") .tqarg( ++numberOfColumnsWithMultipleVisibleFields )); visibleColumn->setExpression( new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/)); @@ -1370,7 +1370,7 @@ void QuerySchema::computeFieldsExpanded() if (!table( visibleField->table()->name() )) { } if (!sql.isEmpty()) - sql += TQString::tqfromLatin1(", "); + sql += TQString::fromLatin1(", "); sql += (escapeIdentifier(visibleField->table()->name(), drvEscaping) + "." + escapeIdentifier(visibleField->name(), drvEscaping)); }*/ @@ -1508,7 +1508,7 @@ void QuerySchema::computeFieldsExpanded() ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index ); } else { - const TQString key( TQString::tqfromLatin1("[multiple_visible_fields_%1]_%2.%3") + const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3") .tqarg( ++numberOfColumnsWithMultipleVisibleFields ) .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) ); uint *index = lookup_dict[ key ]; @@ -1542,7 +1542,7 @@ void QuerySchema::computeFieldsExpanded() ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index ); } else { - const TQString key( TQString::tqfromLatin1("[multiple_visible_fields_%1]_%2.%3") + const TQString key( TQString::fromLatin1("[multiple_visible_fields_%1]_%2.%3") .tqarg( ++numberOfColumnsWithMultipleVisibleFields ) .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) ); uint *index = lookup_dict[ key ]; diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp index 9fa9ca01..8551a0ef 100644 --- a/kexi/kexidb/utils.cpp +++ b/kexi/kexidb/utils.cpp @@ -159,9 +159,9 @@ void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details) if (!details.isEmpty() && !details.startsWith("<qt>")) { if (details.startsWith("<p>")) - details = TQString::tqfromLatin1("<qt>")+details; + details = TQString::fromLatin1("<qt>")+details; else - details = TQString::tqfromLatin1("<qt><p>")+details; + details = TQString::fromLatin1("<qt><p>")+details; } } @@ -493,7 +493,7 @@ void KexiDB::connectionTestDialog(TQWidget* parent, const KexiDB::ConnectionData int KexiDB::rowCount(Connection &conn, const TQString& sql) { int count = -1; //will be changed only on success of querySingleNumber() - TQString selectSql( TQString::tqfromLatin1("SELECT COUNT() FROM (") + sql + ")" ); + TQString selectSql( TQString::fromLatin1("SELECT COUNT() FROM (") + sql + ")" ); conn.querySingleNumber(selectSql, count); return count; } @@ -507,7 +507,7 @@ int KexiDB::rowCount(const KexiDB::TableSchema& tableSchema) } int count = -1; //will be changed only on success of querySingleNumber() tableSchema.connection()->querySingleNumber( - TQString::tqfromLatin1("SELECT COUNT(*) FROM ") + TQString::fromLatin1("SELECT COUNT(*) FROM ") + tableSchema.connection()->driver()->escapeIdentifier(tableSchema.name()), count ); @@ -523,7 +523,7 @@ int KexiDB::rowCount(KexiDB::QuerySchema& querySchema) } int count = -1; //will be changed only on success of querySingleNumber() querySchema.connection()->querySingleNumber( - TQString::tqfromLatin1("SELECT COUNT(*) FROM (") + TQString::fromLatin1("SELECT COUNT(*) FROM (") + querySchema.connection()->selectStatement(querySchema) + ")", count ); @@ -965,7 +965,7 @@ TQDomElement KexiDB::saveBooleanElementToDom(TQDomDocument& doc, TQDomElement& p TQDomElement numberEl( doc.createElement("bool") ); el.appendChild( numberEl ); numberEl.appendChild( doc.createTextNode( - value ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false") ) ); + value ? TQString::fromLatin1("true") : TQString::fromLatin1("false") ) ); return el; } @@ -998,9 +998,9 @@ TQVariant KexiDB::emptyValueForType( KexiDB::Field::Type type ) return val; else { //special cases if (type==Field::Date) - return TQDate::tqcurrentDate(); + return TQDate::currentDate(); if (type==Field::DateTime) - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); if (type==Field::Time) return TQTime::currentTime(); } @@ -1047,9 +1047,9 @@ TQVariant KexiDB::notEmptyValueForType( KexiDB::Field::Type type ) return val; else { //special cases if (type==Field::Date) - return TQDate::tqcurrentDate(); + return TQDate::currentDate(); if (type==Field::DateTime) - return TQDateTime::tqcurrentDateTime(); + return TQDateTime::currentDateTime(); if (type==Field::Time) return TQTime::currentTime(); } @@ -1076,11 +1076,11 @@ TQString KexiDB::escapeBLOB(const TQByteArray& array, BLOBEscapingType type) return TQString(); } if (type == BLOBEscapeXHex) - str = TQString::tqfromLatin1("X'"); + str = TQString::fromLatin1("X'"); else if (type == BLOBEscape0xHex) - str = TQString::tqfromLatin1("0x"); + str = TQString::fromLatin1("0x"); else if (type == BLOBEscapeOctal) - str = TQString::tqfromLatin1("'"); + str = TQString::fromLatin1("'"); int new_length = str.length(); //after X' or 0x, etc. if (type == BLOBEscapeOctal) { diff --git a/kexi/kexidb/utils.h b/kexi/kexidb/utils.h index ec807d34..334ea20c 100644 --- a/kexi/kexidb/utils.h +++ b/kexi/kexidb/utils.h @@ -454,11 +454,11 @@ namespace KexiDB return TQString::fromUtf8(data, length); if (f->isIntegerType()) { if (f->type()==KexiDB::Field::BigInteger) - return TQVariant( TQString::tqfromLatin1(data, length).toLongLong() ); - return TQVariant( TQString::tqfromLatin1(data, length).toInt() ); + return TQVariant( TQString::fromLatin1(data, length).toLongLong() ); + return TQVariant( TQString::fromLatin1(data, length).toInt() ); } if (f->isFPNumericType()) - return TQString::tqfromLatin1(data, length).toDouble(); + return TQString::fromLatin1(data, length).toDouble(); if (f->type()==KexiDB::Field::BLOB) { TQByteArray ba; ba.duplicate(data, length); diff --git a/kexi/kexiutils/identifier.cpp b/kexi/kexiutils/identifier.cpp index da5f7f96..dc1754ca 100644 --- a/kexi/kexiutils/identifier.cpp +++ b/kexi/kexiutils/identifier.cpp @@ -48,7 +48,7 @@ inline TQString char2Identifier(const TQChar& c) if (c.tqunicode() >= TRANSLITERATION_TABLE_SIZE) return TQString(TQChar('_')); const char *const s = transliteration_table[c.tqunicode()]; - return s ? TQString::tqfromLatin1(s) : TQString(TQChar('_')); + return s ? TQString::fromLatin1(s) : TQString(TQChar('_')); } TQString KexiUtils::string2Identifier(const TQString &s) diff --git a/kexi/kexiutils/longlongvalidator.cpp b/kexi/kexiutils/longlongvalidator.cpp index ca3a42dd..e7cce867 100644 --- a/kexi/kexiutils/longlongvalidator.cpp +++ b/kexi/kexiutils/longlongvalidator.cpp @@ -53,7 +53,7 @@ TQValidator::State LongLongValidator::validate( TQString &str, int & ) const if (m_base > 10) newStr = newStr.upper(); - if (newStr == TQString::tqfromLatin1("-")) {// a special case + if (newStr == TQString::fromLatin1("-")) {// a special case if ((m_min || m_max) && m_min >= 0) ok = false; else diff --git a/kexi/kexiutils/styleproxy.h b/kexi/kexiutils/styleproxy.h index 867ef23d..cf3eea50 100644 --- a/kexi/kexiutils/styleproxy.h +++ b/kexi/kexiutils/styleproxy.h @@ -67,10 +67,10 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle virtual void polishPopupMenu( TQPopupMenu* p ) { m_style->polishPopupMenu(p); } - virtual TQRect tqitemRect( TQPainter *p, const TQRect &r, + virtual TQRect itemRect( TQPainter *p, const TQRect &r, int flags, bool enabled, const TQPixmap *pixmap, const TQString &text, int len = -1 ) const { - return m_style->tqitemRect( p, r, flags, enabled, pixmap, text, len ); + return m_style->itemRect( p, r, flags, enabled, pixmap, text, len ); } virtual void drawItem( TQPainter *p, const TQRect &r, @@ -87,18 +87,18 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle m_style->tqdrawPrimitive( pe, p, r, cg, flags, option ); } - virtual void tqdrawControl( TQ_ControlElement element, + virtual void drawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags how = Style_Default, const TQStyleOption& option = TQStyleOption::Default ) const { - m_style->tqdrawControl( element, p, widget, r, cg, how, option ); + m_style->drawControl( element, p, widget, r, cg, how, option ); } - virtual void tqdrawControlMask( TQ_ControlElement element, + virtual void drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& option = TQStyleOption::Default ) const { - m_style->tqdrawControlMask( element, p, widget, r, option ); + m_style->drawControlMask( element, p, widget, r, option ); } virtual TQRect subRect( SubRect r, const TQWidget *widget ) const @@ -106,7 +106,7 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle return m_style->subRect( r, widget ); } - virtual void tqdrawComplexControl( TQ_ComplexControl control, + virtual void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags how = Style_Default, #ifdef TQ_TQDOC @@ -116,14 +116,14 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle #endif SCFlags subActive = SC_None, const TQStyleOption& option = TQStyleOption::Default ) const { - tqdrawComplexControl( control, p, widget, r, cg, how, sub, subActive, option ); + drawComplexControl( control, p, widget, r, cg, how, sub, subActive, option ); } - virtual void tqdrawComplexControlMask( TQ_ComplexControl control, + virtual void drawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& option = TQStyleOption::Default ) const { - m_style->tqdrawComplexControlMask( control, p, widget, r, option ); + m_style->drawComplexControlMask( control, p, widget, r, option ); } virtual TQRect querySubControlMetrics( TQ_ComplexControl control, @@ -140,10 +140,10 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle return m_style->querySubControl( control, widget, pos, option ); } - virtual int tqpixelMetric( PixelMetric metric, + virtual int pixelMetric( PixelMetric metric, const TQWidget *widget = 0 ) const { - return m_style->tqpixelMetric( metric, widget ); + return m_style->pixelMetric( metric, widget ); } virtual TQSize tqsizeFromContents( ContentsType contents, @@ -153,11 +153,11 @@ class KEXIUTILS_EXPORT StyleProxy : public TQStyle return m_style->tqsizeFromContents( contents, widget, contentsSize, option ); } - virtual int tqstyleHint( TQ_StyleHint stylehint, + virtual int styleHint( TQ_StyleHint stylehint, const TQWidget *widget = 0, const TQStyleOption& option = TQStyleOption::Default, TQStyleHintReturn* returnData = 0 ) const { - return m_style->tqstyleHint( stylehint, widget, option, returnData ); + return m_style->styleHint( stylehint, widget, option, returnData ); } virtual TQPixmap stylePixmap( StylePixmap stylepixmap, diff --git a/kexi/kexiutils/tristate.h b/kexi/kexiutils/tristate.h index 0a8df95c..f3864849 100644 --- a/kexi/kexiutils/tristate.h +++ b/kexi/kexiutils/tristate.h @@ -165,8 +165,8 @@ public: */ TQString toString() const { if (m_value==False) - return TQString::tqfromLatin1("false"); - return m_value==True ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("cancelled"); + return TQString::fromLatin1("false"); + return m_value==True ? TQString::fromLatin1("true") : TQString::fromLatin1("cancelled"); } private: diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp index 7a1ab0f7..729312de 100644 --- a/kexi/kexiutils/utils.cpp +++ b/kexi/kexiutils/utils.cpp @@ -339,8 +339,8 @@ void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect, bitBlt( p.device(), // pos.x(), // pos.y(), - (int)p.tqworldMatrix().dx() + rect.x() + lineWidth + pos.x(), - (int)p.tqworldMatrix().dy() + rect.y() + lineWidth + pos.y(), + (int)p.worldMatrix().dx() + rect.x() + lineWidth + pos.x(), + (int)p.worldMatrix().dy() + rect.y() + lineWidth + pos.y(), &pixmapBuffer); } } diff --git a/kexi/main/kexifinddialogbase.ui b/kexi/main/kexifinddialogbase.ui index 8ffc254d..133570e7 100644 --- a/kexi/main/kexifinddialogbase.ui +++ b/kexi/main/kexifinddialogbase.ui @@ -150,7 +150,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>40</height> @@ -243,7 +243,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>2</height> @@ -279,7 +279,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>70</width> <height>20</height> diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp index 5594d577..293271c5 100644 --- a/kexi/main/keximainwindowimpl.cpp +++ b/kexi/main/keximainwindowimpl.cpp @@ -245,8 +245,8 @@ KexiMainWindowImpl::KexiMainWindowImpl() int scnum = TQApplication::desktop()->screenNumber(parentWidget()); TQRect desk = TQApplication::desktop()->screenGeometry(scnum); d->config->setGroup("MainWindow"); - TQSize s ( d->config->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()), 700 ), - d->config->readNumEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()), 480 ) ); + TQSize s ( d->config->readNumEntry( TQString::fromLatin1("Width %1").tqarg(desk.width()), 700 ), + d->config->readNumEntry( TQString::fromLatin1("Height %1").tqarg(desk.height()), 480 ) ); resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height())); } @@ -1836,7 +1836,7 @@ void KexiMainWindowImpl::initPropertyEditor() //1 dw->setMinimumWidth(200); - // ds->setSeparatorPos(d->propEditor->tqsizeHint().width(), true); + // ds->setSeparatorPos(d->propEditor->sizeHint().width(), true); //heh, this is for IDEAl only, I suppose? //js if (m_rightContainer) { @@ -1885,10 +1885,10 @@ void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool tqchildrenMaximized) if (tqchildrenMaximized && view) { setCaption( d->curDialog->caption() - + (d->appCaptionPrefix.isEmpty() ? TQString() : (TQString::tqfromLatin1(" - ") + d->appCaptionPrefix)) ); + + (d->appCaptionPrefix.isEmpty() ? TQString() : (TQString::fromLatin1(" - ") + d->appCaptionPrefix)) ); } else { - setCaption( (d->appCaptionPrefix.isEmpty() ? TQString() : (d->appCaptionPrefix + TQString::tqfromLatin1(" - "))) + setCaption( (d->appCaptionPrefix.isEmpty() ? TQString() : (d->appCaptionPrefix + TQString::fromLatin1(" - "))) + d->origAppCaption ); } } @@ -2093,8 +2093,8 @@ KexiMainWindowImpl::restoreSettings() }*/ config->setGroup("MainWindow"); - TQSize s ( config->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()), 700 ), - config->readNumEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()), 480 ) ); + TQSize s ( config->readNumEntry( TQString::fromLatin1("Width %1").tqarg(desk.width()), 700 ), + config->readNumEntry( TQString::fromLatin1("Height %1").tqarg(desk.height()), 480 ) ); resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height())); } #endif @@ -3479,8 +3479,8 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) KexiVDebug << (focus_w ? focus_w->name() : "" ) << endl; KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name() <<endl; #ifdef KEXI_STATUSBAR_DEBUG - TQWidget *focus_widget = focus_w ? focus_w->tqfocusWidget() : 0; - d->statusBar->settqStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4") + TQWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0; + d->statusBar->setStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4") .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "") .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "") ); @@ -3492,8 +3492,8 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) KexiVDebug << (focus_w ? focus_w->name() : "" ) << endl; KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name() <<endl; #ifdef KEXI_STATUSBAR_DEBUG - TQWidget *focus_widget = focus_w ? focus_w->tqfocusWidget() : 0; - d->statusBar->settqStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4") + TQWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0; + d->statusBar->setStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4") .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "") .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "") ); @@ -3512,7 +3512,7 @@ bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e ) // invalidateSharedActions(); } else { -/* TQObject* o = tqfocusWidget(); +/* TQObject* o = focusWidget(); while (o && !o->inherits("KexiDialogBase") && !o->inherits("KexiDockBase")) o = o->parent();*/ //js invalidateSharedActions(focus_w); @@ -4409,7 +4409,7 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio if (dlg) { // accept row changes - TQWidget *prevFocusWidget = tqfocusWidget(); + TQWidget *prevFocusWidget = focusWidget(); dlg->setFocus(); d->action_data_save_row->activate(); if (prevFocusWidget) diff --git a/kexi/main/keximainwindowimpl.h b/kexi/main/keximainwindowimpl.h index 9dbedae3..5f3d887a 100644 --- a/kexi/main/keximainwindowimpl.h +++ b/kexi/main/keximainwindowimpl.h @@ -296,7 +296,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI virtual bool acceptsSharedActions(TQObject *w); /*! Performs lookup like in KexiSharedActionHost::focusWindow() - but starting from \a w instead of a widget returned by TQWidget::tqfocusWidget(). + but starting from \a w instead of a widget returned by TQWidget::focusWidget(). \return NULL if no widget matches acceptsSharedActions() or if \a w is NULL. */ TQWidget* findWindow(TQWidget *w); diff --git a/kexi/main/keximainwindowimpl_p.h b/kexi/main/keximainwindowimpl_p.h index c79b58db..98600c62 100644 --- a/kexi/main/keximainwindowimpl_p.h +++ b/kexi/main/keximainwindowimpl_p.h @@ -267,7 +267,7 @@ void updatePropEditorDockWidthInfo() { #endif } else { //propEditorToolWindow->show(); - TQWidget *origFocusWidget = tqApp->tqfocusWidget(); + TQWidget *origFocusWidget = tqApp->focusWidget(); wnd->makeWidgetDockVisible(propEditorTabWidget); if (origFocusWidget) origFocusWidget->setFocus(); diff --git a/kexi/main/kexinamedialog.cpp b/kexi/main/kexinamedialog.cpp index 45cbc449..f3e1acec 100644 --- a/kexi/main/kexinamedialog.cpp +++ b/kexi/main/kexinamedialog.cpp @@ -53,12 +53,12 @@ void KexiNameDialog::init() { TQGridLayout *lyr = new TQGridLayout(plainPage(), 2, 3); m_icon = new TQLabel( plainPage(), "icon" ); - m_icon->tqsetAlignment( int( AlignTop | AlignLeft ) ); - m_icon->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred,1,0)); + m_icon->setAlignment( int( AlignTop | AlignLeft ) ); + m_icon->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred,1,0)); m_icon->setFixedWidth(50); lyr->addWidget(m_icon,0,0); - m_widget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred,1,0)); + m_widget->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred,1,0)); lyr->addWidget(m_widget,0,1); lyr->addItem(new TQSpacerItem( 25, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum ), 0, 2); lyr->addItem(new TQSpacerItem( 5, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ), 1, 1); @@ -75,7 +75,7 @@ void KexiNameDialog::updateSize() { // resize( TQSize(400, 140 + (m_widget->lbl_message->isVisible()?m_widget->lbl_message->height():0) ) resize( TQSize(400, 140 + (!m_widget->lbl_message->text().isEmpty()?m_widget->lbl_message->height():0) ) - .expandedTo(tqminimumSizeHint()) ); + .expandedTo(minimumSizeHint()) ); // updateGeometry(); } diff --git a/kexi/main/kexinamewidget.cpp b/kexi/main/kexinamewidget.cpp index c6ca8f41..8f5ee38a 100644 --- a/kexi/main/kexinamewidget.cpp +++ b/kexi/main/kexinamewidget.cpp @@ -66,8 +66,8 @@ void KexiNameWidget::init( lbl_message = new TQLabel( this, "message" ); setMessageText( message ); - lbl_message->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); - lbl_message->tqsetAlignment( TQLabel::AlignTop | TQLabel::WordBreak ); + lbl_message->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); + lbl_message->setAlignment( TQLabel::AlignTop | TQLabel::WordBreak ); lyr->addMultiCellWidget( lbl_message, 0, 0, 0, 1 ); lbl_caption = new TQLabel( captionLabel.isEmpty() ? i18n( "Caption:" ) : captionLabel, @@ -79,17 +79,17 @@ void KexiNameWidget::init( lyr->addWidget( lbl_name, 2, 0 ); le_caption = new KLineEdit( nameText, this, "le_caption" ); - le_caption->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 1, 0)); + le_caption->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 1, 0)); lyr->addWidget( le_caption, 1, 1 ); le_name = new KLineEdit( nameText, this, "le_name" ); - le_name->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed,1,0)); + le_name->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed,1,0)); Validator *idValidator = new IdentifierValidator(0, "id_val"); le_name->setValidator( m_validator = new MultiValidator(idValidator, TQT_TQOBJECT(this), "val") ); lyr->addWidget( le_name, 2, 1 ); setFocusProxy(le_caption); - resize( TQSize(342, 123).expandedTo(tqminimumSizeHint()) ); + resize( TQSize(342, 123).expandedTo(minimumSizeHint()) ); m_nameWarning = i18n("Please enter the name."); m_captionWarning = i18n("Please enter the caption."); diff --git a/kexi/main/kexistatusbar.cpp b/kexi/main/kexistatusbar.cpp index e4bfd580..439c20b6 100644 --- a/kexi/main/kexistatusbar.cpp +++ b/kexi/main/kexistatusbar.cpp @@ -78,7 +78,7 @@ void KexiStatusBar::activePartChanged(KParts::Part *part) if (part && part->widget()) { if ((m_viewmsgIface = dynamic_cast<KTextEditor::ViewStatusMsgInterface*>(part->widget()))) { connect( part->widget(), TQT_SIGNAL( viewStatusMsg( const TQString & ) ), - this, TQT_SLOT( settqStatus( const TQString & ) ) ); + this, TQT_SLOT( setStatus( const TQString & ) ) ); # if TDE_VERSION < KDE_MAKE_VERSION(3,1,90) changeItem(m_map[ m_activePart ], m_msgID); @@ -110,7 +110,7 @@ void KexiStatusBar::cursorPositionChanged() #endif } -void KexiStatusBar::settqStatus(const TQString &str) +void KexiStatusBar::setStatus(const TQString &str) { kdDebug() << "KexiStatusBar::setStatus(" << str << ")" << endl; // m_status->setText(str); @@ -133,8 +133,8 @@ void KexiStatusBar::setCursorPosition(int line, int col) { KStatusBar::addWidget(widget,stretch,permanent); - if(widget->tqsizeHint().height() + 4 > height()) - setFixedHeight(widget->tqsizeHint().height() + 4); + if(widget->sizeHint().height() + 4 > height()) + setFixedHeight(widget->sizeHint().height() + 4); }*/ void KexiStatusBar::setReadOnlyFlag(bool readOnly) diff --git a/kexi/main/kexistatusbar.h b/kexi/main/kexistatusbar.h index bab1277a..e8c31d41 100644 --- a/kexi/main/kexistatusbar.h +++ b/kexi/main/kexistatusbar.h @@ -48,7 +48,7 @@ class KexiStatusBar : public KStatusBar // virtual void addWidget( TQWidget *widget, int stretch = 0, bool permanent = false); public slots: - virtual void settqStatus(const TQString &str); + virtual void setStatus(const TQString &str); virtual void setReadOnlyFlag(bool readOnly); protected slots: @@ -58,7 +58,7 @@ class KexiStatusBar : public KStatusBar protected: int m_msgID, m_readOnlyID; -// TQLabel *m_status, *m_readOnlytqStatus; +// TQLabel *m_status, *m_readOnlyStatus; #if KexiStatusBar_KTEXTEDITOR_USED KTextEditor::ViewCursorInterface * m_cursorIface; diff --git a/kexi/main/printing/kexisimpleprintingengine.cpp b/kexi/main/printing/kexisimpleprintingengine.cpp index 45ab5892..ac829ce1 100644 --- a/kexi/main/printing/kexisimpleprintingengine.cpp +++ b/kexi/main/printing/kexisimpleprintingengine.cpp @@ -278,7 +278,7 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, TQPainter& painter, boo } painter.setFont(m_mainFont); - m_dateTimeText = KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime(), + m_dateTimeText = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime(), true, false); m_dateTimeWidth = painter.fontMetrics().width(m_dateTimeText+" "); m_mainLineSpacing = painter.fontMetrics().lineSpacing(); diff --git a/kexi/main/printing/kexisimpleprintingpagesetupbase.ui b/kexi/main/printing/kexisimpleprintingpagesetupbase.ui index 6b169f7e..de57e97e 100644 --- a/kexi/main/printing/kexisimpleprintingpagesetupbase.ui +++ b/kexi/main/printing/kexisimpleprintingpagesetupbase.ui @@ -158,7 +158,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>230</width> <height>20</height> @@ -238,7 +238,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>80</width> <height>6</height> @@ -343,7 +343,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> @@ -360,7 +360,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>4</height> @@ -377,7 +377,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>4</height> @@ -394,7 +394,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>4</height> @@ -411,7 +411,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>4</height> diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp index 68c1c673..f07722d8 100644 --- a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp +++ b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp @@ -196,11 +196,11 @@ KexiSimplePrintPreviewWindow::KexiSimplePrintPreviewWindow( m_scrollView = new KexiSimplePrintPreviewScrollView(this); m_scrollView->setUpdatesEnabled(false); m_view = m_scrollView->widget; - m_scrollView->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + m_scrollView->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); lyr->addWidget(m_scrollView); TQWidget* navToolbarWidget = new TQWidget(this); //widget used to center the navigator toolbar - navToolbarWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + navToolbarWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); TQHBoxLayout *navToolbarLyr = new TQHBoxLayout(navToolbarWidget); lyr->addWidget(navToolbarWidget); diff --git a/kexi/main/startup/KexiConnSelectorBase.ui b/kexi/main/startup/KexiConnSelectorBase.ui index 5c7bb64d..4c371ed2 100644 --- a/kexi/main/startup/KexiConnSelectorBase.ui +++ b/kexi/main/startup/KexiConnSelectorBase.ui @@ -72,7 +72,7 @@ <verstretch>1</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>0</width> <height>60</height> @@ -149,7 +149,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> @@ -166,7 +166,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>41</height> @@ -177,7 +177,7 @@ <property name="name"> <cstring>descGroupBox</cstring> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>32767</width> <height>80</height> @@ -205,7 +205,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>32767</width> <height>50</height> diff --git a/kexi/main/startup/KexiDBTitlePageBase.ui b/kexi/main/startup/KexiDBTitlePageBase.ui index 7b711ea3..e8a00ef9 100644 --- a/kexi/main/startup/KexiDBTitlePageBase.ui +++ b/kexi/main/startup/KexiDBTitlePageBase.ui @@ -40,7 +40,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>111</height> @@ -57,7 +57,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>40</width> <height>20</height> @@ -76,7 +76,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>100</width> <height>0</height> diff --git a/kexi/main/startup/KexiNewPrjTypeSelector.ui b/kexi/main/startup/KexiNewPrjTypeSelector.ui index 79f763ee..29e52812 100644 --- a/kexi/main/startup/KexiNewPrjTypeSelector.ui +++ b/kexi/main/startup/KexiNewPrjTypeSelector.ui @@ -29,7 +29,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> diff --git a/kexi/main/startup/KexiNewProjectWizard.cpp b/kexi/main/startup/KexiNewProjectWizard.cpp index b24a66ab..625af34f 100644 --- a/kexi/main/startup/KexiNewProjectWizard.cpp +++ b/kexi/main/startup/KexiNewProjectWizard.cpp @@ -96,7 +96,7 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set, //page: type selector m_prjtype_sel = new KexiNewPrjTypeSelector(this, "KexiNewPrjTypeSelector"); // lv_types = new KListView(m_prjtype_sel, "types listview"); -// m_prjtype_sel->lv_types->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum, 0, 2)); +// m_prjtype_sel->lv_types->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum, 0, 2)); #if KDE_IS_VERSION(3,3,9) m_prjtype_sel->lv_types->setShadeSortColumn(false); #endif @@ -142,7 +142,7 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set, m_conn_sel_widget = new TQWidget(this); TQVBoxLayout* conn_sel_lyr = new TQVBoxLayout(m_conn_sel_widget); TQLabel *conn_sel_label = new TQLabel(i18n("Enter a new Kexi project's file name:"), m_conn_sel_widget); - conn_sel_label->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); + conn_sel_label->setAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); conn_sel_lyr->addWidget( conn_sel_label ); conn_sel_lyr->addSpacing(KDialogBase::spacingHint()); diff --git a/kexi/main/startup/KexiOpenExistingFile.ui b/kexi/main/startup/KexiOpenExistingFile.ui index f11d7f58..b822f0ff 100644 --- a/kexi/main/startup/KexiOpenExistingFile.ui +++ b/kexi/main/startup/KexiOpenExistingFile.ui @@ -43,7 +43,7 @@ <property name="name"> <cstring>line</cstring> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>32767</width> <height>8</height> @@ -60,13 +60,13 @@ <property name="name"> <cstring>spacer</cstring> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>0</width> <height>6</height> </size> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>32767</width> <height>6</height> diff --git a/kexi/main/startup/KexiProjectSelectorBase.ui b/kexi/main/startup/KexiProjectSelectorBase.ui index 18c80544..57aa28ad 100644 --- a/kexi/main/startup/KexiProjectSelectorBase.ui +++ b/kexi/main/startup/KexiProjectSelectorBase.ui @@ -103,7 +103,7 @@ <verstretch>1</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>0</width> <height>60</height> diff --git a/kexi/main/startup/KexiServerDBNamePage.ui b/kexi/main/startup/KexiServerDBNamePage.ui index b423d467..f482ed73 100644 --- a/kexi/main/startup/KexiServerDBNamePage.ui +++ b/kexi/main/startup/KexiServerDBNamePage.ui @@ -44,7 +44,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>100</width> <height>0</height> @@ -55,7 +55,7 @@ <property name="name"> <cstring>le_dbname</cstring> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>100</width> <height>0</height> @@ -72,7 +72,7 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>70</width> <height>20</height> @@ -89,7 +89,7 @@ <property name="sizeType"> <enum>Preferred</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>70</width> <height>20</height> @@ -128,7 +128,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>12</height> diff --git a/kexi/main/startup/KexiStartup.cpp b/kexi/main/startup/KexiStartup.cpp index c479a4e0..1708efbc 100644 --- a/kexi/main/startup/KexiStartup.cpp +++ b/kexi/main/startup/KexiStartup.cpp @@ -126,7 +126,7 @@ void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen) if (ok && percent>=0 && percent<=100 && pd->progressBar()->progress()<percent) { // kdDebug() << percent << endl; pd->progressBar()->setProgress(percent); - tqApp->tqprocessEvents(100); + tqApp->processEvents(100); } } } @@ -176,7 +176,7 @@ KexiDBPasswordDialog::~KexiDBPasswordDialog() void KexiDBPasswordDialog::done(int r) { if (r == TQDialog::Accepted) { - m_cdata->password = TQString::tqfromLatin1(password()); + m_cdata->password = TQString::fromLatin1(password()); } // if (d->showConnectionDetailsExecuted || ret == TQDialog::Accepted) { /* } else { @@ -364,7 +364,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/) const bool dropDB = args->isSet("dropdb"); const bool openExisting = !createDB && !dropDB; const bool readOnly = args->isSet("readonly"); - const TQString couldnotMsg = TQString::tqfromLatin1("\n") + const TQString couldnotMsg = TQString::fromLatin1("\n") +i18n("Could not start Kexi application this way."); if (createDB && dropDB) { @@ -872,19 +872,19 @@ tristate KexiStartupHandler::detectActionForFile( if (detectedDriverName.isEmpty()) { TQString possibleProblemsInfoMsg( Kexi::driverManager().possibleProblemsInfoMsg() ); if (!possibleProblemsInfoMsg.isEmpty()) { - possibleProblemsInfoMsg.prepend(TQString::tqfromLatin1("<p>")+i18n("Possible problems:")); - possibleProblemsInfoMsg += TQString::tqfromLatin1("</p>"); + possibleProblemsInfoMsg.prepend(TQString::fromLatin1("<p>")+i18n("Possible problems:")); + possibleProblemsInfoMsg += TQString::fromLatin1("</p>"); } if (!(options & SkipMessages)) KMessageBox::detailedSorry(parent, i18n( "The file \"%1\" is not recognized as being supported by Kexi.") .tqarg(TQDir::convertSeparators(dbFileName)), - TQString::tqfromLatin1("<p>") + TQString::fromLatin1("<p>") +i18n("Database driver for this file type not found.\nDetected MIME type: %1") .tqarg(mimename) +(ptr.data()->comment().isEmpty() - ? TQString::tqfromLatin1(".") : TQString::tqfromLatin1(" (%1).").tqarg(ptr.data()->comment())) - +TQString::tqfromLatin1("</p>") + ? TQString::fromLatin1(".") : TQString::fromLatin1(" (%1).").tqarg(ptr.data()->comment())) + +TQString::fromLatin1("</p>") +possibleProblemsInfoMsg); return false; } @@ -894,7 +894,7 @@ tristate KexiStartupHandler::detectActionForFile( KexiProjectData* KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, TQWidget *parent) { - cleartqStatus(); + clearStatus(); cancelled = false; if (!cdata) return 0; @@ -922,7 +922,7 @@ KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled msgh.showErrorMessage( i18n("Could not load list of available projects for <b>%1</b> database server.") .tqarg(cdata->serverInfoString(true))); -// settqStatus(i18n("Could not load list of available projects for database server \"%1\"") +// setStatus(i18n("Could not load list of available projects for database server \"%1\"") // .tqarg(cdata->serverInfoString(true)), prjdlg.projectSet()->errorMsg()); return 0; } diff --git a/kexi/main/startup/KexiStartup.h b/kexi/main/startup/KexiStartup.h index fe1b3cf0..23d8e832 100644 --- a/kexi/main/startup/KexiStartup.h +++ b/kexi/main/startup/KexiStartup.h @@ -59,7 +59,7 @@ class KEXIMAIN_EXPORT KexiDBPasswordDialog : public KPasswordDialog /*! Handles startup actions for Kexi application. */ class KEXIMAIN_EXPORT KexiStartupHandler - : public TQObject, public KexiStartupData, public Kexi::ObjecttqStatus + : public TQObject, public KexiStartupData, public Kexi::ObjectStatus { Q_OBJECT TQ_OBJECT diff --git a/kexi/main/startup/KexiStartupDialog.cpp b/kexi/main/startup/KexiStartupDialog.cpp index 7f67bc76..91bd6bfc 100644 --- a/kexi/main/startup/KexiStartupDialog.cpp +++ b/kexi/main/startup/KexiStartupDialog.cpp @@ -324,7 +324,7 @@ void KexiStartupDialog::setupPageTemplates() tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint()); TQLabel *lbl_blank = new TQLabel( i18n("Kexi will create a new blank database project.")+clickMsg, templPageFrame ); - lbl_blank->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); + lbl_blank->setAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); lbl_blank->setMargin(0); tmplyr->addWidget( lbl_blank ); tmplyr->addStretch(1); @@ -342,7 +342,7 @@ void KexiStartupDialog::setupPageTemplates() TQLabel *lbl_templ = new TQLabel( i18n("Kexi will create a new database project using selected template.\n" "Select template and click \"OK\" button to proceed."), templPageFrame ); - lbl_templ->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); + lbl_templ->setAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); lbl_templ->setMargin(0); tmplyr->addWidget( lbl_templ ); @@ -389,7 +389,7 @@ void KexiStartupDialog::setupPageTemplates() TQLabel *lbl_import = new TQLabel( i18n("Kexi will import the structure and data of an existing database as a new database project.") +clickMsg, templPageFrame ); - lbl_import->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); + lbl_import->setAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak); lbl_import->setMargin(0); tmplyr->addWidget( lbl_import ); tmplyr->addStretch(1); diff --git a/kexi/main/startup/KexiStartupFileDialog.cpp b/kexi/main/startup/KexiStartupFileDialog.cpp index cd54602b..1e50a12d 100644 --- a/kexi/main/startup/KexiStartupFileDialog.cpp +++ b/kexi/main/startup/KexiStartupFileDialog.cpp @@ -42,7 +42,7 @@ KexiStartupFileDialog::KexiStartupFileDialog( , m_confirmOverwrites(true) , m_filtersUpdated(false) { - tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Minimum); + setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Minimum); setMode( mode ); TQPoint point( 0, 0 ); diff --git a/kexi/main/startup/KexiStartupFileDialog_win.cpp b/kexi/main/startup/KexiStartupFileDialog_win.cpp index c81de131..67a44ca6 100644 --- a/kexi/main/startup/KexiStartupFileDialog_win.cpp +++ b/kexi/main/startup/KexiStartupFileDialog_win.cpp @@ -197,7 +197,7 @@ void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& f coll->action( "mkdir" )->setWhatsThis(i18n("Click this button to create a new directory.")); d->bookmarkHandler = new KFileBookmarkHandler( this ); - toolbar->insertButton(TQString::tqfromLatin1("bookmark"), + toolbar->insertButton(TQString::fromLatin1("bookmark"), (int)HOTLIST_BUTTON, true, i18n("Bookmarks")); toolbar->getButton(HOTLIST_BUTTON)->setPopup( d->bookmarkHandler->menu(), @@ -441,7 +441,7 @@ void KexiStartupFileDialogBase::setMimeFilter( const TQStringList& mimeTypes, //(js) filterWidget->setMimeFilter( mimeTypes, defaultType ); //(js) TQStringList types = TQStringList::split(" ", filterWidget->currentFilter()); -//(js) types.append( TQString::tqfromLatin1( "inode/directory" )); +//(js) types.append( TQString::fromLatin1( "inode/directory" )); //(js) ops->clearFilter(); //(js) ops->setMimeFilter( types ); //(js) d->hasDefaultFilter = !defaultType.isEmpty(); diff --git a/kexi/migration/importoptionsdlg.cpp b/kexi/migration/importoptionsdlg.cpp index 50d6726d..e89d0932 100644 --- a/kexi/migration/importoptionsdlg.cpp +++ b/kexi/migration/importoptionsdlg.cpp @@ -53,7 +53,7 @@ OptionsDialog::OptionsDialog( const TQString& databaseFile, const TQString& sele KDialogBase::spacingHint()); m_encodingComboBox = new KexiCharacterEncodingComboBox(plainPage(), selectedEncoding); - m_encodingComboBox->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + m_encodingComboBox->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); lyr->addWidget( m_encodingComboBox, 1, 1 ); TQLabel* lbl = new TQLabel( i18n("<h3>Text encoding for Microsoft Access database</h3>\n" @@ -61,8 +61,8 @@ OptionsDialog::OptionsDialog( const TQString& databaseFile, const TQString& sele "<p>In order to properly import national characters, you may need to choose a proper text encoding " "if the database was created on a computer with a different character set.</p>") .tqarg(TQDir::convertSeparators(databaseFile)), plainPage()); - lbl->tqsetAlignment( TQt::AlignAuto | TQt::WordBreak ); - lbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + lbl->setAlignment( TQt::AlignAuto | TQt::WordBreak ); + lbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); lyr->addMultiCellWidget( lbl, 0, 0, 0, 2 ); TQLabel* lbl2 = new TQLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage()); diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp index 9c1b4559..91de5f7f 100644 --- a/kexi/migration/importwizard.cpp +++ b/kexi/migration/importwizard.cpp @@ -110,7 +110,7 @@ ImportWizard::ImportWizard(TQWidget *parent, TQMap<TQString,TQString>* args) } } - m_sourceDBEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); //default + m_sourceDBEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); //default } //=========================================================== @@ -148,7 +148,7 @@ void ImportWizard::setupIntro() TQVBoxLayout *vbox = new TQVBoxLayout(m_introPage, KDialog::marginHint()); TQLabel *lblIntro = new TQLabel(m_introPage); - lblIntro->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); + lblIntro->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); TQString msg; if (m_predefinedConnectionData) { //predefined import: server source msg = i18n("<qt>Database Importing wizard is about to import \"%1\" database " @@ -247,7 +247,7 @@ void ImportWizard::setupDstType() TQHBoxLayout *hbox = new TQHBoxLayout(vbox); TQLabel *lbl = new TQLabel(i18n("Destination database type:")+" ", m_dstTypePage); - lbl->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop); + lbl->setAlignment(TQt::AlignAuto|TQt::AlignTop); hbox->addWidget(lbl); m_dstPrjTypeSelector = new KexiPrjTypeSelector(m_dstTypePage); @@ -339,10 +339,10 @@ void ImportWizard::setupImporting() m_importingPage->hide(); TQVBoxLayout *vbox = new TQVBoxLayout(m_importingPage, KDialog::marginHint()); m_lblImportingTxt = new TQLabel(m_importingPage); - m_lblImportingTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); + m_lblImportingTxt->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); m_lblImportingErrTxt = new TQLabel(m_importingPage); - m_lblImportingErrTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); + m_lblImportingErrTxt->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); m_progressBar = new KProgress(100, m_importingPage); m_progressBar->hide(); @@ -374,7 +374,7 @@ void ImportWizard::setupFinish() m_finishPage->hide(); TQVBoxLayout *vbox = new TQVBoxLayout(m_finishPage, KDialog::marginHint()); m_finishLbl = new TQLabel(m_finishPage); - m_finishLbl->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); + m_finishLbl->setAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak ); vbox->addWidget( m_finishLbl ); m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"), @@ -398,7 +398,7 @@ bool ImportWizard::checkUserInput() finishtxt = finishtxt + "<br>" + i18n("No new database name was entered."); } - Kexi::ObjecttqStatus result; + Kexi::ObjectStatus result; KexiMigrate* sourceDriver = prepareImport(result); if (sourceDriver && sourceDriver->isSourceAndDestinationDataSourceTheSame()) { @@ -551,7 +551,7 @@ void ImportWizard::arriveImportingPage() { //! and KexiMigration::Driver classes bool showOptions = false; if (fileBasedSrcSelected()) { - Kexi::ObjecttqStatus result; + Kexi::ObjectStatus result; KexiMigrate* sourceDriver = prepareImport(result); if (sourceDriver) { showOptions = !result.error() @@ -650,7 +650,7 @@ void ImportWizard::accept() KWizard::accept(); } -KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result) +KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result) { KexiUtils::WaitCursor wait; @@ -667,10 +667,10 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result) ); if (!destDriver || manager.error()) { - result.settqStatus(&manager); + result.setStatus(&manager); kdDebug() << "Manager error..." << endl; manager.debugError(); -// result.settqStatus(&manager); +// result.setStatus(&manager); } // Set up destination connection data @@ -702,7 +702,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result) { //TODO This needs a better message //KMessageBox::error(this, - result.settqStatus(i18n("No connection data is available. You did not select a destination filename."),""); + result.setStatus(i18n("No connection data is available. You did not select a destination filename."),""); //return false; } */ } @@ -713,7 +713,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result) { sourceDriverName = driverNameForSelectedSource(); if (sourceDriverName.isEmpty()) - result.settqStatus(i18n("No appropriate migration driver found."), + result.setStatus(i18n("No appropriate migration driver found."), m_migrateManager.possibleProblemsInfoMsg()); } @@ -724,7 +724,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result) sourceDriver = m_migrateManager.driver( sourceDriverName ); if(!sourceDriver || m_migrateManager.error()) { kdDebug() << "Import migrate driver error..." << endl; - result.settqStatus(&m_migrateManager); + result.setStatus(&m_migrateManager); } } @@ -793,7 +793,7 @@ tristate ImportWizard::import() { m_importExecuted = true; - Kexi::ObjecttqStatus result; + Kexi::ObjectStatus result; KexiMigrate* sourceDriver = prepareImport(result); bool acceptingNeeded = false; diff --git a/kexi/migration/importwizard.h b/kexi/migration/importwizard.h index 8d3a82b0..19a1b844 100644 --- a/kexi/migration/importwizard.h +++ b/kexi/migration/importwizard.h @@ -47,7 +47,7 @@ class KexiPrjTypeSelector; namespace Kexi { - class ObjecttqStatus; + class ObjectStatus; } namespace KexiDB @@ -98,7 +98,7 @@ private: void setupImporting(); bool checkUserInput(); - KexiMigrate* prepareImport(Kexi::ObjecttqStatus& result); + KexiMigrate* prepareImport(Kexi::ObjectStatus& result); /*! Performs import. \return true/false on success/faulure or cancelled when user cancelled importing (mainly diff --git a/kexi/migration/keximigrate.cpp b/kexi/migration/keximigrate.cpp index b225f6ba..7b4944f2 100644 --- a/kexi/migration/keximigrate.cpp +++ b/kexi/migration/keximigrate.cpp @@ -61,18 +61,18 @@ KexiMigrate::~KexiMigrate() delete m_destPrj; } -bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjecttqStatus* result, +bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjectStatus* result, bool& acceptingNeeded) { acceptingNeeded = false; if (result) - result->cleartqStatus(); + result->clearStatus(); KexiDB::DriverManager drvManager; KexiDB::Driver *destDriver = drvManager.driver( m_migrateData->destination->connectionData()->driverName); if (!destDriver) { - result->settqStatus(&drvManager, + result->setStatus(&drvManager, i18n("Could not create database \"%1\".") .tqarg(m_migrateData->destination->databaseName())); return false; @@ -113,16 +113,16 @@ bool KexiMigrate::isSourceAndDestinationDataSourceTheSame() const //============================================================================= // Perform Import operation -bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) +bool KexiMigrate::performImport(Kexi::ObjectStatus* result) { if (result) - result->cleartqStatus(); + result->clearStatus(); KexiDB::DriverManager drvManager; KexiDB::Driver *destDriver = drvManager.driver( m_migrateData->destination->connectionData()->driverName); if (!destDriver) { - result->settqStatus(&drvManager, + result->setStatus(&drvManager, i18n("Could not create database \"%1\".") .tqarg(m_migrateData->destination->databaseName())); return false; @@ -135,7 +135,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) if (!drv_connect()) { kdDebug() << "Couldnt connect to database server" << endl; if (result) - result->settqStatus(i18n("Could not connect to data source \"%1\".") + result->setStatus(i18n("Could not connect to data source \"%1\".") .tqarg(m_migrateData->source->serverInfoString()), ""); return false; } @@ -145,7 +145,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) if (!tableNames(tables)) { kdDebug() << "Couldnt get list of tables" << endl; if (result) - result->settqStatus( + result->setStatus( i18n("Could not get a list of table names for data source \"%1\".") .tqarg(m_migrateData->source->serverInfoString()), ""); return false; @@ -155,7 +155,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) if (tables.isEmpty()) { kdDebug() << "There were no tables to import" << endl; if (result) - result->settqStatus( + result->setStatus( i18n("No tables to import found in data source \"%1\".") .tqarg(m_migrateData->source->serverInfoString()), ""); return false; @@ -165,14 +165,14 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) tables.sort(); m_tableSchemas.clear(); if (!destDriver) { - result->settqStatus(&drvManager); + result->setStatus(&drvManager); return false; } const bool kexi__objects_exists = tables.find("kexi__objects")!=tables.end(); TQStringList kexiDBTables; if (kexi__objects_exists) { tristate res = drv_queryStringListFromSQL( - TQString::tqfromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1") + TQString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1") .tqarg((int)KexiDB::TableObjectType), 0, kexiDBTables, -1); if (res == true) { // prepend KexiDB-compatible tables to 'tables' list, so we'll copy KexiDB-compatible tables first, @@ -199,7 +199,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) if (!drv_readTableSchema(*it, *tableSchema)) { delete tableSchema; if (result) - result->settqStatus( + result->setStatus( i18n("Could not import project from data source \"%1\". Error reading table \"%2\".") .tqarg(m_migrateData->source->serverInfoString()).tqarg(tableName), ""); return false; @@ -228,7 +228,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) if (trans.isNull()) { ok = false; if (result) - result->settqStatus(destConn, + result->setStatus(destConn, i18n("Could not create database \"%1\".") .tqarg(m_migrateData->destination->databaseName())); //later destConn->dropDatabase(m_migrateData->destination->databaseName()); @@ -258,7 +258,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) //load schema for every field and add it firstRecord = true; TQString sql( - TQString::tqfromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, " + TQString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, " "f_options, f_default, f_order, f_caption, f_help" " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->id()) ); while (ok) { @@ -299,7 +299,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) kdDebug() << "Failed to create a table " << ts->name() << endl; destConn->debugError(); if (result) - result->settqStatus(destConn, + result->setStatus(destConn, i18n("Could not create database \"%1\".") .tqarg(m_migrateData->destination->databaseName())); m_tableSchemas.remove(ts); @@ -329,7 +329,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) if (m_destPrj->error()) { ok = false; if (result) - result->settqStatus(m_destPrj, + result->setStatus(m_destPrj, i18n("Could not import project from data source \"%1\".") .tqarg(m_migrateData->source->serverInfoString())); } @@ -380,7 +380,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) if (!ok) { kdDebug() << "Failed to copy table " << tname << endl; if (result) - result->settqStatus(destConn, + result->setStatus(destConn, i18n("Could not copy table \"%1\" to destination database.").tqarg(tname)); break; } @@ -404,7 +404,7 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) // Finally: error handling if (result && result->error()) - result->settqStatus(destConn, + result->setStatus(destConn, i18n("Could not import data from data source \"%1\".") .tqarg(m_migrateData->source->serverInfoString())); if (destConn) { @@ -420,10 +420,10 @@ bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result) } //============================================================================= -bool KexiMigrate::performExport(Kexi::ObjecttqStatus* result) +bool KexiMigrate::performExport(Kexi::ObjectStatus* result) { if (result) - result->cleartqStatus(); + result->clearStatus(); //! @todo performExport @@ -588,7 +588,7 @@ bool KexiMigrate::drv_queryMaxNumber(const TQString& tableName, { TQString string; tristate r = drv_querySingleStringFromSQL( - TQString::tqfromLatin1("SELECT MAX(%1) FROM %2").tqarg(drv_escapeIdentifier(columnName)) + TQString::fromLatin1("SELECT MAX(%1) FROM %2").tqarg(drv_escapeIdentifier(columnName)) .tqarg(drv_escapeIdentifier(tableName)), 0, string); if (r == false) return false; diff --git a/kexi/migration/keximigrate.h b/kexi/migration/keximigrate.h index ee22ded8..cd2949f9 100644 --- a/kexi/migration/keximigrate.h +++ b/kexi/migration/keximigrate.h @@ -34,7 +34,7 @@ class KexiProject; namespace Kexi { - class ObjecttqStatus; + class ObjectStatus; } /*! KexiMigration implementation version. @@ -99,7 +99,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public TQObject, public KexiDB::Object \a acceptingNeeded is set to true if destination database exists. In this case you should ask about accepting database overwriting. Used in ImportWizard::import(). */ - bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjecttqStatus* result, + bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjectStatus* result, bool& acceptingNeeded); /*! Checks if the source- and the destination databases are identical. @@ -107,10 +107,10 @@ class KEXIMIGR_EXPORT KexiMigrate : public TQObject, public KexiDB::Object bool isSourceAndDestinationDataSourceTheSame() const; //! Perform an import operation - bool performImport(Kexi::ObjecttqStatus* result = 0); + bool performImport(Kexi::ObjectStatus* result = 0); //! Perform an export operation - bool performExport(Kexi::ObjecttqStatus* result = 0); + bool performExport(Kexi::ObjectStatus* result = 0); //! Returns true if the migration driver supports progress updates. inline bool progressSupported() { return drv_progressSupported(); } diff --git a/kexi/migration/migratemanager.cpp b/kexi/migration/migratemanager.cpp index 2c0ce6cd..d46b9e4d 100644 --- a/kexi/migration/migratemanager.cpp +++ b/kexi/migration/migratemanager.cpp @@ -363,7 +363,7 @@ TQString MigrateManager::possibleProblemsInfoMsg() const for (TQStringList::ConstIterator it = d_int->possibleProblems.constBegin(); it!=d_int->possibleProblems.constEnd(); ++it) { - str += (TQString::tqfromLatin1("<li>") + *it + TQString::tqfromLatin1("</li>")); + str += (TQString::fromLatin1("<li>") + *it + TQString::fromLatin1("</li>")); } str += "</ul>"; return str; diff --git a/kexi/migration/mysql/mysqlmigrate.cpp b/kexi/migration/mysql/mysqlmigrate.cpp index 1b125d8d..78671241 100644 --- a/kexi/migration/mysql/mysqlmigrate.cpp +++ b/kexi/migration/mysql/mysqlmigrate.cpp @@ -396,7 +396,7 @@ KexiDB::Field::Type MySQLMigrate::examineBlobField(const TQString& table, TQString mysqlType; KexiDB::Field::Type kexiType; TQString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) + - "` LIKE '" + TQString::tqfromLatin1(fld->name) + "'"; + "` LIKE '" + TQString::fromLatin1(fld->name) + "'"; if(d->executeSQL(query)) { MYSQL_RES *res = mysql_store_result(d->mysql); @@ -444,7 +444,7 @@ TQStringList MySQLMigrate::examineEnumField(const TQString& table, const MYSQL_FIELD* fld) { TQString vals; TQString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) + - "` LIKE '" + TQString::tqfromLatin1(fld->name) + "'"; + "` LIKE '" + TQString::fromLatin1(fld->name) + "'"; if(d->executeSQL(query)) { MYSQL_RES *res = mysql_store_result(d->mysql); diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp index d6c655f9..b7f04351 100644 --- a/kexi/migration/pqxx/pqxxmigrate.cpp +++ b/kexi/migration/pqxx/pqxxmigrate.cpp @@ -135,7 +135,7 @@ bool PqxxMigrate::drv_tableNames(TQStringList& tableNames) for (pqxx::result::const_iterator c = m_res->begin(); c != m_res->end(); ++c) { // Copy the result into the return list - tableNames << TQString::tqfromLatin1 (c[0].c_str()); + tableNames << TQString::fromLatin1 (c[0].c_str()); } return true; } @@ -217,15 +217,15 @@ bool PqxxMigrate::drv_connect() if (m_migrateData->source->port == 0) m_migrateData->source->port = 5432; - conninfo += TQString::tqfromLatin1(" port='%1'").tqarg(m_migrateData->source->port); + conninfo += TQString::fromLatin1(" port='%1'").tqarg(m_migrateData->source->port); - conninfo += TQString::tqfromLatin1(" dbname='%1'").tqarg(m_migrateData->sourceName); + conninfo += TQString::fromLatin1(" dbname='%1'").tqarg(m_migrateData->sourceName); if (!m_migrateData->source->userName.isNull()) - conninfo += TQString::tqfromLatin1(" user='%1'").tqarg(m_migrateData->source->userName); + conninfo += TQString::fromLatin1(" user='%1'").tqarg(m_migrateData->source->userName); if (!m_migrateData->source->password.isNull()) - conninfo += TQString::tqfromLatin1(" password='%1'").tqarg(m_migrateData->source->password); + conninfo += TQString::fromLatin1(" password='%1'").tqarg(m_migrateData->source->password); try { @@ -480,7 +480,7 @@ tristate PqxxMigrate::drv_queryStringListFromSQL( mysql_free_result(res); return false; } - string = TQString::tqfromLatin1(row[columnNumber], lengths[columnNumber]); + string = TQString::fromLatin1(row[columnNumber], lengths[columnNumber]); mysql_free_result(res); } else { kdDebug() << "PqxxMigrate::drv_querySingleStringFromSQL(): null result" << endl; @@ -647,7 +647,7 @@ bool PqxxMigrate::notEmpty(pqxx::oid /*table_uid*/, int /*col*/) const // Read value of column 0 into a string N c[0].to(N); // Copy the result into the return list - list << TQString::tqfromLatin1 (N.c_str()); + list << TQString::fromLatin1 (N.c_str()); KexiDBDrvDbg << N.c_str() << endl; } return true; diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp index 61585840..921432b6 100644 --- a/kexi/plugins/forms/kexiactionselectiondialog.cpp +++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp @@ -405,7 +405,7 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ setButtonOK( KGuiItem(i18n("Assign action", "&Assign"), "button_ok", i18n("Assign action")) ); TQWidget *mainWidget = new TQWidget( this ); - mainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + mainWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); setMainWidget(mainWidget); /* lbl 1 @@ -428,24 +428,24 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ // 1st column: action types d->actionCategoriesListView = new ActionCategoriesListView(mainWidget); - d->actionCategoriesListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); + d->actionCategoriesListView->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); d->glyr->addWidget(d->actionCategoriesListView, 1, 0); connect( d->actionCategoriesListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotActionCategorySelected(TQListViewItem*))); TQLabel *lbl = new TQLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); - lbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); - lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + lbl->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); d->glyr->addWidget(lbl, 0, 0, TQt::AlignTop|TQt::AlignLeft); // widget stack for 2nd and 3rd column d->secondAnd3rdColumnStack = new TQWidgetStack(mainWidget); - d->secondAnd3rdColumnStack->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->secondAnd3rdColumnStack->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, TQt::AlignTop|TQt::AlignLeft); d->secondAnd3rdColumnMainWidget = new TQWidget(d->secondAnd3rdColumnStack); - d->secondAnd3rdColumnMainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->secondAnd3rdColumnMainWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); d->secondAnd3rdColumnGrLyr = new TQGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint()); d->secondAnd3rdColumnGrLyr->setRowStretch(1, 2); d->secondAnd3rdColumnStack->addWidget(d->secondAnd3rdColumnMainWidget); @@ -457,8 +457,8 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ this, TQT_SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*))); d->selectActionToBeExecutedLbl = new TQLabel(d->secondAnd3rdColumnMainWidget); - d->selectActionToBeExecutedLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); - d->selectActionToBeExecutedLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + d->selectActionToBeExecutedLbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + d->selectActionToBeExecutedLbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); d->selectActionToBeExecutedLbl->setMinimumHeight(d->selectActionToBeExecutedLbl->fontMetrics().height()*2); d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, TQt::AlignTop|TQt::AlignLeft); @@ -469,7 +469,7 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ d->actionToExecuteListView = new ActionToExecuteListView(d->secondAnd3rdColumnMainWidget); d->actionToExecuteListView->installEventFilter(this); //to be able to disable painting d->actionToExecuteListView->viewport()->installEventFilter(this); //to be able to disable painting - d->actionToExecuteListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); + d->actionToExecuteListView->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); connect(d->actionToExecuteListView, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotActionToExecuteItemExecuted(TQListViewItem*))); connect(d->actionToExecuteListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), @@ -479,8 +479,8 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ d->actionToExecuteLbl = new TQLabel(d->actionToExecuteListView, i18n("Action to execute:"), d->secondAnd3rdColumnMainWidget); d->actionToExecuteLbl->installEventFilter(this); //to be able to disable painting - d->actionToExecuteLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); - d->actionToExecuteLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + d->actionToExecuteLbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + d->actionToExecuteLbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, TQt::AlignTop|TQt::AlignLeft); // temporary show all sections to avoid resizing the dialog in the future @@ -538,7 +538,7 @@ void KexiActionSelectionDialog::slotKActionItemExecuted(TQListViewItem*) void KexiActionSelectionDialog::slotKActionItemSelected(TQListViewItem*) { d->setActionToExecuteSectionVisible(false); - updateOKButtontqStatus(); + updateOKButtonStatus(); } void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(TQListViewItem*) @@ -549,7 +549,7 @@ void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(TQListViewItem void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(TQListViewItem*) { d->setActionToExecuteSectionVisible(false); - updateOKButtontqStatus(); + updateOKButtonStatus(); } void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::Item* item) @@ -568,7 +568,7 @@ void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(TQListViewItem* void KexiActionSelectionDialog::slotActionToExecuteItemSelected(TQListViewItem*) { - updateOKButtontqStatus(); + updateOKButtonStatus(); } void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) @@ -583,13 +583,13 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) if (!d->kactionPageWidget) { //create lbl+list view with a vtqlayout d->kactionPageWidget = new TQWidget(); - d->kactionPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->kactionPageWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); TQVBoxLayout *vlyr = new TQVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint()); d->kactionListView = new KActionsListView(d->kactionPageWidget, d->mainWin); d->kactionListView->init(); TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->kactionPageWidget); - lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); vlyr->addWidget(lbl); vlyr->addWidget(d->kactionListView); @@ -607,14 +607,14 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) if (!d->currentFormActionsPageWidget) { //create lbl+list view with a vtqlayout d->currentFormActionsPageWidget = new TQWidget(); - d->currentFormActionsPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->currentFormActionsPageWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); TQVBoxLayout *vlyr = new TQVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint()); d->currentFormActionsListView = new CurrentFormActionsListView( d->currentFormActionsPageWidget, d->mainWin); d->currentFormActionsListView->init(); TQLabel *lbl = new TQLabel(d->currentFormActionsListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->currentFormActionsPageWidget); - lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); vlyr->addWidget(lbl); vlyr->addWidget(d->currentFormActionsListView); @@ -635,7 +635,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) d->setActionToExecuteSectionVisible(false); } d->actionCategoriesListView->update(); - updateOKButtontqStatus(); + updateOKButtonStatus(); return; } // other case @@ -656,7 +656,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) d->raiseWidget( d->secondAnd3rdColumnMainWidget ); } d->actionCategoriesListView->update(); - updateOKButtontqStatus(); + updateOKButtonStatus(); } KexiMainWindow* KexiActionSelectionDialog::mainWin() const @@ -705,7 +705,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const return data; // No Action } -void KexiActionSelectionDialog::updateOKButtontqStatus() +void KexiActionSelectionDialog::updateOKButtonStatus() { TQPushButton *btn = actionButton(Ok); ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>( diff --git a/kexi/plugins/forms/kexiactionselectiondialog.h b/kexi/plugins/forms/kexiactionselectiondialog.h index a2c4066d..983ea759 100644 --- a/kexi/plugins/forms/kexiactionselectiondialog.h +++ b/kexi/plugins/forms/kexiactionselectiondialog.h @@ -63,7 +63,7 @@ class KEXIFORMUTILS_EXPORT KexiActionSelectionDialog : public KDialogBase void slotItemForOpeningOrExecutingSelected(KexiPart::Item* item); protected: - void updateOKButtontqStatus(); + void updateOKButtonStatus(); class KexiActionSelectionDialogPrivate; KexiActionSelectionDialogPrivate* d; diff --git a/kexi/plugins/forms/kexidataprovider.cpp b/kexi/plugins/forms/kexidataprovider.cpp index e89ba9cb..8ae592d9 100644 --- a/kexi/plugins/forms/kexidataprovider.cpp +++ b/kexi/plugins/forms/kexidataprovider.cpp @@ -228,7 +228,7 @@ void KexiFormDataProvider::invalidateDataSources( const TQDict<char>& invalidSou // newIndices[i]=-1; KexiFormDataItemInterface *item = m_dataItems.at( *it ); if (item) - item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") ); + item->setInvalidState( TQString::fromLatin1("#") + i18n("NAME") + TQString::fromLatin1("?") ); m_dataItems.remove(*it); kexipluginsdbg << "invalidateDataSources(): " << (*it) << " -> " << -1 << endl; // i++; @@ -253,7 +253,7 @@ void KexiFormDataProvider::invalidateDataSources( const TQDict<char>& invalidSou else { kexipluginsdbg << "invalidateDataSources(): removing " << it.key()->dataSource() << endl; m_dataItems.remove(it.key()); - it.key()->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") ); + it.key()->setInvalidState( TQString::fromLatin1("#") + i18n("NAME") + TQString::fromLatin1("?") ); } } #endif @@ -275,7 +275,7 @@ void KexiFormDataProvider::invalidateDataSources( const TQDict<char>& invalidSou for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current();) { KexiFormDataItemInterface * item = it.current(); if (invalidSources[ item->dataSource().lower() ]) { - item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") ); + item->setInvalidState( TQString::fromLatin1("#") + i18n("NAME") + TQString::fromLatin1("?") ); m_dataItems.remove(item); continue; } diff --git a/kexi/plugins/forms/kexidatasourcepage.cpp b/kexi/plugins/forms/kexidatasourcepage.cpp index e9ff4177..5b7e46db 100644 --- a/kexi/plugins/forms/kexidatasourcepage.cpp +++ b/kexi/plugins/forms/kexidatasourcepage.cpp @@ -65,9 +65,9 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) TQVBoxLayout *contentsVlyr = new TQVBoxLayout(contents); m_noDataSourceAvailableLabel = new TQLabel(m_noDataSourceAvailableSingleText, contents); - m_noDataSourceAvailableLabel->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); + m_noDataSourceAvailableLabel->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); m_noDataSourceAvailableLabel->setMargin(2); - m_noDataSourceAvailableLabel->tqsetAlignment(TQt::WordBreak | TQt::AlignBottom | TQt::AlignLeft); + m_noDataSourceAvailableLabel->setAlignment(TQt::WordBreak | TQt::AlignBottom | TQt::AlignLeft); contentsVlyr->addWidget(m_noDataSourceAvailableLabel); //-Widget's Data Source @@ -78,10 +78,10 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) #else m_widgetDSLabel = new TQLabel(i18n("Table Field or Query Field", "Widget's data source:"), contents); #endif - m_widgetDSLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + m_widgetDSLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); m_widgetDSLabel->setMargin(2); m_widgetDSLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - m_widgetDSLabel->tqsetAlignment(AlignLeft|AlignBottom); + m_widgetDSLabel->setAlignment(AlignLeft|AlignBottom); hlyr->addWidget(m_widgetDSLabel); m_clearWidgetDSButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearWidgetDSButton"); @@ -104,10 +104,10 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) //- Form's Data Source hlyr = new TQHBoxLayout(contentsVlyr); m_dataSourceLabel = new TQLabel(i18n("Form's data source:"), contents); - m_dataSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + m_dataSourceLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); m_dataSourceLabel->setMargin(2); m_dataSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - m_dataSourceLabel->tqsetAlignment(AlignLeft|AlignBottom); + m_dataSourceLabel->setAlignment(AlignLeft|AlignBottom); hlyr->addWidget(m_dataSourceLabel); m_gotoButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoButton"); @@ -160,14 +160,14 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) m_mousePointerLabel->setFixedWidth( m_mousePointerLabel->pixmap() ? m_mousePointerLabel->pixmap()->width() : 0); m_availableFieldsDescriptionLabel = new TQLabel( i18n("Select fields from the list below and drag them onto a form or click the \"Insert\" button"), contents); - m_availableFieldsDescriptionLabel->tqsetAlignment( TQt::AlignAuto | TQt::WordBreak ); + m_availableFieldsDescriptionLabel->setAlignment( TQt::AlignAuto | TQt::WordBreak ); hlyr->addWidget(m_availableFieldsDescriptionLabel); //Available Fields contentsVlyr->addSpacing(4); hlyr = new TQHBoxLayout(contentsVlyr); m_availableFieldsLabel = new TQLabel(i18n("Available fields:"), contents); - m_availableFieldsLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + m_availableFieldsLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); m_availableFieldsLabel->setMargin(2); m_availableFieldsLabel->setMinimumHeight(IconSize(KIcon::Small)); hlyr->addWidget(m_availableFieldsLabel); @@ -183,7 +183,7 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) m_fieldListView = new KexiFieldListView(contents, "fieldListView", KexiFieldListView::ShowDataTypes | KexiFieldListView::AllowMultiSelection ); - m_fieldListView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); + m_fieldListView->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); m_availableFieldsLabel->setBuddy(m_fieldListView); contentsVlyr->addWidget(m_fieldListView, 1); connect(m_fieldListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotFieldListViewSelectionChanged())); diff --git a/kexi/plugins/forms/kexidbfactory.cpp b/kexi/plugins/forms/kexidbfactory.cpp index 3f47a6ec..e882c082 100644 --- a/kexi/plugins/forms/kexidbfactory.cpp +++ b/kexi/plugins/forms/kexidbfactory.cpp @@ -398,9 +398,9 @@ KexiDBFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, /* else if(c == "KexiDBTimeEdit") w = new KexiDBTimeEdit(TQTime::currentTime(), p, n); else if(c == "KexiDBDateEdit") - w = new KexiDBDateEdit(TQDate::tqcurrentDate(), p, n); + w = new KexiDBDateEdit(TQDate::currentDate(), p, n); else if(c == "KexiDBDateTimeEdit") - w = new KexiDBDateTimeEdit(TQDateTime::tqcurrentDateTime(), p, n);*/ + w = new KexiDBDateTimeEdit(TQDateTime::currentDateTime(), p, n);*/ // else if(c == "KexiDBIntSpinBox") // w = new KexiDBIntSpinBox(p, n); // else if(c == "KexiDBDoubleSpinBox") @@ -497,7 +497,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign } if ( classname == "KexiDBLabel" ) - w->resize(w->tqsizeHint()); + w->resize(w->sizeHint()); } else { diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp index 9c4e3173..84c50efd 100644 --- a/kexi/plugins/forms/kexiformpart.cpp +++ b/kexi/plugins/forms/kexiformpart.cpp @@ -510,7 +510,7 @@ void KexiFormPart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow* void KexiFormPart::slotWidgetCreatedByFormsLibrary(TQWidget* widget) { - TQStrList signalNames(widget->tqmetaObject()->signalNames()); + TQStrList signalNames(widget->metaObject()->signalNames()); if (!signalNames.isEmpty()) { const char *handleDragMoveEventSignal = "handleDragMoveEvent(TQDragMoveEvent*)"; const char *handleDropEventSignal = "handleDropEvent(TQDropEvent*)"; diff --git a/kexi/plugins/forms/kexiformscrollview.cpp b/kexi/plugins/forms/kexiformscrollview.cpp index df5191ed..790064e2 100644 --- a/kexi/plugins/forms/kexiformscrollview.cpp +++ b/kexi/plugins/forms/kexiformscrollview.cpp @@ -551,7 +551,7 @@ void KexiFormScrollView::refreshContentsSize() void KexiFormScrollView::handleDataWidgetAction(const TQString& actionName) { - TQWidget *w = tqfocusWidget(); + TQWidget *w = focusWidget(); KexiFormDataItemInterface *item = 0; while (w) { item = dynamic_cast<KexiFormDataItemInterface*>(w); diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp index 01ec080f..3b7968de 100644 --- a/kexi/plugins/forms/kexiformview.cpp +++ b/kexi/plugins/forms/kexiformview.cpp @@ -345,8 +345,8 @@ void KexiFormView::updateValuesForSubproperties() kexipluginsdbg << "KexiFormView::loadForm(): delayed setting of the subproperty: widget=" << it.current()->widget()->name() << " prop=" << subpropIt.key() << " val=" << subpropIt.data() << endl; - const int count = subwidget->tqmetaObject()->findProperty(subpropIt.key().latin1(), true); - const TQMetaProperty *meta = count!=-1 ? subwidget->tqmetaObject()->property(count, true) : 0; + const int count = subwidget->metaObject()->findProperty(subpropIt.key().latin1(), true); + const TQMetaProperty *meta = count!=-1 ? subwidget->metaObject()->property(count, true) : 0; if (meta) { // Special case: the property value of type enum (set) but is saved as a string list, // not as int, so we need to translate it to int. It's been created as such @@ -371,7 +371,7 @@ void KexiFormView::updateValuesForSubproperties() static void setUnsavedBLOBIdsForDataViewMode( TQWidget* widget, const TQMap<TQCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName) { - if (-1 != widget->tqmetaObject()->findProperty("pixmapId")) { + if (-1 != widget->metaObject()->findProperty("pixmapId")) { const KexiBLOBBuffer::Id_t blobID = unsavedLocalBLOBsByName[ widget->name() ]; if (blobID > 0) widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)blobID); @@ -525,9 +525,9 @@ KexiFormView::afterSwitchFrom(int mode) //set focus on 1st focusable widget which has valid dataSource property set if (!m_dbform->orderedFocusWidgets()->isEmpty()) { -// TQWidget *www = tqfocusWidget(); - //if (Kexi::hasParent(this, tqApp->tqfocusWidget())) { - KexiUtils::unsetFocusWithReason(tqApp->tqfocusWidget(), TQFocusEvent::Tab); +// TQWidget *www = focusWidget(); + //if (Kexi::hasParent(this, tqApp->focusWidget())) { + KexiUtils::unsetFocusWithReason(tqApp->focusWidget(), TQFocusEvent::Tab); //} TQPtrListIterator<TQWidget> it(*m_dbform->orderedFocusWidgets()); @@ -999,14 +999,14 @@ void KexiFormView::setFocusInternal() { if (viewMode() == Kexi::DataViewMode) { - if (m_dbform->tqfocusWidget()) { + if (m_dbform->focusWidget()) { //better-looking focus if (m_setFocusInternalOnce) { KexiUtils::setFocusWithReason(m_setFocusInternalOnce, TQFocusEvent::Other);//Tab); m_setFocusInternalOnce = 0; } else { - //ok? SET_FOCUS_USING_REASON(m_dbform->tqfocusWidget(), TQFocusEvent::Other);//Tab); + //ok? SET_FOCUS_USING_REASON(m_dbform->focusWidget(), TQFocusEvent::Other);//Tab); } return; } @@ -1173,8 +1173,8 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s // newWidget->setDataSource(column->aliasOrName()); // newWidget->setFieldTypeInternal((int)column->field->type()); // newWidget->setFieldCaptionInternal(column->captionOrAliasOrName()); - //resize again because autofield's type changed what can lead to changed tqsizeHint() -// newWidget->resize(newWidget->tqsizeHint()); + //resize again because autofield's type changed what can lead to changed sizeHint() +// newWidget->resize(newWidget->sizeHint()); KFormDesigner::WidgetList list; list.append(newWidget); KFormDesigner::AdjustSizeCommand *adjustCommand diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp index 7ebc522f..939d9b91 100644 --- a/kexi/plugins/forms/widgets/kexidbautofield.cpp +++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp @@ -245,7 +245,7 @@ KexiDBAutoField::setLabelPosition(LabelPosition position) align ^= AlignVertical_Mask; align |= AlignVCenter; } - d->label->tqsetAlignment(align); + d->label->setAlignment(align); if(d->widgetType == Boolean || (d->widgetType == Auto && fieldTypeInternal() == KexiDB::Field::InvalidType && !d->designMode)) { @@ -263,20 +263,20 @@ KexiDBAutoField::setLabelPosition(LabelPosition position) if (subwidgetInterface->appendStretchRequired(this)) d->tqlayout->addStretch(0); if (subwidgetInterface->subwidgetStretchRequired(this)) { - TQSizePolicy sizePolicy( m_subwidget->tqsizePolicy() ); + TQSizePolicy sizePolicy( m_subwidget->sizePolicy() ); if(position == Left) { sizePolicy.setHorData( TQSizePolicy::Minimum ); - d->label->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + d->label->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); } else { sizePolicy.setVerData( TQSizePolicy::Minimum ); - d->label->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); + d->label->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); } - m_subwidget->tqsetSizePolicy(sizePolicy); + m_subwidget->setSizePolicy(sizePolicy); } } // if(m_subwidget) - // m_subwidget->tqsetSizePolicy(...); + // m_subwidget->setSizePolicy(...); } else { d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this); @@ -570,7 +570,7 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify) bool unbound = false; if (d->autoCaption && (d->widgetType==Auto || dataSource().isEmpty())) { if (d->designMode) - realText = TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)"); + realText = TQString::fromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)"); else realText = TQString(); unbound = true; @@ -594,9 +594,9 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify) } if (unbound) - d->label->tqsetAlignment( TQt::AlignCenter | TQt::WordBreak ); + d->label->setAlignment( TQt::AlignCenter | TQt::WordBreak ); else - d->label->tqsetAlignment( TQt::AlignCenter ); + d->label->setAlignment( TQt::AlignCenter ); // TQWidget* widgetToAlterForegroundColor; if(d->widgetType == Boolean) { static_cast<TQCheckBox*>((TQWidget*)m_subwidget)->setText(realText); @@ -650,15 +650,15 @@ KexiDBAutoField::setDataSource( const TQString &ds ) { } TQSize -KexiDBAutoField::tqsizeHint() const +KexiDBAutoField::sizeHint() const { if (d->lblPosition == NoLabel) - return m_subwidget ? m_subwidget->tqsizeHint() : TQWidget::tqsizeHint(); + return m_subwidget ? m_subwidget->sizeHint() : TQWidget::sizeHint(); TQSize s1(0,0); if (m_subwidget) - s1 = m_subwidget->tqsizeHint(); - TQSize s2(d->label->tqsizeHint()); + s1 = m_subwidget->sizeHint(); + TQSize s2(d->label->sizeHint()); if (d->lblPosition == Top) return TQSize(TQMAX(s1.width(), s2.width()), s1.height()+KexiDBAutoField_SPACING+s2.height()); @@ -682,10 +682,10 @@ KexiDBAutoField::updateInformationAboutUnboundField() if ( (d->autoCaption && (dataSource().isEmpty() || dataSourceMimeType().isEmpty())) || (!d->autoCaption && d->caption.isEmpty()) ) { - d->label->setText( TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") ); + d->label->setText( TQString::fromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") ); } // else -// d->label->setText( TQString::tqfromLatin1(name())+" "+i18n(" (unbound)") ); +// d->label->setText( TQString::fromLatin1(name())+" "+i18n(" (unbound)") ); } /*void @@ -701,7 +701,7 @@ KexiDBAutoField::paintEvent( TQPaintEvent* pe ) p.setClipRect(pe->rect()); p.setFont(d->label->font()); p.drawText(rect(), TQt::AlignLeft | TQt::WordBreak, - TQString::tqfromLatin1(name())+" "+i18n(" (unbound)")); + TQString::fromLatin1(name())+" "+i18n(" (unbound)")); } }*/ diff --git a/kexi/plugins/forms/widgets/kexidbautofield.h b/kexi/plugins/forms/widgets/kexidbautofield.h index 653e4067..809c1186 100644 --- a/kexi/plugins/forms/widgets/kexidbautofield.h +++ b/kexi/plugins/forms/widgets/kexidbautofield.h @@ -132,7 +132,7 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField : /*! @internal */ TQString fieldCaptionInternal() const; - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual void setFocusPolicy ( TQ_FocusPolicy policy ); //! Reimplemented to return internal editor's color. diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index 81c66ba6..231003cf 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -59,7 +59,7 @@ class KexiDBComboBox::Private KexiComboBoxPopup *popup; KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle (because styles use <static_cast>) - TQSize tqsizeHint; //!< A cache for KexiDBComboBox::tqsizeHint(), + TQSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(), //!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange() KexiDB::QueryColumnInfo* visibleColumnInfo; TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false) @@ -146,7 +146,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) //! @todo support reverse tqlayout //bool reverse = TQApplication::reverseLayout(); - tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg, + tqstyle().drawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg, flags, (uint)TQStyle::SC_All, (d->buttonPressed ? TQStyle::SC_ComboBoxArrow : TQStyle::SC_None ) ); @@ -159,7 +159,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) if ( hasFocus() ) { if (0==qstrcmp(tqstyle().name(), "windows")) //a hack p.fillRect( editorGeometry, cg.brush( TQColorGroup::Highlight ) ); - TQRect r( TQStyle::tqvisualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) ); + TQRect r( TQStyle::visualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) ); r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, cg, flags | TQStyle::Style_FocusAtBorder, TQStyleOption(cg.highlight())); @@ -170,7 +170,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) TQRect KexiDBComboBox::editorGeometry() const { - TQRect r( TQStyle::tqvisualRect( + TQRect r( TQStyle::visualRect( tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxEditField), d->paintedCombo ) ); @@ -211,20 +211,20 @@ void KexiDBComboBox::createEditor() void KexiDBComboBox::setLabelPosition(LabelPosition position) { if(m_subwidget) { - if (-1 != m_subwidget->tqmetaObject()->findProperty("frameShape", true)) + if (-1 != m_subwidget->metaObject()->findProperty("frameShape", true)) m_subwidget->setProperty("frameShape", TQVariant((int)TQFrame::NoFrame)); m_subwidget->setGeometry( editorGeometry() ); } // KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget); // update size policy // if (subwidgetInterface && subwidgetInterface->subwidgetStretchRequired(this)) { - TQSizePolicy sizePolicy( this->tqsizePolicy() ); + TQSizePolicy sizePolicy( this->sizePolicy() ); if(position == Left) sizePolicy.setHorData( TQSizePolicy::Minimum ); else sizePolicy.setVerData( TQSizePolicy::Minimum ); - //m_subwidget->tqsetSizePolicy(sizePolicy); - tqsetSizePolicy(sizePolicy); + //m_subwidget->setSizePolicy(sizePolicy); + setSizePolicy(sizePolicy); //} // } } @@ -233,7 +233,7 @@ TQRect KexiDBComboBox::buttonGeometry() const { TQRect arrowRect( tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxArrow) ); - arrowRect = TQStyle::tqvisualRect(arrowRect, d->paintedCombo); + arrowRect = TQStyle::visualRect(arrowRect, d->paintedCombo); arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style return arrowRect; } @@ -490,29 +490,29 @@ int KexiDBComboBox::popupWidthHint() const void KexiDBComboBox::fontChange( const TQFont & oldFont ) { - d->tqsizeHint = TQSize(); //force rebuild the cache + d->sizeHint = TQSize(); //force rebuild the cache KexiDBAutoField::fontChange(oldFont); } void KexiDBComboBox::styleChange( TQStyle& oldStyle ) { KexiDBAutoField::styleChange( oldStyle ); - d->tqsizeHint = TQSize(); //force rebuild the cache + d->sizeHint = TQSize(); //force rebuild the cache if (m_subwidget) m_subwidget->setGeometry( editorGeometry() ); } -TQSize KexiDBComboBox::tqsizeHint() const +TQSize KexiDBComboBox::sizeHint() const { - if ( isVisible() && d->tqsizeHint.isValid() ) - return d->tqsizeHint; + if ( isVisible() && d->sizeHint.isValid() ) + return d->sizeHint; const int maxWidth = 7 * fontMetrics().width(TQChar('x')) + 18; const int maxHeight = TQMAX( fontMetrics().lineSpacing(), 14 ) + 2; - d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo, + d->sizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo, TQSize(maxWidth, maxHeight)).expandedTo(TQApplication::globalStrut())); - return d->tqsizeHint; + return d->sizeHint; } void KexiDBComboBox::editRequested() diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.h b/kexi/plugins/forms/widgets/kexidbcombobox.h index 4e780aa3..dec6da1d 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.h +++ b/kexi/plugins/forms/widgets/kexidbcombobox.h @@ -68,7 +68,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox : //! Reimpemented because to avoid taking value from the internal editor (index is taken from the popup instead) virtual bool valueChanged(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; //! Reimplemented after KexiDBAutoField: jsut sets \a cinfo without initializing a subwidget. //! Initialization is performed by \ref setVisibleColumnInfo(). diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.cpp b/kexi/plugins/forms/widgets/kexidbdateedit.cpp index 8394ef58..3058f02c 100644 --- a/kexi/plugins/forms/widgets/kexidbdateedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbdateedit.cpp @@ -37,7 +37,7 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char m_edit = new TQDateEdit(date, this); m_edit->setAutoAdvance(true); - m_edit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); + m_edit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged(const TQDate&)) ); connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateChanged(const TQDate&)) ); @@ -54,7 +54,7 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char m_datePickerPopupMenu = new KPopupMenu(0, "date_popup"); connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker())); - m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0); + m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::currentDate(), 0); KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable"); if (dt) diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp index ea9dede7..629a4bca 100644 --- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp @@ -36,7 +36,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par m_dateEdit = new TQDateEdit(datetime.date(), this); m_dateEdit->setAutoAdvance(true); - m_dateEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); + m_dateEdit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); // m_dateEdit->setFixedWidth( TQFontMetrics(m_dateEdit->font()).width("8888-88-88___") ); connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged())); connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateTimeChanged())); @@ -48,7 +48,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par m_timeEdit = new TQTimeEdit(datetime.time(), this);; m_timeEdit->setAutoAdvance(true); - m_timeEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); + m_timeEdit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged())); connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SIGNAL(dateTimeChanged())); @@ -61,7 +61,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par m_datePickerPopupMenu = new KPopupMenu(0, "date_popup"); connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker())); - m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0); + m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::currentDate(), 0); KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable"); if (dt) diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index 88ddf93f..bcf28a58 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -268,7 +268,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi } TQSize -KexiDBForm::tqsizeHint() const +KexiDBForm::sizeHint() const { //todo: find better size (user configured?) return TQSize(400,300); @@ -304,7 +304,7 @@ TQPtrList<TQWidget>* KexiDBForm::orderedDataAwareWidgets() const void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) { TQWidget *fromWidget = 0; - //TQWidget *tqtopLevelWidget = form->widget()->tqtopLevelWidget(); + //TQWidget *topLevelWidget = form->widget()->topLevelWidget(); //js form->updateTabStopsOrder(); //certain widgets can have now updated focusPolicy properties, fix this uint numberOfDataAwareWidgets = 0; // if (d->orderedFocusWidgets.isEmpty()) { @@ -361,7 +361,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) } fromWidget = it.current(); } -// SET_FOCUS_USING_REASON(tqfocusWidget(), TQFocusEvent::Tab); +// SET_FOCUS_USING_REASON(focusWidget(), TQFocusEvent::Tab); }*/ } @@ -399,7 +399,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) bool tab = ke->state() == Qt::NoButton && key == TQt::Key_Tab; bool backtab = ((ke->state() == Qt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab) || (ke->state() == TQt::ShiftButton && key == TQt::Key_Tab); - TQObject *o = watched; //tqfocusWidget(); + TQObject *o = watched; //focusWidget(); TQWidget* realWidget = dynamic_cast<TQWidget*>(o); //will beused below (for tab/backtab handling) if (!tab && !backtab) { diff --git a/kexi/plugins/forms/widgets/kexidbform.h b/kexi/plugins/forms/widgets/kexidbform.h index fc0d25c2..29798947 100644 --- a/kexi/plugins/forms/widgets/kexidbform.h +++ b/kexi/plugins/forms/widgets/kexidbform.h @@ -69,7 +69,7 @@ class KEXIFORMUTILS_EXPORT KexiDBForm : virtual void clearForm(); virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; bool autoTabStops() const; diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp index 4165c000..3ff18406 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp +++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp @@ -80,7 +80,7 @@ KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *parent, const char *n , m_insideSetPalette(false) { installEventFilter(this); - tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred); + setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred); //setup popup menu m_popupMenu = new KexiImageContextMenu(this); @@ -522,17 +522,17 @@ void KexiDBImageBox::slotToggled(bool on) TQRect screen = tqApp->desktop()->availableGeometry( m_chooser ); TQPoint p; if ( TQApplication::reverseLayout() ) { - if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() ) + if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() ) p = m_chooser->mapToGlobal( m_chooser->rect().bottomRight() ); else - p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) ); - p.rx() -= m_popupMenu->tqsizeHint().width(); + p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->sizeHint().height() ) ); + p.rx() -= m_popupMenu->sizeHint().width(); } else { - if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() ) + if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() ) p = m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ); else - p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) ); + p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->sizeHint().height() ) ); } if (!m_popupMenu->isVisible() && on) { m_popupMenu->exec( p, -1 ); @@ -614,7 +614,7 @@ void KexiDBImageBox::setDataSource( const TQString &ds ) } } -TQSize KexiDBImageBox::tqsizeHint() const +TQSize KexiDBImageBox::sizeHint() const { if (pixmap().isNull()) return TQSize(80, 80); @@ -665,7 +665,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) p2.setPen( KexiUtils::contrastColor( bg ) ); p2.drawText(pm.rect(), TQt::AlignCenter, dataSource().isEmpty() - ? TQString::tqfromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image") + ? TQString::fromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image") : dataSource()); p2.end(); bitBlt(this, m, m, &pm); @@ -715,7 +715,7 @@ void KexiDBImageBox::updatePixmap() } } -void KexiDBImageBox::tqsetAlignment(int tqalignment) +void KexiDBImageBox::setAlignment(int tqalignment) { m_tqalignment = tqalignment; if (!m_scaledContents || m_keepAspectRatio) @@ -737,7 +737,7 @@ void KexiDBImageBox::resizeEvent( TQResizeEvent * e ) { KexiFrame::resizeEvent(e); if (m_chooser) { - TQSize s( m_chooser->tqsizeHint() ); + TQSize s( m_chooser->sizeHint() ); TQSize margin( realLineWidth(), realLineWidth() ); s.setHeight( height() - 2*margin.height() ); s = s.boundedTo( size()-2*margin ); diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h index 32b4e9b1..a7adb3c8 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.h +++ b/kexi/plugins/forms/widgets/kexidbimagebox.h @@ -48,7 +48,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true ) TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents ) TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio ) - TQ_PROPERTY( int tqalignment READ tqalignment WRITE tqsetAlignment ) + TQ_PROPERTY( int tqalignment READ tqalignment WRITE setAlignment ) // TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false ) // TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy ) TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible ) @@ -99,7 +99,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : bool keepAspectRatio() const { return m_keepAspectRatio; } - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; KexiImageContextMenu *contextMenu() const; @@ -158,7 +158,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : void setScaledContents(bool set); - void tqsetAlignment(int tqalignment); + void setAlignment(int tqalignment); void setKeepAspectRatio(bool set); diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp index 2d09429e..2f653f00 100644 --- a/kexi/plugins/forms/widgets/kexidblabel.cpp +++ b/kexi/plugins/forms/widgets/kexidblabel.cpp @@ -66,7 +66,7 @@ KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent ) int a = tqalignment() | TQt::WordBreak; a &= (0xffffff ^ TQt::AlignVertical_Mask); a |= TQt::AlignTop; - tqsetAlignment( a ); + setAlignment( a ); updateFrame(); } @@ -132,7 +132,7 @@ TQImage KexiDBInternalLabel::makeShadow( const TQImage& textImage, double realOpacity = SHADOW_OPACITY + TQMIN(50.0/double(256.0-tqGray(bgColor.rgb())), 50.0); //int _h, _s, _v; //.getHsv( &_h, &_s, &_v ); - if (tqcolorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white + if (colorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white realOpacity += 50.0; result.fill( (int)realOpacity ); result.setAlphaBuffer( true ); @@ -177,7 +177,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() { /*! * Backup the default color used to draw text. */ - const TQColor textColor = tqcolorGroup().foreground(); + const TQColor textColor = colorGroup().foreground(); /*! * Temporary storage for the generated shadow @@ -232,7 +232,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() { TQMIN( m_shadowRect.y() + ( m_shadowRect.height() * 3 / 2 ), shadowImage.height() ) ) ); shadowImage = makeShadow( shadowImage, - tqGray( tqcolorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black, + tqGray( colorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black, m_shadowRect ); if (shadowImage.isNull()) return KPixmap(); @@ -426,7 +426,7 @@ void KexiDBLabel::init() d->internalLabel->hide(); d->frameColor = tqpalette().active().foreground(); - tqsetAlignment( d->internalLabel->tqalignment() ); + setAlignment( d->internalLabel->tqalignment() ); } void KexiDBLabel::updatePixmapLater() { @@ -453,7 +453,7 @@ void KexiDBLabel::updatePixmap() { d->internalLabel->setText( text() ); d->internalLabel->setFixedSize( size() ); d->internalLabel->setPalette( palette() ); - d->internalLabel->tqsetAlignment( tqalignment() ); + d->internalLabel->setAlignment( tqalignment() ); // d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap KPixmap shadowPixmap = d->internalLabel->getShadowPixmap(); if (shadowPixmap.isNull()) diff --git a/kexi/plugins/forms/widgets/kexidbsubform.cpp b/kexi/plugins/forms/widgets/kexidbsubform.cpp index 9c24df4a..8b4149a9 100644 --- a/kexi/plugins/forms/widgets/kexidbsubform.cpp +++ b/kexi/plugins/forms/widgets/kexidbsubform.cpp @@ -33,7 +33,7 @@ KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *parentForm, TQWidget *parent, : TQScrollView(parent, name), m_parentForm(parentForm), m_form(0), m_widget(0) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); + viewport()->setPaletteBackgroundColor(colorGroup().mid()); } /* void diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp index 331909ee..7adfbaa8 100644 --- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp +++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp @@ -26,7 +26,7 @@ void ClassName::drawFrame( TQPainter *p ) if ( frameShadow() == Plain ) qDrawPlainRect( p, frameRect(), d->frameColor, lineWidth() ); else - qDrawShadeRect( p, frameRect(), tqcolorGroup(), frameShadow() == TQFrame::Sunken, + qDrawShadeRect( p, frameRect(), colorGroup(), frameShadow() == TQFrame::Sunken, lineWidth(), midLineWidth() ); } else { @@ -98,7 +98,7 @@ void TQFrame::drawFrame( TQPainter *p ) p->setPen( black ); // #### p->drawRect( r ); //### a bit too simple #else - const TQColorGroup & g = tqcolorGroup(); + const TQColorGroup & g = colorGroup(); #ifndef TQT_NO_STYLE TQStyleOption opt(lineWidth(),midLineWidth()); @@ -162,24 +162,24 @@ void TQFrame::drawFrame( TQPainter *p ) case PopupPanel: #ifndef TQT_NO_STYLE { - int vextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this), - hextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this); + int vextra = style().pixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this), + hextra = style().pixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this); if(vextra > 0 || hextra > 0) { TQRect fr = frameRect(); int fw = frameWidth(); if(vextra > 0) { - style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, TQRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra), g, flags, opt); - style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, TQRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra), g, flags, opt); } if(hextra > 0) { - style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, TQRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), g, flags, opt); - style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, TQRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), g, flags, opt); } diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp index 6e985901..e89f6a65 100644 --- a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp +++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp @@ -137,12 +137,12 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options, m_exportOptionsPage); connect(m_showOptionsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowOptionsButtonClicked())); exportOptionsLyr->addMultiCellWidget(m_showOptionsButton, 2, 2, 0, 0); - m_showOptionsButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_showOptionsButton->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); // -<options section> m_exportOptionsSection = new TQGroupBox(1,Qt::Vertical, i18n("Options"), m_exportOptionsPage, "m_exportOptionsSection"); - m_exportOptionsSection->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_exportOptionsSection->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); exportOptionsLyr->addMultiCellWidget(m_exportOptionsSection, 3, 3, 0, 1); TQWidget *exportOptionsSectionWidget = new TQWidget(m_exportOptionsSection, "exportOptionsSectionWidget"); @@ -170,7 +170,7 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options, // - character encoding m_characterEncodingCombo = new KexiCharacterEncodingComboBox( exportOptionsSectionWidget ); - m_characterEncodingCombo->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_characterEncodingCombo->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); exportOptionsSectionLyr->addWidget( m_characterEncodingCombo, 2, 1 ); TQLabel *characterEncodingLabel = new TQLabel(m_characterEncodingCombo, i18n("Text encoding:"), exportOptionsSectionWidget); @@ -222,8 +222,8 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options, updateGeometry(); // -keep widths equal on page #2: - int width = TQMAX( m_infoLblFrom->leftLabel()->tqsizeHint().width(), - m_infoLblTo->leftLabel()->tqsizeHint().width()); + int width = TQMAX( m_infoLblFrom->leftLabel()->sizeHint().width(), + m_infoLblTo->leftLabel()->sizeHint().width()); m_infoLblFrom->leftLabel()->setFixedWidth(width); m_infoLblTo->leftLabel()->setFixedWidth(width); } @@ -376,7 +376,7 @@ void KexiCSVExportWizard::slotDefaultsButtonClicked() static TQString convertKey(const char *key, KexiCSVExport::Mode mode) { - TQString _key(TQString::tqfromLatin1(key)); + TQString _key(TQString::fromLatin1(key)); if (mode == KexiCSVExport::Clipboard) { _key.replace("Exporting", "Copying"); _key.replace("Export", "Copy"); diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp index 18398d39..5dd04ed9 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp @@ -192,7 +192,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, setIcon(DesktopIcon(_IMPORT_ICON)); setSizeGripEnabled( TRUE ); -// m_encoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); +// m_encoding = TQString::fromLatin1(KGlobal::locale()->encoding()); // m_stripWhiteSpaceInTextValuesChecked = true; m_file = 0; m_inputStream = 0; @@ -216,7 +216,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, glyr->addMultiCellWidget( m_delimiterWidget, 1, 2, 0, 0 ); TQLabel *delimiterLabel = new TQLabel(m_delimiterWidget, i18n("Delimiter:"), page); - delimiterLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom); + delimiterLabel->setAlignment(TQt::AlignAuto | TQt::AlignBottom); glyr->addMultiCellWidget( delimiterLabel, 0, 0, 0, 0 ); // Format: number, text, currency, @@ -230,7 +230,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, glyr->addMultiCellWidget( m_formatCombo, 1, 1, 1, 1 ); m_formatLabel = new TQLabel(m_formatCombo, "", page); - m_formatLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom); + m_formatLabel->setAlignment(TQt::AlignAuto | TQt::AlignBottom); glyr->addWidget( m_formatLabel, 0, 1 ); m_primaryKeyField = new TQCheckBox( i18n( "Primary key" ), page, "m_primaryKeyField" ); @@ -241,20 +241,20 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, glyr->addWidget( m_comboQuote, 1, 2 ); TextLabel2 = new TQLabel( m_comboQuote, i18n( "Text quote:" ), page, "TextLabel2" ); - TextLabel2->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred ); - TextLabel2->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom); + TextLabel2->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred ); + TextLabel2->setAlignment(TQt::AlignAuto | TQt::AlignBottom); glyr->addWidget( TextLabel2, 0, 2 ); m_startAtLineSpinBox = new KIntSpinBox( page, "m_startAtLineSpinBox" ); m_startAtLineSpinBox->setMinValue(1); - m_startAtLineSpinBox->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + m_startAtLineSpinBox->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); m_startAtLineSpinBox->setMinimumWidth(TQFontMetrics(m_startAtLineSpinBox->font()).width("8888888")); glyr->addWidget( m_startAtLineSpinBox, 1, 3 ); m_startAtLineLabel = new TQLabel( m_startAtLineSpinBox, "", page, "TextLabel3" ); - m_startAtLineLabel->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred ); - m_startAtLineLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom); + m_startAtLineLabel->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred ); + m_startAtLineLabel->setAlignment(TQt::AlignAuto | TQt::AlignBottom); glyr->addWidget( m_startAtLineLabel, 0, 3 ); TQSpacerItem* spacer_2 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Preferred ); @@ -271,7 +271,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, m_table = new KexiCSVImportDialogTable( plainPage(), "m_table" ); lyr->addWidget( m_table ); - m_table->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, 1, 1) ); + m_table->setSizePolicy( TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, 1, 1) ); m_table->setNumRows( 0 ); m_table->setNumCols( 0 ); @@ -294,7 +294,7 @@ if ( m_mode == Clipboard ) m_cancelled = true; return; } - m_fileArray = TQByteArray(mime->tqencodedData( "text/plain" ) ); + m_fileArray = TQByteArray(mime->encodedData( "text/plain" ) ); } else if ( mode == File ) {*/ diff --git a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp index ed1a5b30..49b72323 100644 --- a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp +++ b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp @@ -37,7 +37,7 @@ KexiCSVImportOptions::KexiCSVImportOptions() kapp->config()->setGroup("ImportExport"); encoding = kapp->config()->readEntry("DefaultEncodingForImportingCSVFiles"); if (encoding.isEmpty()) { - encoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); + encoding = TQString::fromLatin1(KGlobal::locale()->encoding()); defaultEncodingExplicitySet = false; } else diff --git a/kexi/plugins/importexport/csv/kexicsvwidgets.cpp b/kexi/plugins/importexport/csv/kexicsvwidgets.cpp index 48d907b9..aaa96908 100644 --- a/kexi/plugins/importexport/csv/kexicsvwidgets.cpp +++ b/kexi/plugins/importexport/csv/kexicsvwidgets.cpp @@ -57,7 +57,7 @@ KexiCSVDelimiterWidget::KexiCSVDelimiterWidget( bool lineEditOnBottom, TQWidget setFocusProxy(m_combo); m_delimiterEdit = new KLineEdit( this, "m_delimiterEdit" ); -// m_delimiterEdit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) ); +// m_delimiterEdit->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) ); m_delimiterEdit->setMaximumSize( TQSize( 30, 32767 ) ); m_delimiterEdit->setMaxLength(1); lyr->addWidget( m_delimiterEdit ); @@ -162,19 +162,19 @@ KexiCSVInfoLabel::KexiCSVInfoLabel( const TQString& labelText, TQWidget* parent vbox->addLayout(hbox); m_leftLabel = new TQLabel(labelText, this); m_leftLabel->setMinimumWidth(130); - m_leftLabel->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); - m_leftLabel->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak); + m_leftLabel->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + m_leftLabel->setAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak); hbox->addWidget(m_leftLabel); m_iconLbl = new TQLabel(this); - m_iconLbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); - m_iconLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft); + m_iconLbl->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + m_iconLbl->setAlignment(TQt::AlignVCenter | TQt::AlignLeft); m_fnameLbl = new KActiveLabel(this); m_fnameLbl->setFocusPolicy(TQ_NoFocus); m_fnameLbl->setTextFormat(TQt::PlainText); - m_fnameLbl->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding,1,0)); + m_fnameLbl->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding,1,0)); m_fnameLbl->setLineWidth(1); m_fnameLbl->setFrameStyle(TQFrame::Box); - m_fnameLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak); + m_fnameLbl->setAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak); hbox->addSpacing(5); hbox->addWidget(m_iconLbl); hbox->addWidget(m_fnameLbl, 1, TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak); @@ -182,10 +182,10 @@ KexiCSVInfoLabel::KexiCSVInfoLabel( const TQString& labelText, TQWidget* parent m_commentLbl = new KActiveLabel(this); m_commentLbl->setFocusPolicy(TQ_NoFocus); m_commentLbl->setTextFormat(TQt::PlainText); - m_commentLbl->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); + m_commentLbl->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); m_commentLbl->setLineWidth(1); m_commentLbl->setFrameStyle(TQFrame::Box); - m_commentLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak); + m_commentLbl->setAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak); hbox->addWidget(m_commentLbl, 0, TQt::AlignVCenter | TQt::AlignRight | TQt::WordBreak); m_separator = new TQFrame(this); diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui index d44b8aee..72c45001 100644 --- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui +++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui @@ -53,7 +53,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>48</width> <height>48</height> diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp index e67794be..d5e576f9 100644 --- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp +++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp @@ -351,7 +351,7 @@ class EditListBoxItem : public ListBoxItem m_widget->reparent(listBox(), 0, TQPoint(1,1)); //tqlayout->addWidget(m_widget, 1); m_widget->setMinimumHeight(5); - m_widget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_widget->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } private: @@ -520,7 +520,7 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, d->listbox = new ListBox(d->combobox, d->macroproperty); d->combobox->setEditable(true); d->combobox->setListBox(d->listbox); - d->combobox->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + d->combobox->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); d->combobox->setMinimumHeight(5); d->combobox->setInsertionPolicy(TQComboBox::NoInsertion); d->combobox->setMinimumSize(10, 0); // to allow the combo to be resized to a small size diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp index e9e56b44..0916fe37 100644 --- a/kexi/plugins/macros/lib/metaobject.cpp +++ b/kexi/plugins/macros/lib/metaobject.cpp @@ -77,18 +77,18 @@ TQObject* const MetaObject::object() const /* TQStrList MetaObject::signalNames() const { - return object()->tqmetaObject()->signalNames(); + return object()->metaObject()->signalNames(); } TQStrList MetaObject::slotNames() const { - return object()->tqmetaObject()->slotNames(); + return object()->metaObject()->slotNames(); } */ int MetaObject::indexOfSignal(const char* signal) const { - TQMetaObject* metaobject = object()->tqmetaObject(); + TQMetaObject* metaobject = object()->metaObject(); int signalid = metaobject->findSignal(signal, false); if(signalid < 0) { throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal)); @@ -98,7 +98,7 @@ int MetaObject::indexOfSignal(const char* signal) const int MetaObject::indexOfSlot(const char* slot) const { - TQMetaObject* metaobject = object()->tqmetaObject(); + TQMetaObject* metaobject = object()->metaObject(); int slotid = metaobject->findSlot(slot, false); if(slotid < 0) { throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot)); @@ -110,7 +110,7 @@ KSharedPtr<MetaMethod> MetaObject::method(int index) { TQObject* obj = object(); MetaMethod::Type type = MetaMethod::Slot; - TQMetaObject* metaobject = obj->tqmetaObject(); + TQMetaObject* metaobject = obj->metaObject(); const TQMetaData* metadata = metaobject->slot(index, true); if(! metadata) { diff --git a/kexi/plugins/queries/kexiaddparamwidget.ui b/kexi/plugins/queries/kexiaddparamwidget.ui index a1f28a79..ed1864f6 100644 --- a/kexi/plugins/queries/kexiaddparamwidget.ui +++ b/kexi/plugins/queries/kexiaddparamwidget.ui @@ -73,7 +73,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>20</height> diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp index e215ab90..c6708e7f 100644 --- a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp +++ b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp @@ -193,8 +193,8 @@ KexiQueryDesignerGuiEditor::KexiQueryDesignerGuiEditor( addChildView(d->relations); addChildView(d->dataTable); setViewWidget(d->dataTable, true); - d->relations->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); - d->head->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); + d->relations->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); + d->head->setSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding); updateGeometry(); d->spl->setSizes(TQValueList<int>()<< 800<<400); } @@ -624,7 +624,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode) if (!m_dialog->neverSaved()) { if (!loadLayout()) { //err msg - parentDialog()->settqStatus(conn, + parentDialog()->setStatus(conn, i18n("Query definition loading failed."), i18n("Query design may be corrupted so it could not be opened even in text view.\n" "You can delete the query and create it again.")); @@ -639,7 +639,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode) KexiDB::ResultInfo result; showFieldsForQuery( q, result ); if (!result.success) { - parentDialog()->settqStatus(&result, i18n("Query definition loading failed.")); + parentDialog()->setStatus(&result, i18n("Query definition loading failed.")); tempData()->proposeOpeningInTextViewModeBecauseOfProblems = true; return false; } @@ -662,7 +662,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode) KexiDB::ResultInfo result; showFieldsAndRelationsForQuery( tempData()->query(), result ); if (!result.success) { - parentDialog()->settqStatus(&result, i18n("Query definition loading failed.")); + parentDialog()->setStatus(&result, i18n("Query definition loading failed.")); return false; } } @@ -1083,7 +1083,7 @@ bool KexiQueryDesignerGuiEditor::loadLayout() KexiDB::ResultInfo result; showRelationsForQuery( q, result ); if (!result.success) { - parentDialog()->settqStatus(&result, i18n("Query definition loading failed.")); + parentDialog()->setStatus(&result, i18n("Query definition loading failed.")); return false; } } @@ -1177,10 +1177,10 @@ bool KexiQueryDesignerGuiEditor::storeLayout() return true; } -TQSize KexiQueryDesignerGuiEditor::tqsizeHint() const +TQSize KexiQueryDesignerGuiEditor::sizeHint() const { - TQSize s1 = d->relations->tqsizeHint(); - TQSize s2 = d->head->tqsizeHint(); + TQSize s1 = d->relations->sizeHint(); + TQSize s2 = d->head->sizeHint(); return TQSize(TQMAX(s1.width(),s2.width()), s1.height()+s2.height()); } diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.h b/kexi/plugins/queries/kexiquerydesignerguieditor.h index c97c140d..d96fd987 100644 --- a/kexi/plugins/queries/kexiquerydesignerguieditor.h +++ b/kexi/plugins/queries/kexiquerydesignerguieditor.h @@ -69,7 +69,7 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase KexiRelationWidget *relationView() const; - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: virtual void setFocus(); diff --git a/kexi/plugins/queries/kexiquerydesignersql.cpp b/kexi/plugins/queries/kexiquerydesignersql.cpp index 37fab0e6..43353b84 100644 --- a/kexi/plugins/queries/kexiquerydesignersql.cpp +++ b/kexi/plugins/queries/kexiquerydesignersql.cpp @@ -73,7 +73,7 @@ class KexiQueryDesignerSQLView::Private } KexiQueryDesignerSQLEditor *editor; KexiQueryDesignerSQLHistory *history; - TQLabel *pixmaptqStatus, *lbltqStatus; + TQLabel *pixmapStatus, *lblStatus; TQHBox *status_hbox; TQVBox *history_section; KexiSectionHeader *head, *historyHead; @@ -120,18 +120,18 @@ KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWi d->status_hbox->installEventFilter(this); d->splitter->setResizeMode(d->history_section, TQSplitter::KeepSize); d->status_hbox->setSpacing(0); - d->pixmaptqStatus = new TQLabel(d->status_hbox); - d->pixmaptqStatus->setFixedWidth(d->statusPixmapOk.width()*3/2); - d->pixmaptqStatus->tqsetAlignment(AlignHCenter | AlignTop); - d->pixmaptqStatus->setMargin(d->statusPixmapOk.width()/4); - d->pixmaptqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) ); - - d->lbltqStatus = new TQLabel(d->status_hbox); - d->lbltqStatus->tqsetAlignment(AlignLeft | AlignTop | WordBreak); - d->lbltqStatus->setMargin(d->statusPixmapOk.width()/4); - d->lbltqStatus->tqsetSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding ); - d->lbltqStatus->resize(d->lbltqStatus->width(),d->statusPixmapOk.width()*3); - d->lbltqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) ); + d->pixmapStatus = new TQLabel(d->status_hbox); + d->pixmapStatus->setFixedWidth(d->statusPixmapOk.width()*3/2); + d->pixmapStatus->setAlignment(AlignHCenter | AlignTop); + d->pixmapStatus->setMargin(d->statusPixmapOk.width()/4); + d->pixmapStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) ); + + d->lblStatus = new TQLabel(d->status_hbox); + d->lblStatus->setAlignment(AlignLeft | AlignTop | WordBreak); + d->lblStatus->setMargin(d->statusPixmapOk.width()/4); + d->lblStatus->setSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding ); + d->lblStatus->resize(d->lblStatus->width(),d->statusPixmapOk.width()*3); + d->lblStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) ); TQHBoxLayout *b = new TQHBoxLayout(this); b->addWidget(d->splitter); @@ -171,36 +171,36 @@ KexiQueryDesignerSQLEditor *KexiQueryDesignerSQLView::editor() const void KexiQueryDesignerSQLView::setStatusOk() { - d->pixmaptqStatus->setPixmap(d->statusPixmapOk); + d->pixmapStatus->setPixmap(d->statusPixmapOk); setStatusText("<h2>"+i18n("The query is correct")+"</h2>"); d->history->addEvent(d->editor->text().stripWhiteSpace(), true, TQString()); } void KexiQueryDesignerSQLView::setStatusError(const TQString& msg) { - d->pixmaptqStatus->setPixmap(d->statusPixmapErr); + d->pixmapStatus->setPixmap(d->statusPixmapErr); setStatusText("<h2>"+i18n("The query is incorrect")+"</h2><p>"+msg+"</p>"); d->history->addEvent(d->editor->text().stripWhiteSpace(), false, msg); } void KexiQueryDesignerSQLView::setStatusEmpty() { - d->pixmaptqStatus->setPixmap(d->statusPixmapInfo); + d->pixmapStatus->setPixmap(d->statusPixmapInfo); setStatusText(i18n("Please enter your query and execute \"Check query\" function to verify it.")); } void KexiQueryDesignerSQLView::setStatusText(const TQString& text) { if (!d->action_toggle_history->isChecked()) { - TQSimpleRichText rt(text, d->lbltqStatus->font()); - rt.setWidth(d->lbltqStatus->width()); + TQSimpleRichText rt(text, d->lblStatus->font()); + rt.setWidth(d->lblStatus->width()); TQValueList<int> sz = d->splitter->sizes(); - const int newHeight = rt.height()+d->lbltqStatus->margin()*2; + const int newHeight = rt.height()+d->lblStatus->margin()*2; if (sz[1]<newHeight) { sz[1] = newHeight; d->splitter->setSizes(sz); } - d->lbltqStatus->setText(text); + d->lblStatus->setText(text); } } diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp index 7cc62620..503b432a 100644 --- a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp +++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp @@ -61,7 +61,7 @@ KexiQueryDesignerSQLHistory::drawContents(TQPainter *p, int cx, int cy, int cw, { p->saveWorldMatrix(); p->translate(0, y); - it->drawItem(p, visibleWidth(), tqcolorGroup()); + it->drawItem(p, visibleWidth(), colorGroup()); p->restoreWorldMatrix(); } y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5; @@ -79,7 +79,7 @@ KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e) if(it.current()->isSelected()) { //clear - it.current()->setSelected(false, tqcolorGroup()); + it.current()->setSelected(false, colorGroup()); updateContents(it.current()->tqgeometry(y, visibleWidth(), fontMetrics())); } @@ -94,11 +94,11 @@ KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e) //now do update if (popupHistory) { if (m_selected && m_selected != popupHistory) { - m_selected->setSelected(false, tqcolorGroup()); + m_selected->setSelected(false, colorGroup()); updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics())); } m_selected = popupHistory; - m_selected->setSelected(true, tqcolorGroup()); + m_selected->setSelected(true, colorGroup()); updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics())); if(e->button() == Qt::RightButton) { m_popup->exec(e->globalPos()); @@ -142,18 +142,18 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e) resizeContents(visibleWidth() - 1, y); if (m_selected) { - m_selected->setSelected(false, tqcolorGroup()); + m_selected->setSelected(false, colorGroup()); } m_selected = e; - m_selected->setSelected(true, tqcolorGroup()); + m_selected->setSelected(true, colorGroup()); ensureVisible(0,y+5); updateContents(); /* ensureVisible(0, 0); if (m_selected) { - m_selected->setSelected(false, tqcolorGroup()); + m_selected->setSelected(false, colorGroup()); } m_selected = e; - m_selected->setSelected(true, tqcolorGroup()); + m_selected->setSelected(true, colorGroup()); // updateContents(); updateContents(m_selected->tqgeometry(0, visibleWidth(), fontMetrics()));*/ } diff --git a/kexi/plugins/queries/kexiqueryview.cpp b/kexi/plugins/queries/kexiqueryview.cpp index c57224ea..1b3c16d7 100644 --- a/kexi/plugins/queries/kexiqueryview.cpp +++ b/kexi/plugins/queries/kexiqueryview.cpp @@ -83,7 +83,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query) } d->cursor = mainWin()->project()->dbConnection()->executeQuery(*query, params); if (!d->cursor) { - parentDialog()->settqStatus(parentDialog()->mainWin()->project()->dbConnection(), + parentDialog()->setStatus(parentDialog()->mainWin()->project()->dbConnection(), i18n("Query executing failed.")); //todo: also provide server result and sql statement return false; diff --git a/kexi/plugins/relations/kexirelationmaindlg.cpp b/kexi/plugins/relations/kexirelationmaindlg.cpp index 6c5fae1d..affc1214 100644 --- a/kexi/plugins/relations/kexirelationmaindlg.cpp +++ b/kexi/plugins/relations/kexirelationmaindlg.cpp @@ -61,7 +61,7 @@ KexiRelationMainDlg::~KexiRelationMainDlg() { } -TQSize KexiRelationMainDlg::tqsizeHint() const +TQSize KexiRelationMainDlg::sizeHint() const { return TQSize(600,300); } diff --git a/kexi/plugins/relations/kexirelationmaindlg.h b/kexi/plugins/relations/kexirelationmaindlg.h index a2f8ca57..69f43242 100644 --- a/kexi/plugins/relations/kexirelationmaindlg.h +++ b/kexi/plugins/relations/kexirelationmaindlg.h @@ -34,7 +34,7 @@ class KexiRelationMainDlg : public KexiViewBase KexiRelationMainDlg(KexiMainWindow *mainWin, TQWidget *parent, const char *name = 0); ~KexiRelationMainDlg(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual TQWidget* mainWidget(); diff --git a/kexi/plugins/reports/kexireportfactory.cpp b/kexi/plugins/reports/kexireportfactory.cpp index f45b30bf..dfa8d0d0 100644 --- a/kexi/plugins/reports/kexireportfactory.cpp +++ b/kexi/plugins/reports/kexireportfactory.cpp @@ -180,7 +180,7 @@ KexiReportFactory::changeText(const TQString &text) TQWidget *w = WidgetFactory::m_widget; changeProperty("text", text, m_container); - int width = w->tqsizeHint().width(); + int width = w->sizeHint().width(); if(w->width() < width) w->resize(width, w->height() ); @@ -212,7 +212,7 @@ KexiReportFactory::editText() } if(classname == "Label") - m_widget->resize(m_widget->tqsizeHint()); + m_widget->resize(m_widget->sizeHint()); } bool diff --git a/kexi/plugins/reports/kexireportform.cpp b/kexi/plugins/reports/kexireportform.cpp index 89423b03..b0731167 100644 --- a/kexi/plugins/reports/kexireportform.cpp +++ b/kexi/plugins/reports/kexireportform.cpp @@ -178,7 +178,7 @@ KexiReportForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint } TQSize -KexiReportForm::tqsizeHint() const +KexiReportForm::sizeHint() const { //todo: find better size (user configured?) return TQSize(400,300); diff --git a/kexi/plugins/reports/kexireportform.h b/kexi/plugins/reports/kexireportform.h index 8813a2c3..7898ec98 100644 --- a/kexi/plugins/reports/kexireportform.h +++ b/kexi/plugins/reports/kexireportform.h @@ -47,7 +47,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportForm : public TQWidget, public KFormDesig virtual void clearForm(); virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; private: /*TQString m_ds; diff --git a/kexi/plugins/tables/kexilookupcolumnpage.cpp b/kexi/plugins/tables/kexilookupcolumnpage.cpp index 443f26d4..4bd08e5b 100644 --- a/kexi/plugins/tables/kexilookupcolumnpage.cpp +++ b/kexi/plugins/tables/kexilookupcolumnpage.cpp @@ -142,10 +142,10 @@ KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *parent) TQHBoxLayout *hlyr = new TQHBoxLayout(contentsVlyr); d->rowSourceLabel = new TQLabel(i18n("Row source:"), contents); - d->rowSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + d->rowSourceLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); d->rowSourceLabel->setMargin(2); d->rowSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - d->rowSourceLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom); + d->rowSourceLabel->setAlignment(TQt::AlignLeft|TQt::AlignBottom); hlyr->addWidget(d->rowSourceLabel); d->gotoRowSourceButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoRowSourceButton"); @@ -170,10 +170,10 @@ KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *parent) //- Bound Column hlyr = new TQHBoxLayout(contentsVlyr); d->boundColumnLabel = new TQLabel(i18n("Bound column:"), contents); - d->boundColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + d->boundColumnLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); d->boundColumnLabel->setMargin(2); d->boundColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - d->boundColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom); + d->boundColumnLabel->setAlignment(TQt::AlignLeft|TQt::AlignBottom); hlyr->addWidget(d->boundColumnLabel); d->clearBoundColumnButton = new KexiSmallToolButton(contents, TQString(), @@ -192,10 +192,10 @@ KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *parent) //- Visible Column hlyr = new TQHBoxLayout(contentsVlyr); d->visibleColumnLabel = new TQLabel(i18n("Visible column:"), contents); - d->visibleColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + d->visibleColumnLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); d->visibleColumnLabel->setMargin(2); d->visibleColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - d->visibleColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom); + d->visibleColumnLabel->setAlignment(TQt::AlignLeft|TQt::AlignBottom); hlyr->addWidget(d->visibleColumnLabel); d->clearVisibleColumnButton = new KexiSmallToolButton(contents, TQString(), diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp index 84ea686c..190e9834 100644 --- a/kexi/plugins/tables/kexitabledesignerview.cpp +++ b/kexi/plugins/tables/kexitabledesignerview.cpp @@ -168,7 +168,7 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, TQWidget *pare connect(d->data, TQT_SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)), TQT_TQOBJECT(this), TQT_SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool))); - setMinimumSize(d->view->tqminimumSizeHint().width(), d->view->tqminimumSizeHint().height()); + setMinimumSize(d->view->minimumSizeHint().width(), d->view->minimumSizeHint().height()); d->view->setFocus(); d->sets = new KexiDataAwarePropertySet( this, d->view ); @@ -1406,7 +1406,7 @@ KexiDB::SchemaData* KexiTableDesignerView::storeNewData(const KexiDB::SchemaData KexiDB::Connection *conn = mainWin()->project()->dbConnection(); res = conn->createTable(tempData()->table); if (res!=true) - parentDialog()->settqStatus(conn, ""); + parentDialog()->setStatus(conn, ""); } if (res == true) { @@ -1489,7 +1489,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) res = conn->alterTable(*tempData()->table, *newTable); if (res != true) - parentDialog()->settqStatus(conn, ""); + parentDialog()->setStatus(conn, ""); } else { KexiDB::AlterTableHandler::ExecutionArguments args; @@ -1499,7 +1499,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk) << res.toString() << endl; if (true != res) { alterTableHandler->debugError(); - parentDialog()->settqStatus(alterTableHandler, ""); + parentDialog()->setStatus(alterTableHandler, ""); } } } diff --git a/kexi/tests/gui/finddialog/kexifinddialogbase.ui b/kexi/tests/gui/finddialog/kexifinddialogbase.ui index 0f2248e6..a5ece575 100644 --- a/kexi/tests/gui/finddialog/kexifinddialogbase.ui +++ b/kexi/tests/gui/finddialog/kexifinddialogbase.ui @@ -180,7 +180,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> @@ -222,7 +222,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> @@ -279,7 +279,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>40</height> diff --git a/kexi/widget/kexicharencodingcombobox.cpp b/kexi/widget/kexicharencodingcombobox.cpp index ff277e7d..de6254b7 100644 --- a/kexi/widget/kexicharencodingcombobox.cpp +++ b/kexi/widget/kexicharencodingcombobox.cpp @@ -31,12 +31,12 @@ KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox( : KComboBox( parent, "KexiCharacterEncodingComboBox" ) , m_defaultEncodingAdded(false) { - TQString defaultEncoding(TQString::tqfromLatin1(KGlobal::locale()->encoding())); + TQString defaultEncoding(TQString::fromLatin1(KGlobal::locale()->encoding())); TQString defaultEncodingDescriptiveName; TQString _selectedEncoding = selectedEncoding; if (_selectedEncoding.isEmpty()) - _selectedEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); + _selectedEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); TQStringList descEncodings(KGlobal::charsets()->descriptiveEncodingNames()); TQStringList::ConstIterator it = descEncodings.constBegin(); @@ -84,7 +84,7 @@ KexiCharacterEncodingComboBox::~KexiCharacterEncodingComboBox() TQString KexiCharacterEncodingComboBox::selectedEncoding() const { if (defaultEncodingSelected()) { - return TQString::tqfromLatin1(KGlobal::locale()->encoding()); + return TQString::fromLatin1(KGlobal::locale()->encoding()); } else { return KGlobal::charsets()->encodingForName( currentText() ); diff --git a/kexi/widget/kexicustompropertyfactory_p.cpp b/kexi/widget/kexicustompropertyfactory_p.cpp index 20e85b04..e06b084b 100644 --- a/kexi/widget/kexicustompropertyfactory_p.cpp +++ b/kexi/widget/kexicustompropertyfactory_p.cpp @@ -50,7 +50,7 @@ void KexiImagePropertyEdit::selectPixmap() ObjectTreeItem *item = m_manager->activeForm()->objectTree()->lookup(m_manager->activeForm()->selectedWidget()->name()); TQString name = item ? item->pixmapName(property()->name()) : ""; - PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, tqtopLevelWidget() ); + PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, topLevelWidget() ); if(dialog.exec() == TQDialog::Accepted) { setValue(dialog.pixmap(), true); item->setPixmapName(property()->name(), dialog.pixmapName()); diff --git a/kexi/widget/kexidataawareview.cpp b/kexi/widget/kexidataawareview.cpp index 113f8be4..c6eb39d3 100644 --- a/kexi/widget/kexidataawareview.cpp +++ b/kexi/widget/kexidataawareview.cpp @@ -59,9 +59,9 @@ void KexiDataAwareView::init( TQWidget* viewWidget, KexiSharedActionClient* acti TQVBoxLayout *box = new TQVBoxLayout(this); box->addWidget(m_internalView); - setMinimumSize(m_internalView->tqminimumSizeHint().width(), - m_internalView->tqminimumSizeHint().height()); - resize( preferredSizeHint( m_internalView->tqsizeHint() ) ); + setMinimumSize(m_internalView->minimumSizeHint().width(), + m_internalView->minimumSizeHint().height()); + resize( preferredSizeHint( m_internalView->sizeHint() ) ); setFocusProxy(m_internalView); if (!noDataAware) { @@ -165,14 +165,14 @@ TQWidget* KexiDataAwareView::mainWidget() return m_internalView; } -TQSize KexiDataAwareView::tqminimumSizeHint() const +TQSize KexiDataAwareView::minimumSizeHint() const { - return m_internalView ? m_internalView->tqminimumSizeHint() : TQSize(0,0);//KexiViewBase::tqminimumSizeHint(); + return m_internalView ? m_internalView->minimumSizeHint() : TQSize(0,0);//KexiViewBase::minimumSizeHint(); } -TQSize KexiDataAwareView::tqsizeHint() const +TQSize KexiDataAwareView::sizeHint() const { - return m_internalView ? m_internalView->tqsizeHint() : TQSize(0,0);//KexiViewBase::tqsizeHint(); + return m_internalView ? m_internalView->sizeHint() : TQSize(0,0);//KexiViewBase::sizeHint(); } void KexiDataAwareView::updateActions(bool activated) diff --git a/kexi/widget/kexidataawareview.h b/kexi/widget/kexidataawareview.h index 5cc76e97..8a787bd7 100644 --- a/kexi/widget/kexidataawareview.h +++ b/kexi/widget/kexidataawareview.h @@ -49,9 +49,9 @@ class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase, TQWidget* mainWidget(); - virtual TQSize tqminimumSizeHint() const; + virtual TQSize minimumSizeHint() const; - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; KexiDataAwareObjectInterface* dataAwareObject() const { return m_dataAwareObject; } diff --git a/kexi/widget/kexidbconnectionwidget.cpp b/kexi/widget/kexidbconnectionwidget.cpp index 78b67c8d..1f9006fd 100644 --- a/kexi/widget/kexidbconnectionwidget.cpp +++ b/kexi/widget/kexidbconnectionwidget.cpp @@ -95,7 +95,7 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( TQWidget* parent, const char* n hbox->addWidget( d->btnSaveChanges ); hbox->addSpacing( KDialogBase::spacingHint() ); TQWidget::setTabOrder(titleEdit, d->btnSaveChanges); - d->btnSaveChanges->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + d->btnSaveChanges->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); d->btnTestConnection = new KPushButton(KGuiItem(i18n("&Test Connection"), "", i18n("Test database connection"), @@ -103,7 +103,7 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( TQWidget* parent, const char* n frmBottom, "testConnection"); hbox->addWidget( d->btnTestConnection ); TQWidget::setTabOrder(d->btnSaveChanges, d->btnTestConnection); - d->btnTestConnection->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + d->btnTestConnection->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); connect( locationBGrp, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotLocationBGrpClicked(int)) ); connect( chkPortDefault, TQT_SIGNAL(toggled(bool)), this , TQT_SLOT(slotCBToggled(bool)) ); diff --git a/kexi/widget/kexidbconnectionwidgetbase.ui b/kexi/widget/kexidbconnectionwidgetbase.ui index 6dd4fbf8..463d8797 100644 --- a/kexi/widget/kexidbconnectionwidgetbase.ui +++ b/kexi/widget/kexidbconnectionwidgetbase.ui @@ -39,7 +39,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>48</width> <height>48</height> @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>331</height> @@ -75,7 +75,7 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>4</height> @@ -111,7 +111,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>41</width> <height>20</height> @@ -163,7 +163,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>90</width> <height>20</height> @@ -356,7 +356,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>32</width> <height>32767</height> @@ -411,7 +411,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>80</width> <height>20</height> diff --git a/kexi/widget/kexidbconnectionwidgetdetailsbase.ui b/kexi/widget/kexidbconnectionwidgetdetailsbase.ui index f1f161de..74b4326d 100644 --- a/kexi/widget/kexidbconnectionwidgetdetailsbase.ui +++ b/kexi/widget/kexidbconnectionwidgetdetailsbase.ui @@ -62,7 +62,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> @@ -114,7 +114,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>129</width> <height>20</height> diff --git a/kexi/widget/kexidswelcome.cpp b/kexi/widget/kexidswelcome.cpp index 88b72596..cd4be1b2 100644 --- a/kexi/widget/kexidswelcome.cpp +++ b/kexi/widget/kexidswelcome.cpp @@ -37,7 +37,7 @@ KexiDSWelcome::KexiDSWelcome(KexiDataSourceWizard *parent) KexiDSPixmap *pic = new KexiDSPixmap(this); TQLabel *lText = new TQLabel(i18n("Kexi can help you with creation of %2 using data sources in almost no time with the \"%1 Wizard\""), this); - lText->tqsetAlignment(AlignTop | AlignLeft | WordBreak); + lText->setAlignment(AlignTop | AlignLeft | WordBreak); TQCheckBox *useWizard = new TQCheckBox(i18n("Create %1 using the \"%1 Wizard\""), this); connect(useWizard, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setUseWizard(bool))); useWizard->setChecked(true); diff --git a/kexi/widget/kexifieldcombobox.cpp b/kexi/widget/kexifieldcombobox.cpp index 31795049..b9c64635 100644 --- a/kexi/widget/kexifieldcombobox.cpp +++ b/kexi/widget/kexifieldcombobox.cpp @@ -243,7 +243,7 @@ void KexiFieldComboBox::focusOutEvent( TQFocusEvent *e ) { KComboBox::focusOutEvent( e ); // accept changes if the focus is moved - if (!KexiUtils::hasParent(TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) //(a check needed because drop-down listbox also causes a focusout) + if (!KexiUtils::hasParent(TQT_TQOBJECT(this), TQT_TQOBJECT(focusWidget()))) //(a check needed because drop-down listbox also causes a focusout) slotReturnPressed(currentText()); } diff --git a/kexi/widget/kexifieldlistview.cpp b/kexi/widget/kexifieldlistview.cpp index 532ec057..7316caeb 100644 --- a/kexi/widget/kexifieldlistview.cpp +++ b/kexi/widget/kexifieldlistview.cpp @@ -117,7 +117,7 @@ void KexiFieldListView::setSchema(KexiDB::TableOrQuerySchema* schema) } #if 0 -TQSize KexiFieldListView::tqsizeHint() +TQSize KexiFieldListView::sizeHint() { TQFontMetrics fm(font()); diff --git a/kexi/widget/kexifieldlistview.h b/kexi/widget/kexifieldlistview.h index 50d94dba..53682436 100644 --- a/kexi/widget/kexifieldlistview.h +++ b/kexi/widget/kexifieldlistview.h @@ -60,7 +60,7 @@ class KEXIEXTWIDGETS_EXPORT KexiFieldListView : public KListView TQStringList selectedFieldNames() const; // void setReadOnly(bool); -// virtual TQSize tqsizeHint(); +// virtual TQSize sizeHint(); signals: /*! Emitted when a field is double clicked */ diff --git a/kexi/widget/kexipropertyeditorview.cpp b/kexi/widget/kexipropertyeditorview.cpp index 02b050b8..122d9514 100644 --- a/kexi/widget/kexipropertyeditorview.cpp +++ b/kexi/widget/kexipropertyeditorview.cpp @@ -40,7 +40,7 @@ KexiObjectInfoLabel::KexiObjectInfoLabel(TQWidget* parent, const char* name) hlyr->addWidget(m_objectIconLabel); m_objectNameLabel = new TQLabel(this); m_objectNameLabel->setMargin(2); - m_objectNameLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); + m_objectNameLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); hlyr->addWidget(m_objectNameLabel); } @@ -125,7 +125,7 @@ KexiPropertyEditorView::KexiPropertyEditorView(KexiMainWindow *mainWin, TQWidget vlyr->addWidget(d->objectIcon); d->objectClassName = new TQLabel(this); d->objectClassName->setMargin(2); - d->objectClassName->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); + d->objectClassName->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); vlyr->addWidget(d->objectClassName);*/ d->editor = new KoProperty::Editor(this, true /*AutoSync*/, "propeditor"); @@ -146,14 +146,14 @@ KexiPropertyEditorView::~KexiPropertyEditorView() delete d; } -TQSize KexiPropertyEditorView::tqsizeHint() const +TQSize KexiPropertyEditorView::sizeHint() const { - return TQSize(200,200);//m_editor->tqsizeHint(); + return TQSize(200,200);//m_editor->sizeHint(); } -TQSize KexiPropertyEditorView::tqminimumSizeHint() const +TQSize KexiPropertyEditorView::minimumSizeHint() const { - return TQSize(200,200);//m_editor->tqsizeHint(); + return TQSize(200,200);//m_editor->sizeHint(); } /*void KexiPropertyEditorView::setGeometry ( const TQRect &r ) diff --git a/kexi/widget/kexipropertyeditorview.h b/kexi/widget/kexipropertyeditorview.h index 66cc0ac7..008e6759 100644 --- a/kexi/widget/kexipropertyeditorview.h +++ b/kexi/widget/kexipropertyeditorview.h @@ -99,8 +99,8 @@ class KEXIEXTWIDGETS_EXPORT KexiPropertyEditorView : public TQWidget KexiObjectInfoLabel *infoLabel, KoProperty::Set* set, const TQString& textToDisplayForNullSet = TQString()); - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; KoProperty::Editor *editor() const; // public slots: diff --git a/kexi/widget/kexiscrollview.cpp b/kexi/widget/kexiscrollview.cpp index db9dbb14..7bdfd12e 100644 --- a/kexi/widget/kexiscrollview.cpp +++ b/kexi/widget/kexiscrollview.cpp @@ -52,7 +52,7 @@ KexiScrollView::KexiScrollView(TQWidget *parent, bool preview) , m_scrollViewNavPanel(0) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); + viewport()->setPaletteBackgroundColor(colorGroup().mid()); TQColor fc = tqpalette().active().foreground(), bc = viewport()->paletteBackgroundColor(); m_helpColor = KexiUtils::blendedColors(fc, bc, 1, 2); @@ -80,7 +80,7 @@ KexiScrollView::KexiScrollView(TQWidget *parent, bool preview) //! @todo allow to hide navigator updateScrollBars(); m_scrollViewNavPanel = new KexiRecordNavigator(this, leftMargin(), "nav"); - m_scrollViewNavPanel->tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); + m_scrollViewNavPanel->setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); } } diff --git a/kexi/widget/kexisectionheader.cpp b/kexi/widget/kexisectionheader.cpp index 7e6989f3..65286fbd 100644 --- a/kexi/widget/kexisectionheader.cpp +++ b/kexi/widget/kexisectionheader.cpp @@ -65,7 +65,7 @@ KexiSectionHeader::KexiSectionHeader(const TQString &caption, Qt::Orientation o, d->lyr->setAutoAdd(true); d->lbl_b = new TQHBox(this); d->lbl = new TQLabel(TQString(" ")+caption, d->lbl_b); - d->lbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); + d->lbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); d->lbl->setFocusPolicy(TQ_StrongFocus); d->lbl->installEventFilter(this); installEventFilter(this); @@ -83,7 +83,7 @@ void KexiSectionHeader::addButton(const TQString& icon, const TQString& toolTip, KPushButton *btn = new KPushButton(d->lbl_b); btn->setFlat(true); btn->setFocusPolicy(TQ_NoFocus); - btn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + btn->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); if (receiver && member) { connect(btn, TQT_SIGNAL(clicked()), receiver, member); } @@ -113,19 +113,19 @@ bool KexiSectionHeader::eventFilter( TQObject *o, TQEvent *e ) void KexiSectionHeader::slotFocus(bool in) { - in = in || tqfocusWidget()==this; + in = in || focusWidget()==this; d->lbl->setPaletteBackgroundColor( in ? tqpalette().active().color(TQColorGroup::Highlight) : tqpalette().active().color(TQColorGroup::Background) ); d->lbl->setPaletteForegroundColor( in ? tqpalette().active().color(TQColorGroup::HighlightedText) : tqpalette().active().color(TQColorGroup::Foreground) ); } -TQSize KexiSectionHeader::tqsizeHint() const +TQSize KexiSectionHeader::sizeHint() const { if (!d->lyr->view) - return TQWidget::tqsizeHint(); - TQSize s = d->lyr->view->tqsizeHint(); - return TQSize(s.width(), d->lbl->tqsizeHint().height() + s.height()); + return TQWidget::sizeHint(); + TQSize s = d->lyr->view->sizeHint(); + return TQSize(s.width(), d->lbl->sizeHint().height() + s.height()); } /*void KexiSectionHeader::setFocus() diff --git a/kexi/widget/kexisectionheader.h b/kexi/widget/kexisectionheader.h index 9ed31a35..a8d08a45 100644 --- a/kexi/widget/kexisectionheader.h +++ b/kexi/widget/kexisectionheader.h @@ -41,7 +41,7 @@ class KEXIEXTWIDGETS_EXPORT KexiSectionHeader : public TQWidget virtual bool eventFilter( TQObject *o, TQEvent *e ); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: void slotFocus(bool in); diff --git a/kexi/widget/kexismalltoolbutton.cpp b/kexi/widget/kexismalltoolbutton.cpp index 81bab0c6..237130f2 100644 --- a/kexi/widget/kexismalltoolbutton.cpp +++ b/kexi/widget/kexismalltoolbutton.cpp @@ -71,7 +71,7 @@ void KexiSmallToolButton::updateAction() void KexiSmallToolButton::init() { setPaletteBackgroundColor(tqpalette().active().background()); - tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); TQFont f(KGlobalSettings::toolBarFont()); f.setPixelSize(Kexi::smallFont().pixelSize()); setFont(f); @@ -125,7 +125,7 @@ void KexiSmallToolButton::drawButton( TQPainter *_painter ) if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, - TQRect(width()-7, height()-7, 5, 5), tqcolorGroup(), + TQRect(width()-7, height()-7, 5, 5), colorGroup(), arrowFlags, TQStyleOption() ); } } diff --git a/kexi/widget/pixmapcollection.cpp b/kexi/widget/pixmapcollection.cpp index 0aeddca4..19875521 100644 --- a/kexi/widget/pixmapcollection.cpp +++ b/kexi/widget/pixmapcollection.cpp @@ -159,7 +159,7 @@ LoadIconDialog::LoadIconDialog(TQWidget *parent) // Name input TQLabel *name = new TQLabel(i18n("&Name:"), frame); l->addWidget(name, 0, 0); - name->tqsetAlignment(TQt::AlignRight|TQt::AlignVCenter); + name->setAlignment(TQt::AlignRight|TQt::AlignVCenter); m_nameInput = new KLineEdit("kexi", frame); l->addWidget(m_nameInput, 0, 1); name->setBuddy(m_nameInput); @@ -167,7 +167,7 @@ LoadIconDialog::LoadIconDialog(TQWidget *parent) // Choose size TQLabel *size = new TQLabel(i18n("&Size:"), frame); l->addWidget(size, 1, 0); - size->tqsetAlignment(TQt::AlignRight|TQt::AlignVCenter); + size->setAlignment(TQt::AlignRight|TQt::AlignVCenter); KComboBox *combo = new KComboBox(frame); l->addWidget(combo, 1, 1); diff --git a/kexi/widget/relations/kexirelationview.cpp b/kexi/widget/relations/kexirelationview.cpp index 18c19ef9..378d2580 100644 --- a/kexi/widget/relations/kexirelationview.cpp +++ b/kexi/widget/relations/kexirelationview.cpp @@ -57,7 +57,7 @@ KexiRelationView::KexiRelationView(TQWidget *parent, const char *name) // connect(relation, TQT_SIGNAL(relationListUpdated(TQObject *)), this, TQT_SLOT(slotListUpdate(TQObject *))); - viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); + viewport()->setPaletteBackgroundColor(colorGroup().mid()); setFocusPolicy(TQ_WheelFocus); setResizePolicy(Manual); /*MOVED TO KexiRelationDialog @@ -94,7 +94,7 @@ KexiRelationView::KexiRelationView(TQWidget *parent, const char *name) invalidateActions(); #endif - tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, true); + setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, true); } KexiRelationView::~KexiRelationView() @@ -146,13 +146,13 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const TQRect &rect) addChild(c, 100,100); if (rect.isValid()) {//predefined size - TQSize finalSize = c->size().expandedTo( c->tqsizeHint() ); + TQSize finalSize = c->size().expandedTo( c->sizeHint() ); TQRect r = rect; r.setSize( finalSize + TQSize(0,10) ); moveChild( c, rect.left(), rect.top() ); //we're doing this instead of setGeometry(rect) //because the geomenty might be saved on other system with bigger fonts :) - c->resize(c->tqsizeHint()); + c->resize(c->sizeHint()); // c->setGeometry(r); //TODO @@ -164,7 +164,7 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const TQRect &rect) updateGeometry(); if (!rect.isValid()) { c->updateGeometry(); - c->resize(c->tqsizeHint()); + c->resize(c->sizeHint()); } int x, y; @@ -584,9 +584,9 @@ void KexiRelationView::slotTableViewGotFocus() emit tableViewGotFocus(); } -TQSize KexiRelationView::tqsizeHint() const +TQSize KexiRelationView::sizeHint() const { - return TQSize(TQScrollView::tqsizeHint());//.width(), 600); + return TQSize(TQScrollView::sizeHint());//.width(), 600); } void KexiRelationView::clear() diff --git a/kexi/widget/relations/kexirelationview.h b/kexi/widget/relations/kexirelationview.h index 6bc31b31..404fbcbe 100644 --- a/kexi/widget/relations/kexirelationview.h +++ b/kexi/widget/relations/kexirelationview.h @@ -96,7 +96,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public TQScrollView inline KexiRelationViewTableContainer* focusedTableView() const { return m_focusedTableView; } - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; const ConnectionList* connections() const { return &m_connectionViews; } diff --git a/kexi/widget/relations/kexirelationviewconnection.cpp b/kexi/widget/relations/kexirelationviewconnection.cpp index c0635c1b..ab3f1ac4 100644 --- a/kexi/widget/relations/kexirelationviewconnection.cpp +++ b/kexi/widget/relations/kexirelationviewconnection.cpp @@ -92,7 +92,7 @@ KexiRelationViewConnection::drawConnection(TQPainter *p) pa.setPoint(0, rx - 4, ry - 3); pa.setPoint(1, rx - 4, ry + 3); pa.setPoint(2, rx - 1, ry); - p->tqdrawPolygon(pa, true); + p->drawPolygon(pa, true); //master side p->drawLine(sx, sy - 1, sx + side1CharWidth -1, sy - 1); @@ -134,7 +134,7 @@ KexiRelationViewConnection::drawConnection(TQPainter *p) pa.setPoint(0, lx + 3, ry - 3); pa.setPoint(1, lx + 3, ry + 3); pa.setPoint(2, lx, ry); - p->tqdrawPolygon(pa, true); + p->drawPolygon(pa, true); // p->drawLine(lx, ry, lx + 8, ry); // p->drawPoint(lx + 1, ry - 1); diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp index 55440da4..ea1682f7 100644 --- a/kexi/widget/relations/kexirelationviewtable.cpp +++ b/kexi/widget/relations/kexirelationviewtable.cpp @@ -61,18 +61,18 @@ KexiRelationViewTableContainer::KexiRelationViewTableContainer( m_tableHeader = new KexiRelationViewTableContainerHeader(schema->name(), this); m_tableHeader->unsetFocus(); - m_tableHeader->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + m_tableHeader->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); lyr->addWidget(m_tableHeader); connect(m_tableHeader,TQT_SIGNAL(moved()),this,TQT_SLOT(moved())); connect(m_tableHeader, TQT_SIGNAL(endDrag()), this, TQT_SIGNAL(endDrag())); m_tableView = new KexiRelationViewTable(schema, parent, this, "KexiRelationViewTable"); //m_tableHeader->setFocusProxy( m_tableView ); - m_tableView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + m_tableView->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); - m_tableView->setMaximumSize( m_tableView->tqsizeHint() ); + m_tableView->setMaximumSize( m_tableView->sizeHint() ); -// m_tableView->resize( m_tableView->tqsizeHint() ); +// m_tableView->resize( m_tableView->sizeHint() ); lyr->addWidget(m_tableView, 0); connect(m_tableView, TQT_SIGNAL(tableScrolling()), this, TQT_SLOT(moved())); connect(m_tableView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), @@ -110,13 +110,13 @@ int KexiRelationViewTableContainer::globalY(const TQString &field) } #if 0//js -TQSize KexiRelationViewTableContainer::tqsizeHint() +TQSize KexiRelationViewTableContainer::sizeHint() { #ifdef TQ_WS_WIN - TQSize s = m_tableView->tqsizeHint() + TQSize s = m_tableView->sizeHint() + TQSize( 2 * 5 , m_tableHeader->height() + 2 * 5 ); #else - TQSize s = m_tableView->tqsizeHint(); + TQSize s = m_tableView->sizeHint(); s.setWidth(s.width() + 4); s.setHeight(m_tableHeader->height() + s.height()); #endif @@ -307,7 +307,7 @@ KexiRelationViewTable::~KexiRelationViewTable() { } -TQSize KexiRelationViewTable::tqsizeHint() const +TQSize KexiRelationViewTable::sizeHint() const { TQFontMetrics fm(fontMetrics()); @@ -341,7 +341,7 @@ KexiRelationViewTable::globalY(const TQString &item) TQListViewItem *i = findItem(item, 0); if (!i) return -1; - int y = tqitemRect(i).y() + (tqitemRect(i).height() / 2); + int y = itemRect(i).y() + (itemRect(i).height() / 2); if (contentsY() > itemPos(i)) y = 0; else if (y == 0) @@ -420,10 +420,10 @@ void KexiRelationViewTable::contentsMousePressEvent(TQMouseEvent *ev) TQRect KexiRelationViewTable::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) { if (painter) { - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, tqitemRect(item), tqcolorGroup(), + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, itemRect(item), colorGroup(), TQStyle::Style_FocusAtBorder); } - return tqitemRect(item); + return itemRect(item); } #include "kexirelationviewtable.moc" diff --git a/kexi/widget/relations/kexirelationviewtable.h b/kexi/widget/relations/kexirelationviewtable.h index 5c622dad..6578cdd5 100644 --- a/kexi/widget/relations/kexirelationviewtable.h +++ b/kexi/widget/relations/kexirelationviewtable.h @@ -105,7 +105,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTable : public KexiFieldListView // KexiDB::TableSchema *table() const { return m_table; }; int globalY(const TQString &item); // void setReadOnly(bool); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; signals: void tableScrolling(); diff --git a/kexi/widget/relations/kexirelationwidget.cpp b/kexi/widget/relations/kexirelationwidget.cpp index 4b952163..4c5754b5 100644 --- a/kexi/widget/relations/kexirelationwidget.cpp +++ b/kexi/widget/relations/kexirelationwidget.cpp @@ -59,7 +59,7 @@ KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, TQWidget *parent, m_tableCombo->setInsertionPolicy(TQComboBox::NoInsertion); hlyr->addWidget(lbl); hlyr->addWidget(m_tableCombo); - m_tableCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred)); + m_tableCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred)); fillTablesCombo(); m_btnAdd = new KPushButton(i18n("&Add"), this); @@ -302,9 +302,9 @@ void KexiRelationWidget::designSelectedTable() Kexi::DesignViewMode, openingCancelled); } -TQSize KexiRelationWidget::tqsizeHint() const +TQSize KexiRelationWidget::sizeHint() const { - return m_relationView->tqsizeHint(); + return m_relationView->sizeHint(); } void KexiRelationWidget::slotTableHidden(KexiDB::TableSchema &table) diff --git a/kexi/widget/relations/kexirelationwidget.h b/kexi/widget/relations/kexirelationwidget.h index 39ac549a..713ce8fc 100644 --- a/kexi/widget/relations/kexirelationwidget.h +++ b/kexi/widget/relations/kexirelationwidget.h @@ -60,7 +60,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationWidget : public KexiViewBase // void openTable(KexiDB::TableSchema* table, bool designMode); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; /*! Used to add newly created object information to the combo box. */ void objectCreated(const TQCString &mime, const TQCString& name); diff --git a/kexi/widget/tableview/kexiblobtableedit.cpp b/kexi/widget/tableview/kexiblobtableedit.cpp index 7ad76c34..c818606d 100644 --- a/kexi/widget/tableview/kexiblobtableedit.cpp +++ b/kexi/widget/tableview/kexiblobtableedit.cpp @@ -559,7 +559,7 @@ void KexiKIconTableEdit::setupContents( TQPainter *p, bool /*focused*/, const TQ s = TQMIN( h-3, s ); s = TQMIN( w-3, s );//avoid too large box TQRect r( TQMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s); - p->setPen(TQPen(tqcolorGroup().text(), 1)); + p->setPen(TQPen(colorGroup().text(), 1)); p->drawRect(r); if (val.asBool()) { p->drawLine(r.x(), r.y(), r.right(), r.bottom()); diff --git a/kexi/widget/tableview/kexibooltableedit.cpp b/kexi/widget/tableview/kexibooltableedit.cpp index 8f199b5d..c0753269 100644 --- a/kexi/widget/tableview/kexibooltableedit.cpp +++ b/kexi/widget/tableview/kexibooltableedit.cpp @@ -105,7 +105,7 @@ void KexiBoolTableEdit::setupContents( TQPainter *p, bool focused, const TQVaria s = TQMIN( h-3, s ); s = TQMIN( w-3, s );//avoid too large box TQRect r( TQMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s); -//already set ouotside: p->setPen(TQPen(tqcolorGroup().text(), 1)); +//already set ouotside: p->setPen(TQPen(colorGroup().text(), 1)); p->drawRect(r); if (val.isNull()) { // && !field()->isNotNull()) { p->drawText( r, TQt::AlignCenter, "?" ); diff --git a/kexi/widget/tableview/kexicomboboxpopup.cpp b/kexi/widget/tableview/kexicomboboxpopup.cpp index 6a2feec8..9ecae92f 100644 --- a/kexi/widget/tableview/kexicomboboxpopup.cpp +++ b/kexi/widget/tableview/kexicomboboxpopup.cpp @@ -56,8 +56,8 @@ class KexiComboBoxPopup_KexiTableView : public KexiDataTableView a.rowHighlightingEnabled = true; a.rowMouseOverHighlightingEnabled = true; a.persistentSelections = false; - a.rowMouseOverHighlightingColor = tqcolorGroup().highlight(); - a.rowMouseOverHighlightingTextColor = tqcolorGroup().highlightedText(); + a.rowMouseOverHighlightingColor = colorGroup().highlight(); + a.rowMouseOverHighlightingTextColor = colorGroup().highlightedText(); a.rowHighlightingTextColor = a.rowMouseOverHighlightingTextColor; a.gridEnabled = false; setAppearance(a); @@ -68,7 +68,7 @@ class KexiComboBoxPopup_KexiTableView : public KexiDataTableView setContextMenuEnabled( false ); setScrollbarToolTipsEnabled( false ); installEventFilter(this); - setBottomMarginInternal( - horizontalScrollBar()->tqsizeHint().height() ); + setBottomMarginInternal( - horizontalScrollBar()->sizeHint().height() ); } virtual void setData( KexiTableViewData *data, bool owner = true ) { KexiTableView::setData( data, owner ); } diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index 3ae97974..37ababa5 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -80,7 +80,7 @@ KexiComboBoxTableEdit::KexiComboBoxTableEdit(KexiTableViewColumn &column, TQWidg // m_lineedit->setFrameStyle( TQFrame::Plain | TQFrame::Box ); // m_lineedit->setLineWidth( 1 ); // if (f.isNumericType()) { -// m_lineedit->tqsetAlignment(AlignRight); +// m_lineedit->setAlignment(AlignRight); // } // setView( m_lineedit ); diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp index 79613d9d..721cb2d8 100644 --- a/kexi/widget/tableview/kexidataawareobjectiface.cpp +++ b/kexi/widget/tableview/kexidataawareobjectiface.cpp @@ -84,7 +84,7 @@ KexiDataAwareObjectInterface::KexiDataAwareObjectInterface() m_scrollBarTip->setPalette(TQToolTip::palette()); m_scrollBarTip->setMargin(2); m_scrollBarTip->setIndent(0); - m_scrollBarTip->tqsetAlignment(TQt::AlignCenter); + m_scrollBarTip->setAlignment(TQt::AlignCenter); m_scrollBarTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); m_scrollBarTip->setLineWidth(1); @@ -1950,7 +1950,7 @@ static inline bool findInString(const TQString& stringValue, int stringLength, c if (firstCharacter != -1 && firstCharacter != 0) { //we're not at 0-th char firstCharacter = -1; } - else if (where.tqstartsWith(stringValue, caseSensitive)) { + else if (where.startsWith(stringValue, caseSensitive)) { if (wholeWordsOnly) { // If where.length() < stringValue.length(), true will be returned too - fine. return !where.at( stringValue.length() ).isLetterOrNumber(); diff --git a/kexi/widget/tableview/kexidataawarepropertyset.cpp b/kexi/widget/tableview/kexidataawarepropertyset.cpp index 257cf0aa..dde99b31 100644 --- a/kexi/widget/tableview/kexidataawarepropertyset.cpp +++ b/kexi/widget/tableview/kexidataawarepropertyset.cpp @@ -92,10 +92,10 @@ uint KexiDataAwarePropertySet::size() const return m_sets.size(); } -void KexiDataAwarePropertySet::clear(uint tqminimumSize) +void KexiDataAwarePropertySet::clear(uint minimumSize) { m_sets.clear(); - m_sets.resize(TQMAX(tqminimumSize, MAX_FIELDS)); + m_sets.resize(TQMAX(minimumSize, MAX_FIELDS)); m_view->setDirty(true); m_view->propertySetSwitched(); } diff --git a/kexi/widget/tableview/kexidataawarepropertyset.h b/kexi/widget/tableview/kexidataawarepropertyset.h index e24fbd8a..b2c66f96 100644 --- a/kexi/widget/tableview/kexidataawarepropertyset.h +++ b/kexi/widget/tableview/kexidataawarepropertyset.h @@ -97,7 +97,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public TQObject public slots: void removeCurrentPropertySet(); - void clear(uint tqminimumSize = 0); + void clear(uint minimumSize = 0); /*! Inserts \a set property set at \a row position. If there was a buffer at this position before, it will be destroyed. diff --git a/kexi/widget/tableview/kexiinputtableedit.cpp b/kexi/widget/tableview/kexiinputtableedit.cpp index 1b834fe9..36b662f9 100644 --- a/kexi/widget/tableview/kexiinputtableedit.cpp +++ b/kexi/widget/tableview/kexiinputtableedit.cpp @@ -47,7 +47,7 @@ class MyLineEdit : public KLineEdit {} protected: virtual void drawFrame ( TQPainter * p ) { - p->setPen( TQPen( tqcolorGroup().text() ) ); + p->setPen( TQPen( colorGroup().text() ) ); TQRect r = rect(); p->moveTo( r.topLeft() ); p->lineTo( r.topRight() ); @@ -100,7 +100,7 @@ void KexiInputTableEdit::init() m_lineedit = new MyLineEdit(this, "KexiInputTableEdit-KLineEdit"); setViewWidget(m_lineedit); if (align_right) - m_lineedit->tqsetAlignment(AlignRight); + m_lineedit->setAlignment(AlignRight); // m_cview->setFrame(false); // m_cview->setFrameStyle( TQFrame::Plain | TQFrame::Box ); // m_cview->setLineWidth( 1 ); @@ -222,7 +222,7 @@ TQString KexiInputTableEdit::valueToText(KexiDB::Field* field, const TQVariant& void KexiInputTableEdit::paintEvent ( TQPaintEvent * /*e*/ ) { TQPainter p(this); - p.setPen( TQPen( tqcolorGroup().text() ) ); + p.setPen( TQPen( colorGroup().text() ) ); p.drawRect( rect() ); } diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index 4ed993cd..35ad2369 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -102,10 +102,10 @@ class KexiTableView::WhatsThis : public TQWhatsThis const int leftMargin = m_tv->verticalHeaderVisible() ? m_tv->verticalHeader()->width() : 0; //const int topMargin = m_tv->horizontalHeaderVisible() ? m_tv->d->pTopHeader->height() : 0; //const int bottomMargin = m_tv->d->appearance.navigatorEnabled ? m_tv->m_navPanel->height() : 0; - if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->verticalHeader()), TQT_TQOBJECT(m_tv->tqchildAt(pos)))) { + if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->verticalHeader()), TQT_TQOBJECT(m_tv->childAt(pos)))) { return i18n("Contains a pointer to the currently selected row"); } - else if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->m_navPanel), TQT_TQOBJECT(m_tv->tqchildAt(pos)))) { + else if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->m_navPanel), TQT_TQOBJECT(m_tv->childAt(pos)))) { return i18n("Row navigator"); // return TQWhatsThis::textFor(m_tv->m_navPanel, TQPoint( pos.x(), pos.y() - m_tv->height() + bottomMargin )); } @@ -204,8 +204,8 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch setBackgroundMode(TQt::PaletteBackground); // setEmptyAreaColor(d->appearance.baseColor);//palette().active().color(TQColorGroup::Base)); -// d->baseColor = tqcolorGroup().base(); -// d->textColor = tqcolorGroup().text(); +// d->baseColor = colorGroup().base(); +// d->textColor = colorGroup().text(); // d->altColor = KGlobalSettings::alternateBackgroundColor(); // d->grayColor = TQColor(200,200,200); @@ -253,8 +253,8 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch m_verticalHeader->setCurrentRow(-1); setMargins( - TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight), - m_horizontalHeader->tqsizeHint().height(), 0, 0); + TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight), + m_horizontalHeader->sizeHint().height(), 0, 0); setupNavigator(); @@ -288,7 +288,7 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch // horizontalScrollBar()->show(); updateScrollBars(); -// resize(tqsizeHint()); +// resize(sizeHint()); // updateContents(); // setMinimumHeight(horizontalScrollBar()->height() + d->rowHeight + topMargin()); @@ -333,7 +333,7 @@ void KexiTableView::setupNavigator() m_navPanel = new KexiRecordNavigator(this, leftMargin(), "navPanel"); m_navPanel->setRecordHandler(this); - m_navPanel->tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); + m_navPanel->setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); } void KexiTableView::initDataContents() @@ -399,8 +399,8 @@ void KexiTableView::updateFonts(bool tqrepaint) // if(d->rowHeight < 22) // d->rowHeight = 22; setMargins( - TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight), - m_horizontalHeader->tqsizeHint().height(), 0, 0); + TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight), + m_horizontalHeader->sizeHint().height(), 0, 0); // setMargins(14, d->rowHeight, 0, 0); m_verticalHeader->setCellHeight(d->rowHeight); @@ -494,29 +494,29 @@ TQSizePolicy KexiTableView::sizePolicy() const return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } -TQSize KexiTableView::tqsizeHint() const +TQSize KexiTableView::sizeHint() const { const TQSize &ts = tableSize(); - int w = TQMAX( ts.width() + leftMargin()+ verticalScrollBar()->tqsizeHint().width() + 2*2, + int w = TQMAX( ts.width() + leftMargin()+ verticalScrollBar()->sizeHint().width() + 2*2, (m_navPanel->isVisible() ? m_navPanel->width() : 0) ); - int h = TQMAX( ts.height()+topMargin()+horizontalScrollBar()->tqsizeHint().height(), - tqminimumSizeHint().height() ); + int h = TQMAX( ts.height()+topMargin()+horizontalScrollBar()->sizeHint().height(), + minimumSizeHint().height() ); w = TQMIN( w, tqApp->desktop()->width()*3/4 ); //stretch h = TQMIN( h, tqApp->desktop()->height()*3/4 ); //stretch -// kexidbg << "KexiTableView::tqsizeHint()= " <<w <<", " <<h << endl; +// kexidbg << "KexiTableView::sizeHint()= " <<w <<", " <<h << endl; return TQSize(w, h); /*TQSize( TQMAX( ts.width() + leftMargin() + 2*2, (m_navPanel ? m_navPanel->width() : 0) ), //+ TQMIN(m_verticalHeader->width(),d->rowHeight) + margin()*2, - TQMAX( ts.height()+topMargin()+horizontalScrollBar()->tqsizeHint().height(), - tqminimumSizeHint().height() ) + TQMAX( ts.height()+topMargin()+horizontalScrollBar()->sizeHint().height(), + minimumSizeHint().height() ) );*/ -// TQMAX(ts.height() + topMargin(), tqminimumSizeHint().height()) ); +// TQMAX(ts.height() + topMargin(), minimumSizeHint().height()) ); } -TQSize KexiTableView::tqminimumSizeHint() const +TQSize KexiTableView::minimumSizeHint() const { return TQSize( leftMargin() + ((columns()>0)?columnWidth(0):KEXI_DEFAULT_DATA_COLUMN_WIDTH) + 2*2, @@ -658,7 +658,7 @@ void KexiTableView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch) if(d->pBufferPm->isNull()) return; TQPainter *pb = new TQPainter(d->pBufferPm, this); -// pb->fillRect(0, 0, cw, ch, tqcolorGroup().base()); +// pb->fillRect(0, 0, cw, ch, colorGroup().base()); // int maxwc = TQMIN(cw, (columnPos(d->numCols - 1) + columnWidth(d->numCols - 1))); int maxwc = columnPos(columns() - 1) + columnWidth(columns() - 1); @@ -812,7 +812,7 @@ void KexiTableView::paintCell(TQPainter* p, KexiTableItem *item, int col, int ro && !dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted && usesSelectedTextColor) { - defaultPen = TQPen(tqcolorGroup().highlightedText()); //selected text + defaultPen = TQPen(colorGroup().highlightedText()); //selected text } else if (d->appearance.rowHighlightingEnabled && row == m_curRow && !dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted @@ -849,7 +849,7 @@ void KexiTableView::paintCell(TQPainter* p, KexiTableItem *item, int col, int ro if (m_currentItem == item && (col == m_curCol || d->appearance.fullRowSelection)) { if (edit && ((d->appearance.rowHighlightingEnabled && !d->appearance.fullRowSelection) || (row == m_curRow && d->highlightedRow==-1 && d->appearance.fullRowSelection))) //!dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted) edit->paintSelectionBackground( p, isEnabled(), txt, align, x, y_offset, w, h, - isEnabled() ? tqcolorGroup().highlight() : TQColor(200,200,200),//d->grayColor, + isEnabled() ? colorGroup().highlight() : TQColor(200,200,200),//d->grayColor, p->fontMetrics(), columnReadOnly, d->appearance.fullRowSelection ); } @@ -945,15 +945,15 @@ void KexiTableView::paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch // Subtract the table from it // reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts-TQSize(0,m_navPanel->isVisible() ? m_navPanel->height() : 0) ) ); reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts - -TQSize(0,TQMAX((m_navPanel ? m_navPanel->height() : 0), horizontalScrollBar()->tqsizeHint().height()) - - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height()/2 : 0) + -TQSize(0,TQMAX((m_navPanel ? m_navPanel->height() : 0), horizontalScrollBar()->sizeHint().height()) + - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height()/2 : 0) + (horizontalScrollBar()->isVisible() ? 0 : d->internal_bottomMargin -// horizontalScrollBar()->tqsizeHint().height()/2 +// horizontalScrollBar()->sizeHint().height()/2 ) -//- /*d->bottomMargin */ horizontalScrollBar()->tqsizeHint().height()*3/2 +//- /*d->bottomMargin */ horizontalScrollBar()->sizeHint().height()*3/2 + contentsY() -// - (verticalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height()/2 : 0) +// - (verticalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height()/2 : 0) ) ) ); // reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts ) ); @@ -1261,7 +1261,7 @@ void KexiTableView::keyPressEvent(TQKeyEvent* e) const int k = e->key(); const bool ro = isReadOnly(); - TQWidget *w = tqfocusWidget(); + TQWidget *w = focusWidget(); // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view() && w!=m_editor)) { // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view())) { if (!w || TQT_BASE_OBJECT(w)!=TQT_BASE_OBJECT(viewport()) && TQT_TQOBJECT(w)!=TQT_TQOBJECT(this) && (!m_editor || !KexiUtils::hasParent(TQT_TQOBJECT(dynamic_cast<TQT_BASE_OBJECT_NAME*>(m_editor)), TQT_TQOBJECT(w)))) { @@ -1636,10 +1636,10 @@ void KexiTableView::resizeEvent(TQResizeEvent *e) /* m_navPanel->setGeometry( frameWidth(), viewport()->height() +d->pTopHeader->height() - -(horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->tqsizeHint().height()) + -(horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->sizeHint().height()) +frameWidth(), - m_navPanel->tqsizeHint().width(), // - verticalScrollBar()->tqsizeHint().width() - horizontalScrollBar()->tqsizeHint().width(), - horizontalScrollBar()->tqsizeHint().height() + m_navPanel->sizeHint().width(), // - verticalScrollBar()->sizeHint().width() - horizontalScrollBar()->sizeHint().width(), + horizontalScrollBar()->sizeHint().height() );*/ // updateContents(); // m_navPanel->setGeometry(1,horizontalScrollBar()->pos().y(), @@ -1923,42 +1923,42 @@ TQSize KexiTableView::tableSize() const if ((rows()+ (isInsertingEnabled()?1:0) ) > 0 && columns() > 0) { /* kexidbg << "tableSize()= " << columnPos( columns() - 1 ) + columnWidth( columns() - 1 ) << ", " << rowPos( rows()-1+(isInsertingEnabled()?1:0)) + d->rowHeight -// + TQMAX(m_navPanel ? m_navPanel->height() : 0, horizontalScrollBar()->tqsizeHint().height()) - + (m_navPanel->isVisible() ? TQMAX( m_navPanel->height(), horizontalScrollBar()->tqsizeHint().height() ) :0 ) +// + TQMAX(m_navPanel ? m_navPanel->height() : 0, horizontalScrollBar()->sizeHint().height()) + + (m_navPanel->isVisible() ? TQMAX( m_navPanel->height(), horizontalScrollBar()->sizeHint().height() ) :0 ) + margin() << endl; */ // kexidbg<< m_navPanel->isVisible() <<" "<<m_navPanel->height()<<" " -// <<horizontalScrollBar()->tqsizeHint().height()<<" "<<rowPos( rows()-1+(isInsertingEnabled()?1:0))<<endl; +// <<horizontalScrollBar()->sizeHint().height()<<" "<<rowPos( rows()-1+(isInsertingEnabled()?1:0))<<endl; - //int xx = horizontalScrollBar()->tqsizeHint().height()/2; + //int xx = horizontalScrollBar()->sizeHint().height()/2; TQSize s( columnPos( columns() - 1 ) + columnWidth( columns() - 1 ), -// + verticalScrollBar()->tqsizeHint().width(), +// + verticalScrollBar()->sizeHint().width(), rowPos( rows()-1+(isInsertingEnabled()?1:0) ) + d->rowHeight - + (horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->tqsizeHint().height()) + + (horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->sizeHint().height()) + d->internal_bottomMargin -// horizontalScrollBar()->tqsizeHint().height()/2 -// - /*d->bottomMargin */ horizontalScrollBar()->tqsizeHint().height()*3/2 +// horizontalScrollBar()->sizeHint().height()/2 +// - /*d->bottomMargin */ horizontalScrollBar()->sizeHint().height()*3/2 // + ( (m_navPanel && m_navPanel->isVisible() && verticalScrollBar()->isVisible() // && !horizontalScrollBar()->isVisible()) - // ? horizontalScrollBar()->tqsizeHint().height() : 0) + // ? horizontalScrollBar()->sizeHint().height() : 0) // + TQMAX( (m_navPanel && m_navPanel->isVisible()) ? m_navPanel->height() : 0, -// horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height() : 0) +// horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height() : 0) // + (m_navPanel->isVisible() -// ? TQMAX( m_navPanel->height(), horizontalScrollBar()->tqsizeHint().height() ) :0 ) +// ? TQMAX( m_navPanel->height(), horizontalScrollBar()->sizeHint().height() ) :0 ) -// - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height() :0 ) +// - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height() :0 ) + margin() //-2*d->rowHeight ); // kexidbg << rows()-1 <<" "<< (isInsertingEnabled()?1:0) <<" "<< (m_rowEditing?1:0) << " " << s << endl; return s; -// +horizontalScrollBar()->tqsizeHint().height() + margin() ); +// +horizontalScrollBar()->sizeHint().height() + margin() ); } return TQSize(0,0); } @@ -2271,13 +2271,13 @@ void KexiTableView::setVerticalHeaderVisible(bool set) int left_width; if (set) { m_verticalHeader->show(); - left_width = TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight); + left_width = TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight); } else { m_verticalHeader->hide(); left_width = 0; } - setMargins( left_width, horizontalHeaderVisible() ? m_horizontalHeader->tqsizeHint().height() : 0, 0, 0); + setMargins( left_width, horizontalHeaderVisible() ? m_horizontalHeader->sizeHint().height() : 0, 0, 0); } bool KexiTableView::horizontalHeaderVisible() const @@ -2291,7 +2291,7 @@ void KexiTableView::setHorizontalHeaderVisible(bool set) d->horizontalHeaderVisible = set; //needed because isVisible() is not always accurate if (set) { m_horizontalHeader->show(); - top_height = m_horizontalHeader->tqsizeHint().height(); + top_height = m_horizontalHeader->sizeHint().height(); } else { m_horizontalHeader->hide(); @@ -2478,7 +2478,7 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) } /* else if (e->type()==TQEvent::FocusOut && o->inherits(TQWIDGET_OBJECT_NAME_STRING)) { //hp==true if currently focused widget is a child of this table view - const bool hp = KexiUtils::hasParent( static_cast<TQWidget*>(o), tqfocusWidget()); + const bool hp = KexiUtils::hasParent( static_cast<TQWidget*>(o), focusWidget()); if (!hp && KexiUtils::hasParent( this, static_cast<TQWidget*>(o))) { //accept row editing if focus is moved to foreign widget //(not a child, like eg. editor) from one of our table view's tqchildren @@ -2531,8 +2531,8 @@ void KexiTableView::setAppearance(const Appearance& a) m_verticalHeader->setCellHeight(d->rowHeight); if (m_horizontalHeader) { setMargins( - TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight), - m_horizontalHeader->tqsizeHint().height(), 0, 0); + TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight), + m_horizontalHeader->sizeHint().height(), 0, 0); } // } if (a.rowHighlightingEnabled) diff --git a/kexi/widget/tableview/kexitableview.h b/kexi/widget/tableview/kexitableview.h index 9cfcf47e..daabe0f9 100644 --- a/kexi/widget/tableview/kexitableview.h +++ b/kexi/widget/tableview/kexitableview.h @@ -223,8 +223,8 @@ public: // reimplemented for internal reasons virtual TQSizePolicy sizePolicy() const; - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; /*! Reimplemented to update cached fonts and row sizes for the painter. */ void setFont(const TQFont &f); diff --git a/kexi/widget/tableview/kexitableview_p.cpp b/kexi/widget/tableview/kexitableview_p.cpp index d5e1641a..983378cb 100644 --- a/kexi/widget/tableview/kexitableview_p.cpp +++ b/kexi/widget/tableview/kexitableview_p.cpp @@ -48,7 +48,7 @@ KexiTableViewPrivate::KexiTableViewPrivate(KexiTableView* t) //moved scrollBarTipTimerCnt = 0; //moved scrollBarTip = 0; ensureCellVisibleOnShow = TQPoint(-1,-1); - internal_bottomMargin = tv->horizontalScrollBar()->tqsizeHint().height()/2; + internal_bottomMargin = tv->horizontalScrollBar()->sizeHint().height()/2; highlightedRow = -1; moveCursorOnMouseRelease = false; horizontalHeaderVisible = true; diff --git a/kexi/widget/tableview/kexitableviewdata.cpp b/kexi/widget/tableview/kexitableviewdata.cpp index 5905706b..ad670e3e 100644 --- a/kexi/widget/tableview/kexitableviewdata.cpp +++ b/kexi/widget/tableview/kexitableviewdata.cpp @@ -822,7 +822,7 @@ void KexiTableViewData::clearInternal() removeLast(); #ifndef KEXI_NO_PROCESS_EVENTS if (i % 1000 == 0) - tqApp->tqprocessEvents( 1 ); + tqApp->processEvents( 1 ); #endif } } @@ -873,7 +873,7 @@ void KexiTableViewData::preloadAllRows() m_cursor->moveNext(); #ifndef KEXI_NO_PROCESS_EVENTS if ((i % 1000) == 0) - tqApp->tqprocessEvents( 1 ); + tqApp->processEvents( 1 ); #endif } } diff --git a/kexi/widget/tableview/kexitableviewheader.cpp b/kexi/widget/tableview/kexitableviewheader.cpp index 4a00be38..d217337b 100644 --- a/kexi/widget/tableview/kexitableviewheader.cpp +++ b/kexi/widget/tableview/kexitableviewheader.cpp @@ -126,7 +126,7 @@ bool KexiTableViewHeader::eventFilter(TQObject * watched, TQEvent * e) TQString tip = m_toolTips[ section ]; if (tip.isEmpty()) { //try label TQFontMetrics fm(font()); - int minWidth = fm.width( label( section ) ) + tqstyle().tqpixelMetric( TQStyle::PM_HeaderMargin ); + int minWidth = fm.width( label( section ) ) + tqstyle().pixelMetric( TQStyle::PM_HeaderMargin ); TQIconSet *iset = iconSet( section ); if (iset) minWidth += (2+iset->pixmap( TQIconSet::Small, TQIconSet::Normal ).width()); //taken from TQHeader::sectionSizeHint() diff --git a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp index 777fea1b..60f99f85 100644 --- a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp +++ b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp @@ -53,18 +53,18 @@ void KexiComboBoxDropDownButton::drawButton(TQPainter *p) TQRect r = rect(); r.setHeight(r.height()+m_fixForHeight); - if (m_tqdrawComplexControl) { + if (m_drawComplexControl) { if (m_fixForHeight>0 && m_paintedCombo->size()!=size()) { m_paintedCombo->move(0,0); m_paintedCombo->setFixedSize(size()+TQSize(0, m_fixForHeight)); //last chance to fix size } - tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, p, - m_fixForHeight>0 ? (const TQWidget*)m_paintedCombo : this, r, tqcolorGroup(), + tqstyle().drawComplexControl( TQStyle::CC_ComboBox, p, + m_fixForHeight>0 ? (const TQWidget*)m_paintedCombo : this, r, colorGroup(), flags, (uint)(TQStyle::SC_ComboBoxArrow), TQStyle::SC_None ); } else { r.setWidth(r.width()+2); - tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, p, r, tqcolorGroup(), flags); + tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, p, r, colorGroup(), flags); } } @@ -77,7 +77,7 @@ void KexiComboBoxDropDownButton::styleChange( TQStyle & oldStyle ) else m_fixForHeight = 0; //</hack> - m_tqdrawComplexControl = + m_drawComplexControl = (tqstyle().inherits("KStyle") && qstricmp(tqstyle().name(),"qtcurve")!=0) || qstricmp(tqstyle().name(),"platinum")==0; if (m_fixForHeight==0) diff --git a/kexi/widget/utils/kexicomboboxdropdownbutton.h b/kexi/widget/utils/kexicomboboxdropdownbutton.h index f480de74..94c26484 100644 --- a/kexi/widget/utils/kexicomboboxdropdownbutton.h +++ b/kexi/widget/utils/kexicomboboxdropdownbutton.h @@ -41,7 +41,7 @@ class KEXIGUIUTILS_EXPORT KexiComboBoxDropDownButton : public KPushButton virtual void styleChange( TQStyle & oldStyle ); int m_fixForHeight; - bool m_tqdrawComplexControl : 1; + bool m_drawComplexControl : 1; KComboBox *m_paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle //!< (because styles use \<static_cast\>) }; diff --git a/kexi/widget/utils/kexicontextmenuutils.cpp b/kexi/widget/utils/kexicontextmenuutils.cpp index 3c6b22f0..f34864a9 100644 --- a/kexi/widget/utils/kexicontextmenuutils.cpp +++ b/kexi/widget/utils/kexicontextmenuutils.cpp @@ -96,7 +96,7 @@ KexiImageContextMenu::~KexiImageContextMenu() void KexiImageContextMenu::insertFromFile() { -// TQWidget *tqfocusWidget = tqApp->tqfocusWidget(); +// TQWidget *focusWidget = tqApp->focusWidget(); #ifdef TQ_WS_WIN TQString recentDir; TQString fileName = TQFileDialog::getOpenFileName( @@ -116,8 +116,8 @@ void KexiImageContextMenu::insertFromFile() if (!url.isValid()) { //focus the app again because to avoid annoying the user with unfocused main window if (tqApp->mainWidget()) { - //tqfocusWidget->raise(); - //tqfocusWidget->setFocus(); + //focusWidget->raise(); + //focusWidget->setFocus(); tqApp->mainWidget()->raise(); } return; @@ -133,8 +133,8 @@ void KexiImageContextMenu::insertFromFile() emit insertFromFileRequested(url); if (tqApp->mainWidget()) { -// tqfocusWidget->raise(); -// tqfocusWidget->setFocus(); +// focusWidget->raise(); +// focusWidget->setFocus(); tqApp->mainWidget()->raise(); } } diff --git a/kexi/widget/utils/kexidatetimeformatter.cpp b/kexi/widget/utils/kexidatetimeformatter.cpp index 718fcbf6..b11961d2 100644 --- a/kexi/widget/utils/kexidatetimeformatter.cpp +++ b/kexi/widget/utils/kexidatetimeformatter.cpp @@ -294,20 +294,20 @@ TQString KexiTimeFormatter::timeToString( const TQTime& time ) const TQString s(m_outputFormat); if (m_24h) { if (m_hoursWithLeadingZero) - s.replace( "%H", TQString::tqfromLatin1(time.hour()<10 ? "0" : "") + TQString::number(time.hour()) ); + s.replace( "%H", TQString::fromLatin1(time.hour()<10 ? "0" : "") + TQString::number(time.hour()) ); else s.replace( "%k", TQString::number(time.hour()) ); } else { int time12 = (time.hour()>12) ? (time.hour()-12) : time.hour(); if (m_hoursWithLeadingZero) - s.replace( "%I", TQString::tqfromLatin1(time12<10 ? "0" : "") + TQString::number(time12) ); + s.replace( "%I", TQString::fromLatin1(time12<10 ? "0" : "") + TQString::number(time12) ); else s.replace( "%l", TQString::number(time12) ); } - s.replace( "%M", TQString::tqfromLatin1(time.minute()<10 ? "0" : "") + TQString::number(time.minute()) ); + s.replace( "%M", TQString::fromLatin1(time.minute()<10 ? "0" : "") + TQString::number(time.minute()) ); if (m_secpos>=0) - s.replace( "%S", TQString::tqfromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) ); + s.replace( "%S", TQString::fromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) ); if (m_ampmpos>=0) s.replace( "%p", KGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") ); return s; diff --git a/kexi/widget/utils/kexidropdownbutton.cpp b/kexi/widget/utils/kexidropdownbutton.cpp index 909d507c..054192ce 100644 --- a/kexi/widget/utils/kexidropdownbutton.cpp +++ b/kexi/widget/utils/kexidropdownbutton.cpp @@ -28,7 +28,7 @@ KexiDropDownButton::KexiDropDownButton(TQWidget *parent) : TQToolButton(parent, "KexiDBImageBox::Button") { - tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); + setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); //! @todo get this from a KStyle // setFixedWidth(TQMAX(18, tqApp->globalStrut().width())); int fixedWidth; @@ -55,11 +55,11 @@ void KexiDropDownButton::drawButton( TQPainter *p ) if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, p, - TQRect((width()-7)/2, height()-9, 7, 7), tqcolorGroup(), + TQRect((width()-7)/2, height()-9, 7, 7), colorGroup(), arrowFlags, TQStyleOption() ); } -TQSize KexiDropDownButton::tqsizeHint () const +TQSize KexiDropDownButton::sizeHint () const { return TQSize( fontMetrics().maxWidth() + 2*2, fontMetrics().height()*2 + 2*2 ); } diff --git a/kexi/widget/utils/kexidropdownbutton.h b/kexi/widget/utils/kexidropdownbutton.h index e61ab9f5..178f17a7 100644 --- a/kexi/widget/utils/kexidropdownbutton.h +++ b/kexi/widget/utils/kexidropdownbutton.h @@ -38,7 +38,7 @@ class KEXIGUIUTILS_EXPORT KexiDropDownButton : public TQToolButton virtual void drawButton( TQPainter *p ); - virtual TQSize tqsizeHint () const; + virtual TQSize sizeHint () const; virtual void keyPressEvent ( TQKeyEvent * e ); }; diff --git a/kexi/widget/utils/kexiflowlayout.cpp b/kexi/widget/utils/kexiflowlayout.cpp index e4bc4207..50959770 100644 --- a/kexi/widget/utils/kexiflowlayout.cpp +++ b/kexi/widget/utils/kexiflowlayout.cpp @@ -137,7 +137,7 @@ void KexiFlowLayout::tqinvalidate() { TQLayout::tqinvalidate(); - m_cached_tqsizeHint = TQSize(); + m_cached_sizeHint = TQSize(); m_cached_minSize = TQSize(); m_cached_width = 0; } @@ -169,22 +169,22 @@ KexiFlowLayout::heightForWidth(int w) const } TQSize -KexiFlowLayout::tqsizeHint() const +KexiFlowLayout::sizeHint() const { - if(m_cached_tqsizeHint.isEmpty()) { + if(m_cached_sizeHint.isEmpty()) { KexiFlowLayout *mthis = (KexiFlowLayout*)this; TQRect r = TQRect(0, 0, 2000, 2000); mthis->simulateLayout(r); } - return m_cached_tqsizeHint; + return m_cached_sizeHint; } TQSize -KexiFlowLayout::tqminimumSize() const +KexiFlowLayout::minimumSize() const { //js: do we really need to simulate tqlayout here? // I commented this out because it was impossible to stretch tqlayout conveniently. -// Now, minimum size is computed automatically based on item's tqminimumSize... +// Now, minimum size is computed automatically based on item's minimumSize... #if 0 if(m_cached_minSize.isEmpty()) { KexiFlowLayout *mthis = (KexiFlowLayout*)this; @@ -234,7 +234,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) TQPtrListIterator<TQLayoutItem> it(m_list); TQPtrList<TQLayoutItem> currentLine; TQLayoutItem *o; - TQSize minSize, tqsizeHint(20, 20); + TQSize minSize, sizeHint(20, 20); int minSizeHeight = 0 - spacing(); while ( (o = it.current()) != 0 ) { @@ -244,7 +244,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) } // kdDebug() << "- doHorizontalLayout(): " << o->widget()->className() << " " << o->widget()->name() << endl; - TQSize oSizeHint = o->tqsizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) + TQSize oSizeHint = o->sizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) if ((x + oSizeHint.width()) > r.right() && h > 0) { // do the tqlayout of current line TQPtrListIterator<TQLayoutItem> it2(currentLine); @@ -252,12 +252,12 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) int wx = r.x(); int sizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Horizontally || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Horizontally || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / expandingWidgets , r.width()), itemSizeHint.height() ); else @@ -277,7 +277,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) lineMinHeight = TQMAX( lineMinHeight, itemMinSize.height() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize(sizeHintWidth, 0) ); + sizeHint = sizeHint.expandedTo( TQSize(sizeHintWidth, 0) ); minSize = minSize.expandedTo( TQSize(minSizeWidth, 0) ); minSizeHeight = minSizeHeight + spacing() + lineMinHeight; // start a new line @@ -292,7 +292,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) x = x + spacing() + oSizeHint.width(); h = TQMAX( h, oSizeHint.height() ); currentLine.append(o); - if(o->expandingDirections() == TQSizePolicy::Horizontally || o->expandingDirections() == TQSizePolicy::BothDirections) + if(o->expanding() == TQSizePolicy::Horizontally || o->expanding() == TQSizePolicy::BothDirections) ++expandingWidgets; availableSpace = TQMAX(0, availableSpace - spacing() - oSizeHint.width()); ++it; @@ -304,12 +304,12 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) int wx = r.x(); int sizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Horizontally || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Horizontally || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / expandingWidgets , r.width()), itemSizeHint.height() ); else @@ -329,12 +329,12 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) lineMinHeight = TQMAX( lineMinHeight, itemMinSize.height() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize(sizeHintWidth, y + spacing() + h) ); + sizeHint = sizeHint.expandedTo( TQSize(sizeHintWidth, y + spacing() + h) ); minSizeHeight = minSizeHeight + spacing() + lineMinHeight; minSize = minSize.expandedTo( TQSize(minSizeWidth, minSizeHeight) ); - // store tqsizeHint() and tqminimumSize() - m_cached_tqsizeHint = tqsizeHint + TQSize(2* margin(), 2*margin()); + // store sizeHint() and minimumSize() + m_cached_sizeHint = sizeHint + TQSize(2* margin(), 2*margin()); m_cached_minSize = minSize + TQSize(2* margin() , 2*margin()); // return our height return y + h - r.y(); @@ -351,7 +351,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) TQPtrListIterator<TQLayoutItem> it(m_list); TQPtrList<TQLayoutItem> currentLine; TQLayoutItem *o; - TQSize minSize, tqsizeHint(20, 20); + TQSize minSize, sizeHint(20, 20); int minSizeWidth = 0 - spacing(); while ( (o = it.current()) != 0 ) { @@ -360,7 +360,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) continue; } - TQSize oSizeHint = o->tqsizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) + TQSize oSizeHint = o->sizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) if (y + oSizeHint.height() > r.bottom() && w > 0) { // do the tqlayout of current line TQPtrListIterator<TQLayoutItem> it2(currentLine); @@ -368,12 +368,12 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) int wy = r.y(); int sizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Vertically || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Vertically || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / expandingWidgets , r.height()) ); else @@ -393,7 +393,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) colMinWidth = TQMAX( colMinWidth, itemMinSize.width() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize(0, sizeHintHeight) ); + sizeHint = sizeHint.expandedTo( TQSize(0, sizeHintHeight) ); minSize = minSize.expandedTo( TQSize(0, minSizeHeight) ); minSizeWidth = minSizeWidth + spacing() + colMinWidth; // start a new column @@ -408,7 +408,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) y = y + spacing() + oSizeHint.height(); w = TQMAX( w, oSizeHint.width() ); currentLine.append(o); - if(o->expandingDirections() == TQSizePolicy::Vertically || o->expandingDirections() == TQSizePolicy::BothDirections) + if(o->expanding() == TQSizePolicy::Vertically || o->expanding() == TQSizePolicy::BothDirections) ++expandingWidgets; availableSpace = TQMAX(0, availableSpace - spacing() - oSizeHint.height()); ++it; @@ -420,12 +420,12 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) int wy = r.y(); int sizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Vertically || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Vertically || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / expandingWidgets , r.height()) ); else @@ -445,12 +445,12 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) colMinWidth = TQMAX( colMinWidth, itemMinSize.width() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize( x + spacing() + w, sizeHintHeight) ); + sizeHint = sizeHint.expandedTo( TQSize( x + spacing() + w, sizeHintHeight) ); minSizeWidth = minSizeWidth + spacing() + colMinWidth; minSize = minSize.expandedTo( TQSize(minSizeWidth, minSizeHeight) ); - // store tqsizeHint() and tqminimumSize() - m_cached_tqsizeHint = tqsizeHint + TQSize(2* margin(), 2*margin()); + // store sizeHint() and minimumSize() + m_cached_sizeHint = sizeHint + TQSize(2* margin(), 2*margin()); m_cached_minSize = minSize + TQSize(2* margin(), 2*margin()); // return our width return x + w - r.x(); diff --git a/kexi/widget/utils/kexiflowlayout.h b/kexi/widget/utils/kexiflowlayout.h index 0f6d8384..c4550fca 100644 --- a/kexi/widget/utils/kexiflowlayout.h +++ b/kexi/widget/utils/kexiflowlayout.h @@ -53,8 +53,8 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout virtual bool hasHeightForWidth() const; virtual int heightForWidth(int width) const; - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSize() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSize() const; virtual TQSizePolicy::ExpandData expanding() const; virtual bool isEmpty(); @@ -75,7 +75,7 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout int m_cached_hfw; bool m_justify; Qt::Orientation m_orientation; - TQSize m_cached_tqsizeHint; + TQSize m_cached_sizeHint; TQSize m_cached_minSize; }; diff --git a/kexi/widget/utils/kexirecordmarker.cpp b/kexi/widget/utils/kexirecordmarker.cpp index b22e0500..e3e281e3 100644 --- a/kexi/widget/utils/kexirecordmarker.cpp +++ b/kexi/widget/utils/kexirecordmarker.cpp @@ -188,13 +188,13 @@ void KexiRecordMarker::paintEvent(TQPaintEvent *e) if(last > (d->rows-1+(d->showInsertRow?1:0))) last = d->rows-1+(d->showInsertRow?1:0); - TQColorGroup selectedColorGroup(tqcolorGroup()); + TQColorGroup selectedColorGroup(colorGroup()); selectedColorGroup.setColor( TQColorGroup::Button, KexiUtils::blendedColors( selectedColorGroup.color(TQColorGroup::Background), d->selectionBackgroundColor, 2, 1) ); selectedColorGroup.setColor( TQColorGroup::Background, selectedColorGroup.color(TQColorGroup::Button) ); //set background color as well (e.g. for thinkeramik) - TQColorGroup highlightedColorGroup(tqcolorGroup()); + TQColorGroup highlightedColorGroup(colorGroup()); highlightedColorGroup.setColor( TQColorGroup::Button, KexiUtils::blendedColors( highlightedColorGroup.color(TQColorGroup::Background), d->selectionBackgroundColor, 4, 1) ); @@ -206,7 +206,7 @@ void KexiRecordMarker::paintEvent(TQPaintEvent *e) TQRect r(0, y, width(), d->rowHeight); p.drawRect(r); tqstyle().tqdrawPrimitive( TQStyle::PE_HeaderSection, &p, r, - (d->currentRow == i) ? selectedColorGroup : (d->highlightedRow == i ? highlightedColorGroup : tqcolorGroup()), + (d->currentRow == i) ? selectedColorGroup : (d->highlightedRow == i ? highlightedColorGroup : colorGroup()), TQStyle::Style_Raised | (isEnabled() ? TQStyle::Style_Enabled : 0)); } if (d->editRow!=-1 && d->editRow >= first && d->editRow <= (last/*+1 for insert row*/)) { @@ -220,7 +220,7 @@ void KexiRecordMarker::paintEvent(TQPaintEvent *e) && (!d->showInsertRow || (d->showInsertRow && d->currentRow < last)))/*don't display marker for 'insert' row*/ { //show marker - p.setBrush(tqcolorGroup().foreground()); + p.setBrush(colorGroup().foreground()); p.setPen(TQPen(TQt::NoPen)); TQPointArray points(3); int ofs = d->rowHeight / 4; diff --git a/kexi/widget/utils/kexirecordnavigator.cpp b/kexi/widget/utils/kexirecordnavigator.cpp index 4c1dd02b..9dd8cccc 100644 --- a/kexi/widget/utils/kexirecordnavigator.cpp +++ b/kexi/widget/utils/kexirecordnavigator.cpp @@ -102,7 +102,7 @@ KexiRecordNavigator::KexiRecordNavigator(TQWidget *parent, int leftMargin, const d->lyr->addSpacing( 6 ); d->lyr->addWidget( m_navRecordNumber = new KLineEdit(this) ); - m_navRecordNumber->tqsetAlignment(AlignRight | AlignVCenter); + m_navRecordNumber->setAlignment(AlignRight | AlignVCenter); m_navRecordNumber->setFocusPolicy(TQ_ClickFocus); m_navRecordNumber->installEventFilter(this); // m_navRowNumber->setFixedWidth(fw); @@ -112,20 +112,20 @@ KexiRecordNavigator::KexiRecordNavigator(TQWidget *parent, int leftMargin, const TQToolTip::add(m_navRecordNumber, i18n("Current row number")); KLineEdit *lbl_of = new KLineEdit(i18n("of"), this); - lbl_of->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); + lbl_of->setSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); lbl_of->setMaximumWidth(fm.width(lbl_of->text())+8); lbl_of->setReadOnly(true); lbl_of->setLineWidth(0); lbl_of->setFocusPolicy(TQ_NoFocus); - lbl_of->tqsetAlignment(AlignCenter); + lbl_of->setAlignment(AlignCenter); d->lyr->addWidget( lbl_of ); d->lyr->addWidget( m_navRecordCount = new KLineEdit(this) ); - m_navRecordCount->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); + m_navRecordCount->setSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); m_navRecordCount->setReadOnly(true); m_navRecordCount->setLineWidth(0); m_navRecordCount->setFocusPolicy(TQ_NoFocus); - m_navRecordCount->tqsetAlignment(AlignLeft | AlignVCenter); + m_navRecordCount->setAlignment(AlignLeft | AlignVCenter); TQToolTip::add(m_navRecordCount, i18n("Number of rows")); lbl_of->setFont(f); @@ -337,7 +337,7 @@ void KexiRecordNavigator::updateGeometry(int leftMargin) if (m_view) { int navWidth; if (m_view->horizontalScrollBar()->isVisible()) { - navWidth = tqsizeHint().width(); + navWidth = sizeHint().width(); } else { navWidth = leftMargin + m_view->clipper()->width(); @@ -345,9 +345,9 @@ void KexiRecordNavigator::updateGeometry(int leftMargin) setGeometry( m_view->frameWidth(), - m_view->height() - m_view->horizontalScrollBar()->tqsizeHint().height()-m_view->frameWidth(), + m_view->height() - m_view->horizontalScrollBar()->sizeHint().height()-m_view->frameWidth(), navWidth, - m_view->horizontalScrollBar()->tqsizeHint().height() + m_view->horizontalScrollBar()->sizeHint().height() ); m_view->updateScrollBars(); @@ -361,7 +361,7 @@ void KexiRecordNavigator::setHBarGeometry( TQScrollBar & hbar, int x, int y, int void KexiRecordNavigator::setLabelText(const TQString& text) { - m_textLabel->setText(text.isEmpty() ? TQString() : (TQString::tqfromLatin1(" ")+text+" ")); + m_textLabel->setText(text.isEmpty() ? TQString() : (TQString::fromLatin1(" ")+text+" ")); } void KexiRecordNavigator::setInsertingButtonVisible(bool set) @@ -429,7 +429,7 @@ void KexiRecordNavigator::setEditingIndicatorEnabled(bool set) if (d->editingIndicatorEnabled) { if (!d->editingIndicatorLabel) { d->editingIndicatorLabel = new TQLabel(this); - d->editingIndicatorLabel->tqsetAlignment(TQt::AlignCenter); + d->editingIndicatorLabel->setAlignment(TQt::AlignCenter); TQPixmap pix; pix.convertFromImage( *KexiRecordMarker::penImage() ); d->editingIndicatorLabel->setFixedWidth( pix.width() + 2*2 ); diff --git a/kexi/widget/utils/kexitooltip.cpp b/kexi/widget/utils/kexitooltip.cpp index 7d71752c..ad55774e 100644 --- a/kexi/widget/utils/kexitooltip.cpp +++ b/kexi/widget/utils/kexitooltip.cpp @@ -42,7 +42,7 @@ KexiToolTip::~KexiToolTip() { } -TQSize KexiToolTip::tqsizeHint() const +TQSize KexiToolTip::sizeHint() const { TQSize sz(fontMetrics().boundingRect(m_value.toString()).size()); return sz; diff --git a/kexi/widget/utils/kexitooltip.h b/kexi/widget/utils/kexitooltip.h index cfa1b483..83d0d7e0 100644 --- a/kexi/widget/utils/kexitooltip.h +++ b/kexi/widget/utils/kexitooltip.h @@ -32,7 +32,7 @@ class KEXIGUIUTILS_EXPORT KexiToolTip : public TQWidget KexiToolTip(const TQVariant& value, TQWidget* parent); virtual ~KexiToolTip(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: virtual void show(); |