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

« back to all changes in this revision

Viewing changes to src/lib/AbstractDataPluginItem.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 2009      Bastian Holst <bastianholst@gmx.de>
 
9
//
 
10
 
 
11
#ifndef MARBLE_ABSTRACTDATAPLUGINITEM_H
 
12
#define MARBLE_ABSTRACTDATAPLUGINITEM_H
 
13
 
 
14
#include <QtCore/QObject>
 
15
#include <QtCore/QString>
 
16
#include <QtCore/QHash>
 
17
 
 
18
#include "GeoGraphicsItem.h"
 
19
#include "marble_export.h"
 
20
 
 
21
class QAction;
 
22
 
 
23
namespace Marble
 
24
{
 
25
    
 
26
class AbstractDataPluginItemPrivate;
 
27
 
 
28
class MARBLE_EXPORT AbstractDataPluginItem : public QObject, public GeoGraphicsItem
 
29
{
 
30
    Q_OBJECT
 
31
    
 
32
 public:
 
33
    explicit AbstractDataPluginItem( QObject *parent = 0 );
 
34
    virtual ~AbstractDataPluginItem();
 
35
    
 
36
    QString target();
 
37
    void setTarget( const QString& target );
 
38
     
 
39
    QString id() const;
 
40
    void setId( const QString& id );
 
41
    
 
42
    /**
 
43
      * Returning the angular resolution of the viewport when the item was added to it the last
 
44
      * time.
 
45
      */
 
46
    qreal addedAngularResolution() const;
 
47
    void setAddedAngularResolution( qreal resolution );
 
48
 
 
49
    /**
 
50
     * @brief Set the settings of the item.
 
51
     * This is usually called automatically before painting. If you reimplement this it would be
 
52
     * useful to check for changes before copying.
 
53
     */
 
54
    virtual void setSettings( const QHash<QString, QVariant>& settings );
 
55
    
 
56
    /**
 
57
     * Returns the action of this specific item.
 
58
     */
 
59
    virtual QAction *action();
 
60
    
 
61
    /**
 
62
     * Returns the type of this specific item.
 
63
     */
 
64
    virtual QString itemType() const = 0;
 
65
 
 
66
    virtual bool initialized() = 0;
 
67
    
 
68
    virtual void addDownloadedFile( const QString& url, const QString& type );
 
69
 
 
70
    virtual bool isGeoProjected();
 
71
                         
 
72
    virtual bool operator<( const AbstractDataPluginItem *other ) const = 0;
 
73
 
 
74
 Q_SIGNALS:
 
75
    void updated();
 
76
    
 
77
 private:
 
78
    AbstractDataPluginItemPrivate * const d;
 
79
};
 
80
 
 
81
} // Marble namespace
 
82
 
 
83
#endif