diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:39:55 +0000 |
commit | 0a6e0958c03e41c87b15557b6f407874f20c2f8d (patch) | |
tree | 2cdd58c4013b1be09cfcbb4ddae2b05712b9aeee /kstars | |
parent | 83f9dfafc157ff7823804b3ff457b43d021a5b4b (diff) | |
download | tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.tar.gz tdeedu-0a6e0958c03e41c87b15557b6f407874f20c2f8d.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstars')
222 files changed, 4649 insertions, 4649 deletions
diff --git a/kstars/kstars/addcatdialog.cpp b/kstars/kstars/addcatdialog.cpp index e0be99de..07af36ff 100644 --- a/kstars/kstars/addcatdialog.cpp +++ b/kstars/kstars/addcatdialog.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kcolorbutton.h> #include <kdebug.h> #include <kmessagebox.h> @@ -30,22 +30,22 @@ #include "addcatdialog.h" -AddCatDialog::AddCatDialog( QWidget *parent ) +AddCatDialog::AddCatDialog( TQWidget *parent ) : KDialogBase( KDialogBase::Plain, i18n( "Import Catalog" ), Help|Ok|Cancel, Ok, parent ) { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); setMainWidget(page); - QDir::setCurrent( QDir::homeDirPath() ); + TQDir::setCurrent( TQDir::homeDirPath() ); - vlay = new QVBoxLayout( page, 0, spacingHint() ); + vlay = new TQVBoxLayout( page, 0, spacingHint() ); acd = new AddCatDialogUI(page); vlay->addWidget( acd ); - connect( acd->DataURL->lineEdit(), SIGNAL( lostFocus() ), this, SLOT( slotShowDataFile() ) ); - connect( acd->DataURL, SIGNAL( urlSelected( const QString & ) ), - this, SLOT( slotShowDataFile() ) ); - connect( acd->PreviewButton, SIGNAL( clicked() ), this, SLOT( slotPreviewCatalog() ) ); - connect( this, SIGNAL( okClicked() ), this, SLOT( slotCreateCatalog() ) ); + connect( acd->DataURL->lineEdit(), TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotShowDataFile() ) ); + connect( acd->DataURL, TQT_SIGNAL( urlSelected( const TQString & ) ), + this, TQT_SLOT( slotShowDataFile() ) ); + connect( acd->PreviewButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotPreviewCatalog() ) ); + connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotCreateCatalog() ) ); acd->FieldList->insertItem( i18n( "ID Number" ) ); acd->FieldList->insertItem( i18n( "Right Ascension" ) ); @@ -65,7 +65,7 @@ AddCatDialog::~AddCatDialog(){ void AddCatDialog::slotOk() { //Overriding slotOk() so that custom data file can be validated before -//QDialog::accept() is emitted and the window is closed. +//TQDialog::accept() is emitted and the window is closed. //the validation code needs to be aware of AddCatDialog members, so I will just //emit the okClicked() signal, which is connected to AddCatDialog::validateFile() @@ -73,7 +73,7 @@ void AddCatDialog::slotOk() { } void AddCatDialog::slotHelp() { - QString message = + TQString message = i18n( "A valid custom catalog file has one line per object, " "with the following fields in each line:") + "\n\t" + i18n( "1. Type identifier. Must be one of: 0 (star), 3 (open cluster), 4 (globular cluster), " @@ -112,9 +112,9 @@ bool AddCatDialog::validateDataFile() { CatalogContents = writeCatalogHeader(); //Next, the data lines (fill from user-specified file) - QFile dataFile( acd->DataURL->url() ); + TQFile dataFile( acd->DataURL->url() ); if ( ! acd->DataURL->url().isEmpty() && dataFile.open( IO_ReadOnly ) ) { - QTextStream dataStream( &dataFile ); + TQTextStream dataStream( &dataFile ); CatalogContents += dataStream.read(); dataFile.close(); @@ -122,10 +122,10 @@ bool AddCatDialog::validateDataFile() { //Now create a temporary file for the Catalog, and attempt to parse it into a CustomCatalog KTempFile ktf; - QFile tmpFile( ktf.name() ); + TQFile tmpFile( ktf.name() ); ktf.unlink(); //just need filename if ( tmpFile.open( IO_WriteOnly ) ) { - QTextStream ostream( &tmpFile ); + TQTextStream ostream( &tmpFile ); ostream << CatalogContents; tmpFile.close(); CustomCatalog *newCat; @@ -141,18 +141,18 @@ bool AddCatDialog::validateDataFile() { return false; } -QString AddCatDialog::writeCatalogHeader() { - QString name = ( acd->CatalogName->text().isEmpty() ? i18n("Custom") : acd->CatalogName->text() ); - QString pre = ( acd->Prefix->text().isEmpty() ? "CC" : acd->Prefix->text() ); +TQString AddCatDialog::writeCatalogHeader() { + TQString name = ( acd->CatalogName->text().isEmpty() ? i18n("Custom") : acd->CatalogName->text() ); + TQString pre = ( acd->Prefix->text().isEmpty() ? "CC" : acd->Prefix->text() ); - QString h = QString("# Name: %1\n").arg( name ); - h += QString("# Prefix: %1\n").arg( pre ); - h += QString("# Color: %1\n").arg( acd->ColorButton->color().name() ); - h += QString("# Epoch: %1\n").arg( acd->Epoch->value() ); - h += QString("# "); + TQString h = TQString("# Name: %1\n").arg( name ); + h += TQString("# Prefix: %1\n").arg( pre ); + h += TQString("# Color: %1\n").arg( acd->ColorButton->color().name() ); + h += TQString("# Epoch: %1\n").arg( acd->Epoch->value() ); + h += TQString("# "); for ( uint i=0; i < acd->FieldList->count(); ++i ) { - QString f = acd->FieldList->text( i ); + TQString f = acd->FieldList->text( i ); if ( f == i18n( "ID Number" ) ) { h += "ID "; @@ -183,11 +183,11 @@ QString AddCatDialog::writeCatalogHeader() { } void AddCatDialog::slotShowDataFile() { - QFile dataFile( acd->DataURL->url() ); + TQFile dataFile( acd->DataURL->url() ); if ( ! acd->DataURL->url().isEmpty() && dataFile.open( IO_ReadOnly ) ) { acd->DataFileBox->clear(); - QTextStream dataStream( &dataFile ); - acd->DataFileBox->insertStringList( QStringList::split( "\n", dataStream.read(), TRUE ) ); + TQTextStream dataStream( &dataFile ); + acd->DataFileBox->insertStringList( TQStringList::split( "\n", dataStream.read(), TRUE ) ); dataFile.close(); } } @@ -195,7 +195,7 @@ void AddCatDialog::slotShowDataFile() { void AddCatDialog::slotPreviewCatalog() { if ( validateDataFile() ) { KMessageBox::informationList( 0, i18n( "Preview of %1" ).arg( acd->CatalogName->text() ), - QStringList::split( "\n", CatalogContents ), i18n( "Catalog Preview" ) ); + TQStringList::split( "\n", CatalogContents ), i18n( "Catalog Preview" ) ); } } @@ -205,7 +205,7 @@ void AddCatDialog::slotCreateCatalog() { //and objList contains the parsed objects //Warn user if file exists! - if ( QFile::exists( acd->CatalogURL->url() ) ) + if ( TQFile::exists( acd->CatalogURL->url() ) ) { KURL u( acd->CatalogURL->url() ); int r=KMessageBox::warningContinueCancel( 0, @@ -217,17 +217,17 @@ void AddCatDialog::slotCreateCatalog() { if(r==KMessageBox::Cancel) return; } - QFile OutFile( acd->CatalogURL->url() ); + TQFile OutFile( acd->CatalogURL->url() ); if ( ! OutFile.open( IO_WriteOnly ) ) { KMessageBox::sorry( 0, i18n( "Could not open the file %1 for writing." ).arg( acd->CatalogURL->url() ), i18n( "Error Opening Output File" ) ); } else { - QTextStream outStream( &OutFile ); + TQTextStream outStream( &OutFile ); outStream << CatalogContents; OutFile.close(); - emit QDialog::accept(); + emit TQDialog::accept(); close(); } } diff --git a/kstars/kstars/addcatdialog.h b/kstars/kstars/addcatdialog.h index 46b108ba..be839181 100644 --- a/kstars/kstars/addcatdialog.h +++ b/kstars/kstars/addcatdialog.h @@ -18,8 +18,8 @@ #ifndef ADDCATDIALOG_H #define ADDCATDIALOG_H -#include <qglobal.h> -#include <qptrlist.h> +#include <tqglobal.h> +#include <tqptrlist.h> #include <kdialogbase.h> #include <klineedit.h> @@ -39,7 +39,7 @@ class AddCatDialog : public KDialogBase { public: /**Default constructor */ - AddCatDialog( QWidget *parent=0 ); + AddCatDialog( TQWidget *parent=0 ); /**Destructor (empty) */ @@ -47,11 +47,11 @@ public: /**@return the name for the custom catalog. */ - QString name() const { return acd->CatalogName->text(); } + TQString name() const { return acd->CatalogName->text(); } /**@return the filename of the custom catalog. */ - QString filename() const { return acd->CatalogURL->url(); } + TQString filename() const { return acd->CatalogURL->url(); } private slots: /**Display contents of the import file. @@ -86,11 +86,11 @@ private: /**Write a header line describing the data fields in the catalog, and *defining the catalog name, ID prefix, and coordinate epoch. */ - QString writeCatalogHeader(); + TQString writeCatalogHeader(); - QVBoxLayout *vlay; + TQVBoxLayout *vlay; AddCatDialogUI *acd; - QString CatalogContents; + TQString CatalogContents; }; #endif diff --git a/kstars/kstars/addlinkdialog.cpp b/kstars/kstars/addlinkdialog.cpp index 9f9a0e97..a5f5978e 100644 --- a/kstars/kstars/addlinkdialog.cpp +++ b/kstars/kstars/addlinkdialog.cpp @@ -19,27 +19,27 @@ #include <kurl.h> #include <kmessagebox.h> #include <kpushbutton.h> -#include <qbuttongroup.h> -#include <qlayout.h> +#include <tqbuttongroup.h> +#include <tqlayout.h> #include "addlinkdialog.h" #include "skyobject.h" -AddLinkDialog::AddLinkDialog( QWidget *parent, const QString &oname ) +AddLinkDialog::AddLinkDialog( TQWidget *parent, const TQString &oname ) : KDialogBase( KDialogBase::Plain, i18n( "Add Custom URL to %1" ).arg( oname ), Ok|Cancel, Ok, parent ), ObjectName( oname ) { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); setMainWidget(page); - vlay = new QVBoxLayout( page, 0, spacingHint() ); + vlay = new TQVBoxLayout( page, 0, spacingHint() ); ald = new AddLinkDialogUI(page); vlay->addWidget( ald ); vlay->activate(); //connect signals to slots - connect( ald->URLButton, SIGNAL( clicked() ), this, SLOT( checkURL() ) ); - connect( ald->TypeBox, SIGNAL( clicked( int ) ), this, SLOT( changeDefaultDescription( int ) ) ); + connect( ald->URLButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( checkURL() ) ); + connect( ald->TypeBox, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( changeDefaultDescription( int ) ) ); ald->ImageRadio->setChecked(true); ald->DescBox->setText( i18n( "Show image of " ) + ObjectName ); @@ -50,8 +50,8 @@ void AddLinkDialog::checkURL( void ) { if ( _url.isValid() ) { //Is the string a valid URL? kapp->invokeBrowser( _url.url() ); //If so, launch the browser to see if it's the correct document } else { //If not, print a warning message box that offers to open the browser to a search engine. - QString message = i18n( "The URL is not valid. Would you like to open a browser window\nto the Google search engine?" ); - QString caption = i18n( "Invalid URL" ); + TQString message = i18n( "The URL is not valid. Would you like to open a browser window\nto the Google search engine?" ); + TQString caption = i18n( "Invalid URL" ); if ( KMessageBox::warningYesNo( 0, message, caption, i18n("Browse Google"), i18n("Do Not Browse") )==KMessageBox::Yes ) { kapp->invokeBrowser( "http://www.google.com" ); } diff --git a/kstars/kstars/addlinkdialog.h b/kstars/kstars/addlinkdialog.h index d6017d3d..3bf6e02e 100644 --- a/kstars/kstars/addlinkdialog.h +++ b/kstars/kstars/addlinkdialog.h @@ -21,7 +21,7 @@ #include <kdialogbase.h> #include <klineedit.h> #include <klocale.h> -#include <qradiobutton.h> +#include <tqradiobutton.h> #include "addlinkdialogui.h" @@ -38,26 +38,26 @@ class AddLinkDialog : public KDialogBase { Q_OBJECT public: /**Constructor. */ - AddLinkDialog( QWidget* parent = 0, const QString &oname=i18n("object") ); + AddLinkDialog( TQWidget* parent = 0, const TQString &oname=i18n("object") ); /**Destructor (empty) */ ~AddLinkDialog() {} -/**@return QString of the entered URL */ - QString url() const { return ald->URLBox->text(); } +/**@return TQString of the entered URL */ + TQString url() const { return ald->URLBox->text(); } /**@short Set the URL text *@param s the new URL text */ - void setURL( const QString &s ) { ald->URLBox->setText( s ); } + void setURL( const TQString &s ) { ald->URLBox->setText( s ); } -/**@return QString of the entered menu entry text */ - QString desc() const { return ald->DescBox->text(); } +/**@return TQString of the entered menu entry text */ + TQString desc() const { return ald->DescBox->text(); } /**@short Set the Description text *@param s the new description text */ - void setDesc( const QString &s ) { ald->DescBox->setText( s ); } + void setDesc( const TQString &s ) { ald->DescBox->setText( s ); } /**@return TRUE if user declared the link is an image */ bool isImageLink() const { return ald->ImageRadio->isChecked(); } @@ -80,8 +80,8 @@ private slots: void changeDefaultDescription( int id ); private: - QString ObjectName; - QVBoxLayout *vlay; + TQString ObjectName; + TQVBoxLayout *vlay; AddLinkDialogUI *ald; }; diff --git a/kstars/kstars/ccdpreviewwg.cpp b/kstars/kstars/ccdpreviewwg.cpp index 41eed90e..18ee3892 100644 --- a/kstars/kstars/ccdpreviewwg.cpp +++ b/kstars/kstars/ccdpreviewwg.cpp @@ -28,13 +28,13 @@ #include <kurl.h> #include <klineedit.h> -#include <qsocketnotifier.h> -#include <qimage.h> -#include <qpainter.h> -#include <qstringlist.h> -#include <qdir.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqsocketnotifier.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqstringlist.h> +#include <tqdir.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <stdlib.h> @@ -49,7 +49,7 @@ FILE *CCDwfp; - CCDPreviewWG::CCDPreviewWG(INDIStdDevice *inStdDev, QWidget * parent, const char * name) : CCDPreviewForm(parent, name) + CCDPreviewWG::CCDPreviewWG(INDIStdDevice *inStdDev, TQWidget * parent, const char * name) : CCDPreviewForm(parent, name) { stdDev = inStdDev; @@ -74,14 +74,14 @@ FILE *CCDwfp; playB->setPixmap(pausePix); captureB->setPixmap(capturePix); - imgFormatCombo->insertStrList(QImage::outputFormats()); + imgFormatCombo->insertStrList(TQImage::outputFormats()); - connect(playB, SIGNAL(clicked()), this, SLOT(playPressed())); - connect(captureB, SIGNAL(clicked()), this, SLOT(captureImage())); - connect(brightnessBar, SIGNAL(valueChanged(int)), this, SLOT(brightnessChanged(int))); - connect(contrastBar, SIGNAL(valueChanged(int)), this, SLOT(contrastChanged(int))); - connect(gammaBar, SIGNAL(valueChanged(int)), this, SLOT(gammaChanged(int))); - connect(focalEdit, SIGNAL(returnPressed()), this, SLOT(updateFWHM())); + connect(playB, TQT_SIGNAL(clicked()), this, TQT_SLOT(playPressed())); + connect(captureB, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureImage())); + connect(brightnessBar, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(brightnessChanged(int))); + connect(contrastBar, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(contrastChanged(int))); + connect(gammaBar, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(gammaChanged(int))); + connect(focalEdit, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(updateFWHM())); } CCDPreviewWG::~CCDPreviewWG() @@ -89,7 +89,7 @@ CCDPreviewWG::~CCDPreviewWG() } -void CCDPreviewWG::closeEvent ( QCloseEvent * e ) +void CCDPreviewWG::closeEvent ( TQCloseEvent * e ) { stdDev->streamDisabled(); processStream = false; @@ -101,12 +101,12 @@ void CCDPreviewWG::setColorFrame(bool color) colorFrame = color; } -/*void CCDPreviewWG::establishDataChannel(QString host, int port) +/*void CCDPreviewWG::establishDataChannel(TQString host, int port) { - QString errMsg; + TQString errMsg; struct sockaddr_in pin; struct hostent *serverHostName = gethostbyname(host.ascii()); - errMsg = QString("Connection to INDI host at %1 on port %2 failed.").arg(host).arg(port); + errMsg = TQString("Connection to INDI host at %1 on port %2 failed.").arg(host).arg(port); memset(&pin, 0, sizeof(pin)); pin.sin_family = AF_INET; @@ -127,8 +127,8 @@ void CCDPreviewWG::setColorFrame(bool color) } // callback notified - sNotifier = new QSocketNotifier( streamFD, QSocketNotifier::Read, this); - QObject::connect( sNotifier, SIGNAL(activated(int)), this, SLOT(streamReceived())); + sNotifier = new TQSocketNotifier( streamFD, TQSocketNotifier::Read, this); + TQObject::connect( sNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(streamReceived())); }*/ void CCDPreviewWG::enableStream(bool enable) @@ -197,12 +197,12 @@ void CCDPreviewWG::updateFWHM() fwhm_arcsec = (206.26 / focal_length) * fwhm * mu; - FWHMLabel->setText(QString("%1").arg(fwhm_arcsec, 0, 'g', 3)); + FWHMLabel->setText(TQString("%1").arg(fwhm_arcsec, 0, 'g', 3)); } -void CCDPreviewWG::resizeEvent(QResizeEvent *ev) +void CCDPreviewWG::resizeEvent(TQResizeEvent *ev) { streamFrame->resize(ev->size().width() - layout()->margin() * 2, ev->size().height() - playB->height() - layout()->margin() * 2 - layout()->spacing()); } @@ -225,10 +225,10 @@ void CCDPreviewWG::playPressed() void CCDPreviewWG::captureImage() { - QString fname; - QString fmt; + TQString fname; + TQString fmt; KURL currentFileURL; - QString currentDir = Options::fitsSaveDirectory(); + TQString currentDir = Options::fitsSaveDirectory(); KTempFile tmpfile; tmpfile.setAutoDelete(true); @@ -261,23 +261,23 @@ void CCDPreviewWG::captureImage() if ( tmpfile.name() == fname ) { //need to upload to remote location - if ( ! KIO::NetAccess::upload( tmpfile.name(), currentFileURL, (QWidget*) 0 ) ) + if ( ! KIO::NetAccess::upload( tmpfile.name(), currentFileURL, (TQWidget*) 0 ) ) { - QString message = i18n( "Could not upload image to remote location: %1" ).arg( currentFileURL.prettyURL() ); + TQString message = i18n( "Could not upload image to remote location: %1" ).arg( currentFileURL.prettyURL() ); KMessageBox::sorry( 0, message, i18n( "Could not upload file" ) ); } } } else { - QString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); + TQString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); KMessageBox::sorry( 0, message, i18n( "Invalid URL" ) ); } } -CCDVideoWG::CCDVideoWG(QWidget * parent, const char * name) : QFrame(parent, name, Qt::WNoAutoErase) +CCDVideoWG::CCDVideoWG(TQWidget * parent, const char * name) : TQFrame(parent, name, Qt::WNoAutoErase) { streamImage = NULL; streamBuffer = NULL; @@ -333,9 +333,9 @@ void CCDVideoWG::newFrame(unsigned char *buffer, int buffSize, int w, int h) } streamBufferPos=i; /*if (buffSize > totalBaseCount) - streamImage = new QImage(buffer, w, h, 32, 0, 0, QImage::BigEndian); + streamImage = new TQImage(buffer, w, h, 32, 0, 0, TQImage::BigEndian); else - streamImage = new QImage(streamBuffer, w, h, 8, grayTable, 256, QImage::IgnoreEndian); + streamImage = new TQImage(streamBuffer, w, h, 8, grayTable, 256, TQImage::IgnoreEndian); update(); */ redrawVideoWG(); @@ -383,12 +383,12 @@ void CCDVideoWG::redrawVideoWG(void) } } } - streamImage = new QImage(displayBuffer, Width, Height, 8, grayTable, 256, QImage::IgnoreEndian); + streamImage = new TQImage(displayBuffer, Width, Height, 8, grayTable, 256, TQImage::IgnoreEndian); update(); } -void CCDVideoWG::paintEvent(QPaintEvent */*ev*/) +void CCDVideoWG::paintEvent(TQPaintEvent */*ev*/) { if (streamImage) diff --git a/kstars/kstars/ccdpreviewwg.h b/kstars/kstars/ccdpreviewwg.h index f054a8a5..831c7d10 100644 --- a/kstars/kstars/ccdpreviewwg.h +++ b/kstars/kstars/ccdpreviewwg.h @@ -13,11 +13,11 @@ #ifndef CCDPREVIEWWG_H #define CCDPREVIEWWG_H - #include <qpixmap.h> + #include <tqpixmap.h> #include <kpixmapio.h> #include "ccdpreviewui.h" - #include "qframe.h" + #include "tqframe.h" enum Pixelorder {PIXELORDER_NORMAL=1, PIXELORDER_DUAL=2}; @@ -33,7 +33,7 @@ enum Pixelorder {PIXELORDER_NORMAL=1, PIXELORDER_DUAL=2}; Q_OBJECT public: - CCDPreviewWG(INDIStdDevice *inStdDev, QWidget * parent =0, const char * name =0); + CCDPreviewWG(INDIStdDevice *inStdDev, TQWidget * parent =0, const char * name =0); ~CCDPreviewWG(); friend class CCDVideoWG; @@ -51,14 +51,14 @@ enum Pixelorder {PIXELORDER_NORMAL=1, PIXELORDER_DUAL=2}; private: INDIStdDevice *stdDev; - QPixmap playPix, pausePix, capturePix; - QVBoxLayout *videoFrameLayout; + TQPixmap playPix, pausePix, capturePix; + TQVBoxLayout *videoFrameLayout; double fwhm; int mu; protected: - void closeEvent ( QCloseEvent * e ); - void resizeEvent(QResizeEvent *ev); + void closeEvent ( TQCloseEvent * e ); + void resizeEvent(TQResizeEvent *ev); public slots: @@ -75,7 +75,7 @@ enum Pixelorder {PIXELORDER_NORMAL=1, PIXELORDER_DUAL=2}; Q_OBJECT public: - CCDVideoWG(QWidget * parent =0, const char * name =0); + CCDVideoWG(TQWidget * parent =0, const char * name =0); ~CCDVideoWG(); friend class CCDPreviewWG; @@ -97,7 +97,7 @@ enum Pixelorder {PIXELORDER_NORMAL=1, PIXELORDER_DUAL=2}; int Width, Height; unsigned long maxGoodData; protected: - void paintEvent(QPaintEvent *ev); + void paintEvent(TQPaintEvent *ev); public slots: }; diff --git a/kstars/kstars/colorscheme.cpp b/kstars/kstars/colorscheme.cpp index 575206fa..5449c48e 100644 --- a/kstars/kstars/colorscheme.cpp +++ b/kstars/kstars/colorscheme.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qfile.h> +#include <tqfile.h> #include <kconfig.h> #include <kdebug.h> #include <klocale.h> @@ -25,11 +25,11 @@ #include "ksutils.h" #include "colorscheme.h" -typedef QStringList::const_iterator SL_it; +typedef TQStringList::const_iterator SL_it; ColorScheme::ColorScheme() : FileName() { //Each color has two names associated with it. The KeyName is its - //identification in the QMap, the *.colors file, and the config file. + //identification in the TQMap, the *.colors file, and the config file. //The Name is what appears in the ViewOpsDialog ListBox. //In addition, we define default RGB strings for each item. //To add another color to the Palette, just add an entry for KeyName, @@ -141,8 +141,8 @@ void ColorScheme::copy( const ColorScheme &cs ) { FileName = cs.FileName; } -QString ColorScheme::colorNamed( const QString &name ) const { - //QString color( Palette[ name ] ); +TQString ColorScheme::colorNamed( const TQString &name ) const { + //TQString color( Palette[ name ] ); if ( ! hasColorNamed( name ) ) { kdWarning() << i18n( "No color named \"%1\" found in color scheme." ).arg( name ) << endl; //color = "#FFFFFF"; //set to white if no color found @@ -152,39 +152,39 @@ QString ColorScheme::colorNamed( const QString &name ) const { return Palette[ name ]; } -QString ColorScheme::colorAt( int i ) const { +TQString ColorScheme::colorAt( int i ) const { SL_it it = KeyName.at(i); - return Palette[ QString(*it) ]; + return Palette[ TQString(*it) ]; } -QString ColorScheme::nameAt( int i ) const { +TQString ColorScheme::nameAt( int i ) const { SL_it it = Name.at(i); - return QString(*it); + return TQString(*it); } -QString ColorScheme::keyAt( int i ) const { +TQString ColorScheme::keyAt( int i ) const { SL_it it = KeyName.at(i); - return QString(*it); + return TQString(*it); } -QString ColorScheme::nameFromKey( const QString &key ) const { +TQString ColorScheme::nameFromKey( const TQString &key ) const { return nameAt( KeyName.findIndex( key ) ); } -void ColorScheme::setColor( const QString &key, const QString &color ) { +void ColorScheme::setColor( const TQString &key, const TQString &color ) { //We can blindly insert() the new value; if the key exists, the old value is replaced Palette.insert( key, color ); } -bool ColorScheme::load( const QString &filename ) { - QFile file; +bool ColorScheme::load( const TQString &filename ) { + TQFile file; int inew(0),iold(0); if ( !KSUtils::openDataFile( file, filename ) ) return false; - QTextStream stream( &file ); - QString line; + TQTextStream stream( &file ); + TQString line; //first line is the star-color mode and star color intensity line = stream.readLine(); @@ -206,13 +206,13 @@ bool ColorScheme::load( const QString &filename ) { if ( iold ) return false; //we read at least one line without a colon...file is corrupted. //If this line has a valid Key, set the color. - QString tkey = line.mid( line.find(':')+1 ).stripWhiteSpace(); - QString tname = line.left( line.find(':')-1 ); + TQString tkey = line.mid( line.find(':')+1 ).stripWhiteSpace(); + TQString tname = line.left( line.find(':')-1 ); if ( KeyName.contains( tkey ) ) { setColor( tkey, tname ); } else { //attempt to translate from old color ID - QString k( line.mid( 5 ).stripWhiteSpace() + "Color" ); + TQString k( line.mid( 5 ).stripWhiteSpace() + "Color" ); if ( KeyName.contains( k ) ) { setColor( k, tname ); } else { @@ -229,10 +229,10 @@ bool ColorScheme::load( const QString &filename ) { //Assuming the old *.colors format. Loop through the KeyName list, //and assign each color. Note that order matters here, but only here //(so if you don't use the old format, then order doesn't ever matter) - QStringList::Iterator it = KeyName.begin(); - QStringList::Iterator it_end = KeyName.end(); + TQStringList::Iterator it = KeyName.begin(); + TQStringList::Iterator it_end = KeyName.end(); for ( ; it != it_end; ++it ) - setColor( QString(*it), line.left( 7 ) ); + setColor( TQString(*it), line.left( 7 ) ); } } @@ -240,12 +240,12 @@ bool ColorScheme::load( const QString &filename ) { return true; } -bool ColorScheme::save( const QString &name ) { - QFile file; +bool ColorScheme::save( const TQString &name ) { + TQFile file; //Construct a file name from the scheme name. Make lowercase, replace spaces with "-", //and append ".colors". - QString filename = name.lower().stripWhiteSpace(); + TQString filename = name.lower().stripWhiteSpace(); if ( !filename.isEmpty() ) { for( unsigned int i=0; i<filename.length(); ++i) if ( filename.at(i)==' ' ) filename.replace( i, 1, "-" ); @@ -254,15 +254,15 @@ bool ColorScheme::save( const QString &name ) { file.setName( locateLocal( "appdata", filename ) ); //determine filename in local user KDE directory tree. if ( file.exists() || !file.open( IO_ReadWrite | IO_Append ) ) { - QString message = i18n( "Local color scheme file could not be opened.\nScheme cannot be recorded." ); + TQString message = i18n( "Local color scheme file could not be opened.\nScheme cannot be recorded." ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return false; } else { - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << StarColorMode << ":" << StarColorIntensity << endl; - QStringList::Iterator it = KeyName.begin(); - QStringList::Iterator it_end = KeyName.end(); + TQStringList::Iterator it = KeyName.begin(); + TQStringList::Iterator it_end = KeyName.end(); for ( ; it != it_end; ++it ) stream << Palette[ (*it) ] << " :" << (*it) << endl; @@ -272,16 +272,16 @@ bool ColorScheme::save( const QString &name ) { file.setName( locateLocal( "appdata", "colors.dat" ) ); //determine filename in local user KDE directory tree. if ( !file.open( IO_ReadWrite | IO_Append ) ) { - QString message = i18n( "Local color scheme index file could not be opened.\nScheme cannot be recorded." ); + TQString message = i18n( "Local color scheme index file could not be opened.\nScheme cannot be recorded." ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return false; } else { - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << name << ":" << filename << endl; file.close(); } } else { - QString message = i18n( "Invalid filename requested.\nScheme cannot be recorded." ); + TQString message = i18n( "Invalid filename requested.\nScheme cannot be recorded." ); KMessageBox::sorry( 0, message, i18n( "Invalid Filename" ) ); return false; } @@ -291,20 +291,20 @@ bool ColorScheme::save( const QString &name ) { } void ColorScheme::loadFromConfig( KConfig *conf ) { - QStringList::Iterator it = KeyName.begin(); - QStringList::Iterator it_end = KeyName.end(); + TQStringList::Iterator it = KeyName.begin(); + TQStringList::Iterator it_end = KeyName.end(); for ( ; it != it_end; ++it ) - setColor( QString(*it), conf->readEntry( QString(*it), QString( *Default.at( KeyName.findIndex(*it) ) ) ) ); + setColor( TQString(*it), conf->readEntry( TQString(*it), TQString( *Default.at( KeyName.findIndex(*it) ) ) ) ); setStarColorMode( conf->readNumEntry( "StarColorMode", 0 ) ); setStarColorIntensity( conf->readNumEntry( "StarColorIntensity", 5 ) ); } void ColorScheme::saveToConfig( KConfig *conf ) { - QStringList::Iterator it = KeyName.begin(); - QStringList::Iterator it_end = KeyName.end(); + TQStringList::Iterator it = KeyName.begin(); + TQStringList::Iterator it_end = KeyName.end(); for ( ; it != it_end; ++it ) - conf->writeEntry( QString(*it), colorNamed( QString(*it) ) ); + conf->writeEntry( TQString(*it), colorNamed( TQString(*it) ) ); conf->writeEntry( "StarColorMode", starColorMode() ); conf->writeEntry( "StarColorIntensity", starColorIntensity() ); diff --git a/kstars/kstars/colorscheme.h b/kstars/kstars/colorscheme.h index b7c17b2b..e61c455b 100644 --- a/kstars/kstars/colorscheme.h +++ b/kstars/kstars/colorscheme.h @@ -18,19 +18,19 @@ #ifndef COLORSCHEME_H #define COLORSCHEME_H -#include <qmap.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqstringlist.h> class KConfig; /** *@class ColorScheme *This class stores all of the adjustable colors in KStars, in - *a QMap object keyed by the names of the colors. It also stores + *a TQMap object keyed by the names of the colors. It also stores *information on how stars are to be rendered in the map *(with realistic colors, or as solid red/whit/black circles). *In addition to the brief "Key names" used to index the colors in - *the QMap, each color has a "long name" description that is a bit + *the TQMap, each color has a "long name" description that is a bit *more verbose, and suitable for UI display. *@author Jason Harris *@version 1.0 @@ -41,7 +41,7 @@ class ColorScheme { public: /**Constructor. Enter all adjustable colors and their default - *values into the QMap. Also assign the corresponding long names. + *values into the TQMap. Also assign the corresponding long names. */ ColorScheme(); @@ -55,57 +55,57 @@ class ColorScheme { /**@return true if the Palette contains the given key name */ - bool hasColorNamed( const QString &name ) const { return ( ! Palette[ name ].isEmpty() ); } + bool hasColorNamed( const TQString &name ) const { return ( ! Palette[ name ].isEmpty() ); } /** *@short Retrieve a color by name. *@p name the key name of the color to be retrieved. *@return the requested color, or "#FFFFFF" (white) if color name not found. */ - QString colorNamed( const QString &name ) const; + TQString colorNamed( const TQString &name ) const; /**@p i the index of the color to retrieve *@return a color by its index in the QMap */ - QString colorAt( int i ) const; + TQString colorAt( int i ) const; /**@p i the index of the long name to retrieve *@return the name of the color at index i */ - QString nameAt( int i ) const; + TQString nameAt( int i ) const; /**@p i the index of the key name to retrieve *@return the key name of the color at index i */ - QString keyAt( int i ) const; + TQString keyAt( int i ) const; /** *@return the long name of the color whose key name is given *@p key the key name identifying the color. */ - QString nameFromKey( const QString &key ) const; + TQString nameFromKey( const TQString &key ) const; /**Change the color with the given key to the given value *@p key the key-name of the color to be changed *@p color the new color value */ - void setColor( const QString &key, const QString &color ); + void setColor( const TQString &key, const TQString &color ); /**Load a color scheme from a *.colors file *@p filename the filename of the color scheme to be loaded. *@return TRUE if the scheme was successfully loaded */ - bool load( const QString &filename ); + bool load( const TQString &filename ); /**Save the current color scheme to a *.colors file. *@p name the filename to create *@return TRUE if the color scheme is successfully writeen to a file */ - bool save( const QString &name ); + bool save( const TQString &name ); /**@return the Filename associated with the color scheme. */ - QString fileName() const { return FileName; } + TQString fileName() const { return FileName; } /**Copy a color scheme *@p cs the color scheme to be copied into this object @@ -137,9 +137,9 @@ class ColorScheme { private: int StarColorMode, StarColorIntensity; - QString FileName; - QStringList KeyName, Name, Default; - QMap<QString,QString> Palette; + TQString FileName; + TQStringList KeyName, Name, Default; + TQMap<TQString,TQString> Palette; }; diff --git a/kstars/kstars/conbridlg.cpp b/kstars/kstars/conbridlg.cpp index 57bb84c7..ec9aa240 100644 --- a/kstars/kstars/conbridlg.cpp +++ b/kstars/kstars/conbridlg.cpp @@ -20,9 +20,9 @@ #include <kimageeffect.h> #include <kdebug.h> - #include <qslider.h> - #include <qimage.h> - #include <qdatetime.h> + #include <tqslider.h> + #include <tqimage.h> + #include <tqdatetime.h> #include <knuminput.h> #include <stdlib.h> @@ -36,7 +36,7 @@ //TODO find a better and faster way to implement this, this operation can be memory and CPU intensive. -ContrastBrightnessDlg::ContrastBrightnessDlg(QWidget *parent) : +ContrastBrightnessDlg::ContrastBrightnessDlg(TQWidget *parent) : KDialogBase(KDialogBase::Plain, i18n( "Brightness/Contrast" ), Ok|Cancel, Ok, parent ) { @@ -44,7 +44,7 @@ ContrastBrightnessDlg::ContrastBrightnessDlg(QWidget *parent) : contrast = brightness = 0; viewer = (FITSViewer *) parent; displayImage = viewer->image->displayImage; - tempImage = new QImage(displayImage->copy()); + tempImage = new TQImage(displayImage->copy()); width = displayImage->width(); height = displayImage->height(); @@ -68,8 +68,8 @@ ContrastBrightnessDlg::ContrastBrightnessDlg(QWidget *parent) : setMainWidget(ConBriDlg); show(); - connect(ConBriDlg->conSlider, SIGNAL( valueChanged(int)), this, SLOT (setContrast(int ))); - connect(ConBriDlg->briSlider, SIGNAL( valueChanged(int)), this, SLOT (setBrightness(int))); + connect(ConBriDlg->conSlider, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT (setContrast(int ))); + connect(ConBriDlg->briSlider, TQT_SIGNAL( valueChanged(int)), this, TQT_SLOT (setBrightness(int))); } @@ -98,7 +98,7 @@ void ContrastBrightnessDlg::setContrast(int contrastValue) int val = 0, index=0, totalPix = width * height; int min = (int) viewer->imgBuffer[0], max = 0; if (!viewer) return; - QColor myCol; + TQColor myCol; contrast = contrastValue; @@ -167,7 +167,7 @@ void ContrastBrightnessDlg::setBrightness(int brightnessValue) int val = 0, index=0, totalPix = width * height; int min = (int) viewer->imgBuffer[0], max = 0; if (!viewer) return; - QColor myCol; + TQColor myCol; brightness = brightnessValue; // Apply Contrast and brightness @@ -231,9 +231,9 @@ void ContrastBrightnessDlg::setBrightness(int brightnessValue) } -QSize ContrastBrightnessDlg::sizeHint() const +TQSize ContrastBrightnessDlg::sizeHint() const { - return QSize(400,130); + return TQSize(400,130); } #include "conbridlg.moc" diff --git a/kstars/kstars/conbridlg.h b/kstars/kstars/conbridlg.h index e653ed70..ef531eaa 100644 --- a/kstars/kstars/conbridlg.h +++ b/kstars/kstars/conbridlg.h @@ -30,10 +30,10 @@ class ContrastBrightnessDlg : public KDialogBase { Q_OBJECT public: - ContrastBrightnessDlg(QWidget *parent=0); + ContrastBrightnessDlg(TQWidget *parent=0); ~ContrastBrightnessDlg(); - QSize sizeHint() const; + TQSize sizeHint() const; void range(int min, int max, int & num); void range(float min, float max, float & num); @@ -50,8 +50,8 @@ class ContrastBrightnessDlg : public KDialogBase { ConBriForm *ConBriDlg; //unsigned char *localImgBuffer; - QImage *displayImage; - QImage *tempImage; + TQImage *displayImage; + TQImage *tempImage; public slots: void setContrast(int contrastValue); diff --git a/kstars/kstars/csegment.cpp b/kstars/kstars/csegment.cpp index e01802f9..24242022 100644 --- a/kstars/kstars/csegment.cpp +++ b/kstars/kstars/csegment.cpp @@ -27,7 +27,7 @@ void CSegment::addPoint( double ra, double dec ) { Nodes.append( p ); } -bool CSegment::setNames( QString n1, QString n2 ) { +bool CSegment::setNames( TQString n1, TQString n2 ) { if ( n1.length() == 3 && n2.length() == 3 ) { Name1 = n1; Name2 = n2; @@ -37,7 +37,7 @@ bool CSegment::setNames( QString n1, QString n2 ) { } } -bool CSegment::borders( QString cname ) { +bool CSegment::borders( TQString cname ) { if ( Name1 == cname || Name2 == cname ) return true; return false; } diff --git a/kstars/kstars/csegment.h b/kstars/kstars/csegment.h index dea55c9f..06d751b5 100644 --- a/kstars/kstars/csegment.h +++ b/kstars/kstars/csegment.h @@ -18,8 +18,8 @@ #ifndef CSEGMENT_H #define CSEGMENT_H -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> /**@class CSegment *A segment of a constellation boundary. The segment consists @@ -53,24 +53,24 @@ public: /**@return the name of one of the constellations *that borders this boundary segment. */ - QString name1() const { return Name1; } + TQString name1() const { return Name1; } /**@return the name of one of the constellations *that borders this boundary segment. */ - QString name2() const { return Name2; } + TQString name2() const { return Name2; } /**Set the names of the bounding constellations. Use the IAU *three-letter abbreviations. *@p n1 IAU name of one bounding constellation *@p n2 IAU name of the other bounding constellation */ - bool setNames( QString n1, QString n2 ); + bool setNames( TQString n1, TQString n2 ); /**Determine if a given constellation borders this boundary segment *@p cname the IAU code of the constellation to be tested. */ - bool borders( QString cname ); + bool borders( TQString cname ); /**@return pointer to the first node in the segment */ @@ -81,11 +81,11 @@ public: SkyPoint* nextNode() { return Nodes.next(); } /**@return pointer to the list of nodes*/ - QPtrList<SkyPoint>* nodes() { return &Nodes; } + TQPtrList<SkyPoint>* nodes() { return &Nodes; } private: - QPtrList<SkyPoint> Nodes; - QString Name1, Name2; + TQPtrList<SkyPoint> Nodes; + TQString Name1, Name2; }; #endif diff --git a/kstars/kstars/customcatalog.cpp b/kstars/kstars/customcatalog.cpp index 199ef099..40de33c2 100644 --- a/kstars/kstars/customcatalog.cpp +++ b/kstars/kstars/customcatalog.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qstring.h> +#include <tqstring.h> #include "customcatalog.h" @@ -23,8 +23,8 @@ CustomCatalog::CustomCatalog() : m_Name( i18n("Custom") ), m_Prefix( "CC" ), m_Color( "#FF0000" ), m_Epoch( 2000.0 ), m_ObjList() { } -CustomCatalog::CustomCatalog( QString nm, QString px, QString co, float ep, - QPtrList<SkyObject> ol ) : m_Name(nm), m_Prefix(px), m_Color(co), +CustomCatalog::CustomCatalog( TQString nm, TQString px, TQString co, float ep, + TQPtrList<SkyObject> ol ) : m_Name(nm), m_Prefix(px), m_Color(co), m_Epoch(ep), m_ObjList( ol ) { } diff --git a/kstars/kstars/customcatalog.h b/kstars/kstars/customcatalog.h index ee2eef94..d7179691 100644 --- a/kstars/kstars/customcatalog.h +++ b/kstars/kstars/customcatalog.h @@ -18,7 +18,7 @@ #ifndef CUSTOM_CATALOG_H #define CUSTOM_CATALOG_H -#include <qptrlist.h> +#include <tqptrlist.h> #include "skyobject.h" class QString; @@ -29,25 +29,25 @@ class QString; class CustomCatalog { public: CustomCatalog(); - CustomCatalog( QString nm, QString px, QString co, float ep, QPtrList<SkyObject> ol ); + CustomCatalog( TQString nm, TQString px, TQString co, float ep, TQPtrList<SkyObject> ol ); ~CustomCatalog(); - QString name() const { return m_Name; } - QString prefix() const { return m_Prefix; } - QString color() const { return m_Color; } + TQString name() const { return m_Name; } + TQString prefix() const { return m_Prefix; } + TQString color() const { return m_Color; } float epoch() const { return m_Epoch; } - QPtrList<SkyObject> objList() const { return m_ObjList; } + TQPtrList<SkyObject> objList() const { return m_ObjList; } - void setName( const QString &name ) { m_Name = name; } - void setPrefix( const QString &prefix ) { m_Prefix = prefix; } - void setColor( const QString &color ) { m_Color = color; } + void setName( const TQString &name ) { m_Name = name; } + void setPrefix( const TQString &prefix ) { m_Prefix = prefix; } + void setColor( const TQString &color ) { m_Color = color; } void setEpoch( float epoch ) { m_Epoch = epoch; } - void setObjectList( QPtrList<SkyObject> ol ) { m_ObjList = ol; } + void setObjectList( TQPtrList<SkyObject> ol ) { m_ObjList = ol; } private: - QString m_Name, m_Prefix, m_Color; + TQString m_Name, m_Prefix, m_Color; float m_Epoch; - QPtrList<SkyObject> m_ObjList; + TQPtrList<SkyObject> m_ObjList; }; #endif //CUSTOM_CATALOG_H diff --git a/kstars/kstars/deepskyobject.cpp b/kstars/kstars/deepskyobject.cpp index b189404f..280729e5 100644 --- a/kstars/kstars/deepskyobject.cpp +++ b/kstars/kstars/deepskyobject.cpp @@ -17,11 +17,11 @@ #include <kglobal.h> -#include <qfile.h> -#include <qregexp.h> -#include <qpainter.h> -#include <qimage.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqregexp.h> +#include <tqpainter.h> +#include <tqimage.h> +#include <tqstring.h> #include "deepskyobject.h" #include "kstarsdata.h" @@ -41,7 +41,7 @@ DeepSkyObject::DeepSkyObject( DeepSkyObject &o ) } DeepSkyObject::DeepSkyObject( int t, dms r, dms d, float m, - QString n, QString n2, QString lname, QString cat, + TQString n, TQString n2, TQString lname, TQString cat, float a, float b, double pa, int pgc, int ugc ) : SkyObject( t, r, d, m, n, n2, lname ) { MajorAxis = a; @@ -54,7 +54,7 @@ DeepSkyObject::DeepSkyObject( int t, dms r, dms d, float m, } DeepSkyObject::DeepSkyObject( int t, double r, double d, float m, - QString n, QString n2, QString lname, QString cat, + TQString n, TQString n2, TQString lname, TQString cat, float a, float b, double pa, int pgc, int ugc ) : SkyObject( t, r, d, m, n, n2, lname ) { MajorAxis = a; @@ -71,28 +71,28 @@ float DeepSkyObject::e( void ) const { return MinorAxis / MajorAxis; } -QString DeepSkyObject::catalog() const { - if ( isCatalogM() ) return QString("M"); - if ( isCatalogNGC() ) return QString("NGC"); - if ( isCatalogIC() ) return QString("IC"); - return QString(""); +TQString DeepSkyObject::catalog() const { + if ( isCatalogM() ) return TQString("M"); + if ( isCatalogNGC() ) return TQString("NGC"); + if ( isCatalogIC() ) return TQString("IC"); + return TQString(""); } -void DeepSkyObject::setCatalog( const QString &cat ) { +void DeepSkyObject::setCatalog( const TQString &cat ) { if ( cat.upper() == "M" ) Catalog = (unsigned char)CAT_MESSIER; else if ( cat.upper() == "NGC" ) Catalog = (unsigned char)CAT_NGC; else if ( cat.upper() == "IC" ) Catalog = (unsigned char)CAT_IC; else Catalog = (unsigned char)CAT_UNKNOWN; } -QImage* DeepSkyObject::readImage( void ) { - QFile file; +TQImage* DeepSkyObject::readImage( void ) { + TQFile file; if ( Image==0 ) { //Image not currently set; try to load it from disk. - QString fname = name().lower().replace( QRegExp(" "), "" ) + ".png"; + TQString fname = name().lower().replace( TQRegExp(" "), "" ) + ".png"; if ( KSUtils::openDataFile( file, fname ) ) { file.close(); - Image = new QImage( file.name(), "PNG" ); + Image = new TQImage( file.name(), "PNG" ); } } @@ -101,7 +101,7 @@ QImage* DeepSkyObject::readImage( void ) { void DeepSkyObject::deleteImage() { delete Image; Image = 0; } -void DeepSkyObject::drawSymbol( QPainter &psky, int x, int y, double PositionAngle, double zoom, double scale ) { +void DeepSkyObject::drawSymbol( TQPainter &psky, int x, int y, double PositionAngle, double zoom, double scale ) { // if size is 0.0 set it to 1.0, this are normally stars (type 0 and 1) // if we use size 0.0 the star wouldn't be drawn float majorAxis = a(); @@ -128,7 +128,7 @@ void DeepSkyObject::drawSymbol( QPainter &psky, int x, int y, double PositionAng int psize; - QBrush tempBrush; + TQBrush tempBrush; switch ( type() ) { case 0: @@ -223,9 +223,9 @@ void DeepSkyObject::drawSymbol( QPainter &psky, int x, int y, double PositionAng } } -void DeepSkyObject::drawImage( QPainter &psky, int x, int y, double PositionAngle, double zoom, double scale ) { - QImage *image = readImage(); - QImage ScaledImage; +void DeepSkyObject::drawImage( TQPainter &psky, int x, int y, double PositionAngle, double zoom, double scale ) { + TQImage *image = readImage(); + TQImage ScaledImage; if ( image ) { int w = int( a() * scale * dms::PI * zoom/10800.0 ); diff --git a/kstars/kstars/deepskyobject.h b/kstars/kstars/deepskyobject.h index f8291ae6..e1712c7f 100644 --- a/kstars/kstars/deepskyobject.h +++ b/kstars/kstars/deepskyobject.h @@ -18,7 +18,7 @@ #ifndef DEEPSKYOBJECT_H #define DEEPSKYOBJECT_H -#include <qpoint.h> +#include <tqpoint.h> #include "skyobject.h" #include "dms.h" @@ -57,8 +57,8 @@ public: *@param ugc UGC catalog number */ DeepSkyObject( int t=SkyObject::STAR, dms r=dms(0.0), dms d=dms(0.0), - float m=0.0, QString n="unnamed", QString n2="", - QString lname="", QString cat="", + float m=0.0, TQString n="unnamed", TQString n2="", + TQString lname="", TQString cat="", float a=0.0, float b=0.0, double pa=0.0, int pgc=0, int ugc=0 ); @@ -79,8 +79,8 @@ public: *@param ugc UGC catalog number */ DeepSkyObject( int t, double r, double d, float m=0.0, - QString n="unnamed", QString n2="", QString lname="", - QString cat="", float a=0.0, float b=0.0, + TQString n="unnamed", TQString n2="", TQString lname="", + TQString cat="", float a=0.0, float b=0.0, double pa=0.0, int pgc=0, int ugc=0 ); /**Copy constructor. @@ -98,14 +98,14 @@ public: */ enum CATALOG { CAT_MESSIER=0, CAT_NGC=1, CAT_IC=2, CAT_UNKNOWN }; -/**@return a QString identifying the object's primary catalog. +/**@return a TQString identifying the object's primary catalog. *@warning this is only used for deep-sky objects. Possible values are: *- "M" for Messier catalog *- "NGC" for NGC catalog *- "IC" for IC catalog *- empty string is presumed to be an object in a custom catalog */ - QString catalog( void ) const; + TQString catalog( void ) const; /**Set the internal Catalog value according to the QString *argument: @@ -113,7 +113,7 @@ public: * "NGC" : CAT_NGC * "IC" : CAT_IC */ - void setCatalog( const QString &s ); + void setCatalog( const TQString &s ); /**@return the object's major axis length, in arcminute. */ @@ -143,12 +143,12 @@ public: /**Read in this object's image from disk, unless it already exists in memory. *@returns pointer to newly-created image. */ - QImage *readImage(); + TQImage *readImage(); /**@return pointer to the object's inline image. If it is currently *a null pointer, it loads the image from disk. */ - QImage *image() const { return Image; } + TQImage *image() const { return Image; } /**delete the Image pointer, and set it to 0. */ @@ -172,25 +172,25 @@ public: /**Draw the object's symbol on the map */ - void drawSymbol( QPainter &psky, int x, int y, double PositionAngle, double zoom, double scale=1.0 ); + void drawSymbol( TQPainter &psky, int x, int y, double PositionAngle, double zoom, double scale=1.0 ); /**Draw the Object's image on the map */ - void drawImage( QPainter &psky, int x, int y, double PositionAngle, double zoom, double scale=1.0 ); + void drawImage( TQPainter &psky, int x, int y, double PositionAngle, double zoom, double scale=1.0 ); /**Show Deep-sky object popup menu. Overloaded from virtual *SkyObject::showPopupMenu() *@param pmenu pointer to the KSPopupMenu object *@param pos QPojnt holding the x,y coordinates for the menu */ - virtual void showPopupMenu( KSPopupMenu *pmenu, QPoint pos ) { pmenu->createDeepSkyObjectMenu( this ); pmenu->popup( pos ); } + virtual void showPopupMenu( KSPopupMenu *pmenu, TQPoint pos ) { pmenu->createDeepSkyObjectMenu( this ); pmenu->popup( pos ); } private: unsigned char Catalog; double PositionAngle; int UGC, PGC; float MajorAxis, MinorAxis; - QImage *Image; + TQImage *Image; }; #endif diff --git a/kstars/kstars/detaildialog.cpp b/kstars/kstars/detaildialog.cpp index 24949c50..4bbb6a91 100644 --- a/kstars/kstars/detaildialog.cpp +++ b/kstars/kstars/detaildialog.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include <qstring.h> -#include <qlayout.h> //still needed for secondary dialogs -#include <qlineedit.h> -#include <qimage.h> -#include <qregexp.h> +#include <tqstring.h> +#include <tqlayout.h> //still needed for secondary dialogs +#include <tqlineedit.h> +#include <tqimage.h> +#include <tqregexp.h> #include <kapplication.h> #include <kstandarddirs.h> @@ -57,32 +57,32 @@ #include "devicemanager.h" #include "indistd.h" -LogEdit::LogEdit( QWidget *parent, const char *name ) : KTextEdit( parent, name ) +LogEdit::LogEdit( TQWidget *parent, const char *name ) : KTextEdit( parent, name ) { - setFrameStyle( QFrame::StyledPanel ); - setFrameShadow( QFrame::Plain ); + setFrameStyle( TQFrame::StyledPanel ); + setFrameShadow( TQFrame::Plain ); setLineWidth( 4 ); } -void LogEdit::focusOutEvent( QFocusEvent *e ) { +void LogEdit::focusOutEvent( TQFocusEvent *e ) { emit focusOut(); - QWidget::focusOutEvent(e); + TQWidget::focusOutEvent(e); } -ClickLabel::ClickLabel( QWidget *parent, const char *name ) : QLabel( parent, name ) +ClickLabel::ClickLabel( TQWidget *parent, const char *name ) : TQLabel( parent, name ) {} DetailDialog::DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *geo, - QWidget *parent, const char *name ) : + TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Tabbed, i18n( "Object Details" ), Close, Close, parent, name ) , selectedObject(o), ksw((KStars*)parent), Data(0), Pos(0), Links(0), Adv(0), Log(0) { //Modify color palette - setPaletteBackgroundColor( palette().color( QPalette::Active, QColorGroup::Base ) ); - setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::Text ) ); + setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Base ) ); + setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::Text ) ); //Create thumbnail image - Thumbnail = new QPixmap( 200, 200 ); + Thumbnail = new TQPixmap( 200, 200 ); createGeneralTab(); createPositionTab( ut, geo ); @@ -91,21 +91,21 @@ DetailDialog::DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation * createLogTab(); //Connections - connect( Data->ObsListButton, SIGNAL( clicked() ), this, SLOT( addToObservingList() ) ); - connect( Data->CenterButton, SIGNAL( clicked() ), this, SLOT( centerMap() ) ); - connect( Data->ScopeButton, SIGNAL( clicked() ), this, SLOT( centerTelescope() ) ); - connect( Data->Image, SIGNAL( clicked() ), this, SLOT( updateThumbnail() ) ); + connect( Data->ObsListButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addToObservingList() ) ); + connect( Data->CenterButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( centerMap() ) ); + connect( Data->ScopeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( centerTelescope() ) ); + connect( Data->Image, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updateThumbnail() ) ); } void DetailDialog::createGeneralTab() { - QFrame *DataTab = addPage(i18n("General")); + TQFrame *DataTab = addPage(i18n("General")); Data = new DetailsDataUI( DataTab, "general_data_tab" ); //Modify colors - Data->Names->setPaletteBackgroundColor( palette().color( QPalette::Active, QColorGroup::Highlight ) ); - Data->Names->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::HighlightedText ) ); - Data->DataFrame->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::Highlight ) ); + Data->Names->setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Highlight ) ); + Data->Names->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::HighlightedText ) ); + Data->DataFrame->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::Highlight ) ); Data->Type->setPalette( palette() ); Data->Constellation->setPalette( palette() ); Data->Mag->setPalette( palette() ); @@ -119,7 +119,7 @@ void DetailDialog::createGeneralTab() //Show object thumbnail image showThumbnail(); - QVBoxLayout *vlay = new QVBoxLayout( DataTab, 0, 0 ); + TQVBoxLayout *vlay = new TQVBoxLayout( DataTab, 0, 0 ); vlay->addWidget( Data ); //Fill in the data fields @@ -127,7 +127,7 @@ void DetailDialog::createGeneralTab() StarObject *s = 0L; DeepSkyObject *dso = 0L; KSPlanetBase *ps = 0L; - QString pname(""), oname(""); + TQString pname(""), oname(""); switch ( selectedObject->type() ) { case 0: //stars @@ -140,10 +140,10 @@ void DetailDialog::createGeneralTab() //distance if ( s->distance() > 2000. || s->distance() < 0. ) // parallax < 0.5 mas - Data->Distance->setText( QString(i18n("larger than 2000 parsecs", "> 2000 pc") ) ); + Data->Distance->setText( TQString(i18n("larger than 2000 parsecs", "> 2000 pc") ) ); else if ( s->distance() > 50.0 ) //show to nearest integer Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).arg( - QString::number( int( s->distance() + 0.5 ) ) ) ); + TQString::number( int( s->distance() + 0.5 ) ) ) ); else if ( s->distance() > 10.0 ) //show to tenths place Data->Distance->setText( i18n( "number in parsecs", "%1 pc" ).arg( KGlobal::locale()->formatNumber( s->distance(), 1 ) ) ); @@ -183,7 +183,7 @@ void DetailDialog::createGeneralTab() //Magnitude: The moon displays illumination fraction instead if ( selectedObject->name() == "Moon" ) { Data->MagLabel->setText( i18n("Illumination:") ); - Data->Mag->setText( QString("%1 %").arg( int( ((KSMoon *)selectedObject)->illum()*100. ) ) ); + Data->Mag->setText( TQString("%1 %").arg( int( ((KSMoon *)selectedObject)->illum()*100. ) ) ); } else { Data->Mag->setText( i18n( "number in magnitudes", "%1 mag" ).arg( KGlobal::locale()->formatNumber( ps->mag(), 1 ) ) ); //show to tenths place @@ -230,11 +230,11 @@ void DetailDialog::createGeneralTab() if ( dso->ugc() != 0 ) { if ( ! oname.isEmpty() ) oname += ", "; - oname += "UGC " + QString("%1").arg( dso->ugc() ); + oname += "UGC " + TQString("%1").arg( dso->ugc() ); } if ( dso->pgc() != 0 ) { if ( ! oname.isEmpty() ) oname += ", "; - oname += "PGC " + QString("%1").arg( dso->pgc() ); + oname += "PGC " + TQString("%1").arg( dso->pgc() ); } if ( ! oname.isEmpty() ) pname += ", " + oname; @@ -270,16 +270,16 @@ void DetailDialog::createGeneralTab() } void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo ) { - QFrame *PosTab = addPage( i18n("Position") ); + TQFrame *PosTab = addPage( i18n("Position") ); Pos = new DetailsPositionUI( PosTab, "position_tab" ); //Modify colors - Pos->CoordTitle->setPaletteBackgroundColor( palette().color( QPalette::Active, QColorGroup::Highlight ) ); - Pos->CoordTitle->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::HighlightedText ) ); - Pos->CoordFrame->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::Highlight ) ); - Pos->RSTTitle->setPaletteBackgroundColor( palette().color( QPalette::Active, QColorGroup::Highlight ) ); - Pos->RSTTitle->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::HighlightedText ) ); - Pos->RSTFrame->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::Highlight ) ); + Pos->CoordTitle->setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Highlight ) ); + Pos->CoordTitle->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::HighlightedText ) ); + Pos->CoordFrame->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::Highlight ) ); + Pos->RSTTitle->setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Highlight ) ); + Pos->RSTTitle->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::HighlightedText ) ); + Pos->RSTFrame->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::Highlight ) ); Pos->RA->setPalette( palette() ); Pos->Dec->setPalette( palette() ); Pos->Az->setPalette( palette() ); @@ -305,13 +305,13 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo Pos->AltTransitLabel->setPalette( palette() ); Pos->AzSetLabel->setPalette( palette() ); - QVBoxLayout *vlay = new QVBoxLayout( PosTab, 0, 0 ); + TQVBoxLayout *vlay = new TQVBoxLayout( PosTab, 0, 0 ); vlay->addWidget( Pos ); //Coordinates Section: //Don't use KLocale::formatNumber() for the epoch string, //because we don't want a thousands-place separator! - QString sEpoch = QString::number( ut.epoch(), 'f', 1 ); + TQString sEpoch = TQString::number( ut.epoch(), 'f', 1 ); //Replace the decimal point with localized decimal symbol sEpoch.replace( ".", KGlobal::locale()->decimalSymbol() ); @@ -326,12 +326,12 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo //Here's a kludgy workaround: dms lst = geo->GSTtoLST( ut.gst() ); dms ha( lst.Degrees() - selectedObject->ra()->Degrees() ); - QChar sgn('+'); + TQChar sgn('+'); if ( ha.Hours() > 12.0 ) { ha.setH( 24.0 - ha.Hours() ); sgn = '-'; } - Pos->HA->setText( QString("%1%2").arg(sgn).arg( ha.toHMSString() ) ); + Pos->HA->setText( TQString("%1%2").arg(sgn).arg( ha.toHMSString() ) ); //Airmass is approximated as the secant of the zenith distance, //equivalent to 1./sin(Alt). Beware of Inf at Alt=0! @@ -344,11 +344,11 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo //Rise/Set/Transit Section: //Prepare time/position variables - QTime rt = selectedObject->riseSetTime( ut, geo, true ); //true = use rise time + TQTime rt = selectedObject->riseSetTime( ut, geo, true ); //true = use rise time dms raz = selectedObject->riseSetTimeAz( ut, geo, true ); //true = use rise time //If transit time is before rise time, use transit time for tomorrow - QTime tt = selectedObject->transitTime( ut, geo ); + TQTime tt = selectedObject->transitTime( ut, geo ); dms talt = selectedObject->transitAltitude( ut, geo ); if ( tt < rt ) { tt = selectedObject->transitTime( ut.addDays( 1 ), geo ); @@ -356,7 +356,7 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo } //If set time is before rise time, use set time for tomorrow - QTime st = selectedObject->riseSetTime( ut, geo, false ); //false = use set time + TQTime st = selectedObject->riseSetTime( ut, geo, false ); //false = use set time dms saz = selectedObject->riseSetTimeAz( ut, geo, false ); //false = use set time if ( st < rt ) { st = selectedObject->riseSetTime( ut.addDays( 1 ), geo, false ); //false = use set time @@ -364,8 +364,8 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo } if ( rt.isValid() ) { - Pos->TimeRise->setText( QString().sprintf( "%02d:%02d", rt.hour(), rt.minute() ) ); - Pos->TimeSet->setText( QString().sprintf( "%02d:%02d", st.hour(), st.minute() ) ); + Pos->TimeRise->setText( TQString().sprintf( "%02d:%02d", rt.hour(), rt.minute() ) ); + Pos->TimeSet->setText( TQString().sprintf( "%02d:%02d", st.hour(), st.minute() ) ); Pos->AzRise->setText( raz.toDMSString() ); Pos->AzSet->setText( saz.toDMSString() ); } else { @@ -381,39 +381,39 @@ void DetailDialog::createPositionTab( const KStarsDateTime &ut, GeoLocation *geo Pos->AzSet->setText( i18n( "Not Applicable", "N/A" ) ); } - Pos->TimeTransit->setText( QString().sprintf( "%02d:%02d", tt.hour(), tt.minute() ) ); + Pos->TimeTransit->setText( TQString().sprintf( "%02d:%02d", tt.hour(), tt.minute() ) ); Pos->AltTransit->setText( talt.toDMSString() ); } void DetailDialog::createLinksTab() { // don't create a link tab for an unnamed star - if (selectedObject->name() == QString("star")) + if (selectedObject->name() == TQString("star")) return; - QFrame *LinksTab = addPage( i18n( "Links" ) ); + TQFrame *LinksTab = addPage( i18n( "Links" ) ); Links = new DetailsLinksUI( LinksTab, "links_tab" ); //Modify colors - Links->InfoTitle->setPaletteBackgroundColor( palette().color( QPalette::Active, QColorGroup::Text ) ); - Links->InfoTitle->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::Base ) ); - Links->ImagesTitle->setPaletteBackgroundColor( palette().color( QPalette::Active, QColorGroup::Text ) ); - Links->ImagesTitle->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::Base ) ); + Links->InfoTitle->setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Text ) ); + Links->InfoTitle->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::Base ) ); + Links->ImagesTitle->setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Text ) ); + Links->ImagesTitle->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::Base ) ); - QPalette p = palette(); - p.setColor( QPalette::Active, QColorGroup::Dark, palette().color( QPalette::Active, QColorGroup::Highlight ) ); + TQPalette p = palette(); + p.setColor( TQPalette::Active, TQColorGroup::Dark, palette().color( TQPalette::Active, TQColorGroup::Highlight ) ); Links->InfoList->setPalette( p ); Links->ImagesList->setPalette( p ); - QVBoxLayout *vlay = new QVBoxLayout( LinksTab, 0, 0 ); + TQVBoxLayout *vlay = new TQVBoxLayout( LinksTab, 0, 0 ); vlay->addWidget( Links ); - QStringList::Iterator itList = selectedObject->InfoList.begin(); - QStringList::Iterator itTitle = selectedObject->InfoTitle.begin(); - QStringList::Iterator itListEnd = selectedObject->InfoList.end(); + TQStringList::Iterator itList = selectedObject->InfoList.begin(); + TQStringList::Iterator itTitle = selectedObject->InfoTitle.begin(); + TQStringList::Iterator itListEnd = selectedObject->InfoList.end(); for ( ; itList != itListEnd; ++itList ) { - Links->InfoList->insertItem(QString(*itTitle)); + Links->InfoList->insertItem(TQString(*itTitle)); itTitle++; } @@ -424,7 +424,7 @@ void DetailDialog::createLinksTab() itListEnd = selectedObject->ImageList.end(); for ( ; itList != itListEnd; ++itList ) { - Links->ImagesList->insertItem(QString(*itTitle)); + Links->ImagesList->insertItem(TQString(*itTitle)); itTitle++; } @@ -434,34 +434,34 @@ void DetailDialog::createLinksTab() } // Signals/Slots - connect( Links->ViewButton, SIGNAL(clicked()), this, SLOT( viewLink() ) ); - connect( Links->AddLinkButton, SIGNAL(clicked()), ksw->map(), SLOT( addLink() ) ); - connect( Links->EditLinkButton, SIGNAL(clicked()), this, SLOT( editLinkDialog() ) ); - connect( Links->RemoveLinkButton, SIGNAL(clicked()), this, SLOT( removeLinkDialog() ) ); - connect( Links->InfoList, SIGNAL(highlighted(int)), this, SLOT( unselectImagesList() ) ); - connect( Links->ImagesList, SIGNAL(highlighted(int)), this, SLOT( unselectInfoList() ) ); - connect( ksw->map(), SIGNAL(linkAdded()), this, SLOT( updateLists() ) ); + connect( Links->ViewButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( viewLink() ) ); + connect( Links->AddLinkButton, TQT_SIGNAL(clicked()), ksw->map(), TQT_SLOT( addLink() ) ); + connect( Links->EditLinkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( editLinkDialog() ) ); + connect( Links->RemoveLinkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT( removeLinkDialog() ) ); + connect( Links->InfoList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT( unselectImagesList() ) ); + connect( Links->ImagesList, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT( unselectInfoList() ) ); + connect( ksw->map(), TQT_SIGNAL(linkAdded()), this, TQT_SLOT( updateLists() ) ); } void DetailDialog::createAdvancedTab() { // Don't create an adv tab for an unnamed star or if advinterface file failed loading // We also don't need adv dialog for solar system objects. - if (selectedObject->name() == QString("star") || + if (selectedObject->name() == TQString("star") || ksw->data()->ADVtreeList.isEmpty() || selectedObject->type() == SkyObject::PLANET || selectedObject->type() == SkyObject::COMET || selectedObject->type() == SkyObject::ASTEROID ) return; - QFrame *AdvancedTab = addPage(i18n("Advanced")); + TQFrame *AdvancedTab = addPage(i18n("Advanced")); Adv = new DetailsDatabaseUI( AdvancedTab, "database_tab" ); -// Adv->setPaletteBackgroundColor( QColor( "white" ) ); - QVBoxLayout *vlay = new QVBoxLayout( AdvancedTab, 0, 0 ); +// Adv->setPaletteBackgroundColor( TQColor( "white" ) ); + TQVBoxLayout *vlay = new TQVBoxLayout( AdvancedTab, 0, 0 ); vlay->addWidget( Adv ); - treeIt = new QPtrListIterator<ADVTreeData> (ksw->data()->ADVtreeList); - connect( Adv->ADVTree, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(viewADVData())); + treeIt = new TQPtrListIterator<ADVTreeData> (ksw->data()->ADVtreeList); + connect( Adv->ADVTree, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this, TQT_SLOT(viewADVData())); populateADVTree(NULL); } @@ -469,18 +469,18 @@ void DetailDialog::createAdvancedTab() void DetailDialog::createLogTab() { //Don't create a a log tab for an unnamed star - if (selectedObject->name() == QString("star")) + if (selectedObject->name() == TQString("star")) return; // Log Tab - QFrame *LogTab = addPage(i18n("Log")); + TQFrame *LogTab = addPage(i18n("Log")); Log = new DetailsLogUI( LogTab, "log_tab" ); //Modify colors - Log->LogTitle->setPaletteBackgroundColor( palette().color( QPalette::Active, QColorGroup::Text ) ); - Log->LogTitle->setPaletteForegroundColor( palette().color( QPalette::Active, QColorGroup::Base ) ); + Log->LogTitle->setPaletteBackgroundColor( palette().color( TQPalette::Active, TQColorGroup::Text ) ); + Log->LogTitle->setPaletteForegroundColor( palette().color( TQPalette::Active, TQColorGroup::Base ) ); - QVBoxLayout *vlay = new QVBoxLayout( LogTab, 0, 0 ); + TQVBoxLayout *vlay = new TQVBoxLayout( LogTab, 0, 0 ); vlay->addWidget( Log ); if ( selectedObject->userLog.isEmpty() ) @@ -489,7 +489,7 @@ void DetailDialog::createLogTab() Log->UserLog->setText(selectedObject->userLog); //Automatically save the log contents when the widget loses focus - connect( Log->UserLog, SIGNAL( focusOut() ), this, SLOT( saveLogData() ) ); + connect( Log->UserLog, TQT_SIGNAL( focusOut() ), this, TQT_SLOT( saveLogData() ) ); } @@ -505,13 +505,13 @@ void DetailDialog::unselectImagesList() void DetailDialog::viewLink() { - QString URL; + TQString URL; if ( Links->InfoList->currentItem() != -1 && Links->InfoList->isSelected( Links->InfoList->currentItem() ) ) - URL = QString( *selectedObject->InfoList.at( Links->InfoList->currentItem() ) ); + URL = TQString( *selectedObject->InfoList.at( Links->InfoList->currentItem() ) ); else if ( Links->ImagesList->currentItem() != -1 ) - URL = QString( *selectedObject->ImageList.at( Links->ImagesList->currentItem() ) ); + URL = TQString( *selectedObject->ImageList.at( Links->ImagesList->currentItem() ) ); if (!URL.isEmpty()) kapp->invokeBrowser(URL); @@ -522,12 +522,12 @@ void DetailDialog::updateLists() Links->InfoList->clear(); Links->ImagesList->clear(); - QStringList::Iterator itList = selectedObject->InfoList.begin(); - QStringList::Iterator itTitle = selectedObject->InfoTitle.begin(); - QStringList::Iterator itListEnd = selectedObject->InfoList.end(); + TQStringList::Iterator itList = selectedObject->InfoList.begin(); + TQStringList::Iterator itTitle = selectedObject->InfoTitle.begin(); + TQStringList::Iterator itListEnd = selectedObject->InfoList.end(); for ( ; itList != itListEnd; ++itList ) { - Links->InfoList->insertItem(QString(*itTitle)); + Links->InfoList->insertItem(TQString(*itTitle)); itTitle++; } @@ -537,7 +537,7 @@ void DetailDialog::updateLists() itListEnd = selectedObject->ImageList.end(); for ( ; itList != itListEnd; ++itList ) { - Links->ImagesList->insertItem(QString(*itTitle)); + Links->ImagesList->insertItem(TQString(*itTitle)); itTitle++; } } @@ -546,17 +546,17 @@ void DetailDialog::editLinkDialog() { int type; uint i; - QString defaultURL , entry; - QFile newFile; + TQString defaultURL , entry; + TQFile newFile; KDialogBase editDialog(KDialogBase::Plain, i18n("Edit Link"), Ok|Cancel, Ok , this, "editlink", false); - QFrame *editFrame = editDialog.plainPage(); + TQFrame *editFrame = editDialog.plainPage(); - editLinkURL = new QLabel(i18n("URL:"), editFrame); - editLinkField = new QLineEdit(editFrame, "lineedit"); + editLinkURL = new TQLabel(i18n("URL:"), editFrame); + editLinkField = new TQLineEdit(editFrame, "lineedit"); editLinkField->setMinimumWidth(300); editLinkField->home(false); - editLinkLayout = new QHBoxLayout(editFrame, 6, 6, "editlinklayout"); + editLinkLayout = new TQHBoxLayout(editFrame, 6, 6, "editlinklayout"); editLinkLayout->addWidget(editLinkURL); editLinkLayout->addWidget(editLinkField); @@ -579,7 +579,7 @@ void DetailDialog::editLinkDialog() else return; // If user presses cancel then return - if (!editDialog.exec() == QDialog::Accepted) + if (!editDialog.exec() == TQDialog::Accepted) return; // if it wasn't edit, don't do anything if (!editLinkField->edited()) @@ -609,7 +609,7 @@ void DetailDialog::editLinkDialog() newFile.setName(file.name()); newFile.open(IO_WriteOnly); - QTextStream newStream(&newFile); + TQTextStream newStream(&newFile); for (i=0; i<dataList.count(); i++) { @@ -639,8 +639,8 @@ void DetailDialog::removeLinkDialog() { int type; uint i; - QString defaultURL, entry; - QFile newFile; + TQString defaultURL, entry; + TQFile newFile; currentItemIndex = Links->InfoList->currentItem(); @@ -682,7 +682,7 @@ void DetailDialog::removeLinkDialog() newFile.setName(file.name()); newFile.open(IO_WriteOnly); - QTextStream newStream(&newFile); + TQTextStream newStream(&newFile); for (i=0; i<dataList.count(); i++) newStream << dataList[i] << endl; @@ -694,7 +694,7 @@ void DetailDialog::removeLinkDialog() bool DetailDialog::verifyUserData(int type) { - QString line, name, sub, title; + TQString line, name, sub, title; bool ObjectFound = false; uint i; @@ -763,7 +763,7 @@ bool DetailDialog::readUserFile(int type)//, int sourceFileType) // Must reset file file.reset(); - QTextStream stream(&file); + TQTextStream stream(&file); dataList.clear(); @@ -774,7 +774,7 @@ bool DetailDialog::readUserFile(int type)//, int sourceFileType) return true; } -void DetailDialog::populateADVTree(QListViewItem *parent) +void DetailDialog::populateADVTree(TQListViewItem *parent) { // list done if (!treeIt->current()) @@ -795,21 +795,21 @@ void DetailDialog::populateADVTree(QListViewItem *parent) break; if (parent) - new QListViewItem( parent, treeIt->current()->Name); + new TQListViewItem( parent, treeIt->current()->Name); else - new QListViewItem( Adv->ADVTree, treeIt->current()->Name); + new TQListViewItem( Adv->ADVTree, treeIt->current()->Name); ++(*treeIt); } } -void DetailDialog::forkTree(QListViewItem *parent) +void DetailDialog::forkTree(TQListViewItem *parent) { - QListViewItem *current = 0; + TQListViewItem *current = 0; if (parent) - current = new QListViewItem(parent, treeIt->current()->Name); + current = new TQListViewItem(parent, treeIt->current()->Name); else - current = new QListViewItem(Adv->ADVTree, treeIt->current()->Name); + current = new TQListViewItem(Adv->ADVTree, treeIt->current()->Name); // we need to increment the iterator before and after populating the tree ++(*treeIt); @@ -819,8 +819,8 @@ void DetailDialog::forkTree(QListViewItem *parent) void DetailDialog::viewADVData() { - QString link; - QListViewItem * current = Adv->ADVTree->currentItem(); + TQString link; + TQListViewItem * current = Adv->ADVTree->currentItem(); if (!current) return; @@ -840,9 +840,9 @@ void DetailDialog::viewADVData() kapp->invokeBrowser(link); } -QString DetailDialog::parseADVData(QString link) +TQString DetailDialog::parseADVData(TQString link) { - QString subLink; + TQString subLink; int index; if ( (index = link.find("KSOBJ")) != -1) @@ -854,7 +854,7 @@ QString DetailDialog::parseADVData(QString link) if ( (index = link.find("KSRA")) != -1) { link.remove(index, 4); - subLink = QString().sprintf("%02d%02d%02d", selectedObject->ra0()->hour(), selectedObject->ra0()->minute(), selectedObject->ra0()->second()); + subLink = TQString().sprintf("%02d%02d%02d", selectedObject->ra0()->hour(), selectedObject->ra0()->minute(), selectedObject->ra0()->second()); subLink = subLink.insert(2, "%20"); subLink = subLink.insert(7, "%20"); @@ -865,13 +865,13 @@ QString DetailDialog::parseADVData(QString link) link.remove(index, 5); if (selectedObject->dec()->degree() < 0) { - subLink = QString().sprintf("%03d%02d%02d", selectedObject->dec0()->degree(), selectedObject->dec0()->arcmin(), selectedObject->dec0()->arcsec()); + subLink = TQString().sprintf("%03d%02d%02d", selectedObject->dec0()->degree(), selectedObject->dec0()->arcmin(), selectedObject->dec0()->arcsec()); subLink = subLink.insert(3, "%20"); subLink = subLink.insert(8, "%20"); } else { - subLink = QString().sprintf("%02d%02d%02d", selectedObject->dec0()->degree(), selectedObject->dec0()->arcmin(), selectedObject->dec0()->arcsec()); + subLink = TQString().sprintf("%02d%02d%02d", selectedObject->dec0()->degree(), selectedObject->dec0()->arcmin(), selectedObject->dec0()->arcsec()); subLink = subLink.insert(0, "%2B"); subLink = subLink.insert(5, "%20"); subLink = subLink.insert(10, "%20"); @@ -992,8 +992,8 @@ void DetailDialog::centerTelescope() if (useJ2000) sp.apparentCoord(ksw->data()->ut().djd(), (long double) J2000); - RAEle->write_w->setText(QString("%1:%2:%3").arg(sp.ra()->hour()).arg(sp.ra()->minute()).arg(sp.ra()->second())); - DecEle->write_w->setText(QString("%1:%2:%3").arg(sp.dec()->degree()).arg(sp.dec()->arcmin()).arg(sp.dec()->arcsec())); + RAEle->write_w->setText(TQString("%1:%2:%3").arg(sp.ra()->hour()).arg(sp.ra()->minute()).arg(sp.ra()->second())); + DecEle->write_w->setText(TQString("%1:%2:%3").arg(sp.dec()->degree()).arg(sp.dec()->arcmin()).arg(sp.dec()->arcsec())); break; @@ -1009,8 +1009,8 @@ void DetailDialog::centerTelescope() sp.setAlt(*ksw->map()->clickedPoint()->alt()); } - AzEle->write_w->setText(QString("%1:%2:%3").arg(sp.az()->degree()).arg(sp.az()->arcmin()).arg(sp.az()->arcsec())); - AltEle->write_w->setText(QString("%1:%2:%3").arg(sp.alt()->degree()).arg(sp.alt()->arcmin()).arg(sp.alt()->arcsec())); + AzEle->write_w->setText(TQString("%1:%2:%3").arg(sp.az()->degree()).arg(sp.az()->arcmin()).arg(sp.az()->arcsec())); + AltEle->write_w->setText(TQString("%1:%2:%3").arg(sp.alt()->degree()).arg(sp.alt()->arcmin()).arg(sp.alt()->arcsec())); break; } @@ -1039,8 +1039,8 @@ void DetailDialog::showThumbnail() { //Try to load the object's image from disk //If no image found, load "no image" image //If that isn't found, make it blank. - QFile file; - QString fname = "thumb-" + selectedObject->name().lower().replace( QRegExp(" "), "" ) + ".png"; + TQFile file; + TQString fname = "thumb-" + selectedObject->name().lower().replace( TQRegExp(" "), "" ) + ".png"; if ( KSUtils::openDataFile( file, fname ) ) { file.close(); Thumbnail->load( file.name(), "PNG" ); @@ -1058,9 +1058,9 @@ void DetailDialog::showThumbnail() { void DetailDialog::updateThumbnail() { ThumbnailPicker tp( selectedObject, *Thumbnail, this, "thumbnaileditor" ); - if ( tp.exec() == QDialog::Accepted ) { - QString fname = locateLocal( "appdata", "thumb-" - + selectedObject->name().lower().replace( QRegExp(" "), "" ) + ".png" ); + if ( tp.exec() == TQDialog::Accepted ) { + TQString fname = locateLocal( "appdata", "thumb-" + + selectedObject->name().lower().replace( TQRegExp(" "), "" ) + ".png" ); Data->Image->setPixmap( *(tp.image()) ); @@ -1070,7 +1070,7 @@ void DetailDialog::updateThumbnail() { Data->Image->pixmap()->save( fname, "PNG" ); *Thumbnail = *(Data->Image->pixmap()); } else { - QFile f; + TQFile f; f.setName( fname ); f.remove(); } diff --git a/kstars/kstars/detaildialog.h b/kstars/kstars/detaildialog.h index 115353e2..2bf6a452 100644 --- a/kstars/kstars/detaildialog.h +++ b/kstars/kstars/detaildialog.h @@ -18,9 +18,9 @@ #ifndef DETAILDIALOG_H #define DETAILDIALOG_H -#include <qfile.h> -#include <qlabel.h> -#include <qptrlist.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqptrlist.h> #include <kdialogbase.h> #include <ktextedit.h> @@ -44,8 +44,8 @@ class DetailsLogUI; struct ADVTreeData { - QString Name; - QString Link; + TQString Name; + TQString Link; int Type; }; @@ -57,31 +57,31 @@ struct ADVTreeData class LogEdit : public KTextEdit { Q_OBJECT public: - LogEdit( QWidget *parent=0, const char *name=0 ); + LogEdit( TQWidget *parent=0, const char *name=0 ); ~LogEdit() {} signals: void focusOut(); protected: - void focusOutEvent( QFocusEvent *e ); + void focusOutEvent( TQFocusEvent *e ); }; -/**@class ClickLabel is a QLabel with a clicked() signal. +/**@class ClickLabel is a TQLabel with a clicked() signal. *@author Jason Harris *@version 1.0 */ -class ClickLabel : public QLabel { +class ClickLabel : public TQLabel { Q_OBJECT public: - ClickLabel( QWidget *parent=0, const char *name=0 ); + ClickLabel( TQWidget *parent=0, const char *name=0 ); ~ClickLabel() {} signals: void clicked(); protected: - void mousePressEvent( QMouseEvent *e ) { if ( e->button() == LeftButton ) emit clicked(); } + void mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton ) emit clicked(); } }; /**@class DetailDialog is a window showing detailed information for a selected object. @@ -107,13 +107,13 @@ class DetailDialog : public KDialogBase { public: /**Constructor */ - DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *geo, QWidget *parent=0, const char *name=0); + DetailDialog(SkyObject *o, const KStarsDateTime &ut, GeoLocation *geo, TQWidget *parent=0, const char *name=0); /**Destructor (empty) */ ~DetailDialog() {} - QPixmap* thumbnail() { return Thumbnail; } + TQPixmap* thumbnail() { return Thumbnail; } public slots: /**@short Add this object to the observing list. @@ -177,12 +177,12 @@ public slots: private: /**Read in the user's customized URL file (either images or info webpages), - *and store the file's lines in a QStringList. + *and store the file's lines in a TQStringList. *@param type 0=Image URLs; 1=Info URLs */ bool readUserFile(int type); -/**Parse the QStringList containing the User's URLs. +/**Parse the TQStringList containing the User's URLs. *@param type 0=Image URLs; 1=Info URLs */ bool verifyUserData(int type); @@ -211,32 +211,32 @@ private: /**Populate the TreeView of known astronomical databases in the Advanced Tab */ - void populateADVTree(QListViewItem *parent); + void populateADVTree(TQListViewItem *parent); /**For the databases TreeView */ - void forkTree(QListViewItem *parent); + void forkTree(TQListViewItem *parent); /**Data for the Advanced Tab TreeView is stored in the file advinterface.dat. *This function parses advinterface.dat. */ - QString parseADVData(QString link); + TQString parseADVData(TQString link); SkyObject *selectedObject; KStars* ksw; // Edit Link Dialog - QHBoxLayout *editLinkLayout; - QLabel *editLinkURL; - QLineEdit *editLinkField; - QFile file; - QPixmap *Thumbnail; + TQHBoxLayout *editLinkLayout; + TQLabel *editLinkURL; + TQLineEdit *editLinkField; + TQFile file; + TQPixmap *Thumbnail; int currentItemIndex; - QString currentItemURL, currentItemTitle; - QStringList dataList; + TQString currentItemURL, currentItemTitle; + TQStringList dataList; - QPtrListIterator<ADVTreeData> * treeIt; + TQPtrListIterator<ADVTreeData> * treeIt; DetailsDataUI *Data; DetailsPositionUI *Pos; diff --git a/kstars/kstars/devicemanager.cpp b/kstars/kstars/devicemanager.cpp index 5552fe39..0f95455c 100644 --- a/kstars/kstars/devicemanager.cpp +++ b/kstars/kstars/devicemanager.cpp @@ -21,8 +21,8 @@ #include "kstars.h" #include "kstarsdatetime.h" -#include <qsocketnotifier.h> -#include <qtextedit.h> +#include <tqsocketnotifier.h> +#include <tqtextedit.h> #include <klocale.h> #include <kdebug.h> @@ -80,14 +80,14 @@ DeviceManager::~DeviceManager() } -bool DeviceManager::indiConnect(QString inHost, QString inPort) +bool DeviceManager::indiConnect(TQString inHost, TQString inPort) { host = inHost; port = inPort; - QString errMsg; + TQString errMsg; struct sockaddr_in pin; struct hostent *serverHostName = gethostbyname(host.ascii()); - errMsg = QString("Connection to INDI host at %1 on port %2 failed.").arg(host).arg(port); + errMsg = TQString("Connection to INDI host at %1 on port %2 failed.").arg(host).arg(port); memset(&pin, 0, sizeof(pin)); pin.sin_family = AF_INET; @@ -108,8 +108,8 @@ bool DeviceManager::indiConnect(QString inHost, QString inPort) } // callback notified - sNotifier = new QSocketNotifier( serverFD, QSocketNotifier::Read, this); - QObject::connect( sNotifier, SIGNAL(activated(int)), this, SLOT(dataReceived())); + sNotifier = new TQSocketNotifier( serverFD, TQSocketNotifier::Read, this); + TQObject::connect( sNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(dataReceived())); if (XMLParser) delLilXML(XMLParser); @@ -155,7 +155,7 @@ void DeviceManager::dataReceived() sNotifier->disconnect(); close(serverFD); parent->removeDeviceMgr(mgrID); - KMessageBox::error(0, QString::fromLatin1(errmsg)); + KMessageBox::error(0, TQString::fromLatin1(errmsg)); return; } @@ -244,7 +244,7 @@ int DeviceManager::delPropertyCmd (XMLEle *root, char errmsg[]) /* Delete property if it exists, otherwise, delete the whole device */ if (ap) { - pp = dp->findProp(QString(valuXMLAtt(ap))); + pp = dp->findProp(TQString(valuXMLAtt(ap))); if(pp) return dp->removeProperty(pp); @@ -257,7 +257,7 @@ int DeviceManager::delPropertyCmd (XMLEle *root, char errmsg[]) } -int DeviceManager::removeDevice(QString devName, char errmsg[]) +int DeviceManager::removeDevice(TQString devName, char errmsg[]) { // remove all devices if devName == NULL @@ -281,7 +281,7 @@ int DeviceManager::removeDevice(QString devName, char errmsg[]) return -1; } -INDI_D * DeviceManager::findDev (QString devName, char errmsg[]) +INDI_D * DeviceManager::findDev (TQString devName, char errmsg[]) { /* search for existing */ for (unsigned int i = 0; i < indi_dev.count(); i++) @@ -312,7 +312,7 @@ INDI_D * DeviceManager::addDevice (XMLEle *dep, char errmsg[]) if (parent->currentLabel.isEmpty()) parent->setCustomLabel(valuXMLAtt(ap)); - dp = new INDI_D(parent, this, QString(valuXMLAtt(ap)), parent->currentLabel); + dp = new INDI_D(parent, this, TQString(valuXMLAtt(ap)), parent->currentLabel); indi_dev.append(dp); @@ -339,7 +339,7 @@ INDI_D * DeviceManager::findDev (XMLEle *root, int create, char errmsg[]) /* search for existing */ for (uint i = 0; i < indi_dev.count(); i++) { - if (indi_dev.at(i)->name == QString(dn)) + if (indi_dev.at(i)->name == TQString(dn)) return (indi_dev.at(i)); } @@ -379,7 +379,7 @@ void DeviceManager::checkMsg (XMLEle *root, INDI_D *dp) */ void DeviceManager::doMsg (XMLEle *msg, INDI_D *dp) { - QTextEdit *txt_w; + TQTextEdit *txt_w; XMLAtt *message; XMLAtt *timestamp; @@ -395,17 +395,17 @@ void DeviceManager::doMsg (XMLEle *msg, INDI_D *dp) timestamp = findXMLAtt (msg, "timestamp"); if (timestamp) - txt_w->insert(QString(valuXMLAtt(timestamp)) + QString(" ")); + txt_w->insert(TQString(valuXMLAtt(timestamp)) + TQString(" ")); else txt_w->insert( KStarsDateTime::currentDateTime().toString("yyyy/mm/dd - h:m:s ap ")); /* finally! the msg */ message = findXMLAtt(msg, "message"); - txt_w->insert( QString(valuXMLAtt(message)) + QString("\n")); + txt_w->insert( TQString(valuXMLAtt(message)) + TQString("\n")); if ( Options::indiMessages() ) - parent->ksw->statusBar()->changeItem( QString(valuXMLAtt(message)), 0); + parent->ksw->statusBar()->changeItem( TQString(valuXMLAtt(message)), 0); } @@ -468,7 +468,7 @@ void DeviceManager::sendNewSwitch (INDI_P *pp, int index) } -void DeviceManager::startBlob (QString devName, QString propName, QString timestamp) +void DeviceManager::startBlob (TQString devName, TQString propName, TQString timestamp) { fprintf (serverFP, "<newBLOBVector\n"); @@ -478,7 +478,7 @@ void DeviceManager::startBlob (QString devName, QString propName, QString timest } -void DeviceManager::sendOneBlob(QString blobName, unsigned int blobSize, QString blobFormat, unsigned char * blobBuffer) +void DeviceManager::sendOneBlob(TQString blobName, unsigned int blobSize, TQString blobFormat, unsigned char * blobBuffer) { fprintf (serverFP, " <oneBLOB\n"); diff --git a/kstars/kstars/devicemanager.h b/kstars/kstars/devicemanager.h index 53c9d78d..cf304522 100644 --- a/kstars/kstars/devicemanager.h +++ b/kstars/kstars/devicemanager.h @@ -32,13 +32,13 @@ class DeviceManager : public QObject INDIMenu *parent; - QPtrList<INDI_D> indi_dev; + TQPtrList<INDI_D> indi_dev; int mgrID; int serverFD; FILE *serverFP; LilXML *XMLParser; - QSocketNotifier *sNotifier; + TQSocketNotifier *sNotifier; QString host; QString port; @@ -53,22 +53,22 @@ class DeviceManager : public QObject void sendNewText (INDI_P *pp); void sendNewNumber (INDI_P *pp); void sendNewSwitch (INDI_P *pp, int index); - void startBlob (QString devName, QString propName, QString timestamp); - void sendOneBlob(QString blobName, unsigned int blobSize, QString blobFormat, unsigned char * blobBuffer); + void startBlob (TQString devName, TQString propName, TQString timestamp); + void sendOneBlob(TQString blobName, unsigned int blobSize, TQString blobFormat, unsigned char * blobBuffer); void finishBlob(); /***************************************************************** * Misc. ******************************************************************/ int delPropertyCmd (XMLEle *root, char errmsg[]); - int removeDevice (QString devName, char errmsg[]); - INDI_D * findDev (QString devName, char errmsg[]); + int removeDevice (TQString devName, char errmsg[]); + INDI_D * findDev (TQString devName, char errmsg[]); int messageCmd (XMLEle *root, char errmsg[]); void checkMsg (XMLEle *root, INDI_D *dp); void doMsg (XMLEle *msg , INDI_D *dp); - bool indiConnect (QString inHost, QString inPort); + bool indiConnect (TQString inHost, TQString inPort); public slots: void dataReceived(); diff --git a/kstars/kstars/dms.cpp b/kstars/kstars/dms.cpp index c6defc32..724f9af2 100644 --- a/kstars/kstars/dms.cpp +++ b/kstars/kstars/dms.cpp @@ -20,7 +20,7 @@ #include "dms.h" #include <kglobal.h> #include <klocale.h> -#include <qregexp.h> +#include <tqregexp.h> void dms::setD( const double &x ) { D = x; @@ -51,26 +51,26 @@ void dms::setRadians( const double &Rad ) { Radians = Rad; } -bool dms::setFromString( const QString &str, bool isDeg ) { +bool dms::setFromString( const TQString &str, bool isDeg ) { int d(0), m(0); double s(0.0); bool checkValue( false ), badEntry( false ), negative( false ); - QString entry = str.stripWhiteSpace(); + TQString entry = str.stripWhiteSpace(); //remove any instances of unit characters. //h, d, m, s, ', ", or the degree symbol (ASCII 176) - entry.replace( QRegExp("h"), "" ); - entry.replace( QRegExp("d"), "" ); - entry.replace( QRegExp("m"), "" ); - entry.replace( QRegExp("s"), "" ); - QString sdeg; + entry.replace( TQRegExp("h"), "" ); + entry.replace( TQRegExp("d"), "" ); + entry.replace( TQRegExp("m"), "" ); + entry.replace( TQRegExp("s"), "" ); + TQString sdeg; sdeg.sprintf("%c", 176); - entry.replace( QRegExp(sdeg), "" ); - entry.replace( QRegExp("\'"), "" ); - entry.replace( QRegExp("\""), "" ); + entry.replace( TQRegExp(sdeg), "" ); + entry.replace( TQRegExp("\'"), "" ); + entry.replace( TQRegExp("\""), "" ); //Account for localized decimal-point settings - //QString::toDouble() requires that the decimal symbol is "." + //TQString::toDouble() requires that the decimal symbol is "." entry.replace( KGlobal::locale()->decimalSymbol(), "." ); //empty entry returns false @@ -96,12 +96,12 @@ bool dms::setFromString( const QString &str, bool isDeg ) { } //try parsing multiple fields. - QStringList fields; + TQStringList fields; //check for colon-delimiters or space-delimiters if ( entry.contains(':') ) - fields = QStringList::split( ':', entry ); - else fields = QStringList::split( " ", entry ); + fields = TQStringList::split( ':', entry ); + else fields = TQStringList::split( " ", entry ); //anything with one field is invalid! if ( fields.count() == 1 ) { @@ -116,12 +116,12 @@ bool dms::setFromString( const QString &str, bool isDeg ) { //If field[1] is neither int nor double, return false. if ( fields.count() == 2 ) { m = fields[1].toInt( &checkValue ); - if ( checkValue ) fields.append( QString( "0" ) ); + if ( checkValue ) fields.append( TQString( "0" ) ); else { double mx = fields[1].toDouble( &checkValue ); if ( checkValue ) { - fields[1] = QString("%1").arg( int(mx) ); - fields.append( QString("%1").arg( int( 60.0*(mx - int(mx)) ) ) ); + fields[1] = TQString("%1").arg( int(mx) ); + fields.append( TQString("%1").arg( int( 60.0*(mx - int(mx)) ) ) ); } else { setD( 0.0 ); return false; @@ -277,8 +277,8 @@ const dms dms::reduce( void ) const { return dms( a ); } -const QString dms::toDMSString(bool forceSign) const { - QString dummy; +const TQString dms::toDMSString(bool forceSign) const { + TQString dummy; char pm(' '); int dd = abs(degree()); int dm = abs(arcmin()); @@ -287,19 +287,19 @@ const QString dms::toDMSString(bool forceSign) const { if ( Degrees() < 0.0 ) pm = '-'; else if (forceSign && Degrees() > 0.0 ) pm = '+'; - QString format( "%c%3d%c %02d\' %02d\"" ); + TQString format( "%c%3d%c %02d\' %02d\"" ); if ( dd < 100 ) format = "%c%2d%c %02d\' %02d\""; if ( dd < 10 ) format = "%c%1d%c %02d\' %02d\""; return dummy.sprintf(format.local8Bit(), pm, dd, 176, dm, ds); } -const QString dms::toHMSString() const { - QString dummy; +const TQString dms::toHMSString() const { + TQString dummy; return dummy.sprintf("%02dh %02dm %02ds", hour(), minute(), second()); } -dms dms::fromString(QString & st, bool deg) { +dms dms::fromString(TQString & st, bool deg) { dms result; bool ok( false ); diff --git a/kstars/kstars/dms.h b/kstars/kstars/dms.h index 33efa118..7cbbaa22 100644 --- a/kstars/kstars/dms.h +++ b/kstars/kstars/dms.h @@ -19,7 +19,7 @@ #define DMS_H #include <math.h> -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> //TODO: Remove these when KStarsDateTime is added! @@ -75,7 +75,7 @@ public: *@param isDeg if true, value is in degrees; if false, value is in hours. *@sa setFromString() */ - dms( const QString &s, bool isDeg=true ) { setFromString( s, isDeg ); } + dms( const TQString &s, bool isDeg=true ) { setFromString( s, isDeg ); } /**Destructor (empty). */ @@ -234,7 +234,7 @@ public: *@return true if sting was parsed successfully. Otherwise, set the dms value *to 0.0 and return false. */ - bool setFromString( const QString &s, bool isDeg=true ); + bool setFromString( const TQString &s, bool isDeg=true ); /** *Addition operator. Add two dms objects. @@ -320,12 +320,12 @@ public: /**@return a nicely-formatted string representation of the angle *in degrees, arcminutes, and arcseconds. */ - const QString toDMSString(const bool forceSign = false) const; + const TQString toDMSString(const bool forceSign = false) const; /**@return a nicely-formatted string representation of the angle *in hours, minutes, and seconds. */ - const QString toHMSString() const; + const TQString toHMSString() const; /**PI is a const static member; it's public so that it can be used anywhere, *as long as dms.h is included. @@ -337,7 +337,7 @@ public: */ static const double DegToRad; -/**@short Static function to create a DMS object from a QString. +/**@short Static function to create a DMS object from a TQString. * *There are several ways to specify the angle: *@li Integer numbers ( 5 or -33 ) @@ -351,7 +351,7 @@ public: *@param deg if TRUE, s is expressed in degrees; if FALSE, s is expressed in hours *@return a dms object whose value is parsed from the string argument */ - static dms fromString(QString & s, bool deg); + static dms fromString(TQString & s, bool deg); private: double D; diff --git a/kstars/kstars/dmsbox.cpp b/kstars/kstars/dmsbox.cpp index fa734fae..1857b1bf 100644 --- a/kstars/kstars/dmsbox.cpp +++ b/kstars/kstars/dmsbox.cpp @@ -21,31 +21,31 @@ #include <kdebug.h> #include <klocale.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> -dmsBox::dmsBox(QWidget *parent, const char *name, bool dg) +dmsBox::dmsBox(TQWidget *parent, const char *name, bool dg) : KLineEdit(parent,name), EmptyFlag(true) { setMaxLength(14); setMaximumWidth(160); setDegType( dg ); - connect( this, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotTextChanged( const QString & ) ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotTextChanged( const TQString & ) ) ); } void dmsBox::setEmptyText() { - QPalette p = palette(); - QColor txc = p.color( QPalette::Active, QColorGroup::Text ); - QColor bgc = paletteBackgroundColor(); + TQPalette p = palette(); + TQColor txc = p.color( TQPalette::Active, TQColorGroup::Text ); + TQColor bgc = paletteBackgroundColor(); int r( ( txc.red() + bgc.red() )/2 ); int g( ( txc.green() + bgc.green() )/2 ); int b( ( txc.blue() + bgc.blue() )/2 ); - p.setColor( QPalette::Active, QColorGroup::Text, QColor( r, g, b ) ); - p.setColor( QPalette::Inactive, QColorGroup::Text, QColor( r, g, b ) ); + p.setColor( TQPalette::Active, TQColorGroup::Text, TQColor( r, g, b ) ); + p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQColor( r, g, b ) ); setPalette( p ); if ( degType() ) @@ -56,7 +56,7 @@ void dmsBox::setEmptyText() { EmptyFlag = true; } -void dmsBox::focusInEvent( QFocusEvent *e ) { +void dmsBox::focusInEvent( TQFocusEvent *e ) { KLineEdit::focusInEvent( e ); if ( EmptyFlag ) { @@ -66,7 +66,7 @@ void dmsBox::focusInEvent( QFocusEvent *e ) { } } -void dmsBox::focusOutEvent( QFocusEvent *e ) { +void dmsBox::focusOutEvent( TQFocusEvent *e ) { KLineEdit::focusOutEvent( e ); if ( text().isEmpty() ) { @@ -74,7 +74,7 @@ void dmsBox::focusOutEvent( QFocusEvent *e ) { } } -void dmsBox::slotTextChanged( const QString &t ) { +void dmsBox::slotTextChanged( const TQString &t ) { if ( ! hasFocus() ) { if ( EmptyFlag && ! t.isEmpty() ) { unsetPalette(); @@ -91,11 +91,11 @@ void dmsBox::setDegType( bool t ) { deg = t; if ( deg ) { - QToolTip::add( this, i18n( "Angle value in degrees. You may enter a simple integer \nor a floating-point value, or space- or colon-delimited values \nspecifying degrees, arcminutes and arcseconds." ) ); - QWhatsThis::add( this, i18n( "Enter an angle value in degrees. The angle can be expressed as a simple integer (\"45\") or floating-point (\"45.333\") value, or as space- or colon-delimited values specifying degrees, arcminutes and arcseconds (\"45:20\", \"45:20:00\", \"45:20\", \"45 20.0\", etc.)." ) ); + TQToolTip::add( this, i18n( "Angle value in degrees. You may enter a simple integer \nor a floating-point value, or space- or colon-delimited values \nspecifying degrees, arcminutes and arcseconds." ) ); + TQWhatsThis::add( this, i18n( "Enter an angle value in degrees. The angle can be expressed as a simple integer (\"45\") or floating-point (\"45.333\") value, or as space- or colon-delimited values specifying degrees, arcminutes and arcseconds (\"45:20\", \"45:20:00\", \"45:20\", \"45 20.0\", etc.)." ) ); } else { - QToolTip::add( this, i18n( "Angle value in hours. You may enter a simple integer \nor floating-point value, or space- or colon-delimited values \nspecifying hours, minutes and seconds." ) ); - QWhatsThis::add( this, i18n( "Enter an angle value in hours. The angle can be expressed as a simple integer (\"12\") or floating-point (\"12.333\") value, or as space- or colon-delimited values specifying hours, minutes and seconds (\"12:20\", \"12:20:00\", \"12:20\", \"12 20.0\", etc.)." ) ); + TQToolTip::add( this, i18n( "Angle value in hours. You may enter a simple integer \nor floating-point value, or space- or colon-delimited values \nspecifying hours, minutes and seconds." ) ); + TQWhatsThis::add( this, i18n( "Enter an angle value in hours. The angle can be expressed as a simple integer (\"12\") or floating-point (\"12.333\") value, or as space- or colon-delimited values specifying hours, minutes and seconds (\"12:20\", \"12:20:00\", \"12:20\", \"12 20.0\", etc.)." ) ); } clear(); @@ -108,14 +108,14 @@ void dmsBox::showInDegrees (const dms *d) { showInDegrees( dms( *d ) ); } void dmsBox::showInDegrees (dms d) { double seconds = d.arcsec() + d.marcsec()/1000.; - setDMS( QString().sprintf( "%02d %02d %05.2f", d.degree(), d.arcmin(), seconds ) ); + setDMS( TQString().sprintf( "%02d %02d %05.2f", d.degree(), d.arcmin(), seconds ) ); } void dmsBox::showInHours (const dms *d) { showInHours( dms( *d ) ); } void dmsBox::showInHours (dms d) { double seconds = d.second() + d.msecond()/1000.; - setDMS( QString().sprintf( "%02d %02d %05.2f", d.hour(), d.minute(), seconds ) ); + setDMS( TQString().sprintf( "%02d %02d %05.2f", d.hour(), d.minute(), seconds ) ); } void dmsBox::show(const dms *d, bool deg) { show( dms( *d ),deg ); } diff --git a/kstars/kstars/dmsbox.h b/kstars/kstars/dmsbox.h index 2e66042b..c98bc2c1 100644 --- a/kstars/kstars/dmsbox.h +++ b/kstars/kstars/dmsbox.h @@ -51,7 +51,7 @@ public: *@param deg if TRUE use deg/arcmin/arcsec; otherwise * use hours/min/sec. */ - dmsBox(QWidget *parent, const char *ni=0, bool deg=TRUE); + dmsBox(TQWidget *parent, const char *ni=0, bool deg=TRUE); /**Destructor (empty)*/ ~dmsBox(); @@ -99,7 +99,7 @@ public: *@note JH: Why don't we just use KLineEdit::setText() instead? *@param s the string to display (it need not be a valid angle value). */ - void setDMS(QString s) { setText(s); } + void setDMS(TQString s) { setText(s); } /**Parse the text in the dmsBox as an angle. The text may be an integer *or double value, or it may be a triplet of integer values (separated by spaces @@ -128,11 +128,11 @@ public: void clearFields (void) { setDMS(""); } protected: - void focusInEvent( QFocusEvent *e ); - void focusOutEvent( QFocusEvent *e ); + void focusInEvent( TQFocusEvent *e ); + void focusOutEvent( TQFocusEvent *e ); private slots: - void slotTextChanged( const QString &t ); + void slotTextChanged( const TQString &t ); private: void setEmptyText(); diff --git a/kstars/kstars/draglistbox.cpp b/kstars/kstars/draglistbox.cpp index 4e8dd9e7..74cd169f 100644 --- a/kstars/kstars/draglistbox.cpp +++ b/kstars/kstars/draglistbox.cpp @@ -15,13 +15,13 @@ * * ***************************************************************************/ -#include <qdragobject.h> +#include <tqdragobject.h> #include <klocale.h> #include <kdebug.h> #include "draglistbox.h" -DragListBox::DragListBox( QWidget *parent, const char *name, WFlags f ) +DragListBox::DragListBox( TQWidget *parent, const char *name, WFlags f ) : KListBox( parent, name, f ) { setAcceptDrops( TRUE ); @@ -30,36 +30,36 @@ DragListBox::DragListBox( QWidget *parent, const char *name, WFlags f ) DragListBox::~DragListBox() {} -void DragListBox::dragEnterEvent( QDragEnterEvent *evt ) +void DragListBox::dragEnterEvent( TQDragEnterEvent *evt ) { - if ( QTextDrag::canDecode( evt ) ) + if ( TQTextDrag::canDecode( evt ) ) evt->accept(); } -bool DragListBox::contains( const QString &s ) const { +bool DragListBox::contains( const TQString &s ) const { for ( uint i=0; i<count(); ++i ) if ( text(i) == s ) return true; return false; } -void DragListBox::dropEvent( QDropEvent *evt ) { - QString text; +void DragListBox::dropEvent( TQDropEvent *evt ) { + TQString text; int i = int( float(evt->pos().y())/float(itemHeight()) + 0.5 ) + topItem(); if ( i > count() + 1 ) i = count() + 1; - if ( QTextDrag::decode( evt, text ) ) { + if ( TQTextDrag::decode( evt, text ) ) { //If we dragged an "Ignore item from the FieldList to the FieldPool, then we don't //need to insert the item, because FieldPool already has a persistent Ignore item. - if ( !( text == i18n("Ignore" ) && QString(evt->source()->name()) == "FieldList" && + if ( !( text == i18n("Ignore" ) && TQString(evt->source()->name()) == "FieldList" && evt->source() != this )) { insertItem( text, i ); } //If we dragged the "Ignore" item from FieldPool to FieldList, then we don't //want to remove the item from the FieldPool - if ( !( text == i18n("Ignore" ) && QString(evt->source()->name()) == "FieldPool" && + if ( !( text == i18n("Ignore" ) && TQString(evt->source()->name()) == "FieldPool" && evt->source() != this ) ) { DragListBox *fp = (DragListBox*)evt->source(); fp->removeItem( fp->currentItem() ); @@ -68,8 +68,8 @@ void DragListBox::dropEvent( QDropEvent *evt ) { } -void DragListBox::mousePressEvent( QMouseEvent *evt ) { - QListBox::mousePressEvent( evt ); +void DragListBox::mousePressEvent( TQMouseEvent *evt ) { + TQListBox::mousePressEvent( evt ); dragging = TRUE; //Record position of the Ignore item; we may have to restore it. @@ -80,10 +80,10 @@ void DragListBox::mousePressEvent( QMouseEvent *evt ) { } -void DragListBox::mouseMoveEvent( QMouseEvent * ) +void DragListBox::mouseMoveEvent( TQMouseEvent * ) { if ( dragging ) { - QDragObject *drag = new QTextDrag( currentText(), this ); + TQDragObject *drag = new TQTextDrag( currentText(), this ); drag->dragMove(); dragging = FALSE; } diff --git a/kstars/kstars/draglistbox.h b/kstars/kstars/draglistbox.h index cf6d5c3c..c4fce08b 100644 --- a/kstars/kstars/draglistbox.h +++ b/kstars/kstars/draglistbox.h @@ -35,19 +35,19 @@ class DragListBox : public KListBox { public: /**@short Default constructor */ - DragListBox( QWidget *parent = 0, const char *name = 0, WFlags = 0 ); + DragListBox( TQWidget *parent = 0, const char *name = 0, WFlags = 0 ); /**@short Default destructor */ ~DragListBox(); int ignoreIndex() const { return IgnoreIndex; } - bool contains( const QString &s ) const; + bool contains( const TQString &s ) const; - void dragEnterEvent( QDragEnterEvent *evt ); - void dropEvent( QDropEvent *evt ); - void mousePressEvent( QMouseEvent *evt ); - void mouseMoveEvent( QMouseEvent * ); + void dragEnterEvent( TQDragEnterEvent *evt ); + void dropEvent( TQDropEvent *evt ); + void mousePressEvent( TQMouseEvent *evt ); + void mouseMoveEvent( TQMouseEvent * ); private: bool dragging; int IgnoreIndex; diff --git a/kstars/kstars/filesource.cpp b/kstars/kstars/filesource.cpp index 61977937..8e38d9a4 100644 --- a/kstars/kstars/filesource.cpp +++ b/kstars/kstars/filesource.cpp @@ -50,17 +50,17 @@ FileSource::~FileSource() { int FileSource::readyToSend() { // readyToSend == 0 -> no data but not end of stream // readyToSend > 0 -> data ready to send - // readyToSend == -1 -> end of stream, QDataPump will destroy this FileSource object + // readyToSend == -1 -> end of stream, TQDataPump will destroy this FileSource object if (readingData == true) return 1; else return -1; } -void FileSource::sendTo(QDataSink *sink, int) { +void FileSource::sendTo(TQDataSink *sink, int) { counter = 0; while (data->starFileReader->hasMoreLines() && counter < maxLines) { - QString line = data->starFileReader->readLine(); + TQString line = data->starFileReader->readLine(); float mag = line.mid( 46, 5 ).toFloat(); // check magnitude // kdDebug() << "mag=" << mag << " maxmag=" << maxMagnitude << endl; if (mag > maxMagnitude) { diff --git a/kstars/kstars/filesource.h b/kstars/kstars/filesource.h index 39fb83bd..d9ab95d9 100644 --- a/kstars/kstars/filesource.h +++ b/kstars/kstars/filesource.h @@ -20,20 +20,20 @@ /**@class FileSource *FileSource is an asynchronous class for reloading star data while running - *the program. It's basing on QDataSource class and implements the function - *for reading a file step by step and send these data to an QDataSink object. + *the program. It's basing on TQDataSource class and implements the function + *for reading a file step by step and send these data to an TQDataSink object. *KStarsData uses this class for asynchronous io. *@author Thomas Kabelmann *@version 1.0 */ -#include <qasyncio.h> -#include <qstring.h> +#include <tqasyncio.h> +#include <tqstring.h> class KStarsData; class KSFileReader; -class FileSource : public QDataSource { +class FileSource : public TQDataSource { public: /**constructor needs an KStarsData object, a file name and the new magnitude @@ -53,12 +53,12 @@ class FileSource : public QDataSource { */ bool rewindable() { return false; } - /**The function for sending data to an QDataSink object. Here will all data + /**The function for sending data to an TQDataSink object. Here will all data *operations defined. Because this function is virtual, we need a second int *parameter, but we don't use it, so it's unnamed. - *@p sink pointer to the QDataSink object which will receive the data stream + *@p sink pointer to the TQDataSink object which will receive the data stream */ - void sendTo( QDataSink *sink, int ); + void sendTo( TQDataSink *sink, int ); /**@return current magnitude to load (always returns maxMagnitude) */ @@ -82,7 +82,7 @@ class FileSource : public QDataSource { KStarsData *data; /**maxLines defines how many lines in data file should be read and - *send to QDataSink. This is only needed if a data block is longer + *send to TQDataSink. This is only needed if a data block is longer *than the max defined lines. I figured out this value of 500 *on a fast system, so if it is to high the value might be decreased. *A high value means faster reloading but perhaps on slow systems this @@ -98,7 +98,7 @@ class FileSource : public QDataSource { /**The loaded data will stored in a string array and a pointer to first *object in array will send to StarDataSink. */ - QString stringArray[ maxLines ]; + TQString stringArray[ maxLines ]; }; diff --git a/kstars/kstars/finddialog.cpp b/kstars/kstars/finddialog.cpp index cf203e34..29dfa6cb 100644 --- a/kstars/kstars/finddialog.cpp +++ b/kstars/kstars/finddialog.cpp @@ -15,12 +15,12 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qlistbox.h> -#include <qtimer.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqlistbox.h> +#include <tqtimer.h> #include <kmessagebox.h> @@ -33,25 +33,25 @@ #include "objectnamelist.h" -FindDialog::FindDialog( QWidget* parent ) : +FindDialog::FindDialog( TQWidget* parent ) : KDialogBase( KDialogBase::Plain, i18n( "Find Object" ), Ok|Cancel, Ok, parent ), vlay(0), hlay(0), SearchList(0), SearchBox(0), filterTypeLabel(0), filterType(0), currentitem(0) { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); //Create Layout managers - vlay = new QVBoxLayout( page, 2, 2 ); - hlay = new QHBoxLayout( 2 ); //this mgr will be added to vlay + vlay = new TQVBoxLayout( page, 2, 2 ); + hlay = new TQHBoxLayout( 2 ); //this mgr will be added to vlay //Create Widgets - SearchBox = new QLineEdit( page, "SearchBox" ); + SearchBox = new TQLineEdit( page, "SearchBox" ); - filterTypeLabel = new QLabel( page, "filterTypeLabel" ); + filterTypeLabel = new TQLabel( page, "filterTypeLabel" ); filterTypeLabel->setAlignment( AlignRight ); filterTypeLabel->setText( i18n( "Filter by type: " ) ); - filterType = new QComboBox( page, "filterType" ); + filterType = new TQComboBox( page, "filterType" ); filterType->setEditable( false ); filterType->insertItem( i18n ("Any") ); filterType->insertItem( i18n ("Stars") ); @@ -67,11 +67,11 @@ FindDialog::FindDialog( QWidget* parent ) : filterType->insertItem( i18n ("Asteroids") ); filterType->insertItem( i18n ("Constellations") ); - SearchList = new QListBox( page, "SearchList" ); + SearchList = new TQListBox( page, "SearchList" ); SearchList->setMinimumWidth( 256 ); SearchList->setMinimumHeight( 320 ); - SearchList->setVScrollBarMode( QListBox::AlwaysOn ); - SearchList->setHScrollBarMode( QListBox::AlwaysOff ); + SearchList->setVScrollBarMode( TQListBox::AlwaysOn ); + SearchList->setHScrollBarMode( TQListBox::AlwaysOff ); //Pack Widgets into layout manager hlay->addWidget( filterTypeLabel, 0, 0 ); @@ -91,16 +91,16 @@ FindDialog::FindDialog( QWidget* parent ) : Filter = 0; //Connect signals to slots -// connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) ) ; - connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) ); - connect( SearchBox, SIGNAL( textChanged( const QString & ) ), SLOT( filter() ) ); - connect( SearchBox, SIGNAL( returnPressed() ), SLOT( slotOk() ) ); - connect( filterType, SIGNAL( activated( int ) ), this, SLOT( setFilter( int ) ) ); - connect( SearchList, SIGNAL (selectionChanged (QListBoxItem *)), SLOT (updateSelection (QListBoxItem *))); - connect( SearchList, SIGNAL( doubleClicked ( QListBoxItem * ) ), SLOT( slotOk() ) ); +// connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) ) ; + connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) ); + connect( SearchBox, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( filter() ) ); + connect( SearchBox, TQT_SIGNAL( returnPressed() ), TQT_SLOT( slotOk() ) ); + connect( filterType, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( setFilter( int ) ) ); + connect( SearchList, TQT_SIGNAL (selectionChanged (TQListBoxItem *)), TQT_SLOT (updateSelection (TQListBoxItem *))); + connect( SearchList, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), TQT_SLOT( slotOk() ) ); // first create and paint dialog and then load list - QTimer::singleShot(0, this, SLOT( init() )); + TQTimer::singleShot(0, this, TQT_SLOT( init() )); } FindDialog::~FindDialog() { @@ -121,7 +121,7 @@ void FindDialog::filter() { //Filter the list of names with the string in the S // check if latin names are used ObjNames.setLanguage( Options::useLatinConstellNames() ); - QString searchFor = SearchBox->text().lower(); + TQString searchFor = SearchBox->text().lower(); for ( SkyObjectName *name = ObjNames.first( searchFor ); name; name = ObjNames.next() ) { if ( name->text().lower().startsWith( searchFor ) ) { new SkyObjectNameListItem ( SearchList, name ); @@ -139,7 +139,7 @@ void FindDialog::filterByType() { KStars *p = (KStars *)parent(); SearchList->clear(); // QListBox - QString searchFor = SearchBox->text().lower(); // search string + TQString searchFor = SearchBox->text().lower(); // search string ObjectNameList &ObjNames = p->data()->ObjNames; // check if latin names are used @@ -167,7 +167,7 @@ void FindDialog::setListItemEnabled() { updateSelection (0); } -void FindDialog::updateSelection (QListBoxItem *it) { +void FindDialog::updateSelection (TQListBoxItem *it) { currentitem = (SkyObjectNameListItem *) it; SearchBox->setFocus(); // set cursor to QLineEdit } @@ -182,14 +182,14 @@ void FindDialog::setFilter( int f ) { Filter = f2; if ( Filter == 0 ) { // any type will shown // delete old connections and create new connections - disconnect( SearchBox, SIGNAL( textChanged( const QString & ) ), this, SLOT( filterByType() ) ); - connect( SearchBox, SIGNAL( textChanged( const QString & ) ), SLOT( filter() ) ); + disconnect( SearchBox, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( filterByType() ) ); + connect( SearchBox, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( filter() ) ); filter(); } else { // delete old connections and create new connections - disconnect( SearchBox, SIGNAL( textChanged( const QString & ) ), this, SLOT( filter() ) ); - connect( SearchBox, SIGNAL( textChanged( const QString & ) ), SLOT( filterByType() ) ); + disconnect( SearchBox, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( filter() ) ); + connect( SearchBox, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( filterByType() ) ); filterByType(); } } @@ -198,14 +198,14 @@ void FindDialog::setFilter( int f ) { void FindDialog::slotOk() { //If no valid object selected, show a sorry-box. Otherwise, emit accept() if ( currentItem() == 0 ) { - QString message = i18n( "No object named %1 found." ).arg( SearchBox->text() ); + TQString message = i18n( "No object named %1 found." ).arg( SearchBox->text() ); KMessageBox::sorry( 0, message, i18n( "Bad object name" ) ); } else { accept(); } } -void FindDialog::keyPressEvent( QKeyEvent *e ) { +void FindDialog::keyPressEvent( TQKeyEvent *e ) { switch( e->key() ) { case Key_Down : if ( SearchList->currentItem() < ((int) SearchList->count()) - 1 ) diff --git a/kstars/kstars/finddialog.h b/kstars/kstars/finddialog.h index dc18441c..76531f03 100644 --- a/kstars/kstars/finddialog.h +++ b/kstars/kstars/finddialog.h @@ -36,7 +36,7 @@ class SkyObjectNameListItem; /**@class FindDialog *Dialog window for finding SkyObjects by name. The dialog contains - *a QListBox showing the list of named objects, a QLineEdit for filtering + *a TQListBox showing the list of named objects, a TQLineEdit for filtering *the list by name, and a QCombobox for filtering the list by object type. * *@short Find Object Dialog @@ -51,7 +51,7 @@ public: /**Constructor. Creates all widgets and packs them in QLayouts. Connects *Signals and Slots. Runs initObjectList(). */ - FindDialog( QWidget* parent = 0 ); + FindDialog( TQWidget* parent = 0 ); /**Destructor */ @@ -62,12 +62,12 @@ public: SkyObjectNameListItem * currentItem() const { return currentitem; } public slots: -/**When Text is entered in the QLineEdit, filter the List of objects +/**When Text is entered in the TQLineEdit, filter the List of objects *so that only objects which start with the filter text are shown. */ void filter(); -/**When the selection of the object type QComboBox is changed, filter +/**When the selection of the object type TQComboBox is changed, filter *the List of objects so that only objects of the selected Type are shown. */ void filterByType(); @@ -85,7 +85,7 @@ private slots: /**Set the selected item in the list to the item specified. */ - void updateSelection (QListBoxItem *); + void updateSelection (TQListBoxItem *); /**Change current filter options. */ @@ -94,9 +94,9 @@ private slots: protected: /**Process Keystrokes. The Up and Down arrow keys are used to select the *Previous/Next item in the listbox of named objects. - *@param e The QKeyEvent pointer + *@param e The TQKeyEvent pointer */ - void keyPressEvent( QKeyEvent *e ); + void keyPressEvent( TQKeyEvent *e ); private: /** @@ -104,12 +104,12 @@ private: */ void setListItemEnabled(); - QVBoxLayout *vlay; - QHBoxLayout *hlay; - QListBox *SearchList; - QLineEdit *SearchBox; - QLabel *filterTypeLabel; - QComboBox *filterType; + TQVBoxLayout *vlay; + TQHBoxLayout *hlay; + TQListBox *SearchList; + TQLineEdit *SearchBox; + TQLabel *filterTypeLabel; + TQComboBox *filterType; SkyObjectNameListItem *currentitem; diff --git a/kstars/kstars/fitshistogram.cpp b/kstars/kstars/fitshistogram.cpp index 399aa548..3d28de46 100644 --- a/kstars/kstars/fitshistogram.cpp +++ b/kstars/kstars/fitshistogram.cpp @@ -23,13 +23,13 @@ #include <math.h> #include <stdlib.h> - #include <qpainter.h> - #include <qslider.h> - #include <qcursor.h> - #include <qpen.h> - #include <qpixmap.h> - #include <qradiobutton.h> - #include <qpushbutton.h> + #include <tqpainter.h> + #include <tqslider.h> + #include <tqcursor.h> + #include <tqpen.h> + #include <tqpixmap.h> + #include <tqradiobutton.h> + #include <tqpushbutton.h> #include <kdebug.h> #include <klineedit.h> @@ -37,7 +37,7 @@ - FITSHistogram::FITSHistogram(QWidget *parent, const char * name) : histDialog(parent, name) + FITSHistogram::FITSHistogram(TQWidget *parent, const char * name) : histDialog(parent, name) { viewer = (FITSViewer *) parent; @@ -58,11 +58,11 @@ histFrame->setMouseTracking(true); setMouseTracking(true); - connect(minSlider, SIGNAL(valueChanged(int)), this, SLOT(updateBoxes())); - connect(minSlider, SIGNAL(valueChanged(int)), this, SLOT(updateIntenFreq(int ))); - connect(maxSlider, SIGNAL(valueChanged(int)), this, SLOT(updateBoxes())); - connect(maxSlider, SIGNAL(valueChanged(int)), this, SLOT(updateIntenFreq(int ))); - connect(applyB, SIGNAL(clicked()), this, SLOT(applyScale())); + connect(minSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateBoxes())); + connect(minSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateIntenFreq(int ))); + connect(maxSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateBoxes())); + connect(maxSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(updateIntenFreq(int ))); + connect(applyB, TQT_SIGNAL(clicked()), this, TQT_SLOT(applyScale())); constructHistogram(viewer->imgBuffer); @@ -75,14 +75,14 @@ void FITSHistogram::updateBoxes() { if (minSlider->value() == BARS) - minOUT->setText(QString("%1").arg((int) viewer->stats.max)); + minOUT->setText(TQString("%1").arg((int) viewer->stats.max)); else - minOUT->setText(QString("%1").arg( (int) ( ceil (minSlider->value() * binSize) + viewer->stats.min))); + minOUT->setText(TQString("%1").arg( (int) ( ceil (minSlider->value() * binSize) + viewer->stats.min))); if (maxSlider->value() == BARS) - maxOUT->setText(QString("%1").arg((int) viewer->stats.max)); + maxOUT->setText(TQString("%1").arg((int) viewer->stats.max)); else - maxOUT->setText(QString("%1").arg( (int) ( ceil (maxSlider->value() * binSize) + viewer->stats.min))); + maxOUT->setText(TQString("%1").arg( (int) ( ceil (maxSlider->value() * binSize) + viewer->stats.min))); update(); } @@ -164,10 +164,10 @@ void FITSHistogram::constructHistogram(float * buffer) kdDebug() << "Maximum height is " << maxHeight << " -- binsize " << binSize << endl; - histogram = new QPixmap(500, 150, 1); + histogram = new TQPixmap(500, 150, 1); histogram->fill(Qt::black); - QPainter p(histogram); - QPen pen( white, 1); + TQPainter p(histogram); + TQPen pen( white, 1); p.setPen(pen); for (int i=0; i < BARS; i++) @@ -175,13 +175,13 @@ void FITSHistogram::constructHistogram(float * buffer) } -void FITSHistogram::paintEvent( QPaintEvent */*e*/) +void FITSHistogram::paintEvent( TQPaintEvent */*e*/) { int height = histFrame->height(); int xMin = minSlider->value(), xMax = maxSlider->value(); - QPainter p(histFrame); - QPen pen; + TQPainter p(histFrame); + TQPen pen; pen.setWidth(1); bitBlt(histFrame, 0, 0, histogram); @@ -197,7 +197,7 @@ void FITSHistogram::paintEvent( QPaintEvent */*e*/) } -void FITSHistogram::mouseMoveEvent( QMouseEvent *e) +void FITSHistogram::mouseMoveEvent( TQMouseEvent *e) { int x = e->x(); int y = e->y(); @@ -217,9 +217,9 @@ void FITSHistogram::updateIntenFreq(int x) int index = (int) ceil(x * binSize); - intensityOUT->setText(QString("%1").arg((int) ( index + viewer->stats.min))); + intensityOUT->setText(TQString("%1").arg((int) ( index + viewer->stats.min))); - frequencyOUT->setText(QString("%1").arg(histArray[x])); + frequencyOUT->setText(TQString("%1").arg(histArray[x])); } @@ -234,12 +234,12 @@ int FITSHistogram::findMax() return max; } -FITSHistogramCommand::FITSHistogramCommand(QWidget * parent, FITSHistogram *inHisto, int newType, int lmin, int lmax) +FITSHistogramCommand::FITSHistogramCommand(TQWidget * parent, FITSHistogram *inHisto, int newType, int lmin, int lmax) { viewer = (FITSViewer *) parent; type = newType; histo = inHisto; - oldImage = new QImage(); + oldImage = new TQImage(); // TODO apply maximum compression against this buffer buffer = (float *) malloc (viewer->image->width * viewer->image->height * sizeof(float)); @@ -387,7 +387,7 @@ void FITSHistogramCommand::unexecute() } } -QString FITSHistogramCommand::name() const +TQString FITSHistogramCommand::name() const { switch (type) diff --git a/kstars/kstars/fitshistogram.h b/kstars/kstars/fitshistogram.h index dcc64409..15d8d264 100644 --- a/kstars/kstars/fitshistogram.h +++ b/kstars/kstars/fitshistogram.h @@ -31,7 +31,7 @@ Q_OBJECT public: - FITSHistogram(QWidget *parent, const char * name = 0); + FITSHistogram(TQWidget *parent, const char * name = 0); ~FITSHistogram(); void constructHistogram(float *buffer); @@ -44,12 +44,12 @@ double binSize; FITSViewer * viewer; - QPixmap *histogram; + TQPixmap *histogram; protected: - void paintEvent( QPaintEvent *e); - void mouseMoveEvent( QMouseEvent *e); + void paintEvent( TQPaintEvent *e); + void mouseMoveEvent( TQMouseEvent *e); public slots: @@ -63,12 +63,12 @@ class FITSHistogramCommand : public KCommand { public: - FITSHistogramCommand(QWidget * parent, FITSHistogram *inHisto, int newType, int lmin, int lmax); + FITSHistogramCommand(TQWidget * parent, FITSHistogram *inHisto, int newType, int lmin, int lmax); ~FITSHistogramCommand(); void execute(); void unexecute(); - QString name() const; + TQString name() const; private: @@ -77,7 +77,7 @@ int min, max; float *buffer; FITSViewer *viewer; - QImage *oldImage; + TQImage *oldImage; }; diff --git a/kstars/kstars/fitsimage.cpp b/kstars/kstars/fitsimage.cpp index 301ea64b..d5d5ce3c 100644 --- a/kstars/kstars/fitsimage.cpp +++ b/kstars/kstars/fitsimage.cpp @@ -33,11 +33,11 @@ #include <kprogress.h> #include <kstatusbar.h> -#include <qfile.h> -#include <qvbox.h> -#include <qcursor.h> -#include <qpixmap.h> -#include <qframe.h> +#include <tqfile.h> +#include <tqvbox.h> +#include <tqcursor.h> +#include <tqpixmap.h> +#include <tqframe.h> #include <math.h> #include <unistd.h> @@ -64,7 +64,7 @@ static FITSLoadVals plvals = 0 /* Dont compose images */ }; -FITSImage::FITSImage(QWidget * parent, const char * name) : QScrollView(parent, name), zoomFactor(1.2) +FITSImage::FITSImage(TQWidget * parent, const char * name) : TQScrollView(parent, name), zoomFactor(1.2) { viewer = (FITSViewer *) parent; reducedImgBuffer = NULL; @@ -89,7 +89,7 @@ FITSImage::~FITSImage() delete(displayImage); } -/*void FITSImage::drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph ) +/*void FITSImage::drawContents ( TQPainter * p, int clipx, int clipy, int clipw, int cliph ) { //kdDebug() << "in draw contents " << endl; //imgFrame->update(); @@ -97,19 +97,19 @@ FITSImage::~FITSImage() }*/ /**Bitblt the image onto the viewer widget */ -/*void FITSImage::paintEvent (QPaintEvent *ev) +/*void FITSImage::paintEvent (TQPaintEvent *ev) { //kdDebug() << "in paint event " << endl; //bitBlt(imgFrame, 0, 0, &qpix); }*/ /* Resize event */ -void FITSImage::resizeEvent (QResizeEvent */*ev*/) +void FITSImage::resizeEvent (TQResizeEvent */*ev*/) { updateScrollBars(); } -void FITSImage::contentsMouseMoveEvent ( QMouseEvent * e ) +void FITSImage::contentsMouseMoveEvent ( TQMouseEvent * e ) { double x,y; @@ -161,18 +161,18 @@ void FITSImage::contentsMouseMoveEvent ( QMouseEvent * e ) if (validPoint) { - viewer->statusBar()->changeItem(QString("%1 , %2").arg( (int) x).arg( (int) y), 0); + viewer->statusBar()->changeItem(TQString("%1 , %2").arg( (int) x).arg( (int) y), 0); viewer->statusBar()->changeItem( KGlobal::locale()->formatNumber( viewer->imgBuffer[(int) (y * width + x)], 3 ), 1 ); setCursor(Qt::CrossCursor); } else { - //viewer->statusBar()->changeItem(QString("(X,Y)"), 0); + //viewer->statusBar()->changeItem(TQString("(X,Y)"), 0); setCursor(Qt::ArrowCursor); } } -void FITSImage::viewportResizeEvent ( QResizeEvent * /*e*/) +void FITSImage::viewportResizeEvent ( TQResizeEvent * /*e*/) { int w, h, conW, conH, x, y; if (!displayImage) return; @@ -204,7 +204,7 @@ void FITSImage::reLoadTemplateImage() void FITSImage::saveTemplateImage() { - templateImage = new QImage(displayImage->copy()); + templateImage = new TQImage(displayImage->copy()); } void FITSImage::destroyTemplateImage() @@ -258,7 +258,7 @@ int FITSImage::loadFits (const char *filename) return (-1); } - //displayImage = new QImage(); + //displayImage = new TQImage(); KProgressDialog fitsProgress(this, 0, i18n("FITS Viewer"), i18n("Loading FITS...")); hdl = fits_seek_image (ifp, 1); @@ -314,10 +314,10 @@ int FITSImage::loadFits (const char *filename) delete (displayImage); - displayImage = new QImage(width, height, 8, 256, QImage::IgnoreEndian); + displayImage = new TQImage(width, height, 8, 256, TQImage::IgnoreEndian); for (int i=0; i < 256; i++) displayImage->setColor(i, grayTable[i]); -//displayImage = new QImage(); +//displayImage = new TQImage(); //displayImage->create(width, height, 32); @@ -356,7 +356,7 @@ int FITSImage::loadFits (const char *filename) fits_record_list * FRList = hdl->header_record_list; while (FRList != NULL) { - viewer->record << QString((char *) FRList->data); + viewer->record << TQString((char *) FRList->data); FRList = FRList->next_record; } //memcpy(viewer->record, hdl->header_record_list->data , FITS_RECORD_SIZE); @@ -459,7 +459,7 @@ void FITSImage::fitsZoomDefault() } -FITSFrame::FITSFrame(FITSImage * img, QWidget * parent, const char * name) : QFrame(parent, name, Qt::WNoAutoErase) +FITSFrame::FITSFrame(FITSImage * img, TQWidget * parent, const char * name) : TQFrame(parent, name, Qt::WNoAutoErase) { image = img; setPaletteBackgroundColor(image->viewport()->paletteBackgroundColor()); @@ -467,7 +467,7 @@ FITSFrame::FITSFrame(FITSImage * img, QWidget * parent, const char * name) : QFr FITSFrame::~FITSFrame() {} -void FITSFrame::paintEvent(QPaintEvent * /*e*/) +void FITSFrame::paintEvent(TQPaintEvent * /*e*/) { bitBlt(this, 20, 20, &(image->qpix)); diff --git a/kstars/kstars/fitsimage.h b/kstars/kstars/fitsimage.h index 50b8cf80..de40da52 100644 --- a/kstars/kstars/fitsimage.h +++ b/kstars/kstars/fitsimage.h @@ -20,14 +20,14 @@ #ifndef FITSIMAGE_H #define FITSIMAGE_H -#include <qwidget.h> -#include <qstring.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qframe.h> -#include <qrect.h> -#include <qptrlist.h> -#include <qscrollview.h> +#include <tqwidget.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqframe.h> +#include <tqrect.h> +#include <tqptrlist.h> +#include <tqscrollview.h> #include <kpixmapio.h> #include <kpixmap.h> @@ -42,7 +42,7 @@ class QScrollView; class FITSViewer; class FITSFrame; -class FITSImage : public QScrollView { +class FITSImage : public TQScrollView { Q_OBJECT public: @@ -56,15 +56,15 @@ class FITSImage : public QScrollView { friend class FITSChangeCommand; friend class FITSProcessCommand; - FITSImage(QWidget * parent, const char * name = 0); + FITSImage(TQWidget * parent, const char * name = 0); ~FITSImage(); enum scaleType { FITSAuto = 0 , FITSLinear, FITSLog, FITSSqrt, FITSCustom }; /**Bitblt the image onto the viewer widget */ - /*void paintEvent (QPaintEvent *ev);*/ + /*void paintEvent (TQPaintEvent *ev);*/ /* Resize event */ - void resizeEvent (QResizeEvent *ev); + void resizeEvent (TQResizeEvent *ev); /* Loads FITS image, scales it, and displays it in the GUI */ int loadFits(const char *filename); /* Convert current image to a pixmap */ @@ -75,11 +75,11 @@ class FITSImage : public QScrollView { private: FITSViewer *viewer; /* parent FITSViewer */ FITSFrame *imgFrame; /* Frame holding the image */ - QImage *displayImage; /* FITS image that is displayed in the GUI */ - QImage *templateImage; /* backup image for currentImage */ - QPixmap qpix; /* Pixmap for drawing */ + TQImage *displayImage; /* FITS image that is displayed in the GUI */ + TQImage *templateImage; /* backup image for currentImage */ + TQPixmap qpix; /* Pixmap for drawing */ KPixmapIO kpix; /* Pixmap IO for fast converting */ - QRect currentRect; /* Current rectangle encapsulating the image */ + TQRect currentRect; /* Current rectangle encapsulating the image */ int bitpix, bpp; /* bits per pixel and bytes per pixels for FITS */ int width, height; /* Original FITS dimensions */ double currentWidth,currentHeight; /* Current width and height due to zoom */ @@ -95,9 +95,9 @@ class FITSImage : public QScrollView { void zoomToCurrent(); /* Zoom the image to current zoom level without modifying it */ protected: - /*void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph );*/ - void contentsMouseMoveEvent ( QMouseEvent * e ); - void viewportResizeEvent ( QResizeEvent * e) ; + /*void drawContents ( TQPainter * p, int clipx, int clipy, int clipw, int cliph );*/ + void contentsMouseMoveEvent ( TQMouseEvent * e ); + void viewportResizeEvent ( TQResizeEvent * e) ; public slots: void fitsZoomIn(); @@ -110,14 +110,14 @@ class FITSFrame : public QFrame Q_OBJECT public: - FITSFrame(FITSImage * img, QWidget * parent = 0, const char * name = 0); + FITSFrame(FITSImage * img, TQWidget * parent = 0, const char * name = 0); ~FITSFrame(); private: FITSImage *image; protected: - void paintEvent( QPaintEvent * e); + void paintEvent( TQPaintEvent * e); }; diff --git a/kstars/kstars/fitsprocess.cpp b/kstars/kstars/fitsprocess.cpp index 60d3e539..6a4d7fcd 100644 --- a/kstars/kstars/fitsprocess.cpp +++ b/kstars/kstars/fitsprocess.cpp @@ -23,7 +23,7 @@ #include <kprogress.h> #include <kapplication.h> - #include <qimage.h> + #include <tqimage.h> #include "fitsprocess.h" #include "fitsviewer.h" @@ -31,7 +31,7 @@ #define ELEM_SWAP(a,b) { register float t=(a);(a)=(b);(b)=t; } - FITSProcess::FITSProcess(FITSViewer *parent, QStringList darkFiles, QStringList flatFiles, QStringList darkflatFiles, int darkMode, int flatMode, int darkflatMode) + FITSProcess::FITSProcess(FITSViewer *parent, TQStringList darkFiles, TQStringList flatFiles, TQStringList darkflatFiles, int darkMode, int flatMode, int darkflatMode) { float * buffer = NULL; darkCombineMode = darkMode; @@ -101,7 +101,7 @@ FITSProcess::~FITSProcess() {} -float * FITSProcess::combine(QPtrList<float> & frames, int mode) +float * FITSProcess::combine(TQPtrList<float> & frames, int mode) { int nframes = frames.count(); float *dest; @@ -315,7 +315,7 @@ FITSProcessCommand::FITSProcessCommand(FITSViewer *parent) { viewer = parent; - oldImage = new QImage(); + oldImage = new TQImage(); // TODO apply maximum compression against this buffer buffer = (float *) malloc (viewer->image->width * viewer->image->height * sizeof(float)); memcpy(buffer, viewer->imgBuffer, viewer->image->width * viewer->image->height * sizeof(float)); @@ -344,7 +344,7 @@ void FITSProcessCommand::unexecute() } -QString FITSProcessCommand::name() const +TQString FITSProcessCommand::name() const { return i18n("Image Reduction"); } diff --git a/kstars/kstars/fitsprocess.h b/kstars/kstars/fitsprocess.h index db0286eb..97d4f35a 100644 --- a/kstars/kstars/fitsprocess.h +++ b/kstars/kstars/fitsprocess.h @@ -18,12 +18,12 @@ #ifndef FITSPROCESS_H #define FITSPROCESS_H - #include <qptrlist.h> - #include <qstringlist.h> + #include <tqptrlist.h> + #include <tqstringlist.h> #include <kcommand.h> - /*1. QPtrList<unsigned int *> darkFrames; - 2. QPtrList<unsigned int *> flatFrames; + /*1. TQPtrList<unsigned int *> darkFrames; + 2. TQPtrList<unsigned int *> flatFrames; 3. The class reads the hdu of each FITS, the size of each frame must match the original frame, if not, abort and inform the user. 4. Ignore the EXPOSURE (time in milliseconds) differences for now. We need to compensate for differences by employing different methods of extrapolation later. 5. void combine(int mode); mode is either FITS_AVERAGE or FITS_MEDIAN. @@ -36,12 +36,12 @@ class QImage; class FITSProcess { public: - FITSProcess(FITSViewer *parent, QStringList darkFiles, QStringList flatFiles, QStringList darkflatFiles, int darkMode, int flatMode, int darkflatMode); + FITSProcess(FITSViewer *parent, TQStringList darkFiles, TQStringList flatFiles, TQStringList darkflatFiles, int darkMode, int flatMode, int darkflatMode); ~FITSProcess(); - QPtrList<float> darkFrames; - QPtrList<float> flatFrames; - QPtrList<float> darkflatFrames; + TQPtrList<float> darkFrames; + TQPtrList<float> flatFrames; + TQPtrList<float> darkflatFrames; FITSViewer *viewer; int npix; @@ -52,7 +52,7 @@ class FITSProcess float *finalFlat; float *finalDarkFlat; - float * combine(QPtrList<float> & frames, int mode); + float * combine(TQPtrList<float> & frames, int mode); void subtract(float * img1, float * img2); void divide(float * img1, float * img2); void reduce(); @@ -72,12 +72,12 @@ class FITSProcessCommand : public KCommand void execute(); void unexecute(); - QString name() const; + TQString name() const; private: FITSViewer *viewer; float * buffer; - QImage *oldImage; + TQImage *oldImage; }; diff --git a/kstars/kstars/fitsviewer.cpp b/kstars/kstars/fitsviewer.cpp index e7bd0cb9..2d0ca2ed 100644 --- a/kstars/kstars/fitsviewer.cpp +++ b/kstars/kstars/fitsviewer.cpp @@ -36,14 +36,14 @@ #include <klineedit.h> #include <klistview.h> -#include <qfile.h> -#include <qvbox.h> -#include <qcursor.h> -#include <qstringlist.h> -#include <qlistview.h> -#include <qradiobutton.h> -#include <qclipboard.h> -#include <qimage.h> +#include <tqfile.h> +#include <tqvbox.h> +#include <tqcursor.h> +#include <tqstringlist.h> +#include <tqlistview.h> +#include <tqradiobutton.h> +#include <tqclipboard.h> +#include <tqimage.h> #include <math.h> #include <unistd.h> @@ -91,7 +91,7 @@ extern int fits_ieee64_motorola; uc[4] = p[3]; uc[5] = p[2]; uc[6] = p[1]; uc[7] = p[0]; \ val = *(FITS_BITPIXM64 *)uc; } else val = *(FITS_BITPIXM64 *)p; } -FITSViewer::FITSViewer (const KURL *url, QWidget *parent, const char *name) +FITSViewer::FITSViewer (const KURL *url, TQWidget *parent, const char *name) : KMainWindow (parent, name) { image = NULL; @@ -105,7 +105,7 @@ FITSViewer::FITSViewer (const KURL *url, QWidget *parent, const char *name) history->setUndoLimit(10); history->setRedoLimit(10); history->documentSaved(); - connect(history, SIGNAL(documentRestored()), this, SLOT(fitsRestore())); + connect(history, TQT_SIGNAL(documentRestored()), this, TQT_SLOT(fitsRestore())); /* Setup image widget */ image = new FITSImage(this); @@ -127,43 +127,43 @@ FITSViewer::FITSViewer (const KURL *url, QWidget *parent, const char *name) return; } - QFile tempFile; + TQFile tempFile; if (KSUtils::openDataFile( tempFile, "imgreduction.png" ) ) { - new KAction( i18n("Image Reduction"), tempFile.name(), KShortcut( "Ctrl+R" ), this, SLOT( imageReduction()), actionCollection(), "image_reduce"); + new KAction( i18n("Image Reduction"), tempFile.name(), KShortcut( "Ctrl+R" ), this, TQT_SLOT( imageReduction()), actionCollection(), "image_reduce"); tempFile.close(); } else - new KAction( i18n("Image Reduction"), "blend", KShortcut( "Ctrl+R" ), this, SLOT( imageReduction()), actionCollection(), "image_reduce"); + new KAction( i18n("Image Reduction"), "blend", KShortcut( "Ctrl+R" ), this, TQT_SLOT( imageReduction()), actionCollection(), "image_reduce"); /*if (KSUtils::openDataFile( tempFile, "bricon.png" ) ) { - new KAction( i18n("Brightness/Contrast"), tempFile.name(), KShortcut( "Ctrl+T" ), this, SLOT( BrightContrastDlg()), actionCollection(), "image_brightness_contrast"); + new KAction( i18n("Brightness/Contrast"), tempFile.name(), KShortcut( "Ctrl+T" ), this, TQT_SLOT( BrightContrastDlg()), actionCollection(), "image_brightness_contrast"); tempFile.close(); } else*/ - new KAction( i18n("Brightness/Contrast"), "contrast+", KShortcut( "Ctrl+T" ), this, SLOT( BrightContrastDlg()), actionCollection(), "image_brightness_contrast"); + new KAction( i18n("Brightness/Contrast"), "contrast+", KShortcut( "Ctrl+T" ), this, TQT_SLOT( BrightContrastDlg()), actionCollection(), "image_brightness_contrast"); if (KSUtils::openDataFile( tempFile, "histogram.png" ) ) { - new KAction ( i18n("Histogram"), tempFile.name(), KShortcut("Ctrl+H"), this, SLOT (imageHistogram()), actionCollection(), "image_histogram"); + new KAction ( i18n("Histogram"), tempFile.name(), KShortcut("Ctrl+H"), this, TQT_SLOT (imageHistogram()), actionCollection(), "image_histogram"); tempFile.close(); } else - new KAction ( i18n("Histogram"), "wizard", KShortcut("Ctrl+H"), this, SLOT (imageHistogram()), actionCollection(), "image_histogram"); + new KAction ( i18n("Histogram"), "wizard", KShortcut("Ctrl+H"), this, TQT_SLOT (imageHistogram()), actionCollection(), "image_histogram"); - KStdAction::open(this, SLOT(fileOpen()), actionCollection()); - KStdAction::save(this, SLOT(fileSave()), actionCollection()); - KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); - KStdAction::close(this, SLOT(slotClose()), actionCollection()); - KStdAction::copy(this, SLOT(fitsCOPY()), actionCollection()); - KStdAction::zoomIn(image, SLOT(fitsZoomIn()), actionCollection()); - KStdAction::zoomOut(image, SLOT(fitsZoomOut()), actionCollection()); + KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); + KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + KStdAction::close(this, TQT_SLOT(slotClose()), actionCollection()); + KStdAction::copy(this, TQT_SLOT(fitsCOPY()), actionCollection()); + KStdAction::zoomIn(image, TQT_SLOT(fitsZoomIn()), actionCollection()); + KStdAction::zoomOut(image, TQT_SLOT(fitsZoomOut()), actionCollection()); new KAction( i18n( "&Default Zoom" ), "viewmagfit.png", KShortcut( "Ctrl+D" ), - image, SLOT(fitsZoomDefault()), actionCollection(), "zoom_default" ); - new KAction( i18n( "Statistics"), "sum", 0, this, SLOT(fitsStatistics()), actionCollection(), "image_stats"); - new KAction( i18n( "FITS Header"), "frame_spreadsheet.png", 0, this, SLOT(fitsHeader()), actionCollection(), "fits_editor"); + image, TQT_SLOT(fitsZoomDefault()), actionCollection(), "zoom_default" ); + new KAction( i18n( "Statistics"), "sum", 0, this, TQT_SLOT(fitsStatistics()), actionCollection(), "image_stats"); + new KAction( i18n( "FITS Header"), "frame_spreadsheet.png", 0, this, TQT_SLOT(fitsHeader()), actionCollection(), "fits_editor"); /* Create GUI */ createGUI("fitsviewer.rc"); @@ -211,8 +211,8 @@ void FITSViewer::slotClose() if (Dirty) { - QString caption = i18n( "Save Changes to FITS?" ); - QString message = i18n( "The current FITS file has unsaved changes. Would you like to save before closing it?" ); + TQString caption = i18n( "Save Changes to FITS?" ); + TQString message = i18n( "The current FITS file has unsaved changes. Would you like to save before closing it?" ); int ans = KMessageBox::warningYesNoCancel( 0, message, caption, KStdGuiItem::save(), KStdGuiItem::discard() ); if ( ans == KMessageBox::Yes ) fileSave(); @@ -224,14 +224,14 @@ void FITSViewer::slotClose() close(); } -void FITSViewer::closeEvent(QCloseEvent *ev) +void FITSViewer::closeEvent(TQCloseEvent *ev) { if (Dirty) { - QString caption = i18n( "Save Changes to FITS?" ); - QString message = i18n( "The current FITS file has unsaved changes. Would you like to save before closing it?" ); + TQString caption = i18n( "Save Changes to FITS?" ); + TQString message = i18n( "The current FITS file has unsaved changes. Would you like to save before closing it?" ); int ans = KMessageBox::warningYesNoCancel( 0, message, caption, KStdGuiItem::save(), KStdGuiItem::discard() ); if ( ans == KMessageBox::Yes ) fileSave(); @@ -388,7 +388,7 @@ void FITSViewer::calculateStats() kdDebug() << "Average: " << stats.average << " - stddev: " << stats.stddev << endl; kdDebug() << "Width: " << stats.width << " - Height " << stats.height << " - bitpix " << stats.bitpix << endl;*/ - statusBar()->changeItem( QString("%1 x %2").arg( (int) stats.width).arg( (int) stats.height), 2); + statusBar()->changeItem( TQString("%1 x %2").arg( (int) stats.width).arg( (int) stats.height), 2); } @@ -474,9 +474,9 @@ double FITSViewer::stddev() } -void FITSViewer::keyPressEvent (QKeyEvent *ev) +void FITSViewer::keyPressEvent (TQKeyEvent *ev) { - //QImage Tempimage = imageList.at(undo+1)->copy(); + //TQImage Tempimage = imageList.at(undo+1)->copy(); ev->accept(); //make sure key press events are captured. switch (ev->key()) @@ -496,8 +496,8 @@ void FITSViewer::fileOpen() if (Dirty) { - QString caption = i18n( "Save Changes to FITS?" ); - QString message = i18n( "The current FITS file has unsaved changes. Would you like to save before closing it?" ); + TQString caption = i18n( "Save Changes to FITS?" ); + TQString message = i18n( "The current FITS file has unsaved changes. Would you like to save before closing it?" ); int ans = KMessageBox::warningYesNoCancel( 0, message, caption, KStdGuiItem::save(), KStdGuiItem::discard() ); if ( ans == KMessageBox::Yes ) fileSave(); @@ -505,7 +505,7 @@ void FITSViewer::fileOpen() fitsRestore(); } - KURL fileURL = KFileDialog::getOpenURL( QDir::homeDirPath(), "*.fits *.fit *.fts|Flexible Image Transport System"); + KURL fileURL = KFileDialog::getOpenURL( TQDir::homeDirPath(), "*.fits *.fit *.fts|Flexible Image Transport System"); if (fileURL.isEmpty()) return; @@ -521,9 +521,9 @@ void FITSViewer::fileSave() { FITS_FILE *ifp; - QString recordList; + TQString recordList; KURL backupCurrent = currentURL; - QString bitpixRec; + TQString bitpixRec; FITS_BITPIX16 pixval_16 =0; FITS_BITPIX32 pixval_32 =0; FITS_BITPIXM32 pixval_m32 =0; @@ -531,7 +531,7 @@ void FITSViewer::fileSave() unsigned char *transData; int index=0, i=0, transCount = 0, totalCount= image->width * image->height; - QString currentDir = Options::fitsSaveDirectory(); + TQString currentDir = Options::fitsSaveDirectory(); //kdDebug() << "We doing stats BEFORE we save!! " << endl; //calculateStats(); @@ -551,9 +551,9 @@ void FITSViewer::fileSave() } if (currentURL.path().contains('.') == 0) currentURL.setPath(currentURL.path() + ".fits"); - if (QFile::exists(currentURL.path())) + if (TQFile::exists(currentURL.path())) { - int r=KMessageBox::warningContinueCancel(static_cast<QWidget *>(parent()), + int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()), i18n( "A file named \"%1\" already exists. " "Overwrite it?" ).arg(currentURL.fileName()), i18n( "Overwrite File?" ), @@ -692,7 +692,7 @@ void FITSViewer::fileSave() } else { - QString message = i18n( "Invalid URL: %1" ).arg( currentURL.url() ); + TQString message = i18n( "Invalid URL: %1" ).arg( currentURL.url() ); KMessageBox::sorry( 0, message, i18n( "Invalid URL" ) ); } @@ -728,14 +728,14 @@ void FITSViewer::imageReduction() { FITSProcessCommand *cbc; FITSHistogramCommand *hbc; - QStringList darkFiles, flatFiles, darkflatFiles; + TQStringList darkFiles, flatFiles, darkflatFiles; int darkCombineMode = 0 , flatCombineMode = 0, darkflatCombineMode =0; - QListViewItem *file; + TQListViewItem *file; image->saveTemplateImage(); ImageReductionDlg irDialog(this); - if (irDialog.exec() == QDialog::Accepted) + if (irDialog.exec() == TQDialog::Accepted) { if (irDialog.darkListView->childCount() == 0 && irDialog.flatListView->childCount() == 0) @@ -789,7 +789,7 @@ void FITSViewer::BrightContrastDlg() image->saveTemplateImage(); ContrastBrightnessDlg conbriDlg(this); - if (conbriDlg.exec() == QDialog::Rejected) + if (conbriDlg.exec() == TQDialog::Rejected) { image->reLoadTemplateImage(); image->zoomToCurrent(); @@ -835,7 +835,7 @@ void FITSViewer::imageHistogram() histo->show(); } - /*if (hist.exec() == QDialog::Rejected) + /*if (hist.exec() == TQDialog::Rejected) { if (hist.napply > 0) for (int i=0; i < hist.napply; i++) @@ -880,15 +880,15 @@ void FITSViewer::fitsStatistics() calculateStats(); - stat.widthOUT->setText(QString("%1").arg(stats.width)); - stat.heightOUT->setText(QString("%1").arg(stats.height)); - stat.bitpixOUT->setText(QString("%1").arg(stats.bitpix)); - stat.maxOUT->setText(QString("%1").arg(stats.max)); - stat.minOUT->setText(QString("%1").arg(stats.min)); - stat.atMaxOUT->setText(QString("%1").arg(stats.maxAt)); - stat.atMinOUT->setText(QString("%1").arg(stats.minAt)); - stat.meanOUT->setText(QString("%1").arg(stats.average)); - stat.stddevOUT->setText(QString("%1").arg(stats.stddev)); + stat.widthOUT->setText(TQString("%1").arg(stats.width)); + stat.heightOUT->setText(TQString("%1").arg(stats.height)); + stat.bitpixOUT->setText(TQString("%1").arg(stats.bitpix)); + stat.maxOUT->setText(TQString("%1").arg(stats.max)); + stat.minOUT->setText(TQString("%1").arg(stats.min)); + stat.atMaxOUT->setText(TQString("%1").arg(stats.maxAt)); + stat.atMinOUT->setText(TQString("%1").arg(stats.minAt)); + stat.meanOUT->setText(TQString("%1").arg(stats.average)); + stat.stddevOUT->setText(TQString("%1").arg(stats.stddev)); stat.exec(); @@ -896,9 +896,9 @@ void FITSViewer::fitsStatistics() void FITSViewer::fitsHeader() { - QStringList cards; - QString recordList; - QString property; + TQStringList cards; + TQString recordList; + TQString property; int equal, slash; fitsHeaderDialog header(this); @@ -908,7 +908,7 @@ void FITSViewer::fitsHeader() for (unsigned int i=0; i < record.count(); i++) { recordList = record[i]; - //recordList = QString((char *) record); + //recordList = TQString((char *) record); for (int j=0; j < FITS_RECORD_SIZE / FITS_CARD_SIZE; j++) { @@ -944,7 +944,7 @@ void FITSViewer::fitsHeader() } for (int k= cards.count() - 3; k >=0 ; k-=3) - new QListViewItem( header.headerView, cards[k], cards[k+1], cards[k+2]); + new TQListViewItem( header.headerView, cards[k], cards[k+1], cards[k+2]); header.exec(); @@ -952,11 +952,11 @@ void FITSViewer::fitsHeader() } -FITSChangeCommand::FITSChangeCommand(QWidget * parent, int inType, QImage* newIMG, QImage *oldIMG) +FITSChangeCommand::FITSChangeCommand(TQWidget * parent, int inType, TQImage* newIMG, TQImage *oldIMG) { viewer = (FITSViewer *) parent; - newImage = new QImage(); - oldImage = new QImage(); + newImage = new TQImage(); + oldImage = new TQImage(); *newImage = newIMG->copy(); *oldImage = oldIMG->copy(); type = inType; @@ -981,7 +981,7 @@ void FITSChangeCommand::unexecute() } -QString FITSChangeCommand::name() const +TQString FITSChangeCommand::name() const { switch (type) { diff --git a/kstars/kstars/fitsviewer.h b/kstars/kstars/fitsviewer.h index 334b72f5..e9560d1e 100644 --- a/kstars/kstars/fitsviewer.h +++ b/kstars/kstars/fitsviewer.h @@ -20,15 +20,15 @@ #ifndef FITSViewer_H #define FITSViewer_H -#include <qwidget.h> -#include <qstring.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qframe.h> -#include <qrect.h> -#include <qptrlist.h> -#include <qstringlist.h> -#include <qscrollview.h> +#include <tqwidget.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqframe.h> +#include <tqrect.h> +#include <tqptrlist.h> +#include <tqstringlist.h> +#include <tqscrollview.h> #include <kpixmapio.h> #include <kpixmap.h> @@ -59,7 +59,7 @@ class FITSViewer : public KMainWindow { friend class FITSProcessCommand; /**Constructor. */ - FITSViewer (const KURL *imageName, QWidget *parent, const char *name = 0); + FITSViewer (const KURL *imageName, TQWidget *parent, const char *name = 0); ~FITSViewer(); @@ -68,10 +68,10 @@ class FITSViewer : public KMainWindow { protected: /* key press event */ - void keyPressEvent (QKeyEvent *ev); + void keyPressEvent (TQKeyEvent *ev); /* Calculate stats */ void calculateStats(); - void closeEvent(QCloseEvent *ev); + void closeEvent(TQCloseEvent *ev); public slots: void fitsChange(); @@ -106,7 +106,7 @@ class FITSViewer : public KMainWindow { KURL currentURL; /* FITS File name and path */ float *imgBuffer; /* Main unmodified FITS data buffer */ KCommandHistory *history; /* History for undo/redo */ - QStringList record; /* FITS records */ + TQStringList record; /* FITS records */ FITSHistogram *histo; /* stats struct to hold statisical data about the FITS data */ @@ -124,20 +124,20 @@ class FITSViewer : public KMainWindow { class FITSChangeCommand : public KCommand { public: - FITSChangeCommand(QWidget * parent, int inType, QImage *newIMG, QImage *oldIMG); + FITSChangeCommand(TQWidget * parent, int inType, TQImage *newIMG, TQImage *oldIMG); ~FITSChangeCommand(); void execute(); void unexecute(); - QString name() const; + TQString name() const; private: int type; protected: FITSViewer *viewer; - QImage *newImage; - QImage *oldImage; + TQImage *newImage; + TQImage *oldImage; }; diff --git a/kstars/kstars/focusdialog.cpp b/kstars/kstars/focusdialog.cpp index db08a570..4f243f0e 100644 --- a/kstars/kstars/focusdialog.cpp +++ b/kstars/kstars/focusdialog.cpp @@ -15,14 +15,14 @@ * * ***************************************************************************/ -#include <qtabwidget.h> -#include <qlayout.h> +#include <tqtabwidget.h> +#include <tqlayout.h> #include <kdebug.h> #include <klocale.h> #include <kmessagebox.h> -#include <qstring.h> +#include <tqstring.h> #include <knumvalidator.h> #include "kstars.h" @@ -32,24 +32,24 @@ #include "dmsbox.h" #include "focusdialog.h" -FocusDialog::FocusDialog( QWidget *parent ) +FocusDialog::FocusDialog( TQWidget *parent ) : KDialogBase( KDialogBase::Plain, i18n( "Set Focus Manually" ), Ok|Cancel, Ok, parent ) { Point = 0; //initialize pointer to null UsedAltAz = false; //assume RA/Dec by default - QFrame *page = plainPage(); + TQFrame *page = plainPage(); setMainWidget(page); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, spacingHint() ); fdlg = new FocusDialogDlg(page); fdlg->epochName->setValidator( new KDoubleValidator( fdlg->epochName ) ); vlay->addWidget( fdlg ); - connect( fdlg->raBox, SIGNAL(textChanged( const QString & ) ), this, SLOT( checkLineEdits() ) ); - connect( fdlg->decBox, SIGNAL(textChanged( const QString & ) ), this, SLOT( checkLineEdits() ) ); - connect( fdlg->azBox, SIGNAL(textChanged( const QString & ) ), this, SLOT( checkLineEdits() ) ); - connect( fdlg->altBox, SIGNAL(textChanged( const QString & ) ), this, SLOT( checkLineEdits() ) ); - connect( this, SIGNAL( okClicked() ), this, SLOT( validatePoint() ) ); + connect( fdlg->raBox, TQT_SIGNAL(textChanged( const TQString & ) ), this, TQT_SLOT( checkLineEdits() ) ); + connect( fdlg->decBox, TQT_SIGNAL(textChanged( const TQString & ) ), this, TQT_SLOT( checkLineEdits() ) ); + connect( fdlg->azBox, TQT_SIGNAL(textChanged( const TQString & ) ), this, TQT_SLOT( checkLineEdits() ) ); + connect( fdlg->altBox, TQT_SIGNAL(textChanged( const TQString & ) ), this, TQT_SLOT( checkLineEdits() ) ); + connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( validatePoint() ) ); fdlg->raBox->setDegType(false); //RA box should be HMS-style fdlg->raBox->setFocus(); //set input focus @@ -79,7 +79,7 @@ void FocusDialog::validatePoint() { bool raOk(false), decOk(false), azOk(false), altOk(false); dms ra( fdlg->raBox->createDms( false, &raOk ) ); //false means expressed in hours dms dec( fdlg->decBox->createDms( true, &decOk ) ); - QString message; + TQString message; KStars *ks = (KStars*) parent(); @@ -99,7 +99,7 @@ void FocusDialog::validatePoint() { long double jd0 = epochToJd ( epoch0 ); Point->apparentCoord(jd0, ks->data()->ut().djd() ); - QDialog::accept(); + TQDialog::accept(); } else { dms az( fdlg->azBox->createDms( true, &azOk ) ); dms alt( fdlg->altBox->createDms( true, &altOk ) ); @@ -120,14 +120,14 @@ void FocusDialog::validatePoint() { Point->setAlt( alt ); UsedAltAz = true; - QDialog::accept(); + TQDialog::accept(); } else { - QDialog::reject(); + TQDialog::reject(); } } } -double FocusDialog::getEpoch (QString eName) { +double FocusDialog::getEpoch (TQString eName) { //If eName is empty (or not a number) assume 2000.0 bool ok(false); double epoch = eName.toDouble( &ok ); @@ -152,9 +152,9 @@ long double FocusDialog::epochToJd (double epoch) { } -QSize FocusDialog::sizeHint() const +TQSize FocusDialog::sizeHint() const { - return QSize(240,210); + return TQSize(240,210); } void FocusDialog::activateAzAltPage() { diff --git a/kstars/kstars/focusdialog.h b/kstars/kstars/focusdialog.h index 8efef068..24eccad5 100644 --- a/kstars/kstars/focusdialog.h +++ b/kstars/kstars/focusdialog.h @@ -37,7 +37,7 @@ class FocusDialog : public KDialogBase { Q_OBJECT public: /**Constructor. */ - FocusDialog( QWidget *parent=0 ); + FocusDialog( TQWidget *parent=0 ); /**Destructor (empty). */ ~FocusDialog(); @@ -46,7 +46,7 @@ public: SkyPoint* point() const { return Point; } /**@return suggested size of focus window. */ - QSize sizeHint() const; + TQSize sizeHint() const; /**@return whether user set the AltAz coords */ bool usedAltAz() const { return UsedAltAz; } @@ -54,7 +54,7 @@ public: void activateAzAltPage(); long double epochToJd (double epoch); - double getEpoch (QString eName); + double getEpoch (TQString eName); public slots: /**If text has been entered in both KLineEdits, enable the Ok button. */ @@ -67,8 +67,8 @@ public slots: void slotOk(); private: - QVBoxLayout *vlay; - QHBoxLayout *hlayRA, *hlayDec; + TQVBoxLayout *vlay; + TQHBoxLayout *hlayRA, *hlayDec; KLineEdit *editRA, *editDec; SkyPoint *Point; FocusDialogDlg *fdlg; diff --git a/kstars/kstars/fov.cpp b/kstars/kstars/fov.cpp index d7fd5d32..2820221a 100644 --- a/kstars/kstars/fov.cpp +++ b/kstars/kstars/fov.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include <qpainter.h> -#include <qfile.h> +#include <tqpainter.h> +#include <tqfile.h> #include <kdebug.h> #include <klocale.h> #include <kstandarddirs.h> @@ -24,23 +24,23 @@ #include "fov.h" //------------FOV-----------------// -FOV::FOV( QString n, float sz, int sh, QString col ) : Name( n ), Color( col ), Size( sz ), Shape( sh ) +FOV::FOV( TQString n, float sz, int sh, TQString col ) : Name( n ), Color( col ), Size( sz ), Shape( sh ) {} FOV::FOV() : Name( i18n( "No FOV" ) ), Color( "#FFFFFF" ), Size( 0.0 ), Shape( 0 ) {} -FOV::FOV( QString sname ) { - QFile f; +FOV::FOV( TQString sname ) { + TQFile f; f.setName( locate( "appdata", "fov.dat" ) ); int sh; float sz; if ( f.exists() && f.open( IO_ReadOnly ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { - QStringList fields = QStringList::split( ":", stream.readLine() ); + TQStringList fields = TQStringList::split( ":", stream.readLine() ); bool ok( false ); if ( fields.count() == 4 ) { @@ -71,8 +71,8 @@ FOV::FOV( QString sname ) { Color = "#FFFFFF"; } -void FOV::draw( QPainter &p, float pixelsize ) { - p.setPen( QColor( color() ) ); +void FOV::draw( TQPainter &p, float pixelsize ) { + p.setPen( TQColor( color() ) ); p.setBrush( Qt::NoBrush ); int w = p.viewport().width(); int h = p.viewport().height(); @@ -128,7 +128,7 @@ void FOV::draw( QPainter &p, float pixelsize ) { } case 4: { // Solid Circle int s = int( pixelsize ); - p.setBrush( QBrush ( QColor( color() ), Qt::Dense4Pattern) ); + p.setBrush( TQBrush ( TQColor( color() ), Qt::Dense4Pattern) ); p.drawEllipse( (w - s)/2, (h - s)/2, s, s ); p.setBrush(Qt::NoBrush); break; diff --git a/kstars/kstars/fov.h b/kstars/kstars/fov.h index 11d3d769..64a3fd04 100644 --- a/kstars/kstars/fov.h +++ b/kstars/kstars/fov.h @@ -18,7 +18,7 @@ #ifndef FOV_H #define FOV_H -#include <qstring.h> +#include <tqstring.h> #include <klocale.h> /**@class FOV A simple class encapulating a Field-of-View symbol @@ -31,29 +31,29 @@ class QPainter; class FOV { public: FOV(); - FOV( QString name ); //in this case, read params from fov.dat - FOV( QString name, float size, int shape=0, QString color="#FFFFFF" ); + FOV( TQString name ); //in this case, read params from fov.dat + FOV( TQString name, float size, int shape=0, TQString color="#FFFFFF" ); ~FOV() {} // enum SHAPE { FOV_SQUARE=0, FOV_CIRCLE=1, FOV_CROSSHAIRS=2, FOV_BULLSEYE=3, FOV_UNKNOWN }; - QString name() const { return Name; } - void setName( const QString &n ) { Name = n; } + TQString name() const { return Name; } + void setName( const TQString &n ) { Name = n; } int shape() const { return Shape; } void setShape( int s ) { Shape = s; } float size() const { return Size; } void setSize( float s ) { Size = s; } - QString color() const { return Color; } - void setColor( const QString &c ) { Color = c; } + TQString color() const { return Color; } + void setColor( const TQString &c ) { Color = c; } /**@short draw the FOV symbol on a QPainter - *@param p reference to the target QPainter. The painter should already be started. + *@param p reference to the target TQPainter. The painter should already be started. *@param size the size of the target symbol, in pixels. */ - void draw( QPainter &p, float size ); + void draw( TQPainter &p, float size ); private: - QString Name, Color; + TQString Name, Color; float Size; int Shape; }; diff --git a/kstars/kstars/fovdialog.cpp b/kstars/kstars/fovdialog.cpp index 5d7b093a..05080043 100644 --- a/kstars/kstars/fovdialog.cpp +++ b/kstars/kstars/fovdialog.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qfile.h> -#include <qframe.h> -#include <qpainter.h> -#include <qstringlist.h> +#include <tqlayout.h> +#include <tqfile.h> +#include <tqframe.h> +#include <tqpainter.h> +#include <tqstringlist.h> #include <klocale.h> #include <kdebug.h> @@ -39,20 +39,20 @@ //---------FOVDialog---------------// -FOVDialog::FOVDialog( QWidget *parent ) +FOVDialog::FOVDialog( TQWidget *parent ) : KDialogBase( KDialogBase::Plain, i18n( "Set FOV Indicator" ), Ok|Cancel, Ok, parent ) { ks = (KStars*)parent; - QFrame *page = plainPage(); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, 0 ); + TQFrame *page = plainPage(); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 ); fov = new FOVDialogUI( page ); vlay->addWidget( fov ); - connect( fov->FOVListBox, SIGNAL( currentChanged( QListBoxItem* ) ), SLOT( slotSelect( QListBoxItem* ) ) ); - connect( fov->NewButton, SIGNAL( clicked() ), SLOT( slotNewFOV() ) ); - connect( fov->EditButton, SIGNAL( clicked() ), SLOT( slotEditFOV() ) ); - connect( fov->RemoveButton, SIGNAL( clicked() ), SLOT( slotRemoveFOV() ) ); + connect( fov->FOVListBox, TQT_SIGNAL( currentChanged( TQListBoxItem* ) ), TQT_SLOT( slotSelect( TQListBoxItem* ) ) ); + connect( fov->NewButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotNewFOV() ) ); + connect( fov->EditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditFOV() ) ); + connect( fov->RemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRemoveFOV() ) ); FOVList.setAutoDelete( true ); initList(); @@ -62,21 +62,21 @@ FOVDialog::~FOVDialog() {} void FOVDialog::initList() { - QStringList fields; - QFile f; + TQStringList fields; + TQFile f; - QString nm, cl; + TQString nm, cl; int sh(0); float sz(0.0); f.setName( locate( "appdata", "fov.dat" ) ); if ( f.exists() && f.open( IO_ReadOnly ) ) { - QListBoxItem *item = 0; + TQListBoxItem *item = 0; - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { - fields = QStringList::split( ":", stream.readLine() ); + fields = TQStringList::split( ":", stream.readLine() ); bool ok( false ); if ( fields.count() == 4 ) { @@ -108,7 +108,7 @@ void FOVDialog::initList() { } } -void FOVDialog::slotSelect(QListBoxItem *item) { +void FOVDialog::slotSelect(TQListBoxItem *item) { if ( item == 0 ) { //no item selected fov->RemoveButton->setEnabled( false ); fov->EditButton->setEnabled( false ); @@ -121,17 +121,17 @@ void FOVDialog::slotSelect(QListBoxItem *item) { update(); } -void FOVDialog::paintEvent( QPaintEvent * ) { +void FOVDialog::paintEvent( TQPaintEvent * ) { //Draw the selected target symbol in the pixmap. - QPainter p; + TQPainter p; p.begin( fov->ViewBox ); - p.fillRect( fov->ViewBox->contentsRect(), QColor( "black" ) ); + p.fillRect( fov->ViewBox->contentsRect(), TQColor( "black" ) ); if ( fov->FOVListBox->currentItem() >= 0 ) { FOV *f = FOVList.at( fov->FOVListBox->currentItem() ); if ( f->size() > 0 ) { f->draw( p, (float)( 0.3*fov->ViewBox->contentsRect().width() ) ); - QFont smallFont = p.font(); + TQFont smallFont = p.font(); smallFont.setPointSize( p.font().pointSize() - 2 ); p.setFont( smallFont ); p.drawText( 0, fov->ViewBox->contentsRect().height(), i18n("angular size in arcminutes", "%1 arcmin").arg( KGlobal::locale()->formatNumber( f->size() ), 3 ) ); @@ -144,7 +144,7 @@ void FOVDialog::paintEvent( QPaintEvent * ) { void FOVDialog::slotNewFOV() { NewFOV newfdlg( this ); - if ( newfdlg.exec() == QDialog::Accepted ) { + if ( newfdlg.exec() == TQDialog::Accepted ) { FOV *newfov = new FOV( newfdlg.ui->FOVName->text(), newfdlg.ui->FOVEdit->text().toDouble(), newfdlg.ui->ShapeBox->currentItem(), newfdlg.ui->ColorButton->color().name() ); fov->FOVListBox->insertItem( newfdlg.ui->FOVName->text() ); @@ -163,11 +163,11 @@ void FOVDialog::slotEditFOV() { newfdlg.ui->FOVName->setText( f->name() ); newfdlg.ui->FOVEdit->setText( KGlobal::locale()->formatNumber( f->size(), 3 ) ); - newfdlg.ui->ColorButton->setColor( QColor( f->color() ) ); + newfdlg.ui->ColorButton->setColor( TQColor( f->color() ) ); newfdlg.ui->ShapeBox->setCurrentItem( f->shape() ); newfdlg.slotUpdateFOV(); - if ( newfdlg.exec() == QDialog::Accepted ) { + if ( newfdlg.exec() == TQDialog::Accepted ) { FOV *newfov = new FOV( newfdlg.ui->FOVName->text(), newfdlg.ui->FOVEdit->text().toDouble(), newfdlg.ui->ShapeBox->currentItem(), newfdlg.ui->ColorButton->color().name() ); fov->FOVListBox->changeItem( newfdlg.ui->FOVName->text(), fov->FOVListBox->currentItem() ); @@ -184,7 +184,7 @@ void FOVDialog::slotRemoveFOV() { fov->FOVListBox->update(); if ( FOVList.isEmpty() ) { - QString message( i18n( "You have removed all FOV symbols. If the list remains empty when you exit this tool, the default symbols will be regenerated." ) ); + TQString message( i18n( "You have removed all FOV symbols. If the list remains empty when you exit this tool, the default symbols will be regenerated." ) ); KMessageBox::information( 0, message, i18n( "FOV list is empty" ), "dontShowFOVMessage" ); } @@ -192,20 +192,20 @@ void FOVDialog::slotRemoveFOV() { } //-------------NewFOV------------------// -NewFOV::NewFOV( QWidget *parent ) +NewFOV::NewFOV( TQWidget *parent ) : KDialogBase( KDialogBase::Plain, i18n( "New FOV Indicator" ), Ok|Cancel, Ok, parent ), f() { - QFrame *page = plainPage(); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, 0 ); + TQFrame *page = plainPage(); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 ); ui = new NewFOVUI( page ); vlay->addWidget( ui ); - connect( ui->FOVName, SIGNAL( textChanged( const QString & ) ), SLOT( slotUpdateFOV() ) ); - connect( ui->FOVEdit, SIGNAL( textChanged( const QString & ) ), SLOT( slotUpdateFOV() ) ); - connect( ui->ColorButton, SIGNAL( changed( const QColor & ) ), SLOT( slotUpdateFOV() ) ); - connect( ui->ShapeBox, SIGNAL( activated( int ) ), SLOT( slotUpdateFOV() ) ); - connect( ui->ComputeEyeFOV, SIGNAL( clicked() ), SLOT( slotComputeFOV() ) ); - connect( ui->ComputeCameraFOV, SIGNAL( clicked() ), SLOT( slotComputeFOV() ) ); - connect( ui->ComputeHPBW, SIGNAL( clicked() ), SLOT( slotComputeFOV() ) ); + connect( ui->FOVName, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotUpdateFOV() ) ); + connect( ui->FOVEdit, TQT_SIGNAL( textChanged( const TQString & ) ), TQT_SLOT( slotUpdateFOV() ) ); + connect( ui->ColorButton, TQT_SIGNAL( changed( const TQColor & ) ), TQT_SLOT( slotUpdateFOV() ) ); + connect( ui->ShapeBox, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotUpdateFOV() ) ); + connect( ui->ComputeEyeFOV, TQT_SIGNAL( clicked() ), TQT_SLOT( slotComputeFOV() ) ); + connect( ui->ComputeCameraFOV, TQT_SIGNAL( clicked() ), TQT_SLOT( slotComputeFOV() ) ); + connect( ui->ComputeHPBW, TQT_SIGNAL( clicked() ), TQT_SLOT( slotComputeFOV() ) ); slotUpdateFOV(); } @@ -226,10 +226,10 @@ void NewFOV::slotUpdateFOV() { update(); } -void NewFOV::paintEvent( QPaintEvent * ) { - QPainter p; +void NewFOV::paintEvent( TQPaintEvent * ) { + TQPainter p; p.begin( ui->ViewBox ); - p.fillRect( ui->ViewBox->contentsRect(), QColor( "black" ) ); + p.fillRect( ui->ViewBox->contentsRect(), TQColor( "black" ) ); f.draw( p, (float)( 0.3*ui->ViewBox->contentsRect().width() ) ); p.drawText( 0, 0, i18n("angular size in arcminutes", "%1 arcmin").arg( KGlobal::locale()->formatNumber( f.size() ), 3 ) ); p.end(); @@ -238,14 +238,14 @@ void NewFOV::paintEvent( QPaintEvent * ) { void NewFOV::slotComputeFOV() { //DEBUG kdDebug() << ":" << sender()->name() << ":" << endl; - if ( sender()->name() == QString( "ComputeEyeFOV" ) ) kdDebug() << "A" << endl; - if ( sender()->name() == QString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) kdDebug() << "B" << endl; + if ( sender()->name() == TQString( "ComputeEyeFOV" ) ) kdDebug() << "A" << endl; + if ( sender()->name() == TQString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) kdDebug() << "B" << endl; - if ( sender()->name() == QString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) + if ( sender()->name() == TQString( "ComputeEyeFOV" ) && ui->TLength1->value() > 0.0 ) ui->FOVEdit->setText( KGlobal::locale()->formatNumber( ui->EyeFOV->value() * ui->EyeLength->value() / ui->TLength1->value() ) ); - else if ( sender()->name() == QString( "ComputeCameraFOV" ) && ui->TLength2->value() > 0.0 ) + else if ( sender()->name() == TQString( "ComputeCameraFOV" ) && ui->TLength2->value() > 0.0 ) ui->FOVEdit->setText( KGlobal::locale()->formatNumber( ui->ChipSize->value() * 3438.0 / ui->TLength2->value() ) ); - else if ( sender()->name() == QString( "ComputeHPBW" ) && ui->RTDiameter->value() > 0.0 && ui->WaveLength->value() > 0.0 ) { + else if ( sender()->name() == TQString( "ComputeHPBW" ) && ui->RTDiameter->value() > 0.0 && ui->WaveLength->value() > 0.0 ) { ui->FOVEdit->setText( KGlobal::locale()->formatNumber( 34.34 * 1.2 * ui->WaveLength->value() / ui->RTDiameter->value() ) ); // Beam width for an antenna is usually a circle on the sky. ui->ShapeBox->setCurrentItem(4); diff --git a/kstars/kstars/fovdialog.h b/kstars/kstars/fovdialog.h index aea38cf0..8f7b6de8 100644 --- a/kstars/kstars/fovdialog.h +++ b/kstars/kstars/fovdialog.h @@ -18,7 +18,7 @@ #ifndef FOVDIALOG_H #define FOVDIALOG_H -#include <qptrlist.h> +#include <tqptrlist.h> #include <kdialogbase.h> #include "fov.h" @@ -35,19 +35,19 @@ class FOVDialog : public KDialogBase { Q_OBJECT public: - FOVDialog( QWidget *parent=0 ); + FOVDialog( TQWidget *parent=0 ); ~FOVDialog(); unsigned int currentItem() const; - QPtrList<FOV> FOVList; + TQPtrList<FOV> FOVList; protected: - void paintEvent( QPaintEvent * ); + void paintEvent( TQPaintEvent * ); private slots: void slotNewFOV(); void slotEditFOV(); void slotRemoveFOV(); - void slotSelect(QListBoxItem*); + void slotSelect(TQListBoxItem*); private: void initList(); @@ -64,7 +64,7 @@ class NewFOV : public KDialogBase { Q_OBJECT public: - NewFOV( QWidget *parent=0 ); + NewFOV( TQWidget *parent=0 ); ~NewFOV() {} NewFOVUI *ui; @@ -73,7 +73,7 @@ public slots: void slotComputeFOV(); protected: - void paintEvent( QPaintEvent * ); + void paintEvent( TQPaintEvent * ); private: FOV f; diff --git a/kstars/kstars/geolocation.cpp b/kstars/kstars/geolocation.cpp index 3750803c..f6ce95e5 100644 --- a/kstars/kstars/geolocation.cpp +++ b/kstars/kstars/geolocation.cpp @@ -17,7 +17,7 @@ * * ***************************************************************************/ -#include <qstring.h> +#include <tqstring.h> #include "geolocation.h" #include "timezonerule.h" @@ -56,7 +56,7 @@ GeoLocation::GeoLocation( GeoLocation *g ) { } GeoLocation::GeoLocation( dms lng, dms lat, - QString name, QString province, QString country, double tz, TimeZoneRule *tzrule, int iEllips, double hght ) { + TQString name, TQString province, TQString country, double tz, TimeZoneRule *tzrule, int iEllips, double hght ) { Longitude = lng; Latitude = lat; Name = name; @@ -71,7 +71,7 @@ GeoLocation::GeoLocation( dms lng, dms lat, } GeoLocation::GeoLocation( double lng, double lat, - QString name, QString province, QString country, double tz, TimeZoneRule *tzrule, int iEllips, double hght ) { + TQString name, TQString province, TQString country, double tz, TimeZoneRule *tzrule, int iEllips, double hght ) { Longitude.set( lng ); Latitude.set( lat ); Name = name; @@ -85,7 +85,7 @@ GeoLocation::GeoLocation( double lng, double lat, geodToCart(); } -GeoLocation::GeoLocation( double x, double y, double z, QString name, QString province, QString country, double TZ, TimeZoneRule *tzrule, int iEllips ) { +GeoLocation::GeoLocation( double x, double y, double z, TQString name, TQString province, TQString country, double TZ, TimeZoneRule *tzrule, int iEllips ) { PosCartX = x; PosCartY = y; PosCartZ = z; @@ -99,8 +99,8 @@ GeoLocation::GeoLocation( double x, double y, double z, QString name, QString pr cartToGeod(); } -QString GeoLocation::fullName() const { - QString s; +TQString GeoLocation::fullName() const { + TQString s; if ( province().isEmpty() ) { s = translatedName() + ", " + translatedCountry(); } else { diff --git a/kstars/kstars/geolocation.h b/kstars/kstars/geolocation.h index 8acce1be..c3b6524e 100644 --- a/kstars/kstars/geolocation.h +++ b/kstars/kstars/geolocation.h @@ -64,7 +64,7 @@ public: *@param iEllips type of geodetic ellipsoid model *@param hght the elevation above sea level (in meters?) */ - GeoLocation( dms lng, dms lat, QString name="Nowhere", QString province="Nowhere", QString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4, double hght=-10 ); + GeoLocation( dms lng, dms lat, TQString name="Nowhere", TQString province="Nowhere", TQString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4, double hght=-10 ); /**Constructor using doubles to specify longitude and latitude. *@param lng the longitude @@ -77,7 +77,7 @@ public: *@param iEllips type of geodetic ellipsoid model *@param hght the elevation above sea level (in meters?) */ - GeoLocation( double lng, double lat, QString name="Nowhere", QString province="Nowhere", QString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4, double hght=-10 ); + GeoLocation( double lng, double lat, TQString name="Nowhere", TQString province="Nowhere", TQString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4, double hght=-10 ); /**Constructor using doubles to specify X, Y and Z referred to the center of the Earth. *@param x the x-position, in m @@ -90,7 +90,7 @@ public: *@param TZrule pointer to the daylight savings time rule *@param iEllips type of geodetic ellipsoid model */ - GeoLocation( double x, double y, double z, QString name="Nowhere", QString province="Nowhere", QString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4 ); + GeoLocation( double x, double y, double z, TQString name="Nowhere", TQString province="Nowhere", TQString country="Nowhere", double TZ=0, TimeZoneRule *TZrule=NULL, int iEllips=4 ); /**Destructor (empty) @@ -121,26 +121,26 @@ public: /**@return untranslated City name */ - QString name() const { return Name; } + TQString name() const { return Name; } /**@return translated City name */ - QString translatedName() const { return i18n("City name (optional, probably does not need a translation)", Name.utf8().data()); } + TQString translatedName() const { return i18n("City name (optional, probably does not need a translation)", Name.utf8().data()); } /**@return untranslated Province name */ - QString province() const { return Province; } + TQString province() const { return Province; } /**@return translated Province name */ - QString translatedProvince() const { return i18n("Region/state name (optional, rarely needs a translation)", Province.utf8().data()); } + TQString translatedProvince() const { return i18n("Region/state name (optional, rarely needs a translation)", Province.utf8().data()); } /**@return untranslated Country name */ - QString country() const { return Country; } + TQString country() const { return Country; } /**@return translated Country name */ - QString translatedCountry() const { return i18n("Country name (optional, but should be translated)", Country.utf8().data()); } + TQString translatedCountry() const { return i18n("Country name (optional, but should be translated)", Country.utf8().data()); } /**@return comma-separated city, province, country names (each localized) */ - QString fullName() const; + TQString fullName() const; /**@return time zone without DST correction */ @@ -226,17 +226,17 @@ public: /**Set City name according to argument. *@p n new city name */ - void setName( const QString &n ) { Name = n; } + void setName( const TQString &n ) { Name = n; } /**Set Province name according to argument. *@p n new province name */ - void setProvince( const QString &n ) { Province = n; } + void setProvince( const TQString &n ) { Province = n; } /**Set Country name according to argument. *@p n new country name */ - void setCountry( const QString &n ) { Country = n; } + void setCountry( const TQString &n ) { Country = n; } /**Sets Time Zone according to argument. *@p tz new timezone offset @@ -312,7 +312,7 @@ public: private: dms Longitude, Latitude; - QString Name, Province, Country; + TQString Name, Province, Country; TimeZoneRule *TZrule; double TimeZone, Height; double axis, flattening; diff --git a/kstars/kstars/imagereductiondlg.cpp b/kstars/kstars/imagereductiondlg.cpp index 0cf63972..bfcafebc 100644 --- a/kstars/kstars/imagereductiondlg.cpp +++ b/kstars/kstars/imagereductiondlg.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ - #include <qlistview.h> - #include <qpushbutton.h> + #include <tqlistview.h> + #include <tqpushbutton.h> #include <kurl.h> #include <kfiledialog.h> @@ -24,17 +24,17 @@ #include "imagereductiondlg.h" - ImageReductionDlg::ImageReductionDlg(QWidget * parent, const char * name) : imageReductionUI(parent, name) + ImageReductionDlg::ImageReductionDlg(TQWidget * parent, const char * name) : imageReductionUI(parent, name) { - connect(darkAddB, SIGNAL(clicked()), this, SLOT(addDarkFile())); - connect(flatAddB, SIGNAL(clicked()), this, SLOT(addFlatFile())); - connect(darkRemoveB, SIGNAL(clicked()), this, SLOT(removeDarkFile())); - connect(flatRemoveB, SIGNAL(clicked()), this, SLOT(removeFlatFile())); - connect(darkDetailsB, SIGNAL(clicked()), this, SLOT(detailsDarkFile())); - connect(flatDetailsB, SIGNAL(clicked()), this, SLOT(detailsFlatFile())); - connect(darkflatAddB, SIGNAL(clicked()), this, SLOT(addDarkFlatFile())); - connect(darkflatRemoveB, SIGNAL(clicked()), this, SLOT(removeDarkFlatFile())); - connect(darkflatDetailsB, SIGNAL(clicked()), this, SLOT(detailsDarkFlatFile())); + connect(darkAddB, TQT_SIGNAL(clicked()), this, TQT_SLOT(addDarkFile())); + connect(flatAddB, TQT_SIGNAL(clicked()), this, TQT_SLOT(addFlatFile())); + connect(darkRemoveB, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeDarkFile())); + connect(flatRemoveB, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeFlatFile())); + connect(darkDetailsB, TQT_SIGNAL(clicked()), this, TQT_SLOT(detailsDarkFile())); + connect(flatDetailsB, TQT_SIGNAL(clicked()), this, TQT_SLOT(detailsFlatFile())); + connect(darkflatAddB, TQT_SIGNAL(clicked()), this, TQT_SLOT(addDarkFlatFile())); + connect(darkflatRemoveB, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeDarkFlatFile())); + connect(darkflatDetailsB, TQT_SIGNAL(clicked()), this, TQT_SLOT(detailsDarkFlatFile())); darkListView->setSorting(-1); flatListView->setSorting(-1); @@ -52,11 +52,11 @@ ImageReductionDlg::~ImageReductionDlg() void ImageReductionDlg::addDarkFile() { - KURL::List fileURLs = KFileDialog::getOpenURLs( QString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Dark Frames")); + KURL::List fileURLs = KFileDialog::getOpenURLs( TQString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Dark Frames")); const int limit = (int) fileURLs.size(); for (int i=0; i < limit ; ++i) - new QListViewItem( darkListView, fileURLs[i].path()); + new TQListViewItem( darkListView, fileURLs[i].path()); darkRemoveB->setEnabled(true); darkDetailsB->setEnabled(true); @@ -65,12 +65,12 @@ void ImageReductionDlg::addDarkFile() void ImageReductionDlg::addFlatFile() { - KURL::List fileURLs = KFileDialog::getOpenURLs( QString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Flat Frames")); + KURL::List fileURLs = KFileDialog::getOpenURLs( TQString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Flat Frames")); const int limit = (int) fileURLs.size(); for (int i=0; i < limit; ++i) - new QListViewItem( flatListView, fileURLs[i].path()); + new TQListViewItem( flatListView, fileURLs[i].path()); flatRemoveB->setEnabled(true); flatDetailsB->setEnabled(true); @@ -79,11 +79,11 @@ void ImageReductionDlg::addFlatFile() void ImageReductionDlg::addDarkFlatFile() { - KURL::List fileURLs = KFileDialog::getOpenURLs( QString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Dark Flat Frames")); + KURL::List fileURLs = KFileDialog::getOpenURLs( TQString::null, "*.fits *.fit *.fts|Flexible Image Transport System", 0, i18n("Dark Flat Frames")); const int limit = (int) fileURLs.size(); for (int i=0; i < limit; ++i) - new QListViewItem( darkflatListView, fileURLs[i].path()); + new TQListViewItem( darkflatListView, fileURLs[i].path()); darkflatRemoveB->setEnabled(true); darkflatDetailsB->setEnabled(true); diff --git a/kstars/kstars/imagereductiondlg.h b/kstars/kstars/imagereductiondlg.h index eeb2532b..2e7bff26 100644 --- a/kstars/kstars/imagereductiondlg.h +++ b/kstars/kstars/imagereductiondlg.h @@ -25,7 +25,7 @@ Q_OBJECT public: - ImageReductionDlg(QWidget * parent, const char * name = 0); + ImageReductionDlg(TQWidget * parent, const char * name = 0); ~ImageReductionDlg(); diff --git a/kstars/kstars/imagesequence.cpp b/kstars/kstars/imagesequence.cpp index 86305869..7ad344da 100644 --- a/kstars/kstars/imagesequence.cpp +++ b/kstars/kstars/imagesequence.cpp @@ -27,17 +27,17 @@ #include <kprogress.h> #include <knuminput.h> -#include <qtimer.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qstringlist.h> +#include <tqtimer.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqstringlist.h> #define RETRY_MAX 12 #define RETRY_PERIOD 5000 -imagesequence::imagesequence(QWidget* parent, const char* name, bool modal, WFlags fl) +imagesequence::imagesequence(TQWidget* parent, const char* name, bool modal, WFlags fl) : imgSequenceDlg(parent,name, modal,fl) { @@ -46,21 +46,21 @@ imagesequence::imagesequence(QWidget* parent, const char* name, bool modal, WFla if (devMenu) { - connect (devMenu, SIGNAL(newDevice()), this, SLOT(newCCD())); - connect (devMenu, SIGNAL(newDevice()), this, SLOT(newFilter())); + connect (devMenu, TQT_SIGNAL(newDevice()), this, TQT_SLOT(newCCD())); + connect (devMenu, TQT_SIGNAL(newDevice()), this, TQT_SLOT(newFilter())); } - seqTimer = new QTimer(this); + seqTimer = new TQTimer(this); setModal(false); // Connect signals and slots - connect(startB, SIGNAL(clicked()), this, SLOT(startSequence())); - connect(stopB, SIGNAL(clicked()), this, SLOT(stopSequence())); - connect(closeB, SIGNAL(clicked()), this, SLOT(close())); - connect(seqTimer, SIGNAL(timeout()), this, SLOT(prepareCapture())); - connect(CCDCombo, SIGNAL(activated(int)), this, SLOT(checkCCD(int))); - connect(filterCombo, SIGNAL(activated(int)), this, SLOT(updateFilterCombo(int))); + connect(startB, TQT_SIGNAL(clicked()), this, TQT_SLOT(startSequence())); + connect(stopB, TQT_SIGNAL(clicked()), this, TQT_SLOT(stopSequence())); + connect(closeB, TQT_SIGNAL(clicked()), this, TQT_SLOT(close())); + connect(seqTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(prepareCapture())); + connect(CCDCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(checkCCD(int))); + connect(filterCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateFilterCombo(int))); active = false; ISOStamp = false; @@ -249,11 +249,11 @@ void imagesequence::startSequence() currentFilter = filterCombo->currentText(); lastFilter = filterCombo->currentItem(); - fullImgCountOUT->setText( QString("%1").arg(seqTotalCount)); - currentImgCountOUT->setText(QString("%1").arg(seqCurrentCount)); + fullImgCountOUT->setText( TQString("%1").arg(seqTotalCount)); + currentImgCountOUT->setText(TQString("%1").arg(seqCurrentCount)); // Ok, now let's connect signals and slots for this device - connect(stdDevCCD, SIGNAL(FITSReceived(QString)), this, SLOT(newFITS(QString))); + connect(stdDevCCD, TQT_SIGNAL(FITSReceived(TQString)), this, TQT_SLOT(newFITS(TQString))); // set the progress info imgProgress->setEnabled(true); @@ -294,7 +294,7 @@ void imagesequence::stopSequence() stdDevCCD->batchMode = false; stdDevCCD->ISOMode = false; - stdDevCCD->disconnect( SIGNAL(FITSReceived(QString))); + stdDevCCD->disconnect( TQT_SIGNAL(FITSReceived(TQString))); } } @@ -302,7 +302,7 @@ void imagesequence::stopSequence() void imagesequence::checkCCD(int ccdNum) { INDI_D *idevice = NULL; - QString targetCCD = CCDCombo->text(ccdNum); + TQString targetCCD = CCDCombo->text(ccdNum); INDIMenu *imenu = ksw->getINDIMenu(); if (!imenu) @@ -335,7 +335,7 @@ void imagesequence::checkCCD(int ccdNum) } -void imagesequence::newFITS(QString deviceLabel) +void imagesequence::newFITS(TQString deviceLabel) { // If the FITS is not for our device, simply ignore if (deviceLabel != currentCCD) @@ -344,7 +344,7 @@ void imagesequence::newFITS(QString deviceLabel) seqCurrentCount++; imgProgress->setProgress(seqCurrentCount); - currentImgCountOUT->setText( QString("%1").arg(seqCurrentCount)); + currentImgCountOUT->setText( TQString("%1").arg(seqCurrentCount)); // if we're done if (seqCurrentCount == seqTotalCount) @@ -358,7 +358,7 @@ void imagesequence::newFITS(QString deviceLabel) seqTimer->stop(); if (stdDevCCD) - stdDevCCD->disconnect( SIGNAL(FITSReceived(QString))); + stdDevCCD->disconnect( TQT_SIGNAL(FITSReceived(TQString))); resetButtons(); } @@ -371,7 +371,7 @@ void imagesequence::newFITS(QString deviceLabel) bool imagesequence::verifyCCDIntegrity() { - QString targetCCD; + TQString targetCCD; INDI_D *idevice = NULL; INDI_P *exposeProp; INDI_E *exposeElem; @@ -430,7 +430,7 @@ bool imagesequence::verifyCCDIntegrity() bool imagesequence::verifyFilterIntegrity() { - QString targetFilter; + TQString targetFilter; INDIMenu *devMenu = ksw->getINDIMenu(); INDI_D *filterDevice (NULL); INDI_E *filterElem(NULL); @@ -469,7 +469,7 @@ bool imagesequence::verifyFilterIntegrity() return false; } - // #3 Make sure it has FILTER_SLOT std property by searching for its SLOT element + // #3 Make sure it has FILTER_SLOT std property by searching for its TQT_SLOT element filterElem = filterDevice->findElem("SLOT"); if (filterElem == NULL) { @@ -507,7 +507,7 @@ void imagesequence::prepareCapture() if ( stdDevFilter && ((tempProp = stdDevFilter->dp->findProp("FILTER_SLOT")) != NULL)) { - connect (tempProp, SIGNAL(okState()), this, SLOT(captureImage())); + connect (tempProp, TQT_SIGNAL(okState()), this, TQT_SLOT(captureImage())); selectFilter(); } else @@ -531,7 +531,7 @@ void imagesequence::captureImage() // D. The property has been lost. if ( stdDevFilter && ((tempProp = stdDevFilter->dp->findProp("FILTER_SLOT")) != NULL)) - tempProp->disconnect( SIGNAL (okState())); + tempProp->disconnect( TQT_SIGNAL (okState())); if (!verifyCCDIntegrity()) { @@ -580,7 +580,7 @@ void imagesequence::captureImage() exposeElem->spinChanged(seqExpose); } else - exposeElem->write_w->setText( QString("%1").arg(seqExpose)); + exposeElem->write_w->setText( TQString("%1").arg(seqExpose)); } @@ -592,7 +592,7 @@ void imagesequence::captureImage() void imagesequence::updateFilterCombo(int filterNum) { INDIMenu *devMenu = ksw->getINDIMenu(); - QStringList filterList; + TQStringList filterList; INDI_E *filterElem; unsigned int filterMax; @@ -609,19 +609,19 @@ void imagesequence::updateFilterCombo(int filterNum) if (filterList.empty()) for (unsigned int i=0; i <= filterMax; i++) - filterList << QString("%1").arg(i); + filterList << TQString("%1").arg(i); // Fill filter combo if (filterList.count() <= filterMax) { filterPosCombo->insertStringList(filterList); for (unsigned int i = filterList.count() ; i <= filterMax ; i++) - filterPosCombo->insertItem(QString("%1").arg(i)); + filterPosCombo->insertItem(TQString("%1").arg(i)); } else { // filterMax < filterList.count() for (unsigned int i = 0 ; i <= filterMax ; i++) - filterPosCombo->insertItem(QString("%1").arg(filterList[i])); + filterPosCombo->insertItem(TQString("%1").arg(filterList[i])); } @@ -668,7 +668,7 @@ void imagesequence::selectFilter() filterElem->spinChanged(filterElem->targetValue); } else - filterElem->write_w->setText(QString("%1").arg(filterElem->targetValue)); + filterElem->write_w->setText(TQString("%1").arg(filterElem->targetValue)); // We're done! Send it to the driver filterProp->newText(); diff --git a/kstars/kstars/imagesequence.h b/kstars/kstars/imagesequence.h index bdffcd93..f16d3daa 100644 --- a/kstars/kstars/imagesequence.h +++ b/kstars/kstars/imagesequence.h @@ -23,7 +23,7 @@ class imagesequence : public imgSequenceDlg Q_OBJECT public: - imagesequence(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + imagesequence(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~imagesequence(); @@ -31,7 +31,7 @@ bool updateStatus(); private: KStars *ksw; -QTimer *seqTimer; +TQTimer *seqTimer; INDIStdDevice *stdDevCCD; INDIStdDevice *stdDevFilter; @@ -44,8 +44,8 @@ int seqDelay; int retries; int lastCCD; int lastFilter; -QString currentCCD; -QString currentFilter; +TQString currentCCD; +TQString currentFilter; bool verifyCCDIntegrity(); bool verifyFilterIntegrity(); @@ -62,7 +62,7 @@ public slots: void stopSequence(); void captureImage(); void prepareCapture(); - void newFITS(QString deviceLabel); + void newFITS(TQString deviceLabel); void checkCCD(int CCDNum); void updateFilterCombo(int filterNum); diff --git a/kstars/kstars/imageviewer.cpp b/kstars/kstars/imageviewer.cpp index 1a277ed2..4d3e5a15 100644 --- a/kstars/kstars/imageviewer.cpp +++ b/kstars/kstars/imageviewer.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qfont.h> +#include <tqfont.h> #include <klocale.h> #include <kmessagebox.h> @@ -29,7 +29,7 @@ #include <kapplication.h> -ImageViewer::ImageViewer (const KURL *url, const QString &capText, QWidget *parent, const char *name) +ImageViewer::ImageViewer (const KURL *url, const TQString &capText, TQWidget *parent, const char *name) : KMainWindow (parent, name), imageURL (*url), fileIsImage (false), ctrl (false), key_s (false), key_q (false), downloadJob(0) { @@ -37,14 +37,14 @@ ImageViewer::ImageViewer (const KURL *url, const QString &capText, QWidget *pare // JH: easier to just disable its mobility toolBar()->setMovingEnabled( false ); - KAction *action = new KAction (i18n ("Close Window"), "fileclose", CTRL+Key_Q, this, SLOT (close()), actionCollection()); + KAction *action = new KAction (i18n ("Close Window"), "fileclose", CTRL+Key_Q, this, TQT_SLOT (close()), actionCollection()); action->plug (toolBar()); - action = new KAction (i18n ("Save Image"), "filesave", CTRL+Key_S, this, SLOT (saveFileToDisc()), actionCollection()); + action = new KAction (i18n ("Save Image"), "filesave", CTRL+Key_S, this, TQT_SLOT (saveFileToDisc()), actionCollection()); action->plug (toolBar()); statusBar()->insertItem( capText, 0, 1, true ); statusBar()->setItemAlignment( 0, AlignLeft | AlignVCenter ); - QFont fnt = statusBar()->font(); + TQFont fnt = statusBar()->font(); fnt.setPointSize( fnt.pointSize() - 2 ); statusBar()->setFont( fnt ); @@ -60,9 +60,9 @@ ImageViewer::~ImageViewer() { if (!file->remove()) // if the file was not complete downloaded the suffix is ".part" { - kdDebug()<<QString("remove of %1 failed").arg(file->name())<<endl; + kdDebug()<<TQString("remove of %1 failed").arg(file->name())<<endl; file->setName (file->name() + ".part"); // set new suffix to filename - kdDebug()<<QString("try to remove %1").arg( file->name())<<endl; + kdDebug()<<TQString("try to remove %1").arg( file->name())<<endl; if (file->remove()) kdDebug()<<"file removed\n"; else @@ -70,20 +70,20 @@ ImageViewer::~ImageViewer() { } } -void ImageViewer::paintEvent (QPaintEvent */*ev*/) +void ImageViewer::paintEvent (TQPaintEvent */*ev*/) { bitBlt (this, 0, toolBar()->height() + 1, &pix); } -void ImageViewer::resizeEvent (QResizeEvent */*ev*/) +void ImageViewer::resizeEvent (TQResizeEvent */*ev*/) { if ( !downloadJob ) // only if image is loaded - pix = kpix.convertToPixmap ( image.smoothScale ( size().width() , size().height() - toolBar()->height() - statusBar()->height() ) ); // convert QImage to QPixmap (fastest method) + pix = kpix.convertToPixmap ( image.smoothScale ( size().width() , size().height() - toolBar()->height() - statusBar()->height() ) ); // convert TQImage to TQPixmap (fastest method) update(); } -void ImageViewer::closeEvent (QCloseEvent *ev) +void ImageViewer::closeEvent (TQCloseEvent *ev) { if (ev) // not if closeEvent (0) is called, because segfault ev->accept(); // parent-widgets should not get this event, so it will be filtered @@ -91,7 +91,7 @@ void ImageViewer::closeEvent (QCloseEvent *ev) } -void ImageViewer::keyPressEvent (QKeyEvent *ev) +void ImageViewer::keyPressEvent (TQKeyEvent *ev) { ev->accept(); //make sure key press events are captured. switch (ev->key()) @@ -111,7 +111,7 @@ void ImageViewer::keyPressEvent (QKeyEvent *ev) } } -void ImageViewer::keyReleaseEvent (QKeyEvent *ev) +void ImageViewer::keyReleaseEvent (TQKeyEvent *ev) { ev->accept(); switch (ev->key()) @@ -132,7 +132,7 @@ void ImageViewer::loadImageFromURL() kdDebug()<<"tempfile-URL is malformed\n"; downloadJob = KIO::copy (imageURL, saveURL); // starts the download asynchron - connect (downloadJob, SIGNAL (result (KIO::Job *)), SLOT (downloadReady (KIO::Job *))); + connect (downloadJob, TQT_SIGNAL (result (KIO::Job *)), TQT_SLOT (downloadReady (KIO::Job *))); } void ImageViewer::downloadReady (KIO::Job *job) @@ -161,7 +161,7 @@ void ImageViewer::showImage() { if (!image.load (file->name())) // if loading failed { - QString text = i18n ("Loading of the image %1 failed."); + TQString text = i18n ("Loading of the image %1 failed."); KMessageBox::error (this, text.arg (imageURL.prettyURL() )); closeEvent (0); return; @@ -173,7 +173,7 @@ void ImageViewer::showImage() image.smoothScale ( statusBar()->width() , image.height() * statusBar()->width() / image.width() ); } - QRect deskRect = kapp->desktop()->availableGeometry(); + TQRect deskRect = kapp->desktop()->availableGeometry(); int w = deskRect.width(); // screen width int h = deskRect.height(); // screen height int h2 = image.height() + toolBar()->height() + statusBar()->height(); //height required for ImageViewer @@ -205,10 +205,10 @@ void ImageViewer::saveFileToDisc() KURL newURL = KFileDialog::getSaveURL(imageURL.fileName()); // save-dialog with default filename if (!newURL.isEmpty()) { - QFile f (newURL.directory() + "/" + newURL.fileName()); + TQFile f (newURL.directory() + "/" + newURL.fileName()); if (f.exists()) { - int r=KMessageBox::warningContinueCancel(static_cast<QWidget *>(parent()), + int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()), i18n( "A file named \"%1\" already exists. " "Overwrite it?" ).arg(newURL.fileName()), i18n( "Overwrite File?" ), @@ -223,9 +223,9 @@ void ImageViewer::saveFileToDisc() void ImageViewer::saveFile (KURL &url) { // synchronous Access to prevent segfaults - if (!KIO::NetAccess::copy (KURL (file->name()), url, (QWidget*) 0)) + if (!KIO::NetAccess::copy (KURL (file->name()), url, (TQWidget*) 0)) { - QString text = i18n ("Saving of the image %1 failed."); + TQString text = i18n ("Saving of the image %1 failed."); KMessageBox::error (this, text.arg (url.prettyURL() )); } } diff --git a/kstars/kstars/imageviewer.h b/kstars/kstars/imageviewer.h index 7b1d3d45..7ebf8afb 100644 --- a/kstars/kstars/imageviewer.h +++ b/kstars/kstars/imageviewer.h @@ -18,8 +18,8 @@ #ifndef IMAGEVIEWER_H #define IMAGEVIEWER_H -#include <qimage.h> -#include <qpixmap.h> +#include <tqimage.h> +#include <tqpixmap.h> #include <kpixmapio.h> #include <kio/job.h> @@ -32,10 +32,10 @@ *@version 1.0 * *This image-viewer automatically resizes the picture. The output - *works with kio-slaves and not directly with the QImage save-routines + *works with kio-slaves and not directly with the TQImage save-routines *because normally the image-files are in GIF-format and QT does not *save these files. For other formats, like PNG, this is not so important - *because they can directly saved by QImage. + *because they can directly saved by TQImage. * *The download-slave works asynchron so the parent-widget can be used at *this time. The save-slave works synchronously, but this is not important @@ -50,34 +50,34 @@ class ImageViewer : public KMainWindow { public: /**Constructor. */ - ImageViewer (const KURL *imageName, const QString &capText, QWidget *parent, const char *name = 0); + ImageViewer (const KURL *imageName, const TQString &capText, TQWidget *parent, const char *name = 0); /**Destructor. If there is a partially downloaded image file, delete it.*/ ~ImageViewer(); protected: /**Bitblt the image onto the viewer widget */ - void paintEvent (QPaintEvent *ev); + void paintEvent (TQPaintEvent *ev); /**The window is resized when a file finishes downloading, before it is displayed. - *The resizeEvent converts the downloaded QImage to a QPixmap + *The resizeEvent converts the downloaded TQImage to a TQPixmap *@note (JH: not sure why this conversion is not done in showImage) */ - void resizeEvent (QResizeEvent *ev); + void resizeEvent (TQResizeEvent *ev); /**Make sure all events have been processed before closing the dialog */ - void closeEvent (QCloseEvent *ev); + void closeEvent (TQCloseEvent *ev); /**Keyboard shortcuts for saving files and closing the window *@note (this should be deprecated; instead just assign KAccel *to the close/save buttons) */ - void keyPressEvent (QKeyEvent *ev); + void keyPressEvent (TQKeyEvent *ev); /**Unset the bool variables that indicate keys were pressed. *(this should be deprecated; see above) */ - void keyReleaseEvent (QKeyEvent *ev); + void keyReleaseEvent (TQKeyEvent *ev); private: /**Display the downloaded image. Resize the window to fit the image, If the image is @@ -98,15 +98,15 @@ class ImageViewer : public KMainWindow { */ void checkJob(); - QImage image; - QPixmap pix; + TQImage image; + TQPixmap pix; KPixmapIO kpix; KTempFile tempfile; - QFile *file; + TQFile *file; const KURL imageURL; bool fileIsImage; - QString filename; + TQString filename; bool ctrl, key_s, key_q; // the keys KIO::Job *downloadJob; // download job of image -> 0 == no job is running diff --git a/kstars/kstars/indi/webcam/v4l1_pwc.h b/kstars/kstars/indi/webcam/v4l1_pwc.h index ad0fab1f..fd2e2032 100644 --- a/kstars/kstars/indi/webcam/v4l1_pwc.h +++ b/kstars/kstars/indi/webcam/v4l1_pwc.h @@ -62,7 +62,7 @@ class V4L1_PWC : public V4L1_Base int setWhiteBalanceBlue(int val, char *errmsg); /* TODO consider the SC modded cam after this - void setLongExposureTime(const QString& str); + void setLongExposureTime(const TQString& str); void setFrameRateMultiplicateur(int value);*/ diff --git a/kstars/kstars/indidevice.cpp b/kstars/kstars/indidevice.cpp index 44e77bb0..e7a36efc 100644 --- a/kstars/kstars/indidevice.cpp +++ b/kstars/kstars/indidevice.cpp @@ -44,24 +44,24 @@ #include <termios.h> #include <zlib.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qframe.h> -#include <qtabwidget.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qbuttongroup.h> -#include <qscrollview.h> -#include <qsocketnotifier.h> -#include <qvbox.h> -#include <qdatetime.h> -#include <qtable.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqframe.h> +#include <tqtabwidget.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqscrollview.h> +#include <tqsocketnotifier.h> +#include <tqvbox.h> +#include <tqdatetime.h> +#include <tqtable.h> +#include <tqstring.h> +#include <tqptrlist.h> #include <kled.h> #include <klineedit.h> @@ -87,7 +87,7 @@ const char * indi_std[NINDI_STD] = ** INDI Device: The work-horse. Responsible for handling its ** child properties and managing signal and changes. *******************************************************************/ -INDI_D::INDI_D(INDIMenu *menuParent, DeviceManager *parentManager, QString inName, QString inLabel) +INDI_D::INDI_D(INDIMenu *menuParent, DeviceManager *parentManager, TQString inName, TQString inLabel) { name = inName; label = inLabel; @@ -97,9 +97,9 @@ INDI_D::INDI_D(INDIMenu *menuParent, DeviceManager *parentManager, QString inNam gl.setAutoDelete(true); deviceVBox = menuParent->addVBoxPage(inLabel); - groupContainer = new QTabWidget(deviceVBox); + groupContainer = new TQTabWidget(deviceVBox); - msgST_w = new QTextEdit(deviceVBox); + msgST_w = new TQTextEdit(deviceVBox); msgST_w->setReadOnly(true); msgST_w->setMaximumHeight(100); @@ -253,7 +253,7 @@ int INDI_D::setTextValue (INDI_P *pp, XMLEle *root, char errmsg[]) XMLEle *ep; XMLAtt *ap; INDI_E *lp; - QString elementName; + TQString elementName; char iNumber[32]; double min, max; @@ -286,7 +286,7 @@ int INDI_D::setTextValue (INDI_P *pp, XMLEle *root, char errmsg[]) case PP_RO: if (pp->guitype == PG_TEXT) { - lp->text = QString(pcdataXMLEle(ep)); + lp->text = TQString(pcdataXMLEle(ep)); lp->read_w->setText(lp->text); } else if (pp->guitype == PG_NUMERIC) @@ -312,7 +312,7 @@ int INDI_D::setTextValue (INDI_P *pp, XMLEle *root, char errmsg[]) case PP_WO: if (pp->guitype == PG_TEXT) - lp->write_w->setText(QString(pcdataXMLEle(ep))); + lp->write_w->setText(TQString(pcdataXMLEle(ep))); else if (pp->guitype == PG_NUMERIC) { lp->value = atof(pcdataXMLEle(ep)); @@ -385,7 +385,7 @@ int INDI_D::setLabelState (INDI_P *pp, XMLEle *root, char errmsg[]) /* find matching label */ //fprintf(stderr, "Find matching label. Name from XML is %s\n", valuXMLAtt(ap)); - lp = pp->findElement(QString(valuXMLAtt(ap))); + lp = pp->findElement(TQString(valuXMLAtt(ap))); if (!lp) { @@ -394,7 +394,7 @@ int INDI_D::setLabelState (INDI_P *pp, XMLEle *root, char errmsg[]) return (-1); } - QFont buttonFont; + TQFont buttonFont; /* engage new state */ lp->state = state; @@ -457,7 +457,7 @@ int INDI_D::setBLOB(INDI_P *pp, XMLEle * root, char errmsg[]) if (strcmp(tagXMLEle(ep), "oneBLOB") == 0) { - blobEL = pp->findElement(QString(findXMLAttValu (ep, "name"))); + blobEL = pp->findElement(TQString(findXMLAttValu (ep, "name"))); if (blobEL) return processBlob(blobEL, ep, errmsg); @@ -481,7 +481,7 @@ int INDI_D::processBlob(INDI_E *blobEL, XMLEle *ep, char errmsg[]) XMLAtt *ap; int blobSize=0, r=0, dataType=0; uLongf dataSize=0; - QString dataFormat; + TQString dataFormat; char *baseBuffer; unsigned char *blobBuffer(NULL); bool iscomp(false); @@ -502,7 +502,7 @@ int INDI_D::processBlob(INDI_E *blobEL, XMLEle *ep, char errmsg[]) return (-1); } - dataFormat = QString(valuXMLAtt(ap)); + dataFormat = TQString(valuXMLAtt(ap)); baseBuffer = (char *) malloc ( (3*pcdatalenXMLEle(ep)/4) * sizeof (char)); blobSize = from64tobits (baseBuffer, pcdataXMLEle(ep)); @@ -567,11 +567,11 @@ bool INDI_D::isOn() INDI_P *prop; - prop = findProp(QString("CONNECTION")); + prop = findProp(TQString("CONNECTION")); if (!prop) return false; - return (prop->isOn(QString("CONNECT"))); + return (prop->isOn(TQString("CONNECT"))); } INDI_P * INDI_D::addProperty (XMLEle *root, char errmsg[]) @@ -584,11 +584,11 @@ INDI_P * INDI_D::addProperty (XMLEle *root, char errmsg[]) ap = findAtt (root, "group", errmsg); if (!ap) { - kdDebug() << QString(errmsg) << endl; + kdDebug() << TQString(errmsg) << endl; return NULL; } // Find an existing group, if none found, create one - pg = findGroup(QString(valuXMLAtt(ap)), 1, errmsg); + pg = findGroup(TQString(valuXMLAtt(ap)), 1, errmsg); if (!pg) return NULL; @@ -610,7 +610,7 @@ INDI_P * INDI_D::addProperty (XMLEle *root, char errmsg[]) * properties */ pg->propertyLayout->removeItem(pg->VerticalSpacer); - pp = new INDI_P(pg, QString(valuXMLAtt(ap))); + pp = new INDI_P(pg, TQString(valuXMLAtt(ap))); /* init state */ ap = findAtt (root, "state", errmsg); @@ -642,7 +642,7 @@ INDI_P * INDI_D::addProperty (XMLEle *root, char errmsg[]) return (pp); } -INDI_P * INDI_D::findProp (QString name) +INDI_P * INDI_D::findProp (TQString name) { for (unsigned int i = 0; i < gl.count(); i++) for (unsigned int j = 0; j < gl.at(i)->pl.count(); j++) @@ -652,7 +652,7 @@ INDI_P * INDI_D::findProp (QString name) return NULL; } -INDI_G * INDI_D::findGroup (QString grouptag, int create, char errmsg[]) +INDI_G * INDI_D::findGroup (TQString grouptag, int create, char errmsg[]) { INDI_G *ig; @@ -976,7 +976,7 @@ int INDI_D::buildBLOBGUI (XMLEle *root, char errmsg[]) return (0); } -INDI_E * INDI_D::findElem(QString name) +INDI_E * INDI_D::findElem(TQString name) { INDI_G *grp; INDI_P *prop; diff --git a/kstars/kstars/indidevice.h b/kstars/kstars/indidevice.h index 88188fb6..ce7b0827 100644 --- a/kstars/kstars/indidevice.h +++ b/kstars/kstars/indidevice.h @@ -13,7 +13,7 @@ #include <kdialogbase.h> #include <unistd.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include "indielement.h" @@ -71,26 +71,26 @@ class INDI_D : public KDialogBase { Q_OBJECT public: - INDI_D(INDIMenu *parentMenu, DeviceManager *parentManager, QString inName, QString inLabel); + INDI_D(INDIMenu *parentMenu, DeviceManager *parentManager, TQString inName, TQString inLabel); ~INDI_D(); - QString name; /* device name */ + TQString name; /* device name */ QString label; /* device label */ QVBox *deviceVBox; /* device tab frame */ - QTabWidget *groupContainer; /* Groups within the device */ + TQTabWidget *groupContainer; /* Groups within the device */ QTextEdit *msgST_w; /* scrolled text for messages */ unsigned char *dataBuffer; /* Generic buffer */ - //QScrollView *sv; /* Scroll view */ - //QVBoxLayout *mainLayout; - //QVBox *propertyLayout; - //QSpacerItem *vSpacer; - //QSpacerItem *hSpacer; - - //QPushButton *clear; - //QHBoxLayout *buttonLayout; + //TQScrollView *sv; /* Scroll view */ + //TQVBoxLayout *mainLayout; + //TQVBox *propertyLayout; + //TQSpacerItem *vSpacer; + //TQSpacerItem *hSpacer; + + //TQPushButton *clear; + //TQHBoxLayout *buttonLayout; INDIStdDevice *stdDev; - QPtrList<INDI_G> gl; /* list of pointers to groups */ + TQPtrList<INDI_G> gl; /* list of pointers to groups */ INDI_G *curGroup; bool INDIStdSupport; @@ -118,9 +118,9 @@ class INDI_D : public KDialogBase /***************************************************************** * Find ******************************************************************/ - INDI_P * findProp (QString name); - INDI_E * findElem (QString name); - INDI_G * findGroup (QString grouptag, int create, char errmsg[]); + INDI_P * findProp (TQString name); + INDI_E * findElem (TQString name); + INDI_G * findGroup (TQString grouptag, int create, char errmsg[]); int findPerm (INDI_P *pp , XMLEle *root, PPerm *permp, char errmsg[]); /***************************************************************** diff --git a/kstars/kstars/indidriver.cpp b/kstars/kstars/indidriver.cpp index 52e2a1c5..8c2e0db6 100644 --- a/kstars/kstars/indidriver.cpp +++ b/kstars/kstars/indidriver.cpp @@ -25,11 +25,11 @@ #include "kstarsdata.h" #include "ksutils.h" -#include <qfile.h> -#include <qvaluelist.h> -#include <qcstring.h> -#include <qradiobutton.h> -#include <qtextedit.h> +#include <tqfile.h> +#include <tqvaluelist.h> +#include <tqcstring.h> +#include <tqradiobutton.h> +#include <tqtextedit.h> #include <kiconloader.h> #include <klistview.h> @@ -48,7 +48,7 @@ * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -INDIDriver::INDIDriver(QWidget *parent) : devManager( parent ) +INDIDriver::INDIDriver(TQWidget *parent) : devManager( parent ) { @@ -86,7 +86,7 @@ INDIDriver::INDIDriver(QWidget *parent) : devManager( parent ) for (uint i = 0; i < ksw->data()->INDIHostsList.count(); i++) { - QListViewItem *item = new QListViewItem(clientListView, lastGroup); + TQListViewItem *item = new TQListViewItem(clientListView, lastGroup); lastGroup = item; item->setPixmap(0, disconnected); item->setText(1, ksw->data()->INDIHostsList.at(i)->name); @@ -96,28 +96,28 @@ INDIDriver::INDIDriver(QWidget *parent) : devManager( parent ) lastGroup = NULL; - QObject::connect(addB, SIGNAL(clicked()), this, SLOT(addINDIHost())); - QObject::connect(modifyB, SIGNAL(clicked()), this, SLOT(modifyINDIHost())); - QObject::connect(removeB, SIGNAL(clicked()), this, SLOT(removeINDIHost())); + TQObject::connect(addB, TQT_SIGNAL(clicked()), this, TQT_SLOT(addINDIHost())); + TQObject::connect(modifyB, TQT_SIGNAL(clicked()), this, TQT_SLOT(modifyINDIHost())); + TQObject::connect(removeB, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeINDIHost())); - QObject::connect(clientListView, SIGNAL(rightButtonPressed ( QListViewItem *, const QPoint &, int )), this, SLOT(ClientprocessRightButton( QListViewItem *, const QPoint &, int ))); + TQObject::connect(clientListView, TQT_SIGNAL(rightButtonPressed ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(ClientprocessRightButton( TQListViewItem *, const TQPoint &, int ))); -QObject::connect(ClientpopMenu, SIGNAL(activated(int)), this, SLOT(processHostStatus(int))); +TQObject::connect(ClientpopMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(processHostStatus(int))); -QObject::connect(localListView, SIGNAL(rightButtonPressed ( QListViewItem *, const QPoint &, int )), this, SLOT(LocalprocessRightButton( QListViewItem *, const QPoint &, int ))); +TQObject::connect(localListView, TQT_SIGNAL(rightButtonPressed ( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(LocalprocessRightButton( TQListViewItem *, const TQPoint &, int ))); -QObject::connect(LocalpopMenu, SIGNAL(activated(int)), this, SLOT(processDeviceStatus(int))); +TQObject::connect(LocalpopMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(processDeviceStatus(int))); -QObject::connect(ksw->getINDIMenu(), SIGNAL(driverDisconnected(int)), this, SLOT(shutdownHost(int))); +TQObject::connect(ksw->getINDIMenu(), TQT_SIGNAL(driverDisconnected(int)), this, TQT_SLOT(shutdownHost(int))); -QObject::connect(connectHostB, SIGNAL(clicked()), this, SLOT(activateHostConnection())); -QObject::connect(disconnectHostB, SIGNAL(clicked()), this, SLOT(activateHostDisconnection())); +TQObject::connect(connectHostB, TQT_SIGNAL(clicked()), this, TQT_SLOT(activateHostConnection())); +TQObject::connect(disconnectHostB, TQT_SIGNAL(clicked()), this, TQT_SLOT(activateHostDisconnection())); -QObject::connect(runServiceB, SIGNAL(clicked()), this, SLOT(activateRunService())); -QObject::connect(stopServiceB, SIGNAL(clicked()), this, SLOT(activateStopService())); +TQObject::connect(runServiceB, TQT_SIGNAL(clicked()), this, TQT_SLOT(activateRunService())); +TQObject::connect(stopServiceB, TQT_SIGNAL(clicked()), this, TQT_SLOT(activateStopService())); -QObject::connect(localListView, SIGNAL(selectionChanged()), this, SLOT(updateLocalButtons())); -QObject::connect(clientListView, SIGNAL(selectionChanged()), this, SLOT(updateClientButtons())); +TQObject::connect(localListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateLocalButtons())); +TQObject::connect(clientListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateClientButtons())); readXMLDriver(); resize( 500, 300); @@ -126,7 +126,7 @@ resize( 500, 300); void INDIDriver::shutdownHost(int mgrID) { - QListViewItem *affectedItem; + TQListViewItem *affectedItem; for (uint i=0; i < ksw->data()->INDIHostsList.count(); i++) { @@ -150,7 +150,7 @@ for (uint i=0; i < ksw->data()->INDIHostsList.count(); i++) if (!affectedItem) return; affectedItem->setPixmap(1, stopPix); affectedItem->setPixmap(2, NULL); - affectedItem->setText(4, QString("")); + affectedItem->setText(4, TQString("")); runServiceB->setEnabled(true); stopServiceB->setEnabled(false); devices[i]->managed = false; @@ -163,7 +163,7 @@ for (uint i=0; i < ksw->data()->INDIHostsList.count(); i++) } -void INDIDriver::ClientprocessRightButton( QListViewItem *item, const QPoint &p, int column) +void INDIDriver::ClientprocessRightButton( TQListViewItem *item, const TQPoint &p, int column) { column = 0; @@ -172,7 +172,7 @@ void INDIDriver::ClientprocessRightButton( QListViewItem *item, const QPoint &p, ClientpopMenu->popup(p); } -void INDIDriver::LocalprocessRightButton( QListViewItem *item, const QPoint &p, int column) +void INDIDriver::LocalprocessRightButton( TQListViewItem *item, const TQPoint &p, int column) { column = 0; @@ -215,7 +215,7 @@ void INDIDriver::updateLocalButtons() serverLogText->clear(); - for ( QStringList::Iterator it = devices[i]->serverBuffer.begin(); it != devices[i]->serverBuffer.end(); ++it ) + for ( TQStringList::Iterator it = devices[i]->serverBuffer.begin(); it != devices[i]->serverBuffer.end(); ++it ) serverLogText->insert(*it); break; @@ -280,7 +280,7 @@ void INDIDriver::processDeviceStatus(int id) } localListView->selectedItem()->setPixmap(1, runningPix); - localListView->selectedItem()->setText(4, QString("%1").arg(devices[i]->indiPort)); + localListView->selectedItem()->setText(4, TQString("%1").arg(devices[i]->indiPort)); runServiceB->setEnabled(false); stopServiceB->setEnabled(true); @@ -292,7 +292,7 @@ void INDIDriver::processDeviceStatus(int id) localListView->selectedItem()->setPixmap(1, stopPix); localListView->selectedItem()->setPixmap(2, NULL); - localListView->selectedItem()->setText(4, QString("")); + localListView->selectedItem()->setText(4, TQString("")); runServiceB->setEnabled(true); stopServiceB->setEnabled(false); devices[i]->restart(); @@ -305,7 +305,7 @@ void INDIDriver::processHostStatus(int id) { int mgrID; bool toConnect = (id == 0); - QListViewItem *currentItem = clientListView->selectedItem(); + TQListViewItem *currentItem = clientListView->selectedItem(); if (!currentItem) return; INDIHostsInfo *hostInfo; @@ -405,7 +405,7 @@ bool INDIDriver::runDevice(IDevice *dev) dev->proc = new KProcess; *dev->proc << "indiserver"; - *dev->proc << "-v" << "-r" << "0" << "-p" << QString("%1").arg(dev->indiPort) << dev->driver; + *dev->proc << "-v" << "-r" << "0" << "-p" << TQString("%1").arg(dev->indiPort) << dev->driver; // Check Mode dev->mode = localR->isChecked() ? IDevice::M_LOCAL : IDevice::M_SERVER; @@ -415,7 +415,7 @@ bool INDIDriver::runDevice(IDevice *dev) else localListView->selectedItem()->setPixmap(2, serverMode); - connect(dev->proc, SIGNAL(receivedStderr (KProcess *, char *, int)), dev, SLOT(processstd(KProcess *, char*, int))); + connect(dev->proc, TQT_SIGNAL(receivedStderr (KProcess *, char *, int)), dev, TQT_SLOT(processstd(KProcess *, char*, int))); dev->proc->start(KProcess::NotifyOnExit, KProcess::Stderr); //dev->proc->start(); @@ -431,7 +431,7 @@ void INDIDriver::removeDevice(IDevice *dev) devices[i]->restart(); } -void INDIDriver::removeDevice(QString deviceLabel) +void INDIDriver::removeDevice(TQString deviceLabel) { for (unsigned int i=0 ; i < devices.size(); i++) if (deviceLabel == devices[i]->label) @@ -442,19 +442,19 @@ void INDIDriver::removeDevice(QString deviceLabel) void INDIDriver::saveDevicesToDisk() { - QFile file; - QString elementData; + TQFile file; + TQString elementData; file.setName( locateLocal( "appdata", "drivers.xml" ) ); //determine filename in local user KDE directory tree. if ( !file.open( IO_WriteOnly)) { - QString message = i18n( "unable to write to file 'drivers.xml'\nAny changes to INDI device drivers will not be saved." ); + TQString message = i18n( "unable to write to file 'drivers.xml'\nAny changes to INDI device drivers will not be saved." ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return; } - QTextStream outstream(&file); + TQTextStream outstream(&file); // Let's write drivers first outstream << "<ScopeDrivers>" << endl; @@ -471,7 +471,7 @@ void INDIDriver::saveDevicesToDisk() { if (devices[i]->deviceType == KSTARS_TELESCOPE) { - outstream << QString("<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'>").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 << " <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 << QString("<device label='%1'>").arg(devices[i]->label) << endl; + outstream << TQString("<device label='%1'>").arg(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 << QString("<device label='%1'>").arg(devices[i]->label) << endl; + outstream << TQString("<device label='%1'>").arg(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 << QString("<device label='%1'>").arg(devices[i]->label) << endl; + outstream << TQString("<device label='%1'>").arg(devices[i]->label) << endl; outstream << " <driver>" << devices[i]->driver << "</driver>" << endl; outstream << " <version>" << devices[i]->version << "</version>" << endl; outstream << "</device>" << endl; @@ -526,7 +526,7 @@ void INDIDriver::saveDevicesToDisk() } -bool INDIDriver::isDeviceRunning(QString deviceLabel) +bool INDIDriver::isDeviceRunning(TQString deviceLabel) { for (unsigned int i=0 ; i < devices.size(); i++) @@ -546,7 +546,7 @@ int INDIDriver::getINDIPort() lastPort+=5; - KExtendedSocket ks(QString::null, lastPort, KExtendedSocket::passiveSocket | KExtendedSocket::noResolve); + KExtendedSocket ks(TQString::null, lastPort, KExtendedSocket::passiveSocket | KExtendedSocket::noResolve); for (uint i=0 ; i < 10; i++) { @@ -564,8 +564,8 @@ int INDIDriver::getINDIPort() bool INDIDriver::readXMLDriver() { - QString indiFile("drivers.xml"); - QFile file; + TQString indiFile("drivers.xml"); + TQFile file; char errmsg[1024]; if ( !KSUtils::openDataFile( file, indiFile ) ) @@ -592,7 +592,7 @@ bool INDIDriver::readXMLDriver() } else if (errmsg[0]) { - kdDebug() << QString(errmsg); + kdDebug() << TQString(errmsg); return false; } } @@ -619,7 +619,7 @@ bool INDIDriver::buildDeviceGroup(XMLEle *root, char errmsg[]) XMLAtt *ap; XMLEle *ep; - QString groupName; + TQString groupName; int groupType = KSTARS_TELESCOPE; if (!strcmp(tagXMLEle(root), "ScopeDrivers")) @@ -657,7 +657,7 @@ bool INDIDriver::buildDeviceGroup(XMLEle *root, char errmsg[]) //KListViewItem *group = new KListViewItem(topItem, lastGroup); - QListViewItem *group = new QListViewItem(localListView, lastGroup); + TQListViewItem *group = new TQListViewItem(localListView, lastGroup); group->setText(0, groupName); lastGroup = group; //group->setOpen(true); @@ -671,14 +671,14 @@ bool INDIDriver::buildDeviceGroup(XMLEle *root, char errmsg[]) return true; } -bool INDIDriver::buildDriverElement(XMLEle *root, QListViewItem *DGroup, int groupType, char errmsg[]) +bool INDIDriver::buildDriverElement(XMLEle *root, TQListViewItem *DGroup, int groupType, char errmsg[]) { XMLAtt *ap; XMLEle *el; IDevice *dv; - QString label; - QString driver; - QString version; + TQString label; + TQString driver; + TQString version; double focal_length (-1), aperture (-1); ap = findXMLAtt(root, "label"); @@ -693,11 +693,11 @@ bool INDIDriver::buildDriverElement(XMLEle *root, QListViewItem *DGroup, int gro // Let's look for telescope-specfic attributes: focal length and aperture ap = findXMLAtt(root, "focal_length"); if (ap) - focal_length = QString(valuXMLAtt(ap)).toDouble(); + focal_length = TQString(valuXMLAtt(ap)).toDouble(); ap = findXMLAtt(root, "aperture"); if (ap) - aperture = QString(valuXMLAtt(ap)).toDouble(); + aperture = TQString(valuXMLAtt(ap)).toDouble(); el = findXMLEle(root, "driver"); @@ -714,17 +714,17 @@ bool INDIDriver::buildDriverElement(XMLEle *root, QListViewItem *DGroup, int gro version = pcdataXMLEle(el); - QListViewItem *device = new QListViewItem(DGroup, lastDevice); + TQListViewItem *device = new TQListViewItem(DGroup, lastDevice); - device->setText(0, QString(label)); + device->setText(0, TQString(label)); device->setPixmap(1, stopPix); - device->setText(3, QString(version)); + device->setText(3, TQString(version)); lastDevice = device; dv = new IDevice(label, driver, version); dv->deviceType = groupType; - connect(dv, SIGNAL(newServerInput()), this, SLOT(updateLocalButtons())); + connect(dv, TQT_SIGNAL(newServerInput()), this, TQT_SLOT(updateLocalButtons())); if (focal_length > 0) dv->focal_length = focal_length; if (aperture > 0) @@ -759,7 +759,7 @@ void INDIDriver::addINDIHost() hostConf.setCaption(i18n("Add Host")); bool portOk = false; - if (hostConf.exec() == QDialog::Accepted) + if (hostConf.exec() == TQDialog::Accepted) { INDIHostsInfo *hostItem = new INDIHostsInfo; hostItem->name = hostConf.nameIN->text(); @@ -787,7 +787,7 @@ void INDIDriver::addINDIHost() ksw->data()->INDIHostsList.append(hostItem); - QListViewItem *item = new QListViewItem(clientListView); + TQListViewItem *item = new TQListViewItem(clientListView); item->setPixmap(0, disconnected); item->setText(1, hostConf.nameIN->text()); item->setText(2, hostConf.portnumber->text()); @@ -805,7 +805,7 @@ void INDIDriver::modifyINDIHost() INDIHostConf hostConf(this); hostConf.setCaption(i18n("Modify Host")); - QListViewItem *currentItem = clientListView->currentItem(); + TQListViewItem *currentItem = clientListView->currentItem(); if (currentItem == NULL) return; @@ -819,7 +819,7 @@ void INDIDriver::modifyINDIHost() hostConf.hostname->setText(ksw->data()->INDIHostsList.at(i)->hostname); hostConf.portnumber->setText(ksw->data()->INDIHostsList.at(i)->portnumber); - if (hostConf.exec() == QDialog::Accepted) + if (hostConf.exec() == TQDialog::Accepted) { INDIHostsInfo *hostItem = new INDIHostsInfo; hostItem->name = hostConf.nameIN->text(); @@ -870,19 +870,19 @@ void INDIDriver::removeINDIHost() void INDIDriver::saveHosts() { - QFile file; - QString hostData; + TQFile file; + TQString hostData; file.setName( locateLocal( "appdata", "indihosts.xml" ) ); //determine filename in local user KDE directory tree. if ( !file.open( IO_WriteOnly)) { - QString message = i18n( "unable to write to file 'indihosts.xml'\nAny changes to INDI hosts configurations will not be saved." ); + TQString message = i18n( "unable to write to file 'indihosts.xml'\nAny changes to INDI hosts configurations will not be saved." ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return; } - QTextStream outstream(&file); + TQTextStream outstream(&file); for (uint i= 0; i < ksw->data()->INDIHostsList.count(); i++) { @@ -911,7 +911,7 @@ INDIDriver::~INDIDriver() } -IDevice::IDevice(QString inLabel, QString inDriver, QString inVersion) +IDevice::IDevice(TQString inLabel, TQString inDriver, TQString inVersion) { label = inLabel;; driver = inDriver;; diff --git a/kstars/kstars/indidriver.h b/kstars/kstars/indidriver.h index 8cb41b30..3511112e 100644 --- a/kstars/kstars/indidriver.h +++ b/kstars/kstars/indidriver.h @@ -17,7 +17,7 @@ #ifndef INDIDRIVER_H #define INDIDRIVER_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdialogbase.h> #include <unistd.h> #include <vector> @@ -33,9 +33,9 @@ class KProcess; struct INDIHostsInfo { - QString name; - QString hostname; - QString portnumber; + TQString name; + TQString hostname; + TQString portnumber; bool isConnected; int mgrID; }; @@ -45,14 +45,14 @@ class IDevice : public QObject Q_OBJECT public: - IDevice(QString inLabel, QString inDriver, QString inVersion); + IDevice(TQString inLabel, TQString inDriver, TQString inVersion); ~IDevice(); enum ServeMODE { M_LOCAL, M_SERVER }; - QString label; - QString driver; - QString version; - QStringList serverBuffer; + TQString label; + TQString driver; + TQString version; + TQStringList serverBuffer; int state; int mode; int indiPort; @@ -82,7 +82,7 @@ class INDIDriver : public devManager public: - INDIDriver(QWidget * parent = 0); + INDIDriver(TQWidget * parent = 0); ~INDIDriver(); KListView* deviceContainer; @@ -91,20 +91,20 @@ class INDIDriver : public devManager bool buildDriversList( XMLEle *root, char errmsg[]); bool buildDeviceGroup (XMLEle *root, char errmsg[]); - bool buildDriverElement(XMLEle *root, QListViewItem *DGroup, int groupType, char errmsg[]); + bool buildDriverElement(XMLEle *root, TQListViewItem *DGroup, int groupType, char errmsg[]); - QListViewItem *lastGroup; - QListViewItem *lastDevice; + TQListViewItem *lastGroup; + TQListViewItem *lastDevice; - QStringList driversList; + TQStringList driversList; - QPixmap runningPix; - QPixmap stopPix; - QPixmap connected; - QPixmap disconnected; - QPixmap establishConnection; - QPixmap localMode; - QPixmap serverMode; + TQPixmap runningPix; + TQPixmap stopPix; + TQPixmap connected; + TQPixmap disconnected; + TQPixmap establishConnection; + TQPixmap localMode; + TQPixmap serverMode; KPopupMenu *ClientpopMenu; KPopupMenu *LocalpopMenu; @@ -113,11 +113,11 @@ class INDIDriver : public devManager bool runDevice(IDevice *dev); void removeDevice(IDevice *dev); - void removeDevice(QString deviceLabel); + void removeDevice(TQString deviceLabel); void saveDevicesToDisk(); int getINDIPort(); int activeDriverCount(); - bool isDeviceRunning(QString deviceLabel); + bool isDeviceRunning(TQString deviceLabel); void saveHosts(); @@ -128,8 +128,8 @@ class INDIDriver : public devManager public slots: void updateMenuActions(); - void ClientprocessRightButton( QListViewItem *, const QPoint &, int ); - void LocalprocessRightButton( QListViewItem *, const QPoint &, int ); + void ClientprocessRightButton( TQListViewItem *, const TQPoint &, int ); + void LocalprocessRightButton( TQListViewItem *, const TQPoint &, int ); void processDeviceStatus(int); void processHostStatus(int); void addINDIHost(); diff --git a/kstars/kstars/indielement.cpp b/kstars/kstars/indielement.cpp index 4c7092ea..0ae460f7 100644 --- a/kstars/kstars/indielement.cpp +++ b/kstars/kstars/indielement.cpp @@ -16,13 +16,13 @@ #include "indi/indicom.h" -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qstring.h> -#include <qptrlist.h> -#include <qslider.h> -#include <qdir.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqslider.h> +#include <tqdir.h> #include <kurl.h> #include <kfiledialog.h> @@ -66,14 +66,14 @@ XMLEle * findEle (XMLEle *ep, INDI_P *pp, const char *child, char errmsg[]) /******************************************************************* ** INDI Element *******************************************************************/ -INDI_E::INDI_E(INDI_P *parentProperty, QString inName, QString inLabel) +INDI_E::INDI_E(INDI_P *parentProperty, TQString inName, TQString inLabel) { name = inName; label = inLabel; pp = parentProperty; - EHBox = new QHBoxLayout(0, 0, KDialog::spacingHint()); + EHBox = new TQHBoxLayout(0, 0, KDialog::spacingHint()); label_w = NULL; read_w = NULL; write_w = NULL; @@ -108,13 +108,13 @@ label_w = new KSqueezedTextLabel(pp->pg->propertyContainer); label_w->setMinimumWidth(ELEMENT_LABEL_WIDTH); label_w->setMaximumWidth(ELEMENT_LABEL_WIDTH); label_w->setFrameShape( KSqueezedTextLabel::Box ); -label_w->setPaletteBackgroundColor( QColor( 224, 232, 238 ) ); -label_w->setTextFormat( QLabel::RichText ); -label_w->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); +label_w->setPaletteBackgroundColor( TQColor( 224, 232, 238 ) ); +label_w->setTextFormat( TQLabel::RichText ); +label_w->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignCenter ) ); if (label.length() > MAX_LABEL_LENGTH) { - QFont tempFont( label_w->font() ); + TQFont tempFont( label_w->font() ); tempFont.setPointSize( tempFont.pointSize() - MED_INDI_FONT ); label_w->setFont( tempFont ); } @@ -124,7 +124,7 @@ label_w->setText(label); EHBox->addWidget(label_w); } -int INDI_E::buildTextGUI(QString initText) +int INDI_E::buildTextGUI(TQString initText) { setupElementLabel(); @@ -287,17 +287,17 @@ void INDI_E::setupElementScale(int length) int steps = (int) ((max - min) / step); spin_w = new KDoubleSpinBox(min, max, step, value, 2, pp->pg->propertyContainer ); -slider_w = new QSlider(0, steps, 1, (int) ((value - min) / step), Qt::Horizontal, pp->pg->propertyContainer ); +slider_w = new TQSlider(0, steps, 1, (int) ((value - min) / step), Qt::Horizontal, pp->pg->propertyContainer ); -connect(spin_w, SIGNAL(valueChanged(double)), this, SLOT(spinChanged(double ))); -connect(slider_w, SIGNAL(sliderMoved(int)), this, SLOT(sliderChanged(int ))); +connect(spin_w, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(spinChanged(double ))); +connect(slider_w, TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(sliderChanged(int ))); //kdDebug() << "For element " << label << " we have step of " << step << endl; if (length == ELEMENT_FULL_WIDTH) - spin_w->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, spin_w->sizePolicy().hasHeightForWidth() ) ); + spin_w->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, spin_w->sizePolicy().hasHeightForWidth() ) ); else - spin_w->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, spin_w->sizePolicy().hasHeightForWidth() ) ); + spin_w->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, spin_w->sizePolicy().hasHeightForWidth() ) ); spin_w->setMinimumWidth( (int) (length * 0.45) ); slider_w->setMinimumWidth( (int) (length * 0.55) ); @@ -359,11 +359,11 @@ void INDI_E::setMax (double inMax) void INDI_E::setupElementWrite(int length) { write_w = new KLineEdit( pp->pg->propertyContainer); - write_w->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, write_w->sizePolicy().hasHeightForWidth() )); + write_w->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, write_w->sizePolicy().hasHeightForWidth() )); write_w->setMinimumWidth( length ); write_w->setMaximumWidth( length); - QObject::connect(write_w, SIGNAL(returnPressed()), pp, SLOT(newText())); + TQObject::connect(write_w, TQT_SIGNAL(returnPressed()), pp, TQT_SLOT(newText())); EHBox->addWidget(write_w); } @@ -388,12 +388,12 @@ void INDI_E::setupElementRead(int length) void INDI_E::setupBrowseButton() { browse_w = new KPushButton("...", pp->pg->propertyContainer); - browse_w->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, browse_w->sizePolicy().hasHeightForWidth() ) ); + browse_w->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, browse_w->sizePolicy().hasHeightForWidth() ) ); browse_w->setMinimumWidth( MIN_SET_WIDTH ); browse_w->setMaximumWidth( MAX_SET_WIDTH ); EHBox->addWidget(browse_w); - QObject::connect(browse_w, SIGNAL(clicked()), this, SLOT(browseBlob())); + TQObject::connect(browse_w, TQT_SIGNAL(clicked()), this, TQT_SLOT(browseBlob())); } @@ -410,7 +410,7 @@ void INDI_E::browseBlob() KURL currentURL; - currentURL = KFileDialog::getOpenURL( QDir::homeDirPath(), "*"); + currentURL = KFileDialog::getOpenURL( TQDir::homeDirPath(), "*"); // if user presses cancel if (currentURL.isEmpty()) diff --git a/kstars/kstars/indielement.h b/kstars/kstars/indielement.h index c7a6521d..cc92d960 100644 --- a/kstars/kstars/indielement.h +++ b/kstars/kstars/indielement.h @@ -14,8 +14,8 @@ #include <kdialogbase.h> #include <unistd.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include "indi/lilxml.h" @@ -90,14 +90,14 @@ class INDI_E : public QObject { Q_OBJECT public: - INDI_E(INDI_P *parentProperty, QString inName, QString inLabel); + INDI_E(INDI_P *parentProperty, TQString inName, TQString inLabel); ~INDI_E(); - QString name; /* name */ - QString label; /* label is the name by default, unless specefied */ + TQString name; /* name */ + TQString label; /* label is the name by default, unless specefied */ PState state; /* control on/off t/f etc */ INDI_P *pp; /* parent property */ - QHBoxLayout *EHBox; /* Horizontal layout */ + TQHBoxLayout *EHBox; /* Horizontal layout */ /* GUI widgets, only malloced when needed */ KSqueezedTextLabel *label_w; // label @@ -108,16 +108,16 @@ class INDI_E : public QObject QSlider *slider_w; // Slider KPushButton *push_w; // push button KPushButton *browse_w; // browse button - QCheckBox *check_w; // check box - QSpacerItem *hSpacer; // Horizontal spacer + TQCheckBox *check_w; // check box + TQSpacerItem *hSpacer; // Horizontal spacer double min, max, step; // params for scale double value; // current value double targetValue; // target value - QString text; // current text - QString format; // number format, if applicable + TQString text; // current text + TQString format; // number format, if applicable - int buildTextGUI (QString initText); + int buildTextGUI (TQString initText); int buildNumberGUI (double initValue); int buildLightGUI(); int buildBLOBGUI(); diff --git a/kstars/kstars/indifitsconf.cpp b/kstars/kstars/indifitsconf.cpp index 571ad738..5c4cddae 100644 --- a/kstars/kstars/indifitsconf.cpp +++ b/kstars/kstars/indifitsconf.cpp @@ -17,20 +17,20 @@ #include <kfiledialog.h> #include <klineedit.h> -#include <qcheckbox.h> -#include <qstringlist.h> -#include <qcombobox.h> +#include <tqcheckbox.h> +#include <tqstringlist.h> +#include <tqcombobox.h> #include "Options.h" -INDIFITSConf::INDIFITSConf(QWidget* parent, const char* name, bool modal, WFlags fl) +INDIFITSConf::INDIFITSConf(TQWidget* parent, const char* name, bool modal, WFlags fl) : INDIConf(parent,name, modal,fl) { KIconLoader *icons = KGlobal::iconLoader(); selectDirB->setPixmap( icons->loadIcon( "fileopen", KIcon::Toolbar ) ); - connect(selectDirB, SIGNAL(clicked()), this, SLOT(saveFITSDirectory())); - connect(filterCombo, SIGNAL(activated (int)), this, SLOT(comboUpdate(int))); + connect(selectDirB, TQT_SIGNAL(clicked()), this, TQT_SLOT(saveFITSDirectory())); + connect(filterCombo, TQT_SIGNAL(activated (int)), this, TQT_SLOT(comboUpdate(int))); } @@ -42,7 +42,7 @@ INDIFITSConf::~INDIFITSConf() void INDIFITSConf::saveFITSDirectory() { - QString dir = KFileDialog::getExistingDirectory(fitsDIR_IN->text()); + TQString dir = KFileDialog::getExistingDirectory(fitsDIR_IN->text()); if (!dir.isEmpty()) fitsDIR_IN->setText(dir); @@ -50,7 +50,7 @@ void INDIFITSConf::saveFITSDirectory() void INDIFITSConf::loadOptions() { - QStringList filterNumbers; + TQStringList filterNumbers; lastIndex = 0; filterNumbers << "0" << "1" << "2" << "3" << "4" << "5" << "6" << "7" << "8" << "9"; @@ -66,7 +66,7 @@ void INDIFITSConf::loadOptions() if (Options::fitsSaveDirectory().isEmpty()) { - fitsDIR_IN->setText (QDir:: homeDirPath()); + fitsDIR_IN->setText (TQDir:: homeDirPath()); Options::setFitsSaveDirectory( fitsDIR_IN->text()); } else diff --git a/kstars/kstars/indifitsconf.h b/kstars/kstars/indifitsconf.h index fa825d83..600fcb12 100644 --- a/kstars/kstars/indifitsconf.h +++ b/kstars/kstars/indifitsconf.h @@ -17,7 +17,7 @@ class INDIFITSConf : public INDIConf Q_OBJECT public: - INDIFITSConf(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + INDIFITSConf(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~INDIFITSConf(); /*$PUBLIC_FUNCTIONS$*/ @@ -30,7 +30,7 @@ public slots: private: int lastIndex; - QStringList filterList; + TQStringList filterList; }; diff --git a/kstars/kstars/indigroup.cpp b/kstars/kstars/indigroup.cpp index 7ef606b6..0dcbb8b9 100644 --- a/kstars/kstars/indigroup.cpp +++ b/kstars/kstars/indigroup.cpp @@ -18,17 +18,17 @@ #include <klocale.h> - #include <qlayout.h> - #include <qframe.h> - #include <qtimer.h> - #include <qtabwidget.h> + #include <tqlayout.h> + #include <tqframe.h> + #include <tqtimer.h> + #include <tqtabwidget.h> /******************************************************************* ** INDI Group: a tab widget for common properties. All properties ** belong to a group, whether they have one or not but how the group ** is displayed differs *******************************************************************/ -INDI_G::INDI_G(INDI_D *parentDevice, QString inName) +INDI_G::INDI_G(INDI_D *parentDevice, TQString inName) { dp = parentDevice; @@ -38,12 +38,12 @@ INDI_G::INDI_G(INDI_D *parentDevice, QString inName) // FIXME what's the parent exactly? // You can do this eaither way: - // 1. Propertycontainer is a QFrame, then you make QVBoxLayout for it (check form1.cpp) - // 2. Keep it as QVBox and let it handle its children. + // 1. Propertycontainer is a TQFrame, then you make TQVBoxLayout for it (check form1.cpp) + // 2. Keep it as TQVBox and let it handle its children. // Depends on which one works best. - propertyContainer = new QFrame(dp->groupContainer); - propertyLayout = new QVBoxLayout(propertyContainer, 20, KDialog::spacingHint() ); - VerticalSpacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ); + propertyContainer = new TQFrame(dp->groupContainer); + propertyLayout = new TQVBoxLayout(propertyContainer, 20, KDialog::spacingHint() ); + VerticalSpacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding ); propertyLayout->addItem(VerticalSpacer); diff --git a/kstars/kstars/indigroup.h b/kstars/kstars/indigroup.h index d08186bf..d9361c2d 100644 --- a/kstars/kstars/indigroup.h +++ b/kstars/kstars/indigroup.h @@ -15,8 +15,8 @@ #define INDIGROUP_H #include "indielement.h" -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> class INDI_P; class INDI_D; @@ -28,16 +28,16 @@ class QVBoxLayout; class INDI_G { public: - INDI_G(INDI_D *parentDevice, QString inName); + INDI_G(INDI_D *parentDevice, TQString inName); ~INDI_G(); - QString name; /* Group name */ + TQString name; /* Group name */ INDI_D *dp; /* Parent device */ - QFrame *propertyContainer; /* Properties container */ - QVBoxLayout *propertyLayout; /* Properties layout */ - QSpacerItem *VerticalSpacer; /* Vertical spacer */ + TQFrame *propertyContainer; /* Properties container */ + TQVBoxLayout *propertyLayout; /* Properties layout */ + TQSpacerItem *VerticalSpacer; /* Vertical spacer */ - QPtrList<INDI_P> pl; /* malloced list of pointers to properties */ + TQPtrList<INDI_P> pl; /* malloced list of pointers to properties */ void addProperty(INDI_P *pp); bool removeProperty(INDI_P *pp); diff --git a/kstars/kstars/indimenu.cpp b/kstars/kstars/indimenu.cpp index 9ecd6e61..99181b0b 100644 --- a/kstars/kstars/indimenu.cpp +++ b/kstars/kstars/indimenu.cpp @@ -26,18 +26,18 @@ #include <stdlib.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qframe.h> -#include <qtabwidget.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qsocketnotifier.h> -#include <qdatetime.h> -#include <qvbox.h> -#include <qtimer.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqframe.h> +#include <tqtabwidget.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqsocketnotifier.h> +#include <tqdatetime.h> +#include <tqvbox.h> +#include <tqtimer.h> #include <kled.h> #include <klineedit.h> @@ -59,7 +59,7 @@ ** INDI Menu: Handles communication to server and fetching basic XML ** data. *******************************************************************/ -INDIMenu::INDIMenu(QWidget *parent, const char *name ) : KDialogBase(KDialogBase::Tabbed, i18n("INDI Control Panel"), 0, KDialogBase::Default, parent, name, false) +INDIMenu::INDIMenu(TQWidget *parent, const char *name ) : KDialogBase(KDialogBase::Tabbed, i18n("INDI Control Panel"), 0, KDialogBase::Default, parent, name, false) { ksw = (KStars *) parent; @@ -122,13 +122,13 @@ DeviceManager *dev; if (drivers->devices[i]->state && drivers->devices[i]->managed == false && drivers->devices[i]->mode == IDevice::M_LOCAL) { dev = new DeviceManager(this, mgrCounter); - if (dev->indiConnect("localhost", QString("%1").arg(drivers->devices[i]->indiPort))) + if (dev->indiConnect("localhost", TQString("%1").arg(drivers->devices[i]->indiPort))) { drivers->devices[i]->mgrID = mgrCounter; drivers->devices[i]->managed = true; mgr.append(dev); - connect(dev, SIGNAL(newDevice()), drivers, SLOT(updateMenuActions())); - connect(dev, SIGNAL(newDevice()), this, SLOT(discoverDevice())); + connect(dev, TQT_SIGNAL(newDevice()), drivers, TQT_SLOT(updateMenuActions())); + connect(dev, TQT_SIGNAL(newDevice()), this, TQT_SLOT(discoverDevice())); mgrCounter++; @@ -153,7 +153,7 @@ DeviceManager *dev; } -int INDIMenu::processClient(QString hostname, QString portnumber) +int INDIMenu::processClient(TQString hostname, TQString portnumber) { DeviceManager *dev; @@ -165,8 +165,8 @@ int INDIMenu::processClient(QString hostname, QString portnumber) mgr.append(dev); if (drivers) { - connect(dev, SIGNAL(newDevice()), drivers, SLOT(updateMenuActions())); - connect(dev, SIGNAL(newDevice()), this, SLOT(discoverDevice())); + connect(dev, TQT_SIGNAL(newDevice()), drivers, TQT_SLOT(updateMenuActions())); + connect(dev, TQT_SIGNAL(newDevice()), this, TQT_SLOT(discoverDevice())); } } else @@ -191,7 +191,7 @@ void INDIMenu::removeDeviceMgr(int mgrID) } } -INDI_D * INDIMenu::findDevice(QString deviceName) +INDI_D * INDIMenu::findDevice(TQString deviceName) { for (unsigned int i=0; i < mgr.count(); i++) { @@ -202,7 +202,7 @@ INDI_D * INDIMenu::findDevice(QString deviceName) return NULL; } -INDI_D * INDIMenu::findDeviceByLabel(QString label) +INDI_D * INDIMenu::findDeviceByLabel(TQString label) { for (unsigned int i=0; i < mgr.count(); i++) { @@ -215,7 +215,7 @@ INDI_D * INDIMenu::findDeviceByLabel(QString label) } -void INDIMenu::setCustomLabel(QString deviceName) +void INDIMenu::setCustomLabel(TQString deviceName) { int nset=0; @@ -226,7 +226,7 @@ for (unsigned int i=0; i < mgr.count(); i++) nset++; if (nset) - currentLabel = deviceName + QString(" %1").arg(nset+1); + currentLabel = deviceName + TQString(" %1").arg(nset+1); else currentLabel = deviceName; @@ -234,7 +234,7 @@ else void INDIMenu::discoverDevice() { - QTimer::singleShot( 1000, this, SLOT(announceDevice()) ); + TQTimer::singleShot( 1000, this, TQT_SLOT(announceDevice()) ); } void INDIMenu::announceDevice() diff --git a/kstars/kstars/indimenu.h b/kstars/kstars/indimenu.h index 4f6a07eb..8afd533d 100644 --- a/kstars/kstars/indimenu.h +++ b/kstars/kstars/indimenu.h @@ -49,7 +49,7 @@ class INDIMenu : public KDialogBase { Q_OBJECT public: - INDIMenu(QWidget * parent = 0 , const char *name = 0); + INDIMenu(TQWidget * parent = 0 , const char *name = 0); ~INDIMenu(); /***************************************************************** @@ -57,25 +57,25 @@ class INDIMenu : public KDialogBase ******************************************************************/ QVBoxLayout *mainLayout; QTabWidget *deviceContainer; - QTextEdit *msgST_w; + TQTextEdit *msgST_w; QWidget *tab; - QPushButton *clear; + TQPushButton *clear; QString currentLabel; KStars *ksw; - QPtrList<DeviceManager> mgr; + TQPtrList<DeviceManager> mgr; void updateStatus(); - //bool removeDevice(QString devName); + //bool removeDevice(TQString devName); void removeDeviceMgr(int mgrID); - void setCustomLabel(QString deviceName); + void setCustomLabel(TQString deviceName); int mgrCounter; bool processServer(); - int processClient(QString hostname, QString portnumber); - INDI_D * findDevice(QString deviceName); - INDI_D * findDeviceByLabel(QString label); + int processClient(TQString hostname, TQString portnumber); + INDI_D * findDevice(TQString deviceName); + INDI_D * findDeviceByLabel(TQString label); public slots: diff --git a/kstars/kstars/indiproperty.cpp b/kstars/kstars/indiproperty.cpp index c5a26b1b..058e154c 100644 --- a/kstars/kstars/indiproperty.cpp +++ b/kstars/kstars/indiproperty.cpp @@ -34,14 +34,14 @@ #include <kdebug.h> #include <kmessagebox.h> - #include <qbuttongroup.h> - #include <qcheckbox.h> - #include <qlabel.h> - #include <qlayout.h> - #include <qtimer.h> - #include <qfile.h> - #include <qdatastream.h> - #include <qtooltip.h> + #include <tqbuttongroup.h> + #include <tqcheckbox.h> + #include <tqlabel.h> + #include <tqlayout.h> + #include <tqtimer.h> + #include <tqfile.h> + #include <tqdatastream.h> + #include <tqtooltip.h> #include <unistd.h> #include <stdlib.h> @@ -49,7 +49,7 @@ /******************************************************************* ** INDI Property: contains widgets, labels, and their status *******************************************************************/ -INDI_P::INDI_P(INDI_G *parentGroup, QString inName) +INDI_P::INDI_P(INDI_G *parentGroup, TQString inName) { name = inName; @@ -61,8 +61,8 @@ INDI_P::INDI_P(INDI_G *parentGroup, QString inName) indistd = new INDIStdProperty(this, pg->dp->parent->ksw, pg->dp->stdDev); - PHBox = new QHBoxLayout(0, 0, KDialogBase::spacingHint()); - PVBox = new QVBoxLayout(0, 0, KDialogBase::spacingHint()); + PHBox = new TQHBoxLayout(0, 0, KDialogBase::spacingHint()); + PVBox = new TQVBoxLayout(0, 0, KDialogBase::spacingHint()); light = NULL; label_w = NULL; set_w = NULL; @@ -83,7 +83,7 @@ INDI_P::~INDI_P() delete (groupB); } -bool INDI_P::isOn(QString component) +bool INDI_P::isOn(TQString component) { INDI_E *lp; @@ -101,7 +101,7 @@ bool INDI_P::isOn(QString component) return false; } -INDI_E * INDI_P::findElement(QString elementName) +INDI_E * INDI_P::findElement(TQString elementName) { INDI_E *element = NULL; @@ -126,7 +126,7 @@ void INDI_P::drawLt(PState lstate) case PS_OK: light->setColor(Qt::green); emit okState(); - disconnect( this, SIGNAL(okState()), 0, 0 ); + disconnect( this, TQT_SIGNAL(okState()), 0, 0 ); break; case PS_BUSY: @@ -203,7 +203,7 @@ void INDI_P::convertSwitch(int id) { INDI_E *lp; - QString mLabel; + TQString mLabel; int switchIndex=0; if (assosiatedPopup == NULL) @@ -254,7 +254,7 @@ void INDI_P::convertSwitch(int id) void INDI_P::newSwitch(int id) { - QFont buttonFont; + TQFont buttonFont; INDI_E *lp; lp = el.at(id); @@ -318,10 +318,10 @@ void INDI_P::newSwitch(int id) */ void INDI_P::newBlob() { - QFile fp; - QString filename; - QString format; - QDataStream binaryStream; + TQFile fp; + TQString filename; + TQString format; + TQDataStream binaryStream; int data64_size=0, pos=0; char *data_file; unsigned char *data, *data64; @@ -379,7 +379,7 @@ void INDI_P::newBlob() if (sending == false) { sending = true; - pg->dp->parentMgr->startBlob (pg->dp->name, name, QString(timestamp())); + pg->dp->parentMgr->startBlob (pg->dp->name, name, TQString(timestamp())); } pg->dp->parentMgr->sendOneBlob(el.at(i)->name, data64_size, format, data64); @@ -433,17 +433,17 @@ void INDI_P::addGUI (XMLEle *root) if (label.isEmpty()) { label = name; - label_w = new QLabel(label, pg->propertyContainer); + label_w = new TQLabel(label, pg->propertyContainer); } else - label_w = new QLabel(label, pg->propertyContainer); + label_w = new TQLabel(label, pg->propertyContainer); - label_w->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, label_w->sizePolicy().hasHeightForWidth() ) ); - label_w->setFrameShape( QLabel::GroupBoxPanel ); + label_w->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, label_w->sizePolicy().hasHeightForWidth() ) ); + label_w->setFrameShape( TQLabel::GroupBoxPanel ); label_w->setMinimumWidth(PROPERTY_LABEL_WIDTH); label_w->setMaximumWidth(PROPERTY_LABEL_WIDTH); - label_w->setTextFormat( QLabel::RichText ); - label_w->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter | QLabel::AlignHCenter) ); + label_w->setTextFormat( TQLabel::RichText ); + label_w->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignHCenter) ); PHBox->addWidget(label_w); @@ -459,7 +459,7 @@ int INDI_P::buildTextGUI(XMLEle *root, char errmsg[]) INDI_E *lp; XMLEle *text; XMLAtt *ap; - QString textName, textLabel; + TQString textName, textLabel; errmsg=errmsg; for (text = nextXMLEle (root, 1); text != NULL; text = nextXMLEle (root, 0)) @@ -495,7 +495,7 @@ int INDI_P::buildTextGUI(XMLEle *root, char errmsg[]) lp = new INDI_E(this, textName, textLabel); - lp->buildTextGUI(QString(pcdataXMLEle(text))); + lp->buildTextGUI(TQString(pcdataXMLEle(text))); el.append(lp); @@ -508,12 +508,12 @@ int INDI_P::buildTextGUI(XMLEle *root, char errmsg[]) if (name == "TIME") { setupSetButton("Time"); - QObject::connect(set_w, SIGNAL(clicked()), indistd, SLOT(newTime())); + TQObject::connect(set_w, TQT_SIGNAL(clicked()), indistd, TQT_SLOT(newTime())); } else { setupSetButton("Set"); - QObject::connect(set_w, SIGNAL(clicked()), this, SLOT(newText())); + TQObject::connect(set_w, TQT_SIGNAL(clicked()), this, TQT_SLOT(newText())); } return 0; @@ -527,7 +527,7 @@ int INDI_P::buildNumberGUI (XMLEle *root, char errmsg[]) XMLEle *number; XMLAtt *ap; INDI_E *lp; - QString numberName, numberLabel; + TQString numberName, numberLabel; errmsg=errmsg; for (number = nextXMLEle (root, 1); number != NULL; number = nextXMLEle (root, 0)) @@ -591,16 +591,16 @@ int INDI_P::buildNumberGUI (XMLEle *root, char errmsg[]) else setupSetButton("Set"); - QObject::connect(set_w, SIGNAL(clicked()), this, SLOT(newText())); + TQObject::connect(set_w, TQT_SIGNAL(clicked()), this, TQT_SLOT(newText())); return (0); } -void INDI_P::setupSetButton(QString caption) +void INDI_P::setupSetButton(TQString caption) { - set_w = new QPushButton(caption, pg->propertyContainer); - set_w->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, set_w->sizePolicy().hasHeightForWidth() ) ); + set_w = new TQPushButton(caption, pg->propertyContainer); + set_w->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, set_w->sizePolicy().hasHeightForWidth() ) ); set_w->setMinimumWidth( MIN_SET_WIDTH ); set_w->setMaximumWidth( MAX_SET_WIDTH ); @@ -612,8 +612,8 @@ int INDI_P::buildMenuGUI(XMLEle *root, char errmsg[]) XMLEle *sep = NULL; XMLAtt *ap; INDI_E *lp; - QString switchName, switchLabel; - QStringList menuOptions; + TQString switchName, switchLabel; + TQStringList menuOptions; int i=0, onItem=-1; guitype = PG_MENU; @@ -677,12 +677,12 @@ int INDI_P::buildMenuGUI(XMLEle *root, char errmsg[]) om_w->insertStringList(menuOptions); om_w->setCurrentItem(onItem); - HorSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + HorSpacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); PHBox->addWidget(om_w); PHBox->addItem(HorSpacer); - QObject::connect(om_w, SIGNAL(activated(int)), this, SLOT(newSwitch(int))); + TQObject::connect(om_w, TQT_SIGNAL(activated(int)), this, TQT_SLOT(newSwitch(int))); return (0); } @@ -693,17 +693,17 @@ int INDI_P::buildSwitchesGUI(XMLEle *root, char errmsg[]) XMLAtt *ap; INDI_E *lp; KPushButton *button(NULL); - QCheckBox *checkbox; - QFont buttonFont; - QString switchName, switchLabel; + TQCheckBox *checkbox; + TQFont buttonFont; + TQString switchName, switchLabel; int j; - groupB = new QButtonGroup(0); - groupB->setFrameShape(QFrame::NoFrame); + groupB = new TQButtonGroup(0); + groupB->setFrameShape(TQFrame::NoFrame); if (guitype == PG_BUTTONS) groupB->setExclusive(true); - QObject::connect(groupB, SIGNAL(clicked(int)), this, SLOT(newSwitch(int))); + TQObject::connect(groupB, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(newSwitch(int))); for (sep = nextXMLEle (root, 1), j=-1; sep != NULL; sep = nextXMLEle (root, 0)) { @@ -767,7 +767,7 @@ int INDI_P::buildSwitchesGUI(XMLEle *root, char errmsg[]) break; case PG_RADIO: - checkbox = new QCheckBox(switchLabel, pg->propertyContainer); + checkbox = new TQCheckBox(switchLabel, pg->propertyContainer); groupB->insert(checkbox, j); if (lp->state == PS_ON) @@ -792,7 +792,7 @@ int INDI_P::buildSwitchesGUI(XMLEle *root, char errmsg[]) if (j < 0) return (-1); - HorSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + HorSpacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); PHBox->addItem(HorSpacer); @@ -804,7 +804,7 @@ int INDI_P::buildLightsGUI(XMLEle *root, char errmsg[]) XMLEle *lep; XMLAtt *ap; INDI_E *lp; - QString sname, slabel; + TQString sname, slabel; for (lep = nextXMLEle (root, 1); lep != NULL; lep = nextXMLEle (root, 0)) { @@ -841,7 +841,7 @@ int INDI_P::buildLightsGUI(XMLEle *root, char errmsg[]) el.append(lp); } - HorSpacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + HorSpacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); PHBox->addItem(HorSpacer); @@ -855,7 +855,7 @@ int INDI_P::buildBLOBGUI(XMLEle *root, char errmsg[]) INDI_E *lp; XMLEle *blob; XMLAtt *ap; - QString blobName, blobLabel ; + TQString blobName, blobLabel ; errmsg=errmsg; for (blob = nextXMLEle (root, 1); blob != NULL; blob = nextXMLEle (root, 0)) @@ -900,13 +900,13 @@ int INDI_P::buildBLOBGUI(XMLEle *root, char errmsg[]) return 0; setupSetButton(i18n("Upload")); - QObject::connect(set_w, SIGNAL(clicked()), this, SLOT(newBlob())); + TQObject::connect(set_w, TQT_SIGNAL(clicked()), this, TQT_SLOT(newBlob())); return 0; } -void INDI_P::activateSwitch(QString name) +void INDI_P::activateSwitch(TQString name) { int iCounter = 0; INDI_E *element; diff --git a/kstars/kstars/indiproperty.h b/kstars/kstars/indiproperty.h index 727aa2e0..3bc3c087 100644 --- a/kstars/kstars/indiproperty.h +++ b/kstars/kstars/indiproperty.h @@ -35,11 +35,11 @@ class INDI_P : public QObject { Q_OBJECT public: - INDI_P(INDI_G *parentGroup, QString inName); + INDI_P(INDI_G *parentGroup, TQString inName); ~INDI_P(); QString name; /* property name */ - QString label; /* property label */ + TQString label; /* property label */ INDI_G *pg; /* parent group */ KPopupMenu *assosiatedPopup; /* assosiated popup menu, if any */ @@ -53,17 +53,17 @@ class INDI_P : public QObject int stdID; /* Standard property ID, if any */ - QLabel *label_w; /* Label widget */ - QPushButton *set_w; /* set button */ + TQLabel *label_w; /* Label widget */ + TQPushButton *set_w; /* set button */ - QSpacerItem *HorSpacer; /* Horizontal spacer */ - QHBoxLayout *PHBox; /* Horizontal container */ - QVBoxLayout *PVBox; /* Vertical container */ + TQSpacerItem *HorSpacer; /* Horizontal spacer */ + TQHBoxLayout *PHBox; /* Horizontal container */ + TQVBoxLayout *PVBox; /* Vertical container */ - QButtonGroup *groupB; /* group button for radio and check boxes (Elements) */ + TQButtonGroup *groupB; /* group button for radio and check boxes (Elements) */ KComboBox *om_w; /* Combo box for menu */ - QPtrList<INDI_E> el; /* list of elements */ + TQPtrList<INDI_E> el; /* list of elements */ /* Draw state LED */ void drawLt(PState lstate); @@ -75,9 +75,9 @@ class INDI_P : public QObject void setGroup(INDI_G *parentGroup) { pg = parentGroup; } /* Find an element within the property */ - INDI_E * findElement(QString elementName); + INDI_E * findElement(TQString elementName); /* Search for an element, and if found, evaluate its state */ - bool isOn(QString component); + bool isOn(TQString component); /* Build Functions */ int buildTextGUI (XMLEle *root, char errmsg[]); @@ -88,10 +88,10 @@ class INDI_P : public QObject int buildBLOBGUI (XMLEle *root, char errmsg[]); /* Setup the 'set' button in the property */ - void setupSetButton(QString caption); + void setupSetButton(TQString caption); /* Turn a switch on */ - void activateSwitch(QString name); + void activateSwitch(TQString name); public slots: void newText(); diff --git a/kstars/kstars/indistd.cpp b/kstars/kstars/indistd.cpp index 429e8824..b21f46b5 100644 --- a/kstars/kstars/indistd.cpp +++ b/kstars/kstars/indistd.cpp @@ -35,11 +35,11 @@ #include <zlib.h> #include <stdlib.h> - #include <qtimer.h> - #include <qlabel.h> - #include <qfont.h> - #include <qeventloop.h> - #include <qsocketnotifier.h> + #include <tqtimer.h> + #include <tqlabel.h> + #include <tqfont.h> + #include <tqeventloop.h> + #include <tqsocketnotifier.h> #include <klocale.h> #include <kdebug.h> @@ -71,14 +71,14 @@ streamWindow = new StreamWG(this, ksw); CCDPreviewWindow = new CCDPreviewWG(this, ksw); - devTimer = new QTimer(this); + devTimer = new TQTimer(this); seqLister = new KDirLister(); telescopeSkyObject = new SkyObject(0, 0, 0, 0, i18n("Telescope")); ksw->data()->appendTelescopeObject(telescopeSkyObject); - connect( devTimer, SIGNAL(timeout()), this, SLOT(timerDone()) ); - connect( seqLister, SIGNAL(newItems (const KFileItemList & )), this, SLOT(checkSeqBoundary(const KFileItemList &))); + connect( devTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) ); + connect( seqLister, TQT_SIGNAL(newItems (const KFileItemList & )), this, TQT_SLOT(checkSeqBoundary(const KFileItemList &))); downloadDialog = new KProgressDialog(NULL, 0, i18n("INDI"), i18n("Downloading Data...")); downloadDialog->cancel(); @@ -96,7 +96,7 @@ delete (seqLister); } -void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, QString dataFormat) +void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, TQString dataFormat) { if (dataFormat == ".fits") dataType = DATA_FITS; @@ -124,7 +124,7 @@ void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, QString da char filename[256]; FILE *fitsTempFile; int fd, nr, n=0; - QString currentDir = Options::fitsSaveDirectory(); + TQString currentDir = Options::fitsSaveDirectory(); streamWindow->close(); @@ -220,7 +220,7 @@ void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, QString da double fwhm; int d, m, y, min, sec, hour; ExtDate indiDate; - QTime indiTime; + TQTime indiTime; KStarsDateTime indiDateTime; switch (pp->stdID) @@ -347,7 +347,7 @@ void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, QString da INDI_P *imgProp; KAction *tmpAction; INDIDriver *drivers = ksw->getINDIDriver(); - QFont buttonFont; + TQFont buttonFont; switch (pp->stdID) { @@ -441,11 +441,11 @@ void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, QString da } - void INDIStdDevice::updateSequencePrefix(QString newPrefix) + void INDIStdDevice::updateSequencePrefix(TQString newPrefix) { seqPrefix = newPrefix; - seqLister->setNameFilter(QString("%1_*.fits").arg(seqPrefix)); + seqLister->setNameFilter(TQString("%1_*.fits").arg(seqPrefix)); seqCount = 0; @@ -460,7 +460,7 @@ void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, QString da void INDIStdDevice::checkSeqBoundary(const KFileItemList & items) { int newFileIndex; - QString tempName; + TQString tempName; char *tempPrefix = new char[64]; // No need to check when in ISO mode @@ -506,10 +506,10 @@ void INDIStdDevice::handleBLOB(unsigned char *buffer, int bufferSize, QString da if (!lp) return; - QTime newTime( ksw->data()->ut().time()); + TQTime newTime( ksw->data()->ut().time()); ExtDate newDate( ksw->data()->ut().date()); - lp->write_w->setText(QString("%1-%2-%3T%4:%5:%6").arg(newDate.year()).arg(newDate.month()) + lp->write_w->setText(TQString("%1-%2-%3T%4:%5:%6").arg(newDate.year()).arg(newDate.month()) .arg(newDate.day()).arg(newTime.hour()) .arg(newTime.minute()).arg(newTime.second())); pp->newText(); @@ -543,8 +543,8 @@ void INDIStdDevice::updateLocation() longEle = pp->findElement("LONG"); if (!longEle) return; - longEle->write_w->setText(QString("%1:%2:%3").arg(tempLong.degree()).arg(tempLong.arcmin()).arg(tempLong.arcsec())); - latEle->write_w->setText(QString("%1:%2:%3").arg(geo->lat()->degree()).arg(geo->lat()->arcmin()).arg(geo->lat()->arcsec())); + longEle->write_w->setText(TQString("%1:%2:%3").arg(tempLong.degree()).arg(tempLong.arcmin()).arg(tempLong.arcsec())); + latEle->write_w->setText(TQString("%1:%2:%3").arg(geo->lat()->degree()).arg(geo->lat()->arcmin()).arg(geo->lat()->arcsec())); pp->newText(); } @@ -554,7 +554,7 @@ void INDIStdDevice::updateLocation() { INDI_E * portEle; INDIDriver *drivers = ksw->getINDIDriver(); - QString str; + TQString str; switch (pp->stdID) { @@ -661,8 +661,8 @@ bool INDIStdDevice::handleNonSidereal() // then we take advantage of it. Otherwise, we send RA/DEC to the telescope and start a timer // based on the object type. Objects with high proper motions will require faster updates. // handle Non Sideral is ONLY called when tracking an object, not slewing. - INDI_P *prop = dp->findProp(QString("SOLAR_SYSTEM")); - INDI_P *setMode = dp->findProp(QString("ON_COORD_SET")); + INDI_P *prop = dp->findProp(TQString("SOLAR_SYSTEM")); + INDI_P *setMode = dp->findProp(TQString("ON_COORD_SET")); // If the device support it if (prop && setMode) @@ -779,10 +779,10 @@ void INDIStdDevice::timerDone() DecEle = prop->findElement("DEC"); if (!DecEle) return; - RAEle->write_w->setText(QString("%1:%2:%3").arg(sp.ra()->hour()) + RAEle->write_w->setText(TQString("%1:%2:%3").arg(sp.ra()->hour()) .arg(sp.ra()->minute()) .arg(sp.ra()->second())); - DecEle->write_w->setText(QString("%1:%2:%3").arg(sp.dec()->degree()) + DecEle->write_w->setText(TQString("%1:%2:%3").arg(sp.dec()->degree()) .arg(sp.dec()->arcmin()) .arg(sp.dec()->arcsec())); prop->newText(); @@ -928,8 +928,8 @@ INDIStdProperty::INDIStdProperty(INDI_P *associatedProperty, KStars * kswPtr, IN if (useJ2000) sp.apparentCoord(ksw->data()->ut().djd(), (long double) J2000); - RAEle->write_w->setText(QString("%1:%2:%3").arg(sp.ra()->hour()).arg(sp.ra()->minute()).arg(sp.ra()->second())); - DecEle->write_w->setText(QString("%1:%2:%3").arg(sp.dec()->degree()).arg(sp.dec()->arcmin()).arg(sp.dec()->arcsec())); + RAEle->write_w->setText(TQString("%1:%2:%3").arg(sp.ra()->hour()).arg(sp.ra()->minute()).arg(sp.ra()->second())); + DecEle->write_w->setText(TQString("%1:%2:%3").arg(sp.dec()->degree()).arg(sp.dec()->arcmin()).arg(sp.dec()->arcsec())); break; @@ -945,8 +945,8 @@ INDIStdProperty::INDIStdProperty(INDI_P *associatedProperty, KStars * kswPtr, IN sp.setAlt(*ksw->map()->clickedPoint()->alt()); } - AzEle->write_w->setText(QString("%1:%2:%3").arg(sp.az()->degree()).arg(sp.az()->arcmin()).arg(sp.az()->arcsec())); - AltEle->write_w->setText(QString("%1:%2:%3").arg(sp.alt()->degree()).arg(sp.alt()->arcmin()).arg(sp.alt()->arcsec())); + AzEle->write_w->setText(TQString("%1:%2:%3").arg(sp.az()->degree()).arg(sp.az()->arcmin()).arg(sp.az()->arcsec())); + AltEle->write_w->setText(TQString("%1:%2:%3").arg(sp.alt()->degree()).arg(sp.alt()->arcmin()).arg(sp.alt()->arcsec())); break; } @@ -1020,12 +1020,12 @@ void INDIStdProperty::newTime() TimeDialog timedialog ( ksw->data()->ut(), ksw ); - if ( timedialog.exec() == QDialog::Accepted ) + if ( timedialog.exec() == TQDialog::Accepted ) { - QTime newTime( timedialog.selectedTime() ); + TQTime newTime( timedialog.selectedTime() ); ExtDate newDate( timedialog.selectedDate() ); - timeEle->write_w->setText(QString("%1-%2-%3T%4:%5:%6") + timeEle->write_w->setText(TQString("%1-%2-%3T%4:%5:%6") .arg(newDate.year()).arg(newDate.month()) .arg(newDate.day()).arg(newTime.hour()) .arg(newTime.minute()).arg(newTime.second())); diff --git a/kstars/kstars/indistd.h b/kstars/kstars/indistd.h index f2780493..c69bec46 100644 --- a/kstars/kstars/indistd.h +++ b/kstars/kstars/indistd.h @@ -12,7 +12,7 @@ #ifndef INDISTD_H #define INDISTD_H - #include <qobject.h> + #include <tqobject.h> #include <indi/lilxml.h> #include <kfileitem.h> @@ -43,7 +43,7 @@ StreamWG *streamWindow; CCDPreviewWG *CCDPreviewWindow; SkyObject *currentObject; - QTimer *devTimer; + TQTimer *devTimer; KProgressDialog *downloadDialog; @@ -52,7 +52,7 @@ void setTextValue(INDI_P *pp); void setLabelState(INDI_P *pp); void registerProperty(INDI_P *pp); - void handleBLOB(unsigned char *buffer, int bufferSize, QString dataFormat); + void handleBLOB(unsigned char *buffer, int bufferSize, TQString dataFormat); /* Device options */ void initDeviceOptions(); @@ -66,7 +66,7 @@ /* INDI STD: Updates device location */ void updateLocation(); /* Update image prefix */ - void updateSequencePrefix(QString newPrefix); + void updateSequencePrefix(TQString newPrefix); int dataType; int initDevCounter; @@ -89,7 +89,7 @@ signals: void linkRejected(); void linkAccepted(); - void FITSReceived(QString deviceLabel); + void FITSReceived(TQString deviceLabel); }; diff --git a/kstars/kstars/infobox.cpp b/kstars/kstars/infobox.cpp index 0b14b0cc..b2f64bcd 100644 --- a/kstars/kstars/infobox.cpp +++ b/kstars/kstars/infobox.cpp @@ -16,7 +16,7 @@ ***************************************************************************/ #include <kdebug.h> -#include <qpainter.h> +#include <tqpainter.h> #include "infobox.h" @@ -36,7 +36,7 @@ InfoBox::InfoBox(){ Shaded = false; } -InfoBox::InfoBox( int x, int y, bool shade, QString t1, QString t2, QString t3 ) { +InfoBox::InfoBox( int x, int y, bool shade, TQString t1, TQString t2, TQString t3 ) { setText1( t1 ); setText2( t2 ); setText3( t3 ); @@ -52,7 +52,7 @@ InfoBox::InfoBox( int x, int y, bool shade, QString t1, QString t2, QString t3 ) Visible = true; } -InfoBox::InfoBox( QPoint pt, bool shade, QString t1, QString t2, QString t3 ) { +InfoBox::InfoBox( TQPoint pt, bool shade, TQString t1, TQString t2, TQString t3 ) { setText1( t1 ); setText2( t2 ); setText3( t3 ); @@ -97,21 +97,21 @@ void InfoBox::updateSize() { // kdDebug() << "Size=" << Size.width() << "," << Size.height() << endl; } -bool InfoBox::constrain( QRect r, bool inside ) { +bool InfoBox::constrain( TQRect r, bool inside ) { if ( inside ) { - //Place InfoBox within QRect r: + //Place InfoBox within TQRect r: if ( x() < r.x() ) move( r.x(), y() ); if ( y() < r.y() ) move( x(), r.y() ); if ( x() + width() > r.right() ) move( r.right() - width(), y() ); if ( y() + height() > r.bottom() ) move( x(), r.bottom() - height() ); - //The InfoBox is now within the bounds of QRect r, unless it is bigger than r. + //The InfoBox is now within the bounds of TQRect r, unless it is bigger than r. //In that case, we cannot obey the constraint, but the current position is as //close as we can get. Return false in this case. if ( width() > r.width() || height() > r.height() ) return false; else return true; } else { //FIXME... - //Place InfoBox outside QRect r. First, determine if InfoBox is within r: + //Place InfoBox outside TQRect r. First, determine if InfoBox is within r: // if ( rect().intersects( r ) ) { //Move the InfoBox in all four directions until it no longer intersects r. //Determine which displacement is shortest @@ -120,8 +120,8 @@ bool InfoBox::constrain( QRect r, bool inside ) { } } -void InfoBox::draw( QPainter &p, QColor BGColor, unsigned int BGMode ) { - QRect r; +void InfoBox::draw( TQPainter &p, TQColor BGColor, unsigned int BGMode ) { + TQRect r; int w,h; r = p.boundingRect( x(), y(), p.window().width(), p.window().height(), Qt::AlignCenter, text1() ); @@ -147,11 +147,11 @@ void InfoBox::draw( QPainter &p, QColor BGColor, unsigned int BGMode ) { FullTextHeight = h; updateSize(); - constrain( QRect( 0, 0, p.window().width(), p.window().height() ) ); + constrain( TQRect( 0, 0, p.window().width(), p.window().height() ) ); //Draw the box boundary and the text - if ( BGMode==1 ) p.fillRect( x(), y(), width(), height(), QBrush( BGColor, Dense4Pattern ) ); - if ( BGMode==2 ) p.fillRect( x(), y(), width(), height(), QBrush( BGColor ) ); + if ( BGMode==1 ) p.fillRect( x(), y(), width(), height(), TQBrush( BGColor, Dense4Pattern ) ); + if ( BGMode==2 ) p.fillRect( x(), y(), width(), height(), TQBrush( BGColor ) ); p.drawText( x() + padx(), y() + ShadedTextHeight/2 + pady(), text1() ); @@ -161,16 +161,16 @@ void InfoBox::draw( QPainter &p, QColor BGColor, unsigned int BGMode ) { } } -QRect InfoBox::rect() const { - return QRect( pos(), size() ); +TQRect InfoBox::rect() const { + return TQRect( pos(), size() ); } void InfoBox::move( int x, int y ) { - Pos.setX( x ); Pos.setY( y ); emit moved( QPoint(x,y) ); + Pos.setX( x ); Pos.setY( y ); emit moved( TQPoint(x,y) ); } -void InfoBox::move( QPoint p ) { - move( p.x(), p.y() ); emit moved( QPoint( p.x(), p.y() ) ); +void InfoBox::move( TQPoint p ) { + move( p.x(), p.y() ); emit moved( TQPoint( p.x(), p.y() ) ); } #include "infobox.moc" diff --git a/kstars/kstars/infobox.h b/kstars/kstars/infobox.h index 205b4bd9..bfc67b91 100644 --- a/kstars/kstars/infobox.h +++ b/kstars/kstars/infobox.h @@ -18,11 +18,11 @@ #ifndef INFOBOX_H #define INFOBOX_H -#include <qobject.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqstring.h> /**@class InfoBox *InfoBoxencapsulates a lightweight floating "window" to be drawn directly @@ -35,7 +35,7 @@ class QPainter; -class InfoBox : public QObject { +class InfoBox : public TQObject { Q_OBJECT public: /**default constructor. Creates an infobox with empty text string @@ -51,7 +51,7 @@ public: *@param t2 The second line of text *@param t3 The third line of text */ - InfoBox( int x, int y, bool shade, QString t1="", QString t2="", QString t3="" ); + InfoBox( int x, int y, bool shade, TQString t1="", TQString t2="", TQString t3="" ); /**General constructor. Specify The text string, x,y position and size. *This behaves just like the above function. It differs only in the data types @@ -62,20 +62,20 @@ public: *@param t2 The second line of text *@param t3 The third line of text */ - InfoBox( QPoint p, bool shade, QString t1="", QString t2="", QString t3="" ); + InfoBox( TQPoint p, bool shade, TQString t1="", TQString t2="", TQString t3="" ); /**Destructor (empty)*/ ~InfoBox(); /**Draw the InfoBox. First calls updateSize() and constrain() to make sure *the box is onscreen and the correct size. - *@param p reference to the QPainter on which to draw the box + *@param p reference to the TQPainter on which to draw the box *@param BGColor the background color to be used *@param BGMode the background mode (0=none; 1=semi-transparent; 2=opaque) *@see InfoBox::updateSize() *@see InfoBox::constrain() */ - void draw( QPainter &p, QColor BGColor, unsigned int BGMode ); + void draw( TQPainter &p, TQColor BGColor, unsigned int BGMode ); /**Toggle the Shaded state of the box. */ @@ -92,7 +92,7 @@ public: *only in the data type of its arguments. *@param p the new (X,Y) position */ - void move( QPoint p ); + void move( TQPoint p ); /**Reset the width and height. *@param w the new width @@ -104,33 +104,33 @@ public: *function. It differs only in the data type of its arguments. *@param s the new size */ - void resize( QSize s ) { Size.setWidth( s.width() ); Size.setHeight( s.height() ); } + void resize( TQSize s ) { Size.setWidth( s.width() ); Size.setHeight( s.height() ); } /**Set the size of the box to fit the current displayed text */ void updateSize(); - /**Make sure the InfoBox is inside (or outside) the QRect r. + /**Make sure the InfoBox is inside (or outside) the TQRect r. *@return true if the function was able to obey the constraint. *@param r the Rect which the box must lie completely inside/outside of. *@param inside if TRUE (the default), the box must lie inside the rect r. *Otherwise, the box must lie *outside* rect r. */ - bool constrain( QRect r, bool inside=true ); + bool constrain( TQRect r, bool inside=true ); /**Reset the first text string *@param newt the new text. */ - void setText1( QString newt ) { Text1 = newt; } + void setText1( TQString newt ) { Text1 = newt; } /**Reset the second text string *@param newt the new text. */ - void setText2( QString newt ) { Text2 = newt; } + void setText2( TQString newt ) { Text2 = newt; } /**Reset the third text string *@param newt the new text. */ - void setText3( QString newt ) { Text3 = newt; } + void setText3( TQString newt ) { Text3 = newt; } //temporarily, padx() and pady() simply return a constant int padx() const { return 6; } @@ -146,7 +146,7 @@ public: int y() const { return Pos.y(); } /**@return the (X,Y) position of the box*/ - QPoint pos() const { return Pos; } + TQPoint pos() const { return Pos; } /**@return the width of the box*/ int width() const { return Size.width(); } @@ -155,22 +155,22 @@ public: int height() const { return Size.height(); } /**@return the size of the box*/ - QSize size() const { return Size; } + TQSize size() const { return Size; } /**@return whether the box is visible */ bool isVisible() const { return Visible; } /**@return the first line of text*/ - QString text1() const { return Text1; } + TQString text1() const { return Text1; } /**@return the second line of text*/ - QString text2() const { return Text2; } + TQString text2() const { return Text2; } /**@return the third line of text*/ - QString text3() const { return Text3; } + TQString text3() const { return Text3; } /**@return the geometry of the box*/ - QRect rect() const; + TQRect rect() const; /**@return TRUE if the box is anchored to the right window edge*/ bool anchorRight() const { return ( AnchorFlag & AnchorRight ); } @@ -202,7 +202,7 @@ signals: *@param p the new (X,Y) position *@see InfoBox::move() */ - void moved( QPoint p ); + void moved( TQPoint p ); /**Signal emitted when the box's shaded-state is toggled *@param s the new shaded state @@ -217,9 +217,9 @@ private: int FullTextWidth, FullTextHeight; int ShadedTextWidth, ShadedTextHeight; int AnchorFlag; - QPoint Pos; - QSize Size; - QString Text1, Text2, Text3; + TQPoint Pos; + TQSize Size; + TQString Text1, Text2, Text3; }; #endif diff --git a/kstars/kstars/infoboxes.cpp b/kstars/kstars/infoboxes.cpp index 4671d8e9..dff865e4 100644 --- a/kstars/kstars/infoboxes.cpp +++ b/kstars/kstars/infoboxes.cpp @@ -17,8 +17,8 @@ #include <kglobal.h> #include <kdebug.h> -//#include <qpen.h> -#include <qpainter.h> +//#include <tqpen.h> +#include <tqpainter.h> #include "infoboxes.h" #include "kstarsdatetime.h" @@ -26,9 +26,9 @@ #include "geolocation.h" #include "skypoint.h" -InfoBoxes::InfoBoxes( int w, int h, QPoint tp, bool tshade, - QPoint gp, bool gshade, QPoint fp, bool fshade, - QColor colorText, QColor colorGrab, QColor colorBG ) : +InfoBoxes::InfoBoxes( int w, int h, TQPoint tp, bool tshade, + TQPoint gp, bool gshade, TQPoint fp, bool fshade, + TQColor colorText, TQColor colorGrab, TQColor colorBG ) : boxColor(colorText), grabColor(colorGrab), bgColor(colorBG), GeoBox(0), FocusBox(0), TimeBox(0) { @@ -41,7 +41,7 @@ InfoBoxes::InfoBoxes( int w, int h, QPoint tp, bool tshade, int fy = fp.y(); GrabbedBox = 0; - GrabPos = QPoint( 0, 0 ); + GrabPos = TQPoint( 0, 0 ); Visible = true; Width = w; @@ -60,11 +60,11 @@ InfoBoxes::InfoBoxes( int w, int h, QPoint tp, bool tshade, InfoBoxes::InfoBoxes( int w, int h, int tx, int ty, bool tshade, int gx, int gy, bool gshade, int fx, int fy, bool fshade, - QColor colorText, QColor colorGrab, QColor colorBG ) : + TQColor colorText, TQColor colorGrab, TQColor colorBG ) : boxColor(colorText), grabColor(colorGrab), bgColor(colorBG) { GrabbedBox = 0; - GrabPos = QPoint( 0, 0 ); + GrabPos = TQPoint( 0, 0 ); Visible = true; Width = w; @@ -93,31 +93,31 @@ void InfoBoxes::resize( int w, int h ) { checkBorders(false); } -void InfoBoxes::drawBoxes( QPainter &p, QColor FGColor, QColor grabColor, - QColor BGColor, unsigned int BGMode ) { +void InfoBoxes::drawBoxes( TQPainter &p, TQColor FGColor, TQColor grabColor, + TQColor BGColor, unsigned int BGMode ) { if ( isVisible() ) { if ( GeoBox->isVisible() ) { - p.setPen( QPen( FGColor ) ); + p.setPen( TQPen( FGColor ) ); if ( GrabbedBox == 1 ) { - p.setPen( QPen( grabColor ) ); + p.setPen( TQPen( grabColor ) ); p.drawRect( GeoBox->x(), GeoBox->y(), GeoBox->width(), GeoBox->height() ); } GeoBox->draw( p, BGColor, BGMode ); } if ( TimeBox->isVisible() ) { - p.setPen( QPen( FGColor ) ); + p.setPen( TQPen( FGColor ) ); if ( GrabbedBox == 2 ) { - p.setPen( QPen( grabColor ) ); + p.setPen( TQPen( grabColor ) ); p.drawRect( TimeBox->x(), TimeBox->y(), TimeBox->width(), TimeBox->height() ); } TimeBox->draw( p, BGColor, BGMode ); } if ( FocusBox->isVisible() ) { - p.setPen( QPen( FGColor ) ); + p.setPen( TQPen( FGColor ) ); if ( GrabbedBox == 3 ) { - p.setPen( QPen( grabColor ) ); + p.setPen( TQPen( grabColor ) ); p.drawRect( FocusBox->x(), FocusBox->y(), FocusBox->width(), FocusBox->height() ); } FocusBox->draw( p, BGColor, BGMode ); @@ -125,7 +125,7 @@ void InfoBoxes::drawBoxes( QPainter &p, QColor FGColor, QColor grabColor, } } -bool InfoBoxes::grabBox( QMouseEvent *e ) { +bool InfoBoxes::grabBox( TQMouseEvent *e ) { if ( GeoBox->rect().contains( e->pos() ) ) { GrabbedBox = 1; GrabPos.setX( e->x() - GeoBox->x() ); @@ -157,7 +157,7 @@ bool InfoBoxes::unGrabBox( void ) { } } -bool InfoBoxes::dragBox( QMouseEvent *e ) { +bool InfoBoxes::dragBox( TQMouseEvent *e ) { switch( GrabbedBox ) { case 1: //GeoBox GeoBox->move( e->x() - GrabPos.x(), e->y() - GrabPos.y() ); @@ -179,7 +179,7 @@ bool InfoBoxes::dragBox( QMouseEvent *e ) { } } -bool InfoBoxes::shadeBox( QMouseEvent *e ) { +bool InfoBoxes::shadeBox( TQMouseEvent *e ) { if ( GeoBox->rect().contains( e->pos() ) ) { GeoBox->toggleShade(); if ( GeoBox->rect().bottom() > height() ) GeoBox->move( GeoBox->x(), height() - GeoBox->height() ); @@ -213,32 +213,32 @@ bool InfoBoxes::shadeBox( QMouseEvent *e ) { bool InfoBoxes::fixCollisions( InfoBox *target ) { int dLeft(0), dRight(0), dUp(0), dDown(0); - QRect area = QRect( 0, 0, Width, Height ); - QRect t = target->rect(); - QRect Box1, Box2; + TQRect area = TQRect( 0, 0, Width, Height ); + TQRect t = target->rect(); + TQRect Box1, Box2; //Set Box1 and Box2 to the rects of the other two InfoBoxes, unless -//they are not visible (if so, set a null QRect) +//they are not visible (if so, set a null TQRect) if ( target == GeoBox ) { if ( FocusBox->isVisible() ) Box1 = FocusBox->rect(); - else Box1 = QRect(0,0,0,0); + else Box1 = TQRect(0,0,0,0); if ( TimeBox->isVisible() ) Box2 = TimeBox->rect(); - else Box2 = QRect(0,0,0,0); + else Box2 = TQRect(0,0,0,0); } else if ( target == FocusBox ) { if ( GeoBox->isVisible() ) Box1 = GeoBox->rect(); - else Box1 = QRect(0,0,0,0); + else Box1 = TQRect(0,0,0,0); if ( TimeBox->isVisible() ) Box2 = TimeBox->rect(); - else Box2 = QRect(0,0,0,0); + else Box2 = TQRect(0,0,0,0); } else if ( target == TimeBox ) { if ( FocusBox->isVisible() ) Box1 = FocusBox->rect(); - else Box1 = QRect(0,0,0,0); + else Box1 = TQRect(0,0,0,0); if ( GeoBox->isVisible() ) Box2 = GeoBox->rect(); - else Box2 = QRect(0,0,0,0); + else Box2 = TQRect(0,0,0,0); } else { return false; } //none of the Boxes match target! @@ -266,10 +266,10 @@ bool InfoBoxes::fixCollisions( InfoBox *target ) { t = target->rect(); } - QRect upRect = t; - QRect downRect = t; - QRect leftRect = t; - QRect rightRect = t; + TQRect upRect = t; + TQRect downRect = t; + TQRect leftRect = t; + TQRect rightRect = t; //Fix collisions if ( t.intersects( Box1 ) || t.intersects( Box2 ) ) { @@ -277,26 +277,26 @@ bool InfoBoxes::fixCollisions( InfoBox *target ) { //intersection with Box1 or Box2. while ( leftRect.intersects( Box1 ) || leftRect.intersects( Box2 ) ) { ++dLeft; - leftRect.moveTopLeft( QPoint( t.x() - dLeft, t.y() ) ); + leftRect.moveTopLeft( TQPoint( t.x() - dLeft, t.y() ) ); } //If leftRect is outside area, set dLeft to a nonsense large value if ( !area.contains( leftRect ) ) { dLeft = 100000; } //repeat for right, up and down directions. while ( rightRect.intersects( Box1 ) || rightRect.intersects( Box2 ) ) { ++dRight; - rightRect.moveTopLeft( QPoint( t.x() + dRight, t.y() ) ); + rightRect.moveTopLeft( TQPoint( t.x() + dRight, t.y() ) ); } if ( !area.contains( rightRect ) ) { dRight = 100000; } while ( upRect.intersects( Box1 ) || upRect.intersects( Box2 ) ) { ++dUp; - upRect.moveTopLeft( QPoint( t.x(), t.y() - dUp ) ); + upRect.moveTopLeft( TQPoint( t.x(), t.y() - dUp ) ); } if ( !area.contains( upRect ) ) { dUp = 100000; } while ( downRect.intersects( Box1 ) || downRect.intersects( Box2 ) ) { ++dDown; - downRect.moveTopLeft( QPoint( t.x(), t.y() + dDown ) ); + downRect.moveTopLeft( TQPoint( t.x(), t.y() + dDown ) ); } if ( !area.contains( downRect ) ) { dDown = 100000; } @@ -336,21 +336,21 @@ bool InfoBoxes::fixCollisions( InfoBox *target ) { } bool InfoBoxes::timeChanged( const KStarsDateTime &ut, const KStarsDateTime <, dms *lst ) { - QString ot1 = TimeBox->text1(); - QString ot2 = TimeBox->text2(); - QString ot3 = TimeBox->text3(); + TQString ot1 = TimeBox->text1(); + TQString ot2 = TimeBox->text2(); + TQString ot3 = TimeBox->text3(); TimeBox->setText1( i18n( "Local Time", "LT: " ) + lt.time().toString() + " " + lt.date().toString( "%d %b %Y" ) ); TimeBox->setText2( i18n( "Universal Time", "UT: " ) + ut.time().toString() + " " + ut.date().toString( "%d %b %Y" ) ); - QString STString; + TQString STString; STString = STString.sprintf( "%02d:%02d:%02d ", lst->hour(), lst->minute(), lst->second() ); //Don't use KLocale::formatNumber() for Julian Day because we don't want //thousands-place separators - QString JDString = QString::number( ut.djd(), 'f', 2 ); + TQString JDString = TQString::number( ut.djd(), 'f', 2 ); JDString.replace( ".", KGlobal::locale()->decimalSymbol() ); TimeBox->setText3( i18n( "Sidereal Time", "ST: " ) + STString + @@ -366,10 +366,10 @@ bool InfoBoxes::timeChanged( const KStarsDateTime &ut, const KStarsDateTime <, } bool InfoBoxes::geoChanged(const GeoLocation *geo) { - QString ot1 = GeoBox->text1(); - QString ot2 = GeoBox->text2(); + TQString ot1 = GeoBox->text1(); + TQString ot2 = GeoBox->text2(); - QString name = geo->translatedName() + ", "; + TQString name = geo->translatedName() + ", "; if ( ! geo->province().isEmpty() ) name += geo->translatedProvince() + ", "; name += geo->translatedCountry(); GeoBox->setText1( name ); @@ -387,8 +387,8 @@ bool InfoBoxes::geoChanged(const GeoLocation *geo) { } } -bool InfoBoxes::focusObjChanged( const QString &n ) { - QString ot1 = FocusBox->text1(); +bool InfoBoxes::focusObjChanged( const TQString &n ) { + TQString ot1 = FocusBox->text1(); FocusBox->setText1( i18n( "Focused on: " ) + n ); if ( ot1 == FocusBox->text1() ) return false; @@ -399,8 +399,8 @@ bool InfoBoxes::focusObjChanged( const QString &n ) { } bool InfoBoxes::focusCoordChanged(const SkyPoint *p) { - QString ot2 = FocusBox->text2(); - QString ot3 = FocusBox->text3(); + TQString ot2 = FocusBox->text2(); + TQString ot3 = FocusBox->text3(); FocusBox->setText2( i18n( "Right Ascension", "RA" ) + ": " + p->ra()->toHMSString() + " " + i18n( "Declination", "Dec" ) + ": " + p->dec()->toDMSString(true) ); diff --git a/kstars/kstars/infoboxes.h b/kstars/kstars/infoboxes.h index 0a1b6669..645f2bbe 100644 --- a/kstars/kstars/infoboxes.h +++ b/kstars/kstars/infoboxes.h @@ -18,10 +18,10 @@ #ifndef INFOBOXES_H #define INFOBOXES_H -#include <qobject.h> -#include <qcolor.h> -#include <qevent.h> -#include <qpoint.h> +#include <tqobject.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqpoint.h> #include <kdebug.h> #include "infobox.h" @@ -43,7 +43,7 @@ class dms; class InfoBox; class KStarsDateTime; -class InfoBoxes : public QObject { +class InfoBoxes : public TQObject { Q_OBJECT public: /**Constructor. Create three infoboxes and place them in the skymap. @@ -65,7 +65,7 @@ public: *"grabbed" by the user *@param colorBG The background color for infoboxes * - *@todo Use Qt::white as default color instead of QColor("white"), + *@todo Use Qt::white as default color instead of TQColor("white"), * for default values of colorText, colorGrab and colorBG, * since that's considerably faster. */ @@ -73,9 +73,9 @@ public: int tx=0, int ty=0, bool tshade=false, int gx=0, int gy=600, bool gshade=false, int fx=600, int fy=0, bool fshade=false, - QColor colorText=QColor("white"), - QColor colorGrab=QColor("red"), - QColor colorBG=QColor("black") ); + TQColor colorText=TQColor("white"), + TQColor colorGrab=TQColor("red"), + TQColor colorBG=TQColor("black") ); /**Constructor. Create three infoboxes and place them in the skymap. *Differs from the above function only in the types of its arguments. @@ -95,12 +95,12 @@ public: *@param colorBG The background color for infoboxes */ InfoBoxes( int w, int h, - QPoint tp, bool tshade, - QPoint gp, bool gshade, - QPoint fp, bool fshade, - QColor colorText=QColor("white"), - QColor colorGrab=QColor("red"), - QColor colorBG=QColor("black") ); + TQPoint tp, bool tshade, + TQPoint gp, bool gshade, + TQPoint fp, bool fshade, + TQColor colorText=TQColor("white"), + TQColor colorGrab=TQColor("red"), + TQColor colorBG=TQColor("black") ); /**Destructor (empty)*/ ~InfoBoxes(); @@ -132,14 +132,14 @@ public: int height() const { return Height; } /**Draw the boxes on a Qpainter object (representing the SkyMap). - *@param p The QPainter on which to draw the boxes. + *@param p The TQPainter on which to draw the boxes. *@param FGColor The foreground color (Pen color) to use when drawing boxes. *@param grabColor The foreground color to use if the box is "grabbed" by the user. *@param BGColor The background color (brush color) to use *@param BGMode: 0=no BG fill; 1=transparent BG fill; 2=Opaque BG fill. */ - void drawBoxes( QPainter &p, QColor FGColor=QColor("white"), - QColor grabColor=QColor("red"), QColor BGColor=QColor("black"), + void drawBoxes( TQPainter &p, TQColor FGColor=TQColor("white"), + TQColor grabColor=TQColor("red"), TQColor BGColor=TQColor("black"), unsigned int BGMode=0 ); /**Determine whether a mouse click occurred inside one of the infoboxes. @@ -149,7 +149,7 @@ public: *@param e The mouse event to check (it's a mousePressEvent) *@return true if the mouse press occurred inside one of the infoboxes. */ - bool grabBox( QMouseEvent *e ); + bool grabBox( TQMouseEvent *e ); /**Set the internal variable GrabBox to 0, indicating that no box is currently *grabbed. Also determine if any box should be anchored to an edge. (This @@ -165,7 +165,7 @@ public: *@param e The mouse event which contains the new mouse cursor position *@return false if no box is grabbed; otherwise, moves the grabbed box and returns true. */ - bool dragBox( QMouseEvent *e ); + bool dragBox( TQMouseEvent *e ); /**Toggle the shade-state of the infobox in which the user double-clicked. *After shading the box, call fixCollisions() on the other two boxes. @@ -174,7 +174,7 @@ public: *@return false if the double-click was not inside any box; otherwise shade the *target box and return true. */ - bool shadeBox( QMouseEvent *e ); + bool shadeBox( TQMouseEvent *e ); /**Make sure the target Infobox lies within the SkyMap boundaries, and that it does *not overlap with the other two Infoboxes. If an overlap is detected, the target @@ -240,7 +240,7 @@ public slots: *@param n The object name *@return true if values have changed */ - bool focusObjChanged(const QString &n); + bool focusObjChanged(const TQString &n); /**Check if boxes are anchored with bottom or right border. @param resetToDefault reset all borders of boxes to false before checking borders. @@ -251,8 +251,8 @@ private: int Width, Height; int GrabbedBox; bool Visible; - const QColor boxColor, grabColor, bgColor; - QPoint GrabPos; + const TQColor boxColor, grabColor, bgColor; + TQPoint GrabPos; InfoBox *GeoBox, *FocusBox, *TimeBox; }; diff --git a/kstars/kstars/jupitermoons.cpp b/kstars/kstars/jupitermoons.cpp index ca152fd3..deba668a 100644 --- a/kstars/kstars/jupitermoons.cpp +++ b/kstars/kstars/jupitermoons.cpp @@ -38,7 +38,7 @@ JupiterMoons::JupiterMoons(){ JupiterMoons::~JupiterMoons(){ } -int JupiterMoons::moonNamed( const QString &name ) const { +int JupiterMoons::moonNamed( const TQString &name ) const { for ( int i=0; i<4; ++i ) { if ( Name[i] == name ) return i; } diff --git a/kstars/kstars/jupitermoons.h b/kstars/kstars/jupitermoons.h index 23163f26..4555d74a 100644 --- a/kstars/kstars/jupitermoons.h +++ b/kstars/kstars/jupitermoons.h @@ -77,13 +77,13 @@ public: /**@return the name of a moon. *@param id which moon? 0=Io, 1=Europa, 2=Ganymede, 3=Callisto */ - QString name( int id ) const { return Name[id]; } + TQString name( int id ) const { return Name[id]; } /**@return ID number of a moon, given its name: *0=Io, 1=Europa, 2=Ganymede, 3=Callisto. *Return -1 if the name does not match one of these. */ - int moonNamed( const QString &name ) const; + int moonNamed( const TQString &name ) const; /**Convert the RA,Dec coordinates of each moon to Az,Alt *@param LSTh pointer to the current local sidereal time @@ -107,7 +107,7 @@ public: double z( int i ) const { return ZJ[i]; } private: SkyPoint Pos[4]; - QString Name[4]; + TQString Name[4]; bool InFront[4]; //the rectangular position, relative to Jupiter. X-axis is equator of Jupiter; usints are Jup. Radius double XJ[4], YJ[4], ZJ[4]; diff --git a/kstars/kstars/ksasteroid.cpp b/kstars/kstars/ksasteroid.cpp index 4ac314fb..9da8a3d4 100644 --- a/kstars/kstars/ksasteroid.cpp +++ b/kstars/kstars/ksasteroid.cpp @@ -23,7 +23,7 @@ #include "ksutils.h" #include "kstarsdata.h" -KSAsteroid::KSAsteroid( KStarsData *_kd, QString s, QString imfile, +KSAsteroid::KSAsteroid( KStarsData *_kd, TQString s, TQString imfile, long double _JD, double _a, double _e, dms _i, dms _w, dms _Node, dms _M, double _H ) : KSPlanetBase(_kd, s, imfile), kd(_kd), JD(_JD), a(_a), e(_e), H(_H), i(_i), w(_w), M(_M), N(_Node) { diff --git a/kstars/kstars/ksasteroid.h b/kstars/kstars/ksasteroid.h index a1fa12c2..326b4b43 100644 --- a/kstars/kstars/ksasteroid.h +++ b/kstars/kstars/ksasteroid.h @@ -61,7 +61,7 @@ class KSAsteroid : public KSPlanetBase *@p M the mean anomaly for the Julian Day *@p H absolute magnitude */ - KSAsteroid( KStarsData *kd, QString s, QString image_file, + KSAsteroid( KStarsData *kd, TQString s, TQString image_file, long double JD, double a, double e, dms i, dms w, dms N, dms M, double H ); /**Destructor (empty)*/ diff --git a/kstars/kstars/kscomet.cpp b/kstars/kstars/kscomet.cpp index 6f2c34a2..94ed1762 100644 --- a/kstars/kstars/kscomet.cpp +++ b/kstars/kstars/kscomet.cpp @@ -24,7 +24,7 @@ #include "kscomet.h" -KSComet::KSComet( KStarsData *_kd, QString _s, QString imfile, +KSComet::KSComet( KStarsData *_kd, TQString _s, TQString imfile, long double _JD, double _q, double _e, dms _i, dms _w, dms _Node, double Tp ) : KSPlanetBase(_kd, _s, imfile), kd(_kd), JD(_JD), q(_q), e(_e), i(_i), w(_w), N(_Node) { @@ -40,7 +40,7 @@ KSComet::KSComet( KStarsData *_kd, QString _s, QString imfile, int m = int( 60.0 * ( Hour - h ) ); int s = int( 60.0 * ( 60.0 * ( Hour - h) - m ) ); - JDp = KStarsDateTime( ExtDate( year, month, day ), QTime( h, m, s ) ).djd(); + JDp = KStarsDateTime( ExtDate( year, month, day ), TQTime( h, m, s ) ).djd(); //compute the semi-major axis, a: a = q/(1.0-e); diff --git a/kstars/kstars/kscomet.h b/kstars/kstars/kscomet.h index 62a26458..a6089ec3 100644 --- a/kstars/kstars/kscomet.h +++ b/kstars/kstars/kscomet.h @@ -60,7 +60,7 @@ class KSComet : public KSPlanetBase *@p M the mean anomaly for the Julian Day *@p Tp The date of the most proximate perihelion passage (YYYYMMDD.DDD) */ - KSComet( KStarsData *kd, QString s, QString image_file, + KSComet( KStarsData *kd, TQString s, TQString image_file, long double JD, double q, double e, dms i, dms w, dms N, double Tp ); /**Destructor (empty)*/ diff --git a/kstars/kstars/ksfilereader.cpp b/kstars/kstars/ksfilereader.cpp index 565cdf1b..4e2542ec 100644 --- a/kstars/kstars/ksfilereader.cpp +++ b/kstars/kstars/ksfilereader.cpp @@ -15,17 +15,17 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qstring.h> +#include <tqfile.h> +#include <tqstring.h> #include "ksfilereader.h" -KSFileReader::KSFileReader(QFile& file) { +KSFileReader::KSFileReader(TQFile& file) { // read the whole file at once. This works well at least for the smaller files. - QByteArray data = file.readAll(); - QString sAll = QString::fromUtf8( data.data(), data.size() ); + TQByteArray data = file.readAll(); + TQString sAll = TQString::fromUtf8( data.data(), data.size() ); // split into list of lines - lines = QStringList::split( "\n", sAll ); + lines = TQStringList::split( "\n", sAll ); // how many lines did we get? numLines = lines.size(); // set index to start @@ -41,7 +41,7 @@ bool KSFileReader::hasMoreLines() { return (curLine < numLines); } -QString& KSFileReader::readLine(){ +TQString& KSFileReader::readLine(){ // hint: use curLine as index, after that increment curLine // This means that the programming language c++ should better be renamed to ++c, // otherwise the name means: improve the c programming language, but use it the diff --git a/kstars/kstars/ksfilereader.h b/kstars/kstars/ksfilereader.h index 25c56b96..005d6987 100644 --- a/kstars/kstars/ksfilereader.h +++ b/kstars/kstars/ksfilereader.h @@ -18,11 +18,11 @@ #ifndef KSFILEREADER_H #define KSFILEREADER_H -#include <qobject.h> -#include <qstringlist.h> +#include <tqobject.h> +#include <tqstringlist.h> /**@class KSFileReader - *This class will read an entire file into a QStringList, where each item + *This class will read an entire file into a TQStringList, where each item *in the list is a line in the file. It can then access each line in the *list very quickly. *@author Heiko Evermann @@ -32,13 +32,13 @@ class QFile; class QString; -class KSFileReader : public QObject { +class KSFileReader : public TQObject { Q_OBJECT public: - /**Constructor. Read an entire file into a QStringList object. + /**Constructor. Read an entire file into a TQStringList object. *@p file the file to be read */ - KSFileReader( QFile& file); + KSFileReader( TQFile& file); /**Destructor*/ ~KSFileReader(); @@ -48,9 +48,9 @@ public: bool hasMoreLines(); /**Read a line from the file, and increment the "current line" counter. - *@return the line that we read, as a QString. + *@return the line that we read, as a TQString. */ - QString& readLine(); + TQString& readLine(); /**Go to a specific line in the file. *@p i the line number to skip to. @@ -59,7 +59,7 @@ public: private: /** After loading the whole file, we split it into lines and keep them here. */ - QStringList lines; + TQStringList lines; /** How many lines do we have in the file? */ int numLines; /** Which line are we at? */ diff --git a/kstars/kstars/ksmoon.cpp b/kstars/kstars/ksmoon.cpp index d63cc319..86c6fcd0 100644 --- a/kstars/kstars/ksmoon.cpp +++ b/kstars/kstars/ksmoon.cpp @@ -18,7 +18,7 @@ #include <stdlib.h> #include <math.h> -#include <qfile.h> +#include <tqfile.h> #include "ksnumbers.h" #include "ksutils.h" @@ -36,22 +36,22 @@ KSMoon::~KSMoon() { } bool KSMoon::data_loaded = false; -QPtrList<KSMoon::MoonLRData> KSMoon::LRData; -QPtrList<KSMoon::MoonBData> KSMoon::BData; +TQPtrList<KSMoon::MoonLRData> KSMoon::LRData; +TQPtrList<KSMoon::MoonBData> KSMoon::BData; bool KSMoon::loadData() { if (data_loaded) return true; - QString line; - QFile f; + TQString line; + TQFile f; int nd, nm, nm1, nf; double Li, Ri, Bi; //coefficients of the sums if ( KSUtils::openDataFile( f, "moonLR.dat" ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { line = stream.readLine(); - QTextIStream instream( &line ); + TQTextIStream instream( &line ); instream >> nd >> nm >> nm1 >> nf >> Li >> Ri; LRData.append(new MoonLRData(nd, nm, nm1, nf, Li, Ri)); } @@ -61,10 +61,10 @@ bool KSMoon::loadData() { if ( KSUtils::openDataFile( f, "moonB.dat" ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { line = stream.readLine(); - QTextIStream instream( &line ); + TQTextIStream instream( &line ); instream >> nd >> nm >> nm1 >> nf >> Bi; BData.append(new MoonBData(nd, nm, nm1, nf, Bi)); } @@ -78,8 +78,8 @@ bool KSMoon::loadData() { bool KSMoon::findGeocentricPosition( const KSNumbers *num, const KSPlanetBase* ) { //Algorithms in this subroutine are taken from Chapter 45 of "Astronomical Algorithms" //by Jean Meeus (1991, Willmann-Bell, Inc. ISBN 0-943396-35-2. http://www.willbell.com/math/mc1.htm) - QString fname, snum, line; - QFile f; + TQString fname, snum, line; + TQFile f; double DegtoRad; double T, L, D, M, M1, F, E, A1, A2, A3; double sumL, sumR, sumB; @@ -182,11 +182,11 @@ void KSMoon::findPhase( const KSSun *Sun ) { Phase.setD( Phase.reduce().Degrees() ); int iPhase = int( 0.1*Phase.Degrees()+0.5 ); if (iPhase==36) iPhase = 0; - QString sPhase; + TQString sPhase; sPhase = sPhase.sprintf( "%02d", iPhase ); - QString imName = "moon" + sPhase + ".png"; + TQString imName = "moon" + sPhase + ".png"; - QFile imFile; + TQFile imFile; if ( KSUtils::openDataFile( imFile, imName ) ) { imFile.close(); image0()->load( imFile.name() ); @@ -195,7 +195,7 @@ void KSMoon::findPhase( const KSSun *Sun ) { } } -QString KSMoon::phaseName() const { +TQString KSMoon::phaseName() const { double f = illum(); double p = phase().Degrees(); diff --git a/kstars/kstars/ksmoon.h b/kstars/kstars/ksmoon.h index 80f65c3e..ad424d73 100644 --- a/kstars/kstars/ksmoon.h +++ b/kstars/kstars/ksmoon.h @@ -61,7 +61,7 @@ public: /**@return a short string describing the moon's phase */ - QString phaseName( void ) const; + TQString phaseName( void ) const; /** reimplemented from KSPlanetBase */ @@ -106,7 +106,7 @@ private: nd(pnd), nm(pnm), nm1(pnm1), nf(pnf), Li(pLi), Ri(pRi) {} }; - static QPtrList<MoonLRData> LRData; + static TQPtrList<MoonLRData> LRData; /**@class MoonBData *Encapsulates the Latitude terms of the sums @@ -127,7 +127,7 @@ private: nd(pnd), nm(pnm), nm1(pnm1), nf(pnf), Bi(pBi) {} }; - static QPtrList<MoonBData> BData; + static TQPtrList<MoonBData> BData; }; #endif diff --git a/kstars/kstars/ksnewstuff.cpp b/kstars/kstars/ksnewstuff.cpp index 591b5e50..e416388e 100644 --- a/kstars/kstars/ksnewstuff.cpp +++ b/kstars/kstars/ksnewstuff.cpp @@ -26,9 +26,9 @@ #include <kdirwatch.h> #include <kprogress.h> #include <ktar.h> -#include <qdir.h> -#include <qcursor.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqcursor.h> +#include <tqregexp.h> #include "ksnewstuff.h" #include "kstars.h" @@ -37,15 +37,15 @@ #include "objectnamelist.h" #include "skymap.h" -KSNewStuff::KSNewStuff( QWidget *parent ) : - QObject(), KNewStuff( "kstars", parent ), NGCUpdated( false ) +KSNewStuff::KSNewStuff( TQWidget *parent ) : + TQObject(), KNewStuff( "kstars", parent ), NGCUpdated( false ) { ks = (KStars*)parent; kdw = new KDirWatch( this ); kdw->addDir( KGlobal::dirs()->saveLocation("data", kapp->instanceName(), true) ); } -bool KSNewStuff::install( const QString &fileName ) +bool KSNewStuff::install( const TQString &fileName ) { kdDebug() << "KSNewStuff::install(): " << fileName << endl; @@ -54,11 +54,11 @@ bool KSNewStuff::install( const QString &fileName ) return false; const KArchiveDirectory *archiveDir = archive.directory(); - const QString destDir = KGlobal::dirs()->saveLocation("data", kapp->instanceName(), true); + const TQString destDir = KGlobal::dirs()->saveLocation("data", kapp->instanceName(), true); KStandardDirs::makeDir( destDir ); //monitor destDir for changes; inform updateData when files are created. - connect( kdw, SIGNAL( dirty( const QString & ) ), this, SLOT( updateData( const QString & ) ) ); + connect( kdw, TQT_SIGNAL( dirty( const TQString & ) ), this, TQT_SLOT( updateData( const TQString & ) ) ); archiveDir->copyTo(destDir); archive.close(); @@ -69,13 +69,13 @@ bool KSNewStuff::install( const QString &fileName ) return true; } -void KSNewStuff::updateData( const QString &path ) { - QDir qd( path ); - qd.setSorting( QDir::Time ); - qd.setFilter( QDir::Files ); +void KSNewStuff::updateData( const TQString &path ) { + TQDir qd( path ); + qd.setSorting( TQDir::Time ); + qd.setFilter( TQDir::Files ); //Show the Wait cursor - ks->setCursor(QCursor(Qt::WaitCursor)); + ks->setCursor(TQCursor(Qt::WaitCursor)); //Handle the Steinicke NGC/IC catalog @@ -105,8 +105,8 @@ void KSNewStuff::updateData( const QString &path ) { ks->data()->deepSkyList.clear(); //Send progress messages to the console - connect( ks->data(), SIGNAL( progressText(QString) ), ks->data(), SLOT( slotConsoleMessage(QString) ) ); - connect( ks->data(), SIGNAL( progressText(QString) ), ks->data(), SLOT( slotProcessEvents() ) ); + connect( ks->data(), TQT_SIGNAL( progressText(TQString) ), ks->data(), TQT_SLOT( slotConsoleMessage(TQString) ) ); + connect( ks->data(), TQT_SIGNAL( progressText(TQString) ), ks->data(), TQT_SLOT( slotProcessEvents() ) ); //We are now ready to read the new NGC/IC catalog ks->data()->readDeepSkyData(); @@ -150,7 +150,7 @@ void KSNewStuff::updateData( const QString &path ) { ks->data()->cometList.clear(); //Send progress messages to the console - connect( ks->data(), SIGNAL( progressText(QString) ), ks->data(), SLOT( slotConsoleMessage(QString) ) ); + connect( ks->data(), TQT_SIGNAL( progressText(TQString) ), ks->data(), TQT_SLOT( slotConsoleMessage(TQString) ) ); //add new asteroids and comets ks->data()->readAsteroidData(); @@ -163,7 +163,7 @@ void KSNewStuff::updateData( const QString &path ) { } //Restore arrow cursor - ks->setCursor(QCursor(Qt::ArrowCursor)); + ks->setCursor(TQCursor(Qt::ArrowCursor)); } void KSNewStuff::slotProcessEvents() { kapp->processEvents( 500 ); } diff --git a/kstars/kstars/ksnewstuff.h b/kstars/kstars/ksnewstuff.h index 1578ed95..fc653e55 100644 --- a/kstars/kstars/ksnewstuff.h +++ b/kstars/kstars/ksnewstuff.h @@ -36,14 +36,14 @@ #include <klocale.h> #include <kdebug.h> -#include <qobject.h> +#include <tqobject.h> #include <knewstuff/knewstuff.h> class KDirWatch; class KStars; -class KSNewStuff : public QObject, public KNewStuff +class KSNewStuff : public TQObject, public KNewStuff { Q_OBJECT public: @@ -51,21 +51,21 @@ class KSNewStuff : public QObject, public KNewStuff *Constructor *@p parent pointer to the parent widget */ - KSNewStuff( QWidget *parent = 0 ); + KSNewStuff( TQWidget *parent = 0 ); /** *Install new application data *@p fileName the name of the file to be installed *@note overloaded from KNewStuff */ - bool install( const QString &fileName ); + bool install( const TQString &fileName ); /** *Upload a data file *@p fileName The file to upload *@note this function is not yet implemented, and is just a placeholder */ - bool createUploadFile( const QString & /*fileName*/ ) { + bool createUploadFile( const TQString & /*fileName*/ ) { kdDebug() << i18n( "Uploading data is not possible yet!" ); return false; } @@ -76,7 +76,7 @@ class KSNewStuff : public QObject, public KNewStuff *This slot is called whenever files are added to the data directory *@p newFile The name of the file that was just added to the data directory */ - void updateData( const QString &newFile ); + void updateData( const TQString &newFile ); /** *Simply calls kapp->processEvents(), to make the UI responsive while diff --git a/kstars/kstars/ksplanet.cpp b/kstars/kstars/ksplanet.cpp index 1118e218..497ff88c 100644 --- a/kstars/kstars/ksplanet.cpp +++ b/kstars/kstars/ksplanet.cpp @@ -17,7 +17,7 @@ #include <math.h> #include <kdebug.h> -#include <qfile.h> +#include <tqfile.h> #include "ksplanet.h" #include "ksnumbers.h" @@ -41,28 +41,28 @@ KSPlanet::OrbitDataManager::OrbitDataManager() : dict(31, true) { dict.setAutoDelete(true); } -bool KSPlanet::OrbitDataManager::readOrbitData(QString fname, - QPtrVector<KSPlanet::OrbitData> *vector) { - QString line; - QFile f; +bool KSPlanet::OrbitDataManager::readOrbitData(TQString fname, + TQPtrVector<KSPlanet::OrbitData> *vector) { + TQString line; + TQFile f; double A, B, C; - QPtrList<OrbitData> DData; + TQPtrList<OrbitData> DData; if ( KSUtils::openDataFile( f, fname ) ) { KSFileReader fileReader( f ); // close file is included while ( fileReader.hasMoreLines() ) { line = fileReader.readLine(); - QTextIStream instream( &line ); + TQTextIStream instream( &line ); instream >> A >> B >> C; DData.append(new OrbitData(A, B, C)); } /* old code - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { line = stream.readLine(); - QTextIStream instream( &line ); + TQTextIStream instream( &line ); instream >> A >> B >> C; DData.append(new OrbitData(A, B, C)); @@ -78,9 +78,9 @@ bool KSPlanet::OrbitDataManager::readOrbitData(QString fname, return true; } -KSPlanet::OrbitDataColl *KSPlanet::OrbitDataManager::loadData(QString n) { - QString fname, snum, line; - QFile f; +KSPlanet::OrbitDataColl *KSPlanet::OrbitDataManager::loadData(TQString n) { + TQString fname, snum, line; + TQFile f; int nCount = 0; OrbitDataColl *ret; @@ -144,7 +144,7 @@ KSPlanet::OrbitDataColl *KSPlanet::OrbitDataManager::loadData(QString n) { return ret; } -KSPlanet::KSPlanet( KStarsData *kd, QString s, QString imfile, double pSize ) +KSPlanet::KSPlanet( KStarsData *kd, TQString s, TQString imfile, double pSize ) : KSPlanetBase(kd, s, imfile, pSize ), data_loaded(false) { } diff --git a/kstars/kstars/ksplanet.h b/kstars/kstars/ksplanet.h index 7f3603da..c30e40e7 100644 --- a/kstars/kstars/ksplanet.h +++ b/kstars/kstars/ksplanet.h @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qstring.h> -#include <qptrvector.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqptrvector.h> +#include <tqdict.h> #include "ksplanetbase.h" #include "dms.h" @@ -52,7 +52,7 @@ public: * *@todo figure out what @p kd does. */ - KSPlanet( KStarsData *kd, QString s="unnamed", QString image_file="", double pSize=0 ); + KSPlanet( KStarsData *kd, TQString s="unnamed", TQString image_file="", double pSize=0 ); /**Destructor (empty) */ @@ -101,9 +101,9 @@ protected: double A, B, C; }; - typedef QPtrVector<OrbitData> OBArray[6]; + typedef TQPtrVector<OrbitData> OBArray[6]; -/**OrbitDataColl contains three groups of six QPtrVectors. Each QPtrVector is a +/**OrbitDataColl contains three groups of six QPtrVectors. Each TQPtrVector is a *list of OrbitData objects, representing a single sum used in computing *the planet's position. A set of six of these vectors comprises the large *"meta-sum" which yields the planet's Longitude, Latitude, or Distance value. @@ -139,7 +139,7 @@ protected: *@p n the name of the planet whose data is to be loaded from disk. *@return pointer to the OrbitDataColl containing the planet's orbital data. */ - OrbitDataColl *loadData(QString n); + OrbitDataColl *loadData(TQString n); private: /**Read a single orbital data file from disk into an OrbitData vector. @@ -148,9 +148,9 @@ protected: *@p fname the filename to be read. *@p vector pointer to the OrbitData vector to be filled with these data. */ - bool readOrbitData(QString fname, QPtrVector<KSPlanet::OrbitData> *vector); + bool readOrbitData(TQString fname, TQPtrVector<KSPlanet::OrbitData> *vector); - QDict<OrbitDataColl> dict; + TQDict<OrbitDataColl> dict; }; static OrbitDataManager odm; diff --git a/kstars/kstars/ksplanetbase.cpp b/kstars/kstars/ksplanetbase.cpp index 4eb92f03..469c5307 100644 --- a/kstars/kstars/ksplanetbase.cpp +++ b/kstars/kstars/ksplanetbase.cpp @@ -17,9 +17,9 @@ #include <math.h> -#include <qfile.h> -#include <qpoint.h> -#include <qwmatrix.h> +#include <tqfile.h> +#include <tqpoint.h> +#include <tqwmatrix.h> #include "ksplanetbase.h" #include "ksplanet.h" @@ -29,11 +29,11 @@ #include "kspopupmenu.h" -KSPlanetBase::KSPlanetBase( KStarsData *kd, QString s, QString image_file, double pSize ) +KSPlanetBase::KSPlanetBase( KStarsData *kd, TQString s, TQString image_file, double pSize ) : SkyObject( 2, 0.0, 0.0, 0.0, s, "" ), Rearth(0.0), Image(0), data(kd) { if (! image_file.isEmpty()) { - QFile imFile; + TQFile imFile; if ( KSUtils::openDataFile( imFile, image_file ) ) { imFile.close(); @@ -185,14 +185,14 @@ void KSPlanetBase::findPA( const KSNumbers *num ) { void KSPlanetBase::rotateImage( double imAngle ) { ImageAngle = imAngle; - QWMatrix m; + TQWMatrix m; m.rotate( ImageAngle ); Image = Image0.xForm( m ); } void KSPlanetBase::scaleRotateImage( int scale, double imAngle ) { ImageAngle = imAngle; - QWMatrix m; + TQWMatrix m; m.rotate( ImageAngle ); Image = Image0.xForm( m ).smoothScale( scale, scale ); } diff --git a/kstars/kstars/ksplanetbase.h b/kstars/kstars/ksplanetbase.h index 6d29c8ad..0c15a1a5 100644 --- a/kstars/kstars/ksplanetbase.h +++ b/kstars/kstars/ksplanetbase.h @@ -19,9 +19,9 @@ #ifndef KSPLANETBASE_H #define KSPLANETBASE_H -#include <qstring.h> -#include <qptrlist.h> -#include <qimage.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqimage.h> #include <kdebug.h> @@ -80,7 +80,7 @@ public: * *@todo Figure out what @p kd does. */ - KSPlanetBase( KStarsData *kd, QString s = i18n("unnamed"), QString image_file="", double pSize=0 ); + KSPlanetBase( KStarsData *kd, TQString s = i18n("unnamed"), TQString image_file="", double pSize=0 ); /** *Destructor (empty) @@ -166,11 +166,11 @@ public: /**@return pointer to image of planet */ - QImage* image( void ) { return &Image; } + TQImage* image( void ) { return &Image; } /**@return pointer to unrotated image of planet */ - QImage* image0( void ) { return &Image0; } + TQImage* image0( void ) { return &Image0; } /**@return distance from Sun, in Astronomical Units (1 AU is Earth-Sun distance) */ @@ -249,7 +249,7 @@ public: /**@return a reference to the planet's trail */ - QPtrList<SkyPoint>* trail() { return &Trail; } + TQPtrList<SkyPoint>* trail() { return &Trail; } /**@short adds a point to the planet's trail */ @@ -283,10 +283,10 @@ public: *@param pmenu pointer to the KSPopupMenu object *@param pos QPojnt holding the x,y coordinates for the menu */ - virtual void showPopupMenu( KSPopupMenu *pmenu, QPoint pos ) { pmenu->createPlanetMenu( this ); pmenu->popup( pos ); } + virtual void showPopupMenu( KSPopupMenu *pmenu, TQPoint pos ) { pmenu->createPlanetMenu( this ); pmenu->popup( pos ); } protected: - virtual bool loadData(QString n) { + virtual bool loadData(TQString n) { kdDebug() << "didn't reimplement for " << n << endl; return false; } @@ -311,7 +311,7 @@ protected: // Heliocentric ecliptic position referred to the equinox of the epoch // as obtained from VSOP. EclipticPosition helEcPos; - QPtrList<SkyPoint> Trail; + TQPtrList<SkyPoint> Trail; double Rearth; private: @@ -333,7 +333,7 @@ private: */ void findMagnitude(const KSNumbers *num); - QImage Image0, Image; + TQImage Image0, Image; double PositionAngle, ImageAngle, AngularSize, PhysicalSize; KStarsData *data; }; diff --git a/kstars/kstars/kspluto.cpp b/kstars/kstars/kspluto.cpp index 558c265c..c544b528 100644 --- a/kstars/kstars/kspluto.cpp +++ b/kstars/kstars/kspluto.cpp @@ -17,7 +17,7 @@ #include <math.h> -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include "kspluto.h" @@ -29,7 +29,7 @@ #undef B0 #endif -KSPluto::KSPluto(KStarsData *kd, QString fn, double pSize ) +KSPluto::KSPluto(KStarsData *kd, TQString fn, double pSize ) : KSAsteroid( kd, I18N_NOOP( "Pluto" ), fn, J2000, 39.48168677, 0.24880766, dms(17.14175), dms(113.76329), dms(110.30347), dms(14.86205), 1.0 ) { diff --git a/kstars/kstars/kspluto.h b/kstars/kstars/kspluto.h index 55e1224e..b30b5a54 100644 --- a/kstars/kstars/kspluto.h +++ b/kstars/kstars/kspluto.h @@ -49,7 +49,7 @@ public: *@p fn filename of Pluto's image *@p pSize physical diameter of Pluto, in km */ - KSPluto(KStarsData *kd, QString fn="", double pSize=0); + KSPluto(KStarsData *kd, TQString fn="", double pSize=0); /**Destructor (empty) */ virtual ~KSPluto(); diff --git a/kstars/kstars/kspopupmenu.cpp b/kstars/kstars/kspopupmenu.cpp index 53804035..5f1a7829 100644 --- a/kstars/kstars/kspopupmenu.cpp +++ b/kstars/kstars/kspopupmenu.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qlabel.h> +#include <tqlabel.h> #include "kspopupmenu.h" #include "kstars.h" @@ -32,7 +32,7 @@ #include "indigroup.h" #include "indiproperty.h" -KSPopupMenu::KSPopupMenu( QWidget *parent, const char *name ) +KSPopupMenu::KSPopupMenu( TQWidget *parent, const char *name ) : KPopupMenu( parent, name ) { ksw = ( KStars* )parent; @@ -43,10 +43,10 @@ KSPopupMenu::~KSPopupMenu() } void KSPopupMenu::createEmptyMenu( SkyObject *nullObj ) { - initPopupMenu( nullObj, i18n( "Empty sky" ), QString::null, QString::null, true, true, false, false, false, true, false ); + initPopupMenu( nullObj, i18n( "Empty sky" ), TQString::null, TQString::null, true, true, false, false, false, true, false ); - insertItem( i18n( "First Generation Digitized Sky Survey", "Show 1st-Gen DSS Image" ), ksw->map(), SLOT( slotDSS() ) ); - insertItem( i18n( "Second Generation Digitized Sky Survey", "Show 2nd-Gen DSS Image" ), ksw->map(), SLOT( slotDSS2() ) ); + insertItem( i18n( "First Generation Digitized Sky Survey", "Show 1st-Gen DSS Image" ), ksw->map(), TQT_SLOT( slotDSS() ) ); + insertItem( i18n( "Second Generation Digitized Sky Survey", "Show 2nd-Gen DSS Image" ), ksw->map(), TQT_SLOT( slotDSS2() ) ); } void KSPopupMenu::createStarMenu( StarObject *star ) { @@ -58,14 +58,14 @@ void KSPopupMenu::createStarMenu( StarObject *star ) { if ( star->name() != "star" ) { addLinksToMenu( star ); } else { - insertItem( i18n( "First Generation Digitized Sky Survey", "Show 1st-Gen DSS Image" ), ksw->map(), SLOT( slotDSS() ) ); - insertItem( i18n( "Second Generation Digitized Sky Survey", "Show 2nd-Gen DSS Image" ), ksw->map(), SLOT( slotDSS2() ) ); + insertItem( i18n( "First Generation Digitized Sky Survey", "Show 1st-Gen DSS Image" ), ksw->map(), TQT_SLOT( slotDSS() ) ); + insertItem( i18n( "Second Generation Digitized Sky Survey", "Show 2nd-Gen DSS Image" ), ksw->map(), TQT_SLOT( slotDSS2() ) ); } } void KSPopupMenu::createDeepSkyObjectMenu( SkyObject *obj ) { - QString TypeName = ksw->data()->TypeName[ obj->type() ]; - QString secondName = obj->translatedName2(); + TQString TypeName = ksw->data()->TypeName[ obj->type() ]; + TQString secondName = obj->translatedName2(); if ( obj->longname() != obj->name() ) secondName = obj->translatedLongName(); initPopupMenu( obj, obj->translatedName(), secondName, TypeName ); @@ -73,8 +73,8 @@ void KSPopupMenu::createDeepSkyObjectMenu( SkyObject *obj ) { } void KSPopupMenu::createCustomObjectMenu( SkyObject *obj ) { - QString TypeName = ksw->data()->TypeName[ obj->type() ]; - QString secondName = obj->translatedName2(); + TQString TypeName = ksw->data()->TypeName[ obj->type() ]; + TQString secondName = obj->translatedName2(); if ( obj->longname() != obj->name() ) secondName = obj->translatedLongName(); initPopupMenu( obj, obj->translatedName(), secondName, TypeName ); @@ -84,7 +84,7 @@ void KSPopupMenu::createCustomObjectMenu( SkyObject *obj ) { void KSPopupMenu::createPlanetMenu( SkyObject *p ) { bool addTrail( ! ((KSPlanetBase*)p)->hasTrail() ); - QString oname = ""; + TQString oname = ""; if ( p->name() == "Moon" ) { oname = ((KSMoon *)p)->phaseName(); } @@ -93,8 +93,8 @@ void KSPopupMenu::createPlanetMenu( SkyObject *p ) { } void KSPopupMenu::addLinksToMenu( SkyObject *obj, bool showDSS, bool allowCustom ) { - QString sURL; - QStringList::Iterator itList, itTitle, itListEnd; + TQString sURL; + TQStringList::Iterator itList, itTitle, itListEnd; itList = obj->ImageList.begin(); itTitle = obj->ImageTitle.begin(); @@ -102,15 +102,15 @@ void KSPopupMenu::addLinksToMenu( SkyObject *obj, bool showDSS, bool allowCustom int id = 100; for ( ; itList != itListEnd; ++itList ) { - QString t = QString(*itTitle); - sURL = QString(*itList); - insertItem( i18n( "Image/info menu item (should be translated)", t.local8Bit() ), ksw->map(), SLOT( slotImage( int ) ), 0, id++ ); + TQString t = TQString(*itTitle); + sURL = TQString(*itList); + insertItem( i18n( "Image/info menu item (should be translated)", t.local8Bit() ), ksw->map(), TQT_SLOT( slotImage( int ) ), 0, id++ ); ++itTitle; } if ( showDSS ) { - insertItem( i18n( "First Generation Digitized Sky Survey", "Show 1st-Gen DSS Image" ), ksw->map(), SLOT( slotDSS() ) ); - insertItem( i18n( "Second Generation Digitized Sky Survey", "Show 2nd-Gen DSS Image" ), ksw->map(), SLOT( slotDSS2() ) ); + insertItem( i18n( "First Generation Digitized Sky Survey", "Show 1st-Gen DSS Image" ), ksw->map(), TQT_SLOT( slotDSS() ) ); + insertItem( i18n( "Second Generation Digitized Sky Survey", "Show 2nd-Gen DSS Image" ), ksw->map(), TQT_SLOT( slotDSS2() ) ); insertSeparator(); } else if ( obj->ImageList.count() ) insertSeparator(); @@ -121,15 +121,15 @@ void KSPopupMenu::addLinksToMenu( SkyObject *obj, bool showDSS, bool allowCustom id = 200; for ( ; itList != itListEnd; ++itList ) { - QString t = QString(*itTitle); - sURL = QString(*itList); - insertItem( i18n( "Image/info menu item (should be translated)", t.local8Bit() ), ksw->map(), SLOT( slotInfo( int ) ), 0, id++ ); + TQString t = TQString(*itTitle); + sURL = TQString(*itList); + insertItem( i18n( "Image/info menu item (should be translated)", t.local8Bit() ), ksw->map(), TQT_SLOT( slotInfo( int ) ), 0, id++ ); ++itTitle; } if ( allowCustom ) { insertSeparator(); - insertItem( i18n( "Add Link..." ), ksw->map(), SLOT( addLink() ), 0, id++ ); + insertItem( i18n( "Add Link..." ), ksw->map(), TQT_SLOT( addLink() ), 0, id++ ); } } @@ -201,7 +201,7 @@ bool KSPopupMenu::addINDI(void) } } - QObject::connect(menuDevice, SIGNAL(activated(int)), prop, SLOT (convertSwitch(int))); + TQObject::connect(menuDevice, TQT_SIGNAL(activated(int)), prop, TQT_SLOT (convertSwitch(int))); } // end property } // end group @@ -217,7 +217,7 @@ bool KSPopupMenu::addINDI(void) prop = dev->findElem("ALT")->pp; prop->assosiatedPopup = menuDevice; - QObject::connect(menuDevice, SIGNAL(activated(int)), prop, SLOT(convertSwitch(int))); + TQObject::connect(menuDevice, TQT_SIGNAL(activated(int)), prop, TQT_SLOT(convertSwitch(int))); } } // end device @@ -226,7 +226,7 @@ bool KSPopupMenu::addINDI(void) return true; } -void KSPopupMenu::initPopupMenu( SkyObject *obj, QString s1, QString s2, QString s3, +void KSPopupMenu::initPopupMenu( SkyObject *obj, TQString s1, TQString s2, TQString s3, bool showRiseSet, bool showCenterTrack, bool showDetails, bool showTrail, bool addTrail, bool showAngularDistance, bool showObsList ) { @@ -236,47 +236,47 @@ void KSPopupMenu::initPopupMenu( SkyObject *obj, QString s1, QString s2, QString bool showLabel( true ); if ( s1 == i18n( "star" ) || s1 == i18n( "Empty sky" ) ) showLabel = false; - pmTitle = new QLabel( s1, this ); + pmTitle = new TQLabel( s1, this ); pmTitle->setAlignment( AlignCenter ); - QPalette pal( pmTitle->palette() ); - pal.setColor( QPalette::Normal, QColorGroup::Background, pal.color( QPalette::Normal, QColorGroup::Base ) ); - pal.setColor( QPalette::Normal, QColorGroup::Foreground, pal.color( QPalette::Normal, QColorGroup::Text ) ); + TQPalette pal( pmTitle->palette() ); + pal.setColor( TQPalette::Normal, TQColorGroup::Background, pal.color( TQPalette::Normal, TQColorGroup::Base ) ); + pal.setColor( TQPalette::Normal, TQColorGroup::Foreground, pal.color( TQPalette::Normal, TQColorGroup::Text ) ); pmTitle->setPalette( pal ); insertItem( pmTitle ); if ( ! s2.isEmpty() ) { - pmTitle2 = new QLabel( s2, this ); + pmTitle2 = new TQLabel( s2, this ); pmTitle2->setAlignment( AlignCenter ); pmTitle2->setPalette( pal ); insertItem( pmTitle2 ); } if ( ! s3.isEmpty() ) { - pmType = new QLabel( s3, this ); + pmType = new TQLabel( s3, this ); pmType->setAlignment( AlignCenter ); pmType->setPalette( pal ); insertItem( pmType ); } - QString c = obj->constellation( ksw->data()->csegmentList, ksw->data()->cnameList ); - pmConstellation = new QLabel( c, this ); + TQString c = obj->constellation( ksw->data()->csegmentList, ksw->data()->cnameList ); + pmConstellation = new TQLabel( c, this ); pmConstellation->setAlignment( AlignCenter ); pmConstellation->setPalette( pal ); insertItem( pmConstellation ); //Insert Rise/Set/Transit labels if ( showRiseSet && obj ) { - pmRiseTime = new QLabel( i18n( "Rise time: 00:00" ), this ); + pmRiseTime = new TQLabel( i18n( "Rise time: 00:00" ), this ); pmRiseTime->setAlignment( AlignCenter ); pmRiseTime->setPalette( pal ); - QFont rsFont = pmRiseTime->font(); + TQFont rsFont = pmRiseTime->font(); rsFont.setPointSize( rsFont.pointSize() - 2 ); pmRiseTime->setFont( rsFont ); - pmSetTime = new QLabel( i18n( "the time at which an object falls below the horizon", "Set time:" ) + " 00:00", this ); + pmSetTime = new TQLabel( i18n( "the time at which an object falls below the horizon", "Set time:" ) + " 00:00", this ); pmSetTime->setAlignment( AlignCenter ); pmSetTime->setPalette( pal ); pmSetTime->setFont( rsFont ); - pmTransitTime = new QLabel( i18n( "Transit time: 00:00" ), this ); + pmTransitTime = new TQLabel( i18n( "Transit time: 00:00" ), this ); pmTransitTime->setAlignment( AlignCenter ); pmTransitTime->setPalette( pal ); pmTransitTime->setFont( rsFont ); @@ -291,15 +291,15 @@ void KSPopupMenu::initPopupMenu( SkyObject *obj, QString s1, QString s2, QString //Insert item for centering on object if ( showCenterTrack && obj ) { insertSeparator(); - insertItem( i18n( "Center && Track" ), ksw->map(), SLOT( slotCenter() ) ); + insertItem( i18n( "Center && Track" ), ksw->map(), TQT_SLOT( slotCenter() ) ); } //Insert item for measuring distances if ( showAngularDistance && obj ) { if (! (ksw->map()->isAngleMode()) ) { - insertItem( i18n( "Angular Distance To... [" ), ksw->map(), SLOT( slotBeginAngularDistance() ) ); + insertItem( i18n( "Angular Distance To... [" ), ksw->map(), TQT_SLOT( slotBeginAngularDistance() ) ); } else { - insertItem( i18n( "Compute Angular Distance ]" ), ksw->map(), SLOT( slotEndAngularDistance() ) ); + insertItem( i18n( "Compute Angular Distance ]" ), ksw->map(), TQT_SLOT( slotEndAngularDistance() ) ); } } @@ -307,30 +307,30 @@ void KSPopupMenu::initPopupMenu( SkyObject *obj, QString s1, QString s2, QString //Insert item for Showing details dialog if ( showDetails && obj ) { - insertItem( i18n( "Show Detailed Information Dialog", "Details" ), ksw->map(), SLOT( slotDetail() ) ); + insertItem( i18n( "Show Detailed Information Dialog", "Details" ), ksw->map(), TQT_SLOT( slotDetail() ) ); } //Insert "Add/Remove Label" item if ( showLabel && obj ) { if ( ksw->map()->isObjectLabeled( obj ) ) { - insertItem( i18n( "Remove Label" ), ksw->map(), SLOT( slotRemoveObjectLabel() ) ); + insertItem( i18n( "Remove Label" ), ksw->map(), TQT_SLOT( slotRemoveObjectLabel() ) ); } else { - insertItem( i18n( "Attach Label" ), ksw->map(), SLOT( slotAddObjectLabel() ) ); + insertItem( i18n( "Attach Label" ), ksw->map(), TQT_SLOT( slotAddObjectLabel() ) ); } } if ( showObsList && obj ) { if ( ksw->observingList()->contains( obj ) ) - insertItem( i18n("Remove From List"), ksw->observingList(), SLOT( slotRemoveObject() ) ); + insertItem( i18n("Remove From List"), ksw->observingList(), TQT_SLOT( slotRemoveObject() ) ); else - insertItem( i18n("Add to List"), ksw->observingList(), SLOT( slotAddObject() ) ); + insertItem( i18n("Add to List"), ksw->observingList(), TQT_SLOT( slotAddObject() ) ); } if ( showTrail && obj && obj->isSolarSystem() ) { if ( addTrail ) { - insertItem( i18n( "Add Trail" ), ksw->map(), SLOT( slotAddPlanetTrail() ) ); + insertItem( i18n( "Add Trail" ), ksw->map(), TQT_SLOT( slotAddPlanetTrail() ) ); } else { - insertItem( i18n( "Remove Trail" ), ksw->map(), SLOT( slotRemovePlanetTrail() ) ); + insertItem( i18n( "Remove Trail" ), ksw->map(), TQT_SLOT( slotRemovePlanetTrail() ) ); } } @@ -343,8 +343,8 @@ void KSPopupMenu::initPopupMenu( SkyObject *obj, QString s1, QString s2, QString void KSPopupMenu::setRiseSetLabels( SkyObject *obj ) { if ( ! obj ) return; - QString rt, rt2, rt3; - QTime rtime = obj->riseSetTime( ksw->data()->ut(), ksw->geo(), true ); + TQString rt, rt2, rt3; + TQTime rtime = obj->riseSetTime( ksw->data()->ut(), ksw->geo(), true ); dms rAz = obj->riseSetTimeAz( ksw->data()->ut(), ksw->geo(), true ); if ( rtime.isValid() ) { @@ -358,9 +358,9 @@ void KSPopupMenu::setRiseSetLabels( SkyObject *obj ) { } KStarsDateTime dt = ksw->data()->ut(); - QTime stime = obj->riseSetTime( dt, ksw->geo(), false ); + TQTime stime = obj->riseSetTime( dt, ksw->geo(), false ); - QString st, st2, st3; + TQString st, st2, st3; dms sAz = obj->riseSetTimeAz( dt, ksw->geo(), false ); if ( stime.isValid() ) { @@ -373,9 +373,9 @@ void KSPopupMenu::setRiseSetLabels( SkyObject *obj ) { st = i18n( "No set time: Never rises" ); } - QTime ttime = obj->transitTime( dt, ksw->geo() ); + TQTime ttime = obj->transitTime( dt, ksw->geo() ); dms trAlt = obj->transitAltitude( dt, ksw->geo() ); - QString tt, tt2, tt3; + TQString tt, tt2, tt3; if ( ttime.isValid() ) { //We can round to the nearest minute by simply adding 30 seconds to the time. diff --git a/kstars/kstars/kspopupmenu.h b/kstars/kstars/kspopupmenu.h index a91d8307..ebf34842 100644 --- a/kstars/kstars/kspopupmenu.h +++ b/kstars/kstars/kspopupmenu.h @@ -41,7 +41,7 @@ class KSPopupMenu : public KPopupMenu Q_OBJECT public: /**Default constructor*/ - KSPopupMenu( QWidget *parent = 0, const char *name = 0 ); + KSPopupMenu( TQWidget *parent = 0, const char *name = 0 ); /**Destructor (empty)*/ ~KSPopupMenu(); @@ -62,7 +62,7 @@ public: *@param showAngularDistance if true, the Angular Distance item is added. *@param showObsList if true, the Add to List/Remove from List item is added. */ - void initPopupMenu( SkyObject *obj, QString name1, QString name2, QString type, + void initPopupMenu( SkyObject *obj, TQString name1, TQString name2, TQString type, bool showRiseSet=true, bool showCenterTrack=true, bool showDetails=true, bool showTrail=false, bool addTrail=false, bool showAngularDistance=true, @@ -150,8 +150,8 @@ public: private: KStars *ksw; - QLabel *pmTitle, *pmTitle2, *pmType, *pmConstellation; - QLabel *pmRiseTime, *pmSetTime, *pmTransitTime; + TQLabel *pmTitle, *pmTitle2, *pmType, *pmConstellation; + TQLabel *pmRiseTime, *pmSetTime, *pmTransitTime; }; diff --git a/kstars/kstars/kssun.cpp b/kstars/kstars/kssun.cpp index ce3a60d1..5df14c59 100644 --- a/kstars/kstars/kssun.cpp +++ b/kstars/kstars/kssun.cpp @@ -16,14 +16,14 @@ ***************************************************************************/ #include <math.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include "kssun.h" #include "ksutils.h" #include "ksnumbers.h" #include "kstarsdatetime.h" -KSSun::KSSun( KStarsData *kd, QString fn, double pSize ) : KSPlanet( kd, I18N_NOOP( "Sun" ), fn, pSize ) { +KSSun::KSSun( KStarsData *kd, TQString fn, double pSize ) : KSPlanet( kd, I18N_NOOP( "Sun" ), fn, pSize ) { /* JD0 = 2447892.5; //Jan 1, 1990 eclong0 = 279.403303; //mean ecliptic longitude at JD0 @@ -156,7 +156,7 @@ long double KSSun::equinox(int year, int d, int m, double angle) { long double eclipticLongitude[5]; for(int i = 0; i<5; ++i) { - jd0[i] = KStarsDateTime( ExtDate(year,m,d+i), QTime(0,0,0) ).djd(); + jd0[i] = KStarsDateTime( ExtDate(year,m,d+i), TQTime(0,0,0) ).djd(); KSNumbers *ksn = new KSNumbers(jd0[i]); //FIXME this is the Earth position findGeocentricPosition( ksn ); diff --git a/kstars/kstars/kssun.h b/kstars/kstars/kssun.h index ed5a3023..76b79143 100644 --- a/kstars/kstars/kssun.h +++ b/kstars/kstars/kssun.h @@ -18,7 +18,7 @@ #ifndef KSSUN_H #define KSSUN_H -#include <qstring.h> +#include <tqstring.h> #include "ksplanet.h" /**@class KSSun @@ -38,7 +38,7 @@ public: *@param fn filename of Sun image *@param pSize physical diameter of the Sun, in km */ - KSSun(KStarsData *kd, QString fn = "", double pSize=0 ); + KSSun(KStarsData *kd, TQString fn = "", double pSize=0 ); /**Destructor (empty) */ diff --git a/kstars/kstars/kstars.cpp b/kstars/kstars/kstars.cpp index 8be622e5..b18f65fe 100644 --- a/kstars/kstars/kstars.cpp +++ b/kstars/kstars/kstars.cpp @@ -26,7 +26,7 @@ #include <kdebug.h> #include <kactioncollection.h> #include <kiconloader.h> -#include <qpalette.h> +#include <tqpalette.h> #include <kstatusbar.h> #include "Options.h" @@ -46,7 +46,7 @@ #include "indimenu.h" #include "indidriver.h" -KStars::KStars( bool doSplash, bool clockrun, const QString &startdate ) : +KStars::KStars( bool doSplash, bool clockrun, const TQString &startdate ) : DCOPObject("KStarsInterface"), KMainWindow(), skymap(0), centralWidget(0), topLayout(0), viewToolBar(0), TimeStep(0), actCoordSys(0), colorActionMenu(0), fovActionMenu(0), @@ -61,13 +61,13 @@ KStars::KStars( bool doSplash, bool clockrun, const QString &startdate ) : if ( doSplash ) { pd->kstarsData = new KStarsData(); - QObject::connect(pd->kstarsData, SIGNAL( initFinished(bool) ), - this, SLOT( datainitFinished(bool) ) ); + TQObject::connect(pd->kstarsData, TQT_SIGNAL( initFinished(bool) ), + this, TQT_SLOT( datainitFinished(bool) ) ); pd->splash = new KStarsSplash(0, "Splash"); - QObject::connect(pd->splash, SIGNAL( closeWindow() ), kapp, SLOT( quit() ) ); - QObject::connect(pd->kstarsData, SIGNAL( progressText(QString) ), - pd->splash, SLOT( setMessage(QString) )); + TQObject::connect(pd->splash, TQT_SIGNAL( closeWindow() ), kapp, TQT_SLOT( quit() ) ); + TQObject::connect(pd->kstarsData, TQT_SIGNAL( progressText(TQString) ), + pd->splash, TQT_SLOT( setMessage(TQString) )); pd->splash->show(); } @@ -80,13 +80,13 @@ KStars::KStars( bool doSplash, bool clockrun, const QString &startdate ) : if ( ! StartClockRunning ) pd->kstarsData->clock()->stop(); //set up Dark color scheme for application windows - DarkPalette = QPalette(QColor("red4"), QColor("DarkRed")); - DarkPalette.setColor( QPalette::Normal, QColorGroup::Base, QColor( "black" ) ); - DarkPalette.setColor( QPalette::Normal, QColorGroup::Text, QColor( "red2" ) ); - DarkPalette.setColor( QPalette::Normal, QColorGroup::Highlight, QColor( "red2" ) ); - DarkPalette.setColor( QPalette::Normal, QColorGroup::HighlightedText, QColor( "black" ) ); + DarkPalette = TQPalette(TQColor("red4"), TQColor("DarkRed")); + DarkPalette.setColor( TQPalette::Normal, TQColorGroup::Base, TQColor( "black" ) ); + DarkPalette.setColor( TQPalette::Normal, TQColorGroup::Text, TQColor( "red2" ) ); + DarkPalette.setColor( TQPalette::Normal, TQColorGroup::Highlight, TQColor( "red2" ) ); + DarkPalette.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, TQColor( "black" ) ); //store original color scheme - OriginalPalette = QApplication::palette(); + OriginalPalette = TQApplication::palette(); #if ( __GLIBC__ >= 2 &&__GLIBC_MINOR__ >= 1 && !defined(__UCLIBC__)) kdDebug() << "glibc >= 2.1 detected. Using GNU extension sincos()" << endl; @@ -184,9 +184,9 @@ void KStars::applyConfig() { //color scheme pd->kstarsData->colorScheme()->loadFromConfig( kapp->config() ); if ( Options::darkAppColors() ) { - QApplication::setPalette( DarkPalette, true ); + TQApplication::setPalette( DarkPalette, true ); } else { - QApplication::setPalette( OriginalPalette, true ); + TQApplication::setPalette( OriginalPalette, true ); } //Infoboxes, toolbars, statusbars @@ -243,7 +243,7 @@ void KStars::updateTime( const bool automaticDSTchange ) { //Wrap the call to manualTick() in a singleshot timer so that it doesn't get called until //the skymap has been completely updated. if ( Data->clock()->isManualMode() && Data->clock()->isActive() ) { - QTimer::singleShot( 0, Data->clock(), SLOT( manualTick() ) ); + TQTimer::singleShot( 0, Data->clock(), TQT_SLOT( manualTick() ) ); } } @@ -255,7 +255,7 @@ InfoBoxes* KStars::infoBoxes( void ) { return map()->infoBoxes(); } GeoLocation* KStars::geo() { return data()->geo(); } -void KStars::mapGetsFocus() { map()->QWidget::setFocus(); } +void KStars::mapGetsFocus() { map()->TQWidget::setFocus(); } dms* KStars::LST() { return data()->LST; } diff --git a/kstars/kstars/kstars.h b/kstars/kstars/kstars.h index 88b7ab2c..34957208 100644 --- a/kstars/kstars/kstars.h +++ b/kstars/kstars/kstars.h @@ -24,7 +24,7 @@ #include <dcopclient.h> #include <kapplication.h> #include <kmainwindow.h> -#include <qwidget.h> +#include <tqwidget.h> #include "kstarsinterface.h" #include "observinglist.h" @@ -78,7 +78,7 @@ class KStars : public KMainWindow, virtual public KStarsInterface * * @todo Refer to documentation on date format. */ - KStars( bool doSplash, bool startClockRunning = true, const QString &startDateString = "" ); + KStars( bool doSplash, bool startClockRunning = true, const TQString &startDateString = "" ); /**Destructor. Synchs config file. Deletes objects. */ @@ -122,12 +122,12 @@ class KStars : public KMainWindow, virtual public KStarsInterface *@param name The name to use in the menu *@param actionName The internal name for the action (derived from filename) */ - void addColorMenuItem( QString name, QString actionName ); + void addColorMenuItem( TQString name, TQString actionName ); /**Remove an item from the color-scheme action manu *@param actionName The internal name of the action (derived from filename) */ - void removeColorMenuItem( QString actionName ); + void removeColorMenuItem( TQString actionName ); /**DCOP interface function. *Set focus to given Ra/Dec coordinates @@ -147,7 +147,7 @@ class KStars : public KMainWindow, virtual public KStarsInterface *Point in the direction described by the string argument. *@p direction either an object name, a compass direction (e.g., "north"), or "zenith" */ - ASYNC lookTowards( const QString direction ); + ASYNC lookTowards( const TQString direction ); /**DCOP interface function. Zoom in one step. */ ASYNC zoomIn(void) { slotZoomIn(); } @@ -181,7 +181,7 @@ class KStars : public KMainWindow, virtual public KStarsInterface /**DCOP interface function. Pause further DCOP execution until a key is pressed. *@p k the key which will resume DCOP execution */ - ASYNC waitForKey( const QString k ); + ASYNC waitForKey( const TQString k ); /**DCOP interface function. Toggle tracking. *@p track engage tracking if true; else disengage tracking @@ -192,13 +192,13 @@ class KStars : public KMainWindow, virtual public KStarsInterface *@p option the name of the option to be modified *@p value the option's new value */ - ASYNC changeViewOption( const QString option, const QString value ); + ASYNC changeViewOption( const TQString option, const TQString value ); /**DCOP interface function. *@p name the name of the option to query *@return the current value of the named option */ - QString getOption( const QString &name ); + TQString getOption( const TQString &name ); /**DCOP interface function. Read config file. *This function is useful for restoring the user settings from the config file, @@ -220,7 +220,7 @@ class KStars : public KMainWindow, virtual public KStarsInterface *@p y y-coordinate for message window *@p message the text to display in the message window */ - ASYNC popupMessage( int x, int y, const QString message ); + ASYNC popupMessage( int x, int y, const TQString message ); /**DCOP interface function. Draw a line on the sky map. *@note Not Yet Implemented @@ -237,25 +237,25 @@ class KStars : public KMainWindow, virtual public KStarsInterface *@p province the province name of the location *@p country the country name of the location */ - ASYNC setGeoLocation( const QString city, const QString province, const QString country ); + ASYNC setGeoLocation( const TQString city, const TQString province, const TQString country ); /**DCOP interface function. Modify a color. *@p colorName the name of the color to be modified (e.g., "SkyColor") *@p value the new color to use */ - ASYNC setColor( const QString colorName, const QString value ); + ASYNC setColor( const TQString colorName, const TQString value ); /**DCOP interface function. Load a color scheme. *@p name the name of the color scheme to load (e.g., "Moonless Night") */ - ASYNC loadColorScheme( const QString name ); + ASYNC loadColorScheme( const TQString name ); /**DCOP interface function. Export the sky image to a file. *@p filename the filename for the exported image *@p width the width for the exported image *@p height the height for the exported image */ - ASYNC exportImage( const QString filename, int width, int height ); + ASYNC exportImage( const TQString filename, int width, int height ); /**DCOP interface function. Print the sky image. *@p usePrintDialog if true, the KDE print dialog will be shown; otherwise, default parameters will be used @@ -267,110 +267,110 @@ class KStars : public KMainWindow, virtual public KStarsInterface *@p driverName the name of the driver to be established *@p useLocal establish driver locally? */ - ASYNC startINDI (QString driverName, bool useLocal); + ASYNC startINDI (TQString driverName, bool useLocal); /**DCOP interface function. Shutdown an INDI driver. *@p driverName the name of the driver to be shut down */ - ASYNC shutdownINDI (QString driverName); + ASYNC shutdownINDI (TQString driverName); /**DCOP interface function. Turn INDI driver on/off. *@p driverName the name of the driver to be switched on/off *@p turnOn if true, turn driver on; otherwise turn off */ - ASYNC switchINDI(QString driverName, bool turnOn); + ASYNC switchINDI(TQString driverName, bool turnOn); /**DCOP interface function. Set INDI connection port. *@p driverName the name of the driver for which the port will be set *@p port the port identifier */ - ASYNC setINDIPort(QString driverName, QString port); + ASYNC setINDIPort(TQString driverName, TQString port); /**DCOP interface function. Set INDI target RA/DEC coordinates *@p driverName the name of the driver *@p RA the target's Right Ascension coordinate (in Hours) *@p DEC the target's Declination coordinate (in Degrees) */ - ASYNC setINDITargetCoord(QString driverName, double RA, double DEC); + ASYNC setINDITargetCoord(TQString driverName, double RA, double DEC); /**DCOP interface function. Set INDI target to a named object. *@p driverName the name of the driver *@p objectName the name of the object to be targeted */ - ASYNC setINDITargetName(QString driverName, QString objectName); + ASYNC setINDITargetName(TQString driverName, TQString objectName); /**DCOP interface function. Set INDI action. *@p driverName the name of the driver *@p action the action to set */ - ASYNC setINDIAction(QString driverName, QString action); + ASYNC setINDIAction(TQString driverName, TQString action); /**DCOP interface function. Pause DCOP execution until named INDI action is completed. *@p driverName the name of the driver *@p action the action which is to be completed before resuming DCOP execution */ - ASYNC waitForINDIAction(QString driverName, QString action); + ASYNC waitForINDIAction(TQString driverName, TQString action); /**DCOP interface function. Set INDI focus speed. *@p driverName the name of the driver *@p action the name of the action (??) */ - ASYNC setINDIFocusSpeed(QString driverName,unsigned int speed); + ASYNC setINDIFocusSpeed(TQString driverName,unsigned int speed); /**DCOP interface function. Set INDI focus direction and focus. *@p driverName the name of the driver *@p focusDir 0 = focus in; 1 = focus out */ - ASYNC startINDIFocus(QString driverName, int focusDir); + ASYNC startINDIFocus(TQString driverName, int focusDir); /**DCOP interface function. Set INDI geographical information. *@p driverName the name of the driver *@p longitude the longitude to set, in Degrees *@p latitude the latitude to set, in Degrees */ - ASYNC setINDIGeoLocation(QString driverName, double longitude, double latitude); + ASYNC setINDIGeoLocation(TQString driverName, double longitude, double latitude); /**DCOP interface function. Sets focus operation timeout. *@p driverName the name of the driver *@p timeout the timeout interval, in seconds (?) */ - ASYNC setINDIFocusTimeout(QString driverName, int timeout); + ASYNC setINDIFocusTimeout(TQString driverName, int timeout); /**DCOP interface function. Start camera exposure with a timeout. *@p driverName the name of the driver *@p timeout the exposure time, in seconds (?) */ - ASYNC startINDIExposure(QString driverName, int timeout); + ASYNC startINDIExposure(TQString driverName, int timeout); /**DCOP interface function. Set INDI UTC date and time. *@p driverName the name of the driver *@p UTCDateTime the UTC date and time (e.g., "23 June 2004 12:30:00" ?) */ - ASYNC setINDIUTC(QString driverName, QString UTCDateTime); + ASYNC setINDIUTC(TQString driverName, TQString UTCDateTime); /**DCOP interface function. Set INDI Telescope action. *@p deviceName the name of the telescope device *@p action the action to set */ - ASYNC setINDIScopeAction(QString deviceName, QString action); + ASYNC setINDIScopeAction(TQString deviceName, TQString action); /**DCOP interface function. Set CCD camera frame type. *@p deviceName the name of the CCD device *@p type the frame type */ - ASYNC setINDIFrameType(QString deviceName, QString type); + ASYNC setINDIFrameType(TQString deviceName, TQString type); /**DCOP interface function. Set CCD filter. *@p deviceName the name of the CCD device *@p filter_num identifier of the CCD filter */ - ASYNC setINDIFilterNum(QString deviceName, int filter_num); + ASYNC setINDIFilterNum(TQString deviceName, int filter_num); /**DCOP interface function. Set CCD target temperature. *@p deviceName the name of the CCD device *@p temp the target CCD temperature (in Celsius ?) */ - ASYNC setINDICCDTemp(QString deviceName, int temp); + ASYNC setINDICCDTemp(TQString deviceName, int temp); /**@short Apply config options throughout the program. @@ -630,8 +630,8 @@ class KStars : public KMainWindow, virtual public KStarsInterface SkyMap *skymap; - QWidget *centralWidget; - QVBoxLayout *topLayout; + TQWidget *centralWidget; + TQVBoxLayout *topLayout; KToolBar *viewToolBar; TimeStepBox *TimeStep; @@ -651,9 +651,9 @@ class KStars : public KMainWindow, virtual public KStarsInterface int idSpinBox; bool DialogIsObsolete; bool StartClockRunning; - QString StartDateString; + TQString StartDateString; - QPalette OriginalPalette, DarkPalette; + TQPalette OriginalPalette, DarkPalette; class privatedata; friend class privatedata; diff --git a/kstars/kstars/kstarsactions.cpp b/kstars/kstars/kstarsactions.cpp index b31e616c..c370d55e 100644 --- a/kstars/kstars/kstarsactions.cpp +++ b/kstars/kstars/kstarsactions.cpp @@ -35,8 +35,8 @@ #include <kpopupmenu.h> #include <kstatusbar.h> #include <kprocess.h> -#include <qcheckbox.h> -#include <qdir.h> +#include <tqcheckbox.h> +#include <tqdir.h> #include <kdeversion.h> //FIXME GLSOSSARY (uncomment these when content is added) //#include <libkdeedu/kdeeduui/kdeeduglossary.h> @@ -93,23 +93,23 @@ void KStars::slotViewToolBar() { - if ( sender()->name() == QString( "show_stars" ) ) { + if ( sender()->name() == TQString( "show_stars" ) ) { Options::setShowStars( !Options::showStars() ); - } else if ( sender()->name() == QString( "show_deepsky" ) ) { + } else if ( sender()->name() == TQString( "show_deepsky" ) ) { Options::setShowDeepSky( ! Options::showDeepSky() ); - } else if ( sender()->name() == QString( "show_planets" ) ) { + } else if ( sender()->name() == TQString( "show_planets" ) ) { Options::setShowPlanets( ! Options::showPlanets() ); - } else if ( sender()->name() == QString( "show_clines" ) ) { + } else if ( sender()->name() == TQString( "show_clines" ) ) { Options::setShowCLines( !Options::showCLines() ); - } else if ( sender()->name() == QString( "show_cnames" ) ) { + } else if ( sender()->name() == TQString( "show_cnames" ) ) { Options::setShowCNames( !Options::showCNames() ); - } else if ( sender()->name() == QString( "show_cbounds" ) ) { + } else if ( sender()->name() == TQString( "show_cbounds" ) ) { Options::setShowCBounds( !Options::showCBounds() ); - } else if ( sender()->name() == QString( "show_mw" ) ) { + } else if ( sender()->name() == TQString( "show_mw" ) ) { Options::setShowMilkyWay( !Options::showMilkyWay() ); - } else if ( sender()->name() == QString( "show_grid" ) ) { + } else if ( sender()->name() == TQString( "show_grid" ) ) { Options::setShowGrid( !Options::showGrid() ); - } else if ( sender()->name() == QString( "show_horizon" ) ) { + } else if ( sender()->name() == TQString( "show_horizon" ) ) { Options::setShowGround( !Options::showGround() ); } @@ -130,7 +130,7 @@ void KStars::slotCalculator() { void KStars::slotWizard() { KSWizard wizard(this); - if ( wizard.exec() == QDialog::Accepted ) { + if ( wizard.exec() == TQDialog::Accepted ) { Options::setRunStartupWizard( false ); //don't run on startup next time data()->setLocation( wizard.geo() ); @@ -199,7 +199,7 @@ void KStars::slotWUT() { //FIXME GLOSSARY // void KStars::slotGlossary(){ // GlossaryDialog *dlg = new GlossaryDialog( true, this, "glossary" ); -// QString glossaryfile =data()->stdDirs->findResource( "data", "kstars/glossary.xml" ); +// TQString glossaryfile =data()->stdDirs->findResource( "data", "kstars/glossary.xml" ); // KURL u = glossaryfile; // Glossary *g = Glossary::readFromXML( u ); // g->setName( i18n( "Knowledge" ) ); @@ -262,7 +262,7 @@ void KStars::slotINDIConf() { INDIFITSConf indioptions(this); indioptions.loadOptions(); - /*QStringList filterList; + /*TQStringList filterList; indiconf.timeCheck->setChecked( Options::indiAutoTime() ); @@ -275,7 +275,7 @@ void KStars::slotINDIConf() { if (Options::fitsSaveDirectory().isEmpty()) { - indiconf.fitsDIR_IN->setText (QDir:: homeDirPath()); + indiconf.fitsDIR_IN->setText (TQDir:: homeDirPath()); Options::setFitsSaveDirectory( indiconf.fitsDIR_IN->text()); } else @@ -288,7 +288,7 @@ void KStars::slotINDIConf() { indiconf.filterCombo->insertStringList(filterList); }*/ - if (indioptions.exec() == QDialog::Accepted) + if (indioptions.exec() == TQDialog::Accepted) { /*Options::setIndiAutoTime( indiconf.timeCheck->isChecked() ); Options::setIndiAutoGeo( indiconf.GeoCheck->isChecked() ); @@ -306,7 +306,7 @@ void KStars::slotINDIConf() { void KStars::slotGeoLocator() { LocationDialog locationdialog (this); - if ( locationdialog.exec() == QDialog::Accepted ) { + if ( locationdialog.exec() == TQDialog::Accepted ) { GeoLocation *newLocation = locationdialog.selectedCity(); if ( newLocation ) { // set new location in options @@ -356,8 +356,8 @@ void KStars::slotViewOps() { KConfigDialog* dialog = new KConfigDialog( this, "settings", Options::self() ); - connect( dialog, SIGNAL( applyClicked() ), this, SLOT( slotApplySettings() ) ); - connect( dialog, SIGNAL( okClicked() ), this, SLOT( slotApplySettings() ) ); + connect( dialog, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApplySettings() ) ); + connect( dialog, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotApplySettings() ) ); OpsCatalog *opcatalog = new OpsCatalog( this, "catalogs" ); OpsGuides *opguides = new OpsGuides( this, "guides" ); @@ -384,7 +384,7 @@ void KStars::slotApplyConfigChanges() { void KStars::slotSetTime() { TimeDialog timedialog ( data()->lt(), this ); - if ( timedialog.exec() == QDialog::Accepted ) { + if ( timedialog.exec() == TQDialog::Accepted ) { data()->changeDateTime( geo()->LTtoUT( timedialog.selectedDateTime() ) ); if ( Options::useAltAz() ) { @@ -408,7 +408,7 @@ void KStars::slotFind() { if ( !findDialog ) kdWarning() << i18n( "KStars::slotFind() - Not enough memory for dialog" ) << endl; - if ( findDialog->exec() == QDialog::Accepted && findDialog->currentItem() ) { + if ( findDialog->exec() == TQDialog::Accepted && findDialog->currentItem() ) { map()->setClickedObject( findDialog->currentItem()->objName()->skyObject() ); map()->setClickedPoint( map()->clickedObject() ); map()->slotCenter(); @@ -434,7 +434,7 @@ void KStars::closeWindow() { void KStars::slotOpenFITS() { - KURL fileURL = KFileDialog::getOpenURL( QDir::homeDirPath(), "*.fits *.fit *.fts|Flexible Image Transport System"); + KURL fileURL = KFileDialog::getOpenURL( TQDir::homeDirPath(), "*.fits *.fit *.fts|Flexible Image Transport System"); if (fileURL.isEmpty()) return; @@ -445,12 +445,12 @@ void KStars::slotOpenFITS() } void KStars::slotExportImage() { - KURL fileURL = KFileDialog::getSaveURL( QDir::homeDirPath(), "image/png image/jpeg image/gif image/x-portable-pixmap image/x-bmp" ); + KURL fileURL = KFileDialog::getSaveURL( TQDir::homeDirPath(), "image/png image/jpeg image/gif image/x-portable-pixmap image/x-bmp" ); //Warn user if file exists! - if (QFile::exists(fileURL.path())) + if (TQFile::exists(fileURL.path())) { - int r=KMessageBox::warningContinueCancel(static_cast<QWidget *>(parent()), + int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()), i18n( "A file named \"%1\" already exists. " "Overwrite it?" ).arg(fileURL.fileName()), i18n( "Overwrite File?" ), @@ -463,14 +463,14 @@ void KStars::slotExportImage() { } void KStars::slotRunScript() { - KURL fileURL = KFileDialog::getOpenURL( QDir::homeDirPath(), "*.kstars|KStars Scripts (*.kstars)" ); - QFile f; - QString fname; + KURL fileURL = KFileDialog::getOpenURL( TQDir::homeDirPath(), "*.kstars|KStars Scripts (*.kstars)" ); + TQFile f; + TQString fname; if ( fileURL.isValid() ) { if ( ! fileURL.isLocalFile() ) { //Warn the user about executing remote code. - QString message = i18n( "Warning: You are about to execute a remote shell script on your machine. " ); + TQString message = i18n( "Warning: You are about to execute a remote shell script on your machine. " ); message += i18n( "If you absolutely trust the source of this script, press Continue to execute the script; " ); message += i18n( "to save the file without executing it, press Save; " ); message += i18n( "to cancel the download, press Cancel. " ); @@ -480,14 +480,14 @@ void KStars::slotRunScript() { if ( result == KMessageBox::Cancel ) return; if ( result == KMessageBox::No ) { //save file - KURL saveURL = KFileDialog::getSaveURL( QDir::homeDirPath(), "*.kstars|KStars Scripts (*.kstars)" ); + KURL saveURL = KFileDialog::getSaveURL( TQDir::homeDirPath(), "*.kstars|KStars Scripts (*.kstars)" ); KTempFile tmpfile; tmpfile.setAutoDelete(true); while ( ! saveURL.isValid() ) { message = i18n( "Save location is invalid. Try another location?" ); if ( KMessageBox::warningYesNo( 0, message, i18n( "Invalid Save Location" ), i18n("Try Another"), i18n("Do Not Try") ) == KMessageBox::No ) return; - saveURL = KFileDialog::getSaveURL( QDir::homeDirPath(), "*.kstars|KStars Scripts (*.kstars)" ); + saveURL = KFileDialog::getSaveURL( TQDir::homeDirPath(), "*.kstars|KStars Scripts (*.kstars)" ); } if ( saveURL.isLocalFile() ) { @@ -501,7 +501,7 @@ void KStars::slotRunScript() { if ( tmpfile.name() == fname ) { //upload to remote location if ( ! KIO::NetAccess::upload( tmpfile.name(), fileURL, this ) ) { - QString message = i18n( "Could not upload image to remote location: %1" ).arg( fileURL.prettyURL() ); + TQString message = i18n( "Could not upload image to remote location: %1" ).arg( fileURL.prettyURL() ); KMessageBox::sorry( 0, message, i18n( "Could not upload file" ) ); } } @@ -528,7 +528,7 @@ void KStars::slotRunScript() { } if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1" ).arg( f.name() ); + TQString message = i18n( "Could not open file %1" ).arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return; } @@ -536,8 +536,8 @@ void KStars::slotRunScript() { // Before we run the script, make sure that it's safe. Each line must either begin with "#" // or begin with "dcop $KSTARS". Otherwise, the line must be equal to one of the following: // "KSTARS=`dcopfind -a 'kstars*'`"; "MAIN=KStarsInterface"; or "CLOCK=clock#1" - QTextStream istream(&f); - QString line; + TQTextStream istream(&f); + TQString line; bool fileOK( true ); while ( ! istream.eof() ) { @@ -578,7 +578,7 @@ void KStars::slotPrint() { //Suggest Chart color scheme if ( data()->colorScheme()->colorNamed( "SkyColor" ) != "#FFFFFF" ) { - QString message = i18n( "You can save printer ink by using the \"Star Chart\" " + TQString message = i18n( "You can save printer ink by using the \"Star Chart\" " "color scheme, which uses a white background. Would you like to " "temporarily switch to the Star Chart color scheme for printing?" ); @@ -623,7 +623,7 @@ void KStars::slotToggleTimer() { //Focus void KStars::slotPointFocus() { - QString sentFrom( sender()->name() ); + TQString sentFrom( sender()->name() ); if ( sentFrom == "zenith" ) map()->invokeKey( KKey( "Z" ).keyCodeQt() ); @@ -667,7 +667,7 @@ void KStars::slotManualFocus() { FocusDialog focusDialog( this ); // = new FocusDialog( this ); if ( Options::useAltAz() ) focusDialog.activateAzAltPage(); - if ( focusDialog.exec() == QDialog::Accepted ) { + if ( focusDialog.exec() == TQDialog::Accepted ) { //If the requested position is very near the pole, we need to point first //to an intermediate location just below the pole in order to get the longitudinal //position (RA/Az) right. @@ -813,12 +813,12 @@ void KStars::slotCoordSys() { //Settings Menu: void KStars::slotColorScheme() { //use mid(3) to exclude the leading "cs_" prefix from the action name - QString filename = QString( sender()->name() ).mid(3) + ".colors"; + TQString filename = TQString( sender()->name() ).mid(3) + ".colors"; loadColorScheme( filename ); } void KStars::slotTargetSymbol() { - QString symbolName( sender()->name() ); + TQString symbolName( sender()->name() ); FOV f( symbolName ); //read data from fov.dat Options::setFOVName( f.name() ); @@ -839,9 +839,9 @@ void KStars::slotTargetSymbol() { void KStars::slotFOVEdit() { FOVDialog fovdlg( this ); - if ( fovdlg.exec() == QDialog::Accepted ) { + if ( fovdlg.exec() == TQDialog::Accepted ) { //replace existing fov.dat with data from the FOVDialog - QFile f; + TQFile f; f.setName( locateLocal( "appdata", "fov.dat" ) ); //rebuild fov.dat if FOVList is empty @@ -852,11 +852,11 @@ void KStars::slotFOVEdit() { if ( ! f.open( IO_WriteOnly ) ) { kdDebug() << i18n( "Could not open fov.dat for writing." ) << endl; } else { - QTextStream ostream(&f); + TQTextStream ostream(&f); for ( FOV *fov = fovdlg.FOVList.first(); fov; fov = fovdlg.FOVList.next() ) ostream << fov->name() << ":" << fov->size() - << ":" << QString("%1").arg( fov->shape() ) << ":" << fov->color() << endl; + << ":" << TQString("%1").arg( fov->shape() ) << ":" << fov->color() << endl; f.close(); } @@ -866,14 +866,14 @@ void KStars::slotFOVEdit() { fovActionMenu->popupMenu()->clear(); if ( f.open( IO_ReadOnly ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { - QString line = stream.readLine(); - QStringList fields = QStringList::split( ":", line ); + TQString line = stream.readLine(); + TQStringList fields = TQStringList::split( ":", line ); if ( fields.count() == 4 ) { - QString nm = fields[0].stripWhiteSpace(); - KToggleAction *kta = new KToggleAction( nm, 0, this, SLOT( slotTargetSymbol() ), + TQString nm = fields[0].stripWhiteSpace(); + KToggleAction *kta = new KToggleAction( nm, 0, this, TQT_SLOT( slotTargetSymbol() ), actionCollection(), nm.utf8() ); kta->setExclusiveGroup( "fovsymbol" ); fovActionMenu->insert( kta ); @@ -885,7 +885,7 @@ void KStars::slotFOVEdit() { fovActionMenu->popupMenu()->insertSeparator(); fovActionMenu->insert( new KAction( i18n( "Edit FOV Symbols..." ), 0, this, - SLOT( slotFOVEdit() ), actionCollection(), "edit_fov" ) ); + TQT_SLOT( slotFOVEdit() ), actionCollection(), "edit_fov" ) ); //set FOV to whatever was highlighted in FOV dialog if ( fovdlg.FOVList.count() > 0 ) { @@ -955,31 +955,31 @@ void KStars::slotClearAllTrails() { //toggle display of GUI Items on/off void KStars::slotShowGUIItem( bool show ) { //Toolbars - if ( sender()->name() == QString( "show_mainToolBar" ) ) { + if ( sender()->name() == TQString( "show_mainToolBar" ) ) { Options::setShowMainToolBar( show ); if ( show ) toolBar( "mainToolBar" )->show(); else toolBar( "mainToolBar" )->hide(); } - if ( sender()->name() == QString( "show_viewToolBar" ) ) { + if ( sender()->name() == TQString( "show_viewToolBar" ) ) { Options::setShowViewToolBar( show ); if ( show ) toolBar( "viewToolBar" )->show(); else toolBar( "viewToolBar" )->hide(); } - if ( sender()->name() == QString( "show_statusBar" ) ) { + if ( sender()->name() == TQString( "show_statusBar" ) ) { Options::setShowStatusBar( show ); if ( show ) statusBar()->show(); else statusBar()->hide(); } - if ( sender()->name() == QString( "show_sbAzAlt" ) ) { + if ( sender()->name() == TQString( "show_sbAzAlt" ) ) { Options::setShowAltAzField( show ); if ( show ) { //To preserve the order (AzAlt before RADec), we have to remove //the RADec field and then add both back. if ( Options::showRADecField() ) statusBar()->removeItem( 2 ); - QString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width + TQString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width statusBar()->insertFixedItem( s, 1, true ); statusBar()->setItemAlignment( 1, AlignRight | AlignVCenter ); statusBar()->changeItem( "", 1 ); @@ -994,10 +994,10 @@ void KStars::slotShowGUIItem( bool show ) { } } - if ( sender()->name() == QString( "show_sbRADec" ) ) { + if ( sender()->name() == TQString( "show_sbRADec" ) ) { Options::setShowRADecField( show ); if ( show ) { - QString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width + TQString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width statusBar()->insertFixedItem( s, 2, true ); statusBar()->setItemAlignment( 2, AlignRight | AlignVCenter ); statusBar()->changeItem( "", 2 ); @@ -1008,22 +1008,22 @@ void KStars::slotShowGUIItem( bool show ) { //InfoBoxes: we only change options here; these are also connected to slots in //InfoBoxes that actually toggle the display. - if ( sender()->name() == QString( "show_boxes" ) ) + if ( sender()->name() == TQString( "show_boxes" ) ) Options::setShowInfoBoxes( show ); - if ( sender()->name() == QString( "show_time_box" ) ) + if ( sender()->name() == TQString( "show_time_box" ) ) Options::setShowTimeBox( show ); - if ( sender()->name() == QString( "show_location_box" ) ) + if ( sender()->name() == TQString( "show_location_box" ) ) Options::setShowGeoBox( show ); - if ( sender()->name() == QString( "show_focus_box" ) ) + if ( sender()->name() == TQString( "show_focus_box" ) ) Options::setShowFocusBox( show ); } -void KStars::addColorMenuItem( QString name, QString actionName ) { +void KStars::addColorMenuItem( TQString name, TQString actionName ) { colorActionMenu->insert( new KAction( name, 0, - this, SLOT( slotColorScheme() ), actionCollection(), actionName.local8Bit() ) ); + this, TQT_SLOT( slotColorScheme() ), actionCollection(), actionName.local8Bit() ) ); } -void KStars::removeColorMenuItem( QString actionName ) { +void KStars::removeColorMenuItem( TQString actionName ) { kdDebug() << "removing " << actionName << endl; colorActionMenu->remove( actionCollection()->action( actionName.local8Bit() ) ); } diff --git a/kstars/kstars/kstarsdata.cpp b/kstars/kstars/kstarsdata.cpp index 8404e538..5863d449 100644 --- a/kstars/kstars/kstarsdata.cpp +++ b/kstars/kstars/kstarsdata.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qregexp.h> -#include <qdir.h> -#include <qfile.h> +#include <tqregexp.h> +#include <tqdir.h> +#include <tqfile.h> #include <kapplication.h> #include <kmessagebox.h> @@ -55,9 +55,9 @@ #include "csegment.h" #include "customcatalog.h" -QPtrList<GeoLocation> KStarsData::geoList = QPtrList<GeoLocation>(); -QMap<QString, TimeZoneRule> KStarsData::Rulebook = QMap<QString, TimeZoneRule>(); -QStringList KStarsData::CustomColumns = QStringList::split( " ", "ID RA Dc Tp Nm Mg Mj Mn PA Ig" ); +TQPtrList<GeoLocation> KStarsData::geoList = TQPtrList<GeoLocation>(); +TQMap<TQString, TimeZoneRule> KStarsData::Rulebook = TQMap<TQString, TimeZoneRule>(); +TQStringList KStarsData::CustomColumns = TQStringList::split( " ", "ID RA Dc Tp Nm Mg Mj Mn PA Ig" ); int KStarsData::objects = 0; KStarsData::KStarsData() : stdDirs(0), locale(0), @@ -75,8 +75,8 @@ KStarsData::KStarsData() : stdDirs(0), locale(0), //Check to see if config file already exists. If not, set //useDefaultOptions = true - QString fname = locateLocal( "config", "kstarsrc" ); - useDefaultOptions = ! ( QFile(fname).exists() ); + TQString fname = locateLocal( "config", "kstarsrc" ); + useDefaultOptions = ! ( TQFile(fname).exists() ); //Instantiate LST and HourAngle LST = new dms(); @@ -163,10 +163,10 @@ KStarsData::~KStarsData() { } bool KStarsData::readMWData( void ) { - QFile file; + TQFile file; for ( unsigned int i=0; i<11; ++i ) { - QString snum, fname, szero; + TQString snum, fname, szero; snum = snum.setNum( i+1 ); if ( i+1 < 10 ) szero = "0"; else szero = ""; fname = "mw" + szero + snum + ".dat"; @@ -174,7 +174,7 @@ bool KStarsData::readMWData( void ) { if ( KSUtils::openDataFile( file, fname ) ) { KSFileReader fileReader( file ); // close file is included while ( fileReader.hasMoreLines() ) { - QString line; + TQString line; double ra, dec; line = fileReader.readLine(); @@ -195,18 +195,18 @@ bool KStarsData::readMWData( void ) { bool KStarsData::readADVTreeData(void) { - QFile file; - QString Interface; + TQFile file; + TQString Interface; if (!KSUtils::openDataFile(file, "advinterface.dat")) return false; - QTextStream stream(&file); - QString Line; + TQTextStream stream(&file); + TQString Line; while (!stream.atEnd()) { - QString Name, Link, subName; + TQString Name, Link, subName; int Type, interfaceIndex; Line = stream.readLine(); @@ -236,7 +236,7 @@ bool KStarsData::readADVTreeData(void) subName = Name; interfaceIndex = Link.find("KSINTERFACE"); Link.remove(interfaceIndex, 11); - Link = Link.insert(interfaceIndex, subName.replace( QRegExp(" "), "+")); + Link = Link.insert(interfaceIndex, subName.replace( TQRegExp(" "), "+")); } @@ -260,9 +260,9 @@ bool KStarsData::readADVTreeData(void) bool KStarsData::readVARData(void) { - QString varFile("valaav.txt"); - QFile localeFile; - QFile file; + TQString varFile("valaav.txt"); + TQFile localeFile; + TQFile file; file.setName( locateLocal( "appdata", varFile ) ); if ( !file.open( IO_ReadOnly ) ) @@ -275,8 +275,8 @@ bool KStarsData::readVARData(void) if (localeFile.open(IO_WriteOnly)) { - QTextStream readStream(&file); - QTextStream writeStream(&localeFile); + TQTextStream readStream(&file); + TQTextStream writeStream(&localeFile); writeStream << readStream.read(); localeFile.close(); file.reset(); @@ -287,19 +287,19 @@ bool KStarsData::readVARData(void) } - QTextStream stream(&file); + TQTextStream stream(&file); stream.readLine(); while (!stream.atEnd()) { - QString Name; - QString Designation; - QString Line; + TQString Name; + TQString Designation; + TQString Line; Line = stream.readLine(); - if (Line[0] == QChar('*')) + if (Line[0] == TQChar('*')) break; Designation = Line.mid(0,8).stripWhiteSpace(); @@ -319,9 +319,9 @@ bool KStarsData::readVARData(void) bool KStarsData::readINDIHosts(void) { - QString indiFile("indihosts.xml"); - QFile localeFile; - QFile file; + TQString indiFile("indihosts.xml"); + TQFile localeFile; + TQFile file; char errmsg[1024]; signed char c; LilXML *xmlParser = newLilXML(); @@ -348,7 +348,7 @@ bool KStarsData::readINDIHosts(void) INDIHostsInfo *VInfo = new INDIHostsInfo; - VInfo->name = QString(valuXMLAtt(ap)); + VInfo->name = TQString(valuXMLAtt(ap)); // Get host name ap = findXMLAtt(root, "hostname"); @@ -358,7 +358,7 @@ bool KStarsData::readINDIHosts(void) return false; } - VInfo->hostname = QString(valuXMLAtt(ap)); + VInfo->hostname = TQString(valuXMLAtt(ap)); ap = findXMLAtt(root, "port"); @@ -367,7 +367,7 @@ bool KStarsData::readINDIHosts(void) return false; } - VInfo->portnumber = QString(valuXMLAtt(ap)); + VInfo->portnumber = TQString(valuXMLAtt(ap)); VInfo->isConnected = false; VInfo->mgrID = -1; @@ -394,7 +394,7 @@ bool KStarsData::readCLineData( void ) { //of abbreviated genetive star names in the same format as they //appear in the star data files (hipNNN.dat). // - //Each constellation consists of a QPtrList of SkyPoints, + //Each constellation consists of a TQPtrList of SkyPoints, //corresponding to the stars at each "node" of the constellation. //These are pointers to the starobjects themselves, so the nodes //will automatically be fixed to the stars even as the star @@ -402,13 +402,13 @@ bool KStarsData::readCLineData( void ) { //has a corresponding flag that determines whether a line should //connect this node and the previous one. - QFile file; + TQFile file; if ( KSUtils::openDataFile( file, "clines.dat" ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { - QString line, name; - QChar *mode; + TQString line, name; + TQChar *mode; line = stream.readLine(); @@ -426,7 +426,7 @@ bool KStarsData::readCLineData( void ) { starFound = true; clineList.append( (SkyPoint *)( oname->skyObject() ) ); - mode = new QChar( line.at( 0 ) ); + mode = new TQChar( line.at( 0 ) ); clineModeList.append( mode ); break; } @@ -445,16 +445,16 @@ bool KStarsData::readCLineData( void ) { } bool KStarsData::readCNameData( void ) { - QFile file; + TQFile file; cnameFile = "cnames.dat"; if ( KSUtils::openDataFile( file, cnameFile ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { - QString line, name, abbrev; + TQString line, name, abbrev; int rah, ram, ras, dd, dm, ds; - QChar sgn; + TQChar sgn; line = stream.readLine(); @@ -488,14 +488,14 @@ bool KStarsData::readCNameData( void ) { } bool KStarsData::readCBoundData( void ) { - QFile file; + TQFile file; if ( KSUtils::openDataFile( file, "cbound.dat" ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); unsigned int nn(0); double ra(0.0), dec(0.0); - QString d1, d2; + TQString d1, d2; bool ok(false), comment(false); //read the stream one field at a time. Individual segments can span @@ -564,9 +564,9 @@ bool KStarsData::readCBoundData( void ) { bool KStarsData::openStarFile( int i ) { if (starFileReader != 0) delete starFileReader; - QFile file; - QString snum, fname; - snum = QString().sprintf("%03d", i); + TQFile file; + TQString snum, fname; + snum = TQString().sprintf("%03d", i); fname = "hip" + snum + ".dat"; if (KSUtils::openDataFile(file, fname)) { starFileReader = new KSFileReader(file); // close file is included @@ -588,7 +588,7 @@ bool KStarsData::readStarData( void ) { if (openStarFile(i) == true) { while (starFileReader->hasMoreLines()) { - QString line; + TQString line; float mag; line = starFileReader->readLine(); @@ -619,11 +619,11 @@ bool KStarsData::readStarData( void ) { return true; } -void KStarsData::processStar( QString *line, bool reloadMode ) { - QString name, gname, SpType; +void KStarsData::processStar( TQString *line, bool reloadMode ) { + TQString name, gname, SpType; int rah, ram, ras, ras2, dd, dm, ds, ds2; bool mult, var; - QChar sgn; + TQChar sgn; double mag, bv, dmag, vper; double pmra, pmdec, plx; @@ -703,13 +703,13 @@ void KStarsData::processStar( QString *line, bool reloadMode ) { } bool KStarsData::readAsteroidData( void ) { - QFile file; + TQFile file; if ( KSUtils::openDataFile( file, "asteroids.dat" ) ) { KSFileReader fileReader( file ); while( fileReader.hasMoreLines() ) { - QString line, name; + TQString line, name; int mJD; double a, e, dble_i, dble_w, dble_N, dble_M, H; long double JD; @@ -741,13 +741,13 @@ bool KStarsData::readAsteroidData( void ) { } bool KStarsData::readCometData( void ) { - QFile file; + TQFile file; if ( KSUtils::openDataFile( file, "comets.dat" ) ) { KSFileReader fileReader( file ); while( fileReader.hasMoreLines() ) { - QString line, name; + TQString line, name; int mJD; double q, e, dble_i, dble_w, dble_N, Tp; long double JD; @@ -781,11 +781,11 @@ bool KStarsData::readCometData( void ) { //02/2003: NEW: split data files, using Heiko's new KSFileReader. bool KStarsData::readDeepSkyData( void ) { - QFile file; + TQFile file; for ( unsigned int i=0; i<NNGCFILES; ++i ) { - QString snum, fname; - snum = QString().sprintf( "%02d", i+1 ); + TQString snum, fname; + snum = TQString().sprintf( "%02d", i+1 ); fname = "ngcic" + snum + ".dat"; emit progressText( i18n( "Loading NGC/IC Data (%1%)" ).arg( int(100.*float(i)/float(NNGCFILES)) ) ); @@ -793,12 +793,12 @@ bool KStarsData::readDeepSkyData( void ) { if ( KSUtils::openDataFile( file, fname ) ) { KSFileReader fileReader( file ); // close file is included while ( fileReader.hasMoreLines() ) { - QString line, con, ss, name, name2, longname; - QString cat, cat2; + TQString line, con, ss, name, name2, longname; + TQString cat, cat2; float mag(1000.0), ras, a, b; int type, ingc, imess(-1), rah, ram, dd, dm, ds, pa; int pgc, ugc; - QChar sgn, iflag; + TQChar sgn, iflag; line = fileReader.readLine(); //Ignore comment lines @@ -867,7 +867,7 @@ bool KStarsData::readDeepSkyData( void ) { if ( sgn == "-" ) { d.setD( -1.0*d.Degrees() ); } -// QString snum; +// TQString snum; if ( cat=="IC" || cat=="NGC" ) { snum.setNum( ingc ); name = cat + " " + snum; @@ -923,11 +923,11 @@ bool KStarsData::readDeepSkyData( void ) { return true; } -bool KStarsData::openURLFile(QString urlfile, QFile & file) { - //QFile file; - QString localFile; +bool KStarsData::openURLFile(TQString urlfile, TQFile & file) { + //TQFile file; + TQString localFile; bool fileFound = false; - QFile localeFile; + TQFile localeFile; if ( locale->language() != "en_US" ) localFile = locale->language() + "/" + urlfile; @@ -941,27 +941,27 @@ bool KStarsData::openURLFile(QString urlfile, QFile & file) { //local file found. Now, if global file has newer timestamp, then merge the two files. //First load local file into QStringList bool newDataFound( false ); - QStringList urlData; - QTextStream lStream( &file ); + TQStringList urlData; + TQTextStream lStream( &file ); while ( ! lStream.eof() ) urlData.append( lStream.readLine() ); //Find global file(s) in findAllResources() list. - QFileInfo fi_local( file.name() ); - QStringList flist = KGlobal::instance()->dirs()->findAllResources( "appdata", urlfile ); + TQFileInfo fi_local( file.name() ); + TQStringList flist = KGlobal::instance()->dirs()->findAllResources( "appdata", urlfile ); for ( unsigned int i=0; i< flist.count(); i++ ) { if ( flist[i] != file.name() ) { - QFileInfo fi_global( flist[i] ); + TQFileInfo fi_global( flist[i] ); //Is this global file newer than the local file? if ( fi_global.lastModified() > fi_local.lastModified() ) { //Global file has newer timestamp than local. Add lines in global file that don't already exist in local file. //be smart about this; in some cases the URL is updated but the image is probably the same if its //label string is the same. So only check strings up to last ":" - QFile globalFile( flist[i] ); + TQFile globalFile( flist[i] ); if ( globalFile.open( IO_ReadOnly ) ) { - QTextStream gStream( &globalFile ); + TQTextStream gStream( &globalFile ); while ( ! gStream.eof() ) { - QString line = gStream.readLine(); + TQString line = gStream.readLine(); //If global-file line begins with "XXX:" then this line should be removed from the local file. if ( line.left( 4 ) == "XXX:" && urlData.contains( line.mid( 4 ) ) ) { @@ -996,7 +996,7 @@ bool KStarsData::openURLFile(QString urlfile, QFile & file) { //(possibly) write appended local file if ( newDataFound ) { if ( file.open( IO_WriteOnly ) ) { - QTextStream outStream( &file ); + TQTextStream outStream( &file ); for ( unsigned int i=0; i<urlData.count(); i++ ) { outStream << urlData[i] << endl; } @@ -1012,10 +1012,10 @@ bool KStarsData::openURLFile(QString urlfile, QFile & file) { // we found urlfile, we need to copy it to locale localeFile.setName( locateLocal( "appdata", urlfile ) ); if (localeFile.open(IO_WriteOnly)) { - QTextStream readStream(&file); - QTextStream writeStream(&localeFile); + TQTextStream readStream(&file); + TQTextStream writeStream(&localeFile); while ( ! readStream.eof() ) { - QString line = readStream.readLine(); + TQString line = readStream.readLine(); if ( line.left( 4 ) != "XXX:" ) //do not write "deleted" lines writeStream << line << endl; } @@ -1034,13 +1034,13 @@ bool KStarsData::openURLFile(QString urlfile, QFile & file) { bool KStarsData::readUserLog(void) { - QFile file; - QString buffer; - QString sub, name, data; + TQFile file; + TQString buffer; + TQString sub, name, data; if (!KSUtils::openDataFile( file, "userlog.dat" )) return false; - QTextStream stream(&file); + TQTextStream stream(&file); if (!stream.eof()) buffer = stream.read(); @@ -1073,21 +1073,21 @@ bool KStarsData::readUserLog(void) return true; } -bool KStarsData::readURLData( QString urlfile, int type, bool deepOnly ) { - QFile file; +bool KStarsData::readURLData( TQString urlfile, int type, bool deepOnly ) { + TQFile file; if (!openURLFile(urlfile, file)) return false; - QTextStream stream(&file); + TQTextStream stream(&file); while ( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); //ignore comment lines if ( line.left(1) != "#" ) { - QString name = line.mid( 0, line.find(':') ); - QString sub = line.mid( line.find(':')+1 ); - QString title = sub.mid( 0, sub.find(':') ); - QString url = sub.mid( sub.find(':')+1 ); + TQString name = line.mid( 0, line.find(':') ); + TQString sub = line.mid( line.find(':')+1 ); + TQString title = sub.mid( 0, sub.find(':') ); + TQString url = sub.mid( sub.find(':')+1 ); SkyObjectName *sonm = ObjNames.find(name); @@ -1121,7 +1121,7 @@ bool KStarsData::readCustomCatalogs() { return result; } -bool KStarsData::addCatalog( QString filename ) { +bool KStarsData::addCatalog( TQString filename ) { CustomCatalog *newCat = createCustomCatalog( filename, false ); if ( newCat ) { CustomCatalogs.append( newCat ); @@ -1150,7 +1150,7 @@ bool KStarsData::addCatalog( QString filename ) { bool KStarsData::removeCatalog( int i ) { if ( ! CustomCatalogs.at(i) ) return false; - QPtrList<SkyObject> cat = CustomCatalogs.at(i)->objList(); + TQPtrList<SkyObject> cat = CustomCatalogs.at(i)->objList(); for ( SkyObject *o=cat.first(); o; o=cat.next() ) { ObjNames.remove( o->name() ); @@ -1163,35 +1163,35 @@ bool KStarsData::removeCatalog( int i ) { return true; } -CustomCatalog* KStarsData::createCustomCatalog( QString filename, bool showerrs ) { - QDir::setCurrent( QDir::homeDirPath() ); //for files with relative path - QPtrList<SkyObject> objList; - QString CatalogName, CatalogPrefix, CatalogColor; +CustomCatalog* KStarsData::createCustomCatalog( TQString filename, bool showerrs ) { + TQDir::setCurrent( TQDir::homeDirPath() ); //for files with relative path + TQPtrList<SkyObject> objList; + TQString CatalogName, CatalogPrefix, CatalogColor; float CatalogEpoch; //If the filename begins with "~", replace the "~" with the user's home directory //(otherwise, the file will not successfully open) if ( filename.at(0)=='~' ) - filename = QDir::homeDirPath() + filename.mid( 1, filename.length() ); - QFile ccFile( filename ); + filename = TQDir::homeDirPath() + filename.mid( 1, filename.length() ); + TQFile ccFile( filename ); if ( ccFile.open( IO_ReadOnly ) ) { int iStart(0); //the line number of the first non-header line - QStringList errs; //list of error messages - QStringList Columns; //list of data column descriptors in the header + TQStringList errs; //list of error messages + TQStringList Columns; //list of data column descriptors in the header - QTextStream stream( &ccFile ); - QStringList lines = QStringList::split( "\n", stream.read() ); + TQTextStream stream( &ccFile ); + TQStringList lines = TQStringList::split( "\n", stream.read() ); if ( parseCustomDataHeader( lines, Columns, CatalogName, CatalogPrefix, CatalogColor, CatalogEpoch, iStart, showerrs, errs ) ) { - QStringList::Iterator it = lines.begin(); - QStringList::Iterator itEnd = lines.end(); + TQStringList::Iterator it = lines.begin(); + TQStringList::Iterator itEnd = lines.end(); it += iStart; //jump ahead past header for ( uint i=iStart; i < lines.count(); i++ ) { - QStringList d = QStringList::split( " ", lines[i] ); + TQStringList d = TQStringList::split( " ", lines[i] ); //Now, if one of the columns is the "Name" field, the name may contain spaces. //In this case, the name field will need to be surrounded by quotes. @@ -1227,7 +1227,7 @@ CustomCatalog* KStarsData::createCustomCatalog( QString filename, bool showerrs if ( objList.count() ) { if ( errs.count() > 0 ) { //some data parsed, but there are errs to report - QString message( i18n( "Some lines in the custom catalog could not be parsed; see error messages below." ) + "\n" + + TQString message( i18n( "Some lines in the custom catalog could not be parsed; see error messages below." ) + "\n" + i18n( "To reject the file, press Cancel. " ) + i18n( "To accept the file (ignoring unparsed lines), press Accept." ) ); if ( KMessageBox::warningContinueCancelList( 0, message, errs, @@ -1237,7 +1237,7 @@ CustomCatalog* KStarsData::createCustomCatalog( QString filename, bool showerrs } } else { //objList.count() == 0 if ( showerrs ) { - QString message( i18n( "No lines could be parsed from the specified file, see error messages below." ) ); + TQString message( i18n( "No lines could be parsed from the specified file, see error messages below." ) ); KMessageBox::informationList( 0, message, errs, i18n( "No Valid Data Found in File" ) ); } @@ -1260,14 +1260,14 @@ CustomCatalog* KStarsData::createCustomCatalog( QString filename, bool showerrs } -bool KStarsData::processCustomDataLine( int lnum, QStringList d, QStringList Columns, - QString Prefix, QPtrList<SkyObject> &objList, bool showerrs, QStringList &errs ) { +bool KStarsData::processCustomDataLine( int lnum, TQStringList d, TQStringList Columns, + TQString Prefix, TQPtrList<SkyObject> &objList, bool showerrs, TQStringList &errs ) { //object data unsigned char iType(0); dms RA, Dec; float mag(0.0), a(0.0), b(0.0), PA(0.0); - QString name(""); QString lname(""); + TQString name(""); TQString lname(""); for ( uint i=0; i<Columns.count(); i++ ) { if ( Columns[i] == "ID" ) @@ -1370,22 +1370,22 @@ bool KStarsData::processCustomDataLine( int lnum, QStringList d, QStringList Col return true; } -bool KStarsData::parseCustomDataHeader( QStringList lines, QStringList &Columns, - QString &CatalogName, QString &CatalogPrefix, QString &CatalogColor, float &CatalogEpoch, - int &iStart, bool showerrs, QStringList &errs ) { +bool KStarsData::parseCustomDataHeader( TQStringList lines, TQStringList &Columns, + TQString &CatalogName, TQString &CatalogPrefix, TQString &CatalogColor, float &CatalogEpoch, + int &iStart, bool showerrs, TQStringList &errs ) { bool foundDataColumns( false ); //set to true if description of data columns found int ncol( 0 ); - QStringList::Iterator it = lines.begin(); - QStringList::Iterator itEnd = lines.end(); + TQStringList::Iterator it = lines.begin(); + TQStringList::Iterator itEnd = lines.end(); CatalogName = ""; CatalogPrefix = ""; CatalogColor = ""; CatalogEpoch = 0.; for ( ; it != itEnd; it++ ) { - QString d( *it ); //current data line + TQString d( *it ); //current data line if ( d.left(1) != "#" ) break; //no longer in header! int iname = d.find( "# Name: " ); @@ -1438,20 +1438,20 @@ bool KStarsData::parseCustomDataHeader( QStringList lines, QStringList &Columns, } } else if ( ! foundDataColumns ) { //don't try to parse data column descriptors if we already found them //Chomp off leading "#" character - d = d.replace( QRegExp( "#" ), "" ); + d = d.replace( TQRegExp( "#" ), "" ); - QStringList fields = QStringList::split( " ", d ); //split on whitespace + TQStringList fields = TQStringList::split( " ", d ); //split on whitespace //we need a copy of the master list of data fields, so we can //remove fields from it as they are encountered in the "fields" list. //this allows us to detect duplicate entries - QStringList master( KStarsData::CustomColumns ); + TQStringList master( KStarsData::CustomColumns ); - QStringList::Iterator itf = fields.begin(); - QStringList::Iterator itfEnd = fields.end(); + TQStringList::Iterator itf = fields.begin(); + TQStringList::Iterator itfEnd = fields.end(); for ( ; itf != itfEnd; itf++ ) { - QString s( *itf ); + TQString s( *itf ); if ( master.contains( s ) ) { //add the data field Columns.append( s ); @@ -1514,15 +1514,15 @@ bool KStarsData::parseCustomDataHeader( QStringList lines, QStringList &Columns, } //the it iterator now points to the first line past the header - iStart = lines.findIndex( QString( *it ) ); + iStart = lines.findIndex( TQString( *it ) ); return true; } } -bool KStarsData::processCity( QString& line ) { - QString totalLine; - QString name, province, country; - QStringList fields; +bool KStarsData::processCity( TQString& line ) { + TQString totalLine; + TQString name, province, country; + TQStringList fields; TimeZoneRule *TZrule; bool intCheck = true; char latsgn, lngsgn; @@ -1534,7 +1534,7 @@ bool KStarsData::processCity( QString& line ) { totalLine = line; // separate fields - fields = QStringList::split( ":", line ); + fields = TQStringList::split( ":", line ); for ( unsigned int i=0; i< fields.count(); ++i ) fields[i] = fields[i].stripWhiteSpace(); @@ -1574,7 +1574,7 @@ bool KStarsData::processCity( QString& line ) { return false; } - QChar ctemp = fields[6].at(0); + TQChar ctemp = fields[6].at(0); latsgn = ctemp; if (latsgn != 'N' && latsgn != 'S') { kdDebug() << latsgn << i18n( "\nCities.dat: Invalid latitude sign. Line was:\n" ) << totalLine << endl; @@ -1635,20 +1635,20 @@ bool KStarsData::processCity( QString& line ) { } bool KStarsData::readTimeZoneRulebook( void ) { - QFile file; - QString id; + TQFile file; + TQString id; if ( KSUtils::openDataFile( file, "TZrules.dat" ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { - QString line = stream.readLine().stripWhiteSpace(); + TQString line = stream.readLine().stripWhiteSpace(); if ( line.left(1) != "#" && line.length() ) { //ignore commented and blank lines - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); id = fields[0]; - QTime stime = QTime( fields[3].left( fields[3].find(':')).toInt() , + TQTime stime = TQTime( fields[3].left( fields[3].find(':')).toInt() , fields[3].mid( fields[3].find(':')+1, fields[3].length()).toInt() ); - QTime rtime = QTime( fields[6].left( fields[6].find(':')).toInt(), + TQTime rtime = TQTime( fields[6].left( fields[6].find(':')).toInt(), fields[6].mid( fields[6].find(':')+1, fields[6].length()).toInt() ); Rulebook[ id ] = TimeZoneRule( fields[1], fields[2], stime, fields[4], fields[5], rtime ); @@ -1661,7 +1661,7 @@ bool KStarsData::readTimeZoneRulebook( void ) { } bool KStarsData::readCityData( void ) { - QFile file; + TQFile file; bool citiesFound = false; // begin new code @@ -1676,10 +1676,10 @@ bool KStarsData::readCityData( void ) { //check for local cities database, but don't require it. file.setName( locate( "appdata", "mycities.dat" ) ); //determine filename in local user KDE directory tree. if ( file.exists() && file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); citiesFound |= processCity( line ); } // while ( !stream.eof() ) file.close(); @@ -1698,11 +1698,11 @@ void KStarsData::setMagnitude( float newMagnitude, bool forceReload ) { if (reloadingData() == false) { // if not already reloading data source = new FileSource(this, newMagnitude); loader = new StarDataSink(this); - connect(loader, SIGNAL(done()), this, SLOT(checkDataPumpAction())); - connect(loader, SIGNAL(updateSkymap()), this, SLOT(updateSkymap())); - connect(loader, SIGNAL(clearCache()), this, SLOT(sendClearCache())); + connect(loader, TQT_SIGNAL(done()), this, TQT_SLOT(checkDataPumpAction())); + connect(loader, TQT_SIGNAL(updateSkymap()), this, TQT_SLOT(updateSkymap())); + connect(loader, TQT_SIGNAL(clearCache()), this, TQT_SLOT(sendClearCache())); // start reloading - pump = new QDataPump (source, (QDataSink*) loader); + pump = new TQDataPump (source, (TQDataSink*) loader); } } /*else if ( newMagnitude < maxSetMagnitude ) { StarObject *lastStar = starList.last(); @@ -1762,21 +1762,21 @@ void KStarsData::initialize() { if (startupComplete) return; initTimer = new QTimer; - QObject::connect(initTimer, SIGNAL(timeout()), this, SLOT( slotInitialize() ) ); + TQObject::connect(initTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( slotInitialize() ) ); initCounter = 0; initTimer->start(1); } -void KStarsData::initError(QString s, bool required = false) { - QString message, caption; +void KStarsData::initError(TQString s, bool required = false) { + TQString message, caption; initTimer->stop(); if (required) { message = i18n( "The file %1 could not be found. " "KStars cannot run properly without this file. " "To continue loading, place the file in one of the " "following locations, then press Retry:\n\n" ).arg( s ) - + QString( "\t$(KDEDIR)/share/apps/kstars/%1\n" ).arg( s ) - + QString( "\t~/.kde/share/apps/kstars/%1\n\n" ).arg( s ) + + TQString( "\t$(KDEDIR)/share/apps/kstars/%1\n" ).arg( s ) + + TQString( "\t~/.kde/share/apps/kstars/%1\n\n" ).arg( s ) + i18n( "Otherwise, press Cancel to shutdown." ); caption = i18n( "Critical File Not Found: %1" ).arg( s ); } else { @@ -1784,8 +1784,8 @@ void KStarsData::initError(QString s, bool required = false) { "KStars can still run without this file. " "However, to avoid seeing this message in the future, you can " "place the file in one of the following locations, then press Retry:\n\n" ).arg( s ) - + QString( "\t$(KDEDIR)/share/apps/kstars/%1\n" ).arg( s ) - + QString( "\t~/.kde/share/apps/kstars/%1\n\n" ).arg( s ) + + TQString( "\t$(KDEDIR)/share/apps/kstars/%1\n" ).arg( s ) + + TQString( "\t~/.kde/share/apps/kstars/%1\n\n" ).arg( s ) + i18n( "Otherwise, press Cancel to continue loading without this file." ).arg( s ); caption = i18n( "Non-Critical File Not Found: %1" ).arg( s ); } @@ -1805,8 +1805,8 @@ void KStarsData::initError(QString s, bool required = false) { } void KStarsData::slotInitialize() { - QFile imFile; - QString ImageName; + TQFile imFile; + TQString ImageName; kapp->flush(); // flush all paint events before loading data @@ -2154,7 +2154,7 @@ void KStarsData::updateTime( GeoLocation *geo, SkyMap *skymap, const bool automa //Custom Catalogs for ( unsigned int j=0; j< CustomCatalogs.count(); ++j ) { - QPtrList<SkyObject> cat = CustomCatalogs.at(j)->objList(); + TQPtrList<SkyObject> cat = CustomCatalogs.at(j)->objList(); if ( Options::showCatalog()[j] ) { for ( SkyObject *o = cat.first(); o; o = cat.next() ) { if (needNewCoords) o->updateCoords( &num ); @@ -2219,7 +2219,7 @@ void KStarsData::updateTime( GeoLocation *geo, SkyMap *skymap, const bool automa skymap->updateFocus(); if ( clock()->isManualMode() ) - QTimer::singleShot( 0, skymap, SLOT( forceUpdateNow() ) ); + TQTimer::singleShot( 0, skymap, TQT_SLOT( forceUpdateNow() ) ); else skymap->forceUpdate(); } } @@ -2236,7 +2236,7 @@ void KStarsData::setFullTimeUpdate() { } void KStarsData::setLocationFromOptions() { - QMap<QString, TimeZoneRule>::Iterator it = Rulebook.find( Options::dST() ); + TQMap<TQString, TimeZoneRule>::Iterator it = Rulebook.find( Options::dST() ); setLocation( GeoLocation ( Options::longitude(), Options::latitude(), Options::cityName(), Options::provinceName(), Options::countryName(), Options::timeZone(), &(it.data()), 4, Options::elevation() ) ); @@ -2282,7 +2282,7 @@ void KStarsData::changeDateTime( const KStarsDateTime &newDate ) { setNextDSTChange( geo()->tzrule()->nextDSTChange() ); } -SkyObject* KStarsData::objectNamed( const QString &name ) { +SkyObject* KStarsData::objectNamed( const TQString &name ) { if ( (name== "star") || (name== "nothing") || name.isEmpty() ) return NULL; if ( name== Moon->name() ) return Moon; @@ -2323,7 +2323,7 @@ SkyObject* KStarsData::objectNamed( const QString &name ) { //Custom catalogs. for ( unsigned int i=0; i<CustomCatalogs.count(); ++i ) { - QPtrList<SkyObject> custCatObjs = CustomCatalogs.at(i)->objList(); + TQPtrList<SkyObject> custCatObjs = CustomCatalogs.at(i)->objList(); for ( unsigned int j = 0; j < custCatObjs.count(); ++j ) { if ( name==custCatObjs.at(j)->name() ) return custCatObjs.at(j); } @@ -2340,27 +2340,27 @@ SkyObject* KStarsData::objectNamed( const QString &name ) { //also, even functions that do make sense in this context have aspects that should //be modified or ignored. For example, we don't need to call slotCenter() on recentering //commands, just setDestination(). (sltoCenter() does additional things that we dont need). -bool KStarsData::executeScript( const QString &scriptname, SkyMap *map ) { +bool KStarsData::executeScript( const TQString &scriptname, SkyMap *map ) { int cmdCount(0); - QFile f( scriptname ); + TQFile f( scriptname ); if ( !f.open( IO_ReadOnly) ) { kdDebug() << i18n( "Could not open file %1" ).arg( f.name() ) << endl; return false; } - QTextStream istream(&f); + TQTextStream istream(&f); while ( ! istream.eof() ) { - QString line = istream.readLine(); + TQString line = istream.readLine(); //found a dcop line if ( line.left(4) == "dcop" ) { line = line.mid( 20 ); //strip away leading characters - QStringList fn = QStringList::split( " ", line ); + TQStringList fn = TQStringList::split( " ", line ); if ( fn[0] == "lookTowards" && fn.count() >= 2 ) { double az(-1.0); - QString arg = fn[1].lower(); + TQString arg = fn[1].lower(); if ( arg == "n" || arg == "north" ) az = 0.0; if ( arg == "ne" || arg == "northeast" ) az = 45.0; if ( arg == "e" || arg == "east" ) az = 90.0; @@ -2441,7 +2441,7 @@ bool KStarsData::executeScript( const QString &scriptname, SkyMap *map ) { if ( ok ) min = fn[5].toInt(&ok); if ( ok ) sec = fn[6].toInt(&ok); if ( ok ) { - changeDateTime( geo()->LTtoUT( KStarsDateTime( ExtDate(yr, mth, day), QTime(hr,min,sec) ) ) ); + changeDateTime( geo()->LTtoUT( KStarsDateTime( ExtDate(yr, mth, day), TQTime(hr,min,sec) ) ) ); cmdCount++; } else { kdWarning() << i18n( "Could not set time: %1 / %2 / %3 ; %4:%5:%6" ) @@ -2539,7 +2539,7 @@ bool KStarsData::executeScript( const QString &scriptname, SkyMap *map ) { cmdCount++; } } else if ( fn[0] == "setGeoLocation" && ( fn.count() == 3 || fn.count() == 4 ) ) { - QString city( fn[1] ), province( "" ), country( fn[2] ); + TQString city( fn[1] ), province( "" ), country( fn[2] ); if ( fn.count() == 4 ) { province = fn[2]; country = fn[3]; @@ -2576,8 +2576,8 @@ void KStarsData::appendTelescopeObject(SkyObject * object) void KStarsData::saveTimeBoxShaded( bool b ) { Options::setShadeTimeBox( b ); } void KStarsData::saveGeoBoxShaded( bool b ) { Options::setShadeGeoBox( b ); } void KStarsData::saveFocusBoxShaded( bool b ) { Options::setShadeFocusBox( b ); } -void KStarsData::saveTimeBoxPos( QPoint p ) { Options::setPositionTimeBox( p ); } -void KStarsData::saveGeoBoxPos( QPoint p ) { Options::setPositionGeoBox( p ); } -void KStarsData::saveFocusBoxPos( QPoint p ) { Options::setPositionFocusBox( p ); } +void KStarsData::saveTimeBoxPos( TQPoint p ) { Options::setPositionTimeBox( p ); } +void KStarsData::saveGeoBoxPos( TQPoint p ) { Options::setPositionGeoBox( p ); } +void KStarsData::saveFocusBoxPos( TQPoint p ) { Options::setPositionFocusBox( p ); } #include "kstarsdata.moc" diff --git a/kstars/kstars/kstarsdata.h b/kstars/kstars/kstarsdata.h index 3df7292c..b6d5b752 100644 --- a/kstars/kstars/kstarsdata.h +++ b/kstars/kstars/kstarsdata.h @@ -18,9 +18,9 @@ #ifndef KSTARSDATA_H #define KSTARSDATA_H -#include <qmap.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqstring.h> #include <kshortcut.h> @@ -154,7 +154,7 @@ public: *@return true if location successfully parsed; otherwise false. *@see KStarsData::readCityData() */ - bool processCity( QString& line ); + bool processCity( TQString& line ); /**Populate list of star objects from the stars database file. *Each line in the file provides the information required to construct a @@ -195,7 +195,7 @@ public: *@param reloadMode makes additional calculations in reload mode, not needed at start up *@see KStarsData::readStarData() */ - void processStar( QString *line, bool reloadMode = false ); + void processStar( TQString *line, bool reloadMode = false ); /**Populate the list of deep-sky objects from the database file. *Each line in the file is parsed according to column position: @@ -361,14 +361,14 @@ public: *@short Read in image and information URLs. *@return true if data files were successfully read. */ - bool readURLData( QString url, int type=0, bool deepOnly=false ); + bool readURLData( TQString url, int type=0, bool deepOnly=false ); /**@short open a file containing URL links. *@param urlfile string representation of the filename to open - *@param file reference to the QFile object which will be opened to this file. + *@param file reference to the TQFile object which will be opened to this file. *@return TRUE if file successfully opened. */ - bool openURLFile(QString urlfile, QFile& file); + bool openURLFile(TQString urlfile, TQFile& file); /**Initialize custom object catalogs from the files listed in the config file */ @@ -377,7 +377,7 @@ public: /**Add a user-defined object catalog to the list of custom catalogs. *(Basically just calls createCustomCatalog() ) */ - bool addCatalog( QString filename ); + bool addCatalog( TQString filename ); /**Remove a user-defined object catalog from the list of custom catalogs. *Also removes the objects from the ObjNames list. @@ -391,7 +391,7 @@ public: *@param showerrs show GUI window summarizing parsing errors *@return pointer to the new catalog */ - CustomCatalog* createCustomCatalog( QString filename, bool showerrs = false ); + CustomCatalog* createCustomCatalog( TQString filename, bool showerrs = false ); /**@short Parse the header of the custom object catalog. *@param lines string list containing the lines from the custom catalog file @@ -404,9 +404,9 @@ public: *@param showerrs if true, notify user of problems parsing the header. *@param errs reference to the cumulative list of error reports */ - bool parseCustomDataHeader( QStringList lines, QStringList &Columns, - QString &catName, QString &catPrefix, QString &catColor, float &catEpoch, int &iStart, - bool showerrs, QStringList &errs ); + bool parseCustomDataHeader( TQStringList lines, TQStringList &Columns, + TQString &catName, TQString &catPrefix, TQString &catColor, float &catEpoch, int &iStart, + bool showerrs, TQStringList &errs ); /**@short Parse a line from custom object catalog. If parsing is successful, add *the object to the object list @@ -418,8 +418,8 @@ public: *@param showerrs if true, notify user of problems parsing the header. *@param errs reference to the cumulative list of error reports */ - bool processCustomDataLine( int num, QStringList d, QStringList Columns, - QString Prefix, QPtrList<SkyObject> &objList, bool showerrs, QStringList &errs ); + bool processCustomDataLine( int num, TQStringList d, TQStringList Columns, + TQString Prefix, TQPtrList<SkyObject> &objList, bool showerrs, TQStringList &errs ); /**@short reset the faint limit for the stellar database *@param newMagnitude the new faint limit. @@ -452,7 +452,7 @@ public: *@param name Object name to find *@return pointer to SkyObject matching this name */ - SkyObject* objectNamed( const QString &name ); + SkyObject* objectNamed( const TQString &name ); /**The Sky is updated more frequently than the moon, which is updated more frequently *than the planets. The date of the last update for each category is recorded so we @@ -504,7 +504,7 @@ public: /**@return reference to the CustomCatalogs list */ - QPtrList<CustomCatalog>& customCatalogs() { return CustomCatalogs; } + TQPtrList<CustomCatalog>& customCatalogs() { return CustomCatalogs; } /**Set the GeoLocation according to the argument. *@param l reference to the new GeoLocation @@ -537,7 +537,7 @@ public: *@param map pointer to the SkyMap object. *@return TRUE if the script was successfully parsed. */ - bool executeScript( const QString &name, SkyMap *map ); + bool executeScript( const TQString &name, SkyMap *map ); /**@short Initialize celestial equator, horizon and ecliptic. *@param num pointer to a KSNumbers object to use. @@ -554,7 +554,7 @@ public: signals: /**Signal that specifies the text that should be drawn in the KStarsSplash window. */ - void progressText(QString); + void progressText(TQString); /**Signal that the Data initialization has finished. */ @@ -576,7 +576,7 @@ public slots: void initialize(); /**@short send a message to the console*/ - void slotConsoleMessage( QString s ) { std::cout << s.utf8() << std::endl; } + void slotConsoleMessage( TQString s ) { std::cout << s.utf8() << std::endl; } /**Update the Simulation Clock. Update positions of Planets. Update *Alt/Az coordinates of objects. Update precession. Update Focus position. @@ -612,17 +612,17 @@ public slots: /**@short Save the screen position of the Time infobox. *@param p the position of the box */ - void saveTimeBoxPos( QPoint p ); + void saveTimeBoxPos( TQPoint p ); /**@short Save the screen position of the Time infobox. *@param p the position of the box */ - void saveGeoBoxPos( QPoint p ); + void saveGeoBoxPos( TQPoint p ); /**@short Save the screen position of the Time infobox. *@param p the position of the box */ - void saveFocusBoxPos( QPoint p ); + void saveFocusBoxPos( TQPoint p ); private slots: /**This function runs while the splash screen is displayed as KStars is @@ -658,7 +658,7 @@ private: *@param required if TRUE, then the error message is more severe, and the program *exits when the messagebox is closed. */ - void initError(QString fn, bool required); + void initError(TQString fn, bool required); /**Reset local time to new daylight saving time. Use this function if DST has changed. *Used by updateTime(). @@ -681,49 +681,49 @@ private: /* bool openSAOFile(int i);*/ bool openStarFile(int i); - static QPtrList<GeoLocation> geoList; - QPtrList<SkyObject> objList; + static TQPtrList<GeoLocation> geoList; + TQPtrList<SkyObject> objList; - QPtrList<StarObject> starList; + TQPtrList<StarObject> starList; unsigned int StarCount; /** List of all deep sky objects */ - QPtrList<DeepSkyObject> deepSkyList; + TQPtrList<DeepSkyObject> deepSkyList; /** List of all deep sky objects per type, to speed up drawing the sky map */ - QPtrList<DeepSkyObject> deepSkyListMessier; + TQPtrList<DeepSkyObject> deepSkyListMessier; /** List of all deep sky objects per type, to speed up drawing the sky map */ - QPtrList<DeepSkyObject> deepSkyListNGC; + TQPtrList<DeepSkyObject> deepSkyListNGC; /** List of all deep sky objects per type, to speed up drawing the sky map */ - QPtrList<DeepSkyObject> deepSkyListIC; + TQPtrList<DeepSkyObject> deepSkyListIC; /** List of all deep sky objects per type, to speed up drawing the sky map */ - QPtrList<DeepSkyObject> deepSkyListOther; - - QPtrList<KSAsteroid> asteroidList; - QPtrList<KSComet> cometList; - - QPtrList<SkyPoint> MilkyWay[NMWFILES]; - - QPtrList<SkyPoint> clineList; - QPtrList<CSegment> csegmentList; - QPtrList<QChar> clineModeList; - QPtrList<SkyObject> cnameList; - QPtrList<SkyObject> ObjLabelList; - - QPtrList<SkyPoint> Equator; - QPtrList<SkyPoint> Ecliptic; - QPtrList<SkyPoint> Horizon; - QPtrList<VariableStarInfo> VariableStarsList; - QPtrList<ADVTreeData> ADVtreeList; - QPtrList<INDIHostsInfo> INDIHostsList; - QPtrList<SkyObject> INDITelescopeList; + TQPtrList<DeepSkyObject> deepSkyListOther; + + TQPtrList<KSAsteroid> asteroidList; + TQPtrList<KSComet> cometList; + + TQPtrList<SkyPoint> MilkyWay[NMWFILES]; + + TQPtrList<SkyPoint> clineList; + TQPtrList<CSegment> csegmentList; + TQPtrList<TQChar> clineModeList; + TQPtrList<SkyObject> cnameList; + TQPtrList<SkyObject> ObjLabelList; + + TQPtrList<SkyPoint> Equator; + TQPtrList<SkyPoint> Ecliptic; + TQPtrList<SkyPoint> Horizon; + TQPtrList<VariableStarInfo> VariableStarsList; + TQPtrList<ADVTreeData> ADVtreeList; + TQPtrList<INDIHostsInfo> INDIHostsList; + TQPtrList<SkyObject> INDITelescopeList; - QPtrList<CustomCatalog> CustomCatalogs; + TQPtrList<CustomCatalog> CustomCatalogs; ObjectNameList ObjNames; - static QMap<QString, TimeZoneRule> Rulebook; - static QStringList CustomColumns; + static TQMap<TQString, TimeZoneRule> Rulebook; + static TQStringList CustomColumns; GeoLocation Geo; SimClock Clock; @@ -733,13 +733,13 @@ private: bool TimeRunsForward, temporaryTrail, snapToFocus; - QString cnameFile; + TQString cnameFile; KStandardDirs *stdDirs; KLocale *locale; dms *LST, *HourAngle; - QString TypeName[NTYPENAME]; + TQString TypeName[NTYPENAME]; KKey resumeKey; PlanetCatalog *PCat; @@ -755,16 +755,16 @@ private: KStarsDateTime NextDSTChange; KStarsDateTime StoredDate; - QTimer *initTimer; + TQTimer *initTimer; int initCounter; /** *Reloading of star data asynchronous: - *QDataPump connects FileSource and StarDataSink and starts data transmission. + *TQDataPump connects FileSource and StarDataSink and starts data transmission. */ FileSource *source; StarDataSink *loader; - QDataPump *pump; + TQDataPump *pump; /** *Count the number of KStarsData objects. diff --git a/kstars/kstars/kstarsdatetime.cpp b/kstars/kstars/kstarsdatetime.cpp index 74d1fc20..6b406f44 100644 --- a/kstars/kstars/kstarsdatetime.cpp +++ b/kstars/kstars/kstarsdatetime.cpp @@ -35,13 +35,13 @@ KStarsDateTime::KStarsDateTime( const KStarsDateTime &kdt ) : ExtDateTime() { KStarsDateTime::KStarsDateTime( const ExtDateTime &edt ) : ExtDateTime( edt ) { //don't call setDJD() because we don't need to compute the time; just set DJD directly - QTime _t = edt.time(); + TQTime _t = edt.time(); ExtDate _d = edt.date(); long double jdFrac = ( _t.hour()-12 + ( _t.minute() + ( _t.second() + _t.msec()/1000.)/60.)/60.)/24.; DJD = (long double)( _d.jd() ) + jdFrac; } -KStarsDateTime::KStarsDateTime( const ExtDate &_d, const QTime &_t ) : ExtDateTime( _d, _t ) { +KStarsDateTime::KStarsDateTime( const ExtDate &_d, const TQTime &_t ) : ExtDateTime( _d, _t ) { //don't call setDJD() because we don't need to compute the time; just set DJD directly long double jdFrac = ( _t.hour()-12 + ( _t.minute() + ( _t.second() + _t.msec()/1000.)/60.)/60.)/24.; DJD = (long double)( _d.jd() ) + jdFrac; @@ -56,7 +56,7 @@ KStarsDateTime::KStarsDateTime( long double _jd ) : ExtDateTime() { } KStarsDateTime KStarsDateTime::currentDateTime() { - KStarsDateTime dt( ExtDate::currentDate(), QTime::currentTime() ); + KStarsDateTime dt( ExtDate::currentDate(), TQTime::currentTime() ); if ( dt.time().hour()==0 && dt.time().minute()==0 ) // midnight or right after? dt.setDate( ExtDate::currentDate() ); // fetch date again @@ -78,7 +78,7 @@ void KStarsDateTime::setDJD( long double _jd ) { int s = int( 60.*(60.*(hour - h) - m) ); int ms = int( 1000.*(60.*(60.*(hour - h) - m) - s) ); - ExtDateTime::setTime( QTime( h, m, s, ms ) ); + ExtDateTime::setTime( TQTime( h, m, s, ms ) ); } void KStarsDateTime::setDate( const ExtDate &_d ) { @@ -89,7 +89,7 @@ void KStarsDateTime::setDate( const ExtDate &_d ) { setDJD( (long double)_d.jd() + jdFrac ); } -void KStarsDateTime::setTime( const QTime &_t ) { +void KStarsDateTime::setTime( const TQTime &_t ) { KStarsDateTime _dt( date(), _t ); setDJD( _dt.djd() ); } @@ -110,7 +110,7 @@ dms KStarsDateTime::GSTat0hUT() const { double sinOb, cosOb; // Mean greenwich sidereal time - KStarsDateTime t0( date(), QTime( 0, 0, 0 ) ); + KStarsDateTime t0( date(), TQTime( 0, 0, 0 ) ); long double s = t0.djd() - J2000; double t = s/36525.0; double t1 = 6.697374558 + 2400.051336*t + 0.000025862*t*t + @@ -132,7 +132,7 @@ dms KStarsDateTime::GSTat0hUT() const { return gst.reduce(); } -QTime KStarsDateTime::GSTtoUT( dms GST ) const { +TQTime KStarsDateTime::GSTtoUT( dms GST ) const { dms gst0 = GSTat0hUT(); //dt is the number of sidereal hours since UT 0h. @@ -148,7 +148,7 @@ QTime KStarsDateTime::GSTtoUT( dms GST ) const { int sc = int( 60.0*( 60.0*( dt - double( hr ) ) - double( mn ) ) ); int ms = int( 1000.0*( 60.0*( 60.0*( dt - double(hr) ) - double(mn) ) - double(sc) ) ); - return( QTime( hr, mn, sc, ms ) ); + return( TQTime( hr, mn, sc, ms ) ); } void KStarsDateTime::setFromEpoch( double epoch ) { @@ -158,7 +158,7 @@ void KStarsDateTime::setFromEpoch( double epoch ) { setDJD( J2000 ); } else { int year = int( epoch ); - KStarsDateTime dt( ExtDate( year, 1, 1 ), QTime( 0, 0, 0 ) ); + KStarsDateTime dt( ExtDate( year, 1, 1 ), TQTime( 0, 0, 0 ) ); double days = (double)(dt.date().daysInYear())*( epoch - (double)year ); dt = dt.addSecs( days*86400. ); //set date and time based on the number of days into the year setDJD( dt.djd() ); diff --git a/kstars/kstars/kstarsdatetime.h b/kstars/kstars/kstarsdatetime.h index 37e565aa..a45e2495 100644 --- a/kstars/kstars/kstarsdatetime.h +++ b/kstars/kstars/kstarsdatetime.h @@ -88,9 +88,9 @@ public: *@short Constructor *Create a KStarsDateTimne based on the specified Date and Time. *@p _d The ExtDate to assign - *@p _t The QTime to assign + *@p _t The TQTime to assign */ - KStarsDateTime( const ExtDate &_d, const QTime &_t ); + KStarsDateTime( const ExtDate &_d, const TQTime &_t ); /** *Assign the (long double) Julian Day value, which includes the time of day @@ -106,10 +106,10 @@ public: void setDate( const ExtDate &d ); /** - *Assign the Time according to a QTime object. - *@p t the QTime to assign + *Assign the Time according to a TQTime object. + *@p t the TQTime to assign */ - void setTime( const QTime &t ); + void setTime( const TQTime &t ); /** *Modify the Date/Time by adding a number of seconds. @@ -167,7 +167,7 @@ public: *Convert a given Greenwich Sidereal Time to Universal Time (=Greenwich Mean Time). *@p GST the Greenwich Sidereal Time to convert to Universal Time. */ - QTime GSTtoUT( dms GST ) const; + TQTime GSTtoUT( dms GST ) const; /** diff --git a/kstars/kstars/kstarsdcop.cpp b/kstars/kstars/kstarsdcop.cpp index b6dae356..b4a22ba9 100644 --- a/kstars/kstars/kstarsdcop.cpp +++ b/kstars/kstars/kstarsdcop.cpp @@ -17,9 +17,9 @@ //KStars DCOP functions -#include <qdir.h> -#include <qlistview.h> -#include <qradiobutton.h> +#include <tqdir.h> +#include <tqlistview.h> +#include <tqradiobutton.h> #include <kio/netaccess.h> #include <kmessagebox.h> @@ -56,8 +56,8 @@ void KStars::setAltAz( double alt, double az ) { map()->setDestinationAltAz(alt,az); } -void KStars::lookTowards ( const QString direction ) { - QString dir = direction.lower(); +void KStars::lookTowards ( const TQString direction ) { + TQString dir = direction.lower(); if (dir == "zenith" || dir=="z") map()->invokeKey( KKey( "Z" ).keyCodeQt() ); else if (dir == "north" || dir=="n") map()->invokeKey( KKey( "N" ).keyCodeQt() ); else if (dir == "east" || dir=="e") map()->invokeKey( KKey( "E" ).keyCodeQt() ); @@ -101,15 +101,15 @@ void KStars::zoom( double z ) { } void KStars::setLocalTime(int yr, int mth, int day, int hr, int min, int sec) { - data()->changeDateTime( geo()->LTtoUT( KStarsDateTime( ExtDate(yr, mth, day), QTime(hr,min,sec) ) ) ); + data()->changeDateTime( geo()->LTtoUT( KStarsDateTime( ExtDate(yr, mth, day), TQTime(hr,min,sec) ) ) ); } void KStars::waitFor( double t ) { kapp->dcopClient()->suspend(); - QTimer::singleShot( int( 1000.*t ), this, SLOT( resumeDCOP() ) ); + TQTimer::singleShot( int( 1000.*t ), this, TQT_SLOT( resumeDCOP() ) ); } -void KStars::waitForKey( const QString k ) { +void KStars::waitForKey( const TQString k ) { data()->resumeKey = KKey( k ); if ( ! data()->resumeKey.isNull() ) { kapp->dcopClient()->suspend(); @@ -122,7 +122,7 @@ void KStars::setTracking( bool track ) { if ( track != Options::isTracking() ) slotTrack(); } -void KStars::popupMessage( int /*x*/, int /*y*/, QString /*message*/ ){ +void KStars::popupMessage( int /*x*/, int /*y*/, TQString /*message*/ ){ //Show a small popup window at (x,y) with a text message } @@ -130,7 +130,7 @@ void KStars::drawLine( int /*x1*/, int /*y1*/, int /*x2*/, int /*y2*/, int /*spe //Draw a line on the skymap display } -void KStars::setGeoLocation( QString city, QString province, QString country ) { +void KStars::setGeoLocation( TQString city, TQString province, TQString country ) { //Set the geographic location bool cityFound( false ); @@ -204,18 +204,18 @@ void KStars::writeConfig() { data()->StoredDate.setDJD( data()->lt().djd() ); } -QString KStars::getOption( const QString &name ) { +TQString KStars::getOption( const TQString &name ) { //Some config items are not stored in the Options object while //the program is running; catch these here and returntheir current value. - if ( name == "FocusRA" ) { return QString::number( map()->focus()->ra()->Hours(), 'f', 6 ); } - if ( name == "FocusDec" ) { return QString::number( map()->focus()->dec()->Degrees(), 'f', 6 ); } + if ( name == "FocusRA" ) { return TQString::number( map()->focus()->ra()->Hours(), 'f', 6 ); } + if ( name == "FocusDec" ) { return TQString::number( map()->focus()->dec()->Degrees(), 'f', 6 ); } KConfigSkeletonItem *it = Options::self()->findItem( name ); if ( it ) return it->property().toString(); - else return QString::null; + else return TQString::null; } -void KStars::changeViewOption( const QString op, const QString val ) { +void KStars::changeViewOption( const TQString op, const TQString val ) { bool bOk(false), nOk(false), dOk(false); //parse bool value @@ -332,7 +332,7 @@ void KStars::changeViewOption( const QString op, const QString val ) { map()->forceUpdate(); } -void KStars::setColor( const QString name, const QString value ) { +void KStars::setColor( const TQString name, const TQString value ) { ColorScheme *cs = data()->colorScheme(); if ( cs->hasColorNamed( name ) ) { cs->setColor( name, value ); @@ -340,9 +340,9 @@ void KStars::setColor( const QString name, const QString value ) { } } -void KStars::loadColorScheme( const QString _name ) { - QString name( _name ); - QString filename = name.lower().stripWhiteSpace(); +void KStars::loadColorScheme( const TQString _name ) { + TQString name( _name ); + TQString filename = name.lower().stripWhiteSpace(); bool ok( false ); //Parse default names which don't follow the regular file-naming scheme @@ -375,32 +375,32 @@ void KStars::loadColorScheme( const QString _name ) { //set the application colors for the Night Vision scheme if ( Options::darkAppColors() == false && filename == "night.colors" ) { Options::setDarkAppColors( true ); - OriginalPalette = QApplication::palette(); - QApplication::setPalette( DarkPalette, true ); + OriginalPalette = TQApplication::palette(); + TQApplication::setPalette( DarkPalette, true ); } if ( Options::darkAppColors() && filename != "night.colors" ) { Options::setDarkAppColors( false ); - QApplication::setPalette( OriginalPalette, true ); + TQApplication::setPalette( OriginalPalette, true ); } map()->forceUpdate(); } } -void KStars::exportImage( const QString url, int w, int h ) { +void KStars::exportImage( const TQString url, int w, int h ) { //If the filename string contains no "/" separators, assume the //user wanted to place a file in their home directory. KURL fileURL; - if ( ! url.contains( "/" ) ) fileURL = QDir::homeDirPath() + "/" + url; + if ( ! url.contains( "/" ) ) fileURL = TQDir::homeDirPath() + "/" + url; else fileURL = url; KTempFile tmpfile; - QString fname; + TQString fname; tmpfile.setAutoDelete(true); - QPixmap skyimage( map()->width(), map()->height() ); - QPixmap outimage( w, h ); + TQPixmap skyimage( map()->width(), map()->height() ); + TQPixmap outimage( w, h ); outimage.fill(); if ( fileURL.isValid() ) { @@ -411,7 +411,7 @@ void KStars::exportImage( const QString url, int w, int h ) { } //Determine desired image format from filename extension - QString ext = fname.mid( fname.findRev(".")+1 ); + TQString ext = fname.mid( fname.findRev(".")+1 ); const char* format = "PNG"; if ( ext.lower() == "png" ) { format = "PNG"; } else if ( ext.lower() == "jpg" || ext.lower() == "jpeg" ) { format = "JPG"; } @@ -452,7 +452,7 @@ void KStars::exportImage( const QString url, int w, int h ) { if ( tmpfile.name() == fname ) { //attempt to upload image to remote location if ( ! KIO::NetAccess::upload( tmpfile.name(), fileURL, this ) ) { - QString message = i18n( "Could not upload image to remote location: %1" ).arg( fileURL.prettyURL() ); + TQString message = i18n( "Could not upload image to remote location: %1" ).arg( fileURL.prettyURL() ); KMessageBox::sorry( 0, message, i18n( "Could not upload file" ) ); } } @@ -460,7 +460,7 @@ void KStars::exportImage( const QString url, int w, int h ) { } void KStars::printImage( bool usePrintDialog, bool useChartColors ) { - KPrinter printer( true, QPrinter::HighResolution ); + KPrinter printer( true, TQPrinter::HighResolution ); printer.setFullPage( false ); //Set up the printer (either with the Print Dialog, @@ -500,7 +500,7 @@ void KStars::printImage( bool usePrintDialog, bool useChartColors ) { } } -void KStars::startINDI (QString deviceName, bool useLocal) +void KStars::startINDI (TQString deviceName, bool useLocal) { establishINDI(); @@ -511,7 +511,7 @@ void KStars::startINDI (QString deviceName, bool useLocal) return; } - QListViewItem *driverItem = NULL; + TQListViewItem *driverItem = NULL; driverItem = indidriver->localListView->findItem(deviceName, 0); if (driverItem == NULL) { @@ -542,7 +542,7 @@ void KStars::startINDI (QString deviceName, bool useLocal) } -void KStars::shutdownINDI (QString deviceName) +void KStars::shutdownINDI (TQString deviceName) { if (!indidriver || !indimenu) { @@ -550,7 +550,7 @@ void KStars::shutdownINDI (QString deviceName) return; } - QListViewItem *driverItem = NULL; + TQListViewItem *driverItem = NULL; driverItem = indidriver->localListView->findItem(deviceName, 0); if (driverItem == NULL) { @@ -563,7 +563,7 @@ void KStars::shutdownINDI (QString deviceName) } -void KStars::switchINDI(QString deviceName, bool turnOn) +void KStars::switchINDI(TQString deviceName, bool turnOn) { INDI_D *dev; INDI_P *prop; @@ -597,7 +597,7 @@ void KStars::switchINDI(QString deviceName, bool turnOn) } -void KStars::setINDIPort(QString deviceName, QString port) +void KStars::setINDIPort(TQString deviceName, TQString port) { INDI_D *dev; INDI_P *prop; @@ -633,7 +633,7 @@ void KStars::setINDIPort(QString deviceName, QString port) } -void KStars::setINDITargetCoord(QString deviceName, double RA, double DEC) +void KStars::setINDITargetCoord(TQString deviceName, double RA, double DEC) { INDI_D *dev; INDI_P *prop; @@ -661,20 +661,20 @@ void KStars::setINDITargetCoord(QString deviceName, double RA, double DEC) if (!el) return; if (!el->write_w) return; - el->write_w->setText(QString("%1").arg(RA)); + el->write_w->setText(TQString("%1").arg(RA)); el = prop->findElement("DEC"); if (!el) return; if (!el->write_w) return; - el->write_w->setText(QString("%1").arg(DEC)); + el->write_w->setText(TQString("%1").arg(DEC)); prop->newText(); } -void KStars::setINDITargetName(QString deviceName, QString objectName) +void KStars::setINDITargetName(TQString deviceName, TQString objectName) { INDI_D *dev; INDI_P *prop; @@ -705,20 +705,20 @@ void KStars::setINDITargetName(QString deviceName, QString objectName) if (!el) return; if (!el->write_w) return; - el->write_w->setText(QString("%1").arg(target->ra()->Hours())); + el->write_w->setText(TQString("%1").arg(target->ra()->Hours())); el = prop->findElement("DEC"); if (!el) return; if (!el->write_w) return; - el->write_w->setText(QString("%1").arg(target->dec()->Degrees())); + el->write_w->setText(TQString("%1").arg(target->dec()->Degrees())); prop->newText(); } -void KStars::setINDIAction(QString deviceName, QString action) +void KStars::setINDIAction(TQString deviceName, TQString action) { INDI_D *dev; INDI_E *el; @@ -746,7 +746,7 @@ void KStars::setINDIAction(QString deviceName, QString action) } -void KStars::waitForINDIAction(QString deviceName, QString action) +void KStars::waitForINDIAction(TQString deviceName, TQString action) { INDI_D *dev; @@ -775,17 +775,17 @@ void KStars::waitForINDIAction(QString deviceName, QString action) el = dev->findElem(action); if (!el) return; - QObject::connect(el->pp, SIGNAL(okState()), this, SLOT(resumeDCOP(void ))); + TQObject::connect(el->pp, TQT_SIGNAL(okState()), this, TQT_SLOT(resumeDCOP(void ))); } else - QObject::connect(prop, SIGNAL(okState()), this, SLOT(resumeDCOP(void ))); + TQObject::connect(prop, TQT_SIGNAL(okState()), this, TQT_SLOT(resumeDCOP(void ))); kapp->dcopClient()->suspend(); } -void KStars::setINDIFocusSpeed(QString deviceName, unsigned int speed) +void KStars::setINDIFocusSpeed(TQString deviceName, unsigned int speed) { INDI_D *dev; INDI_P *prop; @@ -813,14 +813,14 @@ void KStars::setINDIFocusSpeed(QString deviceName, unsigned int speed) if (!el) return; if (!el->write_w) return; - el->write_w->setText(QString("%1").arg(speed)); + el->write_w->setText(TQString("%1").arg(speed)); prop->newText(); } -void KStars::startINDIFocus(QString deviceName, int focusDir) +void KStars::startINDIFocus(TQString deviceName, int focusDir) { if (!indidriver || !indimenu) { @@ -836,7 +836,7 @@ void KStars::startINDIFocus(QString deviceName, int focusDir) } -void KStars::setINDIGeoLocation(QString deviceName, double longitude, double latitude) +void KStars::setINDIGeoLocation(TQString deviceName, double longitude, double latitude) { INDI_D *dev; @@ -865,20 +865,20 @@ void KStars::setINDIGeoLocation(QString deviceName, double longitude, double lat if (!el) return; if (!el->write_w) return; - el->write_w->setText(QString("%1").arg(longitude)); + el->write_w->setText(TQString("%1").arg(longitude)); el = prop->findElement("LAT"); if (!el) return; if (!el->write_w) return; - el->write_w->setText(QString("%1").arg(latitude)); + el->write_w->setText(TQString("%1").arg(latitude)); prop->newText(); } -void KStars::setINDIFocusTimeout(QString deviceName, int timeout) +void KStars::setINDIFocusTimeout(TQString deviceName, int timeout) { INDI_D *dev; INDI_P *prop; @@ -907,7 +907,7 @@ void KStars::setINDIFocusTimeout(QString deviceName, int timeout) if (!el) return; if (el->write_w) - el->write_w->setText(QString("%1").arg(timeout)); + el->write_w->setText(TQString("%1").arg(timeout)); else if (el->spin_w) el->spin_w->setValue(timeout); @@ -916,7 +916,7 @@ void KStars::setINDIFocusTimeout(QString deviceName, int timeout) } -void KStars::startINDIExposure(QString deviceName, int timeout) +void KStars::startINDIExposure(TQString deviceName, int timeout) { INDI_D *dev; INDI_P *prop; @@ -944,7 +944,7 @@ void KStars::startINDIExposure(QString deviceName, int timeout) if (!el) return; if (el->write_w) - el->write_w->setText(QString("%1").arg(timeout)); + el->write_w->setText(TQString("%1").arg(timeout)); else if (el->spin_w) el->spin_w->setValue(timeout); @@ -953,7 +953,7 @@ void KStars::startINDIExposure(QString deviceName, int timeout) } -void KStars::setINDIFilterNum(QString deviceName, int filter_num) +void KStars::setINDIFilterNum(TQString deviceName, int filter_num) { INDI_D *dev; INDI_P *prop; @@ -981,7 +981,7 @@ void KStars::setINDIFilterNum(QString deviceName, int filter_num) if (!el) return; if (el->write_w) - el->write_w->setText(QString("%1").arg(filter_num)); + el->write_w->setText(TQString("%1").arg(filter_num)); else if (el->spin_w) el->spin_w->setValue(filter_num); @@ -989,7 +989,7 @@ void KStars::setINDIFilterNum(QString deviceName, int filter_num) } -void KStars::setINDIUTC(QString deviceName, QString UTCDateTime) +void KStars::setINDIUTC(TQString deviceName, TQString UTCDateTime) { INDI_D *dev; INDI_P *prop; @@ -1023,17 +1023,17 @@ void KStars::setINDIUTC(QString deviceName, QString UTCDateTime) } -void KStars::setINDIScopeAction(QString deviceName, QString action) +void KStars::setINDIScopeAction(TQString deviceName, TQString action) { setINDIAction(deviceName, action); } -void KStars::setINDIFrameType(QString deviceName, QString type) +void KStars::setINDIFrameType(TQString deviceName, TQString type) { setINDIAction(deviceName, type); } -void KStars::setINDICCDTemp(QString deviceName, int temp) +void KStars::setINDICCDTemp(TQString deviceName, int temp) { INDI_D *dev; INDI_P *prop; @@ -1061,7 +1061,7 @@ void KStars::setINDICCDTemp(QString deviceName, int temp) if (!el) return; if (el->write_w) - el->write_w->setText(QString("%1").arg(temp)); + el->write_w->setText(TQString("%1").arg(temp)); else if (el->spin_w) el->spin_w->setValue(temp); diff --git a/kstars/kstars/kstarsinit.cpp b/kstars/kstars/kstarsinit.cpp index 22c4cfb6..276e5c8a 100644 --- a/kstars/kstars/kstarsinit.cpp +++ b/kstars/kstars/kstarsinit.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qfile.h> -#include <qdir.h> +#include <tqlayout.h> +#include <tqfile.h> +#include <tqdir.h> #include <dcopclient.h> #include <kshortcut.h> #include <kiconloader.h> @@ -49,66 +49,66 @@ void KStars::initActions() { //File Menu: new KAction(i18n("&New Window"), "window_new", KShortcut( "Ctrl+N" ), - this, SLOT( newWindow() ), actionCollection(), "new_window"); + this, TQT_SLOT( newWindow() ), actionCollection(), "new_window"); new KAction(i18n("&Close Window"), "fileclose", KShortcut( "Ctrl+W" ), - this, SLOT( closeWindow() ), actionCollection(), "close_window"); + this, TQT_SLOT( closeWindow() ), actionCollection(), "close_window"); new KAction( i18n( "&Download Data..." ), "knewstuff", KShortcut( "Ctrl+D" ), - this, SLOT( slotDownload() ), actionCollection(), "get_data" ); - new KAction( i18n( "Open FITS..."), "fileopen", KShortcut( "Ctrl+O"), this, SLOT( slotOpenFITS()), actionCollection(), "open_file"); + this, TQT_SLOT( slotDownload() ), actionCollection(), "get_data" ); + new KAction( i18n( "Open FITS..."), "fileopen", KShortcut( "Ctrl+O"), this, TQT_SLOT( slotOpenFITS()), actionCollection(), "open_file"); new KAction( i18n( "&Save Sky Image..." ), "fileexport", KShortcut( "Ctrl+I" ), - this, SLOT( slotExportImage() ), actionCollection(), "export_image" ); + this, TQT_SLOT( slotExportImage() ), actionCollection(), "export_image" ); new KAction( i18n( "&Run Script..." ), "launch", KShortcut( "Ctrl+R" ), - this, SLOT( slotRunScript() ), actionCollection(), "run_script" ); - KStdAction::print(this, SLOT( slotPrint() ), actionCollection(), "print" ); - KStdAction::quit(this, SLOT( close() ), actionCollection(), "quit" ); + this, TQT_SLOT( slotRunScript() ), actionCollection(), "run_script" ); + KStdAction::print(this, TQT_SLOT( slotPrint() ), actionCollection(), "print" ); + KStdAction::quit(this, TQT_SLOT( close() ), actionCollection(), "quit" ); //Time Menu: new KAction( i18n( "Set Time to &Now" ), KShortcut( "Ctrl+E" ), - this, SLOT( slotSetTimeToNow() ), actionCollection(), "time_to_now" ); + this, TQT_SLOT( slotSetTimeToNow() ), actionCollection(), "time_to_now" ); new KAction( i18n( "set Clock to New Time", "&Set Time..." ), "clock", KShortcut( "Ctrl+S" ), - this, SLOT( slotSetTime() ), actionCollection(), "time_dialog" ); + this, TQT_SLOT( slotSetTime() ), actionCollection(), "time_dialog" ); ToggleAction *actTimeRun = new ToggleAction( i18n( "Stop &Clock" ), BarIcon("player_pause"), i18n("Start &Clock"), BarIcon("1rightarrow"), - 0, this, SLOT( slotToggleTimer() ), actionCollection(), "timer_control" ); + 0, this, TQT_SLOT( slotToggleTimer() ), actionCollection(), "timer_control" ); actTimeRun->setOffToolTip( i18n( "Start Clock" ) ); actTimeRun->setOnToolTip( i18n( "Stop Clock" ) ); - QObject::connect(data()->clock(), SIGNAL(clockStarted()), actTimeRun, SLOT(turnOn()) ); - QObject::connect(data()->clock(), SIGNAL(clockStopped()), actTimeRun, SLOT(turnOff()) ); + TQObject::connect(data()->clock(), TQT_SIGNAL(clockStarted()), actTimeRun, TQT_SLOT(turnOn()) ); + TQObject::connect(data()->clock(), TQT_SIGNAL(clockStopped()), actTimeRun, TQT_SLOT(turnOff()) ); //UpdateTime() if clock is stopped (so hidden objects get drawn) - QObject::connect(data()->clock(), SIGNAL(clockStopped()), this, SLOT(updateTime()) ); + TQObject::connect(data()->clock(), TQT_SIGNAL(clockStopped()), this, TQT_SLOT(updateTime()) ); //Focus Menu: new KAction(i18n( "&Zenith" ), KShortcut( "Z" ), - this, SLOT( slotPointFocus() ), actionCollection(), "zenith"); + this, TQT_SLOT( slotPointFocus() ), actionCollection(), "zenith"); new KAction(i18n( "&North" ), KShortcut( "N" ), - this, SLOT( slotPointFocus() ), actionCollection(), "north"); + this, TQT_SLOT( slotPointFocus() ), actionCollection(), "north"); new KAction(i18n( "&East" ), KShortcut( "E" ), - this, SLOT( slotPointFocus() ), actionCollection(), "east"); + this, TQT_SLOT( slotPointFocus() ), actionCollection(), "east"); new KAction(i18n( "&South" ), KShortcut( "S" ), - this, SLOT( slotPointFocus() ), actionCollection(), "south"); + this, TQT_SLOT( slotPointFocus() ), actionCollection(), "south"); new KAction(i18n( "&West" ), KShortcut( "W" ), - this, SLOT( slotPointFocus() ), actionCollection(), "west"); - KAction *tmpAction = KStdAction::find( this, SLOT( slotFind() ), + this, TQT_SLOT( slotPointFocus() ), actionCollection(), "west"); + KAction *tmpAction = KStdAction::find( this, TQT_SLOT( slotFind() ), actionCollection(), "find_object" ); tmpAction->setText( i18n( "&Find Object..." ) ); tmpAction->setToolTip( i18n( "Find object" ) ); new KAction( i18n( "Engage &Tracking" ), "decrypted", KShortcut( "Ctrl+T" ), - this, SLOT( slotTrack() ), actionCollection(), "track_object" ); + this, TQT_SLOT( slotTrack() ), actionCollection(), "track_object" ); new KAction( i18n( "Set Focus &Manually..." ), KShortcut( "Ctrl+M" ), - this, SLOT( slotManualFocus() ), actionCollection(), "manual_focus" ); + this, TQT_SLOT( slotManualFocus() ), actionCollection(), "manual_focus" ); //View Menu: - KStdAction::zoomIn(this, SLOT( slotZoomIn() ), actionCollection(), "zoom_in" ); - KStdAction::zoomOut(this, SLOT( slotZoomOut() ), actionCollection(), "zoom_out" ); + KStdAction::zoomIn(this, TQT_SLOT( slotZoomIn() ), actionCollection(), "zoom_in" ); + KStdAction::zoomOut(this, TQT_SLOT( slotZoomOut() ), actionCollection(), "zoom_out" ); new KAction( i18n( "&Default Zoom" ), "viewmagfit.png", KShortcut( "Ctrl+Z" ), - this, SLOT( slotDefaultZoom() ), actionCollection(), "zoom_default" ); + this, TQT_SLOT( slotDefaultZoom() ), actionCollection(), "zoom_default" ); new KAction( i18n( "&Zoom to Angular Size..." ), "viewmag.png", KShortcut( "Ctrl+Shift+Z" ), - this, SLOT( slotSetZoom() ), actionCollection(), "zoom_set" ); + this, TQT_SLOT( slotSetZoom() ), actionCollection(), "zoom_set" ); actCoordSys = new ToggleAction( i18n("Horizontal &Coordinates"), i18n( "Equatorial &Coordinates" ), - Key_Space, this, SLOT( slotCoordSys() ), actionCollection(), "coordsys" ); - KStdAction::fullScreen( this, SLOT( slotFullScreen() ), actionCollection(), 0 ); + Key_Space, this, TQT_SLOT( slotCoordSys() ), actionCollection(), "coordsys" ); + KStdAction::fullScreen( this, TQT_SLOT( slotFullScreen() ), actionCollection(), 0 ); //Settings Menu: @@ -122,45 +122,45 @@ void KStars::initActions() { KToggleAction *a = new KToggleAction(i18n( "Show the information boxes", "Show &Info Boxes"), 0, 0, 0, actionCollection(), "show_boxes"); a->setChecked( Options::showInfoBoxes() ); - QObject::connect(a, SIGNAL( toggled(bool) ), infoBoxes(), SLOT(setVisible(bool))); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), infoBoxes(), TQT_SLOT(setVisible(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); a = new KToggleAction(i18n( "Show time-related info box", "Show &Time Box"), 0, 0, 0, actionCollection(), "show_time_box"); - QObject::connect(a, SIGNAL( toggled(bool) ), infoBoxes(), SLOT(showTimeBox(bool))); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), infoBoxes(), TQT_SLOT(showTimeBox(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); a = new KToggleAction(i18n( "Show focus-related info box", "Show &Focus Box"), 0, 0, 0, actionCollection(), "show_focus_box"); - QObject::connect(a, SIGNAL( toggled(bool) ), infoBoxes(), SLOT(showFocusBox(bool))); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), infoBoxes(), TQT_SLOT(showFocusBox(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); a = new KToggleAction(i18n( "Show location-related info box", "Show &Location Box"), 0, 0, 0, actionCollection(), "show_location_box"); - QObject::connect(a, SIGNAL( toggled(bool) ), infoBoxes(), SLOT(showGeoBox(bool))); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), infoBoxes(), TQT_SLOT(showGeoBox(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); //Toolbar view options a = new KToggleAction(i18n( "Show Main Toolbar" ), 0, 0, 0, actionCollection(), "show_mainToolBar"); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); a = new KToggleAction(i18n( "Show View Toolbar" ), 0, 0, 0, actionCollection(), "show_viewToolBar"); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); //Statusbar view options a = new KToggleAction(i18n( "Show Statusbar" ), 0, 0, 0, actionCollection(), "show_statusBar"); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); a = new KToggleAction(i18n( "Show Az/Alt Field" ), 0, 0, 0, actionCollection(), "show_sbAzAlt"); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); a = new KToggleAction(i18n( "Show RA/Dec Field" ), 0, 0, 0, actionCollection(), "show_sbRADec"); - QObject::connect(a, SIGNAL( toggled(bool) ), this, SLOT(slotShowGUIItem(bool))); + TQObject::connect(a, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT(slotShowGUIItem(bool))); //Color scheme actions. These are added to the "colorschemes" KActionMenu. colorActionMenu = new KActionMenu( i18n( "C&olor Schemes" ), actionCollection(), "colorschemes" ); @@ -170,11 +170,11 @@ void KStars::initActions() { addColorMenuItem( i18n( "&Moonless Night" ), "cs_moonless-night" ); //Add any user-defined color schemes: - QFile file; - QString line, schemeName, filename; + TQFile file; + TQString line, schemeName, filename; file.setName( locate( "appdata", "colors.dat" ) ); //determine filename in local user KDE directory tree. if ( file.exists() && file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { line = stream.readLine(); @@ -192,61 +192,61 @@ void KStars::initActions() { new KAction( i18n( "Location on Earth", "&Geographic..." ), "kstars_geo", KShortcut( "Ctrl+G" ), this, - SLOT( slotGeoLocator() ), actionCollection(), "geolocation" ); + TQT_SLOT( slotGeoLocator() ), actionCollection(), "geolocation" ); - KStdAction::preferences( this, SLOT( slotViewOps() ), actionCollection(), "configure" ); + KStdAction::preferences( this, TQT_SLOT( slotViewOps() ), actionCollection(), "configure" ); new KAction(i18n( "Startup Wizard..." ), "wizard", KShortcut(), - this, SLOT( slotWizard() ), actionCollection(), "startwizard" ); + this, TQT_SLOT( slotWizard() ), actionCollection(), "startwizard" ); //Tools Menu: new KAction(i18n( "Calculator..."), KShortcut( "Ctrl+C"), - this, SLOT( slotCalculator() ), actionCollection(), "astrocalculator"); + this, TQT_SLOT( slotCalculator() ), actionCollection(), "astrocalculator"); new KAction(i18n( "Observing List..."), KShortcut( "Ctrl+L"), - this, SLOT( slotObsList() ), actionCollection(), "obslist"); + this, TQT_SLOT( slotObsList() ), actionCollection(), "obslist"); // enable action only if file was loaded and processed successfully. if (!data()->VariableStarsList.isEmpty()) new KAction(i18n( "AAVSO Light Curves..."), KShortcut( "Ctrl+V"), - this, SLOT( slotLCGenerator() ), actionCollection(), "lightcurvegenerator"); + this, TQT_SLOT( slotLCGenerator() ), actionCollection(), "lightcurvegenerator"); new KAction(i18n( "Altitude vs. Time..."), KShortcut( "Ctrl+A"), - this, SLOT( slotAVT() ), actionCollection(), "altitude_vs_time"); + this, TQT_SLOT( slotAVT() ), actionCollection(), "altitude_vs_time"); new KAction(i18n( "What's up Tonight..."), KShortcut("Ctrl+U"), - this, SLOT(slotWUT()), actionCollection(), "whats_up_tonight"); + this, TQT_SLOT(slotWUT()), actionCollection(), "whats_up_tonight"); //FIXME GLOSSARY // new KAction(i18n( "Glossary..."), KShortcut("Ctrl+K"), -// this, SLOT(slotGlossary()), actionCollection(), "glossary"); +// this, TQT_SLOT(slotGlossary()), actionCollection(), "glossary"); new KAction(i18n( "Script Builder..."), KShortcut("Ctrl+B"), - this, SLOT(slotScriptBuilder()), actionCollection(), "scriptbuilder"); + this, TQT_SLOT(slotScriptBuilder()), actionCollection(), "scriptbuilder"); new KAction(i18n( "Solar System..."), KShortcut("Ctrl+Y"), - this, SLOT(slotSolarSystem()), actionCollection(), "solarsystem"); + this, TQT_SLOT(slotSolarSystem()), actionCollection(), "solarsystem"); new KAction(i18n( "Jupiter's Moons..."), KShortcut("Ctrl+J"), - this, SLOT(slotJMoonTool()), actionCollection(), "jmoontool"); + this, TQT_SLOT(slotJMoonTool()), actionCollection(), "jmoontool"); // devices Menu - new KAction(i18n("Telescope Wizard..."), 0, this, SLOT(slotTelescopeWizard()), actionCollection(), "telescope_wizard"); - new KAction(i18n("Telescope Properties..."), 0, this, SLOT(slotTelescopeProperties()), actionCollection(), "telescope_properties"); - new KAction(i18n("Device Manager..."), 0, this, SLOT(slotINDIDriver()), actionCollection(), "device_manager"); + new KAction(i18n("Telescope Wizard..."), 0, this, TQT_SLOT(slotTelescopeWizard()), actionCollection(), "telescope_wizard"); + new KAction(i18n("Telescope Properties..."), 0, this, TQT_SLOT(slotTelescopeProperties()), actionCollection(), "telescope_properties"); + new KAction(i18n("Device Manager..."), 0, this, TQT_SLOT(slotINDIDriver()), actionCollection(), "device_manager"); - tmpAction = new KAction(i18n("Capture Image Sequence..."), 0, this, SLOT(slotImageSequence()), actionCollection(), "capture_sequence"); + tmpAction = new KAction(i18n("Capture Image Sequence..."), 0, this, TQT_SLOT(slotImageSequence()), actionCollection(), "capture_sequence"); tmpAction->setEnabled(false); - tmpAction = new KAction(i18n("INDI Control Panel..."), 0, this, SLOT(slotINDIPanel()), actionCollection(), "indi_control_panel"); + tmpAction = new KAction(i18n("INDI Control Panel..."), 0, this, TQT_SLOT(slotINDIPanel()), actionCollection(), "indi_control_panel"); tmpAction->setEnabled(false); - new KAction(i18n("Configure INDI..."), 0, this, SLOT(slotINDIConf()), actionCollection(), "configure_indi"); + new KAction(i18n("Configure INDI..."), 0, this, TQT_SLOT(slotINDIConf()), actionCollection(), "configure_indi"); //Help Menu: new KAction( i18n( "Tip of the Day" ), "idea", 0, - this, SLOT( slotTipOfDay() ), actionCollection(), "help_tipofday" ); + this, TQT_SLOT( slotTipOfDay() ), actionCollection(), "help_tipofday" ); //Handbook toolBar item: new KAction( i18n( "&Handbook" ), "contents", KShortcut( "F1" ), - this, SLOT( appHelpActivated() ), actionCollection(), "handbook" ); + this, TQT_SLOT( appHelpActivated() ), actionCollection(), "handbook" ); // //viewToolBar actions: @@ -254,50 +254,50 @@ void KStars::initActions() { //show_stars: a = new KToggleAction( i18n( "Toggle Stars" ), "kstars_stars", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_stars" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_stars" ); //show_deepsky: a = new KToggleAction( i18n( "Toggle Deep Sky Objects" ), "kstars_deepsky", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_deepsky" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_deepsky" ); //show_planets: a = new KToggleAction( i18n( "Toggle Solar System" ), "kstars_planets", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_planets" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_planets" ); //show_clines: a = new KToggleAction( i18n( "Toggle Constellation Lines" ), "kstars_clines", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_clines" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_clines" ); //show_cnames: a = new KToggleAction( i18n( "Toggle Constellation Names" ), "kstars_cnames", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_cnames" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_cnames" ); //show_cbound: a = new KToggleAction( i18n( "Toggle Constellation Boundaries" ), "kstars_cbound", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_cbounds" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_cbounds" ); //show_mw: a = new KToggleAction( i18n( "Toggle Milky Way" ), "kstars_mw", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_mw" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_mw" ); //show_grid: a = new KToggleAction( i18n( "Toggle Coordinate Grid" ), "kstars_grid", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_grid" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_grid" ); //show_horizon: a = new KToggleAction( i18n( "Toggle Ground" ), "kstars_horizon", - 0, this, SLOT( slotViewToolBar() ), actionCollection(), "show_horizon" ); + 0, this, TQT_SLOT( slotViewToolBar() ), actionCollection(), "show_horizon" ); if (Options::fitsSaveDirectory().isEmpty()) - Options::setFitsSaveDirectory(QDir:: homeDirPath()); + Options::setFitsSaveDirectory(TQDir:: homeDirPath()); } void KStars::initFOV() { //Read in the user's fov.dat and populate the FOV menu with its symbols. If no fov.dat exists, populate //create a default version. - QFile f; - QStringList fields; - QString nm; + TQFile f; + TQStringList fields; + TQString nm; f.setName( locateLocal( "appdata", "fov.dat" ) ); @@ -308,7 +308,7 @@ void KStars::initFOV() { if ( ! f.open( IO_WriteOnly ) ) { kdDebug() << i18n( "Could not open fov.dat." ) << endl; } else { - QTextStream ostream(&f); + TQTextStream ostream(&f); ostream << i18n( "Do not use a field-of-view indicator", "No FOV" ) << ":0.0:0:#AAAAAA" << endl; ostream << i18n( "use field-of-view for binoculars", "7x35 Binoculars" ) << ":558:1:#AAAAAA" << endl; ostream << i18n( "use 1-degree field-of-view indicator", "One Degree" ) << ":60:2:#AAAAAA" << endl; @@ -320,14 +320,14 @@ void KStars::initFOV() { //just populate the FOV menu with items, don't need to fully parse the lines if ( f.open( IO_ReadOnly ) ) { - QTextStream stream( &f ); + TQTextStream stream( &f ); while ( !stream.eof() ) { - QString line = stream.readLine(); - fields = QStringList::split( ":", line ); + TQString line = stream.readLine(); + fields = TQStringList::split( ":", line ); if ( fields.count() == 4 ) { nm = fields[0].stripWhiteSpace(); - KToggleAction *kta = new KToggleAction( nm, 0, this, SLOT( slotTargetSymbol() ), + KToggleAction *kta = new KToggleAction( nm, 0, this, TQT_SLOT( slotTargetSymbol() ), actionCollection(), nm.utf8() ); kta->setExclusiveGroup( "fovsymbol" ); if ( nm == Options::fOVName() ) kta->setChecked( true ); @@ -339,14 +339,14 @@ void KStars::initFOV() { } fovActionMenu->popupMenu()->insertSeparator(); - fovActionMenu->insert( new KAction( i18n( "Edit FOV Symbols..." ), 0, this, SLOT( slotFOVEdit() ), actionCollection(), "edit_fov" ) ); + fovActionMenu->insert( new KAction( i18n( "Edit FOV Symbols..." ), 0, this, TQT_SLOT( slotFOVEdit() ), actionCollection(), "edit_fov" ) ); } void KStars::initStatusBar() { statusBar()->insertItem( i18n( " Welcome to KStars " ), 0, 1, true ); statusBar()->setItemAlignment( 0, AlignLeft | AlignVCenter ); - QString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width + TQString s = "000d 00m 00s, +00d 00\' 00\""; //only need this to set the width if ( Options::showAltAzField() ) { statusBar()->insertFixedItem( s, 1, true ); @@ -404,8 +404,8 @@ void KStars::datainitFinished(bool worked) { //it simply exits. Very strange. if ( Options::useAltAz() && Options::showGround() && map()->focus()->alt()->Degrees() < -1.0 ) { - QString caption = i18n( "Initial Position is Below Horizon" ); - QString message = i18n( "The initial position is below the horizon.\nWould you like to reset to the default position?" ); + TQString caption = i18n( "Initial Position is Below Horizon" ); + TQString message = i18n( "The initial position is below the horizon.\nWould you like to reset to the default position?" ); if ( KMessageBox::warningYesNo( this, message, caption, i18n("Reset Position"), i18n("Do Not Reset"), "dag_start_below_horiz" ) == KMessageBox::Yes ) { map()->setClickedObject( NULL ); @@ -442,7 +442,7 @@ void KStars::datainitFinished(bool worked) { void KStars::privatedata::buildGUI() { //create the widgets - ks->centralWidget = new QWidget( ks ); + ks->centralWidget = new TQWidget( ks ); ks->setCentralWidget( ks->centralWidget ); //set AAVSO modaless dialog pointer to 0 @@ -459,16 +459,16 @@ void KStars::privatedata::buildGUI() { ks->skymap = new SkyMap( ks->data(), ks->centralWidget ); // update skymap if KStarsData send update signal - QObject::connect(kstarsData, SIGNAL( update() ), ks->skymap, SLOT( forceUpdateNow() ) ); + TQObject::connect(kstarsData, TQT_SIGNAL( update() ), ks->skymap, TQT_SLOT( forceUpdateNow() ) ); // get focus of keyboard and mouse actions (for example zoom in with +) - ks->map()->QWidget::setFocus(); + ks->map()->TQWidget::setFocus(); ks->initStatusBar(); ks->initActions(); // create the layout of the central widget - ks->topLayout = new QVBoxLayout( ks->centralWidget ); + ks->topLayout = new TQVBoxLayout( ks->centralWidget ); ks->topLayout->addWidget( ks->skymap ); // 2nd parameter must be false, or plugActionList won't work! @@ -484,11 +484,11 @@ void KStars::privatedata::buildGUI() { //Changing the timestep needs to propagate to the clock, check if slew mode should be //(dis)engaged, and return input focus to the skymap. - connect( ks->TimeStep, SIGNAL( scaleChanged( float ) ), ks->data(), SLOT( setTimeDirection( float ) ) ); - connect( ks->TimeStep, SIGNAL( scaleChanged( float ) ), ks->data()->clock(), SLOT( setScale( float )) ); -// connect( ks->TimeStep, SIGNAL( scaleChanged( float ) ), ks->skymap, SLOT( slotClockSlewing() ) ); - connect( ks->data()->clock(), SIGNAL( scaleChanged( float ) ), ks->map(), SLOT( slotClockSlewing() ) ); - connect( ks->TimeStep, SIGNAL( scaleChanged( float ) ), ks, SLOT( mapGetsFocus() ) ); + connect( ks->TimeStep, TQT_SIGNAL( scaleChanged( float ) ), ks->data(), TQT_SLOT( setTimeDirection( float ) ) ); + connect( ks->TimeStep, TQT_SIGNAL( scaleChanged( float ) ), ks->data()->clock(), TQT_SLOT( setScale( float )) ); +// connect( ks->TimeStep, TQT_SIGNAL( scaleChanged( float ) ), ks->skymap, TQT_SLOT( slotClockSlewing() ) ); + connect( ks->data()->clock(), TQT_SIGNAL( scaleChanged( float ) ), ks->map(), TQT_SLOT( slotClockSlewing() ) ); + connect( ks->TimeStep, TQT_SIGNAL( scaleChanged( float ) ), ks, TQT_SLOT( mapGetsFocus() ) ); ks->resize( Options::windowWidth(), Options::windowHeight() ); @@ -507,11 +507,11 @@ void KStars::privatedata::buildGUI() { ks->data()->initGuides(&tempnum); //Connect the clock. - QObject::connect( ks->data()->clock(), SIGNAL( timeAdvanced() ), ks, SLOT( updateTime() ) ); - QObject::connect( ks->data()->clock(), SIGNAL( timeChanged() ), ks, SLOT( updateTime() ) ); + TQObject::connect( ks->data()->clock(), TQT_SIGNAL( timeAdvanced() ), ks, TQT_SLOT( updateTime() ) ); + TQObject::connect( ks->data()->clock(), TQT_SIGNAL( timeChanged() ), ks, TQT_SLOT( updateTime() ) ); // Connect cache function - QObject::connect( kstarsData, SIGNAL( clearCache() ), ks, SLOT( clearCachedFindDialog() ) ); + TQObject::connect( kstarsData, TQT_SIGNAL( clearCache() ), ks, TQT_SLOT( clearCachedFindDialog() ) ); SkyPoint newPoint; if ( ks->data()->useDefaultOptions ) { diff --git a/kstars/kstars/kstarsinterface.h b/kstars/kstars/kstarsinterface.h index 665dbb64..af3be358 100644 --- a/kstars/kstars/kstarsinterface.h +++ b/kstars/kstars/kstarsinterface.h @@ -52,7 +52,7 @@ class KStarsInterface : virtual public DCOPObject *@li zenith, z * */ - virtual ASYNC lookTowards( const QString direction ) = 0; + virtual ASYNC lookTowards( const TQString direction ) = 0; /**Set the zoomFactor. The zoomFactor is equal to the number of *pixels which subtend one radian of angle. @@ -102,7 +102,7 @@ class KStarsInterface : virtual public DCOPObject /**Pause execution of the script until a key is pressed *@param k the key which will resume the script */ - virtual ASYNC waitForKey( const QString k ) = 0; + virtual ASYNC waitForKey( const TQString k ) = 0; /**Turn tracking mode on or off. If tracking is on, then the coordinates at *the center of the screen remain fixed with time. If tracking is off, then @@ -122,25 +122,25 @@ class KStarsInterface : virtual public DCOPObject /**@return the value of an option in the config file *@param name the name of the option to be read */ - virtual QString getOption( const QString &name ) = 0; + virtual TQString getOption( const TQString &name ) = 0; /**Reset a View option. There are dozens of view options which can be adjusted *with this function. See the ScriptBuilder tool for a hierarchical list, or *see the kstarsrc config file. Different options require different data types - *for their argument. The value parameter will be recast from a QString to the + *for their argument. The value parameter will be recast from a TQString to the *correct data type for the specified option. If the value cannot be recast, *then the option will not be changed. *@param option the name of the option to change *@param value the new value for the option */ - virtual ASYNC changeViewOption( const QString option, const QString value ) = 0; + virtual ASYNC changeViewOption( const TQString option, const TQString value ) = 0; /**Show a message in a popup window (NOT YET IMPLEMENTED) *@param x the X-coordinate of the window *@param y the Y-coordinate of the window *@param message the text to be displayed */ - virtual ASYNC popupMessage( int x, int y, const QString message ) = 0; + virtual ASYNC popupMessage( int x, int y, const TQString message ) = 0; /**Draw a line on the sky map (NOT YET IMPLEMENTED) *@param x1 the x-coordinate of the starting point of the line @@ -157,18 +157,18 @@ class KStarsInterface : virtual public DCOPObject *@param province the name of the province or US state *@param country the name of the country */ - virtual ASYNC setGeoLocation( const QString city, const QString province, const QString country ) = 0; + virtual ASYNC setGeoLocation( const TQString city, const TQString province, const TQString country ) = 0; /**Adjust one of the color settings. *@param colorName The name of the color to change (see one of the *.colors files, or colorscheme.cpp) *@param value The new color setting */ - virtual ASYNC setColor( const QString colorName, const QString value ) = 0; + virtual ASYNC setColor( const TQString colorName, const TQString value ) = 0; /**Load a color scheme *@param name The name of the color scheme to be loaded */ - virtual ASYNC loadColorScheme( const QString name ) = 0; + virtual ASYNC loadColorScheme( const TQString name ) = 0; /**Export an image of the current sky to a file on disk. *@param filename The filename for the exported image (the image type @@ -177,7 +177,7 @@ class KStarsInterface : virtual public DCOPObject *@param width the width of the image *@param height the height of the image */ - virtual ASYNC exportImage( const QString filename, int width, int height ) = 0; + virtual ASYNC exportImage( const TQString filename, int width, int height ) = 0; /**Print the current sky map. Options to show the Print Dialog and to use Star Chart colors. */ @@ -189,38 +189,38 @@ class KStarsInterface : virtual public DCOPObject *@param deviceName The INDI device name *@param useLocal If true, starts the device in local mode. Otherwise, in server mode. */ - virtual ASYNC startINDI (QString deviceName, bool useLocal) = 0; + virtual ASYNC startINDI (TQString deviceName, bool useLocal) = 0; /**Shotdown a device *@param deviceName The INDI device name */ - virtual ASYNC shutdownINDI (QString deviceName) = 0; + virtual ASYNC shutdownINDI (TQString deviceName) = 0; /**Turn the INDI device on/off *@param deviceName The INDI device name *@param turnOn If true, the device is switched on, otherwise it is switches off. */ - virtual ASYNC switchINDI(QString deviceName, bool turnOn) = 0; + virtual ASYNC switchINDI(TQString deviceName, bool turnOn) = 0; /**Set INDI connection port *@param deviceName The INDI device name *@param port The connection port (e.g. /dev/ttyS0) */ - virtual ASYNC setINDIPort(QString deviceName, QString port) = 0; + virtual ASYNC setINDIPort(TQString deviceName, TQString port) = 0; /**Set INDI device action. This action is an element of a valid switch * property in the device. *@param deviceName The INDI device name *@param action The generic action to invoke */ - virtual ASYNC setINDIAction(QString deviceName, QString action) = 0; + virtual ASYNC setINDIAction(TQString deviceName, TQString action) = 0; /** Wait for action to complete (state changed to OK or IDLE) *@param deviceName The INDI device name *@param action The action. The action can be any valid device property. * script will pause until the property status becomes OK. */ - virtual ASYNC waitForINDIAction(QString deviceName, QString action) = 0; + virtual ASYNC waitForINDIAction(TQString deviceName, TQString action) = 0; // Telescope Functions @@ -229,32 +229,32 @@ class KStarsInterface : virtual public DCOPObject *@param RA Target's right ascension in JNOW *@param DEC Target's declination in JNOW */ - virtual ASYNC setINDITargetCoord(QString deviceName, double RA, double DEC) = 0; + virtual ASYNC setINDITargetCoord(TQString deviceName, double RA, double DEC) = 0; /**Set telescope target *@param deviceName The INDI device name *@param objectName Object's name as found in KStars */ - virtual ASYNC setINDITargetName(QString deviceName, QString objectName) = 0; + virtual ASYNC setINDITargetName(TQString deviceName, TQString objectName) = 0; /**Set telescope action *@param deviceName The INDI device name *@param action The specfic action to perform. Either SLEW, TRACK, SYNC, PARK, or ABORT. */ - virtual ASYNC setINDIScopeAction(QString deviceName, QString action) = 0; + virtual ASYNC setINDIScopeAction(TQString deviceName, TQString action) = 0; /** Set INDI geographical location *@param deviceName The INDI device name *@param longitude Longitude expressed in double. E of N *@param latitude Latitude expressed in double. */ - virtual ASYNC setINDIGeoLocation(QString deviceName, double longitude, double latitude) = 0; + virtual ASYNC setINDIGeoLocation(TQString deviceName, double longitude, double latitude) = 0; /** Start INDI UTC date and time in ISO 8601 format *@param deviceName The INDI device name *@param UTCDateTime UTC date and time in ISO 8601 format. */ - virtual ASYNC setINDIUTC(QString deviceName, QString UTCDateTime) = 0; + virtual ASYNC setINDIUTC(TQString deviceName, TQString UTCDateTime) = 0; // Focus Functions @@ -266,26 +266,26 @@ class KStarsInterface : virtual public DCOPObject * *@todo Be more explicit about allowed action strings. */ - virtual ASYNC setINDIFocusSpeed(QString deviceName, unsigned int speed) = 0; + virtual ASYNC setINDIFocusSpeed(TQString deviceName, unsigned int speed) = 0; /** Set INDI focus timeout *@param deviceName The INDI device name *@param timeout Number of seconds to perform focusing. */ - virtual ASYNC setINDIFocusTimeout(QString deviceName, int timeout) = 0; + virtual ASYNC setINDIFocusTimeout(TQString deviceName, int timeout) = 0; /** Start INDI focus operation in the selected direction *@param deviceName The INDI device name *@param focusDir Focus direction. If 0, focus in, if 1 focus out */ - virtual ASYNC startINDIFocus(QString deviceName, int focusDir) = 0; + virtual ASYNC startINDIFocus(TQString deviceName, int focusDir) = 0; // Filter Functions /** Sets the Filter position *@param deviceName The INDI device name *@param filter_num The filter position (0-20) */ - virtual ASYNC setINDIFilterNum(QString deviceName, int filter_num) = 0; + virtual ASYNC setINDIFilterNum(TQString deviceName, int filter_num) = 0; // Camera CCD Functions @@ -294,19 +294,19 @@ class KStarsInterface : virtual public DCOPObject *@param type The frame type can be either FRAME_LIGHT, FRAME_DARK, * FRAME_BIAS, or FRAME_FLAT */ - virtual ASYNC setINDIFrameType(QString deviceName, QString type) = 0; + virtual ASYNC setINDIFrameType(TQString deviceName, TQString type) = 0; /** Set CCD target temperature *@param deviceName The INDI device name *@param temp The target CCD temperature. */ - virtual ASYNC setINDICCDTemp(QString deviceName, int temp) = 0; + virtual ASYNC setINDICCDTemp(TQString deviceName, int temp) = 0; /** Start camera exposure *@param deviceName The INDI device name *@param timeout Number of seconds to perform exposure. */ - virtual ASYNC startINDIExposure(QString deviceName, int timeout) = 0; + virtual ASYNC startINDIExposure(TQString deviceName, int timeout) = 0; }; diff --git a/kstars/kstars/kstarssplash.cpp b/kstars/kstars/kstarssplash.cpp index 463f38a3..7e57364b 100644 --- a/kstars/kstars/kstarssplash.cpp +++ b/kstars/kstars/kstarssplash.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klocale.h> #include <kapplication.h> @@ -25,71 +25,71 @@ #include "kstarssplash.h" #include "ksutils.h" -KStarsSplash::KStarsSplash( QWidget *parent, const char* name ) +KStarsSplash::KStarsSplash( TQWidget *parent, const char* name ) : KDialogBase( KDialogBase::Plain, i18n( "Loading KStars..." ), 0 /*no buttons*/, Ok, parent, name, false /*not modal*/ ) { //Set up widgets for splashscreen. - QFrame *page = plainPage(); - page->setBackgroundColor( QColor( "Black" ) ); - setBackgroundColor( QColor( "Black" ) ); + TQFrame *page = plainPage(); + page->setBackgroundColor( TQColor( "Black" ) ); + setBackgroundColor( TQColor( "Black" ) ); - QVBoxLayout *topLayout = new QVBoxLayout( page, 0, 0 ); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, 0 ); topLayout->setMargin( 0 ); //Load the KStars banner. Use an empty image if it can't be opened. - QFile imFile; + TQFile imFile; if ( KSUtils::openDataFile( imFile, "kstars.png" ) ) { imFile.close(); //Just need the filename... - splashImage = new QPixmap( imFile.name() ); + splashImage = new TQPixmap( imFile.name() ); } else { - splashImage = new QPixmap(); //null image + splashImage = new TQPixmap(); //null image } - Banner = new QWidget( page ); + Banner = new TQWidget( page ); Banner->setFixedWidth( splashImage->width() ); Banner->setFixedHeight( splashImage->height() ); topLayout->addWidget( Banner ); //initialize the "Welcome to KStars message label - label = new QLabel( page, "label1" ); - QPalette pal( label->palette() ); - pal.setColor( QPalette::Normal, QColorGroup::Background, QColor( "Black" ) ); - pal.setColor( QPalette::Inactive, QColorGroup::Background, QColor( "Black" ) ); - pal.setColor( QPalette::Normal, QColorGroup::Foreground, QColor( "White" ) ); - pal.setColor( QPalette::Inactive, QColorGroup::Foreground, QColor( "White" ) ); + label = new TQLabel( page, "label1" ); + TQPalette pal( label->palette() ); + pal.setColor( TQPalette::Normal, TQColorGroup::Background, TQColor( "Black" ) ); + pal.setColor( TQPalette::Inactive, TQColorGroup::Background, TQColor( "Black" ) ); + pal.setColor( TQPalette::Normal, TQColorGroup::Foreground, TQColor( "White" ) ); + pal.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQColor( "White" ) ); label->setPalette( pal ); label->setAlignment( AlignHCenter ); label->setText( i18n( "Welcome to KStars. Please stand by while loading..." ) ); topLayout->addWidget( label ); //initialize the progress message label - textCurrentStatus = new QLabel( page, "label2" ); + textCurrentStatus = new TQLabel( page, "label2" ); textCurrentStatus->setPalette( pal ); textCurrentStatus->setAlignment( AlignHCenter ); topLayout->addWidget( textCurrentStatus ); topLayout->activate(); disableResize(); - setMessage(QString::null); // force repaint of widget with no text + setMessage(TQString::null); // force repaint of widget with no text } KStarsSplash::~KStarsSplash() { delete splashImage; } -void KStarsSplash::paintEvent( QPaintEvent* ) { +void KStarsSplash::paintEvent( TQPaintEvent* ) { bitBlt( Banner, 0, 0, splashImage, 0, 0, -1, -1 ); label->repaint(); // standard text label textCurrentStatus->repaint(); // status text label } -void KStarsSplash::closeEvent( QCloseEvent *e ) { +void KStarsSplash::closeEvent( TQCloseEvent *e ) { e->ignore(); emit closeWindow(); } -void KStarsSplash::setMessage( QString s ) { +void KStarsSplash::setMessage( TQString s ) { textCurrentStatus->setText( s ); repaint(); // repaint splash screen /** diff --git a/kstars/kstars/kstarssplash.h b/kstars/kstars/kstarssplash.h index 13ec4a6e..2750d3c9 100644 --- a/kstars/kstars/kstarssplash.h +++ b/kstars/kstars/kstarssplash.h @@ -37,7 +37,7 @@ class KStarsSplash : public KDialogBase public: /**Constructor. Create widgets. Load KStars logo. Start load timer. */ - KStarsSplash( QWidget *parent, const char* name ); + KStarsSplash( TQWidget *parent, const char* name ); /**Destructor */ @@ -45,8 +45,8 @@ class KStarsSplash : public KDialogBase public slots: /**Display the text argument in the Splash Screen's status label. - *This is connected to KStarsData::progressText(QString)*/ - void setMessage(QString s); + *This is connected to KStarsData::progressText(TQString)*/ + void setMessage(TQString s); protected: /**Paint event to redraw the widgets. This only gets called when the timer fires. @@ -54,20 +54,20 @@ class KStarsSplash : public KDialogBase *this may be difficult to implement (it may be that the program is too busy loading data *to notice that a redraw is required). */ - virtual void paintEvent( QPaintEvent* ); + virtual void paintEvent( TQPaintEvent* ); /**If the user clicks on the "X" close-window button, then abort loading *as soon as possible and shut down the program. */ - void closeEvent( QCloseEvent *e ); + void closeEvent( TQCloseEvent *e ); signals: void closeWindow(); private: - QLabel *textCurrentStatus, *label; - QWidget *Banner; - QPixmap *splashImage; + TQLabel *textCurrentStatus, *label; + TQWidget *Banner; + TQPixmap *splashImage; }; #endif diff --git a/kstars/kstars/ksutils.cpp b/kstars/kstars/ksutils.cpp index b8db47f6..91ff1ff0 100644 --- a/kstars/kstars/ksutils.cpp +++ b/kstars/kstars/ksutils.cpp @@ -16,12 +16,12 @@ ***************************************************************************/ #include <kstandarddirs.h> -#include <qfile.h> +#include <tqfile.h> #include "ksutils.h" -bool KSUtils::openDataFile( QFile &file, const QString &s ) { +bool KSUtils::openDataFile( TQFile &file, const TQString &s ) { bool result; - QString FileName = locate( "appdata", s ); + TQString FileName = locate( "appdata", s ); if ( !FileName.isNull() ) { file.setName( FileName ); diff --git a/kstars/kstars/ksutils.h b/kstars/kstars/ksutils.h index 95c9b7e1..4f43b9cb 100644 --- a/kstars/kstars/ksutils.h +++ b/kstars/kstars/ksutils.h @@ -31,17 +31,17 @@ class QFile; class KSUtils { public: - /**Attempt to open the data file named filename, using the QFile object "file". + /**Attempt to open the data file named filename, using the TQFile object "file". *First look in the standard KDE directories, then look in a local "data" *subdirectory. If the data file cannot be found or opened, display a warning *messagebox. *@short Open a data file. - *@param &file The QFile object to be opened + *@param &file The TQFile object to be opened *@param filename The name of the data file. *@returns bool Returns true if data file was opened successfully. *@returns a reference to the opened file. */ - static bool openDataFile( QFile &file, const QString &filename ); + static bool openDataFile( TQFile &file, const TQString &filename ); /** Lagrange interpolation using a maximum number of 10 points. *@param x[] double array with x values diff --git a/kstars/kstars/kswizard.cpp b/kstars/kstars/kswizard.cpp index 6ed9078b..85258362 100644 --- a/kstars/kstars/kswizard.cpp +++ b/kstars/kstars/kswizard.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qfile.h> -#include <qpixmap.h> -#include <qlabel.h> +#include <tqfile.h> +#include <tqpixmap.h> +#include <tqlabel.h> #include <klineedit.h> #include <klistbox.h> #include <kpushbutton.h> @@ -31,7 +31,7 @@ #include "kswizardui.h" #include "kswizard.h" -KSWizard::KSWizard( QWidget *parent, const char *name ) +KSWizard::KSWizard( TQWidget *parent, const char *name ) : KSWizardUI( parent, name ) { ksw = (KStars *)parent; @@ -54,8 +54,8 @@ KSWizard::KSWizard( QWidget *parent, const char *name ) setNextEnabled( page( pageCount() - 1 ), false ); //Load images into banner frames. - QFile imFile; - QPixmap im = QPixmap(); + TQFile imFile; + TQPixmap im = TQPixmap(); if ( KSUtils::openDataFile( imFile, "wzstars.png" ) ) { imFile.close(); //Just need the filename... @@ -86,14 +86,14 @@ KSWizard::KSWizard( QWidget *parent, const char *name ) #endif //connect signals/slots - connect( CityListBox, SIGNAL( selectionChanged() ), this, SLOT( slotChangeCity() ) ); - connect( CityFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotFilterCities() ) ); - connect( ProvinceFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotFilterCities() ) ); - connect( CountryFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotFilterCities() ) ); + connect( CityListBox, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotChangeCity() ) ); + connect( CityFilter, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotFilterCities() ) ); + connect( ProvinceFilter, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotFilterCities() ) ); + connect( CountryFilter, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotFilterCities() ) ); //Uncomment if we ever need the telescope page... -// connect( TelescopeWizardButton, SIGNAL( clicked() ), this, SLOT( slotTelescopeSetup() ) ); +// connect( TelescopeWizardButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotTelescopeSetup() ) ); #if ( KDE_IS_VERSION( 3, 2, 90 ) ) - connect( DownloadButton, SIGNAL( clicked() ), ksw, SLOT( slotDownload() ) ); + connect( DownloadButton, TQT_SIGNAL( clicked() ), ksw, TQT_SLOT( slotDownload() ) ); #endif //Initialize Geographic Location page @@ -149,9 +149,9 @@ void KSWizard::slotFilterCities() { filteredCityList.clear(); for (GeoLocation *loc = ksw->data()->geoList.first(); loc; loc = ksw->data()->geoList.next()) { - QString sc( loc->translatedName() ); - QString ss( loc->translatedCountry() ); - QString sp = ""; + TQString sc( loc->translatedName() ); + TQString ss( loc->translatedCountry() ); + TQString sp = ""; if ( !loc->province().isEmpty() ) sp = loc->translatedProvince(); diff --git a/kstars/kstars/kswizard.h b/kstars/kstars/kswizard.h index f822149a..ea570498 100644 --- a/kstars/kstars/kswizard.h +++ b/kstars/kstars/kswizard.h @@ -18,7 +18,7 @@ #ifndef KSWIZARD_H #define KSWIZARD_H -#include <qmemarray.h> +#include <tqmemarray.h> #include "kswizardui.h" class GeoLocation; @@ -45,7 +45,7 @@ public: *@p parent pointer to the parent widget *@p name name for the KSWizard object */ - KSWizard( QWidget *parent=0, const char *name=0 ); + KSWizard( TQWidget *parent=0, const char *name=0 ); /**Destructor */ ~KSWizard(); @@ -81,9 +81,9 @@ private: void initGeoPage(); KStars *ksw; - QMemArray<int> GeoID; + TQMemArray<int> GeoID; GeoLocation *Geo; - QPtrList<GeoLocation> filteredCityList; + TQPtrList<GeoLocation> filteredCityList; }; #endif diff --git a/kstars/kstars/locationdialog.cpp b/kstars/kstars/locationdialog.cpp index dfb5ebf2..8bbd34ac 100644 --- a/kstars/kstars/locationdialog.cpp +++ b/kstars/kstars/locationdialog.cpp @@ -22,13 +22,13 @@ #include <kstandarddirs.h> #include <klineedit.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlistbox.h> -#include <qcombobox.h> -#include <qfile.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqcombobox.h> +#include <tqfile.h> #include "locationdialog.h" #include "kstars.h" @@ -36,64 +36,64 @@ #include "mapcanvas.h" #include "dmsbox.h" -LocationDialog::LocationDialog( QWidget* parent ) +LocationDialog::LocationDialog( TQWidget* parent ) : KDialogBase( KDialogBase::Plain, i18n( "Set Geographic Location" ), Ok|Cancel, Ok, parent ) { KStars *p = (KStars *)parent; - QFrame *page = plainPage(); - CityBox = new QGroupBox( page, "CityBox" ); - CoordBox = new QGroupBox( page, "CoordBox" ); + TQFrame *page = plainPage(); + CityBox = new TQGroupBox( page, "CityBox" ); + CoordBox = new TQGroupBox( page, "CoordBox" ); CityBox->setTitle( i18n( "Choose City" ) ); CoordBox->setTitle( i18n( "Choose/Modify Coordinates" ) ); //Create Layout managers - RootLay = new QVBoxLayout( page, 4, 4 ); //root mgr for dialog - CityLay = new QVBoxLayout( CityBox, 6, 4 ); //root mgr for CityBox + RootLay = new TQVBoxLayout( page, 4, 4 ); //root mgr for dialog + CityLay = new TQVBoxLayout( CityBox, 6, 4 ); //root mgr for CityBox CityLay->setSpacing( 6 ); CityLay->setMargin( 6 ); - hlay = new QHBoxLayout( 2 ); //this layout will be added to CityLay - vlay = new QVBoxLayout( 2 ); //this layout will be added to hlay - glay = new QGridLayout( 3, 2, 6 ); //this layout will be added to vlay + hlay = new TQHBoxLayout( 2 ); //this layout will be added to CityLay + vlay = new TQVBoxLayout( 2 ); //this layout will be added to hlay + glay = new TQGridLayout( 3, 2, 6 ); //this layout will be added to vlay - CoordLay = new QVBoxLayout( CoordBox, 6, 4 ); //root mgr for coordbox + CoordLay = new TQVBoxLayout( CoordBox, 6, 4 ); //root mgr for coordbox CoordLay->setSpacing( 6 ); CoordLay->setMargin( 6 ); - glay2 = new QGridLayout( 3, 4, 4 ); //this layout will be added to CoordLay - hlayCoord = new QHBoxLayout( 2 ); //this layout will be added to glay2 - hlayTZ = new QHBoxLayout( 2 ); //this layout will be added to glay2 - hlayButtons = new QHBoxLayout( 2 ); //this layout will be added to glay2 - hlay3 = new QHBoxLayout( 2 ); //this layout will be added to CoordLay + glay2 = new TQGridLayout( 3, 4, 4 ); //this layout will be added to CoordLay + hlayCoord = new TQHBoxLayout( 2 ); //this layout will be added to glay2 + hlayTZ = new TQHBoxLayout( 2 ); //this layout will be added to glay2 + hlayButtons = new TQHBoxLayout( 2 ); //this layout will be added to glay2 + hlay3 = new TQHBoxLayout( 2 ); //this layout will be added to CoordLay //Create widgets - CityFiltLabel = new QLabel( CityBox ); + CityFiltLabel = new TQLabel( CityBox ); CityFiltLabel->setText( i18n( "City filter:" ) ); - ProvinceFiltLabel = new QLabel( CityBox ); + ProvinceFiltLabel = new TQLabel( CityBox ); ProvinceFiltLabel->setText( i18n( "Province filter:" ) ); - CountryFiltLabel = new QLabel( CityBox ); + CountryFiltLabel = new TQLabel( CityBox ); CountryFiltLabel->setText( i18n( "Country filter:" ) ); - CountLabel = new QLabel( CityBox ); + CountLabel = new TQLabel( CityBox ); CityFilter = new KLineEdit( CityBox ); CityFilter->setFocus(); // set focus to city inputline ProvinceFilter = new KLineEdit( CityBox ); CountryFilter = new KLineEdit( CityBox ); - GeoBox = new QListBox( CityBox ); - GeoBox->setVScrollBarMode( QListBox::AlwaysOn ); - GeoBox->setHScrollBarMode( QListBox::AlwaysOff ); + GeoBox = new TQListBox( CityBox ); + GeoBox->setVScrollBarMode( TQListBox::AlwaysOn ); + GeoBox->setHScrollBarMode( TQListBox::AlwaysOff ); MapView = new MapCanvas( CityBox ); MapView->setFixedSize( 360, 180 ); //each pixel 1 deg x 2 deg - NewCityLabel = new QLabel( i18n( "City:" ), CoordBox ); - NewProvinceLabel = new QLabel( i18n( "State/Province:" ), CoordBox ); - NewCountryLabel = new QLabel( i18n( "Country:" ), CoordBox ); - LongLabel = new QLabel( i18n( "Longitude:" ), CoordBox ); - LatLabel = new QLabel( i18n( "Latitude:" ), CoordBox ); - TZLabel = new QLabel( i18n( "timezone offset from universal time", "UT offset:" ), CoordBox ); - TZRuleLabel = new QLabel( i18n( "daylight savings time rule", "DST rule:" ), CoordBox ); + NewCityLabel = new TQLabel( i18n( "City:" ), CoordBox ); + NewProvinceLabel = new TQLabel( i18n( "State/Province:" ), CoordBox ); + NewCountryLabel = new TQLabel( i18n( "Country:" ), CoordBox ); + LongLabel = new TQLabel( i18n( "Longitude:" ), CoordBox ); + LatLabel = new TQLabel( i18n( "Latitude:" ), CoordBox ); + TZLabel = new TQLabel( i18n( "timezone offset from universal time", "UT offset:" ), CoordBox ); + TZRuleLabel = new TQLabel( i18n( "daylight savings time rule", "DST rule:" ), CoordBox ); NewCityName = new KLineEdit( CoordBox ); NewProvinceName = new KLineEdit( CoordBox ); @@ -101,8 +101,8 @@ LocationDialog::LocationDialog( QWidget* parent ) NewLong = new dmsBox( CoordBox ); NewLat = new dmsBox( CoordBox ); - TZBox = new QComboBox( CoordBox ); - TZRuleBox = new QComboBox( CoordBox ); + TZBox = new TQComboBox( CoordBox ); + TZRuleBox = new TQComboBox( CoordBox ); TZBox->setMinimumWidth( 16 ); TZRuleBox->setMinimumWidth( 16 ); TZBox->setEditable( true ); @@ -111,16 +111,16 @@ LocationDialog::LocationDialog( QWidget* parent ) for ( int i=0; i<25; ++i ) TZBox->insertItem( KGlobal::locale()->formatNumber( (double)(i-12) ) ); - QMap<QString, TimeZoneRule>::Iterator it = p->data()->Rulebook.begin(); - QMap<QString, TimeZoneRule>::Iterator itEnd = p->data()->Rulebook.end(); + TQMap<TQString, TimeZoneRule>::Iterator it = p->data()->Rulebook.begin(); + TQMap<TQString, TimeZoneRule>::Iterator itEnd = p->data()->Rulebook.end(); for ( ; it != itEnd; ++it ) if ( it.key().length() ) TZRuleBox->insertItem( it.key() ); - ClearFields = new QPushButton( i18n( "Clear Fields" ), CoordBox, "ClearFields" ); - ShowTZRules = new QPushButton( i18n( "Explain DST Rules" ), CoordBox, "ShowDSTRules" ); + ClearFields = new TQPushButton( i18n( "Clear Fields" ), CoordBox, "ClearFields" ); + ShowTZRules = new TQPushButton( i18n( "Explain DST Rules" ), CoordBox, "ShowDSTRules" ); - AddCityButton = new QPushButton( i18n ( "Add to List" ), CoordBox, "AddCityButton" ); + AddCityButton = new TQPushButton( i18n ( "Add to List" ), CoordBox, "AddCityButton" ); //Pack the widgets into the layouts RootLay->addWidget( CityBox, 0, 0 ); @@ -180,21 +180,21 @@ LocationDialog::LocationDialog( QWidget* parent ) CoordLay->activate(); RootLay->activate(); - connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) ); - connect( CityFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( filterCity() ) ); - connect( ProvinceFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( filterCity() ) ); - connect( CountryFilter, SIGNAL( textChanged( const QString & ) ), this, SLOT( filterCity() ) ); - connect( NewCityName, SIGNAL( textChanged( const QString & ) ), this, SLOT( nameChanged() ) ); - connect( NewProvinceName, SIGNAL( textChanged( const QString & ) ), this, SLOT( nameChanged() ) ); - connect( NewCountryName, SIGNAL( textChanged( const QString & ) ), this, SLOT( nameChanged() ) ); - connect( NewLong, SIGNAL( textChanged( const QString & ) ), this, SLOT( dataChanged() ) ); - connect( NewLat, SIGNAL( textChanged( const QString & ) ), this, SLOT( dataChanged() ) ); - connect( TZBox, SIGNAL( activated(int) ), this, SLOT( dataChanged() ) ); - connect( TZRuleBox, SIGNAL( activated(int) ), this, SLOT( dataChanged() ) ); - connect( GeoBox, SIGNAL( selectionChanged() ), this, SLOT( changeCity() ) ); - connect( AddCityButton, SIGNAL( clicked() ), this, SLOT( addCity() ) ); - connect( ClearFields, SIGNAL( clicked() ), this, SLOT( clearFields() ) ); - connect( ShowTZRules, SIGNAL( clicked() ), this, SLOT( showTZRules() ) ); + connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) ); + connect( CityFilter, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( filterCity() ) ); + connect( ProvinceFilter, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( filterCity() ) ); + connect( CountryFilter, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( filterCity() ) ); + connect( NewCityName, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( nameChanged() ) ); + connect( NewProvinceName, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( nameChanged() ) ); + connect( NewCountryName, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( nameChanged() ) ); + connect( NewLong, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( dataChanged() ) ); + connect( NewLat, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( dataChanged() ) ); + connect( TZBox, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( dataChanged() ) ); + connect( TZRuleBox, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( dataChanged() ) ); + connect( GeoBox, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( changeCity() ) ); + connect( AddCityButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addCity() ) ); + connect( ClearFields, TQT_SIGNAL( clicked() ), this, TQT_SLOT( clearFields() ) ); + connect( ShowTZRules, TQT_SIGNAL( clicked() ), this, TQT_SLOT( showTZRules() ) ); dataModified = false; nameModified = false; @@ -261,9 +261,9 @@ void LocationDialog::filterCity( void ) { AddCityButton->setEnabled( false ); for (GeoLocation *loc = p->data()->geoList.first(); loc; loc = p->data()->geoList.next()) { - QString sc( loc->translatedName() ); - QString ss( loc->translatedCountry() ); - QString sp = ""; + TQString sc( loc->translatedName() ); + TQString ss( loc->translatedCountry() ); + TQString sp = ""; if ( !loc->province().isEmpty() ) sp = loc->translatedProvince(); @@ -332,7 +332,7 @@ void LocationDialog::addCity( void ) { bCityAdded = false; if ( !nameModified && !dataModified ) { - QString message = i18n( "This City already exists in the database." ); + TQString message = i18n( "This City already exists in the database." ); KMessageBox::sorry( 0, message, i18n( "Error: Duplicate Entry" ) ); return; } @@ -343,41 +343,41 @@ void LocationDialog::addCity( void ) { double TZ = TZBox->lineEdit()->text().toDouble( &tzOk ); if ( NewCityName->text().isEmpty() || NewCountryName->text().isEmpty() ) { - QString message = i18n( "All fields (except province) must be filled to add this location." ); + TQString message = i18n( "All fields (except province) must be filled to add this location." ); KMessageBox::sorry( 0, message, i18n( "Fields are Empty" ) ); return; //FIXME after strings freeze lifts, separate TZ check from lat/long check } else if ( ! latOk || ! lngOk || ! tzOk ) { - QString message = i18n( "Could not parse coordinates." ); + TQString message = i18n( "Could not parse coordinates." ); KMessageBox::sorry( 0, message, i18n( "Bad Coordinates" ) ); return; } else { if ( !nameModified ) { - QString message = i18n( "Really override original data for this city?" ); + TQString message = i18n( "Really override original data for this city?" ); if ( KMessageBox::questionYesNo( 0, message, i18n( "Override Existing Data?" ), i18n("Override Data"), i18n("Do Not Override")) == KMessageBox::No ) return; //user answered No. } - QString entry; - QFile file; + TQString entry; + TQFile file; //Strip off white space - QString name = NewCityName->text().stripWhiteSpace(); - QString province = NewProvinceName->text().stripWhiteSpace(); - QString country = NewCountryName->text().stripWhiteSpace(); + TQString name = NewCityName->text().stripWhiteSpace(); + TQString province = NewProvinceName->text().stripWhiteSpace(); + TQString country = NewCountryName->text().stripWhiteSpace(); //check for user's city database. If it doesn't exist, create it. file.setName( locateLocal( "appdata", "mycities.dat" ) ); //determine filename in local user KDE directory tree. if ( !file.open( IO_ReadWrite | IO_Append ) ) { - QString message = i18n( "Local cities database could not be opened.\nLocation will not be recorded." ); + TQString message = i18n( "Local cities database could not be opened.\nLocation will not be recorded." ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return; } else { char ltsgn = 'N'; if ( lat.degree()<0 ) ltsgn = 'S'; char lgsgn = 'E'; if ( lng.degree()<0 ) lgsgn = 'W'; - QString TZrule = TZRuleBox->currentText(); + TQString TZrule = TZRuleBox->currentText(); entry = entry.sprintf( "%-32s : %-21s : %-21s : %2d : %2d : %2d : %c : %3d : %2d : %2d : %c : %5.1f : %2s\n", name.local8Bit().data(), province.local8Bit().data(), country.local8Bit().data(), @@ -385,7 +385,7 @@ void LocationDialog::addCity( void ) { abs(lng.degree()), lng.arcmin(), lat.arcsec(), lgsgn, TZ, TZrule.local8Bit().data() ); - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << entry; file.close(); @@ -473,7 +473,7 @@ void LocationDialog::clearFields( void ) { } void LocationDialog::showTZRules( void ) { - QStringList lines; + TQStringList lines; lines.append( i18n( " Start Date (Start Time) / Revert Date (Revert Time)" ) ); lines.append( " " ); lines.append( i18n( "--: No DST correction" ) ); @@ -503,7 +503,7 @@ void LocationDialog::showTZRules( void ) { lines.append( i18n( "US: 1st Sun in Apr. (02:00) / Last Sun in Oct. (02:00)" ) ); lines.append( i18n( "ZN: Apr. 1 (01:00) / Oct. 1 (00:00)" ) ); - QString message = i18n( "Daylight Saving Time Rules" ); + TQString message = i18n( "Daylight Saving Time Rules" ); KMessageBox::informationList( 0, message, lines, message ); } diff --git a/kstars/kstars/locationdialog.h b/kstars/kstars/locationdialog.h index 0ed13489..275d8288 100644 --- a/kstars/kstars/locationdialog.h +++ b/kstars/kstars/locationdialog.h @@ -33,7 +33,7 @@ * *The bottom section allows the location to be specified manually. *The Longitude, Latitude, City name, Province/State name, and Country name - *are entered into KLineEdits. There is also a QPushButton for adding the + *are entered into KLineEdits. There is also a TQPushButton for adding the *location to the custom Cities database. If the user selects "Add" without *filling in all of the manual entry fields, an error message is displayed. *@short Geographic Location dialog @@ -64,7 +64,7 @@ public: *Constructor. Create all widgets, and pack them into QLayouts. *Connect Signals to Slots. Run initCityList(). */ - LocationDialog( QWidget* parent = 0 ); + LocationDialog( TQWidget* parent = 0 ); /** *Destructor (empty) */ @@ -83,7 +83,7 @@ public: /**@return pointer to the List of filtered city pointers. */ - QPtrList<GeoLocation>* filteredList() { return &filteredCityList; } + TQPtrList<GeoLocation>* filteredList() { return &filteredCityList; } /**@short Show only cities within 3 degrees of point specified by arguments *@param longitude the longitude of the search point (int) @@ -93,15 +93,15 @@ public: /**@return the city name of the selected location. */ - QString selectedCityName( void ) const { return SelectedCity->translatedName(); } + TQString selectedCityName( void ) const { return SelectedCity->translatedName(); } /**@return the province name of the selected location. */ - QString selectedProvinceName( void ) const { return SelectedCity->translatedProvince(); } + TQString selectedProvinceName( void ) const { return SelectedCity->translatedProvince(); } /**@return the country name of the selected location. */ - QString selectedCountryName( void ) const { return SelectedCity->translatedCountry(); } + TQString selectedCountryName( void ) const { return SelectedCity->translatedCountry(); } /**@return true if the AddCityBUtton is enabled */ @@ -111,18 +111,18 @@ public slots: /** *When text is entered in the City/Province/Country Filter KLineEdits, *the List of cities is trimmed to show only cities beginning with the entered text. - *Also, the QMemArray of ID numbers is kept in sync with the filtered list. + *Also, the TQMemArray of ID numbers is kept in sync with the filtered list. */ void filterCity( void ); /** - *When the selected city in the QListBox changes, repaint the MapCanvas + *When the selected city in the TQListBox changes, repaint the MapCanvas *so that the crosshairs icon appears on the newly selected city. */ void changeCity( void ); /** - *When the "Add new city" QPushButton is clicked, add the manually-entered + *When the "Add new city" TQPushButton is clicked, add the manually-entered *city information to the user's custom city database. */ void addCity( void ); @@ -141,24 +141,24 @@ private: bool checkLongLat( void ); bool dataModified, nameModified, bCityAdded; - QGridLayout *glay, *glay2; - QHBoxLayout *hlay, *hlayCoord, *hlayTZ, *hlayButtons, *hlay3; - QVBoxLayout *RootLay, *CityLay, *CoordLay, *vlay; - QGroupBox *CityBox, *CoordBox; - QLabel *CityFiltLabel, *ProvinceFiltLabel, *CountryFiltLabel; - QLabel *NewCityLabel, *NewProvinceLabel, *NewCountryLabel; - QLabel *LongLabel, *LatLabel, *CountLabel; - QLabel *TZLabel, *TZRuleLabel; + TQGridLayout *glay, *glay2; + TQHBoxLayout *hlay, *hlayCoord, *hlayTZ, *hlayButtons, *hlay3; + TQVBoxLayout *RootLay, *CityLay, *CoordLay, *vlay; + TQGroupBox *CityBox, *CoordBox; + TQLabel *CityFiltLabel, *ProvinceFiltLabel, *CountryFiltLabel; + TQLabel *NewCityLabel, *NewProvinceLabel, *NewCountryLabel; + TQLabel *LongLabel, *LatLabel, *CountLabel; + TQLabel *TZLabel, *TZRuleLabel; KLineEdit *NewCityName, *NewProvinceName, *NewCountryName; KLineEdit *CityFilter, *ProvinceFilter, *CountryFilter; dmsBox *NewLong, *NewLat; - QComboBox *TZBox, *TZRuleBox; - QPushButton *AddCityButton, *ClearFields, *ShowTZRules; + TQComboBox *TZBox, *TZRuleBox; + TQPushButton *AddCityButton, *ClearFields, *ShowTZRules; MapCanvas *MapView; - QListBox *GeoBox; + TQListBox *GeoBox; GeoLocation *SelectedCity; - QPtrList<GeoLocation> filteredCityList; + TQPtrList<GeoLocation> filteredCityList; }; #endif diff --git a/kstars/kstars/magnitudespinbox.cpp b/kstars/kstars/magnitudespinbox.cpp index baa7d05e..2f4b1930 100644 --- a/kstars/kstars/magnitudespinbox.cpp +++ b/kstars/kstars/magnitudespinbox.cpp @@ -17,13 +17,13 @@ #include "magnitudespinbox.h" -MagnitudeSpinBox::MagnitudeSpinBox( QWidget * parent , const char * name ) +MagnitudeSpinBox::MagnitudeSpinBox( TQWidget * parent , const char * name ) : KDoubleNumInput( 0.0, 10.0, 0.0, 0.1 /*step*/, 1 /*precision*/, parent, name) { } MagnitudeSpinBox::MagnitudeSpinBox( double minValue, double maxValue, - QWidget * parent , const char * name ) + TQWidget * parent , const char * name ) : KDoubleNumInput( minValue, maxValue, minValue, 0.1 /* step */, 1, parent, name) { } diff --git a/kstars/kstars/magnitudespinbox.h b/kstars/kstars/magnitudespinbox.h index cc4dc619..f4f62d53 100644 --- a/kstars/kstars/magnitudespinbox.h +++ b/kstars/kstars/magnitudespinbox.h @@ -36,11 +36,11 @@ class MagnitudeSpinBox : public KDoubleNumInput /**Default Constructor. */ - MagnitudeSpinBox( QWidget* parent = 0, const char* name = 0); + MagnitudeSpinBox( TQWidget* parent = 0, const char* name = 0); /**Constructor. Set minimum and maximum values for the spinbox. */ - MagnitudeSpinBox( double minValue, double maxValue, QWidget* parent = 0, const char* name = 0); + MagnitudeSpinBox( double minValue, double maxValue, TQWidget* parent = 0, const char* name = 0); }; diff --git a/kstars/kstars/main.cpp b/kstars/kstars/main.cpp index d3ddbfe2..a16acfbc 100644 --- a/kstars/kstars/main.cpp +++ b/kstars/kstars/main.cpp @@ -72,8 +72,8 @@ int main(int argc, char *argv[]) //parse filename and image format const char* format = "PNG"; - QString fname = args->getOption( "filename" ); - QString ext = fname.mid( fname.findRev(".")+1 ); + TQString fname = args->getOption( "filename" ); + TQString ext = fname.mid( fname.findRev(".")+1 ); if ( ext.lower() == "png" ) { format = "PNG"; } else if ( ext.lower() == "jpg" || ext.lower() == "jpeg" ) { format = "JPG"; } else if ( ext.lower() == "gif" ) { format = "GIF"; } @@ -94,7 +94,7 @@ int main(int argc, char *argv[]) } KStarsData *dat = new KStarsData(); - QObject::connect( dat, SIGNAL( progressText(QString) ), dat, SLOT( slotConsoleMessage(QString) ) ); + TQObject::connect( dat, TQT_SIGNAL( progressText(TQString) ), dat, TQT_SLOT( slotConsoleMessage(TQString) ) ); dat->initialize(); while (!dat->startupComplete) { kapp->processEvents(50); } @@ -106,7 +106,7 @@ int main(int argc, char *argv[]) //set clock now that we have a location: //Check to see if user provided a date/time string. If not, use current CPU time - QString datestring = args->getOption( "date" ); + TQString datestring = args->getOption( "date" ); KStarsDateTime kdt; if ( ! datestring.isEmpty() ) { if ( datestring.contains( "-" ) ) { //assume ISODate format @@ -114,7 +114,7 @@ int main(int argc, char *argv[]) kdt = KStarsDateTime::fromString( datestring, Qt::ISODate ); } else { //string probably contains date only kdt.setDate( ExtDate::fromString( datestring, Qt::ISODate ) ); - kdt.setTime( QTime( 0, 0, 0 ) ); + kdt.setTime( TQTime( 0, 0, 0 ) ); } } else { //assume Text format for date string kdt = dat->geo()->LTtoUT( KStarsDateTime::fromString( datestring, Qt::TextDate ) ); @@ -140,7 +140,7 @@ int main(int argc, char *argv[]) SkyMap *map = new SkyMap( dat ); map->resize( w, h ); - QPixmap sky( w, h ); + TQPixmap sky( w, h ); map->setDestination( new SkyPoint( Options::focusRA(), Options::focusDec() ) ); map->destination()->EquatorialToHorizontal( dat->lst(), dat->geo()->lat() ); @@ -148,7 +148,7 @@ int main(int argc, char *argv[]) map->focus()->EquatorialToHorizontal( dat->lst(), dat->geo()->lat() ); //Execute the specified script - QString scriptfile = args->getOption( "script" ); + TQString scriptfile = args->getOption( "script" ); if ( ! scriptfile.isEmpty() ) { if ( dat->executeScript( scriptfile, map ) ) { std::cout << i18n( "Script executed." ).utf8() << std::endl; @@ -176,7 +176,7 @@ int main(int argc, char *argv[]) //start up normally in GUI mode //Try to parse the given date string - QString datestring = args->getOption( "date" ); + TQString datestring = args->getOption( "date" ); if ( ! datestring.isEmpty() && ! KStarsDateTime::fromString( datestring ).isValid() ) { kdWarning() << i18n("Specified date (%1) is invalid. Will use current CPU date instead." ).arg( datestring ) << endl; @@ -185,7 +185,7 @@ int main(int argc, char *argv[]) new KStars( true, ! args->isSet( "paused" ), datestring ); args->clear(); - QObject::connect(kapp, SIGNAL(lastWindowClosed()), kapp, SLOT(quit())); + TQObject::connect(kapp, TQT_SIGNAL(lastWindowClosed()), kapp, TQT_SLOT(quit())); return a.exec(); } diff --git a/kstars/kstars/mapcanvas.cpp b/kstars/kstars/mapcanvas.cpp index dc60c2bc..85dbd1ca 100644 --- a/kstars/kstars/mapcanvas.cpp +++ b/kstars/kstars/mapcanvas.cpp @@ -17,23 +17,23 @@ #include <stdlib.h> #include <kstandarddirs.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include "mapcanvas.h" #include "locationdialog.h" #include "kstars.h" #include "kstarsdata.h" -MapCanvas::MapCanvas(QWidget *parent, const char *name ) : QWidget(parent,name) { +MapCanvas::MapCanvas(TQWidget *parent, const char *name ) : TQWidget(parent,name) { BGColor = "#33A"; - setBackgroundColor( QColor( BGColor ) ); - setBackgroundMode( QWidget::NoBackground ); - Canvas = new QPixmap(); - bgImage = new QPixmap(); + setBackgroundColor( TQColor( BGColor ) ); + setBackgroundMode( TQWidget::NoBackground ); + Canvas = new TQPixmap(); + bgImage = new TQPixmap(); LocationDialog *ld = (LocationDialog *)topLevelWidget(); KStars *ks = (KStars *)ld->parent(); - QString bgFile = ks->data()->stdDirs->findResource( "data", "kstars/geomap.png" ); + TQString bgFile = ks->data()->stdDirs->findResource( "data", "kstars/geomap.png" ); bgImage->load( bgFile, "PNG" ); } @@ -43,20 +43,20 @@ MapCanvas::~MapCanvas(){ } void MapCanvas::setGeometry( int x, int y, int w, int h ) { - QWidget::setGeometry( x, y, w, h ); + TQWidget::setGeometry( x, y, w, h ); Canvas->resize( w, h ); origin.setX( w/2 ); origin.setY( h/2 ); } -void MapCanvas::setGeometry( const QRect &r ) { - QWidget::setGeometry( r ); +void MapCanvas::setGeometry( const TQRect &r ) { + TQWidget::setGeometry( r ); Canvas->resize( r.width(), r.height() ); origin.setX( r.width()/2 ); origin.setY( r.height()/2 ); } -void MapCanvas::mousePressEvent( QMouseEvent *e ) { +void MapCanvas::mousePressEvent( TQMouseEvent *e ) { LocationDialog *ld = (LocationDialog *)topLevelWidget(); //Determine Lat/Long corresponding to event press @@ -66,20 +66,20 @@ void MapCanvas::mousePressEvent( QMouseEvent *e ) { ld->findCitiesNear( lng, lat ); } -void MapCanvas::paintEvent( QPaintEvent * ) { - QPainter pcanvas; +void MapCanvas::paintEvent( TQPaintEvent * ) { + TQPainter pcanvas; LocationDialog *ld = (LocationDialog *)topLevelWidget(); KStars *ks = (KStars *)ld->parent(); //prepare the canvas pcanvas.begin( Canvas ); -// pcanvas.fillRect( 0, 0, width(), height(), QBrush( QColor( BGColor ) ) ); +// pcanvas.fillRect( 0, 0, width(), height(), TQBrush( TQColor( BGColor ) ) ); pcanvas.drawPixmap( 0, 0, *bgImage ); // pcanvas.setBrush( white ); - pcanvas.setPen( QPen( QColor( "SlateGrey" ) ) ); + pcanvas.setPen( TQPen( TQColor( "SlateGrey" ) ) ); //Draw cities - QPoint o; + TQPoint o; for ( GeoLocation *g=ks->data()->geoList.first(); g; g = ks->data()->geoList.next() ) { o.setX( int( g->lng()->Degrees() + origin.x() ) ); diff --git a/kstars/kstars/mapcanvas.h b/kstars/kstars/mapcanvas.h index 7183d939..666e51d2 100644 --- a/kstars/kstars/mapcanvas.h +++ b/kstars/kstars/mapcanvas.h @@ -21,8 +21,8 @@ #ifndef MAPCANVAS_H #define MAPCANVAS_H -#include <qwidget.h> -#include <qpoint.h> +#include <tqwidget.h> +#include <tqpoint.h> /**@class MapCanvas *Used in LocationDialog for displaying a map of the Earth. @@ -36,22 +36,22 @@ class QPixmap; -class MapCanvas : public QWidget { +class MapCanvas : public TQWidget { Q_OBJECT public: /**Default constructor. Initialize the widget: create pixmaps, load the *world map bitmap, set pointers to the main window and the *LocationDialog parent. */ - MapCanvas(QWidget *parent=0, const char *name=0); + MapCanvas(TQWidget *parent=0, const char *name=0); /**Destructor (empty) */ ~MapCanvas(); public slots: - /**Set the geometry of the map widget (overloaded from QWidget). + /**Set the geometry of the map widget (overloaded from TQWidget). *Resizes the size of the map pixmap to match the widget, and resets - *the Origin QPoint so it remains at the center of the widget. + *the Origin TQPoint so it remains at the center of the widget. *@note this is called automatically by resize events. *@p x the x-position of the widget *@p y the y-position of the widget @@ -60,15 +60,15 @@ public slots: */ virtual void setGeometry( int x, int y, int w, int h ); - /**Set the geometry of the map widget (overloaded from QWidget). + /**Set the geometry of the map widget (overloaded from TQWidget). *Resizes the size of the map pixmap to match the widget, and resets - *the Origin QPoint so it remains at the center of the widget. + *the Origin TQPoint so it remains at the center of the widget. *This function behaves just like the above function. It differs *only in the data type of its argument. *@note this is called automatically by resize events. - *@p r QRect describing geometry + *@p r TQRect describing geometry */ - virtual void setGeometry( const QRect &r ); + virtual void setGeometry( const TQRect &r ); protected: /**Draw the map. Draw grey dots on the locations of all cities, @@ -77,18 +77,18 @@ protected: *currently-selected city. *@see LocationDialog */ - virtual void paintEvent( QPaintEvent *e ); + virtual void paintEvent( TQPaintEvent *e ); /**Trim the list of cities so that only those within 2 degrees *of the mouse click are shown in the list. *@see LocationDialog */ - virtual void mousePressEvent( QMouseEvent *e ); + virtual void mousePressEvent( TQMouseEvent *e ); private: - QPixmap *Canvas, *bgImage; - QString BGColor; - QPoint origin; + TQPixmap *Canvas, *bgImage; + TQString BGColor; + TQPoint origin; }; #endif diff --git a/kstars/kstars/objectnamelist.cpp b/kstars/kstars/objectnamelist.cpp index daa1305d..b86fdac8 100644 --- a/kstars/kstars/objectnamelist.cpp +++ b/kstars/kstars/objectnamelist.cpp @@ -20,7 +20,7 @@ #include "skyobject.h" #include "starobject.h" -#include <qstring.h> +#include <tqstring.h> #include <kdebug.h> ObjectNameList::ObjectNameList() { @@ -55,14 +55,14 @@ void ObjectNameList::setMode( Mode m ) { void ObjectNameList::append( SkyObject *object, bool useLongName ) { amount++; // create name string and init with longname if forced by parameter else default name - QString name = ( useLongName ) ? object->longname() : object->name(); + TQString name = ( useLongName ) ? object->longname() : object->name(); //if star's name is it's genetive name, make sure we don't use the Greek charcter here if ( object->type() == 0 && name == ((StarObject*)object)->gname() ) name = ((StarObject*)object)->gname( false ); // create string with translated name - QString iName; + TQString iName; if ( object->type() == -1 ) { // constellation iName = i18n( "Constellation name (optional)", name.local8Bit().data() ); @@ -94,7 +94,7 @@ void ObjectNameList::append( SkyObject *object, bool useLongName ) { unsorted[currentIndex] = true; } -SkyObjectName* ObjectNameList::first( const QString &name ) { +SkyObjectName* ObjectNameList::first( const TQString &name ) { sort(); SkyObjectName *soName = 0; // set mode: string is empty set mode to all lists @@ -138,13 +138,13 @@ SkyObjectName* ObjectNameList::next() { return soName; } -int ObjectNameList::getIndex( const QString &name ) { +int ObjectNameList::getIndex( const TQString &name ) { // default index is 0 if object name starts with a number int index = 0; // if object name starts with a letter, so get index number between 1 and 26 if ( !name.isEmpty() ) { - QChar firstLetter = name[0]; + TQChar firstLetter = name[0]; if ( firstLetter ) { if ( firstLetter.isLetter() ) { const unsigned char letter = (unsigned char) firstLetter.lower(); @@ -179,7 +179,7 @@ void ObjectNameList::sort() { } } -void ObjectNameList::remove ( const QString &name ) { +void ObjectNameList::remove ( const TQString &name ) { setMode(oneList); int index = getIndex(name); SortedList <SkyObjectName> *l = &(list[language][index]); @@ -188,14 +188,14 @@ void ObjectNameList::remove ( const QString &name ) { if ( son ) l->remove( son ); } -SkyObjectName* ObjectNameList::find(const QString &name) { +SkyObjectName* ObjectNameList::find(const TQString &name) { sort(); if (name.isNull()) return 0; // find works only in one list and not in all lists setMode(oneList); // items are stored translated (JH: Why? this whole class is confusing...) - QString translatedName = i18n(name.utf8()); + TQString translatedName = i18n(name.utf8()); int index = getIndex(name); diff --git a/kstars/kstars/objectnamelist.h b/kstars/kstars/objectnamelist.h index 8e819c3a..691311ee 100644 --- a/kstars/kstars/objectnamelist.h +++ b/kstars/kstars/objectnamelist.h @@ -20,7 +20,7 @@ /**@class ObjectNameList - *This class provides an interface like a QPtrList, but sorts objects internally + *This class provides an interface like a TQPtrList, but sorts objects internally *in 27 lists. The objects are sorted alphabetically. List 0 contains all objects *beginning not with a letter. List 1 - 26 contains objects beginning with a letter. *The number of the list is similar to positon of letter in alphabet. (A = 1 .. Z = 26 ) @@ -29,17 +29,17 @@ */ -#include <qglobal.h> -#include <qptrlist.h> -#include <qstring.h> +#include <tqglobal.h> +#include <tqptrlist.h> +#include <tqstring.h> class SkyObject; class SkyObjectName; -/**Reimplemented from QPtrList for sorting objects in the list. */ -template <class T> class SortedList : public QPtrList <T> { +/**Reimplemented from TQPtrList for sorting objects in the list. */ +template <class T> class SortedList : public TQPtrList <T> { protected: - int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2) { + int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2) { if ( *((T*)item1) == *((T*)item2) ) return 0; return ( *((T*)item1) < *((T*)item2) ) ? -1 : 1; } @@ -71,7 +71,7 @@ class ObjectNameList { *@return pointer to the first object in the selected list. *@param name the name to use in selecting a list. */ - SkyObjectName* first(const QString &name = QString::null); + SkyObjectName* first(const TQString &name = TQString::null); /**Returns next object in the currently selected list. *@return pointer to the next object in the current list, or NULL if @@ -87,13 +87,13 @@ class ObjectNameList { *@param name name of object to find. *@return pointer to object with the given name */ - SkyObjectName* find(const QString &name = QString::null); + SkyObjectName* find(const TQString &name = TQString::null); /**@short remove the named object from the list. *@param name the name of the object to be removed. *@note If the object is not found, then nothing happens. */ - void remove( const QString &name = QString::null ); + void remove( const TQString &name = TQString::null ); /**Define the language which should be used for constellation names */ @@ -128,7 +128,7 @@ class ObjectNameList { *of the list itself. *@param name the name of the object whose index is to be found */ - int getIndex( const QString &name = QString::null ); + int getIndex( const TQString &name = TQString::null ); /**Two modes are available: *allLists = loop through the whole list if next() is called @@ -158,7 +158,7 @@ class ObjectNameList { *are in first list too. We just have to delete objects which are not in first list. These objects *will stored in this list. */ - QPtrList <SkyObjectName> constellations; + TQPtrList <SkyObjectName> constellations; /** *Which list was accessed last time by first() or next() diff --git a/kstars/kstars/opsadvanced.cpp b/kstars/kstars/opsadvanced.cpp index 5fe1953b..7a503f08 100644 --- a/kstars/kstars/opsadvanced.cpp +++ b/kstars/kstars/opsadvanced.cpp @@ -15,16 +15,16 @@ * * ***************************************************************************/ -#include <qlabel.h> -#include <qcheckbox.h> -#include <qgroupbox.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> #include "opsadvanced.h" #include "Options.h" #include "kstars.h" #include "timestepbox.h" -OpsAdvanced::OpsAdvanced( QWidget *p, const char *name, WFlags fl ) +OpsAdvanced::OpsAdvanced( TQWidget *p, const char *name, WFlags fl ) : OpsAdvancedUI( p, name, fl ) { ksw = (KStars *)p; @@ -32,9 +32,9 @@ OpsAdvanced::OpsAdvanced( QWidget *p, const char *name, WFlags fl ) //Initialize the timestep value SlewTimeScale->tsbox()->changeScale( Options::slewTimeScale() ); - connect( SlewTimeScale, SIGNAL( scaleChanged( float ) ), this, SLOT( slotChangeTimeScale( float ) ) ); + connect( SlewTimeScale, TQT_SIGNAL( scaleChanged( float ) ), this, TQT_SLOT( slotChangeTimeScale( float ) ) ); - connect( kcfg_HideOnSlew, SIGNAL( clicked() ), this, SLOT( slotToggleHideOptions() ) ); + connect( kcfg_HideOnSlew, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotToggleHideOptions() ) ); } OpsAdvanced::~OpsAdvanced() {} diff --git a/kstars/kstars/opsadvanced.h b/kstars/kstars/opsadvanced.h index fd5596ee..9295e437 100644 --- a/kstars/kstars/opsadvanced.h +++ b/kstars/kstars/opsadvanced.h @@ -38,7 +38,7 @@ class OpsAdvanced : public OpsAdvancedUI Q_OBJECT public: - OpsAdvanced( QWidget *parent=0, const char *name=0, WFlags fl = 0 ); + OpsAdvanced( TQWidget *parent=0, const char *name=0, WFlags fl = 0 ); ~OpsAdvanced(); private slots: diff --git a/kstars/kstars/opscatalog.cpp b/kstars/kstars/opscatalog.cpp index d67f58ac..60f45aaa 100644 --- a/kstars/kstars/opscatalog.cpp +++ b/kstars/kstars/opscatalog.cpp @@ -15,9 +15,9 @@ * * ***************************************************************************/ -#include <qlistview.h> //QCheckListItem -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqlistview.h> //QCheckListItem +#include <tqcheckbox.h> +#include <tqlabel.h> #include <kfiledialog.h> #include "opscatalog.h" @@ -29,22 +29,22 @@ #include "magnitudespinbox.h" #include "customcatalog.h" -OpsCatalog::OpsCatalog( QWidget *p, const char *name, WFlags fl ) +OpsCatalog::OpsCatalog( TQWidget *p, const char *name, WFlags fl ) : OpsCatalogUI( p, name, fl ) { ksw = (KStars *)p; //Populate CatalogList - showIC = new QCheckListItem( CatalogList, i18n( "Index Catalog (IC)" ), QCheckListItem::CheckBox ); + showIC = new TQCheckListItem( CatalogList, i18n( "Index Catalog (IC)" ), TQCheckListItem::CheckBox ); showIC->setOn( Options::showIC() ); - showNGC = new QCheckListItem( CatalogList, i18n( "New General Catalog (NGC)" ), QCheckListItem::CheckBox ); + showNGC = new TQCheckListItem( CatalogList, i18n( "New General Catalog (NGC)" ), TQCheckListItem::CheckBox ); showNGC->setOn( Options::showNGC() ); - showMessImages = new QCheckListItem( CatalogList, i18n( "Messier Catalog (images)" ), QCheckListItem::CheckBox ); + showMessImages = new TQCheckListItem( CatalogList, i18n( "Messier Catalog (images)" ), TQCheckListItem::CheckBox ); showMessImages->setOn( Options::showMessierImages() ); - showMessier = new QCheckListItem( CatalogList, i18n( "Messier Catalog (symbols)" ), QCheckListItem::CheckBox ); + showMessier = new TQCheckListItem( CatalogList, i18n( "Messier Catalog (symbols)" ), TQCheckListItem::CheckBox ); showMessier->setOn( Options::showMessier() ); kcfg_MagLimitDrawStar->setValue( Options::magLimitDrawStar() ); @@ -60,21 +60,21 @@ OpsCatalog::OpsCatalog( QWidget *p, const char *name, WFlags fl ) //Add custom catalogs, if necessary for ( unsigned int i=0; i<ksw->data()->customCatalogs().count(); ++i ) { //loop over custom catalogs - QCheckListItem *newItem = new QCheckListItem( CatalogList, ksw->data()->customCatalogs().at(i)->name(), QCheckListItem::CheckBox ); + TQCheckListItem *newItem = new TQCheckListItem( CatalogList, ksw->data()->customCatalogs().at(i)->name(), TQCheckListItem::CheckBox ); newItem->setOn( Options::showCatalog()[i] ); } - connect( CatalogList, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( updateDisplay() ) ); - connect( CatalogList, SIGNAL( selectionChanged() ), this, SLOT( selectCatalog() ) ); - connect( AddCatalog, SIGNAL( clicked() ), this, SLOT( slotAddCatalog() ) ); - connect( LoadCatalog, SIGNAL( clicked() ), this, SLOT( slotLoadCatalog() ) ); - connect( RemoveCatalog, SIGNAL( clicked() ), this, SLOT( slotRemoveCatalog() ) ); - - connect( kcfg_MagLimitDrawStar, SIGNAL( valueChanged(double) ), - SLOT( slotSetDrawStarMagnitude(double) ) ); - connect( kcfg_MagLimitDrawStarZoomOut, SIGNAL( valueChanged(double) ), - SLOT( slotSetDrawStarZoomOutMagnitude(double) ) ); - connect( kcfg_ShowStars, SIGNAL( toggled(bool) ), SLOT( slotStarWidgets(bool) ) ); + connect( CatalogList, TQT_SIGNAL( clicked( TQListViewItem* ) ), this, TQT_SLOT( updateDisplay() ) ); + connect( CatalogList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( selectCatalog() ) ); + connect( AddCatalog, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddCatalog() ) ); + connect( LoadCatalog, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotLoadCatalog() ) ); + connect( RemoveCatalog, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveCatalog() ) ); + + connect( kcfg_MagLimitDrawStar, TQT_SIGNAL( valueChanged(double) ), + TQT_SLOT( slotSetDrawStarMagnitude(double) ) ); + connect( kcfg_MagLimitDrawStarZoomOut, TQT_SIGNAL( valueChanged(double) ), + TQT_SLOT( slotSetDrawStarZoomOutMagnitude(double) ) ); + connect( kcfg_ShowStars, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotStarWidgets(bool) ) ); } //empty destructor @@ -82,7 +82,7 @@ OpsCatalog::~OpsCatalog() {} void OpsCatalog::updateDisplay() { //Modify display according to settings in the CatalogList - if ( sender()->name() == QString( "CatalogList" ) ) + if ( sender()->name() == TQString( "CatalogList" ) ) Options::setShowDeepSky( true ); Options::setShowMessier( showMessier->isOn() ); @@ -90,7 +90,7 @@ void OpsCatalog::updateDisplay() { Options::setShowNGC( showNGC->isOn() ); Options::setShowIC( showIC->isOn() ); for ( unsigned int i=0; i<ksw->data()->customCatalogs().count(); ++i ) { - QCheckListItem *item = (QCheckListItem*)( CatalogList->findItem( ksw->data()->customCatalogs().at(i)->name(), 0 )); + TQCheckListItem *item = (TQCheckListItem*)( CatalogList->findItem( ksw->data()->customCatalogs().at(i)->name(), 0 )); Options::showCatalog()[i] = item->isOn(); } @@ -114,13 +114,13 @@ void OpsCatalog::selectCatalog() { void OpsCatalog::slotAddCatalog() { AddCatDialog ac(this); - if ( ac.exec()==QDialog::Accepted ) + if ( ac.exec()==TQDialog::Accepted ) insertCatalog( ac.filename() ); } void OpsCatalog::slotLoadCatalog() { //Get the filename from the user - QString filename = KFileDialog::getOpenFileName( QDir::homeDirPath(), "*"); + TQString filename = KFileDialog::getOpenFileName( TQDir::homeDirPath(), "*"); if ( ! filename.isEmpty() ) { //test integrity of file before trying to add it CustomCatalog *newCat = ksw->data()->createCustomCatalog( filename, true ); //true = show errors @@ -133,19 +133,19 @@ void OpsCatalog::slotLoadCatalog() { } } -void OpsCatalog::insertCatalog( const QString &filename ) { +void OpsCatalog::insertCatalog( const TQString &filename ) { //Add new custom catalog, based on the list of SkyObjects we just parsed ksw->data()->addCatalog( filename ); //Get the new catalog's name, add entry to the listbox - QString name = ksw->data()->customCatalogs().current()->name(); - QCheckListItem *newCat = new QCheckListItem( CatalogList, name, QCheckListItem::CheckBox ); + TQString name = ksw->data()->customCatalogs().current()->name(); + TQCheckListItem *newCat = new TQCheckListItem( CatalogList, name, TQCheckListItem::CheckBox ); newCat->setOn( true ); CatalogList->insertItem( newCat ); //update Options object - QStringList tFileList = Options::catalogFile(); - QValueList<int> tShowList = Options::showCatalog(); + TQStringList tFileList = Options::catalogFile(); + TQValueList<int> tShowList = Options::showCatalog(); tFileList.append( filename ); tShowList.append( true ); Options::setCatalogFile( tFileList ); @@ -162,8 +162,8 @@ void OpsCatalog::slotRemoveCatalog() { ksw->data()->removeCatalog( i ); //Update Options object - QStringList tFileList = Options::catalogFile(); - QValueList<int> tShowList = Options::showCatalog(); + TQStringList tFileList = Options::catalogFile(); + TQValueList<int> tShowList = Options::showCatalog(); tFileList.remove( tFileList[i] ); tShowList.remove( tShowList[i] ); Options::setCatalogFile( tFileList ); diff --git a/kstars/kstars/opscatalog.h b/kstars/kstars/opscatalog.h index dd33f60a..514d9ea9 100644 --- a/kstars/kstars/opscatalog.h +++ b/kstars/kstars/opscatalog.h @@ -41,7 +41,7 @@ class OpsCatalog : public OpsCatalogUI Q_OBJECT public: - OpsCatalog( QWidget *parent=0, const char *name=0, WFlags fl = 0 ); + OpsCatalog( TQWidget *parent=0, const char *name=0, WFlags fl = 0 ); ~OpsCatalog(); private slots: @@ -55,9 +55,9 @@ private slots: void slotStarWidgets(bool on); private: - void insertCatalog( const QString & filename ); + void insertCatalog( const TQString & filename ); - QCheckListItem *showMessier, *showMessImages, *showNGC, *showIC; + TQCheckListItem *showMessier, *showMessImages, *showNGC, *showIC; KStars *ksw; }; diff --git a/kstars/kstars/opscolors.cpp b/kstars/kstars/opscolors.cpp index 723fd559..8746dd00 100644 --- a/kstars/kstars/opscolors.cpp +++ b/kstars/kstars/opscolors.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qfile.h> +#include <tqfile.h> #include <klocale.h> #include <knuminput.h> @@ -32,15 +32,15 @@ #include "skymap.h" #include "colorscheme.h" -OpsColors::OpsColors( QWidget *p, const char *name, WFlags fl ) +OpsColors::OpsColors( TQWidget *p, const char *name, WFlags fl ) : OpsColorsUI( p, name, fl ) { ksw = (KStars *)p; //Populate list of adjustable colors for ( unsigned int i=0; i < ksw->data()->colorScheme()->numberOfColors(); ++i ) { - QPixmap col( 30, 20 ); - col.fill( QColor( ksw->data()->colorScheme()->colorAt( i ) ) ); + TQPixmap col( 30, 20 ); + col.fill( TQColor( ksw->data()->colorScheme()->colorAt( i ) ) ); ColorPalette->insertItem( col, ksw->data()->colorScheme()->nameAt( i ) ); } @@ -54,11 +54,11 @@ OpsColors::OpsColors( QWidget *p, const char *name, WFlags fl ) PresetFileList.append( "night.colors" ); PresetFileList.append( "moonless-night.colors" ); - QFile file; - QString line, schemeName, filename; + TQFile file; + TQString line, schemeName, filename; file.setName( locate( "appdata", "colors.dat" ) ); if ( file.exists() && file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { line = stream.readLine(); @@ -82,12 +82,12 @@ OpsColors::OpsColors( QWidget *p, const char *name, WFlags fl ) else kcfg_StarColorIntensity->setEnabled( true ); - connect( ColorPalette, SIGNAL( clicked( QListBoxItem* ) ), this, SLOT( newColor( QListBoxItem* ) ) ); - connect( kcfg_StarColorIntensity, SIGNAL( valueChanged( int ) ), this, SLOT( slotStarColorIntensity( int ) ) ); - connect( kcfg_StarColorMode, SIGNAL( activated( int ) ), this, SLOT( slotStarColorMode( int ) ) ); - connect( PresetBox, SIGNAL( highlighted( int ) ), this, SLOT( slotPreset( int ) ) ); - connect( AddPreset, SIGNAL( clicked() ), this, SLOT( slotAddPreset() ) ); - connect( RemovePreset, SIGNAL( clicked() ), this, SLOT( slotRemovePreset() ) ); + connect( ColorPalette, TQT_SIGNAL( clicked( TQListBoxItem* ) ), this, TQT_SLOT( newColor( TQListBoxItem* ) ) ); + connect( kcfg_StarColorIntensity, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotStarColorIntensity( int ) ) ); + connect( kcfg_StarColorMode, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotStarColorMode( int ) ) ); + connect( PresetBox, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( slotPreset( int ) ) ); + connect( AddPreset, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddPreset() ) ); + connect( RemovePreset, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemovePreset() ) ); RemovePreset->setEnabled( false ); } @@ -95,14 +95,14 @@ OpsColors::OpsColors( QWidget *p, const char *name, WFlags fl ) //empty destructor OpsColors::~OpsColors() {} -void OpsColors::newColor( QListBoxItem *item ) { - QPixmap pixmap( 30, 20 ); - QColor NewColor; +void OpsColors::newColor( TQListBoxItem *item ) { + TQPixmap pixmap( 30, 20 ); + TQColor NewColor; unsigned int i; for ( i=0; i < ksw->data()->colorScheme()->numberOfColors(); ++i ) { if ( item->text() == ksw->data()->colorScheme()->nameAt( i ) ) { - QColor col( ksw->data()->colorScheme()->colorAt( i ) ); + TQColor col( ksw->data()->colorScheme()->colorAt( i ) ); if(KColorDialog::getColor( col )) NewColor = col; break; @@ -120,19 +120,19 @@ void OpsColors::newColor( QListBoxItem *item ) { } void OpsColors::slotPreset( int index ) { - QStringList::Iterator it = PresetFileList.at( index ); + TQStringList::Iterator it = PresetFileList.at( index ); bool result = setColors( *it ); if (!result) { - QString message = i18n( "The specified color scheme file (%1) could not be found, or was corrupt." ).arg( QString(*it) ); + TQString message = i18n( "The specified color scheme file (%1) could not be found, or was corrupt." ).arg( TQString(*it) ); KMessageBox::sorry( 0, message, i18n( "Could Not Set Color Scheme" ) ); } } -bool OpsColors::setColors( QString filename ) { - QPixmap *temp = new QPixmap( 30, 20 ); +bool OpsColors::setColors( TQString filename ) { + TQPixmap *temp = new TQPixmap( 30, 20 ); //just checking if colorscheme is removable... - QFile test; + TQFile test; test.setName( locateLocal( "appdata", filename ) ); //try filename in local user KDE directory tree. if ( test.exists() ) RemovePreset->setEnabled( true ); else RemovePreset->setEnabled( false ); @@ -149,7 +149,7 @@ bool OpsColors::setColors( QString filename ) { ksw->map()->setStarColorIntensity( ksw->data()->colorScheme()->starColorIntensity() ); for ( unsigned int i=0; i < ksw->data()->colorScheme()->numberOfColors(); ++i ) { - temp->fill( QColor( ksw->data()->colorScheme()->colorAt( i ) ) ); + temp->fill( TQColor( ksw->data()->colorScheme()->colorAt( i ) ) ); ColorPalette->changeItem( *temp, ksw->data()->colorScheme()->nameAt( i ), i ); } @@ -159,72 +159,72 @@ bool OpsColors::setColors( QString filename ) { void OpsColors::slotAddPreset() { bool okPressed = false; - QString schemename = KInputDialog::getText( i18n( "New Color Scheme" ), + TQString schemename = KInputDialog::getText( i18n( "New Color Scheme" ), i18n( "Enter a name for the new color scheme:" ), - QString::null, &okPressed, 0 ); + TQString::null, &okPressed, 0 ); if ( okPressed && ! schemename.isEmpty() ) { if ( ksw->data()->colorScheme()->save( schemename ) ) { PresetBox->insertItem( schemename ); PresetBox->setCurrentItem( PresetBox->findItem( schemename ) ); - QString fname = ksw->data()->colorScheme()->fileName(); + TQString fname = ksw->data()->colorScheme()->fileName(); PresetFileList.append( fname ); - ksw->addColorMenuItem( schemename, QString("cs_" + fname.left(fname.find(".colors"))).utf8() ); + ksw->addColorMenuItem( schemename, TQString("cs_" + fname.left(fname.find(".colors"))).utf8() ); } } } void OpsColors::slotRemovePreset() { - QString name = PresetBox->currentText(); - QString filename = PresetFileList[ PresetBox->currentItem() ]; - QFile cdatFile; + TQString name = PresetBox->currentText(); + TQString filename = PresetFileList[ PresetBox->currentItem() ]; + TQFile cdatFile; cdatFile.setName( locateLocal( "appdata", "colors.dat" ) ); //determine filename in local user KDE directory tree. //Remove action from color-schemes menu - ksw->removeColorMenuItem( QString("cs_" + filename.left( filename.find(".colors"))).utf8() ); + ksw->removeColorMenuItem( TQString("cs_" + filename.left( filename.find(".colors"))).utf8() ); if ( !cdatFile.exists() || !cdatFile.open( IO_ReadWrite ) ) { - QString message = i18n( "Local color scheme index file could not be opened.\nScheme cannot be removed." ); + TQString message = i18n( "Local color scheme index file could not be opened.\nScheme cannot be removed." ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); } else { - //Remove entry from the ListBox and from the QStringList holding filenames. + //Remove entry from the ListBox and from the TQStringList holding filenames. //We don't want another color scheme to be selected, so first //temporarily disconnect the "highlighted" signal. - disconnect( PresetBox, SIGNAL( highlighted( int ) ), this, SLOT( slotPreset( int ) ) ); + disconnect( PresetBox, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( slotPreset( int ) ) ); PresetBox->removeItem( PresetBox->currentItem() ); PresetBox->setCurrentItem( -1 ); RemovePreset->setEnabled( false ); //Reconnect the "highlighted" signal - connect( PresetBox, SIGNAL( highlighted( int ) ), this, SLOT( slotPreset( int ) ) ); + connect( PresetBox, TQT_SIGNAL( highlighted( int ) ), this, TQT_SLOT( slotPreset( int ) ) ); - //Read the contents of colors.dat into a QStringList, except for the entry to be removed. - QTextStream stream( &cdatFile ); - QStringList slist; + //Read the contents of colors.dat into a TQStringList, except for the entry to be removed. + TQTextStream stream( &cdatFile ); + TQStringList slist; bool removed = false; while ( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if ( line.left( line.find(':') ) != name ) slist.append( line ); else removed = true; } if ( removed ) { //Entry was removed; delete the corresponding .colors file. - QFile colorFile; + TQFile colorFile; colorFile.setName( locateLocal( "appdata", filename ) ); //determine filename in local user KDE directory tree. if ( !colorFile.remove() ) { - QString message = i18n( "Could not delete the file: %1" ).arg( colorFile.name() ); + TQString message = i18n( "Could not delete the file: %1" ).arg( colorFile.name() ); KMessageBox::sorry( 0, message, i18n( "Error Deleting File" ) ); } //remove the old colors.dat file, and rebuild it with the modified string list. cdatFile.remove(); cdatFile.open( IO_ReadWrite ); - QTextStream stream2( &cdatFile ); + TQTextStream stream2( &cdatFile ); for( unsigned int i=0; i<slist.count(); ++i ) stream << slist[i] << endl; } else { - QString message = i18n( "Could not find an entry named %1 in colors.dat." ).arg( name ); + TQString message = i18n( "Could not find an entry named %1 in colors.dat." ).arg( name ); KMessageBox::sorry( 0, message, i18n( "Scheme Not Found" ) ); } cdatFile.close(); diff --git a/kstars/kstars/opscolors.h b/kstars/kstars/opscolors.h index d1a510d5..a6623ef0 100644 --- a/kstars/kstars/opscolors.h +++ b/kstars/kstars/opscolors.h @@ -17,7 +17,7 @@ #ifndef OPSCOLORS_H #define OPSCOLORS_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "opscolorsui.h" @@ -43,11 +43,11 @@ class OpsColors : public OpsColorsUI Q_OBJECT public: - OpsColors( QWidget *parent=0, const char *name=0, WFlags fl = 0 ); + OpsColors( TQWidget *parent=0, const char *name=0, WFlags fl = 0 ); ~OpsColors(); private slots: - void newColor( QListBoxItem* item ); + void newColor( TQListBoxItem* item ); void slotPreset( int i ); void slotAddPreset(); void slotRemovePreset(); @@ -55,11 +55,11 @@ private slots: void slotStarColorIntensity( int ); private: - bool setColors( QString filename ); + bool setColors( TQString filename ); KStars *ksw; - QStringList PresetFileList; + TQStringList PresetFileList; }; #endif //OPSCOLORS_H diff --git a/kstars/kstars/opsguides.cpp b/kstars/kstars/opsguides.cpp index ae6db674..aae84244 100644 --- a/kstars/kstars/opsguides.cpp +++ b/kstars/kstars/opsguides.cpp @@ -14,17 +14,17 @@ * * ***************************************************************************/ -#include <qbuttongroup.h> -#include <qcheckbox.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> #include "opsguides.h" -OpsGuides::OpsGuides( QWidget* parent, const char* name, WFlags fl ) +OpsGuides::OpsGuides( TQWidget* parent, const char* name, WFlags fl ) : OpsGuidesUI( parent, name, fl ) { - connect( kcfg_ShowCNames, SIGNAL( clicked() ), - this, SLOT( slotToggleConstellOptions() ) ); - connect( kcfg_ShowMilkyWay, SIGNAL( clicked() ), - this, SLOT( slotToggleMilkyWayOptions() ) ); + connect( kcfg_ShowCNames, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotToggleConstellOptions() ) ); + connect( kcfg_ShowMilkyWay, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotToggleMilkyWayOptions() ) ); } OpsGuides::~OpsGuides() diff --git a/kstars/kstars/opsguides.h b/kstars/kstars/opsguides.h index c5b09fd3..deb2ff50 100644 --- a/kstars/kstars/opsguides.h +++ b/kstars/kstars/opsguides.h @@ -24,7 +24,7 @@ class OpsGuides : public OpsGuidesUI Q_OBJECT public: - OpsGuides( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + OpsGuides( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~OpsGuides(); private slots: diff --git a/kstars/kstars/opssolarsystem.cpp b/kstars/kstars/opssolarsystem.cpp index 85b420c3..41ee58c0 100644 --- a/kstars/kstars/opssolarsystem.cpp +++ b/kstars/kstars/opssolarsystem.cpp @@ -14,23 +14,23 @@ * (at your option) any later version. * * * ***************************************************************************/ -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <kpushbutton.h> #include "opssolarsystem.h" #include "kstars.h" #include "magnitudespinbox.h" -OpsSolarSystem::OpsSolarSystem( QWidget *parent, const char *name, WFlags fl ) +OpsSolarSystem::OpsSolarSystem( TQWidget *parent, const char *name, WFlags fl ) : OpsSolarSystemUI( parent, name, fl ) { ksw = (KStars *)parent; - connect( kcfg_ShowAsteroids, SIGNAL( toggled(bool) ), SLOT( slotAsteroidWidgets(bool) ) ); - connect( kcfg_ShowComets, SIGNAL( toggled(bool) ), SLOT( slotCometWidgets(bool) ) ); - connect( ClearAllTrails, SIGNAL( clicked() ), ksw, SLOT( slotClearAllTrails() ) ); - connect( showAllPlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) ); - connect( showNonePlanets, SIGNAL( clicked() ), this, SLOT( slotSelectPlanets() ) ); + connect( kcfg_ShowAsteroids, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotAsteroidWidgets(bool) ) ); + connect( kcfg_ShowComets, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotCometWidgets(bool) ) ); + connect( ClearAllTrails, TQT_SIGNAL( clicked() ), ksw, TQT_SLOT( slotClearAllTrails() ) ); + connect( showAllPlanets, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSelectPlanets() ) ); + connect( showNonePlanets, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSelectPlanets() ) ); slotAsteroidWidgets( kcfg_ShowAsteroids->isChecked() ); slotCometWidgets( kcfg_ShowComets->isChecked() ); @@ -58,7 +58,7 @@ void OpsSolarSystem::slotCometWidgets( bool on ) { void OpsSolarSystem::slotSelectPlanets() { bool b=true; - if ( sender()->name() == QString( "showNonePlanets" ) ) b = false; + if ( sender()->name() == TQString( "showNonePlanets" ) ) b = false; kcfg_ShowSun->setChecked( b ); kcfg_ShowMoon->setChecked( b ); diff --git a/kstars/kstars/opssolarsystem.h b/kstars/kstars/opssolarsystem.h index e43fd8b7..07ce2c64 100644 --- a/kstars/kstars/opssolarsystem.h +++ b/kstars/kstars/opssolarsystem.h @@ -34,7 +34,7 @@ class OpsSolarSystem : public OpsSolarSystemUI Q_OBJECT public: - OpsSolarSystem( QWidget *parent=0, const char *name=0, WFlags fl = 0 ); + OpsSolarSystem( TQWidget *parent=0, const char *name=0, WFlags fl = 0 ); ~OpsSolarSystem(); private slots: diff --git a/kstars/kstars/planetcatalog.cpp b/kstars/kstars/planetcatalog.cpp index 9817e871..ce4b9351 100644 --- a/kstars/kstars/planetcatalog.cpp +++ b/kstars/kstars/planetcatalog.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qstring.h> +#include <tqstring.h> #include "planetcatalog.h" #include "dms.h" @@ -97,7 +97,7 @@ bool PlanetCatalog::initialize() { } void PlanetCatalog::addObject( ObjectNameList &ObjNames ) const { - QPtrListIterator<KSPlanetBase> it(planets); + TQPtrListIterator<KSPlanetBase> it(planets); for (KSPlanetBase *ksp = it.toFirst(); ksp != 0; ksp = ++it) { ObjNames.append( ksp ); @@ -122,7 +122,7 @@ bool PlanetCatalog::isPlanet(SkyObject *so) const { if (so == Earth) return true; - QPtrListIterator<KSPlanetBase> it(planets); + TQPtrListIterator<KSPlanetBase> it(planets); for (KSPlanetBase *ksp = it.toFirst(); ksp != 0; ksp = ++it) { if (so == ksp) @@ -132,11 +132,11 @@ bool PlanetCatalog::isPlanet(SkyObject *so) const { return false; } -KSPlanetBase *PlanetCatalog::findByName( const QString n) const { +KSPlanetBase *PlanetCatalog::findByName( const TQString n) const { if (n == "Earth") return Earth; - QPtrListIterator<KSPlanetBase> it(planets); + TQPtrListIterator<KSPlanetBase> it(planets); for (KSPlanetBase *ksp = it.toFirst(); ksp != 0; ksp = ++it) { if (ksp->name() == n) @@ -157,7 +157,7 @@ static double dist_squared(const SkyPoint *a, const SkyPoint *b) { } SkyObject *PlanetCatalog::findClosest(const SkyPoint *p, double &r) const { - QPtrListIterator<KSPlanetBase> it(planets); + TQPtrListIterator<KSPlanetBase> it(planets); SkyObject *found = 0; double trialr = 0.0; double rmin = 100000.0; diff --git a/kstars/kstars/planetcatalog.h b/kstars/kstars/planetcatalog.h index 3a263e95..976372b9 100644 --- a/kstars/kstars/planetcatalog.h +++ b/kstars/kstars/planetcatalog.h @@ -19,9 +19,9 @@ #define PLANETCATALOG_H /**@class PlanetCatalog - *This class contains a QPtrList of the eight major planets, as well as pointers + *This class contains a TQPtrList of the eight major planets, as well as pointers *to objects representing the Earth and Sun. Note that the Sun also exists - *in the QPtrList, the external pointer is just for convenience. + *in the TQPtrList, the external pointer is just for convenience. *There are methods to search *the collection by name, identify if a given object pointer is a planet, *find the coordinates of a planet, and find the planet closest to a given @@ -31,9 +31,9 @@ *@version 1.0 */ -#include <qglobal.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqglobal.h> +#include <tqobject.h> +#include <tqptrlist.h> class QString; class KStarsData; @@ -46,14 +46,14 @@ class SkyObject; class ObjectNameList; class dms; -class PlanetCatalog : public QObject { +class PlanetCatalog : public TQObject { Q_OBJECT public: /**Constructor. */ PlanetCatalog(KStarsData *dat); - /**Destructor. Delete the Earth object (all others auto-deleted by QPtrList)*/ + /**Destructor. Delete the Earth object (all others auto-deleted by TQPtrList)*/ ~PlanetCatalog(); /**Loads all planetary data from files on disk into the appropriate objects. */ @@ -92,7 +92,7 @@ class PlanetCatalog : public QObject { *@p n the name of the planet to point to *@note if no planet with this name is found, return the NULL pointer. */ - KSPlanetBase *findByName( const QString n) const; + KSPlanetBase *findByName( const TQString n) const; /**@return a pointer to the planet closest to the given SkyPoint *(within a maximum angular search radius) @@ -102,7 +102,7 @@ class PlanetCatalog : public QObject { SkyObject *findClosest(const SkyPoint *p, double &r) const; private: - QPtrList<KSPlanetBase> planets; + TQPtrList<KSPlanetBase> planets; KSPlanet *Earth; KSSun *Sun; KStarsData *kd; diff --git a/kstars/kstars/simclock.cpp b/kstars/kstars/simclock.cpp index ee486a86..0e7c467a 100644 --- a/kstars/kstars/simclock.cpp +++ b/kstars/kstars/simclock.cpp @@ -25,9 +25,9 @@ int SimClock::idgen = 1; int SimClock::TimerInterval = 100; //msec -SimClock::SimClock(QObject *parent, const KStarsDateTime &when) : - DCOPObject("clock#" + QCString().setNum(idgen++)), - QObject(parent), +SimClock::SimClock(TQObject *parent, const KStarsDateTime &when) : + DCOPObject("clock#" + TQCString().setNum(idgen++)), + TQObject(parent), tmr(this) { if (! when.isValid() ) tmr.stop(); @@ -38,12 +38,12 @@ SimClock::SimClock(QObject *parent, const KStarsDateTime &when) : ManualMode = false; ManualActive = false; - QObject::connect(&tmr, SIGNAL(timeout()), this, SLOT(tick())); + TQObject::connect(&tmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(tick())); } SimClock::SimClock (const SimClock &old) : - DCOPObject("clock#" + QCString().setNum(idgen++)), - QObject(old.parent()), + DCOPObject("clock#" + TQCString().setNum(idgen++)), + TQObject(old.parent()), SimClockInterface(), tmr(this) { @@ -54,7 +54,7 @@ SimClock::SimClock (const SimClock &old) : ManualMode = old.ManualMode; ManualActive = old.ManualActive; - QObject::connect(&tmr, SIGNAL(timeout()), this, SLOT(tick())); + TQObject::connect(&tmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(tick())); } void SimClock::tick() { diff --git a/kstars/kstars/simclock.h b/kstars/kstars/simclock.h index 05992acc..d4375bdb 100644 --- a/kstars/kstars/simclock.h +++ b/kstars/kstars/simclock.h @@ -19,7 +19,7 @@ #define KSTARS_SIMCLOCK_H_ #include <time.h> -#include <qtimer.h> +#include <tqtimer.h> #include "simclockinterface.h" #include "kstarsdatetime.h" @@ -30,7 +30,7 @@ *@version 1.0 */ -class SimClock : public QObject, public SimClockInterface { +class SimClock : public TQObject, public SimClockInterface { Q_OBJECT public: @@ -39,7 +39,7 @@ class SimClock : public QObject, public SimClockInterface { * @param parent parent object for the clock * @param when the date/time to which the SimClock should be initialized in UTC */ - SimClock(QObject *parent = 0, const KStarsDateTime &when = KStarsDateTime::currentDateTime() ); + SimClock(TQObject *parent = 0, const KStarsDateTime &when = KStarsDateTime::currentDateTime() ); /** * Constructor * @param old a SimClock to initialize from. @@ -95,7 +95,7 @@ class SimClock : public QObject, public SimClockInterface { /**Adjust the clock timescale*/ void setScale(float s); - /**Respond to the QTimer::timeout signal */ + /**Respond to the TQTimer::timeout signal */ void tick(); /**Equivalent of tick() for manual mode. @@ -126,9 +126,9 @@ class SimClock : public QObject, public SimClockInterface { private: long double julianmark; KStarsDateTime UTC; - QTimer tmr; + TQTimer tmr; double Scale; - QTime sysmark; + TQTime sysmark; int lastelapsed; bool ManualMode, ManualActive; diff --git a/kstars/kstars/skymap.cpp b/kstars/kstars/skymap.cpp index 051ab6d0..13a5ab45 100644 --- a/kstars/kstars/skymap.cpp +++ b/kstars/kstars/skymap.cpp @@ -23,11 +23,11 @@ #include <kaction.h> #include <kstandarddirs.h> -#include <qmemarray.h> -#include <qpointarray.h> -#include <qcursor.h> -#include <qbitmap.h> -#include <qpainter.h> +#include <tqmemarray.h> +#include <tqpointarray.h> +#include <tqcursor.h> +#include <tqbitmap.h> +#include <tqpainter.h> #include <math.h> #include <stdlib.h> @@ -51,8 +51,8 @@ #include "starobject.h" #include "customcatalog.h" -SkyMap::SkyMap(KStarsData *d, QWidget *parent, const char *name ) - : QWidget (parent,name), computeSkymap(true), angularDistanceMode(false), +SkyMap::SkyMap(KStarsData *d, TQWidget *parent, const char *name ) + : TQWidget (parent,name), computeSkymap(true), angularDistanceMode(false), ksw(0), data(d), pmenu(0), sky(0), sky2(0), IBoxes(0), ClickedObject(0), FocusObject(0), TransientObject(0), starpix(0), pts(0), sp(0) @@ -60,21 +60,21 @@ SkyMap::SkyMap(KStarsData *d, QWidget *parent, const char *name ) if ( parent ) ksw = (KStars*) parent->parent(); else ksw = 0; - pts = new QPointArray( 2000 ); // points for milkyway and horizon + pts = new TQPointArray( 2000 ); // points for milkyway and horizon sp = new SkyPoint(); // needed by coordinate grid - ZoomRect = QRect(); + ZoomRect = TQRect(); setDefaultMouseCursor(); // set the cross cursor // load the pixmaps of stars starpix = new StarPixmap( data->colorScheme()->starColorMode(), data->colorScheme()->starColorIntensity() ); - setBackgroundColor( QColor( data->colorScheme()->colorNamed( "SkyColor" ) ) ); - setBackgroundMode( QWidget::NoBackground ); - setFocusPolicy( QWidget::StrongFocus ); + setBackgroundColor( TQColor( data->colorScheme()->colorNamed( "SkyColor" ) ) ); + setBackgroundMode( TQWidget::NoBackground ); + setFocusPolicy( TQWidget::StrongFocus ); setMinimumSize( 380, 250 ); - setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); setMouseTracking (true); //Generate MouseMove events! midMouseButtonDown = false; @@ -85,14 +85,14 @@ SkyMap::SkyMap(KStarsData *d, QWidget *parent, const char *name ) ClickedObject = NULL; FocusObject = NULL; - sky = new QPixmap(); - sky2 = new QPixmap(); + sky = new TQPixmap(); + sky2 = new TQPixmap(); pmenu = new KSPopupMenu( ksw ); //Initialize Transient label stuff TransientTimeout = 100; //fade label color every 0.2 sec - connect( &HoverTimer, SIGNAL( timeout() ), this, SLOT( slotTransientLabel() ) ); - connect( &TransientTimer, SIGNAL( timeout() ), this, SLOT( slotTransientTimeout() ) ); + connect( &HoverTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTransientLabel() ) ); + connect( &TransientTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotTransientTimeout() ) ); IBoxes = new InfoBoxes( Options::windowWidth(), Options::windowHeight(), Options::positionTimeBox(), Options::shadeTimeBox(), @@ -111,14 +111,14 @@ SkyMap::SkyMap(KStarsData *d, QWidget *parent, const char *name ) IBoxes->geoChanged( data->geo() ); - connect( IBoxes->timeBox(), SIGNAL( shaded(bool) ), data, SLOT( saveTimeBoxShaded(bool) ) ); - connect( IBoxes->geoBox(), SIGNAL( shaded(bool) ), data, SLOT( saveGeoBoxShaded(bool) ) ); - connect( IBoxes->focusBox(), SIGNAL( shaded(bool) ), data, SLOT( saveFocusBoxShaded(bool) ) ); - connect( IBoxes->timeBox(), SIGNAL( moved(QPoint) ), data, SLOT( saveTimeBoxPos(QPoint) ) ); - connect( IBoxes->geoBox(), SIGNAL( moved(QPoint) ), data, SLOT( saveGeoBoxPos(QPoint) ) ); - connect( IBoxes->focusBox(), SIGNAL( moved(QPoint) ), data, SLOT( saveFocusBoxPos(QPoint) ) ); + connect( IBoxes->timeBox(), TQT_SIGNAL( shaded(bool) ), data, TQT_SLOT( saveTimeBoxShaded(bool) ) ); + connect( IBoxes->geoBox(), TQT_SIGNAL( shaded(bool) ), data, TQT_SLOT( saveGeoBoxShaded(bool) ) ); + connect( IBoxes->focusBox(), TQT_SIGNAL( shaded(bool) ), data, TQT_SLOT( saveFocusBoxShaded(bool) ) ); + connect( IBoxes->timeBox(), TQT_SIGNAL( moved(TQPoint) ), data, TQT_SLOT( saveTimeBoxPos(TQPoint) ) ); + connect( IBoxes->geoBox(), TQT_SIGNAL( moved(TQPoint) ), data, TQT_SLOT( saveGeoBoxPos(TQPoint) ) ); + connect( IBoxes->focusBox(), TQT_SIGNAL( moved(TQPoint) ), data, TQT_SLOT( saveFocusBoxPos(TQPoint) ) ); - connect( this, SIGNAL( destinationChanged() ), this, SLOT( slewFocus() ) ); + connect( this, TQT_SIGNAL( destinationChanged() ), this, TQT_SLOT( slewFocus() ) ); //Initialize Refraction correction lookup table arrays. RefractCorr1 is for calculating //the apparent altitude from the true altitude, and RefractCorr2 is for the reverse. @@ -156,13 +156,13 @@ SkyMap::~SkyMap() { } void SkyMap::setGeometry( int x, int y, int w, int h ) { - QWidget::setGeometry( x, y, w, h ); + TQWidget::setGeometry( x, y, w, h ); sky->resize( w, h ); sky2->resize( w, h ); } -void SkyMap::setGeometry( const QRect &r ) { - QWidget::setGeometry( r ); +void SkyMap::setGeometry( const TQRect &r ) { + TQWidget::setGeometry( r ); sky->resize( r.width(), r.height() ); sky2->resize( r.width(), r.height() ); } @@ -171,7 +171,7 @@ void SkyMap::setGeometry( const QRect &r ) { void SkyMap::showFocusCoords( bool coordsOnly ) { if ( ! coordsOnly ) { //display object info in infoBoxes - QString oname; + TQString oname; oname = i18n( "nothing" ); if ( focusObject() != NULL && Options::isTracking() ) oname = focusObject()->translatedLongName(); @@ -325,7 +325,7 @@ SkyObject* SkyMap::objectNearest( SkyPoint *p ) { for ( register unsigned int j=0; j< data->CustomCatalogs.count(); ++j ) { if ( Options::showCatalog()[j] ) { - QPtrList<SkyObject> catList = data->CustomCatalogs.at(j)->objList(); + TQPtrList<SkyObject> catList = data->CustomCatalogs.at(j)->objList(); for ( register unsigned int i=0; i<catList.count(); ++i ) { //test RA and dec to see if this object is roughly nearby @@ -393,7 +393,7 @@ SkyObject* SkyMap::objectNearest( SkyPoint *p ) { icat = 3; //set catalog to solar system } - QPtrList<SkyObject> cat; + TQPtrList<SkyObject> cat; switch (icat) { case 0: //star @@ -458,8 +458,8 @@ void SkyMap::slotTransientTimeout( void ) { } //to fade the labels, we will need to smoothly transition from UserLabelColor to SkyColor. - QColor c1 = data->colorScheme()->colorNamed( "UserLabelColor" ); - QColor c2 = data->colorScheme()->colorNamed( "SkyColor" ); + TQColor c1 = data->colorScheme()->colorNamed( "UserLabelColor" ); + TQColor c2 = data->colorScheme()->colorNamed( "SkyColor" ); int dRed = ( c2.red() - c1.red() )/20; int dGreen = ( c2.green() - c1.green() )/20; @@ -505,8 +505,8 @@ void SkyMap::slotCenter( void ) { if ( Options::useAltAz() && Options::showGround() && focus()->alt()->Degrees() > -1.0 && focusPoint()->alt()->Degrees() < -1.0 ) { - QString caption = i18n( "Requested Position Below Horizon" ); - QString message = i18n( "The requested position is below the horizon.\nWould you like to go there anyway?" ); + TQString caption = i18n( "Requested Position Below Horizon" ); + TQString message = i18n( "The requested position is below the horizon.\nWould you like to go there anyway?" ); if ( KMessageBox::warningYesNo( this, message, caption, i18n("Go Anyway"), i18n("Keep Position"), "dag_focus_below_horiz" )==KMessageBox::No ) { setClickedObject( NULL ); @@ -549,11 +549,11 @@ void SkyMap::slotCenter( void ) { //display coordinates in statusBar if ( ksw ) { - QString sX = focusPoint()->az()->toDMSString(); - QString sY = focusPoint()->alt()->toDMSString(true); + TQString sX = focusPoint()->az()->toDMSString(); + TQString sY = focusPoint()->alt()->toDMSString(true); if ( Options::useAltAz() && Options::useRefraction() ) sY = refract( focusPoint()->alt(), true ).toDMSString(true); - QString s = sX + ", " + sY; + TQString s = sX + ", " + sY; ksw->statusBar()->changeItem( s, 1 ); s = focusPoint()->ra()->toHMSString() + ", " + focusPoint()->dec()->toDMSString(true); ksw->statusBar()->changeItem( s, 2 ); @@ -563,10 +563,10 @@ void SkyMap::slotCenter( void ) { } void SkyMap::slotDSS( void ) { - QString URLprefix( "http://archive.stsci.edu/cgi-bin/dss_search?v=1" ); - QString URLsuffix( "&e=J2000&h=15.0&w=15.0&f=gif&c=none&fov=NONE" ); + TQString URLprefix( "http://archive.stsci.edu/cgi-bin/dss_search?v=1" ); + TQString URLsuffix( "&e=J2000&h=15.0&w=15.0&f=gif&c=none&fov=NONE" ); dms ra(0.0), dec(0.0); - QString RAString, DecString; + TQString RAString, DecString; char decsgn; //ra and dec must be the coordinates at J2000. If we clicked on an object, just use the object's ra0, dec0 coords @@ -599,15 +599,15 @@ void SkyMap::slotDSS( void ) { //concat all the segments into the kview command line: KURL url (URLprefix + RAString + DecString + URLsuffix); - QString message = i18n( "Digitized Sky Survey image provided by the Space Telescope Science Institute." ); + TQString message = i18n( "Digitized Sky Survey image provided by the Space Telescope Science Institute." ); new ImageViewer (&url, message, this); } void SkyMap::slotDSS2( void ) { - QString URLprefix( "http://archive.stsci.edu/cgi-bin/dss_search?v=2r" ); - QString URLsuffix( "&e=J2000&h=15.0&w=15.0&f=gif&c=none&fov=NONE" ); + TQString URLprefix( "http://archive.stsci.edu/cgi-bin/dss_search?v=2r" ); + TQString URLsuffix( "&e=J2000&h=15.0&w=15.0&f=gif&c=none&fov=NONE" ); dms ra(0.0), dec(0.0); - QString RAString, DecString; + TQString RAString, DecString; char decsgn; //ra and dec must be the coordinates at J2000. If we clicked on an object, just use the object's ra0, dec0 coords @@ -641,13 +641,13 @@ void SkyMap::slotDSS2( void ) { //concat all the segments into the kview command line: KURL url (URLprefix + RAString + DecString + URLsuffix); - QString message = i18n( "Digitized Sky Survey image provided by the Space Telescope Science Institute." ); + TQString message = i18n( "Digitized Sky Survey image provided by the Space Telescope Science Institute." ); new ImageViewer (&url, message, this); } void SkyMap::slotInfo( int id ) { - QStringList::Iterator it = clickedObject()->InfoList.at(id-200); - QString sURL = (*it); + TQStringList::Iterator it = clickedObject()->InfoList.at(id-200); + TQString sURL = (*it); KURL url ( sURL ); if (!url.isEmpty()) kapp->invokeBrowser(sURL); @@ -657,7 +657,7 @@ void SkyMap::slotBeginAngularDistance(void) { setPreviousClickedPoint( mousePoint() ); angularDistanceMode = true; beginRulerPoint = getXY( previousClickedPoint(), Options::useAltAz(), Options::useRefraction() ); - endRulerPoint = QPoint( beginRulerPoint.x(),beginRulerPoint.y() ); + endRulerPoint = TQPoint( beginRulerPoint.x(),beginRulerPoint.y() ); } void SkyMap::slotEndAngularDistance(void) { @@ -683,10 +683,10 @@ void SkyMap::slotCancelAngularDistance(void) { } void SkyMap::slotImage( int id ) { - QStringList::Iterator it = clickedObject()->ImageList.at(id-100); - QStringList::Iterator it2 = clickedObject()->ImageTitle.at(id-100); - QString sURL = (*it); - QString message = (*it2); + TQStringList::Iterator it = clickedObject()->ImageList.at(id-100); + TQStringList::Iterator it2 = clickedObject()->ImageTitle.at(id-100); + TQString sURL = (*it); + TQString message = (*it2); KURL url ( sURL ); if (!url.isEmpty()) new ImageViewer (&url, clickedObject()->messageFromTitle(message), this); @@ -971,7 +971,7 @@ void SkyMap::slewFocus( void ) { } void SkyMap::invokeKey( int key ) { - QKeyEvent *e = new QKeyEvent( QEvent::KeyPress, key, 0, 0 ); + TQKeyEvent *e = new TQKeyEvent( TQEvent::KeyPress, key, 0, 0 ); keyPressEvent( e ); delete e; } @@ -984,9 +984,9 @@ double SkyMap::findPA( SkyObject *o, int x, int y, double scale ) { if ( newDec > 90.0 ) newDec = 90.0; SkyPoint test( o->ra()->Hours(), newDec ); if ( Options::useAltAz() ) test.EquatorialToHorizontal( data->LST, data->geo()->lat() ); - QPoint t = getXY( &test, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint t = getXY( &test, Options::useAltAz(), Options::useRefraction(), scale ); double dx = double( t.x() - x ); - double dy = double( y - t.y() ); //backwards because QWidget Y-axis increases to the bottom + double dy = double( y - t.y() ); //backwards because TQWidget Y-axis increases to the bottom double north; if ( dy ) { north = atan( dx/dy )*180.0/dms::PI; @@ -1001,8 +1001,8 @@ double SkyMap::findPA( SkyObject *o, int x, int y, double scale ) { return ( north + o->pa() ); } -QPoint SkyMap::getXY( SkyPoint *o, bool Horiz, bool doRefraction, double scale ) { - QPoint p; +TQPoint SkyMap::getXY( SkyPoint *o, bool Horiz, bool doRefraction, double scale ) { + TQPoint p; double Y, dX; double sindX, cosdX, sinY, cosY, sinY0, cosY0; @@ -1169,7 +1169,7 @@ dms SkyMap::refract( const dms *alt, bool findApparent ) { // also, determine new coordinates of mouse cursor. void SkyMap::forceUpdate( bool now ) { - QPoint mp( mapFromGlobal( QCursor::pos() ) ); + TQPoint mp( mapFromGlobal( TQCursor::pos() ) ); double dx = ( 0.5*width() - mp.x() )/Options::zoomFactor(); double dy = ( 0.5*height() - mp.y() )/Options::zoomFactor(); @@ -1238,33 +1238,33 @@ void SkyMap::setZoomMouseCursor() { mouseMoveCursor = false; // no mousemove cursor - QPainter p; - QPixmap cursorPix (32, 32); // size 32x32 (this size is compatible to all systems) + TQPainter p; + TQPixmap cursorPix (32, 32); // size 32x32 (this size is compatible to all systems) // the center of the pixmap int mx = cursorPix. width() / 2; int my = cursorPix. height() / 2; cursorPix.fill (white); // white background p.begin (&cursorPix); - p.setPen (QPen (black, 2)); // black lines + p.setPen (TQPen (black, 2)); // black lines p.drawEllipse( mx - 7, my - 7, 14, 14 ); p.drawLine( mx + 5, my + 5, mx + 11, my + 11 ); p.end(); // create a mask to make parts of the pixmap invisible - QBitmap mask (32, 32); + TQBitmap mask (32, 32); mask.fill (color0); // all is invisible p.begin (&mask); // paint over the parts which should be visible - p.setPen (QPen (color1, 3)); + p.setPen (TQPen (color1, 3)); p.drawEllipse( mx - 7, my - 7, 14, 14 ); p.drawLine( mx + 5, my + 5, mx + 12, my + 12 ); p.end(); cursorPix.setMask (mask); // set the mask - QCursor cursor (cursorPix); + TQCursor cursor (cursorPix); setCursor (cursor); } @@ -1272,15 +1272,15 @@ void SkyMap::setDefaultMouseCursor() { mouseMoveCursor = false; // no mousemove cursor - QPainter p; - QPixmap cursorPix (32, 32); // size 32x32 (this size is compatible to all systems) + TQPainter p; + TQPixmap cursorPix (32, 32); // size 32x32 (this size is compatible to all systems) // the center of the pixmap int mx = cursorPix. width() / 2; int my = cursorPix. height() / 2; cursorPix.fill (white); // white background p.begin (&cursorPix); - p.setPen (QPen (black, 2)); // black lines + p.setPen (TQPen (black, 2)); // black lines // 1. diagonal p.drawLine (mx - 2, my - 2, mx - 8, mx - 8); p.drawLine (mx + 2, my + 2, mx + 8, mx + 8); @@ -1290,12 +1290,12 @@ void SkyMap::setDefaultMouseCursor() p.end(); // create a mask to make parts of the pixmap invisible - QBitmap mask (32, 32); + TQBitmap mask (32, 32); mask.fill (color0); // all is invisible p.begin (&mask); // paint over the parts which should be visible - p.setPen (QPen (color1, 3)); + p.setPen (TQPen (color1, 3)); // 1. diagonal p.drawLine (mx - 2, my - 2, mx - 8, mx - 8); p.drawLine (mx + 2, my + 2, mx + 8, mx + 8); @@ -1305,7 +1305,7 @@ void SkyMap::setDefaultMouseCursor() p.end(); cursorPix.setMask (mask); // set the mask - QCursor cursor (cursorPix); + TQCursor cursor (cursorPix); setCursor (cursor); } @@ -1320,10 +1320,10 @@ void SkyMap::setMouseMoveCursor() void SkyMap::addLink( void ) { AddLinkDialog adialog( this, clickedObject()->name() ); - QString entry; - QFile file; + TQString entry; + TQFile file; - if ( adialog.exec()==QDialog::Accepted ) { + if ( adialog.exec()==TQDialog::Accepted ) { if ( adialog.isImageLink() ) { //Add link to object's ImageList, and descriptive text to its ImageTitle list clickedObject()->ImageList.append( adialog.url() ); @@ -1334,12 +1334,12 @@ void SkyMap::addLink( void ) { file.setName( locateLocal( "appdata", "image_url.dat" ) ); //determine filename in local user KDE directory tree. if ( !file.open( IO_ReadWrite | IO_Append ) ) { - QString message = i18n( "Custom image-links file could not be opened.\nLink cannot be recorded for future sessions." ); + TQString message = i18n( "Custom image-links file could not be opened.\nLink cannot be recorded for future sessions." ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return; } else { entry = clickedObject()->name() + ":" + adialog.desc() + ":" + adialog.url(); - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << entry << endl; file.close(); emit linkAdded(); @@ -1352,11 +1352,11 @@ void SkyMap::addLink( void ) { file.setName( locateLocal( "appdata", "info_url.dat" ) ); //determine filename in local user KDE directory tree. if ( !file.open( IO_ReadWrite | IO_Append ) ) { - QString message = i18n( "Custom information-links file could not be opened.\nLink cannot be recorded for future sessions." ); KMessageBox::sorry( 0, message, i18n( "Could not Open File" ) ); + TQString message = i18n( "Custom information-links file could not be opened.\nLink cannot be recorded for future sessions." ); KMessageBox::sorry( 0, message, i18n( "Could not Open File" ) ); return; } else { entry = clickedObject()->name() + ":" + adialog.desc() + ":" + adialog.url(); - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << entry << endl; file.close(); emit linkAdded(); @@ -1369,8 +1369,8 @@ void SkyMap::updateAngleRuler() { if ( Options::useAltAz() ) PreviousClickedPoint.EquatorialToHorizontal( data->LST, data->geo()->lat() ); beginRulerPoint = getXY( previousClickedPoint(), Options::useAltAz(), Options::useRefraction() ); -// endRulerPoint = QPoint(e->x(), e->y()); - endRulerPoint = mapFromGlobal( QCursor::pos() ); +// endRulerPoint = TQPoint(e->x(), e->y()); + endRulerPoint = mapFromGlobal( TQCursor::pos() ); } #include "skymap.moc" diff --git a/kstars/kstars/skymap.h b/kstars/kstars/skymap.h index fb2b8b23..04f8a52f 100644 --- a/kstars/kstars/skymap.h +++ b/kstars/kstars/skymap.h @@ -18,8 +18,8 @@ #ifndef SKYMAP_H #define SKYMAP_H -#include <qtimer.h> -#include <qwidget.h> +#include <tqtimer.h> +#include <tqwidget.h> #include "skypoint.h" #include "starpixmap.h" @@ -56,14 +56,14 @@ class DeepSkyObject; *@version 1.0 */ -class SkyMap : public QWidget { +class SkyMap : public TQWidget { Q_OBJECT public: /** *Constructor. Read stored settings from KConfig object (focus position, *zoom factor, sky color, etc.). Run initPopupMenus(). */ - SkyMap( KStarsData *d, QWidget *parent=0, const char *name=0); + SkyMap( KStarsData *d, TQWidget *parent=0, const char *name=0); /** *Destructor (empty) @@ -161,7 +161,7 @@ public: /**@short sets the destination point of the sky map. *@note setDestination() emits the destinationChanged() SIGNAL, - *which triggers the SLOT function SkyMap::slewFocus(). This + *which triggers the TQT_SLOT function SkyMap::slewFocus(). This *function iteratively steps the Focus point toward Destination, *repainting the sky at each step (if Options::useAnimatedSlewing()==true). *@param f a pointer to the SkyPoint the map should slew to @@ -388,12 +388,12 @@ public: /**@short Draw the current Sky map to a pixmap which is to be printed or exported to a file. * *Each of the draw functions is called, with a value for the Scale parameter computed to fit the - *geometry of the QPaintDevice. - *@param pd pointer to the QPaintDevice on which to draw. + *geometry of the TQPaintDevice. + *@param pd pointer to the TQPaintDevice on which to draw. *@see KStars::slotExportImage() *@see KStars::slotPrint() */ - void exportSkyImage( const QPaintDevice *pd ); + void exportSkyImage( const TQPaintDevice *pd ); public slots: /**@short This overloaded function is used internally to resize the Sky pixmap to match the window size. @@ -404,7 +404,7 @@ public slots: * *This function behaves essentially like the above function. It differs only in the data types *of its arguments. */ - virtual void setGeometry( const QRect &r ); + virtual void setGeometry( const TQRect &r ); /**Recalculates the positions of objects in the sky, and then repaints the sky map. *If the positions don't need to be recalculated, use update() instead of forceUpdate(). @@ -547,7 +547,7 @@ signals: protected: /**Draw the Sky, and all objects in it. */ - virtual void paintEvent( QPaintEvent *e ); + virtual void paintEvent( TQPaintEvent *e ); /**Process keystrokes: *@li arrow keys Slew the map @@ -562,11 +562,11 @@ protected: *@li ,/< Step backward one time step *@li ./> Step forward one time step */ - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); /**When keyRelease is triggered, just set the "slewing" flag to false, *and update the display (to draw objects that are hidden when slewing==true). */ - virtual void keyReleaseEvent( QKeyEvent *e ); + virtual void keyReleaseEvent( TQKeyEvent *e ); /**Determine RA, Dec coordinates of clicked location. Find the SkyObject *which is nearest to the clicked location. @@ -575,13 +575,13 @@ protected: *nearest object name in status bar. *If right-clicked: display popup menu appropriate for nearest object. */ - virtual void mousePressEvent( QMouseEvent *e ); + virtual void mousePressEvent( TQMouseEvent *e ); /**set mouseButtonDown==false, slewing==false */ - virtual void mouseReleaseEvent( QMouseEvent *e ); + virtual void mouseReleaseEvent( TQMouseEvent *e ); /**Center SkyMap at double-clicked location */ - virtual void mouseDoubleClickEvent( QMouseEvent *e ); + virtual void mouseDoubleClickEvent( TQMouseEvent *e ); /**This function does several different things depending on the state of the program: *@li If Angle-measurement mode is active, update the end-ruler point to the mouse cursor, @@ -593,16 +593,16 @@ protected: *cursor remains constant. *@li If just moving the mouse, simply update the curso coordinates in the status bar. */ - virtual void mouseMoveEvent( QMouseEvent *e ); + virtual void mouseMoveEvent( TQMouseEvent *e ); /**Zoom in and out with the mouse wheel. */ - virtual void wheelEvent( QWheelEvent *e ); + virtual void wheelEvent( TQWheelEvent *e ); /**If the skymap will be resized, the sky must be new computed. So this *function calls explicitly new computing of the skymap. *It also repositions the InfoBoxes, if they are anchored to a window edge. */ - virtual void resizeEvent( QResizeEvent * ); + virtual void resizeEvent( TQResizeEvent * ); private slots: /**Gradually fade the Transient Hover Label into the background sky color, and @@ -626,112 +626,112 @@ private slots: void setMouseMoveCursor(); private: -// Drawing functions. Each takes a QPainter reference and a scaling factor as arguments. -// The QPainter is usually the Sky pixmap, but it can also be the Export-to-Image pixmap, or the +// Drawing functions. Each takes a TQPainter reference and a scaling factor as arguments. +// The TQPainter is usually the Sky pixmap, but it can also be the Export-to-Image pixmap, or the // Printer device. The scaling factors are 1.0 by default (for screen images). The scale factor // is used to resize the image to fit the page when printing or exporting to a file. /**@short Draw the Milky Way contour. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawMilkyWay( QPainter& psky, double scale = 1.0 ); + void drawMilkyWay( TQPainter& psky, double scale = 1.0 ); /**@short Draw the coordinate system grid lines. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawCoordinateGrid( QPainter& psky, double scale = 1.0 ); + void drawCoordinateGrid( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Celestial Equator line. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawEquator( QPainter& psky, double scale = 1.0 ); + void drawEquator( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Ecliptic line. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawEcliptic( QPainter& psky, double scale = 1.0 ); + void drawEcliptic( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Horizon Line, the compass point labels, and the opaque ground. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawHorizon( QPainter& psky, double scale = 1.0 ); + void drawHorizon( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Constellation Lines. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawConstellationLines( QPainter& psky, double scale = 1.0 ); + void drawConstellationLines( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Constellation Boundaries. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawConstellationBoundaries( QPainter& psky, double scale = 1.0 ); + void drawConstellationBoundaries( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Constellation Names. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawConstellationNames( QPainter& psky, double scale = 1.0 ); + void drawConstellationNames( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Stars. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawStars( QPainter& psky, double scale = 1.0 ); + void drawStars( TQPainter& psky, double scale = 1.0 ); /**@short Draw the Deep-Sky Objects. * *Calls drawDeepSkyCatalog() for each catalog (Messier/NGC/IC/Custom) - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. *@see SkyMap::drawDeepSkyCatalog() */ - void drawDeepSkyObjects( QPainter& psky, double scale = 1.0 ); + void drawDeepSkyObjects( TQPainter& psky, double scale = 1.0 ); /**@short Draw a Deep-Sky Catalog. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param catalog List of pointers to the objects in a particular deep-sky catalog. *@param color The color to be used when drawing the symbols for this catalog. *@param drawObject if TRUE, the object symbols will be drawn *@param drawImage if TRUE, the object images will be drawn *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawDeepSkyCatalog( QPainter& psky, QPtrList<DeepSkyObject>& catalog, QColor& color, bool drawObject, bool drawImage, double scale = 1.0 ); + void drawDeepSkyCatalog( TQPainter& psky, TQPtrList<DeepSkyObject>& catalog, TQColor& color, bool drawObject, bool drawImage, double scale = 1.0 ); /**@short Draw the Planet Trails. * *"Planet Trails" can be attached to any solar system body; they are lists of SkyPoints *tracing the path of a body across the sky. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param ksp pointer to the solar-system bosy whose trail is to be drawn. *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawPlanetTrail( QPainter& psky, KSPlanetBase *ksp, double scale = 1.0 ); + void drawPlanetTrail( TQPainter& psky, KSPlanetBase *ksp, double scale = 1.0 ); /**@short Draw all solar system bodies: Sun, Moon, 8 planets, comets, asteroids. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param drawPlanets if FALSE, do nothing *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawSolarSystem( QPainter& psky, bool drawPlanets, double scale = 1.0 ); + void drawSolarSystem( TQPainter& psky, bool drawPlanets, double scale = 1.0 ); /**@short Draw "User Labels". User labels are name labels attached to objects manually with *the right-click popup menu. Also adds a label to the FocusObject if the Option UseAutoLabel *is TRUE. - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param scale the scaling factor. We use the default value (1.0) everywhere, except when printing. */ - void drawAttachedLabels( QPainter &psky, double scale = 1.0 ); + void drawAttachedLabels( TQPainter &psky, double scale = 1.0 ); /**@short Attach a name label to a SkyObject. This Function is called by the object-specific *draw functions and also by drawAttachedLabels(). - *@param psky reference to the QPainter on which to draw (either the sky pixmap or printer device) + *@param psky reference to the TQPainter on which to draw (either the sky pixmap or printer device) *@param obj pointer to the SkyObject which is to be labeled. *@param x The screen X-coordinate for the label (in pixels; typically as found by SkyMap::getXY()) *@param y The screen Y-coordinate for the label (in pixels; typically as found by SkyMap::getXY()) @@ -739,13 +739,13 @@ private: *@see SkyMap::drawAttachedLabels() *@see SkyMap::getXY() */ - void drawNameLabel( QPainter &psky, SkyObject *obj, int x, int y, double scale ); + void drawNameLabel( TQPainter &psky, SkyObject *obj, int x, int y, double scale ); /**Draw a planet. This is an image if the planet image is loaded, the zoomlevel *is high enough (but not so high that the image fills the screen), and the *user has selected that planet images be shown. If one of these conditions *is false, then a simple colored circle is drawn instead. - *@param psky reference to the QPainter on which to draw + *@param psky reference to the TQPainter on which to draw *@param p pointer to the KSPlanetBase to be drawn *@param c the color of the circle to be used if not plotting an image of the planet *@param zoommin the minimum zoomlevel for drawing the planet image @@ -754,7 +754,7 @@ private: *(there's probably a better way to handle this) *@param scale the scale factor used for printing the sky image. */ - void drawPlanet(QPainter &psky, KSPlanetBase *p, QColor c, + void drawPlanet(TQPainter &psky, KSPlanetBase *p, TQColor c, double zoommin, int resize_mult = 1, double scale = 1.0 ); /**Draw the overlays on top of the sky map. These include the infoboxes, @@ -766,59 +766,59 @@ private: *drawOverlays() to refresh the overlays. *@param pm pointer to the Sky pixmap */ - void drawOverlays( QPixmap *pm ); + void drawOverlays( TQPixmap *pm ); /**Draw the Focus, Geo and Time InfoBoxes. This is called by drawOverlays(). - *@param p reference to the QPainter on which to draw (this should be the Sky pixmap). + *@param p reference to the TQPainter on which to draw (this should be the Sky pixmap). *@note there is no scale factor because this is only used for drawing onto the screen, not printing. *@see SkyMap::drawOverlays() */ - void drawBoxes( QPainter &p ); + void drawBoxes( TQPainter &p ); /**Draw symbols at the position of each Telescope currently being controlled by KStars. *@note The shape of the Telescope symbol is currently a hard-coded bullseye. *@note there is no scale factor because this is only used for drawing onto the screen, not printing. - *@param psky reference to the QPainter on which to draw (this should be the Sky pixmap). + *@param psky reference to the TQPainter on which to draw (this should be the Sky pixmap). */ - void drawTelescopeSymbols(QPainter &psky); + void drawTelescopeSymbols(TQPainter &psky); /**@short Draw symbols for objects in the observing list. - *@param psky reference to the QPainter on which to draw (this should be the sky pixmap) + *@param psky reference to the TQPainter on which to draw (this should be the sky pixmap) *@note there is no scale factor because this is only used for drawing onto the screen, not printing. */ - void drawObservingList( QPainter &psky, double scale = 1.0 ); + void drawObservingList( TQPainter &psky, double scale = 1.0 ); /**Draw a dotted-line rectangle which traces the potential new field-of-view in ZoomBox mode. - *@param psky reference to the QPainter on which to draw (this should be the Sky pixmap). + *@param psky reference to the TQPainter on which to draw (this should be the Sky pixmap). *@note there is no scale factor because this is only used for drawing onto the screen, not printing. */ - void drawZoomBox( QPainter &psky); + void drawZoomBox( TQPainter &psky); /**Draw the current TransientLabel. TransientLabels are triggered when the mouse *hovers on an object. - *@param psky reference to the QPainter on which to draw (this should be the Sky pixmap). + *@param psky reference to the TQPainter on which to draw (this should be the Sky pixmap). *@note there is no scale factor because this is only used for drawing onto the screen, not printing. *@sa SkyMap::slotTransientLabel(), SkyMap::slotTransientTimeout() */ - void drawTransientLabel( QPainter &psky ); + void drawTransientLabel( TQPainter &psky ); /**Draw a dashed line from the Angular-Ruler start point to the current mouse cursor, *when in Angular-Ruler mode. - *@param psky reference to the QPainter on which to draw (this should be the Sky pixmap). + *@param psky reference to the TQPainter on which to draw (this should be the Sky pixmap). *@note there is no scale factor because this is only used for drawing onto the screen, not printing. */ - void drawAngleRuler( QPainter &psky ); + void drawAngleRuler( TQPainter &psky ); /**Given the coordinates of the SkyPoint argument, determine the *pixel coordinates in the SkyMap. - *@return QPoint containing screen pixel x, y coordinates of SkyPoint. + *@return TQPoint containing screen pixel x, y coordinates of SkyPoint. *@param o pointer to the SkyPoint for which to calculate x, y coordinates. *@param Horiz if TRUE, use Alt/Az coordinates. *@param doRefraction if TRUE, correct for atmospheric refraction *@param scale scaling factor (unused?) */ - QPoint getXY( SkyPoint *o, bool Horiz, bool doRefraction=true, double scale = 1.0 ); + TQPoint getXY( SkyPoint *o, bool Horiz, bool doRefraction=true, double scale = 1.0 ); /**Determine RA, Dec coordinates of the pixel at (dx, dy), which are the *screen pixel coordinate offsets from the center of the Sky pixmap. @@ -884,7 +884,7 @@ private: *NULL pointer, and the TransientTimer is not already active. These conditions *are met when the mouse did not move for HOVER_INTERVAL msec (triggering a *TransientLabel), but the mouse has since been moved, thus ending the Hover event. - *This function merely starts the TransientTimer, whose timeout SIGNAL is + *This function merely starts the TransientTimer, whose timeout TQT_SIGNAL is *connected to the slotTransientTimeout() SLOT, which handles the actual fading *of the transient label, and eventually resets TransientObject to NULL. *@sa SkyMap::slotTransientLabel(), SkyMap::slotTransientTimeout() @@ -934,26 +934,26 @@ private: double XRange, Ymax; double guideXRange; - QString sURL; + TQString sURL; KStars *ksw; KStarsData *data; KSPopupMenu *pmenu; - QPixmap *sky, *sky2; + TQPixmap *sky, *sky2; InfoBoxes *IBoxes; SkyPoint Focus, OldFocus, ClickedPoint, FocusPoint, MousePoint, Destination, PreviousClickedPoint; SkyObject *ClickedObject, *FocusObject, *TransientObject; StarPixmap *starpix; // the pixmap of the stars - QPointArray *pts; // needed in paintEvent() so it should not every event call reallocated (save time) + TQPointArray *pts; // needed in paintEvent() so it should not every event call reallocated (save time) SkyPoint *sp; // see line above - QPoint beginRulerPoint, endRulerPoint; // used in angle mode - QRect ZoomRect; //The manual-focus circle. + TQPoint beginRulerPoint, endRulerPoint; // used in angle mode + TQRect ZoomRect; //The manual-focus circle. //data for transient object labels - QTimer TransientTimer, HoverTimer; - QColor TransientColor; + TQTimer TransientTimer, HoverTimer; + TQColor TransientColor; unsigned int TransientTimeout; }; diff --git a/kstars/kstars/skymapdraw.cpp b/kstars/kstars/skymapdraw.cpp index e032b37a..8b15c57a 100644 --- a/kstars/kstars/skymapdraw.cpp +++ b/kstars/kstars/skymapdraw.cpp @@ -21,8 +21,8 @@ #include <math.h> //log10() #include <iostream> -#include <qpaintdevicemetrics.h> -#include <qpainter.h> +#include <tqpaintdevicemetrics.h> +#include <tqpainter.h> #include "skymap.h" #include "Options.h" @@ -47,9 +47,9 @@ #include "indielement.h" #include "indidevice.h" -void SkyMap::drawOverlays( QPixmap *pm ) { +void SkyMap::drawOverlays( TQPixmap *pm ) { if ( ksw ) { //only if we are drawing in the GUI window - QPainter p; + TQPainter p; p.begin( pm ); showFocusCoords( true ); @@ -68,25 +68,25 @@ void SkyMap::drawOverlays( QPixmap *pm ) { } } -void SkyMap::drawAngleRuler( QPainter &p ) { - p.setPen( QPen( data->colorScheme()->colorNamed( "AngularRuler" ), 1, DotLine ) ); +void SkyMap::drawAngleRuler( TQPainter &p ) { + p.setPen( TQPen( data->colorScheme()->colorNamed( "AngularRuler" ), 1, DotLine ) ); p.drawLine( beginRulerPoint, endRulerPoint ); } -void SkyMap::drawZoomBox( QPainter &p ) { +void SkyMap::drawZoomBox( TQPainter &p ) { //draw the manual zoom-box, if it exists if ( ZoomRect.isValid() ) { - p.setPen( QPen( "white", 1, DotLine ) ); + p.setPen( TQPen( "white", 1, DotLine ) ); p.drawRect( ZoomRect.x(), ZoomRect.y(), ZoomRect.width(), ZoomRect.height() ); } } -void SkyMap::drawTransientLabel( QPainter &p ) { +void SkyMap::drawTransientLabel( TQPainter &p ) { if ( transientObject() ) { p.setPen( TransientColor ); if ( checkVisibility( transientObject(), fov(), XRange ) ) { - QPoint o = getXY( transientObject(), Options::useAltAz(), Options::useRefraction(), 1.0 ); + TQPoint o = getXY( transientObject(), Options::useAltAz(), Options::useRefraction(), 1.0 ); if ( o.x() >= 0 && o.x() <= width() && o.y() >= 0 && o.y() <= height() ) { drawNameLabel( p, transientObject(), o.x(), o.y(), 1.0 ); } @@ -94,7 +94,7 @@ void SkyMap::drawTransientLabel( QPainter &p ) { } } -void SkyMap::drawBoxes( QPainter &p ) { +void SkyMap::drawBoxes( TQPainter &p ) { if ( ksw ) { //only if we are drawing in the GUI window ksw->infoBoxes()->drawBoxes( p, data->colorScheme()->colorNamed( "BoxTextColor" ), @@ -103,14 +103,14 @@ void SkyMap::drawBoxes( QPainter &p ) { } } -void SkyMap::drawObservingList( QPainter &psky, double scale ) { - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "ObsListColor" ) ), 1 ) ); +void SkyMap::drawObservingList( TQPainter &psky, double scale ) { + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "ObsListColor" ) ), 1 ) ); if ( ksw && ksw->observingList()->count() ) { for ( SkyObject* obj = ksw->observingList()->first(); obj; obj = ksw->observingList()->next() ) { if ( checkVisibility( obj, fov(), XRange ) ) { - QPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction() ); + TQPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction() ); // label object if it is currently on screen if (o.x() >= 0 && o.x() <= width() && o.y() >=0 && o.y() <= height() ) { @@ -130,7 +130,7 @@ void SkyMap::drawObservingList( QPainter &psky, double scale ) { } } -void SkyMap::drawTelescopeSymbols(QPainter &psky) { +void SkyMap::drawTelescopeSymbols(TQPainter &psky) { if ( ksw ) { //ksw doesn't exist in non-GUI mode! INDI_P *eqNum; @@ -143,7 +143,7 @@ void SkyMap::drawTelescopeSymbols(QPainter &psky) { if (!Options::indiCrosshairs() || devMenu == NULL) return; - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed("TargetColor" ) ) ) ); + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed("TargetColor" ) ) ) ); psky.setBrush( NoBrush ); int pxperdegree = int(Options::zoomFactor()/57.3); @@ -239,7 +239,7 @@ void SkyMap::drawTelescopeSymbols(QPainter &psky) { } - QPoint P = getXY( &indi_sp, Options::useAltAz(), Options::useRefraction() ); + TQPoint P = getXY( &indi_sp, Options::useAltAz(), Options::useRefraction() ); int s1 = pxperdegree/2; int s2 = pxperdegree; @@ -259,7 +259,7 @@ void SkyMap::drawTelescopeSymbols(QPainter &psky) { psky.drawEllipse( x1, y1, s1, s1 ); psky.drawEllipse( x2, y2, s2, s2 ); - psky.drawText( x0+s2 + 2 , y0, QString(devMenu->mgr.at(i)->indi_dev.at(j)->label) ); + psky.drawText( x0+s2 + 2 , y0, TQString(devMenu->mgr.at(i)->indi_dev.at(j)->label) ); } } @@ -269,7 +269,7 @@ void SkyMap::drawTelescopeSymbols(QPainter &psky) { } -void SkyMap::drawMilkyWay( QPainter& psky, double scale ) +void SkyMap::drawMilkyWay( TQPainter& psky, double scale ) { int ptsCount = 0; int mwmax = int( scale * Options::zoomFactor()/100.); @@ -279,8 +279,8 @@ void SkyMap::drawMilkyWay( QPainter& psky, double scale ) int thick(1); if ( ! Options::fillMilkyWay() ) thick=3; - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "MWColor" ) ), thick, SolidLine ) ); - psky.setBrush( QBrush( QColor( data->colorScheme()->colorNamed( "MWColor" ) ) ) ); + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "MWColor" ) ), thick, SolidLine ) ); + psky.setBrush( TQBrush( TQColor( data->colorScheme()->colorNamed( "MWColor" ) ) ) ); bool offscreen, lastoffscreen=false; for ( register unsigned int j=0; j<11; ++j ) { @@ -288,7 +288,7 @@ void SkyMap::drawMilkyWay( QPainter& psky, double scale ) ptsCount = 0; bool partVisible = false; - QPoint o = getXY( data->MilkyWay[j].at(0), Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( data->MilkyWay[j].at(0), Options::useAltAz(), Options::useRefraction(), scale ); if ( o.x() != -10000000 && o.y() != -10000000 ) pts->setPoint( ptsCount++, o.x(), o.y() ); if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) partVisible = true; @@ -299,10 +299,10 @@ void SkyMap::drawMilkyWay( QPainter& psky, double scale ) } if ( ptsCount && partVisible ) { - psky.drawPolygon( ( const QPointArray ) *pts, false, 0, ptsCount ); + psky.drawPolygon( ( const TQPointArray ) *pts, false, 0, ptsCount ); } } else { - QPoint o = getXY( data->MilkyWay[j].at(0), Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( data->MilkyWay[j].at(0), Options::useAltAz(), Options::useRefraction(), scale ); if (o.x()==-10000000 && o.y()==-10000000) offscreen = true; else offscreen = false; @@ -327,20 +327,20 @@ void SkyMap::drawMilkyWay( QPainter& psky, double scale ) } } -void SkyMap::drawCoordinateGrid( QPainter& psky, double scale ) +void SkyMap::drawCoordinateGrid( TQPainter& psky, double scale ) { - QPoint cur; + TQPoint cur; //Draw coordinate grid - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "GridColor" ) ), 1, DotLine ) ); //change to GridColor + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "GridColor" ) ), 1, DotLine ) ); //change to GridColor //First, the parallels for ( register double Dec=-80.; Dec<=80.; Dec += 20. ) { bool newlyVisible = false; sp->set( 0.0, Dec ); if ( Options::useAltAz() ) sp->EquatorialToHorizontal( data->LST, data->geo()->lat() ); - QPoint o = getXY( sp, Options::useAltAz(), Options::useRefraction(), scale ); - QPoint o1 = o; + TQPoint o = getXY( sp, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o1 = o; cur = o; psky.moveTo( o.x(), o.y() ); @@ -353,7 +353,7 @@ void SkyMap::drawCoordinateGrid( QPainter& psky, double scale ) o = getXY( sp, Options::useAltAz(), Options::useRefraction(), scale ); //When drawing on the printer, the psky.pos() point does NOT get updated - //when lineTo or moveTo are called. Grrr. Need to store current position in QPoint cur. + //when lineTo or moveTo are called. Grrr. Need to store current position in TQPoint cur. int dx = cur.x() - o.x(); int dy = cur.y() - o.y(); cur = o; @@ -386,7 +386,7 @@ void SkyMap::drawCoordinateGrid( QPainter& psky, double scale ) bool newlyVisible = false; SkyPoint *sp1 = new SkyPoint( RA, -90. ); if ( Options::useAltAz() ) sp1->EquatorialToHorizontal( data->LST, data->geo()->lat() ); - QPoint o = getXY( sp1, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( sp1, Options::useAltAz(), Options::useRefraction(), scale ); cur = o; psky.moveTo( o.x(), o.y() ); @@ -399,7 +399,7 @@ void SkyMap::drawCoordinateGrid( QPainter& psky, double scale ) o = getXY( sp1, Options::useAltAz(), Options::useRefraction(), scale ); //When drawing on the printer, the psky.pos() point does NOT get updated - //when lineTo or moveTo are called. Grrr. Need to store current position in QPoint cur. + //when lineTo or moveTo are called. Grrr. Need to store current position in TQPoint cur. int dx = cur.x() - o.x(); int dy = cur.y() - o.y(); cur = o; @@ -420,17 +420,17 @@ void SkyMap::drawCoordinateGrid( QPainter& psky, double scale ) } } -void SkyMap::drawEquator( QPainter& psky, double scale ) +void SkyMap::drawEquator( TQPainter& psky, double scale ) { //Draw Equator (currently can't be hidden on slew) - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "EqColor" ) ), 1, SolidLine ) ); + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "EqColor" ) ), 1, SolidLine ) ); SkyPoint *p = data->Equator.first(); - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); - QPoint o1 = o; - QPoint last = o; - QPoint cur = o; - QPoint o2; + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o1 = o; + TQPoint last = o; + TQPoint cur = o; + TQPoint o2; psky.moveTo( o.x(), o.y() ); bool newlyVisible = false; @@ -454,7 +454,7 @@ void SkyMap::drawEquator( QPainter& psky, double scale ) } //When drawing on the printer, the psky.pos() point does NOT get updated - //when lineTo or moveTo are called. Grrr. Need to store current position in QPoint cur. + //when lineTo or moveTo are called. Grrr. Need to store current position in TQPoint cur. int dx = cur.x() - o.x(); int dy = cur.y() - o.y(); cur = o; @@ -564,20 +564,20 @@ void SkyMap::drawEquator( QPainter& psky, double scale ) } } -void SkyMap::drawEcliptic( QPainter& psky, double scale ) +void SkyMap::drawEcliptic( TQPainter& psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); //Draw Ecliptic (currently can't be hidden on slew) - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "EclColor" ) ), 1, SolidLine ) ); + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "EclColor" ) ), 1, SolidLine ) ); SkyPoint *p = data->Ecliptic.first(); - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); - QPoint o2 = o; - QPoint o1 = o; - QPoint last = o; - QPoint cur = o; + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o2 = o; + TQPoint o1 = o; + TQPoint last = o; + TQPoint cur = o; psky.moveTo( o.x(), o.y() ); //index of point near the right or top/bottom edge @@ -601,7 +601,7 @@ void SkyMap::drawEcliptic( QPainter& psky, double scale ) } //When drawing on the printer, the psky.pos() point does NOT get updated - //when lineTo or moveTo are called. Grrr. Need to store current position in QPoint cur. + //when lineTo or moveTo are called. Grrr. Need to store current position in TQPoint cur. int dx = cur.x() - o.x(); int dy = cur.y() - o.y(); cur = o; @@ -722,22 +722,22 @@ void SkyMap::drawEcliptic( QPainter& psky, double scale ) } } -void SkyMap::drawHorizon( QPainter& psky, double scale ) +void SkyMap::drawHorizon( TQPainter& psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); - QPtrList<QPoint> points; + TQPtrList<TQPoint> points; points.setAutoDelete(true); - QPoint o, o2; + TQPoint o, o2; //Draw Horizon //The horizon should not be corrected for atmospheric refraction, so getXY has doRefract=false... if (Options::showHorizon() || Options::showGround() ) { - QPoint OutLeft(0,0), OutRight(0,0); + TQPoint OutLeft(0,0), OutRight(0,0); - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "HorzColor" ) ), 1, SolidLine ) ); - psky.setBrush( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "HorzColor" ) ), 1, SolidLine ) ); + psky.setBrush( TQColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); int ptsCount = 0; int maxdist = int(Options::zoomFactor()/4); @@ -760,7 +760,7 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) } } - //Use the QPtrList of points to pre-sort visible horizon points + //Use the TQPtrList of points to pre-sort visible horizon points if ( o.x() > -100 && o.x() < Width + 100 && o.y() > -100 && o.y() < Height + 100 ) { if ( Options::useAltAz() ) { register unsigned int j; @@ -771,12 +771,12 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) } } if ( found ) { - points.insert( j, new QPoint(o) ); + points.insert( j, new TQPoint(o) ); } else { - points.append( new QPoint(o) ); + points.append( new TQPoint(o) ); } } else { - points.append( new QPoint(o) ); + points.append( new TQPoint(o) ); } } else { //find the out-of-bounds points closest to the left and right borders if ( ( OutLeft.x() == 0 || o.x() > OutLeft.x() ) && o.x() < -100 ) { @@ -806,7 +806,7 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) int xtotal = ( points.at( 0 )->x() - OutLeft.x() ); int xx = ( points.at( 0 )->x() + 100 ) / xtotal; int yp = xx*OutRight.y() + (1-xx)*points.at( 0 )->y(); //interpolated left-edge y value - QPoint *LeftEdge = new QPoint( -100, yp ); + TQPoint *LeftEdge = new TQPoint( -100, yp ); points.insert( 0, LeftEdge ); //Prepend LeftEdge to the beginning of points //Interpolate from the last sorted onscreen point to ()+100, @@ -814,7 +814,7 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) xtotal = ( OutRight.x() - points.at( points.count() - 1 )->x() ); xx = ( Width + 100 - points.at( points.count() - 1 )->x() ) / xtotal; yp = xx*OutRight.y() + (1-xx)*points.at( points.count() - 1 )->y(); //interpolated right-edge y value - QPoint *RightEdge = new QPoint( Width+100, yp ); + TQPoint *RightEdge = new TQPoint( Width+100, yp ); points.append( RightEdge ); } //If there are no horizon points, then either the horizon doesn't pass through the screen @@ -828,13 +828,13 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) int xtotal = ( OutRight.x() - OutLeft.x() ); int xx = ( OutRight.x() + 100 ) / xtotal; int yp = xx*OutLeft.y() + (1-xx)*OutRight.y(); //interpolated left-edge y value -// QPoint *LeftEdge = new QPoint( -100, yp ); - points.append( new QPoint( -100, yp ) ); +// TQPoint *LeftEdge = new TQPoint( -100, yp ); + points.append( new TQPoint( -100, yp ) ); xx = ( Width + 100 - OutLeft.x() ) / xtotal; yp = xx*OutRight.y() + (1-xx)*OutLeft.y(); //interpolated right-edge y value -// QPoint *RightEdge = new QPoint( Width+100, yp ); - points.append( new QPoint( Width+100, yp ) ); +// TQPoint *RightEdge = new TQPoint( Width+100, yp ); + points.append( new TQPoint( Width+100, yp ) ); } if ( points.count() ) { @@ -872,7 +872,7 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) double r0 = 2.0*sin(0.25*dms::PI); // //Second QPointsArray for blocking the region outside the sky circle -// QPointArray bpts( 100 ); //need 90 points along sky circle, plus 4 to complete polygon +// TQPointArray bpts( 100 ); //need 90 points along sky circle, plus 4 to complete polygon // uint bpCount(0); if ( dx > r0 ) { //sky edge is visible @@ -892,12 +892,12 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) // bpts.setPoint( bpCount++, -100, Height + 100 ); // bpts.setPoint( bpCount++, Width + 100, Height + 100 ); // bpts.setPoint( bpCount++, Width + 100, Height/2 ); -// psky.setPen( QColor ( data->colorScheme()->colorNamed( "SkyColor" ) ) ); -// psky.setBrush( QColor ( data->colorScheme()->colorNamed( "SkyColor" ) ) ); +// psky.setPen( TQColor ( data->colorScheme()->colorNamed( "SkyColor" ) ) ); +// psky.setBrush( TQColor ( data->colorScheme()->colorNamed( "SkyColor" ) ) ); // psky.drawPolygon( bpts, false, 0, bpCount ); // //Reset colors for Horizon polygon -// psky.setPen( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); -// psky.setBrush( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); +// psky.setPen( TQColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); +// psky.setBrush( TQColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); } else { pts->setPoint( ptsCount++, Width+100, Height+100 ); //bottom right corner @@ -905,7 +905,7 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) } //Draw the Horizon polygon - psky.drawPolygon( ( const QPointArray ) *pts, false, 0, ptsCount ); + psky.drawPolygon( ( const TQPointArray ) *pts, false, 0, ptsCount ); //remove all items in points list for ( register unsigned int i=0; i<points.count(); ++i ) { @@ -915,12 +915,12 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) // Draw compass heading labels along horizon SkyPoint *c = new SkyPoint; - QPoint cpoint; + TQPoint cpoint; if ( Options::showGround() ) - psky.setPen( QColor ( data->colorScheme()->colorNamed( "CompassColor" ) ) ); + psky.setPen( TQColor ( data->colorScheme()->colorNamed( "CompassColor" ) ) ); else - psky.setPen( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); + psky.setPen( TQColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) ); //North c->setAz( 359.99 ); @@ -1025,8 +1025,8 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) if ( data->Horizon.count() && index2 > data->Horizon.count() - 1 ) index2 -= data->Horizon.count(); SkyPoint *p2 = data->Horizon.at(index2); - QPoint o1 = getXY( p, Options::useAltAz(), false, scale ); - QPoint o2 = getXY( p2, Options::useAltAz(), false, scale ); + TQPoint o1 = getXY( p, Options::useAltAz(), false, scale ); + TQPoint o2 = getXY( p2, Options::useAltAz(), false, scale ); double x1, x2; //there are 3 possibilities: (o2.x() > width()); (o2.y() < 0); (o2.y() > height()) @@ -1100,17 +1100,17 @@ void SkyMap::drawHorizon( QPainter& psky, double scale ) } //endif drawing horizon } -void SkyMap::drawConstellationLines( QPainter& psky, double scale ) +void SkyMap::drawConstellationLines( TQPainter& psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); //Draw Constellation Lines - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "CLineColor" ) ), 1, SolidLine ) ); //change to colorGrid + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "CLineColor" ) ), 1, SolidLine ) ); //change to colorGrid int iLast = -1; for ( SkyPoint *p = data->clineList.first(); p; p = data->clineList.next() ) { - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); if ( ( o.x() >= -1000 && o.x() <= Width+1000 && o.y() >=-1000 && o.y() <= Height+1000 ) ) { if ( data->clineModeList.at(data->clineList.at())->latin1()=='M' ) { @@ -1127,23 +1127,23 @@ void SkyMap::drawConstellationLines( QPainter& psky, double scale ) } } -void SkyMap::drawConstellationBoundaries( QPainter &psky, double scale ) { +void SkyMap::drawConstellationBoundaries( TQPainter &psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); - psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "CBoundColor" ) ), 1, SolidLine ) ); + psky.setPen( TQPen( TQColor( data->colorScheme()->colorNamed( "CBoundColor" ) ), 1, SolidLine ) ); for ( CSegment *seg = data->csegmentList.first(); seg; seg = data->csegmentList.next() ) { bool started( false ); SkyPoint *p = seg->firstNode(); - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); if ( ( o.x() >= -1000 && o.x() <= Width+1000 && o.y() >=-1000 && o.y() <= Height+1000 ) ) { psky.moveTo( o.x(), o.y() ); started = true; } for ( p = seg->nextNode(); p; p = seg->nextNode() ) { - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); if ( ( o.x() >= -1000 && o.x() <= Width+1000 && o.y() >=-1000 && o.y() <= Height+1000 ) ) { if ( started ) { @@ -1159,15 +1159,15 @@ void SkyMap::drawConstellationBoundaries( QPainter &psky, double scale ) { } } -void SkyMap::drawConstellationNames( QPainter& psky, double scale ) { +void SkyMap::drawConstellationNames( TQPainter& psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); //Draw Constellation Names - psky.setPen( QColor( data->colorScheme()->colorNamed( "CNameColor" ) ) ); + psky.setPen( TQColor( data->colorScheme()->colorNamed( "CNameColor" ) ) ); for ( SkyObject *p = data->cnameList.first(); p; p = data->cnameList.next() ) { if ( checkVisibility( p, fov(), XRange ) ) { - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); if (o.x() >= 0 && o.x() <= Width && o.y() >=0 && o.y() <= Height ) { if ( Options::useLatinConstellNames() ) { int dx = 5*p->name().length(); @@ -1185,7 +1185,7 @@ void SkyMap::drawConstellationNames( QPainter& psky, double scale ) { } } -void SkyMap::drawStars( QPainter& psky, double scale ) { +void SkyMap::drawStars( TQPainter& psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); @@ -1210,15 +1210,15 @@ void SkyMap::drawStars( QPainter& psky, double scale ) { if ( curStar->mag() > maglim || ( hideFaintStars && curStar->mag() > Options::magLimitHideStar() ) ) break; if ( checkVisibility( curStar, fov(), XRange ) ) { - QPoint o = getXY( curStar, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( curStar, Options::useAltAz(), Options::useRefraction(), scale ); // draw star if currently on screen if (o.x() >= 0 && o.x() <= Width && o.y() >=0 && o.y() <= Height ) { int size = int( scale * ( sizeFactor*( maglim - curStar->mag())/maglim ) + 1 ); if ( size > 0 ) { - QChar c = curStar->color(); - QPixmap *spixmap = starpix->getPixmap( &c, size ); + TQChar c = curStar->color(); + TQPixmap *spixmap = starpix->getPixmap( &c, size ); curStar->draw( psky, sky, spixmap, o.x(), o.y(), true, scale ); // now that we have drawn the star, we can display some extra info @@ -1227,9 +1227,9 @@ void SkyMap::drawStars( QPainter& psky, double scale ) { if ( !checkSlewing && (curStar->mag() <= Options::magLimitDrawStarInfo() ) && ( drawName || Options::showStarMagnitudes() ) ) { - psky.setPen( QColor( data->colorScheme()->colorNamed( "SNameColor" ) ) ); - QFont stdFont( psky.font() ); - QFont smallFont( stdFont ); + psky.setPen( TQColor( data->colorScheme()->colorNamed( "SNameColor" ) ) ); + TQFont stdFont( psky.font() ); + TQFont smallFont( stdFont ); smallFont.setPointSize( stdFont.pointSize() - 2 ); if ( Options::zoomFactor() < 10.*MINZOOM ) { psky.setFont( smallFont ); @@ -1250,7 +1250,7 @@ void SkyMap::drawStars( QPainter& psky, double scale ) { } } -void SkyMap::drawDeepSkyCatalog( QPainter& psky, QPtrList<DeepSkyObject>& catalog, QColor& color, +void SkyMap::drawDeepSkyCatalog( TQPainter& psky, TQPtrList<DeepSkyObject>& catalog, TQColor& color, bool drawObject, bool drawImage, double scale ) { if ( drawObject || drawImage ) { //don't do anything if nothing is to be drawn! @@ -1260,7 +1260,7 @@ void SkyMap::drawDeepSkyCatalog( QPainter& psky, QPtrList<DeepSkyObject>& catalo // Set color once psky.setPen( color ); psky.setBrush( NoBrush ); - QColor colorHST = data->colorScheme()->colorNamed( "HSTColor" ); + TQColor colorHST = data->colorScheme()->colorNamed( "HSTColor" ); double maglim = Options::magLimitDrawDeepSky(); @@ -1279,7 +1279,7 @@ void SkyMap::drawDeepSkyCatalog( QPainter& psky, QPtrList<DeepSkyObject>& catalo float mag = obj->mag(); //only draw objects if flags set and its brighter than maglim (unless mag is undefined (=99.9) if ( mag > 90.0 || mag < (float)maglim ) { - QPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction(), scale ); if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) { double PositionAngle = findPA( obj, o.x(), o.y(), scale ); @@ -1320,12 +1320,12 @@ void SkyMap::drawDeepSkyCatalog( QPainter& psky, QPtrList<DeepSkyObject>& catalo } } -void SkyMap::drawDeepSkyObjects( QPainter& psky, double scale ) +void SkyMap::drawDeepSkyObjects( TQPainter& psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); - QImage ScaledImage; + TQImage ScaledImage; bool checkSlewing = ( ( slewing || ( clockSlewing && data->clock()->isActive() ) ) && Options::hideOnSlew() ); @@ -1338,9 +1338,9 @@ void SkyMap::drawDeepSkyObjects( QPainter& psky, double scale ) bool drawImages( Options::showMessierImages() ); // calculate color objects once, outside the loop - QColor colorMess = data->colorScheme()->colorNamed( "MessColor" ); - QColor colorIC = data->colorScheme()->colorNamed( "ICColor" ); - QColor colorNGC = data->colorScheme()->colorNamed( "NGCColor" ); + TQColor colorMess = data->colorScheme()->colorNamed( "MessColor" ); + TQColor colorIC = data->colorScheme()->colorNamed( "ICColor" ); + TQColor colorNGC = data->colorScheme()->colorNamed( "NGCColor" ); // draw Messier catalog if ( drawMess ) { @@ -1366,12 +1366,12 @@ void SkyMap::drawDeepSkyObjects( QPainter& psky, double scale ) //Draw Custom Catalogs for ( register unsigned int i=0; i<data->CustomCatalogs.count(); ++i ) { if ( Options::showCatalog()[i] ) { - QPtrList<SkyObject> cat = data->CustomCatalogs.at(i)->objList(); + TQPtrList<SkyObject> cat = data->CustomCatalogs.at(i)->objList(); for ( SkyObject *obj = cat.first(); obj; obj = cat.next() ) { if ( checkVisibility( obj, fov(), XRange ) ) { - QPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction(), scale ); if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) { @@ -1383,11 +1383,11 @@ void SkyMap::drawDeepSkyObjects( QPainter& psky, double scale ) int size = int( sizeFactor*(zoomlim - mag) ) + 1; if (size>23) size=23; if ( size > 0 ) { - QChar c = starobj->color(); - QPixmap *spixmap = starpix->getPixmap( &c, size ); + TQChar c = starobj->color(); + TQPixmap *spixmap = starpix->getPixmap( &c, size ); // Try to paint with the selected color - spixmap->fill(QColor( data->CustomCatalogs.at(i)->color() )); + spixmap->fill(TQColor( data->CustomCatalogs.at(i)->color() )); starobj->draw( psky, sky, spixmap, o.x(), o.y(), true, scale ); // After drawing the star we display some extra info like // the name ... @@ -1395,9 +1395,9 @@ void SkyMap::drawDeepSkyObjects( QPainter& psky, double scale ) if ( !checkSlewing && (starobj->mag() <= Options::magLimitDrawStarInfo() ) && ( drawName || Options::showStarMagnitudes() ) ) { - psky.setPen( QColor( data->colorScheme()->colorNamed( "SNameColor" ) ) ); - QFont stdFont( psky.font() ); - QFont smallFont( stdFont ); + psky.setPen( TQColor( data->colorScheme()->colorNamed( "SNameColor" ) ) ); + TQFont stdFont( psky.font() ); + TQFont smallFont( stdFont ); smallFont.setPointSize( stdFont.pointSize() - 2 ); if ( Options::zoomFactor() < 10.*MINZOOM ) { psky.setFont( smallFont ); @@ -1417,7 +1417,7 @@ void SkyMap::drawDeepSkyObjects( QPainter& psky, double scale ) dso->drawImage( psky, o.x(), o.y(), pa, Options::zoomFactor() ); psky.setBrush( NoBrush ); - psky.setPen( QColor( data->CustomCatalogs.at(i)->color() ) ); + psky.setPen( TQColor( data->CustomCatalogs.at(i)->color() ) ); dso->drawSymbol( psky, o.x(), o.y(), pa, Options::zoomFactor() ); } @@ -1428,7 +1428,7 @@ void SkyMap::drawDeepSkyObjects( QPainter& psky, double scale ) } } -void SkyMap::drawAttachedLabels( QPainter &psky, double scale ) { +void SkyMap::drawAttachedLabels( TQPainter &psky, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); @@ -1476,7 +1476,7 @@ void SkyMap::drawAttachedLabels( QPainter &psky, double scale ) { if ( obj->type() == SkyObject::ASTEROID && ! drawAsteroids ) return; if ( checkVisibility( obj, fov(), XRange ) ) { - QPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( obj, Options::useAltAz(), Options::useRefraction(), scale ); if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) { drawNameLabel( psky, obj, o.x(), o.y(), scale ); } @@ -1485,17 +1485,17 @@ void SkyMap::drawAttachedLabels( QPainter &psky, double scale ) { //Attach a label to the centered object if ( focusObject() != NULL && Options::useAutoLabel() ) { - QPoint o = getXY( focusObject(), Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( focusObject(), Options::useAltAz(), Options::useRefraction(), scale ); if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) drawNameLabel( psky, focusObject(), o.x(), o.y(), scale ); } } -void SkyMap::drawNameLabel( QPainter &psky, SkyObject *obj, int x, int y, double scale ) { +void SkyMap::drawNameLabel( TQPainter &psky, SkyObject *obj, int x, int y, double scale ) { int size(0); - QFont stdFont( psky.font() ); - QFont smallFont( stdFont ); + TQFont stdFont( psky.font() ); + TQFont smallFont( stdFont ); smallFont.setPointSize( stdFont.pointSize() - 2 ); if ( Options::zoomFactor() < 10.*MINZOOM ) { psky.setFont( smallFont ); @@ -1540,18 +1540,18 @@ void SkyMap::drawNameLabel( QPainter &psky, SkyObject *obj, int x, int y, double psky.setFont( stdFont ); } -void SkyMap::drawPlanetTrail( QPainter& psky, KSPlanetBase *ksp, double scale ) +void SkyMap::drawPlanetTrail( TQPainter& psky, KSPlanetBase *ksp, double scale ) { if ( ksp->hasTrail() ) { int Width = int( scale * width() ); int Height = int( scale * height() ); - QColor tcolor1 = QColor( data->colorScheme()->colorNamed( "PlanetTrailColor" ) ); - QColor tcolor2 = QColor( data->colorScheme()->colorNamed( "SkyColor" ) ); + TQColor tcolor1 = TQColor( data->colorScheme()->colorNamed( "PlanetTrailColor" ) ); + TQColor tcolor2 = TQColor( data->colorScheme()->colorNamed( "SkyColor" ) ); SkyPoint *p = ksp->trail()->first(); - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); - QPoint cur( o ); + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint cur( o ); bool doDrawLine(false); int i = 0; @@ -1562,16 +1562,16 @@ void SkyMap::drawPlanetTrail( QPainter& psky, KSPlanetBase *ksp, double scale ) doDrawLine = true; } - psky.setPen( QPen( tcolor1, 1 ) ); + psky.setPen( TQPen( tcolor1, 1 ) ); for ( p = ksp->trail()->next(); p; p = ksp->trail()->next() ) { if ( Options::fadePlanetTrails() ) { //Define interpolated color - QColor tcolor = QColor( + TQColor tcolor = TQColor( (i*tcolor1.red() + (n-i)*tcolor2.red())/n, (i*tcolor1.green() + (n-i)*tcolor2.green())/n, (i*tcolor1.blue() + (n-i)*tcolor2.blue())/n ); ++i; - psky.setPen( QPen( tcolor, 1 ) ); + psky.setPen( TQPen( tcolor, 1 ) ); } o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); @@ -1592,7 +1592,7 @@ void SkyMap::drawPlanetTrail( QPainter& psky, KSPlanetBase *ksp, double scale ) } } -void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) +void SkyMap::drawSolarSystem( TQPainter& psky, bool drawPlanets, double scale ) { int Width = int( scale * width() ); int Height = int( scale * height() ); @@ -1629,9 +1629,9 @@ void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) if ( ast->mag() > Options::magLimitAsteroid() ) break; if ( checkVisibility( ast, fov(), XRange ) ) { - psky.setPen( QPen( QColor( "gray" ) ) ); - psky.setBrush( QBrush( QColor( "gray" ) ) ); - QPoint o = getXY( ast, Options::useAltAz(), Options::useRefraction(), scale ); + psky.setPen( TQPen( TQColor( "gray" ) ) ); + psky.setBrush( TQBrush( TQColor( "gray" ) ) ); + TQPoint o = getXY( ast, Options::useAltAz(), Options::useRefraction(), scale ); if ( ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) ) { int size = int( ast->angSize() * scale * dms::PI * Options::zoomFactor()/10800.0 ); @@ -1642,7 +1642,7 @@ void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) //draw Name if ( Options::showAsteroidNames() && ast->mag() < Options::magLimitAsteroidName() ) { - psky.setPen( QColor( data->colorScheme()->colorNamed( "PNameColor" ) ) ); + psky.setPen( TQColor( data->colorScheme()->colorNamed( "PNameColor" ) ) ); drawNameLabel( psky, ast, o.x(), o.y(), scale ); } } @@ -1654,9 +1654,9 @@ void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) if ( Options::showComets() ) { for ( KSComet *com = data->cometList.first(); com; com = data->cometList.next() ) { if ( checkVisibility( com, fov(), XRange ) ) { - psky.setPen( QPen( QColor( "cyan4" ) ) ); - psky.setBrush( QBrush( QColor( "cyan4" ) ) ); - QPoint o = getXY( com, Options::useAltAz(), Options::useRefraction(), scale ); + psky.setPen( TQPen( TQColor( "cyan4" ) ) ); + psky.setBrush( TQBrush( TQColor( "cyan4" ) ) ); + TQPoint o = getXY( com, Options::useAltAz(), Options::useRefraction(), scale ); if ( ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) ) { int size = int( com->angSize() * scale * dms::PI * Options::zoomFactor()/10800.0 ); @@ -1667,7 +1667,7 @@ void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) //draw Name if ( Options::showCometNames() && com->rsun() < Options::maxRadCometName() ) { - psky.setPen( QColor( data->colorScheme()->colorNamed( "PNameColor" ) ) ); + psky.setPen( TQColor( data->colorScheme()->colorNamed( "PNameColor" ) ) ); drawNameLabel( psky, com, o.x(), o.y(), scale ); } } @@ -1677,50 +1677,50 @@ void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) //Draw Pluto if ( Options::showPluto() ) { - drawPlanet(psky, data->PCat->findByName("Pluto"), QColor( "gray" ), 50.*MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Pluto"), TQColor( "gray" ), 50.*MINZOOM, 1, scale ); } //Draw Neptune if ( Options::showNeptune() ) { - drawPlanet(psky, data->PCat->findByName("Neptune"), QColor( "SkyBlue" ), 20.*MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Neptune"), TQColor( "SkyBlue" ), 20.*MINZOOM, 1, scale ); } //Draw Uranus if ( Options::showUranus() ) { - drawPlanet(psky, data->PCat->findByName("Uranus"), QColor( "LightSeaGreen" ), 20.*MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Uranus"), TQColor( "LightSeaGreen" ), 20.*MINZOOM, 1, scale ); } //Draw Saturn if ( Options::showSaturn() ) { - drawPlanet(psky, data->PCat->findByName("Saturn"), QColor( "LightYellow2" ), 20.*MINZOOM, 2, scale ); + drawPlanet(psky, data->PCat->findByName("Saturn"), TQColor( "LightYellow2" ), 20.*MINZOOM, 2, scale ); } //Draw Jupiter and its moons. //Draw all moons first, then Jupiter, then redraw moons that are in front of Jupiter. if ( Options::showJupiter() ) { //Draw Jovian moons - psky.setPen( QPen( QColor( "white" ) ) ); + psky.setPen( TQPen( TQColor( "white" ) ) ); if ( Options::zoomFactor() > 10.*MINZOOM ) { for ( unsigned int i=0; i<4; ++i ) { - QPoint o = getXY( data->jmoons->pos(i), Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( data->jmoons->pos(i), Options::useAltAz(), Options::useRefraction(), scale ); if ( ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) ) { psky.drawEllipse( o.x()-1, o.y()-1, 2, 2 ); } } } - drawPlanet(psky, data->PCat->findByName("Jupiter"), QColor( "Goldenrod" ), 20.*MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Jupiter"), TQColor( "Goldenrod" ), 20.*MINZOOM, 1, scale ); //Re-draw Jovian moons which are in front of Jupiter, also draw all 4 moon labels. - psky.setPen( QPen( QColor( "white" ) ) ); + psky.setPen( TQPen( TQColor( "white" ) ) ); if ( Options::zoomFactor() > 10.*MINZOOM ) { - QFont pfont = psky.font(); - QFont moonFont = psky.font(); + TQFont pfont = psky.font(); + TQFont moonFont = psky.font(); moonFont.setPointSize( pfont.pointSize() - 2 ); psky.setFont( moonFont ); for ( unsigned int i=0; i<4; ++i ) { - QPoint o = getXY( data->jmoons->pos(i), Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( data->jmoons->pos(i), Options::useAltAz(), Options::useRefraction(), scale ); if ( ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) ) { if ( data->jmoons->z(i) < 0.0 ) //Moon is nearer than Jupiter psky.drawEllipse( o.x()-1, o.y()-1, 2, 2 ); @@ -1740,7 +1740,7 @@ void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) //Draw Mars if ( Options::showMars() ) { - drawPlanet(psky, data->PCat->findByName("Mars"), QColor( "Red" ), 20.*MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Mars"), TQColor( "Red" ), 20.*MINZOOM, 1, scale ); } //For the inner planets, we need to determine the distance-order @@ -1760,29 +1760,29 @@ void SkyMap::drawSolarSystem( QPainter& psky, bool drawPlanets, double scale ) if ( i==is ) { //Draw Sun if ( Options::showSun() ) { - drawPlanet(psky, data->PCat->findByName("Sun"), QColor( "Yellow" ), MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Sun"), TQColor( "Yellow" ), MINZOOM, 1, scale ); } } else if ( i==im ) { //Draw Mercury if ( Options::showMercury() ) { - drawPlanet(psky, data->PCat->findByName("Mercury"), QColor( "SlateBlue1" ), 20.*MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Mercury"), TQColor( "SlateBlue1" ), 20.*MINZOOM, 1, scale ); } } else if ( i==iv ) { //Draw Venus if ( Options::showVenus() ) { - drawPlanet(psky, data->PCat->findByName("Venus"), QColor( "LightGreen" ), 20.*MINZOOM, 1, scale ); + drawPlanet(psky, data->PCat->findByName("Venus"), TQColor( "LightGreen" ), 20.*MINZOOM, 1, scale ); } } } //Draw Moon if ( Options::showMoon() ) { - drawPlanet(psky, data->Moon, QColor( "White" ), MINZOOM, 1, scale ); + drawPlanet(psky, data->Moon, TQColor( "White" ), MINZOOM, 1, scale ); } } } -void SkyMap::drawPlanet( QPainter &psky, KSPlanetBase *p, QColor c, +void SkyMap::drawPlanet( TQPainter &psky, KSPlanetBase *p, TQColor c, double zoommin, int resize_mult, double scale ) { if ( checkVisibility( p, fov(), XRange ) ) { @@ -1795,7 +1795,7 @@ void SkyMap::drawPlanet( QPainter &psky, KSPlanetBase *p, QColor c, psky.setPen( c ); psky.setBrush( c ); - QPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); + TQPoint o = getXY( p, Options::useAltAz(), Options::useRefraction(), scale ); //Is planet onscreen? if ( o.x() >= 0 && o.x() <= Width && o.y() >= 0 && o.y() <= Height ) { @@ -1841,15 +1841,15 @@ void SkyMap::drawPlanet( QPainter &psky, KSPlanetBase *p, QColor c, //draw Name if ( Options::showPlanetNames() ) { - psky.setPen( QColor( data->colorScheme()->colorNamed( "PNameColor" ) ) ); + psky.setPen( TQColor( data->colorScheme()->colorNamed( "PNameColor" ) ) ); drawNameLabel( psky, p, o.x(), o.y(), scale ); } } } } -void SkyMap::exportSkyImage( const QPaintDevice *pd ) { - QPainter p; +void SkyMap::exportSkyImage( const TQPaintDevice *pd ) { + TQPainter p; //shortcuts to inform wheter to draw different objects bool drawPlanets( Options::showPlanets() ); @@ -1860,7 +1860,7 @@ void SkyMap::exportSkyImage( const QPaintDevice *pd ) { bool drawGrid( Options::showGrid() ); p.begin( pd ); - QPaintDeviceMetrics pdm( p.device() ); + TQPaintDeviceMetrics pdm( p.device() ); //scale image such that it fills 90% of the x or y dimension on the paint device double xscale = double(pdm.width()) / double(width()); @@ -1872,11 +1872,11 @@ void SkyMap::exportSkyImage( const QPaintDevice *pd ) { int x1 = int( 0.5*(pdm.width() - pdWidth) ); int y1 = int( 0.5*(pdm.height() - pdHeight) ); - p.setClipRect( QRect( x1, y1, pdWidth, pdHeight ) ); + p.setClipRect( TQRect( x1, y1, pdWidth, pdHeight ) ); p.setClipping( true ); //Fill background with sky color - p.fillRect( x1, y1, pdWidth, pdHeight, QBrush( data->colorScheme()->colorNamed( "SkyColor" ) ) ); + p.fillRect( x1, y1, pdWidth, pdHeight, TQBrush( data->colorScheme()->colorNamed( "SkyColor" ) ) ); if ( x1 || y1 ) p.translate( x1, y1 ); diff --git a/kstars/kstars/skymapevents.cpp b/kstars/kstars/skymapevents.cpp index c35f3672..26b04a5f 100644 --- a/kstars/kstars/skymapevents.cpp +++ b/kstars/kstars/skymapevents.cpp @@ -20,9 +20,9 @@ #include <stdlib.h> #include <math.h> //using fabs() -#include <qcursor.h> -#include <qpainter.h> -#include <qfile.h> +#include <tqcursor.h> +#include <tqpainter.h> +#include <tqfile.h> #include <kiconloader.h> #include <kstatusbar.h> @@ -39,7 +39,7 @@ #include "kspopupmenu.h" #include "ksmoon.h" -void SkyMap::resizeEvent( QResizeEvent * ) +void SkyMap::resizeEvent( TQResizeEvent * ) { computeSkymap = true; // skymap must be new computed if ( testWState(WState_AutoMask) ) updateMask(); @@ -52,8 +52,8 @@ void SkyMap::resizeEvent( QResizeEvent * ) sky2->resize( width(), height() ); } -void SkyMap::keyPressEvent( QKeyEvent *e ) { - QString s; +void SkyMap::keyPressEvent( TQKeyEvent *e ) { + TQString s; bool arrowKeyPressed( false ); bool shiftPressed( false ); float step = 1.0; @@ -274,7 +274,7 @@ void SkyMap::keyPressEvent( QKeyEvent *e ) { case Key_P: //Show Popup menu for Clicked/Centered object if ( shiftPressed ) setClickedObject( focusObject() ); if ( clickedObject() ) - clickedObject()->showPopupMenu( pmenu, QCursor::pos() ); + clickedObject()->showPopupMenu( pmenu, TQCursor::pos() ); break; case Key_O: //Add object to Observing List @@ -310,67 +310,67 @@ void SkyMap::keyPressEvent( QKeyEvent *e ) { case Key_G: //loop through all cities { - QFile file; + TQFile file; if ( KSUtils::openDataFile( file, "Cities.dat" ) ) { KSFileReader fileReader( file ); int nCount = 0; while (fileReader.hasMoreLines()) { - QString line = fileReader.readLine(); + TQString line = fileReader.readLine(); nCount++; kdDebug() << "Line " << nCount << " : " << line; } } - QTime t1; + TQTime t1; t1.start(); for (int i=0;i<10;i++) { if ( KSUtils::openDataFile( file, "Cities.dat" ) ) { - QString sAll( file.readAll() ); - QStringList lines = QStringList::split( "\n", sAll ); + TQString sAll( file.readAll() ); + TQStringList lines = TQStringList::split( "\n", sAll ); int nSize = lines.size(); for ( int i=0; i<nSize; i++ ) { - QString& line = lines[i]; + TQString& line = lines[i]; } file.close(); } } kdDebug() << "time taken for reading city data via read all (10 times): (msec): " << t1.elapsed() << endl; - QTime t2; + TQTime t2; t2.start(); for (int i=0;i<10;i++) { if ( KSUtils::openDataFile( file, "Cities.dat" ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); } file.close(); } } kdDebug() << "time taken for reading city data old code (10 times): (msec): " << t2.elapsed() << endl; - QTime t3; + TQTime t3; t3.start(); for (int i=0;i<1;i++) { if ( KSUtils::openDataFile( file, "ngcic.dat" ) ) { - QString sAll( file.readAll() ); - QStringList lines = QStringList::split( "\n", sAll ); + TQString sAll( file.readAll() ); + TQStringList lines = TQStringList::split( "\n", sAll ); int nSize = lines.size(); for ( int i=0; i<nSize; i++ ) { - QString& line = lines[i]; + TQString& line = lines[i]; } file.close(); } } kdDebug() << "time taken for reading deep sky data via read all (1 times): (msec): " << t3.elapsed() << endl; - QTime t4; + TQTime t4; t4.start(); for (int i=0;i<1;i++) { if ( KSUtils::openDataFile( file, "ngcic.dat" ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { - QString line = stream.readLine(); + TQString line = stream.readLine(); } file.close(); } @@ -409,7 +409,7 @@ void SkyMap::stopTracking() { if ( ksw && Options::isTracking() ) ksw->slotTrack(); } -void SkyMap::keyReleaseEvent( QKeyEvent *e ) { +void SkyMap::keyReleaseEvent( TQKeyEvent *e ) { switch ( e->key() ) { case Key_Left : //no break; continue to Key_Down case Key_Right : //no break; continue to Key_Down @@ -429,7 +429,7 @@ void SkyMap::keyReleaseEvent( QKeyEvent *e ) { } } -void SkyMap::mouseMoveEvent( QMouseEvent *e ) { +void SkyMap::mouseMoveEvent( TQMouseEvent *e ) { if ( Options::useHoverLabel() ) { //First of all, if the transientObject() pointer is not NULL, then //we just moved off of a hovered object. Begin fading the label. @@ -453,11 +453,11 @@ void SkyMap::mouseMoveEvent( QMouseEvent *e ) { if ( ZoomRect.center().x() > 0 && ZoomRect.center().y() > 0 ) { //cancel operation if the user let go of CTRL if ( !( e->state() & ControlButton ) ) { - ZoomRect = QRect(); //invalidate ZoomRect + ZoomRect = TQRect(); //invalidate ZoomRect update(); } else { //Resize the rectangle so that it passes through the cursor position - QPoint pcenter = ZoomRect.center(); + TQPoint pcenter = ZoomRect.center(); int dx = abs(e->x() - pcenter.x()); int dy = abs(e->y() - pcenter.y()); if ( dx == 0 || float(dy)/float(dx) > float(height())/float(width()) ) { @@ -554,7 +554,7 @@ void SkyMap::mouseMoveEvent( QMouseEvent *e ) { } else { if ( ksw ) { - QString sX, sY, s; + TQString sX, sY, s; sX = mousePoint()->az()->toDMSString(true); //true = force +/- symbol sY = mousePoint()->alt()->toDMSString(true); //true=force +/- symbol if ( Options::useAltAz() && Options::useRefraction() ) @@ -571,12 +571,12 @@ void SkyMap::mouseMoveEvent( QMouseEvent *e ) { } } -void SkyMap::wheelEvent( QWheelEvent *e ) { +void SkyMap::wheelEvent( TQWheelEvent *e ) { if ( ksw && e->delta() > 0 ) ksw->slotZoomIn(); else if ( ksw ) ksw->slotZoomOut(); } -void SkyMap::mouseReleaseEvent( QMouseEvent * ) { +void SkyMap::mouseReleaseEvent( TQMouseEvent * ) { if ( infoBoxes()->unGrabBox() ) { update(); return; @@ -600,11 +600,11 @@ void SkyMap::mouseReleaseEvent( QMouseEvent * ) { ksw->zoom( Options::zoomFactor() * factor ); setDefaultMouseCursor(); - ZoomRect = QRect(); //invalidate ZoomRect + ZoomRect = TQRect(); //invalidate ZoomRect forceUpdate(); } else { setDefaultMouseCursor(); - ZoomRect = QRect(); //just in case user Ctrl+clicked + released w/o dragging... + ZoomRect = TQRect(); //just in case user Ctrl+clicked + released w/o dragging... } if (mouseMoveCursor) setDefaultMouseCursor(); // set default cursor @@ -627,7 +627,7 @@ void SkyMap::mouseReleaseEvent( QMouseEvent * ) { scrollCount = 0; } -void SkyMap::mousePressEvent( QMouseEvent *e ) { +void SkyMap::mousePressEvent( TQMouseEvent *e ) { //did we Grab an infoBox? if ( e->button() == LeftButton && infoBoxes()->grabBox( e ) ) { update(); //refresh without redrawing skymap @@ -642,8 +642,8 @@ void SkyMap::mousePressEvent( QMouseEvent *e ) { } // if button is down and cursor is not moved set the move cursor after 500 ms - QTimer t; - t.singleShot (500, this, SLOT (setMouseMoveCursor())); + TQTimer t; + t.singleShot (500, this, TQT_SLOT (setMouseMoveCursor())); double dx = ( 0.5*width() - e->x() )/Options::zoomFactor(); double dy = ( 0.5*height() - e->y() )/Options::zoomFactor(); @@ -672,7 +672,7 @@ void SkyMap::mousePressEvent( QMouseEvent *e ) { setClickedPoint( clickedObject() ); if ( e->button() == RightButton ) { - clickedObject()->showPopupMenu( pmenu, QCursor::pos() ); + clickedObject()->showPopupMenu( pmenu, TQCursor::pos() ); } if ( ksw && e->button() == LeftButton ) { @@ -693,7 +693,7 @@ void SkyMap::mousePressEvent( QMouseEvent *e ) { pmenu->createEmptyMenu( nullObj ); delete nullObj; - pmenu->popup( QCursor::pos() ); + pmenu->popup( TQCursor::pos() ); break; } @@ -704,7 +704,7 @@ void SkyMap::mousePressEvent( QMouseEvent *e ) { } } -void SkyMap::mouseDoubleClickEvent( QMouseEvent *e ) { +void SkyMap::mouseDoubleClickEvent( TQMouseEvent *e ) { //Was the event inside an infoBox? If so, shade the box. if ( e->button() == LeftButton ) { if ( infoBoxes()->shadeBox( e ) ) { @@ -721,7 +721,7 @@ void SkyMap::mouseDoubleClickEvent( QMouseEvent *e ) { } } -void SkyMap::paintEvent( QPaintEvent * ) +void SkyMap::paintEvent( TQPaintEvent * ) { //If computeSkymap is false, then we just refresh the window using the stored sky pixmap //and draw the "overlays" on top. This lets us update the overlay information rapidly @@ -736,7 +736,7 @@ void SkyMap::paintEvent( QPaintEvent * ) return ; // exit because the pixmap is repainted and that's all what we want } - QPainter psky; + TQPainter psky; setMapGeometry(); //checkSlewing combines the slewing flag (which is true when the display is actually in motion), @@ -754,7 +754,7 @@ void SkyMap::paintEvent( QPaintEvent * ) bool drawGrid( Options::showGrid() && !(checkSlewing && Options::hideGrid() ) ); psky.begin( sky ); - psky.fillRect( 0, 0, width(), height(), QBrush( data->colorScheme()->colorNamed( "SkyColor" ) ) ); + psky.fillRect( 0, 0, width(), height(), TQBrush( data->colorScheme()->colorNamed( "SkyColor" ) ) ); if ( drawMW ) drawMilkyWay( psky ); if ( drawGrid ) drawCoordinateGrid( psky ); diff --git a/kstars/kstars/skyobject.cpp b/kstars/kstars/skyobject.cpp index b523be3b..5ea5036d 100644 --- a/kstars/kstars/skyobject.cpp +++ b/kstars/kstars/skyobject.cpp @@ -19,10 +19,10 @@ #include <kglobal.h> #include <kstandarddirs.h> -#include <qpoint.h> -#include <qregexp.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqpoint.h> +#include <tqregexp.h> +#include <tqfile.h> +#include <tqtextstream.h> #include "skyobject.h" #include "starobject.h" //needed in saveUserLog() @@ -31,10 +31,10 @@ #include "geolocation.h" #include "kstarsdatetime.h" -QString SkyObject::emptyString = QString(""); -QString SkyObject::unnamedString = QString(i18n("unnamed")); -QString SkyObject::unnamedObjectString = QString(i18n("unnamed object")); -QString SkyObject::starString = QString("star"); +TQString SkyObject::emptyString = TQString(""); +TQString SkyObject::unnamedString = TQString(i18n("unnamed")); +TQString SkyObject::unnamedObjectString = TQString(i18n("unnamed object")); +TQString SkyObject::starString = TQString("star"); SkyObject::SkyObject( SkyObject &o ) : SkyPoint( o ) { setType( o.type() ); @@ -49,7 +49,7 @@ SkyObject::SkyObject( SkyObject &o ) : SkyPoint( o ) { } SkyObject::SkyObject( int t, dms r, dms d, float m, - QString n, QString n2, QString lname ) : SkyPoint( r, d) { + TQString n, TQString n2, TQString lname ) : SkyPoint( r, d) { setType( t ); Magnitude = m; Name = 0; @@ -61,7 +61,7 @@ SkyObject::SkyObject( int t, dms r, dms d, float m, } SkyObject::SkyObject( int t, double r, double d, float m, - QString n, QString n2, QString lname ) : SkyPoint( r, d) { + TQString n, TQString n2, TQString lname ) : SkyPoint( r, d) { setType( t ); Magnitude = m; Name = 0; @@ -78,24 +78,24 @@ SkyObject::~SkyObject() { delete LongName; } -void SkyObject::setLongName( const QString &longname ) { +void SkyObject::setLongName( const TQString &longname ) { delete LongName; if ( longname.isEmpty() ) { if ( hasName() ) - LongName = new QString(translatedName()); + LongName = new TQString(translatedName()); else if ( hasName2() ) - LongName = new QString(*Name2); + LongName = new TQString(*Name2); else LongName = 0; } else { - LongName = new QString(longname); + LongName = new TQString(longname); } } -QTime SkyObject::riseSetTime( const KStarsDateTime &dt, const GeoLocation *geo, bool rst ) { +TQTime SkyObject::riseSetTime( const KStarsDateTime &dt, const GeoLocation *geo, bool rst ) { //this object does not rise or set; return an invalid time if ( checkCircumpolar(geo->lat()) ) - return QTime( 25, 0, 0 ); + return TQTime( 25, 0, 0 ); //First of all, if the object is below the horizon at date/time dt, adjust the time //to bring it above the horizon @@ -113,9 +113,9 @@ QTime SkyObject::riseSetTime( const KStarsDateTime &dt, const GeoLocation *geo, return geo->UTtoLT( KStarsDateTime( dt2.date(), riseSetTimeUT( dt2, geo, rst ) ) ).time(); } -QTime SkyObject::riseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, bool riseT ) { +TQTime SkyObject::riseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, bool riseT ) { // First trial to calculate UT - QTime UT = auxRiseSetTimeUT( dt, geo, ra(), dec(), riseT ); + TQTime UT = auxRiseSetTimeUT( dt, geo, ra(), dec(), riseT ); // We iterate once more using the calculated UT to compute again // the ra and dec for that time and hence the rise/set time. @@ -144,7 +144,7 @@ dms SkyObject::riseSetTimeLST( const KStarsDateTime &dt, const GeoLocation *geo, return geo->GSTtoLST( rst.gst() ); } -QTime SkyObject::auxRiseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, +TQTime SkyObject::auxRiseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, const dms *righta, const dms *decl, bool riseT) { dms LST = auxRiseSetTimeLST( geo->lat(), righta, decl, riseT ); return dt.GSTtoUT( geo->LSTtoGST( LST ) ); @@ -170,7 +170,7 @@ dms SkyObject::riseSetTimeAz( const KStarsDateTime &dt, const GeoLocation *geo, double sindec, cosdec, sinlat, coslat, sinHA, cosHA; double sinAlt, cosAlt; - QTime UT = riseSetTimeUT( dt, geo, riseT ); + TQTime UT = riseSetTimeUT( dt, geo, riseT ); KStarsDateTime dt0 = dt; dt0.setTime( UT ); SkyPoint sp = recomputeCoords( dt0, geo ); @@ -195,7 +195,7 @@ dms SkyObject::riseSetTimeAz( const KStarsDateTime &dt, const GeoLocation *geo, return Azimuth; } -QTime SkyObject::transitTimeUT( const KStarsDateTime &dt, const GeoLocation *geo ) { +TQTime SkyObject::transitTimeUT( const KStarsDateTime &dt, const GeoLocation *geo ) { dms LST = geo->GSTtoLST( dt.gst() ); //dSec is the number of seconds until the object transits. @@ -216,13 +216,13 @@ QTime SkyObject::transitTimeUT( const KStarsDateTime &dt, const GeoLocation *geo return dt.addSecs( dSec ).time(); } -QTime SkyObject::transitTime( const KStarsDateTime &dt, const GeoLocation *geo ) { +TQTime SkyObject::transitTime( const KStarsDateTime &dt, const GeoLocation *geo ) { return geo->UTtoLT( KStarsDateTime( dt.date(), transitTimeUT( dt, geo ) ) ).time(); } dms SkyObject::transitAltitude( const KStarsDateTime &dt, const GeoLocation *geo ) { KStarsDateTime dt0 = dt; - QTime UT = transitTimeUT( dt, geo ); + TQTime UT = transitTimeUT( dt, geo ); dt0.setTime( UT ); SkyPoint sp = recomputeCoords( dt0, geo ); const dms *decm = sp.dec0(); @@ -307,7 +307,7 @@ bool SkyObject::checkCircumpolar( const dms *gLat ) { return false; } -QString SkyObject::typeName( void ) const { +TQString SkyObject::typeName( void ) const { if ( Type==0 ) return i18n( "Star" ); else if ( Type==1 ) return i18n( "Catalog Star" ); else if ( Type==2 ) return i18n( "Planet" ); @@ -321,25 +321,25 @@ QString SkyObject::typeName( void ) const { else if ( Type==10 ) return i18n( "Asteroid" ); else return i18n( "Unknown Type" ); } -void SkyObject::setName( const QString &name ) { +void SkyObject::setName( const TQString &name ) { // if (name == "star" ) kdDebug() << "name == star" << endl; delete Name; if (!name.isEmpty()) - Name = new QString(name); + Name = new TQString(name); else { Name = 0; /*kdDebug() << "name saved" << endl;*/ } } -void SkyObject::setName2( const QString &name2 ) { +void SkyObject::setName2( const TQString &name2 ) { delete Name2; if (!name2.isEmpty()) - Name2 = new QString(name2); + Name2 = new TQString(name2); else { Name2 = 0; /*kdDebug() << "name2 saved" << endl;*/ } } -QString SkyObject::messageFromTitle( const QString &imageTitle ) { - QString message = imageTitle; +TQString SkyObject::messageFromTitle( const TQString &imageTitle ) { + TQString message = imageTitle; //HST Image if ( imageTitle == i18n( "Show HST Image" ) || imageTitle.contains("HST") ) { @@ -377,9 +377,9 @@ QString SkyObject::messageFromTitle( const QString &imageTitle ) { //New saveUserLog, moved from DetailDialog. //Should create a special UserLog widget that encapsulates the "default" //message in the widget when no log exists (much like we do with dmsBox now) -void SkyObject::saveUserLog( const QString &newLog ) { - QFile file; - QString logs; //existing logs +void SkyObject::saveUserLog( const TQString &newLog ) { + TQFile file; + TQString logs; //existing logs //Do nothing if new log is the "default" message //(keep going if new log is empty; we'll want to delete its current entry) @@ -387,7 +387,7 @@ void SkyObject::saveUserLog( const QString &newLog ) { return; // header label - QString KSLabel ="[KSLABEL:" + name() + "]"; + TQString KSLabel ="[KSLABEL:" + name() + "]"; //However, we can't accept a star name if it has a greek letter in it: if ( type() == STAR ) { StarObject *star = (StarObject*)this; @@ -397,7 +397,7 @@ void SkyObject::saveUserLog( const QString &newLog ) { file.setName( locateLocal( "appdata", "userlog.dat" ) ); //determine filename in local user KDE directory tree. if ( file.open( IO_ReadOnly)) { - QTextStream instream(&file); + TQTextStream instream(&file); // read all data into memory logs = instream.read(); file.close(); @@ -406,7 +406,7 @@ void SkyObject::saveUserLog( const QString &newLog ) { //Remove old log entry from the logs text if ( ! userLog.isEmpty() ) { int startIndex, endIndex; - QString sub; + TQString sub; startIndex = logs.find(KSLabel); sub = logs.mid (startIndex); @@ -428,7 +428,7 @@ void SkyObject::saveUserLog( const QString &newLog ) { } //Write new logs text - QTextStream outstream(&file); + TQTextStream outstream(&file); outstream << logs; //Set the log text in the object itself. diff --git a/kstars/kstars/skyobject.h b/kstars/kstars/skyobject.h index 214e62c4..a8376d45 100644 --- a/kstars/kstars/skyobject.h +++ b/kstars/kstars/skyobject.h @@ -18,8 +18,8 @@ #ifndef SKYOBJECT_H #define SKYOBJECT_H -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <klocale.h> @@ -52,7 +52,7 @@ public: *@param lname Long name (common name) */ SkyObject( int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), - float m=0.0, QString n="", QString n2="", QString lname="" ); + float m=0.0, TQString n="", TQString n2="", TQString lname="" ); /** *Constructor. Set SkyObject data according to arguments. Differs from *above function only in data type of RA and Dec. @@ -65,7 +65,7 @@ public: *@param lname Long name (common name) */ SkyObject( int t, double r, double d, float m=0.0, - QString n="", QString n2="", QString lname="" ); + TQString n="", TQString n2="", TQString lname="" ); /**Copy constructor. *@param o SkyObject from which to copy data @@ -86,42 +86,42 @@ public: /**@return object's primary name. */ - virtual QString name( void ) const { return hasName() ? *Name : unnamedString;} + virtual TQString name( void ) const { return hasName() ? *Name : unnamedString;} /**@return object's primary name, translated to local language. */ - QString translatedName() const { return i18n( name().utf8() );} + TQString translatedName() const { return i18n( name().utf8() );} /**Set the object's primary name. *@param name the object's primary name */ - void setName( const QString &name ); + void setName( const TQString &name ); /**@return object's secondary name */ - QString name2( void ) const { return hasName2() ? *Name2 : emptyString; } + TQString name2( void ) const { return hasName2() ? *Name2 : emptyString; } /**@return object's secondary name, translated to local language. */ - QString translatedName2() const { return i18n( name2().utf8() );} + TQString translatedName2() const { return i18n( name2().utf8() );} /**Set the object's secondary name. *@param name2 the object's secondary name. */ - void setName2( const QString &name2="" ); + void setName2( const TQString &name2="" ); /**@return object's common (long) name */ - virtual QString longname( void ) const { return hasLongName() ? *LongName : unnamedObjectString; } + virtual TQString longname( void ) const { return hasLongName() ? *LongName : unnamedObjectString; } /**@return object's common (long) name, translated to local language. */ - QString translatedLongName() const { return i18n( longname().utf8() );} + TQString translatedLongName() const { return i18n( longname().utf8() );} /**Set the object's long name. *@param longname the object's long name. */ - void setLongName( const QString &longname="" ); + void setLongName( const TQString &longname="" ); /**@return object's type identifier (int) *@see enum TYPE @@ -136,7 +136,7 @@ public: /**@return a string describing object's type. */ - QString typeName( void ) const; + TQString typeName( void ) const; /**@return object's magnitude */ @@ -161,7 +161,7 @@ public: *function gets called. By overloading the function, we don't have to check the *object type when we need the menu. */ - virtual void showPopupMenu( KSPopupMenu *pmenu, QPoint pos ) { pmenu->createEmptyMenu( this ); pmenu->popup( pos ); } + virtual void showPopupMenu( KSPopupMenu *pmenu, TQPoint pos ) { pmenu->createEmptyMenu( this ); pmenu->popup( pos ); } /**Determine the time at which the point will rise or set. Because solar system *objects move across the sky, it is necessary to iterate on the solution. @@ -174,7 +174,7 @@ public: *@param geo current geographic location *@param rst If TRUE, compute rise time. If FALSE, compute set time. */ - QTime riseSetTime( const KStarsDateTime &dt, const GeoLocation *geo, bool rst ); + TQTime riseSetTime( const KStarsDateTime &dt, const GeoLocation *geo, bool rst ); /**@return the UT time when the object will rise or set *@param dt target date/time @@ -182,7 +182,7 @@ public: *@param rst Boolean. If TRUE will compute rise time. If FALSE * will compute set time. */ - QTime riseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, bool rst); + TQTime riseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, bool rst); /**@return the LST time when the object will rise or set *@param dt target date/time @@ -206,13 +206,13 @@ public: *@param dt target date/time *@param geo pointer to the geographic location */ - QTime transitTime( const KStarsDateTime &dt, const GeoLocation *geo ); + TQTime transitTime( const KStarsDateTime &dt, const GeoLocation *geo ); /**@return the universal time that the object will transit the meridian. *@param dt target date/time *@param geo pointer to the geographic location */ - QTime transitTimeUT( const KStarsDateTime &dt, const GeoLocation *geo ); + TQTime transitTimeUT( const KStarsDateTime &dt, const GeoLocation *geo ); /**@return the altitude of the object at the moment it transits the meridian. *@param dt target date/time @@ -242,15 +242,15 @@ public: /**@short Given the Image title from a URL file, try to convert it to an image credit string. */ - QString messageFromTitle( const QString &imageTitle ); + TQString messageFromTitle( const TQString &imageTitle ); /**@short Save new user log text */ - void saveUserLog( const QString &newLog ); + void saveUserLog( const TQString &newLog ); - QStringList ImageList, ImageTitle; - QStringList InfoList, InfoTitle; - QString userLog; + TQStringList ImageList, ImageTitle; + TQStringList InfoList, InfoTitle; + TQString userLog; private: @@ -266,7 +266,7 @@ private: * will compute set time. *@return the time at which the given position will rise or set. */ - QTime auxRiseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, + TQTime auxRiseSetTimeUT( const KStarsDateTime &dt, const GeoLocation *geo, const dms *righta, const dms *decl, bool riseT); /**Compute the LST time when the object will rise or set. It is an auxiliary @@ -311,13 +311,13 @@ private: protected: - QString *Name, *Name2, *LongName; + TQString *Name, *Name2, *LongName; // store often used name strings in static variables - static QString emptyString; - static QString unnamedString; - static QString unnamedObjectString; - static QString starString; + static TQString emptyString; + static TQString unnamedString; + static TQString unnamedObjectString; + static TQString starString; }; #endif diff --git a/kstars/kstars/skyobjectname.cpp b/kstars/kstars/skyobjectname.cpp index c714488e..696803b5 100644 --- a/kstars/kstars/skyobjectname.cpp +++ b/kstars/kstars/skyobjectname.cpp @@ -18,13 +18,13 @@ #include "skyobjectname.h" #include "skyobject.h" -SkyObjectName::SkyObjectName( const QString &str, SkyObject *obj ) +SkyObjectName::SkyObjectName( const TQString &str, SkyObject *obj ) : skyobject ( obj ), Text ( str ) { } -SkyObjectNameListItem::SkyObjectNameListItem ( QListBox *parent, SkyObjectName *obj ) - : QListBoxText ( parent ), object ( obj ) +SkyObjectNameListItem::SkyObjectNameListItem ( TQListBox *parent, SkyObjectName *obj ) + : TQListBoxText ( parent ), object ( obj ) { setText( obj->text() ); } diff --git a/kstars/kstars/skyobjectname.h b/kstars/kstars/skyobjectname.h index f7eb95d6..580671c7 100644 --- a/kstars/kstars/skyobjectname.h +++ b/kstars/kstars/skyobjectname.h @@ -18,7 +18,7 @@ #ifndef SKYOBJECTNAME_H #define SKYOBJECTNAME_H -#include <qstring.h> +#include <tqstring.h> #include <klistbox.h> #include <klocale.h> @@ -37,16 +37,16 @@ class SkyObjectName { public: /**Constructor*/ - SkyObjectName (const QString &str = QString::null, SkyObject *obj = 0); + SkyObjectName (const TQString &str = TQString::null, SkyObject *obj = 0); /**Destructor (empty)*/ ~SkyObjectName() {} /**@return the name of the SkyObject*/ - QString text() { return Text; } + TQString text() { return Text; } /**@return translated version of the SkyObject's name*/ - QString translatedText() { return i18n( Text.local8Bit().data()); } + TQString translatedText() { return i18n( Text.local8Bit().data()); } /**@return pointer to the SkyObject*/ SkyObject *skyObject() { return skyobject; } @@ -62,24 +62,24 @@ class SkyObjectName { private: SkyObject *skyobject; - QString Text; + TQString Text; }; /**Class for filling list of named objects in the Find Object dialog (FindDialog). - *The class is derived from QListBoxText, and adds a SkyObjectName* member variable, + *The class is derived from TQListBoxText, and adds a SkyObjectName* member variable, *and a method to retrieve this variable (a pointer). This makes it very easy - *to add these items to the FindDialog's QListBox, and to sort and filter them. - *@short Derivative of QListBoxItem specifically for SkyObjects + *to add these items to the FindDialog's TQListBox, and to sort and filter them. + *@short Derivative of TQListBoxItem specifically for SkyObjects *@author Thomas Kabelmann *@version 0.9 */ -class SkyObjectNameListItem : public QListBoxText { +class SkyObjectNameListItem : public TQListBoxText { public: /**Constructor */ - SkyObjectNameListItem (QListBox *parent, SkyObjectName *name ); + SkyObjectNameListItem (TQListBox *parent, SkyObjectName *name ); /**Destructor (empty)*/ ~SkyObjectNameListItem() {} diff --git a/kstars/kstars/skypoint.cpp b/kstars/kstars/skypoint.cpp index 03df8926..c5ea55a8 100644 --- a/kstars/kstars/skypoint.cpp +++ b/kstars/kstars/skypoint.cpp @@ -537,7 +537,7 @@ dms SkyPoint::angularDistanceTo(SkyPoint *sp) { return angDist; } -QString SkyPoint::constellation( QPtrList<CSegment> &csegmentList, QPtrList<SkyObject> &cnameList ) const { +TQString SkyPoint::constellation( TQPtrList<CSegment> &csegmentList, TQPtrList<SkyObject> &cnameList ) const { //Identify the constellation that contains point p. //First, find all CSegments that bracket the RA of p. //Then, identify the pair of these bracketing segments which bracket p in the Dec direction. @@ -548,9 +548,9 @@ QString SkyPoint::constellation( QPtrList<CSegment> &csegmentList, QPtrList<SkyO //Corner case 2: it is possible that *both* cnames are shared between the two segments. //In this case, we have to do more work to decide which is truly correct. - QPtrList<SkyPoint> p1List, p2List; - QStringList name1List, name2List; - QString abbrev(""); + TQPtrList<SkyPoint> p1List, p2List; + TQStringList name1List, name2List; + TQString abbrev(""); double pdc = dec()->Degrees(); double pra(0.0); //defined in the loop, because we may modify it there @@ -768,7 +768,7 @@ QString SkyPoint::constellation( QPtrList<CSegment> &csegmentList, QPtrList<SkyO //Finally, match the abbreviated name to the full constellation name, and return that name for ( SkyObject *o = cnameList.first(); o; o = cnameList.next() ) { if ( abbrev.lower() == o->name2().lower() ) { - QString r = i18n( "Constellation name (optional)", o->name().local8Bit().data() ); + TQString r = i18n( "Constellation name (optional)", o->name().local8Bit().data() ); r = r.left(1) + r.mid(1).lower(); //lowercase letters (except first letter) int i = r.find(" "); i++; diff --git a/kstars/kstars/skypoint.h b/kstars/kstars/skypoint.h index ee3cf09c..11ad9b26 100644 --- a/kstars/kstars/skypoint.h +++ b/kstars/kstars/skypoint.h @@ -20,8 +20,8 @@ #ifndef SKYPOINT_H #define SKYPOINT_H -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include "dms.h" @@ -478,7 +478,7 @@ public: //// 6. Constellation Identification //// ===================================== - QString constellation( QPtrList<CSegment> &seglist, QPtrList<SkyObject> &cnames ) const; + TQString constellation( TQPtrList<CSegment> &seglist, TQPtrList<SkyObject> &cnames ) const; protected: diff --git a/kstars/kstars/stardatasink.cpp b/kstars/kstars/stardatasink.cpp index 45b3d983..e77b3820 100644 --- a/kstars/kstars/stardatasink.cpp +++ b/kstars/kstars/stardatasink.cpp @@ -20,7 +20,7 @@ #include "dms.h" #include "kstarsdata.h" -StarDataSink::StarDataSink(KStarsData *parent, const char *name) : QObject(parent, name) { +StarDataSink::StarDataSink(KStarsData *parent, const char *name) : TQObject(parent, name) { ksData = parent; receivedBlocks = 0; nameListCount = ksData->ObjNames.count(); @@ -45,8 +45,8 @@ void StarDataSink::eof() { void StarDataSink::receive( const uchar *data, int entries ) { receivedBlocks++; - // Pointer was send as const uchar* so it must be converted explicitly to QString* - QString *line = (QString *) data; + // Pointer was send as const uchar* so it must be converted explicitly to TQString* + TQString *line = (TQString *) data; int counter = -1; while (++counter < entries) { // run counter from 0 to entries -1 ksData->processStar(line, true); diff --git a/kstars/kstars/stardatasink.h b/kstars/kstars/stardatasink.h index 0cb97749..81b55d5e 100644 --- a/kstars/kstars/stardatasink.h +++ b/kstars/kstars/stardatasink.h @@ -26,14 +26,14 @@ *@version 1.0 */ -#include <qobject.h> -#include <qasyncio.h> +#include <tqobject.h> +#include <tqasyncio.h> -#include <qglobal.h> +#include <tqglobal.h> class KStarsData; -class StarDataSink : public QObject, public QDataSink { +class StarDataSink : public TQObject, public TQDataSink { /** *class needs signals */ diff --git a/kstars/kstars/starobject.cpp b/kstars/kstars/starobject.cpp index 3120b88a..8e46b0db 100644 --- a/kstars/kstars/starobject.cpp +++ b/kstars/kstars/starobject.cpp @@ -19,8 +19,8 @@ #include "kspopupmenu.h" #include "ksnumbers.h" -#include <qpainter.h> -#include <qstring.h> +#include <tqpainter.h> +#include <tqstring.h> #include <kdebug.h> StarObject::StarObject( StarObject &o ) @@ -36,12 +36,12 @@ StarObject::StarObject( StarObject &o ) Variability = o.isVariable(); } -StarObject::StarObject( dms r, dms d, float m, QString n, QString n2, QString sptype, +StarObject::StarObject( dms r, dms d, float m, TQString n, TQString n2, TQString sptype, double pmra, double pmdec, double par, bool mult, bool var ) : SkyObject (SkyObject::STAR, r, d, m, n, n2, ""), SpType(sptype), PM_RA(pmra), PM_Dec(pmdec), Parallax(par), Multiplicity(mult), Variability(var) // SONAME deprecated //, soName( 0 ) { - QString lname; + TQString lname; if ( hasName() ) { lname = n; if ( hasName2() ) lname += " (" + gname() + ")"; @@ -56,12 +56,12 @@ StarObject::StarObject( dms r, dms d, float m, QString n, QString n2, QString sp setLongName(lname); } -StarObject::StarObject( double r, double d, float m, QString n, QString n2, QString sptype, +StarObject::StarObject( double r, double d, float m, TQString n, TQString n2, TQString sptype, double pmra, double pmdec, double par, bool mult, bool var ) : SkyObject (SkyObject::STAR, r, d, m, n, n2, ""), SpType(sptype), PM_RA(pmra), PM_Dec(pmdec), Parallax(par), Multiplicity(mult), Variability(var) // SONAME deprecated //, soName( 0 ) { - QString lname; + TQString lname; if ( hasName() ) { lname = n; if ( hasName2() )lname += n + " (" + gname() + ")"; @@ -82,45 +82,45 @@ void StarObject::updateCoords( KSNumbers *num, bool , const dms*, const dms* ) { setDec( dec()->Degrees() + pmDec()*num->julianMillenia()/3600. ); } -QString StarObject::sptype( void ) const { +TQString StarObject::sptype( void ) const { return SpType; } -QString StarObject::gname( bool useGreekChars ) const { +TQString StarObject::gname( bool useGreekChars ) const { return greekLetter( useGreekChars ) + " " + constell(); } -QString StarObject::greekLetter( bool gchar ) const { - QString code = name2().left(3); - QString letter = code; //in case genitive name is *not* a Greek letter +TQString StarObject::greekLetter( bool gchar ) const { + TQString code = name2().left(3); + TQString letter = code; //in case genitive name is *not* a Greek letter int alpha = 0x03B1; - if ( code == "alp" ) gchar ? letter = QString( QChar(alpha + 0) ) : letter = i18n("alpha"); - if ( code == "bet" ) gchar ? letter = QString( QChar(alpha + 1) ) : letter = i18n("beta"); - if ( code == "gam" ) gchar ? letter = QString( QChar(alpha + 2) ) : letter = i18n("gamma"); - if ( code == "del" ) gchar ? letter = QString( QChar(alpha + 3) ) : letter = i18n("delta"); - if ( code == "eps" ) gchar ? letter = QString( QChar(alpha + 4) ) : letter = i18n("epsilon"); - if ( code == "zet" ) gchar ? letter = QString( QChar(alpha + 5) ) : letter = i18n("zeta"); - if ( code == "eta" ) gchar ? letter = QString( QChar(alpha + 6) ) : letter = i18n("eta"); - if ( code == "the" ) gchar ? letter = QString( QChar(alpha + 7) ) : letter = i18n("theta"); - if ( code == "iot" ) gchar ? letter = QString( QChar(alpha + 8) ) : letter = i18n("iota"); - if ( code == "kap" ) gchar ? letter = QString( QChar(alpha + 9) ) : letter = i18n("kappa"); - if ( code == "lam" ) gchar ? letter = QString( QChar(alpha +10) ) : letter = i18n("lambda"); - if ( code == "mu " ) gchar ? letter = QString( QChar(alpha +11) ) : letter = i18n("mu"); - if ( code == "nu " ) gchar ? letter = QString( QChar(alpha +12) ) : letter = i18n("nu"); - if ( code == "xi " ) gchar ? letter = QString( QChar(alpha +13) ) : letter = i18n("xi"); - if ( code == "omi" ) gchar ? letter = QString( QChar(alpha +14) ) : letter = i18n("omicron"); - if ( code == "pi " ) gchar ? letter = QString( QChar(alpha +15) ) : letter = i18n("pi"); - if ( code == "rho" ) gchar ? letter = QString( QChar(alpha +16) ) : letter = i18n("rho"); + if ( code == "alp" ) gchar ? letter = TQString( TQChar(alpha + 0) ) : letter = i18n("alpha"); + if ( code == "bet" ) gchar ? letter = TQString( TQChar(alpha + 1) ) : letter = i18n("beta"); + if ( code == "gam" ) gchar ? letter = TQString( TQChar(alpha + 2) ) : letter = i18n("gamma"); + if ( code == "del" ) gchar ? letter = TQString( TQChar(alpha + 3) ) : letter = i18n("delta"); + if ( code == "eps" ) gchar ? letter = TQString( TQChar(alpha + 4) ) : letter = i18n("epsilon"); + if ( code == "zet" ) gchar ? letter = TQString( TQChar(alpha + 5) ) : letter = i18n("zeta"); + if ( code == "eta" ) gchar ? letter = TQString( TQChar(alpha + 6) ) : letter = i18n("eta"); + if ( code == "the" ) gchar ? letter = TQString( TQChar(alpha + 7) ) : letter = i18n("theta"); + if ( code == "iot" ) gchar ? letter = TQString( TQChar(alpha + 8) ) : letter = i18n("iota"); + if ( code == "kap" ) gchar ? letter = TQString( TQChar(alpha + 9) ) : letter = i18n("kappa"); + if ( code == "lam" ) gchar ? letter = TQString( TQChar(alpha +10) ) : letter = i18n("lambda"); + if ( code == "mu " ) gchar ? letter = TQString( TQChar(alpha +11) ) : letter = i18n("mu"); + if ( code == "nu " ) gchar ? letter = TQString( TQChar(alpha +12) ) : letter = i18n("nu"); + if ( code == "xi " ) gchar ? letter = TQString( TQChar(alpha +13) ) : letter = i18n("xi"); + if ( code == "omi" ) gchar ? letter = TQString( TQChar(alpha +14) ) : letter = i18n("omicron"); + if ( code == "pi " ) gchar ? letter = TQString( TQChar(alpha +15) ) : letter = i18n("pi"); + if ( code == "rho" ) gchar ? letter = TQString( TQChar(alpha +16) ) : letter = i18n("rho"); //there are two unicode symbols for sigma; //skip the first one, the second is more widely used - if ( code == "sig" ) gchar ? letter = QString( QChar(alpha +18) ) : letter = i18n("sigma"); - if ( code == "tau" ) gchar ? letter = QString( QChar(alpha +19) ) : letter = i18n("tau"); - if ( code == "ups" ) gchar ? letter = QString( QChar(alpha +20) ) : letter = i18n("upsilon"); - if ( code == "phi" ) gchar ? letter = QString( QChar(alpha +21) ) : letter = i18n("phi"); - if ( code == "chi" ) gchar ? letter = QString( QChar(alpha +22) ) : letter = i18n("chi"); - if ( code == "psi" ) gchar ? letter = QString( QChar(alpha +23) ) : letter = i18n("psi"); - if ( code == "ome" ) gchar ? letter = QString( QChar(alpha +24) ) : letter = i18n("omega"); + if ( code == "sig" ) gchar ? letter = TQString( TQChar(alpha +18) ) : letter = i18n("sigma"); + if ( code == "tau" ) gchar ? letter = TQString( TQChar(alpha +19) ) : letter = i18n("tau"); + if ( code == "ups" ) gchar ? letter = TQString( TQChar(alpha +20) ) : letter = i18n("upsilon"); + if ( code == "phi" ) gchar ? letter = TQString( TQChar(alpha +21) ) : letter = i18n("phi"); + if ( code == "chi" ) gchar ? letter = TQString( TQChar(alpha +22) ) : letter = i18n("chi"); + if ( code == "psi" ) gchar ? letter = TQString( TQChar(alpha +23) ) : letter = i18n("psi"); + if ( code == "ome" ) gchar ? letter = TQString( TQChar(alpha +24) ) : letter = i18n("omega"); if ( name2().length() && name2().mid(3,1) != " " ) letter += "[" + name2().mid(3,1) + "]"; @@ -128,101 +128,101 @@ QString StarObject::greekLetter( bool gchar ) const { return letter; } -QString StarObject::constell( void ) const { - QString code = name2().mid(4,3); - if ( code == "And" ) return QString("Andromedae"); - if ( code == "Ant" ) return QString("Antliae"); - if ( code == "Aps" ) return QString("Apodis"); - if ( code == "Aqr" ) return QString("Aquarii"); - if ( code == "Aql" ) return QString("Aquilae"); - if ( code == "Ara" ) return QString("Arae"); - if ( code == "Ari" ) return QString("Arietis"); - if ( code == "Aur" ) return QString("Aurigae"); - if ( code == "Boo" ) return QString("Bootis"); - if ( code == "Cae" ) return QString("Caeli"); - if ( code == "Cam" ) return QString("Camelopardalis"); - if ( code == "Cnc" ) return QString("Cancri"); - if ( code == "CVn" ) return QString("Canum Venaticorum"); - if ( code == "CMa" ) return QString("Canis Majoris"); - if ( code == "CMi" ) return QString("Canis Minoris"); - if ( code == "Cap" ) return QString("Capricorni"); - if ( code == "Car" ) return QString("Carinae"); - if ( code == "Cas" ) return QString("Cassiopeiae"); - if ( code == "Cen" ) return QString("Centauri"); - if ( code == "Cep" ) return QString("Cephei"); - if ( code == "Cet" ) return QString("Ceti"); - if ( code == "Cha" ) return QString("Chamaeleontis"); - if ( code == "Cir" ) return QString("Circini"); - if ( code == "Col" ) return QString("Columbae"); - if ( code == "Com" ) return QString("Comae Berenices"); - if ( code == "CrA" ) return QString("Coronae Austrinae"); - if ( code == "CrB" ) return QString("Coronae Borealis"); - if ( code == "Crv" ) return QString("Corvi"); - if ( code == "Crt" ) return QString("Crateris"); - if ( code == "Cru" ) return QString("Crucis"); - if ( code == "Cyg" ) return QString("Cygni"); - if ( code == "Del" ) return QString("Delphini"); - if ( code == "Dor" ) return QString("Doradus"); - if ( code == "Dra" ) return QString("Draconis"); - if ( code == "Equ" ) return QString("Equulei"); - if ( code == "Eri" ) return QString("Eridani"); - if ( code == "For" ) return QString("Fornacis"); - if ( code == "Gem" ) return QString("Geminorum"); - if ( code == "Gru" ) return QString("Gruis"); - if ( code == "Her" ) return QString("Herculis"); - if ( code == "Hor" ) return QString("Horologii"); - if ( code == "Hya" ) return QString("Hydrae"); - if ( code == "Hyi" ) return QString("Hydri"); - if ( code == "Ind" ) return QString("Indi"); - if ( code == "Lac" ) return QString("Lacertae"); - if ( code == "Leo" ) return QString("Leonis"); - if ( code == "LMi" ) return QString("Leonis Minoris"); - if ( code == "Lep" ) return QString("Leporis"); - if ( code == "Lib" ) return QString("Librae"); - if ( code == "Lup" ) return QString("Lupi"); - if ( code == "Lyn" ) return QString("Lyncis"); - if ( code == "Lyr" ) return QString("Lyrae"); - if ( code == "Men" ) return QString("Mensae"); - if ( code == "Mic" ) return QString("Microscopii"); - if ( code == "Mon" ) return QString("Monocerotis"); - if ( code == "Mus" ) return QString("Muscae"); - if ( code == "Nor" ) return QString("Normae"); - if ( code == "Oct" ) return QString("Octantis"); - if ( code == "Oph" ) return QString("Ophiuchi"); - if ( code == "Ori" ) return QString("Orionis"); - if ( code == "Pav" ) return QString("Pavonis"); - if ( code == "Peg" ) return QString("Pegasi"); - if ( code == "Per" ) return QString("Persei"); - if ( code == "Phe" ) return QString("Phoenicis"); - if ( code == "Pic" ) return QString("Pictoris"); - if ( code == "Psc" ) return QString("Piscium"); - if ( code == "PsA" ) return QString("Piscis Austrini"); - if ( code == "Pup" ) return QString("Puppis"); - if ( code == "Pyx" ) return QString("Pyxidis"); - if ( code == "Ret" ) return QString("Reticuli"); - if ( code == "Sge" ) return QString("Sagittae"); - if ( code == "Sgr" ) return QString("Sagittarii"); - if ( code == "Sco" ) return QString("Scorpii"); - if ( code == "Scl" ) return QString("Sculptoris"); - if ( code == "Sct" ) return QString("Scuti"); - if ( code == "Ser" ) return QString("Serpentis"); - if ( code == "Sex" ) return QString("Sextantis"); - if ( code == "Tau" ) return QString("Tauri"); - if ( code == "Tel" ) return QString("Telescopii"); - if ( code == "Tri" ) return QString("Trianguli"); - if ( code == "TrA" ) return QString("Trianguli Australis"); - if ( code == "Tuc" ) return QString("Tucanae"); - if ( code == "UMa" ) return QString("Ursae Majoris"); - if ( code == "UMi" ) return QString("Ursae Minoris"); - if ( code == "Vel" ) return QString("Velorum"); - if ( code == "Vir" ) return QString("Virginis"); - if ( code == "Vol" ) return QString("Volantis"); - if ( code == "Vul" ) return QString("Vulpeculae"); +TQString StarObject::constell( void ) const { + TQString code = name2().mid(4,3); + if ( code == "And" ) return TQString("Andromedae"); + if ( code == "Ant" ) return TQString("Antliae"); + if ( code == "Aps" ) return TQString("Apodis"); + if ( code == "Aqr" ) return TQString("Aquarii"); + if ( code == "Aql" ) return TQString("Aquilae"); + if ( code == "Ara" ) return TQString("Arae"); + if ( code == "Ari" ) return TQString("Arietis"); + if ( code == "Aur" ) return TQString("Aurigae"); + if ( code == "Boo" ) return TQString("Bootis"); + if ( code == "Cae" ) return TQString("Caeli"); + if ( code == "Cam" ) return TQString("Camelopardalis"); + if ( code == "Cnc" ) return TQString("Cancri"); + if ( code == "CVn" ) return TQString("Canum Venaticorum"); + if ( code == "CMa" ) return TQString("Canis Majoris"); + if ( code == "CMi" ) return TQString("Canis Minoris"); + if ( code == "Cap" ) return TQString("Capricorni"); + if ( code == "Car" ) return TQString("Carinae"); + if ( code == "Cas" ) return TQString("Cassiopeiae"); + if ( code == "Cen" ) return TQString("Centauri"); + if ( code == "Cep" ) return TQString("Cephei"); + if ( code == "Cet" ) return TQString("Ceti"); + if ( code == "Cha" ) return TQString("Chamaeleontis"); + if ( code == "Cir" ) return TQString("Circini"); + if ( code == "Col" ) return TQString("Columbae"); + if ( code == "Com" ) return TQString("Comae Berenices"); + if ( code == "CrA" ) return TQString("Coronae Austrinae"); + if ( code == "CrB" ) return TQString("Coronae Borealis"); + if ( code == "Crv" ) return TQString("Corvi"); + if ( code == "Crt" ) return TQString("Crateris"); + if ( code == "Cru" ) return TQString("Crucis"); + if ( code == "Cyg" ) return TQString("Cygni"); + if ( code == "Del" ) return TQString("Delphini"); + if ( code == "Dor" ) return TQString("Doradus"); + if ( code == "Dra" ) return TQString("Draconis"); + if ( code == "Equ" ) return TQString("Equulei"); + if ( code == "Eri" ) return TQString("Eridani"); + if ( code == "For" ) return TQString("Fornacis"); + if ( code == "Gem" ) return TQString("Geminorum"); + if ( code == "Gru" ) return TQString("Gruis"); + if ( code == "Her" ) return TQString("Herculis"); + if ( code == "Hor" ) return TQString("Horologii"); + if ( code == "Hya" ) return TQString("Hydrae"); + if ( code == "Hyi" ) return TQString("Hydri"); + if ( code == "Ind" ) return TQString("Indi"); + if ( code == "Lac" ) return TQString("Lacertae"); + if ( code == "Leo" ) return TQString("Leonis"); + if ( code == "LMi" ) return TQString("Leonis Minoris"); + if ( code == "Lep" ) return TQString("Leporis"); + if ( code == "Lib" ) return TQString("Librae"); + if ( code == "Lup" ) return TQString("Lupi"); + if ( code == "Lyn" ) return TQString("Lyncis"); + if ( code == "Lyr" ) return TQString("Lyrae"); + if ( code == "Men" ) return TQString("Mensae"); + if ( code == "Mic" ) return TQString("Microscopii"); + if ( code == "Mon" ) return TQString("Monocerotis"); + if ( code == "Mus" ) return TQString("Muscae"); + if ( code == "Nor" ) return TQString("Normae"); + if ( code == "Oct" ) return TQString("Octantis"); + if ( code == "Oph" ) return TQString("Ophiuchi"); + if ( code == "Ori" ) return TQString("Orionis"); + if ( code == "Pav" ) return TQString("Pavonis"); + if ( code == "Peg" ) return TQString("Pegasi"); + if ( code == "Per" ) return TQString("Persei"); + if ( code == "Phe" ) return TQString("Phoenicis"); + if ( code == "Pic" ) return TQString("Pictoris"); + if ( code == "Psc" ) return TQString("Piscium"); + if ( code == "PsA" ) return TQString("Piscis Austrini"); + if ( code == "Pup" ) return TQString("Puppis"); + if ( code == "Pyx" ) return TQString("Pyxidis"); + if ( code == "Ret" ) return TQString("Reticuli"); + if ( code == "Sge" ) return TQString("Sagittae"); + if ( code == "Sgr" ) return TQString("Sagittarii"); + if ( code == "Sco" ) return TQString("Scorpii"); + if ( code == "Scl" ) return TQString("Sculptoris"); + if ( code == "Sct" ) return TQString("Scuti"); + if ( code == "Ser" ) return TQString("Serpentis"); + if ( code == "Sex" ) return TQString("Sextantis"); + if ( code == "Tau" ) return TQString("Tauri"); + if ( code == "Tel" ) return TQString("Telescopii"); + if ( code == "Tri" ) return TQString("Trianguli"); + if ( code == "TrA" ) return TQString("Trianguli Australis"); + if ( code == "Tuc" ) return TQString("Tucanae"); + if ( code == "UMa" ) return TQString("Ursae Majoris"); + if ( code == "UMi" ) return TQString("Ursae Minoris"); + if ( code == "Vel" ) return TQString("Velorum"); + if ( code == "Vir" ) return TQString("Virginis"); + if ( code == "Vol" ) return TQString("Volantis"); + if ( code == "Vul" ) return TQString("Vulpeculae"); - return QString(""); + return TQString(""); } -void StarObject::draw( QPainter &psky, QPixmap *sky, QPixmap *starpix, int x, int y, bool /*showMultiple*/, double /*scale*/ ) { +void StarObject::draw( TQPainter &psky, TQPixmap *sky, TQPixmap *starpix, int x, int y, bool /*showMultiple*/, double /*scale*/ ) { //Indicate multiple stars with a short horizontal line //(only draw this for stars larger than 3 pixels) //Commenting out for now... @@ -233,23 +233,23 @@ void StarObject::draw( QPainter &psky, QPixmap *sky, QPixmap *starpix, int x, in //Only bitBlt() if we are drawing to the sky pixmap if ( psky.device() == sky ) - bitBlt ((QPaintDevice *) sky, x - starpix->width()/2, y - starpix->height()/2, starpix ); + bitBlt ((TQPaintDevice *) sky, x - starpix->width()/2, y - starpix->height()/2, starpix ); else psky.drawPixmap( x - starpix->width()/2, y - starpix->height()/2, *starpix ); } -void StarObject::drawLabel( QPainter &psky, int x, int y, double zoom, bool drawName, bool drawMag, double scale ) { - QString sName( i18n("star") + " " ); +void StarObject::drawLabel( TQPainter &psky, int x, int y, double zoom, bool drawName, bool drawMag, double scale ) { + TQString sName( i18n("star") + " " ); if ( drawName ) { if ( name() != "star" ) sName = translatedName() + " "; else if ( longname() != "star" ) sName = translatedLongName() + " "; } if ( drawMag ) { if ( drawName ) - sName += QString().sprintf("%.1f", mag() ); + sName += TQString().sprintf("%.1f", mag() ); else - sName = QString().sprintf("%.1f", mag() ); + sName = TQString().sprintf("%.1f", mag() ); } int offset = int( scale * (6 + int(0.5*(5.0-mag())) + int(0.01*( zoom/500. )) )); diff --git a/kstars/kstars/starobject.h b/kstars/kstars/starobject.h index 7143ee03..f4ca1bd9 100644 --- a/kstars/kstars/starobject.h +++ b/kstars/kstars/starobject.h @@ -18,7 +18,7 @@ #ifndef STAROBJECT_H #define STAROBJECT_H -#include <qpoint.h> +#include <tqpoint.h> #include "skyobject.h" @@ -59,8 +59,8 @@ class StarObject : public SkyObject { *@param mult Multiplicity flag (false=dingle star; true=multiple star) *@param var Variability flag (true if star is a known periodic variable) */ - StarObject( dms r=dms(0.0), dms d=dms(0.0), float m=0.0, QString n="", - QString n2="", QString sptype="--", double pmra=0.0, double pmdec=0.0, + StarObject( dms r=dms(0.0), dms d=dms(0.0), float m=0.0, TQString n="", + TQString n2="", TQString sptype="--", double pmra=0.0, double pmdec=0.0, double par=0.0, bool mult=false, bool var=false ); /** *Constructor. Sets sky coordinates, magnitude, latin name, genetive name, and @@ -77,8 +77,8 @@ class StarObject : public SkyObject { *@param mult Multiplicity flag (false=dingle star; true=multiple star) *@param var Variability flag (true if star is a known periodic variable) */ - StarObject( double r, double d, float m=0.0, QString n="", - QString n2="", QString sptype="--", double pmra=0.0, double pmdec=0.0, + StarObject( double r, double d, float m=0.0, TQString n="", + TQString n2="", TQString sptype="--", double pmra=0.0, double pmdec=0.0, double par=0.0, bool mult=false, bool var=false ); /** @@ -89,41 +89,41 @@ class StarObject : public SkyObject { /** *If star is unnamed return "star" otherwise return the name */ - virtual QString name( void ) const { return hasName() ? *Name : starString;} + virtual TQString name( void ) const { return hasName() ? *Name : starString;} /** *If star is unnamed return "star" otherwise return the longname */ - virtual QString longname( void ) const { return hasLongName() ? *LongName : starString; } + virtual TQString longname( void ) const { return hasLongName() ? *LongName : starString; } /** *Returns first character of Spectral Type string, which is used to *select the temperature-color of the star. *@return first character of Spectral Type string */ - QChar color( void ) const { return SpType.at(0); } + TQChar color( void ) const { return SpType.at(0); } /** *Returns entire spectral type string *@return Spectral Type string */ - QString sptype( void ) const; + TQString sptype( void ) const; /** *Returns the genetive name of the star. *@return genetive name of the star */ - QString gname( bool useGreekChars=true ) const; + TQString gname( bool useGreekChars=true ) const; /** *Returns the greek letter portion of the star's genetive name. *Returns empty string if star has no genetive name defined. *@return greek letter portion of genetive name */ - QString greekLetter( bool useGreekChars=true ) const; + TQString greekLetter( bool useGreekChars=true ) const; /**@return the genitive form of the star's constellation. */ - QString constell( void ) const; + TQString constell( void ) const; /**Determine the current coordinates (RA, Dec) from the catalog *coordinates (RA0, Dec0), accounting for both precession and nutation. @@ -198,20 +198,20 @@ class StarObject : public SkyObject { // */ // double vperiod() const { return VPeriod; } - void draw( QPainter &psky, QPixmap *sky, QPixmap *starpix, int x, int y, bool drawMultiple=true, double scale=1.0 ); + void draw( TQPainter &psky, TQPixmap *sky, TQPixmap *starpix, int x, int y, bool drawMultiple=true, double scale=1.0 ); //overloaded from SkyObject - void drawLabel( QPainter &psky, int x, int y, double zoom, bool drawName, bool drawMag, double scale ); + void drawLabel( TQPainter &psky, int x, int y, double zoom, bool drawName, bool drawMag, double scale ); /**Show star object popup menu. Overloaded from virtual *SkyObject::showPopupMenu() *@param pmenu pointer to the KSPopupMenu object *@param pos QPojnt holding the x,y coordinates for the menu */ - virtual void showPopupMenu( KSPopupMenu *pmenu, QPoint pos ) { pmenu->createStarMenu( this ); pmenu->popup( pos ); } + virtual void showPopupMenu( KSPopupMenu *pmenu, TQPoint pos ) { pmenu->createStarMenu( this ); pmenu->popup( pos ); } private: - QString SpType; + TQString SpType; double PM_RA, PM_Dec, Parallax; //, VRange, VPeriod; bool Multiplicity, Variability; diff --git a/kstars/kstars/starpixmap.cpp b/kstars/kstars/starpixmap.cpp index 1c1e9269..59e21fe5 100644 --- a/kstars/kstars/starpixmap.cpp +++ b/kstars/kstars/starpixmap.cpp @@ -19,9 +19,9 @@ #include "starpixmap.h" #include <kimageeffect.h> -#include <qbitmap.h> -#include <qimage.h> -#include <qpainter.h> +#include <tqbitmap.h> +#include <tqimage.h> +#include <tqpainter.h> #define STARSIZE 24 @@ -31,7 +31,7 @@ StarPixmap::StarPixmap (int starColorMode, int starColorIntensity) loadPixmaps (starColorMode, starColorIntensity); } -QPixmap* StarPixmap::getPixmap (QChar *color, int size) { +TQPixmap* StarPixmap::getPixmap (TQChar *color, int size) { int c; // the colors from blue to red +, O, B, A, F, G, K, M, N, P // if *color is '+' use white star @@ -68,22 +68,22 @@ void StarPixmap::loadPixmaps (int newColorMode, int newColorIntensity) { if (colorIntensity < 0) colorIntensity = 0; // min - QPixmap pix (STARSIZE, STARSIZE); - QBitmap mask (STARSIZE, STARSIZE); - QImage image; - QPainter p; - QMemArray<QColor> starColor; + TQPixmap pix (STARSIZE, STARSIZE); + TQBitmap mask (STARSIZE, STARSIZE); + TQImage image; + TQPainter p; + TQMemArray<TQColor> starColor; starColor.resize( 8 ); image.setAlphaBuffer(true); - starColor[0] = QColor( 255, 255, 255 ); //default to white - starColor[1] = QColor( 0, 0, 255 ); //type O - starColor[2] = QColor( 0, 200, 255 ); //type B - starColor[3] = QColor( 0, 255, 255 ); //type A - starColor[4] = QColor( 200, 255, 100 ); //type F - starColor[5] = QColor( 255, 255, 0 ); //type G - starColor[6] = QColor( 255, 100, 0 ); //type K - starColor[7] = QColor( 255, 0, 0 ); //type M + starColor[0] = TQColor( 255, 255, 255 ); //default to white + starColor[1] = TQColor( 0, 0, 255 ); //type O + starColor[2] = TQColor( 0, 200, 255 ); //type B + starColor[3] = TQColor( 0, 255, 255 ); //type A + starColor[4] = TQColor( 200, 255, 100 ); //type F + starColor[5] = TQColor( 255, 255, 0 ); //type G + starColor[6] = TQColor( 255, 100, 0 ); //type K + starColor[7] = TQColor( 255, 0, 0 ); //type M // background of the star if ( colorMode==1 ) // night colors (fill red, no temperature colors) @@ -99,7 +99,7 @@ void StarPixmap::loadPixmaps (int newColorMode, int newColorIntensity) { if (colorMode==0) { p.begin (&pix); - p.setPen (QPen (starColor[ic], colorIntensity)); // the intensity of color determines the width of the pen + p.setPen (TQPen (starColor[ic], colorIntensity)); // the intensity of color determines the width of the pen p.drawEllipse (0, 0, STARSIZE, STARSIZE); p.end(); } @@ -107,14 +107,14 @@ void StarPixmap::loadPixmaps (int newColorMode, int newColorIntensity) { mask.fill (Qt::color0); p.begin (&mask); - p.setPen (QPen ( Qt::color1, 1)); - p.setBrush( QBrush( Qt::color1 ) ); + p.setPen (TQPen ( Qt::color1, 1)); + p.setBrush( TQBrush( Qt::color1 ) ); p.drawEllipse(0, 0, STARSIZE, STARSIZE); p.end(); //BLUR!! ugliness-- requires temporary conversion to pixmap, then back again. // if we defer the blur until the end, we lose the transparency. Bleh. - QImage tmp = pix.convertToImage(); + TQImage tmp = pix.convertToImage(); pix.convertFromImage( KImageEffect::blur( tmp, 100.0 ) ); pix.setMask (mask); // set the mask diff --git a/kstars/kstars/starpixmap.h b/kstars/kstars/starpixmap.h index e37bb18e..70b64679 100644 --- a/kstars/kstars/starpixmap.h +++ b/kstars/kstars/starpixmap.h @@ -18,13 +18,13 @@ #ifndef STARPIXMAP_H #define STARPIXMAP_H -#include <qpixmap.h> +#include <tqpixmap.h> /**@class StarPixmap *Stores a two-dimensional array of star images, indexed by both size and color. *Based on a star's spectral type, brightness, and the current zoom level, the appropriate *image is selected from the array in the SkyMap::drawSymbol() function. - *A two-dimensional array of QPixmap star images + *A two-dimensional array of TQPixmap star images *@author Thomas Kabelmann *@version 1.0 */ @@ -45,7 +45,7 @@ class StarPixmap { *@param color the spectral type (one of O,B,A,F,G,K,M,N,P) *@param s the size index */ - QPixmap* getPixmap (QChar *color, int s); + TQPixmap* getPixmap (TQChar *color, int s); /**Change the Color mode. Regenerate the star image array. *@param newMode the new Color Mode to use. @@ -65,7 +65,7 @@ class StarPixmap { private: - QPixmap starPixmaps[10][26]; // the preloaded starpixmaps 10 colors/ 24 sizes + TQPixmap starPixmaps[10][26]; // the preloaded starpixmaps 10 colors/ 24 sizes int size, colorMode, colorIntensity; /**Construct the array of star images*/ diff --git a/kstars/kstars/streamwg.cpp b/kstars/kstars/streamwg.cpp index a78013f2..80998c07 100644 --- a/kstars/kstars/streamwg.cpp +++ b/kstars/kstars/streamwg.cpp @@ -24,12 +24,12 @@ #include <kcombobox.h> #include <kurl.h> -#include <qsocketnotifier.h> -#include <qimage.h> -#include <qpainter.h> -#include <qstringlist.h> -#include <qdir.h> -#include <qlayout.h> +#include <tqsocketnotifier.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqstringlist.h> +#include <tqdir.h> +#include <tqlayout.h> #include <stdlib.h> @@ -40,7 +40,7 @@ FILE *wfp; - StreamWG::StreamWG(INDIStdDevice *inStdDev, QWidget * parent, const char * name) : streamForm(parent, name) + StreamWG::StreamWG(INDIStdDevice *inStdDev, TQWidget * parent, const char * name) : streamForm(parent, name) { stdDev = inStdDev; @@ -49,7 +49,7 @@ FILE *wfp; // streamFD = -1; processStream = colorFrame = false; - //videoFrameLayout = new QVBoxLayout(videoFrame, 0, 0); + //videoFrameLayout = new TQVBoxLayout(videoFrame, 0, 0); streamFrame = new VideoWG(videoFrame); KIconLoader *icons = KGlobal::iconLoader(); @@ -61,10 +61,10 @@ FILE *wfp; playB->setPixmap(pausePix); captureB->setPixmap(capturePix); - imgFormatCombo->insertStrList(QImage::outputFormats()); + imgFormatCombo->insertStrList(TQImage::outputFormats()); - connect(playB, SIGNAL(clicked()), this, SLOT(playPressed())); - connect(captureB, SIGNAL(clicked()), this, SLOT(captureImage())); + connect(playB, TQT_SIGNAL(clicked()), this, TQT_SLOT(playPressed())); + connect(captureB, TQT_SIGNAL(clicked()), this, TQT_SLOT(captureImage())); } @@ -73,7 +73,7 @@ StreamWG::~StreamWG() // delete streamBuffer; } -void StreamWG::closeEvent ( QCloseEvent * e ) +void StreamWG::closeEvent ( TQCloseEvent * e ) { stdDev->streamDisabled(); processStream = false; @@ -85,12 +85,12 @@ void StreamWG::setColorFrame(bool color) colorFrame = color; } -/*void StreamWG::establishDataChannel(QString host, int port) +/*void StreamWG::establishDataChannel(TQString host, int port) { - QString errMsg; + TQString errMsg; struct sockaddr_in pin; struct hostent *serverHostName = gethostbyname(host.ascii()); - errMsg = QString("Connection to INDI host at %1 on port %2 failed.").arg(host).arg(port); + errMsg = TQString("Connection to INDI host at %1 on port %2 failed.").arg(host).arg(port); memset(&pin, 0, sizeof(pin)); pin.sin_family = AF_INET; @@ -111,8 +111,8 @@ void StreamWG::setColorFrame(bool color) } // callback notified - sNotifier = new QSocketNotifier( streamFD, QSocketNotifier::Read, this); - QObject::connect( sNotifier, SIGNAL(activated(int)), this, SLOT(streamReceived())); + sNotifier = new TQSocketNotifier( streamFD, TQSocketNotifier::Read, this); + TQObject::connect( sNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(streamReceived())); }*/ void StreamWG::enableStream(bool enable) @@ -142,7 +142,7 @@ void StreamWG::setSize(int wd, int ht) streamFrame->resize(wd, ht); } -void StreamWG::resizeEvent(QResizeEvent *ev) +void StreamWG::resizeEvent(TQResizeEvent *ev) { streamFrame->resize(ev->size().width() - layout()->margin() * 2, ev->size().height() - playB->height() - layout()->margin() * 2 - layout()->spacing()); @@ -186,7 +186,7 @@ void StreamWG::streamReceived() stdDev->sNotifier->disconnect(); close(stdDev->streamFD); - KMessageBox::error(0, QString(msg)); + KMessageBox::error(0, TQString(msg)); return; } } @@ -216,10 +216,10 @@ void StreamWG::playPressed() void StreamWG::captureImage() { - QString fname; - QString fmt; + TQString fname; + TQString fmt; KURL currentFileURL; - QString currentDir = Options::fitsSaveDirectory(); + TQString currentDir = Options::fitsSaveDirectory(); KTempFile tmpfile; tmpfile.setAutoDelete(true); @@ -252,23 +252,23 @@ void StreamWG::captureImage() if ( tmpfile.name() == fname ) { //need to upload to remote location - if ( ! KIO::NetAccess::upload( tmpfile.name(), currentFileURL, (QWidget*) 0 ) ) + if ( ! KIO::NetAccess::upload( tmpfile.name(), currentFileURL, (TQWidget*) 0 ) ) { - QString message = i18n( "Could not upload image to remote location: %1" ).arg( currentFileURL.prettyURL() ); + TQString message = i18n( "Could not upload image to remote location: %1" ).arg( currentFileURL.prettyURL() ); KMessageBox::sorry( 0, message, i18n( "Could not upload file" ) ); } } } else { - QString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); + TQString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); KMessageBox::sorry( 0, message, i18n( "Invalid URL" ) ); } } -VideoWG::VideoWG(QWidget * parent, const char * name) : QFrame(parent, name, Qt::WNoAutoErase) +VideoWG::VideoWG(TQWidget * parent, const char * name) : TQFrame(parent, name, Qt::WNoAutoErase) { streamImage = NULL; grayTable=new QRgb[256]; @@ -289,16 +289,16 @@ void VideoWG::newFrame(unsigned char *buffer, int buffSiz, int w, int h) //if (color) if (buffSiz > totalBaseCount) - streamImage = new QImage(buffer, w, h, 32, 0, 0, QImage::BigEndian); + streamImage = new TQImage(buffer, w, h, 32, 0, 0, TQImage::BigEndian); else - streamImage = new QImage(buffer, w, h, 8, grayTable, 256, QImage::IgnoreEndian); + streamImage = new TQImage(buffer, w, h, 8, grayTable, 256, TQImage::IgnoreEndian); update(); } -void VideoWG::paintEvent(QPaintEvent */*ev*/) +void VideoWG::paintEvent(TQPaintEvent */*ev*/) { if (streamImage) diff --git a/kstars/kstars/streamwg.h b/kstars/kstars/streamwg.h index 27d24fc7..7fa14988 100644 --- a/kstars/kstars/streamwg.h +++ b/kstars/kstars/streamwg.h @@ -12,11 +12,11 @@ #ifndef STREAMWG_H #define STREAMWG_H - #include <qpixmap.h> + #include <tqpixmap.h> #include <kpixmapio.h> #include "streamformui.h" - #include "qframe.h" + #include "tqframe.h" class QImage; @@ -31,7 +31,7 @@ Q_OBJECT public: - StreamWG(INDIStdDevice *inStdDev, QWidget * parent =0, const char * name =0); + StreamWG(INDIStdDevice *inStdDev, TQWidget * parent =0, const char * name =0); ~StreamWG(); friend class VideoWG; @@ -48,12 +48,12 @@ private: INDIStdDevice *stdDev; - QPixmap playPix, pausePix, capturePix; - QVBoxLayout *videoFrameLayout; + TQPixmap playPix, pausePix, capturePix; + TQVBoxLayout *videoFrameLayout; protected: - void closeEvent ( QCloseEvent * e ); - void resizeEvent(QResizeEvent *ev); + void closeEvent ( TQCloseEvent * e ); + void resizeEvent(TQResizeEvent *ev); public slots: @@ -68,7 +68,7 @@ Q_OBJECT public: - VideoWG(QWidget * parent =0, const char * name =0); + VideoWG(TQWidget * parent =0, const char * name =0); ~VideoWG(); friend class StreamWG; @@ -83,7 +83,7 @@ KPixmapIO kPixIO; protected: - void paintEvent(QPaintEvent *ev); + void paintEvent(TQPaintEvent *ev); }; diff --git a/kstars/kstars/telescopeprop.cpp b/kstars/kstars/telescopeprop.cpp index 2e260941..b2f17009 100644 --- a/kstars/kstars/telescopeprop.cpp +++ b/kstars/kstars/telescopeprop.cpp @@ -29,7 +29,7 @@ #include "indimenu.h" #include "indidriver.h" -telescopeProp::telescopeProp(QWidget* parent, const char* name, bool modal, WFlags fl) +telescopeProp::telescopeProp(TQWidget* parent, const char* name, bool modal, WFlags fl) : scopeProp(parent,name, modal,fl) { @@ -39,11 +39,11 @@ telescopeProp::telescopeProp(QWidget* parent, const char* name, bool modal, WFla indi_driver = ksw->getINDIDriver(); newScopePending = false; - connect (newB, SIGNAL(clicked()), this, SLOT(newScope())); - connect (saveB, SIGNAL(clicked()), this, SLOT(saveScope())); - connect (removeB, SIGNAL(clicked()), this, SLOT(removeScope())); - connect (telescopeListBox, SIGNAL(highlighted(int)),this, SLOT(updateScopeDetails(int))); - connect(closeB, SIGNAL(clicked()), this, SLOT(close())); + connect (newB, TQT_SIGNAL(clicked()), this, TQT_SLOT(newScope())); + connect (saveB, TQT_SIGNAL(clicked()), this, TQT_SLOT(saveScope())); + connect (removeB, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeScope())); + connect (telescopeListBox, TQT_SIGNAL(highlighted(int)),this, TQT_SLOT(updateScopeDetails(int))); + connect(closeB, TQT_SIGNAL(clicked()), this, TQT_SLOT(close())); // Fill the combo box with drivers driverCombo->insertStringList(indi_driver->driversList); @@ -213,10 +213,10 @@ void telescopeProp::updateScopeDetails(int index) versionEdit->setText(indi_driver->devices[finalIndex]->version); if (indi_driver->devices[finalIndex]->focal_length != -1) - focalEdit->setText(QString("%1").arg(indi_driver->devices[finalIndex]->focal_length)); + focalEdit->setText(TQString("%1").arg(indi_driver->devices[finalIndex]->focal_length)); if (indi_driver->devices[finalIndex]->aperture != -1) - apertureEdit->setText(QString("%1").arg(indi_driver->devices[finalIndex]->aperture)); + apertureEdit->setText(TQString("%1").arg(indi_driver->devices[finalIndex]->aperture)); } diff --git a/kstars/kstars/telescopeprop.h b/kstars/kstars/telescopeprop.h index ce7347f9..3c036bdc 100644 --- a/kstars/kstars/telescopeprop.h +++ b/kstars/kstars/telescopeprop.h @@ -28,7 +28,7 @@ class telescopeProp : public scopeProp Q_OBJECT public: - telescopeProp(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + telescopeProp(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); ~telescopeProp(); /*$PUBLIC_FUNCTIONS$*/ diff --git a/kstars/kstars/telescopewizardprocess.cpp b/kstars/kstars/telescopewizardprocess.cpp index cffb2cf4..664a4749 100644 --- a/kstars/kstars/telescopewizardprocess.cpp +++ b/kstars/kstars/telescopewizardprocess.cpp @@ -7,16 +7,16 @@ version 2 of the License, or (at your option) any later version. */ -#include <qfile.h> -#include <qpixmap.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qwidgetstack.h> -#include <qstring.h> -#include <qtimer.h> -#include <qtable.h> -#include <qtextedit.h> -#include <qradiobutton.h> +#include <tqfile.h> +#include <tqpixmap.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqwidgetstack.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqtable.h> +#include <tqtextedit.h> +#include <tqradiobutton.h> #include <klistview.h> #include <klineedit.h> @@ -40,7 +40,7 @@ #define TIMEOUT_THRESHHOLD 20 -telescopeWizardProcess::telescopeWizardProcess( QWidget* parent, const char* name ) : telescopeWizard(parent, name) +telescopeWizardProcess::telescopeWizardProcess( TQWidget* parent, const char* name ) : telescopeWizard(parent, name) { currentPort = -1; timeOutCount = 0; @@ -48,11 +48,11 @@ telescopeWizardProcess::telescopeWizardProcess( QWidget* parent, const char* nam progressScan = NULL; linkRejected = false; - QString locStr; - QFile sideIMG; + TQString locStr; + TQFile sideIMG; if (KSUtils::openDataFile(sideIMG, "wizardside.png")) - wizardPix->setPixmap(QPixmap(sideIMG.name())); + wizardPix->setPixmap(TQPixmap(sideIMG.name())); backB->hide(); currentPage = INTRO_P; @@ -67,16 +67,16 @@ telescopeWizardProcess::telescopeWizardProcess( QWidget* parent, const char* nam INDIMessageBar = Options::indiMessages(); Options::setIndiMessages( false ); - QTime newTime( ksw->data()->lt().time() ); + TQTime newTime( ksw->data()->lt().time() ); ExtDate newDate( ksw->data()->lt().date() ); - timeOut->setText( QString().sprintf("%02d:%02d:%02d", newTime.hour(), newTime.minute(), newTime.second())); - dateOut->setText( QString().sprintf("%d-%02d-%02d", newDate.year(), newDate.month(), newDate.day())); + timeOut->setText( TQString().sprintf("%02d:%02d:%02d", newTime.hour(), newTime.minute(), newTime.second())); + dateOut->setText( TQString().sprintf("%d-%02d-%02d", newDate.year(), newDate.month(), newDate.day())); if (ksw->geo()->translatedProvince().isEmpty()) - locationOut->setText( QString("%1, %2").arg(ksw->geo()->translatedName()).arg(ksw->geo()->translatedCountry())); + locationOut->setText( TQString("%1, %2").arg(ksw->geo()->translatedName()).arg(ksw->geo()->translatedCountry())); else - locationOut->setText( QString("%1, %2, %3").arg(ksw->geo()->translatedName()) + locationOut->setText( TQString("%1, %2, %3").arg(ksw->geo()->translatedName()) .arg(ksw->geo()->translatedProvince()) .arg(ksw->geo()->translatedCountry())); @@ -91,14 +91,14 @@ telescopeWizardProcess::telescopeWizardProcess( QWidget* parent, const char* nam portList << "/dev/ttyS0" << "/dev/ttyS1" << "/dev/ttyS2" << "/dev/ttyS3" << "/dev/ttyS4" << "/dev/ttyUSB0" << "/dev/ttyUSB1" << "/dev/ttyUSB2" << "/dev/ttyUSB3";// << "/dev/ttyUSB4"; - connect(helpB, SIGNAL(clicked()), parent, SLOT(appHelpActivated())); - connect(nextB, SIGNAL(clicked()), this, SLOT(processNext())); - connect(backB, SIGNAL(clicked()), this, SLOT(processBack())); - connect(setTimeB, SIGNAL(clicked()), this, SLOT(newTime())); - connect(setLocationB, SIGNAL(clicked()), this, SLOT(newLocation())); + connect(helpB, TQT_SIGNAL(clicked()), parent, TQT_SLOT(appHelpActivated())); + connect(nextB, TQT_SIGNAL(clicked()), this, TQT_SLOT(processNext())); + connect(backB, TQT_SIGNAL(clicked()), this, TQT_SLOT(processBack())); + connect(setTimeB, TQT_SIGNAL(clicked()), this, TQT_SLOT(newTime())); + connect(setLocationB, TQT_SIGNAL(clicked()), this, TQT_SLOT(newLocation())); - newDeviceTimer = new QTimer(this); - QObject::connect( newDeviceTimer, SIGNAL(timeout()), this, SLOT(processPort()) ); + newDeviceTimer = new TQTimer(this); + TQObject::connect( newDeviceTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(processPort()) ); } @@ -196,13 +196,13 @@ void telescopeWizardProcess::newTime() { TimeDialog timedialog (ksw->data()->lt(), ksw); - if ( timedialog.exec() == QDialog::Accepted ) + if ( timedialog.exec() == TQDialog::Accepted ) { KStarsDateTime dt( timedialog.selectedDate(), timedialog.selectedTime() ); ksw->data()->changeDateTime( dt ); - timeOut->setText( QString().sprintf("%02d:%02d:%02d", dt.time().hour(), dt.time().minute(), dt.time().second())); - dateOut->setText( QString().sprintf("%d-%02d-%02d", dt.date().year(), dt.date().month(), dt.date().day())); + timeOut->setText( TQString().sprintf("%02d:%02d:%02d", dt.time().hour(), dt.time().minute(), dt.time().second())); + dateOut->setText( TQString().sprintf("%d-%02d-%02d", dt.date().year(), dt.date().month(), dt.date().day())); } } @@ -211,12 +211,12 @@ void telescopeWizardProcess::newLocation() ksw->slotGeoLocator(); - locationOut->setText( QString("%1, %2, %3").arg(ksw->geo()->translatedName()) + locationOut->setText( TQString("%1, %2, %3").arg(ksw->geo()->translatedName()) .arg(ksw->geo()->translatedProvince()) .arg(ksw->geo()->translatedCountry())); - timeOut->setText( QString().sprintf("%02d:%02d:%02d", ksw->data()->lt().time().hour(), ksw->data()->lt().time().minute(), ksw->data()->lt().time().second())); + timeOut->setText( TQString().sprintf("%02d:%02d:%02d", ksw->data()->lt().time().hour(), ksw->data()->lt().time().minute(), ksw->data()->lt().time().second())); - dateOut->setText( QString().sprintf("%d-%02d-%02d", ksw->data()->lt().date().year(), + dateOut->setText( TQString().sprintf("%d-%02d-%02d", ksw->data()->lt().date().year(), ksw->data()->lt().date().month() ,ksw->data()->lt().date().day())); @@ -229,7 +229,7 @@ int telescopeWizardProcess::establishLink() if (!indidriver || !indimenu) return (0); - QListViewItem *driverItem = NULL; + TQListViewItem *driverItem = NULL; driverItem = indidriver->localListView->findItem(telescopeCombo->currentText(), 0); if (driverItem == NULL) return -1; @@ -289,8 +289,8 @@ void telescopeWizardProcess::processPort() { newDeviceTimer->stop(); linkRejected = false; - connect(indiDev->stdDev, SIGNAL(linkRejected()), this, SLOT(scanPorts())); - connect(indiDev->stdDev, SIGNAL(linkAccepted()), this, SLOT(linkSuccess())); + connect(indiDev->stdDev, TQT_SIGNAL(linkRejected()), this, TQT_SLOT(scanPorts())); + connect(indiDev->stdDev, TQT_SIGNAL(linkAccepted()), this, TQT_SLOT(linkSuccess())); scanPorts(); return; } diff --git a/kstars/kstars/telescopewizardprocess.h b/kstars/kstars/telescopewizardprocess.h index 2fc5b911..3f19523f 100644 --- a/kstars/kstars/telescopewizardprocess.h +++ b/kstars/kstars/telescopewizardprocess.h @@ -10,7 +10,7 @@ #ifndef TELESCOPEWIZARDPROCESS_H #define TELESCOPEWIZARDPROCESS_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "telescopewizard.h" @@ -28,7 +28,7 @@ class telescopeWizardProcess : public telescopeWizard Q_OBJECT public: - telescopeWizardProcess( QWidget* parent = 0, const char* name = 0); + telescopeWizardProcess( TQWidget* parent = 0, const char* name = 0); ~telescopeWizardProcess(); unsigned int currentPage; @@ -38,14 +38,14 @@ private: KStars * ksw; INDIMenu *indimenu; INDIDriver *indidriver; - QTimer *newDeviceTimer; + TQTimer *newDeviceTimer; INDI_D *indiDev; KProgressDialog *progressScan; - QStringList portList; - QString currentDevice; + TQStringList portList; + TQString currentDevice; int currentPort; int timeOutCount; diff --git a/kstars/kstars/thumbnaileditor.cpp b/kstars/kstars/thumbnaileditor.cpp index 5a34d8c8..5e2301eb 100644 --- a/kstars/kstars/thumbnaileditor.cpp +++ b/kstars/kstars/thumbnaileditor.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include <qframe.h> -#include <qimage.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qpoint.h> +#include <tqframe.h> +#include <tqimage.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpoint.h> #include <klocale.h> #include <kdebug.h> @@ -29,13 +29,13 @@ #include "thumbnaileditorui.h" #include "thumbnailpicker.h" -ThumbnailEditor::ThumbnailEditor( QWidget *parent, const char *name ) +ThumbnailEditor::ThumbnailEditor( TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n( "Edit Thumbnail Image" ), Ok|Cancel, Ok, parent, name ) { tp = (ThumbnailPicker*)parent; - QFrame *page = plainPage(); - QHBoxLayout *hlay = new QHBoxLayout( page, 0, 0 ); + TQFrame *page = plainPage(); + TQHBoxLayout *hlay = new TQHBoxLayout( page, 0, 0 ); ui = new ThumbnailEditorUI( page ); hlay->addWidget( ui ); @@ -43,7 +43,7 @@ ThumbnailEditor::ThumbnailEditor( QWidget *parent, const char *name ) tp->imageRect()->width(), tp->imageRect()->height() ); ui->ImageCanvas->setImage( tp->currentListImage() ); - connect( ui->ImageCanvas, SIGNAL(cropRegionModified()), SLOT( slotUpdateCropLabel() ) ); + connect( ui->ImageCanvas, TQT_SIGNAL(cropRegionModified()), TQT_SLOT( slotUpdateCropLabel() ) ); slotUpdateCropLabel(); update(); @@ -52,22 +52,22 @@ ThumbnailEditor::ThumbnailEditor( QWidget *parent, const char *name ) ThumbnailEditor::~ThumbnailEditor() {} -QPixmap ThumbnailEditor::thumbnail() { - QImage im = ui->ImageCanvas->croppedImage().convertToImage(); +TQPixmap ThumbnailEditor::thumbnail() { + TQImage im = ui->ImageCanvas->croppedImage().convertToImage(); im = im.smoothScale( 200, 200 ); - QPixmap pm; + TQPixmap pm; pm.convertFromImage( im ); return pm; } void ThumbnailEditor::slotUpdateCropLabel() { - QRect *r = ui->ImageCanvas->cropRect(); + TQRect *r = ui->ImageCanvas->cropRect(); ui->CropLabel->setText( i18n( "Crop region: [%1,%2 %3x%4]" ) .arg( r->left() ).arg( r->top() ).arg( r->width() ).arg( r->height() ) ); } -QPixmap ThumbImage::croppedImage() { - QPixmap result( CropRect->width(), CropRect->height() ); +TQPixmap ThumbImage::croppedImage() { + TQPixmap result( CropRect->width(), CropRect->height() ); bitBlt( &result, 0, 0, Image, CropRect->left(), CropRect->top(), CropRect->width(), CropRect->height() ); @@ -75,9 +75,9 @@ QPixmap ThumbImage::croppedImage() { return result; } -ThumbImage::ThumbImage( QWidget *parent, const char *name ) : QLabel( parent, name ) +ThumbImage::ThumbImage( TQWidget *parent, const char *name ) : TQLabel( parent, name ) { - setBackgroundMode( QWidget::NoBackground ); + setBackgroundMode( TQWidget::NoBackground ); bMouseButtonDown = false; bTopLeftGrab = false; bTopRightGrab = false; @@ -85,51 +85,51 @@ ThumbImage::ThumbImage( QWidget *parent, const char *name ) : QLabel( parent, na bBottomRightGrab = false; HandleSize = 10; - CropRect = new QRect(); - Anchor = new QPoint(); - Image = new QPixmap(); + CropRect = new TQRect(); + Anchor = new TQPoint(); + Image = new TQPixmap(); } ThumbImage::~ThumbImage() {} -void ThumbImage::paintEvent( QPaintEvent* ) { - QPixmap c( *Image ); - QPainter p; +void ThumbImage::paintEvent( TQPaintEvent* ) { + TQPixmap c( *Image ); + TQPainter p; p.begin( &c ); - p.setPen( QPen( QColor( "Grey" ), 2 ) ); + p.setPen( TQPen( TQColor( "Grey" ), 2 ) ); p.drawRect( *CropRect ); - p.setPen( QPen( QColor( "Grey" ), 0 ) ); - p.drawRect( QRect( CropRect->left(), CropRect->top(), + p.setPen( TQPen( TQColor( "Grey" ), 0 ) ); + p.drawRect( TQRect( CropRect->left(), CropRect->top(), HandleSize, HandleSize ) ); - p.drawRect( QRect( CropRect->right() - HandleSize, CropRect->top(), + p.drawRect( TQRect( CropRect->right() - HandleSize, CropRect->top(), HandleSize, HandleSize ) ); - p.drawRect( QRect( CropRect->left(), CropRect->bottom() - HandleSize, + p.drawRect( TQRect( CropRect->left(), CropRect->bottom() - HandleSize, HandleSize, HandleSize ) ); - p.drawRect( QRect( CropRect->right() - HandleSize, CropRect->bottom() - HandleSize, + p.drawRect( TQRect( CropRect->right() - HandleSize, CropRect->bottom() - HandleSize, HandleSize, HandleSize ) ); if ( CropRect->x() > 0 ) p.fillRect( 0, 0, CropRect->x(), c.height(), - QBrush( QColor("white"), Dense3Pattern ) ); + TQBrush( TQColor("white"), Dense3Pattern ) ); if ( CropRect->right() < c.width() ) p.fillRect( CropRect->right(), 0, (c.width() - CropRect->right()), c.height(), - QBrush( QColor("white"), Dense3Pattern ) ); + TQBrush( TQColor("white"), Dense3Pattern ) ); if ( CropRect->y() > 0 ) p.fillRect( 0, 0, c.width(), CropRect->y(), - QBrush( QColor("white"), Dense3Pattern ) ); + TQBrush( TQColor("white"), Dense3Pattern ) ); if ( CropRect->bottom() < c.height() ) p.fillRect( 0, CropRect->bottom(), c.width(), (c.height() - CropRect->bottom()), - QBrush( QColor("white"), Dense3Pattern ) ); + TQBrush( TQColor("white"), Dense3Pattern ) ); p.end(); bitBlt( this, 0, 0, &c ); } -void ThumbImage::mousePressEvent( QMouseEvent *e ) { +void ThumbImage::mousePressEvent( TQMouseEvent *e ) { if ( e->button() == LeftButton && CropRect->contains( e->pos() ) ) { bMouseButtonDown = true; @@ -156,7 +156,7 @@ void ThumbImage::mousePressEvent( QMouseEvent *e ) { } } -void ThumbImage::mouseReleaseEvent( QMouseEvent *e ) { +void ThumbImage::mouseReleaseEvent( TQMouseEvent *e ) { if ( bMouseButtonDown ) bMouseButtonDown = false; if ( bTopLeftGrab ) bTopLeftGrab = false; if ( bTopRightGrab ) bTopRightGrab = false; @@ -164,7 +164,7 @@ void ThumbImage::mouseReleaseEvent( QMouseEvent *e ) { if ( bBottomRightGrab ) bBottomRightGrab = false; } -void ThumbImage::mouseMoveEvent( QMouseEvent *e ) { +void ThumbImage::mouseMoveEvent( TQMouseEvent *e ) { if ( bMouseButtonDown ) { //If a corner was grabbed, we are resizing the box @@ -197,7 +197,7 @@ void ThumbImage::mouseMoveEvent( QMouseEvent *e ) { if ( CropRect->width() < 200 ) CropRect->setRight( CropRect->right() + 200 - CropRect->width() ); if ( CropRect->height() < 200 ) CropRect->setBottom( CropRect->bottom() + 200 - CropRect->height() ); } else { //no corner grabbed; move croprect - CropRect->moveTopLeft( QPoint( e->x() - Anchor->x(), e->y() - Anchor->y() ) ); + CropRect->moveTopLeft( TQPoint( e->x() - Anchor->x(), e->y() - Anchor->y() ) ); if ( CropRect->left() < 0 ) CropRect->moveLeft( 0 ); if ( CropRect->right() > width() ) CropRect->moveRight( width() ); if ( CropRect->top() < 0 ) CropRect->moveTop( 0 ); diff --git a/kstars/kstars/thumbnaileditor.h b/kstars/kstars/thumbnaileditor.h index d6da8d85..d7646bc0 100644 --- a/kstars/kstars/thumbnaileditor.h +++ b/kstars/kstars/thumbnaileditor.h @@ -19,7 +19,7 @@ #define THUMBNAILEDITOR_H #include <kdialogbase.h> -#include <qlabel.h> +#include <tqlabel.h> class ThumbnailEditorUI; class ThumbnailPicker; @@ -29,30 +29,30 @@ class ThumbImage : public QLabel { Q_OBJECT public: - ThumbImage( QWidget *parent, const char *name = 0 ); + ThumbImage( TQWidget *parent, const char *name = 0 ); ~ThumbImage(); - void setImage( QPixmap *pm ) { Image = pm; setFixedSize( Image->width(), Image->height() ); } - QPixmap* image() { return Image; } - QPixmap croppedImage(); + void setImage( TQPixmap *pm ) { Image = pm; setFixedSize( Image->width(), Image->height() ); } + TQPixmap* image() { return Image; } + TQPixmap croppedImage(); void setCropRect( int x, int y, int w, int h ) { CropRect->setRect( x, y, w, h ); } - QRect* cropRect() const { return CropRect; } + TQRect* cropRect() const { return CropRect; } signals: void cropRegionModified(); protected: -// void resizeEvent( QResizeEvent *e); - void paintEvent( QPaintEvent *); - void mousePressEvent( QMouseEvent *e ); - void mouseReleaseEvent( QMouseEvent *e ); - void mouseMoveEvent( QMouseEvent *e ); +// void resizeEvent( TQResizeEvent *e); + void paintEvent( TQPaintEvent *); + void mousePressEvent( TQMouseEvent *e ); + void mouseReleaseEvent( TQMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); private: - QRect *CropRect; - QPoint *Anchor; - QPixmap *Image; + TQRect *CropRect; + TQPoint *Anchor; + TQPixmap *Image; bool bMouseButtonDown; bool bTopLeftGrab, bBottomLeftGrab, bTopRightGrab, bBottomRightGrab; @@ -63,9 +63,9 @@ class ThumbnailEditor : public KDialogBase { Q_OBJECT public: - ThumbnailEditor( QWidget *parent, const char *name=0 ); + ThumbnailEditor( TQWidget *parent, const char *name=0 ); ~ThumbnailEditor(); - QPixmap thumbnail(); + TQPixmap thumbnail(); private slots: void slotUpdateCropLabel(); diff --git a/kstars/kstars/thumbnailpicker.cpp b/kstars/kstars/thumbnailpicker.cpp index ded0326f..c9460480 100644 --- a/kstars/kstars/thumbnailpicker.cpp +++ b/kstars/kstars/thumbnailpicker.cpp @@ -15,14 +15,14 @@ * * ***************************************************************************/ -#include <qframe.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qimage.h> -#include <qpixmap.h> -#include <qfile.h> -#include <qrect.h> -#include <qstyle.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqimage.h> +#include <tqpixmap.h> +#include <tqfile.h> +#include <tqrect.h> +#include <tqstyle.h> #include <kapplication.h> #include <kdeversion.h> @@ -43,15 +43,15 @@ #include "detaildialog.h" #include "skyobject.h" -ThumbnailPicker::ThumbnailPicker( SkyObject *o, const QPixmap ¤t, QWidget *parent, const char *name ) +ThumbnailPicker::ThumbnailPicker( SkyObject *o, const TQPixmap ¤t, TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n( "Choose Thumbnail Image" ), Ok|Cancel, Ok, parent, name ), SelectedImageIndex(-1), dd((DetailDialog*)parent), Object(o), bImageFound( false ) { - Image = new QPixmap( current ); - ImageRect = new QRect( 0, 0, 200, 200 ); + Image = new TQPixmap( current ); + ImageRect = new TQRect( 0, 0, 200, 200 ); - QFrame *page = plainPage(); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, 0 ); + TQFrame *page = plainPage(); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 ); ui = new ThumbnailPickerUI( page ); vlay->addWidget( ui ); @@ -59,14 +59,14 @@ ThumbnailPicker::ThumbnailPicker( SkyObject *o, const QPixmap ¤t, QWidget PixList.setAutoDelete( true ); - connect( ui->EditButton, SIGNAL( clicked() ), this, SLOT( slotEditImage() ) ); - connect( ui->UnsetButton, SIGNAL( clicked() ), this, SLOT( slotUnsetImage() ) ); - connect( ui->ImageList, SIGNAL( highlighted( int ) ), - this, SLOT( slotSetFromList( int ) ) ); - connect( ui->ImageURLBox, SIGNAL( urlSelected( const QString& ) ), - this, SLOT( slotSetFromURL() ) ); - connect( ui->ImageURLBox, SIGNAL( returnPressed() ), - this, SLOT( slotSetFromURL() ) ); + connect( ui->EditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEditImage() ) ); + connect( ui->UnsetButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUnsetImage() ) ); + connect( ui->ImageList, TQT_SIGNAL( highlighted( int ) ), + this, TQT_SLOT( slotSetFromList( int ) ) ); + connect( ui->ImageURLBox, TQT_SIGNAL( urlSelected( const TQString& ) ), + this, TQT_SLOT( slotSetFromURL() ) ); + connect( ui->ImageURLBox, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( slotSetFromURL() ) ); ui->ImageURLBox->lineEdit()->setTrapReturnKey( true ); ui->EditButton->setEnabled( false ); @@ -80,14 +80,14 @@ ThumbnailPicker::~ThumbnailPicker() //Query online sources for images of the object void ThumbnailPicker::slotFillList() { //Preload list with object's ImageList: - QStringList ImageList( Object->ImageList ); + TQStringList ImageList( Object->ImageList ); //Query Google Image Search: KURL gURL( "http://images.google.com/images" ); //Search for the primary name, or longname and primary name - QString sName = QString("\"%1\"").arg( Object->name() ); + TQString sName = TQString("\"%1\"").arg( Object->name() ); if ( Object->longname() != Object->name() ) { - sName = QString("\"%1\" ").arg( Object->longname() ) + sName; + sName = TQString("\"%1\" ").arg( Object->longname() ) + sName; } gURL.addQueryItem( "q", sName ); //add the Google-image query string @@ -102,34 +102,34 @@ void ThumbnailPicker::slotFillList() { } //Add images from the ImageList - QStringList::Iterator itList = ImageList.begin(); - QStringList::Iterator itListEnd = ImageList.end(); + TQStringList::Iterator itList = ImageList.begin(); + TQStringList::Iterator itListEnd = ImageList.end(); for ( ; itList != itListEnd; ++itList ) { - QString s( *itList ); + TQString s( *itList ); KURL u( s ); if ( u.isValid() && KIO::NetAccess::exists(u, true, this) ) { KTempFile ktf; - QFile *tmpFile = ktf.file(); + TQFile *tmpFile = ktf.file(); ktf.unlink(); //just need filename JobList.append( KIO::copy( u, KURL( tmpFile->name() ), false ) ); //false = no progress window #if KDE_IS_VERSION( 3, 3, 90 ) ((KIO::CopyJob*)JobList.current())->setInteractive( false ); // suppress error dialogs #endif - connect (JobList.current(), SIGNAL (result(KIO::Job *)), SLOT (downloadReady (KIO::Job *))); + connect (JobList.current(), TQT_SIGNAL (result(KIO::Job *)), TQT_SLOT (downloadReady (KIO::Job *))); } } } -void ThumbnailPicker::parseGooglePage( QStringList &ImList, QString URL ) { - QString tmpFile; - QString PageHTML; +void ThumbnailPicker::parseGooglePage( TQStringList &ImList, TQString URL ) { + TQString tmpFile; + TQString PageHTML; - //Read the google image page's HTML into the PageHTML QString: + //Read the google image page's HTML into the PageHTML TQString: if ( KIO::NetAccess::exists(URL, true, this) && KIO::NetAccess::download( URL, tmpFile ) ) { - QFile file( tmpFile ); + TQFile file( tmpFile ); if ( file.open( IO_ReadOnly ) ) { - QTextStream instream(&file); + TQTextStream instream(&file); PageHTML = instream.read(); file.close(); } else { @@ -171,16 +171,16 @@ void ThumbnailPicker::downloadReady(KIO::Job *job) { } KIO::CopyJob *cjob = (KIO::CopyJob*)job; - QFile tmp( cjob->destURL().path() ); + TQFile tmp( cjob->destURL().path() ); tmp.close(); // to get the newest information of the file //Add image to list //If image is taller than desktop, rescale it. - //I tried to use kapp->style().pixelMetric( QStyle::PM_TitleBarHeight ) + //I tried to use kapp->style().pixelMetric( TQStyle::PM_TitleBarHeight ) //for the titlebar height, but this returned zero. //Hard-coding 25 instead :( if ( tmp.exists() ) { - QImage im( tmp.name() ); + TQImage im( tmp.name() ); if ( im.isNull() ) { //KMessageBox::sorry( 0, i18n("Failed to load image"), @@ -195,12 +195,12 @@ void ThumbnailPicker::downloadReady(KIO::Job *job) { // this returns zero... // //DEBUG -// kdDebug() << "Title bar height: " << kapp->style().pixelMetric( QStyle::PM_TitleBarHeight ) << endl; +// kdDebug() << "Title bar height: " << kapp->style().pixelMetric( TQStyle::PM_TitleBarHeight ) << endl; if ( h > hDesk ) im = im.smoothScale( w*hDesk/h, hDesk ); - PixList.append( new QPixmap( im ) ); + PixList.append( new TQPixmap( im ) ); //Add 50x50 image and URL to listbox ui->ImageList->insertItem( shrinkImage( PixList.current(), 50 ), @@ -208,11 +208,11 @@ void ThumbnailPicker::downloadReady(KIO::Job *job) { } } -QPixmap ThumbnailPicker::shrinkImage( QPixmap *pm, int size, bool setImage ) { +TQPixmap ThumbnailPicker::shrinkImage( TQPixmap *pm, int size, bool setImage ) { int w( pm->width() ), h( pm->height() ); int bigSize( w ); int rx(0), ry(0), sx(0), sy(0), bx(0), by(0); - if ( size == 0 ) return QPixmap(); + if ( size == 0 ) return TQPixmap(); //Prepare variables for rescaling image (if it is larger than 'size') if ( w > size && w >= h ) { @@ -229,12 +229,12 @@ QPixmap ThumbnailPicker::shrinkImage( QPixmap *pm, int size, bool setImage ) { if ( setImage ) bigSize = int( 200.*float(pm->width())/float(w) ); - QPixmap result( size, size ); - result.fill( QColor( "white" ) ); //in case final image is smaller than 'size' + TQPixmap result( size, size ); + result.fill( TQColor( "white" ) ); //in case final image is smaller than 'size' if ( pm->width() > size || pm->height() > size ) { //image larger than 'size'? - //convert to QImage so we can smoothscale it - QImage im( pm->convertToImage() ); + //convert to TQImage so we can smoothscale it + TQImage im( pm->convertToImage() ); im = im.smoothScale( w, h ); //bitBlt sizexsize square section of image @@ -259,8 +259,8 @@ QPixmap ThumbnailPicker::shrinkImage( QPixmap *pm, int size, bool setImage ) { void ThumbnailPicker::slotEditImage() { ThumbnailEditor te( this ); - if ( te.exec() == QDialog::Accepted ) { - QPixmap pm = te.thumbnail(); + if ( te.exec() == TQDialog::Accepted ) { + TQPixmap pm = te.thumbnail(); *Image = pm; ui->CurrentImage->setPixmap( pm ); ui->CurrentImage->update(); @@ -268,7 +268,7 @@ void ThumbnailPicker::slotEditImage() { } void ThumbnailPicker::slotUnsetImage() { - QFile file; + TQFile file; if ( KSUtils::openDataFile( file, "noimage.png" ) ) { file.close(); Image->load( file.name(), "PNG" ); @@ -286,7 +286,7 @@ void ThumbnailPicker::slotUnsetImage() { void ThumbnailPicker::slotSetFromList( int i ) { //Display image in preview pane - QPixmap pm; + TQPixmap pm; pm = shrinkImage( PixList.at(i), 200, true ); //scale image SelectedImageIndex = i; @@ -305,11 +305,11 @@ void ThumbnailPicker::slotSetFromURL() { if ( u.isValid() ) { if ( u.isLocalFile() ) { - QFile localFile( u.path() ); + TQFile localFile( u.path() ); //Add image to list //If image is taller than desktop, rescale it. - QImage im( localFile.name() ); + TQImage im( localFile.name() ); if ( im.isNull() ) { KMessageBox::sorry( 0, @@ -327,7 +327,7 @@ void ThumbnailPicker::slotSetFromURL() { im = im.smoothScale( w*hDesk/h, hDesk ); //Add Image to top of list and 50x50 thumbnail image and URL to top of listbox - PixList.insert( 0, new QPixmap( im ) ); + PixList.insert( 0, new TQPixmap( im ) ); ui->ImageList->insertItem( shrinkImage( PixList.current(), 50 ), u.prettyURL(), 0 ); @@ -337,13 +337,13 @@ void ThumbnailPicker::slotSetFromURL() { } else if ( KIO::NetAccess::exists(u, true, this) ) { KTempFile ktf; - QFile *tmpFile = ktf.file(); + TQFile *tmpFile = ktf.file(); ktf.unlink(); //just need filename JobList.append( KIO::copy( u, KURL( tmpFile->name() ), false ) ); //false = no progress window #if KDE_IS_VERSION( 3, 3, 90 ) ((KIO::CopyJob*)JobList.current())->setInteractive( false ); // suppress error dialogs #endif - connect (JobList.current(), SIGNAL (result(KIO::Job *)), SLOT (downloadReady (KIO::Job *))); + connect (JobList.current(), TQT_SIGNAL (result(KIO::Job *)), TQT_SLOT (downloadReady (KIO::Job *))); // } diff --git a/kstars/kstars/thumbnailpicker.h b/kstars/kstars/thumbnailpicker.h index 1f7c112b..20dc5739 100644 --- a/kstars/kstars/thumbnailpicker.h +++ b/kstars/kstars/thumbnailpicker.h @@ -38,13 +38,13 @@ class ThumbnailPicker : public KDialogBase { Q_OBJECT public: - ThumbnailPicker( SkyObject *o, const QPixmap ¤t, QWidget *parent=0, const char *name=0 ); + ThumbnailPicker( SkyObject *o, const TQPixmap ¤t, TQWidget *parent=0, const char *name=0 ); ~ThumbnailPicker(); - QPixmap* image() { return Image; } - QPixmap* currentListImage() { return PixList.at( SelectedImageIndex ); } + TQPixmap* image() { return Image; } + TQPixmap* currentListImage() { return PixList.at( SelectedImageIndex ); } bool imageFound() const { return bImageFound; } - QRect* imageRect() const { return ImageRect; } + TQRect* imageRect() const { return ImageRect; } private slots: void slotEditImage(); @@ -57,18 +57,18 @@ private slots: void downloadReady (KIO::Job *); private: - QPixmap shrinkImage( QPixmap *original, int newSize, bool setImage=false ); - void parseGooglePage( QStringList &ImList, QString URL ); + TQPixmap shrinkImage( TQPixmap *original, int newSize, bool setImage=false ); + void parseGooglePage( TQStringList &ImList, TQString URL ); int SelectedImageIndex; ThumbnailPickerUI *ui; - QPixmap *Image; + TQPixmap *Image; DetailDialog *dd; SkyObject *Object; - QPtrList<KIO::Job> JobList; - QPtrList<QPixmap> PixList; + TQPtrList<KIO::Job> JobList; + TQPtrList<TQPixmap> PixList; bool bImageFound; - QRect *ImageRect; + TQRect *ImageRect; }; #endif diff --git a/kstars/kstars/timebox.cpp b/kstars/kstars/timebox.cpp index 9aa513a3..5040cf1f 100644 --- a/kstars/kstars/timebox.cpp +++ b/kstars/kstars/timebox.cpp @@ -17,14 +17,14 @@ #include "timebox.h" #include "libkdeedu/extdate/extdatetime.h" -#include <qdatetime.h> //needed for QTime -#include <qregexp.h> +#include <tqdatetime.h> //needed for QTime +#include <tqregexp.h> #include <kglobal.h> #include <klocale.h> #include <stdlib.h> #include <kdebug.h> -timeBox::timeBox(QWidget *parent, const char *name, bool tt) : QLineEdit(parent,name) +timeBox::timeBox(TQWidget *parent, const char *name, bool tt) : TQLineEdit(parent,name) { if (tt) { @@ -39,7 +39,7 @@ timeBox::timeBox(QWidget *parent, const char *name, bool tt) : QLineEdit(parent, timet = tt; } -void timeBox::showTime (QTime t) +void timeBox::showTime (TQTime t) { setEntry( t.toString("hh:mm:ss") ); } @@ -50,26 +50,26 @@ void timeBox::showDate (ExtDate t) } -QTime timeBox::createTime ( bool *ok ) +TQTime timeBox::createTime ( bool *ok ) { -// QString entry; +// TQString entry; int h = 0, m = 0, is = 0; double s = 0.0; - QTime qt; + TQTime qt; bool valueFound = false, badEntry = false , checkValue = false; //Initialize bool for result if ( ok != NULL ) *ok = false; -// QString errMsg = i18n( "Unable to parse %1 entry. Specify a %1 value as a simple integer, a floating-point number, or a triplet of values using colons or spaces as separators." ); +// TQString errMsg = i18n( "Unable to parse %1 entry. Specify a %1 value as a simple integer, a floating-point number, or a triplet of values using colons or spaces as separators." ); - QString entry = text().stripWhiteSpace(); + TQString entry = text().stripWhiteSpace(); //Try simplest cases: integer or double representation h = entry.toInt( &checkValue ); if ( checkValue ) { - qt = QTime( h, 0, 0 ); + qt = TQTime( h, 0, 0 ); valueFound = true; if ( ok != NULL ) *ok = true; return qt; @@ -77,7 +77,7 @@ QTime timeBox::createTime ( bool *ok ) double x = entry.toDouble( &checkValue ); if ( checkValue ) { int seconds = int(x * 3600); - QTime qt(0,0,0); + TQTime qt(0,0,0); qt.addSecs(seconds); valueFound = true; if ( ok != NULL ) *ok = true; @@ -88,12 +88,12 @@ QTime timeBox::createTime ( bool *ok ) //no success yet...try assuming multiple fields if ( !valueFound ) { - QStringList fields; + TQStringList fields; //check for colon-delimiters or space-delimiters if ( entry.contains(':') ) - fields = QStringList::split( ':', entry ); - else fields = QStringList::split( " ", entry ); + fields = TQStringList::split( ':', entry ); + else fields = TQStringList::split( " ", entry ); // If two fields we will add a third one, and then parse with // the 3-field code block. If field[1] is a double, convert @@ -102,10 +102,10 @@ QTime timeBox::createTime ( bool *ok ) if ( fields.count() == 2 ) { double mx = fields[1].toDouble( &checkValue ); if ( checkValue ) { - fields[1] = QString("%1").arg( int(mx) ); - fields.append( QString("%1").arg( int( 60.0*(mx - int(mx)) ) ) ); + fields[1] = TQString("%1").arg( int(mx) ); + fields.append( TQString("%1").arg( int( 60.0*(mx - int(mx)) ) ) ); } else { - fields.append( QString( "0" ) ); + fields.append( TQString( "0" ) ); } } @@ -113,9 +113,9 @@ QTime timeBox::createTime ( bool *ok ) // ignore all after 3rd field if ( fields.count() >= 3 ) { - fields[0].replace( QRegExp("h"), "" ); - fields[1].replace( QRegExp("m"), "" ); - fields[2].replace( QRegExp("s"), "" ); + fields[0].replace( TQRegExp("h"), "" ); + fields[1].replace( TQRegExp("m"), "" ); + fields[2].replace( TQRegExp("s"), "" ); } //See if first two fields parse as integers. // @@ -132,7 +132,7 @@ QTime timeBox::createTime ( bool *ok ) if ( ok != NULL ) *ok = true; - QTime qt(h,m,is); + TQTime qt(h,m,is); return qt; } else { @@ -151,7 +151,7 @@ QTime timeBox::createTime ( bool *ok ) ExtDate timeBox::createDate (bool */*ok*/) { - QString entry = text().stripWhiteSpace(); + TQString entry = text().stripWhiteSpace(); // if entry is an empty string or invalid date use current date diff --git a/kstars/kstars/timebox.h b/kstars/kstars/timebox.h index 2e81385b..cc6b19fa 100644 --- a/kstars/kstars/timebox.h +++ b/kstars/kstars/timebox.h @@ -18,15 +18,15 @@ #ifndef TIMEBOX_H #define TIMEBOX_H -#include <qhbox.h> -#include <qlineedit.h> -#include <qstring.h> +#include <tqhbox.h> +#include <tqlineedit.h> +#include <tqstring.h> class QTime; class ExtDate; /**@class timeBox - * This class creates a QHBox with 3 QLineEdit Fields which will contain + * This class creates a TQHBox with 3 TQLineEdit Fields which will contain * either Time (Hour, Minute, Second) or Date (Day, Month, Year). * * Inherits QHBox @@ -34,7 +34,7 @@ class ExtDate; *@version 1.0 */ -class timeBox : public QLineEdit { +class timeBox : public TQLineEdit { public: /** * Constructor for the timeBox object. @@ -43,28 +43,28 @@ public: * @param tt boolean. true means that the object will hold a Time. * false means that the object will hold a Date. */ - timeBox(QWidget *parent, const char *n, bool tt=TRUE); + timeBox(TQWidget *parent, const char *n, bool tt=TRUE); ~timeBox(); /** - * Fills the QLineEdit fields of the timebox object from a QTime object + * Fills the TQLineEdit fields of the timebox object from a TQTime object * showing hours, minutes and seconds. - * @param t QTime object from which to fill the entry fields + * @param t TQTime object from which to fill the entry fields */ - void showTime(QTime t); + void showTime(TQTime t); /** - * Fills the QLineEdit fields of the timebox object from a QTime object + * Fills the TQLineEdit fields of the timebox object from a TQTime object * showing hours, minutes and seconds. - * @param t QTime object from which to fill the entry fields + * @param t TQTime object from which to fill the entry fields */ void showDate(ExtDate t); /** - * returns a QTime object constructed from the fields of the timebox + * returns a TQTime object constructed from the fields of the timebox */ - QTime createTime(bool *ok=0); + TQTime createTime(bool *ok=0); /** * returns a ExtDate object constructed from the fields of the timebox @@ -75,7 +75,7 @@ public: /** * Fills the degrees entry field with string @p s * */ - void setEntry(QString s) { setText(s); } + void setEntry(TQString s) { setText(s); } /** * returns a boolean. True indicates that the object holds a diff --git a/kstars/kstars/timedialog.cpp b/kstars/kstars/timedialog.cpp index 2f621876..f4d1449f 100644 --- a/kstars/kstars/timedialog.cpp +++ b/kstars/kstars/timedialog.cpp @@ -18,10 +18,10 @@ #include <klocale.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqlayout.h> #include "timedialog.h" #include "kstars.h" @@ -29,49 +29,49 @@ #include "simclock.h" #include "libkdeedu/extdate/extdatepicker.h" -TimeDialog::TimeDialog( const KStarsDateTime &now, QWidget* parent ) +TimeDialog::TimeDialog( const KStarsDateTime &now, TQWidget* parent ) : KDialogBase( KDialogBase::Plain, i18n( "set clock to a new time", "Set Time" ), Ok|Cancel, Ok, parent ) { ksw = (KStars*) parent; - QFrame *page = plainPage(); + TQFrame *page = plainPage(); - vlay = new QVBoxLayout( page, 2, 2 ); - hlay = new QHBoxLayout( 2 ); //this layout will be added to the VLayout + vlay = new TQVBoxLayout( page, 2, 2 ); + hlay = new TQHBoxLayout( 2 ); //this layout will be added to the VLayout dPicker = new ExtDatePicker( page ); dPicker->setDate( now.date() ); - HourBox = new QSpinBox( page, "HourBox" ); - QFont Box_font( HourBox->font() ); + HourBox = new TQSpinBox( page, "HourBox" ); + TQFont Box_font( HourBox->font() ); Box_font.setBold( TRUE ); HourBox->setFont( Box_font ); HourBox->setWrapping( TRUE ); HourBox->setMaxValue( 23 ); - HourBox->setButtonSymbols( QSpinBox::PlusMinus ); + HourBox->setButtonSymbols( TQSpinBox::PlusMinus ); HourBox->setValue( now.time().hour() ); - TextLabel1 = new QLabel( page, "TextLabel1" ); + TextLabel1 = new TQLabel( page, "TextLabel1" ); TextLabel1->setText( " :" ); TextLabel1->setFont( Box_font ); - MinuteBox = new QSpinBox( page, "MinuteBox" ); - QFont MinuteBox_font( MinuteBox->font() ); + MinuteBox = new TQSpinBox( page, "MinuteBox" ); + TQFont MinuteBox_font( MinuteBox->font() ); MinuteBox->setFont( Box_font ); MinuteBox->setWrapping( TRUE ); MinuteBox->setMaxValue( 59 ); - MinuteBox->setButtonSymbols( QSpinBox::PlusMinus ); + MinuteBox->setButtonSymbols( TQSpinBox::PlusMinus ); MinuteBox->setValue( now.time().minute() ); - TextLabel1_2 = new QLabel( page, "TextLabel1_2" ); + TextLabel1_2 = new TQLabel( page, "TextLabel1_2" ); TextLabel1_2->setFont( Box_font ); - SecondBox = new QSpinBox( page, "SecondBox" ); + SecondBox = new TQSpinBox( page, "SecondBox" ); SecondBox->setFont( Box_font ); SecondBox->setMaxValue( 59 ); SecondBox->setWrapping( TRUE ); - SecondBox->setButtonSymbols( QSpinBox::PlusMinus ); + SecondBox->setButtonSymbols( TQSpinBox::PlusMinus ); SecondBox->setValue( now.time().second() ); - NowButton = new QPushButton( page, "NowButton" ); + NowButton = new TQPushButton( page, "NowButton" ); NowButton->setText( i18n( "Now" ) ); NowButton->setFont( Box_font ); @@ -87,18 +87,18 @@ TimeDialog::TimeDialog( const KStarsDateTime &now, QWidget* parent ) vlay->activate(); - QObject::connect( this, SIGNAL( okClicked() ), this, SLOT( accept() )); - QObject::connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() )); - QObject::connect( NowButton, SIGNAL( clicked() ), this, SLOT( setNow() )); - QObject::connect( HourBox, SIGNAL( valueChanged( int ) ), this, SLOT( HourPrefix( int ) )); - QObject::connect( MinuteBox, SIGNAL( valueChanged( int ) ), this, SLOT( MinutePrefix( int ) )); - QObject::connect( SecondBox, SIGNAL( valueChanged( int ) ), this, SLOT( SecondPrefix( int ) )); + TQObject::connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() )); + TQObject::connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() )); + TQObject::connect( NowButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( setNow() )); + TQObject::connect( HourBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( HourPrefix( int ) )); + TQObject::connect( MinuteBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( MinutePrefix( int ) )); + TQObject::connect( SecondBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( SecondPrefix( int ) )); } //Add handler for Escape key to close window //Use keyReleaseEvent because keyPressEvents are already consumed //by the ExtDatePicker. -void TimeDialog::keyReleaseEvent( QKeyEvent *kev ) { +void TimeDialog::keyReleaseEvent( TQKeyEvent *kev ) { switch( kev->key() ) { case Key_Escape: { @@ -115,7 +115,7 @@ void TimeDialog::setNow( void ) KStarsDateTime dt( KStarsDateTime::currentDateTime() ); dPicker->setDate( dt.date() ); - QTime t = dt.time(); + TQTime t = dt.time(); HourBox->setValue( t.hour() ); MinuteBox->setValue( t.minute() ); @@ -137,8 +137,8 @@ void TimeDialog::SecondPrefix( int value ) { if ( value < 10 ) SecondBox->setPrefix( "0" ); } -QTime TimeDialog::selectedTime( void ) { - QTime t( HourBox->value(), MinuteBox->value(), SecondBox->value() ); +TQTime TimeDialog::selectedTime( void ) { + TQTime t( HourBox->value(), MinuteBox->value(), SecondBox->value() ); return t; } diff --git a/kstars/kstars/timedialog.h b/kstars/kstars/timedialog.h index cc8a05ac..d7e94f36 100644 --- a/kstars/kstars/timedialog.h +++ b/kstars/kstars/timedialog.h @@ -19,7 +19,7 @@ #define TIMEDIALOG_H #include <kdialogbase.h> -#include <qvariant.h> +#include <tqvariant.h> #include "kstarsdatetime.h" @@ -48,16 +48,16 @@ public: *Constructor. Creates widgets and packs them into QLayouts. *Connects Signals and Slots. */ - TimeDialog( const KStarsDateTime &now, QWidget* parent = 0 ); + TimeDialog( const KStarsDateTime &now, TQWidget* parent = 0 ); /** *Destructor (empty) */ ~TimeDialog() {} -/**@returns a QTime object with the selected time +/**@returns a TQTime object with the selected time */ - QTime selectedTime( void ); + TQTime selectedTime( void ); /**@returns a ExtDate object with the selected date */ @@ -69,7 +69,7 @@ public: public slots: /** - *When the "Now" QPushButton is pressed, read the time and date + *When the "Now" TQPushButton is pressed, read the time and date *from the system clock. Change the selected date in the ExtDatePicker *to the system's date, and the displayed Hour, Minute and Second *to the system time. @@ -77,7 +77,7 @@ public slots: void setNow( void ); /** - *When the value of the HourBox QSpinBox is changed, prefix a "0" to + *When the value of the HourBox TQSpinBox is changed, prefix a "0" to *the displayed text, if the value is less than 10. * *It would be nice if I could use one slot for these three widgets; @@ -87,32 +87,32 @@ public slots: void HourPrefix( int value ); /** - *When the value of the MinuteBox QSpinBox is changed, prefix a "0" to + *When the value of the MinuteBox TQSpinBox is changed, prefix a "0" to *the displayed text, if the value is less than 10. */ void MinutePrefix( int value ); /** - *When the value of the SecondBox QSpinBox is changed, prefix a "0" to + *When the value of the SecondBox TQSpinBox is changed, prefix a "0" to *the displayed text, if the value is less than 10. */ void SecondPrefix( int value ); protected: - void keyReleaseEvent( QKeyEvent* ); + void keyReleaseEvent( TQKeyEvent* ); private: KStars *ksw; bool UTCNow; - QHBoxLayout *hlay; - QVBoxLayout *vlay; + TQHBoxLayout *hlay; + TQVBoxLayout *vlay; ExtDatePicker *dPicker; - QSpinBox* HourBox; - QLabel* TextLabel1; - QSpinBox* MinuteBox; - QLabel* TextLabel1_2; - QSpinBox* SecondBox; - QPushButton* NowButton; + TQSpinBox* HourBox; + TQLabel* TextLabel1; + TQSpinBox* MinuteBox; + TQLabel* TextLabel1_2; + TQSpinBox* SecondBox; + TQPushButton* NowButton; }; #endif diff --git a/kstars/kstars/timespinbox.cpp b/kstars/kstars/timespinbox.cpp index dcf721f5..72549f9b 100644 --- a/kstars/kstars/timespinbox.cpp +++ b/kstars/kstars/timespinbox.cpp @@ -24,8 +24,8 @@ //27-32: 1 month, 2, 3, 4, 6, 9 months //33-41: 1 year, 2, 3, 4, 5, 10, 25, 50, 100 years -#include <qlineedit.h> -#include <qfontmetrics.h> +#include <tqlineedit.h> +#include <tqfontmetrics.h> #include <kdebug.h> #include <klocale.h> #include <stdlib.h> @@ -37,17 +37,17 @@ #define SIDEREAL_YEAR 31558149.77 #define TROPICAL_YEAR 31556925.19 -TimeSpinBox::TimeSpinBox( QWidget *parent, const char *name, bool _daysonly ) - : QSpinBox ( -41, 41, 1 /* step */, parent, name ) +TimeSpinBox::TimeSpinBox( TQWidget *parent, const char *name, bool _daysonly ) + : TQSpinBox ( -41, 41, 1 /* step */, parent, name ) { setValidator( 0 ); - setButtonSymbols( QSpinBox::PlusMinus ); + setButtonSymbols( TQSpinBox::PlusMinus ); editor()->setReadOnly( true ); setValue( 4 ); //1 second (real time) setDaysOnly( _daysonly ); //Set width: - QFontMetrics fm( font() ); + TQFontMetrics fm( font() ); int extra = width() - editor()->width(); uint wmax = 0; for ( int i=0; i < maxValue(); ++i ) { @@ -56,7 +56,7 @@ TimeSpinBox::TimeSpinBox( QWidget *parent, const char *name, bool _daysonly ) } setFixedWidth( wmax + extra ); - connect( this, SIGNAL( valueChanged( int ) ), this, SLOT( reportChange() ) ); + connect( this, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( reportChange() ) ); updateDisplay(); } @@ -176,8 +176,8 @@ int TimeSpinBox::mapTextToValue( bool *ok ) { return 0; } -QString TimeSpinBox::mapValueToText( int value ) { - QString neg("-"), result; +TQString TimeSpinBox::mapValueToText( int value ) { + TQString neg("-"), result; int posval( abs( value ) ); result = TimeString[ posval ]; diff --git a/kstars/kstars/timespinbox.h b/kstars/kstars/timespinbox.h index 3b52eba3..16c23fb5 100644 --- a/kstars/kstars/timespinbox.h +++ b/kstars/kstars/timespinbox.h @@ -18,8 +18,8 @@ #ifndef TIMESPINBOX_H #define TIMESPINBOX_H -#include <qspinbox.h> -#include <qstringlist.h> +#include <tqspinbox.h> +#include <tqstringlist.h> /**@class TimeSpinBox *Custom spinbox to handle selection of timestep values with variable units. @@ -28,11 +28,11 @@ *@version 1.0 */ -class TimeSpinBox : public QSpinBox { +class TimeSpinBox : public TQSpinBox { Q_OBJECT public: /**Constructor */ - TimeSpinBox( QWidget *parent, const char* name=0, bool daysOnly = false ); + TimeSpinBox( TQWidget *parent, const char* name=0, bool daysOnly = false ); /**Destructor (empty)*/ ~TimeSpinBox() {} @@ -41,7 +41,7 @@ public: *@p value the internal value to convert to a display string *@return the display string */ - virtual QString mapValueToText( int value ); + virtual TQString mapValueToText( int value ); /**Convert the displayed string to an internal value. *@note reimplemented from QSpinBox @@ -68,7 +68,7 @@ protected slots: private: bool DaysOnly; float TimeScale[42]; - QStringList TimeString; + TQStringList TimeString; }; #endif diff --git a/kstars/kstars/timestepbox.cpp b/kstars/kstars/timestepbox.cpp index c5bef036..6b661592 100644 --- a/kstars/kstars/timestepbox.cpp +++ b/kstars/kstars/timestepbox.cpp @@ -16,35 +16,35 @@ ***************************************************************************/ #include <stdlib.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <klocale.h> #include "timestepbox.h" -TimeStepBox::TimeStepBox( QWidget *parent, const char* name, bool daysonly ) - : QFrame( parent, name ) { +TimeStepBox::TimeStepBox( TQWidget *parent, const char* name, bool daysonly ) + : TQFrame( parent, name ) { timeBox = new TimeSpinBox( this, "timebox", daysonly ); unitBox = new TimeUnitBox( this, "unitbox", daysonly ); - QToolTip::add( timeBox, i18n( "Adjust time step" ) ); - QToolTip::add( unitBox, i18n( "Adjust time step units" ) ); + TQToolTip::add( timeBox, i18n( "Adjust time step" ) ); + TQToolTip::add( unitBox, i18n( "Adjust time step units" ) ); - QWhatsThis::add( this, i18n( "Set the timescale for the simulation clock. A setting of \"1 sec\" means the clock advances in real-time, keeping up perfectly with your CPU clock. Higher values make the simulation clock run faster, lower values make it run slower. Negative values make it run backwards." + TQWhatsThis::add( this, i18n( "Set the timescale for the simulation clock. A setting of \"1 sec\" means the clock advances in real-time, keeping up perfectly with your CPU clock. Higher values make the simulation clock run faster, lower values make it run slower. Negative values make it run backwards." "\n\n" "There are two pairs of up/down buttons. The left pair will cycle through all available timesteps in sequence. Since there are a large number of timesteps, the right pair is provided to skip to the next higher/lower unit of time. For example, if the timescale is currently \"1 min\", the right up button will make it \"1 hour\", and the right down button will make it \"1 sec\"" ) ); - hlay = new QHBoxLayout( this, 2, 0 ); + hlay = new TQHBoxLayout( this, 2, 0 ); hlay->addWidget( timeBox ); hlay->addWidget( unitBox ); hlay->activate(); timeBox->setValue( 4 ); //real-time - connect( unitBox, SIGNAL( valueChanged( int ) ), this, SLOT( changeUnits() ) ); - connect( timeBox, SIGNAL( valueChanged( int ) ), this, SLOT( syncUnits( int ) ) ); - connect( timeBox, SIGNAL( scaleChanged( float ) ), this, SIGNAL( scaleChanged( float ) ) ); + connect( unitBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( changeUnits() ) ); + connect( timeBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( syncUnits( int ) ) ); + connect( timeBox, TQT_SIGNAL( scaleChanged( float ) ), this, TQT_SIGNAL( scaleChanged( float ) ) ); } @@ -58,9 +58,9 @@ void TimeStepBox::syncUnits( int tstep ) { if ( abs(tstep) >= unitBox->getUnitValue( i ) ) break; //don't want setValue to trigger changeUnits()... - disconnect( unitBox, SIGNAL( valueChanged( int ) ), this, SLOT( changeUnits() ) ); + disconnect( unitBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( changeUnits() ) ); unitBox->setValue( tstep < 0 ? -i : i ); - connect( unitBox, SIGNAL( valueChanged( int ) ), this, SLOT( changeUnits() ) ); + connect( unitBox, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( changeUnits() ) ); } void TimeStepBox::setDaysOnly( bool daysonly ) { diff --git a/kstars/kstars/timestepbox.h b/kstars/kstars/timestepbox.h index 73d9160f..c1bc8fc2 100644 --- a/kstars/kstars/timestepbox.h +++ b/kstars/kstars/timestepbox.h @@ -18,13 +18,13 @@ #ifndef TIMESTEPBOX_H #define TIMESTEPBOX_H -#include <qframe.h> -#include <qlayout.h> +#include <tqframe.h> +#include <tqlayout.h> #include "timespinbox.h" #include "timeunitbox.h" /**@class TimeStepBox - *This composite widget consists of a TimeSpinBox (a QSpinBox), coupled with a + *This composite widget consists of a TimeSpinBox (a TQSpinBox), coupled with a *TimeUnitBox (a second pair of up/down buttons). *The second set of buttons makes larger steps through the 82 possible *time-step values, skipping to the next even unit of time. @@ -33,11 +33,11 @@ *@version 1.0 */ -class TimeStepBox : public QFrame { +class TimeStepBox : public TQFrame { Q_OBJECT public: /**Constructor. */ - TimeStepBox( QWidget *parent=0, const char* name=0, bool daysonly=false ); + TimeStepBox( TQWidget *parent=0, const char* name=0, bool daysonly=false ); /**Destructor. (empty)*/ ~TimeStepBox() {} @@ -63,7 +63,7 @@ private slots: void syncUnits( int ); private: bool DaysOnly; - QHBoxLayout *hlay; + TQHBoxLayout *hlay; TimeSpinBox *timeBox; TimeUnitBox *unitBox; }; diff --git a/kstars/kstars/timeunitbox.cpp b/kstars/kstars/timeunitbox.cpp index 27538320..0b89f057 100644 --- a/kstars/kstars/timeunitbox.cpp +++ b/kstars/kstars/timeunitbox.cpp @@ -19,23 +19,23 @@ #include <kdebug.h> #include "timeunitbox.h" #include "timeunitbox.moc" -#include <qpushbutton.h> +#include <tqpushbutton.h> -TimeUnitBox::TimeUnitBox(QWidget *parent, const char *name, bool daysonly ) - : QVBox( parent, name ) { +TimeUnitBox::TimeUnitBox(TQWidget *parent, const char *name, bool daysonly ) + : TQVBox( parent, name ) { - UpButton = new QPushButton( "+", this ); + UpButton = new TQPushButton( "+", this ); UpButton->setMaximumWidth( 22 ); UpButton->setMaximumHeight( 10 ); - DownButton = new QPushButton( "-", this ); + DownButton = new TQPushButton( "-", this ); DownButton->setMaximumWidth( 22 ); DownButton->setMaximumHeight( 10 ); setDaysOnly( daysonly ); - connect( UpButton, SIGNAL( clicked() ), this, SLOT( increase() ) ); - connect( DownButton, SIGNAL( clicked() ), this, SLOT( decrease() ) ); + connect( UpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( increase() ) ); + connect( DownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( decrease() ) ); } TimeUnitBox::~TimeUnitBox(){ diff --git a/kstars/kstars/timeunitbox.h b/kstars/kstars/timeunitbox.h index c38894c2..a245c55b 100644 --- a/kstars/kstars/timeunitbox.h +++ b/kstars/kstars/timeunitbox.h @@ -18,8 +18,8 @@ #ifndef TIMEUNITBOX_H #define TIMEUNITBOX_H -#include <qvbox.h> -#include <qwidget.h> +#include <tqvbox.h> +#include <tqwidget.h> #define ALLUNITS 8 #define DAYUNITS 5 @@ -43,11 +43,11 @@ class QPushButton; -class TimeUnitBox : public QVBox { +class TimeUnitBox : public TQVBox { Q_OBJECT public: /**Constructor*/ - TimeUnitBox(QWidget *parent=0, const char *name=0, bool daysonly = false); + TimeUnitBox(TQWidget *parent=0, const char *name=0, bool daysonly = false); /**Destructor (empty)*/ ~TimeUnitBox(); /**@return the value of UnitStep for the current spinbox value() */ @@ -96,7 +96,7 @@ private slots: private: bool DaysOnly; - QPushButton *UpButton, *DownButton; + TQPushButton *UpButton, *DownButton; int MinimumValue, MaximumValue, Value, UnitStep[ ALLUNITS ]; }; diff --git a/kstars/kstars/timezonerule.cpp b/kstars/kstars/timezonerule.cpp index 20ac8c45..0a711f57 100644 --- a/kstars/kstars/timezonerule.cpp +++ b/kstars/kstars/timezonerule.cpp @@ -29,14 +29,14 @@ TimeZoneRule::TimeZoneRule() { RevertDay = 0; StartWeek = -1; RevertWeek = -1; - StartTime = QTime(); - RevertTime = QTime(); + StartTime = TQTime(); + RevertTime = TQTime(); HourOffset = 0.0; dTZ = 0.0; } -TimeZoneRule::TimeZoneRule( const QString &smonth, const QString &sday, const QTime &stime, - const QString &rmonth, const QString &rday, const QTime &rtime, const double &dh ) { +TimeZoneRule::TimeZoneRule( const TQString &smonth, const TQString &sday, const TQTime &stime, + const TQString &rmonth, const TQString &rday, const TQTime &rtime, const double &dh ) { dTZ = 0.0; if ( smonth != "0" ) { StartMonth = initMonth( smonth ); @@ -55,8 +55,8 @@ TimeZoneRule::TimeZoneRule( const QString &smonth, const QString &sday, const QT RevertDay = 0; StartWeek = -1; RevertWeek = -1; - StartTime = QTime(); - RevertTime = QTime(); + StartTime = TQTime(); + RevertTime = TQTime(); HourOffset = 0.0; } } else { //Empty rule @@ -66,8 +66,8 @@ TimeZoneRule::TimeZoneRule( const QString &smonth, const QString &sday, const QT RevertDay = 0; StartWeek = -1; RevertWeek = -1; - StartTime = QTime(); - RevertTime = QTime(); + StartTime = TQTime(); + RevertTime = TQTime(); HourOffset = 0.0; } } @@ -85,9 +85,9 @@ void TimeZoneRule::setDST( bool activate ) { } } -int TimeZoneRule::initMonth( const QString &mn ) { +int TimeZoneRule::initMonth( const TQString &mn ) { //Check whether the argument is a three-letter English month code. - QString ml = mn.lower(); + TQString ml = mn.lower(); if ( ml == "jan" ) return 1; else if ( ml == "feb" ) return 2; else if ( ml == "mar" ) return 3; @@ -105,7 +105,7 @@ int TimeZoneRule::initMonth( const QString &mn ) { return false; } -bool TimeZoneRule::initDay( const QString &dy, int &Day, int &Week ) { +bool TimeZoneRule::initDay( const TQString &dy, int &Day, int &Week ) { //Three possible ways to express a day. //1. simple integer; the calendar date...set Week=0 to indicate that Date is not the day of the week bool ok; @@ -116,7 +116,7 @@ bool TimeZoneRule::initDay( const QString &dy, int &Day, int &Week ) { return true; } - QString dl = dy.lower(); + TQString dl = dy.lower(); //2. 3-letter day of week string, indicating the last of that day of the month // ...set Week to 5 to indicate the last weekday of the month if ( dl == "mon" ) { Day = 1; Week = 5; return true; } @@ -131,7 +131,7 @@ bool TimeZoneRule::initDay( const QString &dy, int &Day, int &Week ) { // the (1st/2nd/3rd) weekday of the month. int wn = dl.left(1).toInt(); if ( wn >0 && wn <4 ) { - QString dm = dl.mid( 1, dl.length() ).lower(); + TQString dm = dl.mid( 1, dl.length() ).lower(); if ( dm == "mon" ) { Day = 1; Week = wn; return true; } else if ( dm == "tue" ) { Day = 2; Week = wn; return true; } else if ( dm == "wed" ) { Day = 3; Week = wn; return true; } diff --git a/kstars/kstars/timezonerule.h b/kstars/kstars/timezonerule.h index c24f7243..75ae5d2d 100644 --- a/kstars/kstars/timezonerule.h +++ b/kstars/kstars/timezonerule.h @@ -29,7 +29,7 @@ *on startup; each line in the file creates a TimeZoneRule object. * *TimeZoneRule consists of QStrings identifying the months and days on which - *DST starts and ends, QTime objects identifying the time at which the + *DST starts and ends, TQTime objects identifying the time at which the *changes occur, and a double indicating the size of the offset in hours *(probably always 1.00). * @@ -50,7 +50,7 @@ *@version 1.0 */ -#include <qstring.h> +#include <tqstring.h> #include "kstarsdatetime.h" class TimeZoneRule { @@ -67,8 +67,8 @@ public: *@p rtime the time at which DST reverts *@p offset the offset between normal time and DS time (always 1.00?) */ - TimeZoneRule( const QString &smonth, const QString &sday, const QTime &stime, - const QString &rmonth, const QString &rday, const QTime &rtime, const double &offset=1.00 ); + TimeZoneRule( const TQString &smonth, const TQString &sday, const TQTime &stime, + const TQString &rmonth, const TQString &rday, const TQTime &rtime, const double &offset=1.00 ); /**Destructor. (empty)*/ ~TimeZoneRule(); @@ -137,7 +137,7 @@ private: /**Interpret the string as a month of the year; *@return the month integer (1=jan ... 12=dec) */ - int initMonth( const QString &m ); + int initMonth( const TQString &m ); /**Interpret the day string as a week ID and a day-of-week ID. The day-of-week *is an integer between 1 (sunday) and 7 (saturday); the week integer can @@ -146,7 +146,7 @@ private: *@p week the week integer is returned by reference through this value *@return TRUE if the day string was successfully parsed */ - bool initDay( const QString &d, int &day, int &week ); + bool initDay( const TQString &d, int &day, int &week ); /**Find the calendar date on which DST starts for the calendar year *of the given KStarsDateTime. @@ -162,7 +162,7 @@ private: int StartDay, RevertDay; int StartWeek, RevertWeek; - QTime StartTime, RevertTime; + TQTime StartTime, RevertTime; KStarsDateTime next_change_utc, next_change_ltime; double dTZ, HourOffset; diff --git a/kstars/kstars/toggleaction.cpp b/kstars/kstars/toggleaction.cpp index 3c1b2adc..a0b59a64 100644 --- a/kstars/kstars/toggleaction.cpp +++ b/kstars/kstars/toggleaction.cpp @@ -17,9 +17,9 @@ #include "toggleaction.h" -ToggleAction::ToggleAction(const QString& ontext, const QIconSet& onpix, - const QString& offtext, const QIconSet& offpix, - int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) : +ToggleAction::ToggleAction(const TQString& ontext, const TQIconSet& onpix, + const TQString& offtext, const TQIconSet& offpix, + int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(ontext, onpix, accel, receiver, slot, parent, name), officon(offpix), onicon(onpix), @@ -28,8 +28,8 @@ ToggleAction::ToggleAction(const QString& ontext, const QIconSet& onpix, state(true) {} -ToggleAction::ToggleAction(const QString& ontext, const QString& offtext, - int accel, const QObject* receiver, const char* slot, QObject* parent, const char* name ) : +ToggleAction::ToggleAction(const TQString& ontext, const TQString& offtext, + int accel, const TQObject* receiver, const char* slot, TQObject* parent, const char* name ) : KAction(ontext, accel, receiver, slot, parent, name), officon(), onicon(), @@ -52,13 +52,13 @@ void ToggleAction::turnOn() { state = true; } -void ToggleAction::setOnToolTip(QString tip) { +void ToggleAction::setOnToolTip(TQString tip) { onTip = tip; if (state) setToolTip(tip); } -void ToggleAction::setOffToolTip(QString tip) { +void ToggleAction::setOffToolTip(TQString tip) { offTip = tip; if (!state) setToolTip(tip); diff --git a/kstars/kstars/toggleaction.h b/kstars/kstars/toggleaction.h index b195a78d..5eef8d04 100644 --- a/kstars/kstars/toggleaction.h +++ b/kstars/kstars/toggleaction.h @@ -26,7 +26,7 @@ *@version 1.0 */ -#include <qiconset.h> +#include <tqiconset.h> #include <kaction.h> class ToggleAction : public KAction { @@ -34,19 +34,19 @@ class ToggleAction : public KAction { public: /**Constructor. */ - ToggleAction(const QString& ontext, const QIconSet& onpix, const QString& offtext, const QIconSet& offpix, int accel, const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0 ) ; + ToggleAction(const TQString& ontext, const TQIconSet& onpix, const TQString& offtext, const TQIconSet& offpix, int accel, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ) ; /**Constructor. Same as above, but without icons. */ - ToggleAction(const QString& ontext, const QString& offtext, int accel, const QObject* receiver, const char* slot, QObject* parent = 0, const char* name = 0 ) ; + ToggleAction(const TQString& ontext, const TQString& offtext, int accel, const TQObject* receiver, const char* slot, TQObject* parent = 0, const char* name = 0 ) ; /**Sets the ToolTip text for the "on" state. *@p tip the tooltip string */ - void setOnToolTip(QString tip); + void setOnToolTip(TQString tip); /**Sets the ToolTip text for the "off" state. *@p tip the tooltip string */ - void setOffToolTip(QString tip); + void setOffToolTip(TQString tip); public slots: /**Put the Action in the "off" state. Update the icon and tooltip. */ @@ -55,12 +55,12 @@ class ToggleAction : public KAction { void turnOn(); private: - QIconSet officon; - QIconSet onicon; - QString offcap; - QString oncap; - QString onTip; - QString offTip; + TQIconSet officon; + TQIconSet onicon; + TQString offcap; + TQString oncap; + TQString onTip; + TQString offTip; bool state; }; diff --git a/kstars/kstars/tools/altvstime.cpp b/kstars/kstars/tools/altvstime.cpp index 1ce505ff..458b467f 100644 --- a/kstars/kstars/tools/altvstime.cpp +++ b/kstars/kstars/tools/altvstime.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qpainter.h> +#include <tqlayout.h> +#include <tqpainter.h> #include <klocale.h> #include <klineedit.h> #include <klistbox.h> @@ -41,19 +41,19 @@ #include "kstarsdatetime.h" #include "libkdeedu/extdate/extdatetimeedit.h" -AltVsTime::AltVsTime( QWidget* parent) : +AltVsTime::AltVsTime( TQWidget* parent) : KDialogBase( KDialogBase::Plain, i18n( "Altitude vs. Time" ), Close, Close, parent ) { ks = (KStars*) parent; - QFrame *page = plainPage(); + TQFrame *page = plainPage(); setMainWidget(page); - topLayout = new QVBoxLayout( page, 0, spacingHint() ); + topLayout = new TQVBoxLayout( page, 0, spacingHint() ); View = new AVTPlotWidget( -12.0, 12.0, -90.0, 90.0, page ); View->setMinimumSize( 400, 400 ); - View->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); + View->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ); View->setXAxisType( KStarsPlotWidget::TIME ); View->setYAxisType( KStarsPlotWidget::ANGLE ); View->setShowGrid( false ); @@ -87,18 +87,18 @@ AltVsTime::AltVsTime( QWidget* parent) : setLSTLimits(); View->updateTickmarks(); - connect( avtUI->browseButton, SIGNAL( clicked() ), this, SLOT( slotBrowseObject() ) ); - connect( avtUI->cityButton, SIGNAL( clicked() ), this, SLOT( slotChooseCity() ) ); - connect( avtUI->updateButton, SIGNAL( clicked() ), this, SLOT( slotUpdateDateLoc() ) ); - connect( avtUI->clearButton, SIGNAL( clicked() ), this, SLOT( slotClear() ) ); - connect( avtUI->addButton, SIGNAL( clicked() ), this, SLOT( slotAddSource() ) ); - connect( avtUI->nameBox, SIGNAL( returnPressed() ), this, SLOT( slotAddSource() ) ); - connect( avtUI->raBox, SIGNAL( returnPressed() ), this, SLOT( slotAddSource() ) ); - connect( avtUI->decBox, SIGNAL( returnPressed() ), this, SLOT( slotAddSource() ) ); - connect( avtUI->clearFieldsButton, SIGNAL( clicked() ), this, SLOT( slotClearBoxes() ) ); - connect( avtUI->longBox, SIGNAL( returnPressed() ), this, SLOT( slotAdvanceFocus() ) ); - connect( avtUI->latBox, SIGNAL( returnPressed() ), this, SLOT( slotAdvanceFocus() ) ); - connect( avtUI->PlotList, SIGNAL( highlighted(int) ), this, SLOT( slotHighlight() ) ); + connect( avtUI->browseButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseObject() ) ); + connect( avtUI->cityButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChooseCity() ) ); + connect( avtUI->updateButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpdateDateLoc() ) ); + connect( avtUI->clearButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClear() ) ); + connect( avtUI->addButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddSource() ) ); + connect( avtUI->nameBox, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotAddSource() ) ); + connect( avtUI->raBox, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotAddSource() ) ); + connect( avtUI->decBox, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotAddSource() ) ); + connect( avtUI->clearFieldsButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotClearBoxes() ) ); + connect( avtUI->longBox, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotAdvanceFocus() ) ); + connect( avtUI->latBox, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotAdvanceFocus() ) ); + connect( avtUI->PlotList, TQT_SIGNAL( highlighted(int) ), this, TQT_SLOT( slotHighlight() ) ); pList.setAutoDelete(FALSE); deleteList.setAutoDelete(TRUE); //needed for skypoints which may be created in this class @@ -122,7 +122,7 @@ void AltVsTime::slotAddSource(void) { //First, attempt to find the object name in the list of known objects if ( ! avtUI->nameBox->text().isEmpty() ) { ObjectNameList &ObjNames = ks->data()->ObjNames; - QString text = avtUI->nameBox->text().lower(); + TQString text = avtUI->nameBox->text().lower(); for( SkyObjectName *name = ObjNames.first( text ); name; name = ObjNames.next() ) { if ( name->text().lower() == text ) { @@ -181,13 +181,13 @@ void AltVsTime::slotAddSource(void) { //If the Ra and Dec boxes are filled, but the name field is empty, //move input focus to nameBox` } else if ( avtUI->nameBox->text().isEmpty() && ! avtUI->raBox->text().isEmpty() && ! avtUI->decBox->text().isEmpty() ) { - avtUI->nameBox->QWidget::setFocus(); + avtUI->nameBox->TQWidget::setFocus(); //nameBox is empty, and one of the ra or dec fields is empty. Move input focus to empty coord box } else if ( avtUI->raBox->text().isEmpty() ) { - avtUI->raBox->QWidget::setFocus(); + avtUI->raBox->TQWidget::setFocus(); } else if ( avtUI->decBox->text().isEmpty() ) { - avtUI->decBox->QWidget::setFocus(); + avtUI->decBox->TQWidget::setFocus(); } View->repaint(false); @@ -196,7 +196,7 @@ void AltVsTime::slotAddSource(void) { //Use find dialog to choose an object void AltVsTime::slotBrowseObject(void) { FindDialog fd(ks); - if ( fd.exec() == QDialog::Accepted ) { + if ( fd.exec() == TQDialog::Accepted ) { SkyObject *o = fd.currentItem()->objName()->skyObject(); processObject( o ); } @@ -252,7 +252,7 @@ void AltVsTime::processObject( SkyObject *o, bool forceAdd ) { avtUI->nameBox->setText(o->translatedName() ); //Set epochName to epoch shown in date tab - avtUI->epochName->setText( QString().setNum( getDate().epoch() ) ); + avtUI->epochName->setText( TQString().setNum( getDate().epoch() ) ); } kdDebug() << "Currently, there are " << View->objectCount() << " objects displayed." << endl; @@ -307,11 +307,11 @@ void AltVsTime::slotHighlight(void) { //move input focus to the next logical widget void AltVsTime::slotAdvanceFocus(void) { - if ( sender()->name() == QString( "nameBox" ) ) avtUI->addButton->setFocus(); - if ( sender()->name() == QString( "raBox" ) ) avtUI->decBox->setFocus(); - if ( sender()->name() == QString( "decbox" ) ) avtUI->addButton->setFocus(); - if ( sender()->name() == QString( "longBox" ) ) avtUI->latBox->setFocus(); - if ( sender()->name() == QString( "latBox" ) ) avtUI->updateButton->setFocus(); + if ( sender()->name() == TQString( "nameBox" ) ) avtUI->addButton->setFocus(); + if ( sender()->name() == TQString( "raBox" ) ) avtUI->decBox->setFocus(); + if ( sender()->name() == TQString( "decbox" ) ) avtUI->addButton->setFocus(); + if ( sender()->name() == TQString( "longBox" ) ) avtUI->latBox->setFocus(); + if ( sender()->name() == TQString( "latBox" ) ) avtUI->updateButton->setFocus(); } void AltVsTime::slotClear(void) { @@ -339,8 +339,8 @@ void AltVsTime::computeSunRiseSetTimes() { KStarsDateTime today = getDate(); SkyObject *oSun = (SkyObject*) ks->data()->PCat->planetSun(); - double sunRise = -1.0 * oSun->riseSetTime( today.djd() + 1.0, geo, true ).secsTo(QTime()) / 86400.0; - double sunSet = -1.0 * oSun->riseSetTime( today.djd(), geo, false ).secsTo(QTime()) / 86400.0; + double sunRise = -1.0 * oSun->riseSetTime( today.djd() + 1.0, geo, true ).secsTo(TQTime()) / 86400.0; + double sunSet = -1.0 * oSun->riseSetTime( today.djd(), geo, false ).secsTo(TQTime()) / 86400.0; //check to see if Sun is circumpolar //requires temporary repositioning of Sun to target date @@ -381,7 +381,7 @@ void AltVsTime::slotUpdateDateLoc(void) { computeSunRiseSetTimes(); for ( unsigned int i = 0; i < avtUI->PlotList->count(); ++i ) { - QString oName = avtUI->PlotList->text( i ).lower(); + TQString oName = avtUI->PlotList->text( i ).lower(); ObjectNameList &ObjNames = ks->data()->ObjNames; bool objFound(false); @@ -444,7 +444,7 @@ void AltVsTime::slotUpdateDateLoc(void) { void AltVsTime::slotChooseCity(void) { LocationDialog ld(ks); - if ( ld.exec() == QDialog::Accepted ) { + if ( ld.exec() == TQDialog::Accepted ) { GeoLocation *newGeo = ld.selectedCity(); if ( newGeo ) { geo = newGeo; @@ -469,19 +469,19 @@ void AltVsTime::setLSTLimits(void) { void AltVsTime::showCurrentDate (void) { KStarsDateTime dt = KStarsDateTime::currentDateTime(); - if ( dt.time() > QTime( 12, 0, 0 ) ) dt = dt.addDays( 1 ); + if ( dt.time() > TQTime( 12, 0, 0 ) ) dt = dt.addDays( 1 ); avtUI->dateBox->setDate( dt.date() ); } KStarsDateTime AltVsTime::getDate (void) { //convert midnight local time to UT: - KStarsDateTime dt( avtUI->dateBox->date(), QTime() ); + KStarsDateTime dt( avtUI->dateBox->date(), TQTime() ); dt = geo->LTtoUT( dt ); return dt; } -double AltVsTime::getEpoch (QString eName) +double AltVsTime::getEpoch (TQString eName) { //If Epoch field not a double, assume J2000 bool ok(false); @@ -495,7 +495,7 @@ double AltVsTime::getEpoch (QString eName) return epoch; } -AVTPlotWidget::AVTPlotWidget( double x1, double x2, double y1, double y2, QWidget *parent, const char* name ) +AVTPlotWidget::AVTPlotWidget( double x1, double x2, double y1, double y2, TQWidget *parent, const char* name ) : KStarsPlotWidget( x1, x2, y1, y2, parent, name ) { //Default SunRise/SunSet values @@ -503,12 +503,12 @@ AVTPlotWidget::AVTPlotWidget( double x1, double x2, double y1, double y2, QWidge SunSet = 0.75; } -void AVTPlotWidget::mousePressEvent( QMouseEvent *e ) { +void AVTPlotWidget::mousePressEvent( TQMouseEvent *e ) { mouseMoveEvent( e ); } -void AVTPlotWidget::mouseMoveEvent( QMouseEvent *e ) { - QRect checkRect( leftPadding(), topPadding(), PixRect.width(), PixRect.height() ); +void AVTPlotWidget::mouseMoveEvent( TQMouseEvent *e ) { + TQRect checkRect( leftPadding(), topPadding(), PixRect.width(), PixRect.height() ); int Xcursor = e->x(); int Ycursor = e->y(); @@ -522,19 +522,19 @@ void AVTPlotWidget::mouseMoveEvent( QMouseEvent *e ) { Xcursor -= leftPadding(); Ycursor -= topPadding(); - QPixmap buffer2( *buffer ); - QPainter p; + TQPixmap buffer2( *buffer ); + TQPainter p; p.begin( &buffer2 ); p.translate( leftPadding(), topPadding() ); - p.setPen( QPen( "grey", 1, SolidLine ) ); + p.setPen( TQPen( "grey", 1, SolidLine ) ); p.drawLine( Xcursor, 0, Xcursor, PixRect.height() ); p.drawLine( 0, Ycursor, PixRect.width(), Ycursor ); p.end(); bitBlt( this, 0, 0, &buffer2 ); } -void AVTPlotWidget::paintEvent( QPaintEvent */*e*/ ) { - QPainter p; +void AVTPlotWidget::paintEvent( TQPaintEvent */*e*/ ) { + TQPainter p; p.begin( buffer ); p.fillRect( 0, 0, width(), height(), bgColor() ); @@ -549,18 +549,18 @@ void AVTPlotWidget::paintEvent( QPaintEvent */*e*/ ) { if ( SunSet != -1.0 ) { //If Sun does not set, then just fill the daytime sky color if ( SunSet == 1.0 ) { - p.fillRect( 0, 0, pW, int(0.5*pH), QColor( 0, 100, 200 ) ); + p.fillRect( 0, 0, pW, int(0.5*pH), TQColor( 0, 100, 200 ) ); } else { //Display centered on midnight, so need to modulate dawn/dusk by 0.5 int dawn = int(pW*(0.5 + SunRise)); int dusk = int(pW*(SunSet - 0.5)); - p.fillRect( 0, 0, dusk, int(0.5*pH), QColor( 0, 100, 200 ) ); - p.fillRect( dawn, 0, pW - dawn, int(0.5*pH), QColor( 0, 100, 200 ) ); + p.fillRect( 0, 0, dusk, int(0.5*pH), TQColor( 0, 100, 200 ) ); + p.fillRect( dawn, 0, pW - dawn, int(0.5*pH), TQColor( 0, 100, 200 ) ); //draw twilight gradients unsigned short int W = 40; for ( unsigned short int i=0; i<W; ++i ) { - p.setPen( QColor( 0, int(100*i/W), 200*i/W ) ); + p.setPen( TQColor( 0, int(100*i/W), 200*i/W ) ); p.drawLine( dusk - (i-20), 0, dusk - (i-20), pH ); p.drawLine( dawn + (i-20), 0, dawn + (i-20), pH ); } @@ -568,17 +568,17 @@ void AVTPlotWidget::paintEvent( QPaintEvent */*e*/ ) { } //draw ground - p.fillRect( 0, int(0.5*pH), pW, int(0.5*pH), QColor( "#002200" ) ); + p.fillRect( 0, int(0.5*pH), pW, int(0.5*pH), TQColor( "#002200" ) ); drawBox( &p ); drawObjects( &p ); //Add vertical line indicating "now" - QTime t = QTime::currentTime(); + TQTime t = TQTime::currentTime(); double x = 12.0 + t.hour() + t.minute()/60.0 + t.second()/3600.0; while ( x > 24.0 ) x -= 24.0; int ix = int(x*pW/24.0); //convert to screen pixel coords - p.setPen( QPen( "white", 2, DotLine ) ); + p.setPen( TQPen( "white", 2, DotLine ) ); p.drawLine( ix, 0, ix, pH ); p.end(); diff --git a/kstars/kstars/tools/altvstime.h b/kstars/kstars/tools/altvstime.h index 1f07b05f..7bf738f7 100644 --- a/kstars/kstars/tools/altvstime.h +++ b/kstars/kstars/tools/altvstime.h @@ -51,7 +51,7 @@ class AVTPlotWidget : public KStarsPlotWidget public: /**Constructor */ - AVTPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, QWidget *parent=0, const char* name=0 ); + AVTPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, TQWidget *parent=0, const char* name=0 ); /**Set the fractional positions of the Sunrise and Sunset positions, *in units where last midnight was 0.0, and next midnight is 1.0. @@ -68,15 +68,15 @@ protected: *draw crosshair lines centered at the cursor position. This *allows the user to pinpoint specific position sin the plot. */ - void mouseMoveEvent( QMouseEvent *e ); + void mouseMoveEvent( TQMouseEvent *e ); /**Simply calls mouseMoveEvent(). */ - void mousePressEvent( QMouseEvent *e ); + void mousePressEvent( TQMouseEvent *e ); /**Redraw the plot. */ - void paintEvent( QPaintEvent *e ); + void paintEvent( TQPaintEvent *e ); private: double SunRise, SunSet; @@ -97,7 +97,7 @@ class AltVsTime : public KDialogBase public: /**Constructor */ - AltVsTime( QWidget* parent = 0); + AltVsTime( TQWidget* parent = 0); /**Destructor */ @@ -133,7 +133,7 @@ public: *@param eName the epoch string to be parsed *@return the epoch number */ - double getEpoch (QString eName); + double getEpoch (TQString eName); /**@short Add a SkyObject to the display. *Constructs a PLotObject representing the Alt-vs-time curve for the object. @@ -162,7 +162,7 @@ public: /**@return a pointer to the list of SkyPoints representing the *objects being displayed. */ - QPtrList<SkyPoint>* skyPointList() { return &pList; } + TQPtrList<SkyPoint>* skyPointList() { return &pList; } public slots: /**@short Update the plot to reflec new Date and Location settings. @@ -207,12 +207,12 @@ public slots: private: AVTPlotWidget *View; AltVsTimeUI *avtUI; - QVBoxLayout *topLayout; + TQVBoxLayout *topLayout; GeoLocation *geo; KStars *ks; - QPtrList<SkyPoint> pList; - QPtrList<SkyPoint> deleteList; + TQPtrList<SkyPoint> pList; + TQPtrList<SkyPoint> deleteList; int DayOffset; bool dirtyFlag; diff --git a/kstars/kstars/tools/astrocalc.cpp b/kstars/kstars/tools/astrocalc.cpp index 5deec02f..3b87826b 100644 --- a/kstars/kstars/tools/astrocalc.cpp +++ b/kstars/kstars/tools/astrocalc.cpp @@ -34,21 +34,21 @@ #include "modcalcvlsr.h" #include <klocale.h> -#include <qlistview.h> -#include <qtextview.h> +#include <tqlistview.h> +#include <tqtextview.h> -AstroCalc::AstroCalc( QWidget* parent ) : +AstroCalc::AstroCalc( TQWidget* parent ) : KDialogBase( parent, "starscalculator", true, i18n("Calculator"), Close ), JDFrame(0), GeodCoordFrame(0), GalFrame(0), SidFrame(0), PrecFrame(0), AppFrame(0), DayFrame(0), AzelFrame(0), PlanetsFrame(0), EquinoxFrame(0), EclFrame(0), AngDistFrame(0) { - split = new QSplitter ( this ); + split = new TQSplitter ( this ); setMainWidget(split); - navigationPanel = new QListView (split,"NavigationPanel"); - splashScreen = new QTextView (i18n("<H2>KStars Astrocalculator</H2>"),"",split); + navigationPanel = new TQListView (split,"NavigationPanel"); + splashScreen = new TQTextView (i18n("<H2>KStars Astrocalculator</H2>"),"",split); splashScreen->setMaximumWidth(550); splashScreen->setMinimumWidth(400); @@ -58,51 +58,51 @@ AstroCalc::AstroCalc( QWidget* parent ) : navigationPanel->addColumn("Section"); navigationPanel->setRootIsDecorated(1); - QPixmap jdIcon = QPixmap ("jd.png"); - QPixmap geodIcon = QPixmap ("geodetic.png"); - QPixmap solarIcon = QPixmap ("geodetic.png"); - QPixmap sunsetIcon = QPixmap ("sunset.png"); - QPixmap timeIcon = QPixmap ("sunclock.png"); + TQPixmap jdIcon = TQPixmap ("jd.png"); + TQPixmap geodIcon = TQPixmap ("geodetic.png"); + TQPixmap solarIcon = TQPixmap ("geodetic.png"); + TQPixmap sunsetIcon = TQPixmap ("sunset.png"); + TQPixmap timeIcon = TQPixmap ("sunclock.png"); - QListViewItem * timeItem = new QListViewItem(navigationPanel,i18n("Time Calculators")); + TQListViewItem * timeItem = new TQListViewItem(navigationPanel,i18n("Time Calculators")); timeItem->setPixmap(0,timeIcon); - QListViewItem * jdItem = new QListViewItem(timeItem,i18n("Julian Day")); + TQListViewItem * jdItem = new TQListViewItem(timeItem,i18n("Julian Day")); jdItem->setPixmap(0,jdIcon); - new QListViewItem(timeItem,i18n("Sidereal Time")); - new QListViewItem(timeItem,i18n("Day Duration")); - new QListViewItem(timeItem,i18n("Equinoxes & Solstices")); + new TQListViewItem(timeItem,i18n("Sidereal Time")); + new TQListViewItem(timeItem,i18n("Day Duration")); + new TQListViewItem(timeItem,i18n("Equinoxes & Solstices")); // dayItem->setPixmap(0,sunsetIcon); - QListViewItem * coordItem = new QListViewItem(navigationPanel,i18n("Celestial Coordinates")); - new QListViewItem(coordItem,i18n("Galactic Coordinates")); - new QListViewItem(coordItem,i18n("Precession")); - new QListViewItem(coordItem,i18n("Apparent Coordinates")); - new QListViewItem(coordItem,i18n("Horizontal Coordinates")); - new QListViewItem(coordItem,i18n("Ecliptic Coordinates")); - new QListViewItem(coordItem,i18n("Angular Distance")); - new QListViewItem(coordItem,i18n("LSR Velocity")); + TQListViewItem * coordItem = new TQListViewItem(navigationPanel,i18n("Celestial Coordinates")); + new TQListViewItem(coordItem,i18n("Galactic Coordinates")); + new TQListViewItem(coordItem,i18n("Precession")); + new TQListViewItem(coordItem,i18n("Apparent Coordinates")); + new TQListViewItem(coordItem,i18n("Horizontal Coordinates")); + new TQListViewItem(coordItem,i18n("Ecliptic Coordinates")); + new TQListViewItem(coordItem,i18n("Angular Distance")); + new TQListViewItem(coordItem,i18n("LSR Velocity")); - QListViewItem * geoItem = new QListViewItem(navigationPanel,i18n("Earth Coordinates")); + TQListViewItem * geoItem = new TQListViewItem(navigationPanel,i18n("Earth Coordinates")); geoItem->setPixmap(0,geodIcon); - /*QListViewItem * cartItem = */new QListViewItem(geoItem,i18n("Geodetic Coordinates")); + /*TQListViewItem * cartItem = */new TQListViewItem(geoItem,i18n("Geodetic Coordinates")); - QListViewItem * solarItem = new QListViewItem(navigationPanel,i18n("Solar System")); + TQListViewItem * solarItem = new TQListViewItem(navigationPanel,i18n("Solar System")); solarItem->setPixmap(0,solarIcon); - /*QListViewItem * planetsItem = */new QListViewItem(solarItem,i18n("Planets Coordinates")); + /*TQListViewItem * planetsItem = */new TQListViewItem(solarItem,i18n("Planets Coordinates")); - connect(navigationPanel, SIGNAL(clicked(QListViewItem *)), this, - SLOT(slotItemSelection(QListViewItem *))); + connect(navigationPanel, TQT_SIGNAL(clicked(TQListViewItem *)), this, + TQT_SLOT(slotItemSelection(TQListViewItem *))); } AstroCalc::~AstroCalc() { } -void AstroCalc::slotItemSelection(QListViewItem *item) +void AstroCalc::slotItemSelection(TQListViewItem *item) { - QString election; + TQString election; if (item==0L) return; @@ -150,7 +150,7 @@ void AstroCalc::genTimeText(void) { delRightPanel(); - splashScreen = new QTextView ("","",split); + splashScreen = new TQTextView ("","",split); splashScreen->setMaximumWidth(550); splashScreen->setMinimumWidth(400); splashScreen->show(); @@ -177,7 +177,7 @@ void AstroCalc::genTimeText(void) void AstroCalc::genCoordText(void) { delRightPanel(); - splashScreen = new QTextView ("","",split); + splashScreen = new TQTextView ("","",split); splashScreen->setMaximumWidth(550); splashScreen->setMinimumWidth(400); splashScreen->show(); @@ -213,7 +213,7 @@ void AstroCalc::genCoordText(void) void AstroCalc::genGeodText(void) { delRightPanel(); - splashScreen = new QTextView ("","",split); + splashScreen = new TQTextView ("","",split); splashScreen->setMaximumWidth(550); splashScreen->setMinimumWidth(400); splashScreen->show(); @@ -232,7 +232,7 @@ void AstroCalc::genGeodText(void) void AstroCalc::genSolarText(void) { delRightPanel(); - splashScreen = new QTextView ("","",split); + splashScreen = new TQTextView ("","",split); splashScreen->setMaximumWidth(550); splashScreen->setMinimumWidth(400); splashScreen->show(); @@ -374,7 +374,7 @@ void AstroCalc::genVlsrFrame(void) rightPanel = Vlsr; } -QSize AstroCalc::sizeHint() const +TQSize AstroCalc::sizeHint() const { - return QSize(640,430); + return TQSize(640,430); } diff --git a/kstars/kstars/tools/astrocalc.h b/kstars/kstars/tools/astrocalc.h index 84604103..95051f2b 100644 --- a/kstars/kstars/tools/astrocalc.h +++ b/kstars/kstars/tools/astrocalc.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> #include <kapplication.h> @@ -60,7 +60,7 @@ class AstroCalc : public KDialogBase Q_OBJECT public: /** construtor */ - AstroCalc(QWidget *parent = 0); + AstroCalc(TQWidget *parent = 0); /** destructor */ ~AstroCalc(); @@ -120,22 +120,22 @@ Q_OBJECT void delRightPanel(void); /**@returns suggested size of calculator window. */ - QSize sizeHint() const; + TQSize sizeHint() const; public slots: - /**Determine which item is selected in the function menu QListBox. + /**Determine which item is selected in the function menu TQListBox. *Generate the corresponding calculator module. */ - void slotItemSelection(QListViewItem *it); + void slotItemSelection(TQListViewItem *it); private: - QSplitter *split; - QListView *navigationPanel, *auxiliar; - QTextView *splashScreen; -// QListViewItem *timeItem, *coordItem, *jdItem, *stItem, *dayItem; - QVBox *vbox, *rightBox; - QString previousElection; + TQSplitter *split; + TQListView *navigationPanel, *auxiliar; + TQTextView *splashScreen; +// TQListViewItem *timeItem, *coordItem, *jdItem, *stItem, *dayItem; + TQVBox *vbox, *rightBox; + TQString previousElection; enum typeOfPanel {GenText, TimeText, GeoText, SolarText, CoordText, JD, SidTime, DayLength, Equinox, GeoCoord, Galactic, Precessor, Apparent, Azel, Planets, Ecliptic, AngDist, Vlsr}; typeOfPanel rightPanel; diff --git a/kstars/kstars/tools/jmoontool.cpp b/kstars/kstars/tools/jmoontool.cpp index 76d4aa67..7d7add93 100644 --- a/kstars/kstars/tools/jmoontool.cpp +++ b/kstars/kstars/tools/jmoontool.cpp @@ -14,8 +14,8 @@ * * ***************************************************************************/ -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kdebug.h> #include <klocale.h> @@ -30,13 +30,13 @@ #include "dms.h" #include "ksnumbers.h" -JMoonTool::JMoonTool(QWidget *parent, const char *name) +JMoonTool::JMoonTool(TQWidget *parent, const char *name) : KDialogBase( KDialogBase::Plain, i18n("Jupiter Moons Tool"), Close, Close, parent, name ) { ksw = (KStars*)parent; - QFrame *page = plainPage(); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, 0 ); + TQFrame *page = plainPage(); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 ); colJp = "White"; colIo = "Red"; @@ -44,15 +44,15 @@ JMoonTool::JMoonTool(QWidget *parent, const char *name) colGn = "Orange"; colCa = "YellowGreen"; - QLabel *labIo = new QLabel( "Io", page ); - QLabel *labEu = new QLabel( "Europa", page ); - QLabel *labGn = new QLabel( "Ganymede", page ); - QLabel *labCa = new QLabel( "Callisto", page ); + TQLabel *labIo = new TQLabel( "Io", page ); + TQLabel *labEu = new TQLabel( "Europa", page ); + TQLabel *labGn = new TQLabel( "Ganymede", page ); + TQLabel *labCa = new TQLabel( "Callisto", page ); - labIo->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); - labEu->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); - labGn->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); - labCa->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + labIo->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + labEu->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + labGn->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + labCa->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); labIo->setAlignment( AlignHCenter ); labEu->setAlignment( AlignHCenter ); labGn->setAlignment( AlignHCenter ); @@ -67,7 +67,7 @@ JMoonTool::JMoonTool(QWidget *parent, const char *name) labGn->setPaletteBackgroundColor( "Black" ); labCa->setPaletteBackgroundColor( "Black" ); - QGridLayout *glay = new QGridLayout( 2, 2, 0 ); + TQGridLayout *glay = new TQGridLayout( 2, 2, 0 ); glay->addWidget( labIo, 0, 0 ); glay->addWidget( labEu, 1, 0 ); glay->addWidget( labGn, 0, 1 ); @@ -128,7 +128,7 @@ void JMoonTool::initPlotObjects() { pw->addObject( jpath ); } -void JMoonTool::keyPressEvent( QKeyEvent *e ) { +void JMoonTool::keyPressEvent( TQKeyEvent *e ) { switch ( e->key() ) { case Key_BracketRight: { diff --git a/kstars/kstars/tools/jmoontool.h b/kstars/kstars/tools/jmoontool.h index 57ba53ab..70c33e79 100644 --- a/kstars/kstars/tools/jmoontool.h +++ b/kstars/kstars/tools/jmoontool.h @@ -31,17 +31,17 @@ class JMoonTool : public KDialogBase { Q_OBJECT public: - JMoonTool(QWidget *parent = 0, const char *name = 0); + JMoonTool(TQWidget *parent = 0, const char *name = 0); ~JMoonTool(); protected: - virtual void keyPressEvent( QKeyEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); private: void initPlotObjects(); KStarsPlotWidget *pw; KStars *ksw; - QString colJp, colIo, colEu, colGn, colCa; + TQString colJp, colIo, colEu, colGn, colCa; }; #endif diff --git a/kstars/kstars/tools/kstarsplotwidget.cpp b/kstars/kstars/tools/kstarsplotwidget.cpp index 5e66e2a6..dcbe36b7 100644 --- a/kstars/kstars/tools/kstarsplotwidget.cpp +++ b/kstars/kstars/tools/kstarsplotwidget.cpp @@ -19,16 +19,16 @@ #include <kdebug.h> #include <kglobal.h> #include <klocale.h> -#include <qcolor.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqstring.h> #include "kstarsplotwidget.h" -KStarsPlotWidget::KStarsPlotWidget( double x1, double x2, double y1, double y2, QWidget *parent, const char* name ) +KStarsPlotWidget::KStarsPlotWidget( double x1, double x2, double y1, double y2, TQWidget *parent, const char* name ) : KPlotWidget( x1, x2, y1, y2, parent, name ), dXtick2(0.0), dYtick2(0.0), nmajX2(0), nminX2(0), nmajY2(0), nminY2(0), @@ -280,7 +280,7 @@ void KStarsPlotWidget::updateTickmarks() { } //end for iaxis } -void KStarsPlotWidget::drawBox( QPainter *p ) { +void KStarsPlotWidget::drawBox( TQPainter *p ) { int pW = PixRect.width(), pH = PixRect.height(); //First, fill in padding region with bgColor() to mask out-of-bounds plot data @@ -334,7 +334,7 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { if ( dataHeight2() > 0.0 && ( yb() != y() || yb2() != y2() ) ) secondaryYLimits = true; //set small font for tick labels - QFont f = p->font(); + TQFont f = p->font(); int s = f.pointSize(); f.setPointSize( s - 2 ); p->setFont( f ); @@ -358,13 +358,13 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { switch ( xAxisType() ) { case DOUBLE : { - QString str = QString( "%1" ).arg( lab, 0, 'g', 2 ); + TQString str = TQString( "%1" ).arg( lab, 0, 'g', 2 ); int idot = str.find( '.' ); if ( idot >= 0 ) str = str.replace( idot, 1, KGlobal::locale()->decimalSymbol() ); if ( px > 0 && px < pW ) { - QRect r( px - BIGTICKSIZE, pH+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); + TQRect r( px - BIGTICKSIZE, pH+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -376,18 +376,18 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { while ( h > 24 ) { h -= 24; } while ( h < 0 ) { h += 24; } - QString str = QString().sprintf( "%02d:%02d", h, m ); + TQString str = TQString().sprintf( "%02d:%02d", h, m ); if ( px > 0 && px < pW ) { - QRect r( px - BIGTICKSIZE, pH+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); + TQRect r( px - BIGTICKSIZE, pH+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; } case ANGLE : { - QString str = QString().sprintf( "%d%c", int(lab), 176 ); + TQString str = TQString().sprintf( "%d%c", int(lab), 176 ); if ( px > 0 && px < pW ) { - QRect r( px - BIGTICKSIZE, pH+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); + TQRect r( px - BIGTICKSIZE, pH+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -426,13 +426,13 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { switch ( yAxisType() ) { case DOUBLE : { - QString str = QString( "%1" ).arg( lab, 0, 'g', 2 ); + TQString str = TQString( "%1" ).arg( lab, 0, 'g', 2 ); int idot = str.find( '.' ); if ( idot >= 0 ) str = str.replace( idot, 1, KGlobal::locale()->decimalSymbol() ); if ( py > 0 && py < pH ) { - QRect r( -2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); + TQRect r( -2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -444,18 +444,18 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { while ( h > 24 ) { h -= 24; } while ( h < 0 ) { h += 24; } - QString str = QString().sprintf( "%02d:%02d", h, m ); + TQString str = TQString().sprintf( "%02d:%02d", h, m ); if ( py > 0 && py < pH ) { - QRect r( -3*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); + TQRect r( -3*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; } case ANGLE : { - QString str = QString().sprintf( "%d%c", int(lab), 176 ); + TQString str = TQString().sprintf( "%d%c", int(lab), 176 ); if ( py > 0 && py < pH ) { - QRect r( -3*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); + TQRect r( -3*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -492,13 +492,13 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { switch ( xAxisType() ) { case DOUBLE : { - QString str = QString( "%1" ).arg( lab, 0, 'g', 2 ); + TQString str = TQString( "%1" ).arg( lab, 0, 'g', 2 ); int idot = str.find( '.' ); if ( idot >= 0 ) str = str.replace( idot, 1, KGlobal::locale()->decimalSymbol() ); if ( px > 0 && px < pW ) { - QRect r( px - BIGTICKSIZE, -2*BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); + TQRect r( px - BIGTICKSIZE, -2*BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -510,18 +510,18 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { while ( h > 24 ) { h -= 24; } while ( h < 0 ) { h += 24; } - QString str = QString().sprintf( "%02d:%02d", h, m ); + TQString str = TQString().sprintf( "%02d:%02d", h, m ); if ( px > 0 && px < pW ) { - QRect r( px - BIGTICKSIZE, -2*BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); + TQRect r( px - BIGTICKSIZE, -2*BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; } case ANGLE : { - QString str = QString().sprintf( "%d%c", int(lab), 176 ); + TQString str = TQString().sprintf( "%d%c", int(lab), 176 ); if ( px > 0 && px < pW ) { - QRect r( px - BIGTICKSIZE, -2*BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); + TQRect r( px - BIGTICKSIZE, -2*BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -556,13 +556,13 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { switch ( yAxisType() ) { case DOUBLE : { - QString str = QString( "%1" ).arg( lab, 0, 'g', 2 ); + TQString str = TQString( "%1" ).arg( lab, 0, 'g', 2 ); int idot = str.find( '.' ); if ( idot >= 0 ) str = str.replace( idot, 1, KGlobal::locale()->decimalSymbol() ); if ( py > 0 && py < pH ) { - QRect r( pW + 2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); + TQRect r( pW + 2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -574,18 +574,18 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { while ( h > 24 ) { h -= 24; } while ( h < 0 ) { h += 24; } - QString str = QString().sprintf( "%02d:%02d", h, m ); + TQString str = TQString().sprintf( "%02d:%02d", h, m ); if ( py > 0 && py < pH ) { - QRect r( pW + 2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); + TQRect r( pW + 2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; } case ANGLE : { - QString str = QString().sprintf( "%d%c", int(lab), 176 ); + TQString str = TQString().sprintf( "%d%c", int(lab), 176 ); if ( py > 0 && py < pH ) { - QRect r( pW + 3*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); + TQRect r( pW + 3*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, str ); } break; @@ -610,11 +610,11 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { //Draw X Axis Label(s) if ( ! BottomAxis.label().isEmpty() ) { - QRect r( 0, PixRect.height() + 2*YPADDING, PixRect.width(), YPADDING ); + TQRect r( 0, PixRect.height() + 2*YPADDING, PixRect.width(), YPADDING ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, BottomAxis.label() ); } if ( ! XAxisLabel2.isEmpty() ) { - QRect r( 0, -3*YPADDING, PixRect.width(), YPADDING ); + TQRect r( 0, -3*YPADDING, PixRect.width(), YPADDING ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, XAxisLabel2 ); } @@ -627,7 +627,7 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { p->translate( -3*XPADDING, PixRect.height() ); p->rotate( -90.0 ); - QRect r( 0, 0, PixRect.height(), XPADDING ); + TQRect r( 0, 0, PixRect.height(), XPADDING ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, LeftAxis.label() ); //draw the label, now that we are sideways p->restore(); //restore translation/rotation state @@ -640,7 +640,7 @@ void KStarsPlotWidget::drawBox( QPainter *p ) { p->translate( PixRect.width() + 2*XPADDING, PixRect.height() ); p->rotate( -90.0 ); - QRect r( 0, 0, PixRect.height(), XPADDING ); + TQRect r( 0, 0, PixRect.height(), XPADDING ); p->drawText( r, Qt::AlignCenter | Qt::DontClip, YAxisLabel2 ); //draw the label, now that we are sideways p->restore(); //restore translation/rotation state diff --git a/kstars/kstars/tools/kstarsplotwidget.h b/kstars/kstars/tools/kstarsplotwidget.h index 554f4a80..dd28f195 100644 --- a/kstars/kstars/tools/kstarsplotwidget.h +++ b/kstars/kstars/tools/kstarsplotwidget.h @@ -18,7 +18,7 @@ #ifndef _KSTARSPLOTWIDGET_H_ #define _KSTARSPLOTWIDGET_H_ -#include <qwidget.h> +#include <tqwidget.h> #include <libkdeedu/kdeeduplot/kplotwidget.h> #define BIGTICKSIZE 10 @@ -41,7 +41,7 @@ class KStarsPlotWidget : public KPlotWidget { public: /**Constructor */ - KStarsPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, QWidget *parent=0, const char* name=0 ); + KStarsPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, TQWidget *parent=0, const char* name=0 ); /**Destructor (empty) */ @@ -95,12 +95,12 @@ public: *@param xlabel a short string describing the data plotted on the x-axis. *Set the label to an empty string to omit the axis label. */ - virtual void setXAxisLabel2( QString xlabel ) { XAxisLabel2 = xlabel; } + virtual void setXAxisLabel2( TQString xlabel ) { XAxisLabel2 = xlabel; } /**@short set the secondary Y-axis label *@param ylabel a short string describing the data plotted on the y-axis. *Set the label to an empty string to omit the axis label. */ - virtual void setYAxisLabel2( QString ylabel ) { YAxisLabel2 = ylabel; } + virtual void setYAxisLabel2( TQString ylabel ) { YAxisLabel2 = ylabel; } /**@returns the number of pixels to the right of the plot area. *Padding values are set to -1 by default; if unchanged, this function will try to guess @@ -114,7 +114,7 @@ public: int topPadding() const; protected: - void drawBox( QPainter *p ); + void drawBox( TQPainter *p ); double dXtick2, dYtick2; int nmajX2, nminX2, nmajY2, nminY2; @@ -122,7 +122,7 @@ protected: double XScaleFactor, YScaleFactor; DRect DataRect2; - QString XAxisLabel2, YAxisLabel2; + TQString XAxisLabel2, YAxisLabel2; }; #endif diff --git a/kstars/kstars/tools/lcgenerator.cpp b/kstars/kstars/tools/lcgenerator.cpp index 39a535f2..bc682bbb 100644 --- a/kstars/kstars/tools/lcgenerator.cpp +++ b/kstars/kstars/tools/lcgenerator.cpp @@ -15,18 +15,18 @@ * * ***************************************************************************/ -#include <qvariant.h> +#include <tqvariant.h> #include <klineedit.h> #include <klistbox.h> #include <kpushbutton.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> -#include <qfile.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> +#include <tqfile.h> #include <kio/netaccess.h> #include <kmessagebox.h> @@ -39,7 +39,7 @@ #include <kapplication.h> -LCGenerator::LCGenerator( QWidget* parent) +LCGenerator::LCGenerator( TQWidget* parent) : KDialogBase( parent, "lcgenerator", false, i18n( "AAVSO Light Curve Generator"),0) , Hostprefix("http://www.aavso.org/cgi-bin/kstar.pl"), JDCutOff(2437600) { @@ -48,7 +48,7 @@ LCGenerator::LCGenerator( QWidget* parent) downloadJob = 0; - file = new QFile(); + file = new TQFile(); } LCGenerator::~LCGenerator() @@ -60,24 +60,24 @@ LCGenerator::~LCGenerator() void LCGenerator::createGUI() { - QWidget *page = new QWidget(this); + TQWidget *page = new TQWidget(this); setMainWidget(page); - LCGeneratorDialogLayout = new QVBoxLayout( page, 11, 6, "LCGeneratorDialogLayout"); + LCGeneratorDialogLayout = new TQVBoxLayout( page, 11, 6, "LCGeneratorDialogLayout"); - SDLayout = new QHBoxLayout( 0, 0, 6, "SDLayout"); + SDLayout = new TQHBoxLayout( 0, 0, 6, "SDLayout"); - StarInfoBox = new QGroupBox( page, "StarInfoBox" ); + StarInfoBox = new TQGroupBox( page, "StarInfoBox" ); StarInfoBox->setColumnLayout(0, Qt::Vertical ); StarInfoBox->layout()->setSpacing( 6 ); StarInfoBox->layout()->setMargin( 11 ); - StarInfoBoxLayout = new QVBoxLayout( StarInfoBox->layout() ); + StarInfoBoxLayout = new TQVBoxLayout( StarInfoBox->layout() ); StarInfoBoxLayout->setAlignment( Qt::AlignTop ); - DesignHLayout = new QHBoxLayout( 0, 0, 6, "DesignHLayout"); + DesignHLayout = new TQHBoxLayout( 0, 0, 6, "DesignHLayout"); - desigLabel = new QLabel( StarInfoBox, "desigLabel" ); - desigLabel->setMinimumSize( QSize( 70, 0 ) ); + desigLabel = new TQLabel( StarInfoBox, "desigLabel" ); + desigLabel->setMinimumSize( TQSize( 70, 0 ) ); DesignHLayout->addWidget( desigLabel ); DesignationIn = new KListBox( StarInfoBox, "DesignationIn" ); @@ -88,10 +88,10 @@ void LCGenerator::createGUI() for (uint i=0; i< (ksw->data()->VariableStarsList.count()); i++) DesignationIn->insertItem(ksw->data()->VariableStarsList.at(i)->Designation); - NameHLayout = new QHBoxLayout( 0, 0, 6, "NameHLayout"); + NameHLayout = new TQHBoxLayout( 0, 0, 6, "NameHLayout"); - nameLabel = new QLabel( StarInfoBox, "nameLabel" ); - nameLabel->setMinimumSize( QSize( 70, 0 ) ); + nameLabel = new TQLabel( StarInfoBox, "nameLabel" ); + nameLabel->setMinimumSize( TQSize( 70, 0 ) ); NameHLayout->addWidget( nameLabel ); NameIn = new KListBox( StarInfoBox, "NameIn" ); @@ -102,20 +102,20 @@ void LCGenerator::createGUI() for (uint i=0; i<ksw->data()->VariableStarsList.count(); i++) NameIn->insertItem(ksw->data()->VariableStarsList.at(i)->Name); - StartHLayout = new QHBoxLayout( 0, 0, 6, "StartHLayout"); + StartHLayout = new TQHBoxLayout( 0, 0, 6, "StartHLayout"); - startLabel = new QLabel( StarInfoBox, "startLabel" ); - startLabel->setMinimumSize( QSize( 70, 0 ) ); + startLabel = new TQLabel( StarInfoBox, "startLabel" ); + startLabel->setMinimumSize( TQSize( 70, 0 ) ); StartHLayout->addWidget( startLabel ); StartDateIn = new KLineEdit( StarInfoBox, "StartDateIn" ); StartHLayout->addWidget( StartDateIn ); StarInfoBoxLayout->addLayout( StartHLayout ); - EndHLayout = new QHBoxLayout( 0, 0, 6, "EndHLayout"); + EndHLayout = new TQHBoxLayout( 0, 0, 6, "EndHLayout"); - endLabel = new QLabel( StarInfoBox, "endLabel" ); - endLabel->setMinimumSize( QSize( 70, 0 ) ); + endLabel = new TQLabel( StarInfoBox, "endLabel" ); + endLabel->setMinimumSize( TQSize( 70, 0 ) ); EndHLayout->addWidget( endLabel ); EndDateIn = new KLineEdit( StarInfoBox, "EndDateIn" ); @@ -123,62 +123,62 @@ void LCGenerator::createGUI() StarInfoBoxLayout->addLayout( EndHLayout ); SDLayout->addWidget( StarInfoBox ); - DataSelectBox = new QGroupBox( page, "DataSelectBox" ); + DataSelectBox = new TQGroupBox( page, "DataSelectBox" ); DataSelectBox->setColumnLayout(0, Qt::Vertical ); DataSelectBox->layout()->setSpacing( 6 ); DataSelectBox->layout()->setMargin( 11 ); - DataSelectBoxLayout = new QVBoxLayout( DataSelectBox->layout() ); + DataSelectBoxLayout = new TQVBoxLayout( DataSelectBox->layout() ); DataSelectBoxLayout->setAlignment( Qt::AlignTop ); - VisualCheck = new QCheckBox( DataSelectBox, "VisualCheck" ); + VisualCheck = new TQCheckBox( DataSelectBox, "VisualCheck" ); VisualCheck->setChecked( TRUE ); DataSelectBoxLayout->addWidget( VisualCheck ); - FainterCheck = new QCheckBox( DataSelectBox, "FainterCheck" ); + FainterCheck = new TQCheckBox( DataSelectBox, "FainterCheck" ); FainterCheck->setChecked( TRUE ); DataSelectBoxLayout->addWidget( FainterCheck ); - DiscrepantCheck = new QCheckBox( DataSelectBox, "DiscrepantCheck" ); + DiscrepantCheck = new TQCheckBox( DataSelectBox, "DiscrepantCheck" ); DataSelectBoxLayout->addWidget( DiscrepantCheck ); - CCDBCheck = new QCheckBox( DataSelectBox, "CCDBCheck" ); + CCDBCheck = new TQCheckBox( DataSelectBox, "CCDBCheck" ); CCDBCheck->setChecked( TRUE ); DataSelectBoxLayout->addWidget( CCDBCheck ); - CCDVCheck = new QCheckBox( DataSelectBox, "CCDVCheck" ); + CCDVCheck = new TQCheckBox( DataSelectBox, "CCDVCheck" ); CCDVCheck->setChecked( TRUE ); DataSelectBoxLayout->addWidget( CCDVCheck ); - CCDRCheck = new QCheckBox( DataSelectBox, "CCDRCheck" ); + CCDRCheck = new TQCheckBox( DataSelectBox, "CCDRCheck" ); CCDRCheck->setChecked( TRUE ); DataSelectBoxLayout->addWidget( CCDRCheck ); - CCDICheck = new QCheckBox( DataSelectBox, "CCDICheck" ); + CCDICheck = new TQCheckBox( DataSelectBox, "CCDICheck" ); CCDICheck->setChecked( TRUE ); DataSelectBoxLayout->addWidget( CCDICheck ); - PlotHLayout = new QHBoxLayout( 0, 0, 6, "PlotHLayout"); + PlotHLayout = new TQHBoxLayout( 0, 0, 6, "PlotHLayout"); - plotLabel = new QLabel( DataSelectBox, "plotLabel" ); + plotLabel = new TQLabel( DataSelectBox, "plotLabel" ); PlotHLayout->addWidget( plotLabel ); AverageDayIn = new KLineEdit( DataSelectBox, "AverageDayIn" ); PlotHLayout->addWidget( AverageDayIn ); - daysLabel = new QLabel( DataSelectBox, "daysLabel" ); + daysLabel = new TQLabel( DataSelectBox, "daysLabel" ); PlotHLayout->addWidget( daysLabel ); DataSelectBoxLayout->addLayout( PlotHLayout ); SDLayout->addWidget( DataSelectBox ); LCGeneratorDialogLayout->addLayout( SDLayout ); - ButtonHLayout = new QHBoxLayout( 0, 0, 6, "ButtonHLayout"); + ButtonHLayout = new TQHBoxLayout( 0, 0, 6, "ButtonHLayout"); GetCurveButton = new KPushButton( page, "GetCurveButton" ); ButtonHLayout->addWidget( GetCurveButton ); UpdateListButton = new KPushButton( page, "UpdateListButton" ); ButtonHLayout->addWidget( UpdateListButton ); - QSpacerItem* spacer = new QSpacerItem( 128, 16, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 128, 16, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); ButtonHLayout->addItem( spacer ); CloseButton = new KPushButton( page, "closeButton" ); @@ -190,9 +190,9 @@ void LCGenerator::createGUI() desigLabel->setText( i18n( "Designation:" ) ); nameLabel->setText( i18n( "Or name:" ) ); startLabel->setText( i18n( "Start date:" ) ); - QWhatsThis::add( startLabel, i18n( "Start date for the light curve plot in mm/dd/yy or JD" ) ); + TQWhatsThis::add( startLabel, i18n( "Start date for the light curve plot in mm/dd/yy or JD" ) ); endLabel->setText( i18n( "End date:" ) ); - QWhatsThis::add( endLabel, i18n( "End date for the light curve plot in mm/dd/yy or JD" ) ); + TQWhatsThis::add( endLabel, i18n( "End date for the light curve plot in mm/dd/yy or JD" ) ); StartDateIn->setText( i18n( "default" ) ); EndDateIn->setText( i18n( "default" ) ); DataSelectBox->setTitle( i18n( "Data Selection" ) ); @@ -209,22 +209,22 @@ void LCGenerator::createGUI() UpdateListButton->setText( i18n( "Update List" ) ); CloseButton->setText( i18n( "Close" ) ); - resize( QSize(500, 360) ); + resize( TQSize(500, 360) ); // Signals/Slots - QObject::connect(CloseButton, SIGNAL(clicked()), this, SLOT(close())); - QObject::connect(GetCurveButton, SIGNAL(clicked()), this, SLOT(VerifyData())); - QObject::connect(UpdateListButton, SIGNAL(clicked()), this, SLOT(updateStarList())); - QObject::connect(DesignationIn, SIGNAL(highlighted(int)), this, SLOT(updateNameList(int))); - QObject::connect(NameIn, SIGNAL(highlighted(int)), this, SLOT(updateDesigList(int))); + TQObject::connect(CloseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(close())); + TQObject::connect(GetCurveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(VerifyData())); + TQObject::connect(UpdateListButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateStarList())); + TQObject::connect(DesignationIn, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(updateNameList(int))); + TQObject::connect(NameIn, TQT_SIGNAL(highlighted(int)), this, TQT_SLOT(updateDesigList(int))); } void LCGenerator::VerifyData() { - QString InitialStartDate, InitialEndDate; - QString FinalDesignation, FinalStartDate, FinalEndDate, AverageDays; + TQString InitialStartDate, InitialEndDate; + TQString FinalDesignation, FinalStartDate, FinalEndDate, AverageDays; bool AverageDaysOK; // Get initial user input @@ -266,14 +266,14 @@ void LCGenerator::VerifyData() } } - else AverageDays = QString("default"); + else AverageDays = TQString("default"); //Download the curve! DownloadCurve(FinalStartDate, FinalEndDate, FinalDesignation, AverageDays); } -bool LCGenerator::setJD(QString Date, QString *JD, int JDType) +bool LCGenerator::setJD(TQString Date, TQString *JD, int JDType) { uint i=0; int TempJD=0; @@ -283,9 +283,9 @@ bool LCGenerator::setJD(QString Date, QString *JD, int JDType) int dateFormat[3]; bool isNumber; - const QString invalidFormatStartJD(i18n("Invalid date format. Correct format is mm/dd/yyyy or JD, leave 'default' to generate light curves for the past 500 days.")); - const QString invalidFormatENDJD(i18n("Invalid date format. Correct format is mm/dd/yyyy or JD, leave 'default' to generate light curves until today.")); - QString invalidFormatMsg(JDType ? invalidFormatENDJD : invalidFormatStartJD); + const TQString invalidFormatStartJD(i18n("Invalid date format. Correct format is mm/dd/yyyy or JD, leave 'default' to generate light curves for the past 500 days.")); + const TQString invalidFormatENDJD(i18n("Invalid date format. Correct format is mm/dd/yyyy or JD, leave 'default' to generate light curves until today.")); + TQString invalidFormatMsg(JDType ? invalidFormatENDJD : invalidFormatStartJD); // check for "default" date @@ -325,7 +325,7 @@ bool LCGenerator::setJD(QString Date, QString *JD, int JDType) else { const char* invalidJD = I18N_NOOP("No data available for JD prior to %d"); - KMessageBox::error(this, QString().sprintf(invalidJD, JDCutOff)); + KMessageBox::error(this, TQString().sprintf(invalidJD, JDCutOff)); return false; } } @@ -361,18 +361,18 @@ bool LCGenerator::setJD(QString Date, QString *JD, int JDType) else { const char* invalidJD = I18N_NOOP("No data available for JD prior to %d"); - KMessageBox::error(this, QString().sprintf(invalidJD, JDCutOff)); + KMessageBox::error(this, TQString().sprintf(invalidJD, JDCutOff)); return false; } } -void LCGenerator::DownloadCurve(QString FinalStartDate, QString FinalEndDate, QString FinalDesignation, QString AverageDay) +void LCGenerator::DownloadCurve(TQString FinalStartDate, TQString FinalEndDate, TQString FinalDesignation, TQString AverageDay) { - QString buf(Hostprefix); - QString Yes("yes"); - QString No("no"); + TQString buf(Hostprefix); + TQString Yes("yes"); + TQString No("no"); //FainterCheck; //CCDVCheck; @@ -397,7 +397,7 @@ void LCGenerator::DownloadCurve(QString FinalStartDate, QString FinalEndDate, QS KURL url(buf); - QString message = i18n( "Light Curve produced by the American Amateur Variable Star Observers" ); + TQString message = i18n( "Light Curve produced by the American Amateur Variable Star Observers" ); // parent of imageview is KStars new ImageViewer(&url, message, ksw, "lightcurve"); @@ -427,7 +427,7 @@ void LCGenerator::updateStarList() KURL saveFile (file->name()); downloadJob = KIO::file_copy (AAVSOFile, saveFile, -1, true); - connect (downloadJob, SIGNAL (result (KIO::Job *)), SLOT (downloadReady (KIO::Job *))); + connect (downloadJob, TQT_SIGNAL (result (KIO::Job *)), TQT_SLOT (downloadReady (KIO::Job *))); } void LCGenerator::downloadReady(KIO::Job * job) @@ -468,7 +468,7 @@ downloadJob = 0; } -void LCGenerator::closeEvent (QCloseEvent *ev) +void LCGenerator::closeEvent (TQCloseEvent *ev) { if (ev) // not if closeEvent (0) is called, because segfault ev->accept(); // parent-widgets should not get this event, so it will be filtered diff --git a/kstars/kstars/tools/lcgenerator.h b/kstars/kstars/tools/lcgenerator.h index 0aeb177f..0e676be6 100644 --- a/kstars/kstars/tools/lcgenerator.h +++ b/kstars/kstars/tools/lcgenerator.h @@ -27,7 +27,7 @@ #ifndef LCGENERATOR_H #define LCGENERATOR_H -#include <qvariant.h> +#include <tqvariant.h> #include <kdialogbase.h> #include <kio/job.h> @@ -47,8 +47,8 @@ class KStars; struct VariableStarInfo { - QString Name; - QString Designation; + TQString Name; + TQString Designation; }; class LCGenerator : public KDialogBase @@ -59,7 +59,7 @@ public: /**Constructor *@p parent pointer to the parent widget */ - LCGenerator( QWidget* parent = 0); + LCGenerator( TQWidget* parent = 0); /**Destructor */ ~LCGenerator(); @@ -74,7 +74,7 @@ private: *@param JDType start or end JD *@returns true if conversion is successful */ - bool setJD(QString date, QString * JD, int JDType); + bool setJD(TQString date, TQString * JD, int JDType); /** Parses star information and connects to the AAVSO server with the information embedded in the URL *@param FinalStartDate The start date in Julian days @@ -82,57 +82,57 @@ private: *@param FinalDesignation The AAVSO star designation *@param AverageDay Number of average days for binning the light curve */ - void DownloadCurve(QString FinalStartDate, QString FinalEndDate, QString FinalDesignation, QString AverageDay); + void DownloadCurve(TQString FinalStartDate, TQString FinalEndDate, TQString FinalDesignation, TQString AverageDay); KStars *ksw; - const QString Hostprefix; + const TQString Hostprefix; const int JDCutOff; - QGroupBox* StarInfoBox; - QLabel* desigLabel; + TQGroupBox* StarInfoBox; + TQLabel* desigLabel; KListBox* DesignationIn; - QLabel* nameLabel; + TQLabel* nameLabel; KListBox* NameIn; - QLabel* startLabel; + TQLabel* startLabel; KLineEdit* StartDateIn; - QLabel* endLabel; + TQLabel* endLabel; KLineEdit* EndDateIn; - QGroupBox* DataSelectBox; - QCheckBox* VisualCheck; - QCheckBox* FainterCheck; - QCheckBox* DiscrepantCheck; - QCheckBox* CCDBCheck; - QCheckBox* CCDVCheck; - QCheckBox* CCDRCheck; - QCheckBox* CCDICheck; - QLabel* plotLabel; + TQGroupBox* DataSelectBox; + TQCheckBox* VisualCheck; + TQCheckBox* FainterCheck; + TQCheckBox* DiscrepantCheck; + TQCheckBox* CCDBCheck; + TQCheckBox* CCDVCheck; + TQCheckBox* CCDRCheck; + TQCheckBox* CCDICheck; + TQLabel* plotLabel; KLineEdit* AverageDayIn; - QLabel* daysLabel; + TQLabel* daysLabel; KPushButton* GetCurveButton; KPushButton* UpdateListButton; KPushButton* CloseButton; - QVBoxLayout* LCGeneratorDialogLayout; - QHBoxLayout* SDLayout; - QVBoxLayout* StarInfoBoxLayout; - QHBoxLayout* DesignHLayout; - QHBoxLayout* NameHLayout; - QHBoxLayout* StartHLayout; - QHBoxLayout* EndHLayout; - QVBoxLayout* DataSelectBoxLayout; - QHBoxLayout* PlotHLayout; - QHBoxLayout* ButtonHLayout; + TQVBoxLayout* LCGeneratorDialogLayout; + TQHBoxLayout* SDLayout; + TQVBoxLayout* StarInfoBoxLayout; + TQHBoxLayout* DesignHLayout; + TQHBoxLayout* NameHLayout; + TQHBoxLayout* StartHLayout; + TQHBoxLayout* EndHLayout; + TQVBoxLayout* DataSelectBoxLayout; + TQHBoxLayout* PlotHLayout; + TQHBoxLayout* ButtonHLayout; KIO::Job *downloadJob; // download job of image -> 0 == no job is running - QFile *file; + TQFile *file; /**Make sure all events have been processed before closing the dialog - *@p ev pointer to the QCloseEvent object + *@p ev pointer to the TQCloseEvent object */ - void closeEvent (QCloseEvent *ev); + void closeEvent (TQCloseEvent *ev); public slots: /** Checks if a star name or designation exists in the database, diff --git a/kstars/kstars/tools/modcalcangdist.cpp b/kstars/kstars/tools/modcalcangdist.cpp index 40969152..750ae6d6 100644 --- a/kstars/kstars/tools/modcalcangdist.cpp +++ b/kstars/kstars/tools/modcalcangdist.cpp @@ -21,16 +21,16 @@ #include "dmsbox.h" #include "skypoint.h" -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qtextstream.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqtextstream.h> #include <klocale.h> #include <kfiledialog.h> #include <kmessagebox.h> //#include <kapplication.h> ..already included in modcalcapcoord.h -modCalcAngDist::modCalcAngDist(QWidget *parentSplit, const char *name) : modCalcAngDistDlg(parentSplit,name) { +modCalcAngDist::modCalcAngDist(TQWidget *parentSplit, const char *name) : modCalcAngDistDlg(parentSplit,name) { ra0Box->setDegType(FALSE); ra1Box->setDegType(FALSE); @@ -76,41 +76,41 @@ void modCalcAngDist::slotComputeDist(){ } void modCalcAngDist::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcAngDist::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcAngDist::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -118,20 +118,20 @@ void modCalcAngDist::slotRunBatch() { } } -//void modCalcAngDist::processLines( const QFile * fIn ) { -void modCalcAngDist::processLines( QTextStream &istream ) { +//void modCalcAngDist::processLines( const TQFile * fIn ) { +void modCalcAngDist::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; SkyPoint sp0, sp1; dms ra0B, dec0B, ra1B, dec1B, dist; @@ -142,7 +142,7 @@ void modCalcAngDist::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; diff --git a/kstars/kstars/tools/modcalcangdist.h b/kstars/kstars/tools/modcalcangdist.h index 27176945..ee13374a 100644 --- a/kstars/kstars/tools/modcalcangdist.h +++ b/kstars/kstars/tools/modcalcangdist.h @@ -36,7 +36,7 @@ class modCalcAngDist : public modCalcAngDistDlg { Q_OBJECT public: /**Constructor. */ - modCalcAngDist(QWidget *p, const char *n); + modCalcAngDist(TQWidget *p, const char *n); /**Destructor. */ ~modCalcAngDist(); @@ -49,7 +49,7 @@ public slots: private: /** Process Lines **/ - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); /**@returns a SkyPoint constructed from the coordinates in the RA and Dec dmsBoxes. */ SkyPoint getCoords(dmsBox * rBox, dmsBox* dBox); diff --git a/kstars/kstars/tools/modcalcapcoord.cpp b/kstars/kstars/tools/modcalcapcoord.cpp index 1c9a4578..27f4bc0c 100644 --- a/kstars/kstars/tools/modcalcapcoord.cpp +++ b/kstars/kstars/tools/modcalcapcoord.cpp @@ -26,18 +26,18 @@ #include "kstarsdatetime.h" #include "libkdeedu/extdate/extdatetimeedit.h" -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qdatetimeedit.h> //needed for QTimeEdit +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqdatetimeedit.h> //needed for QTimeEdit #include <klineedit.h> -#include <qtextstream.h> +#include <tqtextstream.h> #include <klocale.h> #include <kfiledialog.h> #include <kmessagebox.h> //#include <kapplication.h> ..already included in modcalcapcoord.h -modCalcApCoord::modCalcApCoord(QWidget *parentSplit, const char *name) : modCalcApCoordDlg(parentSplit,name) { +modCalcApCoord::modCalcApCoord(TQWidget *parentSplit, const char *name) : modCalcApCoordDlg(parentSplit,name) { showCurrentTime(); ra0Box->setDegType(FALSE); @@ -74,7 +74,7 @@ KStarsDateTime modCalcApCoord::getDateTime (void) return KStarsDateTime( datBox->date() , timBox->time() ); } -double modCalcApCoord::getEpoch (QString eName) { +double modCalcApCoord::getEpoch (TQString eName) { bool ok = false; double epoch = eName.toDouble(&ok); @@ -99,7 +99,7 @@ void modCalcApCoord::slotClearCoords(){ decfBox->clearFields(); epoch0Name->setText(""); datBox->setDate(ExtDate::currentDate()); - timBox->setTime(QTime(0,0,0)); + timBox->setTime(TQTime(0,0,0)); } void modCalcApCoord::slotComputeCoords(){ @@ -160,41 +160,41 @@ void modCalcApCoord::slotEpochCheckedBatch(){ } void modCalcApCoord::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcApCoord::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcApCoord::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -202,24 +202,24 @@ void modCalcApCoord::slotRunBatch() { } } -//void modCalcApCoord::processLines( const QFile * fIn ) { -void modCalcApCoord::processLines( QTextStream &istream ) { +//void modCalcApCoord::processLines( const TQFile * fIn ) { +void modCalcApCoord::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; long double jd, jd0; SkyPoint sp; - QTime utB; + TQTime utB; ExtDate dtB; dms raB, decB; double epoch0B; @@ -230,14 +230,14 @@ void modCalcApCoord::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; // Read Ut and write in ostream if corresponds if(utCheckBatch->isChecked() ) { - utB = QTime::fromString( fields[i] ); + utB = TQTime::fromString( fields[i] ); i++; } else utB = utBoxBatch->time(); diff --git a/kstars/kstars/tools/modcalcapcoord.h b/kstars/kstars/tools/modcalcapcoord.h index dae968fe..4ac09b38 100644 --- a/kstars/kstars/tools/modcalcapcoord.h +++ b/kstars/kstars/tools/modcalcapcoord.h @@ -38,7 +38,7 @@ class modCalcApCoord : public modCalcApCoordDlg { Q_OBJECT public: /**Constructor. */ - modCalcApCoord(QWidget *p, const char *n); + modCalcApCoord(TQWidget *p, const char *n); /**Destructor. */ ~modCalcApCoord(); @@ -49,8 +49,8 @@ public: SkyPoint apparentCoordinates (dms r0, dms d0, long double j0, long double jf); /** Process Lines **/ -// void processLines( const QFile * f ); - void processLines( QTextStream &istream ); +// void processLines( const TQFile * f ); + void processLines( TQTextStream &istream ); public slots: @@ -78,7 +78,7 @@ private: KStarsDateTime getDateTime (void); /**Parse the string argument as a double */ - double getEpoch (QString eName); + double getEpoch (TQString eName); /**Fill the RA and Dec dmsBoxes with values of the SkyPoint argument. */ void showEquCoords ( SkyPoint sp ); diff --git a/kstars/kstars/tools/modcalcazel.cpp b/kstars/kstars/tools/modcalcazel.cpp index a9ba9881..a2dee393 100644 --- a/kstars/kstars/tools/modcalcazel.cpp +++ b/kstars/kstars/tools/modcalcazel.cpp @@ -27,16 +27,16 @@ #include "kstarsdatetime.h" #include "libkdeedu/extdate/extdatetimeedit.h" -#include <qdatetimeedit.h> //need for QTimeEdit -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqdatetimeedit.h> //need for QTimeEdit +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kfiledialog.h> #include <kmessagebox.h> -modCalcAzel::modCalcAzel(QWidget *parentSplit, const char *name) : modCalcAzelDlg (parentSplit,name) { +modCalcAzel::modCalcAzel(TQWidget *parentSplit, const char *name) : modCalcAzelDlg (parentSplit,name) { showCurrentDateTime(); initGeo(); @@ -94,7 +94,7 @@ KStarsDateTime modCalcAzel::getDateTime (void) return KStarsDateTime( datBox->date() , timBox->time() ); } -double modCalcAzel::getEpoch (QString eName) +double modCalcAzel::getEpoch (TQString eName) { bool ok = false; double epoch = eName.toDouble(&ok); @@ -180,7 +180,7 @@ void modCalcAzel::slotClearCoords() epochName->setText(""); datBox->setDate(ExtDate::currentDate()); - timBox->setTime(QTime(0,0,0)); + timBox->setTime(TQTime(0,0,0)); } @@ -307,40 +307,40 @@ void modCalcAzel::equNoCheck() { void modCalcAzel::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcAzel::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcAzel::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -348,26 +348,26 @@ void modCalcAzel::slotRunBatch() { } } -void modCalcAzel::processLines( QTextStream &istream ) { +void modCalcAzel::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; long double jd0, jdf; dms LST; SkyPoint sp; dms raB, decB, latB, longB, azB, elB; double epoch0B; - QTime utB; + TQTime utB; ExtDate dtB; while ( ! istream.eof() ) { @@ -376,14 +376,14 @@ void modCalcAzel::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; // Read Ut and write in ostream if corresponds if(utCheckBatch->isChecked() ) { - utB = QTime::fromString( fields[i] ); + utB = TQTime::fromString( fields[i] ); i++; } else utB = utBoxBatch->time(); diff --git a/kstars/kstars/tools/modcalcazel.h b/kstars/kstars/tools/modcalcazel.h index 9bbe0546..9ef67f6f 100644 --- a/kstars/kstars/tools/modcalcazel.h +++ b/kstars/kstars/tools/modcalcazel.h @@ -19,7 +19,7 @@ #define MODCALCAZEL_H #include <kapplication.h> -#include <qwidget.h> +#include <tqwidget.h> #include "modcalcazeldlg.h" class QWidget; @@ -37,7 +37,7 @@ class modCalcAzel : public modCalcAzelDlg { Q_OBJECT public: - modCalcAzel(QWidget *p, const char *n); + modCalcAzel(TQWidget *p, const char *n); ~modCalcAzel(); public slots: @@ -80,7 +80,7 @@ private: * @param eName String from which the epoch is to be constructed * once it is converted to a double */ - double getEpoch (QString eName); + double getEpoch (TQString eName); /**Fill the Az and El dmsBoxes with values of the SkyPoint argument. * @param sp SkypPoint object which contains the coordinates to @@ -114,7 +114,7 @@ private: void horNoCheck(); void equNoCheck(); - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); GeoLocation *geoPlace; bool horInputCoords; diff --git a/kstars/kstars/tools/modcalcdaylength.cpp b/kstars/kstars/tools/modcalcdaylength.cpp index 9a31dfe2..dcfba7bd 100644 --- a/kstars/kstars/tools/modcalcdaylength.cpp +++ b/kstars/kstars/tools/modcalcdaylength.cpp @@ -30,7 +30,7 @@ #include <kapplication.h> -modCalcDayLength::modCalcDayLength(QWidget *parentSplit, const char *name) : modCalcDayLengthDlg(parentSplit,name) { +modCalcDayLength::modCalcDayLength(TQWidget *parentSplit, const char *name) : modCalcDayLengthDlg(parentSplit,name) { showCurrentDate(); initGeo(); show(); @@ -61,7 +61,7 @@ void modCalcDayLength::getGeoLocation (void) KStarsDateTime modCalcDayLength::getDateTime (void) { - return KStarsDateTime( datBox->date() , QTime(8,0,0) ); + return KStarsDateTime( datBox->date() , TQTime(8,0,0) ); } void modCalcDayLength::slotClearCoords(){ @@ -82,10 +82,10 @@ void modCalcDayLength::slotClearCoords(){ dayLBox->clearFields(); } -QTime modCalcDayLength::lengthOfDay(QTime setQTime, QTime riseQTime){ - QTime dL(0,0,0); +TQTime modCalcDayLength::lengthOfDay(TQTime setQTime, TQTime riseQTime){ + TQTime dL(0,0,0); int dds = riseQTime.secsTo(setQTime); - QTime dLength = dL.addSecs( dds ); + TQTime dLength = dL.addSecs( dds ); return dLength; } @@ -99,9 +99,9 @@ void modCalcDayLength::slotComputePosTime() KSSun *Sun = new KSSun(((KStars*) parent()->parent()->parent())->data()); Sun->findPosition(num); - QTime setQtime = Sun->riseSetTime( jd0 , geoPlace, false ); - QTime riseQtime = Sun->riseSetTime( jd0 , geoPlace, true ); - QTime transitQtime = Sun->transitTime(jd0 , geoPlace); + TQTime setQtime = Sun->riseSetTime( jd0 , geoPlace, false ); + TQTime riseQtime = Sun->riseSetTime( jd0 , geoPlace, true ); + TQTime transitQtime = Sun->transitTime(jd0 , geoPlace); dms setAz = Sun->riseSetTimeAz(jd0, geoPlace, false); dms riseAz = Sun->riseSetTimeAz(jd0, geoPlace, true); @@ -116,7 +116,7 @@ void modCalcDayLength::slotComputePosTime() riseTimeBox->showTime( riseQtime ); transitTimeBox->showTime( transitQtime ); - QTime dayLQtime = lengthOfDay (setQtime,riseQtime); + TQTime dayLQtime = lengthOfDay (setQtime,riseQtime); dayLBox->showTime( dayLQtime ); } else if (transAlt.Degrees() > 0. ) { @@ -139,7 +139,7 @@ void modCalcDayLength::slotComputePosTime() riseTimeBox->clearFields(); transitTimeBox->clearFields(); - dayLBox->showTime( QTime(0,0,0) ); + dayLBox->showTime( TQTime(0,0,0) ); } delete num; diff --git a/kstars/kstars/tools/modcalcdaylength.h b/kstars/kstars/tools/modcalcdaylength.h index 1c644157..4ad88142 100644 --- a/kstars/kstars/tools/modcalcdaylength.h +++ b/kstars/kstars/tools/modcalcdaylength.h @@ -32,7 +32,7 @@ class modCalcDayLength : public modCalcDayLengthDlg { Q_OBJECT public: /**Constructor. */ - modCalcDayLength(QWidget *p, const char *n); + modCalcDayLength(TQWidget *p, const char *n); /**Destructor. */ ~modCalcDayLength(); @@ -44,7 +44,7 @@ public slots: private: /**@returns a SkyPoint constructed from the coordinates in the RA and Dec dmsBoxes. */ - QTime lengthOfDay(QTime setQTime, QTime riseQTime); + TQTime lengthOfDay(TQTime setQTime, TQTime riseQTime); /**Fills the Date fields with the current values from the current date. */ void showCurrentDate(void); diff --git a/kstars/kstars/tools/modcalceclipticcoords.cpp b/kstars/kstars/tools/modcalceclipticcoords.cpp index 36a7e75b..c2873aa1 100644 --- a/kstars/kstars/tools/modcalceclipticcoords.cpp +++ b/kstars/kstars/tools/modcalceclipticcoords.cpp @@ -23,11 +23,11 @@ #include "ksutils.h" #include "ksnumbers.h" #include "kstarsdatetime.h" -#include <qradiobutton.h> -#include <qstring.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qtextstream.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqtextstream.h> #include <klocale.h> #include <klineedit.h> #include <kapplication.h> @@ -35,7 +35,7 @@ #include <kmessagebox.h> -modCalcEclCoords::modCalcEclCoords(QWidget *parentSplit, const char *name) : modCalcEclCoordsDlg(parentSplit,name) { +modCalcEclCoords::modCalcEclCoords(TQWidget *parentSplit, const char *name) : modCalcEclCoordsDlg(parentSplit,name) { equRadio->setChecked(TRUE); raBox->setDegType(FALSE); @@ -59,7 +59,7 @@ void modCalcEclCoords::getEquCoords (void) { epoch = getEpoch( epochName->text() ); } -double modCalcEclCoords::getEpoch (QString eName) { +double modCalcEclCoords::getEpoch (TQString eName) { double epoch = eName.toDouble(); @@ -201,41 +201,41 @@ void modCalcEclCoords::slotEclLongCheckedBatch(){ } void modCalcEclCoords::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcEclCoords::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcEclCoords::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -243,19 +243,19 @@ void modCalcEclCoords::slotRunBatch() { } } -void modCalcEclCoords::processLines( QTextStream &istream ) { +void modCalcEclCoords::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; SkyPoint sp; dms raB, decB, eclLatB, eclLongB; @@ -267,7 +267,7 @@ void modCalcEclCoords::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; diff --git a/kstars/kstars/tools/modcalceclipticcoords.h b/kstars/kstars/tools/modcalceclipticcoords.h index 809928c9..30757201 100644 --- a/kstars/kstars/tools/modcalceclipticcoords.h +++ b/kstars/kstars/tools/modcalceclipticcoords.h @@ -37,12 +37,12 @@ Q_OBJECT public: - modCalcEclCoords(QWidget *p, const char *n); + modCalcEclCoords(TQWidget *p, const char *n); ~modCalcEclCoords(); void getEclCoords (void); void getEquCoords (void); - double getEpoch( QString t ); + double getEpoch( TQString t ); void showEquCoords(void); void showEclCoords(void); void EclToEqu(void); @@ -64,7 +64,7 @@ public slots: private: void equCheck(void); void eclCheck(void); - void processLines( QTextStream &is ); + void processLines( TQTextStream &is ); dms eclipLong, eclipLat, raCoord, decCoord; double epoch; diff --git a/kstars/kstars/tools/modcalcequinox.cpp b/kstars/kstars/tools/modcalcequinox.cpp index 01d89447..ba749698 100644 --- a/kstars/kstars/tools/modcalcequinox.cpp +++ b/kstars/kstars/tools/modcalcequinox.cpp @@ -25,15 +25,15 @@ #include "kssun.h" #include "libkdeedu/extdate/extdatetimeedit.h" -#include <qcombobox.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqcombobox.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kfiledialog.h> #include <kmessagebox.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> -modCalcEquinox::modCalcEquinox(QWidget *parentSplit, const char *name) +modCalcEquinox::modCalcEquinox(TQWidget *parentSplit, const char *name) : modCalcEquinoxDlg (parentSplit,name) { showCurrentYear(); show(); @@ -42,7 +42,7 @@ modCalcEquinox::modCalcEquinox(QWidget *parentSplit, const char *name) modCalcEquinox::~modCalcEquinox(){ } -int modCalcEquinox::getYear (QString eName) +int modCalcEquinox::getYear (TQString eName) { bool ok = FALSE; int equinoxYear = eName.toInt(&ok); @@ -57,7 +57,7 @@ int modCalcEquinox::getYear (QString eName) void modCalcEquinox::showCurrentYear (void) { KStarsDateTime dt( KStarsDateTime::currentDateTime() ); - yearEdit->setText( QString( "%1").arg( dt.date().year() ) ); + yearEdit->setText( TQString( "%1").arg( dt.date().year() ) ); } void modCalcEquinox::slotComputeEquinoxesAndSolstices (void) @@ -104,7 +104,7 @@ void modCalcEquinox::showStartDateTime(long double jd) void modCalcEquinox::showSeasonDuration(float deltaJd) { - seasonDuration->setText( QString( "%1").arg( deltaJd ) ); + seasonDuration->setText( TQString( "%1").arg( deltaJd ) ); } void modCalcEquinox::slotYearCheckedBatch(){ @@ -116,41 +116,41 @@ void modCalcEquinox::slotYearCheckedBatch(){ } void modCalcEquinox::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcEquinox::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcEquinox::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -158,19 +158,19 @@ void modCalcEquinox::slotRunBatch() { } } -void modCalcEquinox::processLines( QTextStream &istream ) { +void modCalcEquinox::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int yearB; int i = 0; long double jdsp = 0., jdsu = 0., jdau = 0., jdwin = 0., jdsp1 = 0.; @@ -183,7 +183,7 @@ void modCalcEquinox::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; diff --git a/kstars/kstars/tools/modcalcequinox.h b/kstars/kstars/tools/modcalcequinox.h index 25645202..14e664a2 100644 --- a/kstars/kstars/tools/modcalcequinox.h +++ b/kstars/kstars/tools/modcalcequinox.h @@ -19,7 +19,7 @@ #define MODCALCEQUINOX_H #include <kapplication.h> -#include <qwidget.h> +#include <tqwidget.h> #include "modcalcequinoxdlg.h" class QWidget; @@ -34,7 +34,7 @@ class modCalcEquinox : public modCalcEquinoxDlg { Q_OBJECT public: - modCalcEquinox(QWidget *p, const char *n); + modCalcEquinox(TQWidget *p, const char *n); ~modCalcEquinox(); public slots: @@ -48,11 +48,11 @@ public slots: private: - int getYear (QString eName); + int getYear (TQString eName); void showCurrentYear (void); void showStartDateTime(long double jd); void showSeasonDuration(float deltaJd); - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); }; diff --git a/kstars/kstars/tools/modcalcgalcoord.cpp b/kstars/kstars/tools/modcalcgalcoord.cpp index 0ec896db..18638a6c 100644 --- a/kstars/kstars/tools/modcalcgalcoord.cpp +++ b/kstars/kstars/tools/modcalcgalcoord.cpp @@ -22,11 +22,11 @@ #include "modcalcgalcoord.moc" #include "kstarsdatetime.h" -#include <qradiobutton.h> -#include <qstring.h> -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qtextstream.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqtextstream.h> #include <klocale.h> #include <klineedit.h> #include <kapplication.h> @@ -34,7 +34,7 @@ #include <kmessagebox.h> -modCalcGalCoord::modCalcGalCoord(QWidget *parentSplit, const char *name) : modCalcGalCoordDlg(parentSplit,name) { +modCalcGalCoord::modCalcGalCoord(TQWidget *parentSplit, const char *name) : modCalcGalCoordDlg(parentSplit,name) { equRadio->setChecked(TRUE); raBox->setDegType(FALSE); @@ -58,7 +58,7 @@ void modCalcGalCoord::getEquCoords (void) { epoch = getEpoch( epochName->text() ); } -double modCalcGalCoord::getEpoch (QString eName) { +double modCalcGalCoord::getEpoch (TQString eName) { double epoch = eName.toDouble(); @@ -203,41 +203,41 @@ void modCalcGalCoord::slotGalLongCheckedBatch(){ } void modCalcGalCoord::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcGalCoord::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcGalCoord::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -245,19 +245,19 @@ void modCalcGalCoord::slotRunBatch() { } } -void modCalcGalCoord::processLines( QTextStream &istream ) { +void modCalcGalCoord::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; SkyPoint sp; dms raB, decB, galLatB, galLongB; @@ -270,7 +270,7 @@ void modCalcGalCoord::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; diff --git a/kstars/kstars/tools/modcalcgalcoord.h b/kstars/kstars/tools/modcalcgalcoord.h index 94acd572..b8b918b5 100644 --- a/kstars/kstars/tools/modcalcgalcoord.h +++ b/kstars/kstars/tools/modcalcgalcoord.h @@ -36,7 +36,7 @@ Q_OBJECT public: - modCalcGalCoord(QWidget *p, const char *n); + modCalcGalCoord(TQWidget *p, const char *n); ~modCalcGalCoord(); /** * Obtains the galactic coords. from the Box. @@ -44,7 +44,7 @@ public: void getGalCoords (void); void getEquCoords (void); void getEpoch (void); - double getEpoch( QString t ); + double getEpoch( TQString t ); void showEquCoords(void); void showGalCoords(void); void GalToEqu(void); @@ -66,7 +66,7 @@ public slots: private: void equCheck(void); void galCheck(void); - void processLines( QTextStream &is ); + void processLines( TQTextStream &is ); dms galLong, galLat, raCoord, decCoord; double epoch; diff --git a/kstars/kstars/tools/modcalcgeodcoord.cpp b/kstars/kstars/tools/modcalcgeodcoord.cpp index dd913ef6..dd03ccd2 100644 --- a/kstars/kstars/tools/modcalcgeodcoord.cpp +++ b/kstars/kstars/tools/modcalcgeodcoord.cpp @@ -22,10 +22,10 @@ #include "geolocation.h" #include "kstars.h" -#include <qradiobutton.h> -#include <qstring.h> -#include <qcheckbox.h> -#include <qtextstream.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqcheckbox.h> +#include <tqtextstream.h> #include <kcombobox.h> #include <klineedit.h> @@ -37,7 +37,7 @@ #include <kmessagebox.h> -modCalcGeodCoord::modCalcGeodCoord(QWidget *parentSplit, const char *name) : modCalcGeodCoordDlg(parentSplit,name) { +modCalcGeodCoord::modCalcGeodCoord(TQWidget *parentSplit, const char *name) : modCalcGeodCoordDlg(parentSplit,name) { static const char *ellipsoidList[] = { "IAU76", "GRS80", "MERIT83", "WGS84", "IERS89"}; @@ -61,7 +61,7 @@ void modCalcGeodCoord::showLongLat(void) KStars *ks = (KStars*) parent()->parent()->parent(); // QSplitter->AstroCalc->KStars lonGeoBox->show( ks->geo()->lng() ); latGeoBox->show( ks->geo()->lat() ); - altGeoBox->setText( QString("0.0") ); + altGeoBox->setText( TQString("0.0") ); } void modCalcGeodCoord::setEllipsoid(int index) { @@ -213,42 +213,42 @@ void modCalcGeodCoord::slotZCheckedBatch(){ } void modCalcGeodCoord::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcGeodCoord::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcGeodCoord::slotRunBatch(void) { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -256,19 +256,19 @@ void modCalcGeodCoord::slotRunBatch(void) { } } -void modCalcGeodCoord::processLines( QTextStream &istream ) { +void modCalcGeodCoord::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; GeoLocation *geoPl = new GeoLocation(); geoPl->setEllipsoid(0); @@ -283,7 +283,7 @@ void modCalcGeodCoord::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; diff --git a/kstars/kstars/tools/modcalcgeodcoord.h b/kstars/kstars/tools/modcalcgeodcoord.h index e4ae86e2..9cad095a 100644 --- a/kstars/kstars/tools/modcalcgeodcoord.h +++ b/kstars/kstars/tools/modcalcgeodcoord.h @@ -40,7 +40,7 @@ class modCalcGeodCoord : public modCalcGeodCoordDlg { Q_OBJECT public: - modCalcGeodCoord(QWidget *p, const char *n); + modCalcGeodCoord(TQWidget *p, const char *n); ~modCalcGeodCoord(); void genGeoCoords(void); @@ -67,12 +67,12 @@ class modCalcGeodCoord : public modCalcGeodCoordDlg { void geoCheck(void); void xyzCheck(void); void showLongLat(void); - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); void slotRunBatch(void); -// QRadioButton *cartRadio, *spheRadio; -// QVBox *vbox, *rightBox; -// QLineEdit *xGeoName, *yGeoName, *zGeoName, *altGeoName; +// TQRadioButton *cartRadio, *spheRadio; +// TQVBox *vbox, *rightBox; +// TQLineEdit *xGeoName, *yGeoName, *zGeoName, *altGeoName; // dmsBox *timeBox, *dateBox, *lonGeoBox, *latGeoBox; GeoLocation *geoPlace; diff --git a/kstars/kstars/tools/modcalcjd.cpp b/kstars/kstars/tools/modcalcjd.cpp index 68434f39..99271d34 100644 --- a/kstars/kstars/tools/modcalcjd.cpp +++ b/kstars/kstars/tools/modcalcjd.cpp @@ -22,8 +22,8 @@ #include "geolocation.h" #include "libkdeedu/extdate/extdatetimeedit.h" -#include <qdatetimeedit.h> //need for QTimeEdit -#include <qradiobutton.h> +#include <tqdatetimeedit.h> //need for QTimeEdit +#include <tqradiobutton.h> #include <klineedit.h> #include <klocale.h> #include <kglobal.h> @@ -32,7 +32,7 @@ #define MJD0 2400000.5 -modCalcJD::modCalcJD(QWidget *parentSplit, const char *name) : modCalcJdDlg(parentSplit,name) { +modCalcJD::modCalcJD(TQWidget *parentSplit, const char *name) : modCalcJdDlg(parentSplit,name) { showCurrentTime(); show(); @@ -96,7 +96,7 @@ void modCalcJD::slotClearTime (void) JdName->setText (""); MjdName->setText (""); datBox->setDate( ExtDate::currentDate() ); - timBox->setTime(QTime(0,0,0)); + timBox->setTime(TQTime(0,0,0)); } void modCalcJD::showCurrentTime (void) diff --git a/kstars/kstars/tools/modcalcjd.h b/kstars/kstars/tools/modcalcjd.h index 054e2156..321e61e8 100644 --- a/kstars/kstars/tools/modcalcjd.h +++ b/kstars/kstars/tools/modcalcjd.h @@ -18,7 +18,7 @@ #ifndef MODCALCJD_H #define MODCALCJD_H -#include <qvbox.h> +#include <tqvbox.h> #include <kapplication.h> #include "modcalcjddlg.h" @@ -40,7 +40,7 @@ class modCalcJD : public modCalcJdDlg { Q_OBJECT public: - modCalcJD(QWidget *p, const char *n); + modCalcJD(TQWidget *p, const char *n); ~modCalcJD(); void computeFromCalendar (void); diff --git a/kstars/kstars/tools/modcalcplanets.cpp b/kstars/kstars/tools/modcalcplanets.cpp index c927d71e..e9053bd5 100644 --- a/kstars/kstars/tools/modcalcplanets.cpp +++ b/kstars/kstars/tools/modcalcplanets.cpp @@ -28,17 +28,17 @@ #include "libkdeedu/extdate/extdatetimeedit.h" #include "ksnumbers.h" -#include <qcombobox.h> -#include <qdatetimeedit.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqcombobox.h> +#include <tqdatetimeedit.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kfiledialog.h> #include <kmessagebox.h> -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> -modCalcPlanets::modCalcPlanets(QWidget *parentSplit, const char *name) : modCalcPlanetsDlg (parentSplit,name) { +modCalcPlanets::modCalcPlanets(TQWidget *parentSplit, const char *name) : modCalcPlanetsDlg (parentSplit,name) { showCurrentDateTime(); showLongLat(); raBox->setDegType(FALSE); @@ -288,39 +288,39 @@ void modCalcPlanets::slotLatCheckedBatch(){ } void modCalcPlanets::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcPlanets::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcPlanets::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -346,23 +346,23 @@ unsigned int modCalcPlanets::requiredBatchFields(void) { } -void modCalcPlanets::processLines( QTextStream &istream ) { +void modCalcPlanets::processLines( TQTextStream &istream ) { // we open the output file - QString outputFileName, lineToWrite; + TQString outputFileName, lineToWrite; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); bool lineIsValid = true; - QString message; + TQString message; - QString line; - QString space = " "; - QString planetB; + TQString line; + TQString space = " "; + TQString planetB; unsigned int i = 0, nline = 0; - QTime utB; + TQTime utB; ExtDate dtB; dms longB, latB, hlongB, hlatB, glongB, glatB, raB, decB, azmB, altB; double rSunB(0.0), rEarthB(0.0); @@ -370,7 +370,7 @@ void modCalcPlanets::processLines( QTextStream &istream ) { PlanetCatalog PCat( kd ); PCat.initialize(); - QString pName[11], pNamei18n[11]; + TQString pName[11], pNamei18n[11]; pName[0] = "Mercury"; pNamei18n[0]= i18n("Mercury"); pName[1] = "Venus"; pNamei18n[1]= i18n("Venus"); @@ -393,7 +393,7 @@ void modCalcPlanets::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); if (fields.count() != numberOfRequiredFields ) { lineIsValid = false; @@ -411,7 +411,7 @@ void modCalcPlanets::processLines( QTextStream &istream ) { int j = 0; while (j < 11) { //while (result != 0 && j < 11) { - result = QString::compare( pNamei18n[j] , planetB ); + result = TQString::compare( pNamei18n[j] , planetB ); if (result == 0) break; j++; @@ -439,7 +439,7 @@ void modCalcPlanets::processLines( QTextStream &istream ) { // Read Ut and write in ostream if corresponds if(utCheckBatch->isChecked() ) { - utB = QTime::fromString( fields[i] ); + utB = TQTime::fromString( fields[i] ); if ( !utB.isValid() ) { kdWarning() << i18n( "Line %1 contains an invalid time" ).arg(nline) << endl; lineIsValid=false; @@ -522,7 +522,7 @@ void modCalcPlanets::processLines( QTextStream &istream ) { int jp = -1; while (result != 0 && jp < 10) { jp++; - result = QString::compare( pNamei18n[jp] , planetB ); + result = TQString::compare( pNamei18n[jp] , planetB ); } if (jp < 11) { @@ -583,7 +583,7 @@ void modCalcPlanets::processLines( QTextStream &istream ) { } if (!lineIsValid) { - QString message = i18n("Errors found while parsing some lines in the input file"); + TQString message = i18n("Errors found while parsing some lines in the input file"); KMessageBox::sorry( 0, message, i18n( "Errors in lines" ) ); } diff --git a/kstars/kstars/tools/modcalcplanets.h b/kstars/kstars/tools/modcalcplanets.h index c3d6bceb..51451763 100644 --- a/kstars/kstars/tools/modcalcplanets.h +++ b/kstars/kstars/tools/modcalcplanets.h @@ -19,7 +19,7 @@ #define MODCALCPLANETS_H #include <kapplication.h> -#include <qwidget.h> +#include <tqwidget.h> #include "modcalcplanetsdlg.h" #include "geolocation.h" #include "kstarsdatetime.h" @@ -40,7 +40,7 @@ class modCalcPlanets : public modCalcPlanetsDlg { Q_OBJECT public: - modCalcPlanets(QWidget *p, const char *n); + modCalcPlanets(TQWidget *p, const char *n); ~modCalcPlanets(); public slots: @@ -55,7 +55,7 @@ public slots: void slotInputFile(); void slotOutputFile(); void slotRunBatch(); - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); //void slotInputFile(); //void slotOutputFile(); //void slotRunBatch(); @@ -76,7 +76,7 @@ private: void showTopocentricCoords( const dms *az, const dms *el); unsigned int requiredBatchFields(void); - // void processLines( QTextStream &istream ); + // void processLines( TQTextStream &istream ); }; diff --git a/kstars/kstars/tools/modcalcprec.cpp b/kstars/kstars/tools/modcalcprec.cpp index 236bad05..ddf71e2e 100644 --- a/kstars/kstars/tools/modcalcprec.cpp +++ b/kstars/kstars/tools/modcalcprec.cpp @@ -22,16 +22,16 @@ #include "dms.h" #include "kstarsdatetime.h" -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qtextstream.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqtextstream.h> #include <klocale.h> #include <klineedit.h> #include <kapplication.h> #include <kfiledialog.h> #include <kmessagebox.h> -modCalcPrec::modCalcPrec(QWidget *parentSplit, const char *name) : modCalcPrecDlg(parentSplit,name) { +modCalcPrec::modCalcPrec(TQWidget *parentSplit, const char *name) : modCalcPrecDlg(parentSplit,name) { ra0Box->setDegType(FALSE); rafBox->setDegType(FALSE); @@ -54,10 +54,10 @@ SkyPoint modCalcPrec::getEquCoords (void) { return sp; } -QString modCalcPrec:: showCurrentEpoch () { +TQString modCalcPrec:: showCurrentEpoch () { double epoch = setCurrentEpoch(); - QString eName = QString("%1").arg(epoch,7,'f',2); + TQString eName = TQString("%1").arg(epoch,7,'f',2); return eName; } @@ -66,7 +66,7 @@ double modCalcPrec::setCurrentEpoch () { return KStarsDateTime::currentDateTime().epoch(); } -double modCalcPrec::getEpoch (QString eName) { +double modCalcPrec::getEpoch (TQString eName) { bool ok = false; double epoch = eName.toDouble(&ok); @@ -152,13 +152,13 @@ void modCalcPrec::slotTargetEpochCheckedBatch(){ } void modCalcPrec::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcPrec::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); @@ -167,28 +167,28 @@ void modCalcPrec::slotOutputFile() { void modCalcPrec::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -196,19 +196,19 @@ void modCalcPrec::slotRunBatch() { } } -void modCalcPrec::processLines( QTextStream &istream ) { +void modCalcPrec::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; long double jd0, jdf; SkyPoint sp; @@ -222,7 +222,7 @@ void modCalcPrec::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; diff --git a/kstars/kstars/tools/modcalcprec.h b/kstars/kstars/tools/modcalcprec.h index f5b28078..bd70a44d 100644 --- a/kstars/kstars/tools/modcalcprec.h +++ b/kstars/kstars/tools/modcalcprec.h @@ -39,7 +39,7 @@ class modCalcPrec : public modCalcPrecDlg { Q_OBJECT public: - modCalcPrec(QWidget *p, const char *n); + modCalcPrec(TQWidget *p, const char *n); ~modCalcPrec(); SkyPoint precess (dms ra0, dms dec0, double e0, double ef); @@ -56,11 +56,11 @@ public slots: private: SkyPoint getEquCoords(void); - QString showCurrentEpoch(void); + TQString showCurrentEpoch(void); double setCurrentEpoch(void); - double getEpoch (QString eName); + double getEpoch (TQString eName); void showEquCoords ( SkyPoint sp ); - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); }; diff --git a/kstars/kstars/tools/modcalcsidtime.cpp b/kstars/kstars/tools/modcalcsidtime.cpp index b8eccfe5..33cc03c9 100644 --- a/kstars/kstars/tools/modcalcsidtime.cpp +++ b/kstars/kstars/tools/modcalcsidtime.cpp @@ -15,11 +15,11 @@ * * ***************************************************************************/ -#include <qdatetimeedit.h> //need for QTimeEdit -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqdatetimeedit.h> //need for QTimeEdit +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kfiledialog.h> #include <kmessagebox.h> @@ -32,7 +32,7 @@ #include "simclock.h" #include "libkdeedu/extdate/extdatetimeedit.h" -modCalcSidTime::modCalcSidTime(QWidget *parentSplit, const char *name) : modCalcSidTimeDlg (parentSplit,name) { +modCalcSidTime::modCalcSidTime(TQWidget *parentSplit, const char *name) : modCalcSidTimeDlg (parentSplit,name) { showCurrentTimeAndLong(); show(); @@ -53,37 +53,37 @@ void modCalcSidTime::showCurrentTimeAndLong (void) longBox->show( ks->geo()->lng() ); } -QTime modCalcSidTime::computeUTtoST (QTime ut, ExtDate dt, dms longitude) +TQTime modCalcSidTime::computeUTtoST (TQTime ut, ExtDate dt, dms longitude) { KStarsDateTime utdt = KStarsDateTime( dt, ut); dms st = longitude.Degrees() + utdt.gst().Degrees(); - return QTime( st.hour(), st.minute(), st.second() ); + return TQTime( st.hour(), st.minute(), st.second() ); } -QTime modCalcSidTime::computeSTtoUT (QTime st, ExtDate dt, dms longitude) +TQTime modCalcSidTime::computeSTtoUT (TQTime st, ExtDate dt, dms longitude) { - KStarsDateTime dtt = KStarsDateTime( dt, QTime()); + KStarsDateTime dtt = KStarsDateTime( dt, TQTime()); dms lst(st.hour(), st.minute(), st.second()); dms gst( lst.Degrees() - longitude.Degrees() ); return dtt.GSTtoUT( gst ); } -void modCalcSidTime::showUT( QTime dt ) +void modCalcSidTime::showUT( TQTime dt ) { UtBox->setTime( dt ); } -void modCalcSidTime::showST( QTime st ) +void modCalcSidTime::showST( TQTime st ) { StBox->setTime( st ); } -QTime modCalcSidTime::getUT( void ) +TQTime modCalcSidTime::getUT( void ) { return UtBox->time(); } -QTime modCalcSidTime::getST( void ) +TQTime modCalcSidTime::getST( void ) { return StBox->time(); } @@ -100,13 +100,13 @@ dms modCalcSidTime::getLongitude( void ) void modCalcSidTime::slotClearFields(){ datBox->setDate(ExtDate::currentDate()); - QTime time(0,0,0); + TQTime time(0,0,0); UtBox->setTime(time); StBox->setTime(time); } void modCalcSidTime::slotComputeTime(){ - QTime ut, st; + TQTime ut, st; ExtDate dt = getDate(); dms longitude = getLongitude(); @@ -169,13 +169,13 @@ void modCalcSidTime::utNoCheck() { } void modCalcSidTime::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcSidTime::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } @@ -183,28 +183,28 @@ void modCalcSidTime::slotOutputFile() { void modCalcSidTime::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -212,24 +212,24 @@ void modCalcSidTime::slotRunBatch() { } } -void modCalcSidTime::processLines( QTextStream &istream ) { +void modCalcSidTime::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; long double jd0, jdf; dms longB, LST; double epoch0B(0.0); - QTime utB, stB; + TQTime utB, stB; ExtDate dtB; while ( ! istream.eof() ) { @@ -238,7 +238,7 @@ void modCalcSidTime::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; @@ -284,7 +284,7 @@ void modCalcSidTime::processLines( QTextStream &istream ) { // Read Ut and write in ostream if corresponds if(utCheckBatch->isChecked() ) { - utB = QTime::fromString( fields[i] ); + utB = TQTime::fromString( fields[i] ); i++; } else utB = utBoxBatch->time(); @@ -304,7 +304,7 @@ void modCalcSidTime::processLines( QTextStream &istream ) { } else { if(stCheckBatch->isChecked() ) { - stB = QTime::fromString( fields[i] ); + stB = TQTime::fromString( fields[i] ); i++; } else stB = stBoxBatch->time(); diff --git a/kstars/kstars/tools/modcalcsidtime.h b/kstars/kstars/tools/modcalcsidtime.h index 8e0f3842..30caf7a7 100644 --- a/kstars/kstars/tools/modcalcsidtime.h +++ b/kstars/kstars/tools/modcalcsidtime.h @@ -40,11 +40,11 @@ Q_OBJECT public: - modCalcSidTime(QWidget *p, const char *n); + modCalcSidTime(TQWidget *p, const char *n); ~modCalcSidTime(); - QTime computeUTtoST (QTime u, ExtDate d, dms l); - QTime computeSTtoUT (QTime s, ExtDate d, dms l); + TQTime computeUTtoST (TQTime u, ExtDate d, dms l); + TQTime computeSTtoUT (TQTime s, ExtDate d, dms l); public slots: @@ -62,12 +62,12 @@ public slots: void slotInputFile(); void slotOutputFile(); void slotRunBatch(); - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); private: - void showUT ( QTime ut ); - void showST ( QTime st ); + void showUT ( TQTime ut ); + void showST ( TQTime st ); /* Fills the UT, Date boxes with the current time * and date and the longitude box with the current Geo location @@ -77,8 +77,8 @@ private: void sidNoCheck(); void utNoCheck(); - QTime getUT (void); - QTime getST (void); + TQTime getUT (void); + TQTime getST (void); ExtDate getDate (void); dms getLongitude (void); bool stInputTime; diff --git a/kstars/kstars/tools/modcalcvlsr.cpp b/kstars/kstars/tools/modcalcvlsr.cpp index 601f9e77..412e1d72 100644 --- a/kstars/kstars/tools/modcalcvlsr.cpp +++ b/kstars/kstars/tools/modcalcvlsr.cpp @@ -28,16 +28,16 @@ #include "kstarsdatetime.h" #include "libkdeedu/extdate/extdatetimeedit.h" -#include <qdatetimeedit.h> //need for QTimeEdit -#include <qcheckbox.h> -#include <qradiobutton.h> -#include <qstring.h> -#include <qtextstream.h> +#include <tqdatetimeedit.h> //need for QTimeEdit +#include <tqcheckbox.h> +#include <tqradiobutton.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kfiledialog.h> #include <kmessagebox.h> -modCalcVlsr::modCalcVlsr(QWidget *parentSplit, const char *name) : modCalcVlsrDlg (parentSplit,name) { +modCalcVlsr::modCalcVlsr(TQWidget *parentSplit, const char *name) : modCalcVlsrDlg (parentSplit,name) { showCurrentDateTime(); initGeo(); @@ -92,7 +92,7 @@ KStarsDateTime modCalcVlsr::getDateTime (void) return KStarsDateTime( datBox->date() , timBox->time() ); } -double modCalcVlsr::getEpoch (QString eName) +double modCalcVlsr::getEpoch (TQString eName) { bool ok = false; double epoch = eName.toDouble(&ok); @@ -213,7 +213,7 @@ void modCalcVlsr::slotClearCoords() vTopoBox->setText(""); datBox->setDate(ExtDate::currentDate()); - timBox->setTime(QTime(0,0,0)); + timBox->setTime(TQTime(0,0,0)); } @@ -352,40 +352,40 @@ void modCalcVlsr::slotVlsrChecked(){ } void modCalcVlsr::slotInputFile() { - QString inputFileName; + TQString inputFileName; inputFileName = KFileDialog::getOpenFileName( ); InputLineEditBatch->setText( inputFileName ); } void modCalcVlsr::slotOutputFile() { - QString outputFileName; + TQString outputFileName; outputFileName = KFileDialog::getSaveFileName( ); OutputLineEditBatch->setText( outputFileName ); } void modCalcVlsr::slotRunBatch() { - QString inputFileName; + TQString inputFileName; inputFileName = InputLineEditBatch->text(); // We open the input file and read its content - if ( QFile::exists(inputFileName) ) { - QFile f( inputFileName ); + if ( TQFile::exists(inputFileName) ) { + TQFile f( inputFileName ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1.").arg( f.name() ); + TQString message = i18n( "Could not open file %1.").arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); inputFileName = ""; return; } // processLines(&f); - QTextStream istream(&f); + TQTextStream istream(&f); processLines(istream); // readFile( istream ); f.close(); } else { - QString message = i18n( "Invalid file: %1" ).arg( inputFileName ); + TQString message = i18n( "Invalid file: %1" ).arg( inputFileName ); KMessageBox::sorry( 0, message, i18n( "Invalid file" ) ); inputFileName = ""; InputLineEditBatch->setText( inputFileName ); @@ -393,19 +393,19 @@ void modCalcVlsr::slotRunBatch() { } } -void modCalcVlsr::processLines( QTextStream &istream ) { +void modCalcVlsr::processLines( TQTextStream &istream ) { // we open the output file -// QTextStream istream(&fIn); - QString outputFileName; +// TQTextStream istream(&fIn); + TQString outputFileName; outputFileName = OutputLineEditBatch->text(); - QFile fOut( outputFileName ); + TQFile fOut( outputFileName ); fOut.open(IO_WriteOnly); - QTextStream ostream(&fOut); + TQTextStream ostream(&fOut); - QString line; - QString space = " "; + TQString line; + TQString space = " "; int i = 0; long double jd0; SkyPoint spB; @@ -413,7 +413,7 @@ void modCalcVlsr::processLines( QTextStream &istream ) { dms raB, decB, latB, longB; double epoch0B, vhB, vgB, vtB, vlsrB, heightB; double vtopo[3]; - QTime utB; + TQTime utB; ExtDate dtB; KStarsDateTime dt0B; @@ -423,14 +423,14 @@ void modCalcVlsr::processLines( QTextStream &istream ) { //Go through the line, looking for parameters - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); i = 0; // Read Ut and write in ostream if corresponds if(utCheckBatch->isChecked() ) { - utB = QTime::fromString( fields[i] ); + utB = TQTime::fromString( fields[i] ); i++; } else utB = utBoxBatch->time(); diff --git a/kstars/kstars/tools/modcalcvlsr.h b/kstars/kstars/tools/modcalcvlsr.h index 2320bd19..ea12d7ca 100644 --- a/kstars/kstars/tools/modcalcvlsr.h +++ b/kstars/kstars/tools/modcalcvlsr.h @@ -19,7 +19,7 @@ #define MODCALCVLSR_H #include <kapplication.h> -#include <qwidget.h> +#include <tqwidget.h> #include "modcalcvlsrdlg.h" class QWidget; @@ -40,7 +40,7 @@ class modCalcVlsr : public modCalcVlsrDlg { Q_OBJECT public: - modCalcVlsr(QWidget *p, const char *n); + modCalcVlsr(TQWidget *p, const char *n); ~modCalcVlsr(); public slots: @@ -89,7 +89,7 @@ private: * @param eName String from which the epoch is to be constructed * once it is converted to a double */ - double getEpoch (QString eName); + double getEpoch (TQString eName); /* Creates a dms object from the latitude box */ dms getLatitude (void); @@ -141,7 +141,7 @@ private: /* Method to process the lines from a file */ - void processLines( QTextStream &istream ); + void processLines( TQTextStream &istream ); GeoLocation *geoPlace; diff --git a/kstars/kstars/tools/observinglist.cpp b/kstars/kstars/tools/observinglist.cpp index dae78bc0..fbd1702c 100644 --- a/kstars/kstars/tools/observinglist.cpp +++ b/kstars/kstars/tools/observinglist.cpp @@ -16,12 +16,12 @@ ***************************************************************************/ #include <stdio.h> -#include <qfile.h> -#include <qdir.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qstringlist.h> -#include <qwidgetstack.h> +#include <tqfile.h> +#include <tqdir.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqstringlist.h> +#include <tqwidgetstack.h> #include <klistview.h> #include <kpushbutton.h> #include <kstatusbar.h> @@ -53,13 +53,13 @@ #include "devicemanager.h" #include "indistd.h" -ObservingList::ObservingList( KStars *_ks, QWidget* parent ) +ObservingList::ObservingList( KStars *_ks, TQWidget* parent ) : KDialogBase( KDialogBase::Plain, i18n( "Observing List" ), Close, Close, parent, "observinglist", false ), ks( _ks ), LogObject(0), oCurrent(0), noNameStars(0), isModified(false), bIsLarge(true) { - QFrame *page = plainPage(); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, 0 ); + TQFrame *page = plainPage(); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 ); ui = new ObservingListUI( page ); vlay->addWidget( ui ); @@ -67,40 +67,40 @@ ObservingList::ObservingList( KStars *_ks, QWidget* parent ) ui->MiniButton->hide(); //Connections - connect( this, SIGNAL( closeClicked() ), this, SLOT( slotClose() ) ); - connect( ui->TableStack, SIGNAL( aboutToShow( QWidget* ) ), - this, SLOT( slotPrepTable( QWidget* ) ) ); - connect( ui->FullTable, SIGNAL( selectionChanged() ), - this, SLOT( slotNewSelection() ) ); - connect( ui->TinyTable, SIGNAL( selectionChanged() ), - this, SLOT( slotNewSelection() ) ); - connect( ui->FullTable, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int) ), - this, SLOT( slotCenterObject() ) ); - connect( ui->TinyTable, SIGNAL( doubleClicked( QListBoxItem* ) ), - this, SLOT( slotCenterObject() ) ); - connect( ui->RemoveButton, SIGNAL( clicked() ), - this, SLOT( slotRemoveObjects() ) ); - connect( ui->CenterButton, SIGNAL( clicked() ), - this, SLOT( slotCenterObject() ) ); - connect( ui->ScopeButton, SIGNAL( clicked() ), - this, SLOT( slotSlewToObject() ) ); - connect( ui->DetailsButton, SIGNAL( clicked() ), - this, SLOT( slotDetails() ) ); - connect( ui->AVTButton, SIGNAL( clicked() ), - this, SLOT( slotAVT() ) ); - - connect( ui->OpenButton, SIGNAL( clicked() ), - this, SLOT( slotOpenList() ) ); - connect( ui->SaveButton, SIGNAL( clicked() ), - this, SLOT( slotSaveList() ) ); - connect( ui->SaveAsButton, SIGNAL( clicked() ), - this, SLOT( slotSaveListAs() ) ); - connect( ui->WizardButton, SIGNAL( clicked() ), - this, SLOT( slotWizard() ) ); + connect( this, TQT_SIGNAL( closeClicked() ), this, TQT_SLOT( slotClose() ) ); + connect( ui->TableStack, TQT_SIGNAL( aboutToShow( TQWidget* ) ), + this, TQT_SLOT( slotPrepTable( TQWidget* ) ) ); + connect( ui->FullTable, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( slotNewSelection() ) ); + connect( ui->TinyTable, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( slotNewSelection() ) ); + connect( ui->FullTable, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int) ), + this, TQT_SLOT( slotCenterObject() ) ); + connect( ui->TinyTable, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ), + this, TQT_SLOT( slotCenterObject() ) ); + connect( ui->RemoveButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotRemoveObjects() ) ); + connect( ui->CenterButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotCenterObject() ) ); + connect( ui->ScopeButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotSlewToObject() ) ); + connect( ui->DetailsButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotDetails() ) ); + connect( ui->AVTButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotAVT() ) ); + + connect( ui->OpenButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotOpenList() ) ); + connect( ui->SaveButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotSaveList() ) ); + connect( ui->SaveAsButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotSaveListAs() ) ); + connect( ui->WizardButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotWizard() ) ); //FIXME: enable MiniButton -// connect( ui->MiniButton, SIGNAL( clicked() ), -// this, SLOT( slotToggleSize() ) ); +// connect( ui->MiniButton, TQT_SIGNAL( clicked() ), +// this, TQT_SLOT( slotToggleSize() ) ); obsList.setAutoDelete( false ); //do NOT delete removed pointers! @@ -131,7 +131,7 @@ bool ObservingList::contains( const SkyObject *q ) { //SLOTS -void ObservingList::slotPrepTable( QWidget *tab ) { +void ObservingList::slotPrepTable( TQWidget *tab ) { if ( tab == ui->FullTable ) { } else { } @@ -154,8 +154,8 @@ void ObservingList::slotAddObject( SkyObject *obj ) { if ( ! isModified ) isModified = true; //Insert object entry in FullTable and TinyTable - QString smag("--"); - if ( obj->mag() < 90.0 ) smag = QString::number( obj->mag(), 'g', 2 ); + TQString smag("--"); + if ( obj->mag() < 90.0 ) smag = TQString::number( obj->mag(), 'g', 2 ); new KListViewItem( ui->FullTable, obj->translatedName(), obj->ra()->toHMSString(), obj->dec()->toDMSString(), @@ -179,9 +179,9 @@ void ObservingList::slotRemoveObject( SkyObject *o ) { //Remove entry from FullTable bool objectFound = false; - QListViewItemIterator it( ui->FullTable ); + TQListViewItemIterator it( ui->FullTable ); while ( it.current() ) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); //If the object is named "star" then match coordinates instead of name if ( o->translatedName() == i18n( "star" ) ) { @@ -227,7 +227,7 @@ void ObservingList::slotNewSelection() { //Construct list of selected objects SelectedObjects.clear(); - QListViewItemIterator it( ui->FullTable, QListViewItemIterator::Selected ); //loop over selected items + TQListViewItemIterator it( ui->FullTable, TQListViewItemIterator::Selected ); //loop over selected items while ( it.current() ) { for ( SkyObject *o = obsList.first(); o; o = obsList.next() ) { if ( it.current()->text(0) == i18n("star") ) { @@ -246,8 +246,8 @@ void ObservingList::slotNewSelection() { //Enable widgets when one object selected if ( SelectedObjects.count() == 1 ) { - QString newName( SelectedObjects.first()->translatedName() ); - QString oldName( obsList.current()->translatedName() ); + TQString newName( SelectedObjects.first()->translatedName() ); + TQString oldName( obsList.current()->translatedName() ); //Enable buttons ui->CenterButton->setEnabled( true ); @@ -432,8 +432,8 @@ void ObservingList::slotSlewToObject() if (useJ2000) sp.apparentCoord(ks->data()->ut().djd(), (long double) J2000); - RAEle->write_w->setText(QString("%1:%2:%3").arg(sp.ra()->hour()).arg(sp.ra()->minute()).arg(sp.ra()->second())); - DecEle->write_w->setText(QString("%1:%2:%3").arg(sp.dec()->degree()).arg(sp.dec()->arcmin()).arg(sp.dec()->arcsec())); + RAEle->write_w->setText(TQString("%1:%2:%3").arg(sp.ra()->hour()).arg(sp.ra()->minute()).arg(sp.ra()->second())); + DecEle->write_w->setText(TQString("%1:%2:%3").arg(sp.dec()->degree()).arg(sp.dec()->arcmin()).arg(sp.dec()->arcsec())); break; @@ -449,8 +449,8 @@ void ObservingList::slotSlewToObject() sp.setAlt(*ks->map()->clickedPoint()->alt()); } - AzEle->write_w->setText(QString("%1:%2:%3").arg(sp.az()->degree()).arg(sp.az()->arcmin()).arg(sp.az()->arcsec())); - AltEle->write_w->setText(QString("%1:%2:%3").arg(sp.alt()->degree()).arg(sp.alt()->arcmin()).arg(sp.alt()->arcsec())); + AzEle->write_w->setText(TQString("%1:%2:%3").arg(sp.az()->degree()).arg(sp.az()->arcmin()).arg(sp.az()->arcsec())); + AltEle->write_w->setText(TQString("%1:%2:%3").arg(sp.alt()->degree()).arg(sp.alt()->arcmin()).arg(sp.alt()->arcsec())); break; } @@ -510,8 +510,8 @@ void ObservingList::saveCurrentUserLog() { } void ObservingList::slotOpenList() { - KURL fileURL = KFileDialog::getOpenURL( QDir::homeDirPath(), "*.obslist|KStars Observing List (*.obslist)" ); - QFile f; + KURL fileURL = KFileDialog::getOpenURL( TQDir::homeDirPath(), "*.obslist|KStars Observing List (*.obslist)" ); + TQFile f; if ( fileURL.isValid() ) { if ( ! fileURL.isLocalFile() ) { @@ -528,7 +528,7 @@ void ObservingList::slotOpenList() { } if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1" ).arg( f.name() ); + TQString message = i18n( "Could not open file %1" ).arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); return; } @@ -536,8 +536,8 @@ void ObservingList::slotOpenList() { saveCurrentList(); //First line is the name of the list. The rest of the file should //be object names, one per line. - QTextStream istream(&f); - QString line; + TQTextStream istream(&f); + TQString line; ListName = istream.readLine(); while ( ! istream.eof() ) { @@ -548,7 +548,7 @@ void ObservingList::slotOpenList() { //If the object is named "star", add it by coordinates SkyObject *o = 0; if ( line.startsWith( "star" ) ) { - QStringList fields = QStringList::split( " ", line ); + TQStringList fields = TQStringList::split( " ", line ); //DEBUG kdDebug() << fields << endl; @@ -579,7 +579,7 @@ void ObservingList::slotOpenList() { f.close(); } else if ( fileURL.path() != "" ) { - QString message = i18n( "The specified file is invalid. Try another file?" ); + TQString message = i18n( "The specified file is invalid. Try another file?" ); if ( KMessageBox::warningYesNo( this, message, i18n("Invalid File"), i18n("Try Another"), i18n("Do Not Try") ) == KMessageBox::Yes ) { slotOpenList(); } @@ -591,7 +591,7 @@ void ObservingList::saveCurrentList() { //Assume that if the list is empty, then there's no need to save if ( obsList.count() ) { if ( isModified ) { - QString message = i18n( "Do you want to save the current list before opening a new list?" ); + TQString message = i18n( "Do you want to save the current list before opening a new list?" ); if ( KMessageBox::questionYesNo( this, message, i18n( "Save Current List?" ), KStdGuiItem::save(), KStdGuiItem::discard() ) == KMessageBox::Yes ) slotSaveList(); @@ -610,7 +610,7 @@ void ObservingList::slotSaveListAs() { i18n( "List name:" ), "", &ok ); if ( ok ) { - KURL fileURL = KFileDialog::getSaveURL( QDir::homeDirPath(), "*.obslist|KStars Observing List (*.obslist)" ); + KURL fileURL = KFileDialog::getSaveURL( TQDir::homeDirPath(), "*.obslist|KStars Observing List (*.obslist)" ); if ( fileURL.isValid() ) FileName = fileURL.path(); @@ -625,9 +625,9 @@ void ObservingList::slotSaveList() { return; } - QFile f( FileName ); + TQFile f( FileName ); if ( !f.open( IO_WriteOnly) ) { - QString message = i18n( "Could not open file %1. Try a different filename?" ).arg( f.name() ); + TQString message = i18n( "Could not open file %1. Try a different filename?" ).arg( f.name() ); if ( KMessageBox::warningYesNo( 0, message, i18n( "Could Not Open File" ), i18n("Try Different"), i18n("Do Not Try") ) == KMessageBox::Yes ) { FileName == ""; @@ -636,7 +636,7 @@ void ObservingList::slotSaveList() { return; } - QTextStream ostream(&f); + TQTextStream ostream(&f); ostream << ListName << endl; //Save objects to the list using their name. If it's a star with a genetive name @@ -664,7 +664,7 @@ void ObservingList::slotSaveList() { void ObservingList::slotWizard() { ObsListWizard wizard( ks ); - if ( wizard.exec() == QDialog::Accepted ) { + if ( wizard.exec() == TQDialog::Accepted ) { //Make sure current list is saved saveCurrentList(); @@ -722,14 +722,14 @@ void ObservingList::slotToggleSize() { void ObservingList::syncTableSelection( bool syncFullTable ) { if ( syncFullTable ) { int i=0; - QListViewItem *it = ui->FullTable->firstChild(); + TQListViewItem *it = ui->FullTable->firstChild(); while ( it ) { it->setSelected( ui->TinyTable->isSelected( i++ ) ); it->nextSibling(); } } else { int i=0; - QListViewItem *it = ui->FullTable->firstChild(); + TQListViewItem *it = ui->FullTable->firstChild(); while ( it ) { ui->TinyTable->setSelected( i++, it->isSelected() ); it->nextSibling(); diff --git a/kstars/kstars/tools/observinglist.h b/kstars/kstars/tools/observinglist.h index dd60dc8c..2acc6ca1 100644 --- a/kstars/kstars/tools/observinglist.h +++ b/kstars/kstars/tools/observinglist.h @@ -62,7 +62,7 @@ class ObservingList : public KDialogBase public: /**@short Cunstructor */ - ObservingList( KStars *_ks, QWidget* parent = 0 ); + ObservingList( KStars *_ks, TQWidget* parent = 0 ); /**@short Destuctor (empty) */ ~ObservingList() {} @@ -89,7 +89,7 @@ public slots: /**@short about to switch the visible table in the widget stack *@p tab pointer to the table which is about to be shown */ - void slotPrepTable( QWidget *tab ); + void slotPrepTable( TQWidget *tab ); /**@short add a new object to list *@p o pointer to the object to add to the list @@ -163,13 +163,13 @@ private: KStars *ks; ObservingListUI *ui; - QPtrList<SkyObject> obsList; - QPtrList<SkyObject> SelectedObjects; + TQPtrList<SkyObject> obsList; + TQPtrList<SkyObject> SelectedObjects; SkyObject *LogObject, *oCurrent; uint noNameStars; bool isModified, bIsLarge; - QString ListName, FileName; + TQString ListName, FileName; }; #endif // OBSERVINGLIST_H diff --git a/kstars/kstars/tools/obslistwizard.cpp b/kstars/kstars/tools/obslistwizard.cpp index 12eb2416..7dbbbc3d 100644 --- a/kstars/kstars/tools/obslistwizard.cpp +++ b/kstars/kstars/tools/obslistwizard.cpp @@ -14,10 +14,10 @@ * * ***************************************************************************/ -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qwidgetstack.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> #include <knuminput.h> #include <klistbox.h> #include <klistview.h> @@ -34,45 +34,45 @@ #include "obslistwizard.h" -ObsListWizard::ObsListWizard( QWidget *parent, const char *name ) +ObsListWizard::ObsListWizard( TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n("Observing List Wizard"), Ok|Cancel, Ok, parent, name ) { ksw = (KStars*)parent; - QFrame *page = plainPage(); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, 0 ); + TQFrame *page = plainPage(); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 ); olw = new ObsListWizardUI( page ); vlay->addWidget( olw ); - connect( olw->AllButton, SIGNAL( clicked() ), this, SLOT( slotAllButton() ) ); - connect( olw->NoneButton, SIGNAL( clicked() ), this, SLOT( slotNoneButton() ) ); - connect( olw->DeepSkyButton, SIGNAL( clicked() ), this, SLOT( slotDeepSkyButton() ) ); - connect( olw->SolarSystemButton, SIGNAL( clicked() ), this, SLOT( slotSolarSystemButton() ) ); - connect( olw->LocationButton, SIGNAL( clicked() ), this, SLOT( slotChangeLocation() ) ); + connect( olw->AllButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAllButton() ) ); + connect( olw->NoneButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNoneButton() ) ); + connect( olw->DeepSkyButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDeepSkyButton() ) ); + connect( olw->SolarSystemButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSolarSystemButton() ) ); + connect( olw->LocationButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotChangeLocation() ) ); - connect( olw->FilterList, SIGNAL( clicked(QListViewItem*) ), this, SLOT( slotShowStackWidget(QListViewItem*) ) ); + connect( olw->FilterList, TQT_SIGNAL( clicked(TQListViewItem*) ), this, TQT_SLOT( slotShowStackWidget(TQListViewItem*) ) ); //Update the selected observing list when certain UI elements are modified - connect( olw->TypeList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->ConstellationList, SIGNAL( selectionChanged() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->RAMin, SIGNAL( lostFocus() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->RAMax, SIGNAL( lostFocus() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->DecMin, SIGNAL( lostFocus() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->DecMax, SIGNAL( lostFocus() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->RA, SIGNAL( lostFocus() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->Dec, SIGNAL( lostFocus() ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->Radius, SIGNAL( valueChanged(double) ), this, SLOT( slotUpdateObjectCount() ) ); -// connect( olw->Date, SIGNAL( valueChanged( const ExtDate& ) ), this, SLOT( slotApplyFilters() ) ); - connect( olw->Mag, SIGNAL( valueChanged( double ) ), this, SLOT( slotUpdateObjectCount() ) ); - connect( olw->ExcludeNoMag, SIGNAL( clicked() ), this, SLOT( slotUpdateObjectCount() ) ); - - connect( olw->SelectByConstellation, SIGNAL( toggled(bool) ), this, SLOT( slotEnableConstellationPage(bool) ) ); - connect( olw->SelectByRect, SIGNAL( toggled(bool) ), this, SLOT( slotEnableRectPage(bool) ) ); - connect( olw->SelectByCirc, SIGNAL( toggled(bool) ), this, SLOT( slotEnableCircPage(bool) ) ); -// connect( olw->SelectByDate, SIGNAL( toggled(bool) ), this, SLOT( slotEnableDatePage(bool) ) ); - connect( olw->SelectByMag, SIGNAL( toggled(bool) ), this, SLOT( slotEnableMagPage(bool) ) ); - - connect( this, SIGNAL( okClicked() ), this, SLOT( slotApplyFilters() ) ); + connect( olw->TypeList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->ConstellationList, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->RAMin, TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->RAMax, TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->DecMin, TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->DecMax, TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->RA, TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->Dec, TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->Radius, TQT_SIGNAL( valueChanged(double) ), this, TQT_SLOT( slotUpdateObjectCount() ) ); +// connect( olw->Date, TQT_SIGNAL( valueChanged( const ExtDate& ) ), this, TQT_SLOT( slotApplyFilters() ) ); + connect( olw->Mag, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + connect( olw->ExcludeNoMag, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpdateObjectCount() ) ); + + connect( olw->SelectByConstellation, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEnableConstellationPage(bool) ) ); + connect( olw->SelectByRect, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEnableRectPage(bool) ) ); + connect( olw->SelectByCirc, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEnableCircPage(bool) ) ); +// connect( olw->SelectByDate, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEnableDatePage(bool) ) ); + connect( olw->SelectByMag, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotEnableMagPage(bool) ) ); + + connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotApplyFilters() ) ); initialize(); } @@ -190,10 +190,10 @@ void ObsListWizard::slotEnableMagPage( bool t ) { slotUpdateObjectCount(); } -void ObsListWizard::slotShowStackWidget( QListViewItem *i ) +void ObsListWizard::slotShowStackWidget( TQListViewItem *i ) { if ( i ) { - QString t = i->text(0); + TQString t = i->text(0); if ( t.contains( i18n( "Object type(s)" ) ) ) olw->FilterStack->raiseWidget( olw->ObjTypePage ); if ( t.contains( i18n( "Region" ) ) ) olw->FilterStack->raiseWidget( olw->RegionPage ); @@ -227,7 +227,7 @@ void ObsListWizard::slotChangeLocation() { LocationDialog ld( ksw ); - if ( ld.exec() == QDialog::Accepted ) { + if ( ld.exec() == TQDialog::Accepted ) { //set geographic location } } @@ -417,8 +417,8 @@ void ObsListWizard::applyFilters( bool doBuildList ) void ObsListWizard::applyRegionFilter( SkyObject *o, bool doBuildList, bool doAdjustCount ) { //select by constellation if ( olw->SelectByConstellation->isChecked() ) { - QString c( o->constellation( ksw->data()->csegmentList, ksw->data()->cnameList ) ); - QListBoxItem *it = olw->ConstellationList->findItem( c ); + TQString c( o->constellation( ksw->data()->csegmentList, ksw->data()->cnameList ) ); + TQListBoxItem *it = olw->ConstellationList->findItem( c ); if ( it && it->isSelected() ) { if ( doBuildList ) obsList().append ( o ); diff --git a/kstars/kstars/tools/obslistwizard.h b/kstars/kstars/tools/obslistwizard.h index 5c04b93f..dd6c9230 100644 --- a/kstars/kstars/tools/obslistwizard.h +++ b/kstars/kstars/tools/obslistwizard.h @@ -34,14 +34,14 @@ class ObsListWizard : public KDialogBase public: /**@short Constructor */ - ObsListWizard( QWidget *parent = 0, const char *name = 0 ); + ObsListWizard( TQWidget *parent = 0, const char *name = 0 ); /**@short Destructor */ ~ObsListWizard(); - /**@return reference to QPtrList of objects selected by the wizard + /**@return reference to TQPtrList of objects selected by the wizard */ - QPtrList<SkyObject>& obsList() { return ObsList; } + TQPtrList<SkyObject>& obsList() { return ObsList; } private slots: void slotAllButton(); @@ -49,7 +49,7 @@ class ObsListWizard : public KDialogBase void slotDeepSkyButton(); void slotSolarSystemButton(); void slotChangeLocation(); - void slotShowStackWidget(QListViewItem*); + void slotShowStackWidget(TQListViewItem*); void slotEnableConstellationPage(bool); void slotEnableRectPage(bool); void slotEnableCircPage(bool); @@ -66,7 +66,7 @@ class ObsListWizard : public KDialogBase void applyFilters( bool doBuildList ); void applyRegionFilter( SkyObject *o, bool doBuildList, bool doAdjustCount=true ); - QPtrList<SkyObject> ObsList; + TQPtrList<SkyObject> ObsList; KStars *ksw; ObsListWizardUI *olw; uint ObjectCount, StarCount, PlanetCount, CometCount, AsteroidCount; diff --git a/kstars/kstars/tools/planetviewer.cpp b/kstars/kstars/tools/planetviewer.cpp index 725e5318..cd0aba3d 100644 --- a/kstars/kstars/tools/planetviewer.cpp +++ b/kstars/kstars/tools/planetviewer.cpp @@ -16,8 +16,8 @@ #include <stdlib.h> //needed for abs() on some platforms -#include <qfile.h> -#include <qlayout.h> +#include <tqfile.h> +#include <tqlayout.h> #include <kdebug.h> #include <klocale.h> #include <kglobal.h> @@ -35,11 +35,11 @@ #define AUMAX 48 -PlanetViewer::PlanetViewer(QWidget *parent, const char *name) +PlanetViewer::PlanetViewer(TQWidget *parent, const char *name) : KDialogBase( KDialogBase::Plain, i18n("Solar System Viewer"), Close, Close, parent, name ), PCat( ((KStars*)parent)->data() ), scale(1.0), isClockRunning(false), tmr(this) { - QFrame *page = plainPage(); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, spacingHint() ); + TQFrame *page = plainPage(); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, spacingHint() ); pw = new PlanetViewerUI( page ); pw->map->setLimits( -48.0, 48.0, -48.0, 48.0 ); pw->map->setXAxisLabel( i18n( "axis label for x-coordinate of solar system viewer. AU means astronomical unit.", "X-position (AU)" ) ); @@ -53,7 +53,7 @@ PlanetViewer::PlanetViewer(QWidget *parent, const char *name) vlay->addWidget( pw ); resize( 500, 500 ); - pw->map->QWidget::setFocus(); //give keyboard focus to the plot widget for key and mouse events + pw->map->TQWidget::setFocus(); //give keyboard focus to the plot widget for key and mouse events pName[0] = "Mercury"; pColor[0] = "SlateBlue1"; pName[1] = "Venus"; pColor[1] = "LightGreen"; @@ -86,13 +86,13 @@ PlanetViewer::PlanetViewer(QWidget *parent, const char *name) UpdateInterval[7] = 75; UpdateInterval[8] = 113; - QTimer::singleShot( 0, this, SLOT( initPlotObjects() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( initPlotObjects() ) ); - connect( &tmr, SIGNAL( timeout() ), SLOT( tick() ) ); - connect( pw->timeStep, SIGNAL( scaleChanged(float) ), SLOT( setTimeScale(float) ) ); - connect( pw->RunButton, SIGNAL( clicked() ), SLOT( slotRunClock() ) ); - connect( pw->dateBox, SIGNAL( valueChanged( const ExtDate & ) ), SLOT( slotChangeDate( const ExtDate & ) ) ); - connect( pw->TodayButton, SIGNAL( clicked() ), SLOT( slotToday() ) ); + connect( &tmr, TQT_SIGNAL( timeout() ), TQT_SLOT( tick() ) ); + connect( pw->timeStep, TQT_SIGNAL( scaleChanged(float) ), TQT_SLOT( setTimeScale(float) ) ); + connect( pw->RunButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotRunClock() ) ); + connect( pw->dateBox, TQT_SIGNAL( valueChanged( const ExtDate & ) ), TQT_SLOT( slotChangeDate( const ExtDate & ) ) ); + connect( pw->TodayButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotToday() ) ); } PlanetViewer::~PlanetViewer() @@ -172,7 +172,7 @@ void PlanetViewer::slotToday() { pw->dateBox->setDate( ks->data()->lt().date() ); } -void PlanetViewer::paintEvent( QPaintEvent* ) { +void PlanetViewer::paintEvent( TQPaintEvent* ) { pw->map->update(); } @@ -187,9 +187,9 @@ void PlanetViewer::initPlotObjects() { for ( unsigned int i=0; i<9; ++i ) { orbit[i] = new KPlotObject( "", "white", KPlotObject::CURVE, 1, KPlotObject::SOLID ); - QFile orbitFile; + TQFile orbitFile; if ( KSUtils::openDataFile( orbitFile, pName[i].lower() + ".orbit" ) ) { - QTextStream orbitStream( &orbitFile ); + TQTextStream orbitStream( &orbitFile ); double x, y, z; while ( !orbitStream.eof() ) { orbitStream >> x >> y >> z; @@ -217,7 +217,7 @@ void PlanetViewer::initPlotObjects() { update(); } -void PlanetViewer::keyPressEvent( QKeyEvent *e ) { +void PlanetViewer::keyPressEvent( TQKeyEvent *e ) { switch ( e->key() ) { case Key_Escape: close(); @@ -228,25 +228,25 @@ void PlanetViewer::keyPressEvent( QKeyEvent *e ) { } } -PVPlotWidget::PVPlotWidget( double x1, double x2, double y1, double y2, QWidget *par, const char *name ) : +PVPlotWidget::PVPlotWidget( double x1, double x2, double y1, double y2, TQWidget *par, const char *name ) : KStarsPlotWidget( x1, x2, y1, y2, par, name ), mouseButtonDown(false), oldx(0), oldy(0) { - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setMouseTracking (true); pv = (PlanetViewer*)topLevelWidget(); } -PVPlotWidget::PVPlotWidget( QWidget *parent, const char *name ) : +PVPlotWidget::PVPlotWidget( TQWidget *parent, const char *name ) : KStarsPlotWidget( 0.0, 1.0, 0.0, 1.0, parent, name ), mouseButtonDown(false), oldx(0), oldy(0) { - setFocusPolicy( QWidget::StrongFocus ); + setFocusPolicy( TQWidget::StrongFocus ); setMouseTracking (true); pv = (PlanetViewer*)topLevelWidget(); } PVPlotWidget::~ PVPlotWidget() {} -void PVPlotWidget::keyPressEvent( QKeyEvent *e ) { +void PVPlotWidget::keyPressEvent( TQKeyEvent *e ) { double xc = (x2() + x())*0.5; double yc = (y2() + y())*0.5; double xstep = 0.01*(x2() - x()); @@ -390,18 +390,18 @@ void PVPlotWidget::keyPressEvent( QKeyEvent *e ) { } } -void PVPlotWidget::mousePressEvent( QMouseEvent *e ) { +void PVPlotWidget::mousePressEvent( TQMouseEvent *e ) { mouseButtonDown = true; oldx = e->x(); oldy = e->y(); } -void PVPlotWidget::mouseReleaseEvent( QMouseEvent * ) { +void PVPlotWidget::mouseReleaseEvent( TQMouseEvent * ) { mouseButtonDown = false; update(); } -void PVPlotWidget::mouseMoveEvent( QMouseEvent *e ) { +void PVPlotWidget::mouseMoveEvent( TQMouseEvent *e ) { if ( mouseButtonDown ) { //Determine how far we've moved double xc = (x2() + x())*0.5; @@ -424,7 +424,7 @@ void PVPlotWidget::mouseMoveEvent( QMouseEvent *e ) { } } -void PVPlotWidget::mouseDoubleClickEvent( QMouseEvent *e ) { +void PVPlotWidget::mouseDoubleClickEvent( TQMouseEvent *e ) { double xscale = dataWidth()/( width() - leftPadding() - rightPadding() ); double yscale = dataHeight()/( height() - topPadding() - bottomPadding() ); @@ -449,7 +449,7 @@ void PVPlotWidget::mouseDoubleClickEvent( QMouseEvent *e ) { } } -void PVPlotWidget::wheelEvent( QWheelEvent *e ) { +void PVPlotWidget::wheelEvent( TQWheelEvent *e ) { if ( e->delta() > 0 ) slotZoomIn(); else slotZoomOut(); } diff --git a/kstars/kstars/tools/planetviewer.h b/kstars/kstars/tools/planetviewer.h index 6df052a8..b212a630 100644 --- a/kstars/kstars/tools/planetviewer.h +++ b/kstars/kstars/tools/planetviewer.h @@ -19,7 +19,7 @@ #include <kdialogbase.h> #include <kpushbutton.h> -#include <qtimer.h> +#include <tqtimer.h> #include "kstarsplotwidget.h" #include "planetviewerui.h" @@ -35,18 +35,18 @@ class PlanetViewer : public KDialogBase { Q_OBJECT public: - PlanetViewer(QWidget *parent = 0, const char *name = 0); + PlanetViewer(TQWidget *parent = 0, const char *name = 0); ~PlanetViewer(); - QString centerPlanet() const { return CenterPlanet; } - void setCenterPlanet( const QString &cp ) { CenterPlanet = cp; } + TQString centerPlanet() const { return CenterPlanet; } + void setCenterPlanet( const TQString &cp ) { CenterPlanet = cp; } KPlotObject* planetObject(uint i) const { return planet[i]; } - QString planetName(uint i) const { return pName[i]; } + TQString planetName(uint i) const { return pName[i]; } protected: - virtual void keyPressEvent( QKeyEvent *e ); - virtual void paintEvent( QPaintEvent* ); + virtual void keyPressEvent( TQKeyEvent *e ); + virtual void paintEvent( TQPaintEvent* ); private slots: void initPlotObjects(); @@ -64,10 +64,10 @@ private: PlanetCatalog PCat; double scale; bool isClockRunning; - QTimer tmr; + TQTimer tmr; int UpdateInterval[9], LastUpdate[9]; - QString pName[9], pColor[9]; - QString CenterPlanet; + TQString pName[9], pColor[9]; + TQString CenterPlanet; KPlotObject *ksun; KPlotObject *planet[9]; @@ -79,8 +79,8 @@ class PVPlotWidget : public KStarsPlotWidget Q_OBJECT public: PVPlotWidget( double x1, double x2, double y1, double y2, - QWidget *parent=0, const char *name=0 ); - PVPlotWidget( QWidget *parent=0, const char *name=0 ); + TQWidget *parent=0, const char *name=0 ); + PVPlotWidget( TQWidget *parent=0, const char *name=0 ); ~PVPlotWidget(); public slots: @@ -91,12 +91,12 @@ signals: void doubleClicked( double, double ); protected: - virtual void keyPressEvent( QKeyEvent *e ); - virtual void mousePressEvent( QMouseEvent *e ); - virtual void mouseMoveEvent( QMouseEvent *e ); - virtual void mouseReleaseEvent( QMouseEvent * ); - virtual void mouseDoubleClickEvent( QMouseEvent *e ); - virtual void wheelEvent( QWheelEvent *e ); + virtual void keyPressEvent( TQKeyEvent *e ); + virtual void mousePressEvent( TQMouseEvent *e ); + virtual void mouseMoveEvent( TQMouseEvent *e ); + virtual void mouseReleaseEvent( TQMouseEvent * ); + virtual void mouseDoubleClickEvent( TQMouseEvent *e ); + virtual void wheelEvent( TQWheelEvent *e ); private: bool mouseButtonDown; diff --git a/kstars/kstars/tools/scriptbuilder.cpp b/kstars/kstars/tools/scriptbuilder.cpp index 51922785..b7538432 100644 --- a/kstars/kstars/tools/scriptbuilder.cpp +++ b/kstars/kstars/tools/scriptbuilder.cpp @@ -40,15 +40,15 @@ #include <kurlrequester.h> #include <knuminput.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qwidgetstack.h> -#include <qwidget.h> -#include <qptrlist.h> -#include <qlayout.h> -#include <qdatetimeedit.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqwidgetstack.h> +#include <tqwidget.h> +#include <tqptrlist.h> +#include <tqlayout.h> +#include <tqdatetimeedit.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> #include "scriptfunction.h" #include "scriptbuilderui.h" @@ -100,15 +100,15 @@ #include "timestepbox.h" #include "libkdeedu/extdate/extdatewidget.h" -ScriptBuilder::ScriptBuilder( QWidget *parent, const char *name ) +ScriptBuilder::ScriptBuilder( TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n( "Script Builder" ), Close, Close, parent, name ), - UnsavedChanges(false), currentFileURL(), currentDir( QDir::homeDirPath() ), + UnsavedChanges(false), currentFileURL(), currentDir( TQDir::homeDirPath() ), currentScriptName(), currentAuthor() { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); ks = (KStars*)parent; - QVBoxLayout *vlay = new QVBoxLayout( page, 0, 0 ); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 ); sb = new ScriptBuilderUI( page ); vlay->addWidget( sb ); @@ -118,7 +118,7 @@ ScriptBuilder::ScriptBuilder( QWidget *parent, const char *name ) //Initialize function templates and descriptions KStarsFunctionList.append( new ScriptFunction( "lookTowards", i18n( "Point the display at the specified location. %1 can be the name of an object, a cardinal point on the compass, or 'zenith'." ), - false, "QString", "dir" ) ); + false, "TQString", "dir" ) ); KStarsFunctionList.append( new ScriptFunction( "setRaDec", i18n( "Point the display at the specified RA/Dec coordinates. %1 is expressed in Hours; %2 is expressed in Degrees." ), false, "double", "ra", "double", "dec" ) ); KStarsFunctionList.append( new ScriptFunction( "setAltAz", i18n( "Point the display at the specified Alt/Az coordinates. %1 and %2 are expressed in Degrees." ), @@ -131,14 +131,14 @@ ScriptBuilder::ScriptBuilder( QWidget *parent, const char *name ) false, "int", "year", "int", "month", "int", "day", "int", "hour", "int", "minute", "int", "second" ) ); KStarsFunctionList.append( new ScriptFunction( "waitFor", i18n( "Pause script execution for %1 seconds." ), false, "double", "sec" ) ); KStarsFunctionList.append( new ScriptFunction( "waitForKey", i18n( "Halt script execution until the key %1 is pressed. Only single-key strokes are possible; use 'space' for the spacebar." ), - false, "QString", "key" ) ); + false, "TQString", "key" ) ); KStarsFunctionList.append( new ScriptFunction( "setTracking", i18n( "Set whether the display is tracking the current location." ), false, "bool", "track" ) ); - KStarsFunctionList.append( new ScriptFunction( "changeViewOption", i18n( "Change view option named %1 to value %2." ), false, "QString", "opName", "QString", "opValue" ) ); + KStarsFunctionList.append( new ScriptFunction( "changeViewOption", i18n( "Change view option named %1 to value %2." ), false, "TQString", "opName", "TQString", "opValue" ) ); KStarsFunctionList.append( new ScriptFunction( "setGeoLocation", i18n( "Set the geographic location to the city specified by %1, %2 and %3." ), - false, "QString", "cityName", "QString", "provinceName", "QString", "countryName" ) ); - KStarsFunctionList.append( new ScriptFunction( "setColor", i18n( "Set the color named %1 to the value %2." ), false, "QString", "colorName", "QString", "value" ) ); - KStarsFunctionList.append( new ScriptFunction( "loadColorScheme", i18n( "Load the color scheme named %1." ), false, "QString", "name" ) ); - KStarsFunctionList.append( new ScriptFunction( "exportImage", i18n( "Export the sky image to the file %1, with width %2 and height %3." ), false, "QString", "fileName", "int", "width", "int", "height" ) ); + false, "TQString", "cityName", "TQString", "provinceName", "TQString", "countryName" ) ); + KStarsFunctionList.append( new ScriptFunction( "setColor", i18n( "Set the color named %1 to the value %2." ), false, "TQString", "colorName", "TQString", "value" ) ); + KStarsFunctionList.append( new ScriptFunction( "loadColorScheme", i18n( "Load the color scheme named %1." ), false, "TQString", "name" ) ); + KStarsFunctionList.append( new ScriptFunction( "exportImage", i18n( "Export the sky image to the file %1, with width %2 and height %3." ), false, "TQString", "fileName", "int", "width", "int", "height" ) ); KStarsFunctionList.append( new ScriptFunction( "printImage", i18n( "Print the sky image to a printer or file. If %1 is true, it will show the print dialog. If %2 is true, it will use the Star Chart color scheme for printing." ), false, "bool", "usePrintDialog", "bool", "useChartColors" ) ); KStarsFunctionList.append( new ScriptFunction( "stop", i18n( "Halt the simulation clock." ), true ) ); KStarsFunctionList.append( new ScriptFunction( "start", i18n( "Start the simulation clock." ), true ) ); @@ -147,71 +147,71 @@ ScriptBuilder::ScriptBuilder( QWidget *parent, const char *name ) // INDI fuctions ScriptFunction *startINDIFunc(NULL), *shutdownINDIFunc(NULL), *switchINDIFunc(NULL), *setINDIPortFunc(NULL), *setINDIScopeActionFunc(NULL), *setINDITargetCoordFunc(NULL), *setINDITargetNameFunc(NULL), *setINDIGeoLocationFunc(NULL), *setINDIUTCFunc(NULL), *setINDIActionFunc(NULL), *waitForINDIActionFunc(NULL), *setINDIFocusSpeedFunc(NULL), *startINDIFocusFunc(NULL), *setINDIFocusTimeoutFunc(NULL), *setINDICCDTempFunc(NULL), *setINDIFilterNumFunc(NULL), *setINDIFrameTypeFunc(NULL), *startINDIExposureFunc(NULL); - startINDIFunc = new ScriptFunction( "startINDI", i18n("Establish an INDI device either in local mode or server mode."), false, "QString", "deviceName", "bool", "useLocal"); + startINDIFunc = new ScriptFunction( "startINDI", i18n("Establish an INDI device either in local mode or server mode."), false, "TQString", "deviceName", "bool", "useLocal"); INDIFunctionList.append ( startINDIFunc ); - shutdownINDIFunc = new ScriptFunction( "shutdownINDI", i18n("Shutdown an INDI device."), false, "QString", "deviceName"); + shutdownINDIFunc = new ScriptFunction( "shutdownINDI", i18n("Shutdown an INDI device."), false, "TQString", "deviceName"); INDIFunctionList.append ( shutdownINDIFunc); - switchINDIFunc = new ScriptFunction( "switchINDI", i18n("Connect or Disconnect an INDI device."), false, "QString", "deviceName", "bool", "turnOn"); + switchINDIFunc = new ScriptFunction( "switchINDI", i18n("Connect or Disconnect an INDI device."), false, "TQString", "deviceName", "bool", "turnOn"); switchINDIFunc->setINDIProperty("CONNECTION"); INDIFunctionList.append ( switchINDIFunc); - setINDIPortFunc = new ScriptFunction( "setINDIPort", i18n("Set INDI's device connection port."), false, "QString", "deviceName", "QString", "port"); + setINDIPortFunc = new ScriptFunction( "setINDIPort", i18n("Set INDI's device connection port."), false, "TQString", "deviceName", "TQString", "port"); setINDIPortFunc->setINDIProperty("DEVICE_PORT"); INDIFunctionList.append ( setINDIPortFunc); - setINDIScopeActionFunc = new ScriptFunction( "setINDIScopeAction", i18n("Set the telescope action. Available actions are SLEW, TRACK, SYNC, PARK, and ABORT."), false, "QString", "deviceName", "QString", "action"); + setINDIScopeActionFunc = new ScriptFunction( "setINDIScopeAction", i18n("Set the telescope action. Available actions are SLEW, TRACK, SYNC, PARK, and ABORT."), false, "TQString", "deviceName", "TQString", "action"); setINDIScopeActionFunc->setINDIProperty("CHECK"); INDIFunctionList.append( setINDIScopeActionFunc); - setINDITargetCoordFunc = new ScriptFunction ( "setINDITargetCoord", i18n( "Set the telescope target coordinates to the RA/Dec coordinates. RA is expressed in Hours; DEC is expressed in Degrees." ), false, "QString", "deviceName", "double", "RA", "double", "DEC" ); + setINDITargetCoordFunc = new ScriptFunction ( "setINDITargetCoord", i18n( "Set the telescope target coordinates to the RA/Dec coordinates. RA is expressed in Hours; DEC is expressed in Degrees." ), false, "TQString", "deviceName", "double", "RA", "double", "DEC" ); setINDITargetCoordFunc->setINDIProperty("EQUATORIAL_EOD_COORD"); INDIFunctionList.append ( setINDITargetCoordFunc ); - setINDITargetNameFunc = new ScriptFunction( "setINDITargetName", i18n("Set the telescope target coorinates to the RA/Dec coordinates of the selected object."), false, "QString", "deviceName", "QString", "objectName"); + setINDITargetNameFunc = new ScriptFunction( "setINDITargetName", i18n("Set the telescope target coorinates to the RA/Dec coordinates of the selected object."), false, "TQString", "deviceName", "TQString", "objectName"); setINDITargetNameFunc->setINDIProperty("EQUATORIAL_EOD_COORD"); INDIFunctionList.append( setINDITargetNameFunc); - setINDIGeoLocationFunc = new ScriptFunction ( "setINDIGeoLocation", i18n("Set the telescope longitude and latitude. The longitude is E of N."), false, "QString", "deviceName", "double", "long", "double", "lat"); + setINDIGeoLocationFunc = new ScriptFunction ( "setINDIGeoLocation", i18n("Set the telescope longitude and latitude. The longitude is E of N."), false, "TQString", "deviceName", "double", "long", "double", "lat"); setINDIGeoLocationFunc->setINDIProperty("GEOGRAPHIC_COORD"); INDIFunctionList.append( setINDIGeoLocationFunc); - setINDIUTCFunc = new ScriptFunction ( "setINDIUTC", i18n("Set the device UTC time in ISO 8601 format YYYY/MM/DDTHH:MM:SS."), false, "QString", "deviceName", "QString", "UTCDateTime"); + setINDIUTCFunc = new ScriptFunction ( "setINDIUTC", i18n("Set the device UTC time in ISO 8601 format YYYY/MM/DDTHH:MM:SS."), false, "TQString", "deviceName", "TQString", "UTCDateTime"); setINDIUTCFunc->setINDIProperty("TIME"); INDIFunctionList.append( setINDIUTCFunc); - setINDIActionFunc = new ScriptFunction( "setINDIAction", i18n("Activate an INDI action. The action is the name of any INDI switch property element supported by the device."), false, "QString", "deviceName", "QString", "actionName"); + setINDIActionFunc = new ScriptFunction( "setINDIAction", i18n("Activate an INDI action. The action is the name of any INDI switch property element supported by the device."), false, "TQString", "deviceName", "TQString", "actionName"); INDIFunctionList.append( setINDIActionFunc); - waitForINDIActionFunc = new ScriptFunction ("waitForINDIAction", i18n("Pause script execution until action returns with OK status. The action can be the name of any INDI property supported by the device."), false, "QString", "deviceName", "QString", "actionName"); + waitForINDIActionFunc = new ScriptFunction ("waitForINDIAction", i18n("Pause script execution until action returns with OK status. The action can be the name of any INDI property supported by the device."), false, "TQString", "deviceName", "TQString", "actionName"); INDIFunctionList.append( waitForINDIActionFunc ); - setINDIFocusSpeedFunc = new ScriptFunction ("setINDIFocusSpeed", i18n("Set the telescope focuser speed. Set speed to 0 to halt the focuser. 1-3 correspond to slow, medium, and fast speeds respectively."), false, "QString", "deviceName", "unsigned int", "speed"); + setINDIFocusSpeedFunc = new ScriptFunction ("setINDIFocusSpeed", i18n("Set the telescope focuser speed. Set speed to 0 to halt the focuser. 1-3 correspond to slow, medium, and fast speeds respectively."), false, "TQString", "deviceName", "unsigned int", "speed"); setINDIFocusSpeedFunc->setINDIProperty("FOCUS_SPEED"); INDIFunctionList.append( setINDIFocusSpeedFunc ); - startINDIFocusFunc = new ScriptFunction ("startINDIFocus", i18n("Start moving the focuser in the direction Dir, and for the duration specified by setINDIFocusTimeout."), false, "QString", "deviceName", "QString", "Dir"); + startINDIFocusFunc = new ScriptFunction ("startINDIFocus", i18n("Start moving the focuser in the direction Dir, and for the duration specified by setINDIFocusTimeout."), false, "TQString", "deviceName", "TQString", "Dir"); startINDIFocusFunc->setINDIProperty("FOCUS_MOTION"); INDIFunctionList.append( startINDIFocusFunc); - setINDIFocusTimeoutFunc = new ScriptFunction ( "setINDIFocusTimeout", i18n("Set the telescope focuser timer in seconds. This is the duration of any focusing procedure performed by calling startINDIFocus."), false, "QString", "deviceName", "int", "timeout"); + setINDIFocusTimeoutFunc = new ScriptFunction ( "setINDIFocusTimeout", i18n("Set the telescope focuser timer in seconds. This is the duration of any focusing procedure performed by calling startINDIFocus."), false, "TQString", "deviceName", "int", "timeout"); setINDIFocusTimeoutFunc->setINDIProperty("FOCUS_TIMER"); INDIFunctionList.append( setINDIFocusTimeoutFunc); - setINDICCDTempFunc = new ScriptFunction( "setINDICCDTemp", i18n("Set the target CCD chip temperature."), false, "QString", "deviceName", "int", "temp"); + setINDICCDTempFunc = new ScriptFunction( "setINDICCDTemp", i18n("Set the target CCD chip temperature."), false, "TQString", "deviceName", "int", "temp"); setINDICCDTempFunc->setINDIProperty("CCD_TEMPERATURE"); INDIFunctionList.append( setINDICCDTempFunc); - setINDIFilterNumFunc = new ScriptFunction( "setINDIFilterNum", i18n("Set the target filter position."), false, "QString", "deviceName", "int", "filter_num"); + setINDIFilterNumFunc = new ScriptFunction( "setINDIFilterNum", i18n("Set the target filter position."), false, "TQString", "deviceName", "int", "filter_num"); setINDIFilterNumFunc->setINDIProperty("FILTER_SLOT"); INDIFunctionList.append ( setINDIFilterNumFunc); - setINDIFrameTypeFunc = new ScriptFunction( "setINDIFrameType", i18n("Set the CCD camera frame type. Available options are FRAME_LIGHT, FRAME_BIAS, FRAME_DARK, and FRAME_FLAT."), false, "QString", "deviceName", "QString", "type"); + setINDIFrameTypeFunc = new ScriptFunction( "setINDIFrameType", i18n("Set the CCD camera frame type. Available options are FRAME_LIGHT, FRAME_BIAS, FRAME_DARK, and FRAME_FLAT."), false, "TQString", "deviceName", "TQString", "type"); setINDIFrameTypeFunc->setINDIProperty("FRAME_TYPE"); INDIFunctionList.append( setINDIFrameTypeFunc); - startINDIExposureFunc = new ScriptFunction ( "startINDIExposure", i18n("Start Camera/CCD exposure. The duration is in seconds."), false, "QString", "deviceName", "int", "timeout"); + startINDIExposureFunc = new ScriptFunction ( "startINDIExposure", i18n("Start Camera/CCD exposure. The duration is in seconds."), false, "TQString", "deviceName", "int", "timeout"); startINDIExposureFunc->setINDIProperty("CCD_EXPOSE_DURATION"); INDIFunctionList.append( startINDIExposureFunc); @@ -223,46 +223,46 @@ ScriptBuilder::ScriptBuilder( QWidget *parent, const char *name ) sb->FunctionListView->addColumn(i18n("Functions")); sb->FunctionListView->setSorting(-1); - QListViewItem *INDI_tree = new QListViewItem( sb->FunctionListView, "INDI"); - QListViewItem *INDI_filter = new QListViewItem( INDI_tree, "Filter"); - QListViewItem *INDI_focuser = new QListViewItem( INDI_tree, "Focuser"); - QListViewItem *INDI_ccd = new QListViewItem( INDI_tree, "Camera/CCD"); - QListViewItem *INDI_telescope = new QListViewItem( INDI_tree, "Telescope"); - QListViewItem *INDI_general = new QListViewItem( INDI_tree, "General"); + TQListViewItem *INDI_tree = new TQListViewItem( sb->FunctionListView, "INDI"); + TQListViewItem *INDI_filter = new TQListViewItem( INDI_tree, "Filter"); + TQListViewItem *INDI_focuser = new TQListViewItem( INDI_tree, "Focuser"); + TQListViewItem *INDI_ccd = new TQListViewItem( INDI_tree, "Camera/CCD"); + TQListViewItem *INDI_telescope = new TQListViewItem( INDI_tree, "Telescope"); + TQListViewItem *INDI_general = new TQListViewItem( INDI_tree, "General"); - QListViewItem *kstars_tree = new QListViewItem( sb->FunctionListView, "KStars"); + TQListViewItem *kstars_tree = new TQListViewItem( sb->FunctionListView, "KStars"); for ( ScriptFunction *sf = KStarsFunctionList.last(); sf; sf = KStarsFunctionList.prev() ) - new QListViewItem (kstars_tree, sf->prototype()); + new TQListViewItem (kstars_tree, sf->prototype()); // General - new QListViewItem(INDI_general, waitForINDIActionFunc->prototype()); - new QListViewItem(INDI_general, setINDIActionFunc->prototype()); - new QListViewItem(INDI_general, setINDIPortFunc->prototype()); - new QListViewItem(INDI_general, switchINDIFunc->prototype()); - new QListViewItem(INDI_general, shutdownINDIFunc->prototype()); - new QListViewItem(INDI_general, startINDIFunc->prototype()); + new TQListViewItem(INDI_general, waitForINDIActionFunc->prototype()); + new TQListViewItem(INDI_general, setINDIActionFunc->prototype()); + new TQListViewItem(INDI_general, setINDIPortFunc->prototype()); + new TQListViewItem(INDI_general, switchINDIFunc->prototype()); + new TQListViewItem(INDI_general, shutdownINDIFunc->prototype()); + new TQListViewItem(INDI_general, startINDIFunc->prototype()); // Telescope - new QListViewItem(INDI_telescope, setINDIUTCFunc->prototype()); - new QListViewItem(INDI_telescope, setINDIGeoLocationFunc->prototype()); - new QListViewItem(INDI_telescope, setINDITargetNameFunc->prototype()); - new QListViewItem(INDI_telescope, setINDITargetCoordFunc->prototype()); - new QListViewItem(INDI_telescope, setINDIScopeActionFunc->prototype()); + new TQListViewItem(INDI_telescope, setINDIUTCFunc->prototype()); + new TQListViewItem(INDI_telescope, setINDIGeoLocationFunc->prototype()); + new TQListViewItem(INDI_telescope, setINDITargetNameFunc->prototype()); + new TQListViewItem(INDI_telescope, setINDITargetCoordFunc->prototype()); + new TQListViewItem(INDI_telescope, setINDIScopeActionFunc->prototype()); // CCD - new QListViewItem(INDI_ccd, startINDIExposureFunc->prototype()); - new QListViewItem(INDI_ccd, setINDIFrameTypeFunc->prototype()); - new QListViewItem(INDI_ccd, setINDICCDTempFunc->prototype()); + new TQListViewItem(INDI_ccd, startINDIExposureFunc->prototype()); + new TQListViewItem(INDI_ccd, setINDIFrameTypeFunc->prototype()); + new TQListViewItem(INDI_ccd, setINDICCDTempFunc->prototype()); // Focuser - new QListViewItem(INDI_focuser, startINDIFocusFunc->prototype()); - new QListViewItem(INDI_focuser, setINDIFocusTimeoutFunc->prototype()); - new QListViewItem(INDI_focuser, setINDIFocusSpeedFunc->prototype()); + new TQListViewItem(INDI_focuser, startINDIFocusFunc->prototype()); + new TQListViewItem(INDI_focuser, setINDIFocusTimeoutFunc->prototype()); + new TQListViewItem(INDI_focuser, setINDIFocusSpeedFunc->prototype()); // Filter - new QListViewItem(INDI_filter, setINDIFilterNumFunc->prototype()); + new TQListViewItem(INDI_filter, setINDIFilterNumFunc->prototype()); //Add icons to Push Buttons KIconLoader *icons = KGlobal::iconLoader(); @@ -278,7 +278,7 @@ ScriptBuilder::ScriptBuilder( QWidget *parent, const char *name ) sb->DownButton->setIconSet( icons->loadIconSet( "down", KIcon::Toolbar ) ); //Prepare the widget stack - argBlank = new QWidget( sb->ArgStack ); + argBlank = new TQWidget( sb->ArgStack ); argLookToward = new ArgLookToward( sb->ArgStack ); argSetRaDec = new ArgSetRaDec( sb->ArgStack ); argSetAltAz = new ArgSetAltAz( sb->ArgStack ); @@ -371,129 +371,129 @@ ScriptBuilder::ScriptBuilder( QWidget *parent, const char *name ) initViewOptions(); //connect widgets in ScriptBuilderUI - connect( sb->FunctionListView, SIGNAL( doubleClicked(QListViewItem *, const QPoint &, int )), this, SLOT( slotAddFunction() ) ); - connect( sb->FunctionListView, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( slotShowDoc() ) ); - connect( sb->UpButton, SIGNAL( clicked() ), this, SLOT( slotMoveFunctionUp() ) ); - connect( sb->ScriptListBox, SIGNAL( currentChanged(QListBoxItem*) ), this, SLOT( slotArgWidget() ) ); - connect( sb->DownButton, SIGNAL( clicked() ), this, SLOT( slotMoveFunctionDown() ) ); - connect( sb->CopyButton, SIGNAL( clicked() ), this, SLOT( slotCopyFunction() ) ); - connect( sb->RemoveButton, SIGNAL( clicked() ), this, SLOT( slotRemoveFunction() ) ); - connect( sb->NewButton, SIGNAL( clicked() ), this, SLOT( slotNew() ) ); - connect( sb->OpenButton, SIGNAL( clicked() ), this, SLOT( slotOpen() ) ); - connect( sb->SaveButton, SIGNAL( clicked() ), this, SLOT( slotSave() ) ); - connect( sb->SaveAsButton, SIGNAL( clicked() ), this, SLOT( slotSaveAs() ) ); - connect( sb->AddButton, SIGNAL( clicked() ), this, SLOT( slotAddFunction() ) ); - connect( sb->RunButton, SIGNAL( clicked() ), this, SLOT( slotRunScript() ) ); + connect( sb->FunctionListView, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT( slotAddFunction() ) ); + connect( sb->FunctionListView, TQT_SIGNAL( currentChanged(TQListViewItem*) ), this, TQT_SLOT( slotShowDoc() ) ); + connect( sb->UpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveFunctionUp() ) ); + connect( sb->ScriptListBox, TQT_SIGNAL( currentChanged(TQListBoxItem*) ), this, TQT_SLOT( slotArgWidget() ) ); + connect( sb->DownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveFunctionDown() ) ); + connect( sb->CopyButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopyFunction() ) ); + connect( sb->RemoveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemoveFunction() ) ); + connect( sb->NewButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNew() ) ); + connect( sb->OpenButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpen() ) ); + connect( sb->SaveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSave() ) ); + connect( sb->SaveAsButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSaveAs() ) ); + connect( sb->AddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddFunction() ) ); + connect( sb->RunButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRunScript() ) ); //Connections for Arg Widgets - connect( argSetGeoLocation->FindCityButton, SIGNAL( clicked() ), this, SLOT( slotFindCity() ) ); - connect( argLookToward->FindButton, SIGNAL( clicked() ), this, SLOT( slotFindObject() ) ); - connect( argChangeViewOption->TreeButton, SIGNAL( clicked() ), this, SLOT( slotShowOptions() ) ); - - connect( argLookToward->FocusEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( slotLookToward() ) ); - connect( argSetRaDec->RaBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotRa() ) ); - connect( argSetRaDec->DecBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotDec() ) ); - connect( argSetAltAz->AltBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotAlt() ) ); - connect( argSetAltAz->AzBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotAz() ) ); - connect( argSetLocalTime->DateBox, SIGNAL( changed(ExtDate) ), this, SLOT( slotChangeDate() ) ); - connect( argSetLocalTime->TimeBox, SIGNAL( valueChanged(const QTime&) ), this, SLOT( slotChangeTime() ) ); - connect( argWaitFor->DelayBox, SIGNAL( valueChanged(int) ), this, SLOT( slotWaitFor() ) ); - connect( argWaitForKey->WaitKeyEdit, SIGNAL( textChanged(const QString &) ), this, SLOT( slotWaitForKey() ) ); - connect( argSetTracking->CheckTrack, SIGNAL( stateChanged(int) ), this, SLOT( slotTracking() ) ); - connect( argChangeViewOption->OptionName, SIGNAL( activated(const QString &) ), this, SLOT( slotViewOption() ) ); - connect( argChangeViewOption->OptionValue, SIGNAL( textChanged(const QString &) ), this, SLOT( slotViewOption() ) ); - connect( argSetGeoLocation->CityName, SIGNAL( textChanged(const QString &) ), this, SLOT( slotChangeCity() ) ); - connect( argSetGeoLocation->ProvinceName, SIGNAL( textChanged(const QString &) ), this, SLOT( slotChangeProvince() ) ); - connect( argSetGeoLocation->CountryName, SIGNAL( textChanged(const QString &) ), this, SLOT( slotChangeCountry() ) ); - connect( argTimeScale->TimeScale, SIGNAL( scaleChanged(float) ), this, SLOT( slotTimeScale() ) ); - connect( argZoom->ZoomBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotZoom() ) ); - connect( argExportImage->ExportFileName, SIGNAL( textChanged(const QString &) ), this, SLOT( slotExportImage() ) ); - connect( argExportImage->ExportWidth, SIGNAL( valueChanged(int) ), this, SLOT( slotExportImage() ) ); - connect( argExportImage->ExportHeight, SIGNAL( valueChanged(int) ), this, SLOT( slotExportImage() ) ); - connect( argPrintImage->UsePrintDialog, SIGNAL( toggled(bool) ), this, SLOT( slotPrintImage() ) ); - connect( argPrintImage->UseChartColors, SIGNAL( toggled(bool) ), this, SLOT( slotPrintImage() ) ); - connect( argSetColor->ColorName, SIGNAL( activated(const QString &) ), this, SLOT( slotChangeColorName() ) ); - connect( argSetColor->ColorValue, SIGNAL( changed(const QColor &) ), this, SLOT( slotChangeColor() ) ); - connect( argLoadColorScheme->SchemeList, SIGNAL( clicked( QListBoxItem* ) ), this, SLOT( slotLoadColorScheme( QListBoxItem* ) ) ); - connect( snd->ScriptName, SIGNAL( textChanged(const QString &) ), this, SLOT( slotEnableScriptNameOK() ) ); + connect( argSetGeoLocation->FindCityButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFindCity() ) ); + connect( argLookToward->FindButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotFindObject() ) ); + connect( argChangeViewOption->TreeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowOptions() ) ); + + connect( argLookToward->FocusEdit, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotLookToward() ) ); + connect( argSetRaDec->RaBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotRa() ) ); + connect( argSetRaDec->DecBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotDec() ) ); + connect( argSetAltAz->AltBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotAlt() ) ); + connect( argSetAltAz->AzBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotAz() ) ); + connect( argSetLocalTime->DateBox, TQT_SIGNAL( changed(ExtDate) ), this, TQT_SLOT( slotChangeDate() ) ); + connect( argSetLocalTime->TimeBox, TQT_SIGNAL( valueChanged(const TQTime&) ), this, TQT_SLOT( slotChangeTime() ) ); + connect( argWaitFor->DelayBox, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotWaitFor() ) ); + connect( argWaitForKey->WaitKeyEdit, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotWaitForKey() ) ); + connect( argSetTracking->CheckTrack, TQT_SIGNAL( stateChanged(int) ), this, TQT_SLOT( slotTracking() ) ); + connect( argChangeViewOption->OptionName, TQT_SIGNAL( activated(const TQString &) ), this, TQT_SLOT( slotViewOption() ) ); + connect( argChangeViewOption->OptionValue, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotViewOption() ) ); + connect( argSetGeoLocation->CityName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotChangeCity() ) ); + connect( argSetGeoLocation->ProvinceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotChangeProvince() ) ); + connect( argSetGeoLocation->CountryName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotChangeCountry() ) ); + connect( argTimeScale->TimeScale, TQT_SIGNAL( scaleChanged(float) ), this, TQT_SLOT( slotTimeScale() ) ); + connect( argZoom->ZoomBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotZoom() ) ); + connect( argExportImage->ExportFileName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotExportImage() ) ); + connect( argExportImage->ExportWidth, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotExportImage() ) ); + connect( argExportImage->ExportHeight, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotExportImage() ) ); + connect( argPrintImage->UsePrintDialog, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotPrintImage() ) ); + connect( argPrintImage->UseChartColors, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( slotPrintImage() ) ); + connect( argSetColor->ColorName, TQT_SIGNAL( activated(const TQString &) ), this, TQT_SLOT( slotChangeColorName() ) ); + connect( argSetColor->ColorValue, TQT_SIGNAL( changed(const TQColor &) ), this, TQT_SLOT( slotChangeColor() ) ); + connect( argLoadColorScheme->SchemeList, TQT_SIGNAL( clicked( TQListBoxItem* ) ), this, TQT_SLOT( slotLoadColorScheme( TQListBoxItem* ) ) ); + connect( snd->ScriptName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotEnableScriptNameOK() ) ); - connect( sb->AppendINDIWait, SIGNAL ( toggled(bool) ), this, SLOT(slotINDIWaitCheck(bool))); + connect( sb->AppendINDIWait, TQT_SIGNAL ( toggled(bool) ), this, TQT_SLOT(slotINDIWaitCheck(bool))); // Connections for INDI's Arg widgets // INDI Start Device - connect (argStartINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDIStartDeviceName())); - connect (argStartINDI->INDIMode, SIGNAL ( clicked( int)), this, SLOT (slotINDIStartDeviceMode())); + connect (argStartINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDIStartDeviceName())); + connect (argStartINDI->INDIMode, TQT_SIGNAL ( clicked( int)), this, TQT_SLOT (slotINDIStartDeviceMode())); // INDI Shutdown Device - connect (argShutdownINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDIShutdown())); + connect (argShutdownINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDIShutdown())); // INDI Swtich Device - connect (argSwitchINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISwitchDeviceName())); - connect (argSwitchINDI->INDIConnection, SIGNAL ( clicked( int)), this, SLOT (slotINDISwitchDeviceConnection())); + connect (argSwitchINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISwitchDeviceName())); + connect (argSwitchINDI->INDIConnection, TQT_SIGNAL ( clicked( int)), this, TQT_SLOT (slotINDISwitchDeviceConnection())); // INDI Set Device Port - connect (argSetPortINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetPortDeviceName())); - connect (argSetPortINDI->devicePort, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetPortDevicePort())); + connect (argSetPortINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetPortDeviceName())); + connect (argSetPortINDI->devicePort, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetPortDevicePort())); // INDI Set Target Coord - connect (argSetTargetCoordINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetTargetCoordDeviceName())); - connect( argSetTargetCoordINDI->RaBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotINDISetTargetCoordDeviceRA() ) ); - connect( argSetTargetCoordINDI->DecBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotINDISetTargetCoordDeviceDEC() ) ); + connect (argSetTargetCoordINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetTargetCoordDeviceName())); + connect( argSetTargetCoordINDI->RaBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotINDISetTargetCoordDeviceRA() ) ); + connect( argSetTargetCoordINDI->DecBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotINDISetTargetCoordDeviceDEC() ) ); // INDI Set Target Name - connect( argSetTargetNameINDI->FindButton, SIGNAL( clicked() ), this, SLOT( slotINDIFindObject() ) ); - connect (argSetTargetNameINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetTargetNameDeviceName())); - connect (argSetTargetNameINDI->objectName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetTargetNameObjectName())); + connect( argSetTargetNameINDI->FindButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotINDIFindObject() ) ); + connect (argSetTargetNameINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetTargetNameDeviceName())); + connect (argSetTargetNameINDI->objectName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetTargetNameObjectName())); // INDI Set Action - connect (argSetActionINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetActionDeviceName())); - connect (argSetActionINDI->actionName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetActionName())); + connect (argSetActionINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetActionDeviceName())); + connect (argSetActionINDI->actionName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetActionName())); // INDI Wait For Action - connect (argWaitForActionINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDIWaitForActionDeviceName())); - connect (argWaitForActionINDI->actionName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDIWaitForActionName())); + connect (argWaitForActionINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDIWaitForActionDeviceName())); + connect (argWaitForActionINDI->actionName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDIWaitForActionName())); // INDI Set Focus Speed - connect (argSetFocusSpeedINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetFocusSpeedDeviceName())); - connect (argSetFocusSpeedINDI->speedIN, SIGNAL( valueChanged(int) ), this, SLOT(slotINDISetFocusSpeed())); + connect (argSetFocusSpeedINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetFocusSpeedDeviceName())); + connect (argSetFocusSpeedINDI->speedIN, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT(slotINDISetFocusSpeed())); // INDI Start Focus - connect (argStartFocusINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDIStartFocusDeviceName())); - connect (argStartFocusINDI->directionCombo, SIGNAL( activated(const QString &) ), this, SLOT(slotINDIStartFocusDirection())); + connect (argStartFocusINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDIStartFocusDeviceName())); + connect (argStartFocusINDI->directionCombo, TQT_SIGNAL( activated(const TQString &) ), this, TQT_SLOT(slotINDIStartFocusDirection())); // INDI Set Focus Timeout - connect (argSetFocusTimeoutINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetFocusTimeoutDeviceName())); - connect (argSetFocusTimeoutINDI->timeOut, SIGNAL( valueChanged(int) ), this, SLOT(slotINDISetFocusTimeout())); + connect (argSetFocusTimeoutINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetFocusTimeoutDeviceName())); + connect (argSetFocusTimeoutINDI->timeOut, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT(slotINDISetFocusTimeout())); // INDI Set Geo Location - connect (argSetGeoLocationINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetGeoLocationDeviceName())); - connect( argSetGeoLocationINDI->longBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotINDISetGeoLocationDeviceLong() ) ); - connect( argSetGeoLocationINDI->latBox, SIGNAL( textChanged(const QString &) ), this, SLOT( slotINDISetGeoLocationDeviceLat() ) ); + connect (argSetGeoLocationINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetGeoLocationDeviceName())); + connect( argSetGeoLocationINDI->longBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotINDISetGeoLocationDeviceLong() ) ); + connect( argSetGeoLocationINDI->latBox, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( slotINDISetGeoLocationDeviceLat() ) ); // INDI Start Exposure - connect (argStartExposureINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDIStartExposureDeviceName())); - connect (argStartExposureINDI->timeOut, SIGNAL( valueChanged(int) ), this, SLOT(slotINDIStartExposureTimeout())); + connect (argStartExposureINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDIStartExposureDeviceName())); + connect (argStartExposureINDI->timeOut, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT(slotINDIStartExposureTimeout())); // INDI Set UTC - connect (argSetUTCINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetUTCDeviceName())); - connect (argSetUTCINDI->UTC, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetUTC())); + connect (argSetUTCINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetUTCDeviceName())); + connect (argSetUTCINDI->UTC, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetUTC())); // INDI Set Scope Action - connect (argSetScopeActionINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetScopeActionDeviceName())); - connect (argSetScopeActionINDI->actionCombo, SIGNAL( activated(const QString &) ), this, SLOT(slotINDISetScopeAction())); + connect (argSetScopeActionINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetScopeActionDeviceName())); + connect (argSetScopeActionINDI->actionCombo, TQT_SIGNAL( activated(const TQString &) ), this, TQT_SLOT(slotINDISetScopeAction())); // INDI Set Frame type - connect (argSetFrameTypeINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetFrameTypeDeviceName())); - connect (argSetFrameTypeINDI->typeCombo, SIGNAL( activated(const QString &) ), this, SLOT(slotINDISetFrameType())); + connect (argSetFrameTypeINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetFrameTypeDeviceName())); + connect (argSetFrameTypeINDI->typeCombo, TQT_SIGNAL( activated(const TQString &) ), this, TQT_SLOT(slotINDISetFrameType())); // INDI Set CCD Temp - connect (argSetCCDTempINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetCCDTempDeviceName())); - connect (argSetCCDTempINDI->temp, SIGNAL( valueChanged(int) ), this, SLOT(slotINDISetCCDTemp())); + connect (argSetCCDTempINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetCCDTempDeviceName())); + connect (argSetCCDTempINDI->temp, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT(slotINDISetCCDTemp())); // INDI Set Filter Num - connect (argSetFilterNumINDI->deviceName, SIGNAL( textChanged(const QString &) ), this, SLOT(slotINDISetFilterNumDeviceName())); - connect (argSetFilterNumINDI->filter_num, SIGNAL( valueChanged(int) ), this, SLOT(slotINDISetFilterNum())); + connect (argSetFilterNumINDI->deviceName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT(slotINDISetFilterNumDeviceName())); + connect (argSetFilterNumINDI->filter_num, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT(slotINDISetFilterNum())); //disbale some buttons @@ -515,14 +515,14 @@ void ScriptBuilder::initViewOptions() { otv->OptionsList->setRootIsDecorated( true ); //InfoBoxes - opsGUI = new QListViewItem( otv->OptionsList, i18n( "InfoBoxes" ) ); - new QListViewItem( opsGUI, "ShowInfoBoxes", i18n( "Toggle display of all InfoBoxes" ), i18n( "bool" ) ); - new QListViewItem( opsGUI, "ShowTimeBox", i18n( "Toggle display of Time InfoBox" ), i18n( "bool" ) ); - new QListViewItem( opsGUI, "ShowGeoBox", i18n( "Toggle display of Geographic InfoBox" ), i18n( "bool" ) ); - new QListViewItem( opsGUI, "ShowFocusBox", i18n( "Toggle display of Focus InfoBox" ), i18n( "bool" ) ); - new QListViewItem( opsGUI, "ShadeTimeBox", i18n( "(un)Shade Time InfoBox" ), i18n( "bool" ) ); - new QListViewItem( opsGUI, "ShadeGeoBox", i18n( "(un)Shade Geographic InfoBox" ), i18n( "bool" ) ); - new QListViewItem( opsGUI, "ShadeFocusBox", i18n( "(un)Shade Focus InfoBox" ), i18n( "bool" ) ); + opsGUI = new TQListViewItem( otv->OptionsList, i18n( "InfoBoxes" ) ); + new TQListViewItem( opsGUI, "ShowInfoBoxes", i18n( "Toggle display of all InfoBoxes" ), i18n( "bool" ) ); + new TQListViewItem( opsGUI, "ShowTimeBox", i18n( "Toggle display of Time InfoBox" ), i18n( "bool" ) ); + new TQListViewItem( opsGUI, "ShowGeoBox", i18n( "Toggle display of Geographic InfoBox" ), i18n( "bool" ) ); + new TQListViewItem( opsGUI, "ShowFocusBox", i18n( "Toggle display of Focus InfoBox" ), i18n( "bool" ) ); + new TQListViewItem( opsGUI, "ShadeTimeBox", i18n( "(un)Shade Time InfoBox" ), i18n( "bool" ) ); + new TQListViewItem( opsGUI, "ShadeGeoBox", i18n( "(un)Shade Geographic InfoBox" ), i18n( "bool" ) ); + new TQListViewItem( opsGUI, "ShadeFocusBox", i18n( "(un)Shade Focus InfoBox" ), i18n( "bool" ) ); argChangeViewOption->OptionName->insertItem( "ShowInfoBoxes" ); argChangeViewOption->OptionName->insertItem( "ShowTimeBox" ); argChangeViewOption->OptionName->insertItem( "ShowGeoBox" ); @@ -532,33 +532,33 @@ void ScriptBuilder::initViewOptions() { argChangeViewOption->OptionName->insertItem( "ShadeFocusBox" ); //Toolbars - opsToolbar = new QListViewItem( otv->OptionsList, i18n( "Toolbars" ) ); - new QListViewItem( opsToolbar, "ShowMainToolBar", i18n( "Toggle display of main toolbar" ), i18n( "bool" ) ); - new QListViewItem( opsToolbar, "ShowViewToolBar", i18n( "Toggle display of view toolbar" ), i18n( "bool" ) ); + opsToolbar = new TQListViewItem( otv->OptionsList, i18n( "Toolbars" ) ); + new TQListViewItem( opsToolbar, "ShowMainToolBar", i18n( "Toggle display of main toolbar" ), i18n( "bool" ) ); + new TQListViewItem( opsToolbar, "ShowViewToolBar", i18n( "Toggle display of view toolbar" ), i18n( "bool" ) ); argChangeViewOption->OptionName->insertItem( "ShowMainToolBar" ); argChangeViewOption->OptionName->insertItem( "ShowViewToolBar" ); //Show Objects - opsShowObj = new QListViewItem( otv->OptionsList, i18n( "Show Objects" ) ); - new QListViewItem( opsShowObj, "ShowStars", i18n( "Toggle display of Stars" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowDeepSky", i18n( "Toggle display of all deep-sky objects" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowMessier", i18n( "Toggle display of Messier object symbols" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowMessierImages", i18n( "Toggle display of Messier object images" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowNGC", i18n( "Toggle display of NGC objects" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowIC", i18n( "Toggle display of IC objects" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowPlanets", i18n( "Toggle display of all solar system bodies" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowSun", i18n( "Toggle display of Sun" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowMoon", i18n( "Toggle display of Moon" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowMercury", i18n( "Toggle display of Mercury" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowVenus", i18n( "Toggle display of Venus" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowMars", i18n( "Toggle display of Mars" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowJupiter", i18n( "Toggle display of Jupiter" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowSaturn", i18n( "Toggle display of Saturn" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowUranus", i18n( "Toggle display of Uranus" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowNeptune", i18n( "Toggle display of Neptune" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowPluto", i18n( "Toggle display of Pluto" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowAsteroids", i18n( "Toggle display of Asteroids" ), i18n( "bool" ) ); - new QListViewItem( opsShowObj, "ShowComets", i18n( "Toggle display of Comets" ), i18n( "bool" ) ); + opsShowObj = new TQListViewItem( otv->OptionsList, i18n( "Show Objects" ) ); + new TQListViewItem( opsShowObj, "ShowStars", i18n( "Toggle display of Stars" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowDeepSky", i18n( "Toggle display of all deep-sky objects" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowMessier", i18n( "Toggle display of Messier object symbols" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowMessierImages", i18n( "Toggle display of Messier object images" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowNGC", i18n( "Toggle display of NGC objects" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowIC", i18n( "Toggle display of IC objects" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowPlanets", i18n( "Toggle display of all solar system bodies" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowSun", i18n( "Toggle display of Sun" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowMoon", i18n( "Toggle display of Moon" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowMercury", i18n( "Toggle display of Mercury" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowVenus", i18n( "Toggle display of Venus" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowMars", i18n( "Toggle display of Mars" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowJupiter", i18n( "Toggle display of Jupiter" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowSaturn", i18n( "Toggle display of Saturn" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowUranus", i18n( "Toggle display of Uranus" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowNeptune", i18n( "Toggle display of Neptune" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowPluto", i18n( "Toggle display of Pluto" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowAsteroids", i18n( "Toggle display of Asteroids" ), i18n( "bool" ) ); + new TQListViewItem( opsShowObj, "ShowComets", i18n( "Toggle display of Comets" ), i18n( "bool" ) ); argChangeViewOption->OptionName->insertItem( "ShowSAO" ); argChangeViewOption->OptionName->insertItem( "ShowDeepSky" ); argChangeViewOption->OptionName->insertItem( "ShowMess" ); @@ -579,22 +579,22 @@ void ScriptBuilder::initViewOptions() { argChangeViewOption->OptionName->insertItem( "ShowAsteroids" ); argChangeViewOption->OptionName->insertItem( "ShowComets" ); - opsShowOther = new QListViewItem( otv->OptionsList, i18n( "Show Other" ) ); - new QListViewItem( opsShowOther, "ShowCLines", i18n( "Toggle display of constellation lines" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowCBounds", i18n( "Toggle display of constellation boundaries" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowCNames", i18n( "Toggle display of constellation names" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowMilkyWay", i18n( "Toggle display of Milky Way" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowGrid", i18n( "Toggle display of the coordinate grid" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowEquator", i18n( "Toggle display of the celestial equator" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowEcliptic", i18n( "Toggle display of the ecliptic" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowHorizon", i18n( "Toggle display of the horizon line" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowGround", i18n( "Toggle display of the opaque ground" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowStarNames", i18n( "Toggle display of star name labels" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowStarMagnitudes", i18n( "Toggle display of star magnitude labels" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowAsteroidNames", i18n( "Toggle display of asteroid name labels" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowCometNames", i18n( "Toggle display of comet name labels" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowPlanetNames", i18n( "Toggle display of planet name labels" ), i18n( "bool" ) ); - new QListViewItem( opsShowOther, "ShowPlanetImages", i18n( "Toggle display of planet images" ), i18n( "bool" ) ); + opsShowOther = new TQListViewItem( otv->OptionsList, i18n( "Show Other" ) ); + new TQListViewItem( opsShowOther, "ShowCLines", i18n( "Toggle display of constellation lines" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowCBounds", i18n( "Toggle display of constellation boundaries" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowCNames", i18n( "Toggle display of constellation names" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowMilkyWay", i18n( "Toggle display of Milky Way" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowGrid", i18n( "Toggle display of the coordinate grid" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowEquator", i18n( "Toggle display of the celestial equator" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowEcliptic", i18n( "Toggle display of the ecliptic" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowHorizon", i18n( "Toggle display of the horizon line" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowGround", i18n( "Toggle display of the opaque ground" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowStarNames", i18n( "Toggle display of star name labels" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowStarMagnitudes", i18n( "Toggle display of star magnitude labels" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowAsteroidNames", i18n( "Toggle display of asteroid name labels" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowCometNames", i18n( "Toggle display of comet name labels" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowPlanetNames", i18n( "Toggle display of planet name labels" ), i18n( "bool" ) ); + new TQListViewItem( opsShowOther, "ShowPlanetImages", i18n( "Toggle display of planet images" ), i18n( "bool" ) ); argChangeViewOption->OptionName->insertItem( "ShowCLines" ); argChangeViewOption->OptionName->insertItem( "ShowCBounds" ); argChangeViewOption->OptionName->insertItem( "ShowCNames" ); @@ -611,27 +611,27 @@ void ScriptBuilder::initViewOptions() { argChangeViewOption->OptionName->insertItem( "ShowPlanetNames" ); argChangeViewOption->OptionName->insertItem( "ShowPlanetImages" ); - opsCName = new QListViewItem( otv->OptionsList, i18n( "Constellation Names" ) ); - new QListViewItem( opsCName, "UseLatinConstellNames", i18n( "Show Latin constellation names" ), i18n( "bool" ) ); - new QListViewItem( opsCName, "UseLocalConstellNames", i18n( "Show constellation names in local language" ), i18n( "bool" ) ); - new QListViewItem( opsCName, "UseAbbrevConstellNames", i18n( "Show IAU-standard constellation abbreviations" ), i18n( "bool" ) ); + opsCName = new TQListViewItem( otv->OptionsList, i18n( "Constellation Names" ) ); + new TQListViewItem( opsCName, "UseLatinConstellNames", i18n( "Show Latin constellation names" ), i18n( "bool" ) ); + new TQListViewItem( opsCName, "UseLocalConstellNames", i18n( "Show constellation names in local language" ), i18n( "bool" ) ); + new TQListViewItem( opsCName, "UseAbbrevConstellNames", i18n( "Show IAU-standard constellation abbreviations" ), i18n( "bool" ) ); argChangeViewOption->OptionName->insertItem( "UseLatinConstellNames" ); argChangeViewOption->OptionName->insertItem( "UseLocalConstellNames" ); argChangeViewOption->OptionName->insertItem( "UseAbbrevConstellNames" ); - opsHide = new QListViewItem( otv->OptionsList, i18n( "Hide Items" ) ); - new QListViewItem( opsHide, "HideOnSlew", i18n( "Toggle whether objects hidden while slewing display" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "SlewTimeScale", i18n( "Timestep threshold (in seconds) for hiding objects" ), i18n( "double" ) ); - new QListViewItem( opsHide, "HideStars", i18n( "Hide faint stars while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HidePlanets", i18n( "Hide solar system bodies while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideMessier", i18n( "Hide Messier objects while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideNGC", i18n( "Hide NGC objects while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideIC", i18n( "Hide IC objects while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideMilkyWay", i18n( "Hide Milky Way while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideCNames", i18n( "Hide constellation names while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideCLines", i18n( "Hide constellation lines while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideCBounds", i18n( "Hide constellation boundaries while slewing?" ), i18n( "bool" ) ); - new QListViewItem( opsHide, "HideGrid", i18n( "Hide coordinate grid while slewing?" ), i18n( "bool" ) ); + opsHide = new TQListViewItem( otv->OptionsList, i18n( "Hide Items" ) ); + new TQListViewItem( opsHide, "HideOnSlew", i18n( "Toggle whether objects hidden while slewing display" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "SlewTimeScale", i18n( "Timestep threshold (in seconds) for hiding objects" ), i18n( "double" ) ); + new TQListViewItem( opsHide, "HideStars", i18n( "Hide faint stars while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HidePlanets", i18n( "Hide solar system bodies while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideMessier", i18n( "Hide Messier objects while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideNGC", i18n( "Hide NGC objects while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideIC", i18n( "Hide IC objects while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideMilkyWay", i18n( "Hide Milky Way while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideCNames", i18n( "Hide constellation names while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideCLines", i18n( "Hide constellation lines while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideCBounds", i18n( "Hide constellation boundaries while slewing?" ), i18n( "bool" ) ); + new TQListViewItem( opsHide, "HideGrid", i18n( "Hide coordinate grid while slewing?" ), i18n( "bool" ) ); argChangeViewOption->OptionName->insertItem( "HideOnSlew" ); argChangeViewOption->OptionName->insertItem( "SlewTimeScale" ); argChangeViewOption->OptionName->insertItem( "HideStars" ); @@ -645,18 +645,18 @@ void ScriptBuilder::initViewOptions() { argChangeViewOption->OptionName->insertItem( "HideCBounds" ); argChangeViewOption->OptionName->insertItem( "HideGrid" ); - opsSkymap = new QListViewItem( otv->OptionsList, i18n( "Skymap Options" ) ); - new QListViewItem( opsSkymap, "UseAltAz", i18n( "Use Horizontal coordinates? (otherwise, use Equatorial)" ), i18n( "bool" ) ); - new QListViewItem( opsSkymap, "ZoomFactor", i18n( "Set the Zoom Factor" ), i18n( "double" ) ); - new QListViewItem( opsSkymap, "FOV Size", i18n( "Select angular size for the FOV symbol (in arcmin)" ), i18n( "double" ) ); - new QListViewItem( opsSkymap, "FOV Shape", i18n( "Select shape for the FOV symbol (0=Square, 1=Circle, 2=Crosshairs, 4=Bullseye)" ), i18n( "int" ) ); - new QListViewItem( opsSkymap, "FOV Color", i18n( "Select color for the FOV symbol" ), i18n( "string" ) ); - new QListViewItem( opsSkymap, "AnimateSlewing", i18n( "Use animated slewing? (otherwise, \"snap\" to new focus)" ), i18n( "bool" ) ); - new QListViewItem( opsSkymap, "UseRefraction", i18n( "Correct for atmospheric refraction?" ), i18n( "bool" ) ); - new QListViewItem( opsSkymap, "UseAutoLabel", i18n( "Automatically attach name label to centered object?" ), i18n( "bool" ) ); - new QListViewItem( opsSkymap, "UseHoverLabel", i18n( "Attach temporary name label when hovering mouse over an object?" ), i18n( "bool" ) ); - new QListViewItem( opsSkymap, "UseAutoTrail", i18n( "Automatically add trail to centered solar system body?" ), i18n( "bool" ) ); - new QListViewItem( opsSkymap, "FadePlanetTrails", i18n( "Planet trails fade to sky color? (otherwise color is constant)" ), i18n( "bool" ) ); + opsSkymap = new TQListViewItem( otv->OptionsList, i18n( "Skymap Options" ) ); + new TQListViewItem( opsSkymap, "UseAltAz", i18n( "Use Horizontal coordinates? (otherwise, use Equatorial)" ), i18n( "bool" ) ); + new TQListViewItem( opsSkymap, "ZoomFactor", i18n( "Set the Zoom Factor" ), i18n( "double" ) ); + new TQListViewItem( opsSkymap, "FOV Size", i18n( "Select angular size for the FOV symbol (in arcmin)" ), i18n( "double" ) ); + new TQListViewItem( opsSkymap, "FOV Shape", i18n( "Select shape for the FOV symbol (0=Square, 1=Circle, 2=Crosshairs, 4=Bullseye)" ), i18n( "int" ) ); + new TQListViewItem( opsSkymap, "FOV Color", i18n( "Select color for the FOV symbol" ), i18n( "string" ) ); + new TQListViewItem( opsSkymap, "AnimateSlewing", i18n( "Use animated slewing? (otherwise, \"snap\" to new focus)" ), i18n( "bool" ) ); + new TQListViewItem( opsSkymap, "UseRefraction", i18n( "Correct for atmospheric refraction?" ), i18n( "bool" ) ); + new TQListViewItem( opsSkymap, "UseAutoLabel", i18n( "Automatically attach name label to centered object?" ), i18n( "bool" ) ); + new TQListViewItem( opsSkymap, "UseHoverLabel", i18n( "Attach temporary name label when hovering mouse over an object?" ), i18n( "bool" ) ); + new TQListViewItem( opsSkymap, "UseAutoTrail", i18n( "Automatically add trail to centered solar system body?" ), i18n( "bool" ) ); + new TQListViewItem( opsSkymap, "FadePlanetTrails", i18n( "Planet trails fade to sky color? (otherwise color is constant)" ), i18n( "bool" ) ); argChangeViewOption->OptionName->insertItem( "UseAltAz" ); argChangeViewOption->OptionName->insertItem( "ZoomFactor" ); argChangeViewOption->OptionName->insertItem( "FOVName" ); @@ -670,16 +670,16 @@ void ScriptBuilder::initViewOptions() { argChangeViewOption->OptionName->insertItem( "AnimateSlewing" ); argChangeViewOption->OptionName->insertItem( "FadePlanetTrails" ); - opsLimit = new QListViewItem( otv->OptionsList, i18n( "Limits" ) ); - new QListViewItem( opsLimit, "magLimitDrawStar", i18n( "magnitude of faintest star drawn on map when zoomed in" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "magLimitDrawStarZoomOut", i18n( "magnitude of faintest star drawn on map when zoomed out" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "magLimitDrawDeepSky", i18n( "magnitude of faintest nonstellar object drawn on map when zoomed in" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "magLimitDrawDeepSkyZoomOut", i18n( "magnitude of faintest nonstellar object drawn on map when zoomed out" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "magLimitDrawStarInfo", i18n( "magnitude of faintest star labeled on map" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "magLimitHideStar", i18n( "magnitude of brightest star hidden while slewing" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "magLimitAsteroid", i18n( "magnitude of faintest asteroid drawn on map" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "magLimitAsteroidName", i18n( "magnitude of faintest asteroid labeled on map" ), i18n( "double" ) ); - new QListViewItem( opsLimit, "maxRadCometName", i18n( "comets nearer to the Sun than this (in AU) are labeled on map" ), i18n( "double" ) ); + opsLimit = new TQListViewItem( otv->OptionsList, i18n( "Limits" ) ); + new TQListViewItem( opsLimit, "magLimitDrawStar", i18n( "magnitude of faintest star drawn on map when zoomed in" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "magLimitDrawStarZoomOut", i18n( "magnitude of faintest star drawn on map when zoomed out" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "magLimitDrawDeepSky", i18n( "magnitude of faintest nonstellar object drawn on map when zoomed in" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "magLimitDrawDeepSkyZoomOut", i18n( "magnitude of faintest nonstellar object drawn on map when zoomed out" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "magLimitDrawStarInfo", i18n( "magnitude of faintest star labeled on map" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "magLimitHideStar", i18n( "magnitude of brightest star hidden while slewing" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "magLimitAsteroid", i18n( "magnitude of faintest asteroid drawn on map" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "magLimitAsteroidName", i18n( "magnitude of faintest asteroid labeled on map" ), i18n( "double" ) ); + new TQListViewItem( opsLimit, "maxRadCometName", i18n( "comets nearer to the Sun than this (in AU) are labeled on map" ), i18n( "double" ) ); argChangeViewOption->OptionName->insertItem( "magLimitDrawStar" ); argChangeViewOption->OptionName->insertItem( "magLimitDrawStarZoomOut" ); argChangeViewOption->OptionName->insertItem( "magLimitDrawDeepSky" ); @@ -701,11 +701,11 @@ void ScriptBuilder::initViewOptions() { argLoadColorScheme->SchemeList->insertItem( i18n( "use 'night vision' color scheme", "Night Vision" ) ); argLoadColorScheme->SchemeList->insertItem( i18n( "use 'moonless night' color scheme", "Moonless Night" ) ); - QFile file; - QString line; + TQFile file; + TQString line; file.setName( locate( "appdata", "colors.dat" ) ); //determine filename in local user KDE directory tree. if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); + TQTextStream stream( &file ); while ( !stream.eof() ) { line = stream.readLine(); @@ -735,7 +735,7 @@ void ScriptBuilder::slotNew() { void ScriptBuilder::slotOpen() { saveWarning(); - QString fname; + TQString fname; KTempFile tmpfile; tmpfile.setAutoDelete(true); @@ -753,24 +753,24 @@ void ScriptBuilder::slotOpen() { fname = currentFileURL.path(); } else { fname = tmpfile.name(); - if ( ! KIO::NetAccess::download( currentFileURL, fname, (QWidget*) 0 ) ) + if ( ! KIO::NetAccess::download( currentFileURL, fname, (TQWidget*) 0 ) ) KMessageBox::sorry( 0, i18n( "Could not download remote file." ), i18n( "Download Error" ) ); } - QFile f( fname ); + TQFile f( fname ); if ( !f.open( IO_ReadOnly) ) { - QString message = i18n( "Could not open file %1." ).arg( f.name() ); + TQString message = i18n( "Could not open file %1." ).arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); currentFileURL = ""; return; } - QTextStream istream(&f); + TQTextStream istream(&f); readScript( istream ); f.close(); } else if ( ! currentFileURL.url().isEmpty() ) { - QString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); + TQString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); KMessageBox::sorry( 0, message, i18n( "Invalid URL" ) ); currentFileURL = ""; } @@ -778,13 +778,13 @@ void ScriptBuilder::slotOpen() { } void ScriptBuilder::slotSave() { - QString fname; + TQString fname; KTempFile tmpfile; tmpfile.setAutoDelete(true); if ( currentScriptName.isEmpty() ) { //Get Script Name and Author info - if ( snd->exec() == QDialog::Accepted ) { + if ( snd->exec() == TQDialog::Accepted ) { currentScriptName = snd->ScriptName->text(); currentAuthor = snd->AuthorName->text(); } else { @@ -802,8 +802,8 @@ void ScriptBuilder::slotSave() { fname = currentFileURL.path(); //Warn user if file exists - if (QFile::exists(currentFileURL.path())) { - int r=KMessageBox::warningContinueCancel(static_cast<QWidget *>(parent()), + if (TQFile::exists(currentFileURL.path())) { + int r=KMessageBox::warningContinueCancel(static_cast<TQWidget *>(parent()), i18n( "A file named \"%1\" already exists. " "Overwrite it?" ).arg(currentFileURL.fileName()), i18n( "Overwrite File?" ), @@ -817,15 +817,15 @@ void ScriptBuilder::slotSave() { if ( fname.right( 7 ).lower() != ".kstars" ) fname += ".kstars"; - QFile f( fname ); + TQFile f( fname ); if ( !f.open( IO_WriteOnly) ) { - QString message = i18n( "Could not open file %1." ).arg( f.name() ); + TQString message = i18n( "Could not open file %1." ).arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); currentFileURL = ""; return; } - QTextStream ostream(&f); + TQTextStream ostream(&f); writeScript( ostream ); f.close(); @@ -833,8 +833,8 @@ void ScriptBuilder::slotSave() { chmod( fname.ascii(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH ); if ( tmpfile.name() == fname ) { //need to upload to remote location - if ( ! KIO::NetAccess::upload( tmpfile.name(), currentFileURL, (QWidget*) 0 ) ) { - QString message = i18n( "Could not upload image to remote location: %1" ).arg( currentFileURL.prettyURL() ); + if ( ! KIO::NetAccess::upload( tmpfile.name(), currentFileURL, (TQWidget*) 0 ) ) { + TQString message = i18n( "Could not upload image to remote location: %1" ).arg( currentFileURL.prettyURL() ); KMessageBox::sorry( 0, message, i18n( "Could not upload file" ) ); } } @@ -842,7 +842,7 @@ void ScriptBuilder::slotSave() { setUnsavedChanges( false ); } else { - QString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); + TQString message = i18n( "Invalid URL: %1" ).arg( currentFileURL.url() ); KMessageBox::sorry( 0, message, i18n( "Invalid URL" ) ); currentFileURL = ""; } @@ -856,8 +856,8 @@ void ScriptBuilder::slotSaveAs() { void ScriptBuilder::saveWarning() { if ( UnsavedChanges ) { - QString caption = i18n( "Save Changes to Script?" ); - QString message = i18n( "The current script has unsaved changes. Would you like to save before closing it?" ); + TQString caption = i18n( "Save Changes to Script?" ); + TQString message = i18n( "The current script has unsaved changes. Would you like to save before closing it?" ); int ans = KMessageBox::warningYesNoCancel( 0, message, caption, KStdGuiItem::save(), KStdGuiItem::discard() ); if ( ans == KMessageBox::Yes ) { slotSave(); @@ -879,19 +879,19 @@ void ScriptBuilder::slotRunScript() { //For some reason, I can't use KTempFile here! If I do, then the temporary script //is not executable. Bizarre... //KTempFile tmpfile; - //QString fname = tmpfile.name(); - QString fname = locateLocal( "tmp", "kstars-tempscript" ); + //TQString fname = tmpfile.name(); + TQString fname = locateLocal( "tmp", "kstars-tempscript" ); - QFile f( fname ); + TQFile f( fname ); if ( f.exists() ) f.remove(); if ( !f.open( IO_WriteOnly) ) { - QString message = i18n( "Could not open file %1." ).arg( f.name() ); + TQString message = i18n( "Could not open file %1." ).arg( f.name() ); KMessageBox::sorry( 0, message, i18n( "Could Not Open File" ) ); currentFileURL = ""; return; } - QTextStream ostream(&f); + TQTextStream ostream(&f); writeScript( ostream ); f.close(); @@ -912,9 +912,9 @@ void ScriptBuilder::slotRunScript() { // show(); } -void ScriptBuilder::writeScript( QTextStream &ostream ) { - QString mainpre = "dcop $KSTARS $MAIN "; - QString clockpre = "dcop $KSTARS $CLOCK "; +void ScriptBuilder::writeScript( TQTextStream &ostream ) { + TQString mainpre = "dcop $KSTARS $MAIN "; + TQString clockpre = "dcop $KSTARS $CLOCK "; //Write script header ostream << "#!/bin/bash" << endl; @@ -958,8 +958,8 @@ void ScriptBuilder::writeScript( QTextStream &ostream ) { ostream << "##" << endl; } -void ScriptBuilder::readScript( QTextStream &istream ) { - QString line; +void ScriptBuilder::readScript( TQTextStream &istream ) { + TQString line; while ( ! istream.eof() ) { line = istream.readLine(); @@ -983,7 +983,7 @@ void ScriptBuilder::readScript( QTextStream &istream ) { line = line.mid( 20 ); //construct a stringlist that is fcn name and its arg name/value pairs - QStringList fn = QStringList::split( " ", line ); + TQStringList fn = TQStringList::split( " ", line ); if ( parseFunction( fn ) ) { sb->ScriptListBox->insertItem( ScriptList.current()->name() ); @@ -1002,14 +1002,14 @@ void ScriptBuilder::readScript( QTextStream &istream ) { } } -bool ScriptBuilder::parseFunction( QStringList &fn ) +bool ScriptBuilder::parseFunction( TQStringList &fn ) { // clean up the string list first if needed // We need to perform this in case we havea quoted string "NGC 3000" because this will counted // as two arguments, and it should be counted as one. bool foundQuote(false), quoteProcessed(false); - QString cur, arg; - QStringList::iterator it; + TQString cur, arg; + TQStringList::iterator it; for (it = fn.begin(); it != fn.end(); ++it) { @@ -1041,7 +1041,7 @@ bool ScriptBuilder::parseFunction( QStringList &fn ) } if (quoteProcessed) - fn = QStringList::split( "'", arg ); + fn = TQStringList::split( "'", arg ); //loop over known functions to find a name match for ( ScriptFunction *sf = KStarsFunctionList.first(); sf; sf = KStarsFunctionList.next() ) @@ -1049,7 +1049,7 @@ bool ScriptBuilder::parseFunction( QStringList &fn ) if ( fn[0] == sf->name() ) { if ( fn[0] == "setGeoLocation" ) { - QString city( fn[1] ), prov( "" ), cntry( fn[2] ); + TQString city( fn[1] ), prov( "" ), cntry( fn[2] ); if ( fn.count() == 4 ) { prov = fn[2]; cntry = fn[3]; } if ( fn.count() == 3 || fn.count() == 4 ) { ScriptList.append( new ScriptFunction( sf ) ); @@ -1130,7 +1130,7 @@ void ScriptBuilder::slotRemoveFunction() { void ScriptBuilder::slotAddFunction() { ScriptFunction *sc = NULL; - QListViewItem *currentItem = sb->FunctionListView->currentItem(); + TQListViewItem *currentItem = sb->FunctionListView->currentItem(); if ( currentItem == NULL || currentItem->depth() == 0) return; @@ -1162,7 +1162,7 @@ void ScriptBuilder::slotMoveFunctionUp() { if ( sb->ScriptListBox->currentItem() > 0 ) { setUnsavedChanges( true ); - QString t = sb->ScriptListBox->currentText(); + TQString t = sb->ScriptListBox->currentText(); unsigned int n = sb->ScriptListBox->currentItem(); ScriptFunction *tmp = ScriptList.take( n ); @@ -1179,7 +1179,7 @@ void ScriptBuilder::slotMoveFunctionDown() { sb->ScriptListBox->currentItem() < ((int) sb->ScriptListBox->count())-1 ) { setUnsavedChanges( true ); - QString t = sb->ScriptListBox->currentText(); + TQString t = sb->ScriptListBox->currentText(); unsigned int n = sb->ScriptListBox->currentItem(); ScriptFunction *tmp = ScriptList.take( n ); @@ -1231,13 +1231,13 @@ void ScriptBuilder::slotArgWidget() { //Display the function's arguments widget if ( sb->ScriptListBox->currentItem() > -1 && sb->ScriptListBox->currentItem() < ((int) sb->ScriptListBox->count()) ) { - QString t = sb->ScriptListBox->currentText(); + TQString t = sb->ScriptListBox->currentText(); unsigned int n = sb->ScriptListBox->currentItem(); ScriptFunction *sf = ScriptList.at( n ); if ( sf->name() == "lookTowards" ) { sb->ArgStack->raiseWidget( argLookToward ); - QString s = sf->argVal(0); + TQString s = sf->argVal(0); argLookToward->FocusEdit->setCurrentText( s ); } else if ( sf->name() == "setRaDec" ) { @@ -1328,8 +1328,8 @@ void ScriptBuilder::slotArgWidget() { if ( sf->argVal(3).isEmpty() ) ok = false; if (ok) min = sf->argVal(4).toInt(&ok); if (ok) sec = sf->argVal(5).toInt(&ok); - if (ok) argSetLocalTime->TimeBox->setTime( QTime( hour, min, sec ) ); - else argSetLocalTime->TimeBox->setTime( QTime( QTime::currentTime() ) ); + if (ok) argSetLocalTime->TimeBox->setTime( TQTime( hour, min, sec ) ); + else argSetLocalTime->TimeBox->setTime( TQTime( TQTime::currentTime() ) ); } else if ( sf->name() == "waitFor" ) { sb->ArgStack->raiseWidget( argWaitFor ); @@ -1365,7 +1365,7 @@ void ScriptBuilder::slotArgWidget() { sb->ArgStack->raiseWidget( argSetColor ); if ( sf->argVal(0).isEmpty() ) sf->setArg( 0, "SkyColor" ); //initialize default value argSetColor->ColorName->setCurrentItem( ks->data()->colorScheme()->nameFromKey( sf->argVal(0) ) ); - argSetColor->ColorValue->setColor( QColor( sf->argVal(1).remove('\\') ) ); + argSetColor->ColorValue->setColor( TQColor( sf->argVal(1).remove('\\') ) ); } else if ( sf->name() == "loadColorScheme" ) { sb->ArgStack->raiseWidget( argLoadColorScheme ); @@ -1774,7 +1774,7 @@ void ScriptBuilder::slotArgWidget() { void ScriptBuilder::slotShowDoc() { ScriptFunction *sc = NULL; - QListViewItem *currentItem = sb->FunctionListView->currentItem(); + TQListViewItem *currentItem = sb->FunctionListView->currentItem(); if ( currentItem == NULL || currentItem->depth() == 0) return; @@ -1805,7 +1805,7 @@ void ScriptBuilder::slotShowDoc() { void ScriptBuilder::slotFindCity() { LocationDialog ld( ks ); - if ( ld.exec() == QDialog::Accepted ) { + if ( ld.exec() == TQDialog::Accepted ) { if ( ld.selectedCity() ) { // set new location names argSetGeoLocation->CityName->setText( ld.selectedCityName() ); @@ -1829,7 +1829,7 @@ void ScriptBuilder::slotFindCity() { void ScriptBuilder::slotFindObject() { FindDialog fd( ks ); - if ( fd.exec() == QDialog::Accepted && fd.currentItem() ) { + if ( fd.exec() == TQDialog::Accepted && fd.currentItem() ) { setUnsavedChanges( true ); argLookToward->FocusEdit->setCurrentText( fd.currentItem()->objName()->text() ); @@ -1839,7 +1839,7 @@ void ScriptBuilder::slotFindObject() { void ScriptBuilder::slotINDIFindObject() { FindDialog fd( ks ); - if ( fd.exec() == QDialog::Accepted && fd.currentItem() ) { + if ( fd.exec() == TQDialog::Accepted && fd.currentItem() ) { setUnsavedChanges( true ); argSetTargetNameINDI->objectName->setText( fd.currentItem()->objName()->text() ); @@ -1855,7 +1855,7 @@ void ScriptBuilder::slotINDIWaitCheck(bool /*toggleState*/) void ScriptBuilder::slotShowOptions() { //Show tree-view of view options - if ( otv->exec() == QDialog::Accepted ) { + if ( otv->exec() == TQDialog::Accepted ) { argChangeViewOption->OptionName->setCurrentItem( otv->OptionsList->currentItem()->text(0) ); } } @@ -1885,7 +1885,7 @@ void ScriptBuilder::slotRa() { if ( ok ) { setUnsavedChanges( true ); - sf->setArg( 0, QString( "%1" ).arg( ra.Hours() ) ); + sf->setArg( 0, TQString( "%1" ).arg( ra.Hours() ) ); if ( ! sf->argVal(1).isEmpty() ) sf->setValid( true ); } else { @@ -1909,7 +1909,7 @@ void ScriptBuilder::slotDec() { if ( ok ) { setUnsavedChanges( true ); - sf->setArg( 1, QString( "%1" ).arg( dec.Degrees() ) ); + sf->setArg( 1, TQString( "%1" ).arg( dec.Degrees() ) ); if ( ! sf->argVal(0).isEmpty() ) sf->setValid( true ); } else { @@ -1932,7 +1932,7 @@ void ScriptBuilder::slotAz() { dms az = argSetAltAz->AzBox->createDms(true, &ok); if ( ok ) { setUnsavedChanges( true ); - sf->setArg( 1, QString( "%1" ).arg( az.Degrees() ) ); + sf->setArg( 1, TQString( "%1" ).arg( az.Degrees() ) ); if ( ! sf->argVal(0).isEmpty() ) sf->setValid( true ); } else { sf->setArg( 1, "" ); @@ -1955,7 +1955,7 @@ void ScriptBuilder::slotAlt() { if ( ok ) { setUnsavedChanges( true ); - sf->setArg( 0, QString( "%1" ).arg( alt.Degrees() ) ); + sf->setArg( 0, TQString( "%1" ).arg( alt.Degrees() ) ); if ( ! sf->argVal(1).isEmpty() ) sf->setValid( true ); } else { sf->setArg( 0, "" ); @@ -1974,9 +1974,9 @@ void ScriptBuilder::slotChangeDate() { ExtDate date = argSetLocalTime->DateBox->date(); - sf->setArg( 0, QString( "%1" ).arg( date.year() ) ); - sf->setArg( 1, QString( "%1" ).arg( date.month() ) ); - sf->setArg( 2, QString( "%1" ).arg( date.day() ) ); + sf->setArg( 0, TQString( "%1" ).arg( date.year() ) ); + sf->setArg( 1, TQString( "%1" ).arg( date.month() ) ); + sf->setArg( 2, TQString( "%1" ).arg( date.day() ) ); if ( ! sf->argVal(3).isEmpty() ) sf->setValid( true ); } else { kdWarning() << i18n( "Mismatch between function and Arg widget (expected %1.)" ).arg( "setLocalTime" ) << endl; @@ -1989,11 +1989,11 @@ void ScriptBuilder::slotChangeTime() { if ( sf->name() == "setLocalTime" ) { setUnsavedChanges( true ); - QTime time = argSetLocalTime->TimeBox->time(); + TQTime time = argSetLocalTime->TimeBox->time(); - sf->setArg( 3, QString( "%1" ).arg( time.hour() ) ); - sf->setArg( 4, QString( "%1" ).arg( time.minute() ) ); - sf->setArg( 5, QString( "%1" ).arg( time.second() ) ); + sf->setArg( 3, TQString( "%1" ).arg( time.hour() ) ); + sf->setArg( 4, TQString( "%1" ).arg( time.minute() ) ); + sf->setArg( 5, TQString( "%1" ).arg( time.second() ) ); if ( ! sf->argVal(0).isEmpty() ) sf->setValid( true ); } else { kdWarning() << i18n( "Mismatch between function and Arg widget (expected %1.)" ).arg( "setLocalTime" ) << endl; @@ -2010,7 +2010,7 @@ void ScriptBuilder::slotWaitFor() { if ( ok ) { setUnsavedChanges( true ); - sf->setArg( 0, QString( "%1" ).arg( delay ) ); + sf->setArg( 0, TQString( "%1" ).arg( delay ) ); sf->setValid( true ); } else { sf->setValid( false ); @@ -2024,7 +2024,7 @@ void ScriptBuilder::slotWaitForKey() { ScriptFunction *sf = ScriptList.at( sb->ScriptListBox->currentItem() ); if ( sf->name() == "waitForKey" ) { - QString sKey = argWaitForKey->WaitKeyEdit->text().stripWhiteSpace(); + TQString sKey = argWaitForKey->WaitKeyEdit->text().stripWhiteSpace(); //DCOP script can only use single keystrokes; make sure entry is either one character, //or the word 'space' @@ -2077,7 +2077,7 @@ void ScriptBuilder::slotChangeCity() { ScriptFunction *sf = ScriptList.at( sb->ScriptListBox->currentItem() ); if ( sf->name() == "setGeoLocation" ) { - QString city = argSetGeoLocation->CityName->text(); + TQString city = argSetGeoLocation->CityName->text(); if ( city.length() ) { setUnsavedChanges( true ); @@ -2097,7 +2097,7 @@ void ScriptBuilder::slotChangeProvince() { ScriptFunction *sf = ScriptList.at( sb->ScriptListBox->currentItem() ); if ( sf->name() == "setGeoLocation" ) { - QString province = argSetGeoLocation->ProvinceName->text(); + TQString province = argSetGeoLocation->ProvinceName->text(); if ( province.length() ) { setUnsavedChanges( true ); @@ -2117,7 +2117,7 @@ void ScriptBuilder::slotChangeCountry() { ScriptFunction *sf = ScriptList.at( sb->ScriptListBox->currentItem() ); if ( sf->name() == "setGeoLocation" ) { - QString country = argSetGeoLocation->CountryName->text(); + TQString country = argSetGeoLocation->CountryName->text(); if ( country.length() ) { setUnsavedChanges( true ); @@ -2139,7 +2139,7 @@ void ScriptBuilder::slotTimeScale() { if ( sf->name() == "setClockScale" ) { setUnsavedChanges( true ); - sf->setArg( 0, QString( "%1" ).arg( argTimeScale->TimeScale->tsbox()->timeScale() ) ); + sf->setArg( 0, TQString( "%1" ).arg( argTimeScale->TimeScale->tsbox()->timeScale() ) ); sf->setValid( true ); } else { kdWarning() << i18n( "Mismatch between function and Arg widget (expected %1.)" ).arg( "setClockScale" ) << endl; @@ -2170,8 +2170,8 @@ void ScriptBuilder::slotExportImage() { setUnsavedChanges( true ); sf->setArg( 0, argExportImage->ExportFileName->url() ); - sf->setArg( 1, QString("%1").arg( argExportImage->ExportWidth->value() ) ); - sf->setArg( 2, QString("%1").arg( argExportImage->ExportHeight->value() ) ); + sf->setArg( 1, TQString("%1").arg( argExportImage->ExportWidth->value() ) ); + sf->setArg( 2, TQString("%1").arg( argExportImage->ExportHeight->value() ) ); sf->setValid( true ); } else { kdWarning() << i18n( "Mismatch between function and Arg widget (expected %1.)" ).arg( "exportImage" ) << endl; @@ -2200,7 +2200,7 @@ void ScriptBuilder::slotChangeColorName() { argSetColor->ColorValue->setColor( ks->data()->colorScheme()->colorAt( argSetColor->ColorName->currentItem() ) ); sf->setArg( 0, ks->data()->colorScheme()->keyAt( argSetColor->ColorName->currentItem() ) ); - QString cname( argSetColor->ColorValue->color().name() ); + TQString cname( argSetColor->ColorValue->color().name() ); if ( cname.at(0) == '#' ) cname = "\\" + cname; //prepend a "\" so bash doesn't think we have a comment sf->setArg( 1, cname ); sf->setValid( true ); @@ -2216,7 +2216,7 @@ void ScriptBuilder::slotChangeColor() { setUnsavedChanges( true ); sf->setArg( 0, ks->data()->colorScheme()->keyAt( argSetColor->ColorName->currentItem() ) ); - QString cname( argSetColor->ColorValue->color().name() ); + TQString cname( argSetColor->ColorValue->color().name() ); if ( cname.at(0) == '#' ) cname = "\\" + cname; //prepend a "\" so bash doesn't think we have a comment sf->setArg( 1, cname ); sf->setValid( true ); @@ -2225,7 +2225,7 @@ void ScriptBuilder::slotChangeColor() { } } -void ScriptBuilder::slotLoadColorScheme(QListBoxItem */*i*/) { +void ScriptBuilder::slotLoadColorScheme(TQListBoxItem */*i*/) { ScriptFunction *sf = ScriptList.at( sb->ScriptListBox->currentItem() ); if ( sf->name() == "loadColorScheme" ) { @@ -2459,10 +2459,10 @@ void ScriptBuilder::slotINDISetTargetCoordDeviceRA() dms ra = argSetTargetCoordINDI->RaBox->createDms(false, &ok); if ( ok ) { - if (sf->argVal(1) != QString( "%1" ).arg( ra.Hours() )) + if (sf->argVal(1) != TQString( "%1" ).arg( ra.Hours() )) setUnsavedChanges( true ); - sf->setArg( 1, QString( "%1" ).arg( ra.Hours() ) ); + sf->setArg( 1, TQString( "%1" ).arg( ra.Hours() ) ); if ( ( ! sf->argVal(0).isEmpty() ) && ( ! sf->argVal(2).isEmpty() )) sf->setValid( true ); else sf->setValid(false); @@ -2492,10 +2492,10 @@ void ScriptBuilder::slotINDISetTargetCoordDeviceDEC() dms dec = argSetTargetCoordINDI->DecBox->createDms(true, &ok); if ( ok ) { - if (sf->argVal(2) != QString( "%1" ).arg( dec.Degrees() )) + if (sf->argVal(2) != TQString( "%1" ).arg( dec.Degrees() )) setUnsavedChanges( true ); - sf->setArg( 2, QString( "%1" ).arg( dec.Degrees() ) ); + sf->setArg( 2, TQString( "%1" ).arg( dec.Degrees() ) ); if ( ( ! sf->argVal(0).isEmpty() ) && ( ! sf->argVal(1).isEmpty() )) sf->setValid( true ); else sf->setValid(false); @@ -2685,7 +2685,7 @@ void ScriptBuilder::slotINDISetFocusSpeedDeviceName() setUnsavedChanges( true ); sf->setArg(0, argSetFocusSpeedINDI->deviceName->text()); - sf->setArg(1, QString("%1").arg(argSetFocusSpeedINDI->speedIN->value())); + sf->setArg(1, TQString("%1").arg(argSetFocusSpeedINDI->speedIN->value())); sf->setValid(true); } else @@ -2705,7 +2705,7 @@ void ScriptBuilder::slotINDISetFocusSpeed() if (sf->argVal(1).toInt() != argSetFocusSpeedINDI->speedIN->value()) setUnsavedChanges( true ); - sf->setArg(1, QString("%1").arg(argSetFocusSpeedINDI->speedIN->value())); + sf->setArg(1, TQString("%1").arg(argSetFocusSpeedINDI->speedIN->value())); if ((! sf->argVal(0).isEmpty())) sf->setValid(true); else sf->setValid(false); } @@ -2779,7 +2779,7 @@ void ScriptBuilder::slotINDISetFocusTimeoutDeviceName() setUnsavedChanges( true ); sf->setArg(0, argSetFocusTimeoutINDI->deviceName->text()); - sf->setArg(1, QString("%1").arg(argSetFocusTimeoutINDI->timeOut->value())); + sf->setArg(1, TQString("%1").arg(argSetFocusTimeoutINDI->timeOut->value())); sf->setValid(true); } else @@ -2798,7 +2798,7 @@ void ScriptBuilder::slotINDISetFocusTimeout() if (sf->argVal(1).toInt() != argSetFocusTimeoutINDI->timeOut->value()) setUnsavedChanges( true ); - sf->setArg(1, QString("%1").arg(argSetFocusTimeoutINDI->timeOut->value())); + sf->setArg(1, TQString("%1").arg(argSetFocusTimeoutINDI->timeOut->value())); if (! sf->argVal(0).isEmpty()) sf->setValid(true); else sf->setValid(false); } @@ -2851,10 +2851,10 @@ void ScriptBuilder::slotINDISetGeoLocationDeviceLong() dms longitude = argSetGeoLocationINDI->longBox->createDms(true, &ok); if ( ok ) { - if (sf->argVal(1) != QString( "%1" ).arg( longitude.Degrees())) + if (sf->argVal(1) != TQString( "%1" ).arg( longitude.Degrees())) setUnsavedChanges( true ); - sf->setArg( 1, QString( "%1" ).arg( longitude.Degrees() ) ); + sf->setArg( 1, TQString( "%1" ).arg( longitude.Degrees() ) ); if ( ( ! sf->argVal(0).isEmpty() ) && ( ! sf->argVal(2).isEmpty() )) sf->setValid( true ); else sf->setValid(false); @@ -2884,10 +2884,10 @@ void ScriptBuilder::slotINDISetGeoLocationDeviceLat() dms latitude = argSetGeoLocationINDI->latBox->createDms(true, &ok); if ( ok ) { - if (sf->argVal(2) != QString( "%1" ).arg( latitude.Degrees())) + if (sf->argVal(2) != TQString( "%1" ).arg( latitude.Degrees())) setUnsavedChanges( true ); - sf->setArg( 2, QString( "%1" ).arg( latitude.Degrees() ) ); + sf->setArg( 2, TQString( "%1" ).arg( latitude.Degrees() ) ); if ( ( ! sf->argVal(0).isEmpty() ) && ( ! sf->argVal(1).isEmpty() )) sf->setValid( true ); else sf->setValid(false); @@ -2917,7 +2917,7 @@ void ScriptBuilder::slotINDIStartExposureDeviceName() setUnsavedChanges( true ); sf->setArg(0, argStartExposureINDI->deviceName->text()); - sf->setArg(1, QString("%1").arg(argStartExposureINDI->timeOut->value())); + sf->setArg(1, TQString("%1").arg(argStartExposureINDI->timeOut->value())); sf->setValid(true); } else @@ -2937,7 +2937,7 @@ void ScriptBuilder::slotINDIStartExposureTimeout() if (sf->argVal(1).toInt() != argStartExposureINDI->timeOut->value()) setUnsavedChanges( true ); - sf->setArg(1, QString("%1").arg(argStartExposureINDI->timeOut->value())); + sf->setArg(1, TQString("%1").arg(argStartExposureINDI->timeOut->value())); if (! sf->argVal(0).isEmpty()) sf->setValid(true); else sf->setValid(false); } @@ -3117,7 +3117,7 @@ void ScriptBuilder::slotINDISetCCDTempDeviceName() setUnsavedChanges( true ); sf->setArg(0, argSetCCDTempINDI->deviceName->text()); - sf->setArg(1, QString("%1").arg(argSetCCDTempINDI->temp->value())); + sf->setArg(1, TQString("%1").arg(argSetCCDTempINDI->temp->value())); sf->setValid(true); } else @@ -3137,7 +3137,7 @@ void ScriptBuilder::slotINDISetCCDTemp() if (sf->argVal(1).toInt() != argSetCCDTempINDI->temp->value()) setUnsavedChanges( true ); - sf->setArg(1, QString("%1").arg(argSetCCDTempINDI->temp->value())); + sf->setArg(1, TQString("%1").arg(argSetCCDTempINDI->temp->value())); if (! sf->argVal(0).isEmpty()) sf->setValid(true); else sf->setValid(false); } @@ -3165,7 +3165,7 @@ void ScriptBuilder::slotINDISetFilterNumDeviceName() setUnsavedChanges( true ); sf->setArg(0, argSetFilterNumINDI->deviceName->text()); - sf->setArg(1, QString("%1").arg(argSetFilterNumINDI->filter_num->value())); + sf->setArg(1, TQString("%1").arg(argSetFilterNumINDI->filter_num->value())); sf->setValid(true); } else @@ -3185,7 +3185,7 @@ void ScriptBuilder::slotINDISetFilterNum() if (sf->argVal(1).toInt() != argSetFilterNumINDI->filter_num->value()) setUnsavedChanges( true ); - sf->setArg(1, QString("%1").arg(argSetFilterNumINDI->filter_num->value())); + sf->setArg(1, TQString("%1").arg(argSetFilterNumINDI->filter_num->value())); if (! sf->argVal(0).isEmpty()) sf->setValid(true); else sf->setValid(false); } diff --git a/kstars/kstars/tools/scriptbuilder.h b/kstars/kstars/tools/scriptbuilder.h index 7b78bc1c..521bdbdb 100644 --- a/kstars/kstars/tools/scriptbuilder.h +++ b/kstars/kstars/tools/scriptbuilder.h @@ -69,15 +69,15 @@ class ScriptBuilder : public KDialogBase { Q_OBJECT public: - ScriptBuilder( QWidget *parent, const char *name=0 ); + ScriptBuilder( TQWidget *parent, const char *name=0 ); ~ScriptBuilder(); bool unsavedChanges() const { return UnsavedChanges; } void setUnsavedChanges( bool b=true ); void saveWarning(); - void readScript( QTextStream &istream ); - void writeScript( QTextStream &ostream ); - bool parseFunction( QStringList &fn ); + void readScript( TQTextStream &istream ); + void writeScript( TQTextStream &ostream ); + bool parseFunction( TQStringList &fn ); public slots: void slotAddFunction(); @@ -119,7 +119,7 @@ public slots: void slotPrintImage(); void slotChangeColor(); void slotChangeColorName(); - void slotLoadColorScheme(QListBoxItem*); + void slotLoadColorScheme(TQListBoxItem*); void slotEnableScriptNameOK(); @@ -169,12 +169,12 @@ private: ScriptBuilderUI *sb; KStars *ks; //parent needed for sub-dialogs - QPtrList<ScriptFunction> KStarsFunctionList; - QPtrList<ScriptFunction> INDIFunctionList; - QPtrList<ScriptFunction> ScriptList; - QVBoxLayout *vlay; + TQPtrList<ScriptFunction> KStarsFunctionList; + TQPtrList<ScriptFunction> INDIFunctionList; + TQPtrList<ScriptFunction> ScriptList; + TQVBoxLayout *vlay; - QWidget *argBlank; + TQWidget *argBlank; ArgLookToward *argLookToward; ArgSetRaDec *argSetRaDec; ArgSetAltAz *argSetAltAz; @@ -212,13 +212,13 @@ private: ScriptNameDialog *snd; OptionsTreeView *otv; - QListViewItem *opsGUI, *opsToolbar, *opsShowObj, *opsShowOther, *opsCName, *opsHide, *opsSkymap, *opsLimit; + TQListViewItem *opsGUI, *opsToolbar, *opsShowObj, *opsShowOther, *opsCName, *opsHide, *opsSkymap, *opsLimit; bool UnsavedChanges; KURL currentFileURL; - QString currentDir; - QString currentScriptName, currentAuthor; - QString lastINDIDeviceName; + TQString currentDir; + TQString currentScriptName, currentAuthor; + TQString lastINDIDeviceName; }; #endif diff --git a/kstars/kstars/tools/scriptfunction.cpp b/kstars/kstars/tools/scriptfunction.cpp index d87942ee..c95594f5 100644 --- a/kstars/kstars/tools/scriptfunction.cpp +++ b/kstars/kstars/tools/scriptfunction.cpp @@ -20,9 +20,9 @@ #include "scriptfunction.h" -ScriptFunction::ScriptFunction( QString name, QString desc, bool clockfcn, - QString at1, QString an1, QString at2, QString an2, QString at3, QString an3, - QString at4, QString an4, QString at5, QString an5, QString at6, QString an6 ) : INDIProp("") { +ScriptFunction::ScriptFunction( TQString name, TQString desc, bool clockfcn, + TQString at1, TQString an1, TQString at2, TQString an2, TQString at3, TQString an3, + TQString at4, TQString an4, TQString at5, TQString an5, TQString at6, TQString an6 ) : INDIProp("") { Name = name; ClockFunction = clockfcn; @@ -34,9 +34,9 @@ ScriptFunction::ScriptFunction( QString name, QString desc, bool clockfcn, ArgType[5] = at6; ArgName[5] = an6; //Construct a richtext description of the function - QString nameStyle = "<span style=\"font-family:monospace;font-weight:600\">%1</span>"; //bold - QString typeStyle = "<span style=\"font-family:monospace;color:#009d00\">%1</span>"; //green - QString paramStyle = "<span style=\"font-family:monospace;color:#00007f\">%1</span>"; //blue + TQString nameStyle = "<span style=\"font-family:monospace;font-weight:600\">%1</span>"; //bold + TQString typeStyle = "<span style=\"font-family:monospace;color:#009d00\">%1</span>"; //green + TQString paramStyle = "<span style=\"font-family:monospace;color:#00007f\">%1</span>"; //blue Description = "<html><head><meta name=\"qrichtext\" content=\"1\" /></head>"; Description += "<body style=\"font-size:11pt;font-family:sans\">"; @@ -160,8 +160,8 @@ ScriptFunction::~ScriptFunction() { } -QString ScriptFunction::prototype() const { - QString p = Name + "("; +TQString ScriptFunction::prototype() const { + TQString p = Name + "("; bool args( false ); if ( ! ArgType[0].isEmpty() && ! ArgName[0].isEmpty() ) { @@ -201,8 +201,8 @@ QString ScriptFunction::prototype() const { return p; } -QString ScriptFunction::scriptLine() const { - QString out( Name ); +TQString ScriptFunction::scriptLine() const { + TQString out( Name ); unsigned int i=0; while ( ! ArgName[i].isEmpty() && i < 6 ) { // Wrap arg in quotes if it contains a space diff --git a/kstars/kstars/tools/scriptfunction.h b/kstars/kstars/tools/scriptfunction.h index abb63707..b25612c8 100644 --- a/kstars/kstars/tools/scriptfunction.h +++ b/kstars/kstars/tools/scriptfunction.h @@ -18,7 +18,7 @@ #ifndef SCRIPTFUNCTION_H #define SCRIPTFUNCTION_H -#include <qstring.h> +#include <tqstring.h> /** * @@ -27,23 +27,23 @@ class ScriptFunction { public: - ScriptFunction( QString name, QString desc, bool clockfcn=false, - QString at1="", QString an1="", - QString at2="", QString an2="", - QString at3="", QString an3="", - QString at4="", QString an4="", - QString at5="", QString an5="", - QString at6="", QString an6="" + ScriptFunction( TQString name, TQString desc, bool clockfcn=false, + TQString at1="", TQString an1="", + TQString at2="", TQString an2="", + TQString at3="", TQString an3="", + TQString at4="", TQString an4="", + TQString at5="", TQString an5="", + TQString at6="", TQString an6="" ); ScriptFunction( ScriptFunction *sf ); ~ScriptFunction(); - QString name() const { return Name; } - QString prototype() const; - QString description() const { return Description; } - QString argType( unsigned int n ) const { return ArgType[n]; } - QString argName( unsigned int n ) const { return ArgName[n]; } - QString argVal( unsigned int n ) const { return ArgVal[n]; } + TQString name() const { return Name; } + TQString prototype() const; + TQString description() const { return Description; } + TQString argType( unsigned int n ) const { return ArgType[n]; } + TQString argName( unsigned int n ) const { return ArgName[n]; } + TQString argVal( unsigned int n ) const { return ArgVal[n]; } void setValid( bool b ) { Valid = b; } bool valid() const { return Valid; } @@ -51,21 +51,21 @@ public: void setClockFunction( bool b=true ) { ClockFunction = b; } bool isClockFunction() const { return ClockFunction; } - void setArg( unsigned int n, QString newVal ) { ArgVal[n] = newVal; } + void setArg( unsigned int n, TQString newVal ) { ArgVal[n] = newVal; } bool checkArgs(); unsigned int numArgs() const { return NumArgs; } - QString scriptLine() const; + TQString scriptLine() const; - void setINDIProperty(QString prop) { INDIProp = prop; } - QString INDIProperty() const { return INDIProp; } + void setINDIProperty(TQString prop) { INDIProp = prop; } + TQString INDIProperty() const { return INDIProp; } private: - QString Name, Description; - QString ArgType[6]; - QString ArgName[6]; - QString ArgVal[6]; - QString INDIProp; + TQString Name, Description; + TQString ArgType[6]; + TQString ArgName[6]; + TQString ArgVal[6]; + TQString INDIProp; bool Valid, ClockFunction; unsigned int NumArgs; }; diff --git a/kstars/kstars/tools/wutdialog.cpp b/kstars/kstars/tools/wutdialog.cpp index b046a550..584c7dfc 100644 --- a/kstars/kstars/tools/wutdialog.cpp +++ b/kstars/kstars/tools/wutdialog.cpp @@ -36,21 +36,21 @@ #include <klistbox.h> #include <kpushbutton.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qframe.h> -#include <qtabbar.h> -#include <qtimer.h> -#include <qcursor.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqframe.h> +#include <tqtabbar.h> +#include <tqtimer.h> +#include <tqcursor.h> WUTDialog::WUTDialog(KStars *ks) : - KDialogBase (KDialogBase::Plain, i18n("What's up Tonight"), Close, Close, (QWidget*)ks), + KDialogBase (KDialogBase::Plain, i18n("What's up Tonight"), Close, Close, (TQWidget*)ks), kstars(ks), EveningFlag(0) { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); setMainWidget(page); - QVBoxLayout *vlay = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, spacingHint() ); WUT = new WUTDialogUI( page ); vlay->addWidget( WUT ); @@ -66,7 +66,7 @@ WUTDialog::WUTDialog(KStars *ks) : T0 = T0.addDays( -1 ); //Now, set time T0 to midnight (of the following day) - T0.setTime( QTime( 0, 0, 0 ) ); + T0.setTime( TQTime( 0, 0, 0 ) ); T0 = T0.addDays( 1 ); UT0 = geo->LTtoUT( T0 ); @@ -78,7 +78,7 @@ WUTDialog::WUTDialog(KStars *ks) : Evening = T0.addSecs( -6*3600 ); EveningUT = geo->LTtoUT( Evening ); - QString sGeo = geo->translatedName(); + TQString sGeo = geo->translatedName(); if ( ! geo->translatedProvince().isEmpty() ) sGeo += ", " + geo->translatedProvince(); sGeo += ", " + geo->translatedCountry(); WUT->LocationLabel->setText( i18n( "at %1" ).arg( sGeo ) ); @@ -88,21 +88,21 @@ WUTDialog::WUTDialog(KStars *ks) : makeConnections(); - QTimer::singleShot(0, this, SLOT(init())); + TQTimer::singleShot(0, this, TQT_SLOT(init())); } WUTDialog::~WUTDialog(){ } void WUTDialog::makeConnections() { - connect( WUT->DateButton, SIGNAL( clicked() ), SLOT( slotChangeDate() ) ); - connect( WUT->LocationButton, SIGNAL( clicked() ), SLOT( slotChangeLocation() ) ); - connect( WUT->CenterButton, SIGNAL( clicked() ), SLOT( slotCenter() ) ); - connect( WUT->DetailButton, SIGNAL( clicked() ), SLOT( slotDetails() ) ); - connect( WUT->CategoryListBox, SIGNAL( highlighted(int) ), SLOT( slotLoadList(int) ) ); - connect( WUT->ObjectListBox, SIGNAL( selectionChanged(QListBoxItem*) ), - SLOT( slotDisplayObject(QListBoxItem*) ) ); - connect( WUT->EveningMorningBox, SIGNAL( activated(int) ), SLOT( slotEveningMorning(int) ) ); + connect( WUT->DateButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotChangeDate() ) ); + connect( WUT->LocationButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotChangeLocation() ) ); + connect( WUT->CenterButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCenter() ) ); + connect( WUT->DetailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDetails() ) ); + connect( WUT->CategoryListBox, TQT_SIGNAL( highlighted(int) ), TQT_SLOT( slotLoadList(int) ) ); + connect( WUT->ObjectListBox, TQT_SIGNAL( selectionChanged(TQListBoxItem*) ), + TQT_SLOT( slotDisplayObject(TQListBoxItem*) ) ); + connect( WUT->EveningMorningBox, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotEveningMorning(int) ) ); } void WUTDialog::initCategories() { @@ -118,7 +118,7 @@ void WUTDialog::initCategories() { } void WUTDialog::init() { - QString sRise, sSet, sDuration; + TQString sRise, sSet, sDuration; // reset all lists for (int i=0; i<NCATEGORY; i++) { @@ -161,7 +161,7 @@ void WUTDialog::init() { - (float)sunSetToday.second()/3600.0; int hDur = int(Dur); int mDur = int(60.0*(Dur - (float)hDur)); - sDuration = QString().sprintf( "%02d:%02d", hDur, mDur ); + sDuration = TQString().sprintf( "%02d:%02d", hDur, mDur ); } WUT->SunSetLabel->setText( i18n( "Sunset: %1" ).arg(sSet) ); @@ -192,7 +192,7 @@ void WUTDialog::init() { WUT->MoonRiseLabel->setText( i18n( "Moon rises at: %1" ).arg( sRise ) ); WUT->MoonSetLabel->setText( i18n( "Moon sets at: %1" ).arg( sSet ) ); oMoon->findPhase( oSun ); - WUT->MoonIllumLabel->setText( oMoon->phaseName() + QString( " (%1%)" ).arg( + WUT->MoonIllumLabel->setText( oMoon->phaseName() + TQString( " (%1%)" ).arg( int(100.0*oMoon->illum() ) ) ); //Restore Sun's and Moon's coordinates, and recompute Moon's original Phase @@ -242,8 +242,8 @@ void WUTDialog::appendToList(SkyObjectName *o) { void WUTDialog::slotLoadList(int i) { WUT->ObjectListBox->clear(); - setCursor(QCursor(Qt::WaitCursor)); - QPtrList <SkyObjectName> invisibleList; + setCursor(TQCursor(Qt::WaitCursor)); + TQPtrList <SkyObjectName> invisibleList; for (SkyObjectName *oname=lists.visibleList[i].first(); oname; oname=lists.visibleList[i].next()) { bool visible = true; if (lists.initialized[i] == false) { @@ -265,7 +265,7 @@ void WUTDialog::slotLoadList(int i) { lists.visibleList[i].removeRef(o); } } - setCursor(QCursor(Qt::ArrowCursor)); + setCursor(TQCursor(Qt::ArrowCursor)); lists.initialized[i] = true; // highlight first item @@ -310,9 +310,9 @@ bool WUTDialog::checkVisibility(SkyObjectName *oname) { return visible; } -void WUTDialog::slotDisplayObject(QListBoxItem *item) { - QTime tRise, tSet, tTransit; - QString sRise, sTransit, sSet; +void WUTDialog::slotDisplayObject(TQListBoxItem *item) { + TQTime tRise, tSet, tTransit; + TQString sRise, sTransit, sSet; if ( item==0 ) { //no object selected WUT->ObjectBox->setTitle( i18n( "No Object Selected" ) ); @@ -339,15 +339,15 @@ void WUTDialog::slotDisplayObject(QListBoxItem *item) { // if ( tSet < tRise ) // tSet = o->riseSetTime( JDTomorrow, geo, false ); - sRise = QString().sprintf( "%02d:%02d", tRise.hour(), tRise.minute() ); - sSet = QString().sprintf( "%02d:%02d", tSet.hour(), tSet.minute() ); + sRise = TQString().sprintf( "%02d:%02d", tRise.hour(), tRise.minute() ); + sSet = TQString().sprintf( "%02d:%02d", tSet.hour(), tSet.minute() ); } tTransit = o->transitTime( T0, geo ); // if ( tTransit < tRise ) // tTransit = o->transitTime( JDTomorrow, geo ); - sTransit = QString().sprintf( "%02d:%02d", tTransit.hour(), tTransit.minute() ); + sTransit = TQString().sprintf( "%02d:%02d", tTransit.hour(), tTransit.minute() ); WUT->DetailButton->setEnabled( true ); } @@ -384,14 +384,14 @@ void WUTDialog::slotDetails() { void WUTDialog::slotChangeDate() { TimeDialog td( T0, this ); - if ( td.exec() == QDialog::Accepted ) { + if ( td.exec() == TQDialog::Accepted ) { T0 = td.selectedDateTime(); //If the Time is earlier than 6:00 am, assume the user wants the night of the previous date if ( T0.time().hour() < 6 ) T0 = T0.addDays( -1 ); //Now, set time T0 to midnight (of the following day) - T0.setTime( QTime( 0, 0, 0 ) ); + T0.setTime( TQTime( 0, 0, 0 ) ); T0 = T0.addDays( 1 ); UT0 = geo->LTtoUT( T0 ); @@ -413,7 +413,7 @@ void WUTDialog::slotChangeDate() { void WUTDialog::slotChangeLocation() { LocationDialog ld( kstars ); - if ( ld.exec() == QDialog::Accepted ) { + if ( ld.exec() == TQDialog::Accepted ) { GeoLocation *newGeo = ld.selectedCity(); if ( newGeo ) { geo = newGeo; diff --git a/kstars/kstars/tools/wutdialog.h b/kstars/kstars/tools/wutdialog.h index 3423ace0..452c4e9a 100644 --- a/kstars/kstars/tools/wutdialog.h +++ b/kstars/kstars/tools/wutdialog.h @@ -18,7 +18,7 @@ #ifndef WUTDIALOG_H #define WUTDIALOG_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> #include "kstarsdatetime.h" @@ -64,7 +64,7 @@ class WUTDialog : public KDialogBase { /**@short display the rise/transit/set times for selected object */ - void slotDisplayObject(QListBoxItem *item); + void slotDisplayObject(TQListBoxItem *item); /**@short Apply user's choice of what part of the night should *be examined: @@ -96,7 +96,7 @@ class WUTDialog : public KDialogBase { KStars *kstars; WUTDialogUI *WUT; - /**@short Initialize all SIGNAL/SLOT connections, used in constructor */ + /**@short Initialize all SIGNAL/TQT_SLOT connections, used in constructor */ void makeConnections(); /**@short Initialize catgory list, used in constructor */ @@ -116,14 +116,14 @@ class WUTDialog : public KDialogBase { ObjectNameList *objectList; - QTime sunRiseTomorrow, sunSetToday, sunRiseToday, moonRise, moonSet; + TQTime sunRiseTomorrow, sunSetToday, sunRiseToday, moonRise, moonSet; KStarsDateTime T0, UT0, Tomorrow, TomorrowUT, Evening, EveningUT; GeoLocation *geo; int EveningFlag; struct List { - QPtrList <SkyObjectName> visibleList[NCATEGORY]; + TQPtrList <SkyObjectName> visibleList[NCATEGORY]; bool initialized[NCATEGORY]; } lists; |