summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/indidriver.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /kstars/kstars/indidriver.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstars/kstars/indidriver.cpp')
-rw-r--r--kstars/kstars/indidriver.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kstars/kstars/indidriver.cpp b/kstars/kstars/indidriver.cpp
index 8c2e0db6..6ae5c5da 100644
--- a/kstars/kstars/indidriver.cpp
+++ b/kstars/kstars/indidriver.cpp
@@ -48,7 +48,7 @@
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-INDIDriver::INDIDriver(TQWidget *parent) : devManager( parent )
+INDIDriver::INDIDriver(TQWidget *tqparent) : devManager( tqparent )
{
@@ -56,7 +56,7 @@ INDIDriver::INDIDriver(TQWidget *parent) : devManager( parent )
lastGroup = NULL;
lastDevice = NULL;
- ksw = (KStars *) parent;
+ ksw = (KStars *) tqparent;
//FormLayout = makeVBoxMainWidget();
@@ -102,11 +102,11 @@ INDIDriver::INDIDriver(TQWidget *parent) : devManager( parent )
TQObject::connect(clientListView, TQT_SIGNAL(rightButtonPressed ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(ClientprocessRightButton( TQListViewItem *, const TQPoint &, int )));
-TQObject::connect(ClientpopMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(processHostStatus(int)));
+TQObject::connect(ClientpopMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(processHosttqStatus(int)));
TQObject::connect(localListView, TQT_SIGNAL(rightButtonPressed ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(LocalprocessRightButton( TQListViewItem *, const TQPoint &, int )));
-TQObject::connect(LocalpopMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(processDeviceStatus(int)));
+TQObject::connect(LocalpopMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(processDevicetqStatus(int)));
TQObject::connect(ksw->getINDIMenu(), TQT_SIGNAL(driverDisconnected(int)), this, TQT_SLOT(shutdownHost(int)));
@@ -146,7 +146,7 @@ for (uint i=0; i < ksw->data()->INDIHostsList.count(); i++)
{
if (devices[i]->mgrID == mgrID)
{
- affectedItem = localListView->findItem(devices[i]->label, 0);
+ affectedItem = localListView->tqfindItem(devices[i]->label, 0);
if (!affectedItem) return;
affectedItem->setPixmap(1, stopPix);
affectedItem->setPixmap(2, NULL);
@@ -183,22 +183,22 @@ void INDIDriver::LocalprocessRightButton( TQListViewItem *item, const TQPoint &p
void INDIDriver::activateRunService()
{
- processDeviceStatus(0);
+ processDevicetqStatus(0);
}
void INDIDriver::activateStopService()
{
- processDeviceStatus(1);
+ processDevicetqStatus(1);
}
void INDIDriver::activateHostConnection()
{
- processHostStatus(0);
+ processHosttqStatus(0);
}
void INDIDriver::activateHostDisconnection()
{
- processHostStatus(1);
+ processHosttqStatus(1);
}
void INDIDriver::updateLocalButtons()
@@ -244,7 +244,7 @@ for (uint i=0; i < ksw->data()->INDIHostsList.count(); i++)
}
-void INDIDriver::processDeviceStatus(int id)
+void INDIDriver::processDevicetqStatus(int id)
{
if (localListView->selectedItem() == NULL)
return;
@@ -280,7 +280,7 @@ void INDIDriver::processDeviceStatus(int id)
}
localListView->selectedItem()->setPixmap(1, runningPix);
- localListView->selectedItem()->setText(4, TQString("%1").arg(devices[i]->indiPort));
+ localListView->selectedItem()->setText(4, TQString("%1").tqarg(devices[i]->indiPort));
runServiceB->setEnabled(false);
stopServiceB->setEnabled(true);
@@ -301,7 +301,7 @@ void INDIDriver::processDeviceStatus(int id)
}
}
-void INDIDriver::processHostStatus(int id)
+void INDIDriver::processHosttqStatus(int id)
{
int mgrID;
bool toConnect = (id == 0);
@@ -405,7 +405,7 @@ bool INDIDriver::runDevice(IDevice *dev)
dev->proc = new KProcess;
*dev->proc << "indiserver";
- *dev->proc << "-v" << "-r" << "0" << "-p" << TQString("%1").arg(dev->indiPort) << dev->driver;
+ *dev->proc << "-v" << "-r" << "0" << "-p" << TQString("%1").tqarg(dev->indiPort) << dev->driver;
// Check Mode
dev->mode = localR->isChecked() ? IDevice::M_LOCAL : IDevice::M_SERVER;
@@ -471,7 +471,7 @@ void INDIDriver::saveDevicesToDisk()
{
if (devices[i]->deviceType == KSTARS_TELESCOPE)
{
- outstream << TQString("<device label='%1' focal_length='%2' aperture='%3'>").arg(devices[i]->label).arg(devices[i]->focal_length > 0 ? devices[i]->focal_length : -1).arg(devices[i]->aperture > 0 ? devices[i]->aperture : -1) << endl;
+ outstream << TQString("<device label='%1' focal_length='%2' aperture='%3'>").tqarg(devices[i]->label).tqarg(devices[i]->focal_length > 0 ? devices[i]->focal_length : -1).tqarg(devices[i]->aperture > 0 ? devices[i]->aperture : -1) << endl;
outstream << " <driver>" << devices[i]->driver << "</driver>" << endl;
outstream << " <version>" << devices[i]->version << "</version>" << endl;
@@ -486,7 +486,7 @@ void INDIDriver::saveDevicesToDisk()
{
if (devices[i]->deviceType == KSTARS_CCD)
{
- outstream << TQString("<device label='%1'>").arg(devices[i]->label) << endl;
+ outstream << TQString("<device label='%1'>").tqarg(devices[i]->label) << endl;
outstream << " <driver>" << devices[i]->driver << "</driver>" << endl;
outstream << " <version>" << devices[i]->version << "</version>" << endl;
outstream << "</device>" << endl;
@@ -500,7 +500,7 @@ void INDIDriver::saveDevicesToDisk()
{
if (devices[i]->deviceType == KSTARS_FILTER)
{
- outstream << TQString("<device label='%1'>").arg(devices[i]->label) << endl;
+ outstream << TQString("<device label='%1'>").tqarg(devices[i]->label) << endl;
outstream << " <driver>" << devices[i]->driver << "</driver>" << endl;
outstream << " <version>" << devices[i]->version << "</version>" << endl;
outstream << "</device>" << endl;
@@ -514,7 +514,7 @@ void INDIDriver::saveDevicesToDisk()
{
if (devices[i]->deviceType == KSTARS_VIDEO)
{
- outstream << TQString("<device label='%1'>").arg(devices[i]->label) << endl;
+ outstream << TQString("<device label='%1'>").tqarg(devices[i]->label) << endl;
outstream << " <driver>" << devices[i]->driver << "</driver>" << endl;
outstream << " <version>" << devices[i]->version << "</version>" << endl;
outstream << "</device>" << endl;
@@ -546,7 +546,7 @@ int INDIDriver::getINDIPort()
lastPort+=5;
- KExtendedSocket ks(TQString::null, lastPort, KExtendedSocket::passiveSocket | KExtendedSocket::noResolve);
+ KExtendedSocket ks(TQString(), lastPort, KExtendedSocket::passiveSocket | KExtendedSocket::noResolve);
for (uint i=0 ; i < 10; i++)
{
@@ -640,19 +640,19 @@ bool INDIDriver::buildDeviceGroup(XMLEle *root, char errmsg[])
groupName = valuXMLAtt(ap);
- if (groupName.find("Telescopes") != -1)
+ if (groupName.tqfind("Telescopes") != -1)
groupType = KSTARS_TELESCOPE;
- else if (groupName.find("CCDs") != -1)
+ else if (groupName.tqfind("CCDs") != -1)
groupType = KSTARS_CCD;
- else if (groupName.find("Filter") != -1)
+ else if (groupName.tqfind("Filter") != -1)
groupType = KSTARS_FILTER;
- else if (groupName.find("Video") != -1)
+ else if (groupName.tqfind("Video") != -1)
groupType = KSTARS_VIDEO;
- else if (groupName.find("Focusers") != -1)
+ else if (groupName.tqfind("Focusers") != -1)
groupType = KSTARS_FOCUSER;
- else if (groupName.find("Domes") != -1)
+ else if (groupName.tqfind("Domes") != -1)
groupType = KSTARS_DOME;
- else if (groupName.find("GPS") != -1)
+ else if (groupName.tqfind("GPS") != -1)
groupType = KSTARS_GPS;
@@ -781,7 +781,7 @@ void INDIDriver::addINDIHost()
if (hostItem->name == ksw->data()->INDIHostsList.at(i)->name &&
hostItem->portnumber == ksw->data()->INDIHostsList.at(i)->portnumber)
{
- KMessageBox::error(0, i18n("Host: %1 Port: %2 already exists.").arg(hostItem->name).arg(hostItem->portnumber));
+ KMessageBox::error(0, i18n("Host: %1 Port: %2 already exists.").tqarg(hostItem->name).tqarg(hostItem->portnumber));
return;
}
@@ -829,7 +829,7 @@ void INDIDriver::modifyINDIHost()
currentItem->setText(1, hostConf.nameIN->text());
currentItem->setText(2, hostConf.portnumber->text());
- ksw->data()->INDIHostsList.replace(clientListView->itemIndex(currentItem), hostItem);
+ ksw->data()->INDIHostsList.tqreplace(clientListView->itemIndex(currentItem), hostItem);
saveHosts();
}
@@ -853,7 +853,7 @@ void INDIDriver::removeINDIHost()
return;
}
- if (KMessageBox::warningContinueCancel( 0, i18n("Are you sure you want to remove the %1 client?").arg(clientListView->currentItem()->text(1)), i18n("Delete Confirmation"),KStdGuiItem::del())!=KMessageBox::Continue)
+ if (KMessageBox::warningContinueCancel( 0, i18n("Are you sure you want to remove the %1 client?").tqarg(clientListView->currentItem()->text(1)), i18n("Delete Confirmation"),KStdGuiItem::del())!=KMessageBox::Continue)
return;
ksw->data()->INDIHostsList.remove(i);