diff options
Diffstat (limited to 'kspread/plugins/scripting/kspreadcore/krs_cell.cpp')
-rw-r--r-- | kspread/plugins/scripting/kspreadcore/krs_cell.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kspread/plugins/scripting/kspreadcore/krs_cell.cpp b/kspread/plugins/scripting/kspreadcore/krs_cell.cpp index cabf0c50..46ee1389 100644 --- a/kspread/plugins/scripting/kspreadcore/krs_cell.cpp +++ b/kspread/plugins/scripting/kspreadcore/krs_cell.cpp @@ -59,30 +59,30 @@ Cell::Cell(KSpread::Cell* cell, KSpread::Sheet* sheet, uint col, uint row) Cell::~Cell() { } -const QString Cell::getClassName() const { +const TQString Cell::getClassName() const { return "Kross::KSpreadCore::KSpreadCell"; } -QVariant Cell::toVariant(const KSpread::Value& value) const +TQVariant Cell::toVariant(const KSpread::Value& value) const { //Should we use following value-format enums here? //fmt_None, fmt_Boolean, fmt_Number, fmt_Percent, fmt_Money, fmt_DateTime, fmt_Date, fmt_Time, fmt_String switch(value.type()) { case KSpread::Value::Empty: - return QVariant(); + return TQVariant(); case KSpread::Value::Boolean: - return QVariant( value.asBoolean() ); + return TQVariant( value.asBoolean() ); case KSpread::Value::Integer: - return static_cast<Q_LLONG>(value.asInteger()); + return static_cast<TQ_LLONG>(value.asInteger()); case KSpread::Value::Float: return (float)value.asFloat(); case KSpread::Value::String: return value.asString(); case KSpread::Value::Array: { - QValueList<QVariant> colarray; + TQValueList<TQVariant> colarray; for(uint j = 0; j < value.rows(); j++) { - QValueList<QVariant> rowarray; + TQValueList<TQVariant> rowarray; for( uint i = 0; i < value.columns(); i++) { KSpread::Value v = value.element(i,j); rowarray.append( toVariant(v) ); @@ -93,28 +93,28 @@ QVariant Cell::toVariant(const KSpread::Value& value) const } break; case KSpread::Value::CellRange: //FIXME: not yet used - return QVariant(); + return TQVariant(); case KSpread::Value::Error: - return QVariant(); + return TQVariant(); } - return QVariant(); + return TQVariant(); } -QVariant Cell::value() const { +TQVariant Cell::value() const { return toVariant( m_cell->value() ); } -bool Cell::setValue(const QVariant& value) { +bool Cell::setValue(const TQVariant& value) { KSpread::Value v = m_cell->value(); switch(value.type()) { - case QVariant::Bool: v.setValue( value.toBool() ); break; - case QVariant::ULongLong: v.setValue( (long)value.toLongLong() ); break; - case QVariant::Int: v.setValue( value.toInt() ); break; - case QVariant::Double: v.setValue( value.toDouble() ); break; - case QVariant::String: v.setValue( value.toString() ); break; - case QVariant::Date: v.setValue( value.toDate() ); break; - case QVariant::Time: v.setValue( value.toTime() ); break; - case QVariant::DateTime: v.setValue( value.toDateTime() ); break; + case TQVariant::Bool: v.setValue( value.toBool() ); break; + case TQVariant::ULongLong: v.setValue( (long)value.toLongLong() ); break; + case TQVariant::Int: v.setValue( value.toInt() ); break; + case TQVariant::Double: v.setValue( value.toDouble() ); break; + case TQVariant::String: v.setValue( value.toString() ); break; + case TQVariant::Date: v.setValue( value.toDate() ); break; + case TQVariant::Time: v.setValue( value.toTime() ); break; + case TQVariant::DateTime: v.setValue( value.toDateTime() ); break; default: return false; } return true; @@ -146,38 +146,38 @@ void Cell::setNextCell(Cell* c) { return m_cell->setNextCell(c->m_cell); } -const QString Cell::name() const { +const TQString Cell::name() const { return m_cell->name(); } -const QString Cell::fullName() const { +const TQString Cell::fullName() const { return m_cell->fullName(); } -const QString Cell::comment() const { +const TQString Cell::comment() const { return m_cell->format()->comment(m_col, m_row); } -void Cell::setComment(const QString& c) { +void Cell::setComment(const TQString& c) { return m_cell->format()->setComment(c); } -const QString Cell::getFormatString() const { +const TQString Cell::getFormatString() const { return m_cell->format()->getFormatString(m_col, m_row); } -void Cell::setFormatString(const QString& format) { +void Cell::setFormatString(const TQString& format) { m_cell->format()->setFormatString(format); } -const QString Cell::text() const { +const TQString Cell::text() const { return m_cell->text(); } -bool Cell::setText(const QString& text) { +bool Cell::setText(const TQString& text) { KSpread::ProtectedCheck prot; prot.setSheet (m_sheet); - prot.add (QPoint (m_col, m_row)); + prot.add (TQPoint (m_col, m_row)); if (prot.check()) return false; @@ -185,26 +185,26 @@ bool Cell::setText(const QString& text) { dm->setSheet (m_sheet); dm->setValue (text); dm->setParsing (true); - dm->add (QPoint (m_col, m_row)); + dm->add (TQPoint (m_col, m_row)); dm->execute (); return true; } -const QString Cell::textColor() { +const TQString Cell::textColor() { return m_cell->format()->textColor(m_col, m_row).name(); } -void Cell::setTextColor(const QString& textcolor) { - m_cell->format()->setTextColor( QColor(textcolor) ); +void Cell::setTextColor(const TQString& textcolor) { + m_cell->format()->setTextColor( TQColor(textcolor) ); } -const QString Cell::backgroundColor() { +const TQString Cell::backgroundColor() { return m_cell->format()->bgColor(m_col, m_row).name(); } -void Cell::setBackgroundColor(const QString& backgroundcolor) { - m_cell->format()->setBgColor( QColor(backgroundcolor) ); +void Cell::setBackgroundColor(const TQString& backgroundcolor) { + m_cell->format()->setBgColor( TQColor(backgroundcolor) ); } } |