diff options
Diffstat (limited to 'kexi/plugins/macros/kexipart/keximacroproperty.cpp')
-rw-r--r-- | kexi/plugins/macros/kexipart/keximacroproperty.cpp | 242 |
1 files changed, 121 insertions, 121 deletions
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp index 2fdafd28..578ba69b 100644 --- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp +++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp @@ -17,10 +17,10 @@ #include "keximacroproperty.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qlistbox.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlistbox.h> +#include <tqpainter.h> #include <kcombobox.h> #include <kpushbutton.h> @@ -50,11 +50,11 @@ class KexiMacroProperty::Private KSharedPtr<KoMacro::MacroItem> macroitem; /** The name the variable @a KoMacro::Variable is known as in the @a KoMacro::MacroItem defined above. */ - QString name; + TQString name; }; -KexiMacroProperty::KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name) - : KoProperty::CustomProperty(parent) +KexiMacroProperty::KexiMacroProperty(KoProperty::Property* tqparent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) + : KoProperty::CustomProperty(tqparent) , d( new Private() ) { d->macroitem = macroitem; @@ -86,7 +86,7 @@ void KexiMacroProperty::init() } //TESTCASE!!!!!!!!!!!!!!!!!!!!!! - //if(! variable->isEnabled()) qFatal( QString("############## VARIABLE=%1").arg(variable->name()).latin1() ); + //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() ); Q_ASSERT(! d->name.isNull()); m_property->setName( d->name.latin1() ); @@ -96,12 +96,12 @@ void KexiMacroProperty::init() m_property->setType( KEXIMACRO_PROPERTYEDITORTYPE ); // use our own propertytype } -KoProperty::Property* KexiMacroProperty::parentProperty() const +KoProperty::Property* KexiMacroProperty::tqparentProperty() const { return m_property; } -void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue) +void KexiMacroProperty::setValue(const TQVariant &value, bool rememberOldValue) { Q_UNUSED(rememberOldValue); kdDebug()<<"KexiMacroProperty::setValue name="<<d->name<<" value="<<value<<" rememberOldValue="<<rememberOldValue<<endl; @@ -119,11 +119,11 @@ void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue) emit valueChanged(); } -QVariant KexiMacroProperty::value() const +TQVariant KexiMacroProperty::value() const { KSharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true); Q_ASSERT( variable.data() != 0 ); - return variable.data() ? variable->variant() : QVariant(); + return variable.data() ? variable->variant() : TQVariant(); } bool KexiMacroProperty::handleValue() const @@ -136,7 +136,7 @@ KSharedPtr<KoMacro::MacroItem> KexiMacroProperty::macroItem() const return d->macroitem; } -QString KexiMacroProperty::name() const +TQString KexiMacroProperty::name() const { return d->name; } @@ -146,7 +146,7 @@ KSharedPtr<KoMacro::Variable> KexiMacroProperty::variable() const return d->macroitem->variable(d->name, true/*checkaction*/); } -KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name) +KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name) { KoProperty::Property* property = new KoProperty::Property(); KexiMacroProperty* customproperty = new KexiMacroProperty(property, macroitem, name); @@ -164,8 +164,8 @@ KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::Macr * KexiMacroPropertyFactory */ -KexiMacroPropertyFactory::KexiMacroPropertyFactory(QObject* parent) - : KoProperty::CustomPropertyFactory(parent) +KexiMacroPropertyFactory::KexiMacroPropertyFactory(TQObject* tqparent) + : KoProperty::CustomPropertyFactory(tqparent) { } @@ -173,23 +173,23 @@ KexiMacroPropertyFactory::~KexiMacroPropertyFactory() { } -KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* parent) +KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* tqparent) { - kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty parent="<<parent->name()<<endl; + kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty tqparent="<<tqparent->name()<<endl; - KoProperty::CustomProperty* customproperty = parent->customProperty(); - KexiMacroProperty* parentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty); - if(! parentcustomproperty) { - kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() parent=" << parent->name() << " has an invalid customproperty." << endl; + KoProperty::CustomProperty* customproperty = tqparent->customProperty(); + KexiMacroProperty* tqparentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty); + if(! tqparentcustomproperty) { + kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() tqparent=" << tqparent->name() << " has an invalid customproperty." << endl; return 0; } - KSharedPtr<KoMacro::MacroItem> macroitem = parentcustomproperty->macroItem(); + KSharedPtr<KoMacro::MacroItem> macroitem = tqparentcustomproperty->macroItem(); Q_ASSERT( macroitem.data() != 0 ); - const QString name = parentcustomproperty->name(); + const TQString name = tqparentcustomproperty->name(); Q_ASSERT(! name.isEmpty()); - KexiMacroProperty* macroproperty = new KexiMacroProperty(parent, macroitem, name); + KexiMacroProperty* macroproperty = new KexiMacroProperty(tqparent, macroitem, name); if(! macroproperty->variable().data()) { delete macroproperty; macroproperty = 0; return 0; @@ -218,26 +218,26 @@ void KexiMacroPropertyFactory::initFactory() */ /** -* @internal implementation of a QListBoxItem to display the items of the +* @internal implementation of a TQListBoxItem to display the items of the * combobox used within @a KexiMacroPropertyWidget to handle variables * within a @a ListBox instance. */ -class ListBoxItem : public QListBoxText +class ListBoxItem : public TQListBoxText { public: - ListBoxItem(QListBox* listbox) - : QListBoxText(listbox), m_enabled(true) {} - ListBoxItem(QListBox* listbox, const QString& text, QListBoxItem* after) - : QListBoxText(listbox, text, after), m_enabled(true) {} + ListBoxItem(TQListBox* listbox) + : TQListBoxText(listbox), m_enabled(true) {} + ListBoxItem(TQListBox* listbox, const TQString& text, TQListBoxItem* after) + : TQListBoxText(listbox, text, after), m_enabled(true) {} virtual ~ListBoxItem() {} void setEnabled(bool enabled) { m_enabled = enabled; } - virtual int width(const QListBox* lb) const { - Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) ); - return static_cast<KComboBox*>( lb->parent() )->lineEdit()->width() + 2; + virtual int width(const TQListBox* lb) const { + Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) ); + return static_cast<KComboBox*>( lb->tqparent() )->lineEdit()->width() + 2; } - virtual int height(const QListBox* lb) const { - Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) ); - return m_enabled ? static_cast<KComboBox*>( lb->parent() )->height() + 2 : 0; + virtual int height(const TQListBox* lb) const { + Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) ); + return m_enabled ? static_cast<KComboBox*>( lb->tqparent() )->height() + 2 : 0; } private: bool m_enabled; @@ -245,13 +245,13 @@ class ListBoxItem : public QListBoxText /** * @internal implementation of a @a ListBoxItem to provide an editable -* @a KoProperty::Widget as QListBoxItem in a @a ListBox instance. +* @a KoProperty::Widget as TQListBoxItem in a @a ListBox instance. */ class EditListBoxItem : public ListBoxItem { public: - EditListBoxItem(QListBox* listbox, KexiMacroProperty* macroproperty) + EditListBoxItem(TQListBox* listbox, KexiMacroProperty* macroproperty) : ListBoxItem(listbox) , m_macroproperty(macroproperty) , m_prop(0) @@ -265,11 +265,11 @@ class EditListBoxItem : public ListBoxItem delete m_prop; } - virtual QString text() const { + virtual TQString text() const { KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable(); Q_ASSERT( variable.data() ); //kdDebug()<<"EditListBoxItem::text() text="<<variable->toString()<<endl; - Q_ASSERT( variable->toString() != QString::null ); + Q_ASSERT( variable->toString() != TQString() ); return variable->toString(); } @@ -279,13 +279,13 @@ class EditListBoxItem : public ListBoxItem KSharedPtr<KoMacro::Action> action() const { return m_macroproperty->macroItem()->action(); } protected: - virtual void paint(QPainter* p) { + virtual void paint(TQPainter* p) { if(! m_widget) return; - Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->parent() ) ); + Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->tqparent() ) ); const int w = width(listBox()); const int h = height(listBox()); m_widget->setFixedSize(w - 2, h - 2); - p->drawPixmap(0, 0, QPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1); + p->drawPixmap(0, 0, TQPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1); } private: @@ -297,22 +297,22 @@ class EditListBoxItem : public ListBoxItem kdWarning() << "EditListBoxItem::EditListBoxItem() Skipped cause there exists no action for macroproperty=" << m_macroproperty->name() << endl; return; } - KoProperty::Property* parentproperty = m_macroproperty->parentProperty(); - if(! parentproperty) { - kdWarning() << "EditListBoxItem::EditListBoxItem() No parentproperty defined" << endl; + KoProperty::Property* tqparentproperty = m_macroproperty->tqparentProperty(); + if(! tqparentproperty) { + kdWarning() << "EditListBoxItem::EditListBoxItem() No tqparentproperty defined" << endl; return; } KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable(); if(! variable.data()) { - kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << parentproperty->name() << endl; + kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << tqparentproperty->name() << endl; return; } - QVariant variant = variable->variant(); + TQVariant variant = variable->variant(); KSharedPtr<KoMacro::Variable> actionvariable = action->variable(m_macroproperty->name()); if(actionvariable.data()) { - QVariant actionvariant = actionvariable->variant(); + TQVariant actionvariant = actionvariable->variant(); Q_ASSERT( ! actionvariant.isNull() ); Q_ASSERT( variant.canCast(actionvariant.type()) ); variant.cast( actionvariant.type() ); //preserve type. @@ -320,38 +320,38 @@ class EditListBoxItem : public ListBoxItem int type = KoProperty::Auto; switch(variant.type()) { - case QVariant::UInt: - case QVariant::Int: { + case TQVariant::UInt: + case TQVariant::Int: { type = KoProperty::Integer; } break; - case QVariant::CString: - case QVariant::String: { + case TQVariant::CString: + case TQVariant::String: { type = KoProperty::String; } break; default: { - kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << QVariant::typeToName(variant.type()) << endl; + kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << TQVariant::typeToName(variant.type()) << endl; } break; } - QString name = variable->name(); + TQString name = variable->name(); Q_ASSERT(! name.isNull()); //if(name.isNull()) name = "aaaaaaaaaaaaaaaaa";//TESTCASE m_prop = new KoProperty::Property( name.latin1(), // name variant, // value variable->text(), // caption - QString::null, // description + TQString(), // description type, // type - 0 //parentproperty // parent + 0 //tqparentproperty // tqparent ); m_widget = KoProperty::FactoryManager::self()->createWidgetForProperty(m_prop); Q_ASSERT( m_widget != 0 ); - //m_widget->reparent(listBox()->viewport(), 0, QPoint(0,0)); - m_widget->reparent(listBox(), 0, QPoint(1,1)); - //layout->addWidget(m_widget, 1); + //m_widget->reparent(listBox()->viewport(), 0, TQPoint(0,0)); + m_widget->reparent(listBox(), 0, TQPoint(1,1)); + //tqlayout->addWidget(m_widget, 1); m_widget->setMinimumHeight(5); - m_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_widget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } private: @@ -361,14 +361,14 @@ class EditListBoxItem : public ListBoxItem }; /** -* @internal implementation of a @a QListBox for the combobox used within +* @internal implementation of a @a TQListBox for the combobox used within * @a KexiMacroPropertyWidget to handle different variable-states. */ -class ListBox : public QListBox +class ListBox : public TQListBox { public: - ListBox(KComboBox* parent, KexiMacroProperty* macroproperty) - : QListBox(parent) + ListBox(KComboBox* tqparent, KexiMacroProperty* macroproperty) + : TQListBox(tqparent) , m_macroproperty(macroproperty) , m_edititem(0) { @@ -388,74 +388,74 @@ class ListBox : public QListBox m_edititem = new EditListBoxItem(this, m_macroproperty); Q_ASSERT( m_edititem->widget() != 0 ); - const QString name = m_macroproperty->name(); - KoMacro::Variable::List children; + const TQString name = m_macroproperty->name(); + KoMacro::Variable::List tqchildren; { - KoMacro::Variable::List actionchildren; + KoMacro::Variable::List actiontqchildren; KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false); //kdDebug() << "KexiMacroProperty::ListBox::update() itemvar="<<(itemvar.data() ? "name:"+itemvar->name()+" value:"+itemvar->toString() : "NULL")<<endl; if(itemvar.data()) - actionchildren = itemvar->children(); + actiontqchildren = itemvar->tqchildren(); KSharedPtr<KoMacro::Action> action = m_edititem->action(); KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>(); //kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl; if(actionvar.data()) - actionchildren += actionvar->children(); + actiontqchildren += actionvar->tqchildren(); - KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd()); + KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd()); for(; it != end; ++it) { if(name == (*it)->name()) { - KoMacro::Variable::List list = (*it)->children(); + KoMacro::Variable::List list = (*it)->tqchildren(); KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd()); for(; listit != listend; ++listit) - children.append( *listit ); + tqchildren.append( *listit ); } } - if(children.count() <= 0) - children = actionchildren; + if(tqchildren.count() <= 0) + tqchildren = actiontqchildren; } /* - kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl; - KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd()); + kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl; + KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd()); for(; listit != listend; ++listit) { - kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl; + kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl; } */ - if(children.count() > 0) { - KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end()); + if(tqchildren.count() > 0) { + KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end()); for(; childit != childend; ++childit) { - const QString n = (*childit)->name(); + const TQString n = (*childit)->name(); //if(! n.startsWith("@")) continue; - const QVariant v = (*childit)->variant(); + const TQVariant v = (*childit)->variant(); //kdDebug() << " child name=" << n << " value=" << v << endl; switch( v.type() ) { - /* case QVariant::Map: { - const QMap<QString,QVariant> map = v.toMap(); - for(QMap<QString,QVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it) + /* case TQVariant::Map: { + const TQMap<TQString,TQVariant> map = v.toMap(); + for(TQMap<TQString,TQVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it) m_items.append(it.key()); } break; */ - case QVariant::List: { - const QValueList<QVariant> list = v.toList(); - for(QValueList<QVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) { - const QString s = (*it).toString().stripWhiteSpace(); + case TQVariant::List: { + const TQValueList<TQVariant> list = v.toList(); + for(TQValueList<TQVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) { + const TQString s = (*it).toString().stripWhiteSpace(); if(! s.isEmpty()) m_items.append(s); } } break; - case QVariant::StringList: { - const QStringList list = v.toStringList(); - for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) + case TQVariant::StringList: { + const TQStringList list = v.toStringList(); + for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) if(! (*it).isEmpty()) m_items.append(*it); } break; default: { - const QString s = v.toString().stripWhiteSpace(); + const TQString s = v.toString().stripWhiteSpace(); if(! s.isEmpty()) m_items.append(s); } break; @@ -463,30 +463,30 @@ class ListBox : public QListBox } } - QListBoxItem* item = m_edititem; + TQListBoxItem* item = m_edititem; const uint count = m_items.count(); for(uint i = 0; i < count; i++) item = new ListBoxItem(this, m_items[i], item); } EditListBoxItem* editItem() const { return m_edititem; } - QStringList items() const { return m_items; } + TQStringList items() const { return m_items; } virtual void hide () { - QListBox::hide(); + TQListBox::hide(); for(uint i = 0; i < count(); i++) static_cast<ListBoxItem*>( item(i) )->setEnabled(false); } virtual void show() { update(); adjustSize(); - QListBox::show(); + TQListBox::show(); } private: KexiMacroProperty* m_macroproperty; EditListBoxItem* m_edititem; - QStringList m_items; + TQStringList m_items; }; /** @@ -501,13 +501,13 @@ class KexiMacroPropertyWidget::Private ListBox* listbox; }; -KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, QWidget* parent) - : KoProperty::Widget(property, parent) +KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, TQWidget* tqparent) + : KoProperty::Widget(property, tqparent) , d( new Private() ) { kdDebug() << "KexiMacroPropertyWidget::KexiMacroPropertyWidget() Ctor" << endl; - QHBoxLayout* layout = new QHBoxLayout(this, 0, 0); + TQHBoxLayout* tqlayout = new TQHBoxLayout(this, 0, 0); d->macroproperty = dynamic_cast<KexiMacroProperty*>( property->customProperty() ); if(! d->macroproperty) { @@ -516,18 +516,18 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, } d->combobox = new KComboBox(this); - layout->addWidget(d->combobox); + tqlayout->addWidget(d->combobox); d->listbox = new ListBox(d->combobox, d->macroproperty); d->combobox->setEditable(true); d->combobox->setListBox(d->listbox); - d->combobox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + d->combobox->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); d->combobox->setMinimumHeight(5); - d->combobox->setInsertionPolicy(QComboBox::NoInsertion); + d->combobox->setInsertionPolicy(TQComboBox::NoInsertion); d->combobox->setMinimumSize(10, 0); // to allow the combo to be resized to a small size d->combobox->setAutoCompletion(false); d->combobox->setContextMenuEnabled(false); - QVariant value = d->macroproperty->value(); + TQVariant value = d->macroproperty->value(); int index = d->listbox->items().findIndex( value.toString() ); if(index >= 0) { d->combobox->setCurrentItem(index + 1); @@ -543,14 +543,14 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, d->combobox->setFocusProxy( d->listbox->editItem()->widget() ); setFocusWidget( d->combobox->lineEdit() ); - connect(d->combobox, SIGNAL(textChanged(const QString&)), - this, SLOT(slotComboBoxChanged())); - connect(d->combobox, SIGNAL(activated(int)), - this, SLOT(slotComboBoxActivated())); - connect(d->listbox->editItem()->widget(), SIGNAL(valueChanged(Widget*)), - this, SLOT(slotWidgetValueChanged())); - connect(d->macroproperty, SIGNAL(valueChanged()), - this, SLOT(slotPropertyValueChanged())); + connect(d->combobox, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotComboBoxChanged())); + connect(d->combobox, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotComboBoxActivated())); + connect(d->listbox->editItem()->widget(), TQT_SIGNAL(valueChanged(Widget*)), + this, TQT_SLOT(slotWidgetValueChanged())); + connect(d->macroproperty, TQT_SIGNAL(valueChanged()), + this, TQT_SLOT(slotPropertyValueChanged())); } KexiMacroPropertyWidget::~KexiMacroPropertyWidget() @@ -559,23 +559,23 @@ KexiMacroPropertyWidget::~KexiMacroPropertyWidget() delete d; } -QVariant KexiMacroPropertyWidget::value() const +TQVariant KexiMacroPropertyWidget::value() const { kdDebug()<<"KexiMacroPropertyWidget::value() value="<<d->macroproperty->value()<<endl; return d->macroproperty->value(); - /* QVariant value = d->combobox->currentText(); + /* TQVariant value = d->combobox->currentText(); value.cast( d->macroproperty->value().type() ); return value; */ } -void KexiMacroPropertyWidget::setValue(const QVariant& value, bool emitChange) +void KexiMacroPropertyWidget::setValue(const TQVariant& value, bool emitChange) { kdDebug()<<"KexiMacroPropertyWidget::setValue() value="<<value<<" emitChange="<<emitChange<<endl; if(! emitChange) d->combobox->blockSignals(true); - const QString s = value.toString(); + const TQString s = value.toString(); d->combobox->setCurrentText( s.isNull() ? "" : s ); if(emitChange) @@ -593,7 +593,7 @@ void KexiMacroPropertyWidget::setReadOnlyInternal(bool readOnly) void KexiMacroPropertyWidget::slotComboBoxChanged() { kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxChanged()"<<endl; - const QVariant v = d->combobox->currentText(); + const TQVariant v = d->combobox->currentText(); d->macroproperty->setValue(v, true); //emit valueChanged(this); } @@ -602,7 +602,7 @@ void KexiMacroPropertyWidget::slotComboBoxActivated() { Q_ASSERT( d->listbox->editItem()->widget() ); const int index = d->combobox->currentItem(); - QString text = (index == 0) + TQString text = (index == 0) ? d->listbox->editItem()->widget()->value().toString() : d->combobox->text(index); kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxActivated() index="<<index<<" text="<<text<<endl; @@ -618,7 +618,7 @@ void KexiMacroPropertyWidget::slotWidgetValueChanged() void KexiMacroPropertyWidget::slotPropertyValueChanged() { Q_ASSERT( d->listbox->editItem()->widget() ); - const QVariant v = d->macroproperty->value(); + const TQVariant v = d->macroproperty->value(); kdDebug()<<"KexiMacroPropertyWidget::slotPropertyValueChanged() value="<<v<<endl; d->listbox->editItem()->widget()->setValue(v, true); } |