summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/forms/kexiformmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/forms/kexiformmanager.cpp')
-rw-r--r--kexi/plugins/forms/kexiformmanager.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/kexi/plugins/forms/kexiformmanager.cpp b/kexi/plugins/forms/kexiformmanager.cpp
index 6134cfc8..9f288418 100644
--- a/kexi/plugins/forms/kexiformmanager.cpp
+++ b/kexi/plugins/forms/kexiformmanager.cpp
@@ -35,13 +35,13 @@
#include <koproperty/property.h>
#include <widget/kexicustompropertyfactory.h>
-KexiFormManager::KexiFormManager(KexiPart::Part *parent, const char* name)
- : KFormDesigner::FormManager(parent,
+KexiFormManager::KexiFormManager(KexiPart::Part *tqparent, const char* name)
+ : KFormDesigner::FormManager(tqparent,
KFormDesigner::FormManager::HideEventsInPopupMenu |
KFormDesigner::FormManager::SkipFileActions |
KFormDesigner::FormManager::HideSignalSlotConnections
, name)
- , m_part(parent)
+ , m_part(tqparent)
{
m_emitSelectionSignalsUpdatesPropertySet = true;
KexiCustomPropertyFactory::init();
@@ -56,8 +56,8 @@ KAction* KexiFormManager::action( const char* name )
KActionCollection *col = m_part->actionCollectionForMode(Kexi::DesignViewMode);
if (!col)
return 0;
- QCString n( translateName( name ).latin1() );
- KAction *a = col->action(n);
+ TQCString n( translateName( name ).latin1() );
+ KAction *a = col->action(n.data());
if (a)
return a;
KexiDBForm *dbform;
@@ -67,10 +67,10 @@ KAction* KexiFormManager::action( const char* name )
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return 0;
- KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
if (!formViewWidget)
return 0;
- return formViewWidget->parentDialog()->mainWin()->actionCollection()->action(n);
+ return formViewWidget->tqparentDialog()->mainWin()->actionCollection()->action(n.data());
}
KexiFormView* KexiFormManager::activeFormViewWidget() const
@@ -82,7 +82,7 @@ KexiFormView* KexiFormManager::activeFormViewWidget() const
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return 0;
- return dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ return dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
}
void KexiFormManager::enableAction( const char* name, bool enable )
@@ -90,12 +90,12 @@ void KexiFormManager::enableAction( const char* name, bool enable )
KexiFormView* formViewWidget = activeFormViewWidget();
if (!formViewWidget)
return;
-// if (QString(name)=="layout_menu")
+// if (TQString(name)=="tqlayout_menu")
// kdDebug() << "!!!!!!!!!!! " << enable << endl;
formViewWidget->setAvailable(translateName( name ).latin1(), enable);
}
-void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& name)
+void KexiFormManager::setFormDataSource(const TQCString& mime, const TQCString& name)
{
if (!activeForm())
return;
@@ -105,14 +105,14 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
// setPropertyValueInDesignMode(formWidget, "dataSource", name);
- QCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
- QCString oldDataSource( formWidget->dataSource().latin1() );
+ TQCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
+ TQCString oldDataSource( formWidget->dataSource().latin1() );
if (mime!=oldDataSourceMimeType || name!=oldDataSource) {
- QMap<QCString, QVariant> propValues;
+ TQMap<TQCString, TQVariant> propValues;
propValues.insert("dataSource", name);
propValues.insert("dataSourceMimeType", mime);
KFormDesigner::CommandGroup *group
- = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").arg(name), propertySet());
+ = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").tqarg(name.data()), propertySet());
propertySet()->createPropertyCommandsInDesignMode(formWidget, propValues, group, true /*addToActiveForm*/);
}
@@ -120,17 +120,17 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
if (activeForm()->selectedWidget() == formWidget) {
//active form is selected: just use properties system
KFormDesigner::WidgetPropertySet *set = propertySet();
- if (!set || !set->contains("dataSource"))
+ if (!set || !set->tqcontains("dataSource"))
return;
(*set)["dataSource"].setValue(name);
- if (set->contains("dataSourceMimeType"))
+ if (set->tqcontains("dataSourceMimeType"))
(*set)["dataSourceMimeType"].setValue(mime);
return;
}
//active form isn't selected: change it's data source and mime type by hand
- QCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
- QCString oldDataSource( formWidget->dataSource().latin1() );
+ TQCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
+ TQCString oldDataSource( formWidget->dataSource().latin1() );
if (mime!=oldDataSourceMimeType || name!=oldDataSource) {
formWidget->setDataSourceMimeType(mime);
@@ -138,7 +138,7 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
emit dirty(activeForm(), true);
activeForm()->addCommand(
- new KFormDesigner::PropertyCommand(propertySet(), QString(formWidget->name()),
+ new KFormDesigner::PropertyCommand(propertySet(), TQString(formWidget->name()),
oldDataSource, name, "dataSource"),
false );
@@ -149,7 +149,7 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
}*/
}
-void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, const QString& caption,
+void KexiFormManager::setDataSourceFieldOrExpression(const TQString& string, const TQString& caption,
KexiDB::Field::Type type)
{
if (!activeForm())
@@ -159,23 +159,23 @@ void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, cons
// return;
KFormDesigner::WidgetPropertySet *set = propertySet();
- if (!set || !set->contains("dataSource"))
+ if (!set || !set->tqcontains("dataSource"))
return;
(*set)["dataSource"].setValue(string);
- if (set->contains("autoCaption") && (*set)["autoCaption"].value().toBool()) {
- if (set->contains("fieldCaptionInternal"))
+ if (set->tqcontains("autoCaption") && (*set)["autoCaption"].value().toBool()) {
+ if (set->tqcontains("fieldCaptionInternal"))
(*set)["fieldCaptionInternal"].setValue(caption);
}
if (//type!=KexiDB::Field::InvalidType &&
- set->contains("widgetType") && (*set)["widgetType"].value().toString()=="Auto")
+ set->tqcontains("widgetType") && (*set)["widgetType"].value().toString()=="Auto")
{
- if (set->contains("fieldTypeInternal"))
+ if (set->tqcontains("fieldTypeInternal"))
(*set)["fieldTypeInternal"].setValue(type);
}
-/* QString oldDataSource( dataWidget->dataSource() );
+/* TQString oldDataSource( dataWidget->dataSource() );
if (string!=oldDataSource) {
dataWidget->setDataSource(string);
emit dirty(activeForm(), true);
@@ -184,8 +184,8 @@ void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, cons
}*/
}
-void KexiFormManager::insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields)
+void KexiFormManager::insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields)
{
KexiFormView* formViewWidget = activeFormViewWidget();
if (!formViewWidget || !formViewWidget->form() || !formViewWidget->form()->activeContainer())
@@ -202,13 +202,13 @@ void KexiFormManager::slotHistoryCommandExecuted()
KexiDBForm* formWidget = dynamic_cast<KexiDBForm*>(activeForm()->widget());
if (!formWidget)
return;
- QPtrListIterator<KCommand> it(group->commands());
+ TQPtrListIterator<KCommand> it(group->commands());
const KFormDesigner::PropertyCommand* pc1 = dynamic_cast<const KFormDesigner::PropertyCommand*>(it.current());
++it;
const KFormDesigner::PropertyCommand* pc2 = dynamic_cast<const KFormDesigner::PropertyCommand*>(it.current());
if (pc1 && pc2 && pc1->property()=="dataSource" && pc2->property()=="dataSourceMimeType") {
- const QMap<QCString, QVariant>::const_iterator it1( pc1->oldValues().constBegin() );
- const QMap<QCString, QVariant>::const_iterator it2( pc2->oldValues().constBegin() );
+ const TQMap<TQCString, TQVariant>::const_iterator it1( pc1->oldValues().constBegin() );
+ const TQMap<TQCString, TQVariant>::const_iterator it2( pc2->oldValues().constBegin() );
if (it1.key()==formWidget->name() && it2.key()==formWidget->name())
static_cast<KexiFormPart*>(m_part)->dataSourcePage()->setDataSource(
formWidget->dataSourceMimeType(), formWidget->dataSource().latin1());
@@ -218,15 +218,15 @@ void KexiFormManager::slotHistoryCommandExecuted()
}
/*
-bool KexiFormManager::loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf)
+bool KexiFormManager::loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf)
{
- QMap<QCString,QString> customProperties;
+ TQMap<TQCString,TQString> customProperties;
FormIO::loadFormFromDom(myform, container, domDoc, &customProperties);
}
-bool KexiFormManager::saveFormToStringInternal(Form *form, QString &dest, int indent)
+bool KexiFormManager::saveFormToStringInternal(Form *form, TQString &dest, int indent)
{
- QMap<QCString,QString> customProperties;
+ TQMap<TQCString,TQString> customProperties;
return KFormDesigner::FormIO::saveFormToString(form, dest, indent, &customProperties);
}