~ubuntu-branches/ubuntu/quantal/marble/quantal

« back to all changes in this revision

Viewing changes to src/plugins/render/aprs/AprsObject.h

  • Committer: Bazaar Package Importer
  • Author(s): Philip Muškovac
  • Date: 2011-07-11 15:43:02 UTC
  • Revision ID: james.westby@ubuntu.com-20110711154302-lq69ftcx125g1jx5
Tags: upstream-4.6.90+repack
Import upstream version 4.6.90+repack

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// This file is part of the Marble Virtual Globe.
 
3
//
 
4
// This program is free software licensed under the GNU LGPL. You can
 
5
// find a copy of this license in LICENSE.txt in the top directory of
 
6
// the source code.
 
7
//
 
8
// Copyright 2010 Wes Hardaker <hardaker@users.sourceforge.net>
 
9
//
 
10
 
 
11
#ifndef APRSOBJECT_H
 
12
#define APRSOBJECT_H
 
13
 
 
14
#include <QtCore/QObject>
 
15
#include <QtCore/QString>
 
16
 
 
17
#include "GeoAprsCoordinates.h"
 
18
#include "GeoPainter.h"
 
19
#include "GeoSceneLayer.h"
 
20
 
 
21
namespace Marble
 
22
{
 
23
 
 
24
    class AprsObject
 
25
    {
 
26
 
 
27
      public:
 
28
        AprsObject();
 
29
        AprsObject( const GeoAprsCoordinates &at, QString &name );
 
30
        AprsObject( const qreal &lon, const qreal &lat, const QString &name,
 
31
                    int where = GeoAprsCoordinates::FromNowhere );
 
32
        ~AprsObject();
 
33
 
 
34
        void setLocation( GeoAprsCoordinates location );
 
35
        void setLocation( qreal lon, qreal lat, int from );
 
36
        void setPixmapId( QString &pixmap );
 
37
        void setSeenFrom( int where );
 
38
        GeoAprsCoordinates location();
 
39
 
 
40
        QColor calculatePaintColor( GeoPainter *painter ) const;
 
41
        QColor calculatePaintColor( GeoPainter *painter, int from,
 
42
                                    const QTime &time,
 
43
                                    int fadetime = 10*60*1000 ) const;
 
44
        void render( GeoPainter *painter, ViewportParams *viewport,
 
45
                     const QString& renderPos, GeoSceneLayer * layer,
 
46
                     int fadeTime = 10*60, int hideTime = 30*60 );
 
47
 
 
48
      private:
 
49
        QList<GeoAprsCoordinates>     m_history;
 
50
        QString                       m_myName;
 
51
        int                           m_seenFrom;
 
52
        bool                          m_havePixmap;
 
53
        QString                       m_pixmapFilename;
 
54
        QPixmap                       *m_pixmap;
 
55
    };
 
56
 
 
57
}
 
58
 
 
59
#endif /* APRSOBJECT_H */