summaryrefslogtreecommitdiffstats
path: root/kexi/core/kexi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/core/kexi.cpp')
-rw-r--r--kexi/core/kexi.cpp118
1 files changed, 59 insertions, 59 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");