diff options
Diffstat (limited to 'kexi/widget')
29 files changed, 112 insertions, 112 deletions
diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp index 46c7ade9..0f8b5e02 100644 --- a/kexi/widget/kexibrowser.cpp +++ b/kexi/widget/kexibrowser.cpp @@ -148,7 +148,7 @@ KexiBrowser::KexiBrowser(TQWidget* tqparent, KexiMainWindow *mainWin, int featur m_deleteAction = new KAction(i18n("&Delete"), "editdelete", 0/*TQt::Key_Delete*/, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), m_actions, "edit_delete"); //! @todo 1.1: just add "Delete" tooltip and what's this - m_deleteAction->setToolTip(i18n("&Delete").tqreplace("&","")); + m_deleteAction->setToolTip(i18n("&Delete").replace("&","")); m_renameAction = new KAction(i18n("&Rename"), "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRename()), m_actions, "edit_rename"); @@ -370,7 +370,7 @@ KexiBrowserItem *KexiBrowser::addGroup(KexiPart::Info& info) KexiBrowserItem* KexiBrowser::addItem(KexiPart::Item& item) { //part object for this item - KexiBrowserItem *tqparent = item.mimeType().isEmpty() ? 0 : m_baseItems.tqfind(item.mimeType().lower()); + KexiBrowserItem *tqparent = item.mimeType().isEmpty() ? 0 : m_baseItems.find(item.mimeType().lower()); return addItem(item, tqparent, tqparent->info()); } diff --git a/kexi/widget/kexidataawareview.cpp b/kexi/widget/kexidataawareview.cpp index c22c0dbb..13e308c8 100644 --- a/kexi/widget/kexidataawareview.cpp +++ b/kexi/widget/kexidataawareview.cpp @@ -120,8 +120,8 @@ void KexiDataAwareView::initActions() plugSharedAction("edit_paste", TQT_TQOBJECT(this), TQT_SLOT(paste())); m_actionClient->plugSharedAction(sharedAction("edit_paste")); //for proper shortcut -// plugSharedAction("edit_tqfind", TQT_TQOBJECT(this), TQT_SLOT(editFind())); -// m_actionClient->plugSharedAction(sharedAction("edit_tqfind")); //for proper shortcut +// plugSharedAction("edit_find", TQT_TQOBJECT(this), TQT_SLOT(editFind())); +// m_actionClient->plugSharedAction(sharedAction("edit_find")); //for proper shortcut // plugSharedAction("edit_findnext", TQT_TQOBJECT(this), TQT_SLOT(editFindNext())); // m_actionClient->plugSharedAction(sharedAction("edit_findnext")); //for proper shortcut @@ -129,13 +129,13 @@ void KexiDataAwareView::initActions() // plugSharedAction("edit_findprevious", TQT_TQOBJECT(this), TQT_SLOT(editFindPrevious())); // m_actionClient->plugSharedAction(sharedAction("edit_findprev")); //for proper shortcut -//! @todo plugSharedAction("edit_tqreplace", TQT_TQOBJECT(this), TQT_SLOT(editReplace())); -//! @todo m_actionClient->plugSharedAction(sharedAction("edit_tqreplace")); //for proper shortcut +//! @todo plugSharedAction("edit_replace", TQT_TQOBJECT(this), TQT_SLOT(editReplace())); +//! @todo m_actionClient->plugSharedAction(sharedAction("edit_replace")); //for proper shortcut -// setAvailable("edit_tqfind", true); +// setAvailable("edit_find", true); // setAvailable("edit_findnext", true); // setAvailable("edit_findprevious", true); -//! @todo setAvailable("edit_tqreplace", true); +//! @todo setAvailable("edit_replace", true); } void KexiDataAwareView::slotUpdateRowActions(int row) @@ -329,7 +329,7 @@ bool KexiDataAwareView::setupFindAndReplace(TQStringList& columnNames, TQStringL return true; } -tristate KexiDataAwareView::tqfind(const TQVariant& valueToFind, +tristate KexiDataAwareView::find(const TQVariant& valueToFind, const KexiSearchAndReplaceViewInterface::Options& options, bool next) { if (!dataAwareObject() || !dataAwareObject()->data()) @@ -338,7 +338,7 @@ tristate KexiDataAwareView::tqfind(const TQVariant& valueToFind, // const KexiDataAwareObjectInterface::FindAndReplaceOptions options(dlg->options()); /* if (res == KexiFindDialog::Find) {*/ // TQVariant valueToFind(dlg->valueToFind()); - return dataAwareObject()->tqfind( valueToFind, options, next ); + return dataAwareObject()->find( valueToFind, options, next ); /* //! @todo result... diff --git a/kexi/widget/kexidataawareview.h b/kexi/widget/kexidataawareview.h index 31a43445..98124f5a 100644 --- a/kexi/widget/kexidataawareview.h +++ b/kexi/widget/kexidataawareview.h @@ -55,14 +55,14 @@ class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase, KexiDataAwareObjectInterface* dataAwareObject() const { return m_dataAwareObject; } - /*! Sets up data for tqfind/replace dialog, based on view's data model. + /*! Sets up data for find/replace dialog, based on view's data model. Implemented for KexiSearchAndReplaceViewInterface. */ virtual bool setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions, TQString& currentColumnName); /*! Finds \a valueToFind within the view. Implemented for KexiSearchAndReplaceViewInterface. */ - virtual tristate tqfind(const TQVariant& valueToFind, + virtual tristate find(const TQVariant& valueToFind, const KexiSearchAndReplaceViewInterface::Options& options, bool next); /*! Finds \a valueToFind within the view and replaces with \a replacement. diff --git a/kexi/widget/kexidatasourcecombobox.cpp b/kexi/widget/kexidatasourcecombobox.cpp index 77895e24..0db52c9d 100644 --- a/kexi/widget/kexidatasourcecombobox.cpp +++ b/kexi/widget/kexidatasourcecombobox.cpp @@ -310,7 +310,7 @@ void KexiDataSourceComboBox::slotReturnPressed(const TQString & text) changed = true; } else { - TQListBoxItem *item = listBox()->tqfindItem( text, TQt::ExactMatch ); + TQListBoxItem *item = listBox()->findItem( text, TQt::ExactMatch ); if (item) { int index = listBox()->index( item ); //if (index < d->firstTableIndex()) diff --git a/kexi/widget/kexidbdrivercombobox.cpp b/kexi/widget/kexidbdrivercombobox.cpp index 8026106d..e083ac1c 100644 --- a/kexi/widget/kexidbdrivercombobox.cpp +++ b/kexi/widget/kexidbdrivercombobox.cpp @@ -74,7 +74,7 @@ KexiDBDriverComboBox::~KexiDBDriverComboBox() TQString KexiDBDriverComboBox::selectedDriverName() const { - TQMapConstIterator<TQString,TQString> it( m_driversMap.tqfind( text( currentItem() ) ) ); + TQMapConstIterator<TQString,TQString> it( m_driversMap.find( text( currentItem() ) ) ); if (it==m_driversMap.constEnd()) return TQString(); return it.data(); @@ -82,7 +82,7 @@ TQString KexiDBDriverComboBox::selectedDriverName() const void KexiDBDriverComboBox::setDriverName(const TQString& driverName) { - int index = m_driverNames.tqfindIndex( driverName.lower() ); + int index = m_driverNames.findIndex( driverName.lower() ); if (index==-1) { return; } diff --git a/kexi/widget/kexieditor.cpp b/kexi/widget/kexieditor.cpp index 82af06a3..f45faaa1 100644 --- a/kexi/widget/kexieditor.cpp +++ b/kexi/widget/kexieditor.cpp @@ -183,7 +183,7 @@ void KexiEditor::setHighlightMode(const TQString& highlightmodename) KTextEditor::HighlightingInterface *hl = KTextEditor::highlightingInterface( d->doc ); for(uint i = 0; i < hl->hlModeCount(); i++) { //kdDebug() << "hlmode("<<i<<"): " << hl->hlModeName(i) << endl; - if (hl->hlModeName(i).tqcontains(highlightmodename, false)) { + if (hl->hlModeName(i).contains(highlightmodename, false)) { hl->setHlMode(i); return; } diff --git a/kexi/widget/kexifieldcombobox.cpp b/kexi/widget/kexifieldcombobox.cpp index fcf81036..0439a178 100644 --- a/kexi/widget/kexifieldcombobox.cpp +++ b/kexi/widget/kexifieldcombobox.cpp @@ -150,7 +150,7 @@ bool KexiFieldComboBox::isTableAssigned() const void KexiFieldComboBox::setFieldOrExpression(const TQString& string) { const TQString name(string); //string.stripWhiteSpace().lower()); - const int pos = name.tqfind('.'); + const int pos = name.find('.'); if (pos==-1) { d->fieldOrExpression = name; } @@ -167,7 +167,7 @@ void KexiFieldComboBox::setFieldOrExpression(const TQString& string) d->fieldOrExpression = name.mid(pos+1); } - TQListBoxItem *item = listBox()->tqfindItem(d->fieldOrExpression); + TQListBoxItem *item = listBox()->findItem(d->fieldOrExpression); if (!item) { setCurrentItem(0); setCurrentText(d->fieldOrExpression); @@ -228,7 +228,7 @@ void KexiFieldComboBox::slotReturnPressed(const TQString & text) index = 0; } else { - TQListBoxItem *item = listBox()->tqfindItem( text, TQt::ExactMatch ); + TQListBoxItem *item = listBox()->findItem( text, TQt::ExactMatch ); if (!item) return; index = listBox()->index( item ); diff --git a/kexi/widget/kexipropertyeditorview.cpp b/kexi/widget/kexipropertyeditorview.cpp index 801f17b2..5c36cfb0 100644 --- a/kexi/widget/kexipropertyeditorview.cpp +++ b/kexi/widget/kexipropertyeditorview.cpp @@ -183,13 +183,13 @@ void KexiPropertyEditorView::updateInfoLabelForPropertySet(KexiObjectInfoLabel * { TQString className, iconName, objectName; if (set) { - if (set->tqcontains("this:classString")) + if (set->contains("this:classString")) className = (*set)["this:classString"].value().toString(); - if (set->tqcontains("this:iconName")) + if (set->contains("this:iconName")) iconName = (*set)["this:iconName"].value().toString(); - const bool useCaptionAsObjectName = set->tqcontains("this:useCaptionAsObjectName") + const bool useCaptionAsObjectName = set->contains("this:useCaptionAsObjectName") && (*set)["this:useCaptionAsObjectName"].value().toBool(); - if (set->tqcontains(useCaptionAsObjectName ? "caption" : "name")) + if (set->contains(useCaptionAsObjectName ? "caption" : "name")) objectName = (*set)[useCaptionAsObjectName ? "caption" : "name"].value().toString(); } if (!set || objectName.isEmpty()) { diff --git a/kexi/widget/kexiscrollview.cpp b/kexi/widget/kexiscrollview.cpp index 64d03681..b88ad3ae 100644 --- a/kexi/widget/kexiscrollview.cpp +++ b/kexi/widget/kexiscrollview.cpp @@ -205,7 +205,7 @@ KexiScrollView::contentsMousePressEvent(TQMouseEvent *ev) return; TQRect r3(0, 0, m_widget->width() + 4, m_widget->height() + 4); - if(!r3.tqcontains(ev->pos())) // clicked outside form + if(!r3.contains(ev->pos())) // clicked outside form //m_form->resetSelection(); emit outerAreaClicked(); @@ -214,7 +214,7 @@ KexiScrollView::contentsMousePressEvent(TQMouseEvent *ev) TQRect r(m_widget->width(), 0, 4, m_widget->height() + 4); // right limit TQRect r2(0, m_widget->height(), m_widget->width() + 4, 4); // bottom limit - if(r.tqcontains(ev->pos()) || r2.tqcontains(ev->pos())) + if(r.contains(ev->pos()) || r2.contains(ev->pos())) { m_resizing = true; emit resizingStarted(); @@ -303,11 +303,11 @@ KexiScrollView::contentsMouseMoveEvent(TQMouseEvent *ev) TQRect r2(0, m_widget->height(), m_widget->width(), 4); // bottom TQRect r3(m_widget->width(), m_widget->height(), 4, 4); // bottom-right corner - if(r.tqcontains(p)) + if(r.contains(p)) setCursor(TQCursor::SizeHorCursor); - else if(r2.tqcontains(p)) + else if(r2.contains(p)) setCursor(TQCursor::SizeVerCursor); - else if(r3.tqcontains(p)) + else if(r3.contains(p)) setCursor(TQCursor::SizeFDiagCursor); else unsetCursor(); diff --git a/kexi/widget/pixmapcollection.cpp b/kexi/widget/pixmapcollection.cpp index f5bc4d9e..fecc5b76 100644 --- a/kexi/widget/pixmapcollection.cpp +++ b/kexi/widget/pixmapcollection.cpp @@ -50,7 +50,7 @@ TQString PixmapCollection::addPixmapPath(const KURL &url) { TQString name = url.filename(); - while(m_pixmaps.tqcontains(name)) + while(m_pixmaps.contains(name)) { bool ok; int num = name.right(1).toInt(&ok, 10); @@ -68,7 +68,7 @@ TQString PixmapCollection::addPixmapName(const TQString &icon, int size) { TQString name = icon; - while(m_pixmaps.tqcontains(name)) + while(m_pixmaps.contains(name)) { bool ok; int num = name.right(1).toInt(&ok, 10); @@ -91,7 +91,7 @@ PixmapCollection::removePixmap(const TQString &name) TQPixmap PixmapCollection::getPixmap(const TQString &name) { - if(!m_pixmaps.tqcontains(name)) + if(!m_pixmaps.contains(name)) { kdDebug() << " The icon " << name << " you requested is not in the collection" << endl; return TQPixmap(); @@ -106,9 +106,9 @@ PixmapCollection::getPixmap(const TQString &name) } bool -PixmapCollection::tqcontains(const TQString &name) +PixmapCollection::contains(const TQString &name) { - return m_pixmaps.tqcontains(name); + return m_pixmaps.contains(name); } void @@ -351,7 +351,7 @@ void PixmapCollectionEditor::renameCollectionItem(TQIconViewItem *it, const TQString &name) { PixmapIconViewItem *item = static_cast<PixmapIconViewItem*>(it); - if(!m_collection->m_pixmaps.tqcontains(item->name())) + if(!m_collection->m_pixmaps.contains(item->name())) return; // We just rename the collection item @@ -390,7 +390,7 @@ PixmapCollectionChooser::PixmapCollectionChooser(PixmapCollection *collection, c for(it = collection->m_pixmaps.constBegin(); it != endIt; ++it) new PixmapIconViewItem(m_iconView, it.key(), getPixmap(it.key())); - TQIconViewItem *item = m_iconView->tqfindItem(selectedItem, TQt::ExactMatch); + TQIconViewItem *item = m_iconView->findItem(selectedItem, TQt::ExactMatch); if(item && !selectedItem.isEmpty()) m_iconView->setCurrentItem(item); } diff --git a/kexi/widget/pixmapcollection.h b/kexi/widget/pixmapcollection.h index caf11fd5..3ac4c417 100644 --- a/kexi/widget/pixmapcollection.h +++ b/kexi/widget/pixmapcollection.h @@ -53,7 +53,7 @@ class KEXIEXTWIDGETS_EXPORT PixmapCollection : public TQObject TQString addPixmapName(const TQString &name, int size = KIcon::SizeMedium); void removePixmap(const TQString &name); - bool tqcontains(const TQString &name); + bool contains(const TQString &name); TQPixmap getPixmap(const TQString &name); void save(TQDomNode parentNode); diff --git a/kexi/widget/relations/kexirelationview.cpp b/kexi/widget/relations/kexirelationview.cpp index 2be89bb0..b1fc22d2 100644 --- a/kexi/widget/relations/kexirelationview.cpp +++ b/kexi/widget/relations/kexirelationview.cpp @@ -116,7 +116,7 @@ KexiRelationView::containerForTable(KexiDB::TableSchema* tableSchema) KexiRelationViewTableContainer * KexiRelationView::tableContainer(KexiDB::TableSchema *t) const { - return t ? m_tables.tqfind(t->name()) : 0; + return t ? m_tables.find(t->name()) : 0; } KexiRelationViewTableContainer* @@ -554,7 +554,7 @@ KexiRelationView::hideAllTablesExcept( KexiDB::TableSchema::List* tables ) //! @todo what about queries? for (TablesDictIterator it(m_tables); it.current();) { KexiDB::TableSchema *table = it.current()->schema()->table(); - if (!table || tables->tqfindRef( table )!=-1) { + if (!table || tables->findRef( table )!=-1) { ++it; continue; } diff --git a/kexi/widget/relations/kexirelationviewconnection.cpp b/kexi/widget/relations/kexirelationviewconnection.cpp index 7c813298..f294b49c 100644 --- a/kexi/widget/relations/kexirelationviewconnection.cpp +++ b/kexi/widget/relations/kexirelationviewconnection.cpp @@ -221,7 +221,7 @@ KexiRelationViewConnection::matchesPoint(const TQPoint &p, int tolerance) { TQRect we = connectionRect(); - if(!we.tqcontains(p)) + if(!we.contains(p)) return false; /** get our coordinats diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp index 2145cf20..a45a9ad1 100644 --- a/kexi/widget/relations/kexirelationviewtable.cpp +++ b/kexi/widget/relations/kexirelationviewtable.cpp @@ -338,7 +338,7 @@ void KexiRelationViewTable::setReadOnly(bool b) int KexiRelationViewTable::globalY(const TQString &item) { - TQListViewItem *i = tqfindItem(item, 0); + TQListViewItem *i = findItem(item, 0); if (!i) return -1; int y = tqitemRect(i).y() + (tqitemRect(i).height() / 2); diff --git a/kexi/widget/relations/kexirelationwidget.cpp b/kexi/widget/relations/kexirelationwidget.cpp index e48a5d00..ee9caeed 100644 --- a/kexi/widget/relations/kexirelationwidget.cpp +++ b/kexi/widget/relations/kexirelationwidget.cpp @@ -143,7 +143,7 @@ TablesDict* KexiRelationWidget::tables() const KexiRelationViewTableContainer* KexiRelationWidget::table(const TQString& name) const { - return m_relationView->tables()->tqfind( name ); + return m_relationView->tables()->find( name ); } const ConnectionList* KexiRelationWidget::connections() const diff --git a/kexi/widget/tableview/kexicelleditorfactory.cpp b/kexi/widget/tableview/kexicelleditorfactory.cpp index e0e9ec03..a2c79a88 100644 --- a/kexi/widget/tableview/kexicelleditorfactory.cpp +++ b/kexi/widget/tableview/kexicelleditorfactory.cpp @@ -176,7 +176,7 @@ KexiTableEdit* KexiCellEditorFactory::createEditor(KexiTableViewColumn &column, KexiDB::IndexSchema::ListIterator it = table->indicesIterator(); for (;it.current();++it) { KexiDB::IndexSchema *idx = it.current(); - if (idx->fields()->tqfindRef(&f)!=-1) { + if (idx->fields()->findRef(&f)!=-1) { //find details-side rel. for this index KexiDB::Relationship *rel = idx->detailsRelationships()->first(); if (rel) { diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp index 4695dbf8..8b803746 100644 --- a/kexi/widget/tableview/kexicomboboxtableedit.cpp +++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp @@ -352,7 +352,7 @@ bool KexiComboBoxTableEdit::eventFilter( TQObject *o, TQEvent *e ) + TQPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button)); TQRect r(d->button->mapToGlobal(d->button->tqgeometry().topLeft()), d->button->mapToGlobal(d->button->tqgeometry().bottomRight())); - if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(popup()) && popup()->isVisible() && r.tqcontains( gp )) { + if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(popup()) && popup()->isVisible() && r.contains( gp )) { m_mouseBtnPressedWhenPopupVisible = true; } } diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp index 95ed31c0..79613d9d 100644 --- a/kexi/widget/tableview/kexidataawareobjectiface.cpp +++ b/kexi/widget/tableview/kexidataawareobjectiface.cpp @@ -306,7 +306,7 @@ bool KexiDataAwareObjectInterface::sort() return true; } if (m_currentItem != m_insertItem) { - m_curRow = m_data->tqfindRef(m_currentItem); + m_curRow = m_data->findRef(m_currentItem); int jump = m_curRow - oldRow; if (jump<0) (*m_itemIterator) -= -jump; @@ -1283,7 +1283,7 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row) void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool tqrepaint) { - int row = m_data->tqfindRef(item); + int row = m_data->findRef(item); slotRowInserted( item, row, tqrepaint ); } @@ -1493,7 +1493,7 @@ void KexiDataAwareObjectInterface::slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* /*result*/, bool tqrepaint) { if (tqrepaint) { - m_rowWillBeDeleted = m_data->tqfindRef(&item); + m_rowWillBeDeleted = m_data->findRef(&item); } } @@ -1888,7 +1888,7 @@ static inline bool findInString(const TQString& stringValue, int stringLength, c if (wholeWordsOnly) { const int whereLength = where.length(); while (true) { - pos = where.tqfind( stringValue, pos, caseSensitive ); + pos = where.find( stringValue, pos, caseSensitive ); if (pos == -1) break; if ((pos > 0 && where.at(pos-1).isLetterOrNumber()) @@ -1902,7 +1902,7 @@ static inline bool findInString(const TQString& stringValue, int stringLength, c firstCharacter = pos; } else {// !wholeWordsOnly - firstCharacter = where.tqfind( stringValue, pos, caseSensitive ); + firstCharacter = where.find( stringValue, pos, caseSensitive ); } return firstCharacter != -1; } @@ -1915,7 +1915,7 @@ static inline bool findInString(const TQString& stringValue, int stringLength, c if (wholeWordsOnly) { const int whereLength = where.length(); while (true) { - pos = where.tqfindRev( stringValue, pos, caseSensitive ); + pos = where.findRev( stringValue, pos, caseSensitive ); if (pos == -1) break; if ((pos > 0 && where.at(pos-1).isLetterOrNumber()) @@ -1932,7 +1932,7 @@ static inline bool findInString(const TQString& stringValue, int stringLength, c firstCharacter = pos; } else {// !wholeWordsOnly - firstCharacter = where.tqfindRev( stringValue, pos, caseSensitive ); + firstCharacter = where.findRev( stringValue, pos, caseSensitive ); } return firstCharacter != -1; } @@ -1962,7 +1962,7 @@ static inline bool findInString(const TQString& stringValue, int stringLength, c return false; } -tristate KexiDataAwareObjectInterface::tqfind(const TQVariant& valueToFind, +tristate KexiDataAwareObjectInterface::find(const TQVariant& valueToFind, const KexiSearchAndReplaceViewInterface::Options& options, bool next) { if (!hasData()) diff --git a/kexi/widget/tableview/kexidataawareobjectiface.h b/kexi/widget/tableview/kexidataawareobjectiface.h index 3ac196fb..389c1c74 100644 --- a/kexi/widget/tableview/kexidataawareobjectiface.h +++ b/kexi/widget/tableview/kexidataawareobjectiface.h @@ -490,7 +490,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface \return true if value has been found, false if value has not been found, and cancelled if there is nothing to find or there is no data to search in. */ - virtual tristate tqfind(const TQVariant& valueToFind, + virtual tristate find(const TQVariant& valueToFind, const KexiSearchAndReplaceViewInterface::Options& options, bool next); /*! Finds \a valueToFind within the data items and replaces with \a replacement @@ -705,7 +705,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface This is per-interface global cache. Needed for faster lookup because there could be lookup values. Called whenever columns definition changes, i.e. in setData() and clearColumns(). - @see tqfind() */ + @see find() */ void updateIndicesForVisibleValues(); //! data structure displayed for this object @@ -856,7 +856,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface bool exists : 1; }; - /*! Used to mark recently found value. Updated on succesful execution of tqfind(). + /*! Used to mark recently found value. Updated on succesful execution of find(). If the current cursor's position changes, or data in the current cell changes, positionOfRecentlyFoundValue.exists is set to false. */ PositionOfValue m_positionOfRecentlyFoundValue; @@ -867,7 +867,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface /*! Used to compare whether the search direction has changed. */ KexiSearchAndReplaceViewInterface::Options::SearchDirection m_recentSearchDirection; - //! Setup by updateIndicesForVisibleValues() and used by tqfind() + //! Setup by updateIndicesForVisibleValues() and used by find() TQValueVector<uint> m_indicesForVisibleValues; }; diff --git a/kexi/widget/tableview/kexidataawarepropertyset.cpp b/kexi/widget/tableview/kexidataawarepropertyset.cpp index 7d49ec52..5668fbfd 100644 --- a/kexi/widget/tableview/kexidataawarepropertyset.cpp +++ b/kexi/widget/tableview/kexidataawarepropertyset.cpp @@ -238,7 +238,7 @@ KoProperty::Set* KexiDataAwarePropertySet::findPropertySetForItem(KexiTableItem& { if (m_currentTVData.isNull()) return 0; - int idx = m_currentTVData->tqfindRef(&item); + int idx = m_currentTVData->findRef(&item); if (idx<0) return 0; return m_sets[idx]; @@ -249,7 +249,7 @@ int KexiDataAwarePropertySet::findRowForPropertyValue(const TQCString& propertyN const int size = m_sets.size(); for (int i=0; i<size; i++) { KoProperty::Set *set = m_sets[i]; - if (!set || !set->tqcontains(propertyName)) + if (!set || !set->contains(propertyName)) continue; if (set->property(propertyName).value() == value) return i; diff --git a/kexi/widget/tableview/kexidatetableedit.cpp b/kexi/widget/tableview/kexidatetableedit.cpp index af71ae4c..a0b5185e 100644 --- a/kexi/widget/tableview/kexidatetableedit.cpp +++ b/kexi/widget/tableview/kexidatetableedit.cpp @@ -105,7 +105,7 @@ void KexiDateTableEdit::setupContents( TQPainter *p, bool focused, const TQVaria bool KexiDateTableEdit::valueIsNull() { -// if (m_lineedit->text().tqreplace(m_formatter.separator(),"").stripWhiteSpace().isEmpty()) +// if (m_lineedit->text().replace(m_formatter.separator(),"").stripWhiteSpace().isEmpty()) if (m_formatter.isEmpty(m_lineedit->text())) //empty date is null return true; return dateValue().isNull(); diff --git a/kexi/widget/tableview/kexiinputtableedit.cpp b/kexi/widget/tableview/kexiinputtableedit.cpp index 26a3ed7f..575ae1e6 100644 --- a/kexi/widget/tableview/kexiinputtableedit.cpp +++ b/kexi/widget/tableview/kexiinputtableedit.cpp @@ -280,7 +280,7 @@ TQVariant KexiInputTableEdit::value() //! js @todo PRESERVE PRECISION! TQString txt = m_lineedit->text(); if (m_decsym!=".") - txt = txt.tqreplace(m_decsym,".");//convert back + txt = txt.replace(m_decsym,".");//convert back bool ok; const double result = txt.toDouble(&ok); return ok ? TQVariant(result) : TQVariant(); diff --git a/kexi/widget/tableview/kexitableedit.h b/kexi/widget/tableview/kexitableedit.h index 1d9378b0..ef618178 100644 --- a/kexi/widget/tableview/kexitableedit.h +++ b/kexi/widget/tableview/kexitableedit.h @@ -120,12 +120,12 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public TQWidget, public KexiDataItemI int align, int x, int y_offset, int w, int h, const TQColor& fillColor, const TQFontMetrics &fm, bool readOnly, bool fullRowSelection ); - /*! Sometimes, editor can contain non-standard margin, for example combobox editor tqcontains + /*! Sometimes, editor can contain non-standard margin, for example combobox editor contains dropdown button at the right side. \return left margin's size; 0 by default. For reimplementation. */ int leftMargin() const { return m_leftMargin; } - /*! Sometimes, editor can contain non-standard margin, for example combobox editor tqcontains + /*! Sometimes, editor can contain non-standard margin, for example combobox editor contains dropdown button at the right side. THe dropdown button's width is counted only if \a focused is true. \return right margin's size; 0 by default. For reimplementation. */ int rightMargin(bool focused) const; diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp index 9fc319ff..d164f68a 100644 --- a/kexi/widget/tableview/kexitableview.cpp +++ b/kexi/widget/tableview/kexitableview.cpp @@ -1037,7 +1037,7 @@ void KexiTableView::contentsMousePressEvent( TQMouseEvent* e ) s = TQMIN( columnWidth(m_curCol)-3, s ); //avoid too large box const TQRect r( columnPos(m_curCol) + TQMAX( columnWidth(m_curCol)/2 - s/2, 0 ), rowPos(m_curRow) +d->rowHeight/2 - s/2 /*- 1*/, s, s); //kexidbg << r << endl; - if (r.tqcontains(e->pos())) { + if (r.contains(e->pos())) { // kexidbg << "e->x:" << e->x() << " e->y:" << e->y() << " " << rowPos(m_curRow) << // " " << columnPos(m_curCol) << endl; boolToggled(); @@ -2040,7 +2040,7 @@ void KexiTableView::removeEditor() void KexiTableView::slotRowRepaintRequested(KexiTableItem& item) { - updateRow( m_data->tqfindRef(&item) ); + updateRow( m_data->findRef(&item) ); } //(js) unused diff --git a/kexi/widget/tableview/kexitableviewdata.h b/kexi/widget/tableview/kexitableviewdata.h index b22d619d..dec81f95 100644 --- a/kexi/widget/tableview/kexitableviewdata.h +++ b/kexi/widget/tableview/kexitableviewdata.h @@ -408,7 +408,7 @@ public: inline bool isEmpty () const { return KexiTableViewDataBase::isEmpty(); } inline KexiTableItem* first() { return KexiTableViewDataBase::first(); } inline KexiTableItem* last() { return KexiTableViewDataBase::last(); } - inline int tqfindRef( const KexiTableItem* item ) { return KexiTableViewDataBase::tqfindRef(item); } + inline int findRef( const KexiTableItem* item ) { return KexiTableViewDataBase::findRef(item); } inline void sort() { KexiTableViewDataBase::sort(); } inline bool removeFirst() { return KexiTableViewDataBase::removeFirst(); } inline bool removeLast() { return KexiTableViewDataBase::removeLast(); } diff --git a/kexi/widget/tableview/kexitextformatter.cpp b/kexi/widget/tableview/kexitextformatter.cpp index b7388138..6045620a 100644 --- a/kexi/widget/tableview/kexitextformatter.cpp +++ b/kexi/widget/tableview/kexitextformatter.cpp @@ -168,7 +168,7 @@ TQVariant KexiTextFormatter::textToValue(const TQString& text) const case KexiDB::Field::Double: { // replace custom decimal symbol with '.' as required by to{Float|Double}() TQString fixedText( text ); - fixedText.tqreplace(KGlobal::locale()->decimalSymbol(), "."); + fixedText.replace(KGlobal::locale()->decimalSymbol(), "."); if (t == KexiDB::Field::Double) return fixedText.toDouble(); return fixedText.toFloat(); diff --git a/kexi/widget/utils/kexicontextmenuutils.cpp b/kexi/widget/utils/kexicontextmenuutils.cpp index 8c6c3ab2..f882f6fa 100644 --- a/kexi/widget/utils/kexicontextmenuutils.cpp +++ b/kexi/widget/utils/kexicontextmenuutils.cpp @@ -258,7 +258,7 @@ bool KexiContextMenuUtils::updateTitle(TQPopupMenu *menu, const TQString& object if (!menu || objectName.isEmpty() || objectTypeName.isEmpty()) return false; const int id = menu->idAt(0); - TQMenuItem *item = menu->tqfindItem(id); + TQMenuItem *item = menu->findItem(id); if (!item) return false; KPopupTitle *title = dynamic_cast<KPopupTitle *>(item->widget()); diff --git a/kexi/widget/utils/kexidatetimeformatter.cpp b/kexi/widget/utils/kexidatetimeformatter.cpp index 430d2f8f..1e7b9bc9 100644 --- a/kexi/widget/utils/kexidatetimeformatter.cpp +++ b/kexi/widget/utils/kexidatetimeformatter.cpp @@ -43,27 +43,27 @@ KexiDateFormatter::KexiDateFormatter() monthDateFormat("MM"), dayDateFormat("dd"); //for setting up m_dateFormat bool ok = df.length()>=8; - int yearpos, monthpos, daypos; //result of df.tqfind() + int yearpos, monthpos, daypos; //result of df.find() if (ok) {//look at % variables //! @todo more variables are possible here, see void KLocale::setDateFormatShort() docs //! http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/kdecore/html/classKLocale.html#a59 - yearpos = df.tqfind("%y", 0, false); //&y or %y + yearpos = df.find("%y", 0, false); //&y or %y m_longYear = !(yearpos>=0 && df.mid(yearpos+1, 1)=="y"); if (!m_longYear) { yearMask = "99"; yearDateFormat = "yy"; } - monthpos = df.tqfind("%m", 0, true); //%m or %n + monthpos = df.find("%m", 0, true); //%m or %n m_monthWithLeadingZero = true; if (monthpos<0) { - monthpos = df.tqfind("%n", 0, false); + monthpos = df.find("%n", 0, false); m_monthWithLeadingZero = false; monthDateFormat = "M"; } - daypos = df.tqfind("%d", 0, true);//%d or %e + daypos = df.find("%d", 0, true);//%d or %e m_dayWithLeadingZero = true; if (daypos<0) { - daypos = df.tqfind("%e", 0, false); + daypos = df.find("%e", 0, false); m_dayWithLeadingZero = false; dayDateFormat = "d"; } @@ -76,7 +76,7 @@ KexiDateFormatter::KexiDateFormatter() } else if (yearpos<daypos && daypos<monthpos) { m_order = TQDateEdit::YDM; -//! @todo use TQRegExp (to tqreplace %Y by %1, etc.) instead of hardcoded "%1%299%399" +//! @todo use TQRegExp (to replace %Y by %1, etc.) instead of hardcoded "%1%299%399" //! because df may contain also other characters m_inputMask = TQString("%1%299%399").tqarg(yearMask).tqarg(m_separator).tqarg(m_separator); m_qtFormat = yearDateFormat+m_separator+dayDateFormat+m_separator+monthDateFormat; @@ -157,7 +157,7 @@ TQVariant KexiDateFormatter::stringToVariant( const TQString& str ) const bool KexiDateFormatter::isEmpty( const TQString& str ) const { TQString s(str); - return s.tqreplace(m_separator,"").stripWhiteSpace().isEmpty(); + return s.replace(m_separator,"").stripWhiteSpace().isEmpty(); } TQString KexiDateFormatter::dateToString( const TQDate& date ) const @@ -172,31 +172,31 @@ KexiTimeFormatter::KexiTimeFormatter() , m_hmRegExp( new TQRegExp("(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) ) { TQString tf( KGlobal::locale()->timeFormat() ); - //m_hourpos, m_minpos, m_secpos; are result of tf.tqfind() + //m_hourpos, m_minpos, m_secpos; are result of tf.find() TQString hourVariable, minVariable, secVariable; - //detect position of HOUR section: tqfind %H or %k or %I or %l + //detect position of HOUR section: find %H or %k or %I or %l m_24h = true; m_hoursWithLeadingZero = true; - m_hourpos = tf.tqfind("%H", 0, true); + m_hourpos = tf.find("%H", 0, true); if (m_hourpos>=0) { m_24h = true; m_hoursWithLeadingZero = true; } else { - m_hourpos = tf.tqfind("%k", 0, true); + m_hourpos = tf.find("%k", 0, true); if (m_hourpos>=0) { m_24h = true; m_hoursWithLeadingZero = false; } else { - m_hourpos = tf.tqfind("%I", 0, true); + m_hourpos = tf.find("%I", 0, true); if (m_hourpos>=0) { m_24h = false; m_hoursWithLeadingZero = true; } else { - m_hourpos = tf.tqfind("%l", 0, true); + m_hourpos = tf.find("%l", 0, true); if (m_hourpos>=0) { m_24h = false; m_hoursWithLeadingZero = false; @@ -204,9 +204,9 @@ KexiTimeFormatter::KexiTimeFormatter() } } } - m_minpos = tf.tqfind("%M", 0, true); - m_secpos = tf.tqfind("%S", 0, true); //can be -1 - m_ampmpos = tf.tqfind("%p", 0, true); //can be -1 + m_minpos = tf.find("%M", 0, true); + m_secpos = tf.find("%S", 0, true); //can be -1 + m_ampmpos = tf.find("%p", 0, true); //can be -1 if (m_hourpos<0 || m_minpos<0) { //set default: hr and min are needed, sec are optional @@ -221,13 +221,13 @@ KexiTimeFormatter::KexiTimeFormatter() hourVariable = tf.mid(m_hourpos, 2); m_inputMask = tf; -// m_inputMask.tqreplace( hourVariable, "00" ); -// m_inputMask.tqreplace( "%M", "00" ); -// m_inputMask.tqreplace( "%S", "00" ); //optional - m_inputMask.tqreplace( hourVariable, "99" ); - m_inputMask.tqreplace( "%M", "99" ); - m_inputMask.tqreplace( "%S", "00" ); //optional - m_inputMask.tqreplace( "%p", "AA" ); //am or pm +// m_inputMask.replace( hourVariable, "00" ); +// m_inputMask.replace( "%M", "00" ); +// m_inputMask.replace( "%S", "00" ); //optional + m_inputMask.replace( hourVariable, "99" ); + m_inputMask.replace( "%M", "99" ); + m_inputMask.replace( "%S", "00" ); //optional + m_inputMask.replace( "%p", "AA" ); //am or pm m_inputMask += ";_"; m_outputFormat = tf; @@ -283,7 +283,7 @@ TQVariant KexiTimeFormatter::stringToVariant( const TQString& str ) bool KexiTimeFormatter::isEmpty( const TQString& str ) const { TQString s(str); - return s.tqreplace(':',"").stripWhiteSpace().isEmpty(); + return s.replace(':',"").stripWhiteSpace().isEmpty(); } TQString KexiTimeFormatter::timeToString( const TQTime& time ) const @@ -294,22 +294,22 @@ TQString KexiTimeFormatter::timeToString( const TQTime& time ) const TQString s(m_outputFormat); if (m_24h) { if (m_hoursWithLeadingZero) - s.tqreplace( "%H", TQString::tqfromLatin1(time.hour()<10 ? "0" : "") + TQString::number(time.hour()) ); + s.replace( "%H", TQString::tqfromLatin1(time.hour()<10 ? "0" : "") + TQString::number(time.hour()) ); else - s.tqreplace( "%k", TQString::number(time.hour()) ); + s.replace( "%k", TQString::number(time.hour()) ); } else { int time12 = (time.hour()>12) ? (time.hour()-12) : time.hour(); if (m_hoursWithLeadingZero) - s.tqreplace( "%I", TQString::tqfromLatin1(time12<10 ? "0" : "") + TQString::number(time12) ); + s.replace( "%I", TQString::tqfromLatin1(time12<10 ? "0" : "") + TQString::number(time12) ); else - s.tqreplace( "%l", TQString::number(time12) ); + s.replace( "%l", TQString::number(time12) ); } - s.tqreplace( "%M", TQString::tqfromLatin1(time.minute()<10 ? "0" : "") + TQString::number(time.minute()) ); + s.replace( "%M", TQString::tqfromLatin1(time.minute()<10 ? "0" : "") + TQString::number(time.minute()) ); if (m_secpos>=0) - s.tqreplace( "%S", TQString::tqfromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) ); + s.replace( "%S", TQString::tqfromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) ); if (m_ampmpos>=0) - s.tqreplace( "%p", KGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") ); + s.replace( "%p", KGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") ); return s; } @@ -326,8 +326,8 @@ TQDateTime stringToDateTime( const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const TQString& str) { TQString s( str.stripWhiteSpace() ); - const int timepos = s.tqfind(" "); - const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(s.mid(timepos+1)); //.tqreplace(':',"").stripWhiteSpace().isEmpty(); + const int timepos = s.find(" "); + const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(s.mid(timepos+1)); //.replace(':',"").stripWhiteSpace().isEmpty(); if (emptyTime) s = s.left(timepos); if (timepos>0 && !emptyTime) { @@ -347,18 +347,18 @@ TQDateTime stringToDateTime( bool dateTimeIsEmpty( const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const TQString& str ) { - int timepos = str.tqfind(" "); - const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).tqreplace(':',"").stripWhiteSpace().isEmpty(); - return (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) //s.left(timepos).tqreplace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty() + int timepos = str.find(" "); + const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).replace(':',"").stripWhiteSpace().isEmpty(); + return (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) //s.left(timepos).replace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty() && emptyTime); } bool dateTimeIsValid( const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const TQString& str ) { - int timepos = str.tqfind(" "); - const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).tqreplace(':',"").stripWhiteSpace().isEmpty(); - if (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) // s.left(timepos).tqreplace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty() + int timepos = str.find(" "); + const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).replace(':',"").stripWhiteSpace().isEmpty(); + if (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) // s.left(timepos).replace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty() && emptyTime) //empty date/time is valid return true; diff --git a/kexi/widget/utils/kexigradientwidget.cpp b/kexi/widget/utils/kexigradientwidget.cpp index 2a1a3ba3..ce92444f 100644 --- a/kexi/widget/utils/kexigradientwidget.cpp +++ b/kexi/widget/utils/kexigradientwidget.cpp @@ -98,7 +98,7 @@ void KexiGradientWidget::rebuildCache( void ) { for ( WidgetList::Iterator it = childWidgetList.begin(); it != childWidgetList.end(); ++it ) { - if ( p_customBackgroundWidgets.tqcontains( ( *it ) ) == false ) { + if ( p_customBackgroundWidgets.contains( ( *it ) ) == false ) { ( *it )->unsetPalette(); } } @@ -170,7 +170,7 @@ void KexiGradientWidget::rebuildCache( void ) { /** Exclude widgets with a custom palette. */ - if ( p_customBackgroundWidgets.tqcontains( childWidget ) ) { + if ( p_customBackgroundWidgets.contains( childWidget ) ) { continue; } @@ -255,7 +255,7 @@ bool KexiGradientWidget::eventFilter( TQObject* object, TQEvent* event ) { In this case, it has to be added to the customBackground-list. */ if ( p_currentChild == 0L && child != 0L ) { - if ( p_customBackgroundWidgets.tqcontains( child ) == false ) { + if ( p_customBackgroundWidgets.contains( child ) == false ) { p_customBackgroundWidgets.append( child ); return false; } @@ -269,7 +269,7 @@ bool KexiGradientWidget::eventFilter( TQObject* object, TQEvent* event ) { Add the new child to the list of widgets, we don't set the background ourselves if it isn't in the list. */ - if ( p_customBackgroundWidgets.tqcontains( child ) == false ) { + if ( p_customBackgroundWidgets.contains( child ) == false ) { if ( child->paletteBackgroundPixmap() != 0L ) { p_customBackgroundWidgets.append( child ); } @@ -291,7 +291,7 @@ bool KexiGradientWidget::eventFilter( TQObject* object, TQEvent* event ) { } if ( event->type() == TQEvent::Move ) { - if ( p_customBackgroundWidgets.tqcontains( child ) == false ) { + if ( p_customBackgroundWidgets.contains( child ) == false ) { updateChildBackground( child ); } } @@ -320,7 +320,7 @@ void KexiGradientWidget::updateChildBackground( TQWidget* childWidget ) /** Exclude widgets with a custom palette. */ - if ( p_customBackgroundWidgets.tqcontains( childWidget ) ) { + if ( p_customBackgroundWidgets.contains( childWidget ) ) { return; } |