Skip to content

Various small fixes to the Qt6 GUI#748

Open
latwood wants to merge 9 commits intomasterfrom
GUI-Redesign-someFixes
Open

Various small fixes to the Qt6 GUI#748
latwood wants to merge 9 commits intomasterfrom
GUI-Redesign-someFixes

Conversation

@latwood
Copy link
Collaborator

@latwood latwood commented Mar 20, 2026

Fix setting stability flag in the new Qt6 GUI, port over remaining old qt4 GUI checkDemFile() check methods (fixes #731), port over old qt4 GUI writeToConsole() methods (fixes #711), port over old qt4 GUI NO_DATA surface_fetch check and fill methods (fixes #740).

latwood added 9 commits March 16, 2026 13:45
…tally had it use the diurnal flag instead of the stability flag. Should be fully fixed now
… instance of "writeToConsole()", "qDebug()", "qInfo()", "qCritical", "std::cout", "std::cerr", and especially "CPLDebug()" and "CPLError()", and added them to the corresponding places as best I could in the qt6 GUI code. I decided to skip the remaining message printing methods ("QMessageBox", the state checking code, and "QProgressDialog") alone for now. For issue #711.

The intent is to do another commit to clean each of these instances up, keeping what we actually want. This commit makes it clear what instances of message printing could be found in the old qt4 GUI code.

I did skip just a few message printing instances where we hadn't implemented the coding methods yet, and likely wouldn't. Examples include "mainWindow::createTimers()" which only occurred during "cancelSolve()", "mainWindow::getLatLon()" which I think could actually be a pretty cool "menuBar.cpp" utility but not yet, and a few pointInitialization "CPLGetConfigOption()" methods for writing out metaData and interpolated csvs and updating time stuff (WRITE_CSV, FETCH_METADATA, CHANGE_DATE_TIME). I did at least kind of port over the CUSTOM_API_KEY method, though seems like it should be put into the raw point initialization code rather than the GUI maybe. I did attempt to port over the timeZone stuff, but the methods were so different and maybe the new methods still need some refining, that it really didn't fit very well.

Anyhow, next commit will be cleaning up what I've added in this commit, hopefully it goes well.
…f8c72, also edited by commit d33d242, and cleaned up the code. For issue #711.

I tried to toss out as much code as I could, dropping what doesn't make sense to keep and what we no longer wanted. But I also revised the leftover code to make as much sense as possible.

Still probably a bit more revision to do, some more code could be dropped, but the bulkier parts of excess code from the old qt4 GUI have now been dropped.
…ded code, other than the synoptic api key stuff, for issue #711.
…s code. For issue #711.

technically, I should have probably moved it into the closest thing to a "start" fetch station download function, within pointInitialization.cpp itself, dropping the synoptic api key stuff from cli.cpp as well. BUT, the way pointInitialization.cpp is currently organized, it is still a bit too confusing to tell which is the true initializer function, while still being later than the initial constructor, the closest thing I found was "wxStation::SetStationFormat()", but that is in a separate class. Anyhow, hopefully this is good enough for now.

I almost tried migrating the other two "CPLGetConfigOption()" point initialization calls from the old qt4 gui as well, WRITE_CSV and FETCH_METADATA, but this was being done at the END of the solve function, so it didn't seem like an easy thing to just place into the code. Might be better to try to track down some earlier pointInitialization.cpp function to throw those in first, they are NOT in the cli.cpp file. For sure, cleanup the pointInitialization.cpp methods FIRST before more of this type of migration work, if able.
… adapted and refined to the qt6 GUI. I also updated the WARNING color, from yellow, to dark orange. For issue #740.

I think the overall method is finally robust, there still feels like some extra logic going on within the dem download NO_DATA check and fill function, but it at least works.

Though, I am a bit concerned about using a result >= 0, this assumes that surface_fetch errors are always < 0, and only NO_DATA cause a result > 0. NINJA_SUCCESS is 0. This led to some quirky checking changes to the ninjaTools surface_fetch methods.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants