Commit graph

14 commits

Author SHA1 Message Date
Dirk Hohndel
8d359f8e57 Remove obsolete slots
The .ui components were removed in commit 0c7a575f7b3b ("Rework on the
Equipment tab to make it look more Modern.") but the "automagic" slots
were still here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-23 18:35:04 -07:00
Dirk Hohndel
115e5e5fbc The never ending, futile fight for whitespace consistency
I just need to write a tool that does this...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-22 21:31:45 -07:00
Tomaz Canabrava
28deb3e65d Re Enable the option to add cylinders / weigthsystems.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-22 09:40:26 -03:00
Tomaz Canabrava
df57b657fd Rework on the Equipment tab to make it look more Modern.
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>
2013-05-22 09:17:18 -03:00
Dirk Hohndel
0d370ba108 Integrate visibility Star widget into editing flow
This also removes some incorrect code from the clear() function for the
DiveInfo tab. Putting the readOnly() calls for the DiveNotes tab there was
wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-20 06:25:16 -07:00
Dirk Hohndel
9ffa37ab6f Rename buttons for dive edit
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>
2013-05-19 12:59:36 -07:00
Dirk Hohndel
a4f243dfac Make direct edit the style of choice
Plus minor coding style fixes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-19 09:00:57 -07:00
Tomaz Canabrava
55b998d528 Improve the Dirk edit mode.
The dirk edit mode will be triggered as soon as the user
clicks on the field that he wants to edit. then he can
edit all fields, till he press ok / reset.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-05-19 11:45:01 -03:00
Tomaz Canabrava
c5e7a025e4 Added option to edit the selected dive.
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>
2013-05-18 17:06:48 -07:00
Tomaz Canabrava
06eab74a72 Added the code to populate the tabs when a dive is selected.
So, this is what happens now:
Every tab should be populated from updateDiveInfo method, it will be
called whenever a new dive is selected
I'm already populating the 'notes' box to show how it can be done.
If you are unsure what's the name of anything, open the file maintab.ui on
the designer, click on the item and check its objectName, the access is
ui->objectName from here on.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-06 09:58:13 -07:00
Dirk Hohndel
04e59a0e1c Hook up adding a weightsystem
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-01 14:43:07 -07:00
Dirk Hohndel
f5c958ad73 Add Qtr_ macros that uses gettext in a tr() compatible manner
This should wrap gettext nicely and replace the "_()" macros we use in C
code.

Also added comments to the top of all the new files.

Suggested-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-13 20:44:02 -07:00
Tomaz Canabrava
92397a2bad Started the real code on the Qt Interface.
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>
2013-04-13 14:08:16 -07:00
Tomaz Canabrava
ba712c3b54 Start creating the Qt UI
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>
2013-04-07 15:59:33 -07:00