~ubuntu-branches/ubuntu/oneiric/kstars/oneiric-proposed

« back to all changes in this revision

Viewing changes to kstars/skycomponents/constellationlines.h

  • Committer: Bazaar Package Importer
  • Author(s): Rohan Garg
  • Date: 2011-07-23 23:07:27 UTC
  • Revision ID: james.westby@ubuntu.com-20110723230727-xp70ea7v5eay0wya
Tags: upstream-4.7.0
ImportĀ upstreamĀ versionĀ 4.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
               constellationlines.h  -  K Desktop Planetarium
 
3
                             -------------------
 
4
    begin                : 25 Oct. 2005
 
5
    copyright            : (C) 2005 by Jason Harris
 
6
    email                : kstars@30doradus.org
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
 
 
18
#ifndef CONSTELLATIONLINES_H
 
19
#define CONSTELLATIONLINES_H
 
20
 
 
21
#include <QHash>
 
22
 
 
23
#include "linelistindex.h"
 
24
#include "ksnumbers.h"
 
25
 
 
26
class CultureList;
 
27
 
 
28
/*
 
29
*@class ConstellationLines
 
30
*Collection of lines making the 88 constellations
 
31
 
 
32
*@author Jason Harris
 
33
*@version 0.1
 
34
*/
 
35
 
 
36
class ConstellationLines : public LineListIndex
 
37
{
 
38
 
 
39
public:
 
40
    /* @short Constructor
 
41
     * @p parent Pointer to the parent SkyComposite object
 
42
     *
 
43
     * Constellation lines data is read from clines.dat.
 
44
     * Each line in the file contains a command character ("M" means move to 
 
45
     * this position without drawing a line, "D" means draw a line from 
 
46
     * the previous position to this one), followed by the genetive name of 
 
47
     * a star, which marks the position of the constellation node.
 
48
     */
 
49
    ConstellationLines( SkyComposite *parent, CultureList* cultures );
 
50
 
 
51
    void reindex( KSNumbers *num );
 
52
 
 
53
protected:
 
54
    const IndexHash& getIndexHash(LineList* lineList );
 
55
 
 
56
    /* @short we need to override the update routine because stars are
 
57
     * updated differently from mere SkyPoints.
 
58
     */
 
59
    virtual void JITupdate( LineList* lineList );
 
60
 
 
61
    /* @short Set the QColor and QPen for drawing. */
 
62
    virtual void preDraw( SkyPainter* skyp );
 
63
 
 
64
    bool selected();
 
65
 
 
66
private:
 
67
 
 
68
    KSNumbers m_reindexNum;
 
69
    double    m_reindexInterval;
 
70
 
 
71
};
 
72
 
 
73
 
 
74
#endif