<div dir="ltr">Hi Valentin,<div><br></div><div>Great work! It seems patch file was included inline? Please send a file or just link to it.</div><div><br></div><div>Regards,</div><div>Jasem</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 6, 2017 at 12:27 AM, Valentin Boettcher <span dir="ltr"><<a href="mailto:valentin@boettcher.cf" target="_blank">valentin@boettcher.cf</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've added some simple comet tails and an option to disable them.<br>
<br>
There is a bit of Fuzz, cause astyle was doing it's thing. (Has anyone<br>
run astyle recursively yet? There are still some unformated files.)<br>
<br>
To clarify things: I just added a "drawComet" method to the skypainter,<br>
an option to the kcfg and the UI and one tweak to retrieve an instance<br>
of the sun.<br>
<br>
To note: the findPA method could be tweaked, by somehow caching the Suns<br>
position, because by now it is re-projected for every comet tail. (Well<br>
that's actually OK, because you hardly see more then two at a time.)<br>
<br>
Cheers.<br>
<br>
______________________________<wbr>__________<br>
<br>
<br>
diff --git a/.astylerc b/.astylerc<br>
new file mode 100644<br>
index 000000000..01ad4bed2<br>
--- /dev/null<br>
+++ b/.astylerc<br>
@@ -0,0 +1,7 @@<br>
+<br>
+-A1<br>
+-W3<br>
+-k2<br>
+-S<br>
+-xG<br>
+-C<br>
diff --git a/kstars/kstars.kcfg b/kstars/kstars.kcfg<br>
index 2754758fa..6b06c2f2a 100644<br>
--- a/kstars/kstars.kcfg<br>
+++ b/kstars/kstars.kcfg<br>
@@ -378,6 +378,11 @@<br>
          <whatsthis>Toggle whether comets are drawn in the sky<br>
map.</whatsthis><br>
          <default>true</default><br>
       </entry><br>
+      <entry name="ShowCometComas" type="Bool"><br>
+         <label>Draw comet comas in the sky map?</label><br>
+         <whatsthis>Toggle whether comet comas are drawn in the sky<br>
map.</whatsthis><br>
+         <default>true</default><br>
+      </entry><br>
       <entry name="ShowCometNames" type="Bool"><br>
          <label>Label comet names in the sky map?</label><br>
          <whatsthis>Toggle whether comet name labels are drawn in the<br>
sky map.</whatsthis><br>
diff --git a/kstars/options/<wbr>opssolarsystem.cpp<br>
b/kstars/options/<wbr>opssolarsystem.cpp<br>
index df1969d46..6ac1f5a4c 100644<br>
--- a/kstars/options/<wbr>opssolarsystem.cpp<br>
+++ b/kstars/options/<wbr>opssolarsystem.cpp<br>
@@ -32,6 +32,7 @@ OpsSolarSystem::<wbr>OpsSolarSystem()<br>
     connect( kcfg_ShowAsteroids, SIGNAL( toggled(bool) ), SLOT(<br>
slotAsteroidWidgets(bool) ) );<br>
     connect( kcfg_MagLimitAsteroidDownload, SIGNAL( valueChanged(<br>
double ) ), this, SLOT( slotChangeMagDownload( double ) ) );<br>
     connect( kcfg_ShowComets, SIGNAL( toggled(bool) ), SLOT(<br>
slotCometWidgets(bool) ) );<br>
+<br>
     connect( ClearAllTrails, SIGNAL( clicked() ), KStars::Instance(),<br>
SLOT( slotClearAllTrails() ) );<br>
     connect( showAllPlanets, SIGNAL( clicked() ), this, SLOT(<br>
slotSelectPlanets() ) );<br>
     connect( showNonePlanets, SIGNAL( clicked() ), this, SLOT(<br>
slotSelectPlanets() ) );<br>
@@ -94,6 +95,7 @@ void OpsSolarSystem::<wbr>slotCometWidgets( bool on )<br>
     kcfg_ShowCometNames-><wbr>setEnabled( on );<br>
     kcfg_MaxRadCometName-><wbr>setEnabled( on );<br>
     textLabel4->setEnabled( on );<br>
+    kcfg_ShowCometComas-><wbr>setEnabled( on );<br>
 }<br>
<br>
 void OpsSolarSystem::<wbr>slotSelectPlanets()<br>
@@ -127,4 +129,3 @@ void OpsSolarSystem::slotApply()<br>
     KStars::Instance()-><wbr>updateTime();<br>
     KStars::Instance()->map()-><wbr>forceUpdate();<br>
 }<br>
-<br>
diff --git a/kstars/options/<wbr>opssolarsystem.ui<br>
b/kstars/options/<wbr>opssolarsystem.ui<br>
index 62edda6c0..d1e36c493 100644<br>
--- a/kstars/options/<wbr>opssolarsystem.ui<br>
+++ b/kstars/options/<wbr>opssolarsystem.ui<br>
@@ -6,8 +6,8 @@<br>
    <rect><br>
     <x>0</x><br>
     <y>0</y><br>
-    <width>438</width><br>
-    <height>516</height><br>
+    <width>465</width><br>
+    <height>644</height><br>
    </rect><br>
   </property><br>
   <layout class="QVBoxLayout"><br>
@@ -285,6 +285,45 @@<br>
      <layout class="QVBoxLayout"><br>
       <item><br>
        <layout class="QGridLayout"><br>
+        <item row="1" column="1"><br>
+         <widget class="QLabel" name="label_3"><br>
+          <property name="text"><br>
+           <string>Download asteroids brighter than</string><br>
+          </property><br>
+         </widget><br>
+        </item><br>
+        <item row="0" column="0"><br>
+         <widget class="QCheckBox" name="kcfg_ShowAsteroids"><br>
+          <property name="toolTip"><br>
+           <string>Draw asteroids?</string><br>
+          </property><br>
+          <property name="whatsThis"><br>
+           <string>If checked, asteroids will be drawn on the map</string><br>
+          </property><br>
+          <property name="text"><br>
+           <string>Asteroids</string><br>
+          </property><br>
+          <attribute name="buttonGroup"><br>
+           <string notr="true">solarButtonGroup</<wbr>string><br>
+          </attribute><br>
+         </widget><br>
+        </item><br>
+        <item row="4" column="0"><br>
+         <widget class="QCheckBox" name="kcfg_ShowComets"><br>
+          <property name="toolTip"><br>
+           <string>Draw comets?</string><br>
+          </property><br>
+          <property name="whatsThis"><br>
+           <string>If checked, comets will be drawn on the map</string><br>
+          </property><br>
+          <property name="text"><br>
+           <string>Comets</string><br>
+          </property><br>
+          <attribute name="buttonGroup"><br>
+           <string notr="true">solarButtonGroup</<wbr>string><br>
+          </attribute><br>
+         </widget><br>
+        </item><br>
         <item row="3" column="0"><br>
          <spacer><br>
           <property name="orientation"><br>
@@ -301,34 +340,17 @@<br>
           </property><br>
          </spacer><br>
         </item><br>
-        <item row="1" column="2"><br>
-         <layout class="QHBoxLayout" name="horizontalLayout"><br>
-          <item><br>
-           <widget class="QDoubleSpinBox"<br>
name="kcfg_<wbr>MagLimitAsteroidDownload"/><br>
-          </item><br>
-          <item><br>
-           <widget class="QLabel" name="label_2"><br>
-            <property name="text"><br>
-             <string>mag</string><br>
-            </property><br>
-           </widget><br>
-          </item><br>
-         </layout><br>
-        </item><br>
-        <item row="0" column="0"><br>
-         <widget class="QCheckBox" name="kcfg_ShowAsteroids"><br>
-          <property name="toolTip"><br>
-           <string>Draw asteroids?</string><br>
-          </property><br>
-          <property name="whatsThis"><br>
-           <string>If checked, asteroids will be drawn on the map</string><br>
+        <item row="2" column="0" colspan="3"><br>
+         <widget class="QLabel" name="<wbr>MagLimitAsteroidDownloadWarnin<wbr>g"><br>
+          <property name="styleSheet"><br>
+           <string notr="true">color:red; font-weight:bold;</string><br>
           </property><br>
           <property name="text"><br>
-           <string>Asteroids</string><br>
+           <string>This value might result in a big data file and<br>
reduced performance!</string><br>
+          </property><br>
+          <property name="alignment"><br>
+           <set>Qt::AlignCenter</set><br>
           </property><br>
-          <attribute name="buttonGroup"><br>
-           <string notr="true">solarButtonGroup</<wbr>string><br>
-          </attribute><br>
          </widget><br>
         </item><br>
         <item row="0" column="1"><br>
@@ -338,6 +360,22 @@<br>
           </property><br>
          </widget><br>
         </item><br>
+        <item row="4" column="1"><br>
+         <widget class="QCheckBox" name="kcfg_ShowCometNames"><br>
+          <property name="toolTip"><br>
+           <string>Show names of comets near the Sun</string><br>
+          </property><br>
+          <property name="whatsThis"><br>
+           <string>If checked, the comets near the Sun will have name<br>
labels attached.  Comets vary in brightness in their orbits, so a faint<br>
magnitude is not effective in this case.</string><br>
+          </property><br>
+          <property name="text"><br>
+           <string>Show names of comets within</string><br>
+          </property><br>
+          <attribute name="buttonGroup"><br>
+           <string notr="true">solarButtonGroup</<wbr>string><br>
+          </attribute><br>
+         </widget><br>
+        </item><br>
         <item row="0" column="2"><br>
          <layout class="QHBoxLayout"><br>
           <item><br>
@@ -368,44 +406,42 @@<br>
           </item><br>
          </layout><br>
         </item><br>
-        <item row="3" column="1"><br>
-         <layout class="QHBoxLayout"><br>
+        <item row="1" column="2"><br>
+         <layout class="QHBoxLayout" name="horizontalLayout"><br>
           <item><br>
-           <widget class="QCheckBox" name="kcfg_ShowAsteroidNames"><br>
-            <property name="toolTip"><br>
-             <string>Attach name labels to asteroids?</string><br>
-            </property><br>
-            <property name="whatsThis"><br>
-             <string>If checked, then name labels will be attached to<br>
asteroids</string><br>
-            </property><br>
+           <widget class="QDoubleSpinBox"<br>
name="kcfg_<wbr>MagLimitAsteroidDownload"/><br>
+          </item><br>
+          <item><br>
+           <widget class="QLabel" name="label_2"><br>
             <property name="text"><br>
-             <string>Show names</string><br>
+             <string>mag</string><br>
             </property><br>
-            <attribute name="buttonGroup"><br>
-             <string notr="true">solarButtonGroup</<wbr>string><br>
-            </attribute><br>
            </widget><br>
           </item><br>
+         </layout><br>
+        </item><br>
+        <item row="4" column="2"><br>
+         <layout class="QHBoxLayout"><br>
           <item><br>
-           <spacer><br>
-            <property name="orientation"><br>
-             <enum>Qt::Horizontal</enum><br>
+           <widget class="QDoubleSpinBox" name="kcfg_MaxRadCometName"><br>
+            <property name="toolTip"><br>
+             <string>Maximum distance for comet names</string><br>
             </property><br>
-            <property name="sizeType"><br>
-             <enum>QSizePolicy::Preferred</<wbr>enum><br>
+            <property name="whatsThis"><br>
+             <string>Set the maximum distance from the Sun for a comet<br>
to have a name label, in Astronomical Units (AU).  1 AU is the distance<br>
between the Earth and the Sun, approximately 150 million km</string><br>
             </property><br>
-            <property name="sizeHint" stdset="0"><br>
-             <size><br>
-              <width>20</width><br>
-              <height>20</height><br>
-             </size><br>
+            <property name="decimals"><br>
+             <number>2</number><br>
             </property><br>
-           </spacer><br>
+            <property name="maximum"><br>
+             <double>9999.000000000000000</<wbr>double><br>
+            </property><br>
+           </widget><br>
           </item><br>
           <item><br>
-           <widget class="QLabel" name="LabelDensity"><br>
+           <widget class="QLabel" name="textLabel4"><br>
             <property name="text"><br>
-             <string>Label density:</string><br>
+             <string>AU</string><br>
             </property><br>
            </widget><br>
           </item><br>
@@ -421,82 +457,53 @@<br>
           </property><br>
          </widget><br>
         </item><br>
-        <item row="4" column="0"><br>
-         <widget class="QCheckBox" name="kcfg_ShowComets"><br>
-          <property name="toolTip"><br>
-           <string>Draw comets?</string><br>
-          </property><br>
-          <property name="whatsThis"><br>
-           <string>If checked, comets will be drawn on the map</string><br>
-          </property><br>
-          <property name="text"><br>
-           <string>Comets</string><br>
-          </property><br>
-          <attribute name="buttonGroup"><br>
-           <string notr="true">solarButtonGroup</<wbr>string><br>
-          </attribute><br>
-         </widget><br>
-        </item><br>
-        <item row="4" column="1"><br>
-         <widget class="QCheckBox" name="kcfg_ShowCometNames"><br>
-          <property name="toolTip"><br>
-           <string>Show names of comets near the Sun</string><br>
-          </property><br>
-          <property name="whatsThis"><br>
-           <string>If checked, the comets near the Sun will have name<br>
labels attached.  Comets vary in brightness in their orbits, so a faint<br>
magnitude is not effective in this case.</string><br>
-          </property><br>
-          <property name="text"><br>
-           <string>Show names of comets within</string><br>
-          </property><br>
-          <attribute name="buttonGroup"><br>
-           <string notr="true">solarButtonGroup</<wbr>string><br>
-          </attribute><br>
-         </widget><br>
-        </item><br>
-        <item row="4" column="2"><br>
+        <item row="3" column="1"><br>
          <layout class="QHBoxLayout"><br>
           <item><br>
