Add "Import dive sites" menu to mainwindow

Adds "Import->Import dive sites" menu to mainwindow.cpp and adds the
on_actionImportDiveSites_triggered() method to prompt for the filename
to import from. The files are parsed and then any dive and trip data is
cleared before opening a dialog box to select which sites are to be
imported.

Signed-off-by: Doug Junkins <junkins@foghead.com>
This commit is contained in:
Doug Junkins 2019-05-04 20:46:42 -07:00 committed by bstoeger
parent 704ff9f82e
commit 98b3a326bd
6 changed files with 61 additions and 1 deletions

View file

@ -139,6 +139,7 @@ slots:
void initialUiSetup();
void on_actionImportDiveLog_triggered();
void on_actionImportDiveSites_triggered();
/* TODO: Move those slots below to it's own class */
void on_actionExport_triggered();
@ -192,6 +193,7 @@ private:
CurrentState stateBeforeEdit;
QString filter_open();
QString filter_import();
QString filter_import_dive_sites();
static MainWindow *m_Instance;
QString displayedFilename(QString fullFilename);
bool askSaveChanges();