Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/11/head
Michele Calgaro 7 months ago
parent f25d0eec8a
commit 84c57055d6
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -1141,7 +1141,7 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
(void)QStyleFactory::create(TQString::null); (void)QStyleFactory::create(TQString::null);
QCursor c(Qt::WhatsThisCursor); QCursor c(TQt::WhatsThisCursor);
EOF EOF
fi fi
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF

2
aclocal.m4 vendored

@ -1153,7 +1153,7 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
(void)QStyleFactory::create(TQString::null); (void)QStyleFactory::create(TQString::null);
QCursor c(Qt::WhatsThisCursor); QCursor c(TQt::WhatsThisCursor);
EOF EOF
fi fi
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF

@ -69,7 +69,7 @@ bool TorrentView::eventFilter(TQObject* watched, TQEvent* e)
{ {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
{ {
if(TQT_TQMOUSEEVENT(e)->button() == Qt::RightButton) if(TQT_TQMOUSEEVENT(e)->button() == TQt::RightButton)
ktview->m_headerMenu->popup(TQCursor::pos()); ktview->m_headerMenu->popup(TQCursor::pos());
break; break;

@ -34,7 +34,7 @@ DMainWindow::DMainWindow(TQWidget *parent, const char *name)
{ {
loadSettings(); loadSettings();
createToolWindows(); createToolWindows();
m_central = new Ideal::DockSplitter(Qt::Horizontal, this); m_central = new Ideal::DockSplitter(TQt::Horizontal, this);
m_activeTabWidget = createTab(); m_activeTabWidget = createTab();
m_central->addDock(0, 0, m_activeTabWidget); m_central->addDock(0, 0, m_activeTabWidget);
setCentralWidget(m_central); setCentralWidget(m_central);

@ -23,16 +23,16 @@
namespace Ideal { namespace Ideal {
DockSplitter::DockSplitter(Qt::Orientation orientation, TQWidget *parent, const char *name) DockSplitter::DockSplitter(TQt::Orientation orientation, TQWidget *parent, const char *name)
:TQSplitter(parent, name), m_orientation(orientation) :TQSplitter(parent, name), m_orientation(orientation)
{ {
switch (m_orientation) switch (m_orientation)
{ {
case Qt::Horizontal: case TQt::Horizontal:
setOrientation(Qt::Vertical); setOrientation(TQt::Vertical);
break; break;
case Qt::Vertical: case TQt::Vertical:
setOrientation(Qt::Horizontal); setOrientation(TQt::Horizontal);
break; break;
} }
setOpaqueResize(true); setOpaqueResize(true);
@ -73,11 +73,11 @@ void DockSplitter::appendSplitter()
{ {
switch (m_orientation) switch (m_orientation)
{ {
case Qt::Horizontal: case TQt::Horizontal:
m_splitters.append(new TQSplitter(Qt::Horizontal, this)); m_splitters.append(new TQSplitter(TQt::Horizontal, this));
break; break;
case Qt::Vertical: case TQt::Vertical:
m_splitters.append(new TQSplitter(Qt::Vertical, this)); m_splitters.append(new TQSplitter(TQt::Vertical, this));
break; break;
} }
m_splitters[m_splitters.size()-1]->setOpaqueResize(true); m_splitters[m_splitters.size()-1]->setOpaqueResize(true);

@ -34,7 +34,7 @@ class DockSplitter: public TQSplitter {
TQ_OBJECT TQ_OBJECT
public: public:
DockSplitter(Qt::Orientation orientation, TQWidget *parent = 0, const char *name = 0); DockSplitter(TQt::Orientation orientation, TQWidget *parent = 0, const char *name = 0);
~DockSplitter(); ~DockSplitter();
void addDock(uint row, uint col, TQWidget *dock); void addDock(uint row, uint col, TQWidget *dock);
@ -53,7 +53,7 @@ protected:
bool isRowEmpty(int row); bool isRowEmpty(int row);
private: private:
Qt::Orientation m_orientation; TQt::Orientation m_orientation;
TQValueList<TQSplitter*> m_splitters; TQValueList<TQSplitter*> m_splitters;
TQValueList<TQValueList<TQWidget*> > m_docks; TQValueList<TQValueList<TQWidget*> > m_docks;
}; };

@ -57,7 +57,7 @@ namespace kt
top_layout->remove(begin->w); top_layout->remove(begin->w);
// create new toplevel splitter // create new toplevel splitter
Qt::Orientation orientation = (pos == RIGHT || pos == LEFT) ? Qt::Horizontal : Qt::Vertical; TQt::Orientation orientation = (pos == RIGHT || pos == LEFT) ? TQt::Horizontal : TQt::Vertical;
TQSplitter* s = new TQSplitter(orientation,this);; TQSplitter* s = new TQSplitter(orientation,this);;
se->s = s; se->s = s;

@ -91,7 +91,7 @@ namespace kt
void LabelViewItem::mousePressEvent(TQMouseEvent *e) void LabelViewItem::mousePressEvent(TQMouseEvent *e)
{ {
if (e->button() == Qt::LeftButton) if (e->button() == TQt::LeftButton)
{ {
clicked(this); clicked(this);
} }

@ -190,7 +190,7 @@ void ChartDrawer::DrawChart(TQPainter & rPnt)
// ------------ // ------------
TQPen myop(rPnt.pen()); TQPen myop(rPnt.pen());
TQPen topl(myop); TQPen topl(myop);
topl.setStyle(Qt::DotLine); topl.setStyle(TQt::DotLine);
rPnt.setPen(topl); 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.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); rPnt.setPen(myop);

@ -25,13 +25,13 @@ namespace kt {
StatsCon::StatsCon(TQWidget * 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())) pmDHTCht(new ChartDrawer(DHTGbw, StatsPluginSettings::dHTMeasurements()))
{ {
PeersConGbw->setColumnLayout(0, Qt::Vertical ); PeersConGbw->setColumnLayout(0, TQt::Vertical );
PeersConGbw->layout()->setSpacing( 6 ); PeersConGbw->layout()->setSpacing( 6 );
PeersConGbw->layout()->setMargin( 11 ); PeersConGbw->layout()->setMargin( 11 );
pmPeersConLay = new TQVBoxLayout(PeersConGbw -> layout()); pmPeersConLay = new TQVBoxLayout(PeersConGbw -> layout());
DHTGbw->setColumnLayout(0, Qt::Vertical ); DHTGbw->setColumnLayout(0, TQt::Vertical );
DHTGbw->layout()->setSpacing( 6 ); DHTGbw->layout()->setSpacing( 6 );
DHTGbw->layout()->setMargin( 11 ); DHTGbw->layout()->setMargin( 11 );

@ -28,19 +28,19 @@ StatsSpd::StatsSpd(TQWidget *p) : StatsSpdWgt(p),
pmUpCht(new ChartDrawer(UpSpeedGbw, StatsPluginSettings::uploadMeasurements())) pmUpCht(new ChartDrawer(UpSpeedGbw, StatsPluginSettings::uploadMeasurements()))
{ {
DownSpeedGbw->setColumnLayout(0, Qt::Vertical ); DownSpeedGbw->setColumnLayout(0, TQt::Vertical );
DownSpeedGbw->layout()->setSpacing( 6 ); DownSpeedGbw->layout()->setSpacing( 6 );
DownSpeedGbw->layout()->setMargin( 11 ); DownSpeedGbw->layout()->setMargin( 11 );
pmDSpdLay = new TQVBoxLayout(DownSpeedGbw -> layout()); pmDSpdLay = new TQVBoxLayout(DownSpeedGbw -> layout());
UpSpeedGbw->setColumnLayout(0, Qt::Vertical ); UpSpeedGbw->setColumnLayout(0, TQt::Vertical );
UpSpeedGbw->layout()->setSpacing( 6 ); UpSpeedGbw->layout()->setSpacing( 6 );
UpSpeedGbw->layout()->setMargin( 11 ); UpSpeedGbw->layout()->setMargin( 11 );
pmUSpdLay = new TQVBoxLayout(UpSpeedGbw -> layout()); pmUSpdLay = new TQVBoxLayout(UpSpeedGbw -> layout());
PeersSpdGbw->setColumnLayout(0, Qt::Vertical ); PeersSpdGbw->setColumnLayout(0, TQt::Vertical );
PeersSpdGbw->layout()->setSpacing( 6 ); PeersSpdGbw->layout()->setSpacing( 6 );
PeersSpdGbw->layout()->setMargin( 11 ); PeersSpdGbw->layout()->setMargin( 11 );

@ -248,7 +248,7 @@ namespace kt
void HttpServer::setDefaultResponseHeaders(HttpResponseHeader & hdr,const TQString & content_type,bool with_session_info) void HttpServer::setDefaultResponseHeaders(HttpResponseHeader & hdr,const TQString & content_type,bool with_session_info)
{ {
hdr.setValue("Server","KTorrent/" KT_VERSION_MACRO); hdr.setValue("Server","KTorrent/" KT_VERSION_MACRO);
hdr.setValue("Date",DateTimeToString(TQDateTime::currentDateTime(Qt::UTC),false)); hdr.setValue("Date",DateTimeToString(TQDateTime::currentDateTime(TQt::UTC),false));
hdr.setValue("Content-Type",content_type); hdr.setValue("Content-Type",content_type);
hdr.setValue("Connection","keep-alive"); hdr.setValue("Connection","keep-alive");
if (with_session_info && session.sessionId && session.logged_in) if (with_session_info && session.sessionId && session.logged_in)
@ -351,7 +351,7 @@ namespace kt
setDefaultResponseHeaders(rhdr,"text/html",true); setDefaultResponseHeaders(rhdr,"text/html",true);
rhdr.setValue("Cache-Control","max-age=0"); rhdr.setValue("Cache-Control","max-age=0");
rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false)); rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false));
rhdr.setValue("Expires",DateTimeToString(TQDateTime::currentDateTime(Qt::UTC).addSecs(3600),false)); rhdr.setValue("Expires",DateTimeToString(TQDateTime::currentDateTime(TQt::UTC).addSecs(3600),false));
hdlr->sendResponse(rhdr); hdlr->sendResponse(rhdr);
return; return;
} }
@ -361,7 +361,7 @@ namespace kt
HttpResponseHeader rhdr(200); HttpResponseHeader rhdr(200);
setDefaultResponseHeaders(rhdr,ExtensionToContentType(ext),true); setDefaultResponseHeaders(rhdr,ExtensionToContentType(ext),true);
rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false)); rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false));
rhdr.setValue("Expires",DateTimeToString(TQDateTime::currentDateTime(Qt::UTC).addSecs(3600),false)); rhdr.setValue("Expires",DateTimeToString(TQDateTime::currentDateTime(TQt::UTC).addSecs(3600),false));
rhdr.setValue("Cache-Control","private"); rhdr.setValue("Cache-Control","private");
if (!hdlr->sendFile(rhdr,path)) if (!hdlr->sendFile(rhdr,path))
{ {
@ -505,7 +505,7 @@ namespace kt
d.setYMD(sl[3].toInt(),m,sl[1].toInt()); d.setYMD(sl[3].toInt(),m,sl[1].toInt());
TQTime t = TQTime::fromString(sl[4],Qt::ISODate); TQTime t = TQTime::fromString(sl[4],TQt::ISODate);
return TQDateTime(d,t); return TQDateTime(d,t);
} }
else if (sl.count() == 4) else if (sl.count() == 4)
@ -524,7 +524,7 @@ namespace kt
d.setYMD(2000 + dl[2].toInt(),m,dl[0].toInt()); d.setYMD(2000 + dl[2].toInt(),m,dl[0].toInt());
TQTime t = TQTime::fromString(sl[2],Qt::ISODate); TQTime t = TQTime::fromString(sl[2],TQt::ISODate);
return TQDateTime(d,t); return TQDateTime(d,t);
} }
else if (sl.count() == 5) else if (sl.count() == 5)
@ -539,7 +539,7 @@ namespace kt
d.setYMD(sl[4].toInt(),m,sl[2].toInt()); d.setYMD(sl[4].toInt(),m,sl[2].toInt());
TQTime t = TQTime::fromString(sl[3],Qt::ISODate); TQTime t = TQTime::fromString(sl[3],TQt::ISODate);
return TQDateTime(d,t); return TQDateTime(d,t);
} }
else else

Loading…
Cancel
Save