-           <widget class="QDoubleSpinBox" name="kcfg_MaxRadCometName"><br>
+           <widget class="QCheckBox" name="kcfg_ShowAsteroidNames"><br>
             <property name="toolTip"><br>
-             <string>Maximum distance for comet names</string><br>
+             <string>Attach name labels to asteroids?</string><br>
             </property><br>
             <property name="whatsThis"><br>
-             <string>Set the maximum distance from the Sun for a comet<br>
to have a name label, in Astronomical Units (AU).  1 AU is the distance<br>
between the Earth and the Sun, approximately 150 million km</string><br>
-            </property><br>
-            <property name="decimals"><br>
-             <number>2</number><br>
+             <string>If checked, then name labels will be attached to<br>
asteroids</string><br>
             </property><br>
-            <property name="maximum"><br>
-             <double>9999.000000000000000</<wbr>double><br>
+            <property name="text"><br>
+             <string>Show names</string><br>
             </property><br>
+            <attribute name="buttonGroup"><br>
+             <string notr="true">solarButtonGroup</<wbr>string><br>
+            </attribute><br>
            </widget><br>
           </item><br>
           <item><br>
-           <widget class="QLabel" name="textLabel4"><br>
+           <spacer><br>
+            <property name="orientation"><br>
+             <enum>Qt::Horizontal</enum><br>
+            </property><br>
+            <property name="sizeType"><br>
+             <enum>QSizePolicy::Preferred</<wbr>enum><br>
+            </property><br>
+            <property name="sizeHint" stdset="0"><br>
+             <size><br>
+              <width>20</width><br>
+              <height>20</height><br>
+             </size><br>
+            </property><br>
+           </spacer><br>
+          </item><br>
+          <item><br>
+           <widget class="QLabel" name="LabelDensity"><br>
             <property name="text"><br>
-             <string>AU</string><br>
+             <string>Label density:</string><br>
             </property><br>
            </widget><br>
           </item><br>
          </layout><br>
         </item><br>
-        <item row="1" column="1"><br>
-         <widget class="QLabel" name="label_3"><br>
-          <property name="text"><br>
-           <string>Download asteroids brighter than</string><br>
-          </property><br>
-         </widget><br>
-        </item><br>
-        <item row="2" column="0" colspan="3"><br>
-         <widget class="QLabel" name="<wbr>MagLimitAsteroidDownloadWarnin<wbr>g"><br>
-          <property name="styleSheet"><br>
-           <string notr="true">color:red; font-weight:bold;</string><br>
-          </property><br>
+        <item row="5" column="1"><br>
+         <widget class="QCheckBox" name="kcfg_ShowCometComas"><br>
           <property name="text"><br>
-           <string>This value might result in a big data file and<br>
reduced performance!</string><br>
-          </property><br>
-          <property name="alignment"><br>
-           <set>Qt::AlignCenter</set><br>
+           <string>Show Comet Comas</string><br>
           </property><br>
          </widget><br>
         </item><br>
diff --git a/kstars/skycomponents/<wbr>cometscomponent.cpp<br>
b/kstars/skycomponents/<wbr>cometscomponent.cpp<br>
index 7faf91675..8fc949e79 100644<br>
--- a/kstars/skycomponents/<wbr>cometscomponent.cpp<br>
+++ b/kstars/skycomponents/<wbr>cometscomponent.cpp<br>
@@ -95,42 +95,42 @@ void CometsComponent::loadData()<br>
     long double JD;<br>
     float M1, M2, K1, K2, diameter, albedo, rot_period, period;<br>
<br>
-    emitProgressText(i18n("Loading comets"));<br>
+    emitProgressText( i18n( "Loading comets" ) );<br>
<br>
-    qDeleteAll(m_ObjectList);<br>
+    qDeleteAll( m_ObjectList );<br>
     m_ObjectList.clear();<br>
<br>
-    objectNames(SkyObject::COMET).<wbr>clear();<br>
-    objectLists(SkyObject::COMET).<wbr>clear();<br>
+    objectNames( SkyObject::COMET ).clear();<br>
+    objectLists( SkyObject::COMET ).clear();<br>
<br>
     QList< QPair<QString, KSParser::DataTypes> > sequence;<br>
-    sequence.append(qMakePair(<wbr>QString("full name"), KSParser::D_QSTRING));<br>
-    sequence.append(qMakePair(<wbr>QString("epoch_mjd"), KSParser::D_INT));<br>
-    sequence.append(qMakePair(<wbr>QString("q"), KSParser::D_DOUBLE));<br>
-    sequence.append(qMakePair(<wbr>QString("e"), KSParser::D_DOUBLE));<br>
-    sequence.append(qMakePair(<wbr>QString("i"), KSParser::D_DOUBLE));<br>
-    sequence.append(qMakePair(<wbr>QString("w"), KSParser::D_DOUBLE));<br>
-    sequence.append(qMakePair(<wbr>QString("om"), KSParser::D_DOUBLE));<br>
-    sequence.append(qMakePair(<wbr>QString("tp_calc"), KSParser::D_DOUBLE));<br>
-    sequence.append(qMakePair(<wbr>QString("orbit_id"), KSParser::D_QSTRING));<br>
-    sequence.append(qMakePair(<wbr>QString("neo"), KSParser::D_QSTRING));<br>
-    sequence.append(qMakePair(<wbr>QString("M1"), KSParser::D_FLOAT));<br>
-    sequence.append(qMakePair(<wbr>QString("M2"), KSParser::D_FLOAT));<br>
-    sequence.append(qMakePair(<wbr>QString("diameter"), KSParser::D_FLOAT));<br>
-    sequence.append(qMakePair(<wbr>QString("extent"), KSParser::D_QSTRING));<br>
-    sequence.append(qMakePair(<wbr>QString("albedo"), KSParser::D_FLOAT));<br>
-    sequence.append(qMakePair(<wbr>QString("rot_period"), KSParser::D_FLOAT));<br>
-    sequence.append(qMakePair(<wbr>QString("per_y"), KSParser::D_FLOAT));<br>
-    sequence.append(qMakePair(<wbr>QString("moid"), KSParser::D_DOUBLE));<br>
-    sequence.append(qMakePair(<wbr>QString("class"), KSParser::D_QSTRING));<br>
-    sequence.append(qMakePair(<wbr>QString("H"), KSParser::D_SKIP));<br>
-    sequence.append(qMakePair(<wbr>QString("G"), KSParser::D_SKIP));<br>
-<br>
-    QString file_name =<br>
KSPaths::locate(<wbr>QStandardPaths::<wbr>GenericDataLocation,<br>
QString("comets.dat") );<br>
-    KSParser cometParser(file_name, '#', sequence);<br>
+    sequence.append( qMakePair( QString( "full name" ),<br>
KSParser::D_QSTRING ) );<br>
+    sequence.append( qMakePair( QString( "epoch_mjd" ), KSParser::D_INT<br>
) );<br>
+    sequence.append( qMakePair( QString( "q" ), KSParser::D_DOUBLE ) );<br>
+    sequence.append( qMakePair( QString( "e" ), KSParser::D_DOUBLE ) );<br>
+    sequence.append( qMakePair( QString( "i" ), KSParser::D_DOUBLE ) );<br>
+    sequence.append( qMakePair( QString( "w" ), KSParser::D_DOUBLE ) );<br>
+    sequence.append( qMakePair( QString( "om" ), KSParser::D_DOUBLE ) );<br>
+    sequence.append( qMakePair( QString( "tp_calc" ),<br>
KSParser::D_DOUBLE ) );<br>
+    sequence.append( qMakePair( QString( "orbit_id" ),<br>
KSParser::D_QSTRING ) );<br>
+    sequence.append( qMakePair( QString( "neo" ), KSParser::D_QSTRING ) );<br>
+    sequence.append( qMakePair( QString( "M1" ), KSParser::D_FLOAT ) );<br>
+    sequence.append( qMakePair( QString( "M2" ), KSParser::D_FLOAT ) );<br>
+    sequence.append( qMakePair( QString( "diameter" ),<br>
KSParser::D_FLOAT ) );<br>
+    sequence.append( qMakePair( QString( "extent" ),<br>
KSParser::D_QSTRING ) );<br>
+    sequence.append( qMakePair( QString( "albedo" ), KSParser::D_FLOAT ) );<br>
+    sequence.append( qMakePair( QString( "rot_period" ),<br>
KSParser::D_FLOAT ) );<br>
+    sequence.append( qMakePair( QString( "per_y" ), KSParser::D_FLOAT ) );<br>
+    sequence.append( qMakePair( QString( "moid" ), KSParser::D_DOUBLE ) );<br>
+    sequence.append( qMakePair( QString( "class" ), KSParser::D_QSTRING<br>
) );<br>
+    sequence.append( qMakePair( QString( "H" ), KSParser::D_SKIP ) );<br>
+    sequence.append( qMakePair( QString( "G" ), KSParser::D_SKIP ) );<br>
+<br>
+    QString file_name = KSPaths::locate(<br>
QStandardPaths::<wbr>GenericDataLocation, QString( "comets.dat" ) );<br>
+    KSParser cometParser( file_name, '#', sequence );<br>
<br>
     QHash<QString, QVariant> row_content;<br>
-    while (cometParser.HasNextRow())<br>
+    while ( cometParser.HasNextRow() )<br>
     {<br>
         KSComet * com = 0;<br>
         row_content = cometParser.ReadNextRow();<br>
@@ -146,12 +146,12 @@ void CometsComponent::loadData()<br>
         orbit_id = row_content["orbit_id"].<wbr>toString();<br>
         neo = row_content["neo"] == "Y";<br>
<br>
-        if(row_content["M1"].toFloat()<wbr>==0.0)<br>
+        if ( row_content["M1"].toFloat() == 0.0 )<br>
             M1 = 101.0;<br>
         else<br>
             M1 = row_content["M1"].toFloat();<br>
<br>
-        if(row_content["M2"].toFloat()<wbr>==0.0)<br>
+        if ( row_content["M2"].toFloat() == 0.0 )<br>
             M2 = 101.0;<br>
         else<br>
             M2 = row_content["M2"].toFloat();<br>
@@ -186,34 +186,34 @@ void CometsComponent::loadData()<br>
<br>
         // Add *short* name to the list of object names<br>
         objectNames( SkyObject::COMET ).append( com->name() );<br>
-        objectLists( SkyObject::COMET ).append(QPair<QString, const<br>
SkyObject *>(com->name(),com));<br>
+        objectLists( SkyObject::COMET ).append( QPair<QString, const<br>
SkyObject *>( com->name(), com ) );<br>
     }<br>
 }<br>
