OGS
LastSavedFileDirectory Class Reference

Detailed Description

Definition at line 22 of file LastSavedFileDirectory.h.

#include <LastSavedFileDirectory.h>

Static Public Member Functions

static const QString getDir ()
 Returns the directory last used for saving a file.
 
static void setDir (const QString &path)
 Sets the directory last used for saving a file.
 

Member Function Documentation

◆ getDir()

static const QString LastSavedFileDirectory::getDir ( )
inlinestatic

Returns the directory last used for saving a file.

Definition at line 26 of file LastSavedFileDirectory.h.

27 {
28 QSettings settings;
29 return settings.value("lastSavedFileDirectory").toString();
30 }

Referenced by SaveMeshDialog::SaveMeshDialog(), MainWindow::callGMSH(), StationTreeView::exportList(), StationTreeView::exportStation(), MeshView::exportToShapefile(), SaveMeshDialog::on_selectDirButton_clicked(), MainWindow::save(), StationTreeView::writeToFile(), and GeoTreeView::writeToFile().

◆ setDir()

static void LastSavedFileDirectory::setDir ( const QString &  path)
inlinestatic

Sets the directory last used for saving a file.

Definition at line 33 of file LastSavedFileDirectory.h.

34 {
35 QFileInfo fi(path);
36 QDir dir = QDir(fi.absolutePath());
37 QSettings settings;
38 settings.setValue("lastSavedFileDirectory", dir.absolutePath() + "/");
39 }

Referenced by SaveMeshDialog::accept(), StationTreeView::exportList(), StationTreeView::exportStation(), MeshView::exportToShapefile(), MainWindow::save(), StationTreeView::writeToFile(), and GeoTreeView::writeToFile().


The documentation for this class was generated from the following file: