~ubuntu-branches/ubuntu/saucy/merkaartor/saucy

« back to all changes in this revision

Viewing changes to src/QMapControl/wmsmapadapter.h

Tags: upstream-0.15.3+svn20934
ImportĀ upstreamĀ versionĀ 0.15.3+svn20934

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
{
35
35
public:
36
36
 
37
 
        WMSMapAdapter(WmsServer aServer);
38
 
        virtual ~WMSMapAdapter();
39
 
 
40
 
        //! returns the unique identifier (Uuid) of this MapAdapter
41
 
        /*!
42
 
         * @return  the unique identifier (Uuid) of this MapAdapter
43
 
         */
44
 
        virtual QUuid   getId           () const;
45
 
 
46
 
        //! returns the type of this MapAdapter
47
 
        /*!
48
 
         * @return  the type of this MapAdapter
49
 
         */
50
 
        virtual IMapAdapter::Type       getType         () const;
51
 
 
52
 
        //! returns the name of this MapAdapter
53
 
        /*!
54
 
         * @return  the name of this MapAdapter
55
 
         */
56
 
        virtual QString getName         () const;
57
 
 
58
 
        //! returns the host of this MapAdapter
59
 
        /*!
60
 
         * @return  the host of this MapAdapter
61
 
         */
62
 
        virtual QString getHost         () const;
63
 
 
64
 
        //! returns the size of the tiles
65
 
        /*!
66
 
         * @return the size of the tiles
67
 
         */
68
 
        virtual int             getTileSize     () const { return -1; }
69
 
 
70
 
        //! returns the min zoom value
71
 
        /*!
72
 
         * @return the min zoom value
73
 
         */
74
 
        virtual int             getMinZoom      () const { return -1; }
75
 
 
76
 
        //! returns the max zoom value
77
 
        /*!
78
 
         * @return the max zoom value
79
 
         */
80
 
        virtual int             getMaxZoom      () const { return -1; }
81
 
 
82
 
        //! returns the current zoom
83
 
        /*!
84
 
         * @return the current zoom
85
 
         */
86
 
        virtual int             getZoom         () const { return -1; }
87
 
 
88
 
        virtual int             getAdaptedZoom() const { return -1; }
89
 
        virtual int     getAdaptedMinZoom() const { return -1; }
90
 
        virtual int             getAdaptedMaxZoom() const { return -1; }
91
 
 
92
 
        virtual void    zoom_in() {}
93
 
        virtual void    zoom_out() {}
94
 
 
95
 
        virtual bool    isValid(int, int, int) const { return true; }
96
 
        virtual QString getQuery(int, int, int)  const { return ""; }
97
 
        virtual QString getQuery(const QRectF& wgs84Bbox, const QRectF& projBbox, const QRect& size) const ;
98
 
        virtual QPixmap getPixmap(const QRectF& wgs84Bbox, const QRectF& projBbox, const QRect& size) const { return QPixmap(); };
99
 
 
100
 
        //! translates a world coordinate to display coordinate
101
 
        /*!
102
 
         * The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem.
103
 
         * To divide model from view the current zoom should be moved to the layers.
104
 
         * @param  coordinate the world coordinate
105
 
         * @return the display coordinate (in widget coordinates)
106
 
         */
107
 
        virtual QPoint          coordinateToDisplay(const QPointF& ) const { return QPoint(); }
108
 
 
109
 
        //! translates display coordinate to world coordinate
110
 
        /*!
111
 
         * The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem.
112
 
         * To divide model from view the current zoom should be moved to the layers.
113
 
         * @param  point the display coordinate
114
 
         * @return the world coordinate
115
 
         */
116
 
        virtual QPointF displayToCoordinate(const QPoint& )  const { return QPointF(); }
117
 
 
118
 
        virtual bool isTiled() const { return false; }
119
 
        virtual QString projection() const;
120
 
 
121
 
        virtual QMenu* getMenu() const { return NULL; }
122
 
 
123
 
        virtual IImageManager* getImageManager();
124
 
        virtual void setImageManager(IImageManager* anImageManager);
 
37
    WMSMapAdapter(WmsServer aServer);
 
38
    virtual ~WMSMapAdapter();
 
39
 
 
40
    //! returns the unique identifier (Uuid) of this MapAdapter
 
41
    /*!
 
42
     * @return  the unique identifier (Uuid) of this MapAdapter
 
43
     */
 
44
    virtual QUuid       getId           () const;
 
45
 
 
46
    //! returns the type of this MapAdapter
 
47
    /*!
 
48
     * @return  the type of this MapAdapter
 
49
     */
 
50
    virtual IMapAdapter::Type   getType         () const;
 
51
 
 
52
    //! returns the name of this MapAdapter
 
53
    /*!
 
54
     * @return  the name of this MapAdapter
 
55
     */
 
56
    virtual QString     getName         () const;
 
57
 
 
58
    //! returns the host of this MapAdapter
 
59
    /*!
 
60
     * @return  the host of this MapAdapter
 
61
     */
 
62
    virtual QString     getHost         () const;
 
63
 
 
64
    //! returns the size of the tiles
 
65
    /*!
 
66
     * @return the size of the tiles
 
67
     */
 
68
    virtual int         getTileSize     () const { return -1; }
 
69
 
 
70
    //! returns the min zoom value
 
71
    /*!
 
72
     * @return the min zoom value
 
73
     */
 
74
    virtual int                 getMinZoom      () const { return -1; }
 
75
 
 
76
    //! returns the max zoom value
 
77
    /*!
 
78
     * @return the max zoom value
 
79
     */
 
80
    virtual int         getMaxZoom      () const { return -1; }
 
81
 
 
82
    //! returns the current zoom
 
83
    /*!
 
84
     * @return the current zoom
 
85
     */
 
86
    virtual int                 getZoom         () const { return -1; }
 
87
 
 
88
    virtual int         getAdaptedZoom() const { return -1; }
 
89
    virtual int         getAdaptedMinZoom() const { return -1; }
 
90
    virtual int         getAdaptedMaxZoom() const { return -1; }
 
91
 
 
92
    virtual void        zoom_in() {}
 
93
    virtual void        zoom_out() {}
 
94
 
 
95
    virtual bool        isValid(int, int, int) const { return true; }
 
96
    virtual QString getQuery(int, int, int)  const { return ""; }
 
97
    virtual QString getQuery(const QRectF& wgs84Bbox, const QRectF& projBbox, const QRect& size) const ;
 
98
    virtual QPixmap getPixmap(const QRectF& /* wgs84Bbox */, const QRectF& /* projBbox */, const QRect& /* size */) const { return QPixmap(); }
 
99
 
 
100
    virtual QString projection() const;
 
101
    virtual QRectF      getBoundingbox() const { return QRectF(); }
 
102
 
 
103
    virtual bool isTiled() const { return false; }
 
104
    virtual int getTilesWE(int) const { return -1; }
 
105
    virtual int getTilesNS(int) const { return -1; }
 
106
 
 
107
    virtual QMenu* getMenu() const { return NULL; }
 
108
 
 
109
    virtual IImageManager* getImageManager();
 
110
    virtual void setImageManager(IImageManager* anImageManager);
 
111
 
 
112
    virtual void cleanup() {}
125
113
 
126
114
private:
127
115
 
128
 
        QLocale loc;
129
 
        WmsServer theServer;
130
 
        IImageManager* theImageManager;
 
116
    QLocale loc;
 
117
    WmsServer theServer;
 
118
    IImageManager* theImageManager;
131
119
};
132
120
 
133
121
#endif