1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 03:35:53 +01:00

Added printing support

"Save" is now "Export"
This commit is contained in:
Martin Tůma 2016-05-15 22:38:15 +02:00
parent 36937d8f2d
commit 511deada2e
10 changed files with 172 additions and 143 deletions

View File

@ -2,8 +2,8 @@
<qresource prefix="/">
<file>icons/dialog-close.png</file>
<file>icons/document-open.png</file>
<file>icons/document-save-as.png</file>
<file>icons/document-save.png</file>
<file>icons/document-print.png</file>
<file>icons/document-export.png</file>
<file>icons/flag.png</file>
<file>icons/gpxsee.png</file>
<file>icons/application-exit.png</file>

BIN
icons/document-export.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 B

BIN
icons/document-print.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 798 B

View File

@ -59,375 +59,380 @@
<context>
<name>GUI</name>
<message>
<location filename="../src/gui.cpp" line="450"/>
<location filename="../src/gui.cpp" line="457"/>
<source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at </source>
<translation>Program GPXSee je distribuován pod podmínkami licence GNU General Public License verze 3. Pro více informací navštivte stránky programu na adrese </translation>
</message>
<message>
<location filename="../src/gui.cpp" line="514"/>
<location filename="../src/gui.cpp" line="521"/>
<source>Open file</source>
<translation>Otevřít soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="211"/>
<source>Save as</source>
<translation>Uložit jako</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="586"/>
<location filename="../src/gui.cpp" line="593"/>
<source>Open POI file</source>
<translation>Otevřít POI soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="200"/>
<location filename="../src/gui.cpp" line="202"/>
<source>Open</source>
<translation>Otevřít</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="184"/>
<location filename="../src/gui.cpp" line="186"/>
<source>Quit</source>
<translation>Ukončit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="192"/>
<location filename="../src/gui.cpp" line="466"/>
<location filename="../src/gui.cpp" line="467"/>
<location filename="../src/gui.cpp" line="194"/>
<location filename="../src/gui.cpp" line="473"/>
<location filename="../src/gui.cpp" line="474"/>
<source>Keyboard controls</source>
<translation>Ovládací klávesy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="205"/>
<source>Save</source>
<translation>Uložit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="217"/>
<location filename="../src/gui.cpp" line="222"/>
<source>Close</source>
<translation>Zavřít</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="223"/>
<location filename="../src/gui.cpp" line="228"/>
<source>Reload</source>
<translation>Znovu načíst</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="378"/>
<location filename="../src/gui.cpp" line="387"/>
<source>Show</source>
<translation>Zobrazit</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="320"/>
<location filename="../src/gui.cpp" line="369"/>
<location filename="../src/gui.cpp" line="325"/>
<location filename="../src/gui.cpp" line="381"/>
<source>File</source>
<translation>Soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="190"/>
<location filename="../src/gui.cpp" line="489"/>
<location filename="../src/gui.cpp" line="490"/>
<location filename="../src/gui.cpp" line="192"/>
<location filename="../src/gui.cpp" line="496"/>
<location filename="../src/gui.cpp" line="497"/>
<source>Data sources</source>
<translation>Zdroje dat</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="231"/>
<location filename="../src/gui.cpp" line="207"/>
<source>Print</source>
<translation>Tisknout</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="212"/>
<source>Export</source>
<translation>Exportovat</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="217"/>
<source>Export as</source>
<translation>Exportovat jako</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="236"/>
<source>Load POI file</source>
<translation>Nahrát POI soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="234"/>
<location filename="../src/gui.cpp" line="239"/>
<source>Close POI files</source>
<translation>Zavřit POI soubory</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="237"/>
<location filename="../src/gui.cpp" line="242"/>
<source>Show POIs</source>
<translation>Zobrazit POI</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="245"/>
<location filename="../src/gui.cpp" line="250"/>
<source>Show map</source>
<translation>Zobrazit mapu</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="251"/>
<location filename="../src/gui.cpp" line="256"/>
<source>Clear tile cache</source>
<translation>Vymazat mezipaměť dlaždic</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="260"/>
<location filename="../src/gui.cpp" line="264"/>
<location filename="../src/gui.cpp" line="476"/>
<location filename="../src/gui.cpp" line="265"/>
<location filename="../src/gui.cpp" line="269"/>
<location filename="../src/gui.cpp" line="483"/>
<source>Next map</source>
<translation>Následující mapa</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="271"/>
<location filename="../src/gui.cpp" line="276"/>
<source>Show graphs</source>
<translation>Zobrazovat grafy</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="277"/>
<location filename="../src/gui.cpp" line="282"/>
<source>Show toolbars</source>
<translation>Zobrazovat nástrojové lišty</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="283"/>
<location filename="../src/gui.cpp" line="288"/>
<source>Metric</source>
<translation>Metrické</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="288"/>
<location filename="../src/gui.cpp" line="293"/>
<source>Imperial</source>
<translation>Imperiální</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="294"/>
<location filename="../src/gui.cpp" line="299"/>
<source>Fullscreen mode</source>
<translation>Celoobrazovkový režim</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="302"/>
<location filename="../src/gui.cpp" line="307"/>
<source>Next</source>
<translation>Následující</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="305"/>
<location filename="../src/gui.cpp" line="310"/>
<source>Previous</source>
<translation>Předchozí</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="309"/>
<location filename="../src/gui.cpp" line="314"/>
<source>Last</source>
<translation>Poslední</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="312"/>
<location filename="../src/gui.cpp" line="317"/>
<source>First</source>
<translation>První</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="334"/>
<location filename="../src/gui.cpp" line="340"/>
<source>Map</source>
<translation>Mapa</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="341"/>
<location filename="../src/gui.cpp" line="347"/>
<source>POI</source>
<translation>POI</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="342"/>
<location filename="../src/gui.cpp" line="348"/>
<source>POI files</source>
<translation>POI soubory</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="350"/>
<location filename="../src/gui.cpp" line="356"/>
<source>Settings</source>
<translation>Nastavení</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="351"/>
<location filename="../src/gui.cpp" line="357"/>
<source>Units</source>
<translation>Jednotky</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="360"/>
<location filename="../src/gui.cpp" line="366"/>
<source>Help</source>
<translation>Nápověda</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="478"/>
<location filename="../src/gui.cpp" line="485"/>
<source>Previous map</source>
<translation>Předchozí mapa</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="822"/>
<location filename="../src/gui.cpp" line="844"/>
<source>No GPX files loaded</source>
<translation>Nejsou načteny žádné GPX soubory</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="931"/>
<location filename="../src/gui.cpp" line="426"/>
<source>Elevation</source>
<translation>Výška</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="932"/>
<location filename="../src/gui.cpp" line="427"/>
<source>Speed</source>
<translation>Rychlost</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="933"/>
<location filename="../src/gui.cpp" line="428"/>
<source>Heart rate</source>
<translation>Tep</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="469"/>
<location filename="../src/gui.cpp" line="476"/>
<source>Next file</source>
<translation>Následující soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="446"/>
<location filename="../src/gui.cpp" line="453"/>
<source>Version </source>
<translation>Verze </translation>
</message>
<message>
<location filename="../src/gui.cpp" line="470"/>
<location filename="../src/gui.cpp" line="477"/>
<source>Previous file</source>
<translation>Předchozí soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="472"/>
<location filename="../src/gui.cpp" line="479"/>
<source>First file</source>
<translation>První soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="473"/>
<location filename="../src/gui.cpp" line="480"/>
<source>Last file</source>
<translation>Poslední soubor</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="474"/>
<location filename="../src/gui.cpp" line="481"/>
<source>Append modifier</source>
<translation>Modifikátor nahradit/přidat</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="493"/>
<location filename="../src/gui.cpp" line="500"/>
<source>Map (tiles) source URLs are read on program startup from the following file:</source>
<translation>URL mapových zdrojů (dlaždic) jsou načteny při startu programu z následujícího souboru:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="496"/>
<location filename="../src/gui.cpp" line="503"/>
<source>The file format is one map entry per line, consisting of the map name and tiles URL delimited by a TAB character. The tile X and Y coordinates are replaced with $x and $y in the URL and the zoom level is replaced with $z. An example map file could look like:</source>
<translation>Formát souboru je jeden mapový záznam na řádku, kde mapový záznam sestává ze jména mapy a URL dlaždic navzájem oddělených tabulátorem. Souřadnice dlaždice jsou v URL nahrazeny řetězci $x a $y, úroven přiblížení (zoom) pak řetězcem $z. Příklad:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="504"/>
<location filename="../src/gui.cpp" line="511"/>
<source>To make GPXSee load a POI file automatically on startup, add the file to the following directory:</source>
<translation>POI soubory, které se mají automaticky nahrát při startu programu jsou načítány z následujícího adresáře:</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="515"/>
<location filename="../src/gui.cpp" line="522"/>
<source>GPX files (*.gpx);;All files (*)</source>
<translation>soubory GPX (*.gpx);;všechny soubory (*)</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="577"/>
<location filename="../src/gui.cpp" line="603"/>
<location filename="../src/gui.cpp" line="584"/>
<location filename="../src/gui.cpp" line="610"/>
<source>Line: %1</source>
<translation>Řádka: %1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="587"/>
<location filename="../src/gui.cpp" line="594"/>
<source>GPX files (*.gpx);;CSV files (*.csv);;All files (*)</source>
<translation>soubory GPX (*.gpx);;soubory CSV (*.csv);;všechny soubory (*)</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="662"/>
<location filename="../src/gui.cpp" line="837"/>
<location filename="../src/gui.cpp" line="684"/>
<location filename="../src/gui.cpp" line="859"/>
<source>mi</source>
<translation>mi</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="665"/>
<location filename="../src/gui.cpp" line="667"/>
<location filename="../src/gui.cpp" line="669"/>
<location filename="../src/gui.cpp" line="671"/>
<location filename="../src/gui.cpp" line="834"/>
<location filename="../src/gui.cpp" line="687"/>
<location filename="../src/gui.cpp" line="689"/>
<location filename="../src/gui.cpp" line="691"/>
<location filename="../src/gui.cpp" line="693"/>
<location filename="../src/gui.cpp" line="856"/>
<source>ft</source>
<translation>ft</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="668"/>
<location filename="../src/gui.cpp" line="680"/>
<location filename="../src/gui.cpp" line="690"/>
<location filename="../src/gui.cpp" line="702"/>
<source>Maximum</source>
<translation>Maximum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="670"/>
<location filename="../src/gui.cpp" line="682"/>
<location filename="../src/gui.cpp" line="692"/>
<location filename="../src/gui.cpp" line="704"/>
<source>Minimum</source>
<translation>Minimum</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="195"/>
<location filename="../src/gui.cpp" line="444"/>
<location filename="../src/gui.cpp" line="197"/>
<location filename="../src/gui.cpp" line="451"/>
<source>About GPXSee</source>
<translation>O aplikaci GPXSee</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="385"/>
<location filename="../src/gui.cpp" line="391"/>
<source>Navigation</source>
<translation>Navigace</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="492"/>
<location filename="../src/gui.cpp" line="499"/>
<source>Map sources</source>
<translation>Mapové zdroje</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="503"/>
<location filename="../src/gui.cpp" line="510"/>
<source>POIs</source>
<translation>POI body</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="661"/>
<location filename="../src/gui.cpp" line="673"/>
<location filename="../src/gui.cpp" line="683"/>
<location filename="../src/gui.cpp" line="695"/>
<source>Distance</source>
<translation>Vzdálenost</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="663"/>
<location filename="../src/gui.cpp" line="675"/>
<location filename="../src/gui.cpp" line="685"/>
<location filename="../src/gui.cpp" line="697"/>
<source>Time</source>
<translation>Čas</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="664"/>
<location filename="../src/gui.cpp" line="676"/>
<location filename="../src/gui.cpp" line="686"/>
<location filename="../src/gui.cpp" line="698"/>
<source>Ascent</source>
<translation>Stoupání</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="677"/>
<location filename="../src/gui.cpp" line="679"/>
<location filename="../src/gui.cpp" line="681"/>
<location filename="../src/gui.cpp" line="683"/>
<location filename="../src/gui.cpp" line="841"/>
<location filename="../src/gui.cpp" line="699"/>
<location filename="../src/gui.cpp" line="701"/>
<location filename="../src/gui.cpp" line="703"/>
<location filename="../src/gui.cpp" line="705"/>
<location filename="../src/gui.cpp" line="863"/>
<source>m</source>
<translation>m</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="666"/>
<location filename="../src/gui.cpp" line="678"/>
<location filename="../src/gui.cpp" line="688"/>
<location filename="../src/gui.cpp" line="700"/>
<source>Descent</source>
<translation>Klesání</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="829"/>
<location filename="../src/gui.cpp" line="851"/>
<source>%1 tracks</source>
<translation>Počet tras: %1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="674"/>
<location filename="../src/gui.cpp" line="844"/>
<location filename="../src/gui.cpp" line="696"/>
<location filename="../src/gui.cpp" line="866"/>
<source>km</source>
<translation>km</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="579"/>
<location filename="../src/gui.cpp" line="604"/>
<location filename="../src/gui.cpp" line="586"/>
<location filename="../src/gui.cpp" line="611"/>
<source>Error</source>
<translation>Chyba</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="574"/>
<location filename="../src/gui.cpp" line="581"/>
<source>Error loading GPX file:
%1</source>
<translation>Soubor GPX nelze otevřít:
%1</translation>
</message>
<message>
<location filename="../src/gui.cpp" line="600"/>
<location filename="../src/gui.cpp" line="607"/>
<source>Error loading POI file:
%1</source>
<translation>Soubor POI nelze otevřít:

View File

@ -4,6 +4,7 @@
#include <QStatusBar>
#include <QMessageBox>
#include <QFileDialog>
#include <QPrintDialog>
#include <QPrinter>
#include <QPainter>
#include <QKeyEvent>
@ -202,18 +203,21 @@ void GUI::createActions()
_openFileAction->setShortcut(OPEN_SHORTCUT);
connect(_openFileAction, SIGNAL(triggered()), this, SLOT(openFile()));
addAction(_openFileAction);
_saveFileAction = new QAction(QIcon(QPixmap(SAVE_FILE_ICON)),
tr("Save"), this);
_saveFileAction->setShortcut(SAVE_SHORTCUT);
_saveFileAction->setActionGroup(_fileActionGroup);
connect(_saveFileAction, SIGNAL(triggered()), this, SLOT(saveFile()));
addAction(_saveFileAction);
_saveAsAction = new QAction(QIcon(QPixmap(SAVE_AS_ICON)),
tr("Save as"), this);
_saveAsAction->setShortcut(SAVE_AS_SHORTCUT);
_saveAsAction->setActionGroup(_fileActionGroup);
connect(_saveAsAction, SIGNAL(triggered()), this, SLOT(saveAs()));
addAction(_saveAsAction);
_printFileAction = new QAction(QIcon(QPixmap(PRINT_FILE_ICON)),
tr("Print"), this);
_printFileAction->setActionGroup(_fileActionGroup);
connect(_printFileAction, SIGNAL(triggered()), this, SLOT(printFile()));
addAction(_printFileAction);
_exportFileAction = new QAction(QIcon(QPixmap(EXPORT_FILE_ICON)),
tr("Export"), this);
_exportFileAction->setShortcut(EXPORT_SHORTCUT);
_exportFileAction->setActionGroup(_fileActionGroup);
connect(_exportFileAction, SIGNAL(triggered()), this, SLOT(exportFile()));
addAction(_exportFileAction);
_exportAsAction = new QAction(QIcon(QPixmap(EXPORT_FILE_ICON)),
tr("Export as"), this);
_exportAsAction->setActionGroup(_fileActionGroup);
connect(_exportAsAction, SIGNAL(triggered()), this, SLOT(exportAs()));
_closeFileAction = new QAction(QIcon(QPixmap(CLOSE_FILE_ICON)),
tr("Close"), this);
_closeFileAction->setShortcut(CLOSE_SHORTCUT);
@ -321,8 +325,9 @@ void GUI::createMenus()
_fileMenu = menuBar()->addMenu(tr("File"));
_fileMenu->addAction(_openFileAction);
_fileMenu->addSeparator();
_fileMenu->addAction(_saveFileAction);
_fileMenu->addAction(_saveAsAction);
_fileMenu->addAction(_printFileAction);
_fileMenu->addAction(_exportFileAction);
_fileMenu->addAction(_exportAsAction);
_fileMenu->addSeparator();
_fileMenu->addAction(_reloadFileAction);
_fileMenu->addSeparator();
@ -375,9 +380,10 @@ void GUI::createToolBars()
_fileToolBar = addToolBar(tr("File"));
_fileToolBar->addAction(_openFileAction);
_fileToolBar->addAction(_saveFileAction);
_fileToolBar->addAction(_reloadFileAction);
_fileToolBar->addAction(_closeFileAction);
_fileToolBar->addAction(_exportFileAction);
_fileToolBar->addAction(_printFileAction);
_showToolBar = addToolBar(tr("Show"));
_showToolBar->addAction(_showPOIAction);
@ -629,26 +635,35 @@ void GUI::closePOIFiles()
_poi.clear();
}
void GUI::saveAs()
void GUI::printFile()
{
QPrinter printer(QPrinter::HighResolution);
QPrintDialog printDialog(&printer, this);
if (printDialog.exec() == QDialog::Accepted)
plot(&printer);
}
void GUI::exportAs()
{
QString fileName = QFileDialog::getSaveFileName(this, "Export to PDF",
QString(), "*.pdf");
if (!fileName.isEmpty()) {
saveFile(fileName);
_saveFileName = fileName;
exportFile(fileName);
_exportFileName = fileName;
}
}
void GUI::saveFile()
void GUI::exportFile()
{
if (_saveFileName.isEmpty())
emit saveAs();
if (_exportFileName.isEmpty())
emit exportAs();
else
saveFile(_saveFileName);
exportFile(_exportFileName);
}
void GUI::saveFile(const QString &fileName)
void GUI::exportFile(const QString &fileName)
{
QPrinter printer(QPrinter::HighResolution);
printer.setPageSize(QPrinter::A4);
@ -656,9 +671,15 @@ void GUI::saveFile(const QString &fileName)
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName(fileName);
QPainter p(&printer);
plot(&printer);
}
void GUI::plot(QPrinter *printer)
{
QPainter p(printer);
TrackInfo info;
if (_imperialUnitsAction->isChecked()) {
info.insert(tr("Distance"), QString::number(_distance * M2MI, 'f', 1)
+ UNIT_SPACE + tr("mi"));
@ -685,11 +706,11 @@ void GUI::saveFile(const QString &fileName)
0) + UNIT_SPACE + tr("m"));
}
_track->plot(&p, QRectF(0, 300, printer.width(), (0.80 * printer.height())
_track->plot(&p, QRectF(0, 300, printer->width(), (0.80 * printer->height())
- 400));
_elevationGraph->plot(&p, QRectF(0, 0.80 * printer.height(),
printer.width(), printer.height() * 0.20));
info.plot(&p, QRectF(0, 0, printer.width(), 200));
_elevationGraph->plot(&p, QRectF(0, 0.80 * printer->height(),
printer->width(), printer->height() * 0.20));
info.plot(&p, QRectF(0, 0, printer->width(), 200));
}
void GUI::reloadFile()

View File

@ -13,6 +13,7 @@ class QActionGroup;
class QAction;
class QLabel;
class QSignalMapper;
class QPrinter;
class FileBrowser;
class GraphView;
class ElevationGraph;
@ -35,8 +36,9 @@ private slots:
void about();
void keys();
void dataSources();
void saveFile();
void saveAs();
void printFile();
void exportFile();
void exportAs();
void openFile();
void closeAll();
void reloadFile();
@ -71,6 +73,7 @@ private:
void loadMaps();
void loadPOIs();
void closeFiles();
void plot(QPrinter *printer);
QAction *createPOIFileAction(int index);
void createPOIFilesActions();
@ -84,7 +87,7 @@ private:
bool openPOIFile(const QString &fileName);
bool loadFile(const QString &fileName);
void saveFile(const QString &fileName);
void exportFile(const QString &fileName);
void updateStatusBarInfo();
void updateWindowTitle();
void updateNavigationActions();
@ -118,8 +121,9 @@ private:
QAction *_dataSourcesAction;
QAction *_aboutAction;
QAction *_aboutQtAction;
QAction *_saveFileAction;
QAction *_saveAsAction;
QAction *_printFileAction;
QAction *_exportFileAction;
QAction *_exportAsAction;
QAction *_openFileAction;
QAction *_closeFileAction;
QAction *_reloadFileAction;
@ -159,7 +163,7 @@ private:
FileBrowser *_browser;
QList<QString> _files;
QString _saveFileName;
QString _exportFileName;
Map *_currentMap;
qreal _distance;

View File

@ -3,8 +3,8 @@
#define APP_ICON ":/icons/gpxsee.png"
#define OPEN_FILE_ICON ":/icons/document-open.png"
#define SAVE_FILE_ICON ":/icons/document-save.png"
#define SAVE_AS_ICON ":/icons/document-save-as.png"
#define EXPORT_FILE_ICON ":/icons/document-export.png"
#define PRINT_FILE_ICON ":/icons/document-print.png"
#define CLOSE_FILE_ICON ":/icons/dialog-close.png"
#define SHOW_POI_ICON ":/icons/flag.png"
#define SHOW_MAP_ICON ":/icons/applications-internet.png"

View File

@ -12,10 +12,9 @@
#define QUIT_SHORTCUT QKeySequence::Quit
#define OPEN_SHORTCUT QKeySequence::Open
#define SAVE_SHORTCUT QKeySequence::Save
#define SAVE_AS_SHORTCUT QKeySequence::SaveAs
#define CLOSE_SHORTCUT QKeySequence::Close
#define RELOAD_SHORTCUT QKeySequence::Refresh
#define EXPORT_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_E)
#define SHOW_POI_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_P)
#define SHOW_MAP_SHORTCUT QKeySequence(Qt::CTRL + Qt::Key_M)
#define NEXT_MAP_SHORTCUT QKeySequence::Forward