diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:12:30 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:12:30 -0600 |
commit | 11191ef0b9908604d1d7aaca382b011ef22c454c (patch) | |
tree | d38f0ccd8bfcc9756f5cfc42fb2ad1dad351e6aa /kexi/widget | |
parent | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (diff) | |
download | koffice-11191ef0b9908604d1d7aaca382b011ef22c454c.tar.gz koffice-11191ef0b9908604d1d7aaca382b011ef22c454c.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kexi/widget')
50 files changed, 216 insertions, 216 deletions
diff --git a/kexi/widget/kexicharencodingcombobox.cpp b/kexi/widget/kexicharencodingcombobox.cpp index ff277e7d..de6254b7 100644 --- a/kexi/widget/kexicharencodingcombobox.cpp +++ b/kexi/widget/kexicharencodingcombobox.cpp @@ -31,12 +31,12 @@ KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox( : KComboBox( parent, "KexiCharacterEncodingComboBox" ) , m_defaultEncodingAdded(false) { - TQString defaultEncoding(TQString::tqfromLatin1(KGlobal::locale()->encoding())); + TQString defaultEncoding(TQString::fromLatin1(KGlobal::locale()->encoding())); TQString defaultEncodingDescriptiveName; TQString _selectedEncoding = selectedEncoding; if (_selectedEncoding.isEmpty()) - _selectedEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); + _selectedEncoding = TQString::fromLatin1(KGlobal::locale()->encoding()); TQStringList descEncodings(KGlobal::charsets()->descriptiveEncodingNames()); TQStringList::ConstIterator it = descEncodings.constBegin(); @@ -84,7 +84,7 @@ KexiCharacterEncodingComboBox::~KexiCharacterEncodingComboBox() TQString KexiCharacterEncodingComboBox::selectedEncoding() const { if (defaultEncodingSelected()) { - return TQString::tqfromLatin1(KGlobal::locale()->encoding()); + return TQString::fromLatin1(KGlobal::locale()->encoding()); } else { return KGlobal::charsets()->encodingForName( currentText() ); diff --git a/kexi/widget/kexicustompropertyfactory_p.cpp b/kexi/widget/kexicustompropertyfactory_p.cpp index 20e85b04..e06b084b 100644 --- a/kexi/widget/kexicustompropertyfactory_p.cpp +++ b/kexi/widget/kexicustompropertyfactory_p.cpp @@ -50,7 +50,7 @@ void KexiImagePropertyEdit::selectPixmap() ObjectTreeItem *item = m_manager->activeForm()->objectTree()->lookup(m_manager->activeForm()->selectedWidget()->name()); TQString name = item ? item->pixmapName(property()->name()) : ""; - PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, tqtopLevelWidget() ); + PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, topLevelWidget() ); if(dialog.exec() == TQDialog::Accepted) { setValue(dialog.pixmap(), true); item->setPixmapName(property()->name(), dialog.pixmapName()); diff --git a/kexi/widget/kexidataawareview.cpp b/kexi/widget/kexidataawareview.cpp index 113f8be4..c6eb39d3 100644 --- a/kexi/widget/kexidataawareview.cpp +++ b/kexi/widget/kexidataawareview.cpp @@ -59,9 +59,9 @@ void KexiDataAwareView::init( TQWidget* viewWidget, KexiSharedActionClient* acti TQVBoxLayout *box = new TQVBoxLayout(this); box->addWidget(m_internalView); - setMinimumSize(m_internalView->tqminimumSizeHint().width(), - m_internalView->tqminimumSizeHint().height()); - resize( preferredSizeHint( m_internalView->tqsizeHint() ) ); + setMinimumSize(m_internalView->minimumSizeHint().width(), + m_internalView->minimumSizeHint().height()); + resize( preferredSizeHint( m_internalView->sizeHint() ) ); setFocusProxy(m_internalView); if (!noDataAware) { @@ -165,14 +165,14 @@ TQWidget* KexiDataAwareView::mainWidget() return m_internalView; } -TQSize KexiDataAwareView::tqminimumSizeHint() const +TQSize KexiDataAwareView::minimumSizeHint() const { - return m_internalView ? m_internalView->tqminimumSizeHint() : TQSize(0,0);//KexiViewBase::tqminimumSizeHint(); + return m_internalView ? m_internalView->minimumSizeHint() : TQSize(0,0);//KexiViewBase::minimumSizeHint(); } -TQSize KexiDataAwareView::tqsizeHint() const +TQSize KexiDataAwareView::sizeHint() const { - return m_internalView ? m_internalView->tqsizeHint() : TQSize(0,0);//KexiViewBase::tqsizeHint(); + return m_internalView ? m_internalView->sizeHint() : TQSize(0,0);//KexiViewBase::sizeHint(); } void KexiDataAwareView::updateActions(bool activated) diff --git a/kexi/widget/kexidataawareview.h b/kexi/widget/kexidataawareview.h index 5cc76e97..8a787bd7 100644 --- a/kexi/widget/kexidataawareview.h +++ b/kexi/widget/kexidataawareview.h @@ -49,9 +49,9 @@ class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase, TQWidget* mainWidget(); - virtual TQSize tqminimumSizeHint() const; + virtual TQSize minimumSizeHint() const; - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; KexiDataAwareObjectInterface* dataAwareObject() const { return m_dataAwareObject; } diff --git a/kexi/widget/kexidbconnectionwidget.cpp b/kexi/widget/kexidbconnectionwidget.cpp index 78b67c8d..1f9006fd 100644 --- a/kexi/widget/kexidbconnectionwidget.cpp +++ b/kexi/widget/kexidbconnectionwidget.cpp @@ -95,7 +95,7 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( TQWidget* parent, const char* n hbox->addWidget( d->btnSaveChanges ); hbox->addSpacing( KDialogBase::spacingHint() ); TQWidget::setTabOrder(titleEdit, d->btnSaveChanges); - d->btnSaveChanges->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + d->btnSaveChanges->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); d->btnTestConnection = new KPushButton(KGuiItem(i18n("&Test Connection"), "", i18n("Test database connection"), @@ -103,7 +103,7 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( TQWidget* parent, const char* n frmBottom, "testConnection"); hbox->addWidget( d->btnTestConnection ); TQWidget::setTabOrder(d->btnSaveChanges, d->btnTestConnection); - d->btnTestConnection->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + d->btnTestConnection->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); connect( locationBGrp, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotLocationBGrpClicked(int)) ); connect( chkPortDefault, TQT_SIGNAL(toggled(bool)), this , TQT_SLOT(slotCBToggled(bool)) ); diff --git a/kexi/widget/kexidbconnectionwidgetbase.ui b/kexi/widget/kexidbconnectionwidgetbase.ui index 6dd4fbf8..463d8797 100644 --- a/kexi/widget/kexidbconnectionwidgetbase.ui +++ b/kexi/widget/kexidbconnectionwidgetbase.ui @@ -39,7 +39,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqminimumSize"> + <property name="minimumSize"> <size> <width>48</width> <height>48</height> @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>331</height> @@ -75,7 +75,7 @@ <property name="sizeType"> <enum>MinimumExpanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>4</height> @@ -111,7 +111,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>41</width> <height>20</height> @@ -163,7 +163,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>90</width> <height>20</height> @@ -356,7 +356,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>32</width> <height>32767</height> @@ -411,7 +411,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>80</width> <height>20</height> diff --git a/kexi/widget/kexidbconnectionwidgetdetailsbase.ui b/kexi/widget/kexidbconnectionwidgetdetailsbase.ui index f1f161de..74b4326d 100644 --- a/kexi/widget/kexidbconnectionwidgetdetailsbase.ui +++ b/kexi/widget/kexidbconnectionwidgetdetailsbase.ui @@ -62,7 +62,7 @@ <property name="sizeType"> <enum>Fixed</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>16</width> <height>20</height> @@ -114,7 +114,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>129</width> <height>20</height> diff --git a/kexi/widget/kexidswelcome.cpp b/kexi/widget/kexidswelcome.cpp index 88b72596..cd4be1b2 100644 --- a/kexi/widget/kexidswelcome.cpp +++ b/kexi/widget/kexidswelcome.cpp @@ -37,7 +37,7 @@ KexiDSWelcome::KexiDSWelcome(KexiDataSourceWizard *parent) KexiDSPixmap *pic = new KexiDSPixmap(this); TQLabel *lText = new TQLabel(i18n("Kexi can help you with creation of %2 using data sources in almost no time with the \"%1 Wizard\""), this); - lText->tqsetAlignment(AlignTop | AlignLeft | WordBreak); + lText->setAlignment(AlignTop | AlignLeft | WordBreak); TQCheckBox *useWizard = new TQCheckBox(i18n("Create %1 using the \"%1 Wizard\""), this); connect(useWizard, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setUseWizard(bool))); useWizard->setChecked(true); diff --git a/kexi/widget/kexifieldcombobox.cpp b/kexi/widget/kexifieldcombobox.cpp index 31795049..b9c64635 100644 --- a/kexi/widget/kexifieldcombobox.cpp +++ b/kexi/widget/kexifieldcombobox.cpp @@ -243,7 +243,7 @@ void KexiFieldComboBox::focusOutEvent( TQFocusEvent *e ) { KComboBox::focusOutEvent( e ); // accept changes if the focus is moved - if (!KexiUtils::hasParent(TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) //(a check needed because drop-down listbox also causes a focusout) + if (!KexiUtils::hasParent(TQT_TQOBJECT(this), TQT_TQOBJECT(focusWidget()))) //(a check needed because drop-down listbox also causes a focusout) slotReturnPressed(currentText()); } diff --git a/kexi/widget/kexifieldlistview.cpp b/kexi/widget/kexifieldlistview.cpp index 532ec057..7316caeb 100644 --- a/kexi/widget/kexifieldlistview.cpp +++ b/kexi/widget/kexifieldlistview.cpp @@ -117,7 +117,7 @@ void KexiFieldListView::setSchema(KexiDB::TableOrQuerySchema* schema) } #if 0 -TQSize KexiFieldListView::tqsizeHint() +TQSize KexiFieldListView::sizeHint() { TQFontMetrics fm(font()); diff --git a/kexi/widget/kexifieldlistview.h b/kexi/widget/kexifieldlistview.h index 50d94dba..53682436 100644 --- a/kexi/widget/kexifieldlistview.h +++ b/kexi/widget/kexifieldlistview.h @@ -60,7 +60,7 @@ class KEXIEXTWIDGETS_EXPORT KexiFieldListView : public KListView TQStringList selectedFieldNames() const; // void setReadOnly(bool); -// virtual TQSize tqsizeHint(); +// virtual TQSize sizeHint(); signals: /*! Emitted when a field is double clicked */ diff --git a/kexi/widget/kexipropertyeditorview.cpp b/kexi/widget/kexipropertyeditorview.cpp index 02b050b8..122d9514 100644 --- a/kexi/widget/kexipropertyeditorview.cpp +++ b/kexi/widget/kexipropertyeditorview.cpp @@ -40,7 +40,7 @@ KexiObjectInfoLabel::KexiObjectInfoLabel(TQWidget* parent, const char* name) hlyr->addWidget(m_objectIconLabel); m_objectNameLabel = new TQLabel(this); m_objectNameLabel->setMargin(2); - m_objectNameLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); + m_objectNameLabel->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); hlyr->addWidget(m_objectNameLabel); } @@ -125,7 +125,7 @@ KexiPropertyEditorView::KexiPropertyEditorView(KexiMainWindow *mainWin, TQWidget vlyr->addWidget(d->objectIcon); d->objectClassName = new TQLabel(this); d->objectClassName->setMargin(2); - d->objectClassName->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); + d->objectClassName->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); vlyr->addWidget(d->objectClassName);*/ d->editor = new KoProperty::Editor(this, true /*AutoSync*/, "propeditor"); @@ -146,14 +146,14 @@ KexiPropertyEditorView::~KexiPropertyEditorView() delete d; } -TQSize KexiPropertyEditorView::tqsizeHint() const +TQSize KexiPropertyEditorView::sizeHint() const { - return TQSize(200,200);//m_editor->tqsizeHint(); + return TQSize(200,200);//m_editor->sizeHint(); } -TQSize KexiPropertyEditorView::tqminimumSizeHint() const +TQSize KexiPropertyEditorView::minimumSizeHint() const { - return TQSize(200,200);//m_editor->tqsizeHint(); + return TQSize(200,200);//m_editor->sizeHint(); } /*void KexiPropertyEditorView::setGeometry ( const TQRect &r ) diff --git a/kexi/widget/kexipropertyeditorview.h b/kexi/widget/kexipropertyeditorview.h index 66cc0ac7..008e6759 100644 --- a/kexi/widget/kexipropertyeditorview.h +++ b/kexi/widget/kexipropertyeditorview.h @@ -99,8 +99,8 @@ class KEXIEXTWIDGETS_EXPORT KexiPropertyEditorView : public TQWidget KexiObjectInfoLabel *infoLabel, KoProperty::Set* set, const TQString& textToDisplayForNullSet = TQString()); - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; KoProperty::Editor *editor() const; // public slots: diff --git a/kexi/widget/kexiscrollview.cpp b/kexi/widget/kexiscrollview.cpp index db9dbb14..7bdfd12e 100644 --- a/kexi/widget/kexiscrollview.cpp +++ b/kexi/widget/kexiscrollview.cpp @@ -52,7 +52,7 @@ KexiScrollView::KexiScrollView(TQWidget *parent, bool preview) , m_scrollViewNavPanel(0) { setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken); - viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); + viewport()->setPaletteBackgroundColor(colorGroup().mid()); TQColor fc = tqpalette().active().foreground(), bc = viewport()->paletteBackgroundColor(); m_helpColor = KexiUtils::blendedColors(fc, bc, 1, 2); @@ -80,7 +80,7 @@ KexiScrollView::KexiScrollView(TQWidget *parent, bool preview) //! @todo allow to hide navigator updateScrollBars(); m_scrollViewNavPanel = new KexiRecordNavigator(this, leftMargin(), "nav"); - m_scrollViewNavPanel->tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); + m_scrollViewNavPanel->setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); } } diff --git a/kexi/widget/kexisectionheader.cpp b/kexi/widget/kexisectionheader.cpp index 7e6989f3..65286fbd 100644 --- a/kexi/widget/kexisectionheader.cpp +++ b/kexi/widget/kexisectionheader.cpp @@ -65,7 +65,7 @@ KexiSectionHeader::KexiSectionHeader(const TQString &caption, Qt::Orientation o, d->lyr->setAutoAdd(true); d->lbl_b = new TQHBox(this); d->lbl = new TQLabel(TQString(" ")+caption, d->lbl_b); - d->lbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); + d->lbl->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred); d->lbl->setFocusPolicy(TQ_StrongFocus); d->lbl->installEventFilter(this); installEventFilter(this); @@ -83,7 +83,7 @@ void KexiSectionHeader::addButton(const TQString& icon, const TQString& toolTip, KPushButton *btn = new KPushButton(d->lbl_b); btn->setFlat(true); btn->setFocusPolicy(TQ_NoFocus); - btn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + btn->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); if (receiver && member) { connect(btn, TQT_SIGNAL(clicked()), receiver, member); } @@ -113,19 +113,19 @@ bool KexiSectionHeader::eventFilter( TQObject *o, TQEvent *e ) void KexiSectionHeader::slotFocus(bool in) { - in = in || tqfocusWidget()==this; + in = in || focusWidget()==this; d->lbl->setPaletteBackgroundColor( in ? tqpalette().active().color(TQColorGroup::Highlight) : tqpalette().active().color(TQColorGroup::Background) ); d->lbl->setPaletteForegroundColor( in ? tqpalette().active().color(TQColorGroup::HighlightedText) : tqpalette().active().color(TQColorGroup::Foreground) ); } -TQSize KexiSectionHeader::tqsizeHint() const +TQSize KexiSectionHeader::sizeHint() const { if (!d->lyr->view) - return TQWidget::tqsizeHint(); - TQSize s = d->lyr->view->tqsizeHint(); - return TQSize(s.width(), d->lbl->tqsizeHint().height() + s.height()); + return TQWidget::sizeHint(); + TQSize s = d->lyr->view->sizeHint(); + return TQSize(s.width(), d->lbl->sizeHint().height() + s.height()); } /*void KexiSectionHeader::setFocus() diff --git a/kexi/widget/kexisectionheader.h b/kexi/widget/kexisectionheader.h index 9ed31a35..a8d08a45 100644 --- a/kexi/widget/kexisectionheader.h +++ b/kexi/widget/kexisectionheader.h @@ -41,7 +41,7 @@ class KEXIEXTWIDGETS_EXPORT KexiSectionHeader : public TQWidget virtual bool eventFilter( TQObject *o, TQEvent *e ); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: void slotFocus(bool in); diff --git a/kexi/widget/kexismalltoolbutton.cpp b/kexi/widget/kexismalltoolbutton.cpp index 81bab0c6..237130f2 100644 --- a/kexi/widget/kexismalltoolbutton.cpp +++ b/kexi/widget/kexismalltoolbutton.cpp @@ -71,7 +71,7 @@ void KexiSmallToolButton::updateAction() void KexiSmallToolButton::init() { setPaletteBackgroundColor(tqpalette().active().background()); - tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); + setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred); TQFont f(KGlobalSettings::toolBarFont()); f.setPixelSize(Kexi::smallFont().pixelSize()); setFont(f); @@ -125,7 +125,7 @@ void KexiSmallToolButton::drawButton( TQPainter *_painter ) if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter, - TQRect(width()-7, height()-7, 5, 5), tqcolorGroup(), + TQRect(width()-7, height()-7, 5, 5), colorGroup(), arrowFlags, TQStyleOption() ); } } diff --git a/kexi/widget/pixmapcollection.cpp b/kexi/widget/pixmapcollection.cpp index 0aeddca4..19875521 100644 --- a/kexi/widget/pixmapcollection.cpp +++ b/kexi/widget/pixmapcollection.cpp @@ -159,7 +159,7 @@ LoadIconDialog::LoadIconDialog(TQWidget *parent) // Name input TQLabel *name = new TQLabel(i18n("&Name:"), frame); l->addWidget(name, 0, 0); - name->tqsetAlignment(TQt::AlignRight|TQt::AlignVCenter); + name->setAlignment(TQt::AlignRight|TQt::AlignVCenter); m_nameInput = new KLineEdit("kexi", frame); l->addWidget(m_nameInput, 0, 1); name->setBuddy(m_nameInput); @@ -167,7 +167,7 @@ LoadIconDialog::LoadIconDialog(TQWidget *parent) // Choose size TQLabel *size = new TQLabel(i18n("&Size:"), frame); l->addWidget(size, 1, 0); - size->tqsetAlignment(TQt::AlignRight|TQt::AlignVCenter); + size->setAlignment(TQt::AlignRight|TQt::AlignVCenter); KComboBox *combo = new KComboBox(frame); l->addWidget(combo, 1, 1); diff --git a/kexi/widget/relations/kexirelationview.cpp b/kexi/widget/relations/kexirelationview.cpp index 18c19ef9..378d2580 100644 --- a/kexi/widget/relations/kexirelationview.cpp +++ b/kexi/widget/relations/kexirelationview.cpp @@ -57,7 +57,7 @@ KexiRelationView::KexiRelationView(TQWidget *parent, const char *name) // connect(relation, TQT_SIGNAL(relationListUpdated(TQObject *)), this, TQT_SLOT(slotListUpdate(TQObject *))); - viewport()->setPaletteBackgroundColor(tqcolorGroup().mid()); + viewport()->setPaletteBackgroundColor(colorGroup().mid()); setFocusPolicy(TQ_WheelFocus); setResizePolicy(Manual); /*MOVED TO KexiRelationDialog @@ -94,7 +94,7 @@ KexiRelationView::KexiRelationView(TQWidget *parent, const char *name) invalidateActions(); #endif - tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, true); + setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, true); } KexiRelationView::~KexiRelationView() @@ -146,13 +146,13 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const TQRect &rect) addChild(c, 100,100); if (rect.isValid()) {//predefined size - TQSize finalSize = c->size().expandedTo( c->tqsizeHint() ); + TQSize finalSize = c->size().expandedTo( c->sizeHint() ); TQRect r = rect; r.setSize( finalSize + TQSize(0,10) ); moveChild( c, rect.left(), rect.top() ); //we're doing this instead of setGeometry(rect) //because the geomenty might be saved on other system with bigger fonts :) - c->resize(c->tqsizeHint()); + c->resize(c->sizeHint()); // c->setGeometry(r); //TODO @@ -164,7 +164,7 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const TQRect &rect) updateGeometry(); if (!rect.isValid()) { c->updateGeometry(); - c->resize(c->tqsizeHint()); + c->resize(c->sizeHint()); } int x, y; @@ -584,9 +584,9 @@ void KexiRelationView::slotTableViewGotFocus() emit tableViewGotFocus(); } -TQSize KexiRelationView::tqsizeHint() const +TQSize KexiRelationView::sizeHint() const { - return TQSize(TQScrollView::tqsizeHint());//.width(), 600); + return TQSize(TQScrollView::sizeHint());//.width(), 600); } void KexiRelationView::clear() diff --git a/kexi/widget/relations/kexirelationview.h b/kexi/widget/relations/kexirelationview.h index 6bc31b31..404fbcbe 100644 --- a/kexi/widget/relations/kexirelationview.h +++ b/kexi/widget/relations/kexirelationview.h @@ -96,7 +96,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public TQScrollView inline KexiRelationViewTableContainer* focusedTableView() const { return m_focusedTableView; } - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; const ConnectionList* connections() const { return &m_connectionViews; } diff --git a/kexi/widget/relations/kexirelationviewconnection.cpp b/kexi/widget/relations/kexirelationviewconnection.cpp index c0635c1b..ab3f1ac4 100644 --- a/kexi/widget/relations/kexirelationviewconnection.cpp +++ b/kexi/widget/relations/kexirelationviewconnection.cpp @@ -92,7 +92,7 @@ KexiRelationViewConnection::drawConnection(TQPainter *p) pa.setPoint(0, rx - 4, ry - 3); pa.setPoint(1, rx - 4, ry + 3); pa.setPoint(2, rx - 1, ry); - p->tqdrawPolygon(pa, true); + p->drawPolygon(pa, true); //master side p->drawLine(sx, sy - 1, sx + side1CharWidth -1, sy - 1); @@ -134,7 +134,7 @@ KexiRelationViewConnection::drawConnection(TQPainter *p) pa.setPoint(0, lx + 3, ry - 3); pa.setPoint(1, lx + 3, ry + 3); pa.setPoint(2, lx, ry); - p->tqdrawPolygon(pa, true); + p->drawPolygon(pa, true); // p->drawLine(lx, ry, lx + 8, ry); // p->drawPoint(lx + 1, ry - 1); diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp index 55440da4..ea1682f7 100644 --- a/kexi/widget/relations/kexirelationviewtable.cpp +++ b/kexi/widget/relations/kexirelationviewtable.cpp @@ -61,18 +61,18 @@ KexiRelationViewTableContainer::KexiRelationViewTableContainer( m_tableHeader = new KexiRelationViewTableContainerHeader(schema->name(), this); m_tableHeader->unsetFocus(); - m_tableHeader->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); + m_tableHeader->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed)); lyr->addWidget(m_tableHeader); connect(m_tableHeader,TQT_SIGNAL(moved()),this,TQT_SLOT(moved())); connect(m_tableHeader, TQT_SIGNAL(endDrag()), this, TQT_SIGNAL(endDrag())); m_tableView = new KexiRelationViewTable(schema, parent, this, "KexiRelationViewTable"); //m_tableHeader->setFocusProxy( m_tableView ); - m_tableView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); + m_tableView->setSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum)); - m_tableView->setMaximumSize( m_tableView->tqsizeHint() ); + m_tableView->setMaximumSize( m_tableView->sizeHint() ); -// m_tableView->resize( m_tableView->tqsizeHint() ); +// m_tableView->resize( m_tableView->sizeHint() ); lyr->addWidget(m_tableView, 0); connect(m_tableView, TQT_SIGNAL(tableScrolling()), this, TQT_SLOT(moved())); connect(m_tableView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)), @@ -110,13 +110,13 @@ int KexiRelationViewTableContainer::globalY(const TQString &field) } #if 0//js -TQSize KexiRelationViewTableContainer::tqsizeHint() +TQSize KexiRelationViewTableContainer::sizeHint() { #ifdef TQ_WS_WIN - TQSize s = m_tableView->tqsizeHint() + TQSize s = m_tableView->sizeHint() + TQSize( 2 * 5 , m_tableHeader->height() + 2 * 5 ); #else - TQSize s = m_tableView->tqsizeHint(); + TQSize s = m_tableView->sizeHint(); s.setWidth(s.width() + 4); s.setHeight(m_tableHeader->height() + s.height()); #endif @@ -307,7 +307,7 @@ KexiRelationViewTable::~KexiRelationViewTable() { } -TQSize KexiRelationViewTable::tqsizeHint() const +TQSize KexiRelationViewTable::sizeHint() const { TQFontMetrics fm(fontMetrics()); @@ -341,7 +341,7 @@ KexiRelationViewTable::globalY(const TQString &item) TQListViewItem *i = findItem(item, 0); if (!i) return -1; - int y = tqitemRect(i).y() + (tqitemRect(i).height() / 2); + int y = itemRect(i).y() + (itemRect(i).height() / 2); if (contentsY() > itemPos(i)) y = 0; else if (y == 0) @@ -420,10 +420,10 @@ void KexiRelationViewTable::contentsMousePressEvent(TQMouseEvent *ev) TQRect KexiRelationViewTable::drawItemHighlighter(TQPainter *painter, TQListViewItem *item) { if (painter) { - tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, tqitemRect(item), tqcolorGroup(), + tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, itemRect(item), colorGroup(), TQStyle::Style_FocusAtBorder); } - return tqitemRect(item); + return itemRect(item); } #include "kexirelationviewtable.moc" diff --git a/kexi/widget/relations/kexirelationviewtable.h b/kexi/widget/relations/kexirelationviewtable.h index 5c622dad..6578cdd5 100644 --- a/kexi/widget/relations/kexirelationviewtable.h +++ b/kexi/widget/relations/kexirelationviewtable.h @@ -105,7 +105,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTable : public KexiFieldListView // KexiDB::TableSchema *table() const { return m_table; }; int globalY(const TQString &item); // void setReadOnly(bool); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; signals: void tableScrolling(); diff --git a/kexi/widget/relations/kexirelationwidget.cpp b/kexi/widget/relations/kexirelationwidget.cpp index 4b952163..4c5754b5 100644 --- a/kexi/widget/relations/kexirelationwidget.cpp +++ b/kexi/widget/relations/kexirelationwidget.cpp @@ -59,7 +59,7 @@ KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, TQWidget *parent, m_tableCombo->setInsertionPolicy(TQComboBox::NoInsertion); hlyr->addWidget(lbl); hlyr->addWidget(m_tableCombo); - m_tableCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred)); + m_tableCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred)); fillTablesCombo(); m_btnAdd = new KPushButton(i18n("&Add"), this); @@ -302,9 +302,9 @@ void KexiRelationWidget::designSelectedTable() Kexi::DesignViewMode, openingCancelled); } -TQSize KexiRelationWidget::tqsizeHint() const +TQSize KexiRelationWidget::sizeHint() const { - return m_relationView->tqsizeHint(); + return m_relationView->sizeHint(); } void KexiRelationWidget::slotTableHidden(KexiDB::TableSchema &table) diff --git a/kexi/widget/relations/kexirelationwidget.h b/kexi/widget/relations/kexirelationwidget.h index 39ac549a..713ce8fc 100644 --- a/kexi/widget/relations/kexirelationwidget.h +++ b/kexi/widget/relations/kexirelationwidget.h @@ -60,7 +60,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationWidget : public KexiViewBase // void openTable(KexiDB::TableSchema* table, bool designMode); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; /*! Used to add newly created object information to the combo box. */ void objectCreated(const TQCString &mime, const TQCString& name); diff --git a/kexi/widget/tableview/kexiblobtableedit.cpp b/kexi/widget/tableview/kexiblobtableedit.cpp index 7ad76c34..c818606d 100644 --- a/kexi/widget/tableview/kexiblobtableedit.cpp +++ b/kexi/widget/tableview/kexiblobtableedit.cpp @@ -559,7 +559,7 @@ void KexiKIconTableEdit::setupContents( TQPainter *p, bool /*focused*/, const TQ s = TQMIN( h-3, s ); s = TQMIN( w-3, s );//avoid too large box TQRect r( TQMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s); - p->setPen(TQPen(tqcolorGroup().text(), 1)); + p->setPen(TQPen(colorGroup().text(), 1)); p->drawRect(r); if (val.asBool()) { p->drawLine(r.x(), r.y(), r.right(), r.bottom()); diff --git a/kexi/widget/tableview/kexibooltableedit.cpp b/kexi/widget/tableview/kexibooltableedit.cpp index 8f199b5d..c0753269 100644 --- a/kexi/widget/tableview/kexibooltableedit.cpp +++ b/kexi/widget/tableview/kexibooltableedit.cpp @@ -105,7 +105,7 @@ void KexiBoolTableEdit::setupContents( TQPainter *p, bool focused, const TQVaria s = TQMIN( h-3, s ); s = TQMIN( w-3, s );//avoid too large box TQRect r( TQMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s); -//already set ouotside: p->setPen(TQPen(tqcolorGroup().text(), 1)); +//already set ouotside: p->setPen(TQPen(colorGroup().text(), 1)); p->drawRect(r); if (val.isNull()) { // && !field()->isNotNull()) { p->drawText( r, TQt::AlignCenter, "?" ); diff --git a/kexi/widget/tableview/kexicomboboxpopup.cpp b/kexi/widget/tableview/kexicomboboxpopup.cpp index 6a2feec8..9ecae92f 100644 --- a/kexi/widget/tableview/kexicomboboxpopup.cpp +++ b/kexi/widget/tableview/kexicomboboxpopup.cpp @@ -56,8 +56,8 @@ class KexiComboBoxPopup_KexiTableView : public KexiDataTableView a.rowHighlightingEnabled = true; a.rowMouseOverHighlightingEnabled = true; a.persistentSelections = false; - a.rowMouseOverHighlightingColor = tqcolorGroup().highlight(); - a.rowMouseOverHighlightingTextColor = tqcolorGroup().highlightedText(); + a.rowMouseOverHighlightingColor = colorGroup().highlight(); + a.rowMouseOverHighlightingTextColor = colorGroup().highlightedText(); a.rowHighlightingTextColor = a.rowMouseOverHighlightingTextColor; a.gridEnabled = false; setAppearance(a); @@ -68,7 +68,7 @@ class KexiComboBoxPopup_KexiTableView : public KexiDataTableView setContextMenuEnabled( false ); setScrollbarToolTipsEnabled( false ); installEventFilter(this); - setBottomMarginInternal( - horizontalScrollBar()->tqsizeHint().height() ); + setBottomMarginInternal( - horizontalScrollBar()->sizeHint().height() ); } virtual void setData( KexiTableViewData *data, bool owner = true ) { KexiTableView::setData( data, owner ); } diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index 3ae97974..37ababa5 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -80,7 +80,7 @@ KexiComboBoxTableEdit::KexiComboBoxTableEdit(KexiTableViewColumn &column, TQWidg // m_lineedit->setFrameStyle( TQFrame::Plain | TQFrame::Box ); // m_lineedit->setLineWidth( 1 ); // if (f.isNumericType()) { -// m_lineedit->tqsetAlignment(AlignRight); +// m_lineedit->setAlignment(AlignRight); // } // setView( m_lineedit ); diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp index 79613d9d..721cb2d8 100644 --- a/kexi/widget/tableview/kexidataawareobjectiface.cpp +++ b/kexi/widget/tableview/kexidataawareobjectiface.cpp @@ -84,7 +84,7 @@ KexiDataAwareObjectInterface::KexiDataAwareObjectInterface() m_scrollBarTip->setPalette(TQToolTip::palette()); m_scrollBarTip->setMargin(2); m_scrollBarTip->setIndent(0); - m_scrollBarTip->tqsetAlignment(TQt::AlignCenter); + m_scrollBarTip->setAlignment(TQt::AlignCenter); m_scrollBarTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); m_scrollBarTip->setLineWidth(1); @@ -1950,7 +1950,7 @@ static inline bool findInString(const TQString& stringValue, int stringLength, c if (firstCharacter != -1 && firstCharacter != 0) { //we're not at 0-th char firstCharacter = -1; } - else if (where.tqstartsWith(stringValue, caseSensitive)) { + else if (where.startsWith(stringValue, caseSensitive)) { if (wholeWordsOnly) { // If where.length() < stringValue.length(), true will be returned too - fine. return !where.at( stringValue.length() ).isLetterOrNumber(); diff --git a/kexi/widget/tableview/kexidataawarepropertyset.cpp b/kexi/widget/tableview/kexidataawarepropertyset.cpp index 257cf0aa..dde99b31 100644 --- a/kexi/widget/tableview/kexidataawarepropertyset.cpp +++ b/kexi/widget/tableview/kexidataawarepropertyset.cpp @@ -92,10 +92,10 @@ uint KexiDataAwarePropertySet::size() const return m_sets.size(); } -void KexiDataAwarePropertySet::clear(uint tqminimumSize) +void KexiDataAwarePropertySet::clear(uint minimumSize) { m_sets.clear(); - m_sets.resize(TQMAX(tqminimumSize, MAX_FIELDS)); + m_sets.resize(TQMAX(minimumSize, MAX_FIELDS)); m_view->setDirty(true); m_view->propertySetSwitched(); } diff --git a/kexi/widget/tableview/kexidataawarepropertyset.h b/kexi/widget/tableview/kexidataawarepropertyset.h index e24fbd8a..b2c66f96 100644 --- a/kexi/widget/tableview/kexidataawarepropertyset.h +++ b/kexi/widget/tableview/kexidataawarepropertyset.h @@ -97,7 +97,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public TQObject public slots: void removeCurrentPropertySet(); - void clear(uint tqminimumSize = 0); + void clear(uint minimumSize = 0); /*! Inserts \a set property set at \a row position. If there was a buffer at this position before, it will be destroyed. diff --git a/kexi/widget/tableview/kexiinputtableedit.cpp b/kexi/widget/tableview/kexiinputtableedit.cpp index 1b834fe9..36b662f9 100644 --- a/kexi/widget/tableview/kexiinputtableedit.cpp +++ b/kexi/widget/tableview/kexiinputtableedit.cpp @@ -47,7 +47,7 @@ class MyLineEdit : public KLineEdit {} protected: virtual void drawFrame ( TQPainter * p ) { - p->setPen( TQPen( tqcolorGroup().text() ) ); + p->setPen( TQPen( colorGroup().text() ) ); TQRect r = rect(); p->moveTo( r.topLeft() ); p->lineTo( r.topRight() ); @@ -100,7 +100,7 @@ void KexiInputTableEdit::init() m_lineedit = new MyLineEdit(this, "KexiInputTableEdit-KLineEdit"); setViewWidget(m_lineedit); if (align_right) - m_lineedit->tqsetAlignment(AlignRight); + m_lineedit->setAlignment(AlignRight); // m_cview->setFrame(false); // m_cview->setFrameStyle( TQFrame::Plain | TQFrame::Box ); // m_cview->setLineWidth( 1 ); @@ -222,7 +222,7 @@ TQString KexiInputTableEdit::valueToText(KexiDB::Field* field, const TQVariant& void KexiInputTableEdit::paintEvent ( TQPaintEvent * /*e*/ ) { TQPainter p(this); - p.setPen( TQPen( tqcolorGroup().text() ) ); + p.setPen( TQPen( colorGroup().text() ) ); p.drawRect( rect() ); } diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index 4ed993cd..35ad2369 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -102,10 +102,10 @@ class KexiTableView::WhatsThis : public TQWhatsThis const int leftMargin = m_tv->verticalHeaderVisible() ? m_tv->verticalHeader()->width() : 0; //const int topMargin = m_tv->horizontalHeaderVisible() ? m_tv->d->pTopHeader->height() : 0; //const int bottomMargin = m_tv->d->appearance.navigatorEnabled ? m_tv->m_navPanel->height() : 0; - if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->verticalHeader()), TQT_TQOBJECT(m_tv->tqchildAt(pos)))) { + if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->verticalHeader()), TQT_TQOBJECT(m_tv->childAt(pos)))) { return i18n("Contains a pointer to the currently selected row"); } - else if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->m_navPanel), TQT_TQOBJECT(m_tv->tqchildAt(pos)))) { + else if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->m_navPanel), TQT_TQOBJECT(m_tv->childAt(pos)))) { return i18n("Row navigator"); // return TQWhatsThis::textFor(m_tv->m_navPanel, TQPoint( pos.x(), pos.y() - m_tv->height() + bottomMargin )); } @@ -204,8 +204,8 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch setBackgroundMode(TQt::PaletteBackground); // setEmptyAreaColor(d->appearance.baseColor);//palette().active().color(TQColorGroup::Base)); -// d->baseColor = tqcolorGroup().base(); -// d->textColor = tqcolorGroup().text(); +// d->baseColor = colorGroup().base(); +// d->textColor = colorGroup().text(); // d->altColor = KGlobalSettings::alternateBackgroundColor(); // d->grayColor = TQColor(200,200,200); @@ -253,8 +253,8 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch m_verticalHeader->setCurrentRow(-1); setMargins( - TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight), - m_horizontalHeader->tqsizeHint().height(), 0, 0); + TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight), + m_horizontalHeader->sizeHint().height(), 0, 0); setupNavigator(); @@ -288,7 +288,7 @@ KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* parent, const ch // horizontalScrollBar()->show(); updateScrollBars(); -// resize(tqsizeHint()); +// resize(sizeHint()); // updateContents(); // setMinimumHeight(horizontalScrollBar()->height() + d->rowHeight + topMargin()); @@ -333,7 +333,7 @@ void KexiTableView::setupNavigator() m_navPanel = new KexiRecordNavigator(this, leftMargin(), "navPanel"); m_navPanel->setRecordHandler(this); - m_navPanel->tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); + m_navPanel->setSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred); } void KexiTableView::initDataContents() @@ -399,8 +399,8 @@ void KexiTableView::updateFonts(bool tqrepaint) // if(d->rowHeight < 22) // d->rowHeight = 22; setMargins( - TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight), - m_horizontalHeader->tqsizeHint().height(), 0, 0); + TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight), + m_horizontalHeader->sizeHint().height(), 0, 0); // setMargins(14, d->rowHeight, 0, 0); m_verticalHeader->setCellHeight(d->rowHeight); @@ -494,29 +494,29 @@ TQSizePolicy KexiTableView::sizePolicy() const return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); } -TQSize KexiTableView::tqsizeHint() const +TQSize KexiTableView::sizeHint() const { const TQSize &ts = tableSize(); - int w = TQMAX( ts.width() + leftMargin()+ verticalScrollBar()->tqsizeHint().width() + 2*2, + int w = TQMAX( ts.width() + leftMargin()+ verticalScrollBar()->sizeHint().width() + 2*2, (m_navPanel->isVisible() ? m_navPanel->width() : 0) ); - int h = TQMAX( ts.height()+topMargin()+horizontalScrollBar()->tqsizeHint().height(), - tqminimumSizeHint().height() ); + int h = TQMAX( ts.height()+topMargin()+horizontalScrollBar()->sizeHint().height(), + minimumSizeHint().height() ); w = TQMIN( w, tqApp->desktop()->width()*3/4 ); //stretch h = TQMIN( h, tqApp->desktop()->height()*3/4 ); //stretch -// kexidbg << "KexiTableView::tqsizeHint()= " <<w <<", " <<h << endl; +// kexidbg << "KexiTableView::sizeHint()= " <<w <<", " <<h << endl; return TQSize(w, h); /*TQSize( TQMAX( ts.width() + leftMargin() + 2*2, (m_navPanel ? m_navPanel->width() : 0) ), //+ TQMIN(m_verticalHeader->width(),d->rowHeight) + margin()*2, - TQMAX( ts.height()+topMargin()+horizontalScrollBar()->tqsizeHint().height(), - tqminimumSizeHint().height() ) + TQMAX( ts.height()+topMargin()+horizontalScrollBar()->sizeHint().height(), + minimumSizeHint().height() ) );*/ -// TQMAX(ts.height() + topMargin(), tqminimumSizeHint().height()) ); +// TQMAX(ts.height() + topMargin(), minimumSizeHint().height()) ); } -TQSize KexiTableView::tqminimumSizeHint() const +TQSize KexiTableView::minimumSizeHint() const { return TQSize( leftMargin() + ((columns()>0)?columnWidth(0):KEXI_DEFAULT_DATA_COLUMN_WIDTH) + 2*2, @@ -658,7 +658,7 @@ void KexiTableView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch) if(d->pBufferPm->isNull()) return; TQPainter *pb = new TQPainter(d->pBufferPm, this); -// pb->fillRect(0, 0, cw, ch, tqcolorGroup().base()); +// pb->fillRect(0, 0, cw, ch, colorGroup().base()); // int maxwc = TQMIN(cw, (columnPos(d->numCols - 1) + columnWidth(d->numCols - 1))); int maxwc = columnPos(columns() - 1) + columnWidth(columns() - 1); @@ -812,7 +812,7 @@ void KexiTableView::paintCell(TQPainter* p, KexiTableItem *item, int col, int ro && !dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted && usesSelectedTextColor) { - defaultPen = TQPen(tqcolorGroup().highlightedText()); //selected text + defaultPen = TQPen(colorGroup().highlightedText()); //selected text } else if (d->appearance.rowHighlightingEnabled && row == m_curRow && !dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted @@ -849,7 +849,7 @@ void KexiTableView::paintCell(TQPainter* p, KexiTableItem *item, int col, int ro if (m_currentItem == item && (col == m_curCol || d->appearance.fullRowSelection)) { if (edit && ((d->appearance.rowHighlightingEnabled && !d->appearance.fullRowSelection) || (row == m_curRow && d->highlightedRow==-1 && d->appearance.fullRowSelection))) //!dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted) edit->paintSelectionBackground( p, isEnabled(), txt, align, x, y_offset, w, h, - isEnabled() ? tqcolorGroup().highlight() : TQColor(200,200,200),//d->grayColor, + isEnabled() ? colorGroup().highlight() : TQColor(200,200,200),//d->grayColor, p->fontMetrics(), columnReadOnly, d->appearance.fullRowSelection ); } @@ -945,15 +945,15 @@ void KexiTableView::paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch // Subtract the table from it // reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts-TQSize(0,m_navPanel->isVisible() ? m_navPanel->height() : 0) ) ); reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts - -TQSize(0,TQMAX((m_navPanel ? m_navPanel->height() : 0), horizontalScrollBar()->tqsizeHint().height()) - - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height()/2 : 0) + -TQSize(0,TQMAX((m_navPanel ? m_navPanel->height() : 0), horizontalScrollBar()->sizeHint().height()) + - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height()/2 : 0) + (horizontalScrollBar()->isVisible() ? 0 : d->internal_bottomMargin -// horizontalScrollBar()->tqsizeHint().height()/2 +// horizontalScrollBar()->sizeHint().height()/2 ) -//- /*d->bottomMargin */ horizontalScrollBar()->tqsizeHint().height()*3/2 +//- /*d->bottomMargin */ horizontalScrollBar()->sizeHint().height()*3/2 + contentsY() -// - (verticalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height()/2 : 0) +// - (verticalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height()/2 : 0) ) ) ); // reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts ) ); @@ -1261,7 +1261,7 @@ void KexiTableView::keyPressEvent(TQKeyEvent* e) const int k = e->key(); const bool ro = isReadOnly(); - TQWidget *w = tqfocusWidget(); + TQWidget *w = focusWidget(); // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view() && w!=m_editor)) { // if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view())) { if (!w || TQT_BASE_OBJECT(w)!=TQT_BASE_OBJECT(viewport()) && TQT_TQOBJECT(w)!=TQT_TQOBJECT(this) && (!m_editor || !KexiUtils::hasParent(TQT_TQOBJECT(dynamic_cast<TQT_BASE_OBJECT_NAME*>(m_editor)), TQT_TQOBJECT(w)))) { @@ -1636,10 +1636,10 @@ void KexiTableView::resizeEvent(TQResizeEvent *e) /* m_navPanel->setGeometry( frameWidth(), viewport()->height() +d->pTopHeader->height() - -(horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->tqsizeHint().height()) + -(horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->sizeHint().height()) +frameWidth(), - m_navPanel->tqsizeHint().width(), // - verticalScrollBar()->tqsizeHint().width() - horizontalScrollBar()->tqsizeHint().width(), - horizontalScrollBar()->tqsizeHint().height() + m_navPanel->sizeHint().width(), // - verticalScrollBar()->sizeHint().width() - horizontalScrollBar()->sizeHint().width(), + horizontalScrollBar()->sizeHint().height() );*/ // updateContents(); // m_navPanel->setGeometry(1,horizontalScrollBar()->pos().y(), @@ -1923,42 +1923,42 @@ TQSize KexiTableView::tableSize() const if ((rows()+ (isInsertingEnabled()?1:0) ) > 0 && columns() > 0) { /* kexidbg << "tableSize()= " << columnPos( columns() - 1 ) + columnWidth( columns() - 1 ) << ", " << rowPos( rows()-1+(isInsertingEnabled()?1:0)) + d->rowHeight -// + TQMAX(m_navPanel ? m_navPanel->height() : 0, horizontalScrollBar()->tqsizeHint().height()) - + (m_navPanel->isVisible() ? TQMAX( m_navPanel->height(), horizontalScrollBar()->tqsizeHint().height() ) :0 ) +// + TQMAX(m_navPanel ? m_navPanel->height() : 0, horizontalScrollBar()->sizeHint().height()) + + (m_navPanel->isVisible() ? TQMAX( m_navPanel->height(), horizontalScrollBar()->sizeHint().height() ) :0 ) + margin() << endl; */ // kexidbg<< m_navPanel->isVisible() <<" "<<m_navPanel->height()<<" " -// <<horizontalScrollBar()->tqsizeHint().height()<<" "<<rowPos( rows()-1+(isInsertingEnabled()?1:0))<<endl; +// <<horizontalScrollBar()->sizeHint().height()<<" "<<rowPos( rows()-1+(isInsertingEnabled()?1:0))<<endl; - //int xx = horizontalScrollBar()->tqsizeHint().height()/2; + //int xx = horizontalScrollBar()->sizeHint().height()/2; TQSize s( columnPos( columns() - 1 ) + columnWidth( columns() - 1 ), -// + verticalScrollBar()->tqsizeHint().width(), +// + verticalScrollBar()->sizeHint().width(), rowPos( rows()-1+(isInsertingEnabled()?1:0) ) + d->rowHeight - + (horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->tqsizeHint().height()) + + (horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->sizeHint().height()) + d->internal_bottomMargin -// horizontalScrollBar()->tqsizeHint().height()/2 -// - /*d->bottomMargin */ horizontalScrollBar()->tqsizeHint().height()*3/2 +// horizontalScrollBar()->sizeHint().height()/2 +// - /*d->bottomMargin */ horizontalScrollBar()->sizeHint().height()*3/2 // + ( (m_navPanel && m_navPanel->isVisible() && verticalScrollBar()->isVisible() // && !horizontalScrollBar()->isVisible()) - // ? horizontalScrollBar()->tqsizeHint().height() : 0) + // ? horizontalScrollBar()->sizeHint().height() : 0) // + TQMAX( (m_navPanel && m_navPanel->isVisible()) ? m_navPanel->height() : 0, -// horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height() : 0) +// horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height() : 0) // + (m_navPanel->isVisible() -// ? TQMAX( m_navPanel->height(), horizontalScrollBar()->tqsizeHint().height() ) :0 ) +// ? TQMAX( m_navPanel->height(), horizontalScrollBar()->sizeHint().height() ) :0 ) -// - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height() :0 ) +// - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height() :0 ) + margin() //-2*d->rowHeight ); // kexidbg << rows()-1 <<" "<< (isInsertingEnabled()?1:0) <<" "<< (m_rowEditing?1:0) << " " << s << endl; return s; -// +horizontalScrollBar()->tqsizeHint().height() + margin() ); +// +horizontalScrollBar()->sizeHint().height() + margin() ); } return TQSize(0,0); } @@ -2271,13 +2271,13 @@ void KexiTableView::setVerticalHeaderVisible(bool set) int left_width; if (set) { m_verticalHeader->show(); - left_width = TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight); + left_width = TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight); } else { m_verticalHeader->hide(); left_width = 0; } - setMargins( left_width, horizontalHeaderVisible() ? m_horizontalHeader->tqsizeHint().height() : 0, 0, 0); + setMargins( left_width, horizontalHeaderVisible() ? m_horizontalHeader->sizeHint().height() : 0, 0, 0); } bool KexiTableView::horizontalHeaderVisible() const @@ -2291,7 +2291,7 @@ void KexiTableView::setHorizontalHeaderVisible(bool set) d->horizontalHeaderVisible = set; //needed because isVisible() is not always accurate if (set) { m_horizontalHeader->show(); - top_height = m_horizontalHeader->tqsizeHint().height(); + top_height = m_horizontalHeader->sizeHint().height(); } else { m_horizontalHeader->hide(); @@ -2478,7 +2478,7 @@ bool KexiTableView::eventFilter( TQObject *o, TQEvent *e ) } /* else if (e->type()==TQEvent::FocusOut && o->inherits(TQWIDGET_OBJECT_NAME_STRING)) { //hp==true if currently focused widget is a child of this table view - const bool hp = KexiUtils::hasParent( static_cast<TQWidget*>(o), tqfocusWidget()); + const bool hp = KexiUtils::hasParent( static_cast<TQWidget*>(o), focusWidget()); if (!hp && KexiUtils::hasParent( this, static_cast<TQWidget*>(o))) { //accept row editing if focus is moved to foreign widget //(not a child, like eg. editor) from one of our table view's tqchildren @@ -2531,8 +2531,8 @@ void KexiTableView::setAppearance(const Appearance& a) m_verticalHeader->setCellHeight(d->rowHeight); if (m_horizontalHeader) { setMargins( - TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight), - m_horizontalHeader->tqsizeHint().height(), 0, 0); + TQMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight), + m_horizontalHeader->sizeHint().height(), 0, 0); } // } if (a.rowHighlightingEnabled) diff --git a/kexi/widget/tableview/kexitableview.h b/kexi/widget/tableview/kexitableview.h index 9cfcf47e..daabe0f9 100644 --- a/kexi/widget/tableview/kexitableview.h +++ b/kexi/widget/tableview/kexitableview.h @@ -223,8 +223,8 @@ public: // reimplemented for internal reasons virtual TQSizePolicy sizePolicy() const; - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; /*! Reimplemented to update cached fonts and row sizes for the painter. */ void setFont(const TQFont &f); diff --git a/kexi/widget/tableview/kexitableview_p.cpp b/kexi/widget/tableview/kexitableview_p.cpp index d5e1641a..983378cb 100644 --- a/kexi/widget/tableview/kexitableview_p.cpp +++ b/kexi/widget/tableview/kexitableview_p.cpp @@ -48,7 +48,7 @@ KexiTableViewPrivate::KexiTableViewPrivate(KexiTableView* t) //moved scrollBarTipTimerCnt = 0; //moved scrollBarTip = 0; ensureCellVisibleOnShow = TQPoint(-1,-1); - internal_bottomMargin = tv->horizontalScrollBar()->tqsizeHint().height()/2; + internal_bottomMargin = tv->horizontalScrollBar()->sizeHint().height()/2; highlightedRow = -1; moveCursorOnMouseRelease = false; horizontalHeaderVisible = true; diff --git a/kexi/widget/tableview/kexitableviewdata.cpp b/kexi/widget/tableview/kexitableviewdata.cpp index 5905706b..ad670e3e 100644 --- a/kexi/widget/tableview/kexitableviewdata.cpp +++ b/kexi/widget/tableview/kexitableviewdata.cpp @@ -822,7 +822,7 @@ void KexiTableViewData::clearInternal() removeLast(); #ifndef KEXI_NO_PROCESS_EVENTS if (i % 1000 == 0) - tqApp->tqprocessEvents( 1 ); + tqApp->processEvents( 1 ); #endif } } @@ -873,7 +873,7 @@ void KexiTableViewData::preloadAllRows() m_cursor->moveNext(); #ifndef KEXI_NO_PROCESS_EVENTS if ((i % 1000) == 0) - tqApp->tqprocessEvents( 1 ); + tqApp->processEvents( 1 ); #endif } } diff --git a/kexi/widget/tableview/kexitableviewheader.cpp b/kexi/widget/tableview/kexitableviewheader.cpp index 4a00be38..d217337b 100644 --- a/kexi/widget/tableview/kexitableviewheader.cpp +++ b/kexi/widget/tableview/kexitableviewheader.cpp @@ -126,7 +126,7 @@ bool KexiTableViewHeader::eventFilter(TQObject * watched, TQEvent * e) TQString tip = m_toolTips[ section ]; if (tip.isEmpty()) { //try label TQFontMetrics fm(font()); - int minWidth = fm.width( label( section ) ) + tqstyle().tqpixelMetric( TQStyle::PM_HeaderMargin ); + int minWidth = fm.width( label( section ) ) + tqstyle().pixelMetric( TQStyle::PM_HeaderMargin ); TQIconSet *iset = iconSet( section ); if (iset) minWidth += (2+iset->pixmap( TQIconSet::Small, TQIconSet::Normal ).width()); //taken from TQHeader::sectionSizeHint() diff --git a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp index 777fea1b..60f99f85 100644 --- a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp +++ b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp @@ -53,18 +53,18 @@ void KexiComboBoxDropDownButton::drawButton(TQPainter *p) TQRect r = rect(); r.setHeight(r.height()+m_fixForHeight); - if (m_tqdrawComplexControl) { + if (m_drawComplexControl) { if (m_fixForHeight>0 && m_paintedCombo->size()!=size()) { m_paintedCombo->move(0,0); m_paintedCombo->setFixedSize(size()+TQSize(0, m_fixForHeight)); //last chance to fix size } - tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, p, - m_fixForHeight>0 ? (const TQWidget*)m_paintedCombo : this, r, tqcolorGroup(), + tqstyle().drawComplexControl( TQStyle::CC_ComboBox, p, + m_fixForHeight>0 ? (const TQWidget*)m_paintedCombo : this, r, colorGroup(), flags, (uint)(TQStyle::SC_ComboBoxArrow), TQStyle::SC_None ); } else { r.setWidth(r.width()+2); - tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, p, r, tqcolorGroup(), flags); + tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, p, r, colorGroup(), flags); } } @@ -77,7 +77,7 @@ void KexiComboBoxDropDownButton::styleChange( TQStyle & oldStyle ) else m_fixForHeight = 0; //</hack> - m_tqdrawComplexControl = + m_drawComplexControl = (tqstyle().inherits("KStyle") && qstricmp(tqstyle().name(),"qtcurve")!=0) || qstricmp(tqstyle().name(),"platinum")==0; if (m_fixForHeight==0) diff --git a/kexi/widget/utils/kexicomboboxdropdownbutton.h b/kexi/widget/utils/kexicomboboxdropdownbutton.h index f480de74..94c26484 100644 --- a/kexi/widget/utils/kexicomboboxdropdownbutton.h +++ b/kexi/widget/utils/kexicomboboxdropdownbutton.h @@ -41,7 +41,7 @@ class KEXIGUIUTILS_EXPORT KexiComboBoxDropDownButton : public KPushButton virtual void styleChange( TQStyle & oldStyle ); int m_fixForHeight; - bool m_tqdrawComplexControl : 1; + bool m_drawComplexControl : 1; KComboBox *m_paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle //!< (because styles use \<static_cast\>) }; diff --git a/kexi/widget/utils/kexicontextmenuutils.cpp b/kexi/widget/utils/kexicontextmenuutils.cpp index 3c6b22f0..f34864a9 100644 --- a/kexi/widget/utils/kexicontextmenuutils.cpp +++ b/kexi/widget/utils/kexicontextmenuutils.cpp @@ -96,7 +96,7 @@ KexiImageContextMenu::~KexiImageContextMenu() void KexiImageContextMenu::insertFromFile() { -// TQWidget *tqfocusWidget = tqApp->tqfocusWidget(); +// TQWidget *focusWidget = tqApp->focusWidget(); #ifdef TQ_WS_WIN TQString recentDir; TQString fileName = TQFileDialog::getOpenFileName( @@ -116,8 +116,8 @@ void KexiImageContextMenu::insertFromFile() if (!url.isValid()) { //focus the app again because to avoid annoying the user with unfocused main window if (tqApp->mainWidget()) { - //tqfocusWidget->raise(); - //tqfocusWidget->setFocus(); + //focusWidget->raise(); + //focusWidget->setFocus(); tqApp->mainWidget()->raise(); } return; @@ -133,8 +133,8 @@ void KexiImageContextMenu::insertFromFile() emit insertFromFileRequested(url); if (tqApp->mainWidget()) { -// tqfocusWidget->raise(); -// tqfocusWidget->setFocus(); +// focusWidget->raise(); +// focusWidget->setFocus(); tqApp->mainWidget()->raise(); } } diff --git a/kexi/widget/utils/kexidatetimeformatter.cpp b/kexi/widget/utils/kexidatetimeformatter.cpp index 718fcbf6..b11961d2 100644 --- a/kexi/widget/utils/kexidatetimeformatter.cpp +++ b/kexi/widget/utils/kexidatetimeformatter.cpp @@ -294,20 +294,20 @@ TQString KexiTimeFormatter::timeToString( const TQTime& time ) const TQString s(m_outputFormat); if (m_24h) { if (m_hoursWithLeadingZero) - s.replace( "%H", TQString::tqfromLatin1(time.hour()<10 ? "0" : "") + TQString::number(time.hour()) ); + s.replace( "%H", TQString::fromLatin1(time.hour()<10 ? "0" : "") + TQString::number(time.hour()) ); else s.replace( "%k", TQString::number(time.hour()) ); } else { int time12 = (time.hour()>12) ? (time.hour()-12) : time.hour(); if (m_hoursWithLeadingZero) - s.replace( "%I", TQString::tqfromLatin1(time12<10 ? "0" : "") + TQString::number(time12) ); + s.replace( "%I", TQString::fromLatin1(time12<10 ? "0" : "") + TQString::number(time12) ); else s.replace( "%l", TQString::number(time12) ); } - s.replace( "%M", TQString::tqfromLatin1(time.minute()<10 ? "0" : "") + TQString::number(time.minute()) ); + s.replace( "%M", TQString::fromLatin1(time.minute()<10 ? "0" : "") + TQString::number(time.minute()) ); if (m_secpos>=0) - s.replace( "%S", TQString::tqfromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) ); + s.replace( "%S", TQString::fromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) ); if (m_ampmpos>=0) s.replace( "%p", KGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") ); return s; diff --git a/kexi/widget/utils/kexidropdownbutton.cpp b/kexi/widget/utils/kexidropdownbutton.cpp index 909d507c..054192ce 100644 --- a/kexi/widget/utils/kexidropdownbutton.cpp +++ b/kexi/widget/utils/kexidropdownbutton.cpp @@ -28,7 +28,7 @@ KexiDropDownButton::KexiDropDownButton(TQWidget *parent) : TQToolButton(parent, "KexiDBImageBox::Button") { - tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); + setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding); //! @todo get this from a KStyle // setFixedWidth(TQMAX(18, tqApp->globalStrut().width())); int fixedWidth; @@ -55,11 +55,11 @@ void KexiDropDownButton::drawButton( TQPainter *p ) if (isEnabled()) arrowFlags |= TQStyle::Style_Enabled; tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, p, - TQRect((width()-7)/2, height()-9, 7, 7), tqcolorGroup(), + TQRect((width()-7)/2, height()-9, 7, 7), colorGroup(), arrowFlags, TQStyleOption() ); } -TQSize KexiDropDownButton::tqsizeHint () const +TQSize KexiDropDownButton::sizeHint () const { return TQSize( fontMetrics().maxWidth() + 2*2, fontMetrics().height()*2 + 2*2 ); } diff --git a/kexi/widget/utils/kexidropdownbutton.h b/kexi/widget/utils/kexidropdownbutton.h index e61ab9f5..178f17a7 100644 --- a/kexi/widget/utils/kexidropdownbutton.h +++ b/kexi/widget/utils/kexidropdownbutton.h @@ -38,7 +38,7 @@ class KEXIGUIUTILS_EXPORT KexiDropDownButton : public TQToolButton virtual void drawButton( TQPainter *p ); - virtual TQSize tqsizeHint () const; + virtual TQSize sizeHint () const; virtual void keyPressEvent ( TQKeyEvent * e ); }; diff --git a/kexi/widget/utils/kexiflowlayout.cpp b/kexi/widget/utils/kexiflowlayout.cpp index e4bc4207..50959770 100644 --- a/kexi/widget/utils/kexiflowlayout.cpp +++ b/kexi/widget/utils/kexiflowlayout.cpp @@ -137,7 +137,7 @@ void KexiFlowLayout::tqinvalidate() { TQLayout::tqinvalidate(); - m_cached_tqsizeHint = TQSize(); + m_cached_sizeHint = TQSize(); m_cached_minSize = TQSize(); m_cached_width = 0; } @@ -169,22 +169,22 @@ KexiFlowLayout::heightForWidth(int w) const } TQSize -KexiFlowLayout::tqsizeHint() const +KexiFlowLayout::sizeHint() const { - if(m_cached_tqsizeHint.isEmpty()) { + if(m_cached_sizeHint.isEmpty()) { KexiFlowLayout *mthis = (KexiFlowLayout*)this; TQRect r = TQRect(0, 0, 2000, 2000); mthis->simulateLayout(r); } - return m_cached_tqsizeHint; + return m_cached_sizeHint; } TQSize -KexiFlowLayout::tqminimumSize() const +KexiFlowLayout::minimumSize() const { //js: do we really need to simulate tqlayout here? // I commented this out because it was impossible to stretch tqlayout conveniently. -// Now, minimum size is computed automatically based on item's tqminimumSize... +// Now, minimum size is computed automatically based on item's minimumSize... #if 0 if(m_cached_minSize.isEmpty()) { KexiFlowLayout *mthis = (KexiFlowLayout*)this; @@ -234,7 +234,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) TQPtrListIterator<TQLayoutItem> it(m_list); TQPtrList<TQLayoutItem> currentLine; TQLayoutItem *o; - TQSize minSize, tqsizeHint(20, 20); + TQSize minSize, sizeHint(20, 20); int minSizeHeight = 0 - spacing(); while ( (o = it.current()) != 0 ) { @@ -244,7 +244,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) } // kdDebug() << "- doHorizontalLayout(): " << o->widget()->className() << " " << o->widget()->name() << endl; - TQSize oSizeHint = o->tqsizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) + TQSize oSizeHint = o->sizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) if ((x + oSizeHint.width()) > r.right() && h > 0) { // do the tqlayout of current line TQPtrListIterator<TQLayoutItem> it2(currentLine); @@ -252,12 +252,12 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) int wx = r.x(); int sizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Horizontally || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Horizontally || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / expandingWidgets , r.width()), itemSizeHint.height() ); else @@ -277,7 +277,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) lineMinHeight = TQMAX( lineMinHeight, itemMinSize.height() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize(sizeHintWidth, 0) ); + sizeHint = sizeHint.expandedTo( TQSize(sizeHintWidth, 0) ); minSize = minSize.expandedTo( TQSize(minSizeWidth, 0) ); minSizeHeight = minSizeHeight + spacing() + lineMinHeight; // start a new line @@ -292,7 +292,7 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) x = x + spacing() + oSizeHint.width(); h = TQMAX( h, oSizeHint.height() ); currentLine.append(o); - if(o->expandingDirections() == TQSizePolicy::Horizontally || o->expandingDirections() == TQSizePolicy::BothDirections) + if(o->expanding() == TQSizePolicy::Horizontally || o->expanding() == TQSizePolicy::BothDirections) ++expandingWidgets; availableSpace = TQMAX(0, availableSpace - spacing() - oSizeHint.width()); ++it; @@ -304,12 +304,12 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) int wx = r.x(); int sizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Horizontally || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Horizontally || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / expandingWidgets , r.width()), itemSizeHint.height() ); else @@ -329,12 +329,12 @@ KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly) lineMinHeight = TQMAX( lineMinHeight, itemMinSize.height() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize(sizeHintWidth, y + spacing() + h) ); + sizeHint = sizeHint.expandedTo( TQSize(sizeHintWidth, y + spacing() + h) ); minSizeHeight = minSizeHeight + spacing() + lineMinHeight; minSize = minSize.expandedTo( TQSize(minSizeWidth, minSizeHeight) ); - // store tqsizeHint() and tqminimumSize() - m_cached_tqsizeHint = tqsizeHint + TQSize(2* margin(), 2*margin()); + // store sizeHint() and minimumSize() + m_cached_sizeHint = sizeHint + TQSize(2* margin(), 2*margin()); m_cached_minSize = minSize + TQSize(2* margin() , 2*margin()); // return our height return y + h - r.y(); @@ -351,7 +351,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) TQPtrListIterator<TQLayoutItem> it(m_list); TQPtrList<TQLayoutItem> currentLine; TQLayoutItem *o; - TQSize minSize, tqsizeHint(20, 20); + TQSize minSize, sizeHint(20, 20); int minSizeWidth = 0 - spacing(); while ( (o = it.current()) != 0 ) { @@ -360,7 +360,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) continue; } - TQSize oSizeHint = o->tqsizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) + TQSize oSizeHint = o->sizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts) if (y + oSizeHint.height() > r.bottom() && w > 0) { // do the tqlayout of current line TQPtrListIterator<TQLayoutItem> it2(currentLine); @@ -368,12 +368,12 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) int wy = r.y(); int sizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Vertically || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Vertically || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / expandingWidgets , r.height()) ); else @@ -393,7 +393,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) colMinWidth = TQMAX( colMinWidth, itemMinSize.width() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize(0, sizeHintHeight) ); + sizeHint = sizeHint.expandedTo( TQSize(0, sizeHintHeight) ); minSize = minSize.expandedTo( TQSize(0, minSizeHeight) ); minSizeWidth = minSizeWidth + spacing() + colMinWidth; // start a new column @@ -408,7 +408,7 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) y = y + spacing() + oSizeHint.height(); w = TQMAX( w, oSizeHint.width() ); currentLine.append(o); - if(o->expandingDirections() == TQSizePolicy::Vertically || o->expandingDirections() == TQSizePolicy::BothDirections) + if(o->expanding() == TQSizePolicy::Vertically || o->expanding() == TQSizePolicy::BothDirections) ++expandingWidgets; availableSpace = TQMAX(0, availableSpace - spacing() - oSizeHint.height()); ++it; @@ -420,12 +420,12 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) int wy = r.y(); int sizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0; while( (item = it2.current()) != 0 ) { - TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take - TQSize itemMinSize = item->tqminimumSize(); // a while to get them + TQSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take + TQSize itemMinSize = item->minimumSize(); // a while to get them TQSize s; if(m_justify) { if(expandingWidgets != 0) { - if(item->expandingDirections() == TQSizePolicy::Vertically || item->expandingDirections() == TQSizePolicy::BothDirections) + if(item->expanding() == TQSizePolicy::Vertically || item->expanding() == TQSizePolicy::BothDirections) s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / expandingWidgets , r.height()) ); else @@ -445,12 +445,12 @@ KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly) colMinWidth = TQMAX( colMinWidth, itemMinSize.width() ); ++it2; } - tqsizeHint = tqsizeHint.expandedTo( TQSize( x + spacing() + w, sizeHintHeight) ); + sizeHint = sizeHint.expandedTo( TQSize( x + spacing() + w, sizeHintHeight) ); minSizeWidth = minSizeWidth + spacing() + colMinWidth; minSize = minSize.expandedTo( TQSize(minSizeWidth, minSizeHeight) ); - // store tqsizeHint() and tqminimumSize() - m_cached_tqsizeHint = tqsizeHint + TQSize(2* margin(), 2*margin()); + // store sizeHint() and minimumSize() + m_cached_sizeHint = sizeHint + TQSize(2* margin(), 2*margin()); m_cached_minSize = minSize + TQSize(2* margin(), 2*margin()); // return our width return x + w - r.x(); diff --git a/kexi/widget/utils/kexiflowlayout.h b/kexi/widget/utils/kexiflowlayout.h index 0f6d8384..c4550fca 100644 --- a/kexi/widget/utils/kexiflowlayout.h +++ b/kexi/widget/utils/kexiflowlayout.h @@ -53,8 +53,8 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout virtual bool hasHeightForWidth() const; virtual int heightForWidth(int width) const; - virtual TQSize tqsizeHint() const; - virtual TQSize tqminimumSize() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSize() const; virtual TQSizePolicy::ExpandData expanding() const; virtual bool isEmpty(); @@ -75,7 +75,7 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout int m_cached_hfw; bool m_justify; Qt::Orientation m_orientation; - TQSize m_cached_tqsizeHint; + TQSize m_cached_sizeHint; TQSize m_cached_minSize; }; diff --git a/kexi/widget/utils/kexirecordmarker.cpp b/kexi/widget/utils/kexirecordmarker.cpp index b22e0500..e3e281e3 100644 --- a/kexi/widget/utils/kexirecordmarker.cpp +++ b/kexi/widget/utils/kexirecordmarker.cpp @@ -188,13 +188,13 @@ void KexiRecordMarker::paintEvent(TQPaintEvent *e) if(last > (d->rows-1+(d->showInsertRow?1:0))) last = d->rows-1+(d->showInsertRow?1:0); - TQColorGroup selectedColorGroup(tqcolorGroup()); + TQColorGroup selectedColorGroup(colorGroup()); selectedColorGroup.setColor( TQColorGroup::Button, KexiUtils::blendedColors( selectedColorGroup.color(TQColorGroup::Background), d->selectionBackgroundColor, 2, 1) ); selectedColorGroup.setColor( TQColorGroup::Background, selectedColorGroup.color(TQColorGroup::Button) ); //set background color as well (e.g. for thinkeramik) - TQColorGroup highlightedColorGroup(tqcolorGroup()); + TQColorGroup highlightedColorGroup(colorGroup()); highlightedColorGroup.setColor( TQColorGroup::Button, KexiUtils::blendedColors( highlightedColorGroup.color(TQColorGroup::Background), d->selectionBackgroundColor, 4, 1) ); @@ -206,7 +206,7 @@ void KexiRecordMarker::paintEvent(TQPaintEvent *e) TQRect r(0, y, width(), d->rowHeight); p.drawRect(r); tqstyle().tqdrawPrimitive( TQStyle::PE_HeaderSection, &p, r, - (d->currentRow == i) ? selectedColorGroup : (d->highlightedRow == i ? highlightedColorGroup : tqcolorGroup()), + (d->currentRow == i) ? selectedColorGroup : (d->highlightedRow == i ? highlightedColorGroup : colorGroup()), TQStyle::Style_Raised | (isEnabled() ? TQStyle::Style_Enabled : 0)); } if (d->editRow!=-1 && d->editRow >= first && d->editRow <= (last/*+1 for insert row*/)) { @@ -220,7 +220,7 @@ void KexiRecordMarker::paintEvent(TQPaintEvent *e) && (!d->showInsertRow || (d->showInsertRow && d->currentRow < last)))/*don't display marker for 'insert' row*/ { //show marker - p.setBrush(tqcolorGroup().foreground()); + p.setBrush(colorGroup().foreground()); p.setPen(TQPen(TQt::NoPen)); TQPointArray points(3); int ofs = d->rowHeight / 4; diff --git a/kexi/widget/utils/kexirecordnavigator.cpp b/kexi/widget/utils/kexirecordnavigator.cpp index 4c1dd02b..9dd8cccc 100644 --- a/kexi/widget/utils/kexirecordnavigator.cpp +++ b/kexi/widget/utils/kexirecordnavigator.cpp @@ -102,7 +102,7 @@ KexiRecordNavigator::KexiRecordNavigator(TQWidget *parent, int leftMargin, const d->lyr->addSpacing( 6 ); d->lyr->addWidget( m_navRecordNumber = new KLineEdit(this) ); - m_navRecordNumber->tqsetAlignment(AlignRight | AlignVCenter); + m_navRecordNumber->setAlignment(AlignRight | AlignVCenter); m_navRecordNumber->setFocusPolicy(TQ_ClickFocus); m_navRecordNumber->installEventFilter(this); // m_navRowNumber->setFixedWidth(fw); @@ -112,20 +112,20 @@ KexiRecordNavigator::KexiRecordNavigator(TQWidget *parent, int leftMargin, const TQToolTip::add(m_navRecordNumber, i18n("Current row number")); KLineEdit *lbl_of = new KLineEdit(i18n("of"), this); - lbl_of->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); + lbl_of->setSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); lbl_of->setMaximumWidth(fm.width(lbl_of->text())+8); lbl_of->setReadOnly(true); lbl_of->setLineWidth(0); lbl_of->setFocusPolicy(TQ_NoFocus); - lbl_of->tqsetAlignment(AlignCenter); + lbl_of->setAlignment(AlignCenter); d->lyr->addWidget( lbl_of ); d->lyr->addWidget( m_navRecordCount = new KLineEdit(this) ); - m_navRecordCount->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); + m_navRecordCount->setSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred); m_navRecordCount->setReadOnly(true); m_navRecordCount->setLineWidth(0); m_navRecordCount->setFocusPolicy(TQ_NoFocus); - m_navRecordCount->tqsetAlignment(AlignLeft | AlignVCenter); + m_navRecordCount->setAlignment(AlignLeft | AlignVCenter); TQToolTip::add(m_navRecordCount, i18n("Number of rows")); lbl_of->setFont(f); @@ -337,7 +337,7 @@ void KexiRecordNavigator::updateGeometry(int leftMargin) if (m_view) { int navWidth; if (m_view->horizontalScrollBar()->isVisible()) { - navWidth = tqsizeHint().width(); + navWidth = sizeHint().width(); } else { navWidth = leftMargin + m_view->clipper()->width(); @@ -345,9 +345,9 @@ void KexiRecordNavigator::updateGeometry(int leftMargin) setGeometry( m_view->frameWidth(), - m_view->height() - m_view->horizontalScrollBar()->tqsizeHint().height()-m_view->frameWidth(), + m_view->height() - m_view->horizontalScrollBar()->sizeHint().height()-m_view->frameWidth(), navWidth, - m_view->horizontalScrollBar()->tqsizeHint().height() + m_view->horizontalScrollBar()->sizeHint().height() ); m_view->updateScrollBars(); @@ -361,7 +361,7 @@ void KexiRecordNavigator::setHBarGeometry( TQScrollBar & hbar, int x, int y, int void KexiRecordNavigator::setLabelText(const TQString& text) { - m_textLabel->setText(text.isEmpty() ? TQString() : (TQString::tqfromLatin1(" ")+text+" ")); + m_textLabel->setText(text.isEmpty() ? TQString() : (TQString::fromLatin1(" ")+text+" ")); } void KexiRecordNavigator::setInsertingButtonVisible(bool set) @@ -429,7 +429,7 @@ void KexiRecordNavigator::setEditingIndicatorEnabled(bool set) if (d->editingIndicatorEnabled) { if (!d->editingIndicatorLabel) { d->editingIndicatorLabel = new TQLabel(this); - d->editingIndicatorLabel->tqsetAlignment(TQt::AlignCenter); + d->editingIndicatorLabel->setAlignment(TQt::AlignCenter); TQPixmap pix; pix.convertFromImage( *KexiRecordMarker::penImage() ); d->editingIndicatorLabel->setFixedWidth( pix.width() + 2*2 ); diff --git a/kexi/widget/utils/kexitooltip.cpp b/kexi/widget/utils/kexitooltip.cpp index 7d71752c..ad55774e 100644 --- a/kexi/widget/utils/kexitooltip.cpp +++ b/kexi/widget/utils/kexitooltip.cpp @@ -42,7 +42,7 @@ KexiToolTip::~KexiToolTip() { } -TQSize KexiToolTip::tqsizeHint() const +TQSize KexiToolTip::sizeHint() const { TQSize sz(fontMetrics().boundingRect(m_value.toString()).size()); return sz; diff --git a/kexi/widget/utils/kexitooltip.h b/kexi/widget/utils/kexitooltip.h index cfa1b483..83d0d7e0 100644 --- a/kexi/widget/utils/kexitooltip.h +++ b/kexi/widget/utils/kexitooltip.h @@ -32,7 +32,7 @@ class KEXIGUIUTILS_EXPORT KexiToolTip : public TQWidget KexiToolTip(const TQVariant& value, TQWidget* parent); virtual ~KexiToolTip(); - virtual TQSize tqsizeHint() const; + virtual TQSize sizeHint() const; public slots: virtual void show(); |