[Kstars-devel] KDE/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Thu Apr 6 05:53:46 CEST 2006


SVN commit 526964 by harris:

Cosmetic fixes for TimeStepWidget.  Also, note that the TimeStep widget 
is currently in its own toolbar, because I can't figure out how to add 
it to the existing toolbar.  I've posted on kde-devel about this, and 
added a FIXME comment.

CCMAIL: kstars-devel at kde.org


 M  +4 -2      kstarsinit.cpp  
 M  +1 -1      widgets/timestepbox.cpp  
 M  +6 -6      widgets/timeunitbox.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/kstarsinit.cpp #526963:526964
@@ -522,8 +522,10 @@
 	createGUI("kstarsui.rc", false);
 
 	//Add timestep widget to toolbar
- 	TimeStep = new TimeStepBox( toolBar() );
- 	toolBar()->insertWidget( 0, 50, TimeStep );
+	//FIXME: Need to add the widget to kstarsToolBar, 
+	//but 'toolBar("kstarsToolBar")' doesn't work...
+	TimeStep = new TimeStepBox( toolBar() );
+	toolBar()->insertWidget( 0, 50, TimeStep );
 
 	//Initialize FOV symbol from options
 	data()->fovSymbol.setName( Options::fOVName() );
--- trunk/KDE/kdeedu/kstars/kstars/widgets/timestepbox.cpp #526963:526964
@@ -39,7 +39,7 @@
 	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."
 "\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 QHBoxLayout( this, 0, 0 );
 	hlay->addWidget( timeBox );
 	hlay->addWidget( unitBox );
 	hlay->activate();
--- trunk/KDE/kdeedu/kstars/kstars/widgets/timeunitbox.cpp #526963:526964
@@ -26,18 +26,18 @@
 TimeUnitBox::TimeUnitBox(QWidget *parent, bool daysonly )
 	: QWidget( parent ) {
 
-        QVBoxLayout *vlay = new QVBoxLayout();
+	QVBoxLayout *vlay = new QVBoxLayout(this, 0, 0);
 
-        UpButton = new QPushButton( "+", this );
-        UpButton->setMaximumWidth( 22 );
+	UpButton = new QPushButton( "+", this );
+	UpButton->setMaximumWidth( 22 );
 	UpButton->setMaximumHeight( 10 );
 	DownButton = new QPushButton( "-", this );
 	DownButton->setMaximumWidth( 22 );
 	DownButton->setMaximumHeight( 10 );
 
-        vlay->addWidget( UpButton );
-        vlay->addWidget( DownButton );
-        setLayout( vlay );
+	vlay->addWidget( UpButton );
+	vlay->addWidget( DownButton );
+//	setLayout( vlay );
 
 	setDaysOnly( daysonly );
 


More information about the Kstars-devel mailing list