aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-12-01Profile: avoid potential crashGravatar Dirk Hohndel
If things go as planned, then the length of the polygon is the same as the number of rows in the model. Turns out when running Subsurface-mobile on Android that simple truth doesn't seem to be correct. Most of the time the polygon seems to have twice as many elements as the model. But a few times I ended up in here with a polygon that had fewer elements than the model. And then things crash. This simply avoids the crash. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01QML-UI: make sure errors make it to the logGravatar Dirk Hohndel
get_error_message() clears the error message in the process, so calling it twice in a row does not do what you might think it does. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-01QML UI: add number of loaded dives to logGravatar Dirk Hohndel
This way we can see if loading dives succeeded at all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30CMake hack to build Subsurface-mobile on MacGravatar Dirk Hohndel
With this running make && make install should give you a Subsurface-mobile.app that you can execute (either with double click or using "open Subsurface-mobile.app" from the command line). This contains a couple of hacks but I didn't try too hard to make this clean since Tomaz is redoing the CMake build system, anyway and I'll need to make sure this still works once he's done. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30Fix QML component import path when running Mac bundle of Subsurface-mobileGravatar Dirk Hohndel
When running the QML UI on a Mac the deployment of the QML Components seems to fail and the search path for the components is rather odd - simply the same directory the executable was started from: <bundle>/Contents/MacOS/ To work around this we need to manually copy the components at install time to Contents/Frameworks/qml (not covered in this commit) and make sure that we add the correct import path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30Subsurface-mobile: don't create the GPS source until it is neededGravatar Dirk Hohndel
This should accelerate the startup of the UI a little more. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30QML UI: don't load dives before the UI has been instantiatedGravatar Dirk Hohndel
This should deal with a big part of the delay when starting the app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30Clear the Dive model before repopulating itGravatar Dirk Hohndel
Otherwise we could get duplicate dives in the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-29Merge branch 'mobilecomponents' of github.com:sebasje/subsurfaceGravatar Dirk Hohndel
2015-11-30sync with mobilecomponents 68c6dc9Gravatar Sebastian Kügler
This fixes spacing around the icon in the left drawer, the stretched-out icons in the navigation menu, the unnecessary scrolling in the same menu, and a few other things. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30improve preferences layoutGravatar Sebastian Kügler
- Use the component's heading for more consistency - spacing between items: largeSpacing above, half of that below, this makes the title visually connect to the widgets it refers to. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Style the checkboxGravatar Sebastian Kügler
Using a normal checkbox, we get black text, not our styled Label. Since, short of doing a style, this is the only way to get the label the right color, and thus not screw up the visual appearance of the drawer, we hand-roll it. This is a bit clunky, but I prefer visual continuity here over code complexity concerns. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Easy access to enable/disable location serviceGravatar Sebastian Kügler
Add a checkbox in the global drawer which allows quick access enabling and disabling the location service. This is something the user wants to keep an eye on, quickly enable it before a trip, so it makes sense to give it some prominence. It also helps reminding that the user switched the device into battery-monster-mode. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30The system integrated component is TextAreaGravatar Marco Martin
this will give graphical styling and behavior Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30Align the labels ar rightGravatar Marco Martin
uniform look for forms: labels aligned at the right, fileds at the left Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30use a ScrollView for the main flickableGravatar Marco Martin
It managed the styled scroll indicator and the behavior. Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30sync with mobilecomponents e7d789465b9a935ecGravatar Sebastian Kügler
This fixes lack of spacing in the drawer's menu items. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Align subsurface logo correctlyGravatar Sebastian Kügler
The right hand side of the logo was slightly off of the left orientation line for the rest of the layout. This changes it to Units.smallSpacing, which is used for this kind of spacing. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Smaller topbar, no button in it anymoreGravatar Sebastian Kügler
This change makes the top bar a information/decorational item, not interactive anymore. - The menu at the top-right is redundant, it is provided by the left-hand-side drawer and visually present through the botom-centered control button. - The back button is already provided on Android by default, swiping back in the UI also works, so this button provides a third method to go back -- that's overkill. Less is more. Less top bar means more screen estate for the meat. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Fix left margin in dive listGravatar Sebastian Kügler
Specifying a negative margin means that we negate the margin that the ListItem so carefully figures out for us, don't do that. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30Divelist has its own colorGravatar Marco Martin
don't reassign DiveList color upon declaration it's just redundant and error prone Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30sync with mobilecomponents 67e73fa85eGravatar Sebastian Kügler
Colors have slightly changed in breeze. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Simplify dive list itemsGravatar Sebastian Kügler
- Replace the custom text items with the Components' label - Remove now unneeded properties The goal is to use less different font sizes, as to give the listview a calmer and more uniform look. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add a bit of spacing below the dive detailsGravatar Sebastian Kügler
This achieves two things: - make the contents not seem crammed against the bottom - allow the user to scroll the content above the drawer icon Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29fix contents sizeGravatar Marco Martin
correct childrenRect mistakedly called contentRect Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-29Simple DiveList as initial PageGravatar Marco Martin
Simplify the default page in main.qml: DiveList has everything needed, remove the outside layout and the message bar Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-29sync with mobilecomponents' d3fa79b50b54Gravatar Sebastian Kügler
This fixes the flickering when the drag button hits the right edge. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add missing iconGravatar Sebastian Kügler
This is the SVG file used on the drag button. Like the other two, it's taken from the Breeze icon set. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Sync with mobilecomponents 54e4f2622aGravatar Sebastian Kügler
This fixes loading the icon. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Remove obsolote Label itemGravatar Sebastian Kügler
We've already ported everything to MobileComponents.Label, so this file can be taken behind the barn, never to be seen again. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Merge branch 'mobilecomponents' of github.com:sebasje/subsurfaceGravatar Dirk Hohndel
2015-11-29Make pictures respond to double clicks againGravatar Robert C. Helling
The Drag & Drop functionality swallowd the click events so double clicks never happend. So here, we detect this and call the handler explicitly. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-29Port the page navigation to ApplicationWindow's oneGravatar Marco Martin
The ApplicationWindow component has an internal PageRow for the management of the application's pages, use that instead of an own StackView. Use shared components for common things in the app ListItem for the dive list Page for application pages, for correct background color and moving of the action button Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Sync to mobilecomponents 67cf594b4ddcGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Fix reference errors caused by moving properties aroundGravatar Sebastian Kügler
This makes things like accent(Text)Color and our two custom point sizes for fonts resolve correctly again. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29new container for extended theme propertiesGravatar Sebastian Kügler
Move the properties we previously added to units and theme into their own container. This encapsulates these things that belong together and allows us to move it out later without many problems. Also, litter the global namespace a bit less. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Sync with upstream mobilecomponentsGravatar Sebastian Kügler
This updates to the state of bf7914b67c45e Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Rework central navigationGravatar Sebastian Kügler
This patch is the part implementing the drawers and in-app page navigation. In more detail: - main.qml uses the mobilecomponents plugin and the APIs as already changed in the other components - The extended properties have moved into the root item (for now, they'll get properly encapsulated later) - A menu can be swiped in from the left - The application makes better use when used horizontally (if there's enough space, so depending on the display you can get divelist and -details next to each other, one phone/portrait formfactor, the layout stays in a single column. - The options for GPS have been grouped into a submenu This change follows the Plasma mobile human interface guidelines. These changes are actually relatively small considered what they're doing, most of the logic is encapsulated in mobilecomponents' PageRow and *Drawer classes. The previous navigation pattern is actually a subset of this one, so it still works. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Allow to use QML imports shipped in the qrc fileGravatar Sebastian Kügler
This adds qrc://imports to the paths that the Qml engine considers for findings import plugins. This change makes loading the mobilecomponents plugin work (it won't be found otherwise). Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add banner image for the left drawer menuGravatar Sebastian Kügler
This picture is used for the header part of the drawer which can be swiped in from the left. I'm sure Dirk has a better one, but this works quite nicely until he gets to replace it. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29port these as well to mobilecomponentsGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29use mobilecomponents for our pagesGravatar Sebastian Kügler
This is a dumb port of a number of properties to use the new theme and units API. - import the plugin - change accessors from units and theme to MobileComponents.Unit and MobileComponents.Theme Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Add new files to the qrcGravatar Sebastian Kügler
This adds only the bits from MobileComponent that we already use to the qrc file, including two icons go-next and go-previous (2 simple SVG icons taken from the breeze theme). Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29import mobilecomponentsGravatar Sebastian Kügler
This commit adds the .qml and qmldir files for the MobileComponents import. It contains low-level things like units and theme, and mid-level things like Heading, and high-level navigation in the form of an ApplicationWindow and Drawers that hold menues and provide swipe interactions between the pages. These components are a more full version of the "light" plasma components we have been using to make the UI scale well and appear more consistent (coloring, spacing, alignment, etc.). An interesting change is that Units and Theme are now singleton types, which is more efficient. It does mean a few changes to our current API usage: - units becomes Units - theme becomes Theme - 2 properties move out of each (we can't subclass singleton types) This change also means that we're using the vanilla upstream components, so it's very easy to get improvements to these rather young components in, and we don't have to do this work on our own. The mobilecomponents consist of just a bunch of qml files which we can deploy through the qrc file. In the next commits, we will gradually make the current UI use these new elements. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-28User manual: add missing empty lineGravatar Dirk Hohndel
This way the ASCIIDOC works as expected and creates the numbered list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-25Don't overwrite air temperatureGravatar Dirk Hohndel
If we already have an air temperature set, don't overwrite it with potentially less accurate infromation from the first sample. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-25Remove unused codeGravatar Dirk Hohndel
Reported-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Location completion matches on whole nameGravatar Dirk Hohndel
When typing in a partial location name, the match now considers the whole text, not just the start of the text. So typing in "Yell" will match both "Yellow House" and "Mellow Yellow". Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Cmake: fix building of Subsurface-mobile on MacGravatar Dirk Hohndel
The error message was completely useless, but it turned out to be an issue of the order of arguments to add_executable(). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-24Drag and Drop ImagesGravatar Robert C. Helling
Now that we have the possibility to add images without meaningful time stamps to a dive, we should let the user provide that time offset manually. This patch allowed pictures to be dragged from the image list to the profile. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>