Back in 4867ee8ad8 ("Move the Profile out
of the mainwindow.ui") the way to access the PlannerDetails object
changed.
This does the corresponding change to the NO_PRINTING block, making it
build on Android again.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is another long operation that needs showing a notification about
importing the old format log files
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Showing an Error message is better called from the Notification Object,
So for consistency old references to showError is replaced by calling
the notification object.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The main error message bar can be used to show exporting information and
other notification.
So a new Notification handler object is created in the main window
<NotificationWidget> that inherits <KMessageWidget> that shows different
type of notifications, ex. (Warning, Error and information)
Also this class contains a QFutureWatcher object that is set to handle
the QFuture variable returned from the exporting thread. this will allow
the UI to be updated when the thread finishes execution.
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This addes a menu entry for the user to select a directory that is recursively
traversed to look for image files and compute the hashes of those images (for
those images to be available to be displayed in dives according to their hash values).
This traversal and hash computation happens in and independend thread and so far
the only feedback to the user is that upon completion the dispayed images are updated.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Upon successfull reading an image file, this computes a SHA1 hash of the
image and saves it with the picture tag in the log file. When a file is
not successfully loaded (for example because the log was created on a
different computer) we look up the hash in a dictionary that maps hashes
to local file names.
That dictionary (actually two for both directions), is loaded on startup
and saved upon destruction of the main window.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is somewhat invasive as aborting the XML file read requires us to
report things up the recursive parsing chain.
What we really need to do here is to ask the user how they want to use the
data from reverse geo lookup. But for now we only warn about the fact that
this can take a while.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
version.c is now object code which is recompiled each time
ssrf-version.h changes, while the interface file version.h
remains that same at all times and files which include it
will not need to be recompiled.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we accept a change on the dive site management screen, it needs to be
reflected on the Dive notes tab right away.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And hook things up when double clicking the globe.
The user experience isn't consistent with what we do on the main tab
(i.e., no coloring of fields that are changed), but it seems to work.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It seems to make sense to only have them on the dive site screen. For the
main UI they were redundant (we have the map) and not all that useful. The
only time people would want them is if they wanted to manually add GPS
coordinates for a dive, but that should now be done via the dive site UI.
There are a couple of FIXMEs in the code and a few code blocks that have
been commented out as they will be needed in one form or another once this
GPS handling is done on the dive site UI, which right now it is NOT.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is the start of the preparations to edit the dive site,
passing a uuid so we can retrieve it later.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Name and coords of the current dive are copied to the edit dive site
screen.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make it possible to cancel or accept the location edit and
get back to the mainwindow default state.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Clicking on the 'Manage' button now brings you to the widget to manage it.
Nothing has been added on it yet.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add an instance of QUndoStack in the mainwindow, and add undo/redo
actions in the edit menu. The QUndoStack will have a collection
of QUndoCommands to process the undo and redo events.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Reverse all the code using the UndoBuffer class so that we can
use the QUndoStack and QUndoCommand classes. These are Qt's own
inbuild undo framework classes, offering a better undo/redo
process.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we have an null widget, we hide the stack.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
At least to me it seems more natural to enumerate them row by row instead
of column by column, so now we do
1 2 instead of 1 3
3 4 2 4
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The flicker was caused by removing all widgets (and thus setting
the size of the splitter to zero) and then re-adding them.
I've added four QStackedWdigets that have a consistent size and
the only thing I do now is to set the corresponding widget to visible
without removing / readding anything, and thus, not messing with
the sizes.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is the last patch in the series of clearing up the
mainwindo.ui. Now to bugfixing.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Now it uses the states on the mainwindow.cpp and it's finally
starting to be worth the hassle of reworking the UI.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Now it's created in the mainwindow.cpp as part of the new
way to configure the interface.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Now it's started from mainwindo.cpp and it's part of the
new states
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It's now set up from the mainwindow.cpp file.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Not used yet. The idea is to call 'setApplicationState("plan");'
and all widgegts for plan will be magically setup because we
added the plan state with registerApplicationState.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
listGlobe and infoProfileSplitters weren't good names as
now we will be able to create more types of widgets there
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The Plan mode still misses a widget that was done directly inside
the mainwindow. I'll extract it from there and create a proper
class in the next commit.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This will be used to set the 'default' state. The other
two possible states right now are plan and add; those will
be created right next.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
two #ifdef NO_PRINTING one over the other, merged them together.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This function registers the different widget layouts
that we will have in subsurface. Currently we have three layouts
(default, plan, add) and a few more are comming (for instance
location) and the code is scattered around. It was making me
unconfortable.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add an edit menu with undo and redo submenus, and connect them to
the UndoBuffer class. The submenus are only enabled when needed.
Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adding support for importing .apd files (APD Log Viewer). They are CSV
files and already supported in CSV import, but the file extension .apd
is added here.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of inventing another way to do this (and inevitably forgetting a
path where this should be re-enabled) I renamed the DcShortcup related
function and made them enable/disable the copy and paste shortcuts as
well.
Of course there now is one exception (isn't there always?): in "ADD" state
we don't want to be able to switch DCs, but we do want to be able to
paste.
Fixes#825
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>