summaryrefslogtreecommitdiffstats
path: root/kstars/kstars/tools/obslistwizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kstars/kstars/tools/obslistwizard.cpp')
-rw-r--r--kstars/kstars/tools/obslistwizard.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/kstars/kstars/tools/obslistwizard.cpp b/kstars/kstars/tools/obslistwizard.cpp
index 7dbbbc3d..9a3c57d8 100644
--- a/kstars/kstars/tools/obslistwizard.cpp
+++ b/kstars/kstars/tools/obslistwizard.cpp
@@ -34,10 +34,10 @@
#include "obslistwizard.h"
-ObsListWizard::ObsListWizard( TQWidget *parent, const char *name )
- : KDialogBase( KDialogBase::Plain, i18n("Observing List Wizard"), Ok|Cancel, Ok, parent, name )
+ObsListWizard::ObsListWizard( TQWidget *tqparent, const char *name )
+ : KDialogBase( KDialogBase::Plain, i18n("Observing List Wizard"), Ok|Cancel, Ok, tqparent, name )
{
- ksw = (KStars*)parent;
+ ksw = (KStars*)tqparent;
TQFrame *page = plainPage();
TQVBoxLayout *vlay = new TQVBoxLayout( page, 0, 0 );
@@ -195,32 +195,32 @@ void ObsListWizard::slotShowStackWidget( TQListViewItem *i )
if ( i ) {
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 );
- if ( t.contains( i18n( "In constellation(s)" ) ) ) olw->FilterStack->raiseWidget( olw->ConstellationPage );
- if ( t.contains( i18n( "Circular" ) ) ) olw->FilterStack->raiseWidget( olw->CircRegionPage );
- if ( t.contains( i18n( "Rectangular" ) ) ) olw->FilterStack->raiseWidget( olw->RectRegionPage );
-// if ( t.contains( i18n( "Observable on date" ) ) ) olw->FilterStack->raiseWidget( olw->ObsDatePage );
- if ( t.contains( i18n( "Magnitude limit" ) ) ) olw->FilterStack->raiseWidget( olw->MagLimitPage );
+ if ( t.tqcontains( i18n( "Object type(s)" ) ) ) olw->FilterStack->raiseWidget( olw->ObjTypePage );
+ if ( t.tqcontains( i18n( "Region" ) ) ) olw->FilterStack->raiseWidget( olw->RegionPage );
+ if ( t.tqcontains( i18n( "In constellation(s)" ) ) ) olw->FilterStack->raiseWidget( olw->ConstellationPage );
+ if ( t.tqcontains( i18n( "Circular" ) ) ) olw->FilterStack->raiseWidget( olw->CircRegionPage );
+ if ( t.tqcontains( i18n( "Rectangular" ) ) ) olw->FilterStack->raiseWidget( olw->RectRegionPage );
+// if ( t.tqcontains( i18n( "Observable on date" ) ) ) olw->FilterStack->raiseWidget( olw->ObsDatePage );
+ if ( t.tqcontains( i18n( "Magnitude limit" ) ) ) olw->FilterStack->raiseWidget( olw->MagLimitPage );
}
}
void ObsListWizard::slotDeepSkyButton()
{
olw->TypeList->selectAll( false );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Open Clusters" ) ), true );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Globular Clusters" ) ), true );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Gaseous Nebulae" ) ), true );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Planetary Nebulae" ) ), true );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Galaxies" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Open Clusters" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Globular Clusters" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Gaseous Nebulae" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Planetary Nebulae" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Galaxies" ) ), true );
}
void ObsListWizard::slotSolarSystemButton()
{
olw->TypeList->selectAll( false );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Sun, Moon, Planets" ) ), true );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Comets" ) ), true );
- olw->TypeList->setSelected( olw->TypeList->findItem( i18n( "Asteroids" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Sun, Moon, Planets" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Comets" ) ), true );
+ olw->TypeList->setSelected( olw->TypeList->tqfindItem( i18n( "Asteroids" ) ), true );
}
void ObsListWizard::slotChangeLocation()
@@ -235,23 +235,23 @@ void ObsListWizard::slotChangeLocation()
void ObsListWizard::slotUpdateObjectCount()
{
ObjectCount = 0;
- if ( olw->TypeList->findItem( i18n( "Stars" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Stars" ) )->isSelected() )
ObjectCount += StarCount;
- if ( olw->TypeList->findItem( i18n( "Sun, Moon, Planets" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Sun, Moon, Planets" ) )->isSelected() )
ObjectCount += PlanetCount;
- if ( olw->TypeList->findItem( i18n( "Comets" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Comets" ) )->isSelected() )
ObjectCount += CometCount;
- if ( olw->TypeList->findItem( i18n( "Asteroids" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Asteroids" ) )->isSelected() )
ObjectCount += AsteroidCount;
- if ( olw->TypeList->findItem( i18n( "Galaxies" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Galaxies" ) )->isSelected() )
ObjectCount += GalaxyCount;
- if ( olw->TypeList->findItem( i18n( "Open Clusters" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Open Clusters" ) )->isSelected() )
ObjectCount += OpenClusterCount;
- if ( olw->TypeList->findItem( i18n( "Globular Clusters" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Globular Clusters" ) )->isSelected() )
ObjectCount += GlobClusterCount;
- if ( olw->TypeList->findItem( i18n( "Gaseous Nebulae" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Gaseous Nebulae" ) )->isSelected() )
ObjectCount += GasNebCount;
- if ( olw->TypeList->findItem( i18n( "Planetary Nebulae" ) )->isSelected() )
+ if ( olw->TypeList->tqfindItem( i18n( "Planetary Nebulae" ) )->isSelected() )
ObjectCount += PlanNebCount;
applyFilters( false ); //false = only adjust counts, do not build list
@@ -307,7 +307,7 @@ void ObsListWizard::applyFilters( bool doBuildList )
//Stars
int starIndex(ksw->data()->starList.count());
- if ( olw->TypeList->findItem( i18n( "Stars" ) )->isSelected() ) {
+ if ( olw->TypeList->tqfindItem( i18n( "Stars" ) )->isSelected() ) {
if ( maglimit < 100. ) {
//Stars are sorted by mag, so use binary search algo to find index of faintest mag
int low(0), high(ksw->data()->starList.count()-1), middle;
@@ -338,7 +338,7 @@ void ObsListWizard::applyFilters( bool doBuildList )
}
//Sun, Moon, Planets
- if ( olw->TypeList->findItem( i18n( "Sun, Moon, Planets" ) )->isSelected() ) {
+ if ( olw->TypeList->tqfindItem( i18n( "Sun, Moon, Planets" ) )->isSelected() ) {
applyRegionFilter( (SkyObject*)ksw->data()->PCat->planetSun(), doBuildList );
applyRegionFilter( (SkyObject*)ksw->data()->Moon, doBuildList );
applyRegionFilter( (SkyObject*)ksw->data()->PCat->findByName("Mercury"), doBuildList );
@@ -354,12 +354,12 @@ void ObsListWizard::applyFilters( bool doBuildList )
//Deep sky objects
for ( SkyObject *o = (SkyObject*)(ksw->data()->deepSkyList.first()); o; o = (SkyObject*)(ksw->data()->deepSkyList.next()) ) {
//Skip unselected object types
- if ( (o->type() == SkyObject::STAR || o->type() == SkyObject::CATALOG_STAR) && ! olw->TypeList->findItem( i18n( "Stars" ) )->isSelected() ) continue;
- if ( o->type() == SkyObject::OPEN_CLUSTER && ! olw->TypeList->findItem( i18n( "Open Clusters" ) )->isSelected() ) continue;
- if ( o->type() == SkyObject::GLOBULAR_CLUSTER && ! olw->TypeList->findItem( i18n( "Globular Clusters" ) )->isSelected() ) continue;
- if ( (o->type() == SkyObject::GASEOUS_NEBULA || o->type() == SkyObject::SUPERNOVA_REMNANT) && ! olw->TypeList->findItem( i18n( "Gaseous Nebulae" ) )->isSelected() ) continue;
- if ( o->type() == SkyObject::PLANETARY_NEBULA && ! olw->TypeList->findItem( i18n( "Planetary Nebulae" ) )->isSelected() ) continue;
- if ( o->type() == SkyObject::GALAXY && ! olw->TypeList->findItem( i18n( "Galaxies" ) )->isSelected() ) continue;
+ if ( (o->type() == SkyObject::STAR || o->type() == SkyObject::CATALOG_STAR) && ! olw->TypeList->tqfindItem( i18n( "Stars" ) )->isSelected() ) continue;
+ if ( o->type() == SkyObject::OPEN_CLUSTER && ! olw->TypeList->tqfindItem( i18n( "Open Clusters" ) )->isSelected() ) continue;
+ if ( o->type() == SkyObject::GLOBULAR_CLUSTER && ! olw->TypeList->tqfindItem( i18n( "Globular Clusters" ) )->isSelected() ) continue;
+ if ( (o->type() == SkyObject::GASEOUS_NEBULA || o->type() == SkyObject::SUPERNOVA_REMNANT) && ! olw->TypeList->tqfindItem( i18n( "Gaseous Nebulae" ) )->isSelected() ) continue;
+ if ( o->type() == SkyObject::PLANETARY_NEBULA && ! olw->TypeList->tqfindItem( i18n( "Planetary Nebulae" ) )->isSelected() ) continue;
+ if ( o->type() == SkyObject::GALAXY && ! olw->TypeList->tqfindItem( i18n( "Galaxies" ) )->isSelected() ) continue;
if ( o->type() == SkyObject::TYPE_UNKNOWN ) continue;
if ( olw->SelectByMag->isChecked() ) {
@@ -380,7 +380,7 @@ void ObsListWizard::applyFilters( bool doBuildList )
}
//Comets
- if ( olw->TypeList->findItem( i18n( "Comets" ) )->isSelected() ) {
+ if ( olw->TypeList->tqfindItem( i18n( "Comets" ) )->isSelected() ) {
for ( SkyObject *o = (SkyObject*)(ksw->data()->cometList.first()); o; o = (SkyObject*)(ksw->data()->cometList.next()) ) {
//comets don't have magnitudes at this point, so skip mag check
applyRegionFilter( o, doBuildList );
@@ -388,7 +388,7 @@ void ObsListWizard::applyFilters( bool doBuildList )
}
//Asteroids
- if ( olw->TypeList->findItem( i18n( "Asteroids" ) )->isSelected() ) {
+ if ( olw->TypeList->tqfindItem( i18n( "Asteroids" ) )->isSelected() ) {
for ( SkyObject *o = (SkyObject*)(ksw->data()->asteroidList.first()); o; o = (SkyObject*)(ksw->data()->asteroidList.next()) ) {
if ( olw->SelectByMag->isChecked() ) {
@@ -411,14 +411,14 @@ void ObsListWizard::applyFilters( bool doBuildList )
//Update the object count label
if ( doBuildList ) ObjectCount = obsList().count();
- olw->CountLabel->setText( i18n("Current selection: %1 objects").arg( ObjectCount ) );
+ olw->CountLabel->setText( i18n("Current selection: %1 objects").tqarg( ObjectCount ) );
}
void ObsListWizard::applyRegionFilter( SkyObject *o, bool doBuildList, bool doAdjustCount ) {
//select by constellation
if ( olw->SelectByConstellation->isChecked() ) {
TQString c( o->constellation( ksw->data()->csegmentList, ksw->data()->cnameList ) );
- TQListBoxItem *it = olw->ConstellationList->findItem( c );
+ TQListBoxItem *it = olw->ConstellationList->tqfindItem( c );
if ( it && it->isSelected() ) {
if ( doBuildList ) obsList().append ( o );