summaryrefslogtreecommitdiffstats
path: root/kexi/widget/tableview/kexidataawareobjectiface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/widget/tableview/kexidataawareobjectiface.cpp')
-rw-r--r--kexi/widget/tableview/kexidataawareobjectiface.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp
index 79613d9d..ce0b7695 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);
@@ -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").tqarg(m_curCol)
- .tqarg(m_curRow).tqarg(newcol).tqarg(newrow) << endl;
+ kexidbg << "setCursorPosition(): " <<TQString("old:%1,%2 new:%3,%4").arg(m_curCol)
+ .arg(m_curRow).arg(newcol).arg(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")
- .tqarg(m_curRow).tqarg((ulong)itemAt(m_curRow)) << endl;
+ .arg(m_curRow).arg((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 tqrepaint properly!!
+//TODO: still doesn't repaint 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").tqarg(m_editor->columnInfo()->field->typeName())+"?",
+ i18n("Error: %1").arg(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().tqarg(m_editor->columnInfo()->field->captionOrName())
- msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName())
+// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName())
+ msg = Validator::msgColumnNotEmpty().arg(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().tqarg(m_editor->columnInfo()->field->captionOrName())
- msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName())
+// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName())
+ msg = Validator::msgColumnNotEmpty().arg(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().tqarg(m_editor->columnInfo()->field->captionOrName())
- msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName())
+// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName())
+ msg = Validator::msgColumnNotEmpty().arg(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 /*tqrepaint*/);
+ m_data->insertRow(*newItem, row, true /*repaint*/);
if (changeCurrentRow) {
//update iter...
@@ -1281,15 +1281,15 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row)
*/
}
-void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool tqrepaint)
+void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool repaint)
{
int row = m_data->findRef(item);
- slotRowInserted( item, row, tqrepaint );
+ slotRowInserted( item, row, repaint );
}
-void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool tqrepaint)
+void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool repaint)
{
- if (tqrepaint && (int)row<rows()) {
+ if (repaint && (int)row<rows()) {
updateWidgetContentsSize();
/* updateAllVisibleRowsBelow() used instead
@@ -1317,7 +1317,7 @@ void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uin
}
}
-tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint)
+tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint)
{
if (!hasData())
return true;
@@ -1331,7 +1331,7 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint)
tableName.append("\"");
}
if (KMessageBox::Cancel == KMessageBox::warningContinueCancel(dynamic_cast<TQWidget*>(this),
- i18n("Do you want to clear the contents of table %1?").tqarg(tableName),
+ i18n("Do you want to clear the contents of table %1?").arg(tableName),
0, KGuiItem(i18n("&Clear Contents")) ))
return cancelled;
}
@@ -1339,10 +1339,10 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint)
cancelRowEdit();
// acceptRowEdit();
// m_verticalHeader->clear();
- const bool repaintLater = tqrepaint && m_spreadSheetMode;
+ const bool repaintLater = repaint && m_spreadSheetMode;
const int oldRows = rows();
- bool res = m_data->deleteAllRows(tqrepaint && !repaintLater);
+ bool res = m_data->deleteAllRows(repaint && !repaintLater);
if (res) {
if (m_spreadSheetMode) {
@@ -1359,21 +1359,21 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint)
// m_verticalHeader->setCurrentRow(-1);
// d->pUpdateTimer->start(1,true);
-// if (tqrepaint)
-// viewport()->tqrepaint();
+// if (repaint)
+// viewport()->repaint();
return res;
}
-void KexiDataAwareObjectInterface::clearColumns(bool tqrepaint)
+void KexiDataAwareObjectInterface::clearColumns(bool repaint)
{
cancelRowEdit();
m_data->clearInternal();
- clearColumnsInternal(tqrepaint);
+ clearColumnsInternal(repaint);
updateIndicesForVisibleValues();
- if (tqrepaint)
-// viewport()->tqrepaint();
+ if (repaint)
+// viewport()->repaint();
//OK?
updateWidgetContents();
@@ -1393,7 +1393,7 @@ void KexiDataAwareObjectInterface::clearColumns(bool tqrepaint)
m_verticalHeader->setCurrentRow(-1);
- viewport()->tqrepaint();
+ viewport()->repaint();
// 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 tqrepaint)
+ KexiDB::ResultInfo* /*result*/, bool repaint)
{
- if (tqrepaint) {
+ if (repaint) {
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 /*tqrepaint*/)) {
+ if (!m_data->deleteRow(*item, true /*repaint*/)) {
/*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.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();