diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kspread/dialogs/kspread_dlg_csv.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kspread/dialogs/kspread_dlg_csv.cc')
-rw-r--r-- | kspread/dialogs/kspread_dlg_csv.cc | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/kspread/dialogs/kspread_dlg_csv.cc b/kspread/dialogs/kspread_dlg_csv.cc index 3c103b8e..ed1bf44f 100644 --- a/kspread/dialogs/kspread_dlg_csv.cc +++ b/kspread/dialogs/kspread_dlg_csv.cc @@ -20,17 +20,17 @@ * Boston, MA 02110-1301, USA. */ -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qclipboard.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qmime.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtable.h> -#include <qlayout.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqclipboard.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqmime.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtable.h> +#include <tqlayout.h> #include <kapplication.h> #include <kdebug.h> @@ -49,9 +49,9 @@ using namespace KSpread; -CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode mode) - : KDialogBase( parent, name, true, QString::null, Ok|Cancel ), - m_pView( parent ), +CSVDialog::CSVDialog( View * tqparent, const char * name, TQRect const & rect, Mode mode) + : KDialogBase( tqparent, name, true, TQString(), Ok|Cancel ), + m_pView( tqparent ), m_cancelled( false ), m_adjustRows( 0 ), m_startline( 0 ), @@ -65,10 +65,10 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode setSizeGripEnabled( TRUE ); - QWidget* page = new QWidget( this ); + TQWidget* page = new TQWidget( this ); setMainWidget( page ); - // MyDialogLayout = new QGridLayout( page, 4, 4, marginHint(), spacingHint(), "MyDialogLayout"); - MyDialogLayout = new QGridLayout( page, 1, 1, 11, 6, "MyDialogLayout"); + // MyDialogLayout = new TQGridLayout( page, 4, 4, marginHint(), spacingHint(), "MyDialogLayout"); + MyDialogLayout = new TQGridLayout( page, 1, 1, 11, 6, "MyDialogLayout"); // Limit the range int column = m_targetRect.left(); @@ -77,108 +77,108 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode if( m_targetRect.bottom() > lastCell->row() ) m_targetRect.setBottom( lastCell->row() ); - m_sheet = new QTable( page, "m_table" ); - //m_sheet->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, m_sheet->sizePolicy().hasHeightForWidth() ) ); + m_sheet = new TQTable( page, "m_table" ); + //m_sheet->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, m_sheet->sizePolicy().hasHeightForWidth() ) ); m_sheet->setNumRows( 0 ); m_sheet->setNumCols( 0 ); MyDialogLayout->addMultiCellWidget( m_sheet, 3, 3, 0, 3 ); // Delimiter: comma, semicolon, tab, space, other - m_delimiterBox = new QButtonGroup( page, "m_delimiterBox" ); - m_delimiterBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, m_delimiterBox->sizePolicy().hasHeightForWidth() ) ); + m_delimiterBox = new TQButtonGroup( page, "m_delimiterBox" ); + m_delimiterBox->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_delimiterBox->sizePolicy().hasHeightForWidth() ) ); m_delimiterBox->setTitle( i18n( "Delimiter" ) ); m_delimiterBox->setColumnLayout(0, Qt::Vertical ); - m_delimiterBox->layout()->setSpacing( KDialog::spacingHint() ); - m_delimiterBox->layout()->setMargin( KDialog::marginHint() ); - m_delimiterBoxLayout = new QGridLayout( m_delimiterBox->layout() ); - m_delimiterBoxLayout->setAlignment( Qt::AlignTop ); + m_delimiterBox->tqlayout()->setSpacing( KDialog::spacingHint() ); + m_delimiterBox->tqlayout()->setMargin( KDialog::marginHint() ); + m_delimiterBoxLayout = new TQGridLayout( m_delimiterBox->tqlayout() ); + m_delimiterBoxLayout->tqsetAlignment( TQt::AlignTop ); MyDialogLayout->addMultiCellWidget( m_delimiterBox, 0, 2, 0, 0 ); - m_ignoreDuplicates = new QCheckBox( page, "m_ignoreDuplicates" ); + m_ignoreDuplicates = new TQCheckBox( page, "m_ignoreDuplicates" ); m_ignoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); MyDialogLayout->addMultiCellWidget( m_ignoreDuplicates, 2, 2, 2, 3 ); - m_radioComma = new QRadioButton( m_delimiterBox, "m_radioComma" ); + m_radioComma = new TQRadioButton( m_delimiterBox, "m_radioComma" ); m_radioComma->setText( i18n( "Comma" ) ); m_radioComma->setChecked( TRUE ); m_delimiterBoxLayout->addWidget( m_radioComma, 0, 0 ); - m_radioSemicolon = new QRadioButton( m_delimiterBox, "m_radioSemicolon" ); + m_radioSemicolon = new TQRadioButton( m_delimiterBox, "m_radioSemicolon" ); m_radioSemicolon->setText( i18n( "Semicolon" ) ); m_delimiterBoxLayout->addWidget( m_radioSemicolon, 0, 1 ); - m_radioTab = new QRadioButton( m_delimiterBox, "m_radioTab" ); + m_radioTab = new TQRadioButton( m_delimiterBox, "m_radioTab" ); m_radioTab->setText( i18n( "Tabulator" ) ); m_delimiterBoxLayout->addWidget( m_radioTab, 1, 0 ); - m_radioSpace = new QRadioButton( m_delimiterBox, "m_radioSpace" ); + m_radioSpace = new TQRadioButton( m_delimiterBox, "m_radioSpace" ); m_radioSpace->setText( i18n( "Space" ) ); m_delimiterBoxLayout->addWidget( m_radioSpace, 1, 1 ); - m_radioOther = new QRadioButton( m_delimiterBox, "m_radioOther" ); + m_radioOther = new TQRadioButton( m_delimiterBox, "m_radioOther" ); m_radioOther->setText( i18n( "Other" ) ); m_delimiterBoxLayout->addWidget( m_radioOther, 0, 2 ); - m_delimiterEdit = new QLineEdit( m_delimiterBox, "m_delimiterEdit" ); - m_delimiterEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) ); - m_delimiterEdit->setMaximumSize( QSize( 30, 32767 ) ); + m_delimiterEdit = new TQLineEdit( m_delimiterBox, "m_delimiterEdit" ); + m_delimiterEdit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) ); + m_delimiterEdit->setMaximumSize( TQSize( 30, 32767 ) ); m_delimiterBoxLayout->addWidget( m_delimiterEdit, 1, 2 ); // Format: number, text, currency, - m_formatBox = new QButtonGroup( page, "m_formatBox" ); - m_formatBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, m_formatBox->sizePolicy().hasHeightForWidth() ) ); + m_formatBox = new TQButtonGroup( page, "m_formatBox" ); + m_formatBox->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_formatBox->sizePolicy().hasHeightForWidth() ) ); m_formatBox->setTitle( i18n( "Format" ) ); m_formatBox->setColumnLayout(0, Qt::Vertical ); - m_formatBox->layout()->setSpacing( KDialog::spacingHint() ); - m_formatBox->layout()->setMargin( KDialog::marginHint() ); - m_formatBoxLayout = new QGridLayout( m_formatBox->layout() ); - m_formatBoxLayout->setAlignment( Qt::AlignTop ); + m_formatBox->tqlayout()->setSpacing( KDialog::spacingHint() ); + m_formatBox->tqlayout()->setMargin( KDialog::marginHint() ); + m_formatBoxLayout = new TQGridLayout( m_formatBox->tqlayout() ); + m_formatBoxLayout->tqsetAlignment( TQt::AlignTop ); MyDialogLayout->addMultiCellWidget( m_formatBox, 0, 2, 1, 1 ); - m_radioNumber = new QRadioButton( m_formatBox, "m_radioNumber" ); + m_radioNumber = new TQRadioButton( m_formatBox, "m_radioNumber" ); m_radioNumber->setText( i18n( "Number" ) ); m_formatBoxLayout->addMultiCellWidget( m_radioNumber, 1, 1, 0, 1 ); - m_radioText = new QRadioButton( m_formatBox, "m_radioText" ); + m_radioText = new TQRadioButton( m_formatBox, "m_radioText" ); m_radioText->setText( i18n( "Text" ) ); m_radioText->setChecked( TRUE ); m_formatBoxLayout->addWidget( m_radioText, 0, 0 ); - m_radioCurrency = new QRadioButton( m_formatBox, "m_radioCurrency" ); + m_radioCurrency = new TQRadioButton( m_formatBox, "m_radioCurrency" ); m_radioCurrency->setText( i18n( "Currency" ) ); m_formatBoxLayout->addMultiCellWidget( m_radioCurrency, 0, 0, 1, 2 ); - m_radioDate = new QRadioButton( m_formatBox, "m_radioDate" ); + m_radioDate = new TQRadioButton( m_formatBox, "m_radioDate" ); m_radioDate->setText( i18n( "Date" ) ); m_formatBoxLayout->addWidget( m_radioDate, 1, 2 ); - m_comboLine = new QComboBox( FALSE, page, "m_comboLine" ); + m_comboLine = new TQComboBox( FALSE, page, "m_comboLine" ); m_comboLine->insertItem( i18n( "1" ) ); - m_comboLine->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, m_comboLine->sizePolicy().hasHeightForWidth() ) ); + m_comboLine->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_comboLine->sizePolicy().hasHeightForWidth() ) ); MyDialogLayout->addWidget( m_comboLine, 1, 3 ); - m_comboQuote = new QComboBox( FALSE, page, "m_comboQuote" ); + m_comboQuote = new TQComboBox( FALSE, page, "m_comboQuote" ); m_comboQuote->insertItem( i18n( "\"" ) ); m_comboQuote->insertItem( i18n( "'" ) ); m_comboQuote->insertItem( i18n( "None" ) ); - m_comboQuote->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, m_comboQuote->sizePolicy().hasHeightForWidth() ) ); + m_comboQuote->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_comboQuote->sizePolicy().hasHeightForWidth() ) ); MyDialogLayout->addWidget( m_comboQuote, 1, 2 ); - QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Preferred ); + TQSpacerItem* spacer_2 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Preferred ); MyDialogLayout->addItem( spacer_2, 2, 3 ); - TextLabel3 = new QLabel( page, "TextLabel3" ); - TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); + TextLabel3 = new TQLabel( page, "TextLabel3" ); + TextLabel3->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) ); TextLabel3->setText( i18n( "Start at line:" ) ); MyDialogLayout->addWidget( TextLabel3, 0, 3 ); - TextLabel2 = new QLabel( page, "TextLabel2" ); - TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); + TextLabel2 = new TQLabel( page, "TextLabel2" ); + TextLabel2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) ); TextLabel2->setText( i18n( "Textquote:" ) ); MyDialogLayout->addWidget( TextLabel2, 0, 2 ); @@ -186,7 +186,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode if ( m_mode == Clipboard ) { setCaption( i18n( "Inserting From Clipboard" ) ); - QMimeSource * mime = QApplication::clipboard()->data(); + TQMimeSource * mime = TQApplication::tqclipboard()->data(); if ( !mime ) { KMessageBox::information( this, i18n("There is no data in the clipboard.") ); @@ -200,12 +200,12 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode m_cancelled = true; return; } - m_fileArray = QByteArray(mime->encodedData( "text/plain" ) ); + m_fileArray = TQByteArray(mime->tqencodedData( "text/plain" ) ); } else if ( mode == File ) { setCaption( i18n( "Inserting Text File" ) ); - QString file = KFileDialog::getOpenFileName(":", + TQString file = KFileDialog::getOpenFileName(":", "text/plain", this); //cancel action ! @@ -215,7 +215,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode m_cancelled = true; return; } - QFile in(file); + TQFile in(file); if (!in.open(IO_ReadOnly)) { KMessageBox::sorry( this, i18n("Cannot open input file.") ); @@ -224,7 +224,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode m_cancelled = true; return; } - m_fileArray = QByteArray(in.size()); + m_fileArray = TQByteArray(in.size()); in.readBlock(m_fileArray.data(), in.size()); in.close(); } @@ -249,31 +249,31 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode fillSheet(); fillComboBox(); - resize(sizeHint()); - - m_sheet->setSelectionMode(QTable::NoSelection); - - connect(m_formatBox, SIGNAL(clicked(int)), - this, SLOT(formatClicked(int))); - connect(m_delimiterBox, SIGNAL(clicked(int)), - this, SLOT(delimiterClicked(int))); - connect(m_delimiterEdit, SIGNAL(returnPressed()), - this, SLOT(returnPressed())); - connect(m_delimiterEdit, SIGNAL(textChanged ( const QString & )), - this, SLOT(textChanged ( const QString & ) )); - connect(m_comboLine, SIGNAL(activated(const QString&)), - this, SLOT(lineSelected(const QString&))); - connect(m_comboQuote, SIGNAL(activated(const QString&)), - this, SLOT(textquoteSelected(const QString&))); - connect(m_sheet, SIGNAL(currentChanged(int, int)), - this, SLOT(currentCellChanged(int, int))); - connect(m_ignoreDuplicates, SIGNAL(stateChanged(int)), - this, SLOT(ignoreDuplicatesChanged(int))); + resize(tqsizeHint()); + + m_sheet->setSelectionMode(TQTable::NoSelection); + + connect(m_formatBox, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(formatClicked(int))); + connect(m_delimiterBox, TQT_SIGNAL(clicked(int)), + this, TQT_SLOT(delimiterClicked(int))); + connect(m_delimiterEdit, TQT_SIGNAL(returnPressed()), + this, TQT_SLOT(returnPressed())); + connect(m_delimiterEdit, TQT_SIGNAL(textChanged ( const TQString & )), + this, TQT_SLOT(textChanged ( const TQString & ) )); + connect(m_comboLine, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(lineSelected(const TQString&))); + connect(m_comboQuote, TQT_SIGNAL(activated(const TQString&)), + this, TQT_SLOT(textquoteSelected(const TQString&))); + connect(m_sheet, TQT_SIGNAL(currentChanged(int, int)), + this, TQT_SLOT(currentCellChanged(int, int))); + connect(m_ignoreDuplicates, TQT_SIGNAL(stateChanged(int)), + this, TQT_SLOT(ignoreDuplicatesChanged(int))); } CSVDialog::~CSVDialog() { - // no need to delete child widgets, Qt does it all for us + // no need to delete child widgets, TQt does it all for us } bool CSVDialog::cancelled() @@ -286,11 +286,11 @@ void CSVDialog::fillSheet() int row, column; bool lastCharDelimiter = false; bool ignoreDups = m_ignoreDuplicates->isChecked(); - enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD, + enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD, S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START; - QChar x; - QString field = ""; + TQChar x; + TQString field = ""; for (row = 0; row < m_sheet->numRows(); ++row) for (column = 0; column < m_sheet->numCols(); ++column) @@ -300,12 +300,12 @@ void CSVDialog::fillSheet() if (m_mode != Column) { m_mode = Column; - m_data = QString(m_fileArray); + m_data = TQString(m_fileArray); m_fileArray.resize(0); } - QTextStream inputStream(m_data, IO_ReadOnly); - inputStream.setEncoding(QTextStream::Locale); + TQTextStream inputStream(m_data, IO_ReadOnly); + inputStream.setEncoding(TQTextStream::Locale); while (!inputStream.atEnd()) { @@ -318,7 +318,7 @@ void CSVDialog::fillSheet() case S_START : if (x == m_textquote) { - state = S_QUOTED_FIELD; + state = S_TQUOTED_FIELD; } else if (x == m_delimiter) { @@ -337,10 +337,10 @@ void CSVDialog::fillSheet() state = S_MAYBE_NORMAL_FIELD; } break; - case S_QUOTED_FIELD : + case S_TQUOTED_FIELD : if (x == m_textquote) { - state = S_MAYBE_END_OF_QUOTED_FIELD; + state = S_MAYBE_END_OF_TQUOTED_FIELD; } else if (x == '\n') { @@ -364,11 +364,11 @@ void CSVDialog::fillSheet() field += x; } break; - case S_MAYBE_END_OF_QUOTED_FIELD : + case S_MAYBE_END_OF_TQUOTED_FIELD : if (x == m_textquote) { field += x; - state = S_QUOTED_FIELD; + state = S_TQUOTED_FIELD; } else if (x == m_delimiter || x == '\n') { @@ -389,10 +389,10 @@ void CSVDialog::fillSheet() } else { - state = S_END_OF_QUOTED_FIELD; + state = S_END_OF_TQUOTED_FIELD; } break; - case S_END_OF_QUOTED_FIELD : + case S_END_OF_TQUOTED_FIELD : if (x == m_delimiter || x == '\n') { setText(row - m_startline, column, field); @@ -412,14 +412,14 @@ void CSVDialog::fillSheet() } else { - state = S_END_OF_QUOTED_FIELD; + state = S_END_OF_TQUOTED_FIELD; } break; case S_MAYBE_NORMAL_FIELD : if (x == m_textquote) { field = ""; - state = S_QUOTED_FIELD; + state = S_TQUOTED_FIELD; break; } case S_NORMAL_FIELD : @@ -461,7 +461,7 @@ void CSVDialog::fillSheet() for (column = 0; column < m_sheet->numCols(); ++column) { - QString header = m_sheet->horizontalHeader()->label(column); + TQString header = m_sheet->horizontalHeader()->label(column); if (header != i18n("Text") && header != i18n("Number") && header != i18n("Date") && header != i18n("Currency")) m_sheet->horizontalHeader()->setLabel(column, i18n("Text")); @@ -474,10 +474,10 @@ void CSVDialog::fillComboBox() { m_comboLine->clear(); for (int row = 0; row < m_sheet->numRows(); ++row) - m_comboLine->insertItem(QString::number(row + 1), row); + m_comboLine->insertItem(TQString::number(row + 1), row); } -void CSVDialog::setText(int row, int col, const QString& text) +void CSVDialog::setText(int row, int col, const TQString& text) { if (row < 1) // skipped by the user return; @@ -514,7 +514,7 @@ void CSVDialog::returnPressed() fillSheet(); } -void CSVDialog::textChanged ( const QString & ) +void CSVDialog::textChanged ( const TQString & ) { m_radioOther->setChecked ( true ); delimiterClicked(4); // other @@ -522,7 +522,7 @@ void CSVDialog::textChanged ( const QString & ) void CSVDialog::formatClicked(int id) { - QString header; + TQString header; switch (id) { @@ -567,7 +567,7 @@ void CSVDialog::delimiterClicked(int id) fillSheet(); } -void CSVDialog::textquoteSelected(const QString& mark) +void CSVDialog::textquoteSelected(const TQString& mark) { if (mark == i18n("none")) m_textquote = 0; @@ -577,7 +577,7 @@ void CSVDialog::textquoteSelected(const QString& mark) fillSheet(); } -void CSVDialog::lineSelected(const QString& line) +void CSVDialog::lineSelected(const TQString& line) { m_startline = line.toInt() - 1; fillSheet(); @@ -586,7 +586,7 @@ void CSVDialog::lineSelected(const QString& line) void CSVDialog::currentCellChanged(int, int col) { int id; - QString header = m_sheet->horizontalHeader()->label(col); + TQString header = m_sheet->horizontalHeader()->label(col); if (header == i18n("Text")) id = 1; @@ -603,7 +603,7 @@ void CSVDialog::currentCellChanged(int, int col) void CSVDialog::accept() { Sheet * sheet = m_pView->activeSheet(); - QString csv_delimiter = QString::null; + TQString csv_delimiter = TQString(); Cell * cell; int numRows = m_sheet->numRows(); @@ -647,7 +647,7 @@ void CSVDialog::accept() int left = m_targetRect.left(); int top = m_targetRect.top(); - QMemArray<double> widths( numCols ); + TQMemArray<double> widths( numCols ); for ( i = 0; i < numCols; ++i ) { ColumnFormat * c = sheet->nonDefaultColumnFormat( left + i ); @@ -661,11 +661,11 @@ void CSVDialog::accept() cell = sheet->nonDefaultCell( left + col, top + row ); cell->setCellText( getText( row, col ) ); - QFontMetrics fm = sheet->painter().fontMetrics(); + TQFontMetrics fm = sheet->painter().fontMetrics(); double w = fm.width( cell->strOutText() ); if ( w == 0.0 ) { - QFontMetrics fm( cell->format()->textFont( left + col, top + row ) ); + TQFontMetrics fm( cell->format()->textFont( left + col, top + row ) ); w = fm.width('x') * (double) getText( row, col ).length(); } @@ -705,12 +705,12 @@ void CSVDialog::accept() } m_pView->slotUpdateView( sheet ); - QDialog::accept(); + TQDialog::accept(); } int CSVDialog::getHeader(int col) { - QString header = m_sheet->horizontalHeader()->label(col); + TQString header = m_sheet->horizontalHeader()->label(col); if (header == i18n("Text")) return TEXT; @@ -722,7 +722,7 @@ int CSVDialog::getHeader(int col) return DATE; } -QString CSVDialog::getText(int row, int col) +TQString CSVDialog::getText(int row, int col) { return m_sheet->text(row, col); } |