diff options
Diffstat (limited to 'kexi/plugins/forms')
32 files changed, 261 insertions, 261 deletions
diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp index 61585840..bec4de7d 100644 --- a/kexi/plugins/forms/kexiactionselectiondialog.cpp +++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp @@ -352,12 +352,12 @@ public: msg = TQString(); // hardcoded, but it's not that bad else if (actionType=="macro") - msg = i18n("&Select macro to be executed after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select macro to be executed after clicking \"%1\" button:").arg(actionWidgetName); else if (actionType=="script") - msg = i18n("&Select script to be executed after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select script to be executed after clicking \"%1\" button:").arg(actionWidgetName); //default: table/query/form/report... else - msg = i18n("&Select object to be opened after clicking \"%1\" button:").tqarg(actionWidgetName); + msg = i18n("&Select object to be opened after clicking \"%1\" button:").arg(actionWidgetName); selectActionToBeExecutedLbl->setText(msg); } @@ -405,7 +405,7 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ setButtonOK( KGuiItem(i18n("Assign action", "&Assign"), "button_ok", i18n("Assign action")) ); TQWidget *mainWidget = new TQWidget( this ); - mainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + mainWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); setMainWidget(mainWidget); /* lbl 1 @@ -428,24 +428,24 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ // 1st column: action types d->actionCategoriesListView = new ActionCategoriesListView(mainWidget); - d->actionCategoriesListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); + d->actionCategoriesListView->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); d->glyr->addWidget(d->actionCategoriesListView, 1, 0); connect( d->actionCategoriesListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(slotActionCategorySelected(TQListViewItem*))); TQLabel *lbl = new TQLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); - lbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); - lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + lbl->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); d->glyr->addWidget(lbl, 0, 0, TQt::AlignTop|TQt::AlignLeft); // widget stack for 2nd and 3rd column d->secondAnd3rdColumnStack = new TQWidgetStack(mainWidget); - d->secondAnd3rdColumnStack->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->secondAnd3rdColumnStack->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, TQt::AlignTop|TQt::AlignLeft); d->secondAnd3rdColumnMainWidget = new TQWidget(d->secondAnd3rdColumnStack); - d->secondAnd3rdColumnMainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->secondAnd3rdColumnMainWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); d->secondAnd3rdColumnGrLyr = new TQGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint()); d->secondAnd3rdColumnGrLyr->setRowStretch(1, 2); d->secondAnd3rdColumnStack->addWidget(d->secondAnd3rdColumnMainWidget); @@ -457,8 +457,8 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ this, TQT_SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*))); d->selectActionToBeExecutedLbl = new TQLabel(d->secondAnd3rdColumnMainWidget); - d->selectActionToBeExecutedLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); - d->selectActionToBeExecutedLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + d->selectActionToBeExecutedLbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + d->selectActionToBeExecutedLbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); d->selectActionToBeExecutedLbl->setMinimumHeight(d->selectActionToBeExecutedLbl->fontMetrics().height()*2); d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, TQt::AlignTop|TQt::AlignLeft); @@ -469,7 +469,7 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ d->actionToExecuteListView = new ActionToExecuteListView(d->secondAnd3rdColumnMainWidget); d->actionToExecuteListView->installEventFilter(this); //to be able to disable painting d->actionToExecuteListView->viewport()->installEventFilter(this); //to be able to disable painting - d->actionToExecuteListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); + d->actionToExecuteListView->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum); connect(d->actionToExecuteListView, TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotActionToExecuteItemExecuted(TQListViewItem*))); connect(d->actionToExecuteListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)), @@ -479,8 +479,8 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQ d->actionToExecuteLbl = new TQLabel(d->actionToExecuteListView, i18n("Action to execute:"), d->secondAnd3rdColumnMainWidget); d->actionToExecuteLbl->installEventFilter(this); //to be able to disable painting - d->actionToExecuteLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); - d->actionToExecuteLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + d->actionToExecuteLbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + d->actionToExecuteLbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, TQt::AlignTop|TQt::AlignLeft); // temporary show all sections to avoid resizing the dialog in the future @@ -538,7 +538,7 @@ void KexiActionSelectionDialog::slotKActionItemExecuted(TQListViewItem*) void KexiActionSelectionDialog::slotKActionItemSelected(TQListViewItem*) { d->setActionToExecuteSectionVisible(false); - updateOKButtontqStatus(); + updateOKButtonStatus(); } void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(TQListViewItem*) @@ -549,7 +549,7 @@ void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(TQListViewItem void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(TQListViewItem*) { d->setActionToExecuteSectionVisible(false); - updateOKButtontqStatus(); + updateOKButtonStatus(); } void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::Item* item) @@ -568,7 +568,7 @@ void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(TQListViewItem* void KexiActionSelectionDialog::slotActionToExecuteItemSelected(TQListViewItem*) { - updateOKButtontqStatus(); + updateOKButtonStatus(); } void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) @@ -581,15 +581,15 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) i18n("&Select action to be executed after clicking \"%1\" button:")); // msg for a label if (simpleItem->data == "kaction") { if (!d->kactionPageWidget) { - //create lbl+list view with a vtqlayout + //create lbl+list view with a vlayout d->kactionPageWidget = new TQWidget(); - d->kactionPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->kactionPageWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); TQVBoxLayout *vlyr = new TQVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint()); d->kactionListView = new KActionsListView(d->kactionPageWidget, d->mainWin); d->kactionListView->init(); - TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), + TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->kactionPageWidget); - lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); vlyr->addWidget(lbl); vlyr->addWidget(d->kactionListView); @@ -605,16 +605,16 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) } else if (simpleItem->data == "currentForm") { if (!d->currentFormActionsPageWidget) { - //create lbl+list view with a vtqlayout + //create lbl+list view with a vlayout d->currentFormActionsPageWidget = new TQWidget(); - d->currentFormActionsPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); + d->currentFormActionsPageWidget->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum); TQVBoxLayout *vlyr = new TQVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint()); d->currentFormActionsListView = new CurrentFormActionsListView( d->currentFormActionsPageWidget, d->mainWin); d->currentFormActionsListView->init(); TQLabel *lbl = new TQLabel(d->currentFormActionsListView, - selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->currentFormActionsPageWidget); - lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); + selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->currentFormActionsPageWidget); + lbl->setAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak); lbl->setMinimumHeight(lbl->fontMetrics().height()*2); vlyr->addWidget(lbl); vlyr->addWidget(d->currentFormActionsListView); @@ -635,7 +635,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) d->setActionToExecuteSectionVisible(false); } d->actionCategoriesListView->update(); - updateOKButtontqStatus(); + updateOKButtonStatus(); return; } // other case @@ -656,7 +656,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) d->raiseWidget( d->secondAnd3rdColumnMainWidget ); } d->actionCategoriesListView->update(); - updateOKButtontqStatus(); + updateOKButtonStatus(); } KexiMainWindow* KexiActionSelectionDialog::mainWin() const @@ -696,7 +696,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const KexiPart::Info* partInfo = partItem ? Kexi::partManager().infoForMimeType( partItem->mimeType() ) : 0; if (partInfo) { // opening or executing: table:name, query:name, form:name, macro:name, script:name, etc. - data.string = TQString("%1:%2").tqarg(partInfo->objectName()).tqarg(partItem->name()); + data.string = TQString("%1:%2").arg(partInfo->objectName()).arg(partItem->name()); data.option = actionToExecute->data; return data; } @@ -705,7 +705,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const return data; // No Action } -void KexiActionSelectionDialog::updateOKButtontqStatus() +void KexiActionSelectionDialog::updateOKButtonStatus() { TQPushButton *btn = actionButton(Ok); ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>( diff --git a/kexi/plugins/forms/kexiactionselectiondialog.h b/kexi/plugins/forms/kexiactionselectiondialog.h index a2c4066d..983ea759 100644 --- a/kexi/plugins/forms/kexiactionselectiondialog.h +++ b/kexi/plugins/forms/kexiactionselectiondialog.h @@ -63,7 +63,7 @@ class KEXIFORMUTILS_EXPORT KexiActionSelectionDialog : public KDialogBase void slotItemForOpeningOrExecutingSelected(KexiPart::Item* item); protected: - void updateOKButtontqStatus(); + void updateOKButtonStatus(); class KexiActionSelectionDialogPrivate; KexiActionSelectionDialogPrivate* d; diff --git a/kexi/plugins/forms/kexidataprovider.cpp b/kexi/plugins/forms/kexidataprovider.cpp index e89ba9cb..1a6df899 100644 --- a/kexi/plugins/forms/kexidataprovider.cpp +++ b/kexi/plugins/forms/kexidataprovider.cpp @@ -113,7 +113,7 @@ void KexiFormDataProvider::fillDataItems(KexiTableItem& row, bool cursorAtNewRow kexipluginsdbg << "fill data of '" << itemIface->dataSource() << "' at idx=" << it.data() << " data=" << value << (indexForVisibleLookupValue!=-1 ? TQString(" SPECIAL: indexForVisibleLookupValue=%1 visibleValue=%2") - .tqarg(indexForVisibleLookupValue).tqarg(visibleLookupValue.toString()) + .arg(indexForVisibleLookupValue).arg(visibleLookupValue.toString()) : TQString()) << endl; const bool displayDefaultValue = cursorAtNewRow && (value.isNull() && visibleLookupValue.isNull()) @@ -228,7 +228,7 @@ void KexiFormDataProvider::invalidateDataSources( const TQDict<char>& invalidSou // newIndices[i]=-1; KexiFormDataItemInterface *item = m_dataItems.at( *it ); if (item) - item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") ); + item->setInvalidState( TQString::fromLatin1("#") + i18n("NAME") + TQString::fromLatin1("?") ); m_dataItems.remove(*it); kexipluginsdbg << "invalidateDataSources(): " << (*it) << " -> " << -1 << endl; // i++; @@ -253,7 +253,7 @@ void KexiFormDataProvider::invalidateDataSources( const TQDict<char>& invalidSou else { kexipluginsdbg << "invalidateDataSources(): removing " << it.key()->dataSource() << endl; m_dataItems.remove(it.key()); - it.key()->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") ); + it.key()->setInvalidState( TQString::fromLatin1("#") + i18n("NAME") + TQString::fromLatin1("?") ); } } #endif @@ -275,7 +275,7 @@ void KexiFormDataProvider::invalidateDataSources( const TQDict<char>& invalidSou for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current();) { KexiFormDataItemInterface * item = it.current(); if (invalidSources[ item->dataSource().lower() ]) { - item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") ); + item->setInvalidState( TQString::fromLatin1("#") + i18n("NAME") + TQString::fromLatin1("?") ); m_dataItems.remove(item); continue; } diff --git a/kexi/plugins/forms/kexidatasourcepage.cpp b/kexi/plugins/forms/kexidatasourcepage.cpp index e9ff4177..018feb8b 100644 --- a/kexi/plugins/forms/kexidatasourcepage.cpp +++ b/kexi/plugins/forms/kexidatasourcepage.cpp @@ -20,7 +20,7 @@ #include "kexidatasourcepage.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqtooltip.h> #include <tqheader.h> @@ -65,9 +65,9 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) TQVBoxLayout *contentsVlyr = new TQVBoxLayout(contents); m_noDataSourceAvailableLabel = new TQLabel(m_noDataSourceAvailableSingleText, contents); - m_noDataSourceAvailableLabel->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); + m_noDataSourceAvailableLabel->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); m_noDataSourceAvailableLabel->setMargin(2); - m_noDataSourceAvailableLabel->tqsetAlignment(TQt::WordBreak | TQt::AlignBottom | TQt::AlignLeft); + m_noDataSourceAvailableLabel->setAlignment(TQt::WordBreak | TQt::AlignBottom | TQt::AlignLeft); contentsVlyr->addWidget(m_noDataSourceAvailableLabel); //-Widget's Data Source @@ -78,10 +78,10 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) #else m_widgetDSLabel = new TQLabel(i18n("Table Field or Query Field", "Widget's data source:"), contents); #endif - m_widgetDSLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + m_widgetDSLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); m_widgetDSLabel->setMargin(2); m_widgetDSLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - m_widgetDSLabel->tqsetAlignment(AlignLeft|AlignBottom); + m_widgetDSLabel->setAlignment(AlignLeft|AlignBottom); hlyr->addWidget(m_widgetDSLabel); m_clearWidgetDSButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearWidgetDSButton"); @@ -104,10 +104,10 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) //- Form's Data Source hlyr = new TQHBoxLayout(contentsVlyr); m_dataSourceLabel = new TQLabel(i18n("Form's data source:"), contents); - m_dataSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + m_dataSourceLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); m_dataSourceLabel->setMargin(2); m_dataSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4); - m_dataSourceLabel->tqsetAlignment(AlignLeft|AlignBottom); + m_dataSourceLabel->setAlignment(AlignLeft|AlignBottom); hlyr->addWidget(m_dataSourceLabel); m_gotoButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoButton"); @@ -160,14 +160,14 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) m_mousePointerLabel->setFixedWidth( m_mousePointerLabel->pixmap() ? m_mousePointerLabel->pixmap()->width() : 0); m_availableFieldsDescriptionLabel = new TQLabel( i18n("Select fields from the list below and drag them onto a form or click the \"Insert\" button"), contents); - m_availableFieldsDescriptionLabel->tqsetAlignment( TQt::AlignAuto | TQt::WordBreak ); + m_availableFieldsDescriptionLabel->setAlignment( TQt::AlignAuto | TQt::WordBreak ); hlyr->addWidget(m_availableFieldsDescriptionLabel); //Available Fields contentsVlyr->addSpacing(4); hlyr = new TQHBoxLayout(contentsVlyr); m_availableFieldsLabel = new TQLabel(i18n("Available fields:"), contents); - m_availableFieldsLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); + m_availableFieldsLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed); m_availableFieldsLabel->setMargin(2); m_availableFieldsLabel->setMinimumHeight(IconSize(KIcon::Small)); hlyr->addWidget(m_availableFieldsLabel); @@ -183,7 +183,7 @@ KexiDataSourcePage::KexiDataSourcePage(TQWidget *parent, const char *name) m_fieldListView = new KexiFieldListView(contents, "fieldListView", KexiFieldListView::ShowDataTypes | KexiFieldListView::AllowMultiSelection ); - m_fieldListView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); + m_fieldListView->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding)); m_availableFieldsLabel->setBuddy(m_fieldListView); contentsVlyr->addWidget(m_fieldListView, 1); connect(m_fieldListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotFieldListViewSelectionChanged())); diff --git a/kexi/plugins/forms/kexidbfactory.cpp b/kexi/plugins/forms/kexidbfactory.cpp index 3f47a6ec..d87b31c5 100644 --- a/kexi/plugins/forms/kexidbfactory.cpp +++ b/kexi/plugins/forms/kexidbfactory.cpp @@ -398,9 +398,9 @@ KexiDBFactory::createWidget(const TQCString &c, TQWidget *p, const char *n, /* else if(c == "KexiDBTimeEdit") w = new KexiDBTimeEdit(TQTime::currentTime(), p, n); else if(c == "KexiDBDateEdit") - w = new KexiDBDateEdit(TQDate::tqcurrentDate(), p, n); + w = new KexiDBDateEdit(TQDate::currentDate(), p, n); else if(c == "KexiDBDateTimeEdit") - w = new KexiDBDateTimeEdit(TQDateTime::tqcurrentDateTime(), p, n);*/ + w = new KexiDBDateTimeEdit(TQDateTime::currentDateTime(), p, n);*/ // else if(c == "KexiDBIntSpinBox") // w = new KexiDBIntSpinBox(p, n); // else if(c == "KexiDBDoubleSpinBox") @@ -462,7 +462,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign //! just inherited StdWidgetFactory::clearWidgetContent() should be called KLineEdit *lineedit = static_cast<KLineEdit*>(w); createEditor(classname, lineedit->text(), lineedit, container, - lineedit->tqgeometry(), lineedit->tqalignment(), true); + lineedit->geometry(), lineedit->alignment(), true); return true; } if(classname == "KexiDBTextEdit") @@ -471,7 +471,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign //! just inherited StdWidgetFactory::clearWidgetContent() should be called KTextEdit *textedit = static_cast<KTextEdit*>(w); createEditor(classname, textedit->text(), textedit, container, - textedit->tqgeometry(), textedit->tqalignment(), true, true); + textedit->geometry(), textedit->alignment(), true, true); //copy a few properties KTextEdit *ed = dynamic_cast<KTextEdit *>( editor(w) ); ed->setWrapPolicy(textedit->wrapPolicy()); @@ -497,13 +497,13 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign } if ( classname == "KexiDBLabel" ) - w->resize(w->tqsizeHint()); + w->resize(w->sizeHint()); } else { createEditor(classname, label->text(), label, container, - label->tqgeometry(), label->tqalignment(), - false, label->tqalignment() & TQt::WordBreak /*multiline*/); + label->geometry(), label->alignment(), + false, label->alignment() & TQt::WordBreak /*multiline*/); } return true; } @@ -529,12 +529,12 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign if(static_cast<KexiDBAutoField*>(w)->hasAutoCaption()) return false; // caption is auto, abort editing TQLabel *label = static_cast<KexiDBAutoField*>(w)->label(); - createEditor(classname, label->text(), label, container, label->tqgeometry(), label->tqalignment()); + createEditor(classname, label->text(), label, container, label->geometry(), label->alignment()); return true; } else if (classname == "KexiDBCheckBox") { KexiDBCheckBox *cb = static_cast<KexiDBCheckBox*>(w); - TQRect r( cb->tqgeometry() ); + TQRect r( cb->geometry() ); r.setLeft( r.left() + 2 + cb->tqstyle().subRect( TQStyle::SR_CheckBoxIndicator, cb ).width() ); createEditor(classname, cb->text(), cb, container, r, TQt::AlignAuto); return true; @@ -679,7 +679,7 @@ KexiDBFactory::changeText(const TQString &text) changeProperty("caption", text, form); return true; } - //! \todo check field's tqgeometry + //! \todo check field's geometry return false; } @@ -690,7 +690,7 @@ KexiDBFactory::resizeEditor(TQWidget *editor, TQWidget *w, const TQCString &clas //TQPoint p = widget->pos(); if(classname == "KexiDBAutoField") - editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->tqgeometry() ); + editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->geometry() ); } void diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp index 3c20510e..e8da5ad5 100644 --- a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp +++ b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp @@ -43,7 +43,7 @@ void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQ } } -void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int tqalignment, bool hasFocus ) +void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int alignment, bool hasFocus ) { KexiFormDataItemInterface *dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(w); KexiDB::QueryColumnInfo *columnInfo = dataItemIface ? dataItemIface->columnInfo() : 0; @@ -53,11 +53,11 @@ void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpt if (w->hasFocus()) { p->setPen( KexiUtils::blendedColors( - m_autonumberDisplayParameters->textColor, w->tqpalette().active().base(), 1, 3)); + m_autonumberDisplayParameters->textColor, w->palette().active().base(), 1, 3)); } KexiDisplayUtils::paintAutonumberSign(*m_autonumberDisplayParameters, p, 2 + margin + w->margin(), margin, w->width() - margin*2 -2-2, - w->height() - margin*2 -2, tqalignment, hasFocus); + w->height() - margin*2 -2, alignment, hasFocus); } } } @@ -66,6 +66,6 @@ void KexiDBTextWidgetInterface::event( TQEvent * e, TQWidget *w, bool textIsEmpt { if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) { if (m_autonumberDisplayParameters && textIsEmpty) - w->tqrepaint(); + w->repaint(); } } diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.h b/kexi/plugins/forms/kexidbtextwidgetinterface.h index 6e0299c0..17382e31 100644 --- a/kexi/plugins/forms/kexidbtextwidgetinterface.h +++ b/kexi/plugins/forms/kexidbtextwidgetinterface.h @@ -40,7 +40,7 @@ class KEXIFORMUTILS_EXPORT KexiDBTextWidgetInterface void setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQWidget *w); //! Called from paintEvent( TQPaintEvent *pe ) method of the data aware widget. - void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int tqalignment, bool hasFocus ); + void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int alignment, bool hasFocus ); //! Called from event( TQEvent * e ) method of the data aware widget. void event( TQEvent * e, TQWidget *w, bool textIsEmpty ); diff --git a/kexi/plugins/forms/kexiformeventhandler.cpp b/kexi/plugins/forms/kexiformeventhandler.cpp index 4e066bd6..55e999db 100644 --- a/kexi/plugins/forms/kexiformeventhandler.cpp +++ b/kexi/plugins/forms/kexiformeventhandler.cpp @@ -56,7 +56,7 @@ KexiPart::Info* KexiFormEventAction::ActionData::decodeString( return 0; KexiPart::Info *info = 0; if (_actionType!="kaction" && _actionType!="currentForm") { - info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(_actionType) ); + info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").arg(_actionType) ); if (!info) return 0; } @@ -85,7 +85,7 @@ void KexiFormEventAction::activate() if (!project) return; KexiPart::Part* part = Kexi::partManager().partForMimeType( - TQString("kexi/%1").tqarg(m_actionName) ); + TQString("kexi/%1").arg(m_actionName) ); if (!part) return; KexiPart::Item* item = project->item( part->info(), m_objectName ); diff --git a/kexi/plugins/forms/kexiformmanager.cpp b/kexi/plugins/forms/kexiformmanager.cpp index 9674f4fe..8c0c66e7 100644 --- a/kexi/plugins/forms/kexiformmanager.cpp +++ b/kexi/plugins/forms/kexiformmanager.cpp @@ -112,7 +112,7 @@ void KexiFormManager::setFormDataSource(const TQCString& mime, const TQCString& propValues.insert("dataSource", name); propValues.insert("dataSourceMimeType", mime); KFormDesigner::CommandGroup *group - = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").tqarg(name.data()), propertySet()); + = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").arg(name.data()), propertySet()); propertySet()->createPropertyCommandsInDesignMode(formWidget, propValues, group, true /*addToActiveForm*/); } diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp index 9c4e3173..9d8017d8 100644 --- a/kexi/plugins/forms/kexiformpart.cpp +++ b/kexi/plugins/forms/kexiformpart.cpp @@ -277,7 +277,7 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc) TQDomElement lNameProperty = domDoc.createElement("property"); lNameProperty.setAttribute("name", "name"); TQDomElement lType = domDoc.createElement("cstring"); - TQDomText lClassN = domDoc.createTextNode(TQString("l%1").tqarg(list->field(i)->name())); + TQDomText lClassN = domDoc.createTextNode(TQString("l%1").arg(list->field(i)->name())); lType.appendChild(lClassN); lNameProperty.appendChild(lType); lclass.appendChild(lNameProperty); @@ -510,7 +510,7 @@ void KexiFormPart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow* void KexiFormPart::slotWidgetCreatedByFormsLibrary(TQWidget* widget) { - TQStrList signalNames(widget->tqmetaObject()->signalNames()); + TQStrList signalNames(widget->metaObject()->signalNames()); if (!signalNames.isEmpty()) { const char *handleDragMoveEventSignal = "handleDragMoveEvent(TQDragMoveEvent*)"; const char *handleDropEventSignal = "handleDropEvent(TQDropEvent*)"; diff --git a/kexi/plugins/forms/kexiformscrollview.cpp b/kexi/plugins/forms/kexiformscrollview.cpp index df5191ed..b4b58f70 100644 --- a/kexi/plugins/forms/kexiformscrollview.cpp +++ b/kexi/plugins/forms/kexiformscrollview.cpp @@ -150,9 +150,9 @@ void KexiFormScrollView::moveToFirstRecordRequested() selectFirstRow(); } -void KexiFormScrollView::clearColumnsInternal(bool tqrepaint) +void KexiFormScrollView::clearColumnsInternal(bool repaint) { - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } @@ -349,7 +349,7 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item) } /*void KexiFormScrollView::slotAboutToDeleteRow(KexiTableItem& item, - KexiDB::ResultInfo* result, bool tqrepaint) + KexiDB::ResultInfo* result, bool repaint) { //! @todo }*/ @@ -359,18 +359,18 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item) //! @todo }*/ -void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool tqrepaint) +void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool repaint) { Q_UNUSED( item ); - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } -void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint) +void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool repaint) { Q_UNUSED( item ); Q_UNUSED( row ); - Q_UNUSED( tqrepaint ); + Q_UNUSED( repaint ); //! @todo } @@ -551,7 +551,7 @@ void KexiFormScrollView::refreshContentsSize() void KexiFormScrollView::handleDataWidgetAction(const TQString& actionName) { - TQWidget *w = tqfocusWidget(); + TQWidget *w = focusWidget(); KexiFormDataItemInterface *item = 0; while (w) { item = dynamic_cast<KexiFormDataItemInterface*>(w); diff --git a/kexi/plugins/forms/kexiformscrollview.h b/kexi/plugins/forms/kexiformscrollview.h index d8326a57..7d2b9867 100644 --- a/kexi/plugins/forms/kexiformscrollview.h +++ b/kexi/plugins/forms/kexiformscrollview.h @@ -162,17 +162,17 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView : virtual void slotRowRepaintRequested(KexiTableItem& item); //! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted(). - virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint) - { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); } + virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint) + { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); } - //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed. + //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed. virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); } - //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed. - virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint); + //! Handles KexiTableViewData::rowInserted() signal to repaint when needed. + virtual void slotRowInserted(KexiTableItem *item, bool repaint); //! Like above, not db-aware version - virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint); + virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint); virtual void slotRowsDeleted( const TQValueList<int> & ); @@ -193,7 +193,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView : protected: //! Implementation for KexiDataAwareObjectInterface - virtual void clearColumnsInternal(bool tqrepaint); + virtual void clearColumnsInternal(bool repaint); //! Implementation for KexiDataAwareObjectInterface virtual void addHeaderColumn(const TQString& caption, const TQString& description, diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp index 01ec080f..c6d689f7 100644 --- a/kexi/plugins/forms/kexiformview.cpp +++ b/kexi/plugins/forms/kexiformview.cpp @@ -90,7 +90,7 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, TQWidget *parent, if (viewMode()==Kexi::DataViewMode) { m_scrollView->recordNavigator()->setRecordHandler( m_scrollView ); - m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->tqpalette().active().background()); + m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->palette().active().background()); //moved to formmanager connect(formPart()->manager(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected())); } else @@ -345,12 +345,12 @@ void KexiFormView::updateValuesForSubproperties() kexipluginsdbg << "KexiFormView::loadForm(): delayed setting of the subproperty: widget=" << it.current()->widget()->name() << " prop=" << subpropIt.key() << " val=" << subpropIt.data() << endl; - const int count = subwidget->tqmetaObject()->findProperty(subpropIt.key().latin1(), true); - const TQMetaProperty *meta = count!=-1 ? subwidget->tqmetaObject()->property(count, true) : 0; + const int count = subwidget->metaObject()->findProperty(subpropIt.key().latin1(), true); + const TQMetaProperty *meta = count!=-1 ? subwidget->metaObject()->property(count, true) : 0; if (meta) { // Special case: the property value of type enum (set) but is saved as a string list, // not as int, so we need to translate it to int. It's been created as such - // by FormIO::readPropertyValue(). Example: "tqalignment" property. + // by FormIO::readPropertyValue(). Example: "alignment" property. if (meta->isSetType() && subpropIt.data().type()==TQVariant::StringList) { TQStrList keys; const TQStringList list( subpropIt.data().toStringList() ); @@ -371,7 +371,7 @@ void KexiFormView::updateValuesForSubproperties() static void setUnsavedBLOBIdsForDataViewMode( TQWidget* widget, const TQMap<TQCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName) { - if (-1 != widget->tqmetaObject()->findProperty("pixmapId")) { + if (-1 != widget->metaObject()->findProperty("pixmapId")) { const KexiBLOBBuffer::Id_t blobID = unsavedLocalBLOBsByName[ widget->name() ]; if (blobID > 0) widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)blobID); @@ -525,9 +525,9 @@ KexiFormView::afterSwitchFrom(int mode) //set focus on 1st focusable widget which has valid dataSource property set if (!m_dbform->orderedFocusWidgets()->isEmpty()) { -// TQWidget *www = tqfocusWidget(); - //if (Kexi::hasParent(this, tqApp->tqfocusWidget())) { - KexiUtils::unsetFocusWithReason(tqApp->tqfocusWidget(), TQFocusEvent::Tab); +// TQWidget *www = focusWidget(); + //if (Kexi::hasParent(this, tqApp->focusWidget())) { + KexiUtils::unsetFocusWithReason(tqApp->focusWidget(), TQFocusEvent::Tab); //} TQPtrListIterator<TQWidget> it(*m_dbform->orderedFocusWidgets()); @@ -860,7 +860,7 @@ KexiFormView::slotWidgetSelected(KFormDesigner::Form *f, bool multiple) setAvailable("formpart_format_raise", true); setAvailable("formpart_format_lower", true); - // If the widgets selected is a container, we enable tqlayout actions + // If the widgets selected is a container, we enable layout actions if(!multiple) { KFormDesigner::ObjectTreeItem *item = f->objectTree()->lookup( f->selectedWidgets()->first()->name() ); @@ -999,14 +999,14 @@ void KexiFormView::setFocusInternal() { if (viewMode() == Kexi::DataViewMode) { - if (m_dbform->tqfocusWidget()) { + if (m_dbform->focusWidget()) { //better-looking focus if (m_setFocusInternalOnce) { KexiUtils::setFocusWithReason(m_setFocusInternalOnce, TQFocusEvent::Other);//Tab); m_setFocusInternalOnce = 0; } else { - //ok? SET_FOCUS_USING_REASON(m_dbform->tqfocusWidget(), TQFocusEvent::Other);//Tab); + //ok? SET_FOCUS_USING_REASON(m_dbform->focusWidget(), TQFocusEvent::Other);//Tab); } return; } @@ -1115,7 +1115,7 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s // KFormDesigner::WidgetList* prevSelection = form()->selectedWidgets(); KFormDesigner::WidgetList widgetsToSelect; KFormDesigner::CommandGroup *group = new KFormDesigner::CommandGroup( - fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").tqarg(fields.count()), + fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").arg(fields.count()), KFormDesigner::FormManager::self()->propertySet() ); @@ -1173,8 +1173,8 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s // newWidget->setDataSource(column->aliasOrName()); // newWidget->setFieldTypeInternal((int)column->field->type()); // newWidget->setFieldCaptionInternal(column->captionOrAliasOrName()); - //resize again because autofield's type changed what can lead to changed tqsizeHint() -// newWidget->resize(newWidget->tqsizeHint()); + //resize again because autofield's type changed what can lead to changed sizeHint() +// newWidget->resize(newWidget->sizeHint()); KFormDesigner::WidgetList list; list.append(newWidget); KFormDesigner::AdjustSizeCommand *adjustCommand @@ -1191,10 +1191,10 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s } if (widgetsToSelect.last()) { //resize form if needed - TQRect oldFormRect( m_dbform->tqgeometry() ); + TQRect oldFormRect( m_dbform->geometry() ); TQRect newFormRect( oldFormRect ); - newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->tqgeometry().right()+1)); - newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->tqgeometry().bottom()+1)); + newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->geometry().right()+1)); + newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->geometry().bottom()+1)); if (newFormRect != oldFormRect) { //1. resize by hand m_dbform->setGeometry( newFormRect ); @@ -1205,8 +1205,8 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s group->addCommand(resizeFormCommand, true/*will be executed on CommandGroup::execute()*/); } - //remember tqgeometry of the last inserted widget - m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->tqgeometry(); + //remember geometry of the last inserted widget + m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->geometry(); } //eventually, add entire command group to active form @@ -1217,11 +1217,11 @@ KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& s //enable proper REDO usage group->resetAllowExecuteFlags(); - m_scrollView->tqrepaint(); - m_scrollView->viewport()->tqrepaint(); + m_scrollView->repaint(); + m_scrollView->viewport()->repaint(); m_scrollView->repaintContents(); m_scrollView->updateContents(); - m_scrollView->clipper()->tqrepaint(); + m_scrollView->clipper()->repaint(); m_scrollView->refreshContentsSize(); //select all inserted widgets, if multiple diff --git a/kexi/plugins/forms/kexiformview.h b/kexi/plugins/forms/kexiformview.h index 8bc1cb79..f269abf7 100644 --- a/kexi/plugins/forms/kexiformview.h +++ b/kexi/plugins/forms/kexiformview.h @@ -218,7 +218,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView TQGuardedPtr<TQWidget> m_setFocusInternalOnce; - /*! Stores tqgeometry of widget recently inserted using insertAutoFields() method. + /*! Stores geometry of widget recently inserted using insertAutoFields() method. having this information, we'r eable to compute position for a newly inserted widget in insertAutoFields() is such position has not been specified. (the position is specified when a widget is inserted with mouse drag & dropping diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp index 7ebc522f..be17c159 100644 --- a/kexi/plugins/forms/widgets/kexidbautofield.cpp +++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp @@ -22,7 +22,7 @@ #include "kexidbautofield.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <tqmetaobject.h> #include <tqapplication.h> @@ -57,7 +57,7 @@ class KexiDBAutoField::Private //!< of widgetTypeForFieldType() if widgetTypeForFieldType is Auto WidgetType widgetType_property; //!< provides widget type or Auto LabelPosition lblPosition; - TQBoxLayout *tqlayout; + TQBoxLayout *layout; TQLabel *label; TQString caption; KexiDB::Field::Type fieldTypeInternal; @@ -104,7 +104,7 @@ void KexiDBAutoField::init(const TQString &text, WidgetType type, LabelPosition pos) { d->fieldTypeInternal = KexiDB::Field::InvalidType; - d->tqlayout = 0; + d->layout = 0; m_subwidget = 0; d->label = new TQLabel(text, this); d->label->installEventFilter( this ); @@ -116,8 +116,8 @@ KexiDBAutoField::init(const TQString &text, WidgetType type, LabelPosition pos) d->widgetType_property = (type==Auto ? Text : type); //to force "differ" to be true in setWidgetType() setLabelPosition(pos); setWidgetType(type); - d->baseColor = tqpalette().active().base(); - d->textColor = tqpalette().active().text(); + d->baseColor = palette().active().base(); + d->textColor = palette().active().text(); } void @@ -222,30 +222,30 @@ void KexiDBAutoField::setLabelPosition(LabelPosition position) { d->lblPosition = position; - if(d->tqlayout) { - TQBoxLayout *lyr = d->tqlayout; - d->tqlayout = 0; + if(d->layout) { + TQBoxLayout *lyr = d->layout; + d->layout = 0; delete lyr; } if(m_subwidget) m_subwidget->show(); - //! \todo support right-to-left tqlayout where positions are inverted + //! \todo support right-to-left layout where positions are inverted if (position==Top || position==Left) { - int align = d->label->tqalignment(); + int align = d->label->alignment(); if(position == Top) { - d->tqlayout = (TQBoxLayout*) new TQVBoxLayout(this); + d->layout = (TQBoxLayout*) new TQVBoxLayout(this); align |= AlignVertical_Mask; align ^= AlignVertical_Mask; align |= AlignTop; } else { - d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this); + d->layout = (TQBoxLayout*) new TQHBoxLayout(this); align |= AlignVertical_Mask; align ^= AlignVertical_Mask; align |= AlignVCenter; } - d->label->tqsetAlignment(align); + d->label->setAlignment(align); if(d->widgetType == Boolean || (d->widgetType == Auto && fieldTypeInternal() == KexiDB::Field::InvalidType && !d->designMode)) { @@ -254,36 +254,36 @@ KexiDBAutoField::setLabelPosition(LabelPosition position) else { d->label->show(); } - d->tqlayout->addWidget(d->label, 0, position == Top ? int(TQt::AlignLeft) : 0); + d->layout->addWidget(d->label, 0, position == Top ? int(TQt::AlignLeft) : 0); if(position == Left && d->widgetType != Boolean) - d->tqlayout->addSpacing(KexiDBAutoField_SPACING); - d->tqlayout->addWidget(m_subwidget, 1); + d->layout->addSpacing(KexiDBAutoField_SPACING); + d->layout->addWidget(m_subwidget, 1); KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget); if (subwidgetInterface) { if (subwidgetInterface->appendStretchRequired(this)) - d->tqlayout->addStretch(0); + d->layout->addStretch(0); if (subwidgetInterface->subwidgetStretchRequired(this)) { - TQSizePolicy sizePolicy( m_subwidget->tqsizePolicy() ); + TQSizePolicy sizePolicy( m_subwidget->sizePolicy() ); if(position == Left) { sizePolicy.setHorData( TQSizePolicy::Minimum ); - d->label->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + d->label->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); } else { sizePolicy.setVerData( TQSizePolicy::Minimum ); - d->label->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); + d->label->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed); } - m_subwidget->tqsetSizePolicy(sizePolicy); + m_subwidget->setSizePolicy(sizePolicy); } } // if(m_subwidget) - // m_subwidget->tqsetSizePolicy(...); + // m_subwidget->setSizePolicy(...); } else { - d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this); + d->layout = (TQBoxLayout*) new TQHBoxLayout(this); d->label->hide(); - d->tqlayout->addWidget(m_subwidget); + d->layout->addWidget(m_subwidget); } - //a hack to force tqlayout to be refreshed (any better idea for this?) + //a hack to force layout to be refreshed (any better idea for this?) resize(size()+TQSize(1,0)); resize(size()-TQSize(1,0)); if (dynamic_cast<KexiDBAutoField*>((TQWidget*)m_subwidget)) { @@ -570,7 +570,7 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify) bool unbound = false; if (d->autoCaption && (d->widgetType==Auto || dataSource().isEmpty())) { if (d->designMode) - realText = TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)"); + realText = TQString::fromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)"); else realText = TQString(); unbound = true; @@ -584,7 +584,7 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify) realText = text[0].upper() + text.mid(1); if (d->widgetType!=Boolean) { //! @todo ":" suffix looks weird for checkbox; remove this condition when [x] is displayed _after_ label -//! @todo support right-to-left tqlayout where position of ":" is inverted +//! @todo support right-to-left layout where position of ":" is inverted realText += ": "; } } @@ -594,9 +594,9 @@ KexiDBAutoField::changeText(const TQString &text, bool beautify) } if (unbound) - d->label->tqsetAlignment( TQt::AlignCenter | TQt::WordBreak ); + d->label->setAlignment( TQt::AlignCenter | TQt::WordBreak ); else - d->label->tqsetAlignment( TQt::AlignCenter ); + d->label->setAlignment( TQt::AlignCenter ); // TQWidget* widgetToAlterForegroundColor; if(d->widgetType == Boolean) { static_cast<TQCheckBox*>((TQWidget*)m_subwidget)->setText(realText); @@ -650,15 +650,15 @@ KexiDBAutoField::setDataSource( const TQString &ds ) { } TQSize -KexiDBAutoField::tqsizeHint() const +KexiDBAutoField::sizeHint() const { if (d->lblPosition == NoLabel) - return m_subwidget ? m_subwidget->tqsizeHint() : TQWidget::tqsizeHint(); + return m_subwidget ? m_subwidget->sizeHint() : TQWidget::sizeHint(); TQSize s1(0,0); if (m_subwidget) - s1 = m_subwidget->tqsizeHint(); - TQSize s2(d->label->tqsizeHint()); + s1 = m_subwidget->sizeHint(); + TQSize s2(d->label->sizeHint()); if (d->lblPosition == Top) return TQSize(TQMAX(s1.width(), s2.width()), s1.height()+KexiDBAutoField_SPACING+s2.height()); @@ -682,10 +682,10 @@ KexiDBAutoField::updateInformationAboutUnboundField() if ( (d->autoCaption && (dataSource().isEmpty() || dataSourceMimeType().isEmpty())) || (!d->autoCaption && d->caption.isEmpty()) ) { - d->label->setText( TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") ); + d->label->setText( TQString::fromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") ); } // else -// d->label->setText( TQString::tqfromLatin1(name())+" "+i18n(" (unbound)") ); +// d->label->setText( TQString::fromLatin1(name())+" "+i18n(" (unbound)") ); } /*void @@ -701,7 +701,7 @@ KexiDBAutoField::paintEvent( TQPaintEvent* pe ) p.setClipRect(pe->rect()); p.setFont(d->label->font()); p.drawText(rect(), TQt::AlignLeft | TQt::WordBreak, - TQString::tqfromLatin1(name())+" "+i18n(" (unbound)")); + TQString::fromLatin1(name())+" "+i18n(" (unbound)")); } }*/ diff --git a/kexi/plugins/forms/widgets/kexidbautofield.h b/kexi/plugins/forms/widgets/kexidbautofield.h index 653e4067..809c1186 100644 --- a/kexi/plugins/forms/widgets/kexidbautofield.h +++ b/kexi/plugins/forms/widgets/kexidbautofield.h @@ -132,7 +132,7 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField : /*! @internal */ TQString fieldCaptionInternal() const; - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; virtual void setFocusPolicy ( TQ_FocusPolicy policy ); //! Reimplemented to return internal editor's color. diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp index 81c66ba6..2a25b905 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -59,10 +59,10 @@ class KexiDBComboBox::Private KexiComboBoxPopup *popup; KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle (because styles use <static_cast>) - TQSize tqsizeHint; //!< A cache for KexiDBComboBox::tqsizeHint(), + TQSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(), //!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange() KexiDB::QueryColumnInfo* visibleColumnInfo; - TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false) + TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its children (if isEditable is false) bool isEditable : 1; //!< true is the combo box is editable bool buttonPressed : 1; bool mouseOver : 1; @@ -124,7 +124,7 @@ bool KexiDBComboBox::isEditable() const void KexiDBComboBox::paintEvent( TQPaintEvent * ) { TQPainter p( this ); - TQColorGroup cg( tqpalette().active() ); + TQColorGroup cg( palette().active() ); // if ( hasFocus() ) // cg.setColor(TQColorGroup::Base, cg.highlight()); // else @@ -144,9 +144,9 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) return; } -//! @todo support reverse tqlayout +//! @todo support reverse layout //bool reverse = TQApplication::reverseLayout(); - tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg, + tqstyle().drawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg, flags, (uint)TQStyle::SC_All, (d->buttonPressed ? TQStyle::SC_ComboBoxArrow : TQStyle::SC_None ) ); @@ -159,7 +159,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) if ( hasFocus() ) { if (0==qstrcmp(tqstyle().name(), "windows")) //a hack p.fillRect( editorGeometry, cg.brush( TQColorGroup::Highlight ) ); - TQRect r( TQStyle::tqvisualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) ); + TQRect r( TQStyle::visualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) ); r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, r, cg, flags | TQStyle::Style_FocusAtBorder, TQStyleOption(cg.highlight())); @@ -170,7 +170,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) TQRect KexiDBComboBox::editorGeometry() const { - TQRect r( TQStyle::tqvisualRect( + TQRect r( TQStyle::visualRect( tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxEditField), d->paintedCombo ) ); @@ -211,20 +211,20 @@ void KexiDBComboBox::createEditor() void KexiDBComboBox::setLabelPosition(LabelPosition position) { if(m_subwidget) { - if (-1 != m_subwidget->tqmetaObject()->findProperty("frameShape", true)) + if (-1 != m_subwidget->metaObject()->findProperty("frameShape", true)) m_subwidget->setProperty("frameShape", TQVariant((int)TQFrame::NoFrame)); m_subwidget->setGeometry( editorGeometry() ); } // KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget); // update size policy // if (subwidgetInterface && subwidgetInterface->subwidgetStretchRequired(this)) { - TQSizePolicy sizePolicy( this->tqsizePolicy() ); + TQSizePolicy sizePolicy( this->sizePolicy() ); if(position == Left) sizePolicy.setHorData( TQSizePolicy::Minimum ); else sizePolicy.setVerData( TQSizePolicy::Minimum ); - //m_subwidget->tqsetSizePolicy(sizePolicy); - tqsetSizePolicy(sizePolicy); + //m_subwidget->setSizePolicy(sizePolicy); + setSizePolicy(sizePolicy); //} // } } @@ -233,7 +233,7 @@ TQRect KexiDBComboBox::buttonGeometry() const { TQRect arrowRect( tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxArrow) ); - arrowRect = TQStyle::tqvisualRect(arrowRect, d->paintedCombo); + arrowRect = TQStyle::visualRect(arrowRect, d->paintedCombo); arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style return arrowRect; } @@ -259,7 +259,7 @@ bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e) if ( arrowRect.contains( e->pos() ) ) { d->arrowPressed = TRUE; d->arrowDown = TRUE; - tqrepaint( FALSE ); + repaint( FALSE ); } } else {*/ showPopup(); @@ -490,29 +490,29 @@ int KexiDBComboBox::popupWidthHint() const void KexiDBComboBox::fontChange( const TQFont & oldFont ) { - d->tqsizeHint = TQSize(); //force rebuild the cache + d->sizeHint = TQSize(); //force rebuild the cache KexiDBAutoField::fontChange(oldFont); } void KexiDBComboBox::styleChange( TQStyle& oldStyle ) { KexiDBAutoField::styleChange( oldStyle ); - d->tqsizeHint = TQSize(); //force rebuild the cache + d->sizeHint = TQSize(); //force rebuild the cache if (m_subwidget) m_subwidget->setGeometry( editorGeometry() ); } -TQSize KexiDBComboBox::tqsizeHint() const +TQSize KexiDBComboBox::sizeHint() const { - if ( isVisible() && d->tqsizeHint.isValid() ) - return d->tqsizeHint; + if ( isVisible() && d->sizeHint.isValid() ) + return d->sizeHint; const int maxWidth = 7 * fontMetrics().width(TQChar('x')) + 18; const int maxHeight = TQMAX( fontMetrics().lineSpacing(), 14 ) + 2; - d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo, + d->sizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo, TQSize(maxWidth, maxHeight)).expandedTo(TQApplication::globalStrut())); - return d->tqsizeHint; + return d->sizeHint; } void KexiDBComboBox::editRequested() diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.h b/kexi/plugins/forms/widgets/kexidbcombobox.h index 4e780aa3..60ed78d1 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.h +++ b/kexi/plugins/forms/widgets/kexidbcombobox.h @@ -68,7 +68,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox : //! Reimpemented because to avoid taking value from the internal editor (index is taken from the popup instead) virtual bool valueChanged(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; //! Reimplemented after KexiDBAutoField: jsut sets \a cinfo without initializing a subwidget. //! Initialization is performed by \ref setVisibleColumnInfo(). @@ -111,7 +111,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox : virtual bool eventFilter( TQObject *o, TQEvent *e ); - //! \return internal editor's tqgeometry + //! \return internal editor's geometry TQRect editorGeometry() const; //! Creates editor. Reimplemented, because if the combo box is not editable, diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.cpp b/kexi/plugins/forms/widgets/kexidbdateedit.cpp index 8394ef58..339ba722 100644 --- a/kexi/plugins/forms/widgets/kexidbdateedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbdateedit.cpp @@ -19,7 +19,7 @@ */ #include "kexidbdateedit.h" -#include <tqlayout.h> +#include <layout.h> #include <tqtoolbutton.h> #include <kpopupmenu.h> #include <kdatepicker.h> @@ -37,7 +37,7 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char m_edit = new TQDateEdit(date, this); m_edit->setAutoAdvance(true); - m_edit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); + m_edit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged(const TQDate&)) ); connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateChanged(const TQDate&)) ); @@ -54,7 +54,7 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char m_datePickerPopupMenu = new KPopupMenu(0, "date_popup"); connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker())); - m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0); + m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::currentDate(), 0); KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable"); if (dt) @@ -64,9 +64,9 @@ KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *parent, const char m_datePickerPopupMenu->insertItem(m_datePicker); btn->setPopup(m_datePickerPopupMenu); - TQHBoxLayout* tqlayout = new TQHBoxLayout(this); - tqlayout->addWidget(m_edit, 1); - tqlayout->addWidget(btn, 0); + TQHBoxLayout* layout = new TQHBoxLayout(this); + layout->addWidget(m_edit, 1); + layout->addWidget(btn, 0); setFocusProxy(m_edit); } diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp index ea9dede7..6f479c69 100644 --- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp @@ -21,7 +21,7 @@ #include "kexidbdatetimeedit.h" #include <tqtoolbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <kpopupmenu.h> #include <kdatepicker.h> #include <kdatetbl.h> @@ -36,7 +36,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par m_dateEdit = new TQDateEdit(datetime.date(), this); m_dateEdit->setAutoAdvance(true); - m_dateEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); + m_dateEdit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); // m_dateEdit->setFixedWidth( TQFontMetrics(m_dateEdit->font()).width("8888-88-88___") ); connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged())); connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateTimeChanged())); @@ -48,7 +48,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par m_timeEdit = new TQTimeEdit(datetime.time(), this);; m_timeEdit->setAutoAdvance(true); - m_timeEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); + m_timeEdit->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding); connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged())); connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SIGNAL(dateTimeChanged())); @@ -61,7 +61,7 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par m_datePickerPopupMenu = new KPopupMenu(0, "date_popup"); connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker())); - m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0); + m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::currentDate(), 0); KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable"); if (dt) @@ -71,11 +71,11 @@ KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *par m_datePickerPopupMenu->insertItem(m_datePicker); btn->setPopup(m_datePickerPopupMenu); - TQHBoxLayout* tqlayout = new TQHBoxLayout(this); - tqlayout->addWidget(m_dateEdit, 0); - tqlayout->addWidget(btn, 0); - tqlayout->addWidget(m_timeEdit, 0); - //tqlayout->addStretch(1); + TQHBoxLayout* layout = new TQHBoxLayout(this); + layout->addWidget(m_dateEdit, 0); + layout->addWidget(btn, 0); + layout->addWidget(m_timeEdit, 0); + //layout->addStretch(1); setFocusProxy(m_dateEdit); } diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index 88ddf93f..17242953 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -125,13 +125,13 @@ KexiDBForm::~KexiDBForm() KexiDataAwareObjectInterface* KexiDBForm::dataAwareObject() const { return d->dataAwareObject; } -//tqrepaint all tqchildren widgets +//repaint all children widgets static void repaintAll(TQWidget *w) { TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING); TQObjectListIt it(*list); for (TQObject *obj; (obj=it.current()); ++it ) { - TQT_TQWIDGET(obj)->tqrepaint(); + TQT_TQWIDGET(obj)->repaint(); } delete list; } @@ -148,7 +148,7 @@ void KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type) { TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -192,7 +192,7 @@ void KexiDBForm::clearForm() { TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -216,7 +216,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi toPoint = to->parentWidget()->mapTo(this, to->pos()); TQPainter p; - p.tqbegin(TQT_TQPAINTDEVICE(this), true); + p.begin(TQT_TQPAINTDEVICE(this), true); bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); @@ -234,7 +234,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi TQPixmap pix2 = TQPixmap::grabWidget(to); if((from != this) && (to != this)) - p.drawLine( from->parentWidget()->mapTo(this, from->tqgeometry().center()), to->parentWidget()->mapTo(this, to->tqgeometry().center()) ); + p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) ); p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1); p.drawPixmap(toPoint.x(), toPoint.y(), pix2); @@ -268,7 +268,7 @@ KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &poi } TQSize -KexiDBForm::tqsizeHint() const +KexiDBForm::sizeHint() const { //todo: find better size (user configured?) return TQSize(400,300); @@ -304,7 +304,7 @@ TQPtrList<TQWidget>* KexiDBForm::orderedDataAwareWidgets() const void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) { TQWidget *fromWidget = 0; - //TQWidget *tqtopLevelWidget = form->widget()->tqtopLevelWidget(); + //TQWidget *topLevelWidget = form->widget()->topLevelWidget(); //js form->updateTabStopsOrder(); //certain widgets can have now updated focusPolicy properties, fix this uint numberOfDataAwareWidgets = 0; // if (d->orderedFocusWidgets.isEmpty()) { @@ -313,18 +313,18 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) if (it.current()->widget()->focusPolicy() & TQ_TabFocus) { //this widget has tab focus: it.current()->widget()->installEventFilter(this); - //also filter events for data-aware tqchildren of this widget (i.e. KexiDBAutoField's editors) - TQObjectList *tqchildren = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING); - for (TQObjectListIt tqchildrenIt(*tqchildren); tqchildrenIt.current(); ++tqchildrenIt) { - // if (dynamic_cast<KexiFormDataItemInterface*>(tqchildrenIt.current())) { + //also filter events for data-aware children of this widget (i.e. KexiDBAutoField's editors) + TQObjectList *children = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING); + for (TQObjectListIt childrenIt(*children); childrenIt.current(); ++childrenIt) { + // if (dynamic_cast<KexiFormDataItemInterface*>(childrenIt.current())) { kexipluginsdbg << "KexiDBForm::updateTabStopsOrder(): also adding '" - << tqchildrenIt.current()->className() << " " << tqchildrenIt.current()->name() + << childrenIt.current()->className() << " " << childrenIt.current()->name() << "' child to filtered widgets" << endl; - //it.current()->widget()->installEventFilter(TQT_TQWIDGET(tqchildrenIt.current())); - tqchildrenIt.current()->installEventFilter(this); + //it.current()->widget()->installEventFilter(TQT_TQWIDGET(childrenIt.current())); + childrenIt.current()->installEventFilter(this); // } } - delete tqchildren; + delete children; if (fromWidget) { kexipluginsdbg << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name() << " -> " << it.current()->widget()->name() << endl; @@ -361,7 +361,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form) } fromWidget = it.current(); } -// SET_FOCUS_USING_REASON(tqfocusWidget(), TQFocusEvent::Tab); +// SET_FOCUS_USING_REASON(focusWidget(), TQFocusEvent::Tab); }*/ } @@ -399,7 +399,7 @@ bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e ) bool tab = ke->state() == Qt::NoButton && key == TQt::Key_Tab; bool backtab = ((ke->state() == Qt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab) || (ke->state() == TQt::ShiftButton && key == TQt::Key_Tab); - TQObject *o = watched; //tqfocusWidget(); + TQObject *o = watched; //focusWidget(); TQWidget* realWidget = dynamic_cast<TQWidget*>(o); //will beused below (for tab/backtab handling) if (!tab && !backtab) { diff --git a/kexi/plugins/forms/widgets/kexidbform.h b/kexi/plugins/forms/widgets/kexidbform.h index fc0d25c2..29798947 100644 --- a/kexi/plugins/forms/widgets/kexidbform.h +++ b/kexi/plugins/forms/widgets/kexidbform.h @@ -69,7 +69,7 @@ class KEXIFORMUTILS_EXPORT KexiDBForm : virtual void clearForm(); virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; bool autoTabStops() const; diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp index 4165c000..23f079ae 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp +++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp @@ -23,7 +23,7 @@ #include <tqapplication.h> #include <tqpixmap.h> #include <tqstyle.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <tqtooltip.h> #include <tqimage.h> #include <tqbuffer.h> @@ -67,7 +67,7 @@ static TQPixmap* KexiDBImageBox_pmSmall = 0; KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *parent, const char *name ) : KexiFrame( parent, name, TQt::WNoAutoErase ) , KexiFormDataItemInterface() - , m_tqalignment(TQt::AlignAuto|TQt::AlignTop) + , m_alignment(TQt::AlignAuto|TQt::AlignTop) , m_designMode(designMode) , m_readOnly(false) , m_scaledContents(false) @@ -80,7 +80,7 @@ KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *parent, const char *n , m_insideSetPalette(false) { installEventFilter(this); - tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred); + setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred); //setup popup menu m_popupMenu = new KexiImageContextMenu(this); @@ -176,7 +176,7 @@ void KexiDBImageBox::setValueInternal( const TQVariant& add, bool removeOld, boo m_valueMimeType = TQString(); m_pixmap = TQPixmap(); } - tqrepaint(); + repaint(); } void KexiDBImageBox::setInvalidState( const TQString& displayText ) @@ -242,7 +242,7 @@ void KexiDBImageBox::setPixmapId(uint id) if (m_insideSetData) //avoid recursion return; setData(KexiBLOBBuffer::self()->objectForId( id, /*unstored*/false )); - tqrepaint(); + repaint(); } uint KexiDBImageBox::storedPixmapId() const @@ -257,7 +257,7 @@ uint KexiDBImageBox::storedPixmapId() const void KexiDBImageBox::setStoredPixmapId(uint id) { setData(KexiBLOBBuffer::self()->objectForId( id, /*stored*/true )); - tqrepaint(); + repaint(); } bool KexiDBImageBox::hasScaledContents() const @@ -276,14 +276,14 @@ void KexiDBImageBox::setScaledContents(bool set) { //todo m_pixmapLabel->setScaledContents(set); m_scaledContents = set; - tqrepaint(); + repaint(); } void KexiDBImageBox::setKeepAspectRatio(bool set) { m_keepAspectRatio = set; if (m_scaledContents) - tqrepaint(); + repaint(); } TQWidget* KexiDBImageBox::widget() @@ -331,7 +331,7 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url) if (!h) return; setData(h); - tqrepaint(); + repaint(); } else { //db-aware @@ -401,14 +401,14 @@ void KexiDBImageBox::handleCutAction() void KexiDBImageBox::handleCopyAction() { - tqApp->tqclipboard()->setPixmap(pixmap(), TQClipboard::Clipboard); + tqApp->clipboard()->setPixmap(pixmap(), TQClipboard::Clipboard); } void KexiDBImageBox::handlePasteAction() { if (isReadOnly() || (!m_designMode && !hasFocus())) return; - TQPixmap pm( tqApp->tqclipboard()->pixmap(TQClipboard::Clipboard) ); + TQPixmap pm( tqApp->clipboard()->pixmap(TQClipboard::Clipboard) ); // if (!pm.isNull()) // setValueInternal(pm, true); if (dataSource().isEmpty()) { @@ -429,7 +429,7 @@ void KexiDBImageBox::handlePasteAction() } } - tqrepaint(); + repaint(); if (!dataSource().isEmpty()) { // emit pixmapChanged(); signalValueChanged(); @@ -455,7 +455,7 @@ void KexiDBImageBox::clear() //! @todo emit signal for setting "dirty" flag within the design // m_pixmap = TQPixmap(); //will be loaded on demand - tqrepaint(); + repaint(); if (!dataSource().isEmpty()) { // emit pixmapChanged();//valueChanged(data()); signalValueChanged(); @@ -522,17 +522,17 @@ void KexiDBImageBox::slotToggled(bool on) TQRect screen = tqApp->desktop()->availableGeometry( m_chooser ); TQPoint p; if ( TQApplication::reverseLayout() ) { - if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() ) + if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() ) p = m_chooser->mapToGlobal( m_chooser->rect().bottomRight() ); else - p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) ); - p.rx() -= m_popupMenu->tqsizeHint().width(); + p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->sizeHint().height() ) ); + p.rx() -= m_popupMenu->sizeHint().width(); } else { - if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() ) + if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() ) p = m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ); else - p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) ); + p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->sizeHint().height() ) ); } if (!m_popupMenu->isVisible() && on) { m_popupMenu->exec( p, -1 ); @@ -573,7 +573,7 @@ void KexiDBImageBox::updateActionStrings() (see doc/dev/settings.txt) */ beautifiedImageBoxName = beautifiedImageBoxName[0].upper() + beautifiedImageBoxName.mid(1); } - TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").tqarg(beautifiedImageBoxName)); + TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").arg(beautifiedImageBoxName)); } } } @@ -610,11 +610,11 @@ void KexiDBImageBox::setDataSource( const TQString &ds ) } if (!m_paletteBackgroundColorChanged && parentWidget()) { KexiFrame::setPaletteBackgroundColor( - dataSource().isEmpty() ? parentWidget()->paletteBackgroundColor() : tqpalette().active().base() ); + dataSource().isEmpty() ? parentWidget()->paletteBackgroundColor() : palette().active().base() ); } } -TQSize KexiDBImageBox::tqsizeHint() const +TQSize KexiDBImageBox::sizeHint() const { if (pixmap().isNull()) return TQSize(80, 80); @@ -640,7 +640,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (m_designMode && pixmap().isNull()) { TQPixmap pm(size()-TQSize(m, m)); TQPainter p2; - p2.tqbegin(TQT_TQPAINTDEVICE(&pm), this); + p2.begin(TQT_TQPAINTDEVICE(&pm), this); p2.fillRect(0,0,width(),height(), bg); updatePixmap(); @@ -665,7 +665,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) p2.setPen( KexiUtils::contrastColor( bg ) ); p2.drawText(pm.rect(), TQt::AlignCenter, dataSource().isEmpty() - ? TQString::tqfromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image") + ? TQString::fromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image") : dataSource()); p2.end(); bitBlt(this, m, m, &pm); @@ -678,7 +678,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) //clearing needed here because we may need to draw a pixmap with transparency p.fillRect(0,0,width(),height(), bg); - KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_tqalignment, + KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_alignment, m_scaledContents, m_keepAspectRatio ); } KexiFrame::drawFrame( &p ); @@ -687,7 +687,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (!m_designMode && !dataSource().isEmpty() && hasFocus() && (!m_chooser || !m_chooser->isVisible())) { tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, tqstyle().subRect(TQStyle::SR_PushButtonContents, this), - tqpalette().active() ); + palette().active() ); } } @@ -697,7 +697,7 @@ void KexiDBImageBox::paintEvent( TQPaintEvent *pe ) if (oldPalette.active().background()!=palette().active().background()) { delete KexiDBImageBox_pm; KexiDBImageBox_pm = 0; - tqrepaint(); + repaint(); } }*/ @@ -715,11 +715,11 @@ void KexiDBImageBox::updatePixmap() } } -void KexiDBImageBox::tqsetAlignment(int tqalignment) +void KexiDBImageBox::setAlignment(int alignment) { - m_tqalignment = tqalignment; + m_alignment = alignment; if (!m_scaledContents || m_keepAspectRatio) - tqrepaint(); + repaint(); } void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle) @@ -737,7 +737,7 @@ void KexiDBImageBox::resizeEvent( TQResizeEvent * e ) { KexiFrame::resizeEvent(e); if (m_chooser) { - TQSize s( m_chooser->tqsizeHint() ); + TQSize s( m_chooser->sizeHint() ); TQSize margin( realLineWidth(), realLineWidth() ); s.setHeight( height() - 2*margin.height() ); s = s.boundedTo( size()-2*margin ); @@ -839,7 +839,7 @@ bool KexiDBImageBox::eventFilter( TQObject * watched, TQEvent * e ) { if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_chooser)) { //we're watching chooser as well because it's a focus proxy even if invisible if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut || e->type()==TQEvent::MouseButtonPress) { - update(); //to tqrepaint focus rect + update(); //to repaint focus rect } } // hide popup menu as soon as it loses focus diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h index 32b4e9b1..860ee4c6 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.h +++ b/kexi/plugins/forms/widgets/kexidbimagebox.h @@ -48,7 +48,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true ) TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents ) TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio ) - TQ_PROPERTY( int tqalignment READ tqalignment WRITE tqsetAlignment ) + TQ_PROPERTY( int alignment READ alignment WRITE setAlignment ) // TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false ) // TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy ) TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible ) @@ -95,11 +95,11 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : // bool designMode() const { return m_designMode; } - int tqalignment() const { return m_tqalignment; } + int alignment() const { return m_alignment; } bool keepAspectRatio() const { return m_keepAspectRatio; } - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; KexiImageContextMenu *contextMenu() const; @@ -158,7 +158,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : void setScaledContents(bool set); - void tqsetAlignment(int tqalignment); + void setAlignment(int alignment); void setKeepAspectRatio(bool set); @@ -258,7 +258,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : //moved KAction *m_insertFromFileAction, *m_saveAsAction, *m_cutAction, *m_copyAction, *m_pasteAction, // *m_deleteAction, *m_propertiesAction; // TQTimer m_clickTimer; - int m_tqalignment; + int m_alignment; TQ_FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal() bool m_designMode : 1; bool m_readOnly : 1; diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp index 2d09429e..93f35027 100644 --- a/kexi/plugins/forms/widgets/kexidblabel.cpp +++ b/kexi/plugins/forms/widgets/kexidblabel.cpp @@ -63,10 +63,10 @@ KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent ) : TQLabel( parent ) , m_parentLabel(parent) { - int a = tqalignment() | TQt::WordBreak; + int a = alignment() | TQt::WordBreak; a &= (0xffffff ^ TQt::AlignVertical_Mask); a |= TQt::AlignTop; - tqsetAlignment( a ); + setAlignment( a ); updateFrame(); } @@ -132,7 +132,7 @@ TQImage KexiDBInternalLabel::makeShadow( const TQImage& textImage, double realOpacity = SHADOW_OPACITY + TQMIN(50.0/double(256.0-tqGray(bgColor.rgb())), 50.0); //int _h, _s, _v; //.getHsv( &_h, &_s, &_v ); - if (tqcolorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white + if (colorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white realOpacity += 50.0; result.fill( (int)realOpacity ); result.setAlphaBuffer( true ); @@ -177,7 +177,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() { /*! * Backup the default color used to draw text. */ - const TQColor textColor = tqcolorGroup().foreground(); + const TQColor textColor = colorGroup().foreground(); /*! * Temporary storage for the generated shadow @@ -232,7 +232,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() { TQMIN( m_shadowRect.y() + ( m_shadowRect.height() * 3 / 2 ), shadowImage.height() ) ) ); shadowImage = makeShadow( shadowImage, - tqGray( tqcolorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black, + tqGray( colorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black, m_shadowRect ); if (shadowImage.isNull()) return KPixmap(); @@ -424,9 +424,9 @@ void KexiDBLabel::init() m_hasFocusableWidget = false; d->internalLabel = new KexiDBInternalLabel( this ); d->internalLabel->hide(); - d->frameColor = tqpalette().active().foreground(); + d->frameColor = palette().active().foreground(); - tqsetAlignment( d->internalLabel->tqalignment() ); + setAlignment( d->internalLabel->alignment() ); } void KexiDBLabel::updatePixmapLater() { @@ -453,7 +453,7 @@ void KexiDBLabel::updatePixmap() { d->internalLabel->setText( text() ); d->internalLabel->setFixedSize( size() ); d->internalLabel->setPalette( palette() ); - d->internalLabel->tqsetAlignment( tqalignment() ); + d->internalLabel->setAlignment( alignment() ); // d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap KPixmap shadowPixmap = d->internalLabel->getShadowPixmap(); if (shadowPixmap.isNull()) @@ -461,7 +461,7 @@ void KexiDBLabel::updatePixmap() { d->shadowPixmap = shadowPixmap; d->shadowPosition = d->internalLabel->m_shadowRect.topLeft(); d->pixmapDirty = false; - tqrepaint(); + repaint(); } void KexiDBLabel::paintEvent( TQPaintEvent* e ) @@ -491,7 +491,7 @@ void KexiDBLabel::paintEvent( TQPaintEvent* e ) p.drawPixmap( d->internalLabel->m_shadowRect.topLeft(), d->shadowPixmap, clipRect ); } } - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), false ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), false ); TQLabel::paintEvent( e ); } @@ -577,7 +577,7 @@ void KexiDBLabel::setShadowEnabled( bool state ) { d->pixmapDirty = true; if (state) d->internalLabel->updateFrame(); - tqrepaint(); + repaint(); } void KexiDBLabel::resizeEvent( TQResizeEvent* e ) { @@ -636,7 +636,7 @@ void KexiDBLabel::setText( const TQString& text ) { TQLabel::setText( text ); //This is necessary for KexiFormDataItemInterface valueChanged(); - tqrepaint(); + repaint(); } bool KexiDBLabel::shadowEnabled() const diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp index 5bb74e22..815adca9 100644 --- a/kexi/plugins/forms/widgets/kexidblineedit.cpp +++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp @@ -331,14 +331,14 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo) /*todo void KexiDBLineEdit::paint( TQPainter *p ) { - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); }*/ void KexiDBLineEdit::paintEvent ( TQPaintEvent *pe ) { KLineEdit::paintEvent( pe ); TQPainter p(this); - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); } bool KexiDBLineEdit::event( TQEvent * e ) diff --git a/kexi/plugins/forms/widgets/kexidbsubform.cpp b/kexi/plugins/forms/widgets/kexidbsubform.cpp index 9c24df4a..8b4149a9 100644 --- a/kexi/plugins/forms/widgets/kexidbsubform.cpp +++ b/kexi/plugins/forms/widgets/kexidbsubform.cpp @@ -33,7 +33,7 @@ KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *parentForm, TQWidget *parent, : TQScrollView(parent, name), m_parentForm(parentForm), m_form(0), m_widget(0) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); + viewport()->setPaletteBackgroundColor(colorGroup().mid()); } /* void diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp index c4cbe4d0..b6ab6b03 100644 --- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp @@ -145,7 +145,7 @@ void KexiDBTextEdit::paintEvent ( TQPaintEvent *pe ) { KTextEdit::paintEvent( pe ); TQPainter p(this); - KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() ); + KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() ); } TQPopupMenu * KexiDBTextEdit::createPopupMenu(const TQPoint & pos) diff --git a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp index b136fa0d..3afa0e47 100644 --- a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp @@ -21,7 +21,7 @@ #include "kexidbtimeedit.h" #include <tqtoolbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqpainter.h> #include <kpopupmenu.h> diff --git a/kexi/plugins/forms/widgets/kexiframe.cpp b/kexi/plugins/forms/widgets/kexiframe.cpp index 09266ae4..b64d6edf 100644 --- a/kexi/plugins/forms/widgets/kexiframe.cpp +++ b/kexi/plugins/forms/widgets/kexiframe.cpp @@ -48,7 +48,7 @@ KexiFrame::KexiFrame( TQWidget * parent, const char * name, WFlags f ) , d( new Private() ) { //defaults - d->frameColor = tqpalette().active().foreground(); + d->frameColor = palette().active().foreground(); //! @todo obtain these defaults from current template's style... setLineWidth(2); setFrameStyle(TQFrame::StyledPanel|TQFrame::Raised); diff --git a/kexi/plugins/forms/widgets/kexiframe.h b/kexi/plugins/forms/widgets/kexiframe.h index 2f6ca562..ce51766c 100644 --- a/kexi/plugins/forms/widgets/kexiframe.h +++ b/kexi/plugins/forms/widgets/kexiframe.h @@ -53,7 +53,7 @@ class KEXIFORMUTILS_EXPORT KexiFrame : public TQFrame GroupBoxPanel = TQFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style }; Shape frameShape() const; - void setFrameShape( KexiFrame::Shape tqshape ); + void setFrameShape( KexiFrame::Shape shape ); Shadow frameShadow() const; void setFrameShadow( KexiFrame::Shadow shadow ); #endif diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp index 331909ee..22a71001 100644 --- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp +++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp @@ -26,7 +26,7 @@ void ClassName::drawFrame( TQPainter *p ) if ( frameShadow() == Plain ) qDrawPlainRect( p, frameRect(), d->frameColor, lineWidth() ); else - qDrawShadeRect( p, frameRect(), tqcolorGroup(), frameShadow() == TQFrame::Sunken, + qDrawShadeRect( p, frameRect(), colorGroup(), frameShadow() == TQFrame::Sunken, lineWidth(), midLineWidth() ); } else { @@ -69,9 +69,9 @@ ClassName::Shape ClassName::frameShape() const return d->frameShape; } -void ClassName::setFrameShape( ClassName::Shape tqshape ) +void ClassName::setFrameShape( ClassName::Shape shape ) { - d->frameShape = tqshape; + d->frameShape = shape; update(); } @@ -98,7 +98,7 @@ void TQFrame::drawFrame( TQPainter *p ) p->setPen( black ); // #### p->drawRect( r ); //### a bit too simple #else - const TQColorGroup & g = tqcolorGroup(); + const TQColorGroup & g = colorGroup(); #ifndef TQT_NO_STYLE TQStyleOption opt(lineWidth(),midLineWidth()); @@ -162,24 +162,24 @@ void TQFrame::drawFrame( TQPainter *p ) case PopupPanel: #ifndef TQT_NO_STYLE { - int vextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this), - hextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this); + int vextra = style().pixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this), + hextra = style().pixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this); if(vextra > 0 || hextra > 0) { TQRect fr = frameRect(); int fw = frameWidth(); if(vextra > 0) { - style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, TQRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra), g, flags, opt); - style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this, TQRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra), g, flags, opt); } if(hextra > 0) { - style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, TQRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), g, flags, opt); - style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, + style().drawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this, TQRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra), g, flags, opt); } |