|
|
|
@ -62,9 +62,9 @@ void InterfaceStatisticsDialog::updateDays()
|
|
|
|
|
{
|
|
|
|
|
TQDate date( iterator->year, iterator->month, iterator->day );
|
|
|
|
|
tableDaily->verticalHeader()->setLabel( row, TDEGlobal::locale()->formatDate( date, true ) );
|
|
|
|
|
tableDaily->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
|
|
|
|
|
tableDaily->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
|
|
|
|
|
tableDaily->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
|
|
|
|
|
tableDaily->setText( row, 0, TDEIO::convertSize( iterator->txBytes ) );
|
|
|
|
|
tableDaily->setText( row, 1, TDEIO::convertSize( iterator->rxBytes ) );
|
|
|
|
|
tableDaily->setText( row, 2, TDEIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
|
|
|
|
|
row++;
|
|
|
|
|
iterator = dayStatistics.next();
|
|
|
|
|
}
|
|
|
|
@ -84,9 +84,9 @@ void InterfaceStatisticsDialog::updateMonths()
|
|
|
|
|
const KCalendarSystem* calendar = TDEGlobal::locale()->calendar();
|
|
|
|
|
TQString monthName = calendar->monthName( iterator->month, iterator->year ) + " " + TQString::number( iterator->year );
|
|
|
|
|
tableMonthly->verticalHeader()->setLabel( row, monthName );
|
|
|
|
|
tableMonthly->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
|
|
|
|
|
tableMonthly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
|
|
|
|
|
tableMonthly->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
|
|
|
|
|
tableMonthly->setText( row, 0, TDEIO::convertSize( iterator->txBytes ) );
|
|
|
|
|
tableMonthly->setText( row, 1, TDEIO::convertSize( iterator->rxBytes ) );
|
|
|
|
|
tableMonthly->setText( row, 2, TDEIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
|
|
|
|
|
row++;
|
|
|
|
|
iterator = monthStatistics.next();
|
|
|
|
|
}
|
|
|
|
@ -104,9 +104,9 @@ void InterfaceStatisticsDialog::updateYears()
|
|
|
|
|
while ( iterator )
|
|
|
|
|
{
|
|
|
|
|
tableYearly->verticalHeader()->setLabel( row, TQString::number( iterator->year ) );
|
|
|
|
|
tableYearly->setText( row, 0, KIO::convertSize( iterator->txBytes ) );
|
|
|
|
|
tableYearly->setText( row, 1, KIO::convertSize( iterator->rxBytes ) );
|
|
|
|
|
tableYearly->setText( row, 2, KIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
|
|
|
|
|
tableYearly->setText( row, 0, TDEIO::convertSize( iterator->txBytes ) );
|
|
|
|
|
tableYearly->setText( row, 1, TDEIO::convertSize( iterator->rxBytes ) );
|
|
|
|
|
tableYearly->setText( row, 2, TDEIO::convertSize( iterator->rxBytes + iterator->txBytes ) );
|
|
|
|
|
row++;
|
|
|
|
|
iterator = yearStatistics.next();
|
|
|
|
|
}
|
|
|
|
@ -119,21 +119,21 @@ void InterfaceStatisticsDialog::updateCurrentEntry()
|
|
|
|
|
{
|
|
|
|
|
int lastRow = tableDaily->numRows() - 1;
|
|
|
|
|
const StatisticEntry* currentEntry = mInterface->getStatistics()->getCurrentDay();
|
|
|
|
|
tableDaily->setText( lastRow, 0, KIO::convertSize( currentEntry->txBytes ) );
|
|
|
|
|
tableDaily->setText( lastRow, 1, KIO::convertSize( currentEntry->rxBytes ) );
|
|
|
|
|
tableDaily->setText( lastRow, 2, KIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
|
|
|
|
|
tableDaily->setText( lastRow, 0, TDEIO::convertSize( currentEntry->txBytes ) );
|
|
|
|
|
tableDaily->setText( lastRow, 1, TDEIO::convertSize( currentEntry->rxBytes ) );
|
|
|
|
|
tableDaily->setText( lastRow, 2, TDEIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
|
|
|
|
|
|
|
|
|
|
lastRow = tableMonthly->numRows() - 1;
|
|
|
|
|
currentEntry = mInterface->getStatistics()->getCurrentMonth();
|
|
|
|
|
tableMonthly->setText( lastRow, 0, KIO::convertSize( currentEntry->txBytes ) );
|
|
|
|
|
tableMonthly->setText( lastRow, 1, KIO::convertSize( currentEntry->rxBytes ) );
|
|
|
|
|
tableMonthly->setText( lastRow, 2, KIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
|
|
|
|
|
tableMonthly->setText( lastRow, 0, TDEIO::convertSize( currentEntry->txBytes ) );
|
|
|
|
|
tableMonthly->setText( lastRow, 1, TDEIO::convertSize( currentEntry->rxBytes ) );
|
|
|
|
|
tableMonthly->setText( lastRow, 2, TDEIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
|
|
|
|
|
|
|
|
|
|
lastRow = tableYearly->numRows() - 1;
|
|
|
|
|
currentEntry = mInterface->getStatistics()->getCurrentYear();
|
|
|
|
|
tableYearly->setText( lastRow, 0, KIO::convertSize( currentEntry->txBytes ) );
|
|
|
|
|
tableYearly->setText( lastRow, 1, KIO::convertSize( currentEntry->rxBytes ) );
|
|
|
|
|
tableYearly->setText( lastRow, 2, KIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
|
|
|
|
|
tableYearly->setText( lastRow, 0, TDEIO::convertSize( currentEntry->txBytes ) );
|
|
|
|
|
tableYearly->setText( lastRow, 1, TDEIO::convertSize( currentEntry->rxBytes ) );
|
|
|
|
|
tableYearly->setText( lastRow, 2, TDEIO::convertSize( currentEntry->rxBytes + currentEntry->txBytes ) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#include "interfacestatisticsdialog.moc"
|
|
|
|
|