summaryrefslogtreecommitdiffstats
path: root/plugins/stats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
commit1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch)
tree38559cd68cd4f63023fb5f6375def9db3b8b491e /plugins/stats
parent894f94545727610df22c4f73911d62d58266f695 (diff)
downloadktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.tar.gz
ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.zip
TQt4 port ktorrent
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugins/stats')
-rw-r--r--plugins/stats/ChartDrawer.cc86
-rw-r--r--plugins/stats/ChartDrawer.h39
-rw-r--r--plugins/stats/ChartDrawerData.cc20
-rw-r--r--plugins/stats/ChartDrawerData.h22
-rw-r--r--plugins/stats/PeerMonitor.cc24
-rw-r--r--plugins/stats/PeerMonitor.h6
-rw-r--r--plugins/stats/StatsCon.cc34
-rw-r--r--plugins/stats/StatsCon.h15
-rw-r--r--plugins/stats/StatsPluginPrefs.cc4
-rw-r--r--plugins/stats/StatsPluginPrefs.h11
-rw-r--r--plugins/stats/StatsPluginPrefsPage.cc2
-rw-r--r--plugins/stats/StatsPluginPrefsPage.h2
-rw-r--r--plugins/stats/StatsSpd.cc42
-rw-r--r--plugins/stats/StatsSpd.h17
-rw-r--r--plugins/stats/sprefwgt.ui108
-rw-r--r--plugins/stats/statsconwgt.ui12
-rw-r--r--plugins/stats/statsplugin.cc40
-rw-r--r--plugins/stats/statsplugin.h13
-rw-r--r--plugins/stats/statsspdwgt.ui14
19 files changed, 258 insertions, 253 deletions
diff --git a/plugins/stats/ChartDrawer.cc b/plugins/stats/ChartDrawer.cc
index 75142e6..5824684 100644
--- a/plugins/stats/ChartDrawer.cc
+++ b/plugins/stats/ChartDrawer.cc
@@ -28,7 +28,7 @@ int isinf(double x) { return !finite(x) && x==x; }
namespace kt {
-ChartDrawer::ChartDrawer(QWidget *p, wgtsize_t x_max, wgtsize_t y_max, bool autom, const QString & uname) : QWidget(p), mXMax(x_max), mYMax(y_max), mAutoMax(autom),
+ChartDrawer::ChartDrawer(TQWidget *p, wgtsize_t x_max, wgtsize_t y_max, bool autom, const TQString & uname) : TQWidget(p), mXMax(x_max), mYMax(y_max), mAutoMax(autom),
mUnitName(uname), mMMode(MaxModeExact)
{
setBackgroundColor("white");
@@ -36,7 +36,7 @@ ChartDrawer::ChartDrawer(QWidget *p, wgtsize_t x_max, wgtsize_t y_max, bool auto
ChartDrawer::~ChartDrawer()
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
}
ChartDrawer::wgtsize_t ChartDrawer::GetXMax() const
@@ -75,9 +75,9 @@ inline ChartDrawer::wgtunit_t ChartDrawer::TrY(const ChartDrawer::wgtunit_t y) c
return height() - y;
}
-void ChartDrawer::paintEvent ( QPaintEvent *)
+void ChartDrawer::paintEvent ( TQPaintEvent *)
{
- QPainter pnt( this );
+ TQPainter pnt( this );
DrawScale(pnt);
DrawFrame(pnt);
@@ -87,25 +87,25 @@ void ChartDrawer::paintEvent ( QPaintEvent *)
inline ChartDrawer::wgtunit_t ChartDrawer::height() const
{
- return QWidget::height() - 15;
+ return TQWidget::height() - 15;
}
inline ChartDrawer::wgtunit_t ChartDrawer::width() const
{
- return QWidget::width() - 65;
+ return TQWidget::width() - 65;
}
-void ChartDrawer::DrawFrame(QPainter & rPnt )
+void ChartDrawer::DrawFrame(TQPainter & rPnt )
{
- QPen op = rPnt.pen();
- rPnt.setPen(QPen("#000", 3));
+ TQPen op = rPnt.pen();
+ rPnt.setPen(TQPen("#000", 3));
rPnt.drawLine(0, TrY(0), width()+3, TrY(0));
- rPnt.drawLine(width()+1, TrY(0), width()+1, TrY(QWidget::height()));
+ rPnt.drawLine(width()+1, TrY(0), width()+1, TrY(TQWidget::height()));
- QFont oldf(rPnt.font());
- QFont newf(oldf);
- newf.setWeight(QFont::Bold);
+ TQFont oldf(rPnt.font());
+ TQFont newf(oldf);
+ newf.setWeight(TQFont::Bold);
newf.setPointSize(10);
newf.setUnderline(1);
@@ -116,7 +116,7 @@ void ChartDrawer::DrawFrame(QPainter & rPnt )
rPnt.setPen(op);
}
-void ChartDrawer::DrawScale(QPainter & rPnt )
+void ChartDrawer::DrawScale(TQPainter & rPnt )
{
if(!mYMax)
@@ -124,10 +124,10 @@ void ChartDrawer::DrawScale(QPainter & rPnt )
return;
}
- QPen op = rPnt.pen();
- QPen ep("#eee", 1, Qt::DashLine);
- QPen lp("#666", 2, Qt::DotLine);
- QPen tp("#000");
+ TQPen op = rPnt.pen();
+ TQPen ep("#eee", 1, TQt::DashLine);
+ TQPen lp("#666", 2, TQt::DotLine);
+ TQPen tp("#000");
rPnt.setPen(ep);
@@ -144,23 +144,23 @@ void ChartDrawer::DrawScale(QPainter & rPnt )
rPnt.setPen(lp);
rPnt.drawLine(0, TrY(height() - 10), width(), TrY(height() - 10));
rPnt.setPen(tp);
- rPnt.drawText(width() + 4, TrY(height() - 10) + 4, QString::number (mYMax));
+ rPnt.drawText(width() + 4, TrY(height() - 10) + 4, TQString::number (mYMax));
for(wgtsize_t i = 0; i < height() - 15 ; i += GetYScale())
{
rPnt.setPen(lp);
rPnt.drawLine(0, TrY(i), width(), TrY(i));
rPnt.setPen(tp);
- rPnt.drawText(width() + 4, TrY(i) + 4, QString::number ( (mYMax / 8.0 ) * ( i / static_cast<double>(GetYScale() )), 'f', 1 ) );
+ rPnt.drawText(width() + 4, TrY(i) + 4, TQString::number ( (mYMax / 8.0 ) * ( i / static_cast<double>(GetYScale() )), 'f', 1 ) );
}
rPnt.setPen(op);
}
-void ChartDrawer::DrawChart(QPainter & rPnt)
+void ChartDrawer::DrawChart(TQPainter & rPnt)
{
- QPen op = rPnt.pen();
+ TQPen op = rPnt.pen();
uint32_t skip_max = 0;
@@ -188,20 +188,20 @@ void ChartDrawer::DrawChart(QPainter & rPnt)
// --------------------
// Line on top
// ------------
- QPen myop(rPnt.pen());
- QPen topl(myop);
+ TQPen myop(rPnt.pen());
+ TQPen topl(myop);
topl.setStyle(Qt::DotLine);
rPnt.setPen(topl);
rPnt.drawLine(0, TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))), width(), TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))) );
rPnt.setPen(myop);
- QFont oldf(rPnt.font());
- QFont newf(oldf);
- newf.setWeight(QFont::Bold);
+ TQFont oldf(rPnt.font());
+ TQFont newf(oldf);
+ newf.setWeight(TQFont::Bold);
newf.setPointSize(8);
rPnt.setFont(newf);
- rPnt.drawText(5 + (i * 50), TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))) + 11, QString::number (mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1), 'f', 2 ) );
+ rPnt.drawText(5 + (i * 50), TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))) + 11, TQString::number (mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1), 'f', 2 ) );
//------------------
@@ -220,7 +220,7 @@ void ChartDrawer::DrawChart(QPainter & rPnt)
rPnt.setPen(myop);
rPnt.setFont(newf);
- QString maxv(QString::number (max.first, 'f', 2));
+ TQString maxv(TQString::number (max.first, 'f', 2));
if(FindXScreenCoords(max.second) < 35)
{
@@ -336,7 +336,7 @@ void ChartDrawer::AddValues(ChartDrawerData Cdd, const size_t idx, const bool ma
MakeLegendTooltip();
}
-void ChartDrawer::AddValuesCnt(const QString & rN, const bool max)
+void ChartDrawer::AddValuesCnt(const TQString & rN, const bool max)
{
mEls.push_back(ChartDrawerData(mXMax, rN));
mMarkMax.push_back(max);
@@ -344,7 +344,7 @@ void ChartDrawer::AddValuesCnt(const QString & rN, const bool max)
MakeLegendTooltip();
}
-void ChartDrawer::AddValuesCnt(const QPen & rP, const QString & rN, const bool max)
+void ChartDrawer::AddValuesCnt(const TQPen & rP, const TQString & rN, const bool max)
{
mEls.push_back(ChartDrawerData(rP, mXMax, rN));
mMarkMax.push_back(max);
@@ -352,17 +352,17 @@ void ChartDrawer::AddValuesCnt(const QPen & rP, const QString & rN, const bool m
MakeLegendTooltip();
}
-void ChartDrawer::SetUnitName(const QString & rN)
+void ChartDrawer::SetUnitName(const TQString & rN)
{
mUnitName = rN;
}
-QString ChartDrawer::GetUnitName() const
+TQString ChartDrawer::GetUnitName() const
{
return mUnitName;
}
-void ChartDrawer::mouseDoubleClickEvent ( QMouseEvent * evt )
+void ChartDrawer::mouseDoubleClickEvent ( TQMouseEvent * evt )
{
FindSetMax();
@@ -414,16 +414,16 @@ void ChartDrawer::Zero(const size_t idx)
void ChartDrawer::MakeLegendTooltip()
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
- QString helpstr(QString("<b>%1:</b><br><br>").arg(i18n("Legend")));
- QMimeSourceFactory* factory = QMimeSourceFactory::defaultFactory();
- std::vector<QImage> img;
+ TQString helpstr(TQString("<b>%1:</b><br><br>").tqarg(i18n("Legend")));
+ TQMimeSourceFactory* factory = TQMimeSourceFactory::defaultFactory();
+ std::vector<TQImage> img;
for(size_t i = 0; i < mEls.size(); i++)
{
- img.push_back(QImage(16,16, 32));
- img[i].fill(mEls[i].GetPen() -> color().pixel());
+ img.push_back(TQImage(16,16, 32));
+ img[i].fill(TQColor(mEls[i].GetPen() -> color()).pixel());
for(uint8_t px = 0; px < 16; px++)
{
@@ -433,11 +433,11 @@ void ChartDrawer::MakeLegendTooltip()
img[i].setPixel(15, px, 0); //r
}
- factory->setImage(mEls[i].GetName().replace(' ', '_') + "-" + QString::number(i), img[i]);
- helpstr += QString("<img src='%1'>&nbsp;&nbsp;-&nbsp;&nbsp;%2<br>").arg(mEls[i].GetName().replace(" ", "_") + "-" + QString::number(i)).arg( mEls[i].GetName() );
+ factory->setImage(mEls[i].GetName().tqreplace(' ', '_') + "-" + TQString::number(i), img[i]);
+ helpstr += TQString("<img src='%1'>&nbsp;&nbsp;-&nbsp;&nbsp;%2<br>").tqarg(mEls[i].GetName().tqreplace(" ", "_") + "-" + TQString::number(i)).tqarg( mEls[i].GetName() );
}
- QToolTip::add(this, helpstr);
+ TQToolTip::add(this, helpstr);
}
void ChartDrawer::FindSetMax()
diff --git a/plugins/stats/ChartDrawer.h b/plugins/stats/ChartDrawer.h
index 44b8d9f..2345f14 100644
--- a/plugins/stats/ChartDrawer.h
+++ b/plugins/stats/ChartDrawer.h
@@ -23,12 +23,12 @@
#include <stdint.h>
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qmime.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqmime.h>
+#include <tqimage.h>
#include <klocale.h>
@@ -44,9 +44,10 @@ namespace kt {
\brief Widget for drawing line charts
\author Krzysztof Kundzicz <athantor@gmail.com>
*/
-class ChartDrawer : public QWidget
+class ChartDrawer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
///Type used as widget size unit
@@ -71,29 +72,29 @@ class ChartDrawer : public QWidget
///Chart data
val_t mEls;
///Name of the chart unit
- QString mUnitName;
+ TQString mUnitName;
///Mark max
std::vector<bool> mMarkMax;
///Max mode
MaxMode mMMode;
///Paint event handler
- void paintEvent ( QPaintEvent * );
+ void paintEvent ( TQPaintEvent * );
/**
\brief Draws chart's frame
\param rPnt Painter on which things will be drawn
*/
- void DrawFrame(QPainter &rPnt);
+ void DrawFrame(TQPainter &rPnt);
/**
\brief Draws chart's scale
\param rPnt Painter on which things will be drawn
*/
- void DrawScale(QPainter &rPnt);
+ void DrawScale(TQPainter &rPnt);
/**
\brief Draws chart
\param rPnt Painter on which things will be drawn
*/
- void DrawChart(QPainter &rPnt);
+ void DrawChart(TQPainter &rPnt);
/**
\brief Gets distance between two values on OY
@@ -149,7 +150,7 @@ class ChartDrawer : public QWidget
\param autom Whether athomagically set the maximum Y size
\param uname Unit name
*/
- ChartDrawer(QWidget *p = 0, wgtsize_t x_max = 2, wgtsize_t y_max = 1, bool autom = true, const QString & uname = "KB/s");
+ ChartDrawer(TQWidget *p = 0, wgtsize_t x_max = 2, wgtsize_t y_max = 1, bool autom = true, const TQString & uname = "KB/s");
~ChartDrawer();
/**
@@ -169,18 +170,18 @@ class ChartDrawer : public QWidget
\note It'l be drawn on the chart
*/
- void SetUnitName(const QString & rN);
+ void SetUnitName(const TQString & rN);
/**
\brief Gets unit name
\return name
*/
- QString GetUnitName() const;
+ TQString GetUnitName() const;
/**
\brief Doubleclick handler
\param evt Mouse event
*/
- void mouseDoubleClickEvent ( QMouseEvent * evt );
+ void mouseDoubleClickEvent ( TQMouseEvent * evt );
/**
\brief Gets mode of OY axis maximum drawing
@@ -215,14 +216,14 @@ class ChartDrawer : public QWidget
\param rN Set's data name
\param max Whether mark maximum of this dataset
*/
- void AddValuesCnt(const QString & rN, const bool max = true);
+ void AddValuesCnt(const TQString & rN, const bool max = true);
/**
\brief Adds empty dataset
\param rP Pen that will be used to drawing
\param rN Dataset name
\param max Whether mark maximum of this dataset
*/
- void AddValuesCnt(const QPen & rP, const QString & rN, const bool max = true );
+ void AddValuesCnt(const TQPen & rP, const TQString & rN, const bool max = true );
/**
\brief Removes dataset
@@ -273,7 +274,7 @@ class ChartDrawer : public QWidget
\brief Emited when widget is doubleclicked
\param evt Mouse event
*/
- void DoubleClicked(QMouseEvent * evt);
+ void DoubleClicked(TQMouseEvent * evt);
};
diff --git a/plugins/stats/ChartDrawerData.cc b/plugins/stats/ChartDrawerData.cc
index 9a49a95..ba03261 100644
--- a/plugins/stats/ChartDrawerData.cc
+++ b/plugins/stats/ChartDrawerData.cc
@@ -22,25 +22,25 @@
namespace kt {
-ChartDrawerData::ChartDrawerData(const QString & rN) : pmQp(new QPen("#000", 1, Qt::SolidLine)), pmVals(new val_t(2, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const TQString & rN) : pmQp(new TQPen("#000", 1, TQt::SolidLine)), pmVals(new val_t(2, 0.0)), mName(rN)
{
}
-ChartDrawerData::ChartDrawerData(const size_t s, const QString & rN) : pmQp(new QPen("#000", 1, Qt::SolidLine)), pmVals(new val_t(s, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const size_t s, const TQString & rN) : pmQp(new TQPen("#000", 1, TQt::SolidLine)), pmVals(new val_t(s, 0.0)), mName(rN)
{
}
-ChartDrawerData::ChartDrawerData(const QPen & rQp, const QString & rN) : pmQp(new QPen(rQp)), pmVals(new val_t(2, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const TQPen & rQp, const TQString & rN) : pmQp(new TQPen(rQp)), pmVals(new val_t(2, 0.0)), mName(rN)
{
}
-ChartDrawerData::ChartDrawerData(const QPen & rQp, const size_t s, const QString & rN) : pmQp(new QPen(rQp)), pmVals(new val_t(s, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const TQPen & rQp, const size_t s, const TQString & rN) : pmQp(new TQPen(rQp)), pmVals(new val_t(s, 0.0)), mName(rN)
{
}
ChartDrawerData::ChartDrawerData(const ChartDrawerData & rS)
{
- pmQp = new QPen(*rS.pmQp);
+ pmQp = new TQPen(*rS.pmQp);
pmVals = new val_t(*rS.pmVals);
mName = rS.mName;
}
@@ -56,15 +56,15 @@ const ChartDrawerData::val_t * ChartDrawerData::GetVals() const
return pmVals;
}
-const QPen * ChartDrawerData::GetPen() const
+const TQPen * ChartDrawerData::GetPen() const
{
return pmQp;
}
-void ChartDrawerData::SetPen(const QPen & rQp)
+void ChartDrawerData::SetPen(const TQPen & rQp)
{
delete pmQp;
- pmQp = new QPen(rQp);
+ pmQp = new TQPen(rQp);
}
std::pair<double, size_t> ChartDrawerData::Max() const
@@ -88,11 +88,11 @@ std::pair<double, size_t> ChartDrawerData::Max() const
return std::make_pair(max, maxpos);
}
-QString ChartDrawerData::GetName() const
+TQString ChartDrawerData::GetName() const
{
return mName;
}
-void ChartDrawerData::SetName( const QString & rN )
+void ChartDrawerData::SetName( const TQString & rN )
{
mName = rN;
}
diff --git a/plugins/stats/ChartDrawerData.h b/plugins/stats/ChartDrawerData.h
index 561e76a..19d16e5 100644
--- a/plugins/stats/ChartDrawerData.h
+++ b/plugins/stats/ChartDrawerData.h
@@ -21,7 +21,7 @@
#ifndef CHARTDRAWERDATA_H_
#define CHARTDRAWERDATA_H_
-#include <qpen.h>
+#include <tqpen.h>
#include <vector>
#include <map>
@@ -43,18 +43,18 @@ class ChartDrawerData
private:
///Pen used for drawing
- QPen * pmQp;
+ TQPen * pmQp;
///Values
val_t * pmVals;
///Name of set
- QString mName;
+ TQString mName;
public:
/**
\brief Constructor
\param rN Name
*/
- ChartDrawerData(const QString & rN);
+ ChartDrawerData(const TQString & rN);
/**
\brief Copy constructor
\param rS Source
@@ -65,20 +65,20 @@ class ChartDrawerData
\param s Size
\param rN Name
*/
- ChartDrawerData(const size_t s, const QString & rN);
+ ChartDrawerData(const size_t s, const TQString & rN);
/**
\brief Constructor
\param rQp Pen used for drawing
\param rN Name
*/
- ChartDrawerData(const QPen & rQp, const QString & rN);
+ ChartDrawerData(const TQPen & rQp, const TQString & rN);
/**
\brief Constructor
\param rQp Pen used for drawing
\param s Size
\param rN Name
*/
- ChartDrawerData(const QPen & rQp, const size_t s, const QString & rN);
+ ChartDrawerData(const TQPen & rQp, const size_t s, const TQString & rN);
///Destructor
~ChartDrawerData();
@@ -92,23 +92,23 @@ class ChartDrawerData
\brief Gets pen
\return Pointer pen
*/
- const QPen * GetPen() const;
+ const TQPen * GetPen() const;
/**
\brief Gets name
\return Name
*/
- QString GetName() const;
+ TQString GetName() const;
/**
\brief Sets pen
\param rQp Pen
*/
- void SetPen(const QPen & rQp);
+ void SetPen(const TQPen & rQp);
/**
\brief Sets name
\param rN Name
*/
- void SetName( const QString & rN );
+ void SetName( const TQString & rN );
/**
\brief Finds maximum value
diff --git a/plugins/stats/PeerMonitor.cc b/plugins/stats/PeerMonitor.cc
index a4cf449..935efda 100644
--- a/plugins/stats/PeerMonitor.cc
+++ b/plugins/stats/PeerMonitor.cc
@@ -22,7 +22,7 @@
namespace kt {
-PeerMonitor::PeerMonitor(kt::TorrentInterface * pTi, std::map<bt::SHA1Hash, PeerMonitor *> * pM) : kt::MonitorInterface(), QObject(), pmTorIface(pTi), pmPeerMMgr(pM)
+PeerMonitor::PeerMonitor(kt::TorrentInterface * pTi, std::map<bt::SHA1Hash, PeerMonitor *> * pM) : kt::MonitorInterface(), TQObject(), pmTorIface(pTi), pmPeerMMgr(pM)
{
}
@@ -33,7 +33,7 @@ PeerMonitor::~PeerMonitor()
void PeerMonitor::peerAdded (kt::PeerInterface *peer)
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
mPeers.push_back( peer );
}
@@ -41,9 +41,9 @@ void PeerMonitor::peerAdded (kt::PeerInterface *peer)
void PeerMonitor::peerRemoved (kt::PeerInterface *peer)
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
- data_t::iterator it = std::find(mPeers.begin(), mPeers.end(), peer);
+ data_t::iterator it = std::tqfind(mPeers.begin(), mPeers.end(), peer);
if(it != mPeers.end())
{
@@ -65,7 +65,7 @@ void PeerMonitor::downloadRemoved (kt::ChunkDownloadInterface *)
void PeerMonitor::stopped ()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
std::fill(mPeers.begin(), mPeers.end(), static_cast<PeerInterface*>( 0 ) );
// mPeers.clear();
@@ -73,7 +73,7 @@ void PeerMonitor::stopped ()
void PeerMonitor::destroyed ()
{
- if(pmPeerMMgr -> find(pmTorIface -> getInfoHash()) != pmPeerMMgr -> end() )
+ if(pmPeerMMgr -> tqfind(pmTorIface -> getInfoHash()) != pmPeerMMgr -> end() )
{
pmTorIface -> setMonitor(0);
pmPeerMMgr -> erase(pmTorIface -> getInfoHash());
@@ -84,12 +84,12 @@ void PeerMonitor::destroyed ()
double PeerMonitor::LeechersUpSpeed()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
double spd = 0.0;
//without it'll segfault/SIGABRT on stop as in meantime the iterator from
- // mPeers will be invalidated
+ // mPeers will be tqinvalidated
for( data_t::const_iterator it = mPeers.begin(); it != mPeers.end(); it++)
{
@@ -104,7 +104,7 @@ double PeerMonitor::LeechersUpSpeed()
double PeerMonitor::LeechersDownSpeed()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
double spd = 0.0;
@@ -123,7 +123,7 @@ double PeerMonitor::LeechersDownSpeed()
double PeerMonitor::SeedersUpSpeed()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
double spd = 0.0;
@@ -143,7 +143,7 @@ double PeerMonitor::SeedersUpSpeed()
uint64_t PeerMonitor::GetLeechers()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
uint64_t l = 0;
@@ -162,7 +162,7 @@ uint64_t PeerMonitor::GetLeechers()
uint64_t PeerMonitor::GetSeeders()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
uint64_t s = 0;
diff --git a/plugins/stats/PeerMonitor.h b/plugins/stats/PeerMonitor.h
index d1ef4fc..3489378 100644
--- a/plugins/stats/PeerMonitor.h
+++ b/plugins/stats/PeerMonitor.h
@@ -21,7 +21,7 @@
#ifndef PEERMONITOR_H_
#define PEERMONITOR_H_
-#include <qmutex.h>
+#include <tqmutex.h>
#include <interfaces/monitorinterface.h>
#include <interfaces/peerinterface.h>
@@ -43,7 +43,7 @@ Used for peers statistics
\warning Don't use it, as There Can Be Only One™ and the infowidgetplugin relays on it
*/
-class PeerMonitor : public MonitorInterface, public QObject
+class PeerMonitor : public MonitorInterface, public TQObject
{
public:
///Type of conteiner of pointers to peers
@@ -55,7 +55,7 @@ class PeerMonitor : public MonitorInterface, public QObject
Used for locking conteiner with pointers to peers
*/
- QMutex mtx;
+ TQMutex mtx;
///Container with pointers to peers
data_t mPeers;
///Monitored torrent
diff --git a/plugins/stats/StatsCon.cc b/plugins/stats/StatsCon.cc
index 069ba75..548b38a 100644
--- a/plugins/stats/StatsCon.cc
+++ b/plugins/stats/StatsCon.cc
@@ -22,20 +22,20 @@
namespace kt {
-StatsCon::StatsCon(QWidget * p) : StatsConWgt(p), pmPeersConCht(new ChartDrawer(PeersConGbw, StatsPluginSettings::connectionsMeasurements())),
+StatsCon::StatsCon(TQWidget * p) : StatsConWgt(p), pmPeersConCht(new ChartDrawer(PeersConGbw, StatsPluginSettings::connectionsMeasurements())),
pmDHTCht(new ChartDrawer(DHTGbw, StatsPluginSettings::dHTMeasurements()))
{
PeersConGbw->setColumnLayout(0, Qt::Vertical );
- PeersConGbw->layout()->setSpacing( 6 );
- PeersConGbw->layout()->setMargin( 11 );
+ PeersConGbw->tqlayout()->setSpacing( 6 );
+ PeersConGbw->tqlayout()->setMargin( 11 );
- pmPeersConLay = new QVBoxLayout(PeersConGbw -> layout());
+ pmPeersConLay = new TQVBoxLayout(PeersConGbw -> tqlayout());
DHTGbw->setColumnLayout(0, Qt::Vertical );
- DHTGbw->layout()->setSpacing( 6 );
- DHTGbw->layout()->setMargin( 11 );
+ DHTGbw->tqlayout()->setSpacing( 6 );
+ DHTGbw->tqlayout()->setMargin( 11 );
- pmDHTLay = new QVBoxLayout(DHTGbw -> layout());
+ pmDHTLay = new TQVBoxLayout(DHTGbw -> tqlayout());
//-------------
@@ -46,20 +46,20 @@ StatsCon::StatsCon(QWidget * p) : StatsConWgt(p), pmPeersConCht(new ChartDrawer
pmPeersConCht -> SetUnitName("n");
- pmPeersConCht -> AddValuesCnt(QPen("#f00"), i18n("Leechers connected"));
- pmPeersConCht -> AddValuesCnt(QPen("#900"), i18n("Leechers in swarms"));
- pmPeersConCht -> AddValuesCnt(QPen("#00f"), i18n("Seeders connected"));
- pmPeersConCht -> AddValuesCnt(QPen("#009"), i18n("Seeders in swarms"));
- pmPeersConCht -> AddValuesCnt(QPen("#0a0"), i18n("Average connected leechers per torrent"));
- pmPeersConCht -> AddValuesCnt(QPen("#060"), i18n("Average connected seeders per torrent"));
- pmPeersConCht -> AddValuesCnt(QPen("#099"), i18n("Average connected leechers per running torrent"));
- pmPeersConCht -> AddValuesCnt(QPen("#055"), i18n("Average connected seeders per running torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#f00"), i18n("Leechers connected"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#900"), i18n("Leechers in swarms"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#00f"), i18n("Seeders connected"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#009"), i18n("Seeders in swarms"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#0a0"), i18n("Average connected leechers per torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#060"), i18n("Average connected seeders per torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#099"), i18n("Average connected leechers per running torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#055"), i18n("Average connected seeders per running torrent"));
pmDHTCht -> SetUnitName("n");
- pmDHTCht -> AddValuesCnt(QPen("#f00"), i18n("Nodes"));
- pmDHTCht -> AddValuesCnt(QPen("#00f"), i18n("Tasks"));
+ pmDHTCht -> AddValuesCnt(TQPen("#f00"), i18n("Nodes"));
+ pmDHTCht -> AddValuesCnt(TQPen("#00f"), i18n("Tasks"));
}
StatsCon::~StatsCon()
diff --git a/plugins/stats/StatsCon.h b/plugins/stats/StatsCon.h
index 9d60048..da984f1 100644
--- a/plugins/stats/StatsCon.h
+++ b/plugins/stats/StatsCon.h
@@ -21,10 +21,10 @@
#ifndef STATSCON_H_
#define STATSCON_H_
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qgroupbox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqgroupbox.h>
#include "statspluginsettings.h"
#include "statsconwgt.h"
@@ -35,11 +35,12 @@ namespace kt {
class StatsCon : public StatsConWgt
{
Q_OBJECT
+ TQ_OBJECT
private:
///Layout of peers connections
- QVBoxLayout * pmPeersConLay;
+ TQVBoxLayout * pmPeersConLay;
///Layout of DHT stats
- QVBoxLayout * pmDHTLay;
+ TQVBoxLayout * pmDHTLay;
///Chart widget of peers connted
ChartDrawer * pmPeersConCht;
@@ -47,7 +48,7 @@ class StatsCon : public StatsConWgt
ChartDrawer * pmDHTCht;
public:
- StatsCon(QWidget * p = 0);
+ StatsCon(TQWidget * p = 0);
virtual ~StatsCon();
/**
\brief Adds value to peers connections chart
diff --git a/plugins/stats/StatsPluginPrefs.cc b/plugins/stats/StatsPluginPrefs.cc
index 07cfa23..1d501a6 100644
--- a/plugins/stats/StatsPluginPrefs.cc
+++ b/plugins/stats/StatsPluginPrefs.cc
@@ -54,9 +54,9 @@ bool StatsPluginPrefs::apply ()
return true;
}
-void StatsPluginPrefs::createWidget (QWidget *parent)
+void StatsPluginPrefs::createWidget (TQWidget *tqparent)
{
- pmUi = new StatsPluginPrefsPage(parent);
+ pmUi = new StatsPluginPrefsPage(tqparent);
}
void StatsPluginPrefs::updateData ()
diff --git a/plugins/stats/StatsPluginPrefs.h b/plugins/stats/StatsPluginPrefs.h
index 6d563ec..2eabcac 100644
--- a/plugins/stats/StatsPluginPrefs.h
+++ b/plugins/stats/StatsPluginPrefs.h
@@ -21,9 +21,9 @@
#ifndef STATSPLUGINPREFS_H_
#define STATSPLUGINPREFS_H_
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kglobal.h>
@@ -40,9 +40,10 @@ namespace kt {
\brief Prefs page
\author Krzysztof Kundzicz <athantor@gmail.com>
*/
-class StatsPluginPrefs : public QObject, public PrefPageInterface
+class StatsPluginPrefs : public TQObject, public PrefPageInterface
{
Q_OBJECT
+ TQ_OBJECT
private:
///Widget
@@ -54,7 +55,7 @@ class StatsPluginPrefs : public QObject, public PrefPageInterface
virtual ~StatsPluginPrefs();
virtual bool apply ();
- virtual void createWidget (QWidget *parent);
+ virtual void createWidget (TQWidget *tqparent);
virtual void updateData ();
virtual void deleteWidget ();
signals:
diff --git a/plugins/stats/StatsPluginPrefsPage.cc b/plugins/stats/StatsPluginPrefsPage.cc
index 1278127..e641349 100644
--- a/plugins/stats/StatsPluginPrefsPage.cc
+++ b/plugins/stats/StatsPluginPrefsPage.cc
@@ -22,7 +22,7 @@
namespace kt {
-StatsPluginPrefsPage::StatsPluginPrefsPage(QWidget *p) : sprefwgt(p)
+StatsPluginPrefsPage::StatsPluginPrefsPage(TQWidget *p) : sprefwgt(p)
{
}
diff --git a/plugins/stats/StatsPluginPrefsPage.h b/plugins/stats/StatsPluginPrefsPage.h
index 59bd9f1..eca849f 100644
--- a/plugins/stats/StatsPluginPrefsPage.h
+++ b/plugins/stats/StatsPluginPrefsPage.h
@@ -36,7 +36,7 @@ class StatsPluginPrefsPage : public sprefwgt
\brief Constructor
\param p Parent
*/
- StatsPluginPrefsPage(QWidget * p = 0);
+ StatsPluginPrefsPage(TQWidget * p = 0);
};
}
diff --git a/plugins/stats/StatsSpd.cc b/plugins/stats/StatsSpd.cc
index e4f9d53..0ea427a 100644
--- a/plugins/stats/StatsSpd.cc
+++ b/plugins/stats/StatsSpd.cc
@@ -22,29 +22,29 @@
namespace kt {
-StatsSpd::StatsSpd(QWidget *p) : StatsSpdWgt(p),
+StatsSpd::StatsSpd(TQWidget *p) : StatsSpdWgt(p),
pmDownCht(new ChartDrawer(DownSpeedGbw, StatsPluginSettings::downloadMeasurements())),
pmPeersSpdCht(new ChartDrawer(PeersSpdGbw, StatsPluginSettings::peersSpeedMeasurements())),
pmUpCht(new ChartDrawer(UpSpeedGbw, StatsPluginSettings::uploadMeasurements()))
{
DownSpeedGbw->setColumnLayout(0, Qt::Vertical );
- DownSpeedGbw->layout()->setSpacing( 6 );
- DownSpeedGbw->layout()->setMargin( 11 );
+ DownSpeedGbw->tqlayout()->setSpacing( 6 );
+ DownSpeedGbw->tqlayout()->setMargin( 11 );
- pmDSpdLay = new QVBoxLayout(DownSpeedGbw -> layout());
+ pmDSpdLay = new TQVBoxLayout(DownSpeedGbw -> tqlayout());
UpSpeedGbw->setColumnLayout(0, Qt::Vertical );
- UpSpeedGbw->layout()->setSpacing( 6 );
- UpSpeedGbw->layout()->setMargin( 11 );
+ UpSpeedGbw->tqlayout()->setSpacing( 6 );
+ UpSpeedGbw->tqlayout()->setMargin( 11 );
- pmUSpdLay = new QVBoxLayout(UpSpeedGbw -> layout());
+ pmUSpdLay = new TQVBoxLayout(UpSpeedGbw -> tqlayout());
PeersSpdGbw->setColumnLayout(0, Qt::Vertical );
- PeersSpdGbw->layout()->setSpacing( 6 );
- PeersSpdGbw->layout()->setMargin( 11 );
+ PeersSpdGbw->tqlayout()->setSpacing( 6 );
+ PeersSpdGbw->tqlayout()->setMargin( 11 );
- pmPeersSpdLay = new QVBoxLayout(PeersSpdGbw -> layout());
+ pmPeersSpdLay = new TQVBoxLayout(PeersSpdGbw -> tqlayout());
//-----------------
@@ -54,25 +54,25 @@ StatsSpd::StatsSpd(QWidget *p) : StatsSpdWgt(p),
// ----------------
- pmUpCht -> AddValuesCnt(QPen("#f00"), i18n("Current"));
- pmDownCht -> AddValuesCnt(QPen("#f00"), i18n("Current"));
+ pmUpCht -> AddValuesCnt(TQPen("#f00"), i18n("Current"));
+ pmDownCht -> AddValuesCnt(TQPen("#f00"), i18n("Current"));
- pmUpCht -> AddValuesCnt(QPen("#00f"), i18n("Average"));
- pmDownCht -> AddValuesCnt(QPen("#00f"), i18n("Average"));
+ pmUpCht -> AddValuesCnt(TQPen("#00f"), i18n("Average"));
+ pmDownCht -> AddValuesCnt(TQPen("#00f"), i18n("Average"));
pmUpCht -> AddValuesCnt(i18n("Limit"), 0);
pmDownCht -> AddValuesCnt(i18n("Limit"), 0);
-// pmUpCht -> AddValuesCnt(QPen("#f0f"), i18n("Current torrent"));
-// pmDownCht -> AddValuesCnt(QPen("#f0f"), i18n("Current torrent"));
+// pmUpCht -> AddValuesCnt(TQPen("#f0f"), i18n("Current torrent"));
+// pmDownCht -> AddValuesCnt(TQPen("#f0f"), i18n("Current torrent"));
//
- pmPeersSpdCht -> AddValuesCnt(QPen("#090"), i18n("Average from leecher"));
- pmPeersSpdCht -> AddValuesCnt(QPen("#f00"), i18n("Average to leecher"));
- pmPeersSpdCht -> AddValuesCnt(QPen("#00f"), i18n("Average from seeder"));
- pmPeersSpdCht -> AddValuesCnt(QPen("magenta"), i18n("From leechers"));
- pmPeersSpdCht -> AddValuesCnt(QPen("orange"), i18n("From seeders"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("#090"), i18n("Average from leecher"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("#f00"), i18n("Average to leecher"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("#00f"), i18n("Average from seeder"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("magenta"), i18n("From leechers"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("orange"), i18n("From seeders"));
}
diff --git a/plugins/stats/StatsSpd.h b/plugins/stats/StatsSpd.h
index 7ba8d43..971209a 100644
--- a/plugins/stats/StatsSpd.h
+++ b/plugins/stats/StatsSpd.h
@@ -21,10 +21,10 @@
#ifndef STATSSPD_H_
#define STATSSPD_H_
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qgroupbox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqgroupbox.h>
#include "statspluginsettings.h"
#include "statsspdwgt.h"
@@ -39,14 +39,15 @@ namespace kt {
class StatsSpd : public StatsSpdWgt
{
Q_OBJECT
+ TQ_OBJECT
private:
///Layout of upload speed
- QVBoxLayout * pmUSpdLay;
+ TQVBoxLayout * pmUSpdLay;
///Layout of down speed
- QVBoxLayout * pmDSpdLay;
+ TQVBoxLayout * pmDSpdLay;
///Layout of peers speed
- QVBoxLayout * pmPeersSpdLay;
+ TQVBoxLayout * pmPeersSpdLay;
///Chart widget of download speed
ChartDrawer * pmDownCht;
@@ -60,7 +61,7 @@ class StatsSpd : public StatsSpdWgt
\brief Constructor
\param p Parent
*/
- StatsSpd(QWidget *p = 0);
+ StatsSpd(TQWidget *p = 0);
///Destructor
virtual ~StatsSpd();
diff --git a/plugins/stats/sprefwgt.ui b/plugins/stats/sprefwgt.ui
index 7b6674a..4ee3641 100644
--- a/plugins/stats/sprefwgt.ui
+++ b/plugins/stats/sprefwgt.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>sprefwgt</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>sprefwgt</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -30,15 +30,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -49,7 +49,7 @@
<cstring>GuiUpdatesSbw</cstring>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>GuiUpdatesSbw</cstring>
</property>
@@ -63,7 +63,7 @@
<number>4</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -76,15 +76,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -95,7 +95,7 @@
<cstring>spinBox2</cstring>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>DataIvalSbw</cstring>
</property>
@@ -112,7 +112,7 @@
<number>1000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -127,7 +127,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox5</cstring>
</property>
@@ -138,15 +138,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -154,7 +154,7 @@
<string>Maximum speed scale mode:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Top</string>
@@ -184,7 +184,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -195,15 +195,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>PeersSpdCbw</cstring>
</property>
@@ -214,7 +214,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -222,7 +222,7 @@
<string>update every</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>PeersSpdUpdIvalSbw</cstring>
</property>
@@ -236,7 +236,7 @@
<number>4</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -246,20 +246,20 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
<property name="text">
<string>Gathering data about many connected peers can be CPU consuming.</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox11</cstring>
</property>
@@ -273,15 +273,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>ConnSdrInSwaCbw</cstring>
</property>
@@ -289,7 +289,7 @@
<string>Show seeders in swarms</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>ConnLchInSwaCbw</cstring>
</property>
@@ -301,7 +301,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox8</cstring>
</property>
@@ -312,15 +312,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -328,7 +328,7 @@
<string>Download</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>DownloadMrmtSbw</cstring>
</property>
@@ -344,15 +344,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout5_2</cstring>
+ <cstring>tqlayout5_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_2</cstring>
</property>
@@ -360,7 +360,7 @@
<string>Peers speed</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>PeersSpdMrmtSbw</cstring>
</property>
@@ -376,15 +376,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout5_3</cstring>
+ <cstring>tqlayout5_3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_3</cstring>
</property>
@@ -392,7 +392,7 @@
<string>Upload</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>UploadMrmtSbw</cstring>
</property>
@@ -408,15 +408,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout5_5</cstring>
+ <cstring>tqlayout5_5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_5</cstring>
</property>
@@ -424,7 +424,7 @@
<string>Connections</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>ConnsMrmtSbw</cstring>
</property>
@@ -440,15 +440,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout5_4</cstring>
+ <cstring>tqlayout5_4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_4</cstring>
</property>
@@ -456,7 +456,7 @@
<string>DHT</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>DHTMrmtSbw</cstring>
</property>
@@ -484,7 +484,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -513,5 +513,5 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/stats/statsconwgt.ui b/plugins/stats/statsconwgt.ui
index 07753dc..84f5d55 100644
--- a/plugins/stats/statsconwgt.ui
+++ b/plugins/stats/statsconwgt.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StatsConWgt</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>StatsConWgt</cstring>
</property>
@@ -16,15 +16,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>PeersConGbw</cstring>
</property>
@@ -32,7 +32,7 @@
<string>Peers</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>DHTGbw</cstring>
</property>
@@ -44,5 +44,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/stats/statsplugin.cc b/plugins/stats/statsplugin.cc
index d3d1b03..224d736 100644
--- a/plugins/stats/statsplugin.cc
+++ b/plugins/stats/statsplugin.cc
@@ -25,8 +25,8 @@ K_EXPORT_COMPONENT_FACTORY(ktstatsplugin, KGenericFactory<kt::StatsPlugin>("ktst
namespace kt
{
-StatsPlugin::StatsPlugin(QObject* parent, const char* qt_name, const QStringList& args):
- Plugin(parent, qt_name, args, "Statistics", i18n("Statistics"),"Krzysztof Kundzicz", "athantor@gmail.com", i18n("Shows transfers statistics"),"ktimemon"), pmUiSpd(0), pmUiCon(0), pmPrefsUi(0), pmUpdTmr(0)
+StatsPlugin::StatsPlugin(TQObject* tqparent, const char* qt_name, const TQStringList& args):
+ Plugin(tqparent, qt_name, args, "Statistics", i18n("Statistics"),"Krzysztof Kundzicz", "athantor@gmail.com", i18n("Shows transfers statistics"),"ktimemon"), pmUiSpd(0), pmUiCon(0), pmPrefsUi(0), pmUpdTmr(0)
{
mUpAvg = std::make_pair(0.0, 0.0);
mDownAvg = std::make_pair(0.0, 0.0);
@@ -46,18 +46,18 @@ void StatsPlugin::load()
mUpdCtr = 1;
mPeerSpdUpdCtr = 1;
- pmUiSpd = new StatsSpd(dynamic_cast<QWidget *>(parent()));
- pmUiCon = new StatsCon(dynamic_cast<QWidget *>(parent()));
+ pmUiSpd = new StatsSpd(dynamic_cast<TQWidget *>(tqparent()));
+ pmUiCon = new StatsCon(dynamic_cast<TQWidget *>(tqparent()));
pmPrefsUi = new StatsPluginPrefs();
- pmUpdTmr = new QTimer(this);
+ pmUpdTmr = new TQTimer(this);
- connect(pmUpdTmr, SIGNAL(timeout () ), this, SLOT(UpdateData()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(RestartTimer()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(TogglePeersSpdCht()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleLchInSwmDrawing()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleSdrInSwmDrawing()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMsmtsCounts()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMaxMode()));
+ connect(pmUpdTmr, TQT_SIGNAL(timeout () ), this, TQT_SLOT(UpdateData()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(RestartTimer()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(TogglePeersSpdCht()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleLchInSwmDrawing()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleSdrInSwmDrawing()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMsmtsCounts()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMaxMode()));
TogglePeersSpdCht();
ChangeMaxMode();
@@ -76,13 +76,13 @@ void StatsPlugin::unload()
getGUI() -> removeToolWidget(pmUiCon);
getGUI() -> removePrefPage(pmPrefsUi);
- disconnect(pmUpdTmr, SIGNAL(timeout()), this, SLOT(UpdateData()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(RestartTimer()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(TogglePeersSpdCht()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleLchInSwmDrawing()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleSdrInSwmDrawing()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMsmtsCounts()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMaxMode()));
+ disconnect(pmUpdTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(UpdateData()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(RestartTimer()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(TogglePeersSpdCht()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleLchInSwmDrawing()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleSdrInSwmDrawing()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMsmtsCounts()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMaxMode()));
delete pmUiSpd;
delete pmUiCon;
@@ -90,7 +90,7 @@ void StatsPlugin::unload()
delete pmUpdTmr;
}
-bool StatsPlugin::versionCheck(const QString& rVer) const
+bool StatsPlugin::versionCheck(const TQString& rVer) const
{
return rVer == KT_VERSION_MACRO;
}
diff --git a/plugins/stats/statsplugin.h b/plugins/stats/statsplugin.h
index 14f1fcd..df482a7 100644
--- a/plugins/stats/statsplugin.h
+++ b/plugins/stats/statsplugin.h
@@ -23,8 +23,8 @@
#include <kgenericfactory.h>
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <interfaces/plugin.h>
#include <interfaces/guiinterface.h>
@@ -52,6 +52,7 @@ namespace kt {
class StatsPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
private:
///Speed UI of the plugin
@@ -104,7 +105,7 @@ class StatsPlugin : public Plugin
std::pair<uint32_t, uint32_t> mRunningSeedAvg;
///Data update timer
- QTimer * pmUpdTmr;
+ TQTimer * pmUpdTmr;
///Update ctr
uint32_t mUpdCtr;
@@ -133,17 +134,17 @@ class StatsPlugin : public Plugin
public:
/**
\brief Constructor
- \param parent Parent
+ \param tqparent Parent
\param qt_name
\param args
*/
- StatsPlugin(QObject* parent, const char* qt_name, const QStringList& args);
+ StatsPlugin(TQObject* tqparent, const char* qt_name, const TQStringList& args);
///Destructor
virtual ~StatsPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString&) const;
+ virtual bool versionCheck(const TQString&) const;
virtual void guiUpdate();
};
diff --git a/plugins/stats/statsspdwgt.ui b/plugins/stats/statsspdwgt.ui
index 162bf9c..c31124d 100644
--- a/plugins/stats/statsspdwgt.ui
+++ b/plugins/stats/statsspdwgt.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StatsSpdWgt</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>StatsSpdWgt</cstring>
</property>
@@ -16,15 +16,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>DownSpeedGbw</cstring>
</property>
@@ -32,7 +32,7 @@
<string>Download</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>PeersSpdGbw</cstring>
</property>
@@ -40,7 +40,7 @@
<string>Peers</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>UpSpeedGbw</cstring>
</property>
@@ -52,5 +52,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>