diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/core/kexipart.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/core/kexipart.cpp')
-rw-r--r-- | kexi/core/kexipart.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp index 3f97e9c3..d95bd069 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); } |