[Kstars-devel] KDE/kdeedu/kstars/kstars
Jasem Mutlaq
mutlaqja at ikarustech.com
Fri Mar 24 11:08:44 CET 2006
SVN commit 522049 by mutlaqja:
KStars doesn't crash anymore. But there is a still a LOT of porting to be done. QIcon --> KIcon. Changes in KToolBar, KToggleAction, toggleaction, and others. I've added FIXME where appropiate.
CCMAIL: kstars-devel at kde.org
M +1 -1 imageviewer.cpp
M +2 -2 indielement.cpp
M +2 -1 kstars.cpp
M +4 -3 kstarsactions.cpp
M +2 -1 kstarsinit.cpp
M +1 -0 locationdialog.cpp
M +2 -0 opscatalog.cpp
M +4 -3 skymap.cpp
M +4 -2 toggleaction.cpp
M +1 -0 tools/scriptbuilder.cpp
--- trunk/KDE/kdeedu/kstars/kstars/imageviewer.cpp #522048:522049
@@ -42,7 +42,7 @@
{
// toolbar can dock only on top-position and can't be minimized
// JH: easier to just disable its mobility
- toolBar()->setMovingEnabled( false );
+ //toolBar()->setMovingEnabled( false );
KAction *action = new KAction( i18n("Close Window"), "fileclose",
KShortcut(Qt::CTRL+Qt::Key_Q), this, SLOT (close()), actionCollection(),
--- trunk/KDE/kdeedu/kstars/kstars/indielement.cpp #522048:522049
@@ -20,7 +20,6 @@
#include <QLabel>
#include <qlayout.h>
#include <qstring.h>
-#include <q3ptrlist.h>
#include <qslider.h>
#include <qdir.h>
//Added by qt3to4:
@@ -112,7 +111,8 @@
label_w->setFrameShape( KSqueezedTextLabel::Box );
label_w->setPaletteBackgroundColor( QColor( 224, 232, 238 ) );
label_w->setTextFormat( Qt::RichText );
-label_w->setAlignment( int( Qt::TextWordWrap | Qt::AlignCenter ) );
+label_w->setAlignment( Qt::AlignCenter );
+label_w->setWordWrap(true);
if (label.length() > MAX_LABEL_LENGTH)
{
--- trunk/KDE/kdeedu/kstars/kstars/kstars.cpp #522048:522049
@@ -26,6 +26,7 @@
#include <kdebug.h>
#include <kactioncollection.h>
#include <kiconloader.h>
+#include <kicontheme.h>
#include <ktoolbar.h>
#include <qpalette.h>
#include <kglobal.h>
@@ -156,7 +157,7 @@
void KStars::applyConfig() {
if ( Options::isTracking() ) {
actionCollection()->action("track_object")->setText( i18n( "Stop &Tracking" ) );
- actionCollection()->action("track_object")->setIcon( BarIcon( "encrypted" ) );
+ actionCollection()->action("track_object")->setIcon( KIcon("encrypted"));
}
//Toggle actions
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #522048:522049
@@ -637,7 +637,7 @@
if ( Options::isTracking() ) {
Options::setIsTracking( false );
actionCollection()->action("track_object")->setText( i18n( "Engage &Tracking" ) );
- actionCollection()->action("track_object")->setIcon( BarIcon( "decrypted" ) );
+ actionCollection()->action("track_object")->setIcon( KIcon( "decrypted" ) );
if ( map()->focusObject() && map()->focusObject()->isSolarSystem() && data()->temporaryTrail ) {
((KSPlanetBase*)map()->focusObject())->clearTrail();
data()->temporaryTrail = false;
@@ -653,7 +653,7 @@
map()->setFocusPoint( map()->clickedPoint() );
Options::setIsTracking( true );
actionCollection()->action("track_object")->setText( i18n( "Stop &Tracking" ) );
- actionCollection()->action("track_object")->setIcon( BarIcon( "encrypted" ) );
+ actionCollection()->action("track_object")->setIcon( KIcon( "encrypted" ) );
}
map()->forceUpdate();
@@ -871,7 +871,8 @@
QString nm = fields[0].trimmed();
KToggleAction *kta = new KToggleAction( nm, 0, this, SLOT( slotTargetSymbol() ),
actionCollection(), nm.toUtf8() );
- kta->setExclusiveGroup( "fovsymbol" );
+ /* FIXME update deprecated KToggleFunctions */
+ //kta->setExclusiveGroup( "fovsymbol" );
fovActionMenu->insert( kta );
}
}
--- trunk/KDE/kdeedu/kstars/kstars/kstarsinit.cpp #522048:522049
@@ -331,7 +331,8 @@
nm = fields[0].trimmed();
KToggleAction *kta = new KToggleAction( nm, 0, this, SLOT( slotTargetSymbol() ),
actionCollection(), nm.toUtf8() );
- kta->setExclusiveGroup( "fovsymbol" );
+ /* FIXME update deprecated KToggleFunctions */
+ //kta->setExclusiveGroup( "fovsymbol" );
if ( nm == Options::fOVName() ) kta->setChecked( true );
fovActionMenu->insert( kta );
}
--- trunk/KDE/kdeedu/kstars/kstars/locationdialog.cpp #522048:522049
@@ -19,6 +19,7 @@
#include <stdio.h>
#include <QFile>
+#include <QTextStream>
#include <kmessagebox.h>
#include <kstandarddirs.h>
--- trunk/KDE/kdeedu/kstars/kstars/opscatalog.cpp #522048:522049
@@ -17,6 +17,8 @@
#include <QList>
#include <QListWidgetItem>
+#include <QTextStream>
+
#include <kfiledialog.h>
#include "opscatalog.h"
--- trunk/KDE/kdeedu/kstars/kstars/skymap.cpp #522048:522049
@@ -242,7 +242,7 @@
void SkyMap::slotCenter( void ) {
//DEBUG
- kDebug() << "Number of toolbars: " << ks->toolBarList().size() << endl;
+ //kDebug() << "Number of toolbars: " << ks->toolBarList().size() << endl;
setFocusPoint( clickedPoint() );
if ( Options::useAltAz() )
@@ -276,8 +276,9 @@
setFocusObject( ClickedObject );
Options::setIsTracking( true );
if ( ks ) {
- ks->actionCollection()->action("track_object")->setIcon( BarIcon( "encrypted" ) );
- ks->toolBar("kstarsToolBar")->setButtonIconSet( 4, BarIcon( "encrypted" ) );
+ ks->actionCollection()->action("track_object")->setIcon( KIcon( "encrypted" ) );
+ // FIXME setButtonIconSet removed
+ //ks->toolBar("kstarsToolBar")->setButtonIconSet( 4, BarIcon( "encrypted" ) );
ks->actionCollection()->action("track_object")->setText( i18n( "Stop &Tracking" ) );
}
--- trunk/KDE/kdeedu/kstars/kstars/toggleaction.cpp #522048:522049
@@ -41,14 +41,16 @@
{}
void ToggleAction::turnOff() {
- if ( !officon.isNull() ) setIcon(officon);
+ // FIXME use KIcon only
+ //if ( !officon.isNull() ) setIcon(officon);
setText(offcap);
setToolTip(offTip);
state = false;
}
void ToggleAction::turnOn() {
- if ( !onicon.isNull() ) setIcon(onicon);
+ // FIXME use KIcon only
+ //if ( !onicon.isNull() ) setIcon(onicon);
setText(oncap);
setToolTip(onTip);
state = true;
--- trunk/KDE/kdeedu/kstars/kstars/tools/scriptbuilder.cpp #522048:522049
@@ -19,6 +19,7 @@
#include <sys/stat.h>
#include <QTreeWidget>
+#include <QTextStream>
#include <kdebug.h>
#include <klocale.h>
More information about the Kstars-devel
mailing list