<br>
 void CometsComponent::draw( SkyPainter * skyp )<br>
 {<br>
-    Q_UNUSED(skyp)<br>
+    Q_UNUSED( skyp )<br>
 #ifndef KSTARS_LITE<br>
-    if( !selected() || Options::zoomFactor() < 10*MINZOOM )<br>
+    if ( !selected() || Options::zoomFactor() < 10 * MINZOOM )<br>
         return;<br>
<br>
     bool hideLabels =  ! Options::showCometNames() ||<br>
-                       (SkyMap::Instance()-><wbr>isSlewing() &&<br>
-                        Options::hideLabels() );<br>
+                       ( SkyMap::Instance()->isSlewing(<wbr>) &&<br>
+                         Options::hideLabels() );<br>
     double rsunLabelLimit = Options::maxRadCometName();<br>
<br>
     //FIXME: Should these be config'able?<br>
-    skyp->setPen( QPen( QColor( "darkcyan" ) ) );<br>
-    skyp->setBrush( QBrush( QColor( "darkcyan" ) ) );<br>
+    skyp->setPen( QPen( QColor( "transparent" ) ) );<br>
+    skyp->setBrush( QBrush( QColor( "white" ) ) );<br>
<br>
     foreach ( SkyObject * so, m_ObjectList )<br>
     {<br>
-        KSComet * com = (KSComet *)so;<br>
-        double mag= com->mag();<br>
-        if (std::isnan(mag) == 0)<br>
+        KSComet * com = ( KSComet * )so;<br>
+        double mag = com->mag();<br>
+        if ( std::isnan( mag ) == 0 )<br>
         {<br>
-            bool drawn = skyp->drawPointSource(com,mag)<wbr>;<br>
-            if ( drawn && !(hideLabels || com->rsun() >= rsunLabelLimit) )<br>
+            bool drawn = skyp->drawComet( com );<br>
+            if ( drawn && !( hideLabels || com->rsun() >=<br>
rsunLabelLimit ) )<br>
                 SkyLabeler::AddLabel( com, SkyLabeler::COMET_LABEL );<br>
         }<br>
     }<br>
@@ -224,15 +224,15 @@ void CometsComponent::<wbr>updateDataFile()<br>
 {<br>
     downloadJob = new FileDownloader();<br>
<br>
-    downloadJob-><wbr>setProgressDialogEnabled(true, i18n("Comets Update"),<br>
i18n("Downloading comets updates..."));<br>
+    downloadJob-><wbr>setProgressDialogEnabled( true, i18n( "Comets Update"<br>
), i18n( "Downloading comets updates..." ) );<br>
<br>
-    connect(downloadJob, SIGNAL(downloaded()), this,<br>
SLOT(downloadReady()));<br>
-    connect(downloadJob, SIGNAL(error(QString)), this,<br>
SLOT(downloadError(QString)));<br>
+    connect( downloadJob, SIGNAL( downloaded() ), this, SLOT(<br>
downloadReady() ) );<br>
+    connect( downloadJob, SIGNAL( error( QString ) ), this, SLOT(<br>
downloadError( QString ) ) );<br>
<br>
     QUrl url = QUrl( "<a href="https://ssd.jpl.nasa.gov/sbdb_query.cgi" rel="noreferrer" target="_blank">https://ssd.jpl.nasa.gov/<wbr>sbdb_query.cgi</a>" );<br>
-    QByteArray post_data = KSUtils::getJPLQueryString("<wbr>com",<br>
"<wbr>AcBdBiBgBjBlBkBqBbAgAkAlApAqAr<wbr>AsBsBtChAmAn",<br>
QVector<KSUtils::JPLFilter> {{"Af", "!=", "D"}});<br>
+    QByteArray post_data = KSUtils::getJPLQueryString( "com",<br>
"<wbr>AcBdBiBgBjBlBkBqBbAgAkAlApAqAr<wbr>AsBsBtChAmAn",<br>
QVector<KSUtils::JPLFilter> {{"Af", "!=", "D"}} );<br>
<br>
-    downloadJob->post(url, post_data);<br>
+    downloadJob->post( url, post_data );<br>
 }<br>
<br>
 void CometsComponent::<wbr>downloadReady()<br>
@@ -242,8 +242,8 @@ void CometsComponent::<wbr>downloadReady()<br>
     data.insert( 0, '#' );<br>
<br>
     // Write data to asteroids.dat<br>
-    QFile file(<br>
KSPaths::writableLocation(<wbr>QStandardPaths::<wbr>GenericDataLocation) +<br>
"comets.dat" ) ;<br>
-    file.open( QIODevice::WriteOnly|<wbr>QIODevice::Truncate|QIODevice:<wbr>:Text );<br>
+    QFile file( KSPaths::writableLocation(<br>
QStandardPaths::<wbr>GenericDataLocation ) + "comets.dat" ) ;<br>
+    file.open( QIODevice::WriteOnly | QIODevice::Truncate |<br>
QIODevice::Text );<br>
     file.write( data );<br>
     file.close();<br>
<br>
@@ -259,12 +259,12 @@ void CometsComponent::<wbr>downloadReady()<br>
     downloadJob->deleteLater();<br>
 }<br>
<br>
-void CometsComponent::<wbr>downloadError(const QString &errorString)<br>
+void CometsComponent::<wbr>downloadError( const QString &errorString )<br>
 {<br>
 #ifndef KSTARS_LITE<br>
-    KMessageBox::error(0, i18n("Error downloading asteroids data: %1",<br>
errorString));<br>
+    KMessageBox::error( 0, i18n( "Error downloading asteroids data:<br>
%1", errorString ) );<br>
 #else<br>
-    qDebug() << i18n("Error downloading comets data: %1", errorString);<br>
+    qDebug() << i18n( "Error downloading comets data: %1", errorString );<br>
 #endif<br>
     downloadJob->deleteLater();<br>
 }<br>
diff --git a/kstars/skycomponents/<wbr>solarsystemcomposite.h<br>
b/kstars/skycomponents/<wbr>solarsystemcomposite.h<br>
index 1f2c30ca9..a5fa1d13b 100644<br>
--- a/kstars/skycomponents/<wbr>solarsystemcomposite.h<br>
+++ b/kstars/skycomponents/<wbr>solarsystemcomposite.h<br>
@@ -48,6 +48,12 @@ class SolarSystemComposite : public SkyComposite<br>
         {<br>
             return m_Earth;<br>
         }<br>
+<br>
+        KSSun * sun()<br>
+        {<br>
+            return m_Sun;<br>
+        }<br>
+<br>
         const QList<SkyObject *> &asteroids() const;<br>
         const QList<SkyObject *> &comets() const;<br>
         const QList<SkyObject *> &planetObjects() const;<br>
diff --git a/kstars/skyobjects/kscomet.h b/kstars/skyobjects/kscomet.h<br>
index 37fdfb3cc..05d74e7f0 100644<br>
--- a/kstars/skyobjects/kscomet.h<br>
+++ b/kstars/skyobjects/kscomet.h<br>
@@ -149,17 +149,17 @@ class KSComet : public KSPlanetBase<br>
         /**<br>
          *@short Sets the comet's apparent tail length in degrees<br>
          */<br>
-        void setTailAngSize( double tailangsize )<br>
+        void setComaAngSize( double comaAngSize )<br>
         {<br>
-            TailAngSize = tailangsize;<br>
+            ComaAngSize = comaAngSize;<br>
         }<br>
<br>
         /**<br>
          *@return the estimated angular size of the tail as a dms<br>
          */<br>
-        inline dms getTailAngSize()<br>
+        inline dms getComaAngSize()<br>
         {<br>
-            return dms( TailAngSize );<br>
+            return dms( ComaAngSize );<br>
         }<br>
<br>
         /**<br>
@@ -295,7 +295,7 @@ class KSComet : public KSPlanetBase<br>
             *@param Earth planet Earth (needed to calculate geocentric<br>
coords)<br>
             *@return true if position was successfully calculated.<br>
             */<br>
-        virtual bool findGeocentricPosition( const KSNumbers * num,<br>
const KSPlanetBase * Earth=NULL );<br>
+        virtual bool findGeocentricPosition( const KSNumbers * num,<br>
const KSPlanetBase * Earth = NULL );<br>
<br>
         /**<br>
          *@short Estimate physical parameters of the comet such as coma<br>
size, tail length and size of the nucleus<br>
@@ -305,11 +305,11 @@ class KSComet : public KSPlanetBase<br>
<br>
<br>
     private:<br>
-        virtual void findMagnitude(const KSNumbers *);<br>
+        virtual void findMagnitude( const KSNumbers * );<br>
<br>
         long double JD, JDp;<br>
         double q, e, a, P, EarthMOID;<br>
-        double TailSize, TailAngSize, ComaSize, NuclearSize; // All in<br>
kilometres<br>
+        double TailSize, ComaAngSize, ComaSize, NuclearSize; // All in<br>
kilometres<br>
         float M1, M2, K1, K2, Albedo, Diameter, RotationPeriod, Period;<br>
         dms i, w, N;<br>
         QString OrbitID, OrbitClass, Dimensions ;<br>
diff --git a/kstars/skyobjects/<wbr>ksplanetbase.cpp<br>
b/kstars/skyobjects/<wbr>ksplanetbase.cpp<br>
index f30d87c10..171e38a1a 100644<br>
--- a/kstars/skyobjects/<wbr>ksplanetbase.cpp<br>
+++ b/kstars/skyobjects/<wbr>ksplanetbase.cpp<br>
@@ -39,16 +39,16 @@<br>
 #include "texturemanager.h"<br>
<br>
 QVector<QColor> KSPlanetBase::planetColor = QVector<QColor>() <<<br>
-        QColor("slateblue") << //Mercury<br>
-        QColor("lightgreen") << //Venus<br>
-        QColor("red") << //Mars<br>
-        QColor("goldenrod") << //Jupiter<br>
-        QColor("khaki") << //Saturn<br>
-        QColor("lightseagreen") << //Uranus<br>
-        QColor("skyblue") << //Neptune<br>
-        QColor("grey") << //Pluto<br>
-        QColor("yellow") << //Sun<br>
-        QColor("white"); //Moon<br>
+        QColor( "slateblue" ) << //Mercury<br>
+        QColor( "lightgreen" ) << //Venus<br>
+        QColor( "red" ) << //Mars<br>
+        QColor( "goldenrod" ) << //Jupiter<br>
+        QColor( "khaki" ) << //Saturn<br>
+        QColor( "lightseagreen" ) << //Uranus<br>
+        QColor( "skyblue" ) << //Neptune<br>
+        QColor( "grey" ) << //Pluto<br>
+        QColor( "yellow" ) << //Sun<br>
+        QColor( "white" ); //Moon<br>
<br>
<br>
 const SkyObject::UID KSPlanetBase::UID_SOL_BIGOBJ   = 0;<br>
@@ -119,7 +119,7 @@ void KSPlanetBase::updateCoords( const KSNumbers *<br>
num, bool includePlanets, con<br>
         {<br>
             findPosition( num, lat, LST, kd->skyComposite()->earth() );<br>
             //Don't add to the trail this time<br>
-            if( hasTrail() )<br>
+            if ( hasTrail() )<br>
                 Trail.takeLast();<br>
         }<br>
         else<br>
@@ -134,29 +134,29 @@ void KSPlanetBase::findPosition( const KSNumbers *<br>
num, const CachingDms * lat,<br>
     // DEBUG edit<br>
     findGeocentricPosition( num, Earth );  //private function,<br>
reimplemented in each subclass<br>
     findPhase();<br>
-    setAngularSize( asin(physicalSize()/Rearth/AU_<wbr>KM)*60.*180./dms::PI<br>
); //angular size in arcmin<br>
+    setAngularSize( asin( physicalSize() / Rearth / AU_KM ) * 60.*180.<br>
/ dms::PI ); //angular size in arcmin<br>
<br>
     if ( lat && LST )<br>
         localizeCoords( num, lat, LST ); //correct for figure-of-the-Earth<br>
<br>
     if ( hasTrail() )<br>
     {<br>
-        addToTrail( KStarsDateTime( num->getJD() ).toString(<br>
"yyyy.MM.dd hh:mm" ) + i18nc("Universal time", "UT") ); // TODO:<br>
Localize date/time format?<br>
+        addToTrail( KStarsDateTime( num->getJD() ).toString(<br>
"yyyy.MM.dd hh:mm" ) + i18nc( "Universal time", "UT" ) ); // TODO:<br>
Localize date/time format?<br>
         if ( Trail.size() > TrailObject::MaxTrail )<br>
             clipTrail();<br>
     }<br>
<br>
-    findMagnitude(num);<br>
+    findMagnitude( num );<br>
<br>
     if ( type() == SkyObject::COMET )<br>
     {<br>
         // Compute tail size<br>
-        KSComet * me = (KSComet *)this;<br>
-        double TailAngSize;<br>
+        KSComet * me = ( KSComet * )this;<br>
+        double comaAngSize;<br>
         // Convert the tail size in km to angular tail size (degrees)<br>
-        TailAngSize = asin(physicalSize()/Rearth/AU_<wbr>KM)*60.0*180.0/dms::PI;<br>
+        comaAngSize = asin( physicalSize() / Rearth / AU_KM ) * 60.0 *<br>
180.0 / dms::PI;<br>
         // Find the apparent length as projected on the celestial<br>
sphere (the comet's tail points away from the sun)<br>
-        me->setTailAngSize( TailAngSize * fabs(sin( phase().radians() )));<br>
+        me->setComaAngSize( comaAngSize * fabs( sin( phase().radians()<br>
) ) );<br>
     }<br>
<br>
 }<br>
@@ -177,14 +177,14 @@ void KSPlanetBase::localizeCoords( const KSNumbers<br>
* num, const CachingDms * lat<br>
     double rsinp, rcosp, u, sinHA, cosHA, sinDec, cosDec, D;<br>
     double cosHA2;<br>
     double r = Rearth * AU_KM; //distance from Earth, in km<br>
-    u = atan( 0.996647*tan( lat->radians() ) );<br>
-    rsinp = 0.996647*sin( u );<br>
+    u = atan( 0.996647 * tan( lat->radians() ) );<br>
+    rsinp = 0.996647 * sin( u );<br>
     rcosp = cos( u );<br>
     HA.setD( LST->Degrees() - ra().Degrees() );<br>
     HA.SinCos( sinHA, cosHA );<br>
     dec().SinCos( sinDec, cosDec );<br>
<br>
-    D = atan2( rcosp*sinHA, r*cosDec/6378.14 - rcosp*cosHA );<br>
+    D = atan2( rcosp * sinHA, r * cosDec / 6378.14 - rcosp * cosHA );<br>
     dms temp;<br>
     temp.setRadians( ra().radians() - D );<br>
     setRA( temp );<br>
@@ -194,7 +194,7 @@ void KSPlanetBase::localizeCoords( const KSNumbers *<br>
num, const CachingDms * lat<br>
<br>
     //temp.setRadians( atan2( cosHA2*( r*sinDec/6378.14 - rsinp ),<br>
r*cosDec*cosHA/6378.14 - rcosp ) );<br>
     // The atan2() version above makes the planets move crazy in the<br>
htm branch -jbb<br>
-    temp.setRadians( atan( cosHA2*( r*sinDec/6378.14 - rsinp )/(<br>
r*cosDec*cosHA/6378.14 - rcosp ) ) );<br>
+    temp.setRadians( atan( cosHA2 * ( r * sinDec / 6378.14 - rsinp ) /<br>
( r * cosDec * cosHA / 6378.14 - rcosp ) ) );<br>
<br>
     setDec( temp );<br>
<br>
@@ -219,7 +219,7 @@ void KSPlanetBase::setRearth( const KSPlanetBase *<br>
Earth )<br>
 {<br>
     double sinL, sinB, sinL0, sinB0;<br>
     double cosL, cosB, cosL0, cosB0;<br>
-    double x,y,z;<br>
+    double x, y, z;<br>
<br>
     //The Moon's Rearth is set in its findGeocentricPosition()...<br>
     if ( name() == "Moon" )<br>
@@ -242,20 +242,20 @@ void KSPlanetBase::setRearth( const KSPlanetBase *<br>
Earth )<br>
<br>
     Earth->ecLong().SinCos( sinL0, cosL0 );<br>
     Earth->ecLat().SinCos( sinB0, cosB0 );<br>
-    double eX = Earth->rsun()*cosB0*cosL0;<br>
-    double eY = Earth->rsun()*cosB0*sinL0;<br>
-    double eZ = Earth->rsun()*sinB0;<br>
+    double eX = Earth->rsun() * cosB0 * cosL0;<br>
+    double eY = Earth->rsun() * cosB0 * sinL0;<br>
+    double eZ = Earth->rsun() * sinB0;<br>
<br>
     helEcLong().SinCos( sinL, cosL );<br>
     helEcLat().SinCos( sinB, cosB );<br>
-    x = rsun()*cosB*cosL - eX;<br>
-    y = rsun()*cosB*sinL - eY;<br>
-    z = rsun()*sinB - eZ;<br>
+    x = rsun() * cosB * cosL - eX;<br>
+    y = rsun() * cosB * sinL - eY;<br>
+    z = rsun() * sinB - eZ;<br>
<br>
-    Rearth = sqrt(x*x + y*y + z*z);<br>
+    Rearth = sqrt( x * x + y * y + z * z );<br>
<br>
     //Set angular size, in arcmin<br>
-    AngularSize = asin(PhysicalSize/Rearth/AU_<wbr>KM)*60.*180./dms::PI;<br>
+    AngularSize = asin( PhysicalSize / Rearth / AU_KM ) * 60.*180. /<br>
dms::PI;<br>
 }<br>
<br>
 void KSPlanetBase::findPA( const KSNumbers * num )<br>
@@ -271,7 +271,7 @@ void KSPlanetBase::findPA( const KSNumbers * num )<br>
     double pa;<br>
     if ( dy )<br>
     {<br>
-        pa = atan2( dx, dy )*180.0/dms::PI;<br>
+        pa = atan2( dx, dy ) * 180.0 / dms::PI;<br>
     }<br>
     else<br>
     {<br>
@@ -282,7 +282,7 @@ void KSPlanetBase::findPA( const KSNumbers * num )<br>
<br>
 double KSPlanetBase::labelOffset() const<br>
 {<br>
-    double size = angSize() * dms::PI * Options::zoomFactor()/10800.0;<br>
+    double size = angSize() * dms::PI * Options::zoomFactor() / 10800.0;<br>
<br>
     //Determine minimum size for offset<br>
     double minsize = 4.;<br>
@@ -295,17 +295,17 @@ double KSPlanetBase::labelOffset() const<br>
<br>
     //Inflate offset for Saturn<br>
     if ( name() == i18n( "Saturn" ) )<br>
-        size = int(2.5*size);<br>
+        size = int( 2.5 * size );<br>
<br>
-    return 0.5*size + 4.;<br>
+    return 0.5 * size + 4.;<br>
 }<br>
<br>
 void KSPlanetBase::findPhase()<br>
 {<br>
     /* Compute the phase of the planet in degrees */<br>
     double earthSun =<br>
KStarsData::Instance()-><wbr>skyComposite()->earth()->rsun(<wbr>);<br>
-    double cosPhase = (rsun()*rsun() + rearth()*rearth() -<br>
earthSun*earthSun)<br>
-                      / (2 * rsun() * rearth() );<br>
+    double cosPhase = ( rsun() * rsun() + rearth() * rearth() -<br>
earthSun * earthSun )<br>
+                      / ( 2 * rsun() * rearth() );<br>
     Phase = acos ( cosPhase ) * 180.0 / dms::PI;<br>
     /* More elegant way of doing it, but requires the Sun.<br>
        TODO: Switch to this if and when we make KSSun a singleton */<br>
diff --git a/kstars/skypainter.h b/kstars/skypainter.h<br>
index c590141e6..6c52e613e 100644<br>
--- a/kstars/skypainter.h<br>
+++ b/kstars/skypainter.h<br>
@@ -36,7 +36,9 @@ class LineListLabel;<br>
 class Satellite;<br>
 class Supernova;<br>
 class ConstellationsArt;<br>
-<br>
+class KSComet;<br>
+class SolarSystemComposite;<br>
+class KSSun;<br>
<br>
 /** @short Draws things on the sky, without regard to backend.<br>
     This class serves as an interface to draw objects onto the sky without<br>
@@ -110,6 +112,12 @@ class SkyPainter<br>
             */<br>
         virtual void drawSkyPolygon(LineList * list, bool<br>
forceClip=true) =0;<br>
<br>
+        /** @short Draw a comet in the sky.<br>
+            @param com comet to draw<br>
+            @return true if a comet was drawn<br>
+            */<br>
+        virtual bool drawComet(KSComet * com) =0;<br>
+<br>
         /** @short Draw a point source (e.g., a star).<br>
             @param loc the location of the source in the sky<br>
             @param mag the magnitude of the source<br>
diff --git a/kstars/skyqpainter.cpp b/kstars/skyqpainter.cpp<br>
index c6cfa7140..ee02d8805 100644<br>
--- a/kstars/skyqpainter.cpp<br>
+++ b/kstars/skyqpainter.cpp<br>
@@ -9,7 +9,7 @@<br>
     This program is distributed in the hope that it will be useful,<br>
     but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>
-    GNU General Public License for more details.<br>
+    GNU General Public License for more decomas.<br>
<br>
     You should have received a copy of the GNU General Public License along<br>
     with this program; if not, write to the Free Software Foundation, Inc.,<br>
@@ -29,6 +29,7 @@<br>
 #include "skycomponents/<wbr>skymapcomposite.h"<br>
 #include "skycomponents/flagcomponent.<wbr>h"<br>
 #include "skycomponents/<wbr>satellitescomponent.h"<br>
+#include "skycomponents/<wbr>solarsystemcomposite.h"<br>
<br>
 #include "skyobjects/deepskyobject.h"<br>
 #include "skyobjects/kscomet.h"<br>
@@ -37,6 +38,7 @@<br>
 #include "skyobjects/satellite.h"<br>
 #include "skyobjects/supernova.h"<br>
 #include "skyobjects/constellationsart.<wbr>h"<br>
+#include "skyobjects/kssun.h"<br>
 #include "projections/projector.h"<br>
 #include "ksutils.h"<br>
<br>
@@ -45,15 +47,12 @@<br>
<br>
 #include <functional><br>
<br>
-namespace<br>
-{<br>
+namespace {<br>
<br>
 // Convert spectral class to numerical index.<br>
 // If spectral class is invalid return index for white star (A class)<br>
-int harvardToIndex(char c)<br>
-{<br>
-    switch( c )<br>
-    {<br>
+int harvardToIndex( char c ) {<br>
+    switch ( c ) {<br>
         case 'o':<br>
         case 'O':<br>
             return 0;<br>
@@ -92,17 +91,15 @@ const int nSPclasses = 7;<br>
 // These pixmaps are never deallocated. Not really good...<br>
 QPixmap * imageCache[nSPclasses][<wbr>nStarSizes] = {{0}};<br>
<br>
-QPixmap * visibleSatPixmap=0, *invisibleSatPixmap=0;<br>
+QPixmap * visibleSatPixmap = 0, *invisibleSatPixmap = 0;<br>
 }<br>
<br>
 int SkyQPainter::starColorMode = 0;<br>
 QColor SkyQPainter::m_starColor = QColor();<br>
 QMap<char, QColor> SkyQPainter::ColorMap = QMap<char, QColor>();<br>
<br>
-<br>
 SkyQPainter::SkyQPainter( QPaintDevice * pd )<br>
-    : SkyPainter(), QPainter()<br>
-{<br>
+    : SkyPainter(), QPainter() {<br>
     Q_ASSERT( pd );<br>
     m_pd = pd;<br>
     m_size = QSize( pd->width(), pd->height() );<br>
@@ -110,8 +107,7 @@ SkyQPainter::SkyQPainter( QPaintDevice * pd )<br>
 }<br>
<br>
 SkyQPainter::SkyQPainter( QPaintDevice * pd, const QSize &size )<br>
-    : SkyPainter(), QPainter()<br>
-{<br>
+    : SkyPainter(), QPainter() {<br>
     Q_ASSERT( pd );<br>
     m_pd = pd;<br>
     m_size = size;<br>
@@ -119,8 +115,7 @@ SkyQPainter::SkyQPainter( QPaintDevice * pd, const<br>
QSize &size )<br>
 }<br>
<br>
 SkyQPainter::SkyQPainter( QWidget * widget, QPaintDevice * pd )<br>
-    : SkyPainter(), QPainter()<br>
-{<br>
+    : SkyPainter(), QPainter() {<br>
     Q_ASSERT( widget );<br>
     // Set paint device pointer to pd or to the widget if pd = 0<br>
     m_pd = ( pd ? pd : widget );<br>
@@ -128,48 +123,40 @@ SkyQPainter::SkyQPainter( QWidget * widget,<br>
QPaintDevice * pd )<br>
     m_vectorStars = false;<br>
 }<br>
<br>
-SkyQPainter::~SkyQPainter()<br>
-{<br>
+SkyQPainter::~SkyQPainter() {<br>
 }<br>
<br>
-void SkyQPainter::begin()<br>
-{<br>
-    QPainter::begin(m_pd);<br>
+void SkyQPainter::begin() {<br>
+    QPainter::begin( m_pd );<br>
     bool aa = !m_sm->isSlewing() && Options::useAntialias();<br>
-    setRenderHint(QPainter::<wbr>Antialiasing, aa );<br>
-    setRenderHint(QPainter::<wbr>HighQualityAntialiasing, aa);<br>
+    setRenderHint( QPainter::Antialiasing, aa );<br>
+    setRenderHint( QPainter::<wbr>HighQualityAntialiasing, aa );<br>
     m_proj = m_sm->projector();<br>
 }<br>
<br>
-void SkyQPainter::end()<br>
-{<br>
+void SkyQPainter::end() {<br>
     QPainter::end();<br>
 }<br>
<br>
-void SkyQPainter::<wbr>drawSkyBackground()<br>
-{<br>
+void SkyQPainter::<wbr>drawSkyBackground() {<br>
     //FIXME use projector<br>
     fillRect( 0, 0, m_size.width(), m_size.height(),<br>
KStarsData::Instance()-><wbr>colorScheme()->colorNamed( "SkyColor" ) );<br>
 }<br>
<br>
-void SkyQPainter::setPen(const QPen &pen)<br>
-{<br>
-    QPainter::setPen(pen);<br>
+void SkyQPainter::setPen( const QPen &pen ) {<br>
+    QPainter::setPen( pen );<br>
 }<br>
<br>
-void SkyQPainter::setBrush(const QBrush &brush)<br>
-{<br>
-    QPainter::setBrush(brush);<br>
+void SkyQPainter::setBrush( const QBrush &brush ) {<br>
+    QPainter::setBrush( brush );<br>
 }<br>
<br>
-void SkyQPainter::initStarImages()<br>
-{<br>
+void SkyQPainter::initStarImages() {<br>
<br>
     const int starColorIntensity = Options::starColorIntensity();<br>
<br>
     ColorMap.clear();<br>
-    switch( Options::starColorMode() )<br>
-    {<br>
+    switch ( Options::starColorMode() ) {<br>
         case 1: // Red stars.<br>
             m_starColor = Qt::red;<br>
             break;<br>
@@ -191,8 +178,7 @@ void SkyQPainter::initStarImages()<br>
             ColorMap.insert( 'M', QColor::fromRgb( 255,   0,   0 ) );<br>
             break;<br>
     }<br>
-    if ( ColorMap.isEmpty() )<br>
-    {<br>
+    if ( ColorMap.isEmpty() ) {<br>
         ColorMap.insert( 'O', m_starColor );<br>
         ColorMap.insert( 'B', m_starColor );<br>
         ColorMap.insert( 'A', m_starColor );<br>
@@ -202,93 +188,79 @@ void SkyQPainter::initStarImages()<br>
         ColorMap.insert( 'M', m_starColor );<br>
     }<br>
<br>
-    foreach( char color, ColorMap.keys() )<br>
-    {<br>
+    foreach ( char color, ColorMap.keys() ) {<br>
         QPixmap BigImage( 15, 15 );<br>
         BigImage.fill( Qt::transparent );<br>
<br>
         QPainter p;<br>
         p.begin( &BigImage );<br>
<br>
-        if ( Options::starColorMode() == 0 )<br>
-        {<br>
+        if ( Options::starColorMode() == 0 ) {<br>
             qreal h, s, v, a;<br>
             p.setRenderHint( QPainter::Antialiasing, false );<br>
             QColor starColor = ColorMap[color];<br>
-            starColor.getHsvF(&h, &s, &v, &a);<br>
-            for (int i = 0; i < 8; i++ )<br>
-            {<br>
-                for (int j = 0; j < 8; j++ )<br>
-                {<br>
+            starColor.getHsvF( &h, &s, &v, &a );<br>
+            for ( int i = 0; i < 8; i++ ) {<br>
+                for ( int j = 0; j < 8; j++ ) {<br>
                     qreal x = i - 7;<br>
                     qreal y = j - 7;<br>
-                    qreal dist = sqrt( x*x + y*y ) / 7.0;<br>
-                    starColor.setHsvF(h,<br>
-                                      qMin( qreal(1), dist <<br>
(10-starColorIntensity)/10.0 ? 0 : dist ),<br>
-                                      v,<br>
-                                      qMax( qreal(0), dist <<br>
(10-starColorIntensity)/20.0 ? 1 : 1-dist ) );<br>
+                    qreal dist = sqrt( x * x + y * y ) / 7.0;<br>
+                    starColor.setHsvF( h,<br>
+                                       qMin( qreal( 1 ), dist < ( 10 -<br>
starColorIntensity ) / 10.0 ? 0 : dist ),<br>
+                                       v,<br>
+                                       qMax( qreal( 0 ), dist < ( 10 -<br>
starColorIntensity ) / 20.0 ? 1 : 1 - dist ) );<br>
                     p.setPen( starColor );<br>
                     p.drawPoint( i, j );<br>
-                    p.drawPoint( 14-i, j );<br>
-                    p.drawPoint( i, 14-j );<br>
-                    p.drawPoint (14-i, 14-j);<br>
+                    p.drawPoint( 14 - i, j );<br>
+                    p.drawPoint( i, 14 - j );<br>
+                    p.drawPoint ( 14 - i, 14 - j );<br>
                 }<br>
             }<br>
-        }<br>
-        else<br>
-        {<br>
-            p.setRenderHint(QPainter::<wbr>Antialiasing, true );<br>
-            p.setPen( QPen(ColorMap[color], 2.0 ) );<br>
+        } else {<br>
+            p.setRenderHint( QPainter::Antialiasing, true );<br>
+            p.setPen( QPen( ColorMap[color], 2.0 ) );<br>
             p.setBrush( p.pen().color() );<br>
             p.drawEllipse( QRectF( 2, 2, 10, 10 ) );<br>
         }<br>
         p.end();<br>
<br>
         // Cache array slice<br>
-        QPixmap ** pmap = imageCache[ harvardToIndex(color) ];<br>
-        for( int size = 1; size < nStarSizes; size++ )<br>
-        {<br>
-            if( !pmap[size] )<br>
+        QPixmap ** pmap = imageCache[ harvardToIndex( color ) ];<br>
+        for ( int size = 1; size < nStarSizes; size++ ) {<br>
+            if ( !pmap[size] )<br>
                 pmap[size] = new QPixmap();<br>
             *pmap[size] = BigImage.scaled( size, size,<br>
Qt::KeepAspectRatio, Qt::SmoothTransformation );<br>
         }<br>
     }<br>
     starColorMode = Options::starColorMode();<br>
<br>
-    visibleSatPixmap = new<br>
QPixmap(":/icons/breeze/<wbr>default/kstars_satellites_<wbr>visible.svg");<br>
-    invisibleSatPixmap = new<br>
QPixmap(":/icons/breeze/<wbr>default/kstars_satellites_<wbr>invisible.svg");<br>
+    visibleSatPixmap = new QPixmap(<br>
":/icons/breeze/default/<wbr>kstars_satellites_visible.svg" );<br>
+    invisibleSatPixmap = new QPixmap(<br>
":/icons/breeze/default/<wbr>kstars_satellites_invisible.<wbr>svg" );<br>
 }<br>
<br>
-void SkyQPainter::drawSkyLine(<wbr>SkyPoint * a, SkyPoint * b)<br>
-{<br>
+void SkyQPainter::drawSkyLine( SkyPoint * a, SkyPoint * b ) {<br>
<br>
     bool aVisible, bVisible;<br>
-    QPointF aScreen = m_proj->toScreen(a,true,&<wbr>aVisible);<br>
-    QPointF bScreen = m_proj->toScreen(b,true,&<wbr>bVisible);<br>
+    QPointF aScreen = m_proj->toScreen( a, true, &aVisible );<br>
+    QPointF bScreen = m_proj->toScreen( b, true, &bVisible );<br>
<br>
-    drawLine(aScreen, bScreen);<br>
+    drawLine( aScreen, bScreen );<br>
     return;<br>
<br>
     //THREE CASES:<br>
-    if( aVisible && bVisible )<br>
-    {<br>
+    if ( aVisible && bVisible ) {<br>
         //Both a,b visible, so paint the line normally:<br>
-        drawLine(aScreen, bScreen);<br>
-    }<br>
-    else if( aVisible )<br>
-    {<br>
+        drawLine( aScreen, bScreen );<br>
+    } else if ( aVisible ) {<br>
         //a is visible but b isn't:<br>
-        drawLine(aScreen, m_proj->clipLine(a,b));<br>
-    }<br>
-    else if( bVisible )<br>
-    {<br>
+        drawLine( aScreen, m_proj->clipLine( a, b ) );<br>
+    } else if ( bVisible ) {<br>
         //b is visible but a isn't:<br>
-        drawLine(bScreen, m_proj->clipLine(b,a));<br>
+        drawLine( bScreen, m_proj->clipLine( b, a ) );<br>
     } //FIXME: what if both are offscreen but the line isn't?<br>
 }<br>
<br>
-void SkyQPainter::drawSkyPolyline(<wbr>LineList * list, SkipList * skipList,<br>
LineListLabel * label)<br>
-{<br>
+void SkyQPainter::drawSkyPolyline( LineList * list, SkipList *<br>
skipList, LineListLabel * label ) {<br>
     SkyList * points = list->points();<br>
     bool isVisible, isVisibleLast;<br>
<br>
@@ -297,33 +269,26 @@ void SkyQPainter::drawSkyPolyline(<wbr>LineList * list,<br>
SkipList * skipList, LineList<br>
     isVisibleLast &= m_proj->checkVisibility( points->first() );<br>
     QPointF oThis, oThis2;<br>
<br>
-    for ( int j = 1 ; j < points->size() ; j++ )<br>
-    {<br>
+    for ( int j = 1 ; j < points->size() ; j++ ) {<br>
         SkyPoint * pThis = points->at( j );<br>
         oThis2 = oThis = m_proj->toScreen( pThis, true, &isVisible );<br>
         // & with the result of checkVisibility to clip away things<br>
below horizon<br>
-        isVisible &= m_proj->checkVisibility(pThis)<wbr>;<br>
+        isVisible &= m_proj->checkVisibility( pThis );<br>
         bool doSkip = false;<br>
-        if( skipList )<br>
-        {<br>
-            doSkip = skipList->skip(j);<br>
+        if ( skipList ) {<br>
+            doSkip = skipList->skip( j );<br>
         }<br>
<br>
         bool pointsVisible = false;<br>
         //Temporary solution to avoid random lines in Gnomonic<br>
projection and draw lines up to horizon<br>
-        if(SkyMap::Instance()-><wbr>projector()->type() == Projector::Gnomonic)<br>
-        {<br>
+        if ( SkyMap::Instance()->projector(<wbr>)->type() ==<br>
Projector::Gnomonic ) {<br>
             if ( isVisible && isVisibleLast ) pointsVisible = true;<br>
-        }<br>
-        else<br>
-        {<br>
+        } else {<br>
             if ( isVisible || isVisibleLast ) pointsVisible = true;<br>
         }<br>
<br>
-        if ( !doSkip )<br>
-        {<br>
-            if(pointsVisible)<br>
-            {<br>
+        if ( !doSkip ) {<br>
+            if ( pointsVisible ) {<br>
                 drawLine( oLast, oThis );<br>
                 if ( label )<br>
                     label->updateLabelCandidates( oThis.x(), oThis.y(),<br>
list, j );<br>
@@ -335,23 +300,20 @@ void SkyQPainter::drawSkyPolyline(<wbr>LineList * list,<br>
SkipList * skipList, LineList<br>
     }<br>
 }<br>
<br>
-void SkyQPainter::drawSkyPolygon(<wbr>LineList * list, bool forceClip)<br>
-{<br>
+void SkyQPainter::drawSkyPolygon( LineList * list, bool forceClip ) {<br>
     bool isVisible = false, isVisibleLast;<br>
     SkyList * points = list->points();<br>
     QPolygonF polygon;<br>
<br>
-    if (forceClip == false)<br>
-    {<br>
-        for ( int i = 0; i < points->size(); ++i )<br>
-        {<br>
-            polygon << m_proj->toScreen( points->at( i ), false,<br>
&isVisibleLast);<br>
+    if ( forceClip == false ) {<br>
+        for ( int i = 0; i < points->size(); ++i ) {<br>
+            polygon << m_proj->toScreen( points->at( i ), false,<br>
&isVisibleLast );<br>
             isVisible |= isVisibleLast;<br>
         }<br>
<br>
         // If 1+ points are visible, draw it<br>
-        if ( polygon.size() && isVisible)<br>
-            drawPolygon(polygon);<br>
+        if ( polygon.size() && isVisible )<br>
+            drawPolygon( polygon );<br>
<br>
         return;<br>
     }<br>
@@ -360,27 +322,21 @@ void SkyQPainter::drawSkyPolygon(<wbr>LineList * list,<br>
bool forceClip)<br>
     SkyPoint * pLast = points->last();<br>
     QPointF   oLast = m_proj->toScreen( pLast, true, &isVisibleLast );<br>
     // & with the result of checkVisibility to clip away things below<br>
horizon<br>
-    isVisibleLast &= m_proj->checkVisibility(pLast)<wbr>;<br>
+    isVisibleLast &= m_proj->checkVisibility( pLast );<br>
<br>
-    for ( int i = 0; i < points->size(); ++i )<br>
-    {<br>
+    for ( int i = 0; i < points->size(); ++i ) {<br>
         SkyPoint * pThis = points->at( i );<br>
         QPointF oThis = m_proj->toScreen( pThis, true, &isVisible );<br>
         // & with the result of checkVisibility to clip away things<br>
below horizon<br>
-        isVisible &= m_proj->checkVisibility(pThis)<wbr>;<br>
+        isVisible &= m_proj->checkVisibility( pThis );<br>
<br>
<br>
-        if ( isVisible && isVisibleLast )<br>
-        {<br>
+        if ( isVisible && isVisibleLast ) {<br>
             polygon << oThis;<br>
-        }<br>
-        else if ( isVisibleLast )<br>
-        {<br>
+        } else if ( isVisibleLast ) {<br>
             QPointF oMid = m_proj->clipLine( pLast, pThis );<br>
             polygon << oMid;<br>
-        }<br>
-        else if ( isVisible )<br>
-        {<br>
+        } else if ( isVisible ) {<br>
             QPointF oMid = m_proj->clipLine( pThis, pLast );<br>
             polygon << oMid;<br>
             polygon << oThis;<br>
@@ -392,113 +348,148 @@ void SkyQPainter::drawSkyPolygon(<wbr>LineList *<br>
list, bool forceClip)<br>
     }<br>
<br>
     if ( polygon.size() )<br>
-        drawPolygon(polygon);<br>
+        drawPolygon( polygon );<br>
<br>
 }<br>
<br>
-bool SkyQPainter::drawPlanet(<wbr>KSPlanetBase * planet)<br>
-{<br>
-    if( !m_proj->checkVisibility(<wbr>planet) ) return false;<br>
+bool SkyQPainter::drawPlanet( KSPlanetBase * planet ) {<br>
+    if ( !m_proj->checkVisibility( planet ) ) return false;<br>
<br>
     bool visible = false;<br>
-    QPointF pos = m_proj->toScreen(planet,true,&<wbr>visible);<br>
-    if( !visible || !m_proj->onScreen(pos) ) return false;<br>
+    QPointF pos = m_proj->toScreen( planet, true, &visible );<br>
+    if ( !visible || !m_proj->onScreen( pos ) ) return false;<br>
<br>
     float fakeStarSize = ( 10.0 + log10( Options::zoomFactor() ) -<br>
log10( MINZOOM ) ) * ( 10 - planet->mag() ) / 10;<br>
-    if( fakeStarSize > 15.0 )<br>
+    if ( fakeStarSize > 15.0 )<br>
         fakeStarSize = 15.0;<br>
<br>
-    float size = planet->angSize() * dms::PI *<br>
Options::zoomFactor()/10800.0;<br>
-    if( size < fakeStarSize && planet->name() != "Sun" &&<br>
planet->name() != "Moon" )<br>
-    {<br>
+    float size = planet->angSize() * dms::PI * Options::zoomFactor() /<br>
10800.0;<br>
+    if ( size < fakeStarSize && planet->name() != "Sun" &&<br>
planet->name() != "Moon" ) {<br>
         // Draw them as bright stars of appropriate color instead of images<br>
         char spType;<br>
         //FIXME: do these need i18n?<br>
-        if( planet->name() == i18n("Mars") )<br>
-        {<br>
+        if ( planet->name() == i18n( "Mars" ) ) {<br>
             spType = 'K';<br>
-        }<br>
-        else if( planet->name() == i18n("Jupiter") || planet->name() ==<br>
i18n("Mercury") || planet->name() == i18n("Saturn") )<br>
-        {<br>
+        } else if ( planet->name() == i18n( "Jupiter" ) ||<br>
planet->name() == i18n( "Mercury" ) || planet->name() == i18n( "Saturn"<br>
) ) {<br>
             spType = 'F';<br>
-        }<br>
-        else<br>
-        {<br>
+        } else {<br>
             spType = 'B';<br>
         }<br>
-        drawPointSource(pos,<wbr>fakeStarSize,spType);<br>
-    }<br>
-    else<br>
-    {<br>
+        drawPointSource( pos, fakeStarSize, spType );<br>
+    } else {<br>
         float sizemin = 1.0;<br>
-        if( planet->name() == "Sun" || planet->name() == "Moon" )<br>
+        if ( planet->name() == "Sun" || planet->name() == "Moon" )<br>
             sizemin = 8.0;<br>
<br>
-        float size = planet->angSize() * dms::PI *<br>
Options::zoomFactor()/10800.0;<br>
-        if( size < sizemin )<br>
+        if ( size < sizemin )<br>
             size = sizemin;<br>
-        if( Options::showPlanetImages() && !planet->image().isNull() )<br>
-        {<br>
+<br>
+        if ( Options::showPlanetImages() && !planet->image().isNull() ) {<br>
             //Because Saturn has rings, we inflate its image size by a<br>
factor 2.5<br>
-            if( planet->name() == "Saturn" )<br>
-                size = int(2.5*size);<br>
+            if ( planet->name() == "Saturn" )<br>
+                size = int( 2.5 * size );<br>
             // Scale size exponentially so it is visible at large zooms<br>
-            else if (planet->name() == "Pluto")<br>
-                size = int(size*exp(1.5*size));<br>
+            else if ( planet->name() == "Pluto" )<br>
+                size = int( size * exp( 1.5 * size ) );<br>
<br>
             save();<br>
-            translate(pos);<br>
+            translate( pos );<br>
             rotate( m_proj->findPA( planet, pos.x(), pos.y() ) );<br>
-            drawImage( QRect(-0.5*size, -0.5*size, size, size),<br>
+            drawImage( QRect( -0.5 * size, -0.5 * size, size, size ),<br>
                        planet->image() );<br>
             restore();<br>
-        }<br>
-        else     //Otherwise, draw a simple circle.<br>
-        {<br>
+        } else { //Otherwise, draw a simple circle.<br>
             drawEllipse( pos, size, size );<br>
         }<br>
     }<br>
     return true;<br>
 }<br>
<br>
-bool SkyQPainter::drawPointSource(<wbr>SkyPoint * loc, float mag, char sp)<br>
-{<br>
-    //Check if it's even visible before doing anything<br>
-    if( !m_proj->checkVisibility(loc) ) return false;<br>
+bool SkyQPainter::drawComet( KSComet * com ) {<br>
+    if ( !m_proj->checkVisibility( com ) ) return false;<br>
+<br>
+    float size = com->angSize() * dms::PI * Options::zoomFactor() /<br>
10800.0;<br>
+    if ( size < 1 )<br>
+        size = 1;<br>
<br>
     bool visible = false;<br>
-    QPointF pos = m_proj->toScreen(loc,true,&<wbr>visible);<br>
-    if( visible && m_proj->onScreen(pos) )   // FIXME: onScreen here<br>
should use canvas size rather than SkyMap size, especially while<br>
printing in portrait mode!<br>
-    {<br>
-        drawPointSource(pos, starWidth(mag), sp);<br>
+    QPointF pos = m_proj->toScreen( com, true, &visible );<br>
+<br>
+    // Draw the coma.<br>
+    if ( visible && m_proj->onScreen( pos ) ) {<br>
+        // Draw the comet.<br>
+        drawEllipse( pos, size, size );<br>
+<br>
+        double comaLength = ( com->getComaAngSize().arcmin() * dms::PI<br>
* Options::zoomFactor() / 10800.0 );<br>
+<br>
+        // If coma is visible and long enough.<br>
+        if ( Options::showCometComas() && comaLength > size ) {<br>
+            KSSun * sun =<br>
KStarsData::Instance()-><wbr>skyComposite()-><wbr>solarSystemComposite()->sun();<br>
+<br>
+            // Find the anlge to the sun.<br>
+            double comaAngle = m_proj->findPA( sun, pos.x(), pos.y() );<br>
+<br>
+            const QVector<QPoint> coma = {<br>
+                QPoint( pos.x() - size, pos.y() ),<br>
+                QPoint( pos.x() + size, pos.y() ),<br>
+                QPoint( pos.x(), pos.y() + comaLength )<br>
+            };<br>
+<br>
+            QPolygon comaPoly( coma );<br>
+<br>
+            comaPoly = QTransform()<br>
+                       .translate( pos.x(), pos.y() )<br>
+                       .rotate( comaAngle ) // Already + 180 Deg,<br>
because rotated from south, not north.<br>
+                       .translate( -pos.x(), -pos.y() )<br>
+                       .map( comaPoly );<br>
+<br>
+            save();<br>
+<br>
+            // Nice fade for the Coma.<br>
+            QLinearGradient linearGrad( pos, comaPoly.point( 2 ) );<br>
+            linearGrad.setColorAt( 0,  QColor( "white" ) );<br>
+            linearGrad.setColorAt( size / comaLength,  QColor( "white" ) );<br>
+            linearGrad.setColorAt( 0.9, QColor( "transparent" ) );<br>
+            setBrush( linearGrad );<br>
+<br>
+            // Render Coma.<br>
+            drawConvexPolygon( comaPoly );<br>
+            restore();<br>
+        }<br>
+<br>
         return true;<br>
+    } else {<br>
+        return false;<br>
     }<br>
-    else<br>
-    {<br>
+}<br>
+<br>
+bool SkyQPainter::drawPointSource( SkyPoint * loc, float mag, char sp ) {<br>
+    //Check if it's even visible before doing anything<br>
+    if ( !m_proj->checkVisibility( loc ) ) return false;<br>
+<br>
+    bool visible = false;<br>
+    QPointF pos = m_proj->toScreen( loc, true, &visible );<br>
+    if ( visible && m_proj->onScreen( pos ) ) { // FIXME: onScreen here<br>
should use canvas size rather than SkyMap size, especially while<br>
printing in portrait mode!<br>
+        drawPointSource( pos, starWidth( mag ), sp );<br>
+        return true;<br>
+    } else {<br>
         return false;<br>
     }<br>
 }<br>
<br>
-void SkyQPainter::drawPointSource(<wbr>const QPointF &pos, float size, char sp)<br>
-{<br>
-    int isize = qMin(static_cast<int>(size), 14);<br>
-    if( !m_vectorStars || starColorMode == 0  )<br>
-    {<br>
+void SkyQPainter::drawPointSource( const QPointF &pos, float size, char<br>
sp ) {<br>
+    int isize = qMin( static_cast<int>( size ), 14 );<br>
+    if ( !m_vectorStars || starColorMode == 0  ) {<br>
         // Draw stars as bitmaps, either because we were asked to, or<br>
because we're painting real colors<br>
-        QPixmap * im = imageCache[ harvardToIndex(sp) ][isize];<br>
+        QPixmap * im = imageCache[ harvardToIndex( sp ) ][isize];<br>
         float offset = 0.5 * im->width();<br>
-        drawPixmap( QPointF(pos.x()-offset, pos.y()-offset), *im );<br>
-    }<br>
-    else<br>
-    {<br>
+        drawPixmap( QPointF( pos.x() - offset, pos.y() - offset ), *im );<br>
+    } else {<br>
         // Draw stars as vectors, for better printing / SVG export etc.<br>
-        if ( starColorMode != 4 )<br>
-        {<br>
+        if ( starColorMode != 4 ) {<br>
             setPen( m_starColor );<br>
             setBrush( m_starColor );<br>
-        }<br>
-        else<br>
-        {<br>
+        } else {<br>
             // Note: This is not efficient, but we use vector stars<br>
only when plotting SVG, not when drawing the skymap, so speed is not<br>
very important.<br>
             QColor c = ColorMap.value( sp, Qt::white );<br>
             setPen( c );<br>
@@ -506,62 +497,59 @@ void SkyQPainter::drawPointSource(<wbr>const QPointF<br>
&pos, float size, char sp)<br>
         }<br>
<br>
         // Be consistent with old raster representation<br>
-        if( size > 14 )<br>
+        if ( size > 14 )<br>
             size = 14;<br>
-        if( size >= 2 )<br>
-            drawEllipse( pos.x() - 0.5 * size, pos.y() - 0.5 * size,<br>
int(size), int(size) );<br>
-        else if( size >= 1 )<br>
+        if ( size >= 2 )<br>
+            drawEllipse( pos.x() - 0.5 * size, pos.y() - 0.5 * size,<br>
int( size ), int( size ) );<br>
+        else if ( size >= 1 )<br>
             drawPoint( pos.x(), pos.y() );<br>
     }<br>
 }<br>
<br>
-bool SkyQPainter::<wbr>drawConstellationArtImage(<wbr>ConstellationsArt * obj)<br>
-{<br>
+bool SkyQPainter::<wbr>drawConstellationArtImage( ConstellationsArt * obj ) {<br>
     double zoom = Options::zoomFactor();<br>
<br>
     bool visible = false;<br>
-    obj->EquatorialToHorizontal(<wbr>KStarsData::Instance()->lst(),<br>
KStarsData::Instance()->geo()-<wbr>>lat());<br>
-    QPointF constellationmidpoint = m_proj->toScreen(obj, true, &visible);<br>
+    obj->EquatorialToHorizontal( KStarsData::Instance()->lst(),<br>
KStarsData::Instance()->geo()-<wbr>>lat() );<br>
+    QPointF constellationmidpoint = m_proj->toScreen( obj, true,<br>
&visible );<br>
<br>
-    if ( !visible || !m_proj->onScreen(<wbr>constellationmidpoint))<br>
+    if ( !visible || !m_proj->onScreen( constellationmidpoint ) )<br>
         return false;<br>
<br>
     //qDebug() << "o->pa() " << obj->pa();<br>
-    float positionangle = m_proj->findPA(obj,<br>
constellationmidpoint.x(), constellationmidpoint.y());<br>
+    float positionangle = m_proj->findPA( obj,<br>
constellationmidpoint.x(), constellationmidpoint.y() );<br>
     //qDebug() << " final PA " << positionangle;<br>
<br>
<br>
-    float w = obj->getWidth()*60*dms::PI*<wbr>zoom/10800;<br>
-    float h = obj->getHeight()*60*dms::PI*<wbr>zoom/10800;<br>
+    float w = obj->getWidth() * 60 * dms::PI * zoom / 10800;<br>
+    float h = obj->getHeight() * 60 * dms::PI * zoom / 10800;<br>
<br>
     save();<br>
<br>
-    setRenderHint(QPainter::<wbr>SmoothPixmapTransform);<br>
+    setRenderHint( QPainter::<wbr>SmoothPixmapTransform );<br>
<br>
-    translate(<wbr>constellationmidpoint);<br>
-    rotate(positionangle);<br>
-    setOpacity(0.7);<br>
-    drawImage( QRect(-0.5*w, -0.5*h, w, h), obj->image() );<br>
-    setOpacity(1);<br>
+    translate( constellationmidpoint );<br>
+    rotate( positionangle );<br>
+    setOpacity( 0.7 );<br>
+    drawImage( QRect( -0.5 * w, -0.5 * h, w, h ), obj->image() );<br>
+    setOpacity( 1 );<br>
<br>
-    setRenderHint(QPainter::<wbr>SmoothPixmapTransform, false);<br>
+    setRenderHint( QPainter::<wbr>SmoothPixmapTransform, false );<br>
     restore();<br>
     return true;<br>
 }<br>
<br>
-bool SkyQPainter::<wbr>drawDeepSkyObject(<wbr>DeepSkyObject * obj, bool drawImage)<br>
-{<br>
-    if( !m_proj->checkVisibility(obj) ) return false;<br>
+bool SkyQPainter::<wbr>drawDeepSkyObject( DeepSkyObject * obj, bool<br>
drawImage ) {<br>
+    if ( !m_proj->checkVisibility( obj ) ) return false;<br>
<br>
     bool visible = false;<br>
-    QPointF pos = m_proj->toScreen(obj, true, &visible);<br>
-    if( !visible || !m_proj->onScreen(pos) ) return false;<br>
+    QPointF pos = m_proj->toScreen( obj, true, &visible );<br>
+    if ( !visible || !m_proj->onScreen( pos ) ) return false;<br>
<br>
     // if size is 0.0 set it to 1.0, this are normally stars (type 0 and 1)<br>
     // if we use size 0.0 the star wouldn't be drawn<br>
     float majorAxis = obj->a();<br>
-    if ( majorAxis == 0.0 )<br>
-    {<br>
+    if ( majorAxis == 0.0 ) {<br>
         majorAxis = 1.0;<br>
     }<br>
<br>
@@ -572,50 +560,48 @@ bool SkyQPainter::<wbr>drawDeepSkyObject(<wbr>DeepSkyObject<br>
* obj, bool drawImage)<br>
<br>
     //Draw Image<br>
     if ( drawImage && Options::zoomFactor() > 5.*MINZOOM )<br>
-        drawDeepSkyImage(pos, obj, positionAngle);<br>
+        drawDeepSkyImage( pos, obj, positionAngle );<br>
<br>
     //Draw Symbol<br>
-    drawDeepSkySymbol(pos, obj->type(), size, obj->e(), positionAngle);<br>
+    drawDeepSkySymbol( pos, obj->type(), size, obj->e(), positionAngle );<br>
<br>
     return true;<br>
 }<br>
<br>
-bool SkyQPainter::drawDeepSkyImage(<wbr>const QPointF &pos, DeepSkyObject *<br>
obj, float positionAngle)<br>
-{<br>
+bool SkyQPainter::drawDeepSkyImage( const QPointF &pos, DeepSkyObject *<br>
obj, float positionAngle ) {<br>
     double zoom = Options::zoomFactor();<br>
-    double w = obj->a() * dms::PI * zoom/10800.0;<br>
+    double w = obj->a() * dms::PI * zoom / 10800.0;<br>
     double h = obj->e() * w;<br>
<br>
     save();<br>
-    translate(pos);<br>
+    translate( pos );<br>
     rotate( positionAngle );<br>
-    drawImage( QRect(-0.5*w, -0.5*h, w, h), obj->image() );<br>
+    drawImage( QRect( -0.5 * w, -0.5 * h, w, h ), obj->image() );<br>
     restore();<br>
<br>
     return true;<br>
 }<br>
<br>
-void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF &pos, int type, float<br>
size, float e, float positionAngle)<br>
-{<br>
+void SkyQPainter::<wbr>drawDeepSkySymbol( const QPointF &pos, int type,<br>
float size, float e, float positionAngle ) {<br>
     float x = pos.x();<br>
     float y = pos.y();<br>
     float zoom = Options::zoomFactor();<br>
<br>
-    int isize = int(size);<br>
+    int isize = int( size );<br>
<br>
-    float dx1 = -0.5*size;<br>
-    float dx2 =  0.5*size;<br>
-    float dy1 = -1.0*e*size/2.;<br>
-    float dy2 = e*size/2.;<br>
+    float dx1 = -0.5 * size;<br>
+    float dx2 =  0.5 * size;<br>
+    float dy1 = -1.0 * e * size / 2.;<br>
+    float dy2 = e * size / 2.;<br>
     float x1 = x + dx1;<br>
     float x2 = x + dx2;<br>
     float y1 = y + dy1;<br>
     float y2 = y + dy2;<br>
<br>
-    float dxa = -size/4.;<br>
-    float dxb =  size/4.;<br>
-    float dya = -1.0*e*size/4.;<br>
-    float dyb = e*size/4.;<br>
+    float dxa = -size / 4.;<br>
+    float dxb =  size / 4.;<br>
+    float dya = -1.0 * e * size / 4.;<br>
+    float dyb = e * size / 4.;<br>
     float xa = x + dxa;<br>
     float xb = x + dxb;<br>
     float ya = y + dya;<br>
@@ -631,61 +617,49 @@ void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF<br>
&pos, int type, float size, fl<br>
     std::function<void( float, float, float, float )> lambdaDrawLine;<br>
     std::function<void( float, float, float, float )> lambdaDrawCross;<br>
<br>
-    if ( Options::useAntialias() )<br>
-    {<br>
-        lambdaDrawEllipse = [this]( float x, float y, float width,<br>
float height )<br>
-        {<br>
+    if ( Options::useAntialias() ) {<br>
+        lambdaDrawEllipse = [this]( float x, float y, float width,<br>
float height ) {<br>
             drawEllipse( QRectF( x, y, width, height ) );<br>
         };<br>
-        lambdaDrawLine = [this]( float x1, float y1, float x2, float y2 )<br>
-        {<br>
+        lambdaDrawLine = [this]( float x1, float y1, float x2, float y2 ) {<br>
             drawLine( QLineF( x1, y1, x2, y2 ) );<br>
         };<br>
-        lambdaDrawCross = [this]( float centerX, float centerY, float<br>
sizeX, float sizeY )<br>
-        {<br>
-            drawLine( QLineF( centerX - sizeX/2., centerY, centerX +<br>
sizeX/2., centerY ) );<br>
-            drawLine( QLineF( centerX, centerY - sizeY/2., centerX,<br>
centerY + sizeY/2. ) );<br>
+        lambdaDrawCross = [this]( float centerX, float centerY, float<br>
sizeX, float sizeY ) {<br>
+            drawLine( QLineF( centerX - sizeX / 2., centerY, centerX +<br>
sizeX / 2., centerY ) );<br>
+            drawLine( QLineF( centerX, centerY - sizeY / 2., centerX,<br>
centerY + sizeY / 2. ) );<br>
         };<br>
-    }<br>
-    else<br>
-    {<br>
-        lambdaDrawEllipse = [this]( float x, float y, float width,<br>
float height )<br>
-        {<br>
+    } else {<br>
+        lambdaDrawEllipse = [this]( float x, float y, float width,<br>
float height ) {<br>
             drawEllipse( QRect( x, y, width, height ) );<br>
         };<br>
-        lambdaDrawLine = [this]( float x1, float y1, float x2, float y2 )<br>
-        {<br>
+        lambdaDrawLine = [this]( float x1, float y1, float x2, float y2 ) {<br>
             drawLine( QLine( x1, y1, x2, y2 ) );<br>
         };<br>
-        lambdaDrawCross = [this]( float centerX, float centerY, float<br>
sizeX, float sizeY )<br>
-        {<br>
-            drawLine( QLine( centerX - sizeX/2., centerY, centerX +<br>
sizeX/2., centerY ) );<br>
-            drawLine( QLine( centerX, centerY - sizeY/2., centerX,<br>
centerY + sizeY/2. ) );<br>
+        lambdaDrawCross = [this]( float centerX, float centerY, float<br>
sizeX, float sizeY ) {<br>
+            drawLine( QLine( centerX - sizeX / 2., centerY, centerX +<br>
sizeX / 2., centerY ) );<br>
+            drawLine( QLine( centerX, centerY - sizeY / 2., centerX,<br>
centerY + sizeY / 2. ) );<br>
         };<br>
     }<br>
<br>
-    switch ( type )<br>
-    {<br>
+    switch ( type ) {<br>
         case 0:<br>
         case 1: //catalog star<br>
             //Some NGC/IC objects are stars...changed their type to 1<br>
(was double star)<br>
-            if (size<2.) size = 2.;<br>
-            lambdaDrawEllipse( x - size/2., y - size/2., size, size );<br>
+            if ( size < 2. ) size = 2.;<br>
+            lambdaDrawEllipse( x - size / 2., y - size / 2., size, size );<br>
             break;<br>
         case 2: //Planet<br>
             break;<br>
         case 3: //Open cluster; draw circle of points<br>
-        case 13:   // Asterism<br>
-        {<br>
+        case 13: { // Asterism<br>
             tempBrush = brush();<br>
             color = pen().color().name();<br>
             setBrush( pen().color() );<br>
             psize = 2.;<br>
             if ( size > 50. )  psize *= 2.;<br>
             if ( size > 100. ) psize *= 2.;<br>
-            auto putDot = [this, psize, &lambdaDrawEllipse]( float x,<br>
float y )<br>
-            {<br>
-                lambdaDrawEllipse( x - psize/2., y - psize/2., psize,<br>
psize );<br>
+            auto putDot = [this, psize, &lambdaDrawEllipse]( float x,<br>
float y ) {<br>
+                lambdaDrawEllipse( x - psize / 2., y - psize / 2.,<br>
psize, psize );<br>
             };<br>
             putDot( xa, y1 );<br>
             putDot( xb, y1 );<br>
@@ -699,19 +673,19 @@ void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF<br>
&pos, int type, float size, fl<br>
             break;<br>
         }<br>
         case 4: //Globular Cluster<br>
-            if (size<2.) size = 2.;<br>
+            if ( size < 2. ) size = 2.;<br>
             save();<br>
             translate( x, y );<br>
             color = pen().color().name();<br>
             rotate( positionAngle );  //rotate the coordinate system<br>
-            lambdaDrawEllipse( dx1, dy1, size, e*size );<br>
-            lambdaDrawCross( 0, 0, size, e*size );<br>
+            lambdaDrawEllipse( dx1, dy1, size, e * size );<br>
+            lambdaDrawCross( 0, 0, size, e * size );<br>
             restore(); //reset coordinate system<br>
             break;<br>
<br>
         case 5: //Gaseous Nebula<br>
         case 15: // Dark Nebula<br>
-            if (size <2.) size = 2.;<br>
+            if ( size < 2. ) size = 2.;<br>
             save();<br>
             translate( x, y );<br>
             rotate( positionAngle );  //rotate the coordinate system<br>
@@ -723,20 +697,20 @@ void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF<br>
&pos, int type, float size, fl<br>
             restore(); //reset coordinate system<br>
             break;<br>
         case 6: //Planetary Nebula<br>
-            if (size<2.) size = 2.;<br>
+            if ( size < 2. ) size = 2.;<br>
             save();<br>
             translate( x, y );<br>
             rotate( positionAngle );  //rotate the coordinate system<br>
             color = pen().color().name();<br>
-            lambdaDrawEllipse( dx1, dy1, size, e*size );<br>
-            lambdaDrawLine( 0., dy1, 0., dy1 - e*size/2. );<br>
-            lambdaDrawLine( 0., dy2, 0., dy2 + e*size/2. );<br>
-            lambdaDrawLine( dx1, 0., dx1 - size/2., 0. );<br>
-            lambdaDrawLine( dx2, 0., dx2 + size/2., 0. );<br>
+            lambdaDrawEllipse( dx1, dy1, size, e * size );<br>
+            lambdaDrawLine( 0., dy1, 0., dy1 - e * size / 2. );<br>
+            lambdaDrawLine( 0., dy2, 0., dy2 + e * size / 2. );<br>
+            lambdaDrawLine( dx1, 0., dx1 - size / 2., 0. );<br>
+            lambdaDrawLine( dx2, 0., dx2 + size / 2., 0. );<br>
             restore(); //reset coordinate system<br>
             break;<br>
         case 7: //Supernova remnant // FIXME: Why is SNR drawn<br>
different from a gaseous nebula?<br>
-            if (size<2) size = 2;<br>
+            if ( size < 2 ) size = 2;<br>
             save();<br>
             translate( x, y );<br>
             rotate( positionAngle );  //rotate the coordinate system<br>
@@ -750,24 +724,20 @@ void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF<br>
&pos, int type, float size, fl<br>
         case 8: //Galaxy<br>
         case 16: // Quasar<br>
             color = pen().color().name();<br>
-            if ( size <1. && zoom > 20*MINZOOM ) size = 3.; //force<br>
ellipse above zoomFactor 20<br>
-            if ( size <1. && zoom > 5*MINZOOM ) size = 1.; //force<br>
points above zoomFactor 5<br>
-            if ( size>2. )<br>
-            {<br>
+            if ( size < 1. && zoom > 20 * MINZOOM ) size = 3.; //force<br>
ellipse above zoomFactor 20<br>
+            if ( size < 1. && zoom > 5 * MINZOOM ) size = 1.; //force<br>
points above zoomFactor 5<br>
+            if ( size > 2. ) {<br>
                 save();<br>
                 translate( x, y );<br>
                 rotate( positionAngle );  //rotate the coordinate system<br>
-                lambdaDrawEllipse( dx1, dy1, size, e*size );<br>
+                lambdaDrawEllipse( dx1, dy1, size, e * size );<br>
                 restore(); //reset coordinate system<br>
<br>
-            }<br>
-            else if ( size>0. )<br>
-            {<br>
-                drawPoint( QPointF(x, y) );<br>
+            } else if ( size > 0. ) {<br>
+                drawPoint( QPointF( x, y ) );<br>
             }<br>
             break;<br>
-        case 14:   // Galaxy cluster - draw a dashed circle<br>
-        {<br>
+        case 14: { // Galaxy cluster - draw a dashed circle<br>
             tempBrush = brush();<br>
             setBrush( QBrush() );<br>
             psize = 1.;<br>
@@ -779,17 +749,16 @@ void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF<br>
&pos, int type, float size, fl<br>
             QPen newPen = pen();<br>
             newPen.setStyle( Qt::DashLine );<br>
             setPen( newPen );<br>
-            lambdaDrawEllipse( dx1, dy1, size, e*size );<br>
+            lambdaDrawEllipse( dx1, dy1, size, e * size );<br>
             restore();<br>
             setBrush( tempBrush );<br>
             break;<br>
         }<br>
         default: // Unknown object or something we don't know how to<br>
draw. Just draw an ellipse with a ?-mark<br>
             color = pen().color().name();<br>
-            if ( size <1. && zoom > 20*MINZOOM ) size = 3.; //force<br>
ellipse above zoomFactor 20<br>
-            if ( size <1. && zoom > 5*MINZOOM ) size = 1.; //force<br>
points above zoomFactor 5<br>
-            if ( size>2. )<br>
-            {<br>
+            if ( size < 1. && zoom > 20 * MINZOOM ) size = 3.; //force<br>
ellipse above zoomFactor 20<br>
+            if ( size < 1. && zoom > 5 * MINZOOM ) size = 1.; //force<br>
points above zoomFactor 5<br>
+            if ( size > 2. ) {<br>
                 save();<br>
                 QFont f = font();<br>
                 const QString qMark = " ? ";<br>
@@ -798,21 +767,18 @@ void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF<br>
&pos, int type, float size, fl<br>
                 setFont( f );<br>
                 translate( x, y );<br>
                 rotate( positionAngle );  //rotate the coordinate system<br>
-                lambdaDrawEllipse( dx1, dy1, size, e*size );<br>
+                lambdaDrawEllipse( dx1, dy1, size, e * size );<br>
                 if ( Options::useAntialias() )<br>
-                    drawText( QRectF(dx1, dy1, size, e*size),<br>
Qt::AlignCenter, qMark );<br>
-                else<br>
-                {<br>
-                    int idx1 = int(dx1);<br>
-                    int idy1 = int(dy1);<br>
-                    drawText( QRect(idx1, idy1, isize, int(e*size)),<br>
Qt::AlignCenter, qMark );<br>
+                    drawText( QRectF( dx1, dy1, size, e * size ),<br>
Qt::AlignCenter, qMark );<br>
+                else {<br>
+                    int idx1 = int( dx1 );<br>
+                    int idy1 = int( dy1 );<br>
+                    drawText( QRect( idx1, idy1, isize, int( e * size )<br>
), Qt::AlignCenter, qMark );<br>
                 }<br>
                 restore(); //reset coordinate system (and font?)<br>
-            }<br>
-            else if ( size>0. )<br>
-            {<br>
+            } else if ( size > 0. ) {<br>
                 if ( Options::useAntialias() )<br>
-                    drawPoint( QPointF(x, y) );<br>
+                    drawPoint( QPointF( x, y ) );<br>
                 else<br>
                     drawPoint( QPoint( x, y ) );<br>
             }<br>
@@ -820,24 +786,21 @@ void SkyQPainter::<wbr>drawDeepSkySymbol(const QPointF<br>
&pos, int type, float size, fl<br>
<br>
 }<br>
<br>
-void SkyQPainter::<wbr>drawObservingList(const QList< SkyObject * > &obs)<br>
-{<br>
-    foreach ( SkyObject * obj, obs )<br>
-    {<br>
+void SkyQPainter::<wbr>drawObservingList( const QList< SkyObject * > &obs ) {<br>
+    foreach ( SkyObject * obj, obs ) {<br>
         bool visible = false;<br>
         QPointF o = m_proj->toScreen( obj, true, &visible );<br>
-        if( !visible || !m_proj->onScreen(o) ) continue;<br>
+        if ( !visible || !m_proj->onScreen( o ) ) continue;<br>
<br>
         float size = 20.;<br>
-        float x1 = o.x() - 0.5*size;<br>
-        float y1 = o.y() - 0.5*size;<br>
-        drawArc( QRectF(x1, y1, size, size), -60*16, 120*16 );<br>
-        drawArc( QRectF(x1, y1, size, size), 120*16, 120*16 );<br>
+        float x1 = o.x() - 0.5 * size;<br>
+        float y1 = o.y() - 0.5 * size;<br>
+        drawArc( QRectF( x1, y1, size, size ), -60 * 16, 120 * 16 );<br>
+        drawArc( QRectF( x1, y1, size, size ), 120 * 16, 120 * 16 );<br>
     }<br>
 }<br>
<br>
-void SkyQPainter::drawFlags()<br>
-{<br>
+void SkyQPainter::drawFlags() {<br>
     KStarsData * data = KStarsData::Instance();<br>
     SkyPoint * point;<br>
     QImage image;<br>
@@ -845,8 +808,7 @@ void SkyQPainter::drawFlags()<br>
     QPointF pos;<br>
     int i;<br>
<br>
-    for ( i=0; i<data->skyComposite()->flags(<wbr>)->size(); i++ )<br>
-    {<br>
+    for ( i = 0; i < data->skyComposite()->flags()-<wbr>>size(); i++ ) {<br>
         point = data->skyComposite()->flags()-<wbr>>pointList().at( i );<br>
         image = data->skyComposite()->flags()-<wbr>>image( i );<br>
<br>
@@ -857,39 +819,35 @@ void SkyQPainter::drawFlags()<br>
         pos = m_proj->toScreen( point, true, &visible );<br>
<br>
         // Return if flag is not visible<br>
-        if( !visible || !m_proj->onScreen( pos ) ) continue;<br>
+        if ( !visible || !m_proj->onScreen( pos ) ) continue;<br>
<br>
         // Draw flag image<br>
-        drawImage( pos.x()-0.5*image.width(),<br>
pos.y()-0.5*image.height(), image );<br>
+        drawImage( pos.x() - 0.5 * image.width(), pos.y() - 0.5 *<br>
image.height(), image );<br>
<br>
         // Draw flag label<br>
         setPen( data->skyComposite()->flags()-<wbr>>labelColor( i ) );<br>
         setFont( QFont( "Helvetica", 10, QFont::Bold ) );<br>
-        drawText( pos.x()+10, pos.y()-10,<br>
data->skyComposite()->flags()-<wbr>>label( i ) );<br>
+        drawText( pos.x() + 10, pos.y() - 10,<br>
data->skyComposite()->flags()-<wbr>>label( i ) );<br>
     }<br>
 }<br>
<br>
-void SkyQPainter::drawHorizon(bool filled, SkyPoint * labelPoint, bool<br>
* drawLabel)<br>
-{<br>
-    QVector<Vector2f> ground = m_proj->groundPoly(labelPoint, drawLabel);<br>
-    if( ground.size() )<br>
-    {<br>
-        QPolygonF groundPoly(ground.size());<br>
-        for(int i = 0; i < ground.size(); ++i)<br>
-            groundPoly[i] = KSUtils::vecToPoint(ground[i])<wbr>;<br>
-        if( filled )<br>
-            drawPolygon(groundPoly);<br>
-        else<br>
-        {<br>
+void SkyQPainter::drawHorizon( bool filled, SkyPoint * labelPoint, bool<br>
* drawLabel ) {<br>
+    QVector<Vector2f> ground = m_proj->groundPoly( labelPoint, drawLabel );<br>
+    if ( ground.size() ) {<br>
+        QPolygonF groundPoly( ground.size() );<br>
+        for ( int i = 0; i < ground.size(); ++i )<br>
+            groundPoly[i] = KSUtils::vecToPoint( ground[i] );<br>
+        if ( filled )<br>
+            drawPolygon( groundPoly );<br>
+        else {<br>
             groundPoly.append( groundPoly.first() );<br>
-            drawPolyline(groundPoly);<br>
+            drawPolyline( groundPoly );<br>
         }<br>
     }<br>
 }<br>
<br>
-bool SkyQPainter::drawSatellite( Satellite * sat )<br>
-{<br>
-    if( !m_proj->checkVisibility(sat) )<br>
+bool SkyQPainter::drawSatellite( Satellite * sat ) {<br>
+    if ( !m_proj->checkVisibility( sat ) )<br>
         return false;<br>
<br>
     QPointF pos;<br>
@@ -899,19 +857,16 @@ bool SkyQPainter::drawSatellite( Satellite * sat )<br>
<br>
     pos = m_proj->toScreen( sat, true, &visible );<br>
<br>
-    if( !visible || !m_proj->onScreen( pos ) )<br>
+    if ( !visible || !m_proj->onScreen( pos ) )<br>
         return false;<br>
<br>
-    if ( Options::<wbr>drawSatellitesLikeStars() )<br>
-    {<br>
-        drawPointSource(pos, 3.5, 'B');<br>
-    }<br>
-    else<br>
-    {<br>
+    if ( Options::<wbr>drawSatellitesLikeStars() ) {<br>
+        drawPointSource( pos, 3.5, 'B' );<br>
+    } else {<br>
         if ( sat->isVisible() )<br>
-            drawPixmap(QPoint( pos.x() - 15, pos.y() - 11 ),<br>
*visibleSatPixmap);<br>
+            drawPixmap( QPoint( pos.x() - 15, pos.y() - 11 ),<br>
*visibleSatPixmap );<br>
         else<br>
-            drawPixmap(QPoint( pos.x() - 15, pos.y() - 11 ),<br>
*invisibleSatPixmap);<br>
+            drawPixmap( QPoint( pos.x() - 15, pos.y() - 11 ),<br>
*invisibleSatPixmap );<br>
<br>
         //drawPixmap(pos, *genericSatPixmap);<br>
         /*drawLine( QPoint( pos.x() - 0.5, pos.y() - 0.5 ), QPoint(<br>
pos.x() + 0.5, pos.y() - 0.5 ) );<br>
@@ -926,21 +881,19 @@ bool SkyQPainter::drawSatellite( Satellite * sat )<br>
     //data->skyComposite()-><wbr>satellites()->drawLabel( sat, pos );<br>
 }<br>
<br>
-bool SkyQPainter::drawSupernova(<wbr>Supernova * sup)<br>
-{<br>
+bool SkyQPainter::drawSupernova( Supernova * sup ) {<br>
     KStarsData * data = KStarsData::Instance();<br>
-    if( !m_proj->checkVisibility(sup) )<br>
-    {<br>
+    if ( !m_proj->checkVisibility( sup ) ) {<br>
         return false;<br>
     }<br>
<br>
     bool visible = false;<br>
-    QPointF pos = m_proj->toScreen(sup,true,&<wbr>visible);<br>
+    QPointF pos = m_proj->toScreen( sup, true, &visible );<br>
     //qDebug()<<"sup->ra() = "<<(sup->ra()).toHMSString()<<<wbr>"sup->dec()<br>
= "<<sup->dec().toDMSString();<br>
     //qDebug()<<"pos = "<<pos<<"m_proj->onScreen(pos) =<br>
"<<m_proj->onScreen(pos);<br>
-    if( !visible || !m_proj->onScreen(pos) ) return false;<br>
+    if ( !visible || !m_proj->onScreen( pos ) ) return false;<br>
<br>
-    setPen( data->colorScheme()-><wbr>colorNamed("SupernovaColor") );<br>
+    setPen( data->colorScheme()-><wbr>colorNamed( "SupernovaColor" ) );<br>
     //qDebug()<<"Here"<<endl;<br>
     drawLine ( QPoint( pos.x () - 2.0, pos.y() ), QPoint( pos.x() +<br>
2.0, pos.y() ) );<br>
     drawLine ( QPoint( pos.x (), pos.y() - 2.0 ), QPoint( pos.x(),<br>
pos.y() + 2.0 ) );<br>
diff --git a/kstars/skyqpainter.h b/kstars/skyqpainter.h<br>
index 0407a04bc..a9ee35024 100644<br>
--- a/kstars/skyqpainter.h<br>
+++ b/kstars/skyqpainter.h<br>
@@ -26,6 +26,7 @@ class Projector;<br>
 class QWidget;<br>
 class QSize;<br>
 class QMessageBox;<br>
+<br>
 /** @short The QPainter-based painting backend.<br>
     This class implements the SkyPainter interface using a QPainter.<br>
     For documentation, @see SkyPainter. */<br>
@@ -92,6 +93,7 @@ class SkyQPainter : public SkyPainter, public QPainter<br>
         virtual void drawDeepSkySymbol(const QPointF &pos, int type,<br>
float size, float e,<br>
                                        float positionAngle);<br>
         virtual bool drawSupernova(Supernova * sup);<br>
+        virtual bool drawComet(KSComet * com);<br>
         ///This function exists so that we can draw other objects<br>
(e.g., planets) as point sources.<br>
         virtual void drawPointSource(const QPointF &pos, float size,<br>
char sp = 'A');<br>
         virtual bool drawConstellationArtImage(<wbr>ConstellationsArt * obj);<br>
<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best Regards,<br>Jasem Mutlaq<br></div><div><br></div></div></div>
</div>