Subversion Repositories Projects

Rev

Rev 306 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
305 KeyOz 1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
#ifndef DLG_MAP_H
20
#define DLG_MAP_H
21
 
22
#include <QDialog>
23
#include <QList>
24
 
25
#include "ui_dlg_Map.h"
306 KeyOz 26
 
27
#include "../Classes/cSettings.h"
305 KeyOz 28
#include "../qmapcontrol.h"
306 KeyOz 29
#include "../global.h"
305 KeyOz 30
 
31
using namespace qmapcontrol;
32
 
33
class dlg_Map :  public QDialog, public Ui::dlg_Map_UI
34
{
35
    Q_OBJECT
36
 
37
public:
38
    dlg_Map(QWidget *parent = 0);
39
    void add_Position(double x, double y);
306 KeyOz 40
    void create_Map(cSettings *t_Settings);
305 KeyOz 41
 
42
private:
43
    QPen* Pen[3];
44
 
306 KeyOz 45
    cSettings   *o_Settings;
305 KeyOz 46
 
306 KeyOz 47
    MapControl  *o_Map;
48
    MapAdapter  *o_Adapter;
49
 
50
    Layer       *o_Layer;
51
    Layer       *o_Click;
52
    Layer       *o_Route;
53
 
305 KeyOz 54
    QList<Point*> p_RouteWP;
306 KeyOz 55
    LineString*   l_RouteWP;
305 KeyOz 56
 
57
    QList<Point*> p_RouteFL;
306 KeyOz 58
    LineString*   l_RouteFL;
59
 
305 KeyOz 60
    Point* LastPos;
306 KeyOz 61
//    Point* LastPoint;
305 KeyOz 62
    Point* LastClick;
63
 
306 KeyOz 64
    Point   *ClickPoint;
65
    QPointF MapCenter;
305 KeyOz 66
 
358 KeyOz 67
    QList<sWayPoint> l_WayPoints;
68
    QList<sWayPoint> l_Track;
305 KeyOz 69
 
70
private slots:
306 KeyOz 71
    void slot_Zoom(int t_Zoom);
72
    void slot_ChangeMap(int);
305 KeyOz 73
    void slot_Click(const QMouseEvent*, const QPointF);
74
 
306 KeyOz 75
    void slot_AddWayPoint();
76
    void slot_DeleteWayPoints();
358 KeyOz 77
    void slot_SendWayPoints();
306 KeyOz 78
 
79
    void slot_GotoTarget();
80
    void slot_Close();
81
 
305 KeyOz 82
protected:
83
    virtual void resizeEvent ( QResizeEvent * event );
84
 
306 KeyOz 85
signals:
86
    void set_Target(sWayPoint Target);
358 KeyOz 87
    void set_WayPoints(QList<sWayPoint>);
306 KeyOz 88
    void set_Settings(cSettings *t_Settings);
89
 
305 KeyOz 90
};
91
 
92
#endif // DLG_MAP_H