summaryrefslogtreecommitdiffstats
path: root/kexi/core
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/core')
-rw-r--r--kexi/core/kexi.cpp118
-rw-r--r--kexi/core/kexi.h60
-rw-r--r--kexi/core/kexiaboutdata.cpp2
-rw-r--r--kexi/core/kexiactioncategories.cpp20
-rw-r--r--kexi/core/kexiactionproxy.cpp76
-rw-r--r--kexi/core/kexiactionproxy.h58
-rw-r--r--kexi/core/kexiactionproxy_p.h5
-rw-r--r--kexi/core/kexiblobbuffer.cpp84
-rw-r--r--kexi/core/kexiblobbuffer.h55
-rw-r--r--kexi/core/kexicontexthelp.cpp12
-rw-r--r--kexi/core/kexicontexthelp.h7
-rw-r--r--kexi/core/kexicontexthelp_p.h6
-rw-r--r--kexi/core/kexidataiteminterface.cpp30
-rw-r--r--kexi/core/kexidataiteminterface.h52
-rw-r--r--kexi/core/kexidbconnectionset.cpp52
-rw-r--r--kexi/core/kexidbconnectionset.h12
-rw-r--r--kexi/core/kexidbshortcutfile.cpp66
-rw-r--r--kexi/core/kexidbshortcutfile.h18
-rw-r--r--kexi/core/kexidialogbase.cpp106
-rw-r--r--kexi/core/kexidialogbase.h65
-rw-r--r--kexi/core/kexidragobjects.cpp68
-rw-r--r--kexi/core/kexidragobjects.h46
-rw-r--r--kexi/core/kexievents.cpp16
-rw-r--r--kexi/core/kexievents.h60
-rw-r--r--kexi/core/kexiguimsghandler.cpp54
-rw-r--r--kexi/core/kexiguimsghandler.h26
-rw-r--r--kexi/core/kexiinternalpart.cpp52
-rw-r--r--kexi/core/kexiinternalpart.h55
-rw-r--r--kexi/core/keximainwindow.h27
-rw-r--r--kexi/core/kexipart.cpp82
-rw-r--r--kexi/core/kexipart.h57
-rw-r--r--kexi/core/kexipartguiclient.h6
-rw-r--r--kexi/core/kexipartinfo.cpp24
-rw-r--r--kexi/core/kexipartinfo.h18
-rw-r--r--kexi/core/kexipartinfo_p.h10
-rw-r--r--kexi/core/kexipartitem.h44
-rw-r--r--kexi/core/kexipartmanager.cpp40
-rw-r--r--kexi/core/kexipartmanager.h41
-rw-r--r--kexi/core/kexiproject.cpp134
-rw-r--r--kexi/core/kexiproject.h47
-rw-r--r--kexi/core/kexiprojectconnectiondata.cpp68
-rw-r--r--kexi/core/kexiprojectconnectiondata.h28
-rw-r--r--kexi/core/kexiprojectdata.cpp40
-rw-r--r--kexi/core/kexiprojectdata.h26
-rw-r--r--kexi/core/kexiprojectset.cpp10
-rw-r--r--kexi/core/kexiprojectset.h2
-rw-r--r--kexi/core/kexisearchandreplaceiface.h18
-rw-r--r--kexi/core/kexisharedactionhost.cpp58
-rw-r--r--kexi/core/kexisharedactionhost.h28
-rw-r--r--kexi/core/kexisharedactionhost_p.h19
-rw-r--r--kexi/core/kexistartupdata.cpp4
-rw-r--r--kexi/core/kexistartupdata.h6
-rw-r--r--kexi/core/kexistaticpart.cpp8
-rw-r--r--kexi/core/kexistaticpart.h12
-rw-r--r--kexi/core/kexitabledesignerinterface.h10
-rw-r--r--kexi/core/kexitemplateloader.cpp36
-rw-r--r--kexi/core/kexitemplateloader.h12
-rw-r--r--kexi/core/kexitextmsghandler.cpp10
-rw-r--r--kexi/core/kexitextmsghandler.h6
-rw-r--r--kexi/core/kexiuseraction.cpp18
-rw-r--r--kexi/core/kexiuseraction.h11
-rw-r--r--kexi/core/kexiuseractionmethod.cpp4
-rw-r--r--kexi/core/kexiuseractionmethod.h14
-rw-r--r--kexi/core/kexiviewbase.cpp82
-rw-r--r--kexi/core/kexiviewbase.h57
65 files changed, 1205 insertions, 1193 deletions
diff --git a/kexi/core/kexi.cpp b/kexi/core/kexi.cpp
index 74e158f6a..4efb6d7b7 100644
--- a/kexi/core/kexi.cpp
+++ b/kexi/core/kexi.cpp
@@ -24,12 +24,12 @@
#include <kexiutils/identifier.h>
#include <kexidb/msghandler.h>
-#include <qtimer.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qcolor.h>
-#include <qfileinfo.h>
+#include <tqtimer.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqcolor.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kcursor.h>
@@ -63,7 +63,7 @@ class KexiInternal : public KShared
KexiDBConnectionSet recentConnections;
KexiDB::DriverManager driverManager;
KexiPart::Manager partManager;
- QFont *smallFont;
+ TQFont *smallFont;
};
static KStaticDeleter<KexiInternal> Kexi_intDeleter;
@@ -140,21 +140,21 @@ bool& Kexi::tempShowScripts() {
//--------------------------------------------------------------------------------
-QFont Kexi::smallFont(QWidget *init)
+TQFont Kexi::smallFont(TQWidget *init)
{
_INIT_SHARED;
if (!_int->smallFont) {
- _int->smallFont = new QFont( init->font() );
+ _int->smallFont = new TQFont( init->font() );
const int wdth = KGlobalSettings::desktopGeometry(init).width();
- int size = 10 + QMAX(0, wdth - 1100) / 100;
- size = QMIN( init->fontInfo().pixelSize(), size );
+ int size = 10 + TQMAX(0, wdth - 1100) / 100;
+ size = TQMIN( init->fontInfo().pixelSize(), size );
_int->smallFont->setPixelSize( size );
}
return *_int->smallFont;
}
//--------------------------------------------------------------------------------
-QString Kexi::nameForViewMode(int m)
+TQString Kexi::nameForViewMode(int m)
{
if (m==NoViewMode) return i18n("No View");
else if (m==DataViewMode) return i18n("Data View");
@@ -166,62 +166,62 @@ QString Kexi::nameForViewMode(int m)
//--------------------------------------------------------------------------------
-QString Kexi::msgYouCanImproveData() {
+TQString Kexi::msgYouCanImproveData() {
return i18n("You can correct data in this row or use \"Cancel row changes\" function.");
}
//--------------------------------------------------------------------------------
-ObjectStatus::ObjectStatus()
+ObjecttqStatus::ObjecttqStatus()
: msgHandler(0)
{
}
-ObjectStatus::ObjectStatus(const QString& message, const QString& description)
+ObjecttqStatus::ObjecttqStatus(const TQString& message, const TQString& description)
: msgHandler(0)
{
- setStatus(message, description);
+ settqStatus(message, description);
}
-ObjectStatus::ObjectStatus(KexiDB::Object* dbObject, const QString& message, const QString& description)
+ObjecttqStatus::ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description)
: msgHandler(0)
{
- setStatus(dbObject, message, description);
+ settqStatus(dbObject, message, description);
}
-ObjectStatus::~ObjectStatus()
+ObjecttqStatus::~ObjecttqStatus()
{
delete msgHandler;
}
-const ObjectStatus& ObjectStatus::status() const
+const ObjecttqStatus& ObjecttqStatus::status() const
{
return *this;
}
-bool ObjectStatus::error() const
+bool ObjecttqStatus::error() const
{
return !message.isEmpty()
- || (dynamic_cast<KexiDB::Object*>((QObject*)dbObj) && dynamic_cast<KexiDB::Object*>((QObject*)dbObj)->error());
+ || (dynamic_cast<KexiDB::Object*>((TQObject*)dbObj) && dynamic_cast<KexiDB::Object*>((TQObject*)dbObj)->error());
}
-void ObjectStatus::setStatus(const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(const TQString& message, const TQString& description)
{
this->dbObj=0;
this->message=message;
this->description=description;
}
-void ObjectStatus::setStatus(KexiDB::Object* dbObject, const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description)
{
- if (dynamic_cast<QObject*>(dbObject)) {
- dbObj = dynamic_cast<QObject*>(dbObject);
+ if (dynamic_cast<TQObject*>(dbObject)) {
+ dbObj = dynamic_cast<TQObject*>(dbObject);
}
this->message=message;
this->description=description;
}
-void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description)
{
if (result) {
if (message.isEmpty())
@@ -235,41 +235,41 @@ void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const QString& message,
this->description = description + " " + result->desc;
}
else
- clearStatus();
+ cleartqStatus();
}
-void ObjectStatus::setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
- const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
+ const TQString& message, const TQString& description)
{
if (!dbObject)
- setStatus(result, message, description);
+ settqStatus(result, message, description);
else if (!result)
- setStatus(dbObject, message, description);
+ settqStatus(dbObject, message, description);
else {
- setStatus(dbObject, message, description);
- setStatus(result, this->message, this->description);
+ settqStatus(dbObject, message, description);
+ settqStatus(result, this->message, this->description);
}
}
-void ObjectStatus::clearStatus()
+void ObjecttqStatus::cleartqStatus()
{
- message=QString::null;
- description=QString::null;
+ message=TQString();
+ description=TQString();
}
-QString ObjectStatus::singleStatusString() const {
+TQString ObjecttqStatus::singleStatusString() const {
if (message.isEmpty() || description.isEmpty())
return message;
return message + " " + description;
}
-void ObjectStatus::append( const ObjectStatus& otherStatus ) {
+void ObjecttqStatus::append( const ObjecttqStatus& othertqStatus ) {
if (message.isEmpty()) {
- message = otherStatus.message;
- description = otherStatus.description;
+ message = othertqStatus.message;
+ description = othertqStatus.description;
return;
}
- const QString s( otherStatus.singleStatusString() );
+ const TQString s( othertqStatus.singleStatusString() );
if (s.isEmpty())
return;
if (description.isEmpty()) {
@@ -283,7 +283,7 @@ void ObjectStatus::append( const ObjectStatus& otherStatus ) {
class ObjectStatusMessageHandler : public KexiDB::MessageHandler
{
public:
- ObjectStatusMessageHandler(ObjectStatus *status)
+ ObjectStatusMessageHandler(ObjecttqStatus *status)
: KexiDB::MessageHandler()
, m_status(status)
{
@@ -292,21 +292,21 @@ class ObjectStatusMessageHandler : public KexiDB::MessageHandler
{
}
- virtual void showErrorMessage(const QString &title,
- const QString &details = QString::null)
+ virtual void showErrorMessage(const TQString &title,
+ const TQString &details = TQString())
{
- m_status->setStatus(title, details);
+ m_status->settqStatus(title, details);
}
- virtual void showErrorMessage(KexiDB::Object *obj, const QString& msg = QString::null)
+ virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString())
{
- m_status->setStatus(obj, msg);
+ m_status->settqStatus(obj, msg);
}
- ObjectStatus *m_status;
+ ObjecttqStatus *m_status;
};
-ObjectStatus::operator KexiDB::MessageHandler*()
+ObjecttqStatus::operator KexiDB::MessageHandler*()
{
if (!msgHandler)
msgHandler = new ObjectStatusMessageHandler(this);
@@ -325,22 +325,22 @@ void Kexi::initCmdLineArgs(int argc, char *argv[], KAboutData* aboutData)
KCmdLineArgs::addCmdLineOptions( options );
}
-void KEXI_UNFINISHED(const QString& feature_name, const QString& extra_text)
+void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text)
{
- QString msg;
+ TQString msg;
if (feature_name.isEmpty())
msg = i18n("This function is not available for version %1 of %2 application.")
- .arg(KEXI_VERSION_STRING)
- .arg(KEXI_APP_NAME);
+ .tqarg(KEXI_VERSION_STRING)
+ .tqarg(KEXI_APP_NAME);
else {
- QString feature_name_(feature_name);
+ TQString feature_name_(feature_name);
msg = i18n("\"%1\" function is not available for version %2 of %3 application.")
- .arg(feature_name_.replace("&",""))
- .arg(KEXI_VERSION_STRING)
- .arg(KEXI_APP_NAME);
+ .tqarg(feature_name_.tqreplace("&",""))
+ .tqarg(KEXI_VERSION_STRING)
+ .tqarg(KEXI_APP_NAME);
}
- QString extra_text_(extra_text);
+ TQString extra_text_(extra_text);
if (!extra_text_.isEmpty())
extra_text_.prepend("\n");
diff --git a/kexi/core/kexi.h b/kexi/core/kexi.h
index 8490ca290..a98f93413 100644
--- a/kexi/core/kexi.h
+++ b/kexi/core/kexi.h
@@ -20,8 +20,8 @@
#ifndef KEXI_H
#define KEXI_H
-#include <qguardedptr.h>
-#include <qfont.h>
+#include <tqguardedptr.h>
+#include <tqfont.h>
#include <kexi_version.h>
#include "kexiprojectdata.h"
@@ -42,13 +42,13 @@ namespace Kexi
enum ViewMode {
AllViewModes = 0, //!< Usable primarily in KexiPart::initInstanceActions()
NoViewMode = 0, //!< In KexiViewBase::afterSwitchFrom() and KexiViewBase::beforeSwitchTo()
- //!< means that parent dialog of the view has not yet view defined.
+ //!< means that tqparent dialog of the view has not yet view defined.
DataViewMode = 1,
DesignViewMode = 2,
TextViewMode = 4 //!< Also known as SQL View Mode
};
//! i18n'ed name of view mode \a m
- KEXICORE_EXPORT QString nameForViewMode(int m);
+ KEXICORE_EXPORT TQString nameForViewMode(int m);
//! A set of known connections
KEXICORE_EXPORT KexiDBConnectionSet& connset();
@@ -83,65 +83,65 @@ namespace Kexi
/*! A global setting for minimal readable font.
Note: this is defined because KDE has no such setting yet.
- \a init is a widget that should be passed if no qApp->mainWidget() is available yet. */
- KEXICORE_EXPORT QFont smallFont(QWidget *init = 0);
+ \a init is a widget that should be passed if no tqApp->mainWidget() is available yet. */
+ KEXICORE_EXPORT TQFont smallFont(TQWidget *init = 0);
/*! Helper class for storing object status. */
- class KEXICORE_EXPORT ObjectStatus
+ class KEXICORE_EXPORT ObjecttqStatus
{
public:
- ObjectStatus();
+ ObjecttqStatus();
- ObjectStatus(const QString& message, const QString& description);
+ ObjecttqStatus(const TQString& message, const TQString& description);
- ObjectStatus(KexiDB::Object* dbObject, const QString& message, const QString& description);
+ ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description);
- ~ObjectStatus();
+ ~ObjecttqStatus();
- const ObjectStatus& status() const;
+ const ObjecttqStatus& status() const;
bool error() const;
- void setStatus(const QString& message, const QString& description);
+ void settqStatus(const TQString& message, const TQString& description);
- //! Note: for safety, \a dbObject needs to be derived from QObject,
+ //! Note: for safety, \a dbObject needs to be derived from TQObject,
//! otherwise it won't be assigned
- void setStatus(KexiDB::Object* dbObject,
- const QString& message = QString::null, const QString& description = QString::null);
+ void settqStatus(KexiDB::Object* dbObject,
+ const TQString& message = TQString(), const TQString& description = TQString());
- void setStatus(KexiDB::ResultInfo* result,
- const QString& message = QString::null, const QString& description = QString::null);
+ void settqStatus(KexiDB::ResultInfo* result,
+ const TQString& message = TQString(), const TQString& description = TQString());
- void setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
- const QString& message = QString::null, const QString& description = QString::null);
+ void settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
+ const TQString& message = TQString(), const TQString& description = TQString());
- void clearStatus();
+ void cleartqStatus();
- QString singleStatusString() const;
+ TQString singleStatusString() const;
- void append( const ObjectStatus& otherStatus );
+ void append( const ObjecttqStatus& othertqStatus );
- KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((QObject*)dbObj); }
+ KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((TQObject*)dbObj); }
- //! Helper returning pseudo handler that just updates this ObjectStatus object
+ //! Helper returning pseudo handler that just updates this ObjecttqStatus object
//! by receiving a message
operator KexiDB::MessageHandler*();
- QString message, description;
+ TQString message, description;
protected:
- QGuardedPtr<QObject> dbObj; //! This is in fact KexiDB::Object
+ TQGuardedPtr<TQObject> dbObj; //! This is in fact KexiDB::Object
KexiDB::MessageHandler* msgHandler;
};
- KEXICORE_EXPORT QString msgYouCanImproveData();
+ KEXICORE_EXPORT TQString msgYouCanImproveData();
}//namespace Kexi
//! Displays information that feature "feature_name" is not availabe in the current application version
-KEXICORE_EXPORT void KEXI_UNFINISHED(const QString& feature_name, const QString& extra_text = QString::null);
+KEXICORE_EXPORT void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text = TQString());
//! Like above - for use inside KexiActionProxy subclass - reuses feature name from shared action's text
#define KEXI_UNFINISHED_SHARED_ACTION(action_name) \
- KEXI_UNFINISHED(sharedAction(action_name) ? sharedAction(action_name)->text() : QString::null)
+ KEXI_UNFINISHED(sharedAction(action_name) ? sharedAction(action_name)->text() : TQString())
#endif
diff --git a/kexi/core/kexiaboutdata.cpp b/kexi/core/kexiaboutdata.cpp
index eeaaf07e4..0f06a1561 100644
--- a/kexi/core/kexiaboutdata.cpp
+++ b/kexi/core/kexiaboutdata.cpp
@@ -74,7 +74,7 @@ KAboutData* Kexi::createAboutData()
aboutData->addCredit("Tomas Krassnig", I18N_NOOP("Coffee sponsoring"), "tkrass05@hak1.at");
aboutData->addCredit("Paweł Wirecki / OpenOffice Polska", I18N_NOOP("Numerous bug reports, usability tests, technical support"), "");
aboutData->setTranslator(I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"), I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
-#if defined(CUSTOM_VERSION) && defined(Q_WS_WIN)
+#if defined(CUSTOM_VERSION) && defined(TQ_WS_WIN)
aboutData->setProgramLogo(KEXI_APP_LOGO);
#endif
return aboutData;
diff --git a/kexi/core/kexiactioncategories.cpp b/kexi/core/kexiactioncategories.cpp
index 4f3993425..b3cd1c066 100644
--- a/kexi/core/kexiactioncategories.cpp
+++ b/kexi/core/kexiactioncategories.cpp
@@ -22,8 +22,8 @@
#include <kstaticdeleter.h>
#include <kdebug.h>
-#include <qmap.h>
-#include <qasciidict.h>
+#include <tqmap.h>
+#include <tqasciidict.h>
namespace Kexi {
@@ -41,7 +41,7 @@ class ActionInternal
delete supportedObjectTypes;
}
int categories;
- QMap<int, bool> *supportedObjectTypes;
+ TQMap<int, bool> *supportedObjectTypes;
bool allObjectTypesAreSupported : 1;
};
@@ -57,7 +57,7 @@ class ActionCategories::Private
actions.setAutoDelete(true);
}
- QAsciiDict<ActionInternal> actions;
+ TQAsciiDict<ActionInternal> actions;
};
KEXICORE_EXPORT ActionCategories *actionCategories()
@@ -89,7 +89,7 @@ void ActionCategories::addAction(const char* name, int categories,
KexiPart::ObjectTypes supportedObjectType5, KexiPart::ObjectTypes supportedObjectType6,
KexiPart::ObjectTypes supportedObjectType7, KexiPart::ObjectTypes supportedObjectType8)
{
- ActionInternal * a = d->actions.find( name );
+ ActionInternal * a = d->actions.tqfind( name );
if (a) {
a->categories |= categories;
}
@@ -99,7 +99,7 @@ void ActionCategories::addAction(const char* name, int categories,
}
if (supportedObjectType1) {
if (!a->supportedObjectTypes)
- a->supportedObjectTypes = new QMap<int, bool>();
+ a->supportedObjectTypes = new TQMap<int, bool>();
a->supportedObjectTypes->insert(supportedObjectType1, true);
if (supportedObjectType2) {
a->supportedObjectTypes->insert(supportedObjectType2, true);
@@ -127,7 +127,7 @@ void ActionCategories::addAction(const char* name, int categories,
void ActionCategories::setAllObjectTypesSupported(const char* name, bool set)
{
- ActionInternal * a = d->actions.find( name );
+ ActionInternal * a = d->actions.tqfind( name );
if (a)
a->allObjectTypesAreSupported = set;
else
@@ -136,14 +136,14 @@ void ActionCategories::setAllObjectTypesSupported(const char* name, bool set)
int ActionCategories::actionCategories(const char* name) const
{
- const ActionInternal * a = d->actions.find( name );
+ const ActionInternal * a = d->actions.tqfind( name );
return a ? a->categories : 0;
}
bool ActionCategories::actionSupportsObjectType(const char* name, KexiPart::ObjectTypes objectType) const
{
- const ActionInternal * a = d->actions.find( name );
+ const ActionInternal * a = d->actions.tqfind( name );
if (a && a->allObjectTypesAreSupported)
return true;
- return (a && a->supportedObjectTypes) ? a->supportedObjectTypes->contains(objectType) : false;
+ return (a && a->supportedObjectTypes) ? a->supportedObjectTypes->tqcontains(objectType) : false;
}
diff --git a/kexi/core/kexiactionproxy.cpp b/kexi/core/kexiactionproxy.cpp
index 0dbcf6378..7f5f42f93 100644
--- a/kexi/core/kexiactionproxy.cpp
+++ b/kexi/core/kexiactionproxy.cpp
@@ -25,12 +25,12 @@
#include <kmainwindow.h>
#include <kshortcut.h>
-#include <qwidget.h>
-#include <qsignal.h>
-#include <qiconset.h>
+#include <tqwidget.h>
+#include <tqsignal.h>
+#include <tqiconset.h>
KAction_setEnabled_Helper::KAction_setEnabled_Helper(KexiActionProxy* proxy)
- : QObject(0,"KAction_setEnabled_Helper")
+ : TQObject(0,"KAction_setEnabled_Helper")
, m_proxy( proxy )
{
}
@@ -45,7 +45,7 @@ void KAction_setEnabled_Helper::slotSetEnabled(bool enabled)
//=======================
-KexiSharedActionConnector::KexiSharedActionConnector( KexiActionProxy* proxy, QObject *obj )
+KexiSharedActionConnector::KexiSharedActionConnector( KexiActionProxy* proxy, TQObject *obj )
: m_proxy(proxy)
, m_object(obj)
{
@@ -67,7 +67,7 @@ void KexiSharedActionConnector::plugSharedActionToExternalGUI(
}
void KexiSharedActionConnector::plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client)
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client)
{
m_proxy->plugSharedActionsToExternalGUI(action_names, client);
}
@@ -75,7 +75,7 @@ void KexiSharedActionConnector::plugSharedActionsToExternalGUI(
//=======================
-KexiActionProxy::KexiActionProxy(QObject *receiver, KexiSharedActionHost *host)
+KexiActionProxy::KexiActionProxy(TQObject *receiver, KexiSharedActionHost *host)
: m_host( host ? host : &KexiSharedActionHost::defaultHost() )
, m_receiver(receiver)
, m_signals(47)
@@ -92,12 +92,12 @@ KexiActionProxy::KexiActionProxy(QObject *receiver, KexiSharedActionHost *host)
KexiActionProxy::~KexiActionProxy()
{
- QPtrListIterator<KexiActionProxy> it(m_sharedActionChildren);
+ TQPtrListIterator<KexiActionProxy> it(m_sharedActionChildren);
//detach myself from every child
for (;it.current();++it) {
it.current()->setActionProxyParent_internal( 0 );
}
- //take me from parent
+ //take me from tqparent
if (m_actionProxyParent)
m_actionProxyParent->takeActionProxyChild( this );
@@ -106,13 +106,13 @@ KexiActionProxy::~KexiActionProxy()
delete m_KAction_setEnabled_helper;
}
-void KexiActionProxy::plugSharedAction(const char *action_name, QObject* receiver, const char *slot)
+void KexiActionProxy::plugSharedAction(const char *action_name, TQObject* receiver, const char *slot)
{
if (!action_name)// || !receiver || !slot)
return;
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p) {
- p = new QPair<QSignal*,bool>( new QSignal(&m_signal_parent), true );
+ p = new TQPair<TQSignal*,bool>( new TQSignal(&m_signal_parent), true );
m_signals.insert(action_name, p);
}
if (receiver && slot)
@@ -121,14 +121,14 @@ void KexiActionProxy::plugSharedAction(const char *action_name, QObject* receive
void KexiActionProxy::unplugSharedAction(const char *action_name)
{
- QPair<QSignal*,bool> *p = m_signals.take(action_name);
+ TQPair<TQSignal*,bool> *p = m_signals.take(action_name);
if (!p)
return;
delete p->first;
delete p;
}
-int KexiActionProxy::plugSharedAction(const char *action_name, QWidget* w)
+int KexiActionProxy::plugSharedAction(const char *action_name, TQWidget* w)
{
KAction *a = sharedAction(action_name);
if (!a) {
@@ -138,7 +138,7 @@ int KexiActionProxy::plugSharedAction(const char *action_name, QWidget* w)
return a->plug(w);
}
-void KexiActionProxy::unplugSharedAction(const char *action_name, QWidget* w)
+void KexiActionProxy::unplugSharedAction(const char *action_name, TQWidget* w)
{
KAction *a = sharedAction(action_name);
if (!a) {
@@ -148,18 +148,18 @@ void KexiActionProxy::unplugSharedAction(const char *action_name, QWidget* w)
a->unplug(w);
}
-KAction* KexiActionProxy::plugSharedAction(const char *action_name, const QString& alternativeText, QWidget* w)
+KAction* KexiActionProxy::plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w)
{
KAction *a = sharedAction(action_name);
if (!a) {
kdWarning() << "KexiActionProxy::plugSharedAction(): NO SUCH ACTION: " << action_name << endl;
return 0;
}
- QCString altName = a->name();
+ TQCString altName = a->name();
altName += "_alt";
KAction *alt_act = new KAction(alternativeText, a->iconSet(), a->shortcut(),
- 0, 0, a->parent(), altName);
- QObject::connect(alt_act, SIGNAL(activated()), a, SLOT(activate()));
+ 0, 0, a->tqparent(), altName);
+ TQObject::connect(alt_act, TQT_SIGNAL(activated()), a, TQT_SLOT(activate()));
alt_act->plug(w);
//OK?
@@ -173,35 +173,35 @@ void KexiActionProxy::plugSharedActionToExternalGUI(const char *action_name, KXM
KAction *a = client->action(action_name);
if (!a)
return;
- plugSharedAction(a->name(), a, SLOT(activate()));
+ plugSharedAction(a->name(), a, TQT_SLOT(activate()));
//update availability
setAvailable(a->name(), a->isEnabled());
//changes will be signaled
- QObject::connect(a, SIGNAL(enabled(bool)), m_KAction_setEnabled_helper, SLOT(slotSetEnabled(bool)));
+ TQObject::connect(a, TQT_SIGNAL(enabled(bool)), m_KAction_setEnabled_helper, TQT_SLOT(slotSetEnabled(bool)));
}
void KexiActionProxy::plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client)
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client)
{
- for (QValueList<QCString>::const_iterator it = action_names.constBegin(); it!=action_names.constEnd(); ++it) {
+ for (TQValueList<TQCString>::const_iterator it = action_names.constBegin(); it!=action_names.constEnd(); ++it) {
plugSharedActionToExternalGUI(*it, client);
}
}
bool KexiActionProxy::activateSharedAction(const char *action_name, bool alsoCheckInChildren)
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p || !p->second) {
- //try in children...
+ //try in tqchildren...
if (alsoCheckInChildren) {
- QPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
+ TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
for( ; it.current(); ++it ) {
if (it.current()->activateSharedAction( action_name, alsoCheckInChildren ))
return true;
}
}
- return m_actionProxyParent ? m_actionProxyParent->activateSharedAction(action_name, false) : false; //last chance: parent
+ return m_actionProxyParent ? m_actionProxyParent->activateSharedAction(action_name, false) : false; //last chance: tqparent
}
//activate in this proxy...
p->first->activate();
@@ -215,12 +215,12 @@ KAction* KexiActionProxy::sharedAction(const char* action_name)
bool KexiActionProxy::isSupported(const char* action_name) const
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p) {
- //not supported explicitly - try in children...
+ //not supported explicitly - try in tqchildren...
if (m_focusedChild)
return m_focusedChild->isSupported(action_name);
- QPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
+ TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
for( ; it.current(); ++it ) {
if (it.current()->isSupported(action_name))
return true;
@@ -232,19 +232,19 @@ bool KexiActionProxy::isSupported(const char* action_name) const
bool KexiActionProxy::isAvailable(const char* action_name, bool alsoCheckInChildren) const
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p) {
- //not supported explicitly - try in children...
+ //not supported explicitly - try in tqchildren...
if (alsoCheckInChildren) {
if (m_focusedChild)
return m_focusedChild->isAvailable(action_name, alsoCheckInChildren);
- QPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
+ TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
for( ; it.current(); ++it ) {
if (it.current()->isSupported(action_name))
return it.current()->isAvailable(action_name, alsoCheckInChildren);
}
}
- return m_actionProxyParent ? m_actionProxyParent->isAvailable(action_name, false) : false; //last chance: parent
+ return m_actionProxyParent ? m_actionProxyParent->isAvailable(action_name, false) : false; //last chance: tqparent
}
//supported explicitly:
return p->second != 0;
@@ -252,7 +252,7 @@ bool KexiActionProxy::isAvailable(const char* action_name, bool alsoCheckInChild
void KexiActionProxy::setAvailable(const char* action_name, bool set)
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p)
return;
p->second = set;
@@ -269,13 +269,13 @@ void KexiActionProxy::addActionProxyChild( KexiActionProxy* child )
void KexiActionProxy::takeActionProxyChild( KexiActionProxy* child )
{
- if (m_sharedActionChildren.findRef( child ) != -1)
+ if (m_sharedActionChildren.tqfindRef( child ) != -1)
m_sharedActionChildren.take();
}
-void KexiActionProxy::setActionProxyParent_internal( KexiActionProxy* parent )
+void KexiActionProxy::setActionProxyParent_internal( KexiActionProxy* tqparent )
{
- m_actionProxyParent = parent;
+ m_actionProxyParent = tqparent;
}
#include "kexiactionproxy_p.moc"
diff --git a/kexi/core/kexiactionproxy.h b/kexi/core/kexiactionproxy.h
index 63093d291..e88a89d9e 100644
--- a/kexi/core/kexiactionproxy.h
+++ b/kexi/core/kexiactionproxy.h
@@ -20,18 +20,18 @@
#ifndef KEXIACTIONPROXY_H
#define KEXIACTIONPROXY_H
-#include <qguardedptr.h>
-#include <qasciidict.h>
-#include <qobject.h>
-#include <qpair.h>
-#include <qptrlist.h>
+#include <tqguardedptr.h>
+#include <tqasciidict.h>
+#include <tqobject.h>
+#include <tqpair.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include "kexiproject.h"
#include "kexisharedactionhost.h"
-class QSignal;
+class TQSignal;
class KAction;
class KXMLGUIClient;
class KAction_setEnabled_Helper;
@@ -56,7 +56,7 @@ class KEXICORE_EXPORT KexiSharedActionConnector
{
public:
/* Connects shared actions offered by \a proxy to \a obj. */
- KexiSharedActionConnector(KexiActionProxy* proxy, QObject *obj);
+ KexiSharedActionConnector(KexiActionProxy* proxy, TQObject *obj);
~KexiSharedActionConnector();
protected:
@@ -65,10 +65,10 @@ class KEXICORE_EXPORT KexiSharedActionConnector
void plugSharedActionToExternalGUI(const char *action_name, KXMLGUIClient *client);
void plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client);
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client);
KexiActionProxy* m_proxy;
- QObject *m_object;
+ TQObject *m_object;
};
//! An interface that acts as proxy for shared actions within the application.
@@ -85,8 +85,8 @@ class KEXICORE_EXPORT KexiActionProxy
public:
/*! Constructs action proxy for object \a receiver, using \a host.
If \a host is NULL, KexiSharedActionHost::defaultHost() is used.
- (you must be sure that it's true) -- it is casted to QObject and assigned as the receiver.*/
- KexiActionProxy(QObject *receiver , KexiSharedActionHost *host = 0 );
+ (you must be sure that it's true) -- it is casted to TQObject and assigned as the receiver.*/
+ KexiActionProxy(TQObject *receiver , KexiSharedActionHost *host = 0 );
virtual ~KexiActionProxy();
/*! Activates action named \a action_name for this proxy. If the action is executed
@@ -107,7 +107,7 @@ class KEXICORE_EXPORT KexiActionProxy
protected:
/*! Plugs shared action named \a action_name to slot \a slot in \a receiver.
\a Receiver is usually a child of _this_ widget. */
- void plugSharedAction(const char *action_name, QObject* receiver, const char *slot);
+ void plugSharedAction(const char *action_name, TQObject* receiver, const char *slot);
void unplugSharedAction(const char *action_name);
@@ -122,61 +122,61 @@ class KEXICORE_EXPORT KexiActionProxy
Does nothing if no action found, so generally this is safer than just caling e.g.
<code> action("myaction")->plug(myPopup); </code>
\return index of inserted item, or -1 if there is not action with name \a action_name.
- \sa action(), KAction::plug(QWidget*, int) */
- int plugSharedAction(const char *action_name, QWidget* w);
+ \sa action(), KAction::plug(TQWidget*, int) */
+ int plugSharedAction(const char *action_name, TQWidget* w);
void plugSharedActionToExternalGUI(const char *action_name, KXMLGUIClient *client);
void plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client);
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client);
/*! Unplugs action named \a action_name from a widget \a w.
- \sa plugSharedAction(const char *action_name, QWidget* w) */
- void unplugSharedAction(const char *action_name, QWidget* w);
+ \sa plugSharedAction(const char *action_name, TQWidget* w) */
+ void unplugSharedAction(const char *action_name, TQWidget* w);
/*! Like above, but creates alternative action as a copy of \a action_name,
with \a alternativeText set. When this action is activated, just original action
specified by \a action_name is activated. The aternative action has autmatically set name as:
action_name + "_alt".
\return newly created action or 0 if \a action_name not found. */
- KAction* plugSharedAction(const char *action_name, const QString& alternativeText, QWidget* w);
+ KAction* plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w);
/*! \return action named with \a name or NULL if there is no such action. */
virtual KAction* sharedAction(const char* action_name);
- inline QObject *receiver() const { return m_receiver; }
+ inline TQObject *receiver() const { return m_receiver; }
virtual void setAvailable(const char* action_name, bool set);
/*! Adds \a child of this proxy. Children will receive activateSharedAction() event,
If activateSharedAction() "event" is not consumed by the main proxy,
- we start to iterate over proxy children (in unspecified order) to and call
+ we start to iterate over proxy tqchildren (in unspecified order) to and call
activateSharedAction() on every child until one of them accept the "event".
- If proxy child is destroyed, it is automatically detached from its parent proxy.
- Parent proxy is 0 by default. This pointer is properly cleared when parent proxy is destroyed. */
+ If proxy child is destroyed, it is automatically detached from its tqparent proxy.
+ Parent proxy is 0 by default. This pointer is properly cleared when tqparent proxy is destroyed. */
void addActionProxyChild( KexiActionProxy* child );
void takeActionProxyChild( KexiActionProxy* child );
KexiSharedActionHost *m_host;
- QGuardedPtr<QObject> m_receiver;
- QAsciiDict< QPair<QSignal*,bool> > m_signals;
+ TQGuardedPtr<TQObject> m_receiver;
+ TQAsciiDict< TQPair<TQSignal*,bool> > m_signals;
- QPtrList<KexiActionProxy> m_sharedActionChildren;
+ TQPtrList<KexiActionProxy> m_sharedActionChildren;
- QPtrList<KAction> m_alternativeActions;
+ TQPtrList<KAction> m_alternativeActions;
KexiActionProxy* m_actionProxyParent;
- QObject m_signal_parent; //!< it's just to have common parent for owned signals
+ TQObject m_signal_parent; //!< it's just to have common tqparent for owned signals
//! For internal use by plugSharedActionToExternalGUI()
KAction_setEnabled_Helper *m_KAction_setEnabled_helper;
public:
- //! For internal use by addActionProxyChild(). \a parent can be 0.
- void setActionProxyParent_internal( KexiActionProxy* parent );
+ //! For internal use by addActionProxyChild(). \a tqparent can be 0.
+ void setActionProxyParent_internal( KexiActionProxy* tqparent );
//! @internal
KexiActionProxy *m_focusedChild;
diff --git a/kexi/core/kexiactionproxy_p.h b/kexi/core/kexiactionproxy_p.h
index 735792997..f22125231 100644
--- a/kexi/core/kexiactionproxy_p.h
+++ b/kexi/core/kexiactionproxy_p.h
@@ -20,14 +20,15 @@
#ifndef KEXIACTIONPROXY_P_H
#define KEXIACTIONPROXY_P_H
-#include <qobject.h>
+#include <tqobject.h>
class KexiActionProxy;
//! Helper class for KexiActionProxy::plugSharedActionToExternalGUI() method.
-class KAction_setEnabled_Helper : public QObject
+class KAction_setEnabled_Helper : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KAction_setEnabled_Helper(KexiActionProxy* proxy);
diff --git a/kexi/core/kexiblobbuffer.cpp b/kexi/core/kexiblobbuffer.cpp
index d66d69af3..d1f78c4a9 100644
--- a/kexi/core/kexiblobbuffer.cpp
+++ b/kexi/core/kexiblobbuffer.cpp
@@ -21,9 +21,9 @@
#include <assert.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -47,11 +47,11 @@ class KexiBLOBBuffer::Private
{
}
Id_t maxId; //!< Used to compute maximal recently used identifier for unstored BLOB
-//! @todo will be changed to QHash<quint64, Item>
- QIntDict<Item> inMemoryItems; //!< for unstored BLOBs
- QIntDict<Item> storedItems; //!< for stored items
- QDict<Item> itemsByURL;
- QGuardedPtr<KexiDB::Connection> conn;
+//! @todo will be changed to TQHash<quint64, Item>
+ TQIntDict<Item> inMemoryItems; //!< for unstored BLOBs
+ TQIntDict<Item> storedItems; //!< for stored items
+ TQDict<Item> itemsByURL;
+ TQGuardedPtr<KexiDB::Connection> conn;
};
//-----------------
@@ -110,22 +110,22 @@ void KexiBLOBBuffer::Handle::setStoredWidthID(KexiBLOBBuffer::Id_t id)
//-----------------
-KexiBLOBBuffer::Item::Item(const QByteArray& data, KexiBLOBBuffer::Id_t ident, bool _stored,
- const QString& _name, const QString& _caption, const QString& _mimeType,
- Id_t _folderId, const QPixmap& pixmap)
+KexiBLOBBuffer::Item::Item(const TQByteArray& data, KexiBLOBBuffer::Id_t ident, bool _stored,
+ const TQString& _name, const TQString& _caption, const TQString& _mimeType,
+ Id_t _folderId, const TQPixmap& pixmap)
: name(_name), caption(_caption), mimeType(_mimeType), refs(0),
id(ident), folderId(_folderId), stored(_stored),
m_pixmapLoaded(new bool(false)/*workaround for pixmap() const*/)
{
if (pixmap.isNull())
- m_pixmap = new QPixmap();
+ m_pixmap = new TQPixmap();
else
- m_pixmap = new QPixmap(pixmap);
+ m_pixmap = new TQPixmap(pixmap);
if (data.isEmpty())
- m_data = new QByteArray();
+ m_data = new TQByteArray();
else
- m_data = new QByteArray(data);
+ m_data = new TQByteArray(data);
}
KexiBLOBBuffer::Item::~Item()
@@ -138,10 +138,10 @@ KexiBLOBBuffer::Item::~Item()
delete m_pixmapLoaded;
}
-QPixmap KexiBLOBBuffer::Item::pixmap() const
+TQPixmap KexiBLOBBuffer::Item::pixmap() const
{
if (!*m_pixmapLoaded && m_pixmap->isNull() && !m_data->isEmpty()) {
- QString type( KImageIO::typeForMime(mimeType) );
+ TQString type( KImageIO::typeForMime(mimeType) );
if (!KImageIO::canRead( type ) || !m_pixmap->loadFromData(*m_data, type.latin1())) {
//! @todo inform about error?
}
@@ -150,18 +150,18 @@ QPixmap KexiBLOBBuffer::Item::pixmap() const
return *m_pixmap;
}
-QByteArray KexiBLOBBuffer::Item::data() const
+TQByteArray KexiBLOBBuffer::Item::data() const
{
if (!m_data->isEmpty())
return *m_data;
if (m_data->isEmpty() && m_pixmap->isNull())
- return QByteArray();
+ return TQByteArray();
if (m_data->isEmpty() && !m_pixmap->isNull()) {
//convert pixmap to byte array
//(do it only on demand)
- QBuffer buffer( *m_data );
+ TQBuffer buffer( *m_data );
buffer.open( IO_WriteOnly );
m_pixmap->save( &buffer, mimeType.isEmpty() ? (const char*)"PNG"/*! @todo default? */ : mimeType.latin1() );
}
@@ -171,7 +171,7 @@ QByteArray KexiBLOBBuffer::Item::data() const
//-----------------
KexiBLOBBuffer::KexiBLOBBuffer()
- : QObject()
+ : TQObject()
, d(new Private())
{
Q_ASSERT(!m_buffer);
@@ -193,38 +193,38 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::insertPixmap(const KURL& url)
return KexiBLOBBuffer::Handle();
}
//! @todo what about searching by filename only and then compare data?
- Item * item = d->itemsByURL.find(url.prettyURL());
+ Item * item = d->itemsByURL.tqfind(url.prettyURL());
if (item)
return KexiBLOBBuffer::Handle(item);
- QString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
+ TQString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
//! @todo download the file if remote, then set fileName properly
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly)) {
//! @todo err msg
return KexiBLOBBuffer::Handle();
}
- QString mimeType( KImageIO::mimeType( fileName ) );
+ TQString mimeType( KImageIO::mimeType( fileName ) );
- QByteArray data( f.readAll() );
+ TQByteArray data( f.readAll() );
if (f.status()!=IO_Ok) {
//! @todo err msg
return KexiBLOBBuffer::Handle();
}
- QFileInfo fi(url.fileName());
- QString caption(fi.baseName().replace('_', " ").simplifyWhiteSpace());
+ TQFileInfo fi(url.fileName());
+ TQString caption(fi.baseName().tqreplace('_', " ").simplifyWhiteSpace());
item = new Item(data, ++d->maxId, /*!stored*/false, url.fileName(), caption, mimeType);
insertItem(item);
//cache
item->prettyURL = url.prettyURL();
- d->itemsByURL.replace(url.prettyURL(), item);
+ d->itemsByURL.tqreplace(url.prettyURL(), item);
return KexiBLOBBuffer::Handle(item);
}
-KexiBLOBBuffer::Handle KexiBLOBBuffer::insertObject(const QByteArray& data,
- const QString& name, const QString& caption, const QString& mimeType, KexiBLOBBuffer::Id_t identifier)
+KexiBLOBBuffer::Handle KexiBLOBBuffer::insertObject(const TQByteArray& data,
+ const TQString& name, const TQString& caption, const TQString& mimeType, KexiBLOBBuffer::Id_t identifier)
{
KexiBLOBBuffer::Id_t newIdentifier;
if (identifier>0)
@@ -237,17 +237,17 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::insertObject(const QByteArray& data,
return KexiBLOBBuffer::Handle(item);
}
-KexiBLOBBuffer::Handle KexiBLOBBuffer::insertPixmap(const QPixmap& pixmap)
+KexiBLOBBuffer::Handle KexiBLOBBuffer::insertPixmap(const TQPixmap& pixmap)
{
if (pixmap.isNull())
return KexiBLOBBuffer::Handle();
Item * item = new Item(
- QByteArray(), //(pixmap will be converted to byte array on demand)
+ TQByteArray(), //(pixmap will be converted to byte array on demand)
++d->maxId,
false, //not stored
- QString::null,
- QString::null,
+ TQString(),
+ TQString(),
"image/png", //!< @todo OK? What about jpegs?
0, //folder id
pixmap);
@@ -261,7 +261,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
if (id<=0)
return KexiBLOBBuffer::Handle();
if (stored) {
- Item *item = d->storedItems.find(id);
+ Item *item = d->storedItems.tqfind(id);
if (item || !d->conn)
return KexiBLOBBuffer::Handle(item);
//retrieve stored BLOB:
@@ -273,7 +273,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
//! @todo err msg
return KexiBLOBBuffer::Handle();
}
-/* QStringList where;
+/* TQStringList where;
where << "o_id";
KexiDB::PreparedStatement::Ptr st = d->conn->prepareStatement(
KexiDB::PreparedStatement::SelectStatement, *blobsTable, where);*/
@@ -284,13 +284,13 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
schema.addField( blobsTable->field("o_caption") );
schema.addField( blobsTable->field("o_mime") );
schema.addField( blobsTable->field("o_folder_id") );
- schema.addToWhereExpression(blobsTable->field("o_id"), QVariant((Q_LLONG)id));
+ schema.addToWhereExpression(blobsTable->field("o_id"), TQVariant((TQ_LLONG)id));
KexiDB::RowData rowData;
tristate res = d->conn->querySingleRecord(
schema,
-// QString::fromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=")
-// +QString::number(id),
+// TQString::tqfromLatin1("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) {
//! @todo err msg
@@ -306,7 +306,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
rowData[1].toString(),
rowData[2].toString(),
rowData[3].toString(),
- (Id_t)rowData[4].toInt() //!< @todo folder id: fix Id_t for Qt4
+ (Id_t)rowData[4].toInt() //!< @todo folder id: fix Id_t for TQt4
);
insertItem(item);
@@ -314,7 +314,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
//#endif
}
else
- return KexiBLOBBuffer::Handle(d->inMemoryItems.find(id));
+ return KexiBLOBBuffer::Handle(d->inMemoryItems.tqfind(id));
}
KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id)
diff --git a/kexi/core/kexiblobbuffer.h b/kexi/core/kexiblobbuffer.h
index bd593ab26..adf307a08 100644
--- a/kexi/core/kexiblobbuffer.h
+++ b/kexi/core/kexiblobbuffer.h
@@ -20,10 +20,10 @@
#ifndef KEXIBLOBBUFFER_H
#define KEXIBLOBBUFFER_H
-#include <qobject.h>
-#include <qintdict.h>
-#include <qdict.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
#include <kurl.h>
@@ -69,7 +69,7 @@ namespace KexiDB
by a single interger, memory can be handled more effectively.
Example use cases:
- A large pixmap file "abc.jpg" is loaded as QByteArray <b>once</b> and buffered:
+ A large pixmap file "abc.jpg" is loaded as TQByteArray <b>once</b> and buffered:
integer identifier is returned.
Then, multiple image widgets are using "abc.jpg" for displaying.
Duplicating an image widget means only duplicating it's properties
@@ -77,15 +77,16 @@ namespace KexiDB
Creating a new image widget and assiging the same "abc.jpg" pixmap, means only
referencing KexiBLOBBuffer using the same identifier.
*/
-class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
+class KEXICORE_EXPORT KexiBLOBBuffer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
class Item;
public:
//! long integer for unique identifying blobs
-//! @todo Qt4: will be changed
+//! @todo TQt4: will be changed
typedef long Id_t;
//! Access to KexiBLOBBuffer singleton
@@ -116,17 +117,17 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
Handle& operator=(const Handle& handle);
- QByteArray data() const { return m_item ? m_item->data() : QByteArray(); }
+ TQByteArray data() const { return m_item ? m_item->data() : TQByteArray(); }
- QPixmap pixmap() const { return m_item ? m_item->pixmap() : QPixmap(); }
+ TQPixmap pixmap() const { return m_item ? m_item->pixmap() : TQPixmap(); }
/*! Sets "stored" flag to true by setting non-temporary identifier.
Only call this method for unstored (in memory) BLOBs */
void setStoredWidthID(Id_t id);
- QString originalFileName() const { return m_item ? m_item->name: QString::null; }
+ TQString originalFileName() const { return m_item ? m_item->name: TQString(); }
- QString mimeType() const { return m_item ? m_item->mimeType : QString::null; }
+ TQString mimeType() const { return m_item ? m_item->mimeType : TQString(); }
Id_t folderId() const { return m_item ? m_item->folderId : 0; }
@@ -159,11 +160,11 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
@param identifier Object's identifier. If positive, the "stored" flag for the data
will be set to true with \a identifer, otherwise (the default) the BLOB data will
have "stored" flag set to false, and a new temporary identifier will be assigned. */
- Handle insertObject(const QByteArray& data, const QString& name,
- const QString& caption, const QString& mimeType, Id_t identifier = 0);
+ Handle insertObject(const TQByteArray& data, const TQString& name,
+ const TQString& caption, const TQString& mimeType, Id_t identifier = 0);
/*! Inserts a new pixmap available in memory, e.g. coming from clipboard. */
- Handle insertPixmap(const QPixmap& pixmap);
+ Handle insertPixmap(const TQPixmap& pixmap);
/*! \return an object for a given \a id. If \a stored is true, stored BLOBs buffer
is browsed, otherwise unstored (in memory) BLOBs buffer is browsed.
@@ -188,29 +189,29 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
private:
class KEXICORE_EXPORT Item {
public:
- Item(const QByteArray& data, Id_t ident,
+ Item(const TQByteArray& data, Id_t ident,
bool stored,
- const QString& name = QString::null,
- const QString& caption = QString::null,
- const QString& mimeType = QString::null,
+ const TQString& name = TQString(),
+ const TQString& caption = TQString(),
+ const TQString& mimeType = TQString(),
Id_t folderId = 0,
- const QPixmap& pixmap = QPixmap());
+ const TQPixmap& pixmap = TQPixmap());
~Item();
- QPixmap pixmap() const;
- QByteArray data() const;
+ TQPixmap pixmap() const;
+ TQByteArray data() const;
// KexiBLOBBuffer* buf;
// KURL url;
- QString name;
- QString caption; //!< @todo for future use within image gallery
- QString mimeType;
+ TQString name;
+ TQString caption; //!< @todo for future use within image gallery
+ TQString mimeType;
uint refs;
Id_t id;
Id_t folderId;
bool stored : 1;
- QString prettyURL; //!< helper
+ TQString prettyURL; //!< helper
private:
- QByteArray *m_data;
- QPixmap *m_pixmap;
+ TQByteArray *m_data;
+ TQPixmap *m_pixmap;
bool *m_pixmapLoaded; //!< *m_pixmapLoaded will be set in Info::pixmap(),
//!< to avoid multiple pixmap decoding when it previously failed
friend class KexiBLOBBuffer;
diff --git a/kexi/core/kexicontexthelp.cpp b/kexi/core/kexicontexthelp.cpp
index 4ccfa2fee..48bf6b516 100644
--- a/kexi/core/kexicontexthelp.cpp
+++ b/kexi/core/kexicontexthelp.cpp
@@ -23,21 +23,21 @@
#include <kapplication.h>
#include <klocale.h>
#include <kaction.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kiconloader.h>
-KexiContextHelp::KexiContextHelp(KexiMainWindow *view, QWidget *parent)
- :KoContextHelpWidget(parent,"kexi_contexthelp")
+KexiContextHelp::KexiContextHelp(KexiMainWindow *view, TQWidget *tqparent)
+ :KoContextHelpWidget(tqparent,"kexi_contexthelp")
{
kdDebug()<<"KexiContextHelp::KexiContextHelp()"<<endl;
setCaption(i18n("Context Help"));
setIcon(SmallIcon("help"));
- connect(this,SIGNAL(linkClicked( const QString& )),
- this,SLOT(linkClickedInternal( const QString& )));
+ connect(this,TQT_SIGNAL(linkClicked( const TQString& )),
+ this,TQT_SLOT(linkClickedInternal( const TQString& )));
}
-void KexiContextHelp::linkClickedInternal(const QString& link) {
+void KexiContextHelp::linkClickedInternal(const TQString& link) {
kdDebug()<<"KexiContextHelp: Link: "<<link<<endl;
unhandledLink(link);
}
diff --git a/kexi/core/kexicontexthelp.h b/kexi/core/kexicontexthelp.h
index 3a97e20c1..c1cd2a0b3 100644
--- a/kexi/core/kexicontexthelp.h
+++ b/kexi/core/kexicontexthelp.h
@@ -27,15 +27,16 @@
class KEXICORE_EXPORT KexiContextHelp : public KoContextHelpWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiContextHelp(KexiMainWindow *view, QWidget *parent=0);
+ KexiContextHelp(KexiMainWindow *view, TQWidget *tqparent=0);
~KexiContextHelp();
private slots:
- void linkClickedInternal(const QString &link);
+ void linkClickedInternal(const TQString &link);
signals:
- void unhandledLink( const QString& link );
+ void unhandledLink( const TQString& link );
};
#endif
diff --git a/kexi/core/kexicontexthelp_p.h b/kexi/core/kexicontexthelp_p.h
index ab9af1665..f9abb456f 100644
--- a/kexi/core/kexicontexthelp_p.h
+++ b/kexi/core/kexicontexthelp_p.h
@@ -27,9 +27,9 @@ public:
text="";
iconName="";
}
- QString caption;
- QString text;
- QString iconName;
+ TQString caption;
+ TQString text;
+ TQString iconName;
};
#endif
diff --git a/kexi/core/kexidataiteminterface.cpp b/kexi/core/kexidataiteminterface.cpp
index 8fe78c853..2dd9c8130 100644
--- a/kexi/core/kexidataiteminterface.cpp
+++ b/kexi/core/kexidataiteminterface.cpp
@@ -33,7 +33,7 @@ KexiDataItemChangesListener::~KexiDataItemChangesListener()
KexiDataItemInterface::KexiDataItemInterface()
: m_listener(0)
- , m_listenerIsQObject(false)
+ , m_listenerIsTQObject(false)
, m_parentDataItemInterface(0)
, m_hasFocusableWidget(true)
, m_disable_signalValueChanged(false)
@@ -45,15 +45,15 @@ KexiDataItemInterface::~KexiDataItemInterface()
{
}
-void KexiDataItemInterface::setValue(const QVariant& value, const QVariant& add,
- bool removeOld, const QVariant* visibleValue)
+void KexiDataItemInterface::setValue(const TQVariant& value, const TQVariant& add,
+ bool removeOld, const TQVariant* visibleValue)
{
m_disable_signalValueChanged = true; //to prevent emmiting valueChanged()
//needed? clear();
- if (dynamic_cast<QObject*>(this)) {
+ if (dynamic_cast<TQObject*>(this)) {
kdDebug() << "KexiDataItemInterface::setValue(): " <<
- dynamic_cast<QObject*>(this)->className() << " "
- << dynamic_cast<QWidget*>(this)->name()
+ dynamic_cast<TQObject*>(this)->className() << " "
+ << dynamic_cast<TQWidget*>(this)->name()
<< " value=" << value << " add=" << add << endl;
}
m_origValue = value;
@@ -63,7 +63,7 @@ void KexiDataItemInterface::setValue(const QVariant& value, const QVariant& add,
m_disable_signalValueChanged = false;
}
-void KexiDataItemInterface::setVisibleValueInternal(const QVariant& value)
+void KexiDataItemInterface::setVisibleValueInternal(const TQVariant& value)
{
Q_UNUSED(value);
}
@@ -92,7 +92,7 @@ bool KexiDataItemInterface::valueChanged()
}
/*
-void KexiDataItemInterface::setValue(const QVariant& value)
+void KexiDataItemInterface::setValue(const TQVariant& value)
{
m_disable_signalValueChanged = true; //to prevent emmiting valueChanged()
setValueInternal( value );
@@ -101,7 +101,7 @@ void KexiDataItemInterface::setValue(const QVariant& value)
KexiDataItemChangesListener* KexiDataItemInterface::listener()
{
- if (!m_listener || !m_listenerIsQObject)
+ if (!m_listener || !m_listenerIsTQObject)
return m_listener;
if (!m_listenerObject)
m_listener = 0; //destroyed, update pointer
@@ -111,12 +111,12 @@ KexiDataItemChangesListener* KexiDataItemInterface::listener()
void KexiDataItemInterface::installListener(KexiDataItemChangesListener* listener)
{
m_listener = listener;
- m_listenerIsQObject = dynamic_cast<QObject*>(listener);
- if (m_listenerIsQObject)
- m_listenerObject = dynamic_cast<QObject*>(listener);
+ m_listenerIsTQObject = dynamic_cast<TQObject*>(listener);
+ if (m_listenerIsTQObject)
+ m_listenerObject = dynamic_cast<TQObject*>(listener);
}
-void KexiDataItemInterface::showFocus( const QRect& r, bool readOnly )
+void KexiDataItemInterface::showFocus( const TQRect& r, bool readOnly )
{
Q_UNUSED(r);
Q_UNUSED(readOnly);
@@ -135,9 +135,9 @@ bool KexiDataItemInterface::valueIsValid()
return true;
}
-void KexiDataItemInterface::setParentDataItemInterface(KexiDataItemInterface* parentDataItemInterface)
+void KexiDataItemInterface::setParentDataItemInterface(KexiDataItemInterface* tqparentDataItemInterface)
{
- m_parentDataItemInterface = parentDataItemInterface;
+ m_parentDataItemInterface = tqparentDataItemInterface;
}
bool KexiDataItemInterface::cursorAtNewRow()
diff --git a/kexi/core/kexidataiteminterface.h b/kexi/core/kexidataiteminterface.h
index dbd38005e..db6a9afe4 100644
--- a/kexi/core/kexidataiteminterface.h
+++ b/kexi/core/kexidataiteminterface.h
@@ -20,9 +20,9 @@
#ifndef KEXIDATAITEMINTERFACE_H
#define KEXIDATAITEMINTERFACE_H
-#include <qvariant.h>
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqvariant.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
class KexiDataItemInterface;
namespace KexiDB {
@@ -54,7 +54,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
KexiDataItemInterface();
virtual ~KexiDataItemInterface();
- /*! Just initializes \a value, and calls setValueInternal(const QString& add, bool removeOld).
+ /*! Just initializes \a value, and calls setValueInternal(const TQString& add, bool removeOld).
If \a removeOld is true, current value is set up as \a add.
If \a removeOld if false, current value is set up as \a value + \a add.
\a value is stored as 'old value' -it'd be usable in the future
@@ -66,8 +66,8 @@ class KEXICORE_EXPORT KexiDataItemInterface
(usually a text of image) differs from the value of the widget (a numeric index).
This method is called by table view's and form's editors. */
- void setValue(const QVariant& value, const QVariant& add = QVariant(), bool removeOld = false,
- const QVariant* visibleValue = 0);
+ void setValue(const TQVariant& value, const TQVariant& add = TQVariant(), bool removeOld = false,
+ const TQVariant* visibleValue = 0);
//! \return field information for this item
virtual KexiDB::Field *field() const = 0;
@@ -84,10 +84,10 @@ class KEXICORE_EXPORT KexiDataItemInterface
// //! Sets value \a value for a widget.
// //! Just calls setValueInternal(), but also blocks valueChanged()
// //! as you we don't want to react on our own change
-// void setValue(const QVariant& value);
+// void setValue(const TQVariant& value);
//! \return value currently represented by this item.
- virtual QVariant value() = 0;
+ virtual TQVariant value() = 0;
//! \return true if editor's value is valid for a given type
//! Used for checking if an entered value is valid,
@@ -109,7 +109,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
//! \return value that should be displayed for this item.
//! Only used for items like combo box, where real value is an integer while
//! displayed value is usually a text. For other item types this method should be empty.
- virtual QVariant visibleValue() { return QVariant(); }
+ virtual TQVariant visibleValue() { return TQVariant(); }
/*! \return 'readOnly' flag for this item. The flag is usually taken from
the item's widget, e.g. KLineEdit::isReadOnly().
@@ -117,7 +117,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
virtual bool isReadOnly() const { return false; }
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget() = 0;
+ virtual TQWidget* widget() = 0;
/*! Hides item's widget, if available. */
virtual void hideWidget() { if (widget()) widget()->hide(); }
@@ -165,7 +165,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
If \a readOnly is true, additional elements should be visually disabled,
e.g. dropdown button of the combobox editor should be disabled.
For reimplementation. By default does nothing. */
- virtual void showFocus( const QRect& r, bool readOnly );
+ virtual void showFocus( const TQRect& r, bool readOnly );
/*! Hides additional elements that are needed for indicating that the current cell
is selected.
@@ -188,20 +188,20 @@ class KEXICORE_EXPORT KexiDataItemInterface
bool cursorAtNewRow();
/*! Sets a pointer to a Parent Data Item Interface. This pointer is 0 by default,
- but can be set by parent widget if this interface is a building block of a larger data widget.
+ but can be set by tqparent widget if this interface is a building block of a larger data widget.
It is the case for KexiDBFieldEdit widget (see KexiDBFieldEdit::createEditor()). Use with care.
signalValueChanged() method will check this pointer, and if it's not 0,
m_parentDataItemInterface->signalValueChanged() is called, so a changes can be signalled at higher level. */
- void setParentDataItemInterface(KexiDataItemInterface* parentDataItemInterface);
+ void setParentDataItemInterface(KexiDataItemInterface* tqparentDataItemInterface);
/*! \return a pointer to a Parent Data Item Interface.
@see setParentDataItemInterface() */
- inline KexiDataItemInterface* parentInterface() const { return m_parentDataItemInterface; }
+ inline KexiDataItemInterface* tqparentInterface() const { return m_parentDataItemInterface; }
/*! Handles action having standard name \a actionName.
Action could be: "edit_cut", "edit_paste", etc.
For reimplementation. */
- virtual void handleAction(const QString& actionName) { Q_UNUSED(actionName); }
+ virtual void handleAction(const TQString& actionName) { Q_UNUSED(actionName); }
protected:
/*! Initializes this editor with \a add value, which should be somewhat added to the current
@@ -209,37 +209,37 @@ class KEXICORE_EXPORT KexiDataItemInterface
If \a removeOld is true, a value should be set to \a add, otherwise
-it should be set to current \a m_origValue + \a add, if possible.
Implement this. */
- virtual void setValueInternal(const QVariant& add, bool removeOld) = 0;
+ virtual void setValueInternal(const TQVariant& add, bool removeOld) = 0;
/*! Initializes this editor with \a value visible value.
This is currently used only in case of the combo box form widget, where displayed content
(usually a text of image) differs from the value of the widget (a numeric index).
For implementation in the combo box widget, by default does nothing. */
- virtual void setVisibleValueInternal(const QVariant& value);
+ virtual void setVisibleValueInternal(const TQVariant& value);
// //! Sets value \a value for a widget.
// //! Implement this method to allow setting value for this widget item.
-// virtual void setValueInternal(const QVariant& value) = 0;
+// virtual void setValueInternal(const TQVariant& value) = 0;
/*! Call this in your implementation when value changes,
- so installed listener can react on this change. If there is a parent data item defined
- (see setParentDataItemInterface()), parent's signalValueChanged() method will be called instead. */
+ so installed listener can react on this change. If there is a tqparent data item defined
+ (see setParentDataItemInterface()), tqparent's signalValueChanged() method will be called instead. */
virtual void signalValueChanged();
/*! Used to perform some actions before signalValueChanged() call.
- We need this because the intrface is not QObject and thus has got no real signals.
+ We need this because the intrface is not TQObject and thus has got no real signals.
Used in KexiDBComboBox. */
virtual void beforeSignalValueChanged() {};
KexiDataItemChangesListener* listener();
-//moved to KexiFormDataItemInterface: QString m_dataSource;
- QGuardedPtr<QObject> m_listenerObject;
+//moved to KexiFormDataItemInterface: TQString m_dataSource;
+ TQGuardedPtr<TQObject> m_listenerObject;
KexiDataItemChangesListener* m_listener;
- bool m_listenerIsQObject;
- QVariant m_origValue;
+ bool m_listenerIsTQObject;
+ TQVariant m_origValue;
- /*! @see parentDataItemInterface() */
+ /*! @see tqparentDataItemInterface() */
KexiDataItemInterface* m_parentDataItemInterface;
bool m_hasFocusableWidget : 1;
bool m_disable_signalValueChanged : 1;
diff --git a/kexi/core/kexidbconnectionset.cpp b/kexi/core/kexidbconnectionset.cpp
index 1a0eb7745..f548d82bb 100644
--- a/kexi/core/kexidbconnectionset.cpp
+++ b/kexi/core/kexidbconnectionset.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qfile.h>
+#include <tqfile.h>
//! @internal
class KexiDBConnectionSetPrivate
@@ -36,13 +36,13 @@ public:
maxid=-1;
}
KexiDB::ConnectionData::List list;
- QMap<KexiDB::ConnectionData*, QString> filenamesForData;
- QDict<KexiDB::ConnectionData> dataForFilenames;
+ TQMap<KexiDB::ConnectionData*, TQString> filenamesForData;
+ TQDict<KexiDB::ConnectionData> dataForFilenames;
int maxid;
};
KexiDBConnectionSet::KexiDBConnectionSet()
-: QObject()
+: TQObject()
, d(new KexiDBConnectionSetPrivate())
{
}
@@ -52,7 +52,7 @@ KexiDBConnectionSet::~KexiDBConnectionSet()
delete d;
}
-bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const QString& _filename)
+bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const TQString& _filename)
{
if (!data)
return false;
@@ -60,27 +60,27 @@ bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const
data->id = d->maxid+1;
//TODO: check for id-duplicates
- d->maxid = QMAX(d->maxid,data->id);
+ d->maxid = TQMAX(d->maxid,data->id);
// d->list.append(data);
- QString filename( _filename );
+ TQString filename( _filename );
bool generateUniqueFilename = filename.isEmpty()
|| !filename.isEmpty() && data==d->dataForFilenames[filename];
if (generateUniqueFilename) {
- QString dir = KGlobal::dirs()->saveLocation("data", "kexi/connections/", false /*!create*/);
+ TQString dir = KGlobal::dirs()->saveLocation("data", "kexi/connections/", false /*!create*/);
if (dir.isEmpty())
return false;
- QString baseFilename( dir + (data->hostName.isEmpty() ? "localhost" : data->hostName) );
+ TQString baseFilename( dir + (data->hostName.isEmpty() ? "localhost" : data->hostName) );
int i = 0;
- while (KStandardDirs::exists(baseFilename+(i>0 ? QString::number(i) : QString::null)+".kexic"))
+ while (KStandardDirs::exists(baseFilename+(i>0 ? TQString::number(i) : TQString())+".kexic"))
i++;
if (!KStandardDirs::exists(dir)) {
//make 'connections' dir and protect it
if (!KStandardDirs::makeDir(dir, 0700))
return false;
}
- filename = baseFilename+(i>0 ? QString::number(i) : QString::null)+".kexic";
+ filename = baseFilename+(i>0 ? TQString::number(i) : TQString())+".kexic";
}
addConnectionDataInternal(data, filename);
bool result = saveConnectionData(data, data);
@@ -89,7 +89,7 @@ bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const
return result;
}
-void KexiDBConnectionSet::addConnectionDataInternal(KexiDB::ConnectionData *data, const QString& filename)
+void KexiDBConnectionSet::addConnectionDataInternal(KexiDB::ConnectionData *data, const TQString& filename)
{
d->filenamesForData.insert(data, filename);
d->dataForFilenames.insert(filename, data);
@@ -101,10 +101,10 @@ bool KexiDBConnectionSet::saveConnectionData(KexiDB::ConnectionData *oldData,
{
if (!oldData || !newData)
return false;
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( oldData );
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( oldData );
if (it == d->filenamesForData.constEnd() || it.data().isEmpty())
return false;
- const QString filename( it.data() );
+ const TQString filename( it.data() );
KexiDBConnShortcutFile shortcutFile(filename);
if (!shortcutFile.saveConnectionData(*newData, newData->savePassword)) // true/*savePassword*/))
return false;
@@ -115,8 +115,8 @@ bool KexiDBConnectionSet::saveConnectionData(KexiDB::ConnectionData *oldData,
void KexiDBConnectionSet::removeConnectionDataInternal(KexiDB::ConnectionData *data)
{
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( data );
- const QString filename( it.data() );
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( data );
+ const TQString filename( it.data() );
d->filenamesForData.remove(data);
d->dataForFilenames.remove(filename);
d->list.removeRef(data);
@@ -126,10 +126,10 @@ bool KexiDBConnectionSet::removeConnectionData(KexiDB::ConnectionData *data)
{
if (!data)
return false;
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( data );
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( data );
if (it == d->filenamesForData.constEnd() || it.data().isEmpty())
return false;
- QFile file( it.data() );
+ TQFile file( it.data() );
if (!file.remove())
return false;
removeConnectionDataInternal(data);
@@ -151,14 +151,14 @@ void KexiDBConnectionSet::clear()
void KexiDBConnectionSet::load()
{
clear();
-// QStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
+// TQStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
// kexidbg << dirs << endl;
- QStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
+ TQStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
// //also try for capital file extension
// files += KGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC");
// kexidbg << files << endl;
- foreach(QStringList::ConstIterator, it, files) {
+ foreach(TQStringList::ConstIterator, it, files) {
KexiDB::ConnectionData *data = new KexiDB::ConnectionData();
KexiDBConnShortcutFile shortcutFile( *it );
if (!shortcutFile.loadConnectionData(*data)) {
@@ -169,15 +169,15 @@ void KexiDBConnectionSet::load()
}
}
-QString KexiDBConnectionSet::fileNameForConnectionData(KexiDB::ConnectionData *data) const
+TQString KexiDBConnectionSet::fileNameForConnectionData(KexiDB::ConnectionData *data) const
{
if (!data)
- return QString::null;
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( data );
- return (it == d->filenamesForData.constEnd()) ? QString::null : it.data();
+ return TQString();
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( data );
+ return (it == d->filenamesForData.constEnd()) ? TQString() : it.data();
}
-KexiDB::ConnectionData* KexiDBConnectionSet::connectionDataForFileName(const QString& fileName) const
+KexiDB::ConnectionData* KexiDBConnectionSet::connectionDataForFileName(const TQString& fileName) const
{
return d->dataForFilenames[fileName];
}
diff --git a/kexi/core/kexidbconnectionset.h b/kexi/core/kexidbconnectionset.h
index 78d4649a3..fc831cdcd 100644
--- a/kexi/core/kexidbconnectionset.h
+++ b/kexi/core/kexidbconnectionset.h
@@ -20,13 +20,13 @@
#ifndef KEXIDBCONNSET_H
#define KEXIDBCONNSET_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kexidb/connectiondata.h>
class KexiDBConnectionSetPrivate;
/*! Stores information about multiple connection-data items. */
-class KEXICORE_EXPORT KexiDBConnectionSet : public QObject
+class KEXICORE_EXPORT KexiDBConnectionSet : public TQObject
{
public:
KexiDBConnectionSet();
@@ -43,7 +43,7 @@ public:
saveConnectionData() is called automatically, if there's no \a filename provided
or the filename is already used, a new unique will be generated.
\return true on successful creating corresponding .kexic file */
- bool addConnectionData(KexiDB::ConnectionData *data, const QString& filename = QString::null);
+ bool addConnectionData(KexiDB::ConnectionData *data, const TQString& filename = TQString());
/*! Saves changes made to \a oldData to a file which name has been provided by addConnectionData().
This function does nothing if \a oldData hasn't been added to this set.
@@ -58,16 +58,16 @@ public:
const KexiDB::ConnectionData::List& list() const;
/*! \return a filename of a connection data file for \a data. */
- QString fileNameForConnectionData(KexiDB::ConnectionData *data) const;
+ TQString fileNameForConnectionData(KexiDB::ConnectionData *data) const;
/*! \return a connection data for a .kexic shortcut filename.
0 is returned if the filename does not match. */
- KexiDB::ConnectionData* connectionDataForFileName(const QString& fileName) const;
+ KexiDB::ConnectionData* connectionDataForFileName(const TQString& fileName) const;
private:
/*! Removes all connection data items from this set. */
void clear();
- void addConnectionDataInternal(KexiDB::ConnectionData *data, const QString& filename);
+ void addConnectionDataInternal(KexiDB::ConnectionData *data, const TQString& filename);
void removeConnectionDataInternal(KexiDB::ConnectionData *data);
KexiDBConnectionSetPrivate *d;
diff --git a/kexi/core/kexidbshortcutfile.cpp b/kexi/core/kexidbshortcutfile.cpp
index 4a503d432..451eb66a9 100644
--- a/kexi/core/kexidbshortcutfile.cpp
+++ b/kexi/core/kexidbshortcutfile.cpp
@@ -25,8 +25,8 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
//! Version of the KexiDBShortcutFile format.
#define KexiDBShortcutFile_version 2
@@ -45,14 +45,14 @@ class KexiDBShortcutFile::Private
: isDatabaseShortcut(true)
{
}
- QString fileName;
+ TQString fileName;
bool isDatabaseShortcut : 1;
};
-KexiDBShortcutFile::KexiDBShortcutFile( const QString& fileName )
+KexiDBShortcutFile::KexiDBShortcutFile( const TQString& fileName )
: d( new KexiDBShortcutFile::Private() )
{
- d->fileName = QDir(fileName).absPath();
+ d->fileName = TQDir(fileName).absPath();
}
KexiDBShortcutFile::~KexiDBShortcutFile()
@@ -60,16 +60,16 @@ KexiDBShortcutFile::~KexiDBShortcutFile()
delete d;
}
-bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupKey)
+bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, TQString* _groupKey)
{
KConfig config(d->fileName, true /* readOnly */, false /* local */ );
config.setGroup("File Information");
data.formatVersion = config.readNumEntry("version", KexiDBShortcutFile_version);
- QString groupKey;
+ TQString groupKey;
if (!_groupKey || _groupKey->isEmpty()) {
- QStringList groups(config.groupList());
- foreach (QStringList::ConstIterator, it, groups) {
+ TQStringList groups(config.groupList());
+ foreach (TQStringList::ConstIterator, it, groups) {
if ((*it).lower()!="file information") {
groupKey = *it;
break;
@@ -89,7 +89,7 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
}
config.setGroup(groupKey);
- QString type( config.readEntry("type", "database").lower() );
+ TQString type( config.readEntry("type", "database").lower() );
if (type=="database") {
d->isDatabaseShortcut = true;
@@ -97,7 +97,7 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
d->isDatabaseShortcut = false;
}
else {
- //ERR: i18n("No valid "type" field specified for section \"%1\": unknown value \"%2\".").arg(group).arg(type)
+ //ERR: i18n("No valid "type" field specified for section \"%1\": unknown value \"%2\".").tqarg(group).tqarg(type)
return false;
}
@@ -109,26 +109,26 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
<< " engine=" << config.readEntry("engine")
<< " server=" << config.readEntry("server")
<< " user=" << config.readEntry("user")
- << " password=" << QString().fill('*', config.readEntry("password").length())
+ << " password=" << TQString().fill('*', config.readEntry("password").length())
<< " comment=" << config.readEntry("comment")
<< endl;*/
//no filename by default
- data.connectionData()->setFileName(QString::null);
+ data.connectionData()->setFileName(TQString());
if (d->isDatabaseShortcut) {
data.setCaption( config.readEntry("caption") );
data.setDescription( config.readEntry("comment") );
- data.connectionData()->description = QString::null;
- data.connectionData()->caption = QString::null; /* connection name is not specified... */
+ data.connectionData()->description = TQString();
+ data.connectionData()->caption = TQString(); /* connection name is not specified... */
data.setDatabaseName( config.readEntry("name") );
}
else {
- data.setCaption( QString::null );
+ data.setCaption( TQString() );
data.connectionData()->caption = config.readEntry("caption");
- data.setDescription( QString::null );
+ data.setDescription( TQString() );
data.connectionData()->description = config.readEntry("comment");
- data.setDatabaseName( QString::null ); /* db name is not specified... */
+ data.setDatabaseName( TQString() ); /* db name is not specified... */
}
data.connectionData()->driverName = config.readEntry("engine");
if (data.connectionData()->driverName.isEmpty()) {
@@ -156,7 +156,7 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
}
bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
- bool savePassword, QString* _groupKey, bool overwriteFirstGroup)
+ bool savePassword, TQString* _groupKey, bool overwriteFirstGroup)
{
KConfig config(d->fileName, false /*rw*/, false /* local */);
config.setGroup("File Information");
@@ -169,16 +169,16 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
const bool thisIsConnectionData = data.databaseName().isEmpty();
//use or find a nonempty group key
- QString groupKey;
+ TQString groupKey;
if (_groupKey && !_groupKey->isEmpty()) {
groupKey = *_groupKey;
}
else {
- QString groupPrefix;
- const QStringList groups(config.groupList());
+ TQString groupPrefix;
+ const TQStringList groups(config.groupList());
if (overwriteFirstGroup && !groups.isEmpty()) {
// groupKey = groups.first(); //found
- foreach (QStringList::ConstIterator, it, groups) {
+ foreach (TQStringList::ConstIterator, it, groups) {
if ((*it).lower()!="file information") {
groupKey = *it;
break;
@@ -194,9 +194,9 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
groupPrefix = "Database%1"; //do not i18n!
int number = 1;
- while (config.hasGroup(groupPrefix.arg(number))) //a new group key couldn't exist
+ while (config.hasGroup(groupPrefix.tqarg(number))) //a new group key couldn't exist
number++;
- groupKey = groupPrefix.arg(number);
+ groupKey = groupPrefix.tqarg(number);
}
if (_groupKey) //return this one (generated or found)
*_groupKey = groupKey;
@@ -233,7 +233,7 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
config.writeEntry("password", data.constConnectionData()->password);
}
else {
- QString encryptedPassword = data.constConnectionData()->password;
+ TQString encryptedPassword = data.constConnectionData()->password;
KexiUtils::simpleCrypt(encryptedPassword);
config.writeEntry("encryptedPassword", encryptedPassword);
encryptedPassword.fill(' '); //for security
@@ -247,14 +247,14 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
return true;
}
-QString KexiDBShortcutFile::fileName() const
+TQString KexiDBShortcutFile::fileName() const
{
return d->fileName;
}
//---------------------------------------------
-KexiDBConnShortcutFile::KexiDBConnShortcutFile( const QString& fileName )
+KexiDBConnShortcutFile::KexiDBConnShortcutFile( const TQString& fileName )
: KexiDBShortcutFile( fileName )
{
}
@@ -263,7 +263,7 @@ KexiDBConnShortcutFile::~KexiDBConnShortcutFile()
{
}
-bool KexiDBConnShortcutFile::loadConnectionData(KexiDB::ConnectionData& data, QString* _groupKey)
+bool KexiDBConnShortcutFile::loadConnectionData(KexiDB::ConnectionData& data, TQString* _groupKey)
{
KexiProjectData pdata(data);
if (!loadProjectData(pdata, _groupKey))
@@ -273,7 +273,7 @@ bool KexiDBConnShortcutFile::loadConnectionData(KexiDB::ConnectionData& data, QS
}
bool KexiDBConnShortcutFile::saveConnectionData(const KexiDB::ConnectionData& data,
- bool savePassword, QString* groupKey, bool overwriteFirstGroup)
+ bool savePassword, TQString* groupKey, bool overwriteFirstGroup)
{
KexiProjectData pdata(data);
return saveProjectData(pdata, savePassword, groupKey, overwriteFirstGroup);
@@ -286,14 +286,14 @@ bool KexiDBConnShortcutFile::saveConnectionData(const KexiDB::ConnectionData& da
bool KexiDBConnSetShortcutFiles::loadConnectionDataSet(KexiDBConnectionSet& set)
{
set.clear();
-// QStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
+// TQStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
// kexidbg << dirs << endl;
- QStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
+ TQStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
// //also try for capital file extension
// files += KGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC");
kexidbg << files << endl;
- foreach(QStringList::ConstIterator, it, files) {
+ foreach(TQStringList::ConstIterator, it, files) {
KexiDB::ConnectionData *data = new KexiDB::ConnectionData();
KexiDBConnShortcutFile shortcutFile( *it );
if (!shortcutFile.loadConnectionData(*data)) {
diff --git a/kexi/core/kexidbshortcutfile.h b/kexi/core/kexidbshortcutfile.h
index 3dfa9c13d..382f470fe 100644
--- a/kexi/core/kexidbshortcutfile.h
+++ b/kexi/core/kexidbshortcutfile.h
@@ -20,7 +20,7 @@
#ifndef KEXIDBSHORTCUTFILE_H
#define KEXIDBSHORTCUTFILE_H
-#include <qstring.h>
+#include <tqstring.h>
class KexiProjectData;
namespace KexiDB { class ConnectionData; }
@@ -34,7 +34,7 @@ class KEXICORE_EXPORT KexiDBShortcutFile
{
public:
/*! Creates a new object for \a fileName. */
- KexiDBShortcutFile( const QString& fileName );
+ KexiDBShortcutFile( const TQString& fileName );
~KexiDBShortcutFile();
@@ -43,7 +43,7 @@ class KEXICORE_EXPORT KexiDBShortcutFile
\a groupKey, if provided will be set to a group key,
so you can later use it in saveConnectionData().
\return true on success. */
- bool loadProjectData(KexiProjectData& data, QString* groupKey = 0);
+ bool loadProjectData(KexiProjectData& data, TQString* groupKey = 0);
/*! Saves project data \a data (with connection data) to a shortcut file.
If \a storePassword is true, password will be saved in the file,
@@ -54,10 +54,10 @@ class KEXICORE_EXPORT KexiDBShortcutFile
containing single connection data, what's used for storing connections repository.
\return true on success. */
bool saveProjectData(const KexiProjectData& data, bool savePassword,
- QString* groupKey = 0, bool overwriteFirstGroup = true);
+ TQString* groupKey = 0, bool overwriteFirstGroup = true);
//! \return filename provided on this object's construction. */
- QString fileName() const;
+ TQString fileName() const;
protected:
class Private;
@@ -73,7 +73,7 @@ class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
{
public:
/*! Creates a new object for \a fileName. */
- KexiDBConnShortcutFile( const QString& fileName );
+ KexiDBConnShortcutFile( const TQString& fileName );
~KexiDBConnShortcutFile();
@@ -81,7 +81,7 @@ class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
\a groupKey, if provided will be set to a group key,
so you can later use it in saveConnectionData().
\return true on success. */
- bool loadConnectionData(KexiDB::ConnectionData& data, QString* groupKey = 0);
+ bool loadConnectionData(KexiDB::ConnectionData& data, TQString* groupKey = 0);
/*! Saves connection data \a data to a shortcut file.
If \a storePassword is true, password will be saved in the file,
@@ -92,10 +92,10 @@ class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
containing single connection data, what's used for storing connections repository.
\return true on success. */
bool saveConnectionData(const KexiDB::ConnectionData& data,
- bool savePassword, QString* groupKey = 0, bool overwriteFirstGroup = true);
+ bool savePassword, TQString* groupKey = 0, bool overwriteFirstGroup = true);
//! \return filename provided on this object's construction. */
- QString fileName() const { return KexiDBShortcutFile::fileName(); }
+ TQString fileName() const { return KexiDBShortcutFile::fileName(); }
protected:
};
diff --git a/kexi/core/kexidialogbase.cpp b/kexi/core/kexidialogbase.cpp
index 2f94e661f..1469575b1 100644
--- a/kexi/core/kexidialogbase.cpp
+++ b/kexi/core/kexidialogbase.cpp
@@ -33,17 +33,17 @@
#include <kexidb/utils.h>
#include <kexiutils/utils.h>
-#include <qwidgetstack.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
+#include <tqwidgetstack.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kapplication.h>
#include <kiconloader.h>
-KexiDialogBase::KexiDialogBase(KexiMainWindow *parent, const QString &caption)
- : KMdiChildView(caption, parent, "KexiDialogBase")
- , KexiActionProxy(this, parent)
+KexiDialogBase::KexiDialogBase(KexiMainWindow *tqparent, const TQString &caption)
+ : KMdiChildView(caption, tqparent, "KexiDialogBase")
+ , KexiActionProxy(TQT_TQOBJECT(this), tqparent)
, m_isRegistered(false)
, m_origCaption(caption)
, m_schemaData(0)
@@ -54,17 +54,17 @@ KexiDialogBase::KexiDialogBase(KexiMainWindow *parent, const QString &caption)
m_supportedViewModes = 0; //will be set by KexiPart
m_openedViewModes = 0;
m_currentViewMode = Kexi::NoViewMode; //no view available yet
- m_parentWindow = parent;
+ m_parentWindow = tqparent;
m_creatingViewsMode = -1;
- QVBoxLayout *lyr = new QVBoxLayout(this);
- m_stack = new QWidgetStack(this, "stack");
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
+ m_stack = new TQWidgetStack(this, "stack");
lyr->addWidget(m_stack);
#ifdef KEXI_NO_CTXT_HELP
m_contextHelpInfo=new KexiContextHelpInfo();
#endif
-// m_instance=parent->instance();
+// m_instance=tqparent->instance();
m_id = -1;
m_item = 0;
@@ -100,7 +100,7 @@ void KexiDialogBase::addView(KexiViewBase *view, int mode)
// addActionProxyChild( view );
//set focus proxy inside this view
- QWidget *ch = static_cast<QWidget*>(view->child( 0, "QWidget", false ));
+ TQWidget *ch = TQT_TQWIDGET(view->child( 0, TQWIDGET_OBJECT_NAME_STRING, false ));
if (ch)
view->setFocusProxy(ch);
@@ -117,20 +117,20 @@ void KexiDialogBase::removeView(int mode)
m_openedViewModes ^= mode;
}
-QSize KexiDialogBase::minimumSizeHint() const
+TQSize KexiDialogBase::tqminimumSizeHint() const
{
KexiViewBase *v = selectedView();
if (!v)
- return KMdiChildView::minimumSizeHint();
- return v->minimumSizeHint() + QSize(0, mdiParent() ? mdiParent()->captionHeight() : 0);
+ return KMdiChildView::tqminimumSizeHint();
+ return v->tqminimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0);
}
-QSize KexiDialogBase::sizeHint() const
+TQSize KexiDialogBase::tqsizeHint() const
{
KexiViewBase *v = selectedView();
if (!v)
- return KMdiChildView::sizeHint();
- return v->preferredSizeHint( v->sizeHint() );
+ return KMdiChildView::tqsizeHint();
+ return v->preferredSizeHint( v->tqsizeHint() );
}
/*
@@ -174,7 +174,7 @@ int KexiDialogBase::id() const
return (partItem() && partItem()->identifier()>0) ? partItem()->identifier() : m_id;
}
-void KexiDialogBase::setContextHelp(const QString& caption, const QString& text, const QString& iconName) {
+void KexiDialogBase::setContextHelp(const TQString& caption, const TQString& text, const TQString& iconName) {
#ifdef KEXI_NO_CTXT_HELP
m_contextHelpInfo->caption=caption;
m_contextHelpInfo->text=text;
@@ -183,15 +183,15 @@ void KexiDialogBase::setContextHelp(const QString& caption, const QString& text,
#endif
}
-void KexiDialogBase::closeEvent( QCloseEvent * e )
+void KexiDialogBase::closeEvent( TQCloseEvent * e )
{
m_parentWindow->acceptPropertySetEditing();
//let any view send "closing" signal
- QObjectList *list = m_stack->queryList( "KexiViewBase", 0, false, false);
+ TQObjectList *list = m_stack->queryList( "KexiViewBase", 0, false, false);
KexiViewBase *view;
- QObjectListIt it( *list );
- for ( ;(view = static_cast<KexiViewBase*>(it.current()) ) != 0; ++it ) {
+ TQObjectListIt it( *list );
+ for ( ;(view = static_cast<KexiViewBase*>(TQT_TQWIDGET(it.current())) ) != 0; ++it ) {
bool cancel = false;
emit view->closing(cancel);
if (cancel) {
@@ -252,14 +252,14 @@ void KexiDialogBase::setDirty(bool dirty)
dirtyChanged(m_viewThatRecentlySetDirtyFlag); //update
}
-QString KexiDialogBase::itemIcon()
+TQString KexiDialogBase::itemIcon()
{
if (!m_part || !m_part->info()) {
KexiViewBase *v = selectedView();
if (v) {//m_stack->visibleWidget() && m_stack->visibleWidget()->inherits("KexiViewBase")) {
return v->m_defaultIconName;
}
- return QString::null;
+ return TQString();
}
return m_part->info()->itemIcon();
}
@@ -285,7 +285,7 @@ bool KexiDialogBase::isDesignModePreloadedForTextModeHackUsed(int newViewMode) c
&& supportsViewMode(Kexi::DesignViewMode);
}
-tristate KexiDialogBase::switchToViewMode( int newViewMode, QMap<QString,QString>* staticObjectArgs,
+tristate KexiDialogBase::switchToViewMode( int newViewMode, TQMap<TQString,TQString>* staticObjectArgs,
bool& proposeOpeningInTextViewModeBecauseOfProblems)
{
m_parentWindow->acceptPropertySetEditing();
@@ -377,9 +377,9 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, QMap<QString,QString
delete newView;
kdDebug() << "Switching to mode " << newViewMode << " failed. Previous mode "
<< prevViewMode << " restored." << endl;
- const Kexi::ObjectStatus status(*this);
- setStatus(mainWin()->project()->dbConnection(),
- i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(newViewMode)),"");
+ const Kexi::ObjecttqStatus status(*this);
+ settqStatus(mainWin()->project()->dbConnection(),
+ i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(newViewMode)),"");
append( status );
m_currentViewMode = prevViewMode;
return false;
@@ -394,8 +394,8 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, QMap<QString,QString
addActionProxyChild( newView ); //new proxy child
m_stack->raiseWidget( newView );
newView->propertySetSwitched();
- m_parentWindow->invalidateSharedActions( newView );
- QTimer::singleShot(10, newView, SLOT(setFocus())); //newView->setFocus(); //js ok?
+ m_parentWindow->tqinvalidateSharedActions( TQT_TQOBJECT(newView) );
+ TQTimer::singleShot(10, newView, TQT_SLOT(setFocus())); //newView->setFocus(); //js ok?
// setFocus();
return true;
}
@@ -429,17 +429,17 @@ KexiDialogBase::propertySet()
return v->propertySet();
}
-bool KexiDialogBase::eventFilter(QObject *obj, QEvent *e)
+bool KexiDialogBase::eventFilter(TQObject *obj, TQEvent *e)
{
if (KMdiChildView::eventFilter(obj, e))
return true;
-/* if (e->type()==QEvent::FocusIn) {
- QWidget *w = m_parentWindow->activeWindow();
+/* if (e->type()==TQEvent::FocusIn) {
+ TQWidget *w = m_parentWindow->activeWindow();
w=0;
}*/
- if ((e->type()==QEvent::FocusIn && m_parentWindow->activeWindow()==this)
- || e->type()==QEvent::MouseButtonPress) {
- if (m_stack->visibleWidget() && KexiUtils::hasParent(m_stack->visibleWidget(), obj)) {
+ if ((e->type()==TQEvent::FocusIn && m_parentWindow->activeWindow()==this)
+ || e->type()==TQEvent::MouseButtonPress) {
+ if (m_stack->visibleWidget() && KexiUtils::hasParent(TQT_TQOBJECT(m_stack->visibleWidget()), obj)) {
//pass the activation
activate();
}
@@ -464,7 +464,7 @@ void KexiDialogBase::dirtyChanged(KexiViewBase* view)
emit dirtyChanged(this);
}
-/*QString KexiDialogBase::caption() const
+/*TQString KexiDialogBase::caption() const
{
return m_origCaption;
if (dirty())
@@ -478,8 +478,8 @@ void KexiDialogBase::updateCaption()
if (!m_item || !m_part || !m_origCaption.isEmpty())
return;
// m_origCaption = c;
- QString capt = m_item->name();
- QString fullCapt = capt;
+ TQString capt = m_item->name();
+ TQString fullCapt = capt;
if (m_part)
fullCapt += (" : " + m_part->instanceCaption());
if (dirty()) {
@@ -517,7 +517,7 @@ tristate KexiDialogBase::storeNewData()
if (cancel)
return cancelled;
if (!m_schemaData) {
- setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),"");
+ settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),"");
return false;
}
@@ -544,25 +544,25 @@ tristate KexiDialogBase::storeNewData()
} else {
// Got a maximum part ID, or there were no parts
p_id = p_id + 1;
- p_id = QMAX(p_id, (int)KexiPart::UserObjectType);
+ p_id = TQMAX(p_id, (int)KexiPart::UserObjectType);
}
}
KexiDB::FieldList *fl = ts->subList("p_id", "p_name", "p_mime", "p_url");
kexidbg << "KexiDialogBase::storeNewData(): fieldlist: "
- << (fl ? fl->debugString() : QString::null) << endl;
+ << (fl ? fl->debugString() : TQString()) << endl;
if (!fl)
return false;
kexidbg << part()->info()->ptr()->untranslatedGenericName() << endl;
-// QStringList sl = part()->info()->ptr()->propertyNames();
-// for (QStringList::ConstIterator it=sl.constBegin();it!=sl.constEnd();++it)
+// TQStringList sl = part()->info()->ptr()->propertyNames();
+// for (TQStringList::ConstIterator it=sl.constBegin();it!=sl.constEnd();++it)
// kexidbg << *it << " " << part()->info()->ptr()->property(*it).toString() << endl;
if (!m_parentWindow->project()->dbConnection()->insertRecord(
*fl,
- QVariant(p_id),
- QVariant(part()->info()->ptr()->untranslatedGenericName()),
- QVariant(part()->info()->mimeType()), QVariant("http://www.koffice.org/kexi/" /*always ok?*/)))
+ TQVariant(p_id),
+ TQVariant(part()->info()->ptr()->untranslatedGenericName()),
+ TQVariant(part()->info()->mimeType()), TQVariant("http://www.koffice.org/kexi/" /*always ok?*/)))
return false;
kdDebug() << "KexiDialogBase::storeNewData(): insert success!" << endl;
@@ -594,7 +594,7 @@ tristate KexiDialogBase::storeData(bool dontAsk)
return false;
#define storeData_ERR \
- setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),"");
+ settqStatus(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() << "focusWidget(): " << focusWidget()->name() << endl;
- if (KexiUtils::hasParent( v, KMdiChildView::focusedChildWidget()))//focusWidget()))
+ //kdDebug() << "tqfocusWidget(): " << tqfocusWidget()->name() << endl;
+ if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//tqfocusWidget()))
KMdiChildView::activate();
else {//ah, focused widget is not in this view, move focus:
if (v)
@@ -633,7 +633,7 @@ void KexiDialogBase::activate()
}
if (v)
v->updateActions(true);
-//js: not neeed?? m_parentWindow->invalidateSharedActions(this);
+//js: not neeed?? m_parentWindow->tqinvalidateSharedActions(this);
}
void KexiDialogBase::deactivate()
@@ -647,14 +647,14 @@ void KexiDialogBase::sendDetachedStateToCurrentView()
{
KexiViewBase *v = selectedView();
if (v)
- v->parentDialogDetached();
+ v->tqparentDialogDetached();
}
void KexiDialogBase::sendAttachedStateToCurrentView()
{
KexiViewBase *v = selectedView();
if (v)
- v->parentDialogAttached();
+ v->tqparentDialogAttached();
}
#include "kexidialogbase.moc"
diff --git a/kexi/core/kexidialogbase.h b/kexi/core/kexidialogbase.h
index 43dc1ff4e..68c712364 100644
--- a/kexi/core/kexidialogbase.h
+++ b/kexi/core/kexidialogbase.h
@@ -26,12 +26,12 @@
#include "kexi.h"
#include "kexipart.h"
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kmdichildview.h>
#include <kxmlguiclient.h>
-class QWidgetStack;
+class TQWidgetStack;
class KexiMainWindow;
class KexiViewBase;
class KActionCollection;
@@ -46,11 +46,11 @@ namespace KoProperty {
//! Privides temporary data shared between KexiDialogBase's views (KexiView's)
/*! Designed for reimplementation, if needed. */
-class KEXICORE_EXPORT KexiDialogTempData : public QObject
+class KEXICORE_EXPORT KexiDialogTempData : public TQObject
{
public:
- KexiDialogTempData(QObject* parent)
- : QObject(parent, "KexiDialogTempData")
+ KexiDialogTempData(TQObject* tqparent)
+ : TQObject(tqparent, "KexiDialogTempData")
, proposeOpeningInTextViewModeBecauseOfProblems(false)
{}
/*! Initially false, KexiPart::Part implementation can set this to true
@@ -75,12 +75,13 @@ class KEXICORE_EXPORT KexiDialogTempData : public QObject
class KEXICORE_EXPORT KexiDialogBase :
public KMdiChildView,
public KexiActionProxy,
- public Kexi::ObjectStatus
+ public Kexi::ObjecttqStatus
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDialogBase(KexiMainWindow *parent, const QString &caption = QString::null);
+ KexiDialogBase(KexiMainWindow *tqparent, const TQString &caption = TQString());
virtual ~KexiDialogBase();
bool isRegistered();
@@ -97,13 +98,13 @@ class KEXICORE_EXPORT KexiDialogBase :
/*! \return main (top level) widget inside this dialog.
This widget is used for e.g. determining minimum size hint and size hint. */
-// virtual QWidget* mainWidget() = 0;
+// virtual TQWidget* mainWidget() = 0;
/*! reimplemented: minimum size hint is inherited from currently visible view. */
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
/*! reimplemented: size hint is inherited from currently visible view. */
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
KexiMainWindow *mainWin() const { return m_parentWindow; }
@@ -141,7 +142,7 @@ class KEXICORE_EXPORT KexiDialogBase :
/*! \return name of icon provided by part that created this dialog.
The name is used by KexiMainWindow to set/reset icon for this dialog. */
- virtual QString itemIcon();
+ virtual TQString itemIcon();
/*! \return true if this dialog supports switching to \a mode.
\a mode is one of Kexi::ViewMode enum elements.
@@ -161,10 +162,10 @@ class KEXICORE_EXPORT KexiDialogBase :
*/
tristate switchToViewMode( int newViewMode );
- void setContextHelp(const QString& caption, const QString& text, const QString& iconName);
+ void setContextHelp(const TQString& caption, const TQString& text, const TQString& iconName);
/*! Internal reimplementation. */
- virtual bool eventFilter(QObject *obj, QEvent *e);
+ virtual bool eventFilter(TQObject *obj, TQEvent *e);
/*! Used by Main Window
\todo js: PROBABLY REMOVE THESE TWO?
@@ -197,7 +198,7 @@ class KEXICORE_EXPORT KexiDialogBase :
KexiDB::SchemaData* schemaData() const { return m_schemaData; }
/*! Reimpelmented: "*" is added if for 'dirty' dialog's data. */
-// QString caption() const;
+// TQString caption() const;
/*! Used by KexiViewBase subclasses. \return temporary data shared between views */
KexiDialogTempData *tempData() const { return m_tempData; }
@@ -237,13 +238,13 @@ class KEXICORE_EXPORT KexiDialogBase :
tristate storeNewData();
/*! Reimplemented - we're informing the current view about performed detaching by calling
- KexiViewBase::parentDialogDetached(), so the view can react on this event
- (by default KexiViewBase::parentDialogDetached() does nothing, you can reimplement it). */
+ KexiViewBase::tqparentDialogDetached(), so the view can react on this event
+ (by default KexiViewBase::tqparentDialogDetached() does nothing, you can reimplement it). */
void sendDetachedStateToCurrentView();
/*! W're informing the current view about performed atttaching by calling
- KexiViewBase::parentDialogAttached(), so the view can react on this event
- (by default KexiViewBase::parentDialogAttached() does nothing, you can reimplement it). */
+ KexiViewBase::tqparentDialogAttached(), so the view can react on this event
+ (by default KexiViewBase::tqparentDialogAttached() does nothing, you can reimplement it). */
void sendAttachedStateToCurrentView();
signals:
@@ -264,12 +265,12 @@ class KEXICORE_EXPORT KexiDialogBase :
/*! Used by Part::openInstance(),
like switchToViewMode( int newViewMode ), but passed \a staticObjectArgs.
Only used for parts of class KexiPart::StaticPart. */
- tristate switchToViewMode( int newViewMode, QMap<QString,QString>* staticObjectArgs,
+ tristate switchToViewMode( int newViewMode, TQMap<TQString,TQString>* staticObjectArgs,
bool& proposeOpeningInTextViewModeBecauseOfProblems);
void registerDialog();
- virtual void closeEvent( QCloseEvent * e );
+ virtual void closeEvent( TQCloseEvent * e );
//! \internal
void addView(KexiViewBase *view, int mode);
@@ -281,7 +282,7 @@ class KEXICORE_EXPORT KexiDialogBase :
int m_openedViewModes;
int m_currentViewMode;
- inline QWidgetStack * stack() const { return m_stack; }
+ inline TQWidgetStack * stack() const { return m_stack; }
//! Used by \a view to inform the dialog about changing state of the "dirty" flag.
void dirtyChanged(KexiViewBase* view);
@@ -290,7 +291,7 @@ class KEXICORE_EXPORT KexiDialogBase :
indexed with optional \a dataID, from the database backend.
\return true on success
\sa storeDataBlock(). */
- bool loadDataBlock( QString &dataString, const QString& dataID = QString::null);
+ bool loadDataBlock( TQString &dataString, const TQString& dataID = TQString());
/*! Stores (potentially large) string data \a dataString, block (e.g. xml form's representation),
at the database backend. Block will be stored in "kexi__objectdata" table pointed by
@@ -298,21 +299,21 @@ class KEXICORE_EXPORT KexiDialogBase :
If there is already such record in the table, it's simply overwritten.
\return true on success
*/
- bool storeDataBlock( const QString &dataString, const QString& dataID = QString::null );
+ bool storeDataBlock( const TQString &dataString, const TQString& dataID = TQString() );
/*! Removes (potentially large) string data (e.g. xml form's representation),
pointed by optional \a dataID, from the database backend.
\return true on success. Does not fail if the block doe not exists.
Note that if \a dataID is not specified, all data blocks for this dialog will be removed.
\sa storeDataBlock(). */
- bool removeDataBlock( QString &dataString, const QString& dataID = QString::null);
+ bool removeDataBlock( TQString &dataString, const TQString& dataID = TQString());
/*! @internal
Used by KexiDialogBase::storeDataBlock() and by KexiViewBase::storeDataBlock().
*/
- bool storeDataBlock_internal( const QString &dataString, int o_id, const QString& dataID );
+ bool storeDataBlock_internal( const TQString &dataString, int o_id, const TQString& dataID );
#endif
-// void setError(const QString& message, const QString& details);
+// void setError(const TQString& message, const TQString& details);
bool isDesignModePreloadedForTextModeHackUsed(int newViewMode) const;
@@ -323,16 +324,16 @@ class KEXICORE_EXPORT KexiDialogBase :
KexiContextHelpInfo *m_contextHelpInfo;
#endif
int m_id;
- QGuardedPtr<KexiPart::Part> m_part;
+ TQGuardedPtr<KexiPart::Part> m_part;
KexiPart::Item *m_item;
- QWidgetStack *m_stack;
- QString m_origCaption; //!< helper
+ TQWidgetStack *m_stack;
+ TQString m_origCaption; //!< helper
KexiDB::SchemaData* m_schemaData;
- QGuardedPtr<KexiViewBase> m_newlySelectedView; //!< Used in dirty(), temporary set in switchToViewMode()
+ TQGuardedPtr<KexiViewBase> m_newlySelectedView; //!< Used in dirty(), temporary set in switchToViewMode()
//!< during view setup, when a new view is not yet raised.
//! Used in viewThatRecentlySetDirtyFlag(), modified in dirtyChanged().
- QGuardedPtr<KexiViewBase> m_viewThatRecentlySetDirtyFlag;
- QGuardedPtr<KexiDialogTempData> m_tempData; //!< temporary data shared between views
+ TQGuardedPtr<KexiViewBase> m_viewThatRecentlySetDirtyFlag;
+ TQGuardedPtr<KexiDialogTempData> m_tempData; //!< temporary data shared between views
/*! Created view's mode - helper for switchToViewMode(),
KexiViewBase ctor uses that info. >0 values are useful. */
diff --git a/kexi/core/kexidragobjects.cpp b/kexi/core/kexidragobjects.cpp
index 5cddbca0b..f69b5a6ac 100644
--- a/kexi/core/kexidragobjects.cpp
+++ b/kexi/core/kexidragobjects.cpp
@@ -20,32 +20,32 @@
#include "kexidragobjects.h"
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kdebug.h>
/// implementation of KexiFieldDrag
-KexiFieldDrag::KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QString& field, QWidget *parent, const char *name)
- : QStoredDrag("kexi/field", parent, name)
+KexiFieldDrag::KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& field, TQWidget *tqparent, const char *name)
+ : TQStoredDrag("kexi/field", tqparent, name)
{
- QByteArray data;
- QDataStream stream1(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream1(data,IO_WriteOnly);
stream1 << sourceMimeType << sourceName << field;
setEncodedData(data);
}
-KexiFieldDrag::KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields, QWidget *parent, const char *name)
- : QStoredDrag((fields.count() > 1) ? "kexi/fields" : "kexi/field", parent, name)
+KexiFieldDrag::KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields, TQWidget *tqparent, const char *name)
+ : TQStoredDrag((fields.count() > 1) ? "kexi/fields" : "kexi/field", tqparent, name)
{
- QByteArray data;
- QDataStream stream1(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream1(data,IO_WriteOnly);
if (fields.count() > 1)
stream1 << sourceMimeType << sourceName << fields;
else {
- QString field;
+ TQString field;
if (fields.count() == 1)
field = fields.first();
else
@@ -60,26 +60,26 @@ KexiFieldDrag::~KexiFieldDrag()
}
bool
-KexiFieldDrag::canDecodeSingle(QMimeSource *e)
+KexiFieldDrag::canDecodeSingle(TQMimeSource *e)
{
return e->provides("kexi/field");
}
bool
-KexiFieldDrag::canDecodeMultiple(QMimeSource *e)
+KexiFieldDrag::canDecodeMultiple(TQMimeSource *e)
{
return e->provides("kexi/field") || e->provides("kexi/fields");
}
bool
-KexiFieldDrag::decodeSingle( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QString& field )
+KexiFieldDrag::decodeSingle( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQString& field )
{
- QByteArray payload( e->data("kexi/field") );
+ TQByteArray payload( e->data("kexi/field") );
if (payload.isEmpty())
return false;
e->accept();
- QDataStream stream1(payload, IO_ReadOnly);
+ TQDataStream stream1(payload, IO_ReadOnly);
stream1 >> sourceMimeType;
stream1 >> sourceName;
stream1 >> field;
@@ -88,12 +88,12 @@ KexiFieldDrag::decodeSingle( QDropEvent* e, QString& sourceMimeType,
}
bool
-KexiFieldDrag::decodeMultiple( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QStringList& fields )
+KexiFieldDrag::decodeMultiple( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQStringList& fields )
{
- QByteArray payload( e->data("kexi/fields") );
+ TQByteArray payload( e->data("kexi/fields") );
if (payload.isEmpty()) {//try single
- QString field;
+ TQString field;
bool res = KexiFieldDrag::decodeSingle( e, sourceMimeType, sourceName, field );
if (!res)
return false;
@@ -101,7 +101,7 @@ KexiFieldDrag::decodeMultiple( QDropEvent* e, QString& sourceMimeType,
return true;
}
e->accept();
- QDataStream stream1(payload, IO_ReadOnly);
+ TQDataStream stream1(payload, IO_ReadOnly);
stream1 >> sourceMimeType;
stream1 >> sourceName;
stream1 >> fields;
@@ -111,32 +111,32 @@ KexiFieldDrag::decodeMultiple( QDropEvent* e, QString& sourceMimeType,
/// implementation of KexiDataProviderDrag
-KexiDataProviderDrag::KexiDataProviderDrag(const QString& sourceMimeType, const QString& sourceName,
- QWidget *parent, const char *name)
- : QStoredDrag("kexi/dataprovider", parent, name)
+KexiDataProviderDrag::KexiDataProviderDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ TQWidget *tqparent, const char *name)
+ : TQStoredDrag("kexi/dataprovider", tqparent, name)
{
- QByteArray data;
- QDataStream stream1(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream1(data,IO_WriteOnly);
stream1 << sourceMimeType << sourceName;
setEncodedData(data);
}
bool
-KexiDataProviderDrag::canDecode(QDragMoveEvent *e)
+KexiDataProviderDrag::canDecode(TQDragMoveEvent *e)
{
return e->provides("kexi/dataprovider");
}
bool
-KexiDataProviderDrag::decode( QDropEvent* e, QString& sourceMimeType, QString& sourceName)
+KexiDataProviderDrag::decode( TQDropEvent* e, TQString& sourceMimeType, TQString& sourceName)
{
- QCString tmp;
- QByteArray payload = e->data("kexidataprovider");
+ TQCString tmp;
+ TQByteArray payload = e->data("kexidataprovider");
if(payload.size())
{
e->accept();
- QDataStream stream1(payload, IO_ReadOnly);
+ TQDataStream stream1(payload, IO_ReadOnly);
stream1 >> sourceMimeType;
stream1 >> sourceName;
// kdDebug() << "KexiDataProviderDrag::decode() decoded: " << sourceMimeType <<"/"<<sourceName<< endl;
diff --git a/kexi/core/kexidragobjects.h b/kexi/core/kexidragobjects.h
index 9b7a42ec3..26e2b24f9 100644
--- a/kexi/core/kexidragobjects.h
+++ b/kexi/core/kexidragobjects.h
@@ -21,61 +21,61 @@
#ifndef KEXI_DRAGOBJECTS_H_
#define KEXI_DRAGOBJECTS_H_
-#include <qdragobject.h>
+#include <tqdragobject.h>
-class QString;
-class QStringList;
-class QWidget;
+class TQString;
+class TQStringList;
+class TQWidget;
//! Drag object containing information about field(s).
-class KEXICORE_EXPORT KexiFieldDrag : public QStoredDrag
+class KEXICORE_EXPORT KexiFieldDrag : public TQStoredDrag
{
public:
/*! Creates drag object for a single field \a field. */
- KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QString& field, QWidget *parent, const char *name);
+ KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& field, TQWidget *tqparent, const char *name);
/*! Creates drag object for multiple fields \a fields.
If there's less than two elements in the list, data is set up as for above ctor. */
- KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& field, QWidget *parent=0, const char *name=0);
+ KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& field, TQWidget *tqparent=0, const char *name=0);
~KexiFieldDrag();
- void addField(const QString& field);
+ void addField(const TQString& field);
- /*! \return true if event \a e (of class QDragMoveEvent or QDropEvent)
+ /*! \return true if event \a e (of class TQDragMoveEvent or TQDropEvent)
can be decoded as "kexi/field" data */
- static bool canDecodeSingle( QMimeSource* e );
+ static bool canDecodeSingle( TQMimeSource* e );
- /*! \return true if event \a e (of class QDragMoveEvent or QDropEvent)
+ /*! \return true if event \a e (of class TQDragMoveEvent or TQDropEvent)
can be decoded as "kexi/fields" data. If decoding of "kexi/field"
type is supported, decoding of "kexi/fields" is always supported.
*/
- static bool canDecodeMultiple( QMimeSource* e );
+ static bool canDecodeMultiple( TQMimeSource* e );
/*! Decodes data of single-field drag ("kexi/field" mime type) coming with event \a e.
Sets \a sourceMimeType, \a sourceName and \a field.
\return true on successful decoding (\a e will be accepted in such case). */
- static bool decodeSingle( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QString& field );
+ static bool decodeSingle( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQString& field );
/*! Decodes data of multiple-field drag ("kexi/fields" mime type) coming with event \a e.
Sets \a sourceMimeType, \a sourceName and \a fields. Also works with "kexi/field" data.
\return true on successful decoding (\a e will be accepted in such case). */
- static bool decodeMultiple( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QStringList& fields );
+ static bool decodeMultiple( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQStringList& fields );
};
-class KEXICORE_EXPORT KexiDataProviderDrag : public QStoredDrag
+class KEXICORE_EXPORT KexiDataProviderDrag : public TQStoredDrag
{
public:
- KexiDataProviderDrag(const QString& sourceMimeType, const QString& sourceName,
- QWidget *parent=0, const char *name=0);
+ KexiDataProviderDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ TQWidget *tqparent=0, const char *name=0);
~KexiDataProviderDrag() { };
- static bool canDecode( QDragMoveEvent* e);
- static bool decode( QDropEvent* e, QString& sourceMimeType, QString& sourceName);
+ static bool canDecode( TQDragMoveEvent* e);
+ static bool decode( TQDropEvent* e, TQString& sourceMimeType, TQString& sourceName);
};
diff --git a/kexi/core/kexievents.cpp b/kexi/core/kexievents.cpp
index 2cafe2d3c..c4cf62156 100644
--- a/kexi/core/kexievents.cpp
+++ b/kexi/core/kexievents.cpp
@@ -19,8 +19,8 @@
#include "kexievents.h"
-Event::Event(QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot)
+Event::Event(TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot)
{
m_sender = sender;
m_receiver = receiver;
@@ -28,8 +28,8 @@ Event::Event(QObject *sender, const QCString &signal,
m_signal = signal;
}
-Event::Event(QObject *sender, const QCString &signal,
- const QCString &functionName)
+Event::Event(TQObject *sender, const TQCString &signal,
+ const TQCString &functionName)
{
m_sender = sender;
m_signal = signal;
@@ -44,14 +44,14 @@ EventList::addEvent(Event *event)
}
void
-EventList::addEvent(QObject *sender, const QCString &signal, QObject *receiver, const QCString &slot)
+EventList::addEvent(TQObject *sender, const TQCString &signal, TQObject *receiver, const TQCString &slot)
{
Event *ev = new Event(sender, signal, receiver, slot);
append(ev);
}
void
-EventList::addEvent(QObject *sender, const QCString &signal, const QCString &function)
+EventList::addEvent(TQObject *sender, const TQCString &signal, const TQCString &function)
{
Event *ev = new Event(sender, signal, function);
append(ev);
@@ -66,7 +66,7 @@ EventList::removeEvent(Event *event)
}
EventList*
-EventList::allEventsForObject(QObject *widget)
+EventList::allEventsForObject(TQObject *widget)
{
if(!widget) return 0;
@@ -81,7 +81,7 @@ EventList::allEventsForObject(QObject *widget)
}
void
-EventList::removeAllEventsForObject(QObject *widget)
+EventList::removeAllEventsForObject(TQObject *widget)
{
EventList::ConstIterator endIt = constEnd();
for(EventList::ConstIterator it = constBegin(); it != endIt; ++it) {
diff --git a/kexi/core/kexievents.h b/kexi/core/kexievents.h
index 145ee68d2..f65ff132a 100644
--- a/kexi/core/kexievents.h
+++ b/kexi/core/kexievents.h
@@ -20,11 +20,11 @@
#ifndef KFORMDESIGNEREVENTS_H
#define KFORMDESIGNEREVENTS_H
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
-class QDomNode;
-class QObject;
+class TQDomNode;
+class TQObject;
//! A simple class to store events
/*! There are three different types of events (an maybe more in the future):
@@ -38,10 +38,10 @@ class QObject;
class KEXICORE_EXPORT Event
{
public:
- Event(QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot);
- Event(QObject *sender, const QCString &signal,
- const QCString &functionName);
+ Event(TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot);
+ Event(TQObject *sender, const TQCString &signal,
+ const TQCString &functionName);
Event() : m_type(Slot) {;}
~Event() {;}
@@ -49,25 +49,25 @@ class KEXICORE_EXPORT Event
int type() {return m_type; }
void setType(int type) { m_type = type; }
- QObject* sender() const { return m_sender; }
- QObject* receiver() const { return m_receiver; }
- QCString signal() const { return m_signal; }
- QCString slot() const { return m_slot; }
+ TQObject* sender() const { return m_sender; }
+ TQObject* receiver() const { return m_receiver; }
+ TQCString signal() const { return m_signal; }
+ TQCString slot() const { return m_slot; }
- void setSender(QObject *o) { m_sender = o; }
- void setReceiver(QObject *o) { m_receiver = o; }
- void setSignal(const QCString &s) { m_signal = s; }
- void setSlot(const QCString &s) { m_slot = s; }
+ void setSender(TQObject *o) { m_sender = o; }
+ void setReceiver(TQObject *o) { m_receiver = o; }
+ void setSignal(const TQCString &s) { m_signal = s; }
+ void setSlot(const TQCString &s) { m_slot = s; }
protected:
- QGuardedPtr<QObject> m_sender;
- QCString m_signal;
- QGuardedPtr<QObject> m_receiver;
- QCString m_slot;
+ TQGuardedPtr<TQObject> m_sender;
+ TQCString m_signal;
+ TQGuardedPtr<TQObject> m_receiver;
+ TQCString m_slot;
int m_type;
};
-class KEXICORE_EXPORT EventList : protected QValueList<Event*>
+class KEXICORE_EXPORT EventList : protected TQValueList<Event*>
{
public:
EventList() {;}
@@ -76,23 +76,23 @@ class KEXICORE_EXPORT EventList : protected QValueList<Event*>
/*! Adds an event in list. Other overload are available, so that
other classes don't have to use Event class in simple cases. */
void addEvent(Event *event);
- void addEvent(QObject *sender, const QCString &signal, QObject *receiver, const QCString &slot);
- void addEvent(QObject *sender, const QCString &signal, const QCString &action);
+ void addEvent(TQObject *sender, const TQCString &signal, TQObject *receiver, const TQCString &slot);
+ void addEvent(TQObject *sender, const TQCString &signal, const TQCString &action);
/*! Removes the Event \a event from the FormScript's list. */
void removeEvent(Event *event);
/*! \return A list of events related to widget \a name (ie where Event::sender()
or Event::receiver() == name). */
- EventList* allEventsForObject(QObject *object);
+ EventList* allEventsForObject(TQObject *object);
/*! Replace all ocurrences of \a oldname with \a newName inside the list. */
- //void renameWidget(const QCString &oldName, const QCString &newName);
+ //void renameWidget(const TQCString &oldName, const TQCString &newName);
/*! Removes all events related to widget \a name. Called eg when widget is destroyed. */
- void removeAllEventsForObject(QObject *object);
+ void removeAllEventsForObject(TQObject *object);
- // make some QValueList function accessible by other classes
- QValueListConstIterator<Event*> constBegin() const { return QValueList<Event*>::constBegin(); }
- QValueListConstIterator<Event*> constEnd() const { return QValueList<Event*>::constEnd(); }
- bool isEmpty() const { return QValueList<Event*>::isEmpty(); }
+ // make some TQValueList function accessible by other classes
+ TQValueListConstIterator<Event*> constBegin() const { return TQValueList<Event*>::constBegin(); }
+ TQValueListConstIterator<Event*> constEnd() const { return TQValueList<Event*>::constEnd(); }
+ bool isEmpty() const { return TQValueList<Event*>::isEmpty(); }
};
diff --git a/kexi/core/kexiguimsghandler.cpp b/kexi/core/kexiguimsghandler.cpp
index af5f3a6e1..5b8bb8f5f 100644
--- a/kexi/core/kexiguimsghandler.cpp
+++ b/kexi/core/kexiguimsghandler.cpp
@@ -26,8 +26,8 @@
#include <kmessagebox.h>
#include <kdialogbase.h>
-KexiGUIMessageHandler::KexiGUIMessageHandler(QWidget *parent)
-: KexiDB::MessageHandler(parent)
+KexiGUIMessageHandler::KexiGUIMessageHandler(TQWidget *tqparent)
+: KexiDB::MessageHandler(tqparent)
{
}
@@ -38,66 +38,66 @@ KexiGUIMessageHandler::~KexiGUIMessageHandler()
/*virtual*/
void
KexiGUIMessageHandler::showErrorMessage(KexiDB::Object *obj,
- const QString& msg)
+ const TQString& msg)
{
- QString _msg(msg);
+ TQString _msg(msg);
if (!obj) {
showErrorMessage(_msg);
return;
}
- QString details;
+ TQString details;
KexiDB::getHTMLErrorMesage(obj, _msg, details);
showErrorMessage(_msg, details);
}
/*virtual*/
void
-KexiGUIMessageHandler::showErrorMessage(const QString &title, const QString &details)
+KexiGUIMessageHandler::showErrorMessage(const TQString &title, const TQString &details)
{
showMessage(Error, title, details);
}
void
-KexiGUIMessageHandler::showSorryMessage(const QString &title, const QString &details)
+KexiGUIMessageHandler::showSorryMessage(const TQString &title, const TQString &details)
{
showMessage(Sorry, title, details);
}
-void KexiGUIMessageHandler::showErrorMessage(const QString &msg, const QString &details,
+void KexiGUIMessageHandler::showErrorMessage(const TQString &msg, const TQString &details,
KexiDB::Object *obj)
{
- QString _msg(msg);
+ TQString _msg(msg);
if (!obj) {
showErrorMessage(_msg, details);
return;
}
- QString _details(details);
+ TQString _details(details);
KexiDB::getHTMLErrorMesage(obj, _msg, _details);
showErrorMessage(_msg, _details);
}
void
-KexiGUIMessageHandler::showErrorMessage(Kexi::ObjectStatus *status)
+KexiGUIMessageHandler::showErrorMessage(Kexi::ObjecttqStatus *status)
{
showErrorMessage("", status);
}
void
-KexiGUIMessageHandler::showErrorMessage(const QString &message, Kexi::ObjectStatus *status)
+KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status)
{
if (status && status->error()) {
- QString msg(message);
+ TQString msg(message);
if (msg.isEmpty() || msg==status->message) {
msg = status->message;
status->message = status->description;
status->description = "";
}
- QString desc;
+ TQString desc;
if (!status->message.isEmpty()) {
if (status->description.isEmpty()) {
desc = status->message;
} else {
- msg += (QString("<br><br>") + status->message);
+ msg += (TQString("<br><br>") + status->message);
desc = status->description;
}
}
@@ -106,12 +106,12 @@ KexiGUIMessageHandler::showErrorMessage(const QString &message, Kexi::ObjectStat
else {
showErrorMessage(message);
}
- status->clearStatus();
+ status->cleartqStatus();
}
void
KexiGUIMessageHandler::showMessage(MessageType type,
- const QString &title, const QString &details, const QString& dontShowAgainName)
+ const TQString &title, const TQString &details, const TQString& dontShowAgainName)
{
if (!m_enableMessages)
return;
@@ -119,7 +119,7 @@ KexiGUIMessageHandler::showMessage(MessageType type,
//'wait' cursor is a nonsense now
KexiUtils::removeWaitCursor();
- QString msg(title);
+ TQString msg(title);
if (title.isEmpty())
msg = i18n("Unknown error");
msg = "<qt><p>"+msg+"</p>";
@@ -141,8 +141,8 @@ KexiGUIMessageHandler::showMessage(MessageType type,
}
}
-void KexiGUIMessageHandler::showWarningContinueMessage(const QString &title, const QString &details,
- const QString& dontShowAgainName)
+void KexiGUIMessageHandler::showWarningContinueMessage(const TQString &title, const TQString &details,
+ const TQString& dontShowAgainName)
{
if (!KMessageBox::shouldBeShownContinue(dontShowAgainName))
return;
@@ -150,27 +150,27 @@ void KexiGUIMessageHandler::showWarningContinueMessage(const QString &title, con
i18n("Warning"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::No,
m_messageHandlerParentWidget, "warningContinue", true, true, KStdGuiItem::cont() );
bool checkboxResult = false;
- KMessageBox::createKMessageBox(dialog, QMessageBox::Warning,
- title + (details.isEmpty() ? QString::null : (QString("\n")+details)), QStringList(),
- dontShowAgainName.isEmpty() ? QString::null : i18n("Do not show this message again"),
+ KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning,
+ title + (details.isEmpty() ? TQString() : (TQString("\n")+details)), TQStringList(),
+ dontShowAgainName.isEmpty() ? TQString() : i18n("Do not show this message again"),
&checkboxResult, 0);
if (checkboxResult)
KMessageBox::saveDontShowAgainContinue(dontShowAgainName);
}
-int KexiGUIMessageHandler::askQuestion( const QString& message,
+int KexiGUIMessageHandler::askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontShowAskAgainName,
+ const TQString &dontShowAskAgainName,
int options )
{
Q_UNUSED(defaultResult);
if (KMessageBox::WarningContinueCancel == dlgType)
return KMessageBox::warningContinueCancel(m_messageHandlerParentWidget,
- message, QString::null, buttonYes, dontShowAskAgainName, options);
+ message, TQString(), buttonYes, dontShowAskAgainName, options);
else
return KMessageBox::messageBox(m_messageHandlerParentWidget,
- dlgType, message, QString::null, buttonYes, buttonNo, dontShowAskAgainName, options);
+ dlgType, message, TQString(), buttonYes, buttonNo, dontShowAskAgainName, options);
}
diff --git a/kexi/core/kexiguimsghandler.h b/kexi/core/kexiguimsghandler.h
index 6105f3115..bfe1495e2 100644
--- a/kexi/core/kexiguimsghandler.h
+++ b/kexi/core/kexiguimsghandler.h
@@ -26,36 +26,36 @@
class KEXICORE_EXPORT KexiGUIMessageHandler : public KexiDB::MessageHandler
{
public:
- KexiGUIMessageHandler(QWidget *parent = 0);
+ KexiGUIMessageHandler(TQWidget *tqparent = 0);
virtual ~KexiGUIMessageHandler();
- virtual void showErrorMessage(const QString &title, const QString &details = QString::null);
- virtual void showErrorMessage(KexiDB::Object *obj, const QString& msg = QString::null);
+ virtual void showErrorMessage(const TQString &title, const TQString &details = TQString());
+ virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString());
- void showErrorMessage(const QString&,const QString&,KexiDB::Object *obj);
- void showErrorMessage(Kexi::ObjectStatus *status);
- void showErrorMessage(const QString &message, Kexi::ObjectStatus *status);
+ void showErrorMessage(const TQString&,const TQString&,KexiDB::Object *obj);
+ void showErrorMessage(Kexi::ObjecttqStatus *status);
+ void showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status);
/*! Displays a "Sorry" message with \a title text and optional \a details. */
- void showSorryMessage(const QString &title, const QString &details = QString::null);
+ void showSorryMessage(const TQString &title, const TQString &details = TQString());
/*! Displays a message of a type \a type, with \a title text and optional \a details.
\a dontShowAgainName can be specified to add "Do not show again" option if \a type is Warning. */
- virtual void showMessage(MessageType type, const QString &title, const QString &details,
- const QString& dontShowAgainName = QString::null);
+ virtual void showMessage(MessageType type, const TQString &title, const TQString &details,
+ const TQString& dontShowAgainName = TQString());
/*! Displays a Warning message with \a title text and optional \a details
with "Continue" button instead "OK".
\a dontShowAgainName can be specified to add "Do not show again" option. */
- virtual void showWarningContinueMessage(const QString &title, const QString &details = QString::null,
- const QString& dontShowAgainName = QString::null);
+ virtual void showWarningContinueMessage(const TQString &title, const TQString &details = TQString(),
+ const TQString& dontShowAgainName = TQString());
/*! Interactively asks a question using KMessageBox.
See KexiDB::MessageHandler::askQuestion() for details. */
- virtual int askQuestion( const QString& message,
+ virtual int askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes=KStdGuiItem::yes(),
const KGuiItem &buttonNo=KStdGuiItem::no(),
- const QString &dontShowAskAgainName = QString::null,
+ const TQString &dontShowAskAgainName = TQString(),
int options = KMessageBox::Notify );
};
diff --git a/kexi/core/kexiinternalpart.cpp b/kexi/core/kexiinternalpart.cpp
index fcbb8f17d..7e0386cda 100644
--- a/kexi/core/kexiinternalpart.cpp
+++ b/kexi/core/kexiinternalpart.cpp
@@ -24,8 +24,8 @@
#include "kexiviewbase.h"
#include "keximainwindow.h"
-#include <qasciidict.h>
-#include <qdialog.h>
+#include <tqasciidict.h>
+#include <tqdialog.h>
#include <kdebug.h>
#include <klibloader.h>
@@ -48,13 +48,13 @@ class KexiInternalPartManager
{
KexiInternalPart *part = m_parts[partName];
if (!part) {
- QCString fullname("kexihandler_");
- fullname += QCString(partName).lower();
+ TQCString fullname("kexihandler_");
+ fullname += TQCString(partName).lower();
part = KParts::ComponentFactory::createInstanceFromLibrary<KexiInternalPart>(
fullname, 0, fullname);
if (!part) {
if (msgHdr)
- msgHdr->showErrorMessage(i18n("Could not load \"%1\" plugin.").arg(partName));
+ msgHdr->showErrorMessage(i18n("Could not load \"%1\" plugin.").tqarg(partName));
}
else
m_parts.insert(partName, part);
@@ -64,15 +64,15 @@ class KexiInternalPartManager
private:
- QAsciiDict<KexiInternalPart> m_parts;
+ TQAsciiDict<KexiInternalPart> m_parts;
};
KexiInternalPartManager internalPartManager;
//----------------------------------------------
-KexiInternalPart::KexiInternalPart(QObject *parent, const char *name, const QStringList &)
- : QObject(parent, name)
+KexiInternalPart::KexiInternalPart(TQObject *tqparent, const char *name, const TQStringList &)
+ : TQObject(tqparent, name)
, m_uniqueDialog(true)
, m_cancelled(false)
{
@@ -90,21 +90,21 @@ KexiInternalPart::part(KexiDB::MessageHandler *msgHdr, const char* partName)
}
//static
-QWidget* KexiInternalPart::createWidgetInstance(const char* partName,
+TQWidget* KexiInternalPart::createWidgetInstance(const char* partName,
const char* widgetClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName, QMap<QString,QString>* args)
+ TQWidget *tqparent, const char *objName, TQMap<TQString,TQString>* args)
{
KexiInternalPart *part = internalPartManager.findPart(msgHdr, partName);
if (!part)
return 0; //fatal!
- return part->createWidget(widgetClass, mainWin, parent, objName ? objName : partName, args);
+ return part->createWidget(widgetClass, mainWin, tqparent, objName ? objName : partName, args);
}
KexiDialogBase* KexiInternalPart::findOrCreateKexiDialog(
KexiMainWindow* mainWin, const char *objName)
{
if (m_uniqueDialog && !m_uniqueWidget.isNull())
- return dynamic_cast<KexiDialogBase*>((QWidget*)m_uniqueWidget);
+ return dynamic_cast<KexiDialogBase*>((TQWidget*)m_uniqueWidget);
// KexiDialogBase *dlg = createDialog(mainWin, objName);
KexiDialogBase * dlg = new KexiDialogBase(mainWin, "");
KexiViewBase *view = createView(mainWin, 0, objName);
@@ -118,8 +118,8 @@ KexiDialogBase* KexiInternalPart::findOrCreateKexiDialog(
dlg->addView(view);
dlg->setCaption( view->caption() );
dlg->setTabCaption( view->caption() );
- dlg->resize(view->sizeHint());
- dlg->setMinimumSize(view->minimumSizeHint().width(),view->minimumSizeHint().height());
+ dlg->resize(view->tqsizeHint());
+ dlg->setMinimumSize(view->tqminimumSizeHint().width(),view->tqminimumSizeHint().height());
dlg->setId( mainWin->generatePrivateID() );
dlg->registerDialog();
return dlg;
@@ -139,25 +139,25 @@ KexiDialogBase* KexiInternalPart::createKexiDialogInstance(
}
//static
-QDialog* KexiInternalPart::createModalDialogInstance(const char* partName,
+TQDialog* KexiInternalPart::createModalDialogInstance(const char* partName,
const char* dialogClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- const char *objName, QMap<QString,QString>* args)
+ const char *objName, TQMap<TQString,TQString>* args)
{
KexiInternalPart *part = internalPartManager.findPart(msgHdr, partName);
if (!part) {
kdDebug() << "KexiInternalPart::createDialogInstance() !part" << endl;
return 0; //fatal!
}
- QWidget *w;
+ TQWidget *w;
if (part->uniqueDialog() && !part->m_uniqueWidget.isNull())
w = part->m_uniqueWidget;
else
w = part->createWidget(dialogClass, mainWin, mainWin, objName ? objName : partName, args);
- if (dynamic_cast<QDialog*>(w)) {
+ if (dynamic_cast<TQDialog*>(w)) {
if (part->uniqueDialog())
part->m_uniqueWidget = w;
- return dynamic_cast<QDialog*>(w);
+ return dynamic_cast<TQDialog*>(w);
}
//sanity
if (! (part->uniqueDialog() && !part->m_uniqueWidget.isNull()))
@@ -167,7 +167,7 @@ QDialog* KexiInternalPart::createModalDialogInstance(const char* partName,
//static
bool KexiInternalPart::executeCommand(const char* partName,
- KexiMainWindow* mainWin, const char* commandName, QMap<QString,QString>* args)
+ KexiMainWindow* mainWin, const char* commandName, TQMap<TQString,TQString>* args)
{
KexiInternalPart *part = internalPartManager.findPart(0, partName);
if (!part) {
@@ -177,28 +177,28 @@ bool KexiInternalPart::executeCommand(const char* partName,
return part->executeCommand(mainWin, commandName, args);
}
-QWidget* KexiInternalPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget * parent, const char * objName, QMap<QString,QString>* args)
+TQWidget* KexiInternalPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget * tqparent, const char * objName, TQMap<TQString,TQString>* args)
{
Q_UNUSED(widgetClass);
Q_UNUSED(mainWin);
- Q_UNUSED(parent);
+ Q_UNUSED(tqparent);
Q_UNUSED(objName);
Q_UNUSED(args);
return 0;
}
-KexiViewBase* KexiInternalPart::createView(KexiMainWindow* mainWin, QWidget * parent,
+KexiViewBase* KexiInternalPart::createView(KexiMainWindow* mainWin, TQWidget * tqparent,
const char * objName)
{
Q_UNUSED(mainWin);
- Q_UNUSED(parent);
+ Q_UNUSED(tqparent);
Q_UNUSED(objName);
return 0;
}
bool KexiInternalPart::executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args)
+ TQMap<TQString,TQString>* args)
{
Q_UNUSED(mainWin);
Q_UNUSED(commandName);
diff --git a/kexi/core/kexiinternalpart.h b/kexi/core/kexiinternalpart.h
index 232c3f843..4abf1d19a 100644
--- a/kexi/core/kexiinternalpart.h
+++ b/kexi/core/kexiinternalpart.h
@@ -21,9 +21,9 @@
#ifndef KEXIINTERNALPART_H
#define KEXIINTERNALPART_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqvariant.h>
class KexiMainWindow;
class KexiDialogBase;
@@ -33,7 +33,7 @@ namespace KexiDB {
class MessageHandler;
}
-class QWidget;
+class TQWidget;
/**
* @short A prototype for Kexi Internal Parts (plugins) implementation.
@@ -46,15 +46,16 @@ class QWidget;
* Parts can have unique flag set for dialogs (true by default)
* - then a dialog created by createDialogInstance() is unique.
*/
-class KEXICORE_EXPORT KexiInternalPart : public QObject
+class KEXICORE_EXPORT KexiInternalPart : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiInternalPart(QObject *parent, const char *name, const QStringList &);
+ KexiInternalPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiInternalPart();
- KexiDialogBase *instance(KexiMainWindow *parent);
+ KexiDialogBase *instance(KexiMainWindow *tqparent);
/*! Creates a new widget instance using part \a partName.
\a widgetClass is a pseudo class used in case when the part offers more
@@ -63,28 +64,28 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
\a args is two-way optional argument: it can contain custom options used
on widget's creation. Depending on implementation, the created widget can write its
state (e.g. result or status information) back to this argument.
- Created widget will have assigned \a parent widget and \a objName name. */
- static QWidget* createWidgetInstance(const char* partName, const char* widgetClass,
+ Created widget will have assigned \a tqparent widget and \a objName name. */
+ static TQWidget* createWidgetInstance(const char* partName, const char* widgetClass,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0);
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0);
/*! For convenience. */
- static QWidget* createWidgetInstance(const char* partName,
+ static TQWidget* createWidgetInstance(const char* partName,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0)
- { return createWidgetInstance(partName, 0, msgHdr, mainWin, parent, objName, args); }
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0)
+ { return createWidgetInstance(partName, 0, msgHdr, mainWin, tqparent, objName, args); }
/*! Creates a new dialog instance. If such instance already exists,
and is unique (see uniqueDialog()) it is just returned.
The part knows about destroying its dialog instance, (if it is uinque),
so on another call the dialog will be created again.
\a msgHdr is a message handler for displaying error messages.
- The dialog is assigned to \a mainWin as its parent,
+ The dialog is assigned to \a mainWin as its tqparent,
and \a objName name is set. */
static KexiDialogBase* createKexiDialogInstance(const char* partName,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin, const char *objName = 0);
- /*! Creates a new modal dialog instance (QDialog or a subclass).
+ /*! Creates a new modal dialog instance (TQDialog or a subclass).
If such instance already exists, and is unique (see uniqueDialog())
it is just returned.
\a dialogClass is a pseudo class used in case when the part offers more
@@ -95,22 +96,22 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
state (e.g. result or status information) back to this argument.
The part knows about destroying its dialog instance, (if it is uinque),
so on another call the dialog will be created again.
- The dialog is assigned to \a mainWin as its parent,
+ The dialog is assigned to \a mainWin as its tqparent,
and \a objName name is set. */
- static QDialog* createModalDialogInstance(const char* partName,
+ static TQDialog* createModalDialogInstance(const char* partName,
const char* dialogClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- const char *objName = 0, QMap<QString,QString>* args = 0);
+ const char *objName = 0, TQMap<TQString,TQString>* args = 0);
/*! Adeded For convenience. */
- static QDialog* createModalDialogInstance(const char* partName,
+ static TQDialog* createModalDialogInstance(const char* partName,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin, const char *objName = 0,
- QMap<QString,QString>* args = 0)
+ TQMap<TQString,TQString>* args = 0)
{ return createModalDialogInstance(partName, 0, msgHdr, mainWin, objName, args); }
/*! Executes a command \a commandName (usually nonvisual) using part called \a partName.
The result can be put into the \a args. \return true on successful calling. */
static bool executeCommand(const char* partName,
- KexiMainWindow* mainWin, const char* commandName, QMap<QString,QString>* args = 0);
+ KexiMainWindow* mainWin, const char* commandName, TQMap<TQString,TQString>* args = 0);
/*! \return internal part of a name \a partName. Shouldn't be usable. */
static const KexiInternalPart* part(KexiDB::MessageHandler *msgHdr, const char* partName);
@@ -129,9 +130,9 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
const char *objName);
/*! Reimplement this if your internal part has to return widgets
- or QDialog objects. */
- virtual QWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget * parent, const char * objName = 0, QMap<QString,QString>* args = 0);
+ or TQDialog objects. */
+ virtual TQWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget * tqparent, const char * objName = 0, TQMap<TQString,TQString>* args = 0);
// //! Reimplement this if your internal part has to return dialogs
// virtual KexiDialogBase *createDialog(KexiMainWindow* /*mainWin*/,
@@ -139,17 +140,17 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
// { return 0; }
/*! Reimplement this if your internal part has to return a view object. */
- virtual KexiViewBase *createView(KexiMainWindow* mainWin, QWidget * parent,
+ virtual KexiViewBase *createView(KexiMainWindow* mainWin, TQWidget * tqparent,
const char *objName = 0);
/*! Reimplement this if your internal part has to execute a command \a commandName
(usually nonvisual). Arguments are put into \a args and the result can be put into the \a args.
\return true on successful calling. */
virtual bool executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args = 0);
+ TQMap<TQString,TQString>* args = 0);
//! Unique dialog - we're using guarded ptr for the dialog so can know if it has been closed
- QGuardedPtr<QWidget> m_uniqueWidget;
+ TQGuardedPtr<TQWidget> m_uniqueWidget;
bool m_uniqueDialog : 1; //!< true if createDialogInstance() should return only one dialog
diff --git a/kexi/core/keximainwindow.h b/kexi/core/keximainwindow.h
index ec1db6333..ad6c613b5 100644
--- a/kexi/core/keximainwindow.h
+++ b/kexi/core/keximainwindow.h
@@ -21,8 +21,8 @@
#ifndef KEXIMAINWINDOW_H
#define KEXIMAINWINDOW_H
-#include <qmap.h>
-#include <qintdict.h>
+#include <tqmap.h>
+#include <tqintdict.h>
#include <kmdimainfrm.h>
#include <kexiutils/tristate.h>
@@ -45,6 +45,7 @@ namespace KexiPart {
class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActionHost
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Used by printActionForItem()
enum PrintActionType {
@@ -62,7 +63,7 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
/*! Registers dialog \a dlg for watching and adds it to the main window's stack. */
virtual void registerChild(KexiDialogBase *dlg) = 0;
- virtual QPopupMenu* findPopupMenu(const char *popupName) = 0;
+ virtual TQPopupMenu* findPopupMenu(const char *popupName) = 0;
/*! Generates ID for private "document" like Relations window.
Private IDs are negative numbers (while ID regular part instance's IDs are >0)
@@ -102,12 +103,12 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
//! Opens object pointed by \a item in a view \a viewMode
virtual KexiDialogBase * openObject(KexiPart::Item *item, int viewMode,
- bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0,
- QString* errorMessage = 0) = 0;
+ bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0,
+ TQString* errorMessage = 0) = 0;
//! For convenience
- virtual KexiDialogBase * openObject(const QCString& mime, const QString& name,
- int viewMode, bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0) = 0;
+ virtual KexiDialogBase * openObject(const TQCString& mime, const TQString& name,
+ int viewMode, bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0) = 0;
/*! Closes the object for \a item.
\return true on success (closing can be dealyed though), false on failure and cancelled
@@ -125,7 +126,7 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
set before call, previously selected item will be preselected
in the editor (if found). */
virtual void propertySetSwitched(KexiDialogBase *dlg, bool force=false,
- bool preservePrevSelection = true, const QCString& propertyToSelect = QCString()) = 0;
+ bool preservePrevSelection = true, const TQCString& propertyToSelect = TQCString()) = 0;
/*! Saves dialog's \a dlg data. If dialog's data is never saved,
user is asked for name and title, before saving (see getNewObjectInfo()).
@@ -135,7 +136,7 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
within name/caption dialog (see KexiNameDialog), which is popped
up for never saved objects. */
virtual tristate saveObject( KexiDialogBase *dlg,
- const QString& messageWhenAskingForName = QString::null, bool dontAsk = false ) = 0;
+ const TQString& messageWhenAskingForName = TQString(), bool dontAsk = false ) = 0;
/*! Closes dialog \a dlg. If dialog's data (see KexiDialoBase::dirty()) is unsaved,
used will be asked if saving should be perforemed.
@@ -156,12 +157,12 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
If it's true, user agreed on overwriting, if it's false, user picked
nonexisting name, so no overwrite will be needed. */
virtual tristate getNewObjectInfo( KexiPart::Item *partItem, KexiPart::Part *part,
- bool& allowOverwriting, const QString& messageWhenAskingForName = QString::null ) = 0;
+ bool& allowOverwriting, const TQString& messageWhenAskingForName = TQString() ) = 0;
/*! Highlights object of mime \a mime and name \a name.
This can be done in the Project Navigator or so.
If a window for the object is opened (in any mode), it should be raised. */
- virtual void highlightObject(const QCString& mime, const QCString& name) = 0;
+ virtual void highlightObject(const TQCString& mime, const TQCString& name) = 0;
//! Shows "print" dialog for \a item.
//! \return true on success.
@@ -177,10 +178,10 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
/*! Executes custom action for the main window, usually provided by a plugin.
Also used by KexiFormEventAction. */
- virtual tristate executeCustomActionForObject(KexiPart::Item* item, const QString& actionName) = 0;
+ virtual tristate executeCustomActionForObject(KexiPart::Item* item, const TQString& actionName) = 0;
protected slots:
- virtual void slotObjectRenamed(const KexiPart::Item &item, const QCString& oldName) = 0;
+ virtual void slotObjectRenamed(const KexiPart::Item &item, const TQCString& oldName) = 0;
};
diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp
index 3f97e9c3d..d95bd0691 100644
--- a/kexi/core/kexipart.cpp
+++ b/kexi/core/kexipart.cpp
@@ -34,7 +34,7 @@
#include <kexiutils/identifier.h>
#include <kexiutils/utils.h>
-#include <qwidgetstack.h>
+#include <tqwidgetstack.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -61,12 +61,12 @@ public:
//ask
KexiUtils::WaitCursorRemover remover;
//! @todo use message handler for this to enable non-gui apps
- QString singleStatusString( dlg->singleStatusString() );
+ TQString singleStatusString( dlg->singleStatusString() );
if (!singleStatusString.isEmpty())
- singleStatusString.prepend(QString("\n\n")+i18n("Details:")+" ");
+ singleStatusString.prepend(TQString("\n\n")+i18n("Details:")+" ");
if (KMessageBox::No==KMessageBox::questionYesNo(0,
((viewMode == Kexi::DesignViewMode)
- ? i18n("Object \"%1\" could not be opened in Design View.").arg(item.name())
+ ? i18n("Object \"%1\" could not be opened in Design View.").tqarg(item.name())
: i18n("Object could not be opened in Data View."))+"\n"
+ i18n("Do you want to open it in Text View?") + singleStatusString, 0,
KStdGuiItem::open(), KStdGuiItem::cancel()))
@@ -87,8 +87,8 @@ public:
using namespace KexiPart;
-Part::Part(QObject *parent, const char *name, const QStringList &)
-: QObject(parent, name)
+Part::Part(TQObject *tqparent, const char *name, const TQStringList &)
+: TQObject(tqparent, name)
, m_guiClient(0)
, m_registeredPartID(-1) //no registered ID by default
, d(new PartPrivate())
@@ -100,8 +100,8 @@ Part::Part(QObject *parent, const char *name, const QStringList &)
m_newObjectsAreDirty = false;
}
-Part::Part(QObject* parent, StaticInfo *info)
-: QObject(parent, "StaticPart")
+Part::Part(TQObject* tqparent, StaticInfo *info)
+: TQObject(tqparent, "StaticPart")
, m_guiClient(0)
, m_registeredPartID(-1) //no registered ID by default
, d(new PartPrivate())
@@ -127,11 +127,11 @@ void Part::createGUIClients(KexiMainWindow *win)
//default actions for part's gui client:
KAction *act = new KAction(m_names["instanceCaption"]+"...", info()->createItemIcon(), 0, this,
- SLOT(slotCreate()), m_mainWin->actionCollection(),
+ TQT_SLOT(slotCreate()), m_mainWin->actionCollection(),
KexiPart::nameForCreateAction(*info()));
act->plug( m_mainWin->findPopupMenu("insert") );
// new KAction(m_names["instance"]+"...", info()->itemIcon(), 0, this,
-// SLOT(create()), m_guiClient->actionCollection(), (info()->objectName()+"part_create").latin1());
+// TQT_SLOT(create()), m_guiClient->actionCollection(), (info()->objectName()+"part_create").latin1());
//let init specific actions for parts
// initPartActions( m_guiClient->actionCollection() );
m_mainWin->guiFactory()->addClient(m_guiClient); //this client is added permanently
@@ -167,8 +167,8 @@ KActionCollection* Part::actionCollectionForMode(int viewMode) const
return cli ? cli->actionCollection() : 0;
}
-KAction* Part::createSharedAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+KAction* Part::createSharedAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName)
{
GUIClient *instanceGuiClient = m_instanceGuiClients[mode];
@@ -180,8 +180,8 @@ KAction* Part::createSharedAction(int mode, const QString &text,
instanceGuiClient->actionCollection(), subclassName);
}
-KAction* Part::createSharedPartAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+KAction* Part::createSharedPartAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName)
{
if (!m_guiClient)
@@ -190,14 +190,14 @@ KAction* Part::createSharedPartAction(const QString &text,
m_guiClient->actionCollection(), subclassName);
}
-KAction* Part::createSharedToggleAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name)
+KAction* Part::createSharedToggleAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name)
{
return createSharedAction(mode, text, pix_name, cut, name, "KToggleAction");
}
-KAction* Part::createSharedPartToggleAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name)
+KAction* Part::createSharedPartToggleAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name)
{
return createSharedPartAction(text, pix_name, cut, name, "KToggleAction");
}
@@ -221,7 +221,7 @@ KAction* Part::sharedPartAction(int mode, const char* name, const char *classnam
void Part::setActionAvailable(const char *action_name, bool avail)
{
- QIntDictIterator<GUIClient> it( m_instanceGuiClients );
+ TQIntDictIterator<GUIClient> it( m_instanceGuiClients );
for (;it.current();++it) {
KAction *act = it.current()->actionCollection()->action(action_name);
if (act) {
@@ -234,7 +234,7 @@ void Part::setActionAvailable(const char *action_name, bool avail)
}
KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, int viewMode,
- QMap<QString,QString>* staticObjectArgs)
+ TQMap<TQString,TQString>* staticObjectArgs)
{
//now it's the time for creating instance actions
if (!d->instanceActionsInitialized) {
@@ -242,11 +242,11 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in
d->instanceActionsInitialized = true;
}
- m_status.clearStatus();
+ m_status.cleartqStatus();
// KexiDialogBase *dlg = createInstance(win,item,viewMode);
// if (!dlg)
// return 0;
-// QString capt = QString("%1 : %2").arg(item.name()).arg(instanceName());
+// TQString capt = TQString("%1 : %2").tqarg(item.name()).tqarg(instanceName());
KexiDialogBase *dlg = new KexiDialogBase(win);
dlg->m_supportedViewModes = m_supportedViewModes;
// dlg->m_neverSaved = item.neverSaved();
@@ -289,11 +289,11 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in
}
if (!dlg->m_schemaData) {
if (!m_status.error())
- m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(),
+ m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(),
i18n("Could not load object's definition."), i18n("Object design may be corrupted."));
m_status.append(
- Kexi::ObjectStatus(i18n("You can delete \"%1\" object and create it again.")
- .arg(item.name()), QString::null) );
+ Kexi::ObjecttqStatus(i18n("You can delete \"%1\" object and create it again.")
+ .tqarg(item.name()), TQString()) );
dlg->close();
delete dlg;
@@ -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->sizeHint());
+ dlg->resize(dlg->tqsizeHint());
- dlg->setMinimumSize(dlg->minimumSizeHint().width(),dlg->minimumSizeHint().height());
+ dlg->setMinimumSize(dlg->tqminimumSizeHint().width(),dlg->tqminimumSizeHint().height());
//dirty only if it's a new object
if (dlg->selectedView())
@@ -363,11 +363,11 @@ KexiDB::SchemaData* Part::loadSchemaData(KexiDialogBase * /*dlg*/, const KexiDB:
return new_schema;
}
-bool Part::loadDataBlock( KexiDialogBase *dlg, QString &dataString, const QString& dataID)
+bool Part::loadDataBlock( KexiDialogBase *dlg, TQString &dataString, const TQString& dataID)
{
if (!dlg->mainWin()->project()->dbConnection()->loadDataBlock( dlg->id(), dataString, dataID )) {
- m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(),
- i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").arg(dataID) );
+ m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(),
+ i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").tqarg(dataID) );
m_status.append( *dlg );
return false;
}
@@ -392,32 +392,32 @@ bool Part::remove(KexiMainWindow *win, KexiPart::Item &item)
KexiDialogTempData* Part::createTempData(KexiDialogBase* dialog)
{
- return new KexiDialogTempData(dialog);
+ return new KexiDialogTempData(TQT_TQOBJECT(dialog));
}
-QString Part::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString Part::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
- return QString(englishMessage).startsWith(":") ? QString::null : englishMessage;
+ return TQString(englishMessage).startsWith(":") ? TQString() : englishMessage;
}
void Part::setupCustomPropertyPanelTabs(KTabWidget *, KexiMainWindow*)
{
}
-QCString Part::instanceName() const
+TQCString Part::instanceName() const
{
// "instanceName" should be already valid identifier but we're using
// KexiUtils::string2Identifier() to be sure translators did it right.
return KexiUtils::string2Identifier(m_names["instanceName"]).lower().latin1();
}
-QString Part::instanceCaption() const
+TQString Part::instanceCaption() const
{
return m_names["instanceCaption"];
}
-tristate Part::rename(KexiMainWindow *win, KexiPart::Item &item, const QString& newName)
+tristate Part::rename(KexiMainWindow *win, KexiPart::Item &item, const TQString& newName)
{
Q_UNUSED(win);
Q_UNUSED(item);
@@ -429,20 +429,20 @@ tristate Part::rename(KexiMainWindow *win, KexiPart::Item &item, const QString&
GUIClient::GUIClient(KexiMainWindow *win, Part* part, bool partInstanceClient, const char* nameSuffix)
- : QObject(part,
+ : TQObject(part,
(part->info()->objectName()
- + (nameSuffix ? QString(":%1").arg(nameSuffix) : QString())).latin1() )
+ + (nameSuffix ? TQString(":%1").tqarg(nameSuffix) : TQString())).latin1() )
, KXMLGUIClient(win)
{
if(!win->project()->data()->userMode())
- setXMLFile(QString::fromLatin1("kexi")+part->info()->objectName()
+ setXMLFile(TQString::tqfromLatin1("kexi")+part->info()->objectName()
+"part"+(partInstanceClient?"inst":"")+"ui.rc");
// new KAction(part->m_names["new"], part->info()->itemIcon(), 0, this,
-// SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
+// TQT_SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
// new KAction(i18nInstanceName+"...", part->info()->itemIcon(), 0, this,
-// SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
+// TQT_SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
// win->guiFactory()->addClient(this);
}
diff --git a/kexi/core/kexipart.h b/kexi/core/kexipart.h
index 4045c4c6c..34136d832 100644
--- a/kexi/core/kexipart.h
+++ b/kexi/core/kexipart.h
@@ -21,8 +21,8 @@
#ifndef KEXIPART_H
#define KEXIPART_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kexiutils/tristate.h>
#include "kexi.h"
@@ -62,13 +62,14 @@ enum ObjectTypes {
/**
* The main class for kexi frontend parts like tables, queries, forms and reports
*/
-class KEXICORE_EXPORT Part : public QObject
+class KEXICORE_EXPORT Part : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructor. */
- Part(QObject *parent, const char *name, const QStringList &);
+ Part(TQObject *tqparent, const char *name, const TQStringList &);
/*! Destructor. */
virtual ~Part();
@@ -76,12 +77,12 @@ class KEXICORE_EXPORT Part : public QObject
/*! Try to execute the part. Implementations of this \a Part
are able to overwrite this method to offer execution.
\param item The \a KexiPart::Item that should be executed.
- \param sender The sender QObject which likes to execute this \a Part or
+ \param sender The sender TQObject which likes to execute this \a Part or
NULL if there is no sender. The KFormDesigner uses this to pass
the actual widget (e.g. the button that was pressed).
\return true if execution was successfully else false.
*/
- virtual bool execute(KexiPart::Item* item, QObject* sender = 0) {
+ virtual bool execute(KexiPart::Item* item, TQObject* sender = 0) {
Q_UNUSED(item);
Q_UNUSED(sender);
return false;
@@ -109,7 +110,7 @@ class KEXICORE_EXPORT Part : public QObject
\a viewMode is one of Kexi::ViewMode enum.
\a staticObjectArgs can be passed for static Kexi Parts. */
KexiDialogBase* openInstance(KexiMainWindow *win, KexiPart::Item &item,
- int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
//! @todo make it protected, outside world should use KexiProject
/*! Removes any stored data pointed by \a item (example: table is dropped for table part).
@@ -139,7 +140,7 @@ class KEXICORE_EXPORT Part : public QObject
You shouldn't use by hand transactions here.
Default implementation does nothing and returns true. */
- virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item, const QString& newName);
+ virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item, const TQString& newName);
/*! Creates and returns a new temporary data for a dialog \a dialog.
This method is called on openInstance() once per dialog.
@@ -147,21 +148,21 @@ class KEXICORE_EXPORT Part : public QObject
Default implemention just returns empty KexiDialogTempData object. */
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- /*! Creates a new view for mode \a viewMode, \a item and \a parent. The view will be
+ /*! Creates a new view for mode \a viewMode, \a item and \a tqparent. The view will be
used inside \a dialog. */
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0) = 0;
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0) = 0;
/*! i18n'd instance name usable for displaying in gui as object's name.
The name is valid identifier - contains latin1 lowercase characters only.
@todo move this to Info class when the name could be moved as localized property
to service's .desktop file. */
- QCString instanceName() const;
+ TQCString instanceName() const;
/*! i18n'd instance name usable for displaying in gui as object's caption.
@todo move this to Info class when the name could be moved as localized property
to service's .desktop file. */
- QString instanceCaption() const;
+ TQString instanceCaption() const;
inline Info *info() const { return m_info; }
@@ -185,7 +186,7 @@ class KEXICORE_EXPORT Part : public QObject
/*! \return action collection for mode \a viewMode. */
KActionCollection* actionCollectionForMode(int viewMode) const;
- const Kexi::ObjectStatus& lastOperationStatus() const { return m_status; }
+ const Kexi::ObjecttqStatus& lastOperationtqStatus() const { return m_status; }
/*! \return i18n'd message translated from \a englishMessage.
This method is useful for messages like:
@@ -201,7 +202,7 @@ class KEXICORE_EXPORT Part : public QObject
a part does not offer a message for such \a englishMessage.
This is used e.g. in KexiMainWindowImpl::closeDialog().
*/
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
signals:
@@ -212,7 +213,7 @@ class KEXICORE_EXPORT Part : public QObject
protected:
//! Used by StaticPart
- Part(QObject* parent, StaticInfo *info);
+ Part(TQObject* tqparent, StaticInfo *info);
// virtual KexiDialogBase* createInstance(KexiMainWindow *win, const KexiPart::Item &item, int viewMode = Kexi::DataViewMode) = 0;
@@ -249,34 +250,34 @@ class KEXICORE_EXPORT Part : public QObject
virtual KexiDB::SchemaData* loadSchemaData(KexiDialogBase *dlg,
const KexiDB::SchemaData& sdata, int viewMode);
- bool loadDataBlock( KexiDialogBase *dlg, QString &dataString, const QString& dataID = QString::null);
+ bool loadDataBlock( KexiDialogBase *dlg, TQString &dataString, const TQString& dataID = TQString());
/*! Creates shared action for action collection declared
for 'instance actions' of this part.
See KexiSharedActionHost::createSharedAction() for details.
Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
that subclass allocated instead just KAction (what is the default). */
- KAction* createSharedAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+ KAction* createSharedAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName = 0);
/*! Convenience version of above method - creates shared toggle action. */
- KAction* createSharedToggleAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name);
+ KAction* createSharedToggleAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name);
/*! Creates shared action for action collection declared
for 'part actions' of this part.
See KexiSharedActionHost::createSharedAction() for details.
Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
that subclass allocated instead just KAction (what is the default). */
- KAction* createSharedPartAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+ KAction* createSharedPartAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName = 0);
/*! Convenience version of above method - creates shared toggle action
for 'part actions' of this part. */
- KAction* createSharedPartToggleAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name);
+ KAction* createSharedPartToggleAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name);
void setActionAvailable(const char *action_name, bool avail);
@@ -293,7 +294,7 @@ class KEXICORE_EXPORT Part : public QObject
//! Set of i18n'd action names for, initialised on KexiPart::Part subclass ctor
//! The names are useful because the same action can have other name for each part
//! E.g. "New table" vs "New query" can have different forms for some languages...
- QMap<QString,QString> m_names;
+ TQMap<TQString,TQString> m_names;
/*! Supported modes for dialogs created by this part.
@see supportedViewModes() */
@@ -306,9 +307,9 @@ class KEXICORE_EXPORT Part : public QObject
Info *m_info;
GUIClient *m_guiClient;
- QIntDict<GUIClient> m_instanceGuiClients;
+ TQIntDict<GUIClient> m_instanceGuiClients;
KexiMainWindow* m_mainWin;
- Kexi::ObjectStatus m_status;
+ Kexi::ObjecttqStatus 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/kexipartguiclient.h b/kexi/core/kexipartguiclient.h
index bb0d16eab..ed88a8161 100644
--- a/kexi/core/kexipartguiclient.h
+++ b/kexi/core/kexipartguiclient.h
@@ -22,7 +22,7 @@
#include "kexipart.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
@@ -34,12 +34,12 @@ namespace KexiPart
/** @internal A GUI Client used by KexiPart::Part objects within KexiMainWindow
*/
-class GUIClient : public QObject, public KXMLGUIClient
+class GUIClient : public TQObject, public KXMLGUIClient
{
public:
virtual ~GUIClient() {};
- inline Part *part() { return static_cast<Part*>(QObject::parent()); }
+ inline Part *part() { return static_cast<Part*>(TQObject::tqparent()); }
protected:
/*! Creates a new GUI Client. If \a partInstanceClient is true, the part will be
diff --git a/kexi/core/kexipartinfo.cpp b/kexi/core/kexipartinfo.cpp
index 22f7cc554..6907474a4 100644
--- a/kexi/core/kexipartinfo.cpp
+++ b/kexi/core/kexipartinfo.cpp
@@ -33,7 +33,7 @@ Info::Private::Private(const KService::Ptr& aPtr)
, broken(false)
, idStoredInPartDatabase(false)
{
- QVariant val = ptr->property("X-Kexi-NoObject");
+ TQVariant val = ptr->property("X-Kexi-NoObject");
isVisibleInNavigator = val.isValid() ? (val.toInt() != 1) : true;
//! @todo (js)..... now it's hardcoded!
@@ -72,15 +72,15 @@ Info::~Info()
delete d;
}
-QString Info::groupName() const { return d->groupName; }
+TQString Info::groupName() const { return d->groupName; }
-QCString Info::mimeType() const { return d->mimeType; }
+TQCString Info::mimeType() const { return d->mimeType; }
-QString Info::itemIcon() const { return d->itemIcon; }
+TQString Info::itemIcon() const { return d->itemIcon; }
-QString Info::createItemIcon() const { return d->itemIcon+"_newobj"; }
+TQString Info::createItemIcon() const { return d->itemIcon+"_newobj"; }
-QString Info::objectName() const { return d->objectName; }
+TQString Info::objectName() const { return d->objectName; }
KService::Ptr Info::ptr() const { return d->ptr; }
@@ -92,10 +92,10 @@ int Info::projectPartID() const { return d->projectPartID; }
void Info::setProjectPartID(int id) { d->projectPartID=id; }
-void Info::setBroken(bool broken, const QString& errorMessage)
+void Info::setBroken(bool broken, const TQString& errorMessage)
{ d->broken = broken; d->errorMessage = errorMessage; }
-QString Info::errorMessage() const { return d->errorMessage; }
+TQString Info::errorMessage() const { return d->errorMessage; }
void Info::setIdStoredInPartDatabase(bool set)
{
@@ -109,25 +109,25 @@ bool Info::isIdStoredInPartDatabase() const
bool Info::isDataExportSupported() const
{
- QVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsDataExport") : QVariant();
+ TQVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsDataExport") : TQVariant();
return val.isValid() ? val.toBool() : false;
}
bool Info::isPrintingSupported() const
{
- QVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsPrinting") : QVariant();
+ TQVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsPrinting") : TQVariant();
return val.isValid() ? val.toBool() : false;
}
bool Info::isExecuteSupported() const
{
- QVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsExecution") : QVariant();
+ TQVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsExecution") : TQVariant();
return val.isValid() ? val.toBool() : false;
}
//--------------
-QCString KexiPart::nameForCreateAction(const Info& info)
+TQCString KexiPart::nameForCreateAction(const Info& info)
{
return (info.objectName()+"part_create").latin1();
}
diff --git a/kexi/core/kexipartinfo.h b/kexi/core/kexipartinfo.h
index 43cf5b871..b7ad6f29f 100644
--- a/kexi/core/kexipartinfo.h
+++ b/kexi/core/kexipartinfo.h
@@ -46,32 +46,32 @@ class KEXICORE_EXPORT Info
/**
* @return a i18n'ed group name e.g. "Tables"
*/
- QString groupName() const;
+ TQString groupName() const;
/**
* @return the internal mime type of this part
*/
- QCString mimeType() const;
+ TQCString mimeType() const;
// /**
// * @return the icon for groups
// */
-// inline QString groupIcon() const { return m_groupIcon; }
+// inline TQString groupIcon() const { return m_groupIcon; }
/**
* @return the icon for a item
*/
- QString itemIcon() const;
+ TQString itemIcon() const;
/**
* @return the icon for a item
*/
- QString createItemIcon() const;
+ TQString createItemIcon() const;
/**
* @return the object name associated with this part (e.g. "table")
*/
- QString objectName() const;
+ TQString objectName() const;
/**
* @return the project-part-id
@@ -129,12 +129,12 @@ class KEXICORE_EXPORT Info
* Sets the broken flag and error message.
* Most likely to be called by @ref KexiPart::Manager
*/
- void setBroken(bool broken, const QString& errorMessage);
+ void setBroken(bool broken, const TQString& errorMessage);
/**
* \return i18n'd error message set by setBroken().
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
void setIdStoredInPartDatabase(bool set);
@@ -153,7 +153,7 @@ class KEXICORE_EXPORT Info
/*! \return "create" KAction's name for part defined by \a info.
The result is like "tablepart_create". Used in Part::createGUIClients()
and KexiBrowser. */
-KEXICORE_EXPORT QCString nameForCreateAction(const Info& info);
+KEXICORE_EXPORT TQCString nameForCreateAction(const Info& info);
}
diff --git a/kexi/core/kexipartinfo_p.h b/kexi/core/kexipartinfo_p.h
index 5904ff978..f92b81449 100644
--- a/kexi/core/kexipartinfo_p.h
+++ b/kexi/core/kexipartinfo_p.h
@@ -36,11 +36,11 @@ class Info::Private
Private();
KService::Ptr ptr;
- QString errorMessage;
- QString groupName;
- QCString mimeType;
- QString itemIcon;
- QString objectName;
+ TQString errorMessage;
+ TQString groupName;
+ TQCString mimeType;
+ TQString itemIcon;
+ TQString objectName;
int projectPartID;
bool broken : 1;
bool isVisibleInNavigator : 1;
diff --git a/kexi/core/kexipartitem.h b/kexi/core/kexipartitem.h
index 46eebf47f..c0b88d017 100644
--- a/kexi/core/kexipartitem.h
+++ b/kexi/core/kexipartitem.h
@@ -21,9 +21,9 @@
#ifndef KEXIPROJECTPARTITEM_H
#define KEXIPROJECTPARTITEM_H
-#include <qobject.h>
-#include <qintdict.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqptrlist.h>
namespace KexiDB
{
@@ -53,17 +53,17 @@ class KEXICORE_EXPORT Item
int identifier() const { return m_id; }
void setIdentifier(int id) { m_id = id; }
- QCString mimeType() const { return m_mime; }
- void setMimeType(const QCString &mime) { m_mime = mime; }
+ TQCString mimeType() const { return m_mime; }
+ void setMimeType(const TQCString &mime) { m_mime = mime; }
- QString name() const { return m_name; }
- void setName(const QString &name) { m_name = name; }
+ TQString name() const { return m_name; }
+ void setName(const TQString &name) { m_name = name; }
- QString caption() const { return m_caption; }
- void setCaption(const QString &c) { m_caption = c; }
+ TQString caption() const { return m_caption; }
+ void setCaption(const TQString &c) { m_caption = c; }
- QString description() const { return m_desc; }
- void setDescription(const QString &d) { m_desc = d; }
+ TQString description() const { return m_desc; }
+ void setDescription(const TQString &d) { m_desc = d; }
/*! \return "neverSaved" flag for this item what mean
that is used when new item is created in-memory-only,
@@ -79,20 +79,20 @@ class KEXICORE_EXPORT Item
bool isNull() const { return m_id==0; }
//! \return caption if not empty, else returns name.
- inline QString captionOrName() const { return m_caption.isEmpty() ? m_name : m_caption; }
+ inline TQString captionOrName() const { return m_caption.isEmpty() ? m_name : m_caption; }
private:
- QCString m_mime;
- QString m_name;
- QString m_caption;
- QString m_desc;
+ TQCString m_mime;
+ TQString m_name;
+ TQString m_caption;
+ TQString m_desc;
int m_id;
bool m_neverSaved : 1;
};
-typedef QIntDict<KexiPart::Item> ItemDict;
-typedef QIntDictIterator<KexiPart::Item> ItemDictIterator;
-typedef QPtrListIterator<KexiPart::Item> ItemListIterator;
+typedef TQIntDict<KexiPart::Item> ItemDict;
+typedef TQIntDictIterator<KexiPart::Item> ItemDictIterator;
+typedef TQPtrListIterator<KexiPart::Item> ItemListIterator;
/*!
@short Part item list with reimplemented compareItems() method.
@@ -100,12 +100,12 @@ typedef QPtrListIterator<KexiPart::Item> ItemListIterator;
Such a list is returend by KexiProject::getSortedItems(KexiPart::ItemList& list, KexiPart::Info *i);
so you can call sort() on the list to sort it by item name.
*/
-class KEXICORE_EXPORT ItemList : public QPtrList<KexiPart::Item> {
+class KEXICORE_EXPORT ItemList : public TQPtrList<KexiPart::Item> {
public:
ItemList() {}
protected:
- virtual int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) {
- return QString::compare(
+ virtual int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) {
+ return TQString::compare(
static_cast<KexiPart::Item*>(item1)->name(),
static_cast<KexiPart::Item*>(item2)->name());
}
diff --git a/kexi/core/kexipartmanager.cpp b/kexi/core/kexipartmanager.cpp
index 8525c2d78..8cd8fc0e2 100644
--- a/kexi/core/kexipartmanager.cpp
+++ b/kexi/core/kexipartmanager.cpp
@@ -35,8 +35,8 @@
using namespace KexiPart;
-Manager::Manager(QObject *parent)
- : QObject(parent)
+Manager::Manager(TQObject *tqparent)
+ : TQObject(tqparent)
{
m_lookupDone = false;
m_partlist.setAutoDelete(true);
@@ -56,20 +56,20 @@ Manager::lookup()
m_partsByMime.clear();
m_parts.clear();
KTrader::OfferList tlist = KTrader::self()->query("Kexi/Handler",
- "[X-Kexi-PartVersion] == " + QString::number(KEXI_PART_VERSION));
+ "[X-Kexi-PartVersion] == " + TQString::number(KEXI_PART_VERSION));
KConfig conf("kexirc", true);
conf.setGroup("Parts");
- QStringList sl_order = QStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order
- const int size = QMAX( tlist.count(), sl_order.count() );
- QPtrVector<KService> ordered( size*2 );
+ TQStringList sl_order = TQStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order
+ const int size = TQMAX( tlist.count(), sl_order.count() );
+ TQPtrVector<KService> ordered( size*2 );
int offset = size; //we will insert not described parts from #offset
//compute order
for(KTrader::OfferList::ConstIterator it(tlist.constBegin()); it != tlist.constEnd(); ++it)
{
KService::Ptr ptr = (*it);
- QCString mime = ptr->property("X-Kexi-TypeMime").toCString();
+ TQCString mime = ptr->property("X-Kexi-TypeMime").toCString();
kdDebug() << "Manager::lookup(): " << mime << endl;
//<TEMP>: disable some parts if needed
if (!Kexi::tempShowForms() && mime=="kexi/form")
@@ -81,7 +81,7 @@ Manager::lookup()
if (!Kexi::tempShowScripts() && mime=="kexi/script")
continue;
//</TEMP>
- int idx = sl_order.findIndex( ptr->library() );
+ int idx = sl_order.tqfindIndex( ptr->library() );
if (idx!=-1)
ordered.insert(idx, ptr);
else //add to end
@@ -127,11 +127,11 @@ Manager::part(Info *i)
// kdDebug() << "Manager::part().." << endl;
int error=0;
p = KParts::ComponentFactory::createInstanceFromService<Part>(i->ptr(), this,
- QString(i->objectName()+"_part").latin1(), QStringList(), &error);
+ TQString(i->objectName()+"_part").latin1(), TQStringList(), &error);
if(!p) {
kdDebug() << "Manager::part(): failed :( (ERROR #" << error << ")" << endl;
kdDebug() << " " << KLibLoader::self()->lastErrorMessage() << endl;
- i->setBroken(true, i18n("Error while loading plugin \"%1\"").arg(i->objectName()));
+ i->setBroken(true, i18n("Error while loading plugin \"%1\"").tqarg(i->objectName()));
setError(i->errorMessage());
return 0;
}
@@ -180,25 +180,25 @@ Manager::removeClients( KexiMainWindow *win )
{
if (!win)
return;
- QIntDictIterator<Part> it(m_parts);
+ TQIntDictIterator<Part> it(m_parts);
for (;i.current();++it) {
i.current()->removeClient(win->guiFactory());
}
}*/
Part *
-Manager::partForMimeType(const QString &mimeType)
+Manager::partForMimeType(const TQString &mimeType)
{
return mimeType.isEmpty() ? 0 : part(m_partsByMime[mimeType.latin1()]);
}
Info *
-Manager::infoForMimeType(const QString &mimeType)
+Manager::infoForMimeType(const TQString &mimeType)
{
Info *i = mimeType.isEmpty() ? 0 : m_partsByMime[mimeType.latin1()];
if (i)
return i;
- setError(i18n("No plugin for mime type \"%1\"").arg(mimeType));
+ setError(i18n("No plugin for mime type \"%1\"").tqarg(mimeType));
return 0;
}
@@ -207,7 +207,7 @@ bool
Manager::checkProject(KexiDB::Connection *conn)
{
clearError();
-// QString errmsg = i18n("Invalid project contents.");
+// TQString errmsg = i18n("Invalid project contents.");
//TODO: catch errors!
if(!conn->isDatabaseUsed()) {
@@ -222,7 +222,7 @@ Manager::checkProject(KexiDB::Connection *conn)
}
// int id=0;
-// QStringList parts_found;
+// TQStringList parts_found;
for(cursor->moveFirst(); !cursor->eof(); cursor->moveNext())
{
// id++;
@@ -254,12 +254,12 @@ Manager::checkProject(KexiDB::Connection *conn)
KexiDB::FieldList *fl = ts->subList("p_id", "p_name", "p_mime", "p_url");
if (!fl)
return false;
- if (!parts_found.contains("kexi/table")) {
- if (!conn->insertRecord(*fl, QVariant(1), QVariant("Tables"), QVariant("kexi/table"), QVariant("http://")))
+ if (!parts_found.tqcontains("kexi/table")) {
+ if (!conn->insertRecord(*fl, TQVariant(1), TQVariant("Tables"), TQVariant("kexi/table"), TQVariant("http://")))
return false;
}
- if (!parts_found.contains("kexi/query")) {
- if (!conn->insertRecord(*fl, QVariant(2), QVariant("Queries"), QVariant("kexi/query"), QVariant("http://")))
+ if (!parts_found.tqcontains("kexi/query")) {
+ if (!conn->insertRecord(*fl, TQVariant(2), TQVariant("Queries"), TQVariant("kexi/query"), TQVariant("http://")))
return false;
}
#endif
diff --git a/kexi/core/kexipartmanager.h b/kexi/core/kexipartmanager.h
index 1756e965a..e771ae001 100644
--- a/kexi/core/kexipartmanager.h
+++ b/kexi/core/kexipartmanager.h
@@ -21,12 +21,12 @@
#ifndef KEXIPARTMANAGER_H
#define KEXIPARTMANAGER_H
-#include <qobject.h>
-#include <qdict.h>
-#include <qasciidict.h>
-#include <qintdict.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqasciidict.h>
+#include <tqintdict.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include <kservice.h>
@@ -47,33 +47,34 @@ namespace KexiPart
struct Missing
{
- QString name;
- QCString mime;
- QString url;
+ TQString name;
+ TQCString mime;
+ TQString url;
};
- typedef QAsciiDict<Info> PartInfoDict;
- typedef QDictIterator<Info> PartInfoDictIterator;
- typedef QValueList<Missing> MissingList;
- typedef QPtrList<Info> PartInfoList;
- typedef QPtrListIterator<Info> PartInfoListIterator;
- typedef QIntDict<Part> PartDict;
-// typedef QPtrList<DataSource> DataSourceList;
+ typedef TQAsciiDict<Info> PartInfoDict;
+ typedef TQDictIterator<Info> PartInfoDictIterator;
+ typedef TQValueList<Missing> MissingList;
+ typedef TQPtrList<Info> PartInfoList;
+ typedef TQPtrListIterator<Info> PartInfoListIterator;
+ typedef TQIntDict<Part> PartDict;
+// typedef TQPtrList<DataSource> DataSourceList;
/**
* @short KexiPart's manager: looks up and instantiates them
*
* It dlopens them when needed, they aren't dlopened at startup is not necessary.
*/
-class KEXICORE_EXPORT Manager : public QObject, public KexiDB::Object
+class KEXICORE_EXPORT Manager : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* creates an empty instance
*/
- Manager(QObject *parent = 0);
+ Manager(TQObject *tqparent = 0);
~Manager();
/**
@@ -85,7 +86,7 @@ class KEXICORE_EXPORT Manager : public QObject, public KexiDB::Object
* \return a part object for specified mime type. Dlopens a part using KexiPart::Info
* if needed. Return 0 if loading failed.
*/
- Part *partForMimeType(const QString& mimeTypt);
+ Part *partForMimeType(const TQString& mimeTypt);
/**
* \return a part object for specified info. Dlopens a part using KexiPart::Info
@@ -96,7 +97,7 @@ class KEXICORE_EXPORT Manager : public QObject, public KexiDB::Object
/**
* \return the info for a corresponding internal mime
*/
- Info *infoForMimeType(const QString& mimeType);
+ Info *infoForMimeType(const TQString& mimeType);
/**
* checks project's kexi__part table
diff --git a/kexi/core/kexiproject.cpp b/kexi/core/kexiproject.cpp
index 741fb67a4..7a2d9367d 100644
--- a/kexi/core/kexiproject.cpp
+++ b/kexi/core/kexiproject.cpp
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qapplication.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqdom.h>
#include <kmimetype.h>
#include <kdebug.h>
@@ -72,15 +72,15 @@ class KexiProject::Private
delete sqlParser;
}
- QGuardedPtr<KexiDB::Connection> connection;
- QGuardedPtr<KexiProjectData> data;
+ TQGuardedPtr<KexiDB::Connection> connection;
+ TQGuardedPtr<KexiProjectData> data;
- QString error_title;
+ TQString error_title;
//! a cache for item() method, indexed by project part's ids
- QIntDict<KexiPart::ItemDict> itemDictsCache;
+ TQIntDict<KexiPart::ItemDict> itemDictsCache;
- QPtrDict<KexiPart::Item> unstoredItems;
+ TQPtrDict<KexiPart::Item> unstoredItems;
int tempPartItemID_Counter; //!< helper for getting unique
//!< temporary identifiers for unstored items
KexiDB::Parser* sqlParser;
@@ -96,7 +96,7 @@ class KexiProject::Private
class KexiProject::ErrorTitle
{
public:
- ErrorTitle(KexiProject* p, const QString& msg = QString::null)
+ ErrorTitle(KexiProject* p, const TQString& msg = TQString())
: prj(p)
, prev_err_title(p->m_error_title)
{
@@ -107,11 +107,11 @@ class KexiProject::ErrorTitle
prj->m_error_title = prev_err_title;
}
KexiProject* prj;
- QString prev_err_title;
+ TQString prev_err_title;
};*/
KexiProject::KexiProject(KexiProjectData *pdata, KexiDB::MessageHandler* handler)
- : QObject(), Object(handler)
+ : TQObject(), Object(handler)
, d(new Private())
{
d->data = pdata;
@@ -121,7 +121,7 @@ KexiProject::KexiProject(KexiProjectData *pdata, KexiDB::MessageHandler* handler
KexiProject::KexiProject(KexiProjectData *pdata, KexiDB::MessageHandler* handler,
KexiDB::Connection* conn)
- : QObject(), Object(handler)
+ : TQObject(), Object(handler)
, d(new Private())
{
d->data = pdata;
@@ -180,7 +180,7 @@ KexiProject::openInternal(bool *incompatibleWithKexi)
*incompatibleWithKexi = false;
kdDebug() << "KexiProject::open(): " << d->data->databaseName() <<" "<< d->data->connectionData()->driverName << endl;
KexiDB::MessageTitle et(this,
- i18n("Could not open project \"%1\".").arg(d->data->databaseName()));
+ i18n("Could not open project \"%1\".").tqarg(d->data->databaseName()));
if (!createConnection()) {
kdDebug() << "KexiProject::open(): !createConnection()" << endl;
@@ -225,7 +225,7 @@ tristate
KexiProject::create(bool forceOverwrite)
{
KexiDB::MessageTitle et(this,
- i18n("Could not create project \"%1\".").arg(d->data->databaseName()));
+ i18n("Could not create project \"%1\".").tqarg(d->data->databaseName()));
if (!createConnection())
return false;
@@ -284,9 +284,9 @@ KexiProject::create(bool forceOverwrite)
return false;
if (!KexiDB::replaceRow(*d->connection, t_db, "db_property", "project_caption",
- "db_value", QVariant( d->data->caption() ), KexiDB::Field::Text)
+ "db_value", TQVariant( d->data->caption() ), KexiDB::Field::Text)
|| !KexiDB::replaceRow(*d->connection, t_db, "db_property", "project_desc",
- "db_value", QVariant( d->data->description() ), KexiDB::Field::Text) )
+ "db_value", TQVariant( d->data->description() ), KexiDB::Field::Text) )
return false;
*/
if (trans.active() && !d->connection->commitTransaction(trans))
@@ -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(
- QString::fromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) "
+ TQString::tqfromLatin1("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(QString::fromLatin1("DROP TABLE kexi__blobs")) //lowlevel
+ || !d->connection->executeSQL(TQString::tqfromLatin1("DROP TABLE kexi__blobs")) //lowlevel
// 2.3 rename the copy back into kexi__blobs
|| !d->connection->drv_alterTableName(*kexi__blobsCopy, "kexi__blobs")
)
@@ -429,12 +429,12 @@ bool KexiProject::createInternalStructures(bool insideTransaction)
KexiDB::FieldList *fl = t_parts->subList("p_id", "p_name", "p_mime", "p_url");
if (partsTableOk)
- partsTableOk = d->connection->insertRecord(*fl, QVariant(1), QVariant("Tables"),
- QVariant("kexi/table"), QVariant("http://koffice.org/kexi/"));
+ partsTableOk = d->connection->insertRecord(*fl, TQVariant(1), TQVariant("Tables"),
+ TQVariant("kexi/table"), TQVariant("http://koffice.org/kexi/"));
if (partsTableOk)
- partsTableOk = d->connection->insertRecord(*fl, QVariant(2), QVariant("Queries"),
- QVariant("kexi/query"), QVariant("http://koffice.org/kexi/"));
+ partsTableOk = d->connection->insertRecord(*fl, TQVariant(2), TQVariant("Queries"),
+ TQVariant("kexi/query"), TQVariant("http://koffice.org/kexi/"));
}
}
@@ -480,7 +480,7 @@ KexiProject::createConnection()
if (!d->connection->connect())
{
setError(d->connection);
- kdDebug() << "KexiProject::createConnection(): error connecting: " << (d->connection ? d->connection->errorMsg() : QString::null) << endl;
+ kdDebug() << "KexiProject::createConnection(): error connecting: " << (d->connection ? d->connection->errorMsg() : TQString()) << endl;
closeConnection();
return false;
}
@@ -521,17 +521,17 @@ KexiProject::initProject()
// !@todo put more props. todo - creator, created date, etc. (also to KexiProjectData)
KexiDB::DatabaseProperties &props = d->connection->databaseProperties();
- QString str( props.value("project_caption").toString() );
+ TQString str( props.value("project_caption").toString() );
if (!str.isEmpty())
d->data->setCaption( str );
str = props.value("project_desc").toString();
if (!str.isEmpty())
d->data->setDescription( str );
/* KexiDB::RowData data;
- QString sql = "select db_value from kexi__db where db_property='%1'";
- if (d->connection->querySingleRecord( sql.arg("project_caption"), data ) && !data[0].toString().isEmpty())
+ TQString sql = "select db_value from kexi__db where db_property='%1'";
+ if (d->connection->querySingleRecord( sql.tqarg("project_caption"), data ) && !data[0].toString().isEmpty())
d->data->setCaption(data[0].toString());
- if (d->connection->querySingleRecord( sql.arg("project_desc"), data) && !data[0].toString().isEmpty())
+ if (d->connection->querySingleRecord( sql.tqarg("project_desc"), data) && !data[0].toString().isEmpty())
d->data->setDescription(data[0].toString());*/
return true;
@@ -560,7 +560,7 @@ KexiProject::items(KexiPart::Info *i)
//retrieve:
KexiDB::Cursor *cursor = d->connection->executeQuery(
"SELECT o_id, o_name, o_caption FROM kexi__objects WHERE o_type = "
- + QString::number(i->projectPartID()));//, KexiDB::Cursor::Buffered);
+ + TQString::number(i->projectPartID()));//, KexiDB::Cursor::Buffered);
// kdDebug() << "KexiProject::items(): cursor handle is:" << cursor << endl;
if(!cursor)
return 0;
@@ -573,7 +573,7 @@ KexiProject::items(KexiPart::Info *i)
KexiPart::Item *it = new KexiPart::Item();
bool ok;
int ident = cursor->value(0).toInt(&ok);
- QString objName( cursor->value(1).toString() );
+ TQString objName( cursor->value(1).toString() );
if ( ok && (ident>0) && !d->connection->isInternalTableSchema(objName)
&& KexiUtils::isIdentifier(objName) )
@@ -594,7 +594,7 @@ KexiProject::items(KexiPart::Info *i)
}
KexiPart::ItemDict*
-KexiProject::itemsForMimeType(const QCString &mimeType)
+KexiProject::itemsForMimeType(const TQCString &mimeType)
{
KexiPart::Info *info = Kexi::partManager().infoForMimeType(mimeType);
return items(info);
@@ -612,7 +612,7 @@ KexiProject::getSortedItems(KexiPart::ItemList& list, KexiPart::Info *i)
}
void
-KexiProject::getSortedItemsForMimeType(KexiPart::ItemList& list, const QCString &mimeType)
+KexiProject::getSortedItemsForMimeType(KexiPart::ItemList& list, const TQCString &mimeType)
{
KexiPart::Info *info = Kexi::partManager().infoForMimeType(mimeType);
getSortedItems(list, info);
@@ -632,12 +632,12 @@ KexiProject::addStoredItem(KexiPart::Info *info, KexiPart::Item *item)
}
KexiPart::Item*
-KexiProject::itemForMimeType(const QCString &mimeType, const QString &name)
+KexiProject::itemForMimeType(const TQCString &mimeType, const TQString &name)
{
KexiPart::ItemDict *dict = itemsForMimeType(mimeType);
if (!dict)
return 0;
- const QString l_name = name.lower();
+ const TQString l_name = name.lower();
for (KexiPart::ItemDictIterator it( *dict ); it.current(); ++it) {
if (it.current()->name().lower()==l_name)
return it.current();
@@ -646,12 +646,12 @@ KexiProject::itemForMimeType(const QCString &mimeType, const QString &name)
}
KexiPart::Item*
-KexiProject::item(KexiPart::Info *i, const QString &name)
+KexiProject::item(KexiPart::Info *i, const TQString &name)
{
KexiPart::ItemDict *dict = items(i);
if (!dict)
return 0;
- const QString l_name = name.lower();
+ const TQString l_name = name.lower();
for (KexiPart::ItemDictIterator it( *dict ); it.current(); ++it) {
if (it.current()->name().lower()==l_name)
return it.current();
@@ -663,8 +663,8 @@ KexiPart::Item*
KexiProject::item(int identifier)
{
KexiPart::ItemDict *dict;
- for (QIntDictIterator<KexiPart::ItemDict> it(d->itemDictsCache); (dict = it.current()); ++it) {
- KexiPart::Item *item = dict->find(identifier);
+ for (TQIntDictIterator<KexiPart::ItemDict> it(d->itemDictsCache); (dict = it.current()); ++it) {
+ KexiPart::Item *item = dict->tqfind(identifier);
if (item)
return item;
}
@@ -674,10 +674,10 @@ KexiProject::item(int identifier)
/*void KexiProject::clearMsg()
{
clearError();
-// d->error_title=QString::null;
+// d->error_title=TQString();
}
-void KexiProject::setError(int code, const QString &msg )
+void KexiProject::setError(int code, const TQString &msg )
{
Object::setError(code, msg);
if (Object::error())
@@ -686,7 +686,7 @@ void KexiProject::setError(int code, const QString &msg )
}
-void KexiProject::setError( const QString &msg )
+void KexiProject::setError( const TQString &msg )
{
Object::setError(msg);
if (Object::error())
@@ -704,7 +704,7 @@ void KexiProject::setError( KexiDB::Object *obj )
// emit error(d->error_title, obj);
}
-void KexiProject::setError(const QString &msg, const QString &desc)
+void KexiProject::setError(const TQString &msg, const TQString &desc)
{
Object::setError(msg); //ok?
ERRMSG(msg, desc); //not KexiDB-related
@@ -723,7 +723,7 @@ KexiPart::Part *KexiProject::findPartFor(KexiPart::Item& item)
}
KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, KexiPart::Item& item,
- int viewMode, QMap<QString,QString>* staticObjectArgs)
+ int viewMode, TQMap<TQString,TQString>* staticObjectArgs)
{
clearError();
if (viewMode!=Kexi::DataViewMode && data()->userMode())
@@ -735,17 +735,17 @@ KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, KexiPart::Item& ite
return 0;
KexiDialogBase *dlg = part->openInstance(wnd, item, viewMode, staticObjectArgs);
if (!dlg) {
- if (part->lastOperationStatus().error())
- setError(i18n("Opening object \"%1\" failed.").arg(item.name())+"<br>"
- +part->lastOperationStatus().message,
- part->lastOperationStatus().description);
+ if (part->lastOperationtqStatus().error())
+ setError(i18n("Opening object \"%1\" failed.").tqarg(item.name())+"<br>"
+ +part->lastOperationtqStatus().message,
+ part->lastOperationtqStatus().description);
return 0;
}
return dlg;
}
-KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, const QCString &mimeType,
- const QString& name, int viewMode)
+KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, const TQCString &mimeType,
+ const TQString& name, int viewMode)
{
KexiPart::Item *it = itemForMimeType(mimeType, name);
return it ? openObject(wnd, *it, viewMode) : 0;
@@ -801,14 +801,14 @@ bool KexiProject::removeObject(KexiMainWindow *wnd, KexiPart::Item& item)
return true;
}
-bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const QString& _newName )
+bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const TQString& _newName )
{
clearError();
if (data()->userMode())
return 0;
KexiUtils::WaitCursor wait;
- QString newName = _newName.stripWhiteSpace();
+ TQString newName = _newName.stripWhiteSpace();
{
KexiDB::MessageTitle et(this);
if (newName.isEmpty()) {
@@ -817,13 +817,13 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const
}
if (this->itemForMimeType(item.mimeType(), newName)!=0) {
setError( i18n("Could not use this name. Object with name \"%1\" already exists.")
- .arg(newName) );
+ .tqarg(newName) );
return false;
}
}
KexiDB::MessageTitle et(this,
- i18n("Could not rename object \"%1\".").arg(item.name()) );
+ i18n("Could not rename object \"%1\".").tqarg(item.name()) );
if (!checkWritable())
return false;
KexiPart::Part *part = findPartFor(item);
@@ -835,12 +835,12 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const
return false;
}
if (!part->rename(wnd, item, newName)) {
- setError(part->lastOperationStatus().message, part->lastOperationStatus().description);
+ setError(part->lastOperationtqStatus().message, part->lastOperationtqStatus().description);
return false;
}
if (!d->connection->executeSQL( "update kexi__objects set o_name="
+ d->connection->driver()->valueToSQL( KexiDB::Field::Text, newName )
- + " where o_id=" + QString::number(item.identifier()) )) {
+ + " where o_id=" + TQString::number(item.identifier()) )) {
setError(d->connection);
return false;
}
@@ -848,13 +848,13 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const
setError(d->connection);
return false;
}
- QCString oldName( item.name().latin1() );
+ TQCString oldName( item.name().latin1() );
item.setName( newName );
emit itemRenamed(item, oldName);
return true;
}
-KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString& suggestedCaption)
+KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const TQString& suggestedCaption)
{
clearError();
if (data()->userMode())
@@ -871,8 +871,8 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
//find new, unique default name for this item
int n;
- QString new_name;
- QString base_name;
+ TQString new_name;
+ TQString base_name;
if (suggestedCaption.isEmpty()) {
n = 1;
base_name = part->instanceName();
@@ -883,11 +883,11 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
}
base_name = KexiUtils::string2Identifier(base_name).lower();
KexiPart::ItemDictIterator it(*dict);
- QPtrDictIterator<KexiPart::Item> itUnstored(d->unstoredItems);
+ TQPtrDictIterator<KexiPart::Item> itUnstored(d->unstoredItems);
do {
new_name = base_name;
if (n>=1)
- new_name += QString::number(n);
+ new_name += TQString::number(n);
for (it.toFirst(); it.current(); ++it) {
if (it.current()->name().lower()==new_name)
break;
@@ -908,9 +908,9 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
if (n>=1000)
return 0;
- QString new_caption( suggestedCaption.isEmpty() ? part->instanceCaption() : suggestedCaption);
+ TQString new_caption( suggestedCaption.isEmpty() ? part->instanceCaption() : suggestedCaption);
if (n>=1)
- new_caption += QString::number(n);
+ new_caption += TQString::number(n);
KexiPart::Item *item = new KexiPart::Item();
item->setIdentifier( --d->tempPartItemID_Counter );//temporary
@@ -922,7 +922,7 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
return item;
}
-KexiPart::Item* KexiProject::createPartItem(KexiPart::Part *part, const QString& suggestedCaption)
+KexiPart::Item* KexiProject::createPartItem(KexiPart::Part *part, const TQString& suggestedCaption)
{
return createPartItem(part->info(), suggestedCaption);
}
@@ -944,7 +944,7 @@ KexiDB::Parser* KexiProject::sqlParser()
return d->sqlParser;
}
-static const QString warningNoUndo = i18n("Warning: entire project's data will be removed.");
+static const TQString warningNoUndo = i18n("Warning: entire project's data will be removed.");
/*static*/
KexiProject*
@@ -960,8 +960,8 @@ KexiProject::createBlankProject(bool &cancelled, KexiProjectData* data,
if (KMessageBox::Yes != KMessageBox::warningYesNo(0, "<qt>"+i18n(
"The project %1 already exists.\n"
"Do you want to replace it with a new, blank one?")
- .arg(prj->data()->infoString())+"\n"+warningNoUndo+"</qt>",
- QString::null, KGuiItem(i18n("Replace")), KStdGuiItem::cancel() ))
+ .tqarg(prj->data()->infoString())+"\n"+warningNoUndo+"</qt>",
+ TQString(), KGuiItem(i18n("Replace")), KStdGuiItem::cancel() ))
//todo add serverInfoString() for server-based prj
{
delete prj;
@@ -985,7 +985,7 @@ tristate KexiProject::dropProject(KexiProjectData* data,
KexiDB::MessageHandler* handler, bool dontAsk)
{
if (!dontAsk && KMessageBox::Yes != KMessageBox::warningYesNo(0,
- i18n("Do you want to drop the project \"%1\"?").arg(data->objectName())+"\n"+warningNoUndo ))
+ i18n("Do you want to drop the project \"%1\"?").tqarg(data->KexiDB::SchemaData::objectName())+"\n"+warningNoUndo ))
return cancelled;
KexiProject prj( new KexiProjectData(*data), handler );
diff --git a/kexi/core/kexiproject.h b/kexi/core/kexiproject.h
index 1128ffe42..e6fb283e4 100644
--- a/kexi/core/kexiproject.h
+++ b/kexi/core/kexiproject.h
@@ -21,10 +21,10 @@
#ifndef KEXIPROJECT_H
#define KEXIPROJECT_H
-#include <qobject.h>
-#include <qintdict.h>
-#include <qptrdict.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqptrdict.h>
+#include <tqguardedptr.h>
#include <kexiutils/tristate.h>
#include <kexidb/object.h>
@@ -64,9 +64,10 @@ class KexiDialogBase;
* It also contains connection data,
* current file state, etc.
*/
-class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
+class KEXICORE_EXPORT KexiProject : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructor 1. Creates a new object using \a pdata.
@@ -106,7 +107,7 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
value in "kexi__db" table.
This is often the case for native server-based databases.
If so, Kexi application can propose importing the database
- or linking it to parent project (the latter isn't yet implemented).
+ or linking it to tqparent project (the latter isn't yet implemented).
For other types of errors the variable is set to true. */
tristate open(bool &incompatibleWithKexi);
@@ -138,7 +139,7 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
* @return all items of a type \a mime in this project
* It is a convenience function.
*/
- KexiPart::ItemDict* itemsForMimeType(const QCString &mimeType);
+ KexiPart::ItemDict* itemsForMimeType(const TQCString &mimeType);
/**
* Puts a list of items of a type \a i in this project into \a list.
@@ -150,17 +151,17 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
* Puts a sorted list of items of a type \a mimeType in this project into \a list.
* You can then sort this list using ItemList::sort().
*/
- void getSortedItemsForMimeType(KexiPart::ItemList& list, const QCString &mimeType);
+ void getSortedItemsForMimeType(KexiPart::ItemList& list, const TQCString &mimeType);
/**
* @return item of type \a mime and name \a name
*/
- KexiPart::Item* itemForMimeType(const QCString &mimeType, const QString &name);
+ KexiPart::Item* itemForMimeType(const TQCString &mimeType, const TQString &name);
/**
* @return item of type \a i and name \a name
*/
- KexiPart::Item* item(KexiPart::Info *i, const QString &name);
+ KexiPart::Item* item(KexiPart::Info *i, const TQString &name);
/**
* @return item for \a identifier
@@ -181,11 +182,11 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
\a staticObjectArgs can be passed for static object
(only works when part for this item is of type KexiPart::StaticPart) */
KexiDialogBase* openObject(KexiMainWindow *wnd, KexiPart::Item& item,
- int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
//! For convenience
- KexiDialogBase* openObject(KexiMainWindow *wnd, const QCString &mimeType,
- const QString& name, int viewMode = Kexi::DataViewMode);
+ KexiDialogBase* openObject(KexiMainWindow *wnd, const TQCString &mimeType,
+ const TQString& name, int viewMode = Kexi::DataViewMode);
/*! Remove a part instance pointed by \a item.
\return true on success. */
@@ -193,7 +194,7 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
/*! Renames a part instance pointed by \a item to a new name \a newName.
\return true on success. */
- bool renameObject(KexiMainWindow *wnd, KexiPart::Item& item, const QString& newName);
+ bool renameObject(KexiMainWindow *wnd, KexiPart::Item& item, const TQString& newName);
/*! Creates part item for given part \a info.
Newly item will not be saved to the backend but stored in memory only
@@ -210,11 +211,11 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
This method is used before creating new object.
\return newly created part item or NULL on any error. */
KexiPart::Item* createPartItem(KexiPart::Info *info,
- const QString& suggestedCaption = QString::null );
+ const TQString& suggestedCaption = TQString() );
//! Added for convenience.
KexiPart::Item* createPartItem(KexiPart::Part *part,
- const QString& suggestedCaption = QString::null);
+ const TQString& suggestedCaption = TQString());
/*! Adds item \a item after it is succesfully stored as an instance of part
pointed by \a info. Also clears 'neverSaved' flag if \a item.
@@ -254,11 +255,11 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
static tristate dropProject(KexiProjectData* data,
KexiDB::MessageHandler* handler, bool dontAsk = false);
- /*! @see KexiDB::Connection::setQuerySchemaObsolete( const QString& queryName ) */
-// void setQuerySchemaObsolete( const QString& queryName );
+ /*! @see KexiDB::Connection::setQuerySchemaObsolete( const TQString& queryName ) */
+// void setQuerySchemaObsolete( const TQString& queryName );
// /** used to emit objectCreated() signal */
-// void emitObjectCreated(const QCString &mime, const QCString& name) { emit objectCreated(mime, name); }
+// void emitObjectCreated(const TQCString &mime, const TQCString& name) { emit objectCreated(mime, name); }
// void emitTableCreated(KexiDB::TableSchema& schema) { emit tableCreated(schema); }
protected:
@@ -300,10 +301,10 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
signals:
/** signal emitted on error */
- void error(const QString &title, KexiDB::Object *obj);
+ void error(const TQString &title, KexiDB::Object *obj);
/** signal emitted on error (not KexiDB-related) */
- void error(const QString &msg, const QString &desc);
+ void error(const TQString &msg, const TQString &desc);
/** New \a item has been stored. */
void newItemStored(KexiPart::Item& item);
@@ -312,12 +313,12 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
void itemRemoved(const KexiPart::Item &item);
/** instance pointed by \a item is renamed */
- void itemRenamed(const KexiPart::Item &item, const QCString& oldName);
+ void itemRenamed(const KexiPart::Item &item, const TQCString& oldName);
// /** new table \a schema created */
// void tableCreated(KexiDB::TableSchema& schema);
// /** New object of mimetype \a mime and \a name has been created. */
-// void objectCreated(const QCString &mime, const QCString& name);
+// void objectCreated(const TQCString &mime, const TQCString& name);
protected:
/*! Checks whether the project's connection is read-only.
diff --git a/kexi/core/kexiprojectconnectiondata.cpp b/kexi/core/kexiprojectconnectiondata.cpp
index 6a73342f2..7a3cc0cc8 100644
--- a/kexi/core/kexiprojectconnectiondata.cpp
+++ b/kexi/core/kexiprojectconnectiondata.cpp
@@ -20,10 +20,10 @@
#include <sys/types.h>
#include <unistd.h>
-#include <qdom.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -41,8 +41,8 @@ KexiProjectConnectionData::KexiProjectConnectionData(): KexiDB::ConnectionData()
{
}
-KexiProjectConnectionData::KexiProjectConnectionData(const QString& driverName, const QString& databaseName, const QString &host,
- unsigned short int rport, const QString& user, const QString &pass, const QString& file):KexiDB::ConnectionData()
+KexiProjectConnectionData::KexiProjectConnectionData(const TQString& driverName, const TQString& databaseName, const TQString &host,
+ unsigned short int rport, const TQString& user, const TQString &pass, const TQString& file):KexiDB::ConnectionData()
{
m_driverName=driverName;
m_databaseName=databaseName;
@@ -53,30 +53,30 @@ KexiProjectConnectionData::KexiProjectConnectionData(const QString& driverName,
setFileName(file);
}
-KexiProjectConnectionData::KexiProjectConnectionData(const QString &driverName, const QString &fileName)
+KexiProjectConnectionData::KexiProjectConnectionData(const TQString &driverName, const TQString &fileName)
: KexiDB::ConnectionData()
{
m_driverName=driverName;
setFileName(fileName);
}
-const QString &
+const TQString &
KexiProjectConnectionData::generateTmpName()
{
- return QString::null;
+ return TQString();
}
KexiProjectConnectionData*
-KexiProjectConnectionData::loadInfo(QDomElement &rootElement)
+KexiProjectConnectionData::loadInfo(TQDomElement &rootElement)
{
- QDomElement engineElement = rootElement.namedItem("engine").toElement();
- QDomElement hostElement = rootElement.namedItem("host").toElement();
- QDomElement portElement = rootElement.namedItem("port").toElement();
- QDomElement nameElement = rootElement.namedItem("name").toElement();
- QDomElement userElement = rootElement.namedItem("user").toElement();
- QDomElement passElement = rootElement.namedItem("password").toElement();
- QDomElement persElement = rootElement.namedItem("persistant").toElement();
- QDomElement encodingElement = rootElement.namedItem("encoding").toElement();
+ TQDomElement engineElement = rootElement.namedItem("engine").toElement();
+ TQDomElement hostElement = rootElement.namedItem("host").toElement();
+ TQDomElement portElement = rootElement.namedItem("port").toElement();
+ TQDomElement nameElement = rootElement.namedItem("name").toElement();
+ TQDomElement userElement = rootElement.namedItem("user").toElement();
+ TQDomElement passElement = rootElement.namedItem("password").toElement();
+ TQDomElement persElement = rootElement.namedItem("persistant").toElement();
+ TQDomElement encodingElement = rootElement.namedItem("encoding").toElement();
KexiProjectConnectionData *tmp=new KexiProjectConnectionData(
engineElement.text(), nameElement.text(),hostElement.text(),portElement.text().toInt(),
@@ -85,62 +85,62 @@ KexiProjectConnectionData::loadInfo(QDomElement &rootElement)
return tmp;
}
-void KexiProjectConnectionData::setDriverName(const QString &driverName) {
+void KexiProjectConnectionData::setDriverName(const TQString &driverName) {
m_driverName=driverName;
}
-void KexiProjectConnectionData::setDatabaseName(const QString &databaseName) {
+void KexiProjectConnectionData::setDatabaseName(const TQString &databaseName) {
m_databaseName=databaseName;
}
-QString KexiProjectConnectionData::driverName() const {
+TQString KexiProjectConnectionData::driverName() const {
return m_driverName;
}
-QString KexiProjectConnectionData::databaseName() const {
+TQString KexiProjectConnectionData::databaseName() const {
return m_databaseName;
}
void
-KexiProjectConnectionData::writeInfo(QDomDocument &domDoc)
+KexiProjectConnectionData::writeInfo(TQDomDocument &domDoc)
{
- QDomElement connectionElement = domDoc.createElement("KexiDBConnection");
+ TQDomElement connectionElement = domDoc.createElement("KexiDBConnection");
domDoc.documentElement().appendChild(connectionElement);
//DB ENGINE
- QDomElement engineElement = domDoc.createElement("engine");
+ TQDomElement engineElement = domDoc.createElement("engine");
connectionElement.appendChild(engineElement);
- QDomText tEngine = domDoc.createTextNode(m_driverName);
+ TQDomText tEngine = domDoc.createTextNode(m_driverName);
engineElement.appendChild(tEngine);
//HOST
- QDomElement hostElement = domDoc.createElement("host");
+ TQDomElement hostElement = domDoc.createElement("host");
connectionElement.appendChild(hostElement);
- QDomText tHost = domDoc.createTextNode(hostName);
+ TQDomText tHost = domDoc.createTextNode(hostName);
hostElement.appendChild(tHost);
//DATABASE NAME
- QDomElement nameElement = domDoc.createElement("name");
+ TQDomElement nameElement = domDoc.createElement("name");
connectionElement.appendChild(nameElement);
- QDomText tName = domDoc.createTextNode(m_databaseName);
+ TQDomText tName = domDoc.createTextNode(m_databaseName);
nameElement.appendChild(tName);
//USER
- QDomElement userElement = domDoc.createElement("user");
+ TQDomElement userElement = domDoc.createElement("user");
connectionElement.appendChild(userElement);
- QDomText tUser = domDoc.createTextNode(userName);
+ TQDomText tUser = domDoc.createTextNode(userName);
userElement.appendChild(tUser);
//PASSWORD STUFF
- QDomElement passElement = domDoc.createElement("password");
+ TQDomElement passElement = domDoc.createElement("password");
connectionElement.appendChild(passElement);
- QDomText tPass=domDoc.createTextNode(password);
+ TQDomText tPass=domDoc.createTextNode(password);
passElement.appendChild(tPass);
}
diff --git a/kexi/core/kexiprojectconnectiondata.h b/kexi/core/kexiprojectconnectiondata.h
index 04ff40ff4..4430907d7 100644
--- a/kexi/core/kexiprojectconnectiondata.h
+++ b/kexi/core/kexiprojectconnectiondata.h
@@ -22,8 +22,8 @@
#include <kexidb/connectiondata.h>
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
class KoStore;
/**
* This class aims to provide
@@ -39,30 +39,30 @@ class KEXICORE_EXPORT KexiProjectConnectionData:public KexiDB::ConnectionData
KexiProjectConnectionData();
- KexiProjectConnectionData(const QString& driverName, const QString& databaseName, const QString &hostName, unsigned short int port,
- const QString& userName, const QString &password, const QString& fileName);
+ KexiProjectConnectionData(const TQString& driverName, const TQString& databaseName, const TQString &hostName, unsigned short int port,
+ const TQString& userName, const TQString &password, const TQString& fileName);
/**
* connect to a embedded database
*/
- KexiProjectConnectionData(const QString &driverName, const QString &fileName=QString::null);
+ KexiProjectConnectionData(const TQString &driverName, const TQString &fileName=TQString());
~KexiProjectConnectionData();
- static const QString &generateTmpName();
+ static const TQString &generateTmpName();
- static KexiProjectConnectionData* loadInfo(QDomElement &e);
- void writeInfo(QDomDocument &doc);
+ static KexiProjectConnectionData* loadInfo(TQDomElement &e);
+ void writeInfo(TQDomDocument &doc);
- void setDriverName(const QString &driverName);
- void setDatabaseName(const QString &databaseName);
+ void setDriverName(const TQString &driverName);
+ void setDatabaseName(const TQString &databaseName);
- QString driverName() const;
- QString databaseName() const;
+ TQString driverName() const;
+ TQString databaseName() const;
private:
- QString m_driverName;
- QString m_databaseName;
+ TQString m_driverName;
+ TQString m_databaseName;
};
diff --git a/kexi/core/kexiprojectdata.cpp b/kexi/core/kexiprojectdata.cpp
index 68966a114..9f0106bcf 100644
--- a/kexi/core/kexiprojectdata.cpp
+++ b/kexi/core/kexiprojectdata.cpp
@@ -21,10 +21,10 @@
#include <sys/types.h>
#include <unistd.h>
-#include <qdom.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -48,7 +48,7 @@ public:
{}
KexiDB::ConnectionData connData;
- QDateTime lastOpened;
+ TQDateTime lastOpened;
bool userMode : 1;
bool readOnly : 1;
};
@@ -56,7 +56,7 @@ public:
//---------------------------------------
KexiProjectData::KexiProjectData()
- : QObject(0, "KexiProjectData")
+ : TQObject(0, "KexiProjectData")
, KexiDB::SchemaData()
, formatVersion(0)
, d( new KexiProjectDataPrivate() )
@@ -64,8 +64,8 @@ KexiProjectData::KexiProjectData()
}
KexiProjectData::KexiProjectData(
- const KexiDB::ConnectionData &cdata, const QString& dbname, const QString& caption )
- : QObject(0, "KexiProjectData")
+ const KexiDB::ConnectionData &cdata, const TQString& dbname, const TQString& caption )
+ : TQObject(0, "KexiProjectData")
, KexiDB::SchemaData()
, formatVersion(0)
, d( new KexiProjectDataPrivate() )
@@ -76,7 +76,7 @@ KexiProjectData::KexiProjectData(
}
KexiProjectData::KexiProjectData( const KexiProjectData& pdata )
- : QObject(0, "KexiProjectData"), KexiDB::SchemaData()
+ : TQObject(0, "KexiProjectData"), KexiDB::SchemaData()
, d( 0 )
{
*this = pdata;
@@ -116,12 +116,12 @@ const KexiDB::ConnectionData* KexiProjectData::constConnectionData() const
return &d->connData;
}
-QString KexiProjectData::databaseName() const
+TQString KexiProjectData::databaseName() const
{
return KexiDB::SchemaData::name();
}
-void KexiProjectData::setDatabaseName(const QString& dbName)
+void KexiProjectData::setDatabaseName(const TQString& dbName)
{
KexiDB::SchemaData::setName(dbName);
}
@@ -131,37 +131,37 @@ bool KexiProjectData::userMode() const
return d->userMode;
}
-QDateTime KexiProjectData::lastOpened() const
+TQDateTime KexiProjectData::lastOpened() const
{
return d->lastOpened;
}
-void KexiProjectData::setLastOpened(const QDateTime& lastOpened)
+void KexiProjectData::setLastOpened(const TQDateTime& lastOpened)
{
d->lastOpened=lastOpened;
}
-QString KexiProjectData::description() const
+TQString KexiProjectData::description() const
{
return KexiDB::SchemaData::description();
}
-void KexiProjectData::setDescription(const QString& desc)
+void KexiProjectData::setDescription(const TQString& desc)
{
return KexiDB::SchemaData::setDescription(desc);
}
-QString KexiProjectData::infoString(bool nobr) const
+TQString KexiProjectData::infoString(bool nobr) const
{
if (constConnectionData()->fileName().isEmpty()) {
//server-based
- return QString(nobr ? "<nobr>" : "") + QString("\"%1\"").arg(databaseName()) + (nobr ? "</nobr>" : "")
+ return TQString(nobr ? "<nobr>" : "") + TQString("\"%1\"").tqarg(databaseName()) + (nobr ? "</nobr>" : "")
+ (nobr ? " <nobr>" : " ") + i18n("database connection", "(connection %1)")
- .arg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : "");
+ .tqarg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : "");
}
//file-based
- return QString(nobr ? "<nobr>" : "")
- + QString("\"%1\"").arg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : "");
+ return TQString(nobr ? "<nobr>" : "")
+ + TQString("\"%1\"").tqarg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : "");
}
void KexiProjectData::setReadOnly(bool set)
diff --git a/kexi/core/kexiprojectdata.h b/kexi/core/kexiprojectdata.h
index b4fc99d3f..32e5ed7ed 100644
--- a/kexi/core/kexiprojectdata.h
+++ b/kexi/core/kexiprojectdata.h
@@ -24,7 +24,7 @@
#include <kexidb/connectiondata.h>
#include <kexidb/schemadata.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class KexiProjectDataPrivate;
@@ -36,16 +36,16 @@ class KexiProjectDataPrivate;
- connection data
- date and time of last opening
*/
-class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaData
+class KEXICORE_EXPORT KexiProjectData : public TQObject, public KexiDB::SchemaData
{
public:
- typedef QPtrList<KexiProjectData> List;
- typedef QMap<QCString,QString> ObjectInfo;
+ typedef TQPtrList<KexiProjectData> List;
+ typedef TQMap<TQCString,TQString> ObjectInfo;
KexiProjectData();
KexiProjectData( const KexiDB::ConnectionData &cdata,
- const QString& dbname = QString::null, const QString& caption = QString::null );
+ const TQString& dbname = TQString(), const TQString& caption = TQString() );
/*! Constructs a copy of \a pdata */
KexiProjectData( const KexiProjectData& pdata );
@@ -64,8 +64,8 @@ class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaDat
/*! \return database name.
In fact, this is the same as KexiDB::SchemaData::name() */
- QString databaseName() const;
- void setDatabaseName(const QString& dbName);
+ TQString databaseName() const;
+ void setDatabaseName(const TQString& dbName);
/*! \return user-visible string better describing the project than just databaseName().
For server-based projects returns i18n'd string:
@@ -73,13 +73,13 @@ class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaDat
For file-based projects returns project's filename.
If \a nobr is true, \<nobr\> tags are added around '(connection: user\@server:port)'
(useful for displaying in message boxes). */
- QString infoString(bool nobr = true) const;
+ TQString infoString(bool nobr = true) const;
- QDateTime lastOpened() const;
- void setLastOpened(const QDateTime& lastOpened);
+ TQDateTime lastOpened() const;
+ void setLastOpened(const TQDateTime& lastOpened);
- QString description() const;
- void setDescription(const QString& desc);
+ TQString description() const;
+ void setDescription(const TQString& desc);
/*! If \a set is true, sets readonly flag for this data, so any connection opened for the project will
be readonly. Change this flag before using this data in KexiProject instance,
@@ -92,7 +92,7 @@ class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaDat
/*! objects to open on startup (come from command line "-open" option)
It's public for convenience */
- QValueList<ObjectInfo> autoopenObjects;
+ TQValueList<ObjectInfo> autoopenObjects;
/*! @internal
Format version used when saving the data to a shortcut file.
diff --git a/kexi/core/kexiprojectset.cpp b/kexi/core/kexiprojectset.cpp
index 51e804dd1..994c70af1 100644
--- a/kexi/core/kexiprojectset.cpp
+++ b/kexi/core/kexiprojectset.cpp
@@ -67,7 +67,7 @@ KexiProjectSet::KexiProjectSet(KexiDB::ConnectionData &conndata,
delete conn;
return;
}
- QStringList dbnames = conn->databaseNames(false/*skip system*/);
+ TQStringList dbnames = conn->databaseNames(false/*skip system*/);
// kexidbg << dbnames.count() << endl;
if (conn->error()) {
setError(conn);
@@ -76,7 +76,7 @@ KexiProjectSet::KexiProjectSet(KexiDB::ConnectionData &conndata,
}
delete conn;
conn = 0;
- for (QStringList::ConstIterator it = dbnames.constBegin(); it!=dbnames.constEnd(); ++it) {
+ for (TQStringList::ConstIterator it = dbnames.constBegin(); it!=dbnames.constEnd(); ++it) {
// project's caption is just the same as database name - nothing better is available
KexiProjectData *pdata = new KexiProjectData(conndata, *it, *it);
d->list.append( pdata );
@@ -100,10 +100,10 @@ KexiProjectData::List KexiProjectSet::list() const
return d->list;
}
-KexiProjectData* KexiProjectSet::findProject(const QString &dbName) const
+KexiProjectData* KexiProjectSet::findProject(const TQString &dbName) const
{
- const QString _dbName = dbName.lower();
- QPtrListIterator<KexiProjectData> it( d->list );
+ const TQString _dbName = dbName.lower();
+ TQPtrListIterator<KexiProjectData> it( d->list );
for (;it.current();++it) {
if (it.current()->databaseName().lower()==_dbName)
return it.current();
diff --git a/kexi/core/kexiprojectset.h b/kexi/core/kexiprojectset.h
index af2517226..3ea11ec8c 100644
--- a/kexi/core/kexiprojectset.h
+++ b/kexi/core/kexiprojectset.h
@@ -57,7 +57,7 @@ class KEXICORE_EXPORT KexiProjectSet : public KexiDB::Object
//! Case insensitive lookup.
//! \return project data for databased \a dbName or NULL if not found
- KexiProjectData* findProject(const QString &dbName) const;
+ KexiProjectData* findProject(const TQString &dbName) const;
private:
KexiProjectSetPrivate *d;
diff --git a/kexi/core/kexisearchandreplaceiface.h b/kexi/core/kexisearchandreplaceiface.h
index f17d83587..f581de34e 100644
--- a/kexi/core/kexisearchandreplaceiface.h
+++ b/kexi/core/kexisearchandreplaceiface.h
@@ -21,9 +21,9 @@
#define KexiSearchAndReplaceViewInterface_H
#include <kexiutils/tristate.h>
-#include <qstring.h>
-class QVariant;
-class QStringList;
+#include <tqstring.h>
+class TQVariant;
+class TQStringList;
//! @short An interface used by Kexi views (KexiViewBase) supporting search/replace features
class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
@@ -78,19 +78,19 @@ class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
bool promptOnReplace : 1;
};
- /*! Sets up data for find/replace dialog, based on view's data model.
+ /*! Sets up data for tqfind/replace dialog, based on view's data model.
\a columnNames should contain column name, \a columnCaptions should contain column captions,
and \a currentColumnName should beset to current column's name.
- Implementation should set up values and return true if find/replace dialog should be filled. */
- virtual bool setupFindAndReplace(QStringList& columnNames, QStringList& columnCaptions,
- QString& currentColumnName) = 0;
+ Implementation should set up values and return true if tqfind/replace dialog should be filled. */
+ virtual bool setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions,
+ TQString& currentColumnName) = 0;
/*! Finds \a valueToFind within the view.
\a options are used to control the process. Selection is moved to found value.
\return true if value has been found, false if value has not been found,
and cancelled if there is nothing to find or there is no data to search in.
If \a next is true, "find next" is performed, else "find previous" is performed. */
- virtual tristate find(const QVariant& valueToFind,
+ virtual tristate tqfind(const TQVariant& valueToFind,
const KexiSearchAndReplaceViewInterface::Options& options, bool next) = 0;
/*! Finds \a valueToFind within the view and replaces with \a replacement
@@ -99,7 +99,7 @@ class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
has not been found and replaced, and cancelled if there is nothing
to find or there is no data to search in or the data is read only.
If \a replaceAll is true, all found values are replaced. */
- virtual tristate findNextAndReplace(const QVariant& valueToFind, const QVariant& replacement,
+ virtual tristate findNextAndReplace(const TQVariant& valueToFind, const TQVariant& replacement,
const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll) = 0;
};
diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp
index 11ab94dbc..b00cbc1b4 100644
--- a/kexi/core/kexisharedactionhost.cpp
+++ b/kexi/core/kexisharedactionhost.cpp
@@ -29,7 +29,7 @@
#include <kdebug.h>
KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h)
-: QObject(0,"KexiSharedActionHostPrivate")
+: TQObject(0,"KexiSharedActionHostPrivate")
, actionProxies(401)
, actionMapper( this )
, volatileActions(401)
@@ -37,14 +37,14 @@ KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h
, host(h)
{
volatileActions.setAutoDelete(true);
- connect(&actionMapper, SIGNAL(mapped(const QString &)), this, SLOT(slotAction(const QString &)));
+ connect(&actionMapper, TQT_SIGNAL(mapped(const TQString &)), this, TQT_SLOT(slotAction(const TQString &)));
}
-void KexiSharedActionHostPrivate::slotAction(const QString& act_id)
+void KexiSharedActionHostPrivate::slotAction(const TQString& act_id)
{
- QWidget *w = host->focusWindow(); //focusWidget();
+ TQWidget *w = host->focusWindow(); //tqfocusWidget();
// while (w && !w->inherits("KexiDialogBase") && !w->inherits("KexiDockBase"))
-// w = w->parentWidget();
+// w = w->tqparentWidget();
KexiActionProxy *proxy = w ? actionProxies[ w ] : 0;
@@ -104,22 +104,22 @@ void KexiSharedActionHost::setActionAvailable(const char *action_name, bool avai
}
}
-void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool avail, QObject *obj)
+void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool avail, TQObject *obj)
{
/*test if (qstrcmp(action_name, "tablepart_toggle_pkey")==0) {
kdDebug() << "tablepart_toggle_pkey" << endl;
}*/
if (!d)
return; //sanity
- QWidget *fw = d->mainWin->focusWidget();
- while (fw && obj!=fw)
- fw = fw->parentWidget();
+ TQWidget *fw = d->mainWin->tqfocusWidget();
+ while (fw && TQT_BASE_OBJECT(obj)!=TQT_BASE_OBJECT(fw))
+ fw = fw->tqparentWidget();
if (!fw)
return;
setActionAvailable(action_name, avail);
if (avail) {
- d->enablers.replace(action_name, fw);
+ d->enablers.tqreplace(action_name, fw);
}
else {
d->enablers.take(action_name);
@@ -137,7 +137,7 @@ KMainWindow* KexiSharedActionHost::mainWindow() const
return d->mainWin;
}
-void KexiSharedActionHost::invalidateSharedActions(QObject *o)
+void KexiSharedActionHost::tqinvalidateSharedActions(TQObject *o)
{
if (!d)
return;
@@ -149,7 +149,7 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o)
KAction *a = *it;
if (!insideDialogBase && d->mainWin->actionCollection()!=a->parentCollection()) {
//o is not KexiDialogBase or its child:
- // only invalidate action if it comes from mainwindow's KActionCollection
+ // only tqinvalidate action if it comes from mainwindow's KActionCollection
// (thus part-actions are untouched when the focus is e.g. in the Property Editor)
continue;
}
@@ -157,7 +157,7 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o)
KexiVolatileActionData *va = d->volatileActions[ a ];
if (va != 0) {
if (p && p->isSupported(a->name())) {
- QPtrList<KAction> actions_list;
+ TQPtrList<KAction> actions_list;
actions_list.append( a );
if (!va->plugged) {
va->plugged=true;
@@ -178,43 +178,43 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o)
}
}
-KexiActionProxy* KexiSharedActionHost::actionProxyFor(QObject *o) const
+KexiActionProxy* KexiSharedActionHost::actionProxyFor(TQObject *o) const
{
return d->actionProxies[ o ];
}
-KexiActionProxy* KexiSharedActionHost::takeActionProxyFor(QObject *o)
+KexiActionProxy* KexiSharedActionHost::takeActionProxyFor(TQObject *o)
{
if (d)
return d->actionProxies.take( o );
return 0;
}
-bool KexiSharedActionHost::acceptsSharedActions(QObject *)
+bool KexiSharedActionHost::acceptsSharedActions(TQObject *)
{
return false;
}
-QWidget* KexiSharedActionHost::focusWindow()
+TQWidget* KexiSharedActionHost::focusWindow()
{
- QWidget *fw;
+ TQWidget *fw;
if (dynamic_cast<KMdiMainFrm*>(d->mainWin)) {
fw = dynamic_cast<KMdiMainFrm*>(d->mainWin)->activeWindow();
}
else {
- QWidget *aw = qApp->activeWindow();
+ TQWidget *aw = TQT_TQWIDGET(tqApp->activeWindow());
if (!aw)
aw = d->mainWin;
- fw = aw->focusWidget();
+ fw = aw->tqfocusWidget();
}
- while (fw && !acceptsSharedActions(fw))
- fw = fw->parentWidget();
+ while (fw && !acceptsSharedActions(TQT_TQOBJECT(fw)))
+ fw = fw->tqparentWidget();
return fw;
}
KAction* KexiSharedActionHost::createSharedActionInternal( KAction *action )
{
- QObject::connect(action,SIGNAL(activated()), &d->actionMapper, SLOT(map()));
+ TQObject::connect(action,TQT_SIGNAL(activated()), &d->actionMapper, TQT_SLOT(map()));
d->actionMapper.setMapping(action, action->name());
d->sharedActions.append( action );
return action;
@@ -228,17 +228,17 @@ KActionPtrList KexiSharedActionHost::sharedActions() const
/*class KexiAction : public KAction
{
public:
- KexiAction(const QString &text, const QIconSet &pix,
- const KShortcut &cut, const QObject *receiver,
- const char *slot, KActionCollection *parent, const char *name)
- : KAction(text,pix,cut,receiver,slot,parent,name)
+ KexiAction(const TQString &text, const TQIconSet &pix,
+ const KShortcut &cut, const TQObject *receiver,
+ const char *slot, KActionCollection *tqparent, const char *name)
+ : KAction(text,pix,cut,receiver,slot,tqparent,name)
{
}
- QPtrDict<QWidget> unplugged;
+ TQPtrDict<TQWidget> unplugged;
};*/
-KAction* KexiSharedActionHost::createSharedAction(const QString &text, const QString &pix_name,
+KAction* KexiSharedActionHost::createSharedAction(const TQString &text, const TQString &pix_name,
const KShortcut &cut, const char *name, KActionCollection* col, const char *subclassName)
{
if (subclassName==0)
diff --git a/kexi/core/kexisharedactionhost.h b/kexi/core/kexisharedactionhost.h
index abb960bfb..035ce3526 100644
--- a/kexi/core/kexisharedactionhost.h
+++ b/kexi/core/kexisharedactionhost.h
@@ -20,10 +20,10 @@
#ifndef KEXISHAREDACTIONHOST_H
#define KEXISHAREDACTIONHOST_H
-#include <qguardedptr.h>
-#include <qasciidict.h>
-#include <qobject.h>
-#include <qpair.h>
+#include <tqguardedptr.h>
+#include <tqasciidict.h>
+#include <tqobject.h>
+#include <tqpair.h>
#include <kstdaction.h>
#include <kaction.h>
@@ -67,15 +67,15 @@ class KEXICORE_EXPORT KexiSharedActionHost
return o->inherits("KexiDialogBase") || o->inherits("KexiViewBase");
\endcode
*/
- virtual bool acceptsSharedActions(QObject *o);
+ virtual bool acceptsSharedActions(TQObject *o);
- /*! \return window widget that is currently focused (using QWidget::focusWidget())
+ /*! \return window widget that is currently focused (using TQWidget::tqfocusWidget())
and matches acceptsSharedActions(). If focused widget does not match,
- it's parent, grandparent, and so on is checked. If all this fails,
+ it's tqparent, grandtqparent, and so on is checked. If all this fails,
or no widget has focus, NULL is returned.
Also works if currently focused window is detached (as in KMDI).
*/
- QWidget* focusWindow();
+ TQWidget* focusWindow();
/*! Sets this host as default shared actions host. */
void setAsDefaultHost();
@@ -100,13 +100,13 @@ class KEXICORE_EXPORT KexiSharedActionHost
Otherwise the action is disabled.
If \a o is not KexiDialogBase or its child,
- actions are only invalidated if these come from mainwindow's KActionCollection
+ actions are only tqinvalidated if these come from mainwindow's KActionCollection
(thus part-actions are untouched when the focus is e.g. in the Property Editor.
Call this method when it is known that some actions need invalidation
(e.g. when new window is activated). See how it is used in KexiMainWindowImpl.
*/
- virtual void invalidateSharedActions(QObject *o);
+ virtual void tqinvalidateSharedActions(TQObject *o);
void setActionAvailable(const char *action_name, bool avail);
@@ -115,7 +115,7 @@ class KEXICORE_EXPORT KexiSharedActionHost
/*! Updates availability of action \a action_name for object \a obj.
Object is mainly the window. */
- void updateActionAvailable(const char *action_name, bool avail, QObject *obj);
+ void updateActionAvailable(const char *action_name, bool avail, TQObject *obj);
/*! \return main window for which this host is defined. */
KMainWindow* mainWindow() const;
@@ -126,7 +126,7 @@ class KEXICORE_EXPORT KexiSharedActionHost
Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
that subclass allocated instead just KAction (what is the default).
Created action's data is owned by the main window. */
- KAction* createSharedAction(const QString &text, const QString &pix_name,
+ KAction* createSharedAction(const TQString &text, const TQString &pix_name,
const KShortcut &cut, const char *name, KActionCollection* col = 0,
const char *subclassName = 0);
@@ -143,11 +143,11 @@ class KEXICORE_EXPORT KexiSharedActionHost
/*! \return action proxy for object \a o, or NULL if this object has
no plugged shared actions. */
- KexiActionProxy* actionProxyFor(QObject *o) const;
+ KexiActionProxy* actionProxyFor(TQObject *o) const;
/*! Like actionProxyFor(), but takes the proxy from the host completely.
This is called by KExiActionProxy on its destruction. */
- KexiActionProxy* takeActionProxyFor(QObject *o);
+ KexiActionProxy* takeActionProxyFor(TQObject *o);
private:
/*! Helper function for createSharedAction(). */
diff --git a/kexi/core/kexisharedactionhost_p.h b/kexi/core/kexisharedactionhost_p.h
index f56db586a..841a014ca 100644
--- a/kexi/core/kexisharedactionhost_p.h
+++ b/kexi/core/kexisharedactionhost_p.h
@@ -20,9 +20,9 @@
#ifndef KEXISHAREDACTIONHOST_P_H
#define KEXISHAREDACTIONHOST_P_H
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qsignalmapper.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqsignalmapper.h>
#include <kmainwindow.h>
@@ -39,23 +39,24 @@ class KexiVolatileActionData
};
//! @internal
-class KEXICORE_EXPORT KexiSharedActionHostPrivate : public QObject
+class KEXICORE_EXPORT KexiSharedActionHostPrivate : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiSharedActionHostPrivate(KexiSharedActionHost *h);
public slots:
- void slotAction(const QString& act_id);
+ void slotAction(const TQString& act_id);
public:
- QPtrDict<KexiActionProxy> actionProxies;
+ TQPtrDict<KexiActionProxy> actionProxies;
KMainWindow *mainWin;
KActionPtrList sharedActions;
- QSignalMapper actionMapper;
- QPtrDict<KexiVolatileActionData> volatileActions;
- QAsciiDict<QWidget> enablers;
+ TQSignalMapper actionMapper;
+ TQPtrDict<KexiVolatileActionData> volatileActions;
+ TQAsciiDict<TQWidget> enablers;
KexiSharedActionHost *host;
};
diff --git a/kexi/core/kexistartupdata.cpp b/kexi/core/kexistartupdata.cpp
index 301ebdbd6..34ecdd720 100644
--- a/kexi/core/kexistartupdata.cpp
+++ b/kexi/core/kexistartupdata.cpp
@@ -23,8 +23,8 @@
#include <kexidb/driver.h>
#include <kexidb/drivermanager.h>
-#include <qfileinfo.h>
-#include <qcstring.h>
+#include <tqfileinfo.h>
+#include <tqcstring.h>
KexiStartupData::KexiStartupData()
: m_projectData(0)
diff --git a/kexi/core/kexistartupdata.h b/kexi/core/kexistartupdata.h
index 71999bcb6..f31c82bff 100644
--- a/kexi/core/kexistartupdata.h
+++ b/kexi/core/kexistartupdata.h
@@ -20,7 +20,7 @@
#ifndef KEXI_STARTUPDATA_H
#define KEXI_STARTUPDATA_H
-#include <qstring.h>
+#include <tqstring.h>
class KexiProjectData;
@@ -46,8 +46,8 @@ class KEXICORE_EXPORT KexiStartupData
public:
Import();
operator bool() const;
- QString fileName;
- QString mimeType;
+ TQString fileName;
+ TQString mimeType;
};
KexiStartupData();
diff --git a/kexi/core/kexistaticpart.cpp b/kexi/core/kexistaticpart.cpp
index c7e323e1f..86f3a7463 100644
--- a/kexi/core/kexistaticpart.cpp
+++ b/kexi/core/kexistaticpart.cpp
@@ -27,7 +27,7 @@ using namespace KexiPart;
//------------------------------
-StaticInfo::StaticInfo(const QCString& mimeType, const QString& itemIcon, const QString& objectName)
+StaticInfo::StaticInfo(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName)
: Info()
{
d->mimeType = mimeType;
@@ -41,7 +41,7 @@ StaticInfo::~StaticInfo()
//------------------------------
-StaticPart::StaticPart(const QCString& mimeType, const QString& itemIcon, const QString& objectName)
+StaticPart::StaticPart(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName)
: Part(&Kexi::partManager(), new StaticInfo(mimeType, itemIcon, objectName))
{
Kexi::partManager().insertStaticPart(this);
@@ -51,10 +51,10 @@ StaticPart::~StaticPart()
{
}
-KexiViewBase* StaticPart::createView(QWidget *parent, KexiDialogBase* dialog,
+KexiViewBase* StaticPart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
KexiPart::Item &item, int viewMode)
{
- Q_UNUSED(parent);
+ Q_UNUSED(tqparent);
Q_UNUSED(dialog);
Q_UNUSED(item);
Q_UNUSED(viewMode);
diff --git a/kexi/core/kexistaticpart.h b/kexi/core/kexistaticpart.h
index fe127fe48..06ba7501f 100644
--- a/kexi/core/kexistaticpart.h
+++ b/kexi/core/kexistaticpart.h
@@ -33,7 +33,7 @@ namespace KexiPart
class KEXICORE_EXPORT StaticInfo : public Info
{
public:
- StaticInfo(const QCString& mimeType, const QString& itemIcon, const QString& objectName);
+ StaticInfo(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName);
~StaticInfo();
protected:
@@ -45,17 +45,17 @@ class KEXICORE_EXPORT StaticInfo : public Info
class KEXICORE_EXPORT StaticPart : public Part
{
public:
- StaticPart(const QCString& mimeType, const QString& itemIcon, const QString& objectName);
+ StaticPart(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName);
virtual ~StaticPart();
- /*! Creates a new view for mode \a viewMode, \a item and \a parent. The view will be
+ /*! Creates a new view for mode \a viewMode, \a item and \a tqparent. The view will be
used inside \a dialog. \a args arguments can be passed. */
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>* args) = 0;
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>* args) = 0;
protected:
//! unused by static parts
- KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
+ KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
KexiPart::Item &item, int viewMode = Kexi::DataViewMode);
};
diff --git a/kexi/core/kexitabledesignerinterface.h b/kexi/core/kexitabledesignerinterface.h
index 60d7d0c77..6aa9629ac 100644
--- a/kexi/core/kexitabledesignerinterface.h
+++ b/kexi/core/kexitabledesignerinterface.h
@@ -66,7 +66,7 @@ class KEXICORE_EXPORT KexiTableDesignerInterface
Property set is also created.
Existing field will be overwritten, so use insertEmptyRow()
is you want to move subsequent fields down. */
- virtual void insertField(int row, const QString& caption, bool addCommand = false) = 0;
+ virtual void insertField(int row, const TQString& caption, bool addCommand = false) = 0;
/*! Inserts a new \a field for \a row.
Property set is also created. \a set will be deeply-copied into the new set.
@@ -84,16 +84,16 @@ class KEXICORE_EXPORT KexiTableDesignerInterface
/*! Changes property \a propertyName to \a newValue for a field pointed by \a fieldUID.
If \a listData is not NULL and not empty, a deep copy of it is passed to Property::setListData().
If \a listData \a nlist if not NULL but empty, Property::setListData(0) is called. */
- virtual void changeFieldPropertyForRow( int fieldUID, const QCString& propertyName,
- const QVariant& newValue, KoProperty::Property::ListData* const listData = 0,
+ virtual void changeFieldPropertyForRow( int fieldUID, const TQCString& propertyName,
+ const TQVariant& newValue, KoProperty::Property::ListData* const listData = 0,
bool addCommand = false ) = 0;
/*! Creates temporary table for the current design and returns debug string for it. */
- virtual QString debugStringForCurrentTableSchema(tristate& result) = 0;
+ virtual TQString debugStringForCurrentTableSchema(tristate& result) = 0;
/*! Simulates execution of alter table, and puts debug into \a debugTarget.
A case when debugTarget is not 0 is true for the alter table test suite. */
- virtual tristate simulateAlterTableExecution(QString *debugTarget) = 0;
+ virtual tristate simulateAlterTableExecution(TQString *debugTarget) = 0;
/*! Real execution of the Alter Table. For debugging of the real alter table.
\return true on success, false on failure and cancelled if user has cancelled
diff --git a/kexi/core/kexitemplateloader.cpp b/kexi/core/kexitemplateloader.cpp
index 489d5f51d..f6564d652 100644
--- a/kexi/core/kexitemplateloader.cpp
+++ b/kexi/core/kexitemplateloader.cpp
@@ -27,27 +27,27 @@
#include <kiconloader.h>
#include <kapplication.h>
-#include <qdir.h>
+#include <tqdir.h>
//static
KexiTemplateInfo::List KexiTemplateLoader::loadListInfo()
{
KexiTemplateInfo::List list;
- const QString subdir = QString(kapp->instanceName()) + "/templates";
- QString lang( KGlobal::locale()->language() );
- QStringList dirs( kapp->dirs()->findDirs("data", subdir) );
+ const TQString subdir = TQString(kapp->instanceName()) + "/templates";
+ TQString lang( KGlobal::locale()->language() );
+ TQStringList dirs( kapp->dirs()->findDirs("data", subdir) );
while (true) {
- foreach( QStringList::ConstIterator, it, dirs) {
- QDir dir((*it)+lang);
+ foreach( TQStringList::ConstIterator, it, dirs) {
+ TQDir dir((*it)+lang);
if (!dir.exists())
continue;
if (!dir.isReadable()) {
kdWarning() << "KexiTemplateLoader::loadListInfo() \"" << dir.absPath() << "\" not readable!" << endl;
continue;
}
- const QStringList templateDirs( dir.entryList(QDir::Dirs, QDir::Name) );
- const QString absDirPath( dir.absPath() + '/' );
- foreach(QStringList::ConstIterator, templateIt, templateDirs) {
+ const TQStringList templateDirs( dir.entryList(TQDir::Dirs, TQDir::Name) );
+ const TQString absDirPath( dir.absPath() + '/' );
+ foreach(TQStringList::ConstIterator, templateIt, templateDirs) {
if ((*templateIt)=="." || (*templateIt==".."))
continue;
KexiTemplateInfo info = KexiTemplateLoader::loadInfo( absDirPath + *templateIt );
@@ -64,15 +64,15 @@ KexiTemplateInfo::List KexiTemplateLoader::loadListInfo()
}
//static
-KexiTemplateInfo KexiTemplateLoader::loadInfo(const QString& directory)
+KexiTemplateInfo KexiTemplateLoader::loadInfo(const TQString& directory)
{
- QDir dir(directory);
+ TQDir dir(directory);
if (!dir.isReadable()) {
kdWarning() << "KexiTemplateLoader::loadInfo() \""
<< directory << "\" not readable!" << endl;
return KexiTemplateInfo();
}
- if (!QFileInfo(directory+"/info.txt").isReadable())
+ if (!TQFileInfo(directory+"/info.txt").isReadable())
return KexiTemplateInfo();
KConfig infoTxt(directory+"/info.txt", true/*readonly*/, false/*local*/);
KexiTemplateInfo info;
@@ -81,22 +81,22 @@ KexiTemplateInfo KexiTemplateLoader::loadInfo(const QString& directory)
kdWarning() << "KexiTemplateLoader::loadInfo() \"" << (directory+"/info.txt") << "\" contains no \"name\" field" << endl;
return KexiTemplateInfo();
}
- const QStringList templateFiles( dir.entryList("*.kexi", QDir::Files|QDir::Readable, QDir::Name) );
+ const TQStringList templateFiles( dir.entryList("*.kexi", TQDir::Files|TQDir::Readable, TQDir::Name) );
if (templateFiles.isEmpty()) {
kdWarning() << "KexiTemplateLoader::loadInfo() no readable .kexi template file found in \"" << directory << "\"" << endl;
return KexiTemplateInfo();
}
info.filename = directory+"/"+templateFiles.first();
info.description = infoTxt.readEntry("Description");
- const QString iconFileName( infoTxt.readEntry("Icon") );
+ const TQString iconFileName( infoTxt.readEntry("Icon") );
if (!iconFileName.isEmpty())
- info.icon = QPixmap(directory+'/'+iconFileName);
+ info.icon = TQPixmap(directory+'/'+iconFileName);
if (info.icon.isNull())
info.icon = DesktopIcon("kexiproject_sqlite"); //default
- QStringList autoopenObjectsString = infoTxt.readListEntry("AutoOpenObjects");
- foreach( QStringList::ConstIterator, it, autoopenObjectsString) {
+ TQStringList autoopenObjectsString = infoTxt.readListEntry("AutoOpenObjects");
+ foreach( TQStringList::ConstIterator, it, autoopenObjectsString) {
KexiProjectData::ObjectInfo autoopenObject;
- QStringList autoopenObjectNameSplitted( QStringList::split(':', *it) );
+ TQStringList autoopenObjectNameSplitted( TQStringList::split(':', *it) );
if (autoopenObjectNameSplitted.count()>1) {
autoopenObject["type"] = autoopenObjectNameSplitted[0];
autoopenObject["name"] = autoopenObjectNameSplitted[1];
diff --git a/kexi/core/kexitemplateloader.h b/kexi/core/kexitemplateloader.h
index 131eda316..b05d692e5 100644
--- a/kexi/core/kexitemplateloader.h
+++ b/kexi/core/kexitemplateloader.h
@@ -20,17 +20,17 @@
#ifndef KEXI_TEMPLLOADER_H
#define KEXI_TEMPLLOADER_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "kexiprojectdata.h"
//! A structure providing information about single kexi database template file
struct KEXICORE_EXPORT KexiTemplateInfo
{
- typedef QValueList<KexiTemplateInfo> List;
+ typedef TQValueList<KexiTemplateInfo> List;
- QString filename, name, description;
- QPixmap icon;
- QValueList<KexiProjectData::ObjectInfo> autoopenObjects;
+ TQString filename, name, description;
+ TQPixmap icon;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjects;
};
//! Handles retrieving information about templates
@@ -38,7 +38,7 @@ class KEXICORE_EXPORT KexiTemplateLoader
{
public:
static KexiTemplateInfo::List loadListInfo();
- static KexiTemplateInfo loadInfo(const QString& directory);
+ static KexiTemplateInfo loadInfo(const TQString& directory);
};
#endif
diff --git a/kexi/core/kexitextmsghandler.cpp b/kexi/core/kexitextmsghandler.cpp
index a75c7eb31..b1b705c44 100644
--- a/kexi/core/kexitextmsghandler.cpp
+++ b/kexi/core/kexitextmsghandler.cpp
@@ -23,13 +23,13 @@
#include <kexidb/utils.h>
#include <kexiutils/utils.h>
-KexiTextMessageHandler::KexiTextMessageHandler(QString &messageTarget, QString &detailsTarget)
+KexiTextMessageHandler::KexiTextMessageHandler(TQString &messageTarget, TQString &detailsTarget)
: KexiGUIMessageHandler(0)
, m_messageTarget(&messageTarget)
, m_detailsTarget(&detailsTarget)
{
- *m_messageTarget = QString::null;
- *m_detailsTarget = QString::null;
+ *m_messageTarget = TQString();
+ *m_detailsTarget = TQString();
}
KexiTextMessageHandler::~KexiTextMessageHandler()
@@ -38,7 +38,7 @@ KexiTextMessageHandler::~KexiTextMessageHandler()
void
KexiTextMessageHandler::showMessage(MessageType type,
- const QString &title, const QString &details)
+ const TQString &title, const TQString &details)
{
Q_UNUSED(type);
if (!m_enableMessages)
@@ -47,7 +47,7 @@ KexiTextMessageHandler::showMessage(MessageType type,
//'wait' cursor is a nonsense now
KexiUtils::removeWaitCursor();
- QString msg(title);
+ TQString msg(title);
if (title.isEmpty())
msg = i18n("Unknown error");
msg = "<qt><p>"+msg+"</p>";
diff --git a/kexi/core/kexitextmsghandler.h b/kexi/core/kexitextmsghandler.h
index 74463cc76..9472c62f1 100644
--- a/kexi/core/kexitextmsghandler.h
+++ b/kexi/core/kexitextmsghandler.h
@@ -27,11 +27,11 @@
class KEXICORE_EXPORT KexiTextMessageHandler : public KexiGUIMessageHandler
{
public:
- KexiTextMessageHandler(QString &messageTarget, QString &detailsTarget);
+ KexiTextMessageHandler(TQString &messageTarget, TQString &detailsTarget);
virtual ~KexiTextMessageHandler();
- virtual void showMessage(MessageType type, const QString &title, const QString &details);
+ virtual void showMessage(MessageType type, const TQString &title, const TQString &details);
- QString *m_messageTarget, *m_detailsTarget;
+ TQString *m_messageTarget, *m_detailsTarget;
};
#endif
diff --git a/kexi/core/kexiuseraction.cpp b/kexi/core/kexiuseraction.cpp
index eb521de54..a45c5ae9d 100644
--- a/kexi/core/kexiuseraction.cpp
+++ b/kexi/core/kexiuseraction.cpp
@@ -11,12 +11,12 @@
#include "keximainwindow.h"
#include "kexiuseraction.h"
-KexiUserAction::KexiUserAction(KexiMainWindow *win, KActionCollection *parent, const QString &name, const QString &text, const QString &pixmap)
- : KAction(text, pixmap, KShortcut::null(), this, SLOT(execute()), parent, name.latin1())
+KexiUserAction::KexiUserAction(KexiMainWindow *win, KActionCollection *tqparent, const TQString &name, const TQString &text, const TQString &pixmap)
+ : KAction(text, pixmap, KShortcut::null(), this, TQT_SLOT(execute()), tqparent, name.latin1())
{
m_win = win;
m_method = 0;
- connect(this, SIGNAL(activated()), this, SLOT(execute()));
+ connect(this, TQT_SIGNAL(activated()), this, TQT_SLOT(execute()));
}
void
@@ -59,17 +59,17 @@ KexiUserAction::execute()
}
KexiUserAction *
-KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c)
+KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *tqparent, KexiDB::Cursor *c)
{
if(!c || c->bof() || c->eof())
return 0;
- KexiUserAction *a = new KexiUserAction(context, parent, c->value(1).toString(), c->value(2).toString(), c->value(3).toString());
- QString args = c->value(5).toString();
+ KexiUserAction *a = new KexiUserAction(context, tqparent, c->value(1).toString(), c->value(2).toString(), c->value(3).toString());
+ TQString args = c->value(5).toString();
bool quote = false;
Arguments arg;
- QString tmp;
+ TQString tmp;
const int len = args.length();
for(int i=0; i < len; i++)
{
@@ -82,7 +82,7 @@ KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *pa
if(tmp.left(1)=="\"" && tmp.right(1)=="\"")
tmp = tmp.mid(1, tmp.length()-2);
- arg.append(QVariant(tmp));
+ arg.append(TQVariant(tmp));
tmp = "";
}
else //else simply add char to tmp
@@ -94,7 +94,7 @@ KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *pa
if(tmp.left(1)=="\"" && tmp.right(1)=="\"")
tmp = tmp.mid(1, tmp.length()-2);
- arg.append(QVariant(tmp));
+ arg.append(TQVariant(tmp));
a->setMethod(c->value(4).toInt(), arg);
return a;
diff --git a/kexi/core/kexiuseraction.h b/kexi/core/kexiuseraction.h
index 822220f09..71ca18198 100644
--- a/kexi/core/kexiuseraction.h
+++ b/kexi/core/kexiuseraction.h
@@ -10,7 +10,7 @@ namespace KexiDB
class Cursor;
}
class KexiMainWindow;
-typedef QValueVector<QVariant> Arguments;
+typedef TQValueVector<TQVariant> Arguments;
/*! action that can be defined by a user for a special scope e.g. main, form ...
the actions can have some predefined \ref Methods which are described in \ref KexiUserActionMethod
@@ -19,6 +19,7 @@ typedef QValueVector<QVariant> Arguments;
class KEXICORE_EXPORT KexiUserAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! bytecode of available methods */
@@ -47,15 +48,15 @@ class KEXICORE_EXPORT KexiUserAction : public KAction
/*! constructs an action
\note methods are associated using setMethod()
*/
- KexiUserAction(KexiMainWindow *context, KActionCollection *parent, const QString &name, const QString &text, const QString &pixmap);
+ KexiUserAction(KexiMainWindow *context, KActionCollection *tqparent, const TQString &name, const TQString &text, const TQString &pixmap);
~KexiUserAction();
/*! sets execution information associated with this action this will mostly look like
\code
KexiUserAction *action = new KexiUserAction(...);
Arguments arg;
- arg.append(QVariant("kexi/form"));
- arg.append(QVariant("main"));
+ arg.append(TQVariant("kexi/form"));
+ arg.append(TQVariant("main"));
action->setMethod(KexiUserAction::OpenAction, arg);
\endcode
*/
@@ -63,7 +64,7 @@ class KEXICORE_EXPORT KexiUserAction : public KAction
/*! creates a KexiUserAction from current record in \a c
mostly needed for creation from kexi__useractions table */
- static KexiUserAction *fromCurrentRecord(KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c);
+ static KexiUserAction *fromCurrentRecord(KexiMainWindow *context, KActionCollection *tqparent, KexiDB::Cursor *c);
protected slots:
/*! actually executes the associated method
diff --git a/kexi/core/kexiuseractionmethod.cpp b/kexi/core/kexiuseractionmethod.cpp
index a2ec29145..41b35782d 100644
--- a/kexi/core/kexiuseractionmethod.cpp
+++ b/kexi/core/kexiuseractionmethod.cpp
@@ -10,7 +10,7 @@ KexiUserActionMethod::KexiUserActionMethod(int method, ArgTypes types, ArgNames
m_names = names;
}
-QString
+TQString
KexiUserActionMethod::methodName(int method)
{
switch(method)
@@ -26,7 +26,7 @@ KexiUserActionMethod::methodName(int method)
case KexiUserAction::ExitKexi:
return i18n("Exit Main Application");
default:
- return QString::null;
+ return TQString();
}
}
diff --git a/kexi/core/kexiuseractionmethod.h b/kexi/core/kexiuseractionmethod.h
index 5bfae22ce..e6a4facd4 100644
--- a/kexi/core/kexiuseractionmethod.h
+++ b/kexi/core/kexiuseractionmethod.h
@@ -1,12 +1,12 @@
#ifndef KEXIUSERACTIONMETHOD_H
#define KEXIUSERACTIONMETHOD_H
-#include <qvaluevector.h>
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqvaluevector.h>
+#include <tqstring.h>
+#include <tqvariant.h>
-typedef QValueVector<int> ArgTypes;
-typedef QValueVector<QString> ArgNames;
+typedef TQValueVector<int> ArgTypes;
+typedef TQValueVector<TQString> ArgNames;
/*! describes a UserActionCommand */
class KEXICORE_EXPORT KexiUserActionMethod
@@ -27,10 +27,10 @@ class KEXICORE_EXPORT KexiUserActionMethod
/*! \return i18n method name for \a method */
- static QString methodName(int method);
+ static TQString methodName(int method);
/*! \return an i18n string for \a type */
- static QString typeName(int type);
+ static TQString typeName(int type);
private:
int m_method;
diff --git a/kexi/core/kexiviewbase.cpp b/kexi/core/kexiviewbase.cpp
index 1696f5025..d31a15fa6 100644
--- a/kexi/core/kexiviewbase.cpp
+++ b/kexi/core/kexiviewbase.cpp
@@ -30,9 +30,9 @@
#include <kdebug.h>
-KexiViewBase::KexiViewBase(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : QWidget(parent, name)
- , KexiActionProxy(this, mainWin)
+KexiViewBase::KexiViewBase(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
+ , KexiActionProxy(TQT_TQOBJECT(this), mainWin)
, m_mainWin(mainWin)
, m_viewWidget(0)
, m_parentView(0)
@@ -40,8 +40,8 @@ KexiViewBase::KexiViewBase(KexiMainWindow *mainWin, QWidget *parent, const char
, m_viewMode(0) //unknown!
, m_dirty(false)
{
- QWidget *wi=this;
- while ((wi = wi->parentWidget()) && !wi->inherits("KexiDialogBase"))
+ TQWidget *wi=this;
+ while ((wi = wi->tqparentWidget()) && !wi->inherits("KexiDialogBase"))
;
m_dialog = (wi && wi->inherits("KexiDialogBase")) ? static_cast<KexiDialogBase*>(wi) : 0;
if (m_dialog) {
@@ -72,12 +72,12 @@ tristate KexiViewBase::afterSwitchFrom(int /* mode */)
return true;
}
-QSize KexiViewBase::preferredSizeHint(const QSize& otherSize)
+TQSize KexiViewBase::preferredSizeHint(const TQSize& otherSize)
{
- KexiDialogBase* dlg = parentDialog();
+ KexiDialogBase* dlg = tqparentDialog();
if (dlg && dlg->mdiParent()) {
- QRect r = dlg->mdiParent()->mdiAreaContentsRect();
- return otherSize.boundedTo( QSize(
+ TQRect r = dlg->mdiParent()->mdiAreaContentsRect();
+ return otherSize.boundedTo( TQSize(
r.width() - 10,
r.height() - dlg->mdiParent()->captionHeight() - dlg->pos().y() - 10
) );
@@ -85,7 +85,7 @@ QSize KexiViewBase::preferredSizeHint(const QSize& otherSize)
return otherSize;
}
-void KexiViewBase::closeEvent( QCloseEvent * e )
+void KexiViewBase::closeEvent( TQCloseEvent * e )
{
bool cancel = false;
emit closing(cancel);
@@ -93,7 +93,7 @@ void KexiViewBase::closeEvent( QCloseEvent * e )
e->ignore();
return;
}
- QWidget::closeEvent(e);
+ TQWidget::closeEvent(e);
}
KoProperty::Set *KexiViewBase::propertySet()
@@ -103,14 +103,14 @@ KoProperty::Set *KexiViewBase::propertySet()
void KexiViewBase::propertySetSwitched()
{
- if (parentDialog())
- m_mainWin->propertySetSwitched( parentDialog(), false );
+ if (tqparentDialog())
+ m_mainWin->propertySetSwitched( tqparentDialog(), false );
}
-void KexiViewBase::propertySetReloaded(bool preservePrevSelection, const QCString& propertyToSelect)
+void KexiViewBase::propertySetReloaded(bool preservePrevSelection, const TQCString& propertyToSelect)
{
- if (parentDialog())
- m_mainWin->propertySetSwitched( parentDialog(), true, preservePrevSelection, propertyToSelect );
+ if (tqparentDialog())
+ m_mainWin->propertySetSwitched( tqparentDialog(), true, preservePrevSelection, propertyToSelect );
}
void KexiViewBase::setDirty(bool set)
@@ -175,19 +175,19 @@ tristate KexiViewBase::storeData(bool dontAsk)
return true;
}
-bool KexiViewBase::loadDataBlock( QString &dataString, const QString& dataID, bool canBeEmpty )
+bool KexiViewBase::loadDataBlock( TQString &dataString, const TQString& dataID, bool canBeEmpty )
{
if (!m_dialog)
return false;
const tristate res = m_mainWin->project()->dbConnection()->loadDataBlock(m_dialog->id(), dataString, dataID);
if (canBeEmpty && ~res) {
- dataString = QString::null;
+ dataString = TQString();
return true;
}
return res == true;
}
-bool KexiViewBase::storeDataBlock( const QString &dataString, const QString &dataID )
+bool KexiViewBase::storeDataBlock( const TQString &dataString, const TQString &dataID )
{
if (!m_dialog)
return false;
@@ -203,50 +203,50 @@ bool KexiViewBase::storeDataBlock( const QString &dataString, const QString &dat
&& m_mainWin->project()->dbConnection()->storeDataBlock(effectiveID, dataString, dataID);
}
-bool KexiViewBase::removeDataBlock( const QString& dataID )
+bool KexiViewBase::removeDataBlock( const TQString& dataID )
{
if (!m_dialog)
return false;
return m_mainWin->project()->dbConnection()->removeDataBlock(m_dialog->id(), dataID);
}
-bool KexiViewBase::eventFilter( QObject *o, QEvent *e )
+bool KexiViewBase::eventFilter( TQObject *o, TQEvent *e )
{
- if (e->type()==QEvent::FocusIn || e->type()==QEvent::FocusOut) {// && o->inherits("QWidget")) {
+ 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<QWidget*>(o), focusWidget());
+// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), tqfocusWidget());
// kexidbg << "KexiViewBase::eventFilter(): " << o->name() << " " << e->type() << endl;
- if (KexiUtils::hasParent( this, static_cast<QWidget*>(o))) {
- if (e->type()==QEvent::FocusOut && focusWidget() && !KexiUtils::hasParent( this, focusWidget())) {
- //focus out: when currently focused widget is not a parent of this view
+ if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(o))) {
+ if (e->type()==TQEvent::FocusOut && tqfocusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) {
+ //focus out: when currently focused widget is not a tqparent of this view
emit focus(false);
- } else if (e->type()==QEvent::FocusIn) {
+ } else if (e->type()==TQEvent::FocusIn) {
emit focus(true);
}
- if (e->type()==QEvent::FocusOut) { // && focusWidget() && Kexi::hasParent( this, focusWidget())) { // && focusWidget()->inherits("KexiViewBase")) {
-// kdDebug() << focusWidget()->className() << " " << focusWidget()->name()<< endl;
+ if (e->type()==TQEvent::FocusOut) { // && tqfocusWidget() && Kexi::hasParent( this, tqfocusWidget())) { // && tqfocusWidget()->inherits("KexiViewBase")) {
+// kdDebug() << tqfocusWidget()->className() << " " << tqfocusWidget()->name()<< endl;
// kdDebug() << o->className() << " " << o->name()<< endl;
KexiViewBase *v = KexiUtils::findParent<KexiViewBase>(o, "KexiViewBase") ;
-// QWidget *www=v->focusWidget();
+// TQWidget *www=v->tqfocusWidget();
if (v) {
while (v->m_parentView)
v = v->m_parentView;
- if (KexiUtils::hasParent( this, static_cast<QWidget*>(v->focusWidget()) ))
- v->m_lastFocusedChildBeforeFocusOut = static_cast<QWidget*>(v->focusWidget());
-// v->m_lastFocusedChildBeforeFocusOut = static_cast<QWidget*>(o); //focusWidget();
+ 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 (e->type()==QEvent::FocusIn && m_actionProxyParent) {
+ if (e->type()==TQEvent::FocusIn && m_actionProxyParent) {
m_actionProxyParent->m_focusedChild = this;
}
-// m_mainWin->invalidateSharedActions(this);
+// m_mainWin->tqinvalidateSharedActions(this);
}
}
return false;
}
-void KexiViewBase::setViewWidget(QWidget* w, bool focusProxy)
+void KexiViewBase::setViewWidget(TQWidget* w, bool focusProxy)
{
if (m_viewWidget == w)
return;
@@ -263,7 +263,7 @@ void KexiViewBase::setViewWidget(QWidget* w, bool focusProxy)
void KexiViewBase::addChildView( KexiViewBase* childView )
{
- m_children.append( childView );
+ m_tqchildren.append( childView );
addActionProxyChild( childView );
childView->m_parentView = this;
// if (m_parentView)
@@ -276,7 +276,7 @@ void KexiViewBase::setFocus()
{
if (!m_lastFocusedChildBeforeFocusOut.isNull()) {
// kdDebug() << "FOCUS: " << m_lastFocusedChildBeforeFocusOut->className() << " " << m_lastFocusedChildBeforeFocusOut->name()<< endl;
- QWidget *w = m_lastFocusedChildBeforeFocusOut;
+ TQWidget *w = m_lastFocusedChildBeforeFocusOut;
m_lastFocusedChildBeforeFocusOut = 0;
w->setFocus();
}
@@ -286,7 +286,7 @@ void KexiViewBase::setFocus()
else
setFocusInternal();
}
- m_mainWin->invalidateSharedActions(this);
+ m_mainWin->tqinvalidateSharedActions(TQT_TQOBJECT(this));
}
KAction* KexiViewBase::sharedAction( const char *action_name )
@@ -318,8 +318,8 @@ void KexiViewBase::setAvailable(const char* action_name, bool set)
void KexiViewBase::updateActions(bool activated)
{
//do nothing here
- //do the same for children :)
- for (QPtrListIterator<KexiViewBase> it(m_children); it.current(); ++it) {
+ //do the same for tqchildren :)
+ for (TQPtrListIterator<KexiViewBase> it(m_tqchildren); it.current(); ++it) {
it.current()->updateActions(activated);
}
}
diff --git a/kexi/core/kexiviewbase.h b/kexi/core/kexiviewbase.h
index 18cd056d0..24f5d8adc 100644
--- a/kexi/core/kexiviewbase.h
+++ b/kexi/core/kexiviewbase.h
@@ -20,7 +20,7 @@
#ifndef KEXIVIEWBASE_H
#define KEXIVIEWBASE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kexiactionproxy.h"
@@ -40,7 +40,7 @@ namespace KexiDB {
KexiViewBase has 'dirty' flag to indicate that view's data has changed.
This flag's state is reused by KexiDialogBase object that contain the view.
KexiViewBase objects can be also nested, using addChildView(): any actions and 'dirty' flag
- are transmited to parent view in this case.
+ are transmited to tqparent view in this case.
KexiViewBase objects are usually allocated within KexiDialogBase objects by implementing
KexiPart::createView() method. See query or table part code for examples.
@@ -49,33 +49,34 @@ namespace KexiDB {
especially withinn dock window. see KexiMainWindowImpl::initNavigator() to see example
how KexiBrowser does this.
*/
-class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
+class KEXICORE_EXPORT KexiViewBase : public TQWidget, public KexiActionProxy
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiViewBase(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiViewBase(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
virtual ~KexiViewBase();
//! \return kexi main window that contain this view
inline KexiMainWindow *mainWin() const { return m_mainWin; }
- //! \return parent KexiDialogBase that contains this view, or 0 if no dialog contain this view
- KexiDialogBase* parentDialog() const { return m_dialog; }
+ //! \return tqparent KexiDialogBase that contains this view, or 0 if no dialog contain this view
+ KexiDialogBase* tqparentDialog() const { return m_dialog; }
/*! Added for convenience.
\return KexiPart object that was used to create this view (with a dialog)
- or 0 if this view is not created using KexiPart. \sa parentDialog() */
+ or 0 if this view is not created using KexiPart. \sa tqparentDialog() */
KexiPart::Part* part() const;
/*! \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::sizeHint().
+ so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::tqsizeHint().
If you reimplement this method, do not forget to return value of
yoursize.boundedTo( KexiViewBase::preferredSizeHint(otherSize) ). */
- virtual QSize preferredSizeHint(const QSize& otherSize);
+ virtual TQSize preferredSizeHint(const TQSize& otherSize);
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
void addChildView( KexiViewBase* childView );
@@ -111,9 +112,9 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
virtual void propertySetSwitched();
/*! Sets dirty flag on or off. It the flag changes,
- dirty(bool) signal is emitted by parent dialog (KexiDialog),
- to inform the world about that. If this view has a parent view, setDirty()
- is called also on parent view.
+ dirty(bool) signal is emitted by tqparent dialog (KexiDialog),
+ to inform the world about that. If this view has a tqparent view, setDirty()
+ is called also on tqparent view.
Always use this function to update 'dirty' flag information. */
void setDirty(bool set);
@@ -145,7 +146,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
(probably after showing some info messages), you need to return cancelled. */
virtual tristate afterSwitchFrom(int mode);
- virtual void closeEvent( QCloseEvent * e );
+ virtual void closeEvent( TQCloseEvent * e );
/*! \return a property set for this view. For reimplementation. By default returns NULL. */
virtual KoProperty::Set *propertySet();
@@ -156,7 +157,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
If \a preservePrevSelection is true and there was a property set
assigned before call, previously selected item will be preselected
in the editor (if found). */
- void propertySetReloaded(bool preservePrevSelection = false, const QCString& propertyToSelect = QCString());
+ void propertySetReloaded(bool preservePrevSelection = false, const TQCString& propertyToSelect = TQCString());
/*! Tells this dialog to create and store data of the new object
pointed by \a sdata on the backend.
@@ -185,7 +186,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
and \a dataString is set to null string. The default is false.
\return true on success
\sa storeDataBlock(). */
- bool loadDataBlock( QString &dataString, const QString& dataID = QString::null, bool canBeEmpty = false );
+ bool loadDataBlock( TQString &dataString, const TQString& dataID = TQString(), bool canBeEmpty = false );
/*! Tells this view to store data changes on the backend.
Called by KexiDialogBase::storeData().
@@ -211,16 +212,16 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
If there is already such record in the table, it's simply overwritten.
\return true on success
*/
- bool storeDataBlock( const QString &dataString, const QString &dataID = QString::null );
+ bool storeDataBlock( const TQString &dataString, const TQString &dataID = TQString() );
/*! Removes (potentially large) string data (e.g. xml form's representation),
pointed by optional \a dataID, from the database backend.
\return true on success. Does not fail if the block doe not exists.
Note that if \a dataID is not specified, all data blocks for this view will be removed.
\sa storeDataBlock(). */
- bool removeDataBlock( const QString& dataID = QString::null);
+ bool removeDataBlock( const TQString& dataID = TQString());
- void setViewWidget(QWidget* w, bool focusProxy = false);
+ void setViewWidget(TQWidget* w, bool focusProxy = false);
/*! Updates actions (e.g. availability). Reimplement it, if needed (you must
call superclass impelmentation at the end!).
@@ -230,31 +231,31 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
or deactivation. */
virtual void updateActions(bool activated);
- virtual void setFocusInternal() { QWidget::setFocus(); }
+ virtual void setFocusInternal() { TQWidget::setFocus(); }
- /*! Allows to react on parent dialog's detaching (only for KMDI's ChildFrame mode)
+ /*! Allows to react on tqparent dialog's detaching (only for KMDI's ChildFrame mode)
- it is called by KexiDialogBase::youAreDetached().
Default implementation does nothing.
Implement it if you want to perform some appropriate actions. */
- virtual void parentDialogDetached() {};
+ virtual void tqparentDialogDetached() {};
- /*! Allows to react on parent dialog's attaching (only for KMDI's ChildFrame mode)
+ /*! Allows to react on tqparent dialog's attaching (only for KMDI's ChildFrame mode)
- it is called by KexiDialogBase::youAreAttached().
Default implementation does nothing.
Implement it if you want to perform some appropriate actions. */
- virtual void parentDialogAttached() {};
+ virtual void tqparentDialogAttached() {};
- QString m_defaultIconName;
+ TQString m_defaultIconName;
KexiMainWindow *m_mainWin;
KexiDialogBase *m_dialog;
- QWidget *m_viewWidget;
+ TQWidget *m_viewWidget;
KexiViewBase *m_parentView;
- QGuardedPtr<QWidget> m_lastFocusedChildBeforeFocusOut;
+ TQGuardedPtr<TQWidget> m_lastFocusedChildBeforeFocusOut;
private:
/*! Member set to newly assigned object's ID in storeNewData()
@@ -269,7 +270,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
Can be useful when single class is used for more than one view (e.g. KexiDBForm). */
int m_viewMode;
- QPtrList<KexiViewBase> m_children;
+ TQPtrList<KexiViewBase> m_tqchildren;
bool m_dirty : 1;