From 11191ef0b9908604d1d7aaca382b011ef22c454c Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:12:30 -0600 Subject: Rename old tq methods that no longer need a unique name --- kexi/plugins/forms/kexiactionselectiondialog.cpp | 42 +++++++++++------------ kexi/plugins/forms/kexiactionselectiondialog.h | 2 +- kexi/plugins/forms/kexidataprovider.cpp | 6 ++-- kexi/plugins/forms/kexidatasourcepage.cpp | 18 +++++----- kexi/plugins/forms/kexidbfactory.cpp | 6 ++-- kexi/plugins/forms/kexiformpart.cpp | 2 +- kexi/plugins/forms/kexiformscrollview.cpp | 2 +- kexi/plugins/forms/kexiformview.cpp | 20 +++++------ kexi/plugins/forms/widgets/kexidbautofield.cpp | 32 ++++++++--------- kexi/plugins/forms/widgets/kexidbautofield.h | 2 +- kexi/plugins/forms/widgets/kexidbcombobox.cpp | 32 ++++++++--------- kexi/plugins/forms/widgets/kexidbcombobox.h | 2 +- kexi/plugins/forms/widgets/kexidbdateedit.cpp | 4 +-- kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp | 6 ++-- kexi/plugins/forms/widgets/kexidbform.cpp | 8 ++--- kexi/plugins/forms/widgets/kexidbform.h | 2 +- kexi/plugins/forms/widgets/kexidbimagebox.cpp | 20 +++++------ kexi/plugins/forms/widgets/kexidbimagebox.h | 6 ++-- kexi/plugins/forms/widgets/kexidblabel.cpp | 12 +++---- kexi/plugins/forms/widgets/kexidbsubform.cpp | 2 +- kexi/plugins/forms/widgets/kexiframeutils_p.cpp | 16 ++++----- 21 files changed, 121 insertions(+), 121 deletions(-) (limited to 'kexi/plugins/forms') diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp index 61585840..921432b6 100644 --- a/kexi/plugins/forms/kexiactionselectiondialog.cpp +++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp @@ -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) @@ -583,13 +583,13 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) if (!d->kactionPageWidget) { //create lbl+list view with a vtqlayout 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), 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); @@ -607,14 +607,14 @@ void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item) if (!d->currentFormActionsPageWidget) { //create lbl+list view with a vtqlayout 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); + 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 @@ -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( 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..8ae592d9 100644 --- a/kexi/plugins/forms/kexidataprovider.cpp +++ b/kexi/plugins/forms/kexidataprovider.cpp @@ -228,7 +228,7 @@ void KexiFormDataProvider::invalidateDataSources( const TQDict& 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& 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& invalidSou for (TQPtrListIterator 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..5b7e46db 100644 --- a/kexi/plugins/forms/kexidatasourcepage.cpp +++ b/kexi/plugins/forms/kexidatasourcepage.cpp @@ -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..e882c082 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") @@ -497,7 +497,7 @@ KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesign } if ( classname == "KexiDBLabel" ) - w->resize(w->tqsizeHint()); + w->resize(w->sizeHint()); } else { diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp index 9c4e3173..84c50efd 100644 --- a/kexi/plugins/forms/kexiformpart.cpp +++ b/kexi/plugins/forms/kexiformpart.cpp @@ -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..790064e2 100644 --- a/kexi/plugins/forms/kexiformscrollview.cpp +++ b/kexi/plugins/forms/kexiformscrollview.cpp @@ -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(w); diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp index 01ec080f..3b7968de 100644 --- a/kexi/plugins/forms/kexiformview.cpp +++ b/kexi/plugins/forms/kexiformview.cpp @@ -345,8 +345,8 @@ 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 @@ -371,7 +371,7 @@ void KexiFormView::updateValuesForSubproperties() static void setUnsavedBLOBIdsForDataViewMode( TQWidget* widget, const TQMap& 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 it(*m_dbform->orderedFocusWidgets()); @@ -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; } @@ -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 diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp index 7ebc522f..939d9b91 100644 --- a/kexi/plugins/forms/widgets/kexidbautofield.cpp +++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp @@ -245,7 +245,7 @@ KexiDBAutoField::setLabelPosition(LabelPosition position) 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)) { @@ -263,20 +263,20 @@ KexiDBAutoField::setLabelPosition(LabelPosition position) if (subwidgetInterface->appendStretchRequired(this)) d->tqlayout->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); @@ -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; @@ -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((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..231003cf 100644 --- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp +++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp @@ -59,7 +59,7 @@ class KexiDBComboBox::Private KexiComboBoxPopup *popup; KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle (because styles use ) - 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 *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false) @@ -146,7 +146,7 @@ void KexiDBComboBox::paintEvent( TQPaintEvent * ) //! @todo support reverse tqlayout //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((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; } @@ -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..dec6da1d 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(). diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.cpp b/kexi/plugins/forms/widgets/kexidbdateedit.cpp index 8394ef58..3058f02c 100644 --- a/kexi/plugins/forms/widgets/kexidbdateedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbdateedit.cpp @@ -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(m_datePicker, "KDateTable"); if (dt) diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp index ea9dede7..629a4bca 100644 --- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp +++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp @@ -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(m_datePicker, "KDateTable"); if (dt) diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp index 88ddf93f..bcf28a58 100644 --- a/kexi/plugins/forms/widgets/kexidbform.cpp +++ b/kexi/plugins/forms/widgets/kexidbform.cpp @@ -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* 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()) { @@ -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(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..3ff18406 100644 --- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp +++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp @@ -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); @@ -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 ); @@ -614,7 +614,7 @@ void KexiDBImageBox::setDataSource( const TQString &ds ) } } -TQSize KexiDBImageBox::tqsizeHint() const +TQSize KexiDBImageBox::sizeHint() const { if (pixmap().isNull()) return TQSize(80, 80); @@ -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); @@ -715,7 +715,7 @@ void KexiDBImageBox::updatePixmap() } } -void KexiDBImageBox::tqsetAlignment(int tqalignment) +void KexiDBImageBox::setAlignment(int tqalignment) { m_tqalignment = tqalignment; if (!m_scaledContents || m_keepAspectRatio) @@ -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 ); diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h index 32b4e9b1..a7adb3c8 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 tqalignment READ tqalignment 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 ) @@ -99,7 +99,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox : 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 tqalignment); void setKeepAspectRatio(bool set); diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp index 2d09429e..2f653f00 100644 --- a/kexi/plugins/forms/widgets/kexidblabel.cpp +++ b/kexi/plugins/forms/widgets/kexidblabel.cpp @@ -66,7 +66,7 @@ KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent ) int a = tqalignment() | 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(); @@ -426,7 +426,7 @@ void KexiDBLabel::init() d->internalLabel->hide(); d->frameColor = tqpalette().active().foreground(); - tqsetAlignment( d->internalLabel->tqalignment() ); + setAlignment( d->internalLabel->tqalignment() ); } 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( tqalignment() ); // d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap KPixmap shadowPixmap = d->internalLabel->getShadowPixmap(); if (shadowPixmap.isNull()) 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/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp index 331909ee..7adfbaa8 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 { @@ -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); } -- cgit v1.2.1