aboutsummaryrefslogtreecommitdiffstats
path: root/qthelperfromc.h
AgeCommit message (Collapse)Author
2015-10-04Print paths to internal files in verbose modeGravatar Robert C. Helling
When run with -v option, this prints local file names like the path to the local git repository and the hash file. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-23Add helper function to safely move away file or directoryGravatar Dirk Hohndel
Try numberical suffix until you find one that isn't used yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-09-17Hash images upon loading divelog file rather than when loading imageGravatar Robert C. Helling
Up to now, we only computed hashes of images upon actually displaying the images. With this patch we start to compute hashes once we load the xml or from git. This happens in the background, so the user should note an increased CPU load only once per divelog. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-21HTML export: need to work harder to find the picturesGravatar Dirk Hohndel
Simply looking at the filename in the picture structure isn't enough (now, arguably one might say that it should be and that that data structure should be updated, but that's not how other parts of Subsurface have implemented things so I don't want to break that assumption here). So instead we look up where the pictures actually was loaded from and then copy that file into the right location. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-21Git storage: implement picture loading from gitGravatar Dirk Hohndel
The interesting challenge here is what to do with the picture data stored in the git repository. If the pictures are already in the file system (for example because Subsurface is runnin on the same machine that this data file was saved on) it would be silly to extract them again every time the dive log is opened. So instead we try to figure out if the pictures can be located and only create local copies of them if that isn't the case. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-21Add helper function to return local filename of picture as C stringGravatar Dirk Hohndel
This way we can actually find the picture that we are showing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-21Move helper declarations into a better header fileGravatar Dirk Hohndel
This way the helpers can be more easily used by other modules. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Add helper function to create a directoryGravatar Dirk Hohndel
Yes, this could easily done from the C code. But this seems just so much easier and I don't have to worry about the oddities of Windows and all that. I'm lazy. So sue me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-13Don't show an error if you fail to open the cloud storageGravatar Dirk Hohndel
The lower level functions will already report that things didn't connect successfully, no reason to repeat it here (which then exposes the git URL). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Indicate that there are unsaved changes with a '*' in the window titleGravatar Dirk Hohndel
This seems to be a fairly common way to indicate this property. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-06-12Add header for Qt helpers used from C functionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>