Removed the grid lines of the table views, this makes the table view
more similar with the dive list - I'm searching for an application
identity here.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Remove the vertical header on the cylinder and weigth edit,
It was strange to show, since we don't show a thing there.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Better handling of default sizes on the Cylinder and weight widgets,
the weigth widget didn't had a CSS applied so it looked odd compared
to the cylinder one, also the default behavior for the combobox delegate
didn't worked very well with the css applied, being too small.
this patch fixes that.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
While we still show the selected_dive in the profile and use it for Dive
Info and Equipment, in the Dive Notes tab we now show the trip location
and trip notes (and none of the other fields), if the user directly
selects a whole trip by clicking on the trip header.
This clever reuse of the widget now allows trip location and notes to be
edited in place.
As a side note: the Gtk version has long allowed the user to edit the
trip location and trip notes, but nowhere did it ever SHOW the trip
notes... so this is more than just feature parity...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit c4f06dc536 introduced Document
Mode on the MainTab QTabWidget. This doesn't look good on MacOSX.
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
The equipment tab will still show all defined gases, but the info for
the dive should only list the ones used.
Also change the name of the two gas related boxes to better reflect the
data that is shown.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simply renaming all the elements with name conflict. None of these names
appear to be referenced anywhere so this seems like a rather odd thing to
happen - why doesn't the tool just rename them for me when I open and
close the file in designer? Or at least warn about it?
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This moves the contents of the statistics tab to groupboxes,
so it's similar to what we had in GTK, but a bit prettier.
it's not what I plan to do in the final form, since I think
that a few 'min max avg' can be in it's own widget ( and maybe
a cute graph showing the values would also be nice. ) but its
an improvement from what we had.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
There was already a code for that on the maintab.cpp, but
since I moved all labels to groupboxes, the code stopped
working, and I tougth it'd better to kill the code since
it's faster and safer to use the interface builder for that.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This is a redesign-tryout of the info panel, it's not the way
that I want to do, actually - I think that textual representations
are quite boring, and we can do much better if we use better widgets,
for instance, a Calendar to show the date, a Termometer to show
the temperatures and so on. This version has a fixed layout, but
I'll most probably try to make it more dynamic in the future.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This small patch enable maintab to be in 'Document Mode', this means
basically that it size is smaller and there's not a line separating
the widget anymore, giving the user a more smooth experience.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Use the more familiar Save/Undo instead of OK/reset
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Note that this is a WIP and it does break functionality
- ie, not possible to add Equipments, but this will be
fixed in the next commit. Removed add / edit / remove
buttons, only a single '+' icon appears on the widget
now. the edit / delete will be done in place.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
It's not editable. And of course it continues to look like utter crap -
even more so now since this is left aligned and everything else is
centered.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The old names made sense in the initial model (where you'd click on the
edit button to start an edit). The new names seem much more natural given
what we do now.
Also a tiny code cleanup removing a redundant if statement.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Added option to edit the selected dive.
Now the user can click on 'Edit', and a nice box will
appear stating that the dive is in edit mode, and the user
can edit all of the 'Notes' tab fields, including the
rating. When the edition is finished, the user needs to
click on 'edit' again to mark as accepted, or in
reset to reset the fields to it's original state
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Rename various labels and text into clear pairs and reflect changes into
.cpp file.
To avoid clashes with names on other tabs use '..All..' to emphasise
that this page deals with an aggregate across the selected dives.
Re-format the statistics tab.
Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Clean up the formatting.
Distinguish between headings and value labels.
Tidy up text appearance (remove trailing ':')
Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
1 - Open File already open files, it tries to not break the Gtk version,
but some methods on the GTK version still need to be called inside Qt
because the code is too tight-coupled.
2 - Close file already close files, same comments for the open file dialog
applies here.
3 - The code for adding new cylinders in the cylinder dialog is done,
already works and it's integrated with the system. There's a need to
implement the edit and delete now, but it will be easyer since I'm
starting to not get lost on the code.
4 - Some functions that were used to convert unities have been moved to
convert.h ( can be changed later, put there because it's easyer to
find something that converts in a convert.h =p ) because they were
static functions that operated in the GTK version but I need those
functions in the Qt version too.
[Dirk Hohndel: lots and lots of whitespace and coding style changes]
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Names for individual tab widgets were not specific and caused warnings
from UIC. Rename the individual widgets to reflect purpose.
[Dirk Hohndel: removed some of the hunks that appeared to be unintentional
changes not mentioned in the commit log]
Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is based on several commits from Tomaz - mingled together and mildly
extended by Dirk (mostly Makefile hacking).
All Qt UI related stuff should eventually move into the qt-ui directory.
So the Makefile rules for moc and uic have been adjusted accordingly.
The MainWindow class has been moved into its own file in qt-ui (but just
with a placeholder, the existing class has simply been ifdef'ed out in
qt-gui.cpp for the moment).
We still have a couple of Qt things in qt-gui.cpp in the main directory...
all this needs to move into the qt-ui directory and be built with separate
.h files. Right now we have the one-off Makefile rule to create the
qt-gui.moc file from the qt-gui.cpp file.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>