File indexing completed on 2024-11-03 12:28:09
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 "ksnumbers.h" 0010 #include "linelistindex.h" 0011 0012 class CultureList; 0013 0014 /** 0015 * @class ConstellationLines 0016 * Collection of lines making the 88 constellations 0017 * 0018 * @author Jason Harris 0019 * @version 0.1 0020 */ 0021 0022 class ConstellationLines : public LineListIndex 0023 { 0024 public: 0025 /** 0026 * @short Constructor 0027 * @p parent Pointer to the parent SkyComposite object 0028 * 0029 * Constellation lines data is read from clines.dat. 0030 * Each line in the file contains a command character ("M" means move to 0031 * this position without drawing a line, "D" means draw a line from 0032 * the previous position to this one), followed by the genetive name of 0033 * a star, which marks the position of the constellation node. 0034 */ 0035 ConstellationLines(SkyComposite *parent, CultureList *cultures); 0036 0037 void reindex(KSNumbers *num); 0038 0039 bool selected() override; 0040 0041 protected: 0042 const IndexHash &getIndexHash(LineList *lineList) override; 0043 0044 /** 0045 * @short we need to override the update routine because stars are 0046 * updated differently from mere SkyPoints. 0047 */ 0048 void JITupdate(LineList *lineList) override; 0049 0050 /** @short Set the QColor and QPen for drawing. */ 0051 void preDraw(SkyPainter *skyp) override; 0052 0053 private: 0054 KSNumbers m_reindexNum; 0055 double m_reindexInterval { 0 }; 0056 };