File indexing completed on 2024-04-14 14:11:21

0001 /*
0002     SPDX-FileCopyrightText: 2005 Thomas Kabelmann <thomas.kabelmann@gmx.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "pointlistcomponent.h"
0010 
0011 class SkyComposite;
0012 class SkyMap;
0013 class KSNumbers;
0014 
0015 /**
0016  * @class HorizonComponent
0017  *
0018  * Represents the horizon on the sky map.
0019  *
0020  * @author Thomas Kabelmann
0021  * @version 0.1
0022  */
0023 class HorizonComponent : public PointListComponent
0024 {
0025   public:
0026     /**
0027      * @short Constructor
0028      *
0029      * @p parent Pointer to the parent SkyComposite object
0030      */
0031     explicit HorizonComponent(SkyComposite *parent);
0032 
0033     virtual ~HorizonComponent() override = default;
0034 
0035     /**
0036      * @short Draw the Horizon on the Sky map
0037      *
0038      * @p map Pointer to the SkyMap object
0039      * @p psky Reference to the QPainter on which to paint
0040      */
0041     void draw(SkyPainter *skyp) override;
0042 
0043     void update(KSNumbers *) override;
0044 
0045     bool selected() override;
0046 
0047   private:
0048     void drawCompassLabels();
0049 };