Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
c1209fb
add cfg
RuiZhang-kwf8 Jul 11, 2024
754b7a4
Merge remote-tracking branch 'refs/remotes/origin/casefile' into case…
RuiZhang-kwf8 Jul 11, 2024
d54881b
extract zip working
RuiZhang-kwf8 Jul 12, 2024
08e5bf7
newclass
RuiZhang-kwf8 Jul 15, 2024
adb465f
merge
RuiZhang-kwf8 Jul 16, 2024
70a1a38
initial casefile -noinputs
RuiZhang-kwf8 Jul 22, 2024
5d6ae24
inputs sort of working finally
RuiZhang-kwf8 Aug 1, 2024
0e92f00
cli scraping clean (finished)
RuiZhang-kwf8 Aug 1, 2024
0419196
dependency
RuiZhang-kwf8 Aug 1, 2024
e6e167c
casefile full
RuiZhang-kwf8 Aug 6, 2024
badb4e1
scrape3dvtk for ninjafoam
Dec 17, 2024
bd7fad5
always write vtk
Jan 8, 2025
0f68a69
naming convention fix
Mar 6, 2025
03cc35f
segfault fix for case file cli of domain average runs
latwood Mar 12, 2025
bdc0c89
fix case file vtk output in ninjafoam, wasn't getting properly genera…
latwood Mar 13, 2025
7a698db
fix case file naming method to match conventional output filenaming, …
latwood Mar 13, 2025
47bd9de
fixed difference in mesh resolution calculated and shown in the gui v…
latwood Mar 13, 2025
7e353d8
1st cleanup attempt of casefile stuff, plus make casefile renaming on…
latwood Mar 18, 2025
50efa79
1st cleanup attempt of casefile stuff continued, for issue #7
latwood Mar 19, 2025
000922d
adjusted casefile to no longer use global style variables, by setting…
latwood Mar 19, 2025
1df0527
2nd cleanup attempt of casefile stuff
latwood Mar 20, 2025
064daa4
2nd cleanup attempt of casefile stuff continued
latwood Mar 21, 2025
a84eab1
2nd cleanup attempt of casefile stuff continued, 1st pass replacing f…
latwood Mar 21, 2025
16ae1b5
2nd cleanup attempt of casefile stuff continued, renamed a lot of var…
latwood Mar 21, 2025
3430433
2nd cleanup attempt of casefile stuff continued, for issue #7
latwood Mar 24, 2025
31afa5e
2nd cleanup attempt of casefile stuff continued, for issue #7
latwood Mar 24, 2025
b2ce9b0
2nd cleanup attempt of casefile stuff, final wrapup, for issue #7
latwood Mar 25, 2025
4354129
merging casefile branch into new copy of master branch casefile-updat…
latwood Mar 27, 2025
00da1e4
changes required to compile the casefile-updated branch on windows. F…
latwood Apr 1, 2025
a1874cf
fixes to the last casefile commit, my changes for building on windows…
latwood Apr 1, 2025
f054fa7
attempted to fix the minizip "unresolved external symbol to cpl_zipOp…
latwood Apr 2, 2025
2831fe8
reverted casefile minizip back to standard GDAL VSI style zipping met…
latwood Apr 2, 2025
9f250c8
continuing first pass of casefile GDAL zipping methods. For issue #7
latwood Apr 3, 2025
06ad18d
found and fixed an error causing momentum solver multi runs with vtk …
latwood Apr 3, 2025
af60199
more correct fix to momentum solver multi runs with vtk and/or casefi…
latwood Apr 3, 2025
b959c68
figured out the windows replacement to the <mutex> library use in cas…
latwood Apr 3, 2025
1b18c42
final cleanup of casefile stuff, for issue #7
latwood Apr 7, 2025
00948fd
more final casefile cleanup, initial attempt to better handle closing…
latwood Apr 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion src/gui/WidgetDownloadDEM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ WidgetDownloadDEM::WidgetDownloadDEM(QWidget *parent)
QString pathToCerts = QString::fromStdString(pathToSslCerts);
QSslSocket::addDefaultCaCertificates( pathToCerts, QSsl::Pem, QRegExp::FixedString);


wasDemFetched = false;
elevSource = "";

demSelected = false;

setupUi(this);
setupGM();
initializeGoogleMapsInterface();
connectInputs();
this->readSettings();
this->readSettings(); // sets northBounds, southBound, eastBound, westBound initial values

progressBar = new QProgressDialog(this);
progressBar->setWindowModality(Qt::ApplicationModal);
Expand Down Expand Up @@ -211,6 +215,8 @@ void WidgetDownloadDEM::setupGM()
*/
void WidgetDownloadDEM::saveDEM()
{
wasDemFetched = true;

QVariant mbr = wvGoogleMaps->page()->mainFrame()->evaluateJavaScript("mbr()");
if(mbr.isNull()) {
qDebug()<<"no mbr";
Expand Down Expand Up @@ -372,6 +378,7 @@ void WidgetDownloadDEM::updateDEMSource(int index)
{
switch(index){
case 0: //SRTM
elevSource = "srtm";
fetcher = FetchFactory::GetSurfaceFetch(FetchFactory::SRTM, FindDataPath("/data"));
northDEMBound = srtm_northBound;
southDEMBound = srtm_southBound;
Expand All @@ -381,6 +388,7 @@ void WidgetDownloadDEM::updateDEMSource(int index)
break;
#ifdef HAVE_GMTED
case 1: //GMTED
elevSource = "gmted";
fetcher = FetchFactory::GetSurfaceFetch(FetchFactory::WORLD_GMTED, FindDataPath("/data"));
northDEMBound = world_gmted_northBound;
southDEMBound = world_gmted_southBound;
Expand All @@ -391,6 +399,7 @@ void WidgetDownloadDEM::updateDEMSource(int index)
#endif
#ifdef WITH_LCP_CLIENT
case 2: //LCP
elevSource = "lcp";
fetcher = FetchFactory::GetSurfaceFetch(FetchFactory::LCP, FindDataPath("/data"));
northDEMBound = lcp_northBound;
southDEMBound = lcp_southBound;
Expand Down Expand Up @@ -567,6 +576,36 @@ void WidgetDownloadDEM::readSettings()
longitude = 43.911944;
}

bool WidgetDownloadDEM::get_wasDemFetched()
{
return wasDemFetched;
}

std::string WidgetDownloadDEM::get_elevSource()
{
return elevSource;
}

double WidgetDownloadDEM::get_northBound()
{
return northBound;
}

double WidgetDownloadDEM::get_southBound()
{
return southBound;
}

double WidgetDownloadDEM::get_eastBound()
{
return eastBound;
}

double WidgetDownloadDEM::get_westBound()
{
return westBound;
}

/**
* @brief Handles close events of GUI such as clicking X close icon
*
Expand Down
12 changes: 11 additions & 1 deletion src/gui/WidgetDownloadDEM.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,14 @@ class WidgetDownloadDEM : public QWidget, private Ui::WidgetDownloadDEM
void writeSettings();
void readSettings();
int fetchBoundBox(double *boundsBox, const char *fileName, double resolution);


bool get_wasDemFetched();
std::string get_elevSource();
double get_northBound();
double get_southBound();
double get_eastBound();
double get_westBound();

protected:
void closeEvent(QCloseEvent *event);

Expand All @@ -89,6 +96,9 @@ class WidgetDownloadDEM : public QWidget, private Ui::WidgetDownloadDEM
private:
QDialog dlg;

bool wasDemFetched;
std::string elevSource;

double latitude;
double longitude;
double northBound;
Expand Down
Loading