diff options
Diffstat (limited to 'kexi/widget/tableview/kexidataawareobjectiface.cpp')
-rw-r--r-- | kexi/widget/tableview/kexidataawareobjectiface.cpp | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp index ce0b7695..79613d9d 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->setAlignment(TQt::AlignCenter); + m_scrollBarTip->tqsetAlignment(TQt::AlignCenter); m_scrollBarTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); m_scrollBarTip->setLineWidth(1); @@ -539,8 +539,8 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo if ( forceSet || m_curRow != newrow || m_curCol != newcol ) { - kexidbg << "setCursorPosition(): " <<TQString("old:%1,%2 new:%3,%4").arg(m_curCol) - .arg(m_curRow).arg(newcol).arg(newrow) << endl; + kexidbg << "setCursorPosition(): " <<TQString("old:%1,%2 new:%3,%4").tqarg(m_curCol) + .tqarg(m_curRow).tqarg(newcol).tqarg(newrow) << endl; // cursor moved: get rid of editor if (m_editor) { @@ -645,7 +645,7 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo } else { kdDebug(44021) << TQString("NOW item at %1 (%2) is current") - .arg(m_curRow).arg((ulong)itemAt(m_curRow)) << endl; + .tqarg(m_curRow).tqarg((ulong)itemAt(m_curRow)) << endl; //NOT EFFECTIVE!!!!!!!!!!! //set item iterator if (!newRowInserted && isInsertingEnabled() && m_currentItem == m_insertItem && m_curRow == (rows()-1)) { @@ -838,7 +838,7 @@ bool KexiDataAwareObjectInterface::cancelRowEdit() // viewport()->width(), d->rowHeight*3 + (m_navPanel ? m_navPanel->height() : 0)*3 ); // updateContents(); //js: above did not work well so we do that dirty updateWidgetContents(); -//TODO: still doesn't repaint properly!! +//TODO: still doesn't tqrepaint properly!! // TQSize s(tableSize()); // resizeContents(s.width(), s.height()); updateWidgetContentsSize(); @@ -940,7 +940,7 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (!m_errorMessagePopup) { // m_errorMessagePopup->close(); m_errorMessagePopup = new KexiArrowTip( - i18n("Error: %1").arg(m_editor->columnInfo()->field->typeName())+"?", + i18n("Error: %1").tqarg(m_editor->columnInfo()->field->typeName())+"?", dynamic_cast<TQWidget*>(this)); m_errorMessagePopup->move( par->mapToGlobal(edit->pos()) + TQPoint(6, edit->height() + 0) ); @@ -954,8 +954,8 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (m_editor->field()->isNotNull() && !autoIncColumnCanBeOmitted) { kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): NULL NOT ALLOWED!" << endl; res = Validator::Error; -// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName()) - msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName()) +// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName()) + msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); desc = i18n("The column's constraint is declared as NOT NULL."); editCurrentCellAgain = true; @@ -976,8 +976,8 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (m_editor->field()->isNotEmpty() && !autoIncColumnCanBeOmitted) { kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): EMPTY NOT ALLOWED!" << endl; res = Validator::Error; -// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName()) - msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName()) +// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName()) + msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); desc = i18n("The column's constraint is declared as NOT EMPTY."); editCurrentCellAgain = true; @@ -994,8 +994,8 @@ bool KexiDataAwareObjectInterface::acceptEditor() if (m_editor->field()->isNotNull() && !autoIncColumnCanBeOmitted) { kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): NEITHER NULL NOR EMPTY VALUE CAN BE SET!" << endl; res = Validator::Error; -// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName()) - msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName()) +// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName()) + msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData(); desc = i18n("The column's constraint is declared as NOT EMPTY and NOT NULL."); editCurrentCellAgain = true; @@ -1251,7 +1251,7 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row) m_curRow++; } - m_data->insertRow(*newItem, row, true /*repaint*/); + m_data->insertRow(*newItem, row, true /*tqrepaint*/); if (changeCurrentRow) { //update iter... @@ -1281,15 +1281,15 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row) */ } -void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool repaint) +void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool tqrepaint) { int row = m_data->findRef(item); - slotRowInserted( item, row, repaint ); + slotRowInserted( item, row, tqrepaint ); } -void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool repaint) +void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool tqrepaint) { - if (repaint && (int)row<rows()) { + if (tqrepaint && (int)row<rows()) { updateWidgetContentsSize(); /* updateAllVisibleRowsBelow() used instead @@ -1317,7 +1317,7 @@ void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uin } } -tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint) +tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint) { if (!hasData()) return true; @@ -1331,7 +1331,7 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint) tableName.append("\""); } if (KMessageBox::Cancel == KMessageBox::warningContinueCancel(dynamic_cast<TQWidget*>(this), - i18n("Do you want to clear the contents of table %1?").arg(tableName), + i18n("Do you want to clear the contents of table %1?").tqarg(tableName), 0, KGuiItem(i18n("&Clear Contents")) )) return cancelled; } @@ -1339,10 +1339,10 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint) cancelRowEdit(); // acceptRowEdit(); // m_verticalHeader->clear(); - const bool repaintLater = repaint && m_spreadSheetMode; + const bool repaintLater = tqrepaint && m_spreadSheetMode; const int oldRows = rows(); - bool res = m_data->deleteAllRows(repaint && !repaintLater); + bool res = m_data->deleteAllRows(tqrepaint && !repaintLater); if (res) { if (m_spreadSheetMode) { @@ -1359,21 +1359,21 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint) // m_verticalHeader->setCurrentRow(-1); // d->pUpdateTimer->start(1,true); -// if (repaint) -// viewport()->repaint(); +// if (tqrepaint) +// viewport()->tqrepaint(); return res; } -void KexiDataAwareObjectInterface::clearColumns(bool repaint) +void KexiDataAwareObjectInterface::clearColumns(bool tqrepaint) { cancelRowEdit(); m_data->clearInternal(); - clearColumnsInternal(repaint); + clearColumnsInternal(tqrepaint); updateIndicesForVisibleValues(); - if (repaint) -// viewport()->repaint(); + if (tqrepaint) +// viewport()->tqrepaint(); //OK? updateWidgetContents(); @@ -1393,7 +1393,7 @@ void KexiDataAwareObjectInterface::clearColumns(bool repaint) m_verticalHeader->setCurrentRow(-1); - viewport()->repaint(); + viewport()->tqrepaint(); // d->pColumnTypes.resize(0); // d->pColumnModes.resize(0); @@ -1490,9 +1490,9 @@ void KexiDataAwareObjectInterface::setEmptyRowInsertingEnabled(bool set) } void KexiDataAwareObjectInterface::slotAboutToDeleteRow(KexiTableItem& item, - KexiDB::ResultInfo* /*result*/, bool repaint) + KexiDB::ResultInfo* /*result*/, bool tqrepaint) { - if (repaint) { + if (tqrepaint) { m_rowWillBeDeleted = m_data->findRef(&item); } } @@ -1534,7 +1534,7 @@ bool KexiDataAwareObjectInterface::deleteItem(KexiTableItem *item)/*, bool moveC const bool lastRowDeleted = m_spreadSheetMode && m_data->last() == item; //we need to know this so we //can return to the last row //after reinserting it - if (!m_data->deleteRow(*item, true /*repaint*/)) { + if (!m_data->deleteRow(*item, true /*tqrepaint*/)) { /*const int button =*/ showErrorMessageForResult( m_data->result() ); // if (KMessageBox::No == button) { @@ -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.startsWith(stringValue, caseSensitive)) { + else if (where.tqstartsWith(stringValue, caseSensitive)) { if (wholeWordsOnly) { // If where.length() < stringValue.length(), true will be returned too - fine. return !where.at( stringValue.length() ).isLetterOrNumber(); |