aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-11-07diveplannermodel.cpp: move unused variables into a commented sectionGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07filtermodels.cpp: fix an argument order warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07profilewidget2.cpp: remove unused variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07preferences_network.cpp: remove some unused 'reply' variablesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07divelocationmodel: fix some signed/unsigned warningsGravatar Lubomir I. Ivanov
Use uint32_t for divesite UUIDs. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07diveshareexportdialog.cpp: fix an argument order warningGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07maintab.cpp: remove unused variableGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07facebook_integration.cpp: add return statement to a 'bool' methodGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07mainwindow.cpp: remove unused variable 'diveSitePictures'Gravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07subsurfacewebservices.cpp: make sure 'changed' is not unusedGravatar Lubomir I. Ivanov
Make sure 'changed' in SubsurfaceWebServices::buttonClicked() is not unused even if NO_MARBLE is defined. It appears to be used only in the #ifndef NO_MARBLE branch. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07subsurfacewebservices.cpp: remove unused FILE variableGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07divelogimportdialog.cpp: declare an enum as typeGravatar Lubomir I. Ivanov
'known' is a static variable which is not used. by declaring 'enum Known', now there is a *type* which enumerates the values. Having 'static Known known = <something>' would then work, but since there is no use of such a variable there is no point of declaring it. There is also no use of the 'Known' type itself and an anonymous enum would work as well. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07locationinformation.cpp: fix unused variableGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07btdeviceselectiondialog.cpp: fix unused variableGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07desktop-main.cpp: fix unused 'application' variableGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-11-07Subsurface-mobile: load preferences after org is set upGravatar Dirk Hohndel
The persistent storage of the preferences includes the Organization name set in the application. So we need to make sure we load the preferences AFTER setting up the Organization in the init_ui() call. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Android: go back to using Qt's DataLocationGravatar Dirk Hohndel
It appears that the default path we tried to use on Android since commit 80056278f7a2 ("android.cpp: update path retriaval scheme") didn't work - so let's just go back to what we used to do as that was perfectly fine. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Remove unnecessary call from testsGravatar Dirk Hohndel
Now that the WindowTitleUpdater is fixed we don't need to create an instance in the tests, either. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Don't crash if we have no WindowTitleUpdater registeredGravatar Dirk Hohndel
Subsurface-mobile doesn't have a window title with the name of our file name at this point, so simply don't try to trigger the update. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Subsurface-mobile: make sure we load the preferencesGravatar Dirk Hohndel
Otherwise all kinds of things don't work right. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve labels in login dialogGravatar Sebastian Kügler
We want short labels here in order to allow more horizontal space to be taken by the inputs. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve TopBar and login window layoutGravatar Sebastian Kügler
This provides a bit more spacing around the logo and aligns the text to the bottom of the logo, rather than to its horizontal center. Looks cleaner. Text in the login page is now aligned towards the inputs, giving a closer connection between label and widget. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07tighter margins on start pageGravatar Sebastian Kügler
We use units.largeSpacing margins for page-level spacing. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Rejig navigationGravatar Sebastian Kügler
This change streamlines the navigation across the pages to be in line with the stackview organization. The top bar becomes a static element with the title and a button that either opens the preferences or shows the back arrow. This makes it a bit more efficient, since we load the title bar only one, and there are no strange animations in the title. The stackview gets the role of content container, the "chrome" around it is laid out in main.qml. Most of the churn in this patch comes from moving large blocks of code between files with different indentation levels. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Remove hard-coded size from label componentGravatar Sebastian Kügler
This isn't necessary anymore with the default font size fixed, remove it. The label itself is still useful for coloring, and perhaps more styling in the future. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Clean up dead code in unitsGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve 1st start experienceGravatar Sebastian Kügler
This commit adds a start page that is shown when there are no dives in the list, for example when the user first starts the app. Instead of a large empty screen, we offer 3 ways for the user to get dives onto the device: download from cloud storage, dive computer and adding dives manually. This fills in the empty space in the dive list, and isn't a top-level item since it really just makes sure the user isn't greeted with a big empty space, which looks pretty unpolished, but rather guided through the first steps. Needs aligning of the naming in the actions. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Improve layout of login dialogGravatar Sebastian Kügler
- Add margins consistent with other pages - Top-align the dialog, we want to keep the inputs as high as possible on the screen to prevent the on-screen-keyboard from covering them - Add a checkbox to show the password, with input on mobile devices, this is a commonly found and useful feature - Remove Cancel button, this is just navigation chrome, the user can simply use the back button in the top bar (will be fixed in a subsequent patch) Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07organize qml files in subdirectoriesGravatar Sebastian Kügler
This makes the organization of the qml files a bit more fine-grained, it prevents mixing of .cpp and QML files, and also of what's compiled, and what's included in the app as qrc data. In particular: - subsurface specific QML items go into the qml/ subdirectory - theme and unit definitions to into qml/theme subdirectory (they already were located in a theme directory) - generic components, such as our Label goes into qml/components This facilitates sharing of functionality and identifying common stuff better. Ideally, we can pull qml/theme and qml/components from a standardized set at some point, so we don't have to maintain that code. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Fix indentation in qrc fileGravatar Sebastian Kügler
Tabs slippped in while the rest of the file uses spaces. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-07Recognize Android as CMAKE_SYSTEM_NAMEGravatar Sebastian Kügler
This fixes the build for me against Qt 5.5. It seems Android is not Linux anymore, but uses its own CMAKE_SYSTEM_NAME now, so in this case we also want to compile android.cpp. This change should be rather safe, since it catches a condition that was not previously handled. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06android build: remote -u flag from git pullGravatar Sebastian Kügler
git pull -u isn't known on my systems (recent Debian and Ubuntu), so better not use this flag. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06More info in ThemeTestGravatar Sebastian Kügler
This makes problems with the default font more apparent Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Improve theme information panelGravatar Sebastian Kügler
- add sizing information for fonts and fontmetrics - compute devicePixelRatio from fontmetrics This shows that Android doesn't give us accurate information about the default font (hence the Text items being way too small) and a wrong Screen.devicePixelRatio, which we can actually compute ourselves. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Include label in the binaryGravatar Sebastian Kügler
Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06new Label itemGravatar Sebastian Kügler
Add a Label that we can use for styled text until we figured out how to set the default font size. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Theme tweaksGravatar Sebastian Kügler
- gridUnits is dynamic again, using FontMetrics now - Add a page to display some sizing-relevant details, so we can debug dpi problems a bit better on Android Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Replace units.spacing with units.smallSpacingGravatar Sebastian Kügler
In line with the new Units API. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Add some compatibility extensions to theme and unitGravatar Sebastian Kügler
- This allows us to use these new things without changing much in our own code, things now work again. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Add qmldir fileGravatar Sebastian Kügler
This will be needed at some point, so better put it in the right place already, so we don't forget enabling the singleton usage once we've fleshed out how that could work exactly. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06some changes from the upstream wip-branchGravatar Sebastian Kügler
- remove the singleton usage, this will need a bit more magic in the background. Not a huge problem since we're only using one instance anyway, and the object itself is rather light - hardcode gridUnit for now. I'd like to use TextMetrics or FontMetrics there directly, but I'm not sure we can depend on Qt 5.4 and QtQuick 2.5. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06more complete implementation of Plasma's UnitsGravatar Sebastian Kügler
This is a currently work-in-progress attempt at making a minimal set of Plasma components available. The code needs a bunch of adjustments yet, which I'm making in tune with upstream. The idea is to create a standardized sub-set of Plasma's QML API for applications, which brings only minimal new dependencies (for now: none). Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Better file names for Subsurface-mobile related sourcesGravatar Dirk Hohndel
They aren't Android specific - they are for the QML UI mobile app which should run on iOS as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Use default font size on AndroidGravatar Sebastian Kügler
This solves the root problem of most of the dpi-depdent sizing in the mobile Android version. When setting a custom font size, we circumvent Android's defaults, which means that we end up setting the font size further down the road to get readable fonts. I suppose this was set in order to make the QWidget-based user interface "work" on Android. Hard-coding a font size at this central point brings more headache than needed, one could instead consider adding an #ifdef Q_OS_ANDROID in main window. Signed-off-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Move ImageDownloader out of the desktop widgetsGravatar Dirk Hohndel
This required a bit more untangling, but with this it seems we can build subsurface-mobile again (at least on the desktop). Interesting is the removal from inside the ImageDownloader of the call to DivePictureModel::instance()->updateDivePictures() - which actually could cause some interesting recursion issues. If it turns out we did indeed need this, it needs to be re-architected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Don't connect to the PreferencesDialog in Subsurface-mobileGravatar Dirk Hohndel
Just more untangling from the desktop UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Remove more unnecessary include file referencesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06profile.h: fix incomplete typeGravatar Lubomir I. Ivanov
ruleritem.cpp throws an error about incomplete type 'struct gas_pressures'. 'struct gas_pressures' is defined in dive.h, so every header that has usage of the type needs to include dive.h. Such a header is profile.h which has 'struct gas_pressures pressures' in 'struct plot_data', by including dive.h on top of profile.h every source file (e.g. ruleritem.cpp) that includes profile.h will now receive knowledge of a complete 'struct gas_pressures' type. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06remove some mainwindow.h includesGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06Untangle DiveCalculatedCeiling from MainWindowGravatar Lubomir I. Ivanov
DiveCalculatedCeiling is the last class the references MainWindow in the profile-widget stack. In modelDataChanged() it looks for the information() widget and sets a slot for the dateTimeChanged() signal that information() emits. To solve the issue we make DiveCalculatedCeiling recieve a ProfileWidget2 reference and make ProfileWidget2 emit the dateTimeChangedItems() signal. ProfileWidget2 itself listens for the dateTimeChanged() signal that information() emits and emits dateTimeChangedItems() to notify any possible children/item listeners in the ProfileWidget2::dateTimeChanged() slot. The connection between ProfileWidget2 and information() is set in MainWindow. This makes DiveCalculatedCeiling unaware of MainWindow and which class originally emits the dateTimeChanged() signal to ProfileWidget2. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> -- Think delegation. Tomaz, please take a look at this one, to double check if i messed up. also i have zero idea how the mobile app is setting these connections, if it does so even. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>