summaryrefslogtreecommitdiffstats
path: root/kppp/logview/monthly.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:34 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:34 -0600
commit83677e35509b4dafac63b76995652bdf3b49f209 (patch)
tree591f1dc22278addb439726c42896376b17bb42bd /kppp/logview/monthly.cpp
parent808e453c56036211f57482ed847d54aca01bba68 (diff)
downloadtdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.tar.gz
tdenetwork-83677e35509b4dafac63b76995652bdf3b49f209.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 808e453c56036211f57482ed847d54aca01bba68.
Diffstat (limited to 'kppp/logview/monthly.cpp')
-rw-r--r--kppp/logview/monthly.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/kppp/logview/monthly.cpp b/kppp/logview/monthly.cpp
index 0844f85a..831976cc 100644
--- a/kppp/logview/monthly.cpp
+++ b/kppp/logview/monthly.cpp
@@ -38,67 +38,67 @@ static void formatBytes(double bytes, TQString &result) {
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
- result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ result = i18n("%1 KB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
else
- result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+ result = i18n("%1 MB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
static void formatBytesMonth(double bytes, TQString &result) {
int day, days;
- day = TQDate::currentDate().day();
- days = TQDate::currentDate().daysInMonth();
+ day = TQDate::tqcurrentDate().day();
+ days = TQDate::tqcurrentDate().daysInMonth();
bytes = (bytes / day) * days;
if(bytes < 1024)
result.setNum(bytes);
else if(bytes < 1024*1024)
- result = i18n("%1 KB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
+ result = i18n("%1 KB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0, 1));
else
- result = i18n("%1 MB").arg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
+ result = i18n("%1 MB").tqarg(KGlobal::locale()->formatNumber((float)bytes / 1024.0 / 1024.0, 1));
}
static void formatDuration(int seconds, TQString &result) {
TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
- result = i18n("%1s").arg(sec);
+ result = i18n("%1s").tqarg(sec);
else if(seconds < 3600)
- result = i18n("%1m %2s").arg(seconds/60).arg(sec);
+ result = i18n("%1m %2s").tqarg(seconds/60).tqarg(sec);
else
result = i18n("%1h %2m %3s")
- .arg(seconds/3600)
- .arg((seconds % 3600)/60)
- .arg(sec);
+ .tqarg(seconds/3600)
+ .tqarg((seconds % 3600)/60)
+ .tqarg(sec);
}
static void formatDurationMonth(int seconds, TQString &result) {
int day, days;
- day = TQDate::currentDate().day();
- days = TQDate::currentDate().daysInMonth();
+ day = TQDate::tqcurrentDate().day();
+ days = TQDate::tqcurrentDate().daysInMonth();
seconds = (seconds / day) * days;
TQString sec;
sec.sprintf("%02d", seconds%60);
if(seconds < 60)
- result = i18n("%1s").arg(sec);
+ result = i18n("%1s").tqarg(sec);
else if(seconds < 3600)
- result = i18n("%1m %2s").arg(seconds/60).arg(sec);
+ result = i18n("%1m %2s").tqarg(seconds/60).tqarg(sec);
else
result = i18n("%1h %2m %3s")
- .arg(seconds/3600)
- .arg((seconds % 3600)/60)
- .arg(sec);
+ .tqarg(seconds/3600)
+ .tqarg((seconds % 3600)/60)
+ .tqarg(sec);
}
static void costsMonth(double costs, double &result) {
int day, days;
- day = TQDate::currentDate().day();
- days = TQDate::currentDate().daysInMonth();
+ day = TQDate::tqcurrentDate().day();
+ days = TQDate::tqcurrentDate().daysInMonth();
result = (costs / day) * days;
@@ -117,7 +117,7 @@ public:
{
}
virtual void paintCell( TQPainter *p, const TQColorGroup & cg,
- int column, int width, int alignment );
+ int column, int width, int tqalignment );
virtual TQString key(int, bool) const;
@@ -125,9 +125,9 @@ public:
};
void LogListItem::paintCell( TQPainter *p, const TQColorGroup & cg,
- int column, int width, int alignment )
+ int column, int width, int tqalignment )
{
- TQListViewItem::paintCell(p, cg, column, width, alignment);
+ TQListViewItem::paintCell(p, cg, column, width, tqalignment);
// double line above sum
//if(!li) {
@@ -212,7 +212,7 @@ MonthlyWidget::MonthlyWidget(TQWidget *parent) :
lv2->setSorting(-1);
lv2->setItemMargin(2);
lv2->setMaximumHeight(100);
- lv2->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
+ lv2->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum);
lv2->setSelectionMode(TQListView::NoSelection);
title = new TQLabel("X", this);
@@ -220,7 +220,7 @@ MonthlyWidget::MonthlyWidget(TQWidget *parent) :
f.setPointSize(f.pointSize() + 2);
f.setBold(TRUE);
title->setFont(f);
- title->setFixedHeight(title->sizeHint().height()*2);
+ title->setFixedHeight(title->tqsizeHint().height()*2);
cboConnections = new TQComboBox(false, this); // add a combo box to select connections
cboConnections->setMaximumWidth(200); // a resonable size
@@ -246,7 +246,7 @@ MonthlyWidget::MonthlyWidget(TQWidget *parent) :
this, TQT_SLOT(exportWizard()));
bbox->addStretch(8);
- bbox->layout();
+ bbox->tqlayout();
currentMonth();
layoutWidget();
@@ -265,8 +265,8 @@ void MonthlyWidget::layoutWidget() {
f2.setPointSize(f2.pointSize() + 1);
f2.setBold(TRUE);
l->setFont(f2);
- l->setFixedHeight(l->sizeHint().height());
- l->setAlignment( AlignLeft );
+ l->setFixedHeight(l->tqsizeHint().height());
+ l->tqsetAlignment( AlignLeft );
tl->addWidget(l, 5, 0);
tl->addWidget(bbox, 1, 2);
tl->addMultiCellWidget(lv, 1, 4, 0, 1);
@@ -396,7 +396,7 @@ void MonthlyWidget::plotMonth() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::tqcurrentDate())) {
TQString m_bin, m_bout;
@@ -426,13 +426,13 @@ void MonthlyWidget::plotMonth() {
if(lv->childCount() > 0) {
exportBttn->setEnabled(true); // export possibility
t = i18n("Connection log for %1 %2")
- .arg(calendar->monthName(startDate))
- .arg(calendar->year(startDate));
+ .tqarg(calendar->monthName(startDate))
+ .tqarg(calendar->year(startDate));
} else {
exportBttn->setEnabled(false); // nothing to export
t = i18n("No connection log for %1 %2 available")
- .arg(calendar->monthName(startDate))
- .arg(calendar->year(startDate));
+ .tqarg(calendar->monthName(startDate))
+ .tqarg(calendar->year(startDate));
}
title->setText(t);
@@ -456,7 +456,7 @@ void MonthlyWidget::prevMonth() {
void MonthlyWidget::currentMonth() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- TQDate dt = TQDate::currentDate();
+ TQDate dt = TQDate::tqcurrentDate();
calendar->setYMD(m_periodeFirst, calendar->year(dt), calendar->month(dt), 1);
plotMonth();
@@ -464,9 +464,9 @@ void MonthlyWidget::currentMonth() {
void MonthlyWidget::exportWizard() {
const KCalendarSystem * calendar = KGlobal::locale()->calendar();
- TQString date = TQString::fromLatin1("%1-%2") // e.g.: June-2001
- .arg(calendar->monthName(periodeFirst()))
- .arg(calendar->year(periodeFirst()));
+ TQString date = TQString::tqfromLatin1("%1-%2") // e.g.: June-2001
+ .tqarg(calendar->monthName(periodeFirst()))
+ .tqarg(calendar->year(periodeFirst()));
ExportWizard *wizard = new ExportWizard(0, date);
wizard->exec();
@@ -576,7 +576,7 @@ void MonthlyWidget::exportWizard() {
}
}
- if(calendar->month(periodeFirst()) == calendar->month(TQDate::currentDate())) {
+ if(calendar->month(periodeFirst()) == calendar->month(TQDate::tqcurrentDate())) {
TQString m_bin, m_bout;
if(bin < 0)
@@ -595,10 +595,10 @@ void MonthlyWidget::exportWizard() {
costsMonth(costs, costs);
TQString m_costs(KGlobal::locale()->formatMoney(costs, TQString(), 2));
- TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime(), true);
+ TQString datetime = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime(), true);
exportIFace->addEmptyLine();
- exportIFace->addDataline(i18n("Monthly estimates (%1)").arg(datetime),
+ exportIFace->addDataline(i18n("Monthly estimates (%1)").tqarg(datetime),
TQString(), TQString(), TQString(), m_duration, m_costs, m_bin, m_bout);
}