+/****************************************************************************
+**
+** Copyright (C) 2011 Tito Eritja Real <jtitoo@gmail.com>
+**
+** This program is free software: you can redistribute it and/or modify
+** it under the terms of the GNU General Public License as published by
+** the Free Software Foundation, either version 3 of the License, or
+** (at your option) any later version.
+**
+** This program is distributed in the hope that it will be useful,
+** but WITHOUT ANY WARRANTY; without even the implied warranty of
+** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+** GNU General Public License for more details.
+**
+** You should have received a copy of the GNU General Public License
+** along with this program. If not, see <http://www.gnu.org/licenses/>.
+**
+****************************************************************************/
+
#ifndef ACTIVITYMAP_H
#define ACTIVITYMAP_H
class Settings;
class ConnectivityHelper;
-class SatelliteDialog;
+//class SatelliteDialog;
// Use the QtMobility namespace
bool pressed;
bool snapped;
bool possitionPaint;
+ bool isDisplayInit;
int tilesToDownload;
QAction *startNetworkAction;
QAction *loadTrackAction;
- QAction *downloadMapsAction;
+ QAction *downloadMapsTrackAction;
QAction *newActivityAction;
QAction *simulatedActivityAction;
QAction *quitAction;
QAction *stopAction;
QAction *startAction;
QAction *tracksAction;
- QAction *satelliteAction;
+ //QAction *satelliteAction;
QAction *infoAction;
// Dialogs
DownloadingStatus* downloadingStatus;
- QGeoSatelliteInfoSource *satelliteInfo;
- SatelliteDialog *satelliteDialog;
+ //QGeoSatelliteInfoSource *satelliteInfo;
+ //SatelliteDialog *satelliteDialog;
Log *log;
QList<GpsPoint*> trackToSimulate;
- bool waitingForFix;
+ //bool waitingForFix;
int validPositions;
int invalidPositions;
void mouseReleaseEvent(QMouseEvent *event);
void resizeEvent(QResizeEvent * );
+ void chooseDisplay();
public:
QToolButton *zoomInButton;
explicit WindowMap(QWidget *parent = 0,Settings* settings=0, Log *log=0);
virtual ~WindowMap();
+ void displayInit(QPainter *p);
+
void fixZoomButtons();
void updateSummary();
void clearAllMaps();
void startGPS();
void startMaps();
- void showSatelliteInfo();
+ //void showSatelliteInfo();
void startNetworking();
void stopNetworking();
void setOrientation(ScreenOrientation orientation);
inline Track* getTrack(){return track;}
inline Track* getTrackToSniff(){return trackToSniff;}
inline void setTrackToSimulate(QList<GpsPoint*> toDo){trackToSimulate=toDo;}
- inline bool hasTrackToSimulate(){(trackToSimulate.size()>0);}
+ inline bool hasTrackToSimulate(){return (trackToSimulate.size()>0);}
inline void startAutosaveTimer(int milliseconds){autosaveTimer->start(milliseconds);}
inline void startSimulatePossitioning(int milliseconds){simulatePossitioningTimer->start(milliseconds);}
inline void startSimulatePossitioning(){simulatePossitioningTimer->start();}
inline bool simulatingGPS(){return simulateGPS;}
inline void setSimulateGPS(bool value){simulateGPS=value;}
inline int getTilesToDownload(){return tilesToDownload;}
+ inline void setIsCacheEnabled(bool value){
+ if(slippyMap)
+ slippyMap->setIsCacheEnabled(value);
+ }
+ inline bool isCacheEnabled(){return slippyMap->isCacheEnabled();}
void setTrack(QString filename,QString activity);
void setCenter(qreal lat, qreal lng);
void quit();
- void satellite();
+ //void satellite();
void onZoomIn();
void onZoomOut();
//void networkSessionOpened();
- void waitForFix();
+ //void waitForFix();
void updateMap(const QRect &r);