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

0001 /*
0002     SPDX-FileCopyrightText: 2005 Jason Harris <kstars@30doradus.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "linelistindex.h"
0010 
0011 /**
0012  * @class MlkyWay
0013  *
0014  * Draw filled areas as Milky Way and Magellanic clouds.
0015  *
0016  * This class should store SkipLists instead of LineLists.  The two methods
0017  * are used inside of LineListIndex to access the SkipLists' skip hashes.
0018  * This way the same code in LineListIndex does double duty. Only subclassed
0019  * by MilkyWay.
0020  *
0021  * @author James B. Bowlin
0022  * @version 0.1
0023  */
0024 class MilkyWay : public LineListIndex
0025 {
0026     friend class MilkyWayItem;
0027 
0028   public:
0029     /**
0030      * @short Constructor
0031      * @p parent pointer to the parent SkyComposite
0032      */
0033     explicit MilkyWay(SkyComposite *parent);
0034 
0035     /** Load skiplists from file */
0036     void loadContours(QString fname, QString greeting);
0037 
0038     void draw(SkyPainter *skyp) override;
0039     bool selected() override;
0040 
0041   protected:
0042     /**
0043      * @short Returns an IndexHash from the SkyMesh that contains the set
0044      * of trixels that cover the _SkipList_ lineList excluding skipped
0045      * lines as specified in the SkipList.  SkipList is a subclass of
0046      * LineList.
0047      * FIXME: Implementation is broken!!
0048      */
0049     const IndexHash &getIndexHash(LineList *skipList) override;
0050 
0051     /**
0052      * @short Returns a boolean indicating whether to skip the i-th line
0053      * segment in the _SkipList_ skipList.  Note that SkipList is a
0054      * subclass of LineList.  This routine allows us to use the drawing
0055      * code in LineListIndex instead of repeating it all here.
0056      * FIXME: Implementation is broken!!
0057      */
0058     SkipHashList *skipList(LineList *lineList) override;
0059 };