diff options
Diffstat (limited to 'kspread/dialogs/kspread_dlg_subtotal.cc')
-rw-r--r-- | kspread/dialogs/kspread_dlg_subtotal.cc | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/kspread/dialogs/kspread_dlg_subtotal.cc b/kspread/dialogs/kspread_dlg_subtotal.cc index f64664b5..696821cb 100644 --- a/kspread/dialogs/kspread_dlg_subtotal.cc +++ b/kspread/dialogs/kspread_dlg_subtotal.cc @@ -19,10 +19,10 @@ * Boston, MA 02110-1301, USA. */ -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlistview.h> -#include <qmemarray.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlistview.h> +#include <tqmemarray.h> #include <kdebug.h> #include <klocale.h> @@ -38,14 +38,14 @@ using namespace KSpread; -SubtotalDialog::SubtotalDialog( View * parent, QRect const & selection, const char * name ) - : KDialogBase(parent, name, true, i18n( "Subtotals" ), Ok | Cancel | User1, Ok, true, KGuiItem(i18n( "Remove All" )) ), - m_pView( parent ), +SubtotalDialog::SubtotalDialog( View * tqparent, TQRect const & selection, const char * name ) + : KDialogBase(tqparent, name, true, i18n( "Subtotals" ), Ok | Cancel | User1, Ok, true, KGuiItem(i18n( "Remove All" )) ), + m_pView( tqparent ), m_pSheet( m_pView->activeSheet() ), m_selection( selection ), m_dialog( new Subtotal( this ) ) { - setButtonBoxOrientation( Vertical ); + setButtonBoxOrientation( Qt::Vertical ); setMainWidget( m_dialog ); fillColumnBoxes(); @@ -59,14 +59,14 @@ SubtotalDialog::~SubtotalDialog() void SubtotalDialog::slotOk() { int numOfCols = m_selection.width(); - QMemArray<int> columns( numOfCols ); + TQMemArray<int> columns( numOfCols ); int n = 0; bool empty = true; int left = m_selection.left(); - for ( QListViewItem * item = m_dialog->m_columnList->firstChild(); item; item = item->nextSibling() ) + for ( TQListViewItem * item = m_dialog->m_columnList->firstChild(); item; item = item->nextSibling() ) { - if ( ((QCheckListItem * ) item)->isOn() ) + if ( ((TQCheckListItem * ) item)->isOn() ) { columns[n] = left + n; empty = false; @@ -89,9 +89,9 @@ void SubtotalDialog::slotOk() int bottom = m_selection.bottom(); int top = m_selection.top(); left = m_selection.left(); - QString oldText = m_pSheet->cellAt( mainCol, top )->strOutText(); - QString newText; - QString result( " " + i18n("Result") ); + TQString oldText = m_pSheet->cellAt( mainCol, top )->strOutText(); + TQString newText; + TQString result( " " + i18n("Result") ); int lastChangedRow = top; m_pView->doc()->emitBeginOperation( false ); @@ -193,7 +193,7 @@ void SubtotalDialog::removeSubtotalLines() int t = m_selection.top(); Cell * cell; - QString text; + TQString text; for ( int y = m_selection.bottom(); y >= t; --y ) { @@ -206,7 +206,7 @@ void SubtotalDialog::removeSubtotalLines() continue; text = cell->text(); - if ( text.find( "SUBTOTAL" ) != -1 ) + if ( text.tqfind( "SUBTOTAL" ) != -1 ) { containsSubtotal = true; break; @@ -216,7 +216,7 @@ void SubtotalDialog::removeSubtotalLines() if ( containsSubtotal ) { kdDebug() << "Line " << y << " contains a subtotal " << endl; - QRect rect( l, y, m_selection.width(), 1 ); + TQRect rect( l, y, m_selection.width(), 1 ); m_pSheet->unshiftColumn( rect ); m_selection.setHeight( m_selection.height() - 1 ); @@ -231,10 +231,10 @@ void SubtotalDialog::fillColumnBoxes() int row = m_selection.top(); Cell * cell; - QCheckListItem * item; + TQCheckListItem * item; - QString text; - QString col( i18n( "Column '%1' ") ); + TQString text; + TQString col( i18n( "Column '%1' ") ); for ( int i = m_selection.left(); i <= r; ++i ) { @@ -243,14 +243,14 @@ void SubtotalDialog::fillColumnBoxes() if ( text.length() > 0 ) { - text = col.arg( Cell::columnName( i ) ); + text = col.tqarg( Cell::columnName( i ) ); } m_dialog->m_columnBox->insertItem( text ); - item = new QCheckListItem( m_dialog->m_columnList, + item = new TQCheckListItem( m_dialog->m_columnList, text, - QCheckListItem::CheckBox ); + TQCheckListItem::CheckBox ); item->setOn(false); m_dialog->m_columnList->insertItem( item ); } @@ -258,7 +258,7 @@ void SubtotalDialog::fillColumnBoxes() void SubtotalDialog::fillFunctionBox() { - QStringList lst; + TQStringList lst; lst << i18n( "Average" ); lst << i18n( "Count" ); lst << i18n( "CountA" ); @@ -274,13 +274,13 @@ void SubtotalDialog::fillFunctionBox() } bool SubtotalDialog::addSubtotal( int mainCol, int column, int row, int topRow, - bool addRow, QString const & text ) + bool addRow, TQString const & text ) { kdDebug() << "Adding subtotal: " << mainCol << ", " << column << ", Rows: " << row << ", " << topRow << ": addRow: " << addRow << ", Text: " << text << endl; if ( addRow ) { - QRect rect(m_selection.left(), row + 1, m_selection.width(), 1); + TQRect rect(m_selection.left(), row + 1, m_selection.width(), 1); if ( !m_pSheet->shiftColumn( rect ) ) return false; @@ -293,18 +293,18 @@ bool SubtotalDialog::addSubtotal( int mainCol, int column, int row, int topRow, cell->format()->setTextFontUnderline( true ); } - QString colName = Cell::columnName( column ); + TQString colName = Cell::columnName( column ); - QString formula("=SUBTOTAL("); - formula += QString::number( m_dialog->m_functionBox->currentItem() + 1 ); + TQString formula("=SUBTOTAL("); + formula += TQString::number( m_dialog->m_functionBox->currentItem() + 1 ); formula += "; "; formula += colName; - formula += QString::number( topRow ); + formula += TQString::number( topRow ); // if ( topRow != row ) { formula += ":"; formula += colName; - formula += QString::number( row ); + formula += TQString::number( row ); } formula += ")"; |