summaryrefslogtreecommitdiffstats
path: root/qt-ui
AgeCommit message (Collapse)Author
2015-02-13Adapt GPS coordinate download from our companion app to dive sitesGravatar Dirk Hohndel
This is a bit awkward now. We are downloading what looks like fake dives in the v2 format. So we create a dive site for every single fix. After we merge those new dive sites into the existing dives we need to throw away all the dive sites that weren't used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13maintab change for get_dive_site_uuid_by_nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Get location for Facebook from dive siteGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Get location from dive site for printingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Remove coordinates from main tabGravatar Dirk Hohndel
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>
2015-02-12Make filters work with dive sitesGravatar Dirk Hohndel
This simply tracks the names - if we have multiple dives sites with the same name but different other data (e.g. different GPS), we could easily get this right (well, somewhat easily, it's a UI question), but for that we'd have to filter for dive site uuid instead of for dive location name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Switch components for cut/paste dive to dive site logicGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show dive site name in dive listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Correctly connect the maintab to dive site managementGravatar Dirk Hohndel
We now have a working uuid - use it. And populate the fields accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Make editing a location work with dive sitesGravatar Dirk Hohndel
Not sure if this is the final implementation, but at least for simple cases it works now. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Clear the location if we have no dive siteGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Update completion model for dive site namesGravatar Dirk Hohndel
This way the drop down works again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show dive coordinates on map based on dive siteGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show GPS coordinates based on dive site on MainTabGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Show location based on dive site on MainTabGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Remove redundant functionGravatar Dirk Hohndel
We had two functions doing exactly the same thing. Let's drop the one with the highly confusing name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Pass a fake dive site UUID to the callback.Gravatar Tomaz Canabrava
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>
2015-02-11Copy the name and the coords when entering the EditDiveSite stateGravatar Tomaz Canabrava
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>
2015-02-11Accept / Cancel location editGravatar Tomaz Canabrava
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>
2015-02-11Enable the location edit widget on mainwindowGravatar Tomaz Canabrava
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>
2015-02-11Create a new state for the MainWindow: EditDiveSiteGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Create simple class to hold the location management.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11More meaningfull names for the ui elements.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Add the ui file for the location informationGravatar Tomaz Canabrava
Just the xml file for the Ui location information. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11mainwindow.cpp: don't use ui.globePaneGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Add option to undo deleted divesGravatar Grace Karanja
Add ability to undo deleted dives by storing a list of the deleted dives in a QUndoCommand. Signed-off-by: Grace Karanja <gracie.karanja89@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Add a structure to hold undo commandsGravatar Grace Karanja
Add the undocommands.cpp / undocommands.h files, which will hold a collection of classes that will hold undo commands. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Add undo stackGravatar Grace Karanja
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>
2015-02-11Reverse undo bufferGravatar Grace Karanja
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>
2015-02-10Fix a regression on selection caused by the new interface codeGravatar Tomaz Canabrava
In the designer we set the selection type to extendedSelection but since I removed the widget from the designer, I also had to set it in the code. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Add a new button on the MainTab to handle management of geo locationsGravatar Tomaz Canabrava
Just a button on the UI. This moves the layouts around, in an attempt to make them less obtuse. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Fix build without marbleGravatar Tomaz Canabrava
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>
2015-02-10Remove unused enumsGravatar Tomaz Canabrava
Thuis is garbage from the old code. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Change the order of the quadrantsGravatar Dirk Hohndel
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>
2015-02-10Rename the widget to better reflect what it doesGravatar Dirk Hohndel
This widget defines what's in each quadrant of the main window. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Fix broken connectionGravatar Tomaz Canabrava
The old way of creating the mainwindow made things a bit dependent of the order of initialization, and we don't assume that anymore. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Remove the flicker issue and the resize issue.Gravatar Tomaz Canabrava
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>
2015-02-10Don't set the state if it's the sameGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Save the size of the widgets to restore it later.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Finish the cleanup of mainwindow.uiGravatar Tomaz Canabrava
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>
2015-02-10Move the Profile out of the mainwindow.uiGravatar Tomaz Canabrava
And place it in mainwindow.cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Remove the ProfileWidget from mainwindow.uiGravatar Tomaz Canabrava
It is now in mainwindo.cpp Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Remove the PlannerWidget from mainwindow.uiGravatar Tomaz Canabrava
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>
2015-02-10Remove information panel from mainwindow.uiGravatar Tomaz Canabrava
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>
2015-02-10Remove the Globe from the mainwindow.uiGravatar Tomaz Canabrava
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>
2015-02-10Remove the DiveList from the mainwindow.uiGravatar Tomaz Canabrava
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>
2015-02-10Correctly set up the Planner stateGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-10Create the method that changes the state of the applicationGravatar Tomaz Canabrava
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>
2015-02-10Change splitter names to something more meaningfullGravatar Tomaz Canabrava
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>
2015-02-10Add the PlannerDetails classGravatar Tomaz Canabrava
This is the last of the current dialogs to be ported to the new widgets system. now we need to clean the mainwindow of the old code. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>