summaryrefslogtreecommitdiffstats
path: root/plugins/scheduler
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/scheduler
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/scheduler')
-rw-r--r--plugins/scheduler/bwscheduler.cpp34
-rw-r--r--plugins/scheduler/bwspage.ui154
-rw-r--r--plugins/scheduler/bwsprefpagewidget.cpp104
-rw-r--r--plugins/scheduler/bwsprefpagewidget.h9
-rw-r--r--plugins/scheduler/bwswidget.cpp110
-rw-r--r--plugins/scheduler/bwswidget.h35
-rw-r--r--plugins/scheduler/schedulerpage.ui24
-rw-r--r--plugins/scheduler/schedulerplugin.cpp40
-rw-r--r--plugins/scheduler/schedulerplugin.h11
-rw-r--r--plugins/scheduler/schedulerprefpage.cpp4
-rw-r--r--plugins/scheduler/schedulerprefpage.h2
-rw-r--r--plugins/scheduler/schedulerprefpagewidget.cpp16
-rw-r--r--plugins/scheduler/schedulerprefpagewidget.h5
13 files changed, 276 insertions, 272 deletions
diff --git a/plugins/scheduler/bwscheduler.cpp b/plugins/scheduler/bwscheduler.cpp
index 56375b5..a669360 100644
--- a/plugins/scheduler/bwscheduler.cpp
+++ b/plugins/scheduler/bwscheduler.cpp
@@ -31,9 +31,9 @@
#include <util/constants.h>
#include <util/log.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -160,9 +160,9 @@ namespace kt
if(!m_enabled)
return;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
- QString prefix = QString("BWS: %1 :: ").arg(now.toString());
+ TQString prefix = TQString("BWS: %1 :: ").tqarg(now.toString());
int t1 = now.date().dayOfWeek();
int t2 = now.time().hour();
@@ -172,8 +172,8 @@ namespace kt
{
case CAT_NORMAL:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to NORMAL category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_core->getMaxUploadSpeed()).arg(m_core->getMaxDownloadSpeed()) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_core->getMaxUploadSpeed()).tqarg(m_core->getMaxDownloadSpeed()) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -182,8 +182,8 @@ namespace kt
break;
case CAT_FIRST:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to FIRST category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(0)).arg(m_schedule.getDownload(0)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(0)).tqarg(m_schedule.getDownload(0)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -192,8 +192,8 @@ namespace kt
break;
case CAT_SECOND:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to SECOND category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(1)).arg(m_schedule.getDownload(1)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(1)).tqarg(m_schedule.getDownload(1)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -202,8 +202,8 @@ namespace kt
break;
case CAT_THIRD:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to THIRD category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(2)).arg(m_schedule.getDownload(2)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(2)).tqarg(m_schedule.getDownload(2)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -222,13 +222,13 @@ namespace kt
void BWScheduler::loadSchedule()
{
- QFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
+ TQFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
if(!file.exists())
return;
file.open(IO_ReadOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
int tmp;
@@ -256,10 +256,10 @@ namespace kt
void BWScheduler::saveSchedule()
{
- QFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
+ TQFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
file.open(IO_WriteOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
for(int i=0; i<3; ++i)
{
diff --git a/plugins/scheduler/bwspage.ui b/plugins/scheduler/bwspage.ui
index af0e771..c4fb9db 100644
--- a/plugins/scheduler/bwspage.ui
+++ b/plugins/scheduler/bwspage.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>BWSPage</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>BWSPage</cstring>
</property>
@@ -12,13 +12,13 @@
<height>530</height>
</rect>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>750</width>
<height>540</height>
@@ -34,15 +34,15 @@
<property name="resizeMode">
<enum>Fixed</enum>
</property>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout21</cstring>
+ <cstring>tqlayout21</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -53,7 +53,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>radio2</cstring>
</property>
@@ -61,7 +61,7 @@
<string>Categor&amp;y 1</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>pix1</cstring>
</property>
@@ -73,7 +73,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -83,7 +83,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>pix2</cstring>
</property>
@@ -95,7 +95,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -105,7 +105,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>pix3</cstring>
</property>
@@ -117,7 +117,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -127,7 +127,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>pix5</cstring>
</property>
@@ -139,7 +139,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -149,7 +149,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="4" column="1">
+ <widget class="TQRadioButton" row="4" column="1">
<property name="name">
<cstring>radio5</cstring>
</property>
@@ -157,7 +157,7 @@
<string>T&amp;urn off</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="1">
+ <widget class="TQRadioButton" row="0" column="1">
<property name="name">
<cstring>radio1</cstring>
</property>
@@ -165,7 +165,7 @@
<string>&amp;Normal</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>pix4</cstring>
</property>
@@ -177,7 +177,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -187,7 +187,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="1">
+ <widget class="TQRadioButton" row="3" column="1">
<property name="name">
<cstring>radio4</cstring>
</property>
@@ -198,7 +198,7 @@
<string>Alt+3</string>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="1">
+ <widget class="TQRadioButton" row="2" column="1">
<property name="name">
<cstring>radio3</cstring>
</property>
@@ -211,7 +211,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1_2</cstring>
</property>
@@ -222,7 +222,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>radio22</cstring>
</property>
@@ -233,7 +233,7 @@
<string>Alt+1</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>pix12</cstring>
</property>
@@ -245,7 +245,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -255,7 +255,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>pix22</cstring>
</property>
@@ -267,7 +267,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -277,7 +277,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>pix32</cstring>
</property>
@@ -289,7 +289,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -299,7 +299,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>pix52</cstring>
</property>
@@ -311,7 +311,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -321,7 +321,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="4" column="1">
+ <widget class="TQRadioButton" row="4" column="1">
<property name="name">
<cstring>radio52</cstring>
</property>
@@ -329,7 +329,7 @@
<string>T&amp;urn off</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="1">
+ <widget class="TQRadioButton" row="0" column="1">
<property name="name">
<cstring>radio12</cstring>
</property>
@@ -337,7 +337,7 @@
<string>&amp;Normal</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>pix42</cstring>
</property>
@@ -349,7 +349,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -359,7 +359,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="1">
+ <widget class="TQRadioButton" row="3" column="1">
<property name="name">
<cstring>radio42</cstring>
</property>
@@ -367,7 +367,7 @@
<string>&amp;Category 3</string>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="1">
+ <widget class="TQRadioButton" row="2" column="1">
<property name="name">
<cstring>radio32</cstring>
</property>
@@ -382,7 +382,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="1" column="1">
+ <widget class="TQGroupBox" row="1" column="1">
<property name="name">
<cstring>groupCategories_2</cstring>
</property>
@@ -393,7 +393,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel8_4</cstring>
</property>
@@ -401,7 +401,7 @@
<string>&lt;b&gt;1. Category&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel8_3_2</cstring>
</property>
@@ -409,15 +409,15 @@
<string>&lt;b&gt;3. Category&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_5</cstring>
</property>
@@ -433,7 +433,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_4_4</cstring>
</property>
@@ -449,7 +449,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel9_4</cstring>
</property>
@@ -459,15 +459,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_2_2</cstring>
</property>
@@ -483,7 +483,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_4_2_2</cstring>
</property>
@@ -499,7 +499,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel9_2_2</cstring>
</property>
@@ -509,15 +509,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="5" column="0">
+ <widget class="TQLayoutWidget" row="5" column="0">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_3_2</cstring>
</property>
@@ -533,7 +533,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_4_3_2</cstring>
</property>
@@ -549,7 +549,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel9_3_2</cstring>
</property>
@@ -559,7 +559,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel8_2_2</cstring>
</property>
@@ -581,36 +581,36 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>379</width>
<height>510</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>379</width>
<height>508</height>
</size>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1">
+ <widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
- <cstring>layout34</cstring>
+ <cstring>tqlayout34</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
- <cstring>lblStatus</cstring>
+ <cstring>lbltqStatus</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -625,7 +625,7 @@
<property name="text">
<string>* zero means no limit</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -641,24 +641,24 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="4" column="1">
+ <widget class="TQLayoutWidget" row="4" column="1">
<property name="name">
- <cstring>layout32</cstring>
+ <cstring>tqlayout32</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout31</cstring>
+ <cstring>tqlayout31</cstring>
</property>
<vbox>
<property name="name">
@@ -700,14 +700,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>36</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pix_icon</cstring>
</property>
@@ -728,16 +728,16 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>35</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout29</cstring>
+ <cstring>tqlayout29</cstring>
</property>
<vbox>
<property name="name">
@@ -850,15 +850,15 @@
<tabstop>dlCat3</tabstop>
<tabstop>ulCat3</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot>btnOk_clicked()</slot>
<slot>btnApply_clicked()</slot>
<slot>btnCancel_clicked()</slot>
<slot>btnSave_clicked()</slot>
<slot>btnLoad_clicked()</slot>
<slot>btnReset_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/plugins/scheduler/bwsprefpagewidget.cpp b/plugins/scheduler/bwsprefpagewidget.cpp
index 0c44a43..96e0613 100644
--- a/plugins/scheduler/bwsprefpagewidget.cpp
+++ b/plugins/scheduler/bwsprefpagewidget.cpp
@@ -33,25 +33,25 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qdatastream.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqdatastream.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
namespace kt
{
/* PREF PAGE WIDGET --------------------------------------------------------*/
- BWSPrefPageWidget::BWSPrefPageWidget(QWidget* parent, const char* name, WFlags fl)
- : BWSPage(parent,name,fl)
+ BWSPrefPageWidget::BWSPrefPageWidget(TQWidget* tqparent, const char* name, WFlags fl)
+ : BWSPage(tqparent,name,fl)
{
loadDefault();
- lblStatus->clear();
+ lbltqStatus->clear();
pix_icon->setPixmap(KGlobal::iconLoader()->loadIcon("clock",KIcon::NoGroup));
@@ -67,42 +67,42 @@ namespace kt
if(use_colors) //set up colors
{
- pix1->setPaletteBackgroundColor(QColor(30,165,105));
- pix2->setPaletteBackgroundColor(QColor(195,195,70));
- pix3->setPaletteBackgroundColor(QColor(195,195,70));
- pix4->setPaletteBackgroundColor(QColor(195,195,70));
- pix5->setPaletteBackgroundColor(QColor(190,30,30));
+ pix1->setPaletteBackgroundColor(TQColor(30,165,105));
+ pix2->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix3->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix4->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix5->setPaletteBackgroundColor(TQColor(190,30,30));
- pix12->setPaletteBackgroundColor(QColor(30,165,105));
- pix22->setPaletteBackgroundColor(QColor(195,195,70));
- pix32->setPaletteBackgroundColor(QColor(195,195,70));
- pix42->setPaletteBackgroundColor(QColor(195,195,70));
- pix52->setPaletteBackgroundColor(QColor(190,30,30));
+ pix12->setPaletteBackgroundColor(TQColor(30,165,105));
+ pix22->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix32->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix42->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix52->setPaletteBackgroundColor(TQColor(190,30,30));
} else //set up pixmaps
{
- pix1->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0000.png"))));
- pix2->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0001.png"))));
- pix3->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0002.png"))));
- pix4->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0003.png"))));
- pix5->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0004.png"))));
-
- pix12->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0000.png"))));
- pix22->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0001.png"))));
- pix32->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0002.png"))));
- pix42->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0003.png"))));
- pix52->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0004.png"))));
+ pix1->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0000.png"))));
+ pix2->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0001.png"))));
+ pix3->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0002.png"))));
+ pix4->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0003.png"))));
+ pix5->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0004.png"))));
+
+ pix12->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0000.png"))));
+ pix22->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0001.png"))));
+ pix32->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0002.png"))));
+ pix42->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0003.png"))));
+ pix52->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0004.png"))));
}
- connect(radio1, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio2, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio3, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio4, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio5, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio12, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio22, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio32, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio42, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio52, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
+ connect(radio1, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio2, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio3, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio4, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio5, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio12, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio22, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio32, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio42, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio52, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
//pre-check default categories (say 1 for left and 0 for right)
radio2->setChecked(true);
@@ -116,7 +116,7 @@ namespace kt
void BWSPrefPageWidget::btnSave_clicked()
{
- QString sf = KFileDialog::getSaveFileName("/home","*",this,i18n("Choose a filename to save under"));
+ TQString sf = KFileDialog::getSaveFileName("/home","*",this,i18n("Choose a filename to save under"));
if(sf.isEmpty())
return;
@@ -126,7 +126,7 @@ namespace kt
void BWSPrefPageWidget::btnLoad_clicked()
{
- QString lf = KFileDialog::getOpenFileName("/home", "*",this,i18n("Choose a file"));
+ TQString lf = KFileDialog::getOpenFileName("/home", "*",this,i18n("Choose a file"));
if(lf.isEmpty())
return;
@@ -135,14 +135,14 @@ namespace kt
loadSchedule(lf);
}
- void BWSPrefPageWidget::saveSchedule(QString& fn)
+ void BWSPrefPageWidget::saveSchedule(TQString& fn)
{
schedule = m_bwsWidget->schedule();
- QFile file(fn);
+ TQFile file(fn);
file.open(IO_WriteOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
//First category
stream << dlCat1->value();
@@ -162,12 +162,12 @@ namespace kt
stream << (int) schedule.getCategory(i, j);
file.close();
- lblStatus->setText(i18n("Schedule saved."));
+ lbltqStatus->setText(i18n("Schedule saved."));
}
- void BWSPrefPageWidget::loadSchedule(QString& fn, bool showmsg)
+ void BWSPrefPageWidget::loadSchedule(TQString& fn, bool showmsg)
{
- QFile file(fn);
+ TQFile file(fn);
if(!file.exists()) {
if(showmsg)
@@ -176,7 +176,7 @@ namespace kt
}
file.open(IO_ReadOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
int tmp;
@@ -205,13 +205,13 @@ namespace kt
file.close();
m_bwsWidget->setSchedule(schedule);
- lblStatus->setText(i18n("Schedule loaded."));
+ lbltqStatus->setText(i18n("Schedule loaded."));
}
void BWSPrefPageWidget::loadDefault()
{
//read schedule from HD
- QString fn = KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule";
+ TQString fn = KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule";
loadSchedule(fn, false);
}
@@ -228,7 +228,7 @@ namespace kt
ulCat2->setValue(0);
ulCat3->setValue(0);
- lblStatus->clear();
+ lbltqStatus->clear();
}
void BWSPrefPageWidget::apply()
diff --git a/plugins/scheduler/bwsprefpagewidget.h b/plugins/scheduler/bwsprefpagewidget.h
index ca0e80b..7529887 100644
--- a/plugins/scheduler/bwsprefpagewidget.h
+++ b/plugins/scheduler/bwsprefpagewidget.h
@@ -20,7 +20,7 @@
#ifndef KTBWSPREFPAGEWIDGET_H
#define KTBWSPREFPAGEWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "bwspage.h"
#include "bwscheduler.h"
@@ -34,8 +34,9 @@ namespace kt
class BWSPrefPageWidget : public BWSPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- BWSPrefPageWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ BWSPrefPageWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~BWSPrefPageWidget();
/*$PUBLIC_FUNCTIONS$*/
@@ -52,13 +53,13 @@ namespace kt
* @ref BWSPrefPageWidget::btnLoad_clicked()
* @ref BWSPrefPageWidget::loadDefault()
*/
- void loadSchedule(QString& fn, bool showmsg = true);
+ void loadSchedule(TQString& fn, bool showmsg = true);
/**
* Saves current schedule to HD.
* @param fn Schedule filename.
*/
- void saveSchedule(QString& fn);
+ void saveSchedule(TQString& fn);
public slots:
diff --git a/plugins/scheduler/bwswidget.cpp b/plugins/scheduler/bwswidget.cpp
index b430de3..4cfb3f4 100644
--- a/plugins/scheduler/bwswidget.cpp
+++ b/plugins/scheduler/bwswidget.cpp
@@ -21,26 +21,26 @@
#include "schedulerpluginsettings.h"
#include <klocale.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
-#include <qtable.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qfont.h>
-#include <qcolor.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
+#include <tqtable.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqfont.h>
+#include <tqcolor.h>
#include <kglobal.h>
#include <kstandarddirs.h>
namespace kt
{
- BWSWidget::BWSWidget(QWidget* parent, const char* name, bool useColors)
- : QTable(parent,name), m_leftCategory(1), m_rightCategory(0), draw_focus(true), right_click(false), use_colors(useColors)
+ BWSWidget::BWSWidget(TQWidget* tqparent, const char* name, bool useColors)
+ : TQTable(tqparent,name), m_leftCategory(1), m_rightCategory(0), draw_focus(true), right_click(false), use_colors(useColors)
{
use_colors = SchedulerPluginSettings::useColors();
- QStringList days;
- QStringList hours;
+ TQStringList days;
+ TQStringList hours;
days << i18n("MON") << i18n("TUE") << i18n("WED") << i18n("THU") << i18n("FRI") << i18n("SAT") << i18n("SUN");
hours <<
@@ -63,9 +63,9 @@ namespace kt
setColumnLabels(days);
setRowLabels(hours);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
- QFont f;
+ TQFont f;
f.setPointSize(8);
setFont(f);
@@ -96,13 +96,13 @@ namespace kt
resetSchedule();
- setSelectionMode(QTable::NoSelection);
+ setSelectionMode(TQTable::NoSelection);
- setHScrollBarMode(QTable::AlwaysOff);
- setVScrollBarMode(QTable::AlwaysOff);
+ setHScrollBarMode(TQTable::AlwaysOff);
+ setVScrollBarMode(TQTable::AlwaysOff);
- connect(this, SIGNAL(currentChanged( int, int )), this, SLOT(cellSelectionChanged( int, int )));
- connect(this, SIGNAL(pressed(int, int, int, const QPoint&)), this, SLOT(cellMouseDown(int, int, int, const QPoint& )));
+ connect(this, TQT_SIGNAL(currentChanged( int, int )), this, TQT_SLOT(cellSelectionChanged( int, int )));
+ connect(this, TQT_SIGNAL(pressed(int, int, int, const TQPoint&)), this, TQT_SLOT(cellMouseDown(int, int, int, const TQPoint& )));
}
BWSWidget::~BWSWidget()
@@ -115,7 +115,7 @@ namespace kt
}
}
- void BWSWidget::paintFocus(QPainter* p, const QRect& cr)
+ void BWSWidget::paintFocus(TQPainter* p, const TQRect& cr)
{
int x = rowAt(cr.y());
int y = columnAt(cr.x());
@@ -146,12 +146,12 @@ namespace kt
void BWSWidget::cellSelectionChanged(int row, int col)
{
if(right_click)
- setText(row, col, QString::number(m_rightCategory));
+ setText(row, col, TQString::number(m_rightCategory));
else
- setText(row, col, QString::number(m_leftCategory));
+ setText(row, col, TQString::number(m_leftCategory));
}
- void BWSWidget::paintCell(QPainter* p, int row, int col, const QRect& cr, bool selected)
+ void BWSWidget::paintCell(TQPainter* p, int row, int col, const TQRect& cr, bool selected)
{
if(selected)
return;
@@ -161,8 +161,8 @@ namespace kt
if((ok || cat == 0) && cat >= 0 && cat <= 4)
drawCell(p, cat);
else
- setText(row,col,QString::number(0));
- // QTable::paintCell(p,row,col,cr,selected);
+ setText(row,col,TQString::number(0));
+ // TQTable::paintCell(p,row,col,cr,selected);
}
void BWSWidget::resetSchedule()
@@ -175,14 +175,14 @@ namespace kt
updateHeaderStates();
}
- void BWSWidget::repaintWidget()
+ void BWSWidget::tqrepaintWidget()
{
for(int i=0; i<7; ++i)
for(int j=0; j<24; ++j)
updateCell(j,i);
}
- void BWSWidget::cellMouseDown(int row, int col, int button, const QPoint& mousePos)
+ void BWSWidget::cellMouseDown(int row, int col, int button, const TQPoint& mousePos)
{
right_click = button == 2;
draw_focus = true;
@@ -194,7 +194,7 @@ namespace kt
draw_focus = false;
clearSelection();
updateHeaderStates();
- repaintWidget();
+ tqrepaintWidget();
}
void BWSWidget::setLeftCategory(const int& theValue)
@@ -213,7 +213,7 @@ namespace kt
use_colors = theValue;
}
- void BWSWidget::drawCell(QPainter* p, int category, bool focus)
+ void BWSWidget::drawCell(TQPainter* p, int category, bool focus)
{
if(use_colors) {
if(focus) {
@@ -224,15 +224,15 @@ namespace kt
switch(category) {
case 0:
- // p->drawText(QRect(0,0,40,20), Qt::AlignCenter | Qt::SingleLine, "normalllll");
+ // p->drawText(TQRect(0,0,40,20), TQt::AlignCenter | TQt::SingleLine, "normalllll");
break;
case 1:
case 2:
case 3:
- p->drawText(QRect(0,0,40,20), Qt::AlignCenter | Qt::SingleLine, QString::number(category));
+ p->drawText(TQRect(0,0,40,20), TQt::AlignCenter | TQt::SingleLine, TQString::number(category));
break;
case 4:
- p->drawText(QRect(0,0,40,20), Qt::AlignCenter | Qt::SingleLine, "off");
+ p->drawText(TQRect(0,0,40,20), TQt::AlignCenter | TQt::SingleLine, "off");
break;
}
@@ -258,17 +258,17 @@ namespace kt
m_pixf[i] = 0;
}
- m_color[0] = new QColor(30,165,105);
- m_color[1] = new QColor(195,195,70);
- m_color[2] = new QColor(195,195,70);
- m_color[3] = new QColor(195,195,70);
- m_color[4] = new QColor(190,30,30);
+ m_color[0] = new TQColor(30,165,105);
+ m_color[1] = new TQColor(195,195,70);
+ m_color[2] = new TQColor(195,195,70);
+ m_color[3] = new TQColor(195,195,70);
+ m_color[4] = new TQColor(190,30,30);
- m_colorf[0] = new QColor(40,200,130);
- m_colorf[1] = new QColor(210,220,130);
- m_colorf[2] = new QColor(210,220,130);
- m_colorf[3] = new QColor(210,220,130);
- m_colorf[4] = new QColor(230,40,40);
+ m_colorf[0] = new TQColor(40,200,130);
+ m_colorf[1] = new TQColor(210,220,130);
+ m_colorf[2] = new TQColor(210,220,130);
+ m_colorf[3] = new TQColor(210,220,130);
+ m_colorf[4] = new TQColor(230,40,40);
} else {
for(int i=0; i<5; ++i) {
@@ -281,22 +281,22 @@ namespace kt
m_colorf[i] = 0;
}
- m_pix[0] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0000.png")));
- m_pix[1] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0001.png")));
- m_pix[2] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0002.png")));
- m_pix[3] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0003.png")));
- m_pix[4] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0004.png")));
-
- m_pixf[0] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0000.png")));
- m_pixf[1] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0001.png")));
- m_pixf[2] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0002.png")));
- m_pixf[3] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0003.png")));
- m_pixf[4] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0004.png")));
+ m_pix[0] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0000.png")));
+ m_pix[1] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0001.png")));
+ m_pix[2] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0002.png")));
+ m_pix[3] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0003.png")));
+ m_pix[4] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0004.png")));
+
+ m_pixf[0] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0000.png")));
+ m_pixf[1] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0001.png")));
+ m_pixf[2] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0002.png")));
+ m_pixf[3] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0003.png")));
+ m_pixf[4] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0004.png")));
}
use_colors = color;
- repaintWidget();
+ tqrepaintWidget();
}
void BWSWidget::setSchedule(const BWS& theValue)
@@ -304,7 +304,7 @@ namespace kt
m_schedule = theValue;
for(int i=0; i<7; ++i)
for(int j=0; j<24; ++j)
- setText(j,i, QString::number((int) m_schedule.getCategory(i,j)));
+ setText(j,i, TQString::number((int) m_schedule.getCategory(i,j)));
}
const BWS& BWSWidget::schedule()
@@ -326,7 +326,7 @@ namespace kt
return m_schedule;
}
- void BWSWidget::focusOutEvent(QFocusEvent* e)
+ void BWSWidget::focusOutEvent(TQFocusEvent* e)
{
if(e->lostFocus())
clearSelect();
diff --git a/plugins/scheduler/bwswidget.h b/plugins/scheduler/bwswidget.h
index c035edb..bd0a94d 100644
--- a/plugins/scheduler/bwswidget.h
+++ b/plugins/scheduler/bwswidget.h
@@ -20,10 +20,10 @@
#ifndef KTBWSWIDGET_H
#define KTBWSWIDGET_H
-#include <qtable.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qcolor.h>
+#include <tqtable.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqcolor.h>
#include "bwscheduler.h"
@@ -39,17 +39,18 @@ namespace kt
/**
* @brief Bandwidth scheduler widget.
* @author Ivan Vasić <[email protected]>
- * This class is a QTable with customized cells. It's used for bandwidth scheduling by painting each cell with mouse moves or keyboard.
+ * This class is a TQTable with customized cells. It's used for bandwidth scheduling by painting each cell with mouse moves or keyboard.
*/
- class BWSWidget : public QTable
+ class BWSWidget : public TQTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- BWSWidget(QWidget* parent = 0, const char* name = 0, bool useColors = true);
+ BWSWidget(TQWidget* tqparent = 0, const char* name = 0, bool useColors = true);
~BWSWidget();
///Repaints the whole widget
- void repaintWidget();
+ void tqrepaintWidget();
///Clears selection (removes focus)
void clearSelect();
@@ -77,19 +78,19 @@ namespace kt
private slots:
void cellSelectionChanged(int row, int col);
- void cellMouseDown(int row, int col, int button, const QPoint& mousePos);
+ void cellMouseDown(int row, int col, int button, const TQPoint& mousePos);
private:
- void paintFocus(QPainter* p, const QRect& cr);
- void paintCell(QPainter* p, int row, int col, const QRect& cr, bool selected);
- void drawCell(QPainter* p, int category, bool focus = false);
- void focusOutEvent(QFocusEvent*);
+ void paintFocus(TQPainter* p, const TQRect& cr);
+ void paintCell(TQPainter* p, int row, int col, const TQRect& cr, bool selected);
+ void drawCell(TQPainter* p, int category, bool focus = false);
+ void focusOutEvent(TQFocusEvent*);
- QPixmap* m_pix[5];
- QPixmap* m_pixf[5];
+ TQPixmap* m_pix[5];
+ TQPixmap* m_pixf[5];
- QColor* m_color[5];
- QColor* m_colorf[5];
+ TQColor* m_color[5];
+ TQColor* m_colorf[5];
int m_leftCategory;
int m_rightCategory;
diff --git a/plugins/scheduler/schedulerpage.ui b/plugins/scheduler/schedulerpage.ui
index 01a4f47..1a42edf 100644
--- a/plugins/scheduler/schedulerpage.ui
+++ b/plugins/scheduler/schedulerpage.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SchedulerPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SchedulerPage</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>useBS</cstring>
</property>
@@ -27,7 +27,7 @@
<string>Use &amp;bandwidth scheduler?</string>
</property>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBWS</cstring>
</property>
@@ -38,7 +38,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>useColors</cstring>
</property>
@@ -46,7 +46,7 @@
<string>Use colors instead of pi&amp;xmaps?</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -54,7 +54,7 @@
<string>(Recommended for slower systems)</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="0">
+ <widget class="TQPushButton" row="2" column="0">
<property name="name">
<cstring>btnEditBWS</cstring>
</property>
@@ -72,7 +72,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -89,7 +89,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>80</height>
@@ -108,7 +108,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -137,10 +137,10 @@
<slot>useColors_toggled(bool)</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>btnEditBWS_toggled(bool)</slot>
<slot>btnEditBWS_clicked()</slot>
<slot>useColors_toggled(bool)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/scheduler/schedulerplugin.cpp b/plugins/scheduler/schedulerplugin.cpp
index 7639293..9177ebb 100644
--- a/plugins/scheduler/schedulerplugin.cpp
+++ b/plugins/scheduler/schedulerplugin.cpp
@@ -24,9 +24,9 @@
#include <util/constants.h>
#include <util/log.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -50,17 +50,17 @@ K_EXPORT_COMPONENT_FACTORY(ktschedulerplugin,KGenericFactory<kt::SchedulerPlugin
namespace kt
{
- const QString NAME = "Bandwith Scheduler";
- const QString AUTHOR = "Ivan Vasic";
- const QString EMAIL = "[email protected]";
- const QString DESCRIPTION = i18n("Bandwidth scheduling plugin");
+ const TQString NAME = "Bandwith Scheduler";
+ const TQString AUTHOR = "Ivan Vasic";
+ const TQString EMAIL = "[email protected]";
+ const TQString DESCRIPTION = i18n("Bandwidth scheduling plugin");
- SchedulerPlugin::SchedulerPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("Bandwidth Scheduler"),AUTHOR,EMAIL,DESCRIPTION, "clock")
+ SchedulerPlugin::SchedulerPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("Bandwidth Scheduler"),AUTHOR,EMAIL,DESCRIPTION, "clock")
{
setXMLFile("ktschedulerpluginui.rc");
bws_action = 0;
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(timer_triggered()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timer_triggered()));
}
@@ -74,17 +74,17 @@ namespace kt
getGUI()->addPrefPage(Pref);
BWScheduler::instance().setCoreInterface(getCore());
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
//each hour
- QDateTime hour = now.addSecs(3600);
- QTime t(hour.time().hour(), 0);
+ TQDateTime hour = now.addSecs(3600);
+ TQTime t(hour.time().hour(), 0);
//each minute
-// QDateTime hour = now.addSecs(60);
-// QTime t(hour.time().hour(), hour.time().minute());
+// TQDateTime hour = now.addSecs(60);
+// TQTime t(hour.time().hour(), hour.time().minute());
- QDateTime round(hour.date(), t);
+ TQDateTime round(hour.date(), t);
// add a 5 second safety margin (BUG: 131246)
int secs_to = now.secsTo(round) + 5;
@@ -95,7 +95,7 @@ namespace kt
// updateEnabledBWS();
bws_action = new KAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this,
- SLOT(openBWS()), actionCollection(), "bwscheduler" );
+ TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" );
}
void SchedulerPlugin::unload()
@@ -115,7 +115,7 @@ namespace kt
void SchedulerPlugin::timer_triggered()
{
m_timer.changeInterval(3600*1000);
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
BWScheduler::instance().trigger();
}
@@ -135,7 +135,7 @@ namespace kt
if(SchedulerPluginSettings::enableBWS())
{
bws_action = new KAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this,
- SLOT(openBWS()), actionCollection(), "bwscheduler" );
+ TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" );
}
else
{
@@ -145,7 +145,7 @@ namespace kt
}
}
- bool SchedulerPlugin::versionCheck(const QString & version) const
+ bool SchedulerPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/scheduler/schedulerplugin.h b/plugins/scheduler/schedulerplugin.h
index 6828d0d..96dad21 100644
--- a/plugins/scheduler/schedulerplugin.h
+++ b/plugins/scheduler/schedulerplugin.h
@@ -24,11 +24,11 @@
#include "schedulerprefpage.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kstdaction.h>
-class QString;
+class TQString;
namespace kt
@@ -43,13 +43,14 @@ namespace kt
class SchedulerPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- SchedulerPlugin(QObject* parent, const char* name, const QStringList& args);
+ SchedulerPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~SchedulerPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
void updateEnabledBWS();
@@ -58,7 +59,7 @@ namespace kt
void openBWS();
private:
- QTimer m_timer;
+ TQTimer m_timer;
/* BANDWIDTH SCHEDULE PLUGIN */
SchedulerPrefPage* Pref;
diff --git a/plugins/scheduler/schedulerprefpage.cpp b/plugins/scheduler/schedulerprefpage.cpp
index fe82f34..076fb5c 100644
--- a/plugins/scheduler/schedulerprefpage.cpp
+++ b/plugins/scheduler/schedulerprefpage.cpp
@@ -48,9 +48,9 @@ namespace kt
return true;
}
- void SchedulerPrefPage::createWidget( QWidget * parent )
+ void SchedulerPrefPage::createWidget( TQWidget * tqparent )
{
- widget = new SchedulerPrefPageWidget(parent);
+ widget = new SchedulerPrefPageWidget(tqparent);
}
void SchedulerPrefPage::updateData()
diff --git a/plugins/scheduler/schedulerprefpage.h b/plugins/scheduler/schedulerprefpage.h
index a10a98a..a2efa21 100644
--- a/plugins/scheduler/schedulerprefpage.h
+++ b/plugins/scheduler/schedulerprefpage.h
@@ -40,7 +40,7 @@ namespace kt
virtual ~SchedulerPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void updateData();
virtual void deleteWidget();
diff --git a/plugins/scheduler/schedulerprefpagewidget.cpp b/plugins/scheduler/schedulerprefpagewidget.cpp
index d6e73dd..ad12e73 100644
--- a/plugins/scheduler/schedulerprefpagewidget.cpp
+++ b/plugins/scheduler/schedulerprefpagewidget.cpp
@@ -22,16 +22,16 @@
#include "bwscheduler.h"
#include "schedulerpluginsettings.h"
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
namespace kt
{
- SchedulerPrefPageWidget::SchedulerPrefPageWidget(QWidget* parent, const char* name, WFlags fl)
- : SchedulerPage(parent,name,fl)
+ SchedulerPrefPageWidget::SchedulerPrefPageWidget(TQWidget* tqparent, const char* name, WFlags fl)
+ : SchedulerPage(tqparent,name,fl)
{
groupBWS->setEnabled(false);
bool useit = SchedulerPluginSettings::enableBWS();
@@ -59,9 +59,9 @@ namespace kt
SchedulerPluginSettings::writeConfig();
/* force trigger since the schedule has changed but after KTorrent::apply()
- * Used QTimer with fixed interval - not very nice solution... */
+ * Used TQTimer with fixed interval - not very nice solution... */
if(useBS->isChecked())
- QTimer::singleShot(1000, this, SLOT(scheduler_trigger()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(scheduler_trigger()));
BWScheduler::instance().setEnabled(use_bws);
}
diff --git a/plugins/scheduler/schedulerprefpagewidget.h b/plugins/scheduler/schedulerprefpagewidget.h
index 9f62c20..5274f3d 100644
--- a/plugins/scheduler/schedulerprefpagewidget.h
+++ b/plugins/scheduler/schedulerprefpagewidget.h
@@ -20,7 +20,7 @@
#ifndef KTSCHEDULERPREFPAGEWIDGET_H
#define KTSCHEDULERPREFPAGEWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "schedulerpage.h"
namespace kt
@@ -32,8 +32,9 @@ namespace kt
class SchedulerPrefPageWidget : public SchedulerPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- SchedulerPrefPageWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ SchedulerPrefPageWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~SchedulerPrefPageWidget();