diff options
Diffstat (limited to 'src/gui/tablefieldwidget.cpp')
-rw-r--r-- | src/gui/tablefieldwidget.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/tablefieldwidget.cpp b/src/gui/tablefieldwidget.cpp index 81c9dba..449fbbb 100644 --- a/src/gui/tablefieldwidget.cpp +++ b/src/gui/tablefieldwidget.cpp @@ -34,7 +34,7 @@ TableFieldWidget::TableFieldWidget(Data::FieldPtr field_, TQWidget* parent_, con : FieldWidget(field_, parent_, name_), m_field(field_), m_row(-1), m_col(-1) { bool ok; - m_columns = Tellico::toUInt(field_->property(TQString::fromLatin1("columns")), &ok); + m_columns = Tellico::toUInt(field_->property(TQString::tqfromLatin1("columns")), &ok); if(!ok) { m_columns = 1; } else { @@ -77,17 +77,17 @@ TQString TableFieldWidget::text() const { for(int col = 0; col < m_table->numCols(); ++col) { str = m_table->text(row, col).simplifyWhiteSpace(); if(str.isEmpty()) { - cstack += TQString::fromLatin1("::"); + cstack += TQString::tqfromLatin1("::"); } else { - rowStr += cstack + str + TQString::fromLatin1("::"); + rowStr += cstack + str + TQString::tqfromLatin1("::"); cstack.truncate(0); } } if(rowStr.isEmpty()) { - rstack += TQString::fromLatin1("; "); + rstack += TQString::tqfromLatin1("; "); } else { rowStr.truncate(rowStr.length()-2); // remove last semi-colon and space - text += rstack + rowStr + TQString::fromLatin1("; "); + text += rstack + rowStr + TQString::tqfromLatin1("; "); rstack.truncate(0); } } @@ -123,7 +123,7 @@ void TableFieldWidget::setText(const TQString& text_) { int row; for(row = 0; row < static_cast<int>(list.count()); ++row) { for(int col = 0; col < m_table->numCols(); ++col) { - m_table->setText(row, col, list[row].section(TQString::fromLatin1("::"), col, col)); + m_table->setText(row, col, list[row].section(TQString::tqfromLatin1("::"), col, col)); } m_table->showRow(row); } @@ -182,7 +182,7 @@ void TableFieldWidget::slotRenameColumn() { name, &ok, this); if(ok && !newName.isEmpty()) { Data::FieldPtr newField = new Data::Field(*m_field); - newField->setProperty(TQString::fromLatin1("column%1").arg(m_col+1), newName); + newField->setProperty(TQString::tqfromLatin1("column%1").tqarg(m_col+1), newName); if(Kernel::self()->modifyField(newField)) { m_field = newField; labelColumns(m_field); @@ -201,9 +201,9 @@ bool TableFieldWidget::emptyRow(int row_) const { void TableFieldWidget::labelColumns(Data::FieldPtr field_) { for(int i = 0; i < m_columns; ++i) { - TQString s = field_->property(TQString::fromLatin1("column%1").arg(i+1)); + TQString s = field_->property(TQString::tqfromLatin1("column%1").tqarg(i+1)); if(s.isEmpty()) { - s = i18n("Column %1").arg(i+1); + s = i18n("Column %1").tqarg(i+1); } m_table->horizontalHeader()->setLabel(i, s); } @@ -211,7 +211,7 @@ void TableFieldWidget::labelColumns(Data::FieldPtr field_) { void TableFieldWidget::updateFieldHook(Data::FieldPtr, Data::FieldPtr newField_) { bool ok; - m_columns = Tellico::toUInt(newField_->property(TQString::fromLatin1("columns")), &ok); + m_columns = Tellico::toUInt(newField_->property(TQString::tqfromLatin1("columns")), &ok); if(!ok) { m_columns = 1; } else { @@ -238,7 +238,7 @@ bool TableFieldWidget::eventFilter(TQObject* obj_, TQEvent* ev_) { m_row = -1; m_col = col; KPopupMenu menu(this); - menu.insertItem(SmallIconSet(TQString::fromLatin1("edit")), i18n("Rename Column..."), + menu.insertItem(SmallIconSet(TQString::tqfromLatin1("edit")), i18n("Rename Column..."), this, TQT_SLOT(slotRenameColumn())); menu.exec(ev->globalPos()); return true; @@ -271,28 +271,28 @@ void TableFieldWidget::contextMenu(int row_, int col_, const TQPoint& p_) { int id; KPopupMenu menu(this); - menu.insertItem(SmallIconSet(TQString::fromLatin1("insrow")), i18n("Insert Row"), + menu.insertItem(SmallIconSet(TQString::tqfromLatin1("insrow")), i18n("Insert Row"), this, TQT_SLOT(slotInsertRow())); - menu.insertItem(SmallIconSet(TQString::fromLatin1("remrow")), i18n("Remove Row"), + menu.insertItem(SmallIconSet(TQString::tqfromLatin1("remrow")), i18n("Remove Row"), this, TQT_SLOT(slotRemoveRow())); - id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1uparrow")), i18n("Move Row Up"), + id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("1uparrow")), i18n("Move Row Up"), this, TQT_SLOT(slotMoveRowUp())); if(m_row == 0) { menu.setItemEnabled(id, false); } - id = menu.insertItem(SmallIconSet(TQString::fromLatin1("1downarrow")), i18n("Move Row Down"), + id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("1downarrow")), i18n("Move Row Down"), this, TQT_SLOT(slotMoveRowDown())); if(m_row == m_table->numRows()-1) { menu.setItemEnabled(id, false); } menu.insertSeparator(); - id = menu.insertItem(SmallIconSet(TQString::fromLatin1("edit")), i18n("Rename Column..."), + id = menu.insertItem(SmallIconSet(TQString::tqfromLatin1("edit")), i18n("Rename Column..."), this, TQT_SLOT(slotRenameColumn())); if(m_col < 0 || m_col > m_columns-1) { menu.setItemEnabled(id, false); } menu.insertSeparator(); - menu.insertItem(SmallIconSet(TQString::fromLatin1("locationbar_erase")), i18n("Clear Table"), + menu.insertItem(SmallIconSet(TQString::tqfromLatin1("locationbar_erase")), i18n("Clear Table"), this, TQT_SLOT(clear())); menu.exec(p_); } |