Permalink
Browse files

Merge branch 'master' of github.com:dotevo/Pilocik

  • Loading branch information...
2 parents 561f04f + 90a38ce commit d7d5b769f7dd997dca99b93698db54244572b06f @dotevo committed Dec 7, 2011
View
@@ -10,9 +10,9 @@ QT += core gui sql \
TARGET = ../../build/Pilocik
TEMPLATE = app
-LIBS += ../lib/PiLibocik/debug/libPiLibocik.a
-#Debug:LIBS += ../lib/PiLibocik/debug/libPiLibocik.a
-#Release:LIBS += ../lib/PiLibocik/release/libPiLibocik.a
+#LIBS += ../lib/PiLibocik/debug/libPiLibocik.a
+Debug:LIBS += ../lib/PiLibocik/debug/libPiLibocik.a
+Release:LIBS += ../lib/PiLibocik/release/libPiLibocik.a
TRANSLATIONS = lang/pl_PL.tr \
lang/en_EN.tr
@@ -18,6 +18,9 @@ class GPSOptionsWindow : public QFullScreenFrame
explicit GPSOptionsWindow(NavigationWindow *parent);
~GPSOptionsWindow();
+ /**
+ @brief Sets focus at startup to something other than qlineedit object.
+ */
void setStartFocus();
private slots:
@@ -16,6 +16,9 @@ class MapOptionsWindow : public QFullScreenFrame
explicit MapOptionsWindow(NavigationWindow *parent);
~MapOptionsWindow();
+ /**
+ @brief Sets focus to other object than qlineedit to prevent keyboard widget autostart.
+ */
void setStartFocus();
private slots:
@@ -811,10 +811,6 @@ MapPixmapRenderer::MapPixmapRenderer(QObject *parent):QThread(parent){
started=false;
}
-void MapPixmapRenderer::getPixmap(){
-
-}
-
void MapPixmapRenderer::init(osmscout::Database *database,osmscout::MercatorProjection *projection,osmscout::StyleConfig*style,float d){
this->database=database;
this->projection=projection;
View
@@ -32,8 +32,10 @@ namespace Ui {
class MapPixmapRenderer: public QThread{
Q_OBJECT
public:
- MapPixmapRenderer(QObject *parent = 0);
- void getPixmap();
+ MapPixmapRenderer(QObject *parent = 0);
+ /**
+ @brief Main body of thread. Renders new map.
+ */
void run();
/**
@brief Init
@@ -43,6 +45,10 @@ class MapPixmapRenderer: public QThread{
@param magnification ratio
*/
void init(osmscout::Database *database,osmscout::MercatorProjection *projection,osmscout::StyleConfig*style,float d);
+
+ /**
+ @brief Returns true if rendering thread is working.
+ */
bool isWorking();
private:
float d;
@@ -177,6 +183,11 @@ class MapRenderWidget : public QWidget
*/
void setCacheSettings(int cachePixmapSize, double delta);
+ /**
+ @brief Draws arrow on map in specified position. Used to mark point position in point information window.
+ @param lon Longitude of marked point.
+ @param lat Latitude of marked point.
+ */
void insertArrow(double lon, double lat);
bool PixelToGeo(double x, double y,
@@ -53,6 +53,10 @@ NavigationWindow::NavigationWindow(QWidget *parent) :
QString layoutStyle = layoutStyleFile.readAll();
this->setStyleSheet(layoutStyle);
layoutStyleFile.close();
+
+ Qt::WindowFlags flags = Qt::FramelessWindowHint;
+ setWindowFlags(flags);
+ setAttribute(Qt::WA_TranslucentBackground);
}
NavigationWindow::~NavigationWindow()
View
@@ -22,12 +22,28 @@ class NavigationWindow : public QMainWindow
GPSreceiver* gps;
explicit NavigationWindow(QWidget *parent = 0);
~NavigationWindow();
+ /**
+ @brief Resize evenet overload to keep buttons in correct place.
+ @param event Resize event.
+ */
void resizeEvent ( QResizeEvent * event );
static NavigationWindow *main;
MapRenderWidget *mapRenderer;
+ /**
+ @brief Retranslates application after language change.
+ */
void retranslate();
+ /**
+ @brief Sets route that will be rendered.
+ @param route Route as list of routing steps.
+ */
void setRoute(QList<osmscout::Routing::Step> route);
+
+ /**
+ @brief Returns map coordinates.
+ @return Coordinates of map central point.
+ */
QPointF getCoordinates();
private slots:
@@ -29,6 +29,10 @@ class PointSelectionWindow : public QFullScreenFrame
public:
explicit PointSelectionWindow(NavigationWindow *parent = 0, double currentLocationX = 0, double currentLocationY = 0);
~PointSelectionWindow();
+
+ /**
+ @brief If PointSelectionWindow is used to select neares point, information is displayed at top of window.
+ */
void showNearestInfo();
private slots:
@@ -49,6 +53,10 @@ private slots:
*/
void on_streetLineEdit_textChanged(const QString &arg1);
+
+ /**
+ @brief Enables city line edit.
+ */
void on_cityEditBtn_clicked();
/**
View
@@ -94,72 +94,197 @@ class Settings
public:
Settings(QApplication* a = 0);
~Settings();
+
+ /**
+ @brief Returns instance of settings singleton.
+ */
static Settings* getInstance(QApplication* a = 0);
+ /**
+ @brief Loads settings from file to variables.
+ */
void loadSettings();
+ /**
+ @brief Saves settings from memory to file.
+ */
void saveSettings();
+ /**
+ @brief Sets language setting.
+ @param lang Language
+ */
void setLanguage(QString lang);
+
+ /**
+ @brief Gets actual language setting.
+ @return Language.
+ */
QString getLanguage();
QString getLanguageFromLocale(QString loc);
QString getLocale(QString lang);
+
+ /**
+ @brief Return settgins of specified plugin.
+ @param pluginName Plugin name.
+ */
QMap<QString,QString> getPluginSettings(QString pluginName);
+ /**
+ @brief Creates new settings file if it's not existing.
+ */
void resetDefaultSettings();
+
+ /**
+ @brief Loads settings assigned to specified profile.
+ @param profile Profile name.
+ */
void configureProfile(QString profile);
+ /**
+ @brief Modifies main settings.
+ @param name Setting name.
+ @param value Setting value.
+ */
void modifyCoreSettings(QString name, QString value);
- void modifyWidgetSettings(QString name, QMap<QString,QString>);
+
+ /**
+ @brief Modifies settings of specified widget.
+ @param name Widget name.
+ @param value Settings as QMap.
+ */
+ void modifyWidgetSettings(QString name, QMap<QString,QString> settingsToSave);
+
+ /**
+ @brief Modifies map settings.
+ @param lat New longitude value.
+ @param lon New latitude value.
+ @param zoom New zoom value.
+ */
void modifyMapSettings(double lat, double lon, int zoom);
+
+ /**
+ @brief Modifies language settings.
+ */
void modifyLanguageSettings();
+
+ /**
+ @brief Modifies poi displaying settings.
+ @param newPoiDisplaySettings QMap containing all poi display settings.
+ */
void modifyPoiDisplaySettings(QMap<int, PiLibocik::PoiDisplay> newPoiDisplaySettings);
+
+ /**
+ @brief Modifies plugin settings.
+ @param pluginName Plugin name.
+ @param setting QMap containing all current plugin settings.
+ */
void modifyPluginSettings(QString pluginName,QMap<QString,QString> setting);
+ /**
+ @brief Adds new favourite point.
+ @param name Favourite point name.
+ @param lon Longitude.
+ @param lat Latitude.
+ */
void addHistoryPoint(QString name, double lon, double lat);
+
+ /**
+ @brief Adds new history point.
+ @param name History point name.
+ @param lon Longitude.
+ @param lat Latitude.
+ */
void addFavouritePoint(QString name, double lon, double lat);
+
+ /**
+ @brief Deletes history point.
+ @param pos History point position.
+ */
void removeHistoryPoint(int pos);
+
+ /**
+ @brief Deletes favourite point.
+ @param pos Favourite point position.
+ */
void removeFavouritePoint(int pos);
+ /**
+ @brief Reloads translation.
+ @param lang Language
+ */
QTranslator* reloadTranslation(QString lang = "");
+ /**
+ @brief Returns wiget settings.
+ @param name Widget name
+ @return QMap containing all settings of specified widget.
+ */
QMap<QString,QString> getWidgetSettings(QString name);
+ /**
+ @brief Returns startup language.
+ @return Language.
+ */
QString getStartLanguage();
+ /**
+ @brief Returns map path.
+ */
QString getMapPath()
{
return mapPath;
}
+ /**
+ @brief Returns map style path.
+ */
QString getMapStylePath()
{
return mapStylePath;
}
+ /**
+ @brief Returns layout style path.
+ */
QString getLayoutStylePath()
{
return layoutStylePath;
}
+ /**
+ @brief Returns simulation path.
+ */
QString getSimulationPath()
{
return simulationPath;
}
+ /**
+ @brief Returns poi file path.
+ */
QString getPoiFilePath()
{
return poiFilePath;
}
+ /**
+ @brief Returns poi icons location.
+ */
QString getPoiIconsDir()
{
return poiIconsDir;
}
+ /**
+ @brief Returns poi display settings.
+ */
QMap<int, PiLibocik::PoiDisplay> getPoiDisplaySettings()
{
return poiDisplaySettings;
}
+ /**
+ @brief Returns all stored history points in reverse order.
+ */
QList<StorePoint> getHistoryPoints()
{
QList<StorePoint> revHistory;
@@ -168,21 +293,33 @@ class Settings
return revHistory;
}
+ /**
+ @brief Returns all stored favourite points.
+ */
QList<StorePoint> getFavouritePoints()
{
return favouritePoints;
}
+ /**
+ @brief Returns stored map latitude.
+ */
double getLat()
{
return lat;
}
+ /**
+ @brief Returns stored map longitude.
+ */
double getLon()
{
return lon;
}
+ /**
+ @brief Returns stored map zoom.
+ */
int getZoom()
{
return zoom;
@@ -6,6 +6,8 @@ TPOIInfoWidget::TPOIInfoWidget(QWidget *parent) :
ui(new Ui::TPOIInfoWidget)
{
ui->setupUi(this);
+
+ isPOI = false;
}
TPOIInfoWidget::~TPOIInfoWidget()
@@ -40,5 +42,6 @@ void TPOIInfoWidget::showInfo(PiLibocik::Poi poi)
void TPOIInfoWidget::on_okButton_clicked()
{
isPOI = false;
+
setVisible(false);
}
Oops, something went wrong.

0 comments on commit d7d5b76

Please sign in to comment.