summaryrefslogtreecommitdiffstats
path: root/Makefile
AgeCommit message (Collapse)Author
2013-09-17Update installer so we can cross-build for WindowsGravatar Dirk Hohndel
Marble doesn't work, yet (Google Maps aren't loaded), but at least Subsurface starts under Windows with the installer built. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-09-09Use the same code for command line and gui for file handling.Gravatar Tomaz Canabrava
The Command line execution of Subsurface happened before the GUI was created, this leaded to various bugs by me(tm) over time. This patch seems to fix all of those, by reusing the same code for GUI interaction and CommandLine interaction. I had to rework how the main.c worked, it used to be C code calling C++ code, and this is non desirable, since C doesn't really understand C++. I Moved all of C-related code to 'subsurfacestartup.c/h' and created a tiny wrapper to call it, so all of the C code is still C code, and the new main.cpp calls the mainwindow->loadFiles and mainWindow->importFiles to get rid of the bugs that happened before. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-09-02Code Cleanup: Merged the three TableViews shared codeGravatar Tomaz Canabrava
Merged the shared code for the three table views into one code, this way less code is needed if we need to construct another tableview in the future. I still need to clean some of the models too. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-08-13Added classes to handle the Completion of Dive Editions.Gravatar Tomaz Canabrava
Added classes to handle the completion of dive editions, the classes are BuddyCompletionModel, DiveMasterCompletionModel, SuitCompletionModel and LocationCompletionModel, thanks to plain old C macros, code got really small. and I hope the logic is better than the Gtk version. :) Now next step is to integrate it to the Ui. shouldn't be hard. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-07-19Fix compile on clean sourceGravatar Miika Turkia
Fixes #163 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-07-10Print: add a class for print layoutingGravatar Lubomir I. Ivanov
PrintLayout is a class that will handle the layouting part of dive profiles, text, tables depending on the settings of a QPrinter and the PrinterDialog and PrintOptions instances. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-09Print: add UI for a print dialogGravatar Lubomir I. Ivanov
PrintOptions is a QWidget class to be used as an addition to a future print dialog (possibly based on QPrintDialog). Currently only contains a couple of radio buttons. PrintDialog (printdialog.cpp/h) which is a basic QDialog is currently added for testing only and it holds an instance of PrintOptions. Calling File->Print opens this test dialog for now. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-02Added 2 new files to handle the common stuff for graphics.Gravatar Tomaz Canabrava
Added 2 new files, graphicsview-common.h/cpp, that should have the common stuff shared between the dive profile viewer and the dive planner. the amount of duplicated code would be huge if we go the road of two different classes for each one, but since the planner took a more 'Qtish' way of behavior, in comparisson to the profile - that's most a Cairo-To-Qt literal translation, we cant easily merge the code without a complete ( and unwanted ) reestruturation of the profile code, thus, this new files will serve as a bridge between them. Initially I put there only the colors - since that's wat most easilyy shareable. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-24Enable downloads from the UEMIS ZurichGravatar Dirk Hohndel
This behaves somewhat differently from the Gtk version - still needs more investigation. But at least now it's hooked in. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-24Add an 'About' dialog for the Qt UIGravatar Lubomir I. Ivanov
The dialog is similar to the one in the GTK version Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-23Start hooking in the deco calculationsGravatar Dirk Hohndel
I expanded the DiveHandler to include the actual time / depth of each node on the graph - this way things will stay consistent if we need to rescale the graph. One thing that this makes obvious is that the whole design for the planner so far assumes metric data. We need to make sure this works well with feet instead of meters as well (and that it uses the information in the units settings). With this change we actually create a dive based on the plan input and add the deco stops (if needed) to it - but we don't do anything with the results of those calculations, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-20Added the first scope of the visual dive planner.Gravatar Tomaz Canabrava
Added the first files and skeleton code for the visual dive planner. now I need to fill things. The code is using the print action borrowed, this will need to move to a better choice in the future. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-18Converting the device_info list into a Qt data structureGravatar Dirk Hohndel
This data structure was quite fragile and made 'undo' when editing rather hard to implement. So instead I decided to turn this into a QMultiMap which seemed like the ideal data structure for it. This map holds all the dive computer related data indexed by the model. As QMultiMap it allows multiple entries per key (model string) and disambiguates between them with the deviceId. This commit turned out much larger than I wanted. But I didn't manage to find a clean way to break it up and make the pieces make sense. So this brings back the Ok / Cancel button for the dive computer edit dialog. And it makes those two buttons actually do the right thing (which is what started this whole process). For this to work we simply copy the map to a working copy and do all edits on that one - and then copy that over the 'real' map when we accept the changes. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-06-07Created a new dialog - Edit DiveComputerGravatar Tomaz Canabrava
Created a new dialog, Edit Divecomputer, it will currently only lists the divecomputers that are used on the xml file. I used the same method that the gtk version used, but only 2 divecomputers got visualized in the dirk dive data. I'll assume that it's correct and will fix it in the next couple of commits. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-06Added initial support for download dive info from the subsurface web service.Gravatar Tomaz Canabrava
Added initial support for download dive info from subsurface web service, the current code only downloads and output the xml downloaded in the debug area. Now I need to parse things up and plug the unplugged stuff. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-06-04Added a new widget 'MinMaxAvgWidget'Gravatar Tomaz Canabrava
Added a new widget, MinMaxAvgWidget, a simple widget that displays values in 'min, max, avg' fashion. it has a setMaximum, setAverage and setMinimum methods, that is userful for setting the minimum, maximum and average of stuff. Ah, it also shows the minimum, maximum and average of things. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-31Create and install the documentation tooGravatar Thiago Macieira
The default build will now create the HTML documentation (only the HTML one) and the install rule will install it. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Do a better job finding Marble Google Sat filesGravatar Dirk Hohndel
First try if Google Sat is already installed as a provider (and just use it if it is). Then use the executable path to make an educated guess where these files might be found as part of Subsurface. We now install the necessary directory tree under $(DESTDIR)/usr/share/subsurface/marbledata Still far from perfect - but this should work at least on Linux. MacOS will need a different modifier for the path and Windows I haven't even thought about, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-30Stop building prefs.cGravatar Dirk Hohndel
The only tiny function in there that was still needed seems to fit nicely into main.c Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-24Added support for a preliminary Preferences DialogGravatar Tomaz Canabrava
Dirk asked me to try to make it more modern, so I used as a base, the Firefox preferences. currently it saves / loads the preferences, and also smits a signal 'preferencesChanged' that should be connected to anything that uses preferenes, via the PreferencesDialog::intance() object. In the future, I plan to make it have a signal / slot for each member that changes. I also moved the icons to a new folder this time, because the amount of icons is now more than just two, and it was becoming messy. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22Removed the unused add cylinder and add weigthsystem dialogs.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Populate the Vendor && Dive computer information.Gravatar Tomaz Canabrava
This uses the QStringListModel to populate the items of the QComboBoxes. I used a QHash to hold every Computer of a particular Vendor. so, products[vendor] gives me the full list of products from each vendor. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-20Skeleton code for a non-blocking UI thread for downloading dives from the DCGravatar Tomaz Canabrava
This is the skeleton code for a non-blocking ui-thread It already creates the first-thread ( 'do not block the ui' ) and the second thread ('download from the dive computer') We can in the future merge both in the same place - I didn't want to do that now because the download function is written in the libdivecomputer.c code, and I cant just transform that to a QThread and use signals, so I used two threads for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-18Add a variable for the Marble library nameGravatar Thiago Macieira
I need that for a Marble installed somewhere other than the linker's default search path. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-18Work around broken Marble on DebianGravatar Dirk Hohndel
This is a major hack. Debian appears to be missing a necessary header file for Marble to work correctly. We include this header file for now and hack the Configure process to recognize that we are on Debian and force using our local copy of the header file in that case. This may be needed on Ubuntu as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-17Merge branch 'Globe' of https://github.com/tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-05-17Merge branch 'Qt'Gravatar Dirk Hohndel
After the 3.1 release it is time to shift the focus on the Qt effort - and the best way to do this is to merge the changes in the Qt branch into master. Linus was extremely nice and did a merge for me. I decided to do my own merge instead (which by accident actually based on a different version of the Qt branch) and then used his merge to double check what I was doing. I resolved a few things differently but overall what we did was very much the same (and I say this with pride since Linus is a professional git merger) Here's his merge commit message: This is a rough and tumble merge of the Qt branch into 'master', trying to sort out the conflicts as best as I could. There were two major kinds of conflicts: - the Makefile changes, in particular the split of the single Makefile into Rules.mk and Configure.mk, along with the obvious Qt build changes themselves. Those changes conflicted with some of the updates done in mainline wrt "release" targets and some helper macros ($(NAME) etc). Resolved by largely taking the Qt branch versions, and then editing in the most obvious parts of the Makefile updates from mainline. NOTE! The script/get_version shell script was made to just fail silently on not finding a git repository, which avoided having to take some particularly ugly Makefile changes. - Various random updates in mainline to support things like dive tags. The conflicts were mainly to the gtk GUI parts, which obviously looked different afterwards. I fixed things up to look like the newer code, but since the gtk files themselves are actually dead in the Qt branch, this is largely irrelevant. NOTE! This does *NOT* introduce the equivalent Qt functionality. The fields are there in the code now, but there's no Qt UI for the whole dive tag stuff etc. This seems to compile for me (although I have to force "QMAKE=qmake-qt4" on f19), and results in a Linux binary that seems to work, but it is otherwise largely untested. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-17Borrowed the KMessageWidget code to better show passive information.Gravatar Tomaz Canabrava
Borrowed the code from KMessageWidget from Aurelian Gateau, Kdelibs, to better show passive information and notifications. instead of a popup blowing in the user's face, a nice, animated and well designed widget will gracefully fade-in, show the notes, and fade out when not needed anymore. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-17Adds preliminary support for Marble WidgetGravatar Tomaz Canabrava
Adds preliminary support for marble widget, alongside with the dive list. my idea is to let the view stay there at the left of the dive list since we got a lot of unused space and a globe is something nice to have - so you can look around where did you dived, the dives near the one that's currectly selected, and so on. I'm not using OpenStreetMaps right now, but a good thing about marble is that it is skinnable - so for instance, a dive school could present a dive lesson using subsurface with a globe from the 1600, to make it feel like 'history'. This version will only compile to Qt4. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-14Fix Windows cross buildGravatar Dirk Hohndel
commit 59294029f3d1 ("Capitalize package name and add capitalized tar-ball prefix") had an unintended side effect: the cross build for Windows on Linux no longer worked (as it set NAME=subsurface.exe). Fixed this by introducing a TARGET variable that is derived from $(NAME). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Bump Makefile version to 3.1Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Capitalize package name and add capitalized tar-ball prefixGravatar Cristian Ionescu-Idbohrn
Name and capitalized name of the project are set in the first two lines of the Makefile and referenced everywhere else through variabled instead. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Make silent make optionalGravatar Dirk Hohndel
Backport of Thiago's commit 612a6ee2f793 ("Make the "silent mode" compilation be optional only.") from the Qt branch. Requested-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-13Nuke debian patch disable-git-version.diff.Gravatar Cristian Ionescu-Idbohrn
Running: $ git describe in a code tree lacking dir .git (unpacked release tar-ball, for example) throws an error: fatal: Not a git repository ... and that's noise that can be avoided. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-12Use `git archive' instead of `tar'.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-12A release includes a tar-ball.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-11Disable non-functional Cochran codeGravatar Dirk Hohndel
There's no point in compiling this into the binary. It does not work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-11Try to add required dependencies to get https working on WindowsGravatar Dirk Hohndel
This clearly isn't enough. But I simply can't seem to get this to work... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-09Make sure .xsl files are installedGravatar Henrik Brautaset Aronsen
xslt/commonTemplates.xsl was missing from the install targets Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-09A lame start for a `make release' helper.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-06Start populating the maintab Dive Info widgetGravatar Dirk Hohndel
Establish some useful helpers and use them when updating the values. One of the helpers (from statistics.c) puzzlingly doesn't link - so that's ifdefed out. Also had to re-arrange the settings reading code (it came too late) and to extract the expanding code of the top dive from the settings reading code (as it had no business being there to begin with). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-04Started the code for the Profile PlottingGravatar Tomaz Canabrava
This small patch adds a new class - ProfileGraphicsView it's a QGraphicsView based class that will holds all graphics-items for the plotting. The setup is simple, just call ui->ListView->plot( dive ) ( that's already a ProfileGraphicsView and magic will happen. Since Im using a QGraphicsView , the size of the canvas doesn't matter and I'm fixing it at 0,0,100,100. when a resize is done, the resizeEvent will be called, fitting the scene's rectangle on the view. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-03Fix Mac buildGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-03Remove the majority of the Gtk related codeGravatar Dirk Hohndel
- rip all Gtk code from qt-gui.cpp - don't compile Gtk specific files - don't link against Gtk libraries - don't compile modules we don't use at all (yet) - use #if USE_GTK_UI on the remaining files to disable Gtk related parts - disable the non-functional Cochran support while I'm at it Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-02Separate pushing a new pot file to Transifex from pulling translationsGravatar Dirk Hohndel
This avoids all the unnecessary updates to the POT date. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-01Create Add Weightsystem dialogGravatar Dirk Hohndel
My first attempt to create a Qt dialog and to hook it up with the program. Unsurprisingly this doesn't quite work as expected (i.e., the values I enter aren't populated in the model), but it's a start... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-27Added support for showing the Stars on the DiveTableGravatar Tomaz Canabrava
For the stars on the dive table I had to rework a bit my StarRating widget, because it used a pixmap for each widget that were created. Not it uses only 2 pixmaps: the active and inactive ones. A new file was created named modeldelegates(h, cpp) that should hold all delegates of the models. For the GTK / C folks, a 'Delegate' ia s way to bypass the default behavior of the view that's displaying the data. I also added the code to display the stars if no delegate is set ( good for debugging. ) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-04-23Clean up the moc intermediates too in make cleanGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-04-23Add support for Qt resources in SubsurfaceGravatar Thiago Macieira
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-04-23Add a SOURCES variable to the Makefile, replacing OBJSGravatar Thiago Macieira
Instead of listing objects, let's list sources. This matches also what qmake and most other buildsystems do. The notable exception is the kernel. The reason that listing the sources will be interesting is because I'm about to add rules to create the dependency files. Signed-off-by: Thiago Macieira <thiago@macieira.